/* The Car-Buying Revolution: site styles.
   Colors come from the book cover: navy, peach and white.
   Type: Bebas Neue for display, Barlow Condensed for labels, Barlow for text.
   All three are SIL Open Font License fonts, served from /fonts/. */

@font-face {
  font-family: "Bebas Neue";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/bebas-neue-400.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/barlow-400.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/barlow-400-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/barlow-600.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/barlow-700.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/barlow-condensed-500.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/barlow-condensed-600.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/barlow-condensed-700.woff2") format("woff2");
}

:root {
  --navy-950: #04141f;
  --navy-900: #0a1d2c;
  --navy-800: #0d2536;
  --navy-700: #15324a;
  --navy-600: #1e4260;
  --peach: #f2c7a5;
  --peach-300: #f6d7bf;
  --peach-100: #fbeee3;
  --copper: #8a4f2c;
  /* copper for text on peach: 5.9:1, where --copper gives only 4.2:1 */
  --copper-deep: #6b3c20;
  --error: #b3261e;
  --paper: #f6f1ea;
  --studio: #eeeeee;
  --white: #ffffff;
  --ink: #0a1d2c;
  --ink-2: #3f4f5d;
  --mist: #a9bccb;
  --line-dark: rgba(255, 255, 255, 0.13);
  --line-light: rgba(10, 29, 44, 0.14);

  --font-display: "Bebas Neue", "Oswald", "Arial Narrow", Impact, sans-serif;
  --font-label: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --font-text: "Barlow", "Helvetica Neue", Arial, system-ui, sans-serif;

  --gutter: 16px;
  --max: 1240px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-lg: 0 30px 60px -30px rgba(4, 20, 31, 0.55);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  /* "only" keeps browser forced dark modes from inverting the page */
  color-scheme: only light;
}

@media (min-width: 640px) {
  :root { --gutter: 28px; }
}
@media (min-width: 1100px) {
  :root { --gutter: 44px; }
}

/* Base ---------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--navy-950);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
/* Keep focused fields and jump targets clear of the sticky bars:
   the header from 900px up, the questionnaire's progress bar below 1200px
   and the worksheet's running total below 1100px. */
@media (min-width: 900px) {
  html { scroll-padding-top: 84px; }
}
@media (max-width: 1199px) {
  html.page-quiz { scroll-padding-bottom: 96px; }
}
@media (max-width: 1099px) {
  html.page-afford { scroll-padding-bottom: 104px; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-feature-settings: "kern", "liga";
  overflow-x: hidden;
}
@media (min-width: 900px) {
  body { font-size: 1.125rem; }
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
p { margin: 0 0 1em; }
strong { font-weight: 700; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
ul, ol { margin: 0; padding: 0; }
button, input, select { font: inherit; color: inherit; }
abbr[title] { text-decoration: none; }

:focus-visible {
  outline: 3px solid var(--focus, var(--copper));
  outline-offset: 3px;
  border-radius: 4px;
}
/* on navy, the focus ring is peach so it keeps its contrast */
.on-dark, .on-deep, .site-header, .site-footer, .hero, .page-hero, .tool-card,
.result-card, .summary, .quiz-aside-card, .book-band, .mobile-total, .quiz-bar, .stat--lead,
.loan-card {
  --focus: var(--peach);
}
.next-step, .band { --focus: var(--navy-950); }

[hidden] { display: none !important; }

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

/* keeps a hyphenated word, such as out-the-door, on one line */
.nowrap { white-space: nowrap; }

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--peach);
  color: var(--navy-950);
  font-family: var(--font-label);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-radius: 8px;
}
.skip-link:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(64px, 5vw + 40px, 128px); }
.section--tight { padding-block: clamp(48px, 3vw + 32px, 88px); }
.on-dark { background: var(--navy-800); color: var(--white); }
.on-deep { background: var(--navy-900); color: var(--white); }
.on-paper { background: var(--paper); color: var(--ink); }
.on-studio { background: var(--studio); color: var(--ink); }
.on-white { background: var(--white); color: var(--ink); }

[tabindex="-1"]:focus { outline: none; }

/* Type ---------------------------------------------------------------- */

.kicker {
  margin: 0 0 14px;
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.3;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--copper);
}
.on-dark .kicker,
.on-deep .kicker { color: var(--peach); }
.kicker .accent { color: var(--peach); }

.display {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.h2 {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 1.9rem + 3.4vw, 5rem);
  line-height: 0.92;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  /* no word left alone on the last line of a heading */
  text-wrap: balance;
}
.h3 {
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.15;
  letter-spacing: 0.01em;
}

.lead {
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.3125rem);
  line-height: 1.55;
  max-width: 38em;
  text-wrap: pretty;
}
.muted { color: var(--ink-2); }
.on-dark .muted,
.on-deep .muted { color: var(--mist); }

.section-head { max-width: 46rem; margin-bottom: clamp(32px, 3vw, 56px); }
.section-head .h2 { margin-bottom: 18px; }
.section-head p:last-child { margin-bottom: 0; }

/* The cover's top line: white, with the two peach words */
.kicker--cover { color: var(--white) !important; }
.kicker--cover .accent { color: var(--peach); }
.kicker { text-wrap: balance; }

/* Buttons ------------------------------------------------------------- */

.btn {
  --btn-bg: var(--peach);
  --btn-fg: var(--navy-950);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 24px;
  border: 2px solid var(--btn-bg);
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 1.125rem;
  line-height: 1.1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  /* a label that wraps stays centred in its pill */
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms var(--ease), background-color 160ms var(--ease), box-shadow 160ms var(--ease);
}
.btn:hover { background: var(--peach-300); border-color: var(--peach-300); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn--lg { min-height: 60px; padding: 14px 30px; font-size: 1.25rem; }
.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--white);
  border-color: rgba(255, 255, 255, 0.55);
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.08); border-color: var(--white); }
.btn--navy { --btn-bg: var(--navy-800); --btn-fg: var(--peach); }
.btn--navy:hover { background: var(--navy-700); border-color: var(--navy-700); }
.btn--line { --btn-bg: transparent; --btn-fg: var(--ink); border-color: var(--ink); }
.btn--line:hover { background: rgba(10, 29, 44, 0.06); border-color: var(--ink); }
.btn--small { min-height: 44px; padding: 8px 18px; font-size: 1rem; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px 14px; align-items: center; }

.text-link {
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-block: 6px;
  border-bottom: 2px solid currentColor;
}
.text-link:hover { color: var(--copper); }
.on-dark .text-link:hover,
.on-deep .text-link:hover { color: var(--peach); }
.text-link svg { width: 18px; height: 18px; }

/* Header -------------------------------------------------------------- */

.site-header {
  position: relative;
  z-index: 20;
  background: var(--navy-950);
  color: var(--white);
  border-bottom: 1px solid var(--line-dark);
}
@media (min-width: 900px) {
  .site-header { position: sticky; top: 0; }
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 20px;
  min-height: 68px;
  padding-block: 10px;
}
.wordmark {
  display: inline-flex;
  flex-direction: column;
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 0.86;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--white);
}
.wordmark .top { color: var(--peach); }
.wordmark:hover { text-decoration: none; }
.wordmark:hover .bottom { color: var(--peach-300); }

.site-nav { order: 3; width: 100%; }
.site-nav ul {
  display: flex;
  gap: 4px 22px;
  list-style: none;
  padding-block: 6px 4px;
  border-top: 1px solid var(--line-dark);
}
.site-nav a {
  display: inline-block;
  padding-block: 8px;
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--mist);
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--white); }
.site-nav a[aria-current="page"] { color: var(--white); border-bottom-color: var(--peach); }
.nav-long { display: none; }
.header-buy { order: 2; }

@media (min-width: 900px) {
  .site-nav { order: 2; width: auto; margin-left: auto; }
  .site-nav ul { border-top: 0; padding: 0; gap: 30px; }
  .nav-long { display: inline; }
  .nav-short { display: none; }
  .header-buy { order: 3; }
}

/* Hero ---------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1200px 700px at 78% 40%, rgba(46, 88, 122, 0.55), transparent 62%),
    linear-gradient(180deg, var(--navy-950) 0%, var(--navy-800) 46%, var(--navy-800) 100%);
  color: var(--white);
}
.hero::before {
  /* speed lines */
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(115deg, transparent 0 46px, rgba(242, 199, 165, 0.045) 46px 48px);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 35%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 35%, #000 100%);
  pointer-events: none;
}
.hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  padding-block: 32px 56px;
}
.hero-copy { position: relative; z-index: 2; min-width: 0; }
/* On a phone the book sits between the title and the buttons. */
@media (max-width: 899px) {
  .hero-copy { display: contents; }
  .hero-copy .kicker { order: 1; }
  .hero-title { order: 2; }
  .hero-sub { order: 3; }
  .hero-art { order: 4; margin-block: 4px 26px; }
  .hero-lead { order: 5; }
  .hero .btn-row { order: 6; }
  .hero-meta { order: 7; }
}
.hero-title {
  margin: 0 0 20px;
  font-family: var(--font-display);
  /* sized so "The Car-Buying" fills the column on one line */
  font-size: min(17.4vw, 7.25rem);
  line-height: 0.86;
  letter-spacing: 0.005em;
  text-transform: uppercase;
}
/* a line may wrap rather than be clipped when a reader widens the letter spacing */
.hero-title .line { display: block; overflow-wrap: anywhere; }
.hero-title .peach { color: var(--peach); }
/* as on the cover, REVOLUTION is set larger so both lines share one width */
.hero-title .line--big { font-size: 1.35em; line-height: 0.84; }
@media (min-width: 900px) {
  .hero-title { font-size: min(8.6vw, 7.875rem); }
}
/* The three promises, one sentence to a line, in the display face. The
   first words of each are white, the rest peach, as on the cover. */
.hero-sub {
  margin: 0 0 24px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.625rem, 1.05rem + 2.2vw, 2.5rem);
  line-height: 1.04;
  letter-spacing: 0.012em;
  text-transform: uppercase;
  color: var(--peach);
  max-width: 21em;
}
.hero-sub .sub-line { display: block; text-wrap: balance; }
.hero-sub .sub-line + .sub-line { margin-top: 0.22em; }
@media (max-width: 639px) {
  .hero-sub .sub-line + .sub-line { margin-top: 0.5em; }
}
.hero-sub strong { color: var(--white); font-weight: 400; }
.hero-lead {
  max-width: 30em;
  margin-bottom: 28px;
  font-size: clamp(1.125rem, 1rem + 0.4vw, 1.25rem);
  color: #d5e0e8;
}
@media (max-width: 479px) {
  .hero .btn-row .btn { flex: 1 1 100%; }
}
.hero-meta {
  margin: 22px 0 0;
  font-family: var(--font-label);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: var(--mist);
}

.hero-art {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  margin-inline: auto;
  width: min(86%, 440px);
  min-width: 0;
}
.hero-art::before {
  content: "";
  position: absolute;
  width: 88%;
  aspect-ratio: 1;
  left: 9%;
  top: 6%;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, var(--peach-300), var(--peach) 62%, #e7b48c 100%);
  box-shadow: 0 0 0 14px rgba(242, 199, 165, 0.12), 0 0 0 30px rgba(242, 199, 165, 0.05);
}
.hero-art img {
  position: relative;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 34px 34px rgba(4, 20, 31, 0.45));
}

@media (min-width: 900px) {
  .hero .wrap {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    align-items: center;
    gap: 24px;
    padding-block: 64px 88px;
  }
  .hero-art { width: 100%; margin-right: -2%; }
}

/* The cover's peach band, used for the facts strip -------------------- */

.band {
  background: var(--peach);
  color: var(--navy-950);
}
.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  list-style: none;
}
.facts li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 18px 4px;
  border-bottom: 1px solid rgba(4, 20, 31, 0.16);
}
.facts li:nth-child(odd) { border-right: 1px solid rgba(4, 20, 31, 0.16); padding-right: 14px; }
.facts li:nth-child(even) { padding-left: 16px; }
.facts li:nth-last-child(-n + 2) { border-bottom: 0; }
.facts .num {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 2rem + 2.5vw, 4rem);
  line-height: 0.9;
}
.facts .label {
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
@media (min-width: 900px) {
  .facts .label { letter-spacing: 0.16em; }
}
@media (min-width: 900px) {
  .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .facts li,
  .facts li:nth-child(odd),
  .facts li:nth-child(even) {
    justify-content: center;
    padding: 26px 12px;
    border-bottom: 0;
    border-right: 1px solid rgba(4, 20, 31, 0.16);
  }
  .facts li:last-child { border-right: 0; }
}

/* Process ------------------------------------------------------------- */

.steps {
  position: relative;
  display: grid;
  gap: 18px;
  list-style: none;
  counter-reset: step;
  align-items: start;
}
.step {
  position: relative;
  display: grid;
  align-content: start;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 4px 18px;
  padding: 22px 22px 24px;
  background: var(--white);
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
}
.step-num {
  grid-row: span 3;
  font-family: var(--font-display);
  font-size: 4.5rem;
  line-height: 0.82;
  color: transparent;
  -webkit-text-stroke: 2px var(--navy-800);
  text-shadow: 5px 5px 0 var(--peach);
}
.step h3 { margin: 4px 0 2px; }
.step p { margin: 0; color: var(--ink-2); }
.step .text-link { margin-top: 12px; justify-self: start; font-size: 0.9375rem; }

/* On a phone the numeral sits above the heading, so the text gets the width */
@media (max-width: 559px) {
  .step { grid-template-columns: minmax(0, 1fr); }
  .step-num { grid-row: auto; font-size: 3.5rem; margin-bottom: 6px; }
}
@media (min-width: 760px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
}
@media (min-width: 1100px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
  .step {
    grid-template-columns: minmax(0, 1fr);
    padding: 28px 28px 30px;
  }
  .step-num { grid-row: auto; font-size: 5.5rem; margin-bottom: 10px; }
}

.road {
  height: 10px;
  margin: 0 0 clamp(28px, 3vw, 44px);
  border-radius: 6px;
  background:
    repeating-linear-gradient(90deg, var(--peach) 0 40px, transparent 40px 70px) center / 100% 3px no-repeat,
    var(--navy-800);
}

/* Tactics ------------------------------------------------------------- */

.tactics {
  display: grid;
  gap: 16px;
  list-style: none;
}
.tactic {
  display: flex;
  flex-direction: column;
  padding: 26px 24px 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
}
.tactic-figure {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 2.2rem + 1.8vw, 3.75rem);
  line-height: 0.9;
  color: var(--peach);
  text-transform: uppercase;
}
.tactic h3 { margin-bottom: 10px; color: var(--white); }
.tactic .tactic-figure { color: var(--peach); }
.chip {
  display: inline-block;
  margin-top: auto;
  align-self: flex-start;
  padding: 5px 12px;
  border: 1px solid rgba(242, 199, 165, 0.45);
  border-radius: 999px;
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--peach);
}
@media (min-width: 760px) {
  .tactics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
}
@media (min-width: 1100px) {
  .tactics { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
  .tactic { padding: 32px 30px 28px; }
}

/* Before and after: a muted line for what the reader does today, then a
   bold line for what they do after the book. */
.ba { display: grid; gap: 12px; margin: 0 0 18px; }
.ba div { display: grid; gap: 2px; }
.ba dt {
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 0.875rem;
  line-height: 1.3;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--copper);
}
.ba dd { margin: 0; text-wrap: pretty; }
.ba .ba-before dd { color: var(--ink-2); }
.ba .ba-after dd { font-weight: 600; color: var(--ink); }
.on-dark .ba dt,
.on-deep .ba dt { color: var(--peach); }
.on-dark .ba .ba-before dd,
.on-deep .ba .ba-before dd { color: var(--mist); }
.on-dark .ba .ba-after dd,
.on-deep .ba .ba-after dd { color: var(--white); }
.ba a { text-decoration-thickness: 1px; }
/* the gain line: deep copper on paper, peach on navy */
.ba-gain { display: block; margin-top: 8px; color: var(--copper-deep); }
.on-dark .ba-gain,
.on-deep .ba-gain { color: var(--peach-300); }
/* in a section head the label sits beside its line. The label column is in
   rem, so it grows with the reader's text size and the label still fits. */
.ba--head { gap: 10px; margin: 0 0 22px; max-width: 42rem; }
.ba--head div { grid-template-columns: 4.75rem minmax(0, 1fr); align-items: baseline; gap: 12px; }
.ba--head dd { font-size: clamp(1.125rem, 1rem + 0.5vw, 1.3125rem); line-height: 1.4; text-wrap: balance; }

/* Car financing ---------------------------------------------------------- */

/* the book's example beside the same loan at three lengths */
.loan { display: grid; gap: 24px; align-items: start; margin-bottom: clamp(36px, 3.5vw, 56px); }
@media (min-width: 960px) {
  .loan { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 32px; }
}
.loan-card {
  padding: 26px 24px 24px;
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  background: var(--navy-800);
  color: var(--white);
  box-shadow: var(--shadow-lg);
}
@media (min-width: 640px) {
  .loan-card { padding: 32px 34px 30px; }
}
.loan-card p { color: #d5e0e8; text-wrap: pretty; }
.loan-card .kicker { color: var(--peach); margin-bottom: 10px; }
.loan-card .receipt-caption { color: var(--mist); }
.loan-note { margin: 16px 0 0; color: var(--ink-2); max-width: 40em; }
.terms tr.is-example th,
.terms tr.is-example td { background: var(--peach-100); }

/* white cards on paper, paper cards on white */
.cards { display: grid; gap: 16px; list-style: none; }
@media (min-width: 760px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
}
@media (min-width: 1100px) {
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
}
/* in two columns, an odd last card takes the full row instead of sitting
   beside an empty cell */
@media (min-width: 760px) and (max-width: 1099px) {
  .cards > .card:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
.card {
  display: flex;
  flex-direction: column;
  padding: 24px 22px 22px;
  background: var(--white);
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
}
@media (min-width: 1100px) {
  .card { padding: 28px 28px 26px; }
}
.on-white .card { background: var(--paper); }
.card h3 { margin-bottom: 10px; }
.card p { margin: 0 0 10px; color: var(--ink-2); text-wrap: pretty; }
.card p:last-of-type { margin-bottom: 18px; }
/* the chapter chip on a light card: deep copper, over 8:1 on white and on paper */
.chip--light { border-color: rgba(107, 60, 32, 0.45); color: var(--copper-deep); }

.ways {
  display: grid;
  gap: 14px 48px;
  margin-top: clamp(40px, 4vw, 64px);
  padding-top: clamp(28px, 3vw, 40px);
  border-top: 1px solid var(--line-light);
}
@media (min-width: 900px) {
  .ways { grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); }
}
.ways .h3 { margin-bottom: 8px; }
.ways p { margin: 0; }
.ways .rules { margin-top: 0; }
.ways .rules a { font-weight: 600; color: var(--ink); }

/* Selling and equity: the test beside the book's Civic example */
.sell { display: grid; gap: 28px 48px; align-items: start; margin-bottom: clamp(36px, 3.5vw, 56px); }
.sell .section-head { margin-bottom: 0; }
@media (min-width: 900px) {
  .sell { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); align-items: center; }
}

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

.tools-grid { display: grid; gap: 20px; }
@media (min-width: 900px) {
  .tools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
}
.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 28px 24px 26px;
  background: var(--navy-800);
  color: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
@media (min-width: 640px) {
  .tool-card { padding: 36px 36px 34px; }
}
.tool-card .kicker { color: var(--peach); margin-bottom: 10px; }
.tool-card h3 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 2rem + 1.6vw, 3.25rem);
  line-height: 0.92;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.tool-card > p { color: #cfdbe5; max-width: 30em; }
.tool-card .btn { margin-top: auto; align-self: flex-start; }
.tool-preview {
  margin: 8px 0 28px;
  padding: 18px;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  background: var(--navy-900);
  container-type: inline-size;
}
/* side by side, the two cards share a height: each preview takes up the
   spare room and centers its content, so both panels and both buttons line up */
.tool-card .tool-preview { flex: 1 0 auto; display: flex; flex-direction: column; justify-content: center; }
/* The letter key: a list of rows where the panel is narrow (phones, and the
   two-column layout up to about 1280px), five tiles where "Motorcycle" fits
   on one line. */
.letters {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  list-style: none;
}
.letters li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
}
.letters .l {
  flex: none;
  min-width: 0.9em;
  font-family: var(--font-display);
  font-size: 1.75rem;
  line-height: 0.9;
  color: var(--peach);
}
.letters .t {
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.15;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mist);
}
@container (min-width: 320px) {
  .letters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container (min-width: 460px) {
  .letters { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
  .letters li {
    display: grid;
    place-items: center;
    gap: 6px;
    padding: 12px 4px 10px;
    text-align: center;
  }
  .letters .l { min-width: 0; font-size: 2.25rem; }
  .letters .t { font-size: 0.8125rem; }
}
.receipt { width: 100%; border-collapse: collapse; font-family: var(--font-label); }
.receipt th, .receipt td { padding: 7px 0; border-bottom: 1px dashed rgba(255, 255, 255, 0.16); font-size: 1.0625rem; letter-spacing: 0.02em; }
.receipt th { text-align: left; font-weight: inherit; }
.receipt td:last-child { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.receipt tr:last-child th, .receipt tr:last-child td { border-bottom: 0; padding-top: 12px; color: var(--peach); font-weight: 700; font-size: 1.25rem; }
.receipt-caption { margin: 12px 0 0; font-size: 0.875rem; color: var(--mist); }

/* Contents ------------------------------------------------------------ */

.toc {
  display: grid;
  gap: 18px;
}
/* Part 1 is the longest list, so it spans two rows: the five cards fill a
   two by three grid, then a three by two grid from 1200px. */
@media (min-width: 900px) {
  .toc { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .toc .part--first { grid-row: span 2; }
}
@media (min-width: 1200px) {
  .toc { grid-template-columns: 1.25fr 1fr 1fr; }
}
.part {
  padding: 26px 24px 22px;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
}
.part-label {
  margin: 0 0 4px;
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--peach);
}
.part h3 {
  font-family: var(--font-display);
  font-size: 2.25rem;
  line-height: 0.95;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.part .part-tag { margin: 0 0 14px; font-size: 1rem; color: var(--mist); }
.chapters { list-style: none; }
.chapters li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--line-dark);
  font-size: 1.0625rem;
  line-height: 1.35;
}
.chapters .n {
  font-family: var(--font-display);
  font-size: 1.375rem;
  line-height: 1;
  color: var(--peach);
}
.chapters .n--blank { color: transparent; }
.chapters .note {
  display: block;
  margin-top: 2px;
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--peach);
}

/* Author -------------------------------------------------------------- */

.author {
  display: grid;
  gap: 28px 56px;
  align-items: start;
}
@media (min-width: 900px) {
  .author { grid-template-columns: 300px minmax(0, 1fr); }
}
.author-photo {
  position: relative;
  width: min(72%, 300px);
}
@media (min-width: 900px) {
  .author-photo { width: 100%; }
}
.author-photo img {
  position: relative;
  border-radius: var(--radius-lg);
  width: 100%;
  height: auto;
}
.author-photo::after {
  content: "";
  position: absolute;
  inset: 14px -14px -14px 14px;
  border-radius: var(--radius-lg);
  background: var(--peach);
  z-index: -1;
}
.author-photo { z-index: 0; isolation: isolate; }
.author h3 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 2rem + 1.6vw, 3.5rem);
  line-height: 0.95;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.author-bio { max-width: 38em; }
.pull {
  margin: 28px 0 26px;
  padding: 4px 0 4px 22px;
  border-left: 4px solid var(--peach);
}
.pull p {
  margin: 0 0 8px;
  font-family: var(--font-label);
  font-weight: 600;
  font-size: clamp(1.375rem, 1.15rem + 0.8vw, 1.75rem);
  line-height: 1.2;
}
.pull cite { font-style: normal; font-size: 0.9375rem; color: var(--ink-2); }

/* Details ------------------------------------------------------------- */

.details-grid { display: grid; gap: 28px 64px; }
@media (min-width: 900px) {
  .details-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); }
}
.spec { margin: 0; }
.spec div {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  padding: 12px 0;
  border-top: 1px solid var(--line-dark);
}
@media (min-width: 560px) {
  .spec div { grid-template-columns: 210px minmax(0, 1fr); gap: 16px; }
}
.spec dt {
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mist);
}
.spec dd { margin: 0; }
.publisher h3 { margin-bottom: 12px; color: var(--peach); }
.publisher p { color: #cfdbe5; }
.publisher a { color: var(--white); }

/* Get the book -------------------------------------------------------- */

.getbook {
  position: relative;
  overflow: hidden;
  background: var(--studio);
}
.getbook .wrap {
  display: grid;
  gap: 8px;
  align-items: end;
  padding-top: clamp(56px, 6vw, 96px);
}
.getbook-copy { padding-bottom: 8px; }
.getbook-copy .h2 { margin-bottom: 16px; }
.getbook-copy p { max-width: 26em; }
.getbook-art { margin-inline: auto; width: min(100%, 620px); }
.getbook-art img { width: 100%; height: auto; }
@media (min-width: 900px) {
  .getbook .wrap { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 40px; }
  .getbook-copy { padding-bottom: clamp(56px, 6vw, 96px); align-self: center; }
  .getbook-art { margin-right: 0; }
}

/* Footer -------------------------------------------------------------- */

.site-footer {
  background: var(--navy-950);
  color: var(--mist);
  padding-block: 56px 40px;
  font-size: 1rem;
}
.footer-grid { display: grid; gap: 32px; }
@media (min-width: 900px) {
  .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; gap: 48px; }
}
.site-footer .wordmark { font-size: 2rem; margin-bottom: 14px; }
.footer-title {
  margin: 0 0 12px;
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--white);
}
.footer-links { list-style: none; display: grid; gap: 6px; }
.footer-links a { color: var(--white); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.fineprint {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--line-dark);
  font-size: 0.875rem;
  line-height: 1.55;
}
.fineprint p { margin-bottom: 6px; max-width: 70em; }

.site-footer--slim { padding-block: 28px 28px; }
.site-footer--slim .fineprint { margin-top: 0; padding-top: 0; border-top: 0; }

/* Page hero for the tools --------------------------------------------- */

.page-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 500px at 85% 20%, rgba(46, 88, 122, 0.5), transparent 65%),
    var(--navy-800);
  color: var(--white);
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(115deg, transparent 0 46px, rgba(242, 199, 165, 0.04) 46px 48px);
  pointer-events: none;
}
.page-hero .wrap {
  position: relative;
  display: grid;
  gap: 28px;
  padding-block: 44px 52px;
}
.page-hero h1 {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 2.2rem + 6vw, 7.5rem);
  line-height: 0.86;
  text-transform: uppercase;
  text-wrap: balance;
}
.page-hero h1 .peach { color: var(--peach); }
/* Where the title takes two lines, it breaks at the color change:
   WHAT CAR / SHOULD I BUY? */
@media screen and (max-width: 1099px) {
  .page-hero h1 .peach { display: block; }
}
.page-hero .lead { color: #d5e0e8; margin-bottom: 18px; }
.page-hero .hero-meta { margin-top: 18px; }
.page-hero-book {
  display: none;
}
@media (min-width: 900px) {
  .page-hero .wrap { grid-template-columns: minmax(0, 1fr) 220px; align-items: center; gap: 48px; padding-block: 64px 72px; }
  .page-hero-book { display: block; text-decoration: none; }
  .page-hero-book img {
    width: 200px;
    border-radius: 4px 8px 8px 4px;
    box-shadow: -10px 0 0 -4px rgba(255, 255, 255, 0.06), 0 24px 40px -16px rgba(0, 0, 0, 0.6);
    transform: rotate(3deg);
    transition: transform 220ms var(--ease);
  }
  .page-hero-book:hover img { transform: rotate(0deg); }
  .page-hero-book span {
    display: block;
    margin-top: 16px;
    font-family: var(--font-label);
    font-weight: 600;
    font-size: 0.9375rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--mist);
  }
}

.page-hero .kicker { color: var(--peach); }

/* Questionnaire ------------------------------------------------------- */

.quiz-intro { max-width: 46rem; margin-bottom: 28px; }
.quiz-intro .h2 { margin-bottom: 18px; }
.quiz { max-width: 980px; }
/* a fieldset defaults to its min-content width, which widens the page at 320px */
.question, .ws-section { min-inline-size: 0; }
.question {
  margin: 0 0 18px;
  padding: 22px 18px 20px;
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  background: var(--white);
  scroll-margin-top: 12px;
}
@media (min-width: 640px) {
  .question { padding: 28px 28px 26px; }
}
/* the gap above the sticky progress bar */
.question:last-of-type { margin-bottom: 26px; }
/* After "See my result" with questions still open, each open one is marked */
.question.is-missing { border-color: var(--error); box-shadow: inset 4px 0 0 var(--error); }
.q-flag {
  margin: -6px 0 14px;
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 1rem;
  color: var(--error);
}
.question legend {
  float: left;
  width: 100%;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  gap: 14px;
  align-items: baseline;
  font-family: var(--font-label);
  font-weight: 700;
  font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
  line-height: 1.2;
}
.question legend .qn {
  flex: none;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 2.25rem;
  line-height: 0.8;
  color: var(--copper);
}
.question legend + * { clear: both; }
.options {
  display: grid;
  gap: 8px;
  clear: both;
}
@media (min-width: 720px) {
  .options { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
}
.option { position: relative; display: block; }
/* The radio covers its whole card, so a focused answer scrolls fully into
   view instead of only its top corner. */
.option input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.option span {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  height: 100%;
  min-height: 56px;
  padding: 10px 12px;
  border: 2px solid rgba(10, 29, 44, 0.32);
  border-radius: 12px;
  background: var(--paper);
  font-size: 1rem;
  line-height: 1.3;
  cursor: pointer;
  transition: border-color 140ms var(--ease), background-color 140ms var(--ease);
}
@media (min-width: 720px) {
  .option span { grid-template-columns: minmax(0, 1fr); align-content: start; gap: 8px; padding: 14px 14px 16px; }
}
.option b {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--line-light);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.375rem;
  line-height: 1;
  color: var(--navy-800);
}
.option:hover span { border-color: rgba(10, 29, 44, 0.4); }
.option input:checked + span {
  border-color: var(--navy-800);
  background: var(--peach-100);
}
.option input:checked + span b {
  background: var(--navy-800);
  border-color: var(--navy-800);
  color: var(--peach);
}
.option input:focus-visible + span {
  outline: 3px solid var(--copper);
  outline-offset: 2px;
}

/* No top margin: a margin here would count against the form when the bar
   sticks, and push its bottom edge off the screen at first paint. */
.quiz-bar {
  position: sticky;
  bottom: 0;
  z-index: 10;
  margin: 0 calc(-1 * var(--gutter));
  padding: 14px var(--gutter);
  background: var(--navy-950);
  color: var(--white);
  border-top: 1px solid var(--line-dark);
}
@media (min-width: 640px) {
  .quiz-bar { margin-inline: 0; border-radius: var(--radius) var(--radius) 0 0; padding: 16px 22px; }
}
.quiz-bar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}
/* On a phone the bar is one row: the progress track becomes a strip along
   its top edge and the button gets smaller. */
@media (max-width: 639px) {
  .quiz-bar { padding-block: 12px; }
  .quiz-bar .progress-track {
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: 0;
  }
  .quiz-bar .progress-fill { border-radius: 0; }
  .quiz-bar .btn { min-height: 44px; padding: 8px 18px; font-size: 1rem; }
}
.progress-text {
  margin: 0;
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: 0.04em;
}
.progress-text strong { color: var(--peach); font-size: 1.25rem; }
.progress-track {
  flex: 1 1 140px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: var(--progress, 0%);
  border-radius: 999px;
  background: var(--peach);
  transition: width 220ms var(--ease);
}
.quiz-bar .btn { margin-left: auto; }
.quiz-error {
  margin: 0 0 26px;
  padding: 14px 16px;
  border-radius: 10px;
  background: #fff1e6;
  color: #5b2d12;
  border: 1px solid #e9b48d;
}
.quiz-error p { margin: 0; }
.quiz-error a { font-weight: 700; }
/* the same message in the progress panel, where the button is on wide screens */
.aside-error {
  margin: 0 0 20px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(242, 199, 165, 0.12);
  border: 1px solid rgba(242, 199, 165, 0.45);
  color: var(--white);
  font-size: 0.9375rem;
  line-height: 1.45;
}
.aside-error p { margin: 0; }
.aside-error a { color: var(--peach); font-weight: 700; }

.result {
  margin-top: 48px;
  scroll-margin-top: 12px;
}
.result-card {
  display: grid;
  gap: 20px 32px;
  padding: 30px 24px;
  border-radius: var(--radius-lg);
  background: var(--navy-800);
  color: var(--white);
  box-shadow: var(--shadow-lg);
}
@media (min-width: 760px) {
  .result-card { grid-template-columns: 150px minmax(0, 1fr); padding: 44px 44px; }
}
.result-letter {
  display: grid;
  place-items: center;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  background: var(--peach);
  color: var(--navy-950);
  font-family: var(--font-display);
  font-size: 5.5rem;
  line-height: 1;
}
.result-letter.is-tie { font-size: 3.25rem; }
.result-card .kicker { color: var(--peach); margin-bottom: 8px; }
.result-type {
  margin-bottom: 14px;
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 2rem + 2.6vw, 4.25rem);
  line-height: 0.92;
  text-transform: uppercase;
}
/* A tie lists each type whole, so a line breaks between two types before
   it breaks inside one. A peach slash separates them. */
.result-type .rt-name { display: inline-block; }
.result-type .rt-sep { color: var(--peach); }
.result-text p { color: #d5e0e8; }
.result-text p:last-child { margin-bottom: 0; }
.result-note {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(242, 199, 165, 0.1);
  border: 1px solid rgba(242, 199, 165, 0.35);
  color: #f3dfcf;
}
.result-note p { margin: 0; color: inherit; }

.picks { margin-top: 30px; }
.picks h3 { margin-bottom: 14px; }
.pick-list { list-style: none; display: grid; gap: 10px; }
.pick {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  grid-template-areas: "l name stat" "l bar bar";
  align-items: center;
  gap: 4px 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--white);
  border: 1px solid var(--line-light);
}
.pick .pl { grid-area: l; font-family: var(--font-display); font-size: 1.75rem; line-height: 1; color: var(--copper); }
.pick .pn { grid-area: name; font-family: var(--font-label); font-weight: 600; font-size: 1.0625rem; }
.pick .ps { grid-area: stat; font-family: var(--font-label); font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.pick .pb { grid-area: bar; height: 10px; border-radius: 999px; background: var(--studio); overflow: hidden; }
.pick .pb i { display: block; height: 100%; width: var(--share, 0%); border-radius: 999px; background: var(--navy-700); }
.pick.is-top { border-color: var(--navy-800); background: var(--peach-100); }
.pick.is-top .pb i { background: var(--copper); }

.result-actions { margin-top: 26px; }
.next-step {
  margin-top: 30px;
  display: grid;
  gap: 8px 24px;
  align-items: center;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--peach);
}
@media (min-width: 760px) {
  .next-step { grid-template-columns: minmax(0, 1fr) auto; padding: 28px 32px; }
}
/* under the financing card, on white, so the two never read as one block */
.result .next-step { background: var(--white); border: 1px solid var(--line-light); }
.next-step p { margin: 0; }
.next-step .h3 { margin-bottom: 4px; }

.types {
  display: grid;
  gap: 16px;
  list-style: none;
}
@media (min-width: 760px) {
  .types { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
  .types { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.type {
  padding: 24px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line-light);
  background: var(--white);
}
.type-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.type-letter {
  display: grid;
  place-items: center;
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--navy-800);
  color: var(--peach);
  font-family: var(--font-display);
  font-size: 1.75rem;
  line-height: 1;
}
.type h3 { margin: 0; }
.type p { margin: 0 0 10px; color: var(--ink-2); }
.type p:last-child { margin-bottom: 0; }

.styles {
  display: grid;
  gap: 14px;
  list-style: none;
}
@media (min-width: 640px) {
  .styles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
  .styles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.style {
  padding: 22px 20px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-dark);
}
.style h3 { margin-bottom: 8px; color: var(--peach); }
.style p { margin: 0 0 10px; color: #cfdbe5; font-size: 1rem; }
.style .models { margin: 0; font-size: 0.9375rem; color: var(--mist); }

/* Questionnaire: a progress panel beside the questions on wide screens */
.quiz-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; align-items: start; }
.quiz-aside { display: none; }
@media (min-width: 1200px) {
  .quiz-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; }
  .quiz-aside { display: block; position: sticky; top: 92px; }
  .quiz .quiz-bar { display: none; }
}
.quiz-aside-card {
  padding: 26px 24px;
  border-radius: var(--radius-lg);
  background: var(--navy-800);
  color: var(--white);
  box-shadow: var(--shadow-lg);
}
.quiz-aside-card .kicker { color: var(--peach); margin-bottom: 6px; }
.aside-count { margin: 0 0 12px; font-family: var(--font-label); font-weight: 600; font-size: 1.125rem; color: var(--mist); }
.aside-count strong { font-family: var(--font-display); font-weight: 400; font-size: 4rem; line-height: 0.9; color: var(--peach); margin-right: 6px; }
.quiz-aside-card .progress-track { height: 8px; margin-bottom: 22px; }
.legend { list-style: none; display: grid; gap: 8px; margin-bottom: 22px; }
.legend li { display: flex; align-items: center; gap: 12px; font-family: var(--font-label); font-weight: 600; font-size: 1.0625rem; color: #d5e0e8; }
.legend b {
  display: grid; place-items: center; flex: none;
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(242, 199, 165, 0.14); color: var(--peach);
  font-family: var(--font-display); font-weight: 400; font-size: 1.25rem; line-height: 1;
}
.quiz-aside-card .btn { width: 100%; }
.aside-note { margin: 12px 0 0; font-size: 0.9375rem; color: var(--mist); text-align: center; }
@media (min-width: 1200px) {
  .types { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
  .type { padding: 22px 18px; }
}
.result-love { margin: 22px 0 0; max-width: 40em; }

/* Small screens: a smaller result badge */
@media (max-width: 759px) {
  .result-letter { width: 88px; height: 88px; font-size: 3.75rem; }
  .result-letter.is-tie { font-size: 2.5rem; }
}

/* Worksheet ----------------------------------------------------------- */

.ws-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: start; }
@media (min-width: 1100px) {
  .ws-layout { grid-template-columns: minmax(0, 1fr) 360px; gap: 36px; }
}
.ws-tools { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; margin-bottom: 22px; }
.ws-tools p { margin: 0; color: var(--ink-2); font-size: 1rem; max-width: 34em; }
.ws-section {
  margin: 0 0 18px;
  padding: 24px 18px 20px;
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  background: var(--white);
}
@media (min-width: 640px) {
  .ws-section { padding: 28px 28px 24px; }
}
.ws-section legend {
  float: left;
  width: 100%;
  padding: 0;
  margin: 0 0 6px;
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 0.95;
  text-transform: uppercase;
}
.ws-section legend .qn { color: var(--copper); }
.ws-section legend + * { clear: both; }
.ws-help { clear: both; margin: 0 0 18px; color: var(--ink-2); font-size: 1rem; }
.fields { display: grid; gap: 16px 20px; }
@media (min-width: 640px) {
  .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Three fields sit side by side only where the worksheet is wide enough to
   give each about 220px. Elsewhere the third one starts a second row. */
.worksheet { container-type: inline-size; }
@container (min-width: 760px) {
  .fields--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* minmax(0, 1fr), so a field takes the width of its cell and never the
   width of the input's default size */
.field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; align-content: start; }
.field label {
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1.25;
}
.field .hint { margin: 0; font-size: 0.9375rem; line-height: 1.4; color: var(--ink-2); }
/* the border is what marks out each field: 3.3:1 against white */
.input {
  display: flex;
  align-items: stretch;
  border: 2px solid rgba(10, 29, 44, 0.5);
  border-radius: 10px;
  background: var(--white);
  transition: border-color 140ms var(--ease);
}
/* the same solid copper ring as links and answer cards */
.input:focus-within { border-color: var(--navy-800); outline: 3px solid var(--copper); outline-offset: 3px; }
.input .affix {
  display: grid;
  place-items: center;
  padding: 0 12px;
  font-family: var(--font-label);
  font-weight: 600;
  color: var(--ink-2);
  background: var(--paper);
}
.input .affix:first-child { border-right: 1px solid var(--line-light); border-radius: 8px 0 0 8px; }
.input .affix:last-child { border-left: 1px solid var(--line-light); border-radius: 0 8px 8px 0; }
.input input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  font-family: var(--font-text);
  font-size: 1.0625rem;
  font-variant-numeric: tabular-nums;
}
.input input:focus { outline: none; }
.input input::placeholder { color: #8b98a3; }
.field.has-error .input { border-color: var(--error); }
.field-error { margin: 0; font-size: 0.9375rem; color: var(--error); font-weight: 600; }
.ws-out {
  margin: 18px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--paper);
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1.35;
}
.ws-out strong { font-weight: 700; color: var(--navy-800); }
.ws-out .due { color: var(--error); }
.ws-out p { margin: 0; }
.ws-out ul { list-style: none; display: grid; gap: 4px; margin-top: 4px; }
.ws-out p + p,
.ws-out ul + p { margin-top: 6px; }

.parts {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}
.part-row {
  display: grid;
  gap: 10px 16px;
  padding: 14px 0 0;
  border-top: 1px solid var(--line-light);
}
.part-row h3 { font-family: var(--font-label); font-weight: 700; font-size: 1.1875rem; }
.part-row > .hint { margin: -4px 0 2px; font-size: 0.9375rem; line-height: 1.4; color: var(--ink-2); }
@media (min-width: 640px) {
  .part-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .part-row h3, .part-row .hint { grid-column: 1 / -1; }
}

.segmented { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.segmented label {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 8px 16px;
  border: 2px solid var(--line-light);
  border-radius: 999px;
  background: var(--paper);
  font-family: var(--font-label);
  font-weight: 600;
  cursor: pointer;
}
.segmented input { accent-color: var(--navy-800); width: 18px; height: 18px; margin: 0; }
.segmented label:has(input:checked) { border-color: var(--navy-800); background: var(--peach-100); }

.summary {
  padding: 24px 22px;
  border-radius: var(--radius-lg);
  background: var(--navy-800);
  color: var(--white);
  box-shadow: var(--shadow-lg);
}
@media (min-width: 1100px) {
  .summary { position: sticky; top: 92px; }
}
.summary h2 {
  margin-bottom: 14px;
  font-family: var(--font-display);
  font-size: 2.25rem;
  line-height: 0.95;
  text-transform: uppercase;
}
.big-number {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 3rem + 2vw, 4.5rem);
  line-height: 0.9;
  color: var(--peach);
  font-variant-numeric: tabular-nums;
  /* only a number too long for its box breaks, and only then */
  overflow-wrap: break-word;
}
.big-label {
  margin: 0 0 18px;
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mist);
}
.sum-list { margin: 0; }
.sum-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px dashed rgba(255, 255, 255, 0.18);
  font-family: var(--font-label);
  font-size: 1.0625rem;
}
.sum-list dt { color: #cfdbe5; }
.sum-list dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sum-list .total { border-top: 1px solid rgba(255, 255, 255, 0.5); }
.sum-list .total dt, .sum-list .total dd { color: var(--white); font-weight: 700; }
.summary-status { margin: 16px 0 0; font-size: 0.9375rem; color: var(--mist); }
.summary-status.is-warn { color: #ffd7b8; }

.budget { margin-top: 12px; }
/* minmax(0, 1fr), so a long amount wraps inside its card instead of
   pushing the card past the screen */
.budget-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 760px) {
  .budget-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.stat {
  padding: 24px 22px;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--line-light);
}
.stat--lead { background: var(--navy-800); color: var(--white); border-color: var(--navy-800); }
.stat .big-number { color: var(--navy-800); }
.stat--lead .big-number { color: var(--peach); }
.stat .big-label { color: var(--ink-2); margin-bottom: 0; }
.stat--lead .big-label { color: var(--mist); }
.breakdown { margin-top: 18px; display: grid; gap: 10px; list-style: none; }
.breakdown li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 16px;
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--white);
  border: 1px solid var(--line-light);
}
.breakdown .bl { font-family: var(--font-label); font-weight: 700; font-size: 1.125rem; }
.breakdown .bv { font-family: var(--font-label); font-weight: 700; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.breakdown .bd { grid-column: 1 / -1; margin: 0; color: var(--ink-2); font-size: 1rem; }
.callout {
  margin-top: 18px;
  padding: 18px 20px;
  border-radius: 12px;
  background: var(--peach-100);
  border-left: 5px solid var(--peach);
}
.callout p { margin: 0; }
.callout p + p { margin-top: 8px; }
.callout.is-warn { background: #fff1e6; border-left-color: #c96a32; }

.price-inputs { display: grid; gap: 16px 20px; margin-bottom: 18px; }
@media (min-width: 640px) {
  .price-inputs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.more-costs {
  margin: 0 0 24px;
  border: 1px solid var(--line-light);
  border-radius: 12px;
  background: var(--white);
}
.more-costs summary {
  padding: 14px 18px;
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 1.0625rem;
  cursor: pointer;
}
.more-costs .price-inputs { padding: 0 18px 18px; margin: 0; }

.terms { width: 100%; border-collapse: separate; border-spacing: 0; font-family: var(--font-label); }
.terms caption { text-align: left; margin-bottom: 12px; font-size: 1rem; color: var(--ink-2); font-family: var(--font-text); text-wrap: pretty; }
.terms th, .terms td { padding: 14px 14px; text-align: right; border-bottom: 1px solid var(--line-light); font-variant-numeric: tabular-nums; }
.terms th:first-child, .terms td:first-child { text-align: left; }
.terms thead th {
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
  background: var(--paper);
  border-bottom: 2px solid var(--navy-800);
}
.terms tbody td { font-size: 1.1875rem; font-weight: 600; background: var(--white); }
.terms tbody th { font-size: 1.1875rem; font-weight: 700; background: var(--white); }
.terms tr.is-short th, .terms tr.is-short td { background: var(--peach-100); }
.terms .tag {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--navy-800);
  color: var(--peach);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: middle;
}
.table-wrap { border-radius: 14px; overflow: hidden; border: 1px solid var(--line-light); }

/* small screens only: on paper the table stays a table */
@media screen and (max-width: 759px) {
  .table-wrap { border: 0; border-radius: 0; overflow: visible; }
  .terms, .terms tbody, .terms tr, .terms th, .terms td { display: block; width: 100%; }
  .terms thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .terms tr { margin-bottom: 12px; border: 1px solid var(--line-light); border-radius: 12px; overflow: hidden; background: var(--white); }
  .terms tbody th { padding: 14px 16px; border-bottom: 1px solid var(--line-light); }
  .terms td { display: flex; justify-content: space-between; gap: 12px; padding: 10px 16px; text-align: right; font-size: 1.0625rem; }
  .terms td::before { content: attr(data-label); text-align: left; font-weight: 600; color: var(--ink-2); font-size: 0.9375rem; letter-spacing: 0.02em; }
  .terms tr:last-child { margin-bottom: 0; }
}

.rules { margin-top: 22px; display: grid; gap: 10px; list-style: none; }
.rules li {
  position: relative;
  padding: 0 0 0 30px;
  color: var(--ink-2);
  text-wrap: pretty;
}
.rules li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.55em;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  /* copper: both lists sit on paper or white, where peach nearly disappears */
  background: var(--copper);
  transform: rotate(45deg);
}

.mobile-total {
  position: sticky;
  bottom: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px var(--gutter);
  background: var(--navy-950);
  color: var(--white);
  border-top: 1px solid var(--line-dark);
  font-family: var(--font-label);
}
.mobile-total .mt-label { font-weight: 600; font-size: 0.9375rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mist); }
.mobile-total .mt-value { font-family: var(--font-display); font-size: 2rem; line-height: 1; color: var(--peach); font-variant-numeric: tabular-nums; }
.mobile-total a { color: var(--white); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.9375rem; }
@media (min-width: 1100px) {
  .mobile-total { display: none; }
}

/* Worksheet: the price column shows only once tax or fees are entered */
.terms .col-price { display: none; }
.terms.has-price .col-price { display: table-cell; }
@media screen and (max-width: 759px) {
  .terms.has-price td.col-price { display: flex; }
}
@media (max-width: 1099px) {
  .summary { display: none; }
}
.terms caption { padding: 14px 14px 6px; }
@media screen and (max-width: 759px) {
  .terms caption { padding: 0 0 10px; display: block; }
}
.mobile-total { margin: 18px calc(-1 * var(--gutter)) 0; }

/* Small book band for the tool pages ----------------------------------- */

.book-band {
  display: grid;
  gap: 24px 40px;
  align-items: center;
  padding: 28px 24px;
  border-radius: var(--radius-lg);
  background: var(--navy-800);
  color: var(--white);
  overflow: hidden;
}
@media (min-width: 760px) {
  .book-band { grid-template-columns: 160px minmax(0, 1fr); padding: 36px 44px; }
}
.book-band img { width: 140px; border-radius: 3px 6px 6px 3px; box-shadow: 0 20px 34px -14px rgba(0, 0, 0, 0.7); }
.book-band .h2 { font-size: clamp(2.5rem, 2rem + 1.6vw, 3.5rem); margin-bottom: 12px; }
.book-band p { color: #d5e0e8; max-width: 36em; }

/* no word left alone on the last line of these paragraphs */
.step p, .tool-card > p, .hero-lead, .hero-meta, .ways p, .book-band p,
.receipt-caption, .spec dd { text-wrap: pretty; }

/* 404 ------------------------------------------------------------------ */

.notfound {
  min-height: 62vh;
  display: grid;
  align-content: center;
}
.notfound .big {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(8rem, 5rem + 16vw, 18rem);
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 3px var(--peach);
}
.notfound h1 {
  margin: 10px 0 16px;
  font-family: var(--font-display);
  font-size: clamp(3rem, 2.2rem + 3vw, 5rem);
  line-height: 0.9;
  text-transform: uppercase;
}
.notfound p { color: #d5e0e8; max-width: 32em; }
.nf-links { margin-top: 28px; display: grid; gap: 12px; list-style: none; max-width: 640px; }
@media (min-width: 640px) {
  .nf-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.nf-links a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid var(--line-dark);
  background: rgba(255, 255, 255, 0.04);
  color: var(--white);
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
}
.nf-links a:hover { border-color: var(--peach); color: var(--peach); }
.nf-links svg { width: 20px; height: 20px; flex: none; }

/* 404: the cover beside the links on wide screens */
.notfound-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) {
  .notfound-grid { grid-template-columns: minmax(0, 1fr) 260px; }
  .notfound-grid .page-hero-book img { width: 240px; }
}

/* Both tools: what the bank loan costs, in dollars */
.finance {
  margin-top: 30px;
  padding: 26px 22px 24px;
  border-radius: var(--radius-lg);
  background: var(--white);
  border: 1px solid var(--line-light);
}
@media (min-width: 760px) {
  .finance { padding: 32px 36px 30px; }
}
.finance .finance-title { margin-bottom: 14px; }
.finance .big-number { color: var(--navy-800); }
.finance .big-label { margin-bottom: 14px; color: var(--ink-2); }
.finance p { max-width: 46em; text-wrap: pretty; }
.finance-msg p { margin: 0; }
.finance-msg a { font-weight: 700; }
.finance-lines p { margin: 0 0 8px; color: var(--ink-2); }
.finance-lines p:last-child { margin-bottom: 0; }
.finance-more { margin-top: 16px; }
.finance-more summary { padding: 6px 0; font-family: var(--font-label); font-weight: 700; font-size: 1.0625rem; cursor: pointer; }
.finance-more .table-wrap { margin-top: 12px; }

/* Questionnaire: questions 17 to 20 */
.quiz-part { margin: 40px 0 18px; padding-top: 28px; border-top: 2px solid var(--navy-800); }
.quiz-part .quiz-part-title {
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 1.8rem + 1.6vw, 3rem);
  line-height: 0.95;
  text-transform: uppercase;
}
.quiz-part p { margin: 0; color: var(--ink-2); max-width: 40em; }
.question .segmented { margin-bottom: 0; }
.question .hint { font-size: 0.9375rem; line-height: 1.4; color: var(--ink-2); }
.question .q-hint { margin: 12px 0 0; }
.q-more { display: grid; gap: 18px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line-light); }
.question .q-term { margin: 0; padding: 0; border: 0; min-inline-size: 0; }
.question > .q-term { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line-light); }
.question .q-term legend {
  float: none;
  display: block;
  width: auto;
  margin: 0 0 10px;
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1.25;
}
.question .q-term .hint { margin: 10px 0 0; }
/* answer cards with no letter badge: one column on phones, three from 720px */
.options--plain .option span { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) {
  .options--plain { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.aside-money { margin: -8px 0 20px; font-size: 0.9375rem; line-height: 1.45; color: var(--mist); }

/* Questionnaire: the result's reasons and shortlist */
.result-card.is-spread { grid-template-columns: minmax(0, 1fr); }
.result-card .result-sub {
  margin: 20px 0 8px;
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 0.9375rem;
  line-height: 1.3;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--peach);
}
.why-list { display: grid; gap: 6px; list-style: none; }
.why-list li { position: relative; padding-left: 22px; color: #d5e0e8; text-wrap: pretty; }
.why-list li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--peach);
  transform: rotate(45deg);
}
.why-list .why-q { color: var(--mist); white-space: nowrap; }
.result-card .why-type { margin: 14px 0 6px; font-family: var(--font-label); font-weight: 600; font-size: 1.0625rem; color: var(--white); }
.result-card .why-type:first-child { margin-top: 0; }
.result-short p { margin: 0 0 8px; color: #d5e0e8; }
.result-short p:last-child { margin-bottom: 0; }
.result-short a { color: var(--white); }
.result-spread { margin-top: 4px; }

/* Worksheet: the loan questions */
.price-q { margin: 0 0 20px; padding: 0; border: 0; min-inline-size: 0; }
.price-q legend {
  margin: 0 0 10px;
  padding: 0;
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1.25;
}
.price-q .segmented,
.price-q .options { margin-bottom: 8px; }
.price-q .hint { margin: 0; font-size: 0.9375rem; line-height: 1.4; color: var(--ink-2); }

/* Worksheet: the price range above the table */
.price-range {
  --focus: var(--peach);
  margin: 4px 0 22px;
  padding: 26px 24px 22px;
  border-radius: var(--radius-lg);
  background: var(--navy-800);
  color: var(--white);
  box-shadow: var(--shadow-lg);
}
@media (min-width: 760px) {
  .price-range { padding: 32px 36px 28px; }
}
.price-range .big-label { margin-bottom: 14px; }
.price-range-lines p { margin: 0 0 6px; max-width: 46em; color: #d5e0e8; text-wrap: pretty; }
.price-range-lines p:last-child { margin-bottom: 0; }
.price-range a { color: var(--white); }

/* Contrast themes ------------------------------------------------------ */

/* Windows contrast themes replace the colors that mark a picked answer, the
   current page and the progress bars. These rules use system colors, which
   the theme keeps. */
@media (forced-colors: active) {
  .option input:checked + span { outline: 3px solid Highlight; outline-offset: -5px; }
  .option input:checked + span b {
    forced-color-adjust: none;
    background: Highlight;
    border-color: Highlight;
    color: HighlightText;
  }
  .site-nav a { border-bottom-color: Canvas; }
  .site-nav a[aria-current="page"] { border-bottom-color: Highlight; }
  .progress-track,
  .pick .pb { border: 1px solid CanvasText; }
  .progress-fill,
  .pick .pb i { forced-color-adjust: none; background: Highlight; }
  /* the list markers are painted backgrounds, which the theme removes */
  .rules li::before,
  .why-list li::before { forced-color-adjust: none; background: CanvasText; }
  .segmented label:has(input:checked) { outline: 3px solid Highlight; outline-offset: -3px; }
}

/* Motion --------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Print: the tool results on paper ------------------------------------- */

@media print {
  html, body { background: #fff; color: #000; }
  .site-header, .site-footer, .skip-link, .quiz-bar, .quiz-aside, .mobile-total, .no-print, .page-hero-book, .book-band, .ws-tools .btn { display: none !important; }
  .page-hero { background: #fff; color: #000; }
  .page-hero::before { display: none; }
  .page-hero h1 { font-size: 40pt; }
  .page-hero .lead, .hero-meta { color: #000; }
  .result-card, .summary, .stat--lead, .tool-card { background: #fff !important; color: #000 !important; box-shadow: none !important; border: 1px solid #000; }
  .result-text p, .big-label, .sum-list dt { color: #000 !important; }
  .big-number, .result-type, .result-type .rt-sep { color: #000 !important; }
  .section { padding-block: 12pt; }
  .question { break-inside: avoid; }
  a { text-decoration: none; }
  .kicker, .page-hero .kicker, .result-card .kicker { color: var(--copper-deep) !important; }
  .page-hero h1 .peach { color: #000; }
  /* the questionnaire prints its result, not the sixteen questions */
  .quiz-layout, .quiz-intro, #letters, #body-styles, .next-step { display: none !important; }
  .pick { break-inside: avoid; }
  /* one Letter page, and the sheet says where it came from */
  .page-quiz .page-hero .wrap { padding-block: 0 6pt; gap: 0; }
  .page-quiz .page-hero h1 { font-size: 28pt; margin-bottom: 0; }
  .page-quiz .page-hero .kicker { margin-bottom: 4pt; }
  .page-quiz .page-hero .lead,
  .page-quiz .page-hero .hero-meta { display: none; }
  .page-quiz .section { padding-block: 6pt 0; }
  /* the band that holds the book card, hidden on paper */
  .page-quiz .section--tight, .page-afford .section--tight { display: none !important; }
  .result .h2 { font-size: 22pt; margin-bottom: 6pt; }
  .result-note { margin-top: 8pt; padding: 6pt 8pt; color: #000; background: none; border-color: #000; }
  .result { margin-top: 0; }
  .result-card { padding: 14pt 16pt; gap: 8pt 18pt; }
  .result-letter { width: 64pt; height: 64pt; font-size: 40pt; }
  .result-letter.is-tie { font-size: 24pt; }
  .result-type { font-size: 30pt; margin-bottom: 8pt; }
  .result-text p { font-size: 10.5pt; line-height: 1.4; margin-bottom: 4pt; }
  .picks { margin-top: 12pt; }
  .picks h3 { margin-bottom: 6pt; }
  /* the five picks in one row, with their bars and the letter disc in color */
  .pick-list { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4pt; }
  .pick {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "l name" "l stat" "bar bar";
    align-items: start;
    gap: 2pt 6pt;
    padding: 5pt 6pt;
  }
  .pick .pl { font-size: 16pt; }
  .pick .pn, .pick .ps { font-size: 10pt; line-height: 1.2; }
  .pick .pb { height: 4pt; margin-top: 3pt; }
  .pick .pb, .pick .pb i, .result-letter { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .result-love { margin-top: 10pt; }
  /* A Letter page is about 740px wide, where the small-screen layouts
     would apply. These rules keep the wide layouts on paper. With them, a
     four-way tie still fits on one page. */
  .result-card { grid-template-columns: 64pt minmax(0, 1fr); }
  .result-note p { font-size: 10.5pt; line-height: 1.4; }
  .budget-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fields--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* the bank loan prints with the result, its small print included */
  .price-range { background: #fff !important; color: #000 !important; box-shadow: none !important; border: 1px solid #000; }
  .finance, .price-range { break-inside: avoid; }
  .result-card .result-sub { color: var(--copper-deep) !important; }
  .why-list li, .why-list .why-q, .result-card .why-type, .result-short p, .result-short a,
  .price-range-lines p, .price-range a, .finance-offer p, .finance-offer a { color: #000 !important; }
  .result::after {
    content: "From The Car-Buying Revolution by Adriano Marques. thecarbuyingrevolution.com";
    display: block;
    margin-top: 12pt;
    padding-top: 8pt;
    border-top: 1px solid #000;
    font-family: var(--font-label);
    font-weight: 600;
    font-size: 11pt;
    letter-spacing: 0.02em;
  }
}

/* A text field focused by script (after an example loads, or after an
   error) shows its ring too, not only one focused from the keyboard. */
.input input:focus { outline: 3px solid var(--focus, var(--copper)); outline-offset: 3px; }

/* Home: the hook beside the loan example */
.hook { display: grid; gap: 14px; align-content: center; }
.hook .lead { margin: 0; }
.loan--solo { margin-bottom: 0; }
a.chip { text-decoration: none; }

/* Home: the four parts, one benefit line each */
@media (min-width: 900px) {
  .toc--parts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1200px) {
  .toc--parts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.toc--parts .part-tag { margin: 6px 0 0; font-size: 1.0625rem; line-height: 1.45; color: #d5e0e8; text-wrap: pretty; }
.toc--parts .part-note { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line-dark); font-size: 0.9375rem; line-height: 1.45; color: var(--mist); }

/* Home: what changes for the reader */
.outcomes { display: grid; gap: 16px; list-style: none; }
@media (min-width: 900px) {
  .outcomes { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
}
.outcomes li {
  padding: 24px 24px 22px;
  border-top: 4px solid var(--copper);
  border-radius: var(--radius);
  background: var(--paper);
  font-family: var(--font-label);
  font-weight: 700;
  font-size: clamp(1.5rem, 1.25rem + 0.8vw, 1.875rem);
  line-height: 1.15;
  color: var(--navy-950);
  text-wrap: balance;
}

/* Home: the two tools, one line each */
.tool-list-title { margin-bottom: 14px; }
.tool-list { display: grid; gap: 12px; list-style: none; }
.tool-list li { color: var(--ink-2); text-wrap: pretty; }
.tool-list .text-link { margin-right: 6px; }

/* Home: the author's role, set quietly under the bio */
.author-bio .author-note { color: var(--ink-2); }

/* Both tools: the one Savings Club line at the financing result */
.finance-offer { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-light); }
.finance .finance-offer-line { margin: 0; font-family: var(--font-label); font-weight: 600; font-size: 1.1875rem; line-height: 1.3; color: var(--navy-950); }
.finance-offer-line a { color: var(--navy-950); font-weight: 700; }
.finance .finance-offer-note { margin: 6px 0 0; font-size: 0.875rem; line-height: 1.45; color: var(--ink-2); }
