/* Leporello — "il catalogo".
   Direction: a well-kept paper register. Didone headlines, quiet sans body,
   monospace for what a ledger records (numbers, dates, states).
   The only saturated colours on the page are the three lights. */

@font-face { font-family: "Bodoni Moda"; src: url("../fonts/bodoni-moda.0492c8615361.woff2") format("woff2"); font-weight: 400 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Bodoni Moda"; src: url("../fonts/bodoni-moda-italic.3d6740166d53.woff2") format("woff2"); font-weight: 400 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("../fonts/hanken-grotesk.c501f578bf3f.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/plex-mono-400.79936b18df9f.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/plex-mono-500.b1c8a895f5fd.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

:root {
  --paper: #f5f0e6;
  --paper-deep: #ebe4d4;
  --sheet: #fbf8f1;
  --ink: #16202b;
  --ink-soft: #4d5661;
  --rule: #cfc5b1;
  --rule-strong: #16202b;
  --accent: #1d4263;
  --ok: #2f7a52;
  --warn: #c88a14;
  --alert: #b5402c;

  --display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --gutter: clamp(1.25rem, 4vw, 3rem);
  --measure: 74rem;
  --section: clamp(4.5rem, 10vw, 8.5rem);
}

/* The personal landing page speaks more softly: warmer paper, a green ink. */
[data-tone="personal"] {
  --paper: #f6f1ea;
  --paper-deep: #ece5da;
  --accent: #3d5f51;
}

*, *::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(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-weight: 500; }
ul, ol, dl, dd { margin: 0; padding: 0; }
li { list-style: none; }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: 0.75rem 1rem; z-index: 10; }
.skip:focus { left: 0; }
.wrap { width: min(100% - 2 * var(--gutter), var(--measure)); margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* --- Type ------------------------------------------------------------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 1.25rem;
}
.display {
  font-family: var(--display);
  font-size: clamp(2.6rem, 6.4vw, 5.25rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  font-weight: 500;
  text-wrap: balance;
}
.display em, .title em { font-style: italic; font-weight: 400; color: var(--accent); }
.title {
  font-family: var(--display);
  font-size: clamp(2rem, 4.2vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
  max-width: 18ch;
}
.title--wide { max-width: 24ch; }
.subtitle { font-family: var(--display); font-size: clamp(1.35rem, 2.2vw, 1.75rem); line-height: 1.2; }
.lead { font-size: clamp(1.125rem, 1.6vw, 1.3125rem); line-height: 1.55; color: var(--ink-soft); max-width: 36em; }
.note { font-size: 0.875rem; color: var(--ink-soft); }
.mono { font-family: var(--mono); font-size: 0.8125rem; }

/* --- Header ----------------------------------------------------------- */
.masthead { border-bottom: 1px solid var(--rule); }
.masthead__in { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; padding-block: 1.25rem; }
.wordmark { font-family: var(--display); font-style: italic; font-size: 1.75rem; letter-spacing: -0.01em; text-decoration: none; line-height: 1; }
.nav { display: flex; gap: clamp(1rem, 3vw, 2.25rem); flex-wrap: wrap; font-size: 0.9375rem; }
.nav a { text-decoration: none; padding-block: 0.4rem; border-bottom: 1px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--ink); }

/* --- Buttons ---------------------------------------------------------- */
.actions { display: flex; flex-wrap: wrap; gap: 0.875rem 1.5rem; align-items: center; margin-top: 2.25rem; }
.btn {
  display: inline-flex; align-items: center; gap: 0.75rem;
  min-height: 3.25rem; padding: 0.875rem 1.5rem;
  background: var(--ink); color: var(--paper);
  border: 1px solid var(--ink); border-radius: 2px;
  font: 500 1rem/1.2 var(--body); text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}
.btn::after { content: "→"; font-family: var(--mono); transition: transform 0.2s; }
.btn:hover { background: var(--accent); border-color: var(--accent); }
.btn:hover::after { transform: translateX(4px); }
.btn--quiet { background: transparent; color: var(--ink); }
.btn--quiet:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.link { font-weight: 500; }

/* --- Sections --------------------------------------------------------- */
.section { padding-block: var(--section); }
.section--ruled { border-top: 1px solid var(--rule); }
.section--deep { background: var(--paper-deep); }
.section--ink { background: var(--ink); color: var(--paper); --ink-soft: #b9c0c8; --rule: #36414d; --accent: #e3d9c3; }
.section__head { display: grid; gap: 1.25rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
@media (min-width: 60rem) {
  .section__head--split { grid-template-columns: 1fr 1fr; align-items: end; gap: 3rem; }
}

/* --- Hero ------------------------------------------------------------- */
.hero { padding-block: clamp(3rem, 7vw, 6rem) var(--section); }
.hero__grid { display: grid; gap: clamp(2.5rem, 5vw, 4rem); align-items: center; }
@media (min-width: 64rem) { .hero__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); } }
.hero .lead { margin-top: 1.75rem; }

/* --- The catalogue (ledger) ------------------------------------------ */
.ledger { background: var(--sheet); border: 1px solid var(--rule); border-top: 3px double var(--rule-strong); box-shadow: 0 1px 0 var(--rule), 0 24px 48px -32px rgb(22 32 43 / 0.35); }
.ledger__head { margin: 0; display: flex; justify-content: space-between; gap: 1rem; padding: 0.875rem 1.25rem; border-bottom: 1px solid var(--rule); font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); }
.ledger__row { display: grid; grid-template-columns: 2.25rem 1fr auto; gap: 0.25rem 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--rule); align-items: start; }
.ledger__row:last-of-type { border-bottom: 0; }
.ledger__n { font-family: var(--mono); font-size: 0.75rem; color: var(--ink-soft); padding-top: 0.3rem; }
.ledger__what { font-weight: 600; font-size: 1rem; line-height: 1.3; }
.ledger__who { color: var(--ink-soft); font-size: 0.875rem; line-height: 1.4; margin-top: 0.15rem; }
.ledger__when { grid-column: 2 / -1; font-family: var(--mono); font-size: 0.75rem; color: var(--ink-soft); margin-top: 0.35rem; }
.ledger__foot { margin: 0; padding: 0.75rem 1.25rem; border-top: 1px solid var(--rule); background: var(--paper); }

.light { display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; padding-top: 0.3rem; }
.light::before { content: ""; width: 0.625rem; height: 0.625rem; border-radius: 50%; background: var(--dot, var(--rule)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--dot, var(--rule)) 22%, transparent); flex: none; }
.light--ok { --dot: var(--ok); }
.light--warn { --dot: var(--warn); }
.light--alert { --dot: var(--alert); }

/* --- Three questions --------------------------------------------------- */
.questions { display: grid; gap: 0; border-top: 1px solid var(--rule-strong); }
.question { display: grid; grid-template-columns: 3.5rem 1fr; gap: 0.5rem 1.5rem; padding-block: 2rem; border-bottom: 1px solid var(--rule); }
.question__n { font-family: var(--mono); font-size: 0.8125rem; color: var(--ink-soft); padding-top: 0.6rem; }
.question p { color: var(--ink-soft); margin: 0.6rem 0 0; max-width: 40em; }
@media (min-width: 60rem) {
  .question { grid-template-columns: 5rem minmax(0, 1fr) minmax(0, 1fr); align-items: baseline; }
  .question p { margin: 0; }
}

/* --- Two doors --------------------------------------------------------- */
.doors { display: grid; gap: 1.5rem; }
@media (min-width: 56rem) { .doors { grid-template-columns: 1fr 1fr; } }
.door { display: flex; flex-direction: column; background: var(--sheet); border: 1px solid var(--rule); padding: clamp(1.75rem, 4vw, 3rem); text-decoration: none; transition: border-color 0.25s, transform 0.25s; }
.door:hover { border-color: var(--ink); transform: translateY(-3px); }
.door[data-tone="personal"] { background: #f9f5ee; }
.door .subtitle { font-size: clamp(1.6rem, 3vw, 2.25rem); margin-bottom: 1rem; }
.door p { color: var(--ink-soft); }
.door__go { margin-top: auto; padding-top: 1.5rem; font-weight: 600; }
.door__go::after { content: " →"; font-family: var(--mono); }

/* --- Steps ------------------------------------------------------------- */
.steps { display: grid; gap: 2rem; counter-reset: step; }
@media (min-width: 56rem) { .steps { grid-template-columns: repeat(3, 1fr); gap: 3rem; } }
.step { border-top: 1px solid var(--rule-strong); padding-top: 1.25rem; counter-increment: step; }
.step::before { content: "Passo " counter(step); display: block; font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 1rem; }
.step h3 { font-family: var(--display); font-size: 1.5rem; line-height: 1.2; margin-bottom: 0.75rem; }
.step p { color: var(--ink-soft); margin: 0; }

/* --- Generic lists ------------------------------------------------------ */
.cases { display: grid; gap: 0; border-top: 1px solid var(--rule-strong); }
@media (min-width: 56rem) { .cases { grid-template-columns: 1fr 1fr; column-gap: 3rem; } }
.case { padding-block: 1.5rem; border-bottom: 1px solid var(--rule); }
.case h3 { font-size: 1.125rem; font-weight: 600; font-family: var(--body); margin-bottom: 0.4rem; }
.case p { color: var(--ink-soft); margin: 0; }

.columns { display: grid; gap: 2.5rem; }
@media (min-width: 56rem) { .columns { grid-template-columns: 1fr 1fr; gap: 4rem; } }
.columns--3 { gap: 2rem; }
@media (min-width: 56rem) { .columns--3 { grid-template-columns: repeat(3, 1fr); gap: 3rem; } }

.ticks li { position: relative; padding: 0.7rem 0 0.7rem 1.75rem; border-bottom: 1px solid var(--rule); }
.ticks li::before { content: ""; position: absolute; left: 0.1rem; top: 1.25rem; width: 0.7rem; height: 0.35rem; border-left: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); transform: rotate(-45deg); }
.ticks--no li::before { width: 0.75rem; height: 0; border-left: 0; transform: none; top: 1.45rem; }
.ticks--no li { color: var(--ink-soft); }

/* --- Plans -------------------------------------------------------------- */
.plans { display: grid; gap: 1.5rem; }
@media (min-width: 56rem) { .plans--two { grid-template-columns: 1fr 1fr; } }
.plan { background: var(--sheet); border: 1px solid var(--rule); border-top: 3px double var(--rule-strong); padding: clamp(1.75rem, 4vw, 2.75rem); display: flex; flex-direction: column; }
.plan__price { display: flex; align-items: baseline; gap: 0.6rem; margin: 1.25rem 0 0.25rem; flex-wrap: wrap; }
.plan__amount { font-family: var(--display); font-size: clamp(3rem, 6vw, 4.5rem); line-height: 1; letter-spacing: -0.02em; }
.plan__per { font-family: var(--mono); font-size: 0.8125rem; color: var(--ink-soft); }
.plan .ticks { margin: 1.5rem 0 2rem; }
.plan .btn { align-self: flex-start; margin-top: auto; }
.extra { display: grid; gap: 1.5rem 3rem; align-items: end; margin-top: 1.5rem; padding: clamp(1.75rem, 4vw, 2.75rem); background: var(--sheet); border: 1px solid var(--rule); border-top: 3px double var(--rule-strong); }
@media (min-width: 56rem) { .extra { grid-template-columns: 1fr auto; } }
.extra .subtitle { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: 0.75rem; }
.extra p { margin: 0; color: var(--ink-soft); max-width: 38em; }
.extra .eyebrow { margin-bottom: 1rem; }
.extra__price { display: flex; flex-direction: column; gap: 0.4rem; }
.extra__price .plan__amount { color: var(--ink); font-size: clamp(2.5rem, 5vw, 3.5rem); }
@media (min-width: 56rem) { .extra__price { align-items: flex-end; text-align: right; } }

/* --- Preview panels (audit, self-assessment) ---------------------------- */
.preview { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (min-width: 62rem) { .preview { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); } }
.soon { display: inline-block; font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.12em; text-transform: uppercase; border: 1px solid currentColor; padding: 0.35rem 0.6rem; margin-top: 1.5rem; }

.card { background: var(--sheet); color: var(--ink); border: 1px solid var(--rule); padding: clamp(1.5rem, 4vw, 2.5rem); --ink-soft: #4d5661; --rule: #cfc5b1; --accent: #3d5f51; }
.progress { height: 3px; background: var(--rule); margin-bottom: 2rem; }
.progress span { display: block; height: 100%; width: 25%; background: var(--ink); }
.answers { display: grid; gap: 0.625rem; margin-top: 1.75rem; }
.answer { border: 1px solid var(--rule); padding: 0.875rem 1.125rem; font-weight: 500; background: var(--paper); }
.answer--dunno { border-style: dashed; color: var(--ink-soft); font-weight: 400; }

/* --- FAQ ----------------------------------------------------------------- */
.faq { border-top: 1px solid var(--rule-strong); max-width: 52rem; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1.5rem; padding-block: 1.25rem; font-weight: 600; font-size: 1.125rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); font-weight: 400; transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-soft); max-width: 44em; padding-bottom: 1.25rem; margin: 0; }

/* --- Footer --------------------------------------------------------------- */
.colophon { border-top: 3px double var(--rule-strong); padding-block: 3rem; font-size: 0.9375rem; }
.colophon__in { display: grid; gap: 2rem; }
@media (min-width: 56rem) { .colophon__in { grid-template-columns: 1.4fr 1fr 1fr; } }
.colophon p { color: var(--ink-soft); margin: 0.5rem 0 0; }
.colophon li { padding-block: 0.2rem; }
.colophon h2 { font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 0.75rem; font-weight: 500; }
.langswitch { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.1em; }
.colophon .langswitch { margin-top: 1.25rem; }
.langswitch [aria-current] { color: var(--ink); }

/* --- Motion: measured, and only when welcome ------------------------------ */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }

  /* The catalogue writes itself line by line, then the lights come on.
     Pure CSS on purpose: it sits above the fold and must never wait for a script. */
  [data-compose] .ledger__row { animation: row-in 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  [data-compose] .light::before { animation: light-on 0.5s cubic-bezier(0.3, 1.6, 0.5, 1) both; }
  [data-compose] .ledger__row:nth-of-type(1) { animation-delay: 0.15s; }
  [data-compose] .ledger__row:nth-of-type(2) { animation-delay: 0.30s; }
  [data-compose] .ledger__row:nth-of-type(3) { animation-delay: 0.45s; }
  [data-compose] .ledger__row:nth-of-type(4) { animation-delay: 0.60s; }
  [data-compose] .ledger__row:nth-of-type(5) { animation-delay: 0.75s; }
  [data-compose] .ledger__row:nth-of-type(6) { animation-delay: 0.90s; }
  [data-compose] .ledger__row:nth-of-type(1) .light::before { animation-delay: 1.2s; }
  [data-compose] .ledger__row:nth-of-type(2) .light::before { animation-delay: 1.4s; }
  [data-compose] .ledger__row:nth-of-type(3) .light::before { animation-delay: 1.6s; }
  [data-compose] .ledger__row:nth-of-type(4) .light::before { animation-delay: 1.8s; }
  [data-compose] .ledger__row:nth-of-type(5) .light::before { animation-delay: 2.0s; }
  [data-compose] .ledger__row:nth-of-type(6) .light::before { animation-delay: 2.2s; }
}
@keyframes row-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes light-on { from { transform: scale(0); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* The Didone euro reads like a "C": set the currency sign in the body face. */
.cur { font-family: var(--body); font-weight: 300; font-size: 0.72em; }

/* Bodoni Moda thins its hairlines as the size grows (optical size axis).
   Pin it to a sturdier cut so the thin strokes stay visible on every screen. */
.display, .title, .subtitle, .wordmark, .plan__amount, .step h3 {
  font-optical-sizing: none;
  font-variation-settings: "opsz" 11;
}
.display, .title { font-weight: 560; }
.subtitle, .step h3 { font-weight: 540; font-variation-settings: "opsz" 8; }
/* The italic part of a heading keeps the same sturdiness as the rest. */
.display em, .title em { font-weight: 540; }
.wordmark { font-weight: 500; }

/* --- The quick test ------------------------------------------------------- */
.quiz { min-height: 70vh; }
.quiz__in { max-width: 46rem; }
.quiz__q { margin-bottom: 0.5rem; }
.quiz__back { margin-top: 2rem; }
.progress--1of4 span { width: 25%; }
.progress--2of4 span { width: 50%; }
.progress--3of4 span { width: 75%; }
.progress--4of4 span { width: 100%; }
.progress span { transition: width 0.4s; }
a.answer { display: block; text-decoration: none; background: var(--sheet); min-height: 3.5rem; padding: 1rem 1.25rem; font-size: 1.0625rem; transition: border-color 0.2s, background-color 0.2s, transform 0.2s; }
a.answer:hover, a.answer:focus-visible { border-color: var(--ink); background: #fff; transform: translateX(4px); }
.score { display: flex; align-items: baseline; gap: 0.75rem; margin-bottom: 1rem; }
.score__n { font-family: var(--display); font-size: clamp(5rem, 14vw, 9rem); line-height: 0.9; font-weight: 540; letter-spacing: -0.03em; font-optical-sizing: none; font-variation-settings: "opsz" 11; }
.score__of { font-family: var(--mono); font-size: 0.875rem; color: var(--ink-soft); letter-spacing: 0.08em; text-transform: uppercase; }
.light--big { font-size: 0.8125rem; padding: 0 0 1.25rem; }
.light--big::before { width: 0.875rem; height: 0.875rem; }
.ledger .light { white-space: normal; text-align: right; max-width: 11rem; justify-content: flex-end; }
.ledger__tip { font-family: var(--body); font-size: 0.875rem; color: var(--ink); border-left: 2px solid var(--rule-strong); padding-left: 0.75rem; margin-top: 0.75rem; }

/* The band on the home page that invites to the test. */
.testband { display: grid; gap: 2rem 4rem; align-items: center; }
@media (min-width: 60rem) { .testband { grid-template-columns: 1.2fr 0.8fr; } }
.testband .actions { margin-top: 0; flex-direction: column; align-items: stretch; }
.testband .btn { justify-content: space-between; background: var(--paper); color: var(--ink); border-color: var(--paper); }
.testband .btn:hover { background: #fff; border-color: #fff; color: var(--ink); }
.ledger .light { align-items: flex-start; line-height: 1.5; }
.ledger .light::before { margin-top: 0.22rem; }

/* --- Forms ------------------------------------------------------------------ */
.form { display: grid; gap: 1.25rem; margin-top: 2.25rem; max-width: 30rem; }
.form__row { display: grid; gap: 0.4rem; }
.form label { font-weight: 600; font-size: 0.9375rem; }
.form input[type="text"], .form input[type="email"] { width: 100%; min-height: 3.25rem; padding: 0.75rem 1rem; font: inherit; color: var(--ink); background: var(--sheet); border: 1px solid var(--ink-soft); border-radius: 2px; }
.form input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-color: var(--ink); }
.form__check { display: grid; grid-template-columns: auto 1fr; gap: 0.75rem; align-items: start; }
.form__check input { width: 1.25rem; height: 1.25rem; margin-top: 0.2rem; accent-color: var(--ink); }
.form__check label { font-weight: 400; }
.form__error, .alert { color: var(--alert); font-size: 0.9375rem; margin: 0; }
.alert { border-left: 2px solid var(--alert); padding-left: 0.75rem; margin-top: 1.5rem; font-weight: 500; }
.form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form .btn { justify-self: start; cursor: pointer; }
.form .note { margin: 0; }

/* --- Long-form text (privacy, cookie) ---------------------------------------- */
.prose { max-width: 46rem; }
.prose h2 { font-family: var(--display); font-optical-sizing: none; font-variation-settings: "opsz" 8; font-weight: 540; font-size: 1.75rem; line-height: 1.2; margin: 3rem 0 1rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); }
.prose h3 { font-size: 1.0625rem; font-weight: 600; margin: 1.75rem 0 0.4rem; }
.prose .lead { margin: 1.5rem 0 0; }
.prose ul { margin: 0 0 1em; }
.prose li { position: relative; padding: 0.3rem 0 0.3rem 1.5rem; }
.prose li::before { content: "–"; position: absolute; left: 0.25rem; color: var(--ink-soft); }

/* Full legal text loaded from GetTerms: dressed with the site's own type. */
.legal-full { margin-top: 3.5rem; }
.getterms-document-embed { font-size: 0.9375rem; color: var(--ink-soft); overflow-wrap: anywhere; }
.getterms-document-embed h1 { display: none; }
.getterms-document-embed h2 { font-size: 1.3rem; margin: 2.25rem 0 0.75rem; padding-top: 1.1rem; }
.getterms-document-embed h3,
.getterms-document-embed h4 { font-size: 1rem; font-weight: 600; margin: 1.5rem 0 0.4rem; color: var(--ink); }
.getterms-document-embed p { margin: 0 0 0.9em; }
.getterms-document-embed table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.875rem; }
.getterms-document-embed th,
.getterms-document-embed td { text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--rule); vertical-align: top; }

.extra .extra__links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin-top: 1rem; }

/* Cookie note: informative only, nothing to accept. */
.cookie-note { position: fixed; z-index: 50; left: 1rem; right: 1rem; bottom: 1rem; margin: 0 auto; max-width: 40rem; display: flex; align-items: center; gap: 1rem; padding: 0.85rem 1rem 0.85rem 1.25rem; background: var(--ink); color: var(--paper); border-radius: 0.5rem; box-shadow: 0 0.75rem 2rem rgba(22, 32, 43, 0.28); font-size: 0.9375rem; }
.cookie-note[hidden] { display: none; }
.cookie-note p { margin: 0; flex: 1; }
.cookie-note a { color: inherit; text-decoration: underline; text-underline-offset: 0.2em; }
.cookie-note .btn--small { padding: 0.5rem 0.9rem; font-size: 0.875rem; background: var(--paper); color: var(--ink); border-color: var(--paper); white-space: nowrap; }
@media (max-width: 30rem) { .cookie-note { flex-direction: column; align-items: flex-start; } }

/* ==========================================================================
   Scroll-driven motion. Active only with the `fx` class, which the script sets
   when JavaScript runs and the visitor has not asked for reduced motion.
   ========================================================================== */
[data-scroll] { --p: 0; }

/* Floating menu and reading progress */
.masthead { position: sticky; top: 0; z-index: 30; background: var(--paper); transition: background-color 0.3s, border-color 0.3s; }
.masthead__in { transition: margin 0.35s, padding 0.35s, background-color 0.35s, box-shadow 0.35s, border-color 0.35s, max-width 0.35s; border: 1px solid transparent; }
.is-scrolled .masthead { background: transparent; border-bottom-color: transparent; pointer-events: none; }
.is-scrolled .masthead__in { pointer-events: auto; margin-top: 0.75rem; padding: 0.7rem 1.25rem; max-width: 50rem; align-items: center; background: color-mix(in srgb, var(--sheet) 90%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-color: var(--rule); box-shadow: 0 14px 34px -22px rgb(22 32 43 / 0.5); }
.is-scrolled .wordmark { font-size: 1.35rem; }
.is-scrolled .nav { font-size: 0.875rem; gap: 1rem 1.5rem; }
.progress-line { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 40; background: var(--ink); transform: scaleX(var(--page, 0)); transform-origin: left; }

/* Headings, word by word */
.fx .split .w { display: inline-block; overflow: hidden; vertical-align: bottom; padding: 0 0.14em 0.14em 0.02em; margin: 0 -0.14em -0.14em -0.02em; }
.fx .split .w > span { display: inline-block; transform: translateY(110%); transition: transform 0.85s cubic-bezier(0.2, 0.7, 0.2, 1); transition-delay: calc(var(--i) * 40ms); }
.fx .split.is-in .w > span { transform: none; }

/* Reveal variants */
.fx [data-reveal="left"] { transform: translateX(-2.5rem); }
.fx [data-reveal="right"] { transform: translateX(2.5rem); }
.fx [data-reveal="zoom"] { transform: scale(0.94); }
.fx [data-reveal].is-in { transform: none; }

/* The opening pulls back as you leave it */
.fx .hero[data-scroll] .hero__grid { transform: scale(calc(1 - 0.07 * var(--p))); opacity: calc(1 - 1.25 * var(--p)); transform-origin: 50% 0; will-change: transform, opacity; }

/* A panel that wipes in from the right while it enters */
.fx .wipe[data-scroll] { clip-path: inset(0 0 0 calc((1 - min(1, var(--p) * 1.5)) * 100%)); }
.fx .wipe[data-scroll] > .wrap { transform: translateX(calc((1 - min(1, var(--p) * 1.5)) * 6rem)); }

/* A dark section that opens like an iris while it enters */
.fx .bloom[data-scroll] { clip-path: circle(calc(min(1, var(--p) * 1.25) * 230vmax) at 50% 12%); }

/* The pinned stage: a circle grows from the centre until it fills the screen */
@media (min-height: 34rem) {
  .fx .stage { height: 230vh; }
  .fx .stage__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
  .fx .stage__panel { position: absolute; inset: 0; display: flex; align-items: center; padding-block: 5rem 2rem; clip-path: circle(calc(min(1, var(--p) * 1.45) * 76vmax) at 50% 50%); will-change: clip-path; }
  .fx .stage__panel > .wrap { transform: scale(calc(0.8 + 0.2 * min(1, var(--p) * 1.45))); will-change: transform; }
  .fx .stage__hint { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: var(--gutter); opacity: calc(1 - var(--p) * 6); }
}
.stage__hint { display: none; }
@media (min-height: 34rem) { .fx .stage__hint { display: grid; } }
.stage__hint p { font-family: var(--display); font-style: italic; font-size: clamp(1.5rem, 3vw, 2.25rem); font-optical-sizing: none; font-variation-settings: "opsz" 10; font-weight: 500; color: var(--ink-soft); margin: 0; }

/* The three questions, one at a time, with the numeral rolling (wide screens) */
@media (min-width: 60rem) and (min-height: 40rem) {
  .fx .qstage { height: 340vh; }
  .fx .qstage__sticky { position: sticky; top: 0; height: 100vh; display: flex; align-items: center; padding-top: 4rem; }
  .fx .qstage .section__head { margin-bottom: 2.5rem; }
  .fx .qstage .questions { position: relative; height: 19rem; overflow: hidden; }
  .fx .qstage .question { position: absolute; inset: 0; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); grid-template-rows: auto 1fr; column-gap: 4rem; align-items: start; border-bottom: 0; padding-block: 2rem 0; opacity: 0; transform: translateY(3rem); transition: opacity 0.55s, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
  .fx .qstage .question__n { grid-row: 1 / span 2; font-family: var(--display); font-optical-sizing: none; font-variation-settings: "opsz" 11; font-weight: 540; font-size: clamp(9rem, 19vw, 16rem); line-height: 0.82; letter-spacing: -0.04em; color: var(--ink); padding: 0; }
  .fx .qstage .question .subtitle { font-size: clamp(1.75rem, 3vw, 2.5rem); }
  .fx .qstage .question p { margin-top: 1rem; font-size: 1.125rem; }
  .fx .qstage[data-step="1"] .question:nth-child(1),
  .fx .qstage[data-step="2"] .question:nth-child(2),
  .fx .qstage[data-step="3"] .question:nth-child(3) { opacity: 1; transform: none; }
  .fx .qstage[data-step="2"] .question:nth-child(1),
  .fx .qstage[data-step="3"] .question:nth-child(1),
  .fx .qstage[data-step="3"] .question:nth-child(2) { transform: translateY(-3rem); }
  .fx .qstage .qticks { display: flex; gap: 0.5rem; margin-top: 2rem; }
}
.qticks { display: none; }
.qticks span { width: 2.5rem; height: 2px; background: var(--rule); transition: background-color 0.4s; }
.qstage[data-step="1"] .qticks span:nth-child(1),
.qstage[data-step="2"] .qticks span:nth-child(-n + 2),
.qstage[data-step="3"] .qticks span { background: var(--ink); }
.title + .lead, .display + .lead { margin-top: 1.5rem; }
.columns + .columns { margin-top: clamp(3rem, 6vw, 4.5rem); }

/* The rolling numeral takes one of the three lights at each step. */
@media (min-width: 60rem) and (min-height: 40rem) {
  .fx .qstage .question__n { transition: color 0.6s; }
  .fx .qstage .question:nth-child(1) .question__n { color: var(--alert); }
  .fx .qstage .question:nth-child(2) .question__n { color: var(--warn); }
  .fx .qstage .question:nth-child(3) .question__n { color: var(--ok); }
  .fx .qstage[data-step="1"] .qticks span:nth-child(1) { background: var(--alert); }
  .fx .qstage[data-step="2"] .qticks span:nth-child(-n + 2) { background: var(--warn); }
  .fx .qstage[data-step="3"] .qticks span { background: var(--ok); }
}
.plan__actions { display: flex; flex-wrap: wrap; gap: 0.875rem 1.5rem; align-items: center; margin-top: auto; }
.plan__actions .btn { margin-top: 0; }
.form__check .form__error { grid-column: 2; }

/* --- Audit ------------------------------------------------------------------ */
.tally { display: flex; flex-wrap: wrap; gap: 0.25rem 1.75rem; margin-top: 1.75rem; }
.tally .light--big { padding-bottom: 0; }
.steps--stack { grid-template-columns: 1fr; gap: 1.75rem; margin-top: 1.5rem; }
.form__row .note { margin: 0; }
.ledger--working .light { color: var(--ink-soft); }
@media (prefers-reduced-motion: no-preference) {
  .ledger--working .ledger__row { animation: working 1.8s ease-in-out infinite; }
  .ledger--working .ledger__row:nth-of-type(2) { animation-delay: 0.2s; }
  .ledger--working .ledger__row:nth-of-type(3) { animation-delay: 0.4s; }
  .ledger--working .ledger__row:nth-of-type(4) { animation-delay: 0.6s; }
  .ledger--working .ledger__row:nth-of-type(5) { animation-delay: 0.8s; }
  .ledger--working .ledger__row:nth-of-type(6) { animation-delay: 1s; }
  [data-compose] .ledger__row:nth-of-type(7) { animation-delay: 1.05s; }
  [data-compose] .ledger__row:nth-of-type(8) { animation-delay: 1.2s; }
  [data-compose] .ledger__row:nth-of-type(9) { animation-delay: 1.35s; }
  [data-compose] .ledger__row:nth-of-type(7) .light::before { animation-delay: 2.4s; }
  [data-compose] .ledger__row:nth-of-type(8) .light::before { animation-delay: 2.6s; }
  [data-compose] .ledger__row:nth-of-type(9) .light::before { animation-delay: 2.8s; }
}
@keyframes working { 50% { opacity: 0.45; } }

/* --- Figures (why we do not keep passwords) --------------------------------- */
.figures { display: grid; gap: 0; border-top: 3px double var(--rule-strong); margin-bottom: 0.75rem; }
@media (min-width: 56rem) { .figures { grid-template-columns: repeat(3, 1fr); gap: 0 3rem; } }
.figures > div { padding: 1.5rem 0; border-bottom: 1px solid var(--rule); }
.figures dt { font-family: var(--display); font-optical-sizing: none; font-variation-settings: "opsz" 11; font-weight: 540; font-size: clamp(2.25rem, 4.5vw, 3.25rem); line-height: 1; letter-spacing: -0.02em; margin-bottom: 0.75rem; }
.figures dt span { font-family: var(--mono); font-size: 0.75rem; font-weight: 400; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }
.figures dd { color: var(--ink-soft); max-width: 26em; }
.figures__source { margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.nav .nav__enter { border: 1px solid var(--ink); padding: 0.4rem 0.9rem; border-radius: 2px; }
.nav .nav__enter:hover { background: var(--ink); color: var(--paper); }

/* Progress of the test: a real progress element, so no inline width is needed */
.meter { appearance: none; -webkit-appearance: none; display: block; width: 100%; height: 3px; border: 0; background: var(--rule); margin-bottom: 2rem; }
.meter::-webkit-progress-bar { background: var(--rule); }
.meter::-webkit-progress-value { background: var(--ink); transition: width 0.4s; }
.meter::-moz-progress-bar { background: var(--ink); }
