/* Wand public pages: Privacy Policy and Support.
   No web fonts, no images from other hosts, no JavaScript: the CSP in
   _headers allows only this stylesheet and same-origin images. */

:root {
  color-scheme: light dark;

  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1c1b19;
  --muted: #57534e;
  --line: #e4e0d8;
  --accent: #5b3fd1;
  --accent-soft: #efebff;
  --focus: #5b3fd1;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --step-1: clamp(1.15rem, 1.08rem + 0.35vw, 1.3rem);
  --step-2: clamp(1.35rem, 1.2rem + 0.8vw, 1.6rem);
  --step-3: clamp(1.9rem, 1.5rem + 2vw, 2.75rem);

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;

  --measure: 42rem;
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121117;
    --surface: #1b1a22;
    --text: #eceaf2;
    --muted: #a9a6b3;
    --line: #2e2c38;
    --accent: #b9a8ff;
    --accent-soft: #241f3d;
    --focus: #b9a8ff;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  overflow-wrap: break-word;
}

.page {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 var(--space-2);
}

/* Skip link: hidden until it receives keyboard focus. */
.skip {
  position: absolute;
  left: var(--space-2);
  top: -4rem;
  padding: var(--space-1) var(--space-2);
  background: var(--surface);
  color: var(--accent);
  border: 2px solid var(--focus);
  border-radius: 8px;
  z-index: 10;
}

.skip:focus {
  top: var(--space-1);
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Header */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-1) var(--space-3);
  padding: var(--space-3) 0 var(--space-2);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  font-weight: 700;
  font-size: var(--step-1);
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand svg {
  width: 1.75rem;
  height: 1.75rem;
  flex: none;
  color: var(--accent);
}

/* The wand and star on the mark take the page colour, so the mark reads
   in both appearances. */
.brand svg .mark-line {
  stroke: var(--bg);
}

.brand svg .mark-star {
  fill: var(--bg);
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav li + li {
  margin-top: 0;
}

.site-nav a {
  display: inline-block;
  padding: 0.35rem 0;
  font-weight: 600;
  text-decoration: none;
}

.site-nav a[aria-current="page"] {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
}

/* Content */
main {
  padding: var(--space-4) 0 var(--space-4);
}

[id] {
  scroll-margin-top: var(--space-2);
}

h1,
h2,
h3 {
  line-height: 1.25;
  letter-spacing: -0.01em;
}

h1 {
  margin: 0 0 var(--space-1);
  font-size: var(--step-3);
}

h2 {
  margin: var(--space-4) 0 var(--space-2);
  padding-top: var(--space-3);
  border-top: 1px solid var(--line);
  font-size: var(--step-2);
}

h3 {
  margin: var(--space-3) 0 var(--space-1);
  font-size: var(--step-1);
}

p,
ul,
ol {
  margin: 0 0 var(--space-2);
}

ul,
ol {
  padding-left: 1.3rem;
}

li + li {
  margin-top: 0.4rem;
}

.lede {
  font-size: var(--step-1);
  color: var(--muted);
  margin-bottom: var(--space-3);
}

.meta {
  color: var(--muted);
  margin-bottom: var(--space-3);
}

/* A settings path such as "Settings → System → Power". */
.path {
  font-weight: 600;
}

.panel {
  margin: var(--space-3) 0;
  padding: var(--space-2) var(--space-3);
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.panel > :first-child {
  margin-top: 0;
}

.panel > :last-child {
  margin-bottom: 0;
}

.panel h2 {
  margin: 0 0 var(--space-1);
  padding: 0;
  border: 0;
  font-size: var(--step-1);
}

.contact-line {
  font-size: var(--step-1);
  font-weight: 600;
}

.toc ul {
  columns: 2 14rem;
  column-gap: var(--space-3);
}

.toc li {
  break-inside: avoid;
}

.brand-list h3 {
  margin-top: var(--space-3);
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: var(--space-3) 0;
  padding: 0;
  list-style: none;
}

.cta li + li {
  margin-top: 0;
}

.cta a {
  display: inline-block;
  padding: 0.7rem 1.2rem;
  border: 2px solid var(--accent);
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
}

.cta a:hover {
  background: var(--accent-soft);
}

/* Footer */
.site-footer {
  padding: var(--space-3) 0 var(--space-5);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer p {
  margin-bottom: var(--space-1);
}

@media print {
  .skip,
  .site-nav {
    display: none;
  }

  a {
    color: inherit;
  }
}
