/* Financial safety web experience: Brand Editorial layer.
 * Loaded after styles.css and editorial-brand.css. Scoped to .web-body so the
 * workbook, PDF companion and packet print styles keep their own rules. */

@font-face {
  font-family: "Newsreader";
  src: url("./fonts/newsreader-latin-opsz-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("./fonts/newsreader-latin-opsz-italic.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}

.web-body {
  --fs-serif: "Newsreader", Georgia, "Times New Roman", serif;
  --fs-sans:
    ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --fs-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --fs-scale: 1;
  --fs-gutter: max(24px, calc((100% - 1200px) / 2));
  --fs-clay-text: color-mix(
    in srgb,
    var(--editorial-clay) 72%,
    var(--editorial-ink)
  );
  --fs-focus: var(--editorial-clay);
  --fs-radius: 10px;
  /* Map the generated stylesheet's tokens onto the canonical editorial palette. */
  --background: var(--editorial-paper);
  --foreground: var(--editorial-ink);
  --card: var(--editorial-surface);
  --primary: var(--editorial-forest);
  --primary-foreground: var(--editorial-cream);
  --muted-foreground: var(--editorial-muted);
  --border: var(--editorial-rule);
}

@media screen {
  /* ---------- Base type ---------- */
  .web-body {
    font-family: var(--fs-sans);
    font-size: calc(17px * var(--fs-scale));
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
    color: var(--editorial-ink);
    color-scheme: light;
    background: var(--editorial-paper);
  }
  .web-body.large-type {
    --fs-scale: 1.2;
    font-size: calc(17px * 1.2);
  }
  .web-body :is(h1, h2, h3) {
    font-family: var(--fs-serif);
    font-weight: 400;
    color: inherit;
    text-wrap: balance;
    scroll-margin-top: 24px;
  }
  .web-body h1 {
    margin: 0 0 20px;
    font-size: calc(clamp(36px, 4.4vw, 60px) * var(--fs-scale));
    line-height: 1.04;
    letter-spacing: -0.035em;
  }
  .web-body h2 {
    margin: 0 0 12px;
    font-size: calc(clamp(26px, 2.6vw, 34px) * var(--fs-scale));
    line-height: 1.12;
    letter-spacing: -0.025em;
  }
  .web-body h3 {
    margin: 0 0 8px;
    font-size: calc(21px * var(--fs-scale));
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: -0.01em;
  }
  .web-body p {
    margin: 0 0 1em;
  }
  .web-body .lead {
    font-size: calc(clamp(19px, 1.6vw, 22px) * var(--fs-scale));
    line-height: 1.5;
  }
  .web-body .eyebrow {
    margin: 0 0 16px;
    font-family: var(--fs-mono);
    font-size: calc(11.5px * var(--fs-scale));
    font-weight: 400;
    line-height: 1.5;
    color: var(--editorial-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
  }
  .web-body :is(.small, .hint, .reason) {
    font-size: calc(15px * var(--fs-scale));
    line-height: 1.55;
    color: var(--editorial-muted);
  }
  .web-body a {
    color: inherit;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
    text-underline-offset: 3px;
  }
  .web-body a:hover {
    text-decoration-thickness: 2px;
    text-decoration-color: var(--editorial-clay);
  }
  .web-body .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    white-space: nowrap;
    clip-path: inset(50%);
  }

  /* ---------- Focus ---------- */
  .web-body :focus-visible {
    outline: 2px solid var(--fs-focus);
    outline-offset: 3px;
  }
  /* Headings receive focus programmatically so screen readers announce each
   * new view. They aren't controls, so they get no visible focus treatment;
   * the next Tab still lands on the first real control after them. */
  .web-body [tabindex="-1"]:is(:focus, :focus-visible) {
    text-decoration: none;
    outline: none;
  }
  .web-body .skip-link {
    z-index: 30;
    padding: 12px 20px;
    font-weight: 600;
    color: var(--editorial-cream);
    text-decoration: none;
    background: var(--editorial-forest);
    border-radius: 999px;
  }

  /* ---------- Buttons ---------- */
  .web-body :is(button, .button) {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 10px 22px;
    font-family: var(--fs-sans);
    font-size: calc(15.5px * var(--fs-scale));
    font-weight: 600;
    line-height: 1.25;
    color: var(--editorial-ink);
    text-align: center;
    white-space: normal;
    text-decoration: none;
    background: transparent;
    border: 1px solid color-mix(in srgb, var(--editorial-ink) 38%, transparent);
    border-radius: 999px;
    transition:
      background-color 0.15s ease,
      border-color 0.15s ease,
      color 0.15s ease;
  }
  .web-body :is(button, .button):hover {
    color: var(--editorial-ink);
    background: color-mix(in srgb, var(--editorial-ink) 6%, transparent);
    border-color: var(--editorial-ink);
  }
  .web-body :is(button, .button).primary {
    min-height: 52px;
    padding-inline: 26px;
    color: var(--editorial-cream);
    background: var(--editorial-forest);
    border-color: var(--editorial-forest);
  }
  .web-body :is(button, .button).primary:hover {
    color: var(--editorial-cream);
    background: color-mix(
      in srgb,
      var(--editorial-forest) 84%,
      var(--editorial-cream)
    );
  }
  .web-body button:disabled {
    cursor: default;
    opacity: 1;
  }
  .web-body .actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 36px 0 16px;
  }
  .web-body .text-link {
    display: block;
    width: fit-content;
    margin: 10px 0;
  }

  /* ---------- Form controls ---------- */
  .web-body :is(input[type="radio"], input[type="checkbox"]) {
    flex: none;
    width: 22px;
    height: 22px;
    margin: 0;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    background: var(--editorial-paper);
    border: 1.5px solid
      color-mix(in srgb, var(--editorial-ink) 55%, transparent);
    border-radius: 50%;
  }
  .web-body input[type="checkbox"] {
    border-radius: 5px;
  }
  .web-body input[type="radio"]:checked {
    background: radial-gradient(
      circle closest-side,
      var(--editorial-forest) 0 52%,
      var(--editorial-paper) 60%
    );
    border-color: var(--editorial-forest);
  }
  .web-body input[type="checkbox"]:checked {
    background:
      var(--editorial-forest)
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23eee9dd' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
      center / 16px no-repeat;
    border-color: var(--editorial-forest);
  }
  .web-body
    :is(input[type="text"], input[type="tel"], input[type="date"], select) {
    min-height: 48px;
    padding: 10px 14px;
    margin-top: 6px;
    font-family: var(--fs-sans);
    font-size: max(16px, calc(16px * var(--fs-scale)));
    font-weight: 400;
    color: var(--editorial-ink);
    background: var(--editorial-paper);
    border: 1px solid color-mix(in srgb, var(--editorial-ink) 30%, transparent);
    border-radius: 8px;
  }
  .web-body
    :is(
      input[type="text"],
      input[type="tel"],
      input[type="date"],
      select
    ):focus-visible {
    outline-offset: 1px;
    border-color: var(--editorial-clay);
  }

  /* ---------- Disclosures: ruled rows, not boxes ---------- */
  .web-body details {
    padding: 0;
    margin: 0;
    border: 0;
    border-top: 1px solid var(--editorial-rule);
    border-bottom: 1px solid var(--editorial-rule);
    border-radius: 0;
  }
  .web-body details + details {
    border-top: 0;
  }
  .web-body details[open] {
    padding-bottom: 20px;
  }
  .web-body details > :not(summary) {
    max-width: 68ch;
  }
  .web-body summary {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    min-height: 56px;
    padding: 12px 0;
    font-size: calc(16px * var(--fs-scale));
    font-weight: 600;
    line-height: 1.35;
    cursor: pointer;
    list-style: none;
  }
  .web-body summary::-webkit-details-marker {
    display: none;
  }
  .web-body summary::after {
    flex: none;
    width: 14px;
    height: 14px;
    content: "";
    background:
      linear-gradient(currentColor, currentColor) center / 14px 1.5px no-repeat,
      linear-gradient(currentColor, currentColor) center / 1.5px 14px no-repeat;
  }
  .web-body details[open] > summary::after {
    background:
      linear-gradient(currentColor, currentColor) center / 14px 1.5px no-repeat;
  }
  .web-body summary:hover {
    text-decoration: underline;
    text-underline-offset: 5px;
  }

  /* ---------- Header ---------- */
  /* The header stays pinned so urgent help and larger text remain one tap
   * away during the flow. Scroll padding keeps scrolled-to sections and
   * focused controls clear of it. */
  html:has(> body.web-body) {
    scroll-padding-top: calc(var(--fs-header, 72px) + 12px);
  }
  html:has(> body.web-body.large-type) {
    --fs-header: 80px;
  }
  .web-body .site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    gap: 10px 24px;
    max-width: none;
    padding: 12px var(--fs-gutter);
    margin: 0;
    background: var(--editorial-paper);
    border-bottom: 1px solid var(--editorial-rule);
  }
  .web-body .wordmark {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-family: var(--fs-sans);
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    color: var(--editorial-ink);
    letter-spacing: -0.02em;
    text-decoration: none;
  }
  .web-body .wordmark span {
    margin-left: 6px;
    font-size: 21px;
    font-weight: 400;
    letter-spacing: -0.01em;
  }
  .web-body .review-nav {
    gap: 8px;
    font-size: calc(14.5px * var(--fs-scale));
  }
  .web-body .help-link,
  .web-body .review-nav .inline-choice {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    min-height: 44px;
    padding: 0 16px;
    margin: 0;
    font-weight: 600;
    color: var(--editorial-ink);
    text-decoration: none;
    cursor: pointer;
    border: 1px solid var(--editorial-rule);
    border-radius: 999px;
  }
  .web-body .help-link::before {
    width: 8px;
    height: 8px;
    content: "";
    background: var(--editorial-clay);
    border-radius: 50%;
  }
  .web-body .help-link:hover,
  .web-body .review-nav .inline-choice:hover {
    border-color: var(--editorial-ink);
  }
  .web-body .review-nav .inline-choice:has(input:checked) {
    background: color-mix(in srgb, var(--editorial-forest) 8%, transparent);
    border-color: var(--editorial-forest);
  }
  .web-body .review-nav input[type="checkbox"] {
    width: 18px;
    height: 18px;
  }
  .web-body .review-nav input[type="checkbox"]:checked {
    background-size: 13px;
  }

  /* ---------- Page frame ---------- */
  .web-body main {
    max-width: none;
    padding: 0;
    margin: 0;
  }
  .web-body .intro {
    padding: 0;
  }
  .web-body .intro > p {
    max-width: none;
  }

  /* ---------- Entry: forest hero with a paper artifact ---------- */
  .web-body .intro-hero {
    --fs-focus: var(--editorial-clay-inverse);
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: clamp(40px, 6vw, 96px);
    align-items: center;
    padding: clamp(56px, 7vw, 104px) var(--fs-gutter) clamp(64px, 7vw, 112px);
    color: var(--editorial-cream);
    background: var(--editorial-forest);
  }
  .web-body .intro-hero .eyebrow {
    color: color-mix(in srgb, var(--editorial-cream) 74%, transparent);
  }
  /* Sized so the headline sits in three or four lines, not five or six. */
  .web-body .intro-hero h1 {
    max-width: 14ch;
    margin-bottom: 24px;
    font-size: calc(clamp(44px, 5vw, 72px) * var(--fs-scale));
    line-height: 0.99;
    letter-spacing: -0.045em;
  }
  .web-body .intro-hero .lead {
    max-width: 30ch;
    margin-bottom: 0;
    color: color-mix(in srgb, var(--editorial-cream) 88%, transparent);
  }
  .web-body .intro-hero .entry-actions {
    margin: 32px 0 28px;
  }
  .web-body .intro-hero button {
    color: var(--editorial-cream);
    border-color: color-mix(in srgb, var(--editorial-cream) 45%, transparent);
  }
  .web-body .intro-hero button:hover {
    color: var(--editorial-cream);
    background: color-mix(in srgb, var(--editorial-cream) 10%, transparent);
    border-color: var(--editorial-cream);
  }
  .web-body .intro-hero button.primary {
    color: var(--editorial-forest);
    background: var(--editorial-cream);
    border-color: var(--editorial-cream);
  }
  .web-body .intro-hero button.primary:hover {
    color: var(--editorial-forest);
    background: var(--editorial-paper);
  }
  .web-body .intro-hero button.primary::after {
    font-weight: 400;
    content: "→" / "";
  }
  .web-body .intro-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 0;
    padding: 0;
    margin: 0 0 10px;
    font-size: calc(14.5px * var(--fs-scale));
    color: color-mix(in srgb, var(--editorial-cream) 80%, transparent);
    list-style: none;
  }
  .web-body .intro-facts li + li::before {
    margin-inline: 12px;
    color: var(--editorial-clay-inverse);
    content: "·" / "";
  }
  .web-body .intro-pace {
    max-width: 44ch;
    margin: 0;
    font-size: calc(14.5px * var(--fs-scale));
    color: color-mix(in srgb, var(--editorial-cream) 68%, transparent);
  }

  .web-body .intro-artifact {
    position: relative;
    justify-self: end;
    width: min(100%, 420px);
    margin: 0;
  }
  .web-body .artifact-card {
    position: relative;
    padding: 24px 28px 20px;
    color: var(--editorial-ink);
    background: var(--editorial-paper);
    border-top: 3px solid var(--editorial-clay);
    border-radius: 4px;
    box-shadow:
      14px 14px 0 -1px
      color-mix(in srgb, var(--editorial-cream) 16%, transparent),
      0 30px 60px rgb(0 0 0 / 0.35);
  }
  .web-body .artifact-kicker {
    display: flex;
    justify-content: space-between;
    padding-bottom: 12px;
    margin: 0;
    font-family: var(--fs-mono);
    font-size: 11px;
    color: var(--editorial-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-bottom: 1px solid var(--editorial-rule);
  }
  .web-body .artifact-quote {
    margin: 22px 0 24px;
    font-family: var(--fs-serif);
    font-size: calc(clamp(24px, 2.2vw, 30px) * var(--fs-scale));
    font-style: italic;
    line-height: 1.15;
    letter-spacing: -0.02em;
  }
  .web-body .artifact-fields {
    margin: 0;
  }
  .web-body .artifact-fields div {
    display: grid;
    grid-template-columns: 7.5em minmax(0, 1fr);
    gap: 12px;
    align-items: baseline;
    padding: 10px 0;
    border-top: 1px solid var(--editorial-rule);
  }
  .web-body .artifact-fields dt {
    font-family: var(--fs-mono);
    font-size: 11px;
    color: var(--editorial-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }
  .web-body .artifact-fields dd {
    margin: 0;
    font-family: var(--fs-serif);
    font-size: calc(19px * var(--fs-scale));
  }
  .web-body .intro-artifact figcaption {
    margin-top: 28px;
    font-size: calc(14px * var(--fs-scale));
    color: color-mix(in srgb, var(--editorial-cream) 68%, transparent);
  }

  /* ---------- Entry: two ways to begin ---------- */
  .web-body .intro-ways {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    padding: clamp(56px, 7vw, 104px) var(--fs-gutter) clamp(40px, 5vw, 64px);
  }
  .web-body .intro-ways article {
    padding: 0 clamp(24px, 4vw, 64px) 0 0;
    background: none;
    border: 0;
  }
  .web-body .intro-ways article + article {
    padding: 0 0 0 clamp(24px, 4vw, 64px);
    border-left: 1px solid var(--editorial-rule);
  }
  .web-body .intro-ways article > :not(.workbook-cover) {
    max-width: 44ch;
  }
  .web-body .chapter {
    margin-right: 12px;
    font-family: var(--fs-serif);
    font-size: 26px;
    font-style: italic;
    line-height: 1;
    vertical-align: -3px;
    color: var(--editorial-clay);
    text-transform: none;
    letter-spacing: 0;
  }
  .web-body .intro-ways .button {
    margin: 8px 0 16px;
  }
  .web-body .intro-ways details {
    margin-top: 8px;
  }
  .web-body .paper-choice {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 112px;
    column-gap: clamp(20px, 3vw, 40px);
    align-content: start;
  }
  .web-body .paper-choice > * {
    grid-column: 1;
  }
  .web-body .workbook-cover {
    display: flex;
    flex-direction: column;
    grid-row: 1 / span 4;
    grid-column: 2;
    gap: 8px;
    align-self: start;
    aspect-ratio: 3 / 4;
    padding: 12px;
    background: var(--editorial-surface);
    border: 1px solid var(--editorial-rule);
    border-top: 3px solid var(--editorial-forest);
    box-shadow:
      6px 6px 0 -1px var(--editorial-field),
      6px 6px 0 0 var(--editorial-rule);
    transform: rotate(2deg);
  }
  .web-body .cover-mark {
    font-size: 12px;
    font-weight: 700;
  }
  .web-body .cover-title {
    font-family: var(--fs-serif);
    font-size: 15px;
    line-height: 1.1;
  }
  .web-body .cover-meta {
    margin-top: auto;
    font-family: var(--fs-mono);
    font-size: 9px;
    color: var(--editorial-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }
  .web-body .intro-privacy {
    margin: 0 var(--fs-gutter) clamp(56px, 7vw, 96px);
  }

  /* ---------- Flow sections ---------- */
  .web-body :is(#check, #results, #practice, #packet) {
    padding: clamp(40px, 6vw, 88px) var(--fs-gutter) clamp(48px, 6vw, 88px);
  }

  /* Assessment: context column + reading sheet */
  .web-body #check {
    display: grid;
    grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
    gap: 32px clamp(40px, 6vw, 96px);
    align-items: start;
  }
  .web-body #check:not([hidden]) {
    display: grid;
  }
  .web-body .check-head h1 {
    font-size: calc(clamp(34px, 3.4vw, 48px) * var(--fs-scale));
  }
  .web-body .check-head > p:not(.eyebrow) {
    max-width: 36ch;
  }
  .web-body #questions {
    scroll-margin-top: 16px;
  }
  .web-body .question-progress {
    margin: 0 0 32px;
  }
  .web-body .question-progress p {
    margin: 0 0 10px;
    font-family: var(--fs-mono);
    font-size: calc(11.5px * var(--fs-scale));
    color: var(--editorial-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
  }
  .web-body .question-progress progress {
    display: block;
    width: 100%;
    height: 3px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--editorial-rule);
    border: 0;
    border-radius: 0;
  }
  .web-body progress::-webkit-progress-bar {
    background: var(--editorial-rule);
  }
  .web-body progress::-webkit-progress-value {
    background: var(--editorial-forest);
  }
  .web-body progress::-moz-progress-bar {
    background: var(--editorial-forest);
  }
  .web-body .question-shell {
    min-width: 0;
    padding: 0;
    margin: 0;
    background: none;
    border: 0;
    border-radius: 0;
  }
  .web-body .question-shell legend {
    float: left;
    width: 100%;
    padding: 0;
    font-weight: 400;
    background: none;
  }
  .web-body .question-shell legend + * {
    clear: both;
  }
  .web-body .question-number {
    display: block;
    margin: 0 0 14px;
    font-family: var(--fs-mono);
    font-size: calc(11.5px * var(--fs-scale));
    font-weight: 400;
    color: var(--fs-clay-text);
    text-transform: uppercase;
    letter-spacing: 0.1em;
  }
  .web-body .question-text {
    display: block;
    font-family: var(--fs-serif);
    font-size: calc(clamp(26px, 2.6vw, 36px) * var(--fs-scale));
    line-height: 1.16;
    color: var(--editorial-ink);
    letter-spacing: -0.025em;
    text-wrap: pretty;
  }
  /* The floated legend doesn't hold the hint's top margin, so pad it instead. */
  .web-body .question-shell legend {
    padding-bottom: 14px;
  }
  .web-body .question-shell .hint {
    max-width: 58ch;
    margin: 0 0 28px;
  }
  .web-body .question-shell .options {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0 12px;
  }
  .web-body .option {
    position: relative;
    display: flex;
    gap: 16px;
    align-items: center;
    min-height: 60px;
    padding: 14px 20px;
    font-size: calc(17.5px * var(--fs-scale));
    line-height: 1.35;
    color: var(--editorial-ink);
    cursor: pointer;
    background: var(--editorial-surface);
    border: 1px solid var(--editorial-rule);
    border-radius: 0;
    transition: background-color 0.15s ease;
  }
  .web-body .question-shell .option {
    grid-column: 1 / -1;
    margin-top: -1px;
  }
  .web-body .question-shell .option:first-child {
    margin-top: 0;
    border-radius: var(--fs-radius) var(--fs-radius) 0 0;
  }
  .web-body .question-shell .option:nth-child(3) {
    border-radius: 0 0 var(--fs-radius) var(--fs-radius);
  }
  /* Skip and Not applicable stay in the same radio group but read as quieter exits. */
  .web-body .question-shell .option:nth-child(n + 4) {
    grid-column: auto;
    min-height: 52px;
    margin-top: 12px;
    font-size: calc(15.5px * var(--fs-scale));
    color: var(--editorial-muted);
    background: transparent;
    border-radius: 999px;
  }
  .web-body .option:hover {
    background: color-mix(in srgb, white 70%, var(--editorial-paper));
  }
  .web-body .option:has(input:checked) {
    z-index: 1;
    color: var(--editorial-ink);
    background: color-mix(
      in srgb,
      var(--editorial-forest) 8%,
      var(--editorial-paper)
    );
    border-color: var(--editorial-forest);
    box-shadow: inset 0 0 0 1px var(--editorial-forest);
  }
  .web-body .option:has(input:checked) span {
    font-weight: 600;
  }
  @supports selector(:has(*)) {
    .web-body .option input:focus-visible {
      outline: none;
    }
    .web-body .option:has(input:focus-visible) {
      z-index: 2;
      outline: 2px solid var(--fs-focus);
      outline-offset: 2px;
    }
  }
  .web-body .question-actions {
    display: flex;
    gap: 12px;
    margin: 32px 0 12px;
  }
  .web-body .question-actions .primary {
    margin-left: auto;
  }

  /* Results: header split + numbered editorial list */
  .web-body .results-head {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 16px clamp(40px, 6vw, 96px);
    align-items: end;
    padding-bottom: 32px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--editorial-ink);
  }
  .web-body .results-head h1 {
    max-width: 14ch;
    margin-bottom: 0;
  }
  .web-body .results-head p:last-child {
    margin-bottom: 0;
  }
  .web-body .priorities {
    padding: 0;
    margin: 0 0 40px;
    list-style: none;
    counter-reset: priority;
  }
  .web-body .priorities > li {
    display: grid;
    grid-template-columns: 56px minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 12px clamp(24px, 4vw, 56px);
    padding: 36px 0;
    margin: 0;
    counter-increment: priority;
    border-bottom: 1px solid var(--editorial-rule);
  }
  /* biome-ignore lint/style/noDescendingSpecificity: Priority counters and intro fact separators belong to distinct lists. */
  .web-body .priorities > li::before {
    font-family: var(--fs-serif);
    font-size: 30px;
    font-style: italic;
    line-height: 1;
    color: var(--editorial-clay);
    content: counter(priority, decimal-leading-zero) / "";
  }
  .web-body .priority-why h2 {
    font-size: calc(clamp(24px, 2.2vw, 30px) * var(--fs-scale));
  }
  .web-body .priority-why .reason {
    margin-bottom: 0;
  }
  .web-body .priority-step > p:first-child {
    font-size: calc(17.5px * var(--fs-scale));
  }
  .web-body .priority-done {
    padding: 12px 16px;
    color: var(--editorial-ink);
    background: var(--editorial-field);
    border-radius: 8px;
  }
  .web-body .priority-step > p:last-child {
    margin-bottom: 0;
  }
  .web-body #results > details {
    max-width: 880px;
  }
  .web-body #results > details > :not(summary) {
    max-width: 68ch;
  }
  .web-body .statuses {
    margin: 0;
  }
  .web-body .statuses > div {
    gap: 4px 24px;
    padding: 12px 0;
    border-bottom: 1px solid var(--editorial-rule);
  }
  .web-body .statuses dt {
    font-weight: 600;
  }
  .web-body .statuses dd {
    margin: 0;
    color: var(--editorial-muted);
  }
  .web-body .worked-example p:first-of-type {
    padding: 16px 20px;
    font-family: var(--fs-serif);
    font-size: calc(18px * var(--fs-scale));
    line-height: 1.55;
    background: var(--editorial-surface);
    border-left: 3px solid var(--editorial-clay);
  }

  /* Practice: forest scene + lettered choices */
  .web-body #practice > * {
    max-width: 840px;
  }
  .web-body .practice-label {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    width: fit-content;
    padding: 6px 14px;
    margin: 0 0 20px;
    font-family: var(--fs-mono);
    font-size: calc(11.5px * var(--fs-scale));
    font-weight: 400;
    color: var(--fs-clay-text);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: none;
    border: 1px solid color-mix(in srgb, var(--editorial-clay) 55%, transparent);
    border-radius: 999px;
  }
  .web-body .practice-label::before {
    width: 7px;
    height: 7px;
    content: "";
    background: var(--editorial-clay);
    border-radius: 50%;
  }
  .web-body #practice .eyebrow + h1 {
    margin-bottom: 16px;
  }
  .web-body .practice-intro {
    font-family: var(--fs-serif);
    font-size: calc(clamp(21px, 2vw, 26px) * var(--fs-scale));
    line-height: 1.35;
  }
  .web-body .practice-scene {
    padding: clamp(24px, 4vw, 44px);
    margin: 8px 0 0;
    color: var(--editorial-cream);
    background: var(--editorial-forest);
    border-radius: var(--fs-radius) var(--fs-radius) 0 0;
  }
  .web-body .practice-scene .lead {
    margin: 0;
    font-family: var(--fs-serif);
    font-size: calc(clamp(21px, 2.1vw, 28px) * var(--fs-scale));
    line-height: 1.3;
    letter-spacing: -0.015em;
  }
  .web-body .practice-options {
    display: grid;
    gap: 0;
    margin: 0;
    counter-reset: choice;
  }
  .web-body .practice-options button {
    gap: 16px;
    justify-content: flex-start;
    min-height: 64px;
    padding: 16px 20px;
    margin-top: -1px;
    font-size: calc(17px * var(--fs-scale));
    font-weight: 400;
    text-align: left;
    counter-increment: choice;
    background: var(--editorial-surface);
    border-color: var(--editorial-rule);
    border-radius: 0;
  }
  .web-body .practice-options button:last-child {
    border-radius: 0 0 var(--fs-radius) var(--fs-radius);
  }
  .web-body .practice-options button::before {
    display: inline-grid;
    flex: none;
    place-items: center;
    width: 30px;
    height: 30px;
    font-family: var(--fs-mono);
    font-size: 12px;
    content: counter(choice, upper-alpha) / "";
    border: 1px solid var(--editorial-rule);
    border-radius: 50%;
  }
  .web-body .practice-options button:hover:not(:disabled) {
    background: color-mix(in srgb, white 70%, var(--editorial-paper));
    border-color: var(--editorial-rule);
  }
  .web-body .practice-options button:disabled {
    color: var(--editorial-muted);
  }
  .web-body .practice-options button.is-chosen {
    z-index: 1;
    color: var(--editorial-ink);
    background: color-mix(
      in srgb,
      var(--editorial-forest) 8%,
      var(--editorial-paper)
    );
    border-color: var(--editorial-forest);
    box-shadow: inset 0 0 0 1px var(--editorial-forest);
  }
  .web-body .practice-options button.is-chosen::before {
    color: var(--editorial-cream);
    background: var(--editorial-forest);
    border-color: var(--editorial-forest);
  }
  .web-body #feedback {
    margin: 24px 0 0;
  }
  .web-body #feedback:not(:empty) {
    padding: 20px 24px;
    background: var(--editorial-field);
    border-top: 2px solid var(--editorial-clay);
  }
  .web-body #feedback .primary {
    margin-top: 4px;
  }
  .web-body .practice-controls button {
    min-height: 44px;
    font-size: calc(14.5px * var(--fs-scale));
  }

  /* Debrief: three-step callback rehearsal */
  .web-body #practice > .rehearsal {
    max-width: 1200px;
  }
  /* biome-ignore lint/style/noDescendingSpecificity: The practice child rule only adjusts width, while this rule defines its grid. */
  .web-body .rehearsal {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 0;
    margin: 20px 0 40px;
    list-style: none;
    counter-reset: rehearsal;
    border-top: 1px solid var(--editorial-ink);
  }
  .web-body .rehearsal li {
    padding: 24px 28px 8px 0;
    margin: 0;
    counter-increment: rehearsal;
  }
  .web-body .rehearsal li + li {
    padding-left: 28px;
    border-left: 1px solid var(--editorial-rule);
  }
  /* biome-ignore lint/style/noDescendingSpecificity: Rehearsal counters and intro fact separators belong to distinct lists. */
  .web-body .rehearsal li::before {
    display: block;
    margin-bottom: 14px;
    font-family: var(--fs-serif);
    font-size: 30px;
    font-style: italic;
    line-height: 1;
    color: var(--editorial-clay);
    content: counter(rehearsal, decimal-leading-zero) / "";
  }
  .web-body #practice h2 {
    margin-top: 40px;
  }
  .web-body #practice details h3 {
    margin-top: 16px;
  }

  /* Plan and contact card */
  .web-body #packet > * {
    max-width: 760px;
  }
  .web-body .packet-include {
    padding: 0;
    margin: 36px 0 28px;
    border: 0;
  }
  .web-body .packet-include legend {
    margin-bottom: 14px;
    font-family: var(--fs-serif);
    font-size: calc(24px * var(--fs-scale));
    font-weight: 400;
    line-height: 1.2;
  }
  .web-body .packet-include .option {
    margin-top: -1px;
  }
  .web-body .packet-include .option:first-of-type {
    border-radius: var(--fs-radius) var(--fs-radius) 0 0;
  }
  .web-body .packet-include .option:last-of-type {
    border-radius: 0 0 var(--fs-radius) var(--fs-radius);
  }
  .web-body .packet-include .option:has(input:checked) span {
    font-weight: 400;
  }
  .web-body #contact-details {
    padding: 0 clamp(20px, 3vw, 32px);
    margin: 0 0 28px;
    background: var(--editorial-surface);
    border: 1px solid var(--editorial-rule);
    border-top: 3px solid var(--editorial-clay);
    border-radius: 4px;
  }
  .web-body #contact-details[open] {
    padding-bottom: 28px;
    box-shadow: 0 24px 60px
      color-mix(in srgb, var(--editorial-forest) 8%, transparent);
  }
  .web-body #contact-details > summary {
    font-family: var(--fs-serif);
    font-size: calc(21px * var(--fs-scale));
    font-weight: 400;
  }
  .web-body .contact-fields {
    gap: 20px 24px;
    max-width: none;
    margin: 20px 0;
  }
  .web-body .contact-fields label {
    font-size: calc(14.5px * var(--fs-scale));
    font-weight: 600;
    line-height: 1.4;
  }
  .web-body .packet-save {
    padding: 24px 0 0;
    border-top: 1px solid var(--editorial-rule);
  }
  .web-body .packet-save .primary {
    margin-top: 8px;
  }
  .web-body #export-error {
    margin: 12px 0 0;
  }
  .web-body #export-error:not(:empty) {
    padding: 14px 18px;
    font-weight: 600;
    color: #8a2a17;
    background: color-mix(
      in srgb,
      var(--editorial-clay) 10%,
      var(--editorial-paper)
    );
    border-left: 3px solid var(--editorial-clay);
  }
  .web-body #packet-preview {
    padding-top: 40px;
    margin-top: 40px;
    scroll-margin-top: 16px;
    border-top: 1px solid var(--editorial-ink);
  }
  .web-body .print-packet {
    padding: clamp(24px, 4vw, 48px);
    background: color-mix(in srgb, white 70%, var(--editorial-paper));
    border: 1px solid var(--editorial-rule);
    border-radius: 4px;
    box-shadow: 0 24px 60px
      color-mix(in srgb, var(--editorial-forest) 10%, transparent);
  }
  .web-body .print-packet h1 {
    font-size: calc(32px * var(--fs-scale));
  }
  .web-body .print-packet h2 {
    margin-top: 28px;
    font-size: calc(23px * var(--fs-scale));
  }
  .web-body .print-packet .contact-card {
    padding: 20px 24px;
    margin-top: 24px;
    border: 1px solid var(--editorial-ink);
    border-top: 3px solid var(--editorial-clay);
  }
  .web-body #json-preview {
    padding: 16px;
    margin: 0 0 16px;
    font-size: 13px;
    background: var(--editorial-field);
    border-radius: 6px;
  }

  /* ---------- Session controls, notice ---------- */
  .web-body #notice {
    padding: 0 var(--fs-gutter);
    margin: 0;
  }
  .web-body #notice:not(:empty) {
    padding-block: 16px;
    font-weight: 600;
  }
  .web-body .session-controls {
    max-width: none;
    padding: 28px var(--fs-gutter) 48px;
    margin: 0;
    border-top: 1px solid var(--editorial-rule);
  }
  .web-body .session-controls #clear {
    min-height: 44px;
    font-size: calc(14.5px * var(--fs-scale));
  }
  .web-body #clear-confirm {
    max-width: 640px;
    padding: 16px 20px;
    margin-top: 16px;
    background: var(--editorial-field);
    border-radius: 8px;
  }
  .web-body #clear-confirm button {
    margin: 4px 8px 4px 0;
  }
  .web-body .session-controls > .small {
    margin: 12px 0 0;
  }

  /* ---------- Urgent help band ---------- */
  .web-body .help-strip {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 24px clamp(40px, 6vw, 96px);
    align-items: start;
    padding: clamp(56px, 7vw, 96px) var(--fs-gutter);
    margin: 0;
    background: var(--editorial-field);
    border: 0;
    border-top: 1px solid var(--editorial-rule);
  }
  .web-body .help-head h2 {
    max-width: 14ch;
  }
  .web-body .help-body details {
    border-color: color-mix(in srgb, var(--editorial-ink) 30%, transparent);
  }
  .web-body #urgent-help > summary {
    font-size: calc(17px * var(--fs-scale));
  }
  .web-body #urgent-help > summary::before {
    flex: none;
    width: 8px;
    height: 8px;
    content: "";
    background: var(--editorial-clay);
    border-radius: 50%;
  }
  .web-body #urgent-help > summary {
    justify-content: flex-start;
  }
  .web-body .help-body summary::after {
    margin-left: auto;
  }
  .web-body #urgent-help label {
    display: block;
    margin-top: 8px;
    font-size: calc(15px * var(--fs-scale));
    font-weight: 600;
  }
  .web-body #urgent-help select {
    max-width: 420px;
    margin-bottom: 8px;
  }

  /* ---------- Footer ---------- */
  .web-body footer {
    --fs-focus: var(--editorial-clay-inverse);
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 32px clamp(40px, 6vw, 96px);
    max-width: none;
    padding: clamp(48px, 6vw, 80px) var(--fs-gutter) clamp(48px, 6vw, 72px);
    margin: 0;
    font-size: calc(15px * var(--fs-scale));
    color: var(--editorial-cream);
    background: var(--editorial-forest);
  }
  .web-body .footer-mark {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
  }
  .web-body .footer-mark span {
    font-weight: 400;
  }
  .web-body footer p {
    max-width: 48ch;
  }
  .web-body footer details {
    margin-bottom: 20px;
    border-color: color-mix(in srgb, var(--editorial-cream) 22%, transparent);
  }
  /* biome-ignore lint/style/noDescendingSpecificity: Footer text and session-control text are separate regions. */
  .web-body footer .small {
    color: color-mix(in srgb, var(--editorial-cream) 70%, transparent);
  }

  /* ---------- Tablet and below ---------- */
  @media (max-width: 960px) {
    .web-body .intro-hero,
    .web-body .help-strip,
    .web-body footer,
    .web-body .results-head,
    .web-body #check:not([hidden]) {
      grid-template-columns: minmax(0, 1fr);
    }
    .web-body .intro-artifact {
      justify-self: start;
    }
    .web-body .priorities > li {
      grid-template-columns: 44px minmax(0, 1fr);
    }
    .web-body .priority-step {
      grid-column: 2;
    }
    .web-body .results-head {
      align-items: start;
    }
  }

  @media (max-width: 760px) {
    .web-body .intro-ways {
      grid-template-columns: minmax(0, 1fr);
      gap: 40px;
    }
    .web-body .intro-ways article,
    .web-body .intro-ways article + article {
      padding: 0;
      border: 0;
    }
    .web-body .intro-ways article + article {
      padding-top: 40px;
      border-top: 1px solid var(--editorial-rule);
    }
    /* biome-ignore lint/style/noDescendingSpecificity: This breakpoint changes columns, independently of the practice child width. */
    .web-body .rehearsal {
      grid-template-columns: minmax(0, 1fr);
    }
    .web-body .rehearsal li,
    .web-body .rehearsal li + li {
      padding: 20px 0 4px;
      border-left: 0;
    }
    .web-body .rehearsal li + li {
      border-top: 1px solid var(--editorial-rule);
    }
  }

  /* ---------- Phones ---------- */
  @media (max-width: 600px) {
    .web-body {
      --fs-gutter: 20px;
    }
    .web-body .site-header {
      gap: 8px;
      padding-block: 8px;
      padding-inline: 16px;
    }
    .web-body .review-nav {
      gap: 6px;
    }
    .web-body .help-link,
    .web-body .review-nav .inline-choice {
      gap: 8px;
      padding: 0 12px;
    }
    .web-body .intro-hero {
      gap: 40px;
      padding-top: 36px;
      padding-bottom: 48px;
    }
    .web-body .intro-hero h1 {
      margin-bottom: 16px;
      font-size: calc(clamp(34px, 10vw, 44px) * var(--fs-scale));
    }
    .web-body .intro-hero .eyebrow {
      margin-bottom: 12px;
    }
    .web-body .intro-hero .entry-actions {
      margin: 24px 0 20px;
    }
    .web-body .actions > :is(button, .button) {
      width: 100%;
    }
    .web-body .artifact-card {
      padding: 20px 20px 16px;
      box-shadow:
        10px 10px 0 -1px
        color-mix(in srgb, var(--editorial-cream) 16%, transparent),
        0 20px 40px rgb(0 0 0 / 0.3);
    }
    .web-body .intro-artifact {
      width: calc(100% - 10px);
    }
    .web-body .paper-choice {
      grid-template-columns: minmax(0, 1fr) 76px;
    }
    .web-body .workbook-cover {
      grid-row: 1 / span 2;
      padding: 8px;
    }
    .web-body .cover-title {
      font-size: 11px;
    }
    .web-body .cover-meta {
      display: none;
    }
    .web-body .check-head h1 {
      margin-bottom: 12px;
      font-size: calc(30px * var(--fs-scale));
    }
    .web-body .check-head > p:not(.eyebrow) {
      margin-bottom: 8px;
      font-size: calc(15.5px * var(--fs-scale));
    }
    .web-body .question-text {
      font-size: calc(25px * var(--fs-scale));
    }
    .web-body .option {
      padding: 14px 16px;
    }
    .web-body .actions.question-actions > button {
      flex: 1 1 0;
      width: auto;
      padding-inline: 14px;
    }
    .web-body .contact-fields {
      grid-template-columns: minmax(0, 1fr);
    }
    .web-body .practice-options button {
      padding: 14px 16px;
    }
    .web-body .actions.practice-controls > button {
      flex: 1 1 0;
      width: auto;
    }
  }

  @media (max-width: 600px) {
    /* Larger text can wrap the header pills to a second row on phones. */
    html:has(> body.web-body.large-type) {
      --fs-header: 116px;
    }
  }

  @media (max-width: 400px) {
    .web-body .wordmark span {
      display: none;
    }
  }

  @media (max-width: 360px) {
    /* The regular header also wraps at narrow reflow widths. */
    html:has(> body.web-body) {
      --fs-header: 116px;
    }
  }

  @media (prefers-reduced-motion: reduce) {
    /* biome-ignore lint/style/noDescendingSpecificity: Reduced motion deliberately overrides every component's animation. */
    .web-body *,
    .web-body *::before,
    .web-body *::after {
      transition: none !important;
      animation: none !important;
      scroll-behavior: auto !important;
    }
  }

  @media (forced-colors: active) {
    .web-body :is(input[type="radio"], input[type="checkbox"]) {
      -webkit-appearance: auto;
      appearance: auto;
    }
    .web-body :focus-visible {
      outline: 2px solid CanvasText;
    }
    .web-body [tabindex="-1"]:is(:focus, :focus-visible) {
      outline: none;
    }
  }
}

/* ---------- Contact form: one comfortable column at every size ---------- */
@media screen {
  .web-body .packet-intro .lead {
    max-width: 40ch;
  }
  .web-body #contact-details.contact-form {
    display: grid;
    gap: 28px;
    padding: clamp(24px, 4vw, 40px);
    margin: 32px 0 48px;
    background: var(--editorial-surface);
    border: 1px solid var(--editorial-rule);
    border-top: 3px solid var(--editorial-clay);
    border-radius: 4px;
  }
  .web-body .field {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }
  .web-body .field label {
    font-size: calc(18px * var(--fs-scale));
    font-weight: 600;
    line-height: 1.3;
  }
  .web-body .field-hint {
    max-width: 60ch;
    margin: 4px 0 0;
    font-size: calc(16px * var(--fs-scale));
    line-height: 1.5;
    color: var(--editorial-muted);
  }
  .web-body .field input {
    width: 100%;
    max-width: 30rem;
    margin-top: 10px;
  }
  .web-body .field input[aria-invalid="true"] {
    border: 2px solid #8a2a17;
  }
  .web-body #contact-more {
    border-color: var(--editorial-rule);
  }
  .web-body #contact-more > summary {
    font-size: calc(17px * var(--fs-scale));
  }
  .web-body #contact-more[open] {
    padding-bottom: 28px;
  }
  /* An inner wrapper gives each optional field the same spacing as the essentials. */
  .web-body .contact-more-fields {
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding-top: 12px;
  }
  .web-body .field-error {
    max-width: 30rem;
    padding: 8px 12px;
    margin: 8px 0 0;
    font-size: calc(15.5px * var(--fs-scale));
    font-weight: 600;
    line-height: 1.45;
    color: #8a2a17;
    background: color-mix(
      in srgb,
      var(--editorial-clay) 10%,
      var(--editorial-paper)
    );
    border-left: 3px solid var(--editorial-clay);
  }
  .web-body .contact-note {
    max-width: 60ch;
    margin: 0;
    font-size: calc(16px * var(--fs-scale));
  }
  .web-body .packet-save h2 {
    margin-top: 0;
  }
  .web-body .packet-save > p {
    max-width: 60ch;
  }
  .web-body .packet-include {
    margin: 20px 0 20px;
  }
  .web-body .contact-choice {
    padding: 20px 24px;
    margin: 0 0 20px;
    background: var(--editorial-field);
    border-left: 3px solid var(--editorial-clay);
  }
  .web-body .contact-choice .actions {
    margin: 16px 0 0;
  }
}

@media print {
  .web-body .print-packet .packet-section {
    break-inside: avoid;
  }
  .web-body:not(.printing-packet) main::before {
    content: "To print, open the blank workbook or preview your copy first. Your answers and private help details aren’t printed from this page.";
  }
}

@media print {
  .statistics-settings {
    display: none;
  }
}

@media screen {
  .web-body .statistics-settings {
    padding: calc(var(--spacing) * 6) var(--fs-gutter);
    margin: 0;
    background: var(--editorial-surface);
  }
  .web-body .statistics-choice {
    display: flex;
    gap: calc(var(--spacing) * 3);
    align-items: start;
    margin-block: calc(var(--spacing) * 4);
  }
  .web-body .statistics-choice input {
    margin-top: var(--spacing);
  }
}
