/* ============================================================================
   Can I Use AI
   The palette is a traffic signal, used literally: red stops, amber waits,
   green goes with conditions. Every contrast pair below is measured — amber
   surfaces carry dark text (7.9:1) rather than white, which is both more
   readable and more like a real signal.
   Type: Young Serif (display) / Work Sans (text and UI) / JetBrains Mono
   (kickers and data). All self-hosted, SIL OFL.
   ========================================================================== */

@font-face {
  font-family: 'Young Serif';
  src: url('/assets/fonts/young-serif-400.woff') format('woff');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Work Sans';
  src: url('/assets/fonts/work-sans-400.woff') format('woff');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Work Sans';
  src: url('/assets/fonts/work-sans-700.woff') format('woff');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/assets/fonts/jetbrains-mono-400.woff') format('woff');
  font-weight: 400; font-style: normal; font-display: swap;
}

:root {
  --ink: #12191f;
  --ink-2: #46545c;
  --ink-3: #6b7a82;
  --paper: #f5f7f6;
  --paper-2: #eceff0;
  --card: #ffffff;
  --line: #dbe2e0;
  --line-2: #c2cbc8;

  /* text / borders on paper */
  --no: #b3241b;
  --ask: #8a5600;
  --yes: #14684a;
  --blue: #16506b;

  /* filled surfaces */
  --no-surface: #c22e22;
  --ask-surface: #e1a11b;
  --yes-surface: #17784f;

  /* text on those surfaces */
  --on-no: #ffffff;
  --on-ask: #20160a;
  --on-yes: #ffffff;

  /* lamp glass — decorative only, never carries text */
  --lamp-no: #c22e22;
  --lamp-ask: #e1a11b;
  --lamp-yes: #189063;

  --accent: var(--blue);

  --display: 'Young Serif', Georgia, 'Times New Roman', serif;
  --text: 'Work Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --shell: 72rem;
  --prose: 40rem;
  --head-h: 3.75rem;
  --r: 0.6rem;
  --r-lg: 1rem;
  --shadow: 0 1px 2px rgba(18, 25, 31, .04), 0 8px 24px -12px rgba(18, 25, 31, .12);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e6ebe8;
    --ink-2: #a4b1ab;
    --ink-3: #7f8d87;
    --paper: #12191f;
    --paper-2: #161f26;
    --card: #18222a;
    --line: #283238;
    --line-2: #38454c;

    --no: #f0958c;
    --ask: #e8b45c;
    --yes: #63c6a2;
    --blue: #85b8d8;

    --no-surface: #c22e22;
    --ask-surface: #e1a11b;
    --yes-surface: #17784f;

    --on-no: #ffffff;
    --on-ask: #20160a;
    --on-yes: #ffffff;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -12px rgba(0,0,0,.6);
  }
}

/* ------------------------------------------------------------------ base */

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: clamp(1rem, 0.97rem + 0.16vw, 1.0625rem);
  line-height: 1.62;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

body[data-tone="no"] { --accent: var(--no); }
body[data-tone="ask"] { --accent: var(--ask); }
body[data-tone="yes"] { --accent: var(--yes); }

h1, h2, h3, h4 { margin: 0; line-height: 1.18; font-weight: 400; }
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; }
img, svg { max-width: 100%; }

a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 0.16em; }
a:hover { text-decoration-thickness: 2px; }

code {
  font-family: var(--mono); font-size: 0.88em;
  background: var(--paper-2); padding: 0.1em 0.35em; border-radius: 0.25rem;
}

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

[id] { scroll-margin-top: calc(var(--head-h) + 1.25rem); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 60;
  background: var(--ink); color: var(--paper);
  padding: 0.75rem 1.1rem; font-weight: 700; border-radius: 0 0 var(--r) 0;
}
.skip:focus { left: 0; }

.shell { width: 100%; max-width: var(--shell); margin: 0 auto; padding: 0 clamp(1rem, 4vw, 1.25rem); }

.icon { width: 1.25em; height: 1.25em; flex: none; vertical-align: -0.22em; }

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

/* ------------------------------------------------------------------ logo */
/* The signal head stands in for the "I" of "Can I Use AI", so the mark sits
   inside the word. It is sized to cap height and baseline-aligned, which is
   what stops it reading as an icon that wandered into the middle of a name. */

.logo {
  display: inline-flex; flex-direction: column; justify-content: center;
  gap: 0.05rem; text-decoration: none; color: var(--ink); min-height: 2.75rem;
}
.logo__lockup {
  display: inline-flex; align-items: baseline; gap: 0.16em;
  font-family: var(--display); font-size: 1.22rem;
  letter-spacing: -0.005em; line-height: 1.05; white-space: nowrap;
}
.logo__i {
  width: 0.46em; height: 0.92em; flex: none;
  align-self: baseline; color: currentColor;
  transform: translateY(0.04em);
}
.logo__tag { font-size: 0.76rem; color: var(--ink-3); white-space: nowrap; line-height: 1.2; }
.logo:hover .logo__word { color: var(--accent); }

@media (max-width: 24rem) {
  .logo__lockup { font-size: 1.08rem; }
}

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

.site-head {
  position: sticky; top: 0; z-index: 40;
  background: var(--paper);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 180ms linear, box-shadow 180ms linear;
}
.site-head.is-stuck { border-bottom-color: var(--line); box-shadow: var(--shadow); }

.site-head__in {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: var(--head-h);
}

.nav { display: none; }
.nav__list { display: flex; align-items: center; gap: 0.15rem; list-style: none; }
.nav__list a {
  display: block; padding: 0.55rem 0.7rem; border-radius: var(--r);
  color: var(--ink-2); text-decoration: none; font-size: 0.94rem; font-weight: 500;
  white-space: nowrap;
}
.nav__list a:hover { color: var(--ink); background: var(--paper-2); }
.nav__list a[aria-current="page"] { color: var(--ink); font-weight: 700; }

.nav__toggle {
  display: inline-flex; align-items: center; gap: 0.4rem;
  min-height: 2.75rem; padding: 0 0.75rem; cursor: pointer;
  font: inherit; font-size: 0.92rem; font-weight: 500;
  background: transparent; color: var(--ink);
  border: 1px solid var(--line-2); border-radius: var(--r);
}
.nav__toggle-close { display: none; }
.nav__toggle[aria-expanded="true"] .nav__toggle-open { display: none; }
.nav__toggle[aria-expanded="true"] .nav__toggle-close { display: inline-block; }

.nav__drawer { border-top: 1px solid var(--line); background: var(--paper); }
.nav__drawer[hidden] { display: none; }
.nav__drawer-list { list-style: none; padding: 0.5rem 1.25rem 1rem; max-width: var(--shell); margin: 0 auto; }
.nav__drawer-list a {
  display: block; padding: 0.8rem 0.25rem; min-height: 2.75rem;
  color: var(--ink); text-decoration: none; font-weight: 500;
  border-bottom: 1px solid var(--line);
}
.nav__drawer-list li:last-child a { border-bottom: 0; }
.nav__drawer-list a[aria-current="page"] { color: var(--accent); font-weight: 700; }

@media (min-width: 62rem) {
  .nav { display: block; }
  .nav__toggle { display: none; }
  .nav__drawer { display: none !important; }
}

/* ------------------------------------------------------------- breadcrumb */

.crumbs { padding: 0.9rem 0 0; font-size: 0.85rem; color: var(--ink-3); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.crumbs li + li::before { content: "/"; margin-right: 0.4rem; color: var(--line-2); }
.crumbs a { color: var(--ink-3); }

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

.hero { padding: clamp(1.9rem, 6vw, 2.75rem) 0 1.5rem; }
.hero--tight { padding: 2.25rem 0 0.25rem; }
.hero--tight .hero__lede { margin-top: 0.85rem; }
.kicker {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 0.85rem;
}
.h1 {
  font-family: var(--display);
  font-size: clamp(2.1rem, 7.2vw, 3.6rem);
  letter-spacing: -0.015em; max-width: 18ch;
}
.hero__lede {
  margin-top: 1.1rem; max-width: var(--prose);
  font-size: clamp(1.05rem, 2.4vw, 1.2rem); color: var(--ink-2);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.8rem; }

/* ------------------------------------------------------- the three lights */

.lights { display: grid; gap: 0.8rem; margin-top: 2.5rem; }
@media (min-width: 46rem) { .lights { grid-template-columns: repeat(3, 1fr); } }

.light {
  display: grid; gap: 0.35rem;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 1.15rem 1.2rem;
  border-top: 5px solid var(--line-2);
}
.light--no { border-top-color: var(--lamp-no); }
.light--ask { border-top-color: var(--lamp-ask); }
.light--yes { border-top-color: var(--lamp-yes); }

.light__lamp {
  display: flex; gap: 0.3rem; align-items: center; margin-bottom: 0.35rem;
}
.light__lamp i {
  width: 0.72rem; height: 0.72rem; border-radius: 50%;
  background: var(--line-2); display: inline-block;
}
.light--no .light__lamp i:nth-child(1) { background: var(--lamp-no); }
.light--ask .light__lamp i:nth-child(2) { background: var(--lamp-ask); }
.light--yes .light__lamp i:nth-child(3) { background: var(--lamp-yes); }

.light__w { font-family: var(--display); font-size: 1.32rem; }
.light--no .light__w { color: var(--no); }
.light--ask .light__w { color: var(--ask); }
.light--yes .light__w { color: var(--yes); }
.light__d { color: var(--ink-2); font-size: 0.94rem; }

/* ------------------------------------------------------------------ bands */

.band { padding: clamp(2rem, 6vw, 3rem) 0; }
.band--tight { padding: 1.5rem 0 0; }
.band--alt { background: var(--paper-2); }
.band--tool { padding-top: 1.5rem; padding-bottom: 2.5rem; }

.h2 {
  font-family: var(--display);
  font-size: clamp(1.55rem, 4.2vw, 2.15rem);
  letter-spacing: -0.01em; max-width: 22ch;
}
.sub-h {
  font-family: var(--display); font-size: 1.3rem;
  margin: 2.5rem 0 1.1rem; padding-top: 1.4rem; border-top: 1px solid var(--line);
}
.lede { margin-top: 0.9rem; max-width: var(--prose); color: var(--ink-2); font-size: 1.05rem; }
.band > .shell > p, .band > .shell > dl, .band > .shell > ul { max-width: var(--prose); }

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 2.75rem; padding: 0.7rem 1.15rem;
  font: inherit; font-weight: 700; font-size: 0.97rem; cursor: pointer;
  text-decoration: none; text-align: center;
  background: var(--ink); color: var(--paper);
  border: 2px solid var(--ink); border-radius: var(--r);
  transition: transform 120ms ease, background-color 120ms linear;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn--ghost:hover { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn--lg { min-height: 3.1rem; padding: 0.85rem 1.5rem; font-size: 1.03rem; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

.row { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-top: 1.2rem; }

/* ---------------------------------------------------------------- notices */

.notice {
  display: flex; gap: 0.75rem; align-items: flex-start;
  padding: 1rem 1.1rem; border-radius: var(--r);
  background: var(--card); border: 1px solid var(--line);
  border-left: 4px solid var(--ink-3);
  font-size: 0.97rem; color: var(--ink-2); max-width: 46rem;
}
.notice .icon { margin-top: 0.2rem; }
.notice--no { border-left-color: var(--no); }
.notice--no .icon { color: var(--no); }
.notice--ask { border-left-color: var(--ask); }
.notice--ask .icon { color: var(--ask); }

/* ------------------------------------------------------------------- toc */

.toc {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 1.1rem 1.25rem; max-width: 34rem;
}
.toc__h {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 0.6rem;
}
.toc__list { list-style: none; counter-reset: toc; }
.toc__list li { counter-increment: toc; }
.toc__list a {
  display: flex; gap: 0.7rem; padding: 0.45rem 0; min-height: 2.4rem;
  align-items: center; color: var(--ink); text-decoration: none; font-weight: 500;
}
.toc__list a::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--mono); font-size: 0.72rem; color: var(--ink-3);
}
.toc__list a:hover { color: var(--accent); text-decoration: underline; }
.toc__list a.is-active { color: var(--accent); font-weight: 700; }

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

.tool { margin-top: 1.25rem; }

.t-step {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(1.1rem, 4vw, 1.5rem) clamp(1rem, 3.5vw, 1.25rem) clamp(1.2rem, 4vw, 1.6rem);
  box-shadow: var(--shadow); max-width: 46rem;
}
.t-prog {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-3);
}
.t-q { font-family: var(--display); font-size: clamp(1.35rem, 4vw, 1.8rem); margin-top: 0.6rem; }
.t-sub { margin-top: 0.6rem; color: var(--ink-2); font-size: 0.98rem; }

.t-choices { display: grid; gap: 0.6rem; margin-top: 1.5rem; list-style: none; }
.t-choice {
  display: flex; gap: 0.85rem; align-items: flex-start; width: 100%; text-align: left;
  min-height: 3.25rem; padding: 0.9rem 1rem; cursor: pointer; font: inherit;
  background: var(--paper); color: var(--ink);
  border: 2px solid var(--line); border-radius: var(--r);
  transition: border-color 120ms linear, background-color 120ms linear;
}
.t-choice:hover { border-color: var(--ink); background: var(--card); }
.t-choice .icon { color: var(--ink-3); margin-top: 0.15rem; width: 1.4rem; height: 1.4rem; }
.t-choice:hover .icon { color: var(--accent); }
.t-choice__t { display: block; font-weight: 700; }
.t-choice__s { display: block; color: var(--ink-3); font-size: 0.9rem; margin-top: 0.1rem; }
.t-choice__k {
  margin-left: auto; font-family: var(--mono); font-size: 0.7rem; color: var(--ink-3);
  border: 1px solid var(--line-2); border-radius: 0.25rem; padding: 0.05rem 0.35rem;
}

.t-back {
  display: inline-flex; align-items: center; gap: 0.35rem; min-height: 2.75rem;
  background: none; border: 0; cursor: pointer; font: inherit; font-size: 0.92rem;
  color: var(--ink-3); padding: 0;
}
.t-back:hover { color: var(--ink); }

.t-verdict {
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  padding: clamp(1.5rem, 5vw, 2rem) clamp(1rem, 3.5vw, 1.25rem) clamp(1.3rem, 4vw, 1.75rem); color: #fff;
}
.t-verdict--no { background: var(--no-surface); color: var(--on-no); }
.t-verdict--ask { background: var(--ask-surface); color: var(--on-ask); }
.t-verdict--yes { background: var(--yes-surface); color: var(--on-yes); }
.t-verdict__lamp {
  display: inline-flex; gap: 0.4rem; align-items: center;
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.14em;
  text-transform: uppercase; opacity: .85; margin-bottom: 0.9rem;
}
.t-verdict__lamp i {
  width: 0.7rem; height: 0.7rem; border-radius: 50%;
  background: currentColor; display: inline-block;
}
.t-verdict__lamp i.off { opacity: .3; }
.t-verdict__w {
  font-family: var(--display); font-size: clamp(2.6rem, 11vw, 4rem);
  line-height: 0.98; letter-spacing: -0.02em; margin: 0;
}
.t-verdict__h { margin: 0.65rem 0 0; font-size: clamp(1rem, 3vw, 1.2rem); font-weight: 700; max-width: 28ch; }

.t-body {
  background: var(--card); border: 1px solid var(--line); border-top: 0;
  border-radius: 0 0 var(--r-lg) var(--r-lg);
  padding: clamp(1.1rem, 4vw, 1.5rem) clamp(1rem, 3.5vw, 1.25rem) clamp(1.2rem, 4vw, 1.6rem);
  box-shadow: var(--shadow);
}
.t-out { max-width: 46rem; }
.t-label {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--ink-3); margin: 1.7rem 0 0.7rem;
}

/* ------------------------------------------------------------------ lists */

.ticks { list-style: none; }
.ticks li {
  position: relative; padding: 0.5rem 0 0.5rem 1.6rem;
  border-top: 1px solid var(--line); color: var(--ink-2);
}
.ticks li:first-child { border-top: 0; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 1.05rem;
  width: 0.7rem; height: 0.7rem; border-radius: 50%;
  border: 2px solid var(--accent);
}
.ticks--no li::before { border-color: var(--no); }

.defs { margin-top: 1.4rem; }
.defs dt { font-weight: 700; margin-top: 1.2rem; }
.defs dt:first-of-type { margin-top: 0; }
.defs dd { margin: 0.2rem 0 0; color: var(--ink-2); }
.defs--yes dt { color: var(--yes); }
.defs--ask dt { color: var(--ask); }
.defs--no dt { color: var(--no); }

.zone-head { display: flex; align-items: flex-start; gap: 0.9rem; }
.zone-head__text { min-width: 0; }
.zone-head__colour {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.13em;
  text-transform: uppercase; color: currentColor; margin: 0.15rem 0 0.25rem;
}
.zone-head .light__lamp { margin-bottom: 0.15rem; }
.zone-head--no .light__lamp i:nth-child(1) { background: var(--lamp-no); }
.zone-head--ask .light__lamp i:nth-child(2) { background: var(--lamp-ask); }
.zone-head--yes .light__lamp i:nth-child(3) { background: var(--lamp-yes); }
.zone-head__ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.5rem; height: 2.5rem; border-radius: 50%; flex: none;
  border: 2px solid currentColor;
}
.zone-head--yes { color: var(--yes); }
.zone-head__ico { background: var(--card); }
.zone-head--ask { color: var(--ask); }
.zone-head--no { color: var(--no); }
.zone-head .h2 { color: var(--ink); }

/* ----------------------------------------------------------- static test */

.qgrid, .agrid { display: grid; gap: 0.9rem; }
@media (min-width: 50rem) {
  .qgrid { grid-template-columns: repeat(2, 1fr); }
  .agrid { grid-template-columns: repeat(3, 1fr); }
}

.qcard, .acard {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 1.2rem 1.15rem;
}
.qcard__n, .acard__v {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-3);
}
.qcard__q { font-family: var(--display); font-size: 1.2rem; margin-top: 0.4rem; }
.qcard__s { color: var(--ink-3); font-size: 0.92rem; margin-top: 0.4rem; }
.qcard__opts { list-style: none; margin-top: 1rem; }
.qcard__opts li {
  display: flex; gap: 0.6rem; align-items: flex-start;
  padding: 0.6rem 0; border-top: 1px solid var(--line); font-size: 0.95rem;
}
.qcard__opts .icon { color: var(--ink-3); margin-top: 0.2rem; }
.qcard__dest { display: block; color: var(--ink-3); font-size: 0.86rem; }

.acard { border-top: 4px solid var(--line-2); }
.acard--no { border-top-color: var(--no); }
.acard--ask { border-top-color: var(--ask); }
.acard--yes { border-top-color: var(--yes); }
.acard__v { font-family: var(--display); font-size: 1.5rem; text-transform: none; letter-spacing: -0.01em; }
.acard--no .acard__v { color: var(--no); }
.acard--ask .acard__v { color: var(--ask); }
.acard--yes .acard__v { color: var(--yes); }
.acard__h { font-size: 1.02rem; font-weight: 700; margin: 0.3rem 0 0.7rem; }
.acard p { font-size: 0.94rem; color: var(--ink-2); }
.acard__l {
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--ink-3); margin: 1.1rem 0 0.5rem;
}
.acard .ticks li { font-size: 0.92rem; }
.acard__more { margin-top: 1rem; font-size: 0.88rem; color: var(--ink-3); }

/* -------------------------------------------------------------------- why */

.why { display: grid; gap: 1.5rem; margin-top: 1.8rem; }
@media (min-width: 52rem) { .why { grid-template-columns: repeat(3, 1fr); } }
.why__ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.75rem; height: 2.75rem; border-radius: var(--r);
  background: var(--card); border: 1px solid var(--line); color: var(--accent);
  margin-bottom: 0.9rem;
}
.why__item h3 { font-family: var(--display); font-size: 1.2rem; margin-bottom: 0.5rem; }
.why__item p { color: var(--ink-2); font-size: 0.96rem; }

.rule-note {
  margin-top: 2rem; padding: 1.1rem 1.25rem; max-width: 46rem;
  background: var(--card); border: 1px solid var(--line);
  border-left: 4px solid var(--accent); border-radius: var(--r);
  color: var(--ink-2);
}

/* ------------------------------------------------------------------- faq */

.faq { margin-top: 1.6rem; max-width: 46rem; }
.fold { border-bottom: 1px solid var(--line); }
.fold summary {
  cursor: pointer; list-style: none; padding: 1rem 2rem 1rem 0;
  position: relative; min-height: 2.75rem;
}
.fold summary::-webkit-details-marker { display: none; }
.fold summary h3 { font-size: 1.05rem; font-weight: 700; display: inline; }
.fold summary::after {
  content: "+"; position: absolute; right: 0.25rem; top: 0.85rem;
  font-size: 1.4rem; color: var(--ink-3); line-height: 1;
}
.fold[open] summary::after { content: "\2212"; }
.fold summary:hover h3 { color: var(--accent); }
.fold__b { padding: 0 0 1.2rem; color: var(--ink-2); }

/* ---------------------------------------------------------------- mistakes */

.misses { display: grid; gap: 0.9rem; }
@media (min-width: 46rem) { .misses { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 72rem) { .misses { grid-template-columns: repeat(3, 1fr); } }

.miss {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 1.15rem;
}
.miss__top { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.miss__n { font-family: var(--mono); font-size: 1.1rem; color: var(--line-2); }
.miss h3 { font-family: var(--display); font-size: 1.12rem; margin: 0.5rem 0 0.6rem; }
.miss__looks { font-size: 0.93rem; color: var(--ink-2); }
.miss__how { font-size: 0.93rem; color: var(--ink); margin-bottom: 0; }
.miss__how b { color: var(--accent); }

.tag {
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.1em;
  text-transform: uppercase; padding: 0.2rem 0.45rem; border-radius: 0.25rem;
  border: 1px solid currentColor;
}
.tag--irreversible { color: var(--no); }
.tag--recoverable { color: var(--ask); }

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

.cards { display: grid; gap: 0.8rem; margin-top: 1.6rem; }
@media (min-width: 46rem) { .cards { grid-template-columns: repeat(3, 1fr); } }

.card {
  display: grid; gap: 0.35rem; padding: 1.2rem 1.15rem;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); text-decoration: none; color: var(--ink);
  transition: border-color 120ms linear, transform 120ms ease;
}
.card:hover { border-color: var(--ink); transform: translateY(-2px); }
.card__ico { color: var(--accent); }
.card__t { font-family: var(--display); font-size: 1.1rem; }
.card__d { color: var(--ink-3); font-size: 0.9rem; }
.card__go { color: var(--accent); margin-top: 0.3rem; }

/* ------------------------------------------------------------------ forms */

.pre {
  font-family: var(--mono); font-size: 0.84rem; line-height: 1.6;
  white-space: pre-wrap; word-break: break-word;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 1.1rem; margin: 1.2rem 0 0;
  max-width: 46rem; color: var(--ink);
}

.setup { max-width: 40rem; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 700; font-size: 0.94rem; margin-bottom: 0.35rem; }
input[type="text"], textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--card); border: 2px solid var(--line);
  border-radius: var(--r); padding: 0.65rem 0.8rem; min-height: 2.75rem;
}
textarea { line-height: 1.55; resize: vertical; }
input:focus, textarea:focus { border-color: var(--ink); }
.fine { font-size: 0.86rem; color: var(--ink-3); margin-top: 0.9rem; }

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

.site-foot {
  margin-top: 3.5rem; padding: clamp(2.25rem, 7vw, 3rem) 0 2rem;
  background: #12191f; color: #f5f7f6;
}
.site-foot a { color: #f5f7f6; text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }
.site-foot .logo { color: #f5f7f6; }
.site-foot .logo:hover .logo__word { color: #ffffff; }
.site-foot .logo__tag { color: rgba(255, 255, 255, .7); }


.foot__grid { display: grid; gap: 2.25rem; }
@media (min-width: 46rem) { .foot__grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 68rem) { .foot__grid { grid-template-columns: 1.6fr repeat(3, 1fr); } }

.foot__blurb { color: rgba(255, 255, 255, .78); font-size: 0.92rem; margin-top: 1rem; max-width: 32ch; }
.foot__blurb--fine { color: rgba(255, 255, 255, .62); font-size: 0.85rem; }
.foot__h {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.13em;
  text-transform: uppercase; color: rgba(255, 255, 255, .68); margin-bottom: 0.7rem;
}
.foot__col ul { list-style: none; }
.foot__col a { display: block; padding: 0.5rem 0; min-height: 2.5rem; font-size: 0.94rem; }

.foot__base {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; align-items: center;
  margin-top: 2.5rem; padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, .14);
  color: rgba(255, 255, 255, .72); font-size: 0.86rem;
}
.foot__base p { margin: 0; }
.foot__base a { color: #ffffff; }
.foot__top { margin-left: auto; display: inline-flex; align-items: center; gap: 0.4rem; min-height: 2.75rem; }

/* --------------------------------------------------------------- floaters */

.to-top {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 30;
  width: 2.9rem; height: 2.9rem; display: inline-flex;
  align-items: center; justify-content: center; cursor: pointer;
  background: var(--ink); color: var(--paper);
  border: 0; border-radius: 50%; box-shadow: var(--shadow);
  transition: opacity 180ms linear, transform 180ms ease;
}
.to-top[hidden] { display: none; }
.to-top:hover { background: var(--accent); color: #fff; transform: translateY(-2px); }
@supports (padding: env(safe-area-inset-bottom)) {
  .to-top { bottom: calc(1rem + env(safe-area-inset-bottom)); }
}

.toast {
  position: fixed; left: 50%; bottom: 1.2rem; transform: translateX(-50%);
  z-index: 50; background: var(--ink); color: var(--paper);
  padding: 0.6rem 1.1rem; border-radius: var(--r); font-size: 0.92rem;
  box-shadow: var(--shadow); max-width: calc(100vw - 2rem);
}
.toast[hidden] { display: none; }

/* ------------------------------------------------------------------ print */

@media print {
  .site-head, .site-foot, .to-top, .toast, .skip, .crumbs, .toc,
  .hero__actions, .row, .tool { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .band { padding: 0.75rem 0; break-inside: avoid; }
  .band--alt { background: #fff; }
  .qcard, .acard, .miss, .card { border: 1px solid #999; break-inside: avoid; }
  .fold__b { display: block !important; }
  .fold summary::after { content: ""; }
  a[href^="/"]::after { content: " (" attr(href) ")"; font-size: 0.85em; color: #555; }
}

/* ----------------------------------------------------------- guide pieces */

.steps { list-style: none; counter-reset: step; margin-top: 1.5rem; max-width: 46rem; }
.steps li {
  counter-increment: step; position: relative;
  padding: 0.3rem 0 1.3rem 3.1rem;
}
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 2.2rem; height: 2.2rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 0.82rem;
  background: var(--card); border: 2px solid var(--accent); color: var(--accent);
}
.steps li:not(:last-child)::after {
  content: ""; position: absolute; left: 1.1rem; top: 2.4rem; bottom: 0.35rem;
  width: 2px; background: var(--line);
}
.steps b { display: block; margin-bottom: 0.15rem; }
.steps span { color: var(--ink-2); font-size: 0.97rem; }

.style-block {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 1.3rem 1.25rem; margin-top: 1rem;
  max-width: 46rem;
}
.style-block h3 { font-family: var(--display); font-size: 1.25rem; }
.style-block p { font-size: 0.97rem; color: var(--ink-2); margin-top: 0.7rem; }
.style-block__note {
  display: inline-block; margin-top: 0.5rem;
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--on-ask);
  background: var(--ask-surface); padding: 0.22rem 0.5rem; border-radius: 0.25rem;
}
.style-block__link { display: inline-flex; gap: 0.4rem; align-items: center; margin-top: 0.9rem; font-weight: 700; font-size: 0.94rem; }

.evidence { display: grid; gap: 0.9rem; margin-top: 1.6rem; }
@media (min-width: 56rem) { .evidence { grid-template-columns: repeat(2, 1fr); } }
.evidence article {
  background: var(--card); border: 1px solid var(--line);
  border-left: 4px solid var(--accent); border-radius: var(--r); padding: 1.1rem 1.2rem;
}
.evidence h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.5rem; }
.evidence p { font-size: 0.94rem; color: var(--ink-2); margin: 0; }

.callout {
  margin-top: 1.8rem; padding: 1.2rem 1.3rem; max-width: 46rem;
  background: var(--card); border: 2px solid var(--no);
  border-radius: var(--r-lg); color: var(--ink-2);
}
.callout h3 { color: var(--no); font-size: 1.05rem; font-weight: 700; margin-bottom: 0.5rem; }

.jump {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--ask-surface); color: var(--on-ask);
  padding: 0.7rem 1.1rem; border-radius: var(--r); font-weight: 700;
  text-decoration: none; margin-top: 1.2rem; min-height: 2.75rem;
}
.jump:hover { text-decoration: underline; }

.acard__lamp { display: flex; gap: 0.28rem; margin-bottom: 0.55rem; }
.acard__lamp i { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--line-2); }
.acard--no .acard__lamp i:nth-child(1) { background: var(--lamp-no); }
.acard--ask .acard__lamp i:nth-child(2) { background: var(--lamp-ask); }
.acard--yes .acard__lamp i:nth-child(3) { background: var(--lamp-yes); }

.miss { border-top: 4px solid var(--line-2); }
.miss:has(.tag--irreversible) { border-top-color: var(--lamp-no); }
.miss:has(.tag--recoverable) { border-top-color: var(--lamp-ask); }

/* -------------------------------------------------------- course banner */

.coursebar { background: var(--ask-surface); color: var(--on-ask); }
.coursebar[hidden] { display: none; }
.coursebar__in {
  display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; align-items: center;
  padding: 0.6rem 0; font-size: 0.9rem;
}
.coursebar b { font-weight: 700; }
.coursebar a { color: var(--on-ask); font-weight: 700; }
.coursebar button {
  margin-left: auto; font: inherit; font-size: 0.84rem; cursor: pointer;
  background: transparent; color: var(--on-ask);
  border: 1px solid currentColor; border-radius: var(--r);
  padding: 0.3rem 0.7rem; min-height: 2.25rem;
}
.coursebar button:hover { background: rgba(0, 0, 0, .08); }

/* ------------------------------------------------------- tool navigation */

.t-top {
  display: flex; align-items: center; gap: 0.75rem;
  margin-bottom: 1rem; flex-wrap: wrap;
}
.t-dots { display: flex; gap: 0.3rem; margin-left: auto; }
.t-dots i {
  width: 0.55rem; height: 0.55rem; border-radius: 50%;
  background: var(--line-2); display: block;
}
.t-dots i.done { background: var(--accent); }
.t-dots i.now { background: var(--accent); box-shadow: 0 0 0 3px var(--bg-accent, rgba(0,0,0,.06)); }

.setup__preview { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.9rem; }
