/* ============================================================
   Quizoo Legal Pages — shared stylesheet
   Tokens transcribed verbatim from the Quizoo Design Bible v1.0
   (`.claude/docs/quizoo-design-bible.html` / `lib/core/theme/app_colors.dart`)
   ============================================================ */

:root {
  /* Light — the bible's `.app` scope */
  --s0: #F3F0FC;  /* background — never pure white */
  --s1: #FFFFFF;  /* card / sheet surface */
  --s2: #F8F6FE;  /* raised / selected surface */
  --s3: #EDE8FA;  /* sunken surface / progress track */
  --tx: #1B1438;  /* text 1 */
  --tx2: #6E668C; /* text 2 */
  --tx3: #9E97B8; /* text 3 */
  --ln: #E7E2F5;  /* hairline */

  --p: #FF8A24; --p-sh: #C85800;          /* Mango — primary CTA */
  --g: #7B4DFF; --g-sh: #5A2CD8;          /* Grape — brand, links */
  --ok: #12C79B; --ok-sh: #0A9A77; --ok-bg: #E2F9F2;   /* Mint */
  --bad: #FF3D6E; --bad-sh: #D31C4C; --bad-bg: #FFE8EE;/* Raspberry */
  --info: #2BB3FF; --gold: #FFC61A; --gold-on: #4A3200;
  --info-bg: #E7F3FE; --info-ln: rgba(43, 179, 255, .35);

  --ov: rgba(27, 20, 56, .5);
  --sh: 0 1px 2px rgba(27, 20, 56, .06), 0 8px 20px -10px rgba(27, 20, 56, .22);
  --splash: linear-gradient(178deg, #7B4DFF 0%, #5F32E6 55%, #4B22C4 100%);
}

[data-app="dark"] {
  --s0: #120D25;
  --s1: #201941;
  --s2: #2A2154;
  --s3: #181233;
  --tx: #F2EEFF;
  --tx2: #ADA4CC;
  --tx3: #7B7399;
  --ln: #332968;

  --p: #FF9A3D; --p-sh: #B85F00;
  --g: #9A78FF; --g-sh: #6A45D6;
  --ok: #22D6AA; --ok-sh: #0E9C79; --ok-bg: #0E3B33;
  --bad: #FF5C84; --bad-sh: #C92253; --bad-bg: #40122A;
  --info: #57C4FF; --gold: #FFD34D;
  --info-bg: #10344E; --info-ln: rgba(87, 196, 255, .3);

  --ov: rgba(4, 2, 12, .66);
  --sh: 0 1px 2px rgba(4, 2, 12, .45), 0 8px 22px -10px rgba(4, 2, 12, .6);
}

/* ------------------------------------------------------------ base */
* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  background: var(--s0);
  color: var(--tx2);
  font: 400 15px/24px 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
}

::selection { background: var(--g); color: #fff; }

a { color: var(--g); font-weight: 700; text-decoration: underline;
    text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--p-sh); }

:focus-visible { outline: 3px solid color-mix(in srgb, var(--g) 45%, transparent);
                 outline-offset: 2px; border-radius: 6px; }

strong { color: var(--tx); font-weight: 700; }
h1, h2, h3, h4 { font-family: 'Baloo 2', 'Plus Jakarta Sans', sans-serif;
                 font-weight: 800; color: var(--tx); }
code, .mono {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .9em;
}
code {
  background: var(--s3); color: var(--tx);
  padding: 2px 7px; border-radius: 8px; white-space: nowrap;
}

.wrap { max-width: 780px; margin: 0 auto; padding: 0 20px; }
main.wrap { padding-bottom: 24px; }

section, footer, .toc-card { scroll-margin-top: 96px; }

/* ---------------------------------------------------------- topbar */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--s1) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ln);
}
.topbar .wrap {
  display: flex; align-items: center; gap: 10px;
  min-height: 64px; max-width: 900px;
}
.topbar .brand { display: flex; align-items: center; gap: 10px;
                 text-decoration: none; color: var(--tx); }
.topbar .brand img { width: 32px; height: 32px; }
.topbar .brand b { font-family: 'Baloo 2'; font-weight: 800;
                   font-size: 20px; line-height: 1; }
.tag {
  font: 700 10.5px/1 'JetBrains Mono', monospace;
  letter-spacing: .12em; color: var(--tx2);
  background: var(--s3); padding: 5px 9px; border-radius: 999px;
}
@media (max-width: 500px) { .tag { display: none; } }
.topbar .spacer { flex: 1; }

/* Segmented theme switch — the Settings segmented control */
.seg {
  display: flex; gap: 2px; background: var(--s3);
  border-radius: 14px; padding: 3px;
}
.seg button {
  appearance: none; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 30px; padding: 0 12px; border-radius: 10px;
  background: transparent; color: var(--tx2);
  font: 700 12.5px 'Plus Jakarta Sans';
  transition: background 120ms ease, color 120ms ease;
}
.seg button[aria-pressed="true"] { background: var(--s1); color: var(--tx); }
.seg .ico { font-size: 13px; }
.seg .lbl { display: none; }
@media (min-width: 560px) { .seg .lbl { display: inline; } }

/* ------------------------------------------------------------- hero */
.hero {
  background: var(--splash);   /* the arena wash — identical in both themes */
  color: #fff; position: relative; overflow: hidden;
}
.hero .wrap { padding: 48px 20px 42px; text-align: center; position: relative; }
.hero img.mark { width: 84px; height: 84px; }
.hero h1 {
  color: #fff; font-size: clamp(30px, 7vw, 50px); line-height: 1.1;
  margin: 14px 0 8px;
}
.hero p.tagline { color: rgba(255, 255, 255, .82);
                  font: 600 16px/24px 'Plus Jakarta Sans'; max-width: 540px;
                  margin: 0 auto 20px; }
.hero .chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.hero .chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22);
  color: #fff; border-radius: 999px; padding: 7px 14px;
  font: 700 12.5px 'Plus Jakarta Sans';
}
.hero .chip .mono { font-size: 11.5px; }
/* drifting play emoji, like the app's celebration sparkle */
.hero .float {
  position: absolute; font-size: 26px; opacity: .16; user-select: none;
  pointer-events: none; animation: drift 9s ease-in-out infinite alternate;
}
.hero .f1 { top: 18%;  left: 7%;  animation-delay: 0s; }
.hero .f2 { top: 55%;  left: 15%; animation-delay: -3s; }
.hero .f3 { top: 22%;  right: 8%; animation-delay: -5s; }
.hero .f4 { top: 60%;  right: 16%; animation-delay: -7s; }
@keyframes drift {
  from { transform: translateY(-8px) rotate(-6deg); }
  to   { transform: translateY(10px) rotate(8deg); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero .float { animation: none; }
}

/* ----------------------------------------------------- chunky buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 54px; padding: 0 26px; border-radius: 18px;
  font: 800 17.5px 'Baloo 2'; letter-spacing: .01em; line-height: 1;
  text-decoration: none; color: #fff !important; background: var(--g);
  box-shadow: 0 4px 0 var(--g-sh);   /* the 4px ledge */
  border: 0; cursor: pointer;
  transition: transform 90ms ease-out, box-shadow 90ms ease-out, filter 90ms ease;
}
.btn:hover { filter: brightness(1.06); text-decoration: none; }
.btn:active { transform: translateY(4px); box-shadow: 0 0 0 var(--g-sh); }
.btn.mango { background: var(--p); box-shadow: 0 4px 0 var(--p-sh); }
.btn.raspberry { background: var(--bad); box-shadow: 0 4px 0 var(--bad-sh); }
.btn.sm { min-height: 44px; padding: 0 20px; border-radius: 14px;
          font-size: 15.5px; }
.btn.wfull { width: 100%; }

/* ------------------------------------------------------------- cards */
.card {
  background: var(--s1); border-radius: 20px;
  box-shadow: var(--sh); padding: 24px; margin: 16px 0;
  border: 1px solid transparent;
}
@media (min-width: 640px) { .card { padding: 28px; } }

.sec-head { display: flex; align-items: center; gap: 13px; margin-bottom: 12px; }
.plate {
  flex: none; width: 40px; height: 40px; border-radius: 12px;
  background: var(--s2); border: 1px solid var(--ln);
  display: grid; place-items: center; font-size: 21px;
}
.sec-head h2 { font-size: 21px; line-height: 1.25; flex: 1; }
.no {
  flex: none; font: 700 11px 'JetBrains Mono', monospace;
  color: var(--tx3); background: var(--s3);
  padding: 4px 9px; border-radius: 999px; letter-spacing: .06em;
}
.card h3 { font-size: 16.5px; margin: 20px 0 6px; line-height: 1.3; }
.card > p:first-of-type { margin-top: 2px; }
.card p, .card dd, .card li { color: var(--tx2); }
.card p, .card ul, .card ol, .card dl { margin-top: 8px; }
.card li + li { margin-top: 6px; }
.card > p + p { margin-top: 8px; }

ul.lead { list-style: none; }
ul.lead > li { position: relative; padding-left: 24px; }
ul.lead > li::before {
  content: ''; position: absolute; left: 6px; top: 9px;
  width: 8px; height: 8px; border-radius: 999px;
  background: var(--g); opacity: .8;
}
ol.num { padding-left: 22px; }
ol.num li::marker { font: 800 12px 'JetBrains Mono', monospace; color: var(--g); }

/* ------------------------------------------------------- note boxes */
.note {
  border-radius: 16px; margin: 16px 0 4px; padding: 15px 18px;
  border: 1.5px solid var(--info-ln); background: var(--info-bg);
  font-size: 14px; line-height: 22px;
}
.note p { margin: 0; }
.note b, .note strong { color: var(--tx); }
.note .lead-e { font-weight: 800; color: var(--tx); margin-right: 2px; }
.note.ok  { border-color: color-mix(in srgb, var(--ok) 40%, transparent);
            background: var(--ok-bg); }
.note.bad { border-color: color-mix(in srgb, var(--bad) 40%, transparent);
            background: var(--bad-bg); }
[data-app="dark"] .note.ok  { border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
[data-app="dark"] .note.bad { border-color: color-mix(in srgb, var(--bad) 45%, transparent); }

/* --------------------------------------------------------- chips/TOC */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--s3); color: var(--tx2); border-radius: 999px;
  padding: 8px 14px; font: 700 13px 'Plus Jakarta Sans'; text-decoration: none;
  border: 1px solid var(--ln); transition: all 120ms ease;
}
.chip:hover { color: var(--g); border-color: var(--g);
              background: var(--s1); text-decoration: none; }
.chip .e { font-size: 15px; }

/* ----------------------------------------------------------- table */
.tblwrap {
  overflow-x: auto; border: 1px solid var(--ln);
  border-radius: 16px; margin: 14px 0;
}
table { width: 100%; border-collapse: collapse; min-width: 620px; }
th {
  background: var(--s2); border-bottom: 1px solid var(--ln);
  text-align: left; padding: 12px 16px;
  font: 700 11px 'Plus Jakarta Sans'; letter-spacing: .08em;
  text-transform: uppercase; color: var(--tx3); white-space: nowrap;
}
td {
  padding: 13px 16px; border-bottom: 1px solid var(--ln);
  font-size: 14px; line-height: 21px; color: var(--tx2); vertical-align: top;
}
tr:last-child td { border-bottom: 0; }
td b.svc {
  font-family: 'Baloo 2'; font-weight: 700; font-size: 15px; color: var(--tx);
  display: block; margin-bottom: 2px;
}
td .mono { font-size: 10.5px; color: var(--tx3); letter-spacing: .05em; }
td a { font-weight: 600; font-size: 13px; }

/* --------------------------------------------------- definition list */
dl.defs dt { font-family: 'Baloo 2'; font-weight: 700; color: var(--tx);
             font-size: 15.5px; margin-top: 14px; }
dl.defs dd { margin-top: 3px; }
dl.defs dt:first-child { margin-top: 0; }

/* ---------------------------------------------------------- footer */
footer { background: var(--s1); border-top: 1px solid var(--ln);
         margin-top: 40px; }
footer .inner { max-width: 780px; margin: 0 auto; padding: 34px 20px 44px;
                text-align: center; }
footer img { width: 42px; height: 42px; margin-bottom: 8px; }
footer .big { font-family: 'Baloo 2'; font-weight: 800; font-size: 17px;
              color: var(--tx); }
footer .fine { font-size: 13px; color: var(--tx3); margin-top: 6px;
               line-height: 21px; }
footer .links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 14px;
                justify-content: center; font-size: 13.5px; }
footer .links a { text-decoration: none; }
footer .links a:hover { text-decoration: underline; }
footer .mono { font-size: 11px; color: var(--tx3); margin-top: 14px;
               letter-spacing: .04em; }

/* ------------------------------------------------- back-to-top ledge */
.btp {
  position: fixed; right: 18px; bottom: 18px; z-index: 40;
  width: 48px; height: 48px; border-radius: 999px;
  display: grid; place-items: center;
  background: var(--p); color: #fff; text-decoration: none;
  font: 800 20px 'Baloo 2'; line-height: 0;
  box-shadow: 0 4px 0 var(--p-sh);
  opacity: 0; transform: translateY(14px); pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}
.btp.show { opacity: 1; transform: none; pointer-events: auto; }
.btp:active { transform: translateY(4px); box-shadow: 0 0 0 var(--p-sh); }

/* --------------------------------------------------------- landing */
.landing-list { display: grid; gap: 12px; margin-top: 4px; }
.landing-list a.docrow {
  display: flex; align-items: center; gap: 14px; text-decoration: none;
  background: var(--s2); border: 1px solid var(--ln); border-radius: 18px;
  padding: 16px 18px; transition: all 120ms ease;
}
.landing-list a.docrow:hover { border-color: var(--g);
  transform: translateY(-1px); box-shadow: var(--sh); }
.landing-list .plate { width: 46px; height: 46px; font-size: 23px; background: var(--s1); }
.landing-list .t { flex: 1; }
.landing-list .t b { display: block; font-family: 'Baloo 2'; font-weight: 800;
                     font-size: 17px; color: var(--tx); }
.landing-list .t span { font-size: 13px; color: var(--tx2); }
.landing-list .arrow { font: 800 18px 'Baloo 2'; color: var(--g); }

@media print {
  .topbar, .btp, .hero .float { display: none; }
  .hero { background: #4B22C4; }
  .card { box-shadow: none; border: 1px solid #ddd; }
  body { background: #fff; }
}
