/* The calculator and guides. Same paper, ink and gold as the homepage: a dark hero with Mimic, then a reading column
   with a contents rail, short-answer box, callouts and pitch cards. */
:root {
  --paper: #F5F1EA; --hall: #ECE6DB; --card: #FFFDF9; --ink: #1C1916; --dust: #6E665C; --line: #DDD4C6;
  --vault: #12100E; --vault2: #1B1815; --parch: #F6F1E9; --mute: #A69E92; --seam: #2E2A25;
  --gold: #D9A54A; --gold-hi: #E7B866; --coin: #1A1206; --gem: #22713F; --gem-d: #7FD39C; --ember: #B33828; --link: #8A5E12;
  --serif: 'Instrument Serif', Georgia, serif; --sans: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif; --mono: 'Geist Mono', ui-monospace, Menlo, monospace;
  --gut: max(20px, env(safe-area-inset-left, 0px));
  --shadow: 0 1px 2px rgba(40,30,20,0.05), 0 8px 24px rgba(40,30,20,0.06);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 18px/1.7 var(--sans); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.025em; margin: 0; text-wrap: balance; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding-inline: var(--gut); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 24px; border: 0; border-radius: 14px; background: var(--gold); color: var(--coin); font: 600 16.5px/1 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap; transition: background 150ms ease-out, transform 150ms ease-out; }
.btn:hover { background: var(--gold-hi); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible, button:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.btn.sm { min-height: 44px; padding: 0 18px; font-size: 15px; border-radius: 12px; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 18px; }
.mark { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 28px/1 var(--serif); letter-spacing: -0.02em; }
.mark img { width: 34px; height: 34px; }
.top nav { display: flex; align-items: center; gap: 24px; }
.top nav a:not(.btn) { font: 500 15px var(--sans); color: var(--dust); text-decoration: none; }
.top nav a:not(.btn):hover { color: var(--ink); }
.crumbs { margin: 0; font: 500 12.5px/1.4 var(--mono); letter-spacing: 0.05em; text-transform: uppercase; color: var(--dust); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); }

/* Guide hero: the question, the answer in one line, Mimic, and the three numbers that matter. */
.ghero { margin: 8px var(--gut) 0; border-radius: 32px; background: radial-gradient(110% 90% at 85% 100%, #2A231B 0%, var(--vault) 60%); color: var(--parch); overflow: hidden; }
.ghero-in { display: grid; grid-template-columns: 1fr 300px; gap: 40px; align-items: center; padding-block: 56px 40px; }
.ghero .crumbs { color: var(--mute); }
.ghero .crumbs a:hover { color: var(--parch); }
.ghero h1 { margin-top: 18px; font-size: clamp(52px, 7.4vw, 104px); line-height: 0.94; letter-spacing: -0.035em; }
.ghero h1 em { font-style: italic; color: var(--gold-hi); }
.ghero .lede { margin: 24px 0 0; max-width: 36em; font-size: 20px; line-height: 1.55; color: #CFC7BB; }
.ghero .meta { margin: 22px 0 0; font: 500 12.5px/1.4 var(--mono); letter-spacing: 0.05em; text-transform: uppercase; color: var(--mute); }
.ghero-art { width: 100%; max-width: 300px; justify-self: end; filter: drop-shadow(0 30px 40px rgba(0,0,0,0.5)); animation: bob 4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(-1deg); } }
.stats { list-style: none; margin: 0; padding: 24px 0 40px; border-top: 1px solid var(--seam); display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.stats b { display: block; font: 400 52px/1 var(--serif); letter-spacing: -0.03em; color: var(--parch); font-variant-numeric: tabular-nums; }
.stats span { display: block; margin-top: 10px; max-width: 16em; font: 500 12.5px/1.4 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--mute); }

/* Body: contents rail beside the reading column */
.gbody { display: grid; grid-template-columns: 220px minmax(0, 720px); gap: 64px; justify-content: center; padding-block: 56px 96px; }
.toc { position: sticky; top: 24px; align-self: start; font-size: 14.5px; line-height: 1.4; }
.toc p { margin: 0 0 12px; font: 500 12px/1.4 var(--mono); letter-spacing: 0.05em; text-transform: uppercase; color: var(--dust); }
.toc ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; border-left: 2px solid var(--line); }
.toc a:not(.btn) { display: block; padding: 6px 0 6px 14px; margin-left: -2px; border-left: 2px solid transparent; text-decoration: none; color: var(--dust); }
.toc a:not(.btn):hover, .toc a.on { color: var(--ink); border-left-color: var(--gold); }
.toc .btn { margin-top: 24px; width: 100%; }
.toc details summary { display: none; }

.doc { min-width: 0; }
.doc > p, .doc > ul, .doc > ol, .doc section > p, .doc section > ul, .doc section > ol { margin: 18px 0 0; }
.doc h2 { margin-top: 72px; font-size: clamp(34px, 4.2vw, 46px); line-height: 1.08; scroll-margin-top: 24px; }
.doc h2::before { content: ''; display: block; width: 44px; height: 3px; margin-bottom: 20px; border-radius: 2px; background: var(--gold); }
.doc h3 { margin-top: 36px; font-size: 27px; line-height: 1.2; }
.doc ul, .doc ol { padding-left: 0; list-style: none; }
.doc ul > li, .doc ol > li { position: relative; padding-left: 30px; }
.doc ul > li + li, .doc ol > li + li { margin-top: 10px; }
.doc ul > li::before { content: ''; position: absolute; left: 6px; top: 0.72em; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.doc ol { counter-reset: n; }
.doc ol > li { counter-increment: n; }
.doc ol > li::before { content: counter(n); position: absolute; left: 0; top: 0.18em; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--parch); font: 600 12px/1 var(--sans); }
.doc a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.doc strong { font-weight: 600; }
.doc .cards li, .doc .stats li { padding-left: 0; }
.doc .cards li::before { display: none; }

/* How-to pages number their steps. */
.doc.steps { counter-reset: step; }
.doc.steps h2:not(.nostep) { counter-increment: step; }
.doc.steps h2:not(.nostep)::before { content: 'Step ' counter(step); width: auto; height: auto; background: none; font: 500 12.5px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--link); margin-bottom: 14px; }

/* The short answer, first thing in the column */
.short { margin: 0; padding: 26px 28px; border-radius: 22px; background: var(--card); box-shadow: var(--shadow); border-top: 4px solid var(--gold); }
.short > p:first-child { margin: 0 0 12px; font: 500 12.5px/1.4 var(--mono); letter-spacing: 0.05em; text-transform: uppercase; color: var(--link); }
.short ul { margin: 0; }
.short li { font-size: 17px; }

/* Callouts: a tip, a warning, a number that matters */
.tip, .warn { margin: 28px 0 0; padding: 18px 22px 18px 20px; border-radius: 16px; background: var(--hall); border-left: 4px solid var(--gold); font-size: 16.5px; line-height: 1.6; }
.warn { background: #F6E4DC; border-left-color: var(--ember); }
.tip b:first-child, .warn b:first-child { display: block; margin-bottom: 2px; font: 600 12.5px/1.4 var(--mono); letter-spacing: 0.05em; text-transform: uppercase; color: var(--link); }
.warn b:first-child { color: var(--ember); }
.big { margin: 32px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 24px; align-items: center; padding: 24px 28px; border-radius: 22px; background: var(--ink); color: var(--parch); }
.big b { font: 400 64px/0.9 var(--serif); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--gold-hi); }
.big span { font-size: 17px; line-height: 1.5; color: #CFC7BB; }

/* Tables and copyable text */
.doc .tbl { margin-top: 24px; overflow-x: auto; border-radius: 18px; background: var(--card); box-shadow: var(--shadow); }
.doc table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.5; }
.doc th, .doc td { padding: 13px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.doc th { font: 500 12px/1.35 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--dust); background: var(--hall); white-space: nowrap; }
.doc tbody tr:nth-child(even) td { background: #FAF6EF; }
.doc td:first-child { font-weight: 600; }
.doc tr:last-child td { border-bottom: 0; }
.doc td.n, .doc th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.copy { position: relative; margin-top: 24px; }
.doc pre { margin: 0; padding: 56px 22px 22px; border-radius: 18px; background: var(--vault2); color: var(--parch); overflow-x: auto; font: 14.5px/1.65 var(--mono); white-space: pre-wrap; }
.copy button { position: absolute; top: 12px; right: 12px; min-height: 34px; padding: 0 14px; border: 1px solid var(--seam); border-radius: 10px; background: var(--vault); color: var(--parch); font: 600 13px/1 var(--sans); cursor: pointer; }
.copy button:hover { border-color: var(--gold); }
.doc .note { margin-top: 24px; padding: 18px 20px; border-radius: 16px; background: var(--hall); font-size: 16px; }

/* Pitch: where the reader feels the work, Mimic offers to do it. */
.pitch { margin: 48px 0 8px; display: grid; grid-template-columns: 1fr 210px; gap: 28px; align-items: center; padding: 32px 32px 0; border-radius: 26px; background: radial-gradient(120% 120% at 100% 100%, #2A231B 0%, var(--vault) 65%); color: var(--parch); overflow: hidden; }
.pitch > div:first-child { padding-bottom: 32px; }
.pitch .k { margin: 0; display: flex; align-items: center; gap: 10px; font: 500 12.5px/1.4 var(--mono); letter-spacing: 0.05em; text-transform: uppercase; color: var(--gold-hi); }
.pitch .k img { width: 26px; height: 26px; }
.pitch .h { margin: 14px 0 0; font: 400 clamp(30px, 3.6vw, 40px)/1.05 var(--serif); letter-spacing: -0.025em; text-wrap: balance; }
.pitch .say { margin: 14px 0 0; font-size: 16.5px; line-height: 1.6; color: #CFC7BB; }
.pitch .btn { margin-top: 22px; }
.pitch .shot { align-self: end; padding: 9px 9px 0; border-radius: 34px 34px 0 0; background: #0E0D0C; box-shadow: 0 0 0 1.5px #3A342D inset; }
.pitch .shot img { border-radius: 26px 26px 0 0; aspect-ratio: 786 / 1100; object-fit: cover; object-position: top; }
.pitch.wide .shot { padding: 0; background: none; box-shadow: none; align-self: center; margin-bottom: 32px; }
.pitch.wide .shot img { border-radius: 16px; aspect-ratio: auto; box-shadow: 0 20px 40px rgba(0,0,0,0.45); }
.pitch.wide { grid-template-columns: 1fr 300px; }

.doc .sources { margin-top: 72px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 14.5px; line-height: 1.55; color: var(--dust); }
.doc .sources h2 { margin-top: 0; font-size: 26px; color: var(--ink); }
.doc .sources h2::before { display: none; }
.doc .sources li { overflow-wrap: anywhere; padding-left: 30px; }

/* Guides index cards */
.cards { margin: 28px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; padding: 0; list-style: none; }
.cards a { display: grid; align-content: start; gap: 10px; height: 100%; padding: 26px 26px 24px; border-radius: 22px; background: var(--card); text-decoration: none; color: var(--ink); box-shadow: var(--shadow); border-top: 4px solid var(--gold); transition: transform 160ms ease-out, box-shadow 160ms ease-out; }
.cards a:hover { transform: translateY(-3px); box-shadow: 0 1px 2px rgba(40,30,20,0.08), 0 16px 36px rgba(40,30,20,0.12); }
.cards i { font: normal 500 12px/1.4 var(--mono); letter-spacing: 0.05em; text-transform: uppercase; color: var(--link); }
.cards b { display: block; font: 400 30px/1.08 var(--serif); letter-spacing: -0.02em; }
.cards span { display: block; font-size: 15.5px; line-height: 1.5; color: var(--dust); }

/* The waitlist ask at the end of every page */
.join { display: grid; gap: 8px; max-width: 480px; }
.join label { font: 500 14px/1.2 var(--sans); color: var(--mute); }
.join .row { display: flex; gap: 10px; }
.join input { flex: 1; min-width: 0; min-height: 52px; padding: 0 16px; border: 1.5px solid var(--seam); border-radius: 14px; background: var(--vault2); color: var(--parch); font: 17px var(--sans); }
.join .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.join .msg { min-height: 22px; font-size: 15px; color: var(--mute); }
.join .msg.ok { color: var(--gem-d); font-weight: 600; }
.join .msg.bad { color: #F07A6C; }
.end { background: var(--vault); color: var(--parch); padding-block: 112px 80px; }
.end .grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 56px; align-items: center; }
.end img { width: 100%; max-width: 400px; margin: 0 auto; }
.end h2 { font-size: clamp(46px, 5.6vw, 80px); line-height: 0.98; }
.end p.say { margin: 22px 0 0; font-size: 19px; color: var(--mute); max-width: 32em; }
.end .proof { margin: 26px 0 30px; display: flex; flex-wrap: wrap; gap: 28px; }
.end .proof b { display: block; font: 400 44px/1 var(--serif); letter-spacing: -0.03em; color: var(--parch); }
.end .proof b.up { color: var(--gem-d); }
.end .proof span { display: block; margin-top: 8px; max-width: 14em; font: 500 12px/1.35 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--mute); }
footer { background: var(--vault); color: var(--mute); padding-block: 0 48px; font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; padding-top: 32px; border-top: 1px solid var(--seam); }
footer nav { display: flex; flex-wrap: wrap; gap: 12px 22px; }
footer a { text-decoration: none; color: var(--parch); }
footer p { margin: 0; max-width: 46em; }

@media (max-width: 1020px) {
  .gbody { grid-template-columns: minmax(0, 720px); gap: 0; padding-top: 32px; }
  .toc { position: static; margin-bottom: 36px; padding: 6px 20px; border-radius: 18px; background: var(--card); box-shadow: var(--shadow); }
  .toc details summary { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; cursor: pointer; list-style: none; font: 600 15px var(--sans); }
  .toc details summary::-webkit-details-marker { display: none; }
  .toc details summary::after { content: '+'; font-size: 22px; color: var(--link); }
  .toc details[open] summary::after { content: '−'; }
  .toc details > p { display: none; }
  .toc ol { margin-bottom: 14px; }
  .toc .btn { display: none; }
}
@media (max-width: 860px) {
  .ghero-in { grid-template-columns: 1fr 140px; gap: 20px; padding-block: 40px 28px; }
  .ghero-art { max-width: 140px; align-self: start; }
  .end .grid { grid-template-columns: 1fr; gap: 32px; }
  .end img { max-width: 220px; }
}
@media (max-width: 620px) {
  body { font-size: 17px; }
  .top nav a:not(.btn) { display: none; }
  .mark { font-size: 24px; }
  .ghero { margin-inline: 10px; border-radius: 26px; }
  .ghero-in { grid-template-columns: 1fr; }
  .ghero-art { display: none; }
  .ghero h1 { font-size: 52px; }
  .ghero .lede { font-size: 18px; }
  .stats { grid-template-columns: 1fr; gap: 18px; padding-bottom: 32px; }
  .stats li { display: flex; align-items: baseline; gap: 14px; }
  .stats b { font-size: 40px; min-width: 3.2em; }
  .stats span { margin-top: 0; }
  .pitch, .pitch.wide { grid-template-columns: 1fr; padding: 26px 24px 0; }
  .pitch .shot { max-width: 230px; margin: 0 auto; }
  .pitch.wide .shot { max-width: none; }
  .big { grid-template-columns: 1fr; padding: 22px; }
  .big b { font-size: 52px; }
  .short { padding: 22px; }
  .join .row { flex-direction: column; }
  .join .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ghero-art { animation: none; }
}
