/* WaxSync guide + manual pages. Shares the app's Glass & Depth tokens with
   index.html; adds a documentation reader layout. No em dashes in content. */
:root {
  color-scheme: light dark;
  --violet: #6A4CE0;
  --violet-bright: #7C5CE6;
  --ink: #211F33;
  --ink-2: #6F6B82;
  --ink-3: #928DA6;
  --bg: #F4F1FA;
  --card: rgba(255,255,255,0.7);
  --card-solid: #FFFFFF;
  --hairline: rgba(40,24,80,0.10);
  --hairline-strong: rgba(40,24,80,0.14);
  --shadow: 0 24px 60px -26px rgba(76,49,176,0.30);
  --shadow-sm: 0 10px 26px -14px rgba(76,49,176,0.22);
  --nav: rgba(244,241,250,0.72);
  --amber: #9A6B0C; --amber-bg: rgba(184,131,14,0.13); --amber-line: rgba(184,131,14,0.5);
  --blue: #2C6BD8; --blue-bg: rgba(56,120,216,0.11); --blue-line: rgba(56,120,216,0.5);
  --aurora:
    radial-gradient(52% 40% at 12% -6%, rgba(124,92,230,0.18), transparent 62%),
    radial-gradient(44% 38% at 98% 2%, rgba(255,120,175,0.09), transparent 60%),
    radial-gradient(56% 52% at 90% 104%, rgba(47,158,99,0.08), transparent 62%);
}
@media (prefers-color-scheme: dark) {
  :root {
    --violet: #A78BFF;
    --violet-bright: #B9A2FF;
    --ink: #F4F2F8;
    --ink-2: #A7A2B8;
    --ink-3: #7C7690;
    --bg: #100E17;
    --card: rgba(255,255,255,0.05);
    --card-solid: #1B1826;
    --hairline: rgba(255,255,255,0.10);
    --hairline-strong: rgba(255,255,255,0.16);
    --shadow: 0 30px 70px -28px rgba(0,0,0,0.66);
    --shadow-sm: 0 14px 34px -18px rgba(0,0,0,0.55);
    --nav: rgba(16,14,23,0.68);
    --amber: #F0C566; --amber-bg: rgba(240,185,58,0.11); --amber-line: rgba(240,185,58,0.42);
    --blue: #8FB6FF; --blue-bg: rgba(120,160,240,0.12); --blue-line: rgba(120,160,240,0.42);
    --aurora:
      radial-gradient(50% 40% at 12% -6%, rgba(124,92,230,0.28), transparent 62%),
      radial-gradient(42% 38% at 98% 2%, rgba(224,84,132,0.13), transparent 60%),
      radial-gradient(58% 54% at 90% 104%, rgba(47,158,99,0.11), transparent 62%);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink); background: var(--bg); line-height: 1.65;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
}
body::before { content: ""; position: fixed; inset: 0; z-index: -1; background: var(--aurora); pointer-events: none; }
a { color: var(--violet); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* Nav (matches index.html) */
header.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px);
  background: var(--nav); border-bottom: 1px solid var(--hairline);
}
.nav-inner { display: flex; align-items: center; gap: 20px; height: 66px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; letter-spacing: -0.02em; font-size: 1.16rem; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; }
.nav-links { margin-left: auto; display: flex; align-items: center; gap: 28px; }
.nav-links a.n { font-size: 0.95rem; font-weight: 600; color: var(--ink-2); transition: color .18s; }
.nav-links a.n:hover { color: var(--ink); text-decoration: none; }
.nav-links a.n.here { color: var(--violet); }
@media (max-width: 720px) { .nav-links a.n { display: none; } .nav-links a.n.here { display: inline; } }

/* Page hero */
.page-hero { padding: clamp(40px, 7vw, 80px) 0 clamp(20px, 3vw, 34px); }
.eyebrow { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--violet); margin: 0 0 14px; }
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 3.3rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; margin: 0; text-wrap: balance; }
.page-hero p { font-size: clamp(1.05rem, 1.7vw, 1.25rem); color: var(--ink-2); max-width: 52ch; margin: 18px 0 0; }

/* Doc layout: sticky contents rail + reading column */
.doc { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); padding: clamp(20px, 3vw, 40px) 0 clamp(56px, 8vw, 96px); align-items: start; }
.toc { position: sticky; top: 88px; }
.toc h2 { font-size: 0.76rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 14px; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { margin: 0 0 3px; }
.toc a { display: block; padding: 7px 12px; border-radius: 10px; color: var(--ink-2); font-size: 0.92rem; font-weight: 550; line-height: 1.35; transition: background .16s, color .16s; }
.toc a:hover { color: var(--ink); background: var(--card); text-decoration: none; }
.doc-body { max-width: 72ch; }
@media (max-width: 860px) {
  .doc { grid-template-columns: 1fr; gap: 22px; }
  .toc { position: static; }
  .toc-card { background: var(--card); border: 1px solid var(--hairline); border-radius: 16px; padding: 18px 18px 8px; box-shadow: var(--shadow-sm); }
  .toc a { padding: 8px 10px; }
}

/* Article blocks */
.article { padding: clamp(26px, 4vw, 40px) 0; border-top: 1px solid var(--hairline); }
.article:first-child { border-top: 0; padding-top: 4px; }
.article h2 { font-size: clamp(1.5rem, 2.8vw, 2rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; margin: 0; text-wrap: balance; scroll-margin-top: 84px; }
.article h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.01em; margin: 28px 0 0; scroll-margin-top: 84px; }
.article .summary { color: var(--violet); font-weight: 600; font-size: 0.94rem; margin: 8px 0 0; }
.article p { margin: 16px 0 0; color: var(--ink); }
.article p.intro { font-size: 1.06rem; }
.article strong { color: var(--ink); font-weight: 680; }
.article ul, .article ol { margin: 16px 0 0; padding-left: 0; color: var(--ink); }
.article ul { list-style: none; }
.article ul li { position: relative; padding-left: 22px; margin: 9px 0; }
.article ul li::before { content: ""; position: absolute; left: 4px; top: 11px; width: 6px; height: 6px; border-radius: 50%; background: var(--violet); }
.article ol { list-style: none; counter-reset: step; }
.article ol > li { position: relative; padding-left: 44px; margin: 16px 0; }
.article ol > li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: -2px; width: 30px; height: 30px; border-radius: 9px;
  display: grid; place-items: center; font-size: 0.9rem; font-weight: 700; color: #fff;
  background: linear-gradient(150deg, var(--violet-bright), var(--violet));
  box-shadow: 0 8px 18px -8px rgba(106,76,224,0.65);
}
.article ol > li strong:first-child { display: block; color: var(--ink); margin-bottom: 2px; }

/* Figures */
figure { margin: 22px 0 0; }
figure img { display: block; width: 100%; height: auto; border-radius: 18px; border: 1px solid var(--hairline-strong); box-shadow: var(--shadow-sm); }
figure.shot img { max-width: 300px; }
figure figcaption { margin: 10px 2px 0; color: var(--ink-3); font-size: 0.86rem; }

/* Callouts (match the app) */
.callout { margin: 20px 0 0; border-radius: 14px; padding: 15px 17px; font-size: 0.96rem; border: 1px solid; display: flex; gap: 12px; }
.callout svg { flex: 0 0 auto; width: 20px; height: 20px; margin-top: 1px; }
.callout p { margin: 0; color: var(--ink); }
.callout strong { color: var(--ink); }
.callout.safety { background: var(--amber-bg); border-color: var(--amber-line); }
.callout.safety svg { color: var(--amber); }
.callout.useful { background: var(--blue-bg); border-color: var(--blue-line); }
.callout.useful svg { color: var(--blue); }

/* Back to top / footer link row */
.doc-foot { border-top: 1px solid var(--hairline); margin-top: 30px; padding-top: 26px; display: flex; gap: 24px; flex-wrap: wrap; }
.doc-foot a { font-weight: 650; }

/* Footer (matches index.html) */
footer { border-top: 1px solid var(--hairline); padding: 40px 0 52px; }
.foot-grid { display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.foot-brand { display: flex; align-items: center; gap: 11px; font-weight: 800; letter-spacing: -0.02em; font-size: 1.1rem; color: var(--ink); }
.foot-brand img { width: 28px; height: 28px; }
.foot-tag { color: var(--ink-2); margin: 12px 0 0; font-size: 0.95rem; }
.foot-links { display: flex; gap: 26px; flex-wrap: wrap; }
.foot-links a { color: var(--ink-2); font-weight: 600; font-size: 0.95rem; }
.foot-links a:hover { color: var(--ink); }
.foot-bottom { margin-top: 30px; color: var(--ink-3); font-size: 0.85rem; }

/* Support hub */
.support { max-width: 760px; }
.support h2 { font-size: clamp(1.35rem, 2.4vw, 1.7rem); font-weight: 800; letter-spacing: -0.01em; margin: clamp(34px, 5vw, 52px) 0 16px; }
.support > p { color: var(--ink); margin: 0 0 4px; }
.hub { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 6px 0 0; }
@media (max-width: 720px) { .hub { grid-template-columns: 1fr; } }
.hub-card { display: block; background: var(--card); border: 1px solid var(--hairline); border-radius: 20px; padding: 26px 24px; box-shadow: var(--shadow-sm); transition: transform .18s, box-shadow .18s; }
.hub-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; }
.hub-card .ico { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: linear-gradient(150deg, var(--violet-bright), var(--violet)); color: #fff; margin-bottom: 16px; box-shadow: 0 10px 22px -10px rgba(106,76,224,0.7); }
.hub-card .ico svg { width: 24px; height: 24px; }
.hub-card h3 { font-size: 1.22rem; font-weight: 750; margin: 0; color: var(--ink); letter-spacing: -0.01em; }
.hub-card p { margin: 8px 0 0; color: var(--ink-2); font-size: 0.96rem; }
.hub-card .go { display: inline-block; margin-top: 14px; color: var(--violet); font-weight: 650; font-size: 0.92rem; }
.faq details { background: var(--card); border: 1px solid var(--hairline); border-radius: 14px; padding: 2px 18px; margin: 10px 0; box-shadow: var(--shadow-sm); }
.faq summary { font-weight: 650; cursor: pointer; padding: 14px 0; list-style: none; color: var(--ink); display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--violet); font-weight: 700; font-size: 1.2rem; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0 0 15px; color: var(--ink-2); }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
