/* PixFit — mobile-first. The audience is overwhelmingly on phones, often on a
   slow connection, so the rule for the visual layer is: depth and motion come
   from transform/opacity only, never from anything that costs layout, and the
   page must be fully usable if none of it runs. */

:root {
  --bg: #ffffff;
  --bg-alt: #f7f8fb;
  --surface: #ffffff;
  --surface-2: #f3f5f9;
  --line: #e4e8ef;
  --line-soft: #eef1f6;
  --ink: #0f1522;
  --ink-2: #3d4757;
  --muted: #667186;

  /* Sampled from the logo: a pure blue ramp with no red in any stop, which is
     why the previous #3b4ee0 read as indigo standing next to it. */
  --brand: #0060f0;      /* the "Fit" blue — primary interactive colour */
  --brand-2: #0090f0;    /* mid stop */
  --brand-3: #00b0f0;    /* the bright highlight in the tile */
  --brand-ink: #ffffff;
  --brand-soft: #e6f0ff;

  --ok: #0f8a4d;
  --ok-soft: #e8f7ee;
  --warn: #96650b;
  --warn-soft: #fff5e0;
  --err: #c02a22;
  --err-soft: #fdeceb;

  --r-sm: 9px;
  --r: 14px;
  --r-lg: 22px;

  --sh-1: 0 1px 2px rgba(15,21,34,.05), 0 2px 8px rgba(15,21,34,.04);
  --sh-2: 0 2px 6px rgba(15,21,34,.06), 0 12px 30px rgba(15,21,34,.08);
  --sh-3: 0 30px 70px -20px rgba(24,32,72,.35);

  /* Two ramps, both from the logo's blue family.
     --grad carries white text (buttons) and is used as gradient TEXT on white,
     so every stop is capped at 4.5:1 — measured, not assumed. The logo's
     brightest stop (#00b0f0) is only 2.48:1 against white and cannot be used
     under a label.
     --grad-vivid is the full logo ramp, for decoration that carries no text. */
  --grad: linear-gradient(135deg, #0047e0 0%, #005cf0 50%, #006ff0 100%);
  --grad-vivid: linear-gradient(135deg, #0050f0 0%, #0090f0 55%, #00b0f0 115%);
  --ease: cubic-bezier(.22,.68,.24,1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0e15;
    --bg-alt: #10141d;
    --surface: #141a25;
    --surface-2: #1a212e;
    --line: #262f3f;
    --line-soft: #1e2532;
    --ink: #eef2f8;
    --ink-2: #c3ccda;
    --muted: #8f9bad;

    /* Same hue family, lifted so it still passes contrast on #0b0e15.
       In dark mode the ink on gradient fills is near-black, so the ramp runs
       lighter than the light-theme one. */
    --grad: linear-gradient(135deg, #2f95f5 0%, #4da6ff 50%, #5fc0ff 100%);
    --grad-vivid: linear-gradient(135deg, #2f8ef5 0%, #45b4ff 55%, #6fd6ff 115%);
    --brand: #4da6ff;
    --brand-2: #2f95f5;
    --brand-3: #45c8ff;
    --brand-ink: #06121f;
    --brand-soft: #0d2440;

    --ok: #45c983;
    --ok-soft: #10261a;
    --warn: #e2ab4d;
    --warn-soft: #2a2113;
    --err: #f4867d;
    --err-soft: #2c1917;

    --sh-1: 0 1px 2px rgba(0,0,0,.5);
    --sh-2: 0 2px 8px rgba(0,0,0,.5), 0 16px 40px rgba(0,0,0,.4);
    --sh-3: 0 30px 70px -20px rgba(0,0,0,.75);
  }
}

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

body {
  margin: 0;
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Noto Sans", "Noto Sans Tamil", "Noto Sans Devanagari", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 18px; }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 18px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden { display: none !important; }
[hidden] { display: none !important; }

a { color: var(--brand); }

/* ------------------------------------------------------- scroll progress */

.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60;
  background: transparent; pointer-events: none;
}
.progress span {
  display: block; height: 100%; width: 100%;
  background: var(--grad-vivid);
  transform: scaleX(0); transform-origin: 0 50%;
}

/* ---------------------------------------------------------------- header */

header.site {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, box-shadow .25s;
}
header.site.stuck { border-bottom-color: var(--line); box-shadow: var(--sh-1); }
header.site .wrap { display: flex; align-items: center; gap: 14px; min-height: 60px; }

.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; flex: none; }
.logo img { display: block; width: auto; height: 34px; }

/* The wordmark's "Pix" is near-black navy — 1.03 contrast on the dark
   background, i.e. invisible. Inverting lifts it to 17.4 and hue-rotate keeps
   "Fit" blue. The filter is scoped to the text only: applied to the whole logo
   it would also flip the icon's white photo card to black. */
@media (prefers-color-scheme: dark) {
  .logo-word { filter: invert(1) hue-rotate(180deg) saturate(1.15) brightness(1.05); }
}
@media (max-width: 900px) { .logo img { height: 29px; } }

nav.main { margin-left: auto; display: flex; gap: 2px; align-items: center; }
nav.main > a, nav.main .navdrop > button {
  color: var(--ink-2); text-decoration: none; font-size: 14px; font-weight: 500;
  padding: 7px 11px; border-radius: 8px; border: none; background: none;
  cursor: pointer; font-family: inherit; white-space: nowrap;
  transition: background .16s, color .16s;
}
nav.main > a:hover, nav.main .navdrop > button:hover { background: var(--surface-2); color: var(--ink); }
nav.main .navdrop { position: relative; }
nav.main .navdrop > button::after { content: '⌄'; margin-left: 5px; opacity: .6; }
nav.main .navdrop-menu {
  position: absolute; top: calc(100% + 9px); right: 0; min-width: 232px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 4px 12px rgba(15,21,34,.06), 0 20px 44px -12px rgba(15,21,34,.22);
  padding: 8px;
  display: none; opacity: 0; transform: translateY(-8px) scale(.97); transform-origin: 100% 0;
  transition: opacity .2s var(--ease), transform .2s var(--ease), display .2s allow-discrete;
}
nav.main .navdrop:hover .navdrop-menu,
nav.main .navdrop:focus-within .navdrop-menu { display: block; opacity: 1; transform: none; }
@starting-style {
  nav.main .navdrop:hover .navdrop-menu,
  nav.main .navdrop:focus-within .navdrop-menu { opacity: 0; transform: translateY(-8px) scale(.97); }
}
/* a small caret tying the panel to its button */
nav.main .navdrop-menu::before {
  content: ''; position: absolute; top: -6px; right: 26px; width: 11px; height: 11px;
  background: var(--surface); border-left: 1px solid var(--line); border-top: 1px solid var(--line);
  transform: rotate(45deg); border-radius: 2px 0 0 0;
}
/* invisible bridge so the pointer can travel from button to panel */
nav.main .navdrop-menu::after {
  content: ''; position: absolute; top: -12px; left: 0; right: 0; height: 12px;
}

nav.main .navdrop-label {
  display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--muted); padding: 7px 11px 9px;
}

/* --- Exams: two balanced columns --- */
nav.main .navdrop-menu.mega { min-width: 396px; }
nav.main .navdrop-grid {
  display: grid; grid-auto-flow: column; grid-template-rows: repeat(5, auto);
  gap: 1px 6px;
}
nav.main .navdrop-grid a {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; border-radius: 9px; text-decoration: none; color: var(--ink-2);
  font-size: 14px; transition: background .14s, color .14s;
}
nav.main .navdrop-grid a b { font-weight: 550; flex: 1; }
nav.main .navdrop-grid a em {
  font-style: normal; font-size: 11px; font-weight: 700; color: var(--muted);
  background: var(--surface-2); padding: 2px 7px; border-radius: 999px; min-width: 26px; text-align: center;
}
nav.main .navdrop-grid a:hover { background: var(--brand-soft); color: var(--brand); }
nav.main .navdrop-grid a:hover em { background: var(--bg); color: var(--brand); }

/* a colour per category, so the eye can learn the menu */
.nd-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.nd-central   { background: #0060f0; }
.nd-statepsc  { background: #00a6c7; }
.nd-banking   { background: #0f8a4d; }
.nd-defence   { background: #c0392b; }
.nd-judiciary { background: #8e44ad; }
.nd-railway   { background: #d68910; }
.nd-entrance  { background: #16a085; }
.nd-teaching  { background: #e0559a; }
.nd-other     { background: #7f8c8d; }

nav.main .navdrop-foot {
  display: block; margin-top: 7px; padding: 11px 12px; border-radius: 11px;
  background: var(--surface-2); text-decoration: none;
  transition: background .14s;
}
nav.main .navdrop-foot:hover { background: var(--brand-soft); }
nav.main .navdrop-foot b { display: block; font-size: 13.5px; color: var(--ink); font-weight: 620; }
nav.main .navdrop-foot small { color: var(--muted); font-size: 12px; }
nav.main .navdrop-foot:hover b { color: var(--brand); }

/* --- Tools / More: two-line items --- */
nav.main .navdrop-menu.rich { min-width: 258px; }
nav.main .navdrop-menu.rich a {
  display: block; padding: 9px 11px; border-radius: 10px; text-decoration: none;
  transition: background .14s;
}
nav.main .navdrop-menu.rich a b {
  display: block; font-size: 14px; font-weight: 570; color: var(--ink-2);
}
nav.main .navdrop-menu.rich a small {
  display: block; font-size: 12px; color: var(--muted); margin-top: 1px; line-height: 1.4;
}
nav.main .navdrop-menu.rich a:hover { background: var(--brand-soft); }
nav.main .navdrop-menu.rich a:hover b { color: var(--brand); }

.langbar { display: flex; gap: 3px; margin-left: 6px; }
.langbar button {
  border: 1px solid var(--line); background: transparent; color: var(--muted);
  font-size: 12px; padding: 4px 9px; border-radius: 999px; cursor: pointer;
  font-family: inherit; transition: all .16s;
}
.langbar button:hover { border-color: var(--brand); color: var(--brand); }
.langbar button.on { background: var(--grad); color: #fff; border-color: transparent; }

.navtoggle { display: none; }

@media (max-width: 900px) {
  nav.main { display: none; position: fixed; inset: 60px 0 auto; flex-direction: column;
    align-items: stretch; background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 10px 18px 16px; gap: 0; box-shadow: var(--sh-2); }
  nav.main.open { display: flex; }
  nav.main > a, nav.main .navdrop > button { padding: 11px 8px; font-size: 15px; width: 100%; text-align: left; }
  nav.main .navdrop-menu { position: static; display: block; opacity: 1; transform: none;
    border: none; box-shadow: none; background: var(--surface-2); margin: 4px 0 6px;
    min-width: 0 !important; padding: 6px; }
  nav.main .navdrop-menu::before, nav.main .navdrop-menu::after { display: none; }
  nav.main .navdrop-grid { grid-auto-flow: row; grid-template-rows: none;
    grid-template-columns: repeat(2, 1fr); }
  .navtoggle { display: grid; margin-left: auto; place-items: center; width: 38px; height: 38px;
    border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; }
  .navtoggle span { display: block; width: 16px; height: 2px; background: var(--ink); position: relative; }
  .navtoggle span::before, .navtoggle span::after {
    content: ''; position: absolute; left: 0; width: 16px; height: 2px; background: var(--ink); }
  .navtoggle span::before { top: -5px; } .navtoggle span::after { top: 5px; }
  .langbar { order: 3; }
}

/* ------------------------------------------------------------------ hero */

.hero { position: relative; padding: 46px 0 20px; overflow: hidden; }
.hero-bg {
  position: absolute; inset: -30% -20% auto; height: 130%; z-index: -1;
  background:
    radial-gradient(46% 38% at 18% 12%, color-mix(in srgb, var(--brand) 22%, transparent), transparent 70%),
    radial-gradient(40% 34% at 84% 8%, color-mix(in srgb, var(--brand-3) 20%, transparent), transparent 70%);
  filter: blur(24px);
}
.hero-grid {
  position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(70% 55% at 50% 25%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(70% 55% at 50% 25%, #000 40%, transparent 100%);
}
.hero-inner { display: grid; gap: 30px; align-items: center; }
@media (min-width: 940px) { .hero-inner { grid-template-columns: 1.05fr .95fr; gap: 44px; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600;
  padding: 6px 13px; border-radius: 999px; letter-spacing: .01em;
  background: var(--brand-soft); color: var(--brand); border: 1px solid color-mix(in srgb, var(--brand) 22%, transparent);
}
.eyebrow b { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }

h1 {
  font-size: clamp(31px, 6.4vw, 54px); line-height: 1.06; letter-spacing: -1.6px;
  margin: 18px 0 14px; font-weight: 800;
}
h1 em {
  font-style: normal;
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.lede { color: var(--muted); font-size: clamp(15.5px, 2.1vw, 18px); margin: 0 0 22px; max-width: 54ch; }

.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px;
  border-radius: 12px; font-weight: 650; font-size: 15px; text-decoration: none;
  border: 1px solid transparent; cursor: pointer; font-family: inherit;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s;
}
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 10px 26px -10px color-mix(in srgb, var(--brand) 75%, transparent); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -10px color-mix(in srgb, var(--brand) 80%, transparent); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-2px); }

.trust { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13.5px; color: var(--muted); }
.trust b { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.trust b i { font-style: normal; color: var(--ok); }

/* hero 3D stack ---------------------------------------------------------- */

.hero-visual { perspective: 1300px; perspective-origin: 55% 40%; position: relative; padding: 10px 0 30px; }
.hero-stack {
  position: relative; transform-style: preserve-3d;
  transform: rotateX(10deg) rotateY(-15deg) rotateZ(1.5deg);
  margin: 0 auto; width: min(286px, 70%);
}
.hero-card {
  border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--sh-3); padding: 15px;
  transform: translate3d(var(--dx,0), var(--dy,0), var(--z,0));
  transition: transform .5s var(--ease);
}
/* c2 stays in flow so the stack gets a real height; the others float around it. */
.hero-card.c2 { position: relative; --z: 40px; }
.hero-card.c1 { position: absolute; width: 74%; left: -30%; bottom: -74px; --z: 0px; }
.hero-card.c3 { position: absolute; width: 80%; right: -24%; top: 4%; --z: 96px; padding: 13px 15px; }

.hero-card h4 {
  margin: 0 0 9px; font-size: 11px; color: var(--muted); font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
}

.mini-photo {
  width: 100%; aspect-ratio: 200/230; border-radius: 11px; position: relative; overflow: hidden;
  background: linear-gradient(170deg, #dfe7f2, #c3d2e6);
}
.mini-photo::after {
  content: ''; position: absolute; left: 50%; bottom: -16%; width: 62%; aspect-ratio: 1/1.1;
  transform: translateX(-50%); border-radius: 46% 46% 40% 40%; background: #8496ae;
}
.mini-photo i {
  position: absolute; left: 50%; top: 17%; width: 36%; aspect-ratio: 1; transform: translateX(-50%);
  border-radius: 50%; background: #9aa9be;
}
.mini-sign {
  width: 100%; aspect-ratio: 140/60; border-radius: 9px; background: #fff;
  border: 1px solid var(--line); display: grid; place-items: center; padding: 6px;
}
.mini-sign svg { width: 88%; }

.chiprow { display: flex; gap: 5px; margin-top: 10px; flex-wrap: wrap; }
.chip {
  font-size: 10.5px; font-weight: 700; padding: 4px 8px; border-radius: 999px;
  background: var(--ok-soft); color: var(--ok); white-space: nowrap;
}
.chip.b { background: var(--brand-soft); color: var(--brand); }

.badge-float { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 650; }
.badge-float .tick {
  width: 25px; height: 25px; border-radius: 50%; background: var(--ok); color: #fff;
  display: grid; place-items: center; font-size: 12px; flex: none;
}

@media (max-width: 939px) {
  .hero-visual { padding: 26px 0 34px; }
  .hero-stack { transform: rotateX(7deg) rotateY(-9deg); width: min(290px, 66%); }
}
@media (max-width: 560px) {
  .hero-stack { width: min(250px, 62%); }
  .hero-card.c3 { right: -20%; }
  .hero-card.c1 { left: -15%; }
}

/* ------------------------------------------------------------- stats bar */

.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; margin: 30px 0 0;
}
.stats div { background: var(--bg); padding: 16px 14px; text-align: center; }
.stats b { display: block; font-size: 25px; font-weight: 800; letter-spacing: -.8px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stats small { color: var(--muted); font-size: 12.5px; }

/* ---------------------------------------------------------------- picker */

.picker {
  margin: 26px 0 8px; border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); box-shadow: var(--sh-2); overflow: hidden;
}
.picker-head { padding: 18px 18px 0; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.picker-head h2 { margin: 0; font-size: 18px; letter-spacing: -.3px; }
.picker-count { margin-left: auto; font-size: 13px; color: var(--muted); }

.picker-search { padding: 14px 18px 0; position: relative; }
.picker-search input {
  width: 100%; padding: 12px 14px 12px 40px; font-size: 15px; font-family: inherit;
  border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink);
  transition: border-color .16s, box-shadow .16s;
}
.picker-search input:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 16%, transparent);
}
.picker-search::before {
  content: '⌕'; position: absolute; left: 32px; top: 50%; transform: translateY(-38%);
  color: var(--muted); font-size: 19px; pointer-events: none;
}

.picker-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 14px 18px 2px; scrollbar-width: none; }
.picker-tabs::-webkit-scrollbar { display: none; }
.picker-tab {
  flex: none; border: 1px solid var(--line); background: var(--bg); color: var(--ink-2);
  padding: 8px 15px; border-radius: 999px; font-size: 13.5px; font-weight: 550;
  cursor: pointer; font-family: inherit; white-space: nowrap; transition: all .16s var(--ease);
}
.picker-tab:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-1px); }
.picker-tab.on { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 6px 16px -7px color-mix(in srgb, var(--brand) 80%, transparent); }

.picker-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 8px; padding: 16px 18px 20px; max-height: 430px; overflow-y: auto;
}
.picker-grid a {
  display: block; padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px;
  text-decoration: none; color: var(--ink); background: var(--bg);
  transition: transform .16s var(--ease), border-color .16s, box-shadow .16s;
}
.picker-grid a:hover {
  border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--sh-2);
}
.picker-grid b { display: block; font-size: 14px; font-weight: 650; letter-spacing: -.2px; }
.picker-grid small { color: var(--muted); font-size: 11.5px; display: block; margin-top: 2px; }
.picker-grid .flag { color: var(--warn); font-size: 11px; }
.picker-empty { padding: 26px 18px 30px; text-align: center; color: var(--muted); font-size: 14px; }

/* -------------------------------------------------------------- sections */

section { margin: 58px 0; }
section.band { background: var(--bg-alt); padding: 54px 0; margin: 58px 0; }

.sec-head { text-align: center; max-width: 620px; margin: 0 auto 32px; }
.sec-head.left { text-align: left; margin-left: 0; }
h2 { font-size: clamp(23px, 3.6vw, 33px); line-height: 1.15; letter-spacing: -.9px; margin: 0 0 10px; font-weight: 780; }
.sec-head p { color: var(--muted); margin: 0; font-size: 16px; }
h3.sub { font-size: 17px; margin: 26px 0 10px; letter-spacing: -.3px; }

/* steps ------------------------------------------------------------------ */

.steps { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.step {
  position: relative; padding: 26px 20px 22px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1);
  transform-style: preserve-3d; transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.step:hover { box-shadow: var(--sh-2); }
.step-n {
  width: 42px; height: 42px; border-radius: 13px; background: var(--grad); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 17px; margin-bottom: 14px;
  box-shadow: 0 10px 22px -8px color-mix(in srgb, var(--brand) 70%, transparent);
  transform: translateZ(28px);
}
.step h3 { margin: 0 0 7px; font-size: 17px; letter-spacing: -.3px; transform: translateZ(16px); }
.step p { margin: 0; color: var(--muted); font-size: 14.5px; transform: translateZ(8px); }

/* feature grid ----------------------------------------------------------- */

.features { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(232px, 1fr)); }
.feature {
  padding: 22px 20px; border-radius: var(--r-lg); background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--sh-1);
  transform-style: preserve-3d; transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
}
.feature:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); box-shadow: var(--sh-2); }
.feature .ficon {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  font-size: 18px; margin-bottom: 13px; background: var(--brand-soft); color: var(--brand);
  transform: translateZ(26px);
}
.feature h3 { margin: 0 0 6px; font-size: 16px; letter-spacing: -.25px; transform: translateZ(14px); }
.feature p { margin: 0; color: var(--muted); font-size: 14.5px; transform: translateZ(6px); }

/* comparison ------------------------------------------------------------- */

table.compare { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 620px; }
table.compare th, table.compare td { padding: 13px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
table.compare thead th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
table.compare thead th.us { color: var(--brand); }
table.compare tbody td:first-child { font-weight: 620; color: var(--ink); }
table.compare td.us { background: color-mix(in srgb, var(--brand) 5%, transparent); }
.y { color: var(--ok); font-weight: 700; }
.n { color: var(--err); font-weight: 700; }
.q { color: var(--warn); font-weight: 700; }

/* size chart ------------------------------------------------------------- */

table.chart { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
table.chart th, table.chart td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--line); }
table.chart th { color: var(--muted); font-weight: 700; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; }
table.chart td:first-child { font-weight: 620; }
table.chart tbody tr { transition: background .14s; }
table.chart tbody tr:hover { background: var(--surface-2); }
table.chart a { color: var(--brand); text-decoration: none; }
table.chart a:hover { text-decoration: underline; }
.scroller { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--r); }
.scroller table { min-width: 560px; }

/* cards ------------------------------------------------------------------ */

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 8px; }
.cards a {
  display: block; padding: 12px 13px; border: 1px solid var(--line); border-radius: 12px;
  text-decoration: none; color: var(--ink); background: var(--surface);
  transition: transform .16s var(--ease), border-color .16s, box-shadow .16s;
}
.cards a:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--sh-2); }
.cards b { display: block; font-size: 14px; font-weight: 640; }
.cards small { color: var(--muted); font-size: 11.5px; }

/* ------------------------------------------------------- provenance/tool */

.spec-strip { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.spec-strip b {
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1);
  border-radius: 999px; padding: 7px 15px; font-size: 13px; font-weight: 620;
}

.prov {
  display: flex; gap: 11px; align-items: flex-start;
  border: 1px solid color-mix(in srgb, var(--warn) 30%, var(--line));
  border-left: 3px solid var(--warn);
  background: var(--warn-soft); color: var(--ink);
  padding: 13px 15px; border-radius: var(--r); font-size: 14px; margin: 0 0 16px;
}
.prov.verified { border-left-color: var(--ok); border-color: color-mix(in srgb, var(--ok) 30%, var(--line)); background: var(--ok-soft); }
.prov .ico { flex: none; font-weight: 800; }
.prov a { color: inherit; }
.prov small { display: block; color: var(--muted); margin-top: 4px; }

.conflict {
  border: 1px solid color-mix(in srgb, var(--err) 28%, var(--line));
  border-left: 3px solid var(--err);
  background: var(--err-soft); padding: 13px 15px; border-radius: var(--r);
  font-size: 14px; margin: 0 0 16px;
}
.conflict strong { display: block; margin-bottom: 3px; }

/* A conflict settled against the notification is good news, not a warning —
   it should not carry the same red as an open disagreement. */
.conflict.settled {
  border-color: color-mix(in srgb, var(--ok) 28%, var(--line));
  border-left-color: var(--ok);
  background: var(--ok-soft);
}

.tool {
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px;
  background: var(--surface); box-shadow: var(--sh-2); margin-bottom: 30px;
}

.tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 13px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none; border: 1px solid var(--line); background: var(--bg); color: var(--ink-2);
  padding: 8px 15px; border-radius: 999px; font-size: 14px; cursor: pointer;
  white-space: nowrap; font-family: inherit; transition: all .16s var(--ease);
}
.tab:hover { border-color: var(--brand); color: var(--brand); }
.tab.on { background: var(--grad); color: #fff; border-color: transparent; font-weight: 650; }

.drop {
  border: 2px dashed var(--line); border-radius: var(--r); padding: 34px 16px;
  text-align: center; cursor: pointer; background: var(--bg);
  transition: border-color .18s, background .18s, transform .18s var(--ease);
}
.drop:hover, .drop.over, .drop:focus-visible {
  border-color: var(--brand); background: var(--brand-soft); outline: none; transform: translateY(-1px);
}
.drop.compact { padding: 13px; }
.drop.compact .drop-ico { display: none; }
.drop-ico { font-size: 28px; color: var(--brand); line-height: 1; margin-bottom: 7px; }
.drop strong { display: block; font-size: 15px; }
.drop small { color: var(--muted); font-size: 13px; }

.editor { margin-top: 15px; }
.stage-wrap {
  display: flex; justify-content: center; padding: 16px;
  background: repeating-conic-gradient(var(--line-soft) 0% 25%, transparent 0% 50%) 50%/16px 16px;
  border-radius: var(--r); border: 1px solid var(--line);
}
canvas.stage {
  max-width: 100%; touch-action: none; cursor: grab; background: #fff;
  box-shadow: 0 4px 18px -6px rgba(15,21,34,.3), 0 0 0 1px rgba(0,0,0,.1);
  border-radius: 3px;
}
canvas.stage.grabbing { cursor: grabbing; }

.ctrl { margin-top: 13px; }
.slider { display: flex; align-items: center; gap: 11px; margin-bottom: 9px; font-size: 14px; }
.slider span { flex: none; width: 120px; color: var(--muted); }
.slider input[type=range] { flex: 1; accent-color: var(--brand); }

.btnrow { display: flex; flex-wrap: wrap; gap: 6px; }
.btnrow button {
  border: 1px solid var(--line); background: var(--bg); color: var(--ink);
  padding: 8px 13px; border-radius: 9px; font-size: 13px; cursor: pointer;
  font-family: inherit; transition: all .16s;
}
.btnrow button:hover { border-color: var(--brand); color: var(--brand); }
.btnrow button.toggle.on { background: var(--grad); color: #fff; border-color: transparent; }

.panel { margin-top: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); }
.panel > summary {
  padding: 12px 15px; cursor: pointer; font-size: 14px; font-weight: 620;
  list-style: none; display: flex; align-items: center;
}
.panel > summary::-webkit-details-marker { display: none; }
.panel > summary::after { content: '+'; margin-left: auto; color: var(--muted); font-weight: 400; font-size: 17px; }
.panel[open] > summary::after { content: '−'; }
.panel-body { padding: 0 15px 15px; }
.panel-body.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 11px; }

.field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.field.wide { margin-bottom: 10px; }
.field span { color: var(--muted); }
.field input, .panel-body input[type=text], .panel-body input[type=number] {
  border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px;
  font-size: 15px; background: var(--bg); color: var(--ink); width: 100%; font-family: inherit;
}
.field input:focus, .panel-body input:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 15%, transparent);
}
.field em { font-style: normal; font-size: 11px; color: var(--muted); }
.check { display: flex; align-items: center; gap: 9px; font-size: 14px; margin-bottom: 11px; }
.check input { accent-color: var(--brand); width: 17px; height: 17px; }
.hint { font-size: 13px; color: var(--muted); margin: 0 0 11px; }
button.link { background: none; border: none; color: var(--brand); font-size: 12px; cursor: pointer; padding: 3px 0; text-align: left; font-family: inherit; }

.go {
  width: 100%; margin-top: 15px; padding: 15px; border: none; border-radius: var(--r);
  background: var(--grad); color: #fff; font-size: 16px; font-weight: 680; cursor: pointer;
  font-family: inherit; box-shadow: 0 12px 28px -12px color-mix(in srgb, var(--brand) 85%, transparent);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.go:not(:disabled):hover { transform: translateY(-2px); box-shadow: 0 18px 36px -12px color-mix(in srgb, var(--brand) 85%, transparent); }
.go:disabled { opacity: .42; cursor: not-allowed; box-shadow: none; }

.out { margin-top: 15px; }
.result {
  border: 1px solid var(--line); border-top: 3px solid var(--ok);
  border-radius: var(--r); padding: 17px; background: var(--bg); box-shadow: var(--sh-1);
}
.result.bad { border-top-color: var(--err); }
.result h3 { margin: 0 0 13px; font-size: 18px; letter-spacing: -.3px; }
.result h4 { margin: 19px 0 9px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }

table.facts { width: 100%; border-collapse: collapse; font-size: 14px; }
table.facts th { text-align: left; font-weight: 500; color: var(--muted); padding: 6px 0; width: 34%; }
table.facts td { padding: 6px 0; }
td.mark { width: 24px; text-align: right; font-weight: 800; }
td.mark.y { color: var(--ok); }
td.mark.n { color: var(--err); }

a.dl {
  display: block; margin-top: 15px; padding: 14px; text-align: center;
  background: var(--ok); color: #fff; border-radius: var(--r);
  text-decoration: none; font-weight: 680;
  box-shadow: 0 12px 26px -12px color-mix(in srgb, var(--ok) 85%, transparent);
  transition: transform .18s var(--ease);
}
a.dl:hover { transform: translateY(-2px); }
canvas.thumb { display: block; margin: 15px auto 0; box-shadow: 0 4px 14px -5px rgba(15,21,34,.35), 0 0 0 1px var(--line); background: #fff; border-radius: 3px; }

ul.checks { list-style: none; margin: 0; padding: 0; font-size: 14px; }
ul.checks li { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line-soft); }
ul.checks li:first-child { border-top: none; }
ul.checks .ico {
  flex: none; width: 19px; height: 19px; border-radius: 50%; font-size: 11px;
  display: grid; place-items: center; color: #fff; margin-top: 2px; font-weight: 700;
}
ul.checks li.ok .ico { background: var(--ok); }
ul.checks li.warn .ico { background: var(--warn); }

p.note { font-size: 13px; padding: 10px 12px; border-radius: 9px; margin: 13px 0 0; }
p.note.info { background: var(--surface-2); color: var(--muted); }
p.note.warn { background: var(--warn-soft); color: var(--warn); }
p.note.err { background: var(--err-soft); color: var(--err); }

ul.rules { padding-left: 19px; color: var(--ink-2); }
ul.rules li { margin-bottom: 8px; }

details.faq { border-bottom: 1px solid var(--line); }
details.faq summary {
  padding: 15px 0; cursor: pointer; font-weight: 640; font-size: 15.5px;
  list-style: none; display: flex; gap: 12px; align-items: flex-start;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: '+'; margin-left: auto; color: var(--muted); font-size: 19px; transition: transform .2s; }
details.faq[open] summary::after { content: '−'; }
details.faq div { padding: 0 0 16px; color: var(--muted); font-size: 15px; max-width: 72ch; }

/* ---------------------------------------------------------------- footer */

footer.site { border-top: 1px solid var(--line); margin-top: 60px; padding: 34px 0 48px; font-size: 13.5px; color: var(--muted); background: var(--bg-alt); }
footer.site a { color: var(--muted); }
footer.site a:hover { color: var(--brand); }
footer.site .fcols { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 24px; }
footer.site .fcols b { display: block; color: var(--ink); font-size: 13px; margin-bottom: 9px; }
footer.site .fcols ul { list-style: none; margin: 0; padding: 0; }
footer.site .fcols li { margin-bottom: 6px; }
footer.site .disclaim { padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }

/* --------------------------------------------------------------- reveals */

.reveal { opacity: 0; transform: translateY(22px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .6s var(--ease), transform .6s var(--ease); }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.in { opacity: 1 !important; transform: none !important; transition: none !important; }
  .hero-stack { transform: none !important; width: 100%; }
  .hero-card { transform: none !important; position: static; margin-bottom: 10px; width: 100% !important; }
  .btn:hover, .cards a:hover, .picker-grid a:hover, .go:hover, a.dl:hover { transform: none !important; }
  * { animation: none !important; }
}

/* ---------------------------------------------------------- legal pages */

.updated { font-size: 13px; color: var(--muted); margin: 6px 0 0; }

.legal { padding-bottom: 20px; }
.legal h2 {
  font-size: 19px; letter-spacing: -.35px; margin: 38px 0 10px;
  padding-top: 20px; border-top: 1px solid var(--line-soft);
}
.legal h2:first-of-type { border-top: none; padding-top: 0; margin-top: 26px; }
.legal p { color: var(--ink-2); margin: 0 0 13px; }
.legal ul, .legal ol { color: var(--ink-2); padding-left: 21px; margin: 0 0 14px; }
.legal li { margin-bottom: 7px; }
.legal a { color: var(--brand); }
.legal code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .88em; background: var(--surface-2); padding: 2px 6px;
  border-radius: 5px; border: 1px solid var(--line-soft);
}

.legal-summary {
  background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 24%, transparent);
  border-radius: var(--r); padding: 16px 18px; margin: 0 0 10px;
  font-size: 15px; color: var(--ink); line-height: 1.6;
}
.legal-summary b { color: var(--brand); }
.legal-summary a { font-weight: 600; }

.legal-warn {
  background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent);
  border-left: 3px solid var(--warn);
  border-radius: var(--r); padding: 15px 17px; margin: 4px 0 15px; font-size: 15px;
}

.legal-pre {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r);
  padding: 15px 17px; overflow-x: auto; font-size: 13px; line-height: 1.7;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--ink-2); margin: 0 0 15px;
}

.legal .features { margin-bottom: 18px; }

footer.site .indep {
  margin-top: 12px; font-size: 12px; line-height: 1.6; color: var(--muted); opacity: .85;
  max-width: 78ch;
}

/* ------------------------------------------------- name & date, share */

.stamprow {
  border: 1px solid var(--line-soft); border-radius: var(--r-sm);
  padding: 11px 12px 12px; margin-bottom: 10px; background: var(--surface-2);
}
.stamprow .check { margin-bottom: 9px; }
.stamprow .field.wide { margin-bottom: 0; }
/* A disabled field should read as switched off, not as broken. */
.stamprow input:disabled {
  opacity: .5; cursor: not-allowed; background: var(--surface-2);
}
.stamprow:has(input[type=checkbox]:checked) {
  border-color: color-mix(in srgb, var(--brand) 40%, var(--line));
  background: var(--brand-soft);
}

.actions { display: flex; gap: 9px; margin-top: 15px; align-items: stretch; }
.actions .dl { flex: 1; margin-top: 0; }
button.share {
  flex: none; display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 18px; border-radius: var(--r); cursor: pointer; font-family: inherit;
  font-size: 15px; font-weight: 660;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line);
  transition: transform .18s var(--ease), border-color .18s, color .18s;
}
button.share:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-2px); }
.share-ico { font-size: 16px; line-height: 1; }
@media (max-width: 460px) {
  .actions { flex-direction: column; }
  button.share { justify-content: center; }
}

/* Shown only when a non-English language is active. */
.langnotice {
  margin: 0 0 16px; padding: 10px 13px; border-radius: var(--r-sm);
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: 13px; color: var(--muted);
}

/* ------------------------------------------------- signature draw pad */

.srctabs { display: flex; gap: 6px; margin-bottom: 11px; }
.srctab {
  flex: 1; border: 1px solid var(--line); background: var(--bg); color: var(--ink-2);
  padding: 10px 12px; border-radius: 10px; font-size: 14px; font-weight: 550;
  cursor: pointer; font-family: inherit; transition: all .16s var(--ease);
}
.srctab:hover { border-color: var(--brand); color: var(--brand); }
.srctab.on { background: var(--grad); color: #fff; border-color: transparent; font-weight: 650; }

.pad { margin-bottom: 4px; }

.pad-warn {
  display: block; background: var(--warn-soft);
  border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent);
  border-left: 3px solid var(--warn);
  border-radius: var(--r-sm); padding: 11px 13px; margin-bottom: 12px; font-size: 13px;
}
.pad-warn strong { display: block; margin-bottom: 3px; }
.pad-warn span { color: var(--ink-2); }

.pad-stage {
  position: relative; border: 2px dashed var(--line); border-radius: var(--r);
  background: #fff; overflow: hidden;
}
.pad.has-ink .pad-stage { border-style: solid; border-color: var(--line); }
canvas.pad-canvas {
  display: block; width: 100%; height: auto; touch-action: none; cursor: crosshair;
  position: relative; z-index: 2;
}
/* Baseline and prompt sit under the ink so they never obscure a stroke. */
.pad-line {
  position: absolute; left: 8%; right: 8%; bottom: 26%; height: 1px;
  background: var(--line); z-index: 1;
}
.pad-hint {
  position: absolute; left: 50%; top: 42%; transform: translate(-50%,-50%);
  color: var(--muted); font-size: 15px; z-index: 1; pointer-events: none;
  transition: opacity .2s;
}
.pad.has-ink .pad-hint, .pad.has-ink .pad-line { opacity: 0; }

.pad-tools {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 11px;
}
.pad-swatches { display: flex; gap: 5px; }
.pad-swatch {
  width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line);
  cursor: pointer; padding: 0;
}
.pad-swatch.on { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent); }
.pad-thick { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.pad-thick input { accent-color: var(--brand); width: 92px; }
.pad-btns { display: flex; gap: 6px; margin-left: auto; }
.pad-btns button {
  border: 1px solid var(--line); background: var(--bg); color: var(--ink);
  padding: 7px 12px; border-radius: 8px; font-size: 13px; cursor: pointer; font-family: inherit;
}
.pad-btns button:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.pad-btns button:disabled { opacity: .4; cursor: not-allowed; }

.pad-actions { display: flex; gap: 8px; margin-top: 12px; }
.pad-use {
  flex: 1; border: none; border-radius: var(--r); padding: 13px; cursor: pointer;
  background: var(--grad); color: #fff; font-size: 15px; font-weight: 660; font-family: inherit;
}
.pad-use:disabled { opacity: .42; cursor: not-allowed; }
.pad-save {
  flex: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: var(--r); padding: 13px 16px; cursor: pointer; font-size: 14px;
  font-weight: 600; font-family: inherit;
}
.pad-save:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.pad-save:disabled { opacity: .42; cursor: not-allowed; }
.pad-msg { font-size: 13px; color: var(--muted); margin: 10px 0 0; }

@media (max-width: 460px) {
  .pad-actions { flex-direction: column; }
  .pad-btns { margin-left: 0; }
}

/* ---- saved signatures ---- */

.sigstrip { margin-bottom: 12px; }
.sigstrip-label {
  display: block; font-size: 12px; color: var(--muted); font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em; margin-bottom: 7px;
}
.sigstrip-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.sigstrip-row::-webkit-scrollbar { display: none; }
.sigchip-wrap { position: relative; flex: none; }
.sigchip {
  width: 116px; height: 52px; padding: 5px; border: 1px solid var(--line);
  border-radius: 9px; background: #fff; cursor: pointer;
  display: grid; place-items: center; transition: border-color .16s, transform .16s var(--ease);
}
.sigchip:hover { border-color: var(--brand); transform: translateY(-2px); }
.sigchip img { max-width: 100%; max-height: 100%; object-fit: contain; }
.sigdel {
  position: absolute; top: -6px; right: -6px; width: 20px; height: 20px;
  border-radius: 50%; border: 1px solid var(--line); background: var(--surface);
  color: var(--muted); font-size: 13px; line-height: 1; cursor: pointer; padding: 0;
}
.sigdel:hover { background: var(--err); color: #fff; border-color: var(--err); }

/* ----------------------------------------------------------------- guides */

.gcards { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); }
.gcard {
  display: flex; flex-direction: column; gap: 6px;
  padding: 18px 19px; border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); text-decoration: none; color: var(--ink);
  box-shadow: var(--sh-1);
  transition: transform .18s var(--ease), border-color .18s, box-shadow .18s;
}
.gcard:hover { transform: translateY(-3px); border-color: var(--brand); box-shadow: var(--sh-2); }
.gcard b { font-size: 15.5px; font-weight: 660; letter-spacing: -.25px; line-height: 1.35; }
.gcard small { color: var(--muted); font-size: 13.5px; line-height: 1.55; flex: 1; }
.gcard em {
  font-style: normal; font-size: 11.5px; font-weight: 650; color: var(--brand);
  text-transform: uppercase; letter-spacing: .05em;
}

/* on-page contents */
.gtoc {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r); padding: 15px 18px; margin: 0 0 28px;
}
.gtoc b {
  display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); margin-bottom: 9px;
}
.gtoc ol { margin: 0; padding-left: 19px; }
.gtoc li { margin-bottom: 5px; font-size: 14.5px; }
.gtoc a { color: var(--ink-2); text-decoration: none; }
.gtoc a:hover { color: var(--brand); text-decoration: underline; }

/* article body */
.guide { padding-bottom: 22px; }
.guide h2 {
  font-size: 21px; letter-spacing: -.4px; margin: 40px 0 12px;
  padding-top: 22px; border-top: 1px solid var(--line-soft); scroll-margin-top: 78px;
}
.guide h2:first-of-type { border-top: none; padding-top: 0; margin-top: 4px; }
.guide h3 { font-size: 17px; letter-spacing: -.25px; margin: 26px 0 9px; scroll-margin-top: 78px; }
.guide p { color: var(--ink-2); margin: 0 0 15px; font-size: 16.5px; line-height: 1.72; }
.guide ul, .guide ol { color: var(--ink-2); padding-left: 22px; margin: 0 0 16px; font-size: 16.5px; }
.guide li { margin-bottom: 9px; line-height: 1.68; }
.guide a { color: var(--brand); }
.guide strong { color: var(--ink); font-weight: 660; }
.guide hr { border: none; border-top: 1px solid var(--line); margin: 30px 0; }
.guide code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .87em; background: var(--surface-2); padding: 2px 6px;
  border-radius: 5px; border: 1px solid var(--line-soft);
}
.guide .scroller { margin: 0 0 18px; }
.guide table.chart td, .guide table.chart th { font-size: 14.5px; }

.callout {
  background: var(--brand-soft);
  border: 1px solid color-mix(in srgb, var(--brand) 22%, transparent);
  border-left: 3px solid var(--brand);
  border-radius: var(--r); padding: 15px 18px; margin: 0 0 18px;
  font-size: 15.5px; line-height: 1.65; color: var(--ink);
}
.callout strong { color: var(--brand); }

/* Cross-links shown instead of tabs on a category page. */
.picker-jump {
  display: flex; flex-wrap: wrap; gap: 7px; align-items: center;
  padding: 0 18px 18px; border-top: 1px solid var(--line-soft);
  margin-top: 2px; padding-top: 14px;
}
.picker-jump span {
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); font-weight: 650; margin-right: 3px;
}
.picker-jump a {
  font-size: 13px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--ink-2); text-decoration: none;
  transition: all .16s var(--ease);
}
.picker-jump a:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-1px); }

/* Wide dropdown: category list with counts. */
nav.main .navdrop-menu.wide { min-width: 260px; }
nav.main .navdrop-menu.wide a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
nav.main .navdrop-menu.wide a b { font-weight: 550; }
nav.main .navdrop-menu.wide a em {
  font-style: normal; font-size: 11.5px; font-weight: 650; color: var(--muted);
  background: var(--surface-2); padding: 2px 8px; border-radius: 999px;
}
nav.main .navdrop-menu.wide a:hover em { background: var(--bg); color: var(--brand); }
nav.main .navdrop-all {
  border-top: 1px solid var(--line); margin-top: 5px; padding-top: 9px !important;
  font-weight: 600;
}

/* ------------------------------------------------------------ help assistant */

.chat-launch {
  position: fixed; right: 18px; bottom: 18px; z-index: 70;
  width: 52px; height: 52px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--grad); color: #fff; font-size: 23px; font-weight: 700;
  font-family: inherit; line-height: 1;
  box-shadow: 0 10px 26px -8px color-mix(in srgb, var(--brand) 80%, transparent);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.chat-launch:hover { transform: translateY(-2px) scale(1.04); }
.chat-launch.on { transform: rotate(90deg); }

.chat-panel {
  position: fixed; right: 18px; bottom: 82px; z-index: 70;
  width: min(370px, calc(100vw - 36px));
  height: min(560px, calc(100vh - 130px));
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--sh-3);
  animation: chatIn .22s var(--ease);
}
@keyframes chatIn { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@media (prefers-reduced-motion: reduce) {
  .chat-panel { animation: none; }
  .chat-launch:hover, .chat-launch.on { transform: none; }
}

.chat-head {
  display: flex; align-items: flex-start; gap: 10px; padding: 14px 15px;
  border-bottom: 1px solid var(--line); background: var(--surface-2); flex: none;
}
.chat-head b { display: block; font-size: 15px; }
.chat-head small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; line-height: 1.4; }
.chat-close {
  margin-left: auto; border: none; background: none; color: var(--muted);
  font-size: 22px; line-height: 1; cursor: pointer; padding: 0 2px; flex: none;
}
.chat-close:hover { color: var(--ink); }

.chat-log { flex: 1; overflow-y: auto; padding: 14px 15px; display: flex; flex-direction: column; gap: 11px; }
.chat-msg { display: flex; }
.chat-msg.chat-you { justify-content: flex-end; }
.chat-msg.chat-you > div {
  background: var(--grad); color: #fff; padding: 9px 13px;
  border-radius: 14px 14px 4px 14px; font-size: 14px; max-width: 82%;
}
.chat-bubble {
  background: var(--surface-2); color: var(--ink); padding: 11px 13px;
  border-radius: 14px 14px 14px 4px; font-size: 14px; line-height: 1.6; max-width: 92%;
}
.chat-bubble code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em;
  background: var(--bg); padding: 1px 5px; border-radius: 4px;
}
.chat-bubble a { color: var(--brand); }
.chat-warn { color: var(--warn); font-weight: 600; }

a.chat-link {
  display: block; margin-top: 9px; padding: 9px 12px; border-radius: 9px;
  background: var(--bg); border: 1px solid var(--line); color: var(--brand);
  font-size: 13.5px; font-weight: 600; text-decoration: none;
  transition: border-color .16s, transform .16s var(--ease);
}
a.chat-link:hover { border-color: var(--brand); transform: translateX(2px); }

.chat-typing { display: flex; gap: 4px; align-items: center; padding: 13px; }
.chat-typing i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--muted);
  animation: chatDot 1.1s infinite ease-in-out;
}
.chat-typing i:nth-child(2) { animation-delay: .15s; }
.chat-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes chatDot { 0%,60%,100% { opacity: .3; } 30% { opacity: 1; } }

.chat-chips {
  display: flex; flex-wrap: wrap; gap: 6px; padding: 0 15px 11px; flex: none;
  max-height: 108px; overflow-y: auto;
}
.chat-chip {
  border: 1px solid var(--line); background: var(--bg); color: var(--ink-2);
  padding: 7px 12px; border-radius: 999px; font-size: 12.5px; cursor: pointer;
  font-family: inherit; transition: all .16s var(--ease);
}
.chat-chip:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-1px); }

.chat-foot { display: flex; gap: 7px; padding: 11px 15px; border-top: 1px solid var(--line); flex: none; }
.chat-input {
  flex: 1; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  font-size: 14px; font-family: inherit; background: var(--bg); color: var(--ink);
}
.chat-input:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 15%, transparent);
}
.chat-send {
  flex: none; width: 40px; border: none; border-radius: 10px;
  background: var(--grad); color: #fff; font-size: 17px; cursor: pointer; font-family: inherit;
}

@media (max-width: 480px) {
  .chat-panel { right: 10px; left: 10px; width: auto; bottom: 76px; height: min(70vh, 520px); }
  .chat-launch { right: 14px; bottom: 14px; }
}

/* ------------------------------------------------------------- consent bar */

.consent {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 80;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  max-width: 780px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--sh-3); padding: 15px 18px;
  animation: consentIn .26s var(--ease);
}
@keyframes consentIn { from { opacity: 0; transform: translateY(14px); } }
.consent-out { opacity: 0; transform: translateY(14px); transition: opacity .2s, transform .2s; }
@media (prefers-reduced-motion: reduce) { .consent { animation: none; } }

.consent-text { flex: 1; min-width: 240px; font-size: 13.5px; line-height: 1.55; }
.consent-text strong { display: block; font-size: 14.5px; margin-bottom: 3px; }
.consent-text span { color: var(--muted); }
.consent-text a { display: inline-block; margin-top: 4px; color: var(--brand); font-size: 13px; }

.consent-btns { display: flex; gap: 8px; flex: none; }
.consent-btns button {
  padding: 10px 20px; border-radius: 10px; font-size: 14px; font-weight: 620;
  cursor: pointer; font-family: inherit; border: 1px solid var(--line);
  transition: all .16s var(--ease);
}
.consent-no { background: var(--bg); color: var(--ink-2); }
.consent-no:hover { border-color: var(--muted); }
.consent-yes { background: var(--grad); color: #fff; border-color: transparent; }
.consent-yes:hover { transform: translateY(-1px); }

/* keep the help launcher clear of the bar while it is up */
.consent ~ .chat-launch { bottom: 104px; }

@media (max-width: 560px) {
  .consent { flex-direction: column; align-items: stretch; gap: 12px; }
  .consent-btns button { flex: 1; }
  .consent ~ .chat-launch { bottom: 168px; }
}

/* --------------------------------------------------------------- pdf tools */

.pdfopts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px; margin-top: 14px;
}
.pdfsel, .pdfkb {
  width: 100%; border: 1px solid var(--line); border-radius: 9px;
  padding: 10px 11px; font-size: 15px; font-family: inherit;
  background: var(--bg); color: var(--ink);
}
.pdfsel:focus, .pdfkb:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 15%, transparent);
}
.pdfstatus { display: block; text-align: center; font-size: 13px; color: var(--muted); margin-top: 9px; }

.pdflist { margin-top: 13px; display: flex; flex-direction: column; gap: 8px; }
.pdfrow {
  display: flex; align-items: center; gap: 12px; padding: 9px 11px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg);
}
canvas.pdfthumb {
  flex: none; border: 1px solid var(--line); border-radius: 4px; background: #fff;
}
.pdfmeta { flex: 1; min-width: 0; }
.pdfmeta b { display: block; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdfmeta small { color: var(--muted); font-size: 12px; }
.pdfbtns { display: flex; gap: 4px; flex: none; }
.pdfbtns button {
  width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 7px;
  background: var(--bg); color: var(--ink-2); cursor: pointer; font-size: 14px;
  font-family: inherit; line-height: 1;
}
.pdfbtns button:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.pdfbtns button:disabled { opacity: .3; cursor: not-allowed; }
.pdfbtns .pdfdel:hover { border-color: var(--err); color: var(--err); }

/* the age calculator reuses .tool, .field and .facts, so it needs almost nothing */
#agecalc .prov { margin-top: 13px; }

/* tool cards on the home page — whole card is the link */
a.feature.toolcard { text-decoration: none; color: inherit; display: block; }
a.feature.toolcard:hover h3 { color: var(--brand); }
.toolstage {
  display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--brand); margin-bottom: 5px;
}
a.feature.toolcard h3 { margin-top: 0; }

/* most-searched shortcut above the exam search */
.picker-pop {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  padding: 14px 18px 0;
}
.picker-pop > span {
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); margin-right: 4px;
}
.picker-pop a {
  font-size: 13px; font-weight: 550; padding: 6px 13px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink-2);
  text-decoration: none; transition: all .16s var(--ease);
}
.picker-pop a:hover {
  border-color: var(--brand); color: var(--brand); transform: translateY(-1px);
}
@media (max-width: 560px) { .picker-pop { padding: 12px 14px 0; } }

/* progress across the uploads an exam needs */
.uprog {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  padding: 11px 12px; margin-bottom: 12px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r);
}
.uprog-label {
  font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--muted); margin-right: 4px;
}
.uprog-chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink-2);
  padding: 5px 11px 5px 6px; border-radius: 999px; font-size: 12.5px;
  cursor: pointer; font-family: inherit; transition: all .16s var(--ease);
}
.uprog-chip:hover { border-color: var(--brand); color: var(--brand); }
.uprog-chip.on { border-color: var(--brand); }
.uprog-tick {
  width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center;
  font-size: 10.5px; font-weight: 700; flex: none;
  background: var(--line); color: var(--muted);
}
.uprog-chip.ok { border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); }
.uprog-chip.ok .uprog-tick { background: var(--ok); color: #fff; }
.uprog-all {
  margin-left: auto; border: none; border-radius: 9px; padding: 8px 15px;
  background: var(--grad); color: #fff; font-size: 13px; font-weight: 650;
  cursor: pointer; font-family: inherit;
}
.uprog-all:hover { filter: brightness(1.06); }
@media (max-width: 560px) {
  .uprog-all { margin-left: 0; width: 100%; margin-top: 4px; }
}
