/* the CRNA pages (the CRNA page and its playbooks): the site's dark ground, gold and type, on a wider grid with figures, tables and diagrams */
:root {
  color-scheme: dark;
  --bg: #07080A; --surface: #121419; --surface-strong: #1D2028; --surface-high: #2B2F3A; --ink: #F2F2F0; --text: #D8D9D6; --muted: #A9ADB4; --accent: #B8965A; --accent-strong: #D4B27A; --accent-ink: #07080A;
  --font-display: "Gambarino", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-text: "General Sans", "Helvetica Neue", Arial, sans-serif;
  --step-small: clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(1.75rem, 1.15rem + 2.5vw, 3rem);
  --step-display: clamp(2.125rem, 1.1rem + 4.6vw, 4.75rem);
  --step-figure: clamp(2.75rem, 1.9rem + 3.4vw, 4.5rem);
  --margin: clamp(1rem, 2.2vw, 2rem);
  --wrap: 76rem;
  --gap: clamp(1.5rem, 3vw, 3rem);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  /* the bar, the page and the footer share one pair of outer margins */
  --edge: max(var(--margin), calc((100vw - var(--wrap)) / 2));
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-text); font-size: var(--step-body); line-height: 1.6; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul, ol, dl, dd, figure, table { margin: 0; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 0.07em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
p, li, dd { color: var(--text); text-wrap: pretty; }
strong { color: var(--ink); font-weight: 500; }
[id] { scroll-margin-top: 1.5rem; }

/* the bar and buttons, as on every content page */
.bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: var(--margin) var(--edge); }
.bar > a:first-child { flex: 0 1 260px; min-width: 0; }
.bar img { display: block; width: 100%; height: auto; }
.bar nav { display: flex; gap: .5rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: 0 1.15rem; border: 0; background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 500; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color 180ms ease, transform 140ms ease; }
.button--quiet { background: var(--surface-strong); color: var(--ink); }
.button--large { min-height: 3.25rem; padding: 0 1.5rem; }
.button:active { transform: translateY(1px); }
@media (hover: hover) and (pointer: fine) { .button:hover { background-color: var(--accent-strong); } .button--quiet:hover { background-color: var(--surface-high); } }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }

/* the frame */
main { padding: clamp(2rem, 5vw, 4rem) var(--edge) clamp(4rem, 8vw, 6rem); }
main > section, main > .wrap > section { margin-top: clamp(5rem, 11vw, 9.5rem); }
h1 { font-family: var(--font-display); font-weight: 400; font-size: var(--step-display); line-height: 1; letter-spacing: -0.02em; text-wrap: balance; }
h1.long { font-size: clamp(1.875rem, 1rem + 3.6vw, 4rem); }
h2 { font-family: var(--font-display); font-weight: 400; font-size: var(--step-head); line-height: 1.05; letter-spacing: -0.015em; text-wrap: balance; }
h3 { font-weight: 500; font-size: var(--step-lead); line-height: 1.25; color: var(--ink); text-wrap: balance; }
.lead { font-size: var(--step-lead); line-height: 1.35; color: var(--ink); max-width: 34em; }
.head { max-width: 46rem; }
.head p { margin-top: 1.25rem; max-width: 40em; }
.head + * { margin-top: clamp(2rem, 4vw, 3.5rem); }
.small { font-size: var(--step-small); color: var(--muted); }
.small a { color: var(--text); }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--gap) clamp(2rem, 6vw, 6rem); align-items: start; }
.split > .head + * { margin-top: 0; }

/* the first screen */
.hero-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: var(--gap) clamp(2rem, 6vw, 6rem); align-items: start; margin-top: clamp(2rem, 4vw, 3.5rem); }
.hero-grid .lead + p { margin-top: 1.25rem; max-width: 36em; }
.hero-grid .small { margin-top: 1.5rem; }
.panel { background: var(--surface); padding: clamp(1.5rem, 3vw, 2.5rem); }
.panel h2 { font-family: var(--font-text); font-weight: 500; font-size: var(--step-lead); line-height: 1.25; letter-spacing: 0; }
.panel h2 + * { margin-top: 1.25rem; }
.marks { list-style: none; padding: 0; }
.marks li { position: relative; padding-left: 1.6rem; }
.marks li + li { margin-top: .7rem; }
.marks li::before { content: ""; position: absolute; left: 0; top: .58em; width: .55rem; height: .55rem; background: var(--accent); }
.marks--no li::before { top: .78em; height: .14rem; width: .8rem; background: var(--muted); }
.marks--two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem var(--gap); }
.marks--two li + li { margin-top: 0; }

/* figures: one large number, its name, one line about it */
.figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.figures b { display: block; font-family: var(--font-display); font-weight: 400; font-size: var(--step-figure); line-height: 1; letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: lining-nums; }
.figures b small { font-size: .4em; letter-spacing: 0; color: var(--muted); }
.figures h3 { margin-top: .9rem; font-size: var(--step-body); }
.figures p { margin-top: .35rem; font-size: var(--step-small); color: var(--muted); }
.figures .lit b { color: var(--accent-strong); }

/* tables */
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums lining-nums; }
caption { text-align: left; padding-bottom: .9rem; font-weight: 500; color: var(--ink); }
th, td { padding: .7rem 0; text-align: left; vertical-align: top; border-top: 1px solid var(--surface-high); color: var(--text); font-weight: 400; }
thead th { border-top: 0; padding-top: 0; color: var(--muted); font-size: var(--step-small); }
th + th, td + td, th + td { padding-left: 1.25rem; }
.num { text-align: right; white-space: nowrap; }
tr.total th, tr.total td { color: var(--accent-strong); font-weight: 500; border-top-color: var(--accent); }
.tables { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.tables .panel p { margin-top: 1.25rem; }
.barcell { width: 55%; }
.barcell i { display: block; height: 1.5rem; background: var(--accent); transform-origin: left center; }

/* one income, split in two */
.twoways figcaption { font-weight: 500; font-size: var(--step-lead); line-height: 1.25; color: var(--ink); }
.twoways .row { margin-top: 1.75rem; }
.twoways .row p { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 1rem; font-size: var(--step-small); color: var(--text); }
.twoways .row p span { color: var(--ink); font-weight: 500; }
.twoways .track { display: flex; gap: 3px; height: 3.75rem; margin-top: .6rem; }
.twoways .track span { display: flex; align-items: center; min-width: 0; padding: 0 .9rem; overflow: hidden; white-space: nowrap; font-weight: 500; font-size: var(--step-small); transform-origin: left center; }
.taxed { background: var(--surface-high); color: var(--ink); }
.cost { background: var(--muted); padding: 0 !important; }
.free { background: var(--accent); color: var(--accent-ink); }
.legend { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-top: 1.25rem; font-size: var(--step-small); }
.legend li { display: flex; align-items: center; gap: .5rem; color: var(--muted); }
.legend i { width: .8rem; height: .8rem; flex: none; }

/* two answers side by side */
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); align-items: start; }
.pair > div { padding: clamp(1.5rem, 3vw, 2.5rem); }
.pair > .yes { background: var(--surface); }
.pair > .no { background: var(--surface-strong); }
.pair h3 + ul { margin-top: 1.25rem; }

/* terms and what they mean, without boxes */
.terms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(2rem, 4vw, 3.5rem) var(--gap); }
.terms--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.terms dt, .terms h3 { font-weight: 500; font-size: var(--step-lead); line-height: 1.25; color: var(--ink); }
.terms dd, .terms h3 + p, .terms h3 + ul { margin-top: .6rem; }

/* ordered steps with a large numeral */
.steps { list-style: none; padding: 0; counter-reset: step; }
.steps > li { counter-increment: step; display: grid; grid-template-columns: 3.25rem minmax(0, 1fr); gap: 0 1rem; align-items: start; }
.steps > li + li { margin-top: 1.5rem; }
.steps > li::before { content: counter(step); font-family: var(--font-display); font-size: clamp(2rem, 1.6rem + 1.4vw, 2.75rem); line-height: 1; color: var(--accent); }
.hacks > li { grid-template-columns: clamp(3rem, 7vw, 6rem) minmax(0, 5fr) minmax(0, 5fr); gap: 1.5rem var(--gap); }
.hacks > li + li { margin-top: clamp(3rem, 6vw, 5rem); }
.hacks > li::before { font-size: clamp(3.5rem, 2.4rem + 5vw, 7rem); line-height: .8; }
.hacks h3 + p { margin-top: .9rem; }
.hacks .panel > p:first-child { font-weight: 500; color: var(--ink); margin-bottom: 1rem; }
.hacks .panel .small { margin-top: 1rem; }

/* the weekend, day by day */
.week { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; margin-top: .9rem; }
.week span { padding: 1rem .5rem; text-align: center; font-weight: 500; line-height: 1.3; }
.week span small { display: block; font-size: var(--step-small); font-weight: 400; }
.week .on { background: var(--accent); color: var(--accent-ink); }
.week .off { background: var(--surface-high); color: var(--ink); }
.weeks > div + div { margin-top: 2rem; }
.weeks h3 { font-size: var(--step-body); }
.weeks p { margin-top: .9rem; font-size: var(--step-small); color: var(--muted); }
.aside { background: var(--surface); padding: clamp(1.25rem, 2.5vw, 2rem); margin-top: var(--gap); }
p.aside { max-width: 38rem; }

/* questions */
.faq details { background: var(--surface); }
.faq details + details { margin-top: 3px; }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; padding: 1.15rem 1.4rem; font-weight: 500; color: var(--ink); transition: background-color 180ms ease; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; color: var(--accent); font-size: 1.3em; line-height: 1.2; transition: transform 240ms var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary h3 { font-size: var(--step-body); line-height: 1.4; text-wrap: pretty; }
.faq details p { padding: 0 1.4rem 1.4rem; max-width: 44em; }
@media (hover: hover) and (pointer: fine) { .faq summary:hover { background: var(--surface-strong); } }

/* the playbooks on the CRNA page */
.books { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.book { background: var(--surface); padding: clamp(1.5rem, 3.5vw, 3rem); display: flex; flex-direction: column; }
.book b { font-family: var(--font-display); font-weight: 400; font-size: clamp(3.5rem, 2.2rem + 5.5vw, 7rem); line-height: .9; letter-spacing: -0.03em; color: var(--accent-strong); }
.book b + p { margin-top: .75rem; font-size: var(--step-small); color: var(--muted); max-width: 26em; }
.book h3 { margin-top: 2.5rem; font-family: var(--font-display); font-weight: 400; font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.125rem); line-height: 1.1; }
.book h3 a { text-decoration: none; }
.book h3 + p { margin-top: .9rem; }
.book ul { margin-top: 1.25rem; }
.book .actions { margin-top: auto; padding-top: 2rem; }

/* take it with you: the PDF and the update list */
.take { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: var(--gap) clamp(2rem, 6vw, 6rem); align-items: start; background: var(--surface); padding: clamp(1.5rem, 4vw, 3.5rem); }
.take p { margin-top: 1rem; max-width: 34em; }
.take .button { margin-top: 1.5rem; }
.updates label { display: block; font-weight: 500; color: var(--ink); }
.updates .field { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.updates input[type=email] { flex: 1 1 14rem; min-width: 0; min-height: 2.75rem; padding: 0 .9rem; border: 1px solid var(--surface-high); background: var(--bg); color: var(--ink); font: inherit; }
.updates input[type=email]:focus-visible { outline-offset: 0; }
.updates .button { margin-top: 0; }
.updates .hp { position: absolute; left: -9999px; }
.updates .small { margin-top: .9rem; }
.updates [role=status], .updates [role=alert] { margin-top: .9rem; color: var(--ink); }

/* the call to action, the related pages, the note */
.cta { background: var(--surface); padding: clamp(1.5rem, 4vw, 3.5rem); display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--gap); align-items: end; }
.cta p { margin-top: 1rem; max-width: 36em; }
.cta > div:last-child { display: flex; justify-content: flex-end; }
.related { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 2rem; }
.related a { color: var(--ink); }
.also { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 1rem clamp(2rem, 6vw, 6rem); align-items: baseline; }
.also h2 { font-family: var(--font-text); font-weight: 500; font-size: var(--step-lead); letter-spacing: 0; }
.note { margin-top: 3rem; font-size: var(--step-small); color: var(--muted); max-width: 46rem; }
.note a { color: var(--text); }

footer { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem var(--margin); padding: clamp(2.5rem, 5vw, 4rem) var(--edge) var(--margin); background: var(--surface); font-size: var(--step-small); }
footer div { display: flex; flex-direction: column; gap: .35rem; }
footer span:first-child { color: var(--ink); font-weight: 500; }
footer a { color: var(--muted); text-decoration: none; }
@media (hover: hover) and (pointer: fine) { footer a:hover { color: var(--ink); } }
footer .legal { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; max-width: none; margin-top: 1rem; }
footer .legal span { color: var(--muted); font-weight: 400; }

/* entrances: only when the script is running, and never for people who ask for less motion */
/* (phones get the page at once: on one long column the entrances add waiting, not order) */
@media (prefers-reduced-motion: no-preference) and (min-width: 601px) {
  .js [data-r] { opacity: 0; transform: translateY(22px); transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms); }
  .js [data-r].in { opacity: 1; transform: none; }
  .js [data-grow] { transform: scaleX(0); transition: transform 900ms var(--ease-out); transition-delay: calc(var(--i, 0) * 90ms + 150ms); }
  .js .in [data-grow], .js [data-grow].in { transform: scaleX(1); }
}

@media (max-width: 900px) {
  .split, .hero-grid, .take, .cta, .also, .pair, .tables, .books { grid-template-columns: minmax(0, 1fr); }
  .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .terms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hacks > li { grid-template-columns: clamp(3rem, 7vw, 6rem) minmax(0, 1fr); }
  .hacks > li > .panel { grid-column: 1 / -1; }
  .cta > div:last-child { justify-content: flex-start; }
  .books { gap: clamp(3rem, 8vw, 4.5rem); }
  .hero-grid { gap: 5.5rem; }
}
@media (max-width: 600px) {
  .bar .button--quiet { display: none; }
  footer { grid-template-columns: 1fr; }
  .figures, .terms, .terms--two, .marks--two { grid-template-columns: minmax(0, 1fr); }
  .hacks > li { grid-template-columns: minmax(0, 1fr); }
  .hacks > li::before { font-size: 3.5rem; }
  .twoways .track span { padding: 0 .5rem; }
  .barcell { width: 40%; }
  th + th, td + td, th + td { padding-left: .75rem; }
}

/* the claim on the CRNA page's first screen: one large statement, what it means, where it comes from */
.claim h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(3rem, 1.9rem + 4.4vw, 5rem); line-height: .95; letter-spacing: -0.025em; color: var(--accent-strong); }
.claim .lead { margin-top: 1.25rem; }
.claim .lead + p { margin-top: 1.25rem; }
.claim .marks { margin-top: 1rem; }
.claim .actions { margin-top: 1.75rem; }
.claim .small { margin-top: 1.25rem; }
