/*
  AIDr site design system  -  aidr.in
  Static, no build step. Tokens are lifted from tokens/tokens.json (tokens win over prose).

  Law: white, gray and black are the only structural shades. Colour is the guest:
  Vidya's aura, primary pills, verdict marks, small gradient objects. Never a full-screen flood.
  Depth is by material, not shadow. Hairlines are 1px. Reading text sits on solid ground.

  Contents
   1  Tokens (light + dark)
   2  Reset and base
   3  Typography
   4  Layout
   5  Header and navigation
   6  Buttons and links
   7  The Star and the aurora
   8  Hero
   9  Cards, grids, chips
  10  Reading instrument
  11  Dialogue
  12  Notes (verdict bars)
  13  FAQ / accordion
  14  Legal document layout, TOC, prose, tables
  15  Support helpers
  16  Footer
  17  Utilities
  18  Motion
  19  Print, forced colours
*/

/* 1 Tokens ------------------------------------------------------------------ */

:root {
  color-scheme: light dark;

  /* structure (light = porcelain) */
  --ground: #FFFFFF;
  --fog: #F5F6F7;
  --cloud: #ECEEEF;
  --card: #FFFFFF;
  --ink: #16181A;
  --ink-2: #4A4F54;
  --whisper: #666C72;      /* AA text */
  --faint: #C9CED1;        /* decorative only, never text */
  --line: #E4E7E9;
  --line-strong: #D5DADC;

  /* graphite anchor (same in both themes) */
  --graphite: #1B1D1F;
  --graphite-ink: #F5F6F7;
  --graphite-whisper: #9BA1A6;
  --graphite-line: #2C2F33;

  /* accent */
  --accent-ink: #0E6B7E;   /* AA link and small-Star colour */
  --focus: #0E6B7E;
  --mist: #CDE9EC;
  --mint-light: #DFF5EC;

  /* minerals (fills only) */
  --deepwater: #0F5568;
  --lake: #146E8A;
  --turquoise: #2DB8C5;
  --emerald: #2F9E6E;
  --mint: #8FE3C9;
  --wisteria: #8B7BD8;

  /* gradient-text variants */
  --turquoise-ink: #1D828B;
  --emerald-ink: #26855C;
  --wisteria-ink: #796ABC;
  --mint-ink: #4E7F70;

  /* verdicts: the only warm hues. Thin accents only, never filled banners. */
  --green: #4F7259;
  --amber: #C09355;
  --clay: #A9523F;
  --verdict-green-text: #2A7A50;
  --verdict-amber-text: #8A5D22;
  --verdict-red-text: #9A4A36;
  --amber-soft: rgba(233, 150, 46, .10);

  /* brand sweep: icon, wordmark lockup, hero objects */
  --sweep: linear-gradient(100deg, #0F5568 0%, #146E8A 22%, #2DB8C5 46%, #8FE3C9 62%, #2F9E6E 80%, #8B7BD8 100%);
  --sweep-ink: linear-gradient(100deg, #0F5568 0%, #146E8A 22%, #1D828B 46%, #4E7F70 62%, #26855C 80%, #796ABC 100%);
  /* primary pill: lake to turquoise to emerald, held to white-text AA */
  --pill: linear-gradient(135deg, #146E8A 0%, #1B7C86 50%, #26855C 100%);

  /* glass (chrome only; text sits on solid) */
  --glass: rgba(255, 255, 255, .86);
  --glass-scrim: rgba(247, 249, 249, .92);
  --glass-edge: rgba(22, 24, 26, .06);

  /* aurora bloom (hero) */
  --bloom-a: rgba(45, 184, 197, .30);
  --bloom-b: rgba(47, 158, 110, .24);
  --bloom-c: rgba(143, 227, 201, .42);
  --bloom-d: rgba(139, 123, 216, .18);
  --grain-opacity: .10;

  /* type */
  --font: "Google Sans Flex", "Google Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Noto Sans", "Noto Sans Devanagari", "Noto Sans Telugu", sans-serif;
  --font-hand: "Caveat", "Segoe Print", cursive;

  /* space (4pt rhythm) */
  --s-1: 2px; --s0: 4px; --s1: 8px; --s2: 12px; --s3: 16px; --s4: 20px; --s5: 24px;
  --s6: 32px; --s7: 40px; --s8: 48px; --s9: 64px; --s10: 96px; --s11: 128px;

  /* radius */
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 20px; --r-sheet: 28px; --r-pill: 999px;

  /* motion */
  --t-fast: 200ms; --t-base: 320ms; --t-slow: 480ms;
  --settle: cubic-bezier(.22, 1, .36, 1);
  --enter: cubic-bezier(.16, 1, .3, 1);

  /* layout */
  --gutter: 20px;
  --header-h: 64px;
  --w-site: 1160px;
  --w-doc: 1080px;
  --w-prose: 70ch;
}

@media (min-width: 720px) {
  :root { --gutter: 32px; --header-h: 72px; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #121315;
    --fog: #17191B;
    --cloud: #1D1F22;
    --card: #1B1D1F;
    --ink: #F2F4F3;
    --ink-2: #C3C9CE;
    --whisper: #848B92;
    --faint: #4A4F54;
    --line: #26292C;
    --line-strong: #33373B;

    --graphite: #1B1D1F;
    --graphite-line: #2C2F33;

    --accent-ink: #5FC6D6;
    --focus: #5FC6D6;
    --mist: rgba(63, 200, 212, .14);
    --mint-light: rgba(157, 235, 210, .12);

    --deepwater: #1E7E9C;
    --lake: #2496B8;
    --turquoise: #3FC8D4;
    --emerald: #3EAF7E;
    --mint: #9DEBD2;
    --wisteria: #9D8FE0;

    --turquoise-ink: #3FC8D4;
    --emerald-ink: #5CC795;
    --wisteria-ink: #B1A5EA;
    --mint-ink: #9DEBD2;

    --green: #7BA98A;
    --amber: #D4A96C;
    --clay: #C97258;
    --verdict-green-text: #7BD9B0;
    --verdict-amber-text: #F0B267;
    --verdict-red-text: #DC9078;
    --amber-soft: rgba(255, 210, 143, .09);

    --sweep-ink: linear-gradient(100deg, #3FC8D4 0%, #4CB5D6 25%, #7FDCCB 55%, #6FD3A5 78%, #B1A5EA 100%);

    --glass: rgba(23, 25, 27, .88);
    --glass-scrim: rgba(23, 25, 27, .94);
    --glass-edge: rgba(255, 255, 255, .10);

    --bloom-a: rgba(63, 200, 212, .20);
    --bloom-b: rgba(62, 175, 126, .16);
    --bloom-c: rgba(157, 235, 210, .16);
    --bloom-d: rgba(157, 143, 224, .16);
    --grain-opacity: .08;
  }
}

/* 2 Reset and base ----------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;           /* 17px */
  line-height: 1.5;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  overflow-wrap: break-word;
}

main { display: block; flex: 1 0 auto; }

img, svg, video { display: block; max-width: 100%; height: auto; }

h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }

button { font: inherit; color: inherit; }

::selection { background: var(--mist); color: var(--ink); }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

[hidden] { display: none !important; }

/* Indic scripts are first-class: taller leading, never capped, +30% string length survives. */
:lang(hi), :lang(te) { line-height: 1.7; letter-spacing: 0; }

/* 3 Typography ---------------------------------------------------------------- */
/* Sentence case everywhere. Nothing a person must read is smaller than 14px. */

.display-xl {
  font-size: clamp(2.5rem, 1.6rem + 4.2vw, 4.5rem);
  line-height: 1.06;
  letter-spacing: -.028em;
  font-weight: 560;
  text-wrap: balance;
}
.display {
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -.022em;
  font-weight: 560;
  text-wrap: balance;
}
.title {
  font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem);
  line-height: 1.22;
  letter-spacing: -.014em;
  font-weight: 540;
  text-wrap: balance;
}
.heading { font-size: 1.25rem; line-height: 1.3; letter-spacing: -.006em; font-weight: 600; }
.lead { font-size: clamp(1.1875rem, 1.12rem + .35vw, 1.3125rem); line-height: 1.55; color: var(--ink-2); text-wrap: pretty; }
.body { font-size: 1.0625rem; line-height: 1.55; }
.caption { font-size: .875rem; line-height: 1.45; letter-spacing: .006em; color: var(--whisper); }
.whisper { color: var(--whisper); }
.ink-2 { color: var(--ink-2); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  font-size: .875rem;
  line-height: 1.3;
  letter-spacing: .02em;
  font-weight: 500;
  color: var(--accent-ink);
}

.num { font-variant-numeric: tabular-nums; letter-spacing: -.02em; }

/* Gradient text for one accent word in a headline (ink variants keep AA at display size) */
.sweep-text {
  background: var(--sweep-ink);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hand { font-family: var(--font-hand); font-weight: 500; font-size: 1.5em; line-height: 1; color: var(--ink-2); }

/* 4 Layout ----------------------------------------------------------------------- */

.container { width: 100%; max-width: calc(var(--w-site) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.container--doc { max-width: calc(var(--w-doc) + 2 * var(--gutter)); }
.container--narrow { max-width: calc(760px + 2 * var(--gutter)); }

.section { padding-block: var(--s9); }
.section--tight { padding-block: var(--s8); }
.section--fog { background: var(--fog); border-block: 1px solid var(--line); }
@media (min-width: 900px) {
  .section { padding-block: var(--s10); }
  .section--tight { padding-block: var(--s9); }
}

.section__head { display: grid; gap: var(--s2); max-width: 46rem; margin-bottom: var(--s7); }
.section__head--center { margin-inline: auto; text-align: center; justify-items: center; }

.stack > * + * { margin-top: var(--s3); }
.stack--lg > * + * { margin-top: var(--s5); }
.stack--sm > * + * { margin-top: var(--s1); }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); }
.cluster--center { justify-content: center; }
.split { display: grid; gap: var(--s7); align-items: center; }
@media (min-width: 900px) {
  .split { grid-template-columns: 1.05fr .95fr; gap: var(--s9); }
  .split--reverse > :first-child { order: 2; }
}

.skip-link {
  position: absolute;
  left: var(--s3);
  top: -80px;
  z-index: 100;
  padding: var(--s2) var(--s4);
  background: var(--graphite);
  color: var(--graphite-ink);
  border-radius: var(--r-pill);
  text-decoration: none;
  font-weight: 500;
  transition: top var(--t-fast) var(--settle);
}
.skip-link:focus { top: var(--s3); outline: 2px solid #5FC6D6; outline-offset: 2px; }

/* 5 Header and navigation ------------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: var(--glass-scrim);
  border-bottom: 1px solid var(--line);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header {
    background: var(--glass);
    -webkit-backdrop-filter: blur(22px) saturate(1.5);
    backdrop-filter: blur(22px) saturate(1.5);
  }
}
.site-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
  border-radius: var(--r-md);
}
.brand__word {
  font-size: 1.5rem;
  line-height: 1;
  font-weight: 620;
  letter-spacing: -.03em;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0;
  background: none;
  border: 0;
  border-radius: var(--r-md);
  cursor: pointer;
  color: var(--ink);
}
.nav-toggle:active { opacity: .45; }
.nav-toggle__bars { position: relative; width: 20px; height: 12px; }
.nav-toggle__bars::before, .nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 1.5px;
  border-radius: 1px;
  background: currentColor;
  transition: transform var(--t-base) var(--settle), top var(--t-base) var(--settle);
}
.nav-toggle__bars::before { top: 1px; }
.nav-toggle__bars::after { top: 10px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { top: 5.5px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { top: 5.5px; transform: rotate(-45deg); }

.site-nav ul { display: flex; align-items: center; gap: var(--s1); }
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  color: var(--ink-2);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--t-fast) var(--settle), background-color var(--t-fast) var(--settle);
}
.site-nav a:hover { color: var(--ink); background: var(--fog); }
.site-nav a[aria-current="page"] { color: var(--ink); background: var(--cloud); }
.site-nav a:active { opacity: .45; }

@media (max-width: 719.98px) {
  .js .nav-toggle { display: inline-flex; }
  .js .site-nav {
    position: absolute;
    left: 0; right: 0;
    top: 100%;
    padding: var(--s2) var(--gutter) var(--s5);
    background: var(--ground);
    border-bottom: 1px solid var(--line);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity var(--t-fast) var(--settle), transform var(--t-base) var(--settle), visibility 0s linear var(--t-fast);
  }
  .js .site-nav[data-open="true"] {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition-delay: 0s;
  }
  .js .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .js .site-nav li + li { border-top: 1px solid var(--line); }
  .js .site-nav a { min-height: 52px; padding: 0 var(--s1); font-size: 1.125rem; border-radius: 0; }
  .js .site-nav a:hover, .js .site-nav a[aria-current="page"] { background: none; color: var(--accent-ink); }

  /* without JS the links simply wrap under the brand */
  html:not(.js) .site-header { height: auto; position: static; }
  html:not(.js) .site-header__inner { flex-wrap: wrap; padding-block: var(--s2); }
  html:not(.js) .site-nav ul { flex-wrap: wrap; }
}

/* 6 Buttons and links -------------------------------------------------------------------- */

a { color: var(--accent-ink); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s1);
  min-height: 48px;
  padding: 0 var(--s5);
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 560;
  letter-spacing: -.005em;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: opacity var(--t-fast) var(--settle), background-color var(--t-fast) var(--settle), border-color var(--t-fast) var(--settle);
}
.btn:active { opacity: .45; }
.btn:hover { text-decoration: none; }

.btn--primary { background: var(--pill); color: #FFFFFF; }
.btn--primary:hover { filter: brightness(1.06); }
.btn--graphite { background: var(--graphite); color: var(--graphite-ink); border-color: var(--graphite-line); }
.btn--graphite:hover { background: #26292C; }
.btn--quiet { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--quiet:hover { background: var(--fog); }
.btn--sm { min-height: 44px; padding: 0 var(--s4); font-size: .9375rem; }
.btn--block { width: 100%; }

.btn:focus-visible { outline-offset: 3px; border-radius: var(--r-pill); }

/* text link with a trailing arrow */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-weight: 560;
  text-decoration: none;
}
.link-arrow::after { content: "\2192"; transition: transform var(--t-base) var(--settle); }
.link-arrow:hover::after { transform: translateX(3px); }

/* 7 The Star and the aurora ----------------------------------------------------------------- */
/* The Star is only ever Vidya. It never rotates, never has a ring or circle around it. */

.star {
  display: inline-block;
  flex: none;
  width: 1.15em;
  height: calc(1.15em * 1.0755);
  background-color: var(--accent-ink);
  -webkit-mask: url("/assets/star.svg") center / contain no-repeat;
  mask: url("/assets/star.svg") center / contain no-repeat;
}
.star--brand { width: 22px; height: 24px; }
.star--sm { width: 16px; height: 17px; }
.star--lg { width: 72px; height: 77px; }
.star--sweep { background: var(--sweep); background-color: transparent; }
.star--ink { background-color: var(--ink); }

/* aurora: a feathered, asymmetric, multi-lobe bloom with film grain. Porcelain stays >= 60%. */
.aurora { position: relative; isolation: isolate; }
.aurora::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: -10% -8% auto auto;
  width: min(86vw, 760px);
  height: min(70vw, 560px);
  background:
    radial-gradient(46% 52% at 38% 40%, var(--bloom-a), transparent 72%),
    radial-gradient(40% 44% at 66% 62%, var(--bloom-b), transparent 70%),
    radial-gradient(32% 30% at 30% 72%, var(--bloom-c), transparent 70%),
    radial-gradient(24% 26% at 74% 26%, var(--bloom-d), transparent 70%);
  filter: blur(18px);
  pointer-events: none;
}
.aurora::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -10% -8% auto auto;
  width: min(86vw, 760px);
  height: min(70vw, 560px);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
  opacity: var(--grain-opacity);
  mix-blend-mode: soft-light;
  -webkit-mask-image: radial-gradient(closest-side, #000 30%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 30%, transparent 100%);
  pointer-events: none;
}

/* a small aurora for cards and callouts */
.aurora--sm { overflow: clip; }
.aurora--sm::before, .aurora--sm::after { width: 420px; height: 320px; inset: -30% -20% auto auto; }

/* 8 Hero --------------------------------------------------------------------------------------- */

.hero { padding-block: var(--s9) var(--s9); overflow: clip; }
.hero__grid { display: grid; gap: var(--s8); align-items: center; }
.hero__copy { display: grid; gap: var(--s5); justify-items: start; }
.hero__copy .lead { max-width: 34rem; }
.hero__art { position: relative; display: grid; place-items: center; min-height: 200px; }
@media (min-width: 900px) {
  .hero { padding-block: var(--s10) var(--s11); }
  .hero__grid { grid-template-columns: 1.1fr .9fr; gap: var(--s9); }
}
.hero__star { position: relative; }
.hero__star .star { width: clamp(140px, 30vw, 220px); height: auto; aspect-ratio: 212 / 228; }

/* language chips under hero copy */
.langs { display: flex; flex-wrap: wrap; gap: var(--s1); }
.lang-chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  font-size: .9375rem;
  font-weight: 500;
  color: var(--ink-2);
  background: var(--ground);
}

/* 9 Cards, grids, chips --------------------------------------------------------------------------- */

.grid { display: grid; gap: var(--s4); }
@media (min-width: 640px) { .grid--2, .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) {
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid { gap: var(--s5); }
}

/* cards sit on fog; they are lighter than their ground, flat, hairline-edged */
.card {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  padding: var(--s5);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
}
@media (min-width: 720px) { .card { padding: var(--s6); } }
.card__kicker { font-size: .875rem; font-weight: 500; color: var(--accent-ink); }
.card__title { font-size: 1.25rem; line-height: 1.3; font-weight: 600; letter-spacing: -.008em; }
.card__text { color: var(--ink-2); }
.card--link { text-decoration: none; color: inherit; transition: border-color var(--t-fast) var(--settle); }
.card--link:hover { border-color: var(--line-strong); }
.card--link:hover .card__title { color: var(--accent-ink); }
.card--link:active { opacity: .45; }

/* graphite anchor card, dark in both themes */
.card--graphite { background: var(--graphite); border-color: var(--graphite-line); color: var(--graphite-ink); }
.card--graphite .card__text, .card--graphite .caption { color: var(--graphite-whisper); }
.card--graphite .card__kicker { color: #5FC6D6; }
.card--graphite a:not(.btn) { color: #5FC6D6; }
.card--graphite .btn--quiet { color: var(--graphite-ink); border-color: #3A3E43; }
.card--graphite .btn--quiet:hover { background: rgba(255,255,255,.06); }

.card--fog { background: var(--fog); }

/* feature row: text as ornament, no icon grid */
.feature { display: grid; align-content: start; gap: var(--s2); padding-top: var(--s4); border-top: 1px solid var(--line-strong); }
.feature__title { font-size: 1.1875rem; line-height: 1.3; font-weight: 600; letter-spacing: -.008em; }
.feature__text { color: var(--ink-2); }

/* status pill (graphite "Taken" style) */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  font-size: .875rem;
  font-weight: 560;
  background: var(--cloud);
  color: var(--ink-2);
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill--taken { background: rgba(62, 175, 126, .16); color: var(--verdict-green-text); }
.card--graphite .pill { background: rgba(255,255,255,.07); color: var(--graphite-ink); }
.card--graphite .pill--taken { background: rgba(62, 175, 126, .18); color: #7BD9B0; }
.pill--low { background: var(--amber-soft); color: var(--verdict-amber-text); }
.pill--ok { background: var(--mint-light); color: var(--verdict-green-text); }
.pill--high { background: rgba(169, 82, 63, .10); color: var(--verdict-red-text); }

/* 10 Reading instrument --------------------------------------------------------------------------- */
/* A health reading drawn as a machined instrument: a flat track, the healthy band brightest,
   a ringed knob in the verdict's hue, a plain word first, large tabular numerals.
   Position comes from data attributes (site.js sets --lo --hi --pos as percentages). */

.reading {
  --lo: 36%; --hi: 72%; --pos: 20%;
  --verdict: var(--amber);
  display: grid;
  gap: var(--s3);
  padding: var(--s5);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
}
.reading--ok { --verdict: var(--green); }
.reading--high { --verdict: var(--clay); }
.reading__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.reading__name { font-weight: 560; }
.reading__value { display: flex; align-items: baseline; gap: 8px; }
.reading__value .num { font-size: 2.75rem; line-height: 1; font-weight: 520; letter-spacing: -.03em; }
.reading__value .unit { font-size: .9375rem; color: var(--whisper); }
.reading__track {
  position: relative;
  height: 14px;
  margin-block: var(--s2);
  background: var(--cloud);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
}
.reading__band {
  position: absolute;
  top: -1px; bottom: -1px;
  left: var(--lo);
  width: calc(var(--hi) - var(--lo));
  border-radius: var(--r-pill);
  background: var(--sweep);
}
.reading__knob {
  position: absolute;
  top: 50%;
  left: var(--pos);
  width: 24px; height: 24px;
  margin: -12px 0 0 -12px;
  border-radius: 50%;
  background: var(--card);
  border: 5px solid var(--verdict);
}
.reading__scale { display: flex; justify-content: space-between; font-size: .875rem; color: var(--whisper); }
.reading__note { font-size: .9375rem; color: var(--ink-2); padding-top: var(--s2); border-top: 1px solid var(--line); }

/* 11 Dialogue ----------------------------------------------------------------------------------------- */
/* A typeset dialogue, never chat bubbles. Vidya on the left under a small Star; you on the right. */

.dialogue { display: grid; gap: var(--s5); }
.dlg { max-width: 34rem; }
.dlg--vidya { display: grid; gap: var(--s1); font-size: 1.1875rem; line-height: 1.5; }
.dlg--vidya .star { width: 14px; height: 15px; }
.dlg--you {
  justify-self: end;
  text-align: right;
  color: var(--ink-2);
  display: grid;
  justify-items: end;
  gap: var(--s1);
}
.dlg--you::before { content: ""; width: 28px; border-top: 1px solid var(--line-strong); }

/* 12 Notes (verdict bars) -------------------------------------------------------------------------------- */
/* A thin accent bar plus plain sentences. Never a filled banner. */

.note {
  --bar: var(--accent-ink);
  position: relative;
  padding: var(--s1) 0 var(--s1) var(--s4);
  color: var(--ink-2);
}
.note::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  border-radius: 1px;
  background: var(--bar);
}
.note > * + * { margin-top: var(--s1); }
.note strong, .note__title { color: var(--ink); font-weight: 600; }
.note--amber { --bar: var(--amber); }
.note--green { --bar: var(--green); }
.note--red { --bar: var(--clay); }
.note--emergency { --bar: var(--clay); }
.note--emergency strong { color: var(--verdict-red-text); }

/* "In plain words" summary at the head of a legal section */
.plain {
  padding: var(--s5);
  background: var(--fog);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.plain__title { font-size: 1rem; font-weight: 600; margin-bottom: var(--s2); display: flex; align-items: center; gap: var(--s1); }
.plain ul { display: grid; gap: var(--s2); }
.plain li { position: relative; padding-left: var(--s5); color: var(--ink-2); }
.plain li::before {
  content: "";
  position: absolute;
  left: 2px; top: .62em;
  width: 10px; height: 1.5px;
  background: var(--accent-ink);
}

/* 13 FAQ / accordion --------------------------------------------------------------------------------------- */

.faq { border-top: 1px solid var(--line-strong); }
.faq details { border-bottom: 1px solid var(--line-strong); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  min-height: 60px;
  padding: var(--s3) 0;
  font-size: 1.125rem;
  line-height: 1.35;
  font-weight: 540;
  letter-spacing: -.006em;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 10px; height: 10px;
  border-right: 1.5px solid var(--ink-2);
  border-bottom: 1.5px solid var(--ink-2);
  transform: translateY(-3px) rotate(45deg);
  transition: transform var(--t-base) var(--settle);
}
.faq details[open] > summary::after { transform: translateY(2px) rotate(225deg); }
.faq summary:hover { color: var(--accent-ink); }
.faq summary:active { opacity: .45; }
.faq summary:focus-visible { outline-offset: -2px; }
.faq__body { padding: 0 0 var(--s5); color: var(--ink-2); max-width: var(--w-prose); }
.faq__body > * + * { margin-top: var(--s2); }
.faq details[open] > .faq__body { animation: settle-in var(--t-base) var(--settle) both; }

/* 14 Legal document layout --------------------------------------------------------------------------------------- */

.doc-head { padding-block: var(--s8) var(--s6); }
.doc-head__inner { display: grid; gap: var(--s3); max-width: 46rem; }
@media (min-width: 900px) { .doc-head { padding-block: var(--s9) var(--s7); } }

.doc-meta { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s6); padding-top: var(--s3); margin-top: var(--s2); border-top: 1px solid var(--line); }
.doc-meta dt { font-size: .875rem; color: var(--whisper); }
.doc-meta dd { font-weight: 560; }

.doc { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s6); padding-bottom: var(--s10); align-items: start; }
@media (min-width: 960px) {
  .doc { grid-template-columns: 252px minmax(0, 1fr); gap: var(--s9); }
  .doc__aside { position: sticky; top: calc(var(--header-h) + 24px); max-height: calc(100vh - var(--header-h) - 48px); overflow-y: auto; overscroll-behavior: contain; }
}

/* table of contents: details so it collapses on phones, always open on desktop */
.toc { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--fog); }
.toc summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 var(--s4);
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after {
  content: "";
  width: 9px; height: 9px;
  border-right: 1.5px solid var(--ink-2);
  border-bottom: 1.5px solid var(--ink-2);
  transform: translateY(-2px) rotate(45deg);
  transition: transform var(--t-base) var(--settle);
}
.toc[open] summary::after { transform: translateY(2px) rotate(225deg); }
.toc__list { padding: 0 var(--s2) var(--s3); counter-reset: toc; }
.toc__list li { counter-increment: toc; }
.toc__list a {
  display: flex;
  gap: var(--s2);
  min-height: 40px;
  align-items: flex-start;
  padding: 9px var(--s2);
  border-radius: var(--r-sm);
  color: var(--ink-2);
  font-size: .9375rem;
  line-height: 1.35;
  text-decoration: none;
  transition: color var(--t-fast) var(--settle), background-color var(--t-fast) var(--settle);
}
.toc__list--numbered a::before { content: counter(toc) "."; flex: none; min-width: 1.6em; color: var(--whisper); font-variant-numeric: tabular-nums; }
.toc__list a:hover { color: var(--ink); background: var(--cloud); }
.toc__list a[aria-current="true"] { color: var(--ink); background: var(--ground); font-weight: 560; box-shadow: inset 2px 0 0 var(--accent-ink); border-radius: 0 var(--r-sm) var(--r-sm) 0; }

@media (min-width: 960px) {
  .toc summary { pointer-events: none; cursor: default; }
  .toc summary::after { display: none; }
  .toc { background: transparent; border: 0; border-radius: 0; }
  .toc summary { padding: 0 var(--s2); min-height: 36px; font-size: .875rem; font-weight: 500; color: var(--whisper); }
  .toc__list { padding: 0; }
}

/* prose: the reading surface. Solid ground, 70ch measure, generous leading. */
.prose { max-width: var(--w-prose); font-size: 1.0625rem; line-height: 1.65; color: var(--ink); }
.prose > * + *, .prose section > * + * { margin-top: var(--s4); }
.prose h2 {
  margin-top: var(--s9);
  padding-top: var(--s5);
  border-top: 1px solid var(--line);
  font-size: clamp(1.5rem, 1.3rem + .8vw, 1.875rem);
  line-height: 1.22;
  letter-spacing: -.016em;
  font-weight: 560;
  text-wrap: balance;
  scroll-margin-top: calc(var(--header-h) + 24px);
}
.prose > h2:first-child, .prose > section:first-child > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose section + section > h2:first-child { margin-top: var(--s9); }
.prose h3 { margin-top: var(--s6); font-size: 1.25rem; line-height: 1.3; font-weight: 600; letter-spacing: -.008em; scroll-margin-top: calc(var(--header-h) + 24px); }
.prose h4 { margin-top: var(--s5); font-size: 1.0625rem; font-weight: 600; }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: var(--s3); }
.prose p, .prose li { text-wrap: pretty; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: var(--s1); }
.prose li::marker { color: var(--whisper); }
.prose li > ul, .prose li > ol { margin-top: var(--s1); }
.prose strong { font-weight: 600; }
.prose a:not(.btn) { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent-ink) 45%, transparent); }
.prose a:not(.btn):hover { text-decoration-color: currentColor; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin-block: var(--s7); }
.prose blockquote { padding-left: var(--s4); border-left: 1px solid var(--line-strong); color: var(--ink-2); }
.prose code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; padding: 1px 6px; border-radius: 6px; background: var(--cloud); }
.prose .lead { font-size: 1.1875rem; }
.prose .plain ul { list-style: none; padding-left: 0; }
.prose .steps { list-style: none; padding-left: 0; }
.prose .steps > li + li { margin-top: 0; }
.prose .plain li + li { margin-top: 0; }
.prose .anchor { margin-left: .4em; color: var(--faint); text-decoration: none; font-weight: 400; opacity: 0; transition: opacity var(--t-fast); }
.prose h2:hover .anchor, .prose h3:hover .anchor, .prose .anchor:focus-visible { opacity: 1; color: var(--accent-ink); }

/* optional numbered headings: add class prose--numbered to the article */
.prose--numbered { counter-reset: sec; }
.prose--numbered h2 { counter-increment: sec; counter-reset: sub; }
.prose--numbered h2::before { content: counter(sec) ".\00a0"; color: var(--whisper); font-variant-numeric: tabular-nums; }

/* tables: wrapper scrolls inside itself so the page never scrolls sideways */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--ground); -webkit-overflow-scrolling: touch; }
.table-wrap:focus-visible { outline-offset: 2px; }
.data { width: 100%; min-width: 560px; border-collapse: collapse; font-size: .9375rem; line-height: 1.5; }
.data caption { text-align: left; padding: var(--s3) var(--s4); font-weight: 600; font-size: 1rem; color: var(--ink); }
.data th, .data td { padding: 12px var(--s4); text-align: left; vertical-align: top; border-top: 1px solid var(--line); }
.data thead th { border-top: 0; background: var(--fog); font-weight: 600; color: var(--ink); white-space: nowrap; }
.data tbody th { font-weight: 560; }
.data td { color: var(--ink-2); }

/* wide multi-column legal tables read as stacked cards on phones (add class data--stack and data-label on each td) */
@media (max-width: 640px) {
  .data--stack { min-width: 0; }
  .data--stack caption { display: block; width: 100%; }
  .data--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .data--stack, .data--stack tbody, .data--stack tr, .data--stack th, .data--stack td { display: block; }
  .data--stack tbody tr { border-top: 1px solid var(--line); padding: var(--s2) 0; }
  .data--stack tbody tr:first-child { border-top: 0; }
  .data--stack tbody th, .data--stack td { border: 0; padding: 4px var(--s4); }
  .data--stack td::before { content: attr(data-label); display: block; font-size: .8125rem; font-weight: 600; color: var(--whisper); }
}

/* definition list for legal definitions */
.defs { display: grid; gap: var(--s3); }
.defs dt { font-weight: 600; }
.defs dd { color: var(--ink-2); margin-top: 2px; }

.doc-foot { margin-top: var(--s9); padding-top: var(--s5); border-top: 1px solid var(--line); display: grid; gap: var(--s3); color: var(--ink-2); font-size: .9375rem; }

/* 15 Support helpers ------------------------------------------------------------------------------------------------- */

.contact { display: grid; gap: var(--s2); }
.contact__mail { font-size: clamp(1.25rem, 1.1rem + .7vw, 1.625rem); font-weight: 560; letter-spacing: -.012em; overflow-wrap: anywhere; }
.contact__mail a { color: inherit; text-decoration-color: var(--faint); }
.card--graphite .contact__mail a { color: var(--graphite-ink); }

.steps { counter-reset: step; display: grid; gap: var(--s4); }
.steps > li { counter-increment: step; position: relative; padding-left: 52px; min-height: 36px; }
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: -2px;
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-weight: 560;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}
.steps strong { display: block; font-weight: 600; }
.steps span { color: var(--ink-2); }

.kv { display: grid; gap: var(--s1) var(--s5); grid-template-columns: max-content 1fr; font-size: .9375rem; }
.kv dt { color: var(--whisper); }
.kv dd { color: var(--ink); overflow-wrap: anywhere; }
/* The graphite card is dark in BOTH themes, so theme ink/whisper (near-black in light mode) must not be used on it. */
.card--graphite .kv dt { color: var(--graphite-whisper); }
.card--graphite .kv dd { color: var(--graphite-ink); }
.card--graphite p, .card--graphite li { color: var(--graphite-ink); }
.card--graphite .contact__mail { color: var(--graphite-ink); }

/* 16 Footer -------------------------------------------------------------------------------------------------------------- */

.site-footer { margin-top: auto; background: var(--graphite); color: var(--graphite-ink); font-size: .9375rem; line-height: 1.55; }
.site-footer a:not(.btn) { color: var(--graphite-ink); text-decoration: none; }
.site-footer a:not(.btn):hover { text-decoration: underline; text-underline-offset: .2em; }
.site-footer :focus-visible { outline-color: #5FC6D6; }
.site-footer__top { display: grid; gap: var(--s8); padding-block: var(--s9) var(--s7); }
@media (min-width: 900px) { .site-footer__top { grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: var(--s7); } }
.site-footer .brand { color: var(--graphite-ink); }
.site-footer .star { background-color: #5FC6D6; }
.footer__disclaimer { margin-top: var(--s4); max-width: 34rem; color: var(--graphite-whisper); }
.footer__col h2 { margin-bottom: var(--s2); font-size: .875rem; font-weight: 500; letter-spacing: .02em; color: var(--graphite-whisper); }
.footer__col li a { display: inline-flex; align-items: center; min-height: 44px; }
.footer__emergency { margin-top: var(--s4); color: #DC9078; font-weight: 560; }
.site-footer__base {
  display: grid;
  gap: var(--s2);
  padding-block: var(--s6) var(--s8);
  border-top: 1px solid var(--graphite-line);
  color: var(--graphite-whisper);
}
.site-footer__base p { max-width: 62rem; }
.site-footer .site-footer__base a:not(.btn) { text-decoration: underline; text-underline-offset: .2em; }
.site-footer__base strong { color: var(--graphite-ink); font-weight: 560; }
@media (min-width: 900px) { .site-footer__base { grid-template-columns: 1fr auto; align-items: start; gap: var(--s7); } }

/* 17 Utilities ------------------------------------------------------------------------------------------------------------- */

.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.center { text-align: center; }
.mt-0 { margin-top: 0 !important; }
.mt-3 { margin-top: var(--s3) !important; }
.mt-5 { margin-top: var(--s5) !important; }
.mt-7 { margin-top: var(--s7) !important; }
.mt-9 { margin-top: var(--s9) !important; }
.maxw-prose { max-width: var(--w-prose); }
.nowrap { white-space: nowrap; }
.break { overflow-wrap: anywhere; }
.hide-mobile { display: none; }
@media (min-width: 720px) { .hide-mobile { display: initial; } .hide-desktop { display: none; } }

/* 18 Motion -------------------------------------------------------------------------------------------------------------------- */
/* Things arrive by settling in 320 to 480ms and never spring or bounce. The Star breathes
   1.0 to 1.035 over 4.2s. Reduced motion means static washes and no breathing. */

@keyframes settle-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.035); } }
@keyframes drift { 0%, 100% { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(-14px, 10px, 0); } }

.star--breathe { animation: breathe 4200ms ease-in-out infinite; }
.aurora::before { animation: drift 9000ms ease-in-out infinite; }
.settle { animation: settle-in var(--t-slow) var(--enter) both; }
.settle--2 { animation-delay: 80ms; }
.settle--3 { animation-delay: 160ms; }
.settle--4 { animation-delay: 240ms; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .star--breathe, .aurora::before { animation: none !important; }
}

/* 19 Print, forced colours ---------------------------------------------------------------------------------------------------------- */

@media print {
  :root { --ground: #fff; --ink: #000; --ink-2: #222; --whisper: #444; --line: #bbb; --accent-ink: #000; }
  .site-header, .site-footer__top, .doc__aside, .skip-link, .nav-toggle, .aurora::before, .aurora::after { display: none !important; }
  body { font-size: 11pt; background: #fff; }
  .site-footer { background: none; color: #000; }
  .site-footer__base { color: #000; border-top: 1px solid #999; }
  .doc { display: block; }
  .prose { max-width: none; }
  .prose a::after { content: " (" attr(href) ")"; font-size: .85em; color: #444; }
  .prose h2 { break-after: avoid; }
  .prose p, .prose li { orphans: 3; widows: 3; }
}

@media (forced-colors: active) {
  .btn--primary, .btn--graphite { border: 1px solid ButtonText; }
  .star, .brand .star { background-color: CanvasText; }
  .reading__band { background: Highlight; }
  .note::before { background: CanvasText; }
}
