/* SurveyingExamPrep marketing site. Tokens copied from the app (web/src/styles/platform.css); rules from /design.md.
   Green surfaces: header, hero, closing panel. Everything else sits on paper. Amber is a fill or a rule, never text on paper. */

@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("/assets/fonts/manrope-latin-wght-normal.woff2") format("woff2"); }
@font-face { font-family: "Varela Round"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/varela-round-latin-400-normal.woff2") format("woff2"); }

:root {
  --green-900: #183B32;
  --green-800: #22493e;
  --green-700: #2e5a4d;
  --green-050: #edf1ec;
  --paper: #F5F3EB;
  --paper-raised: #fbfaf6;
  --paper-sunk: #ece8dc;
  --rule: #d8d2c2;
  --rule-strong: #b9b19c;
  --rule-on-green: rgba(245, 243, 235, 0.22);
  --ink: #1f2622;
  --ink-muted: #545b56;
  --amber: #C99535;
  --amber-hover: #d6a854;
  --amber-ink: #835b12;
  --amber-050: #f4ead3;
  --on-green: #f5f3eb;
  --on-green-muted: #b8c7bf;
  --correct: #276b3d;
  --correct-050: #e3efe4;
  --wrong: #9a2f25;
  --wrong-050: #f6e3df;

  --font-sans: "Manrope", "Helvetica Neue", sans-serif;
  --font-display: "Varela Round", var(--font-sans); /* one weight: 400 */

  --radius-s: 2px;
  --radius-m: 4px;
  --radius-l: 6px;
  --device-radius: 36px; /* the phone frame is a drawing of a device: the one larger corner on the site */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --content: 1240px;
  --gutter: 16px;
  --gap: 24px;
  --shadow: 0 8px 24px rgba(24, 59, 50, 0.18);
}
@media (min-width: 720px) { :root { --gutter: 32px; --gap: 32px; } }

/* Base */
[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
/* Manrope's common ligatures draw "(c)" as a copyright sign, which turns a rule citation such as "1.4(H)(2)(c)" into
   "1.4(H)(2)©". They are off for every text on the site; the footer types the real © character. */
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-sans); font-size: 16px; line-height: 1.6; font-variant-numeric: tabular-nums; font-variant-ligatures: no-common-ligatures; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.01em; line-height: 1.2; margin: 0; color: var(--green-900); }
p { margin: 0; }
a { color: var(--green-900); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--green-700); }
button, input, select, textarea { font: inherit; color: inherit; }
a, button, summary { touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--green-900); outline-offset: 2px; }
.site-header :focus-visible, .hero :focus-visible, .closing :focus-visible { outline-color: var(--amber); }
.container { width: 100%; max-width: var(--content); margin-inline: auto; padding-inline: var(--gutter); }
.skip-link { position: absolute; left: var(--space-4); top: -100px; z-index: 30; padding: var(--space-3) var(--space-4); background: var(--paper-raised); color: var(--green-900); font-weight: 700; border: 2px solid var(--green-900); border-radius: var(--radius-m); }
.skip-link:focus { top: var(--space-3); }
.eyebrow { display: block; margin: 0 0 var(--space-2); font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--green-700); }
.text-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; font-size: 15px; }

/* Buttons: green on paper, amber on green surfaces. The class name does not pick the colour; the surface does. */
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: var(--space-3) var(--space-5); border: 0; border-radius: var(--radius-m); background: var(--green-900); color: var(--on-green); font-size: 15px; font-weight: 700; line-height: 1.3; text-align: center; text-decoration: none; transition: background-color 120ms ease; }
.button:hover { background: var(--green-800); color: var(--on-green); }
.site-header .button, .hero .button, .closing .button { background: var(--amber); color: var(--green-900); }
.site-header .button:hover, .hero .button:hover, .closing .button:hover { background: var(--amber-hover); color: var(--green-900); }

/* Header */
.site-header { background: var(--green-900); color: var(--on-green); border-bottom: 1px solid var(--green-800); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--space-5); max-width: var(--content); min-height: 72px; margin-inline: auto; padding: var(--space-3) var(--gutter); }
.brand { display: inline-flex; align-items: center; gap: var(--space-3); min-height: 44px; color: inherit; text-decoration: none; }
.brand span { font-family: var(--font-display); font-size: 20px; letter-spacing: -0.01em; white-space: nowrap; }
.brand img { width: 44px; height: auto; }
.site-header .brand:hover { color: var(--on-green); }
.site-header .brand img { width: 40px; padding: 3px 4px; background: var(--paper); border-radius: var(--radius-m); }
.menu-toggle { display: none; min-height: 44px; padding: 0 var(--space-4); background: transparent; border: 1px solid var(--rule-on-green); border-radius: var(--radius-m); color: var(--on-green); font-size: 14px; font-weight: 700; cursor: pointer; }
.site-header nav { display: flex; align-items: center; gap: var(--space-5); margin-left: var(--space-3); }
.site-header nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--on-green); font-size: 14.5px; font-weight: 600; text-decoration: none; white-space: nowrap; border-bottom: 2px solid transparent; }
.site-header nav a:hover { color: var(--on-green); border-bottom-color: var(--rule-on-green); }
.site-header nav a[aria-current] { border-bottom-color: var(--amber); }
.nav-group { display: inline-flex; align-items: center; gap: var(--space-5); }
.nav-group-label { display: none; }
.header-launch { margin-left: auto; padding-left: var(--space-4); border-left: 1px solid var(--rule-on-green); color: var(--on-green-muted); font-size: 13px; white-space: nowrap; }
.header-sign-in { display: inline-flex; align-items: center; min-height: 44px; margin-left: auto; color: var(--on-green); font-size: 14.5px; font-weight: 600; }
.header-sign-in:hover { color: var(--on-green); }
.header-launch + .header-sign-in { margin-left: 0; }
.site-header .button { min-height: 44px; padding: var(--space-2) var(--space-4); font-size: 14px; }
.site-header nav + .button { margin-left: auto; }
@media (max-width: 1180px) and (min-width: 901px) { .header-launch { display: none; } .site-header nav + .header-launch + .button, .site-header nav + .header-launch + .header-sign-in { margin-left: auto; } }

/* At 900px and below the links fold into a menu. The button stays in the bar down to 600px, then joins the menu.
   Without script the noscript style in render.mjs shows everything. */
@media (max-width: 900px) {
  .brand span { font-size: 18px; }
  .menu-toggle { display: inline-flex; align-items: center; order: 2; }
  .site-header .button { order: 1; margin-left: auto; }
  .site-header nav { display: none; order: 3; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 0; margin: var(--space-3) 0 0; border-top: 1px solid var(--rule-on-green); }
  .site-header nav.is-open { display: flex; }
  .nav-group { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .nav-group-label { display: block; padding: var(--space-3) 0 var(--space-1); color: var(--on-green-muted); font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
  .site-header nav a { min-height: 48px; border-bottom: 1px solid var(--rule-on-green); font-size: 15px; }
  .site-header nav a[aria-current] { border-bottom-color: var(--rule-on-green); box-shadow: inset 3px 0 0 var(--amber); padding-left: var(--space-3); }
  .header-launch, .header-sign-in { order: 4; flex-basis: 100%; margin: 0; padding: var(--space-3) 0; border-left: 0; }
  .site-header nav:not(.is-open) ~ .header-launch, .site-header nav:not(.is-open) ~ .header-sign-in { display: none; }
}
@media (max-width: 600px) {
  .brand span { font-size: 17px; }
  .site-header .brand img { width: 34px; }
  .menu-toggle { margin-left: auto; }
  .site-header .button { order: 5; flex-basis: 100%; min-height: 48px; margin: var(--space-2) 0 var(--space-1); }
  .site-header nav:not(.is-open) ~ .button { display: none; }
}

/* Hero: copy on 7 columns, the photograph on 5. On narrow screens the photograph follows the copy. */
.hero { display: grid; grid-template-columns: 1fr minmax(0, var(--content)) 1fr; background: var(--green-900); color: var(--on-green); }
.hero > * { grid-column: 2; grid-row: 1; }
.hero-copy { padding-block: var(--space-8); padding-right: calc(var(--gutter) + (100% - 2 * var(--gutter) + var(--gap)) * 5 / 12); }
.hero-image { justify-self: end; align-self: stretch; width: calc((100% - 2 * var(--gutter) + var(--gap)) * 5 / 12 - var(--gap)); height: calc(100% - 2 * var(--space-8)); min-height: 0; margin: var(--space-8) var(--gutter) var(--space-8) 0; object-fit: cover; object-position: 78% 30%; border-radius: var(--radius-m); }
.hero h1 { color: var(--on-green); font-size: clamp(32px, 2vw + 18px, 46px); line-height: 1.12; max-width: 18ch; }
.hero-description { margin-top: var(--space-5); max-width: 62ch; color: var(--on-green-muted); font-size: 17px; line-height: 1.6; }
.hero-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: var(--space-6) 0 0; padding-block: var(--space-4); border-block: 1px solid var(--rule-on-green); }
.hero-stats > div { display: flex; flex-direction: column; min-width: 0; padding: 0 var(--space-4); border-left: 1px solid var(--rule-on-green); }
.hero-stats > div:first-child { padding-left: 0; border-left: 0; }
.hero-stats dd { order: -1; margin: 0; font-family: var(--font-display); font-size: 30px; line-height: 1.15; color: var(--on-green); }
.hero-stats dt { margin-top: var(--space-1); font-size: 13px; line-height: 1.35; color: var(--on-green-muted); }
.hero-offer-line { margin-top: var(--space-5); padding-left: var(--space-3); border-left: 2px solid var(--amber); color: var(--on-green); font-size: 16px; font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-5); margin-top: var(--space-5); }
.hero-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--on-green); font-weight: 700; }
.hero-link:hover { color: var(--on-green); text-decoration-thickness: 2px; }
@media (max-width: 960px) {
  .hero > * { grid-row: auto; }
  .hero-copy { padding: var(--space-7) var(--gutter) var(--space-6); }
  .hero-image { width: min(100% - 2 * var(--gutter), 520px); height: auto; aspect-ratio: 3 / 2; margin: 0 var(--gutter) var(--space-7); justify-self: start; order: 1; object-position: 100% 30%; }
}
@media (max-width: 720px) {
  .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--space-4); }
  .hero-stats > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .hero-stats dd { font-size: 26px; }
  .hero-description { font-size: 16px; }
}

/* Home sections share a 12-column grid. Each section places its intro and body on it in its own way. */
/* Sections sit inside the gutters (margin, not padding), so the rule between them lines up with the content edge. */
.home-section, .pricing-section, .closing, .page-intro, .footer-top, .footer-contact, .footer-bottom { width: calc(100% - 2 * var(--gutter)); max-width: calc(var(--content) - 2 * var(--gutter)); padding-inline: 0; }
.home-section, .pricing-section { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); padding-block: var(--space-8); border-top: 1px solid var(--rule); }
.hero + .home-section, .hero + .pricing-section { border-top: 0; }
.home-section > *, .pricing-section > * { grid-column: 1 / -1; min-width: 0; }
.section-intro { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: end; margin-bottom: var(--space-6); }
.section-intro > :first-child { grid-column: 1 / 6; }
.section-intro > p { grid-column: 6 / 13; max-width: 60ch; color: var(--ink-muted); }
.section-intro h2 { font-size: 30px; }
.home-section h3 { font-size: 22px; }
@media (min-width: 961px) {
  /* Intro in a side column of 4, body in the other 8. */
  #inside .section-intro, #study-tools .section-intro, #faq .section-intro { grid-column: 1 / 5; grid-row: 1; display: block; align-self: start; margin-bottom: 0; }
  #inside .section-intro > p, #study-tools .section-intro > p, #faq .section-intro > p { margin-top: var(--space-3); }
  #inside > :not(.section-intro), #study-tools > :not(.section-intro), #faq > :not(.section-intro) { grid-column: 5 / 13; }
  #inside { grid-template-rows: auto 1fr; }
  #inside > .walkthrough { grid-row: 1 / span 2; }
  #inside > .gallery-trigger { grid-column: 1 / 5; grid-row: 2; align-self: start; justify-self: start; margin-top: var(--space-4); }
}
@media (max-width: 960px) {
  .section-intro { display: block; }
  .section-intro > p { margin-top: var(--space-2); }
  #inside > .gallery-trigger { justify-self: start; margin-top: var(--space-4); }
}
@media (max-width: 720px) {
  .home-section, .pricing-section { padding-block: var(--space-7); }
  .section-intro h2 { font-size: 26px; }
  .section-intro { margin-bottom: var(--space-5); }
}

/* Walkthrough: one question in a practice-session window. Without script every part shows, stacked.
   The correct-answer highlight belongs to stages 2 and 3 of the live walkthrough only. Parts not yet shown are
   hidden with visibility, not display, so the window keeps its height and autoplay never moves the page. */
.walkthrough-window { overflow: hidden; background: var(--paper-raised); border: 1px solid var(--rule-strong); border-radius: var(--radius-l); }
.walkthrough-bar { display: flex; justify-content: space-between; gap: var(--space-4); padding: var(--space-2) var(--space-4); background: var(--green-900); color: var(--on-green); font-size: 13px; font-weight: 600; }
.walkthrough-bar span + span { color: var(--on-green-muted); font-weight: 500; }
.walkthrough-body { padding: var(--space-5); }
.walkthrough-topic, .quiz-topic { margin-bottom: var(--space-3); font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }
.walkthrough-question { margin-bottom: var(--space-5); font-size: 17px; line-height: 1.65; max-width: 68ch; }
.walkthrough-options, .quiz-options { display: grid; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.walkthrough-options li, .quiz-options button { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; column-gap: var(--space-3); min-height: 52px; padding: var(--space-2) var(--space-4) var(--space-2) var(--space-3); background: var(--paper-raised); border: 1px solid var(--rule-strong); border-radius: var(--radius-m); font-size: 15px; line-height: 1.45; }
.walkthrough-options li > span, .quiz-options button > span { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--rule-strong); border-radius: var(--radius-s); font-size: 13px; font-weight: 700; }
.walkthrough-mark { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--correct); white-space: nowrap; }
.walkthrough.is-live[data-stage="2"] .walkthrough-correct, .walkthrough.is-live[data-stage="3"] .walkthrough-correct { border-color: var(--correct); background: var(--correct-050); box-shadow: inset 3px 0 0 var(--correct); }
.walkthrough.is-live[data-stage="2"] .walkthrough-correct > span, .walkthrough.is-live[data-stage="3"] .walkthrough-correct > span { background: var(--correct); border-color: var(--correct); color: #fff; }
.walkthrough.is-live[data-stage="1"] .walkthrough-mark, .walkthrough.is-live[data-stage="1"] .walkthrough-explanation, .walkthrough.is-live[data-stage="2"] .walkthrough-explanation { visibility: hidden; }
.walkthrough-explanation { margin-top: var(--space-5); padding-left: var(--space-4); border-left: 2px solid var(--amber); }
.walkthrough-explanation strong { display: block; margin-bottom: var(--space-2); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--amber-ink); }
.walkthrough-explanation p, .quiz-explanation p { font-size: 15px; line-height: 1.65; max-width: 68ch; }
.question-source { margin-top: var(--space-2); font-size: 13px; color: var(--ink-muted); }
.question-source a { overflow-wrap: anywhere; }
.walkthrough-controls:not([hidden]) { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-3); margin-top: var(--space-3); }
.walkthrough-controls p { font-size: 14px; color: var(--ink-muted); }
.walkthrough-count { font-weight: 700; letter-spacing: 0.06em; color: var(--ink); }
.walkthrough-buttons { display: flex; gap: var(--space-2); }
.walkthrough-buttons button, .gallery-close, .gallery-controls button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; background: var(--paper-raised); border: 1px solid var(--rule-strong); border-radius: var(--radius-m); color: var(--green-900); cursor: pointer; }
.gallery-dialog .icon { width: 20px; height: 20px; }
.walkthrough-buttons button:hover, .gallery-close:hover, .gallery-controls button:hover { background: var(--green-050); border-color: var(--green-700); }
@media (max-width: 720px) {
  .walkthrough-body { padding: var(--space-4); }
  .walkthrough-question { font-size: 16px; }
  .walkthrough-options li, .quiz-options button { grid-template-columns: 28px minmax(0, 1fr); padding-right: var(--space-3); }
  .walkthrough-mark, .quiz-options button::after { grid-column: 2; }
}

/* Mini session. Options are plain rows until quiz.mjs marks the quiz live; only then do they look clickable. */
.quiz { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: var(--gap); align-items: stretch; }
.quiz-question { padding: var(--space-5); background: var(--paper-raised); border: 1px solid var(--rule); border-top: 2px solid var(--green-900); border-radius: var(--radius-m); }
.mock-bar { padding: var(--space-2) var(--space-4); background: var(--amber); color: var(--ink); font-size: 14px; text-align: center; }
.mock-tag { display: block; width: fit-content; margin-bottom: var(--space-3); padding: 2px var(--space-2); border: 1px solid var(--amber); border-radius: var(--radius-s); font-size: 11.5px; font-weight: 700; color: var(--amber-ink); }
.quiz-stacked { grid-template-columns: minmax(0, 1fr); }
.quiz-number, .quiz-spec { margin-bottom: var(--space-2); font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }
.quiz-prompt { margin-bottom: var(--space-4); font-size: 16px; line-height: 1.6; }
.quiz-options button { width: 100%; text-align: left; color: var(--ink); cursor: default; }
.quiz.is-live .quiz-options button:not(:disabled) { cursor: pointer; }
.quiz.is-live .quiz-options button:not(:disabled):hover { border-color: var(--green-700); background: var(--green-050); }
.quiz-options button:disabled { color: var(--ink); opacity: 1; }
.quiz-options button::after { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; white-space: nowrap; }
.quiz-options .is-correct { border-color: var(--correct); background: var(--correct-050); box-shadow: inset 3px 0 0 var(--correct); }
.quiz-options .is-correct > span { background: var(--correct); border-color: var(--correct); color: #fff; }
.quiz-options .is-correct::after { content: "Correct"; color: var(--correct); }
.quiz-options .is-wrong { border-color: var(--wrong); background: var(--wrong-050); box-shadow: inset 3px 0 0 var(--wrong); }
.quiz-options .is-wrong > span { background: var(--wrong); border-color: var(--wrong); color: #fff; }
.quiz-options .is-wrong::after { content: "Your answer"; color: var(--wrong); }
.quiz-explanation { margin-top: var(--space-4); }
.quiz-explanation summary { display: flex; align-items: center; min-height: 44px; color: var(--green-900); font-size: 14.5px; font-weight: 700; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; cursor: pointer; list-style: none; }
.quiz-explanation summary::-webkit-details-marker { display: none; }
.quiz-explanation summary::before { content: "+"; display: inline-grid; place-items: center; width: 20px; margin-right: var(--space-2); text-decoration: none; }
.quiz-explanation[open] summary::before { content: "\2212"; }
.quiz-explanation > p, .quiz-explanation > .question-source { padding-left: var(--space-4); border-left: 2px solid var(--amber); }
.quiz-explanation > p { padding-top: var(--space-1); }
.quiz-explanation > .question-source { margin-top: 0; padding-top: var(--space-2); }
/* The result and score lines are empty status regions until quiz.mjs fills them. Empty, they take no space:
   the result has no margin, and the score leaves the grid so it adds no row or gap. */
.quiz-result { margin: 0; font-family: var(--font-display); font-size: 19px; color: var(--correct); }
.quiz-result:not(:empty) { margin-top: var(--space-4); }
.quiz-question:has(.is-wrong) .quiz-result { color: var(--wrong); }
.quiz-score, .quiz > .button { grid-column: 1 / -1; justify-self: start; }
.quiz-score { font-family: var(--font-display); font-size: 22px; color: var(--green-900); }
.quiz-score:empty { position: absolute; }

/* Exams: four ruled columns, like a reference table. */
.exam-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.exam-card { display: flex; flex-direction: column; padding: 0 var(--space-5); border-left: 1px solid var(--rule); }
.exam-card:first-child { padding-left: 0; border-left: 0; }
.exam-card:last-child { padding-right: 0; }
.exam-card h3 { font-size: 32px; }
.exam-card-count { margin-top: var(--space-2); font-weight: 700; color: var(--green-900); }
.exam-card-name { margin: var(--space-1) 0 var(--space-3); font-size: 14px; color: var(--ink-muted); }
.exam-card p:not([class]) { font-size: 15px; line-height: 1.55; }
.exam-card .text-link { margin-top: auto; padding-top: var(--space-3); }
.exam-card .text-link + .text-link { margin-top: 0; padding-top: var(--space-2); }
@media (max-width: 960px) {
  .exam-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--space-6); }
  .exam-card:nth-child(3) { padding-left: 0; border-left: 0; }
  .exam-card:nth-child(2) { padding-right: 0; }
}
@media (max-width: 560px) {
  .exam-grid { grid-template-columns: 1fr; row-gap: 0; }
  .exam-card, .exam-card:nth-child(n) { padding: var(--space-5) 0; border-left: 0; border-top: 1px solid var(--rule); }
  .exam-card:first-child { padding-top: 0; border-top: 0; }
  .exam-card:last-child { padding-bottom: 0; }
}

/* Study tools: ruled rows, name on the left, what it is on the right. */
.tool-grid { display: grid; }
.tool-card { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); column-gap: var(--gap); padding-block: var(--space-5); border-top: 1px solid var(--rule); }
.tool-card:first-child { padding-top: 0; border-top: 0; }
.tool-card h3 { grid-column: 1 / 4; }
.tool-card p { grid-column: 4 / 9; max-width: 60ch; }
@media (max-width: 720px) { .tool-card { display: block; } .tool-card p { margin-top: var(--space-2); } }

/* How it works: four numbered steps on amber rules. */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { padding-top: var(--space-4); border-top: 2px solid var(--amber); counter-increment: step; }
.steps li::before { content: counter(step, decimal-leading-zero); display: block; margin-bottom: var(--space-2); font-size: 13px; font-weight: 700; letter-spacing: 0.08em; color: var(--ink-muted); }
.steps h3 { font-size: 20px; }
.steps p { margin-top: var(--space-2); font-size: 15px; color: var(--ink-muted); }
@media (max-width: 960px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .steps { grid-template-columns: 1fr; gap: var(--space-5); } }

/* Pricing */
.pricing-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); }
.price-card { display: flex; flex-direction: column; min-width: 0; padding: var(--space-5); background: var(--paper-raised); border: 1px solid var(--rule); border-radius: var(--radius-l); }
.price-card h3 { font-size: 22px; }
.plan-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1) var(--space-2); margin-top: var(--space-4); }
.plan-price strong { font-family: var(--font-display); font-size: 36px; font-weight: 400; line-height: 1.1; color: var(--green-900); }
.plan-price span { font-size: 14px; color: var(--ink-muted); }
.price-card-free { background: transparent; border-color: var(--rule-strong); border-style: dashed; }
.price-card-free .plan-price strong { font-size: 24px; line-height: 1.25; }
.plan-monthly { margin-top: var(--space-2); font-size: 15px; font-weight: 600; }
.plan-saving { align-self: flex-start; margin-top: var(--space-2); padding: 1px var(--space-2); background: var(--amber-050); border: 1px solid #e3d3ab; border-radius: var(--radius-s); color: var(--amber-ink); font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.plan-note { margin-top: var(--space-3); font-size: 14px; color: var(--ink-muted); }
.plan-terms { margin-top: auto; padding-top: var(--space-4); font-size: 13px; line-height: 1.5; color: var(--ink-muted); }
.price-card .plan-terms { border-top: 0; }
.price-card .button { width: 100%; margin-top: var(--space-4); }
.price-card-free .button { margin-top: auto; }
.price-card-free .plan-price { margin-bottom: var(--space-4); }
.pricing-fine-print { margin-top: var(--space-4); font-size: 13px; color: var(--ink-muted); }
@media (max-width: 1100px) { .pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .pricing-grid { grid-template-columns: 1fr; } }

/* Guide cards: the home page's featured guides and the guide index. */
.article-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.article-card { display: flex; flex-direction: column; min-width: 0; }
.article-image { display: block; margin-bottom: var(--space-4); overflow: hidden; aspect-ratio: 5 / 2; border: 1px solid var(--rule); border-radius: var(--radius-m); }
.article-image img { width: 100%; height: 100%; object-fit: cover; }
.article-card h3 { font-size: 20px; }
.article-card h3 a { text-decoration: none; }
.article-card h3 a:hover { text-decoration: underline; }
.article-card p { margin-top: var(--space-2); font-size: 15px; color: var(--ink-muted); }
.article-card .text-link { margin-top: auto; padding-top: var(--space-2); }
#guides > .text-link { justify-self: start; margin-top: var(--space-4); }
@media (max-width: 960px) { .article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .article-grid { grid-template-columns: 1fr; } }

/* Questions: the home page list and FAQ blocks on reading pages share one look. */
.faq { border-top: 1px solid var(--rule); }
.faq:last-child { border-bottom: 1px solid var(--rule); }
.faq summary { display: grid; grid-template-columns: minmax(0, 1fr) 24px; align-items: center; gap: var(--space-4); min-height: 48px; padding: var(--space-3) 0; font-weight: 700; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; justify-self: end; font-size: 20px; font-weight: 500; color: var(--green-900); }
.faq[open] summary::after { content: "\2212"; }
.faq p { max-width: 68ch; padding-bottom: var(--space-4); line-height: 1.65; }

/* Closing: the one green panel below the hero. */
.closing { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-5); margin-block: 0 var(--space-8); padding: var(--space-7); background: var(--green-900); color: var(--on-green); border-radius: var(--radius-l); }
.closing p { max-width: 46ch; font-family: var(--font-display); font-size: 22px; line-height: 1.4; }
@media (max-width: 720px) { .closing { margin-bottom: var(--space-7); padding: var(--space-5); } .closing p { font-size: 19px; } }

/* Gallery: a plain dialog around one screenshot; phone screenshots sit in a drawn device frame. */
.gallery-trigger { min-height: 44px; padding: var(--space-2) 0; background: none; border: 0; border-bottom: 1px solid currentColor; color: var(--green-900); font-size: 15px; font-weight: 700; cursor: pointer; }
.gallery-dialog { width: min(1080px, calc(100% - 48px)); max-width: none; max-height: calc(100dvh - 48px); padding: var(--space-5); background: var(--paper); color: var(--ink); border: 1px solid var(--rule); border-radius: var(--radius-l); box-shadow: var(--shadow); overscroll-behavior: contain; }
.gallery-dialog::backdrop { background: rgba(24, 59, 50, 0.85); }
.gallery-close { margin: 0 0 var(--space-3) auto; }
.gallery-figure { margin: 0; }
.gallery-stage { display: grid; place-items: center; min-height: 200px; padding: var(--space-5); background: var(--paper-sunk); border: 1px solid var(--rule); border-radius: var(--radius-m); overflow: hidden; touch-action: pan-y pinch-zoom; }
.gallery-image { width: auto; max-width: 100%; height: auto; max-height: clamp(160px, calc(100dvh - 300px), 650px); object-fit: contain; border-radius: var(--radius-s); }
.gallery-device-iphone .gallery-image { padding: 8px; background: #171a18; border: 2px solid #5c605d; border-radius: var(--device-radius); }
.gallery-figure figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-3) var(--space-5); padding-top: var(--space-4); }
.gallery-caption { font-size: 15px; line-height: 1.55; }
.gallery-controls { display: flex; align-items: center; gap: var(--space-2); }
.gallery-count { min-width: 64px; text-align: center; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; color: var(--ink-muted); }
@media (max-width: 720px) {
  .gallery-dialog { width: calc(100% - 24px); max-height: calc(100dvh - 24px); padding: var(--space-4); }
  .gallery-stage { padding: var(--space-3); }
  .gallery-image { max-height: clamp(160px, calc(100dvh - 260px), 650px); }
}

/* Reading pages: guides, exam pages, About. */
.page-intro { padding-block: var(--space-5) var(--space-7); border-bottom: 1px solid var(--rule); }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--space-2); margin-bottom: var(--space-5); font-size: 13px; color: var(--ink-muted); }
.breadcrumbs a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.crumb-divider { color: var(--rule-strong); }
.page-intro h1 { max-width: 24ch; font-size: clamp(30px, 1.8vw + 18px, 44px); line-height: 1.15; }
.page-deck { margin-top: var(--space-4); max-width: 62ch; font-size: 19px; line-height: 1.55; color: var(--ink-muted); }
.page-date { margin-top: var(--space-4); font-size: 13px; color: var(--ink-muted); }
.reading-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); padding-block: var(--space-7) var(--space-8); }
.reading-content { grid-column: 1 / 9; min-width: 0; max-width: 760px; }
.reading-content > p { margin-bottom: var(--space-5); font-size: 17px; line-height: 1.75; max-width: 70ch; }
.reading-content > h2 { margin: var(--space-7) 0 var(--space-4); font-size: 26px; scroll-margin-top: var(--space-5); }
.reading-content > h2:first-child, .reading-content > .contents + h2 { margin-top: 0; }
.reading-content ul, .reading-content ol { margin: 0 0 var(--space-5); padding-left: var(--space-5); font-size: 17px; line-height: 1.7; }
.reading-content li { margin-bottom: var(--space-2); }
.reading-content li::marker { color: var(--green-700); }
.reading-content a { overflow-wrap: anywhere; }
.reading-content strong { font-weight: 700; }
.reading-content .faq { font-size: 16px; }
.reading-content .faq + p, .reading-content .faq + h2 { margin-top: var(--space-6); }
.reading-content .article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: var(--space-6); }
.contents { margin-bottom: var(--space-6); padding: var(--space-4) var(--space-5); background: var(--paper-raised); border: 1px solid var(--rule); border-left: 3px solid var(--amber); }
.contents > strong { font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }
.contents ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--space-6); margin: var(--space-2) 0 0; padding: 0; list-style: none; font-size: 15px; line-height: 1.4; }
.contents li { margin: 0; }
.contents a { display: inline-flex; align-items: center; min-height: 44px; }
/* Exam pages: byline, the note on which page applies, prep list, offer panel, sources box, one-column questions. */
.page-byline { margin-top: var(--space-4); font-size: 14px; font-weight: 700; color: var(--ink); }
.page-reviewer { margin-top: var(--space-1); font-size: 14px; font-weight: 700; color: var(--ink); }
.page-byline + .page-date, .page-reviewer + .page-date { margin-top: var(--space-1); }
.applies-note { margin-bottom: var(--space-6); padding: var(--space-3) 0; border-block: 1px solid var(--rule-strong); font-size: 16px; line-height: 1.6; max-width: 70ch; }
.reading-content .exam-prep { padding: 0; list-style: none; }
.reading-content .exam-prep li { margin: 0; padding: var(--space-3) 0; border-top: 1px solid var(--rule); }
.reading-content .exam-prep li:last-child { border-bottom: 1px solid var(--rule); }
.exam-prep strong { font-family: var(--font-display); font-size: 20px; font-weight: 400; color: var(--green-900); }
.offer-callout { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4); margin: var(--space-7) 0 0; padding: var(--space-5); background: var(--paper-raised); border: 1px solid var(--rule); border-radius: var(--radius-m); }
.offer-callout p { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.5; color: var(--green-900); }
.sources-box { margin-top: var(--space-7); padding: var(--space-4) var(--space-5); background: var(--paper-raised); border: 1px solid var(--rule); border-left: 3px solid var(--amber); }
.sources-box h2 { margin-bottom: var(--space-3); font-size: 20px; scroll-margin-top: var(--space-5); }
.reading-content .sources-box ul { margin-bottom: var(--space-3); padding-left: var(--space-5); font-size: 15px; line-height: 1.55; }
.sources-reviewed { font-size: 13px; color: var(--ink-muted); }
.reading-content .quiz { grid-template-columns: minmax(0, 1fr); margin-bottom: var(--space-5); }
.reading-content .quiz-options { margin: 0; padding: 0; }
.reading-content .quiz-options li { margin: 0; }
.reading-sidebar { grid-column: 10 / 13; align-self: start; position: sticky; top: var(--space-5); }
.reading-sidebar > a { display: block; padding: var(--space-3) 0; border-top: 1px solid var(--rule); text-decoration: none; }
.reading-sidebar > a:last-child { border-bottom: 1px solid var(--rule); font-weight: 700; text-decoration: underline; }
.reading-sidebar strong { display: block; font-family: var(--font-display); font-size: 20px; font-weight: 400; color: var(--green-900); }
.reading-sidebar span:not(.eyebrow) { display: block; margin-top: var(--space-1); font-size: 13px; color: var(--ink-muted); }
.reading-sidebar a[aria-current] { padding-left: var(--space-3); box-shadow: inset 3px 0 0 var(--amber); }
.reading-sidebar a:hover strong { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
@media (max-width: 960px) {
  .reading-content { grid-column: 1 / -1; }
  .reading-sidebar { grid-column: 1 / -1; position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gap); margin-top: var(--space-7); }
  .reading-sidebar .eyebrow { grid-column: 1 / -1; }
  .reading-sidebar > a:last-child { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .page-deck { font-size: 17px; }
  .reading-grid { padding-block: var(--space-6) var(--space-7); }
  .reading-content > p, .reading-content ul, .reading-content ol { font-size: 16px; }
  .reading-content > h2 { font-size: 23px; }
  .contents ul { grid-template-columns: 1fr; }
  .reading-content .article-grid { grid-template-columns: 1fr; }
}

/* Tables */
.table-scroll { max-width: 100%; margin: var(--space-5) 0; overflow-x: auto; background: var(--paper-raised); border: 1px solid var(--rule); border-radius: var(--radius-m); }
table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.55; }
th, td { padding: var(--space-3) var(--space-4); text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); }
tbody tr:last-child td { border-bottom: 0; }
th { background: var(--paper-sunk); font-size: 13px; font-weight: 700; letter-spacing: 0.02em; color: var(--ink); }
@media (max-width: 720px) { th, td { padding: var(--space-2) var(--space-3); } }
/* A linked name in a table's first column (a state on the licensing hub or the tracker) and a source link in a stacked
   table's Source column (the tracker, a state's routes) keep their words whole, where other links in the text may
   break anywhere. */
.reading-content td:first-child a, .reading-content .table-stack td[data-label="Source"] a { overflow-wrap: normal; }
/* The PLSS tracker's 55 rows in five columns (its region is named after its first column, src/markdown.mjs): a size
   smaller, with the note widest and room for the source cell's three lines, so it fits the reading column from
   1440px down to 1024px without a sideways scroll. On a phone it stacks like the state tables. */
@media (min-width: 600px) {
  .table-scroll[aria-label="State or territory table"] table { font-size: 14px; }
  .table-scroll[aria-label="State or territory table"] :is(th, td) { padding-inline: var(--space-3); }
  .table-scroll[aria-label="State or territory table"] th:nth-child(1) { width: 15%; }
  .table-scroll[aria-label="State or territory table"] th:nth-child(2) { width: 14%; }
  .table-scroll[aria-label="State or territory table"] th:nth-child(3) { width: 11%; }
  .table-scroll[aria-label="State or territory table"] th:nth-child(4) { width: 34%; }
  .table-scroll[aria-label="State or territory table"] th:nth-child(5) { width: 26%; }
}
/* A wide state table (the routes) on a phone: each row a block, each value under its column's name. */
@media (max-width: 599px) {
  .table-stack { overflow-x: visible; }
  .table-stack table, .table-stack tbody, .table-stack tr, .table-stack td { display: block; width: 100%; }
  .table-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .table-stack tr { padding: var(--space-2) 0; border-bottom: 1px solid var(--rule); }
  .table-stack tbody tr:last-child { border-bottom: 0; }
  .table-stack td { border-bottom: 0; padding: var(--space-1) var(--space-3); overflow-wrap: anywhere; }
  .table-stack td:empty { display: none; }
  .table-stack td::before { content: attr(data-label); display: block; font-size: 13px; font-weight: 700; letter-spacing: 0.02em; color: var(--ink); }
}

/* Footer */
.site-footer { background: var(--paper-sunk); border-top: 1px solid var(--rule); }
.footer-top { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: start; padding-block: var(--space-6) var(--space-5); }
.footer-top .brand { grid-column: 1 / 5; color: var(--green-900); }
.footer-top .brand span { font-size: 19px; }
.footer-top .brand img { width: 40px; }
.footer-top > p { grid-column: 1 / 5; margin-top: var(--space-2); font-size: 14px; color: var(--ink-muted); }
.footer-top nav { grid-column: 5 / 13; grid-row: 1 / span 2; display: flex; flex-wrap: wrap; column-gap: var(--space-5); justify-content: flex-end; }
.footer-top nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; font-weight: 600; color: var(--ink); }
.footer-contact { padding-block: var(--space-4); border-top: 1px solid var(--rule); font-size: 15px; color: var(--ink); }
.footer-contact a { font-weight: 600; text-decoration: underline; overflow-wrap: anywhere; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2) var(--space-6); padding-block: var(--space-4) var(--space-6); border-top: 1px solid var(--rule); font-size: 13px; color: var(--ink-muted); }
@media (max-width: 960px) {
  .footer-top { display: block; }
  .footer-top nav { justify-content: flex-start; margin-top: var(--space-4); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
  .site-header nav, .menu-toggle, .site-header .button, .header-launch, .reading-sidebar, .hero-image, .contents, .walkthrough-controls, .gallery-trigger { display: none !important; }
  body, .hero, .closing { background: #fff; color: #000; }
  .hero h1, .hero-description, .hero-stats dd, .hero-stats dt, .hero-offer-line, .closing p { color: #000; }
  .hero-copy { padding: 0; }
  .reading-grid { display: block; }
  .price-card, .quiz-question { break-inside: avoid; }
}

/* Practice pages: the related-page links under the questions. */
.practice-links { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); margin-top: var(--space-6); font-size: 16px; font-weight: 700; }
.practice-links a { color: var(--green-900); }

/* Guides: the disclaimer under the sources box and the related-page links. */
.guide-disclaimer { margin-top: var(--space-5); padding-top: var(--space-3); border-top: 1px solid var(--rule); font-size: 14px; line-height: 1.55; color: var(--ink-muted); }
.related-links { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2) var(--space-5); margin-top: var(--space-5); font-size: 16px; font-weight: 700; }
.related-links strong { color: var(--ink-muted); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.related-links a { color: var(--green-900); }

/* Library: one list per group of free pages, thin rules between items. */
.library-group { margin-top: var(--space-6); }
.reading-content .library-list { list-style: none; margin: var(--space-3) 0 0; padding: 0; border-top: 1px solid var(--rule); }
.reading-content .library-list li { margin: 0; padding: var(--space-4) 0; border-bottom: 1px solid var(--rule); }
.library-list .eyebrow { margin-bottom: var(--space-1); }
.library-list a { font-family: var(--font-display); font-size: 19px; color: var(--green-900); }
.library-list p { margin-top: var(--space-1); font-size: 15px; color: var(--ink-muted); }

/* Audio page: the optional sample clip with its transcript, and the optional outside links. */
.audio-clip { margin: 0 0 var(--space-5); padding: var(--space-4) var(--space-5); background: var(--paper-raised); border: 1px solid var(--rule); border-radius: var(--radius-m); }
.audio-clip figcaption { margin-bottom: var(--space-3); font-weight: 700; color: var(--green-900); }
.audio-clip audio { display: block; width: 100%; }
.audio-transcript { margin-top: var(--space-3); }
.audio-transcript summary { display: flex; align-items: center; min-height: 44px; font-weight: 700; color: var(--green-900); cursor: pointer; }
.audio-transcript p:last-child { margin-bottom: 0; }
.reading-content .audio-links { padding: 0; list-style: none; }
.reading-content .audio-links li { margin: 0; padding: var(--space-3) 0; border-top: 1px solid var(--rule); }
.reading-content .audio-links li:last-child { border-bottom: 1px solid var(--rule); }
.audio-links a { font-weight: 700; color: var(--green-900); }

/* Home: the audio card's link to the audio page sits under its text. */
.tool-card .text-link { grid-column: 4 / 9; }

/* Glossary: the letter list, one definition list per letter, and the dotted link a page gives a term on first use. */
.glossary-letters ul { display: flex; flex-wrap: wrap; gap: var(--space-1); margin: 0 0 var(--space-6); padding: 0; list-style: none; }
.reading-content .glossary-letters li { margin: 0; }
.glossary-letters a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border: 1px solid var(--rule); border-radius: var(--radius-s); background: var(--paper-raised); font-weight: 700; text-decoration: none; }
.glossary-letters a:hover { border-color: var(--green-700); }
.glossary-list { margin: 0 0 var(--space-5); border-top: 1px solid var(--rule); }
.glossary-term { padding: var(--space-4) 0; border-bottom: 1px solid var(--rule); scroll-margin-top: var(--space-5); }
.glossary-term:target { box-shadow: inset 3px 0 0 var(--amber); padding-left: var(--space-3); }
.glossary-term dt { font-family: var(--font-display); font-size: 20px; color: var(--green-900); }
.glossary-term dd { margin: var(--space-2) 0 0; font-size: 17px; line-height: 1.7; max-width: 70ch; }
.glossary-term .glossary-meta { margin-top: var(--space-1); font-size: 14px; line-height: 1.55; color: var(--ink-muted); }
.reading-content a[href^="/surveying-glossary/#"] { text-decoration-style: dotted; text-decoration-thickness: 1px; }
@media (max-width: 720px) { .glossary-term dd { font-size: 16px; } }

/* Topics: formula blocks (one formula a line, in the text font) and inline drawings. A drawing keeps a minimum width
   so its labels stay readable, and scrolls sideways inside its own box on a phone instead of widening the page. */
.formula { margin: 0 0 var(--space-5); padding: var(--space-3) var(--space-4); overflow-x: auto; background: var(--paper-raised); border-left: 3px solid var(--green-700); font-family: var(--font-sans); font-size: 17px; line-height: 1.7; font-variant-numeric: tabular-nums; white-space: pre-wrap; color: var(--ink); }
.topic-figure { margin: var(--space-5) 0 var(--space-6); }
.figure-scroll { max-width: 100%; overflow-x: auto; background: var(--paper-raised); border: 1px solid var(--rule); border-radius: var(--radius-m); }
.figure-scroll svg { display: block; width: 100%; min-width: 560px; height: auto; }
.topic-figure figcaption { margin-top: var(--space-2); font-size: 14px; line-height: 1.55; color: var(--ink-muted); max-width: 70ch; }
@media (max-width: 720px) { .formula { font-size: 16px; } }

/* Tool pages: the calculator form (hidden until its script runs), its results and the study-aid line. Fields stack on a
   phone and sit two or three across on a wide screen. An empty message line takes no height, so a result never jumps
   when an error appears and goes. */
.tool { margin: 0 0 var(--space-4); padding: var(--space-5); background: var(--paper-raised); border: 1px solid var(--rule-strong); border-radius: var(--radius-l); }
.tool-fields { display: grid; grid-template-columns: 1fr; gap: var(--space-4) var(--space-5); }
@media (min-width: 720px) { .tool-fields { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); } }
.tool-field { min-width: 0; }
.tool-field label { display: block; margin-bottom: var(--space-1); font-size: 15px; font-weight: 700; color: var(--green-900); }
.tool-field input, .tool-field select { display: block; width: 100%; min-height: 44px; padding: var(--space-2) var(--space-3); background: #fff; border: 1px solid var(--rule-strong); border-radius: var(--radius-m); font-size: 17px; font-variant-numeric: tabular-nums; }
.tool-field input:hover, .tool-field select:hover { border-color: var(--green-700); }
.tool-field [aria-invalid="true"] { border-color: var(--wrong); background: var(--wrong-050); box-shadow: inset 3px 0 0 var(--wrong); }
.tool-hint { margin-top: var(--space-1); font-size: 13.5px; line-height: 1.45; color: var(--ink-muted); }
.tool-error { margin: 0; font-size: 14.5px; font-weight: 700; line-height: 1.45; color: var(--wrong); }
.tool-field .tool-error:not(:empty) { margin-top: var(--space-1); }
.tool-error-general:not(:empty) { margin-top: var(--space-4); }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.tool-results { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0; margin: var(--space-5) 0 0; padding: 0; border-top: 1px solid var(--rule); font-variant-numeric: tabular-nums; }
.tool-results dt, .tool-results dd { margin: 0; padding: var(--space-2) 0; border-bottom: 1px solid var(--rule); }
.tool-results dt { padding-right: var(--space-4); color: var(--ink-muted); font-size: 15px; }
.tool-results dd { min-height: 1.6em; font-size: 17px; font-weight: 700; text-align: right; color: var(--green-900); overflow-wrap: anywhere; }
.tool-rounding { margin-top: var(--space-3); font-size: 14px; line-height: 1.5; color: var(--ink-muted); }
.tool-note, .tool-noscript { max-width: 70ch; margin-bottom: var(--space-5); font-size: 15px; line-height: 1.55; color: var(--ink-muted); }
.tool-noscript { padding: var(--space-3) var(--space-4); background: var(--paper-raised); border-left: 3px solid var(--amber); color: var(--ink); }
.tool-example .table-scroll { margin-bottom: var(--space-4); }
.tool-topic, .topic-tools { margin-top: var(--space-5); font-size: 16px; font-weight: 700; }
