/* VocaDo / VocaVibe legal pages.
   Colours and type come from the apps' own tokens so these pages read as part
   of the product rather than as something bolted on:
   lib/shared/theme/vv_tokens.dart (primary #5B5BFF, ink #1E1B4B, …) and the
   two brand faces — Lexend for text, Fredoka for the wordmark only. */

:root {
  --primary:      #5B5BFF;
  --primary-deep: #4342C7;
  --accent:       #A78BFA;
  --accent-soft:  #E0E7FF;
  --ink:          #1E1B4B;
  --ink-soft:     #4B4880;
  --ink-mute:     #7C7AA3;
  --line:         #E4E4F5;
  --surface:      #FFFFFF;
  --surface-soft: #F5F5FF;
  --page:         #FAFAFE;
  --amber:        #8A6100;
  --amber-bg:     #FFF7E3;
  --amber-line:   #F0DBA8;

  --measure: 68ch;
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --primary:      #9B98FF;
    --primary-deep: #B9B7FF;
    --accent:       #C4B0FF;
    --accent-soft:  #262550;
    --ink:          #EDECFA;
    --ink-soft:     #C3C1E0;
    --ink-mute:     #908DB8;
    --line:         #2C2A55;
    --surface:      #171633;
    --surface-soft: #1D1B40;
    --page:         #100F26;
    --amber:        #F0C878;
    --amber-bg:     #2E2410;
    --amber-line:   #57431A;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--page);
  color: var(--ink-soft);
  font-family: "Lexend", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1000px; margin: 0 auto; padding: 0 24px 96px; }
.col  { max-width: var(--measure); }

/* ── header ─────────────────────────────────────────────────────────── */
.masthead {
  display: flex; flex-wrap: wrap; align-items: center; gap: 18px 26px;
  padding: 34px 0 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 44px;
}
.lockup { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.lockup svg { width: 54px; height: auto; color: var(--primary); flex: none; }
.wordmark {
  font-family: "Fredoka", "Lexend", sans-serif;
  font-size: 1.6rem; line-height: 1; letter-spacing: -.01em;
  color: var(--ink);
}
.wordmark b { font-weight: 600; }
.wordmark span { font-weight: 400; color: var(--ink-mute); }
.byline {
  display: block; font-family: "Lexend", sans-serif;
  font-size: .72rem; letter-spacing: .06em; color: var(--ink-mute);
  margin-top: 3px;
}
nav { margin-left: auto; display: flex; flex-wrap: wrap; gap: 6px; }
nav a {
  font-size: .88rem; text-decoration: none;
  color: var(--ink-soft); padding: 7px 13px; border-radius: 999px;
  border: 1px solid transparent;
}
nav a:hover { background: var(--surface-soft); color: var(--ink); }
nav a[aria-current="page"] {
  background: var(--accent-soft); color: var(--primary-deep);
  border-color: var(--primary); font-weight: 500;
}
nav a:focus-visible, .lockup:focus-visible, a:focus-visible {
  outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 6px;
}

/* ── page head ──────────────────────────────────────────────────────── */
h1 {
  font-family: "Fredoka", "Lexend", sans-serif;
  font-weight: 500;
  font-size: clamp(2.1rem, 5vw, 3.1rem);
  line-height: 1.08; letter-spacing: -.02em;
  color: var(--ink);
  margin: 0 0 .3em; text-wrap: balance;
}
.subtitle {
  font-size: 1.1rem; color: var(--ink-soft);
  max-width: 54ch; margin: 0 0 26px;
}
.docmeta {
  display: flex; flex-wrap: wrap; gap: 6px 22px;
  font-size: .82rem; color: var(--ink-mute);
  padding-bottom: 26px; border-bottom: 1px solid var(--line);
  margin-bottom: 34px;
}
.docmeta b { color: var(--ink-soft); font-weight: 500; }

/* ── draft banner ───────────────────────────────────────────────────── */
.draft {
  background: var(--amber-bg);
  border: 1px solid var(--amber-line);
  color: var(--amber);
  border-radius: var(--radius);
  padding: 15px 20px;
  font-size: .92rem; line-height: 1.6;
  margin-bottom: 34px;
}
.draft b { color: inherit; }

/* ── body ───────────────────────────────────────────────────────────── */
h2 {
  font-family: "Fredoka", "Lexend", sans-serif;
  font-weight: 500; font-size: 1.55rem; line-height: 1.2;
  color: var(--ink); letter-spacing: -.01em;
  margin: 52px 0 14px; scroll-margin-top: 20px;
  text-wrap: balance;
}
h3 {
  font-size: 1.02rem; font-weight: 600; color: var(--ink);
  margin: 30px 0 8px;
}
p  { margin: 0 0 1.05em; max-width: var(--measure); }
ul { margin: 0 0 1.2em; padding-left: 1.15em; max-width: var(--measure); }
li { margin-bottom: .5em; }
strong { color: var(--ink); font-weight: 600; }
a { color: var(--primary); text-underline-offset: 3px; }

/* ── contents ───────────────────────────────────────────────────────── */
.toc {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 26px; margin-bottom: 20px;
}
.toc h2 {
  font-size: .78rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-mute); font-family: "Lexend", sans-serif; font-weight: 600;
  margin: 0 0 12px;
}
.toc ol { margin: 0; padding-left: 1.3em; columns: 2; column-gap: 34px; }
.toc li { margin-bottom: 5px; break-inside: avoid; }
.toc a { color: var(--ink-soft); text-decoration: none; }
.toc a:hover { color: var(--primary); text-decoration: underline; }
@media (max-width: 640px) { .toc ol { columns: 1; } }

/* ── data table ─────────────────────────────────────────────────────── */
.tablewrap { overflow-x: auto; margin: 8px 0 26px; }
table {
  border-collapse: collapse; width: 100%; min-width: 520px;
  font-size: .93rem; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
}
th {
  text-align: left; font-size: .74rem; letter-spacing: .07em;
  text-transform: uppercase; color: var(--ink-mute); font-weight: 600;
  padding: 13px 18px; border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}
td {
  padding: 13px 18px; border-bottom: 1px solid var(--line);
  vertical-align: top; color: var(--ink-soft);
}
tbody tr:last-child td { border-bottom: none; }
td:first-child { color: var(--ink); font-weight: 500; }

/* ── callout ────────────────────────────────────────────────────────── */
.note {
  background: var(--surface); border: 1px solid var(--line);
  border-left: 3px solid var(--primary);
  border-radius: 10px; padding: 18px 22px; margin: 26px 0;
  max-width: var(--measure);
}
.note p:last-child { margin-bottom: 0; }
.note.warn { border-left-color: var(--amber); }

/* ── cards (index) ──────────────────────────────────────────────────── */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-top: 34px; }
.card {
  display: block; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px 24px;
  transition: border-color .25s ease, transform .25s ease;
}
@media (prefers-reduced-motion: reduce) { .card { transition: none; } }
.card:hover { border-color: var(--primary); transform: translateY(-2px); }
.card h3 {
  font-family: "Fredoka", "Lexend", sans-serif; font-weight: 500;
  font-size: 1.24rem; color: var(--ink); margin: 0 0 8px;
}
.card p { font-size: .92rem; color: var(--ink-soft); margin: 0; }

/* ── contact block ──────────────────────────────────────────────────── */
.contact {
  background: var(--surface-soft); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px 28px; margin-top: 12px;
  max-width: var(--measure);
}
.contact p:last-child { margin-bottom: 0; }

/* ── footer ─────────────────────────────────────────────────────────── */
footer {
  margin-top: 76px; padding-top: 30px;
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; align-items: center; gap: 20px 34px;
  font-size: .86rem; color: var(--ink-mute);
}
footer img { height: 30px; width: auto; opacity: .85; }
footer .flinks { margin-left: auto; display: flex; flex-wrap: wrap; gap: 18px; }
footer a { color: var(--ink-soft); text-decoration: none; }
footer a:hover { color: var(--primary); text-decoration: underline; }
