/* ── tokens ─────────────────────────────────────────────────── */
:root {
  --ground:    #F5F7F6;
  --surface:   #FFFFFF;
  --sunken:    #ECF0EE;
  --ink:       #10171C;
  --ink-2:     #3D4A52;
  --muted:     #64757C;
  --line:      #D9E1DE;
  --line-soft: #E7EDEB;

  --blue:      #14538C;
  --blue-bg:   #E6EEF6;
  --green:     #0E7A54;
  --green-bg:  #E2F0EA;
  --amber:     #8A5300;
  --amber-bg:  #F6EDDF;
  --red:       #A8231C;
  --red-bg:    #F7E7E5;

  --term-bg:   #0F1A1E;
  --term-ink:  #C9D6D2;
  --term-dim:  #6C8078;
  --term-line: #1E2C31;

  --shadow: 0 1px 2px rgba(16,23,28,.05), 0 8px 24px -12px rgba(16,23,28,.18);

  --f-display: "IBM Plex Serif", Georgia, "Times New Roman", serif;
  --f-body:    "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono:    "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground:    #0D1315;
    --surface:   #141D20;
    --sunken:    #101819;
    --ink:       #E7EDEA;
    --ink-2:     #B9C6C2;
    --muted:     #8C9C98;
    --line:      #253135;
    --line-soft: #1C262A;

    --blue:      #7CB3E8;
    --blue-bg:   #14232F;
    --green:     #55C795;
    --green-bg:  #10241C;
    --amber:     #DBA45A;
    --amber-bg:  #241D10;
    --red:       #EC8078;
    --red-bg:    #2A1614;

    --term-bg:   #0A1214;
    --term-ink:  #C4D2CE;
    --term-dim:  #62766F;
    --term-line: #1A2529;

    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px -14px rgba(0,0,0,.7);
  }
}
:root[data-theme="dark"] {
  --ground:    #0D1315;
  --surface:   #141D20;
  --sunken:    #101819;
  --ink:       #E7EDEA;
  --ink-2:     #B9C6C2;
  --muted:     #8C9C98;
  --line:      #253135;
  --line-soft: #1C262A;

  --blue:      #7CB3E8;
  --blue-bg:   #14232F;
  --green:     #55C795;
  --green-bg:  #10241C;
  --amber:     #DBA45A;
  --amber-bg:  #241D10;
  --red:       #EC8078;
  --red-bg:    #2A1614;

  --term-bg:   #0A1214;
  --term-ink:  #C4D2CE;
  --term-dim:  #62766F;
  --term-line: #1A2529;

  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px -14px rgba(0,0,0,.7);
}

/* ── base ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16.5px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--f-display); font-weight: 600; line-height: 1.18; text-wrap: balance; margin: 0; letter-spacing: -.012em; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 2px; }

.wrap { max-width: 70rem; margin-inline: auto; padding-inline: clamp(1.15rem, 4vw, 3rem); }
.measure { max-width: 63ch; }
.stack { display: flex; flex-direction: column; }
.mono { font-family: var(--f-mono); }
.tnum { font-variant-numeric: tabular-nums; }

/* ── section scaffolding ────────────────────────────────────── */
.band { border-top: 1px solid var(--line); }
.band > .wrap { padding-block: clamp(3.25rem, 7vw, 5.5rem); }
.band--sunken { background: var(--sunken); }

.eyebrow {
  font-family: var(--f-mono);
  font-size: .705rem;
  font-weight: 500;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 .9rem;
}
.h2 { font-size: clamp(1.62rem, 3.1vw, 2.15rem); }
.lede { color: var(--ink-2); font-size: 1.045rem; margin-top: .95rem; }

/* ── header ─────────────────────────────────────────────────── */
.site-head {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--ground) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; gap: 1.5rem; height: 3.65rem; }
.brand { font-family: var(--f-mono); font-weight: 600; font-size: .96rem; letter-spacing: -.01em; text-decoration: none; display: flex; align-items: center; gap: .55rem; }
.brand-dots { display: inline-flex; gap: .22rem; }
.brand-dots i { width: .42rem; height: .42rem; border-radius: 50%; display: block; }
.brand-dots i:first-child { background: var(--blue); animation: swap 4.5s infinite; }
.brand-dots i:last-child  { background: var(--green); opacity: .3; animation: swap 4.5s infinite reverse; }
@keyframes swap { 0%,42% { opacity: 1; } 58%,100% { opacity: .28; } }
.head-nav { margin-left: auto; display: flex; gap: 1.4rem; align-items: center; font-size: .875rem; }
.head-nav a { color: var(--muted); text-decoration: none; }
.head-nav a:hover { color: var(--ink); }
@media (max-width: 720px) { .head-nav .hide-sm { display: none; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--f-body); font-size: .9rem; font-weight: 500;
  padding: .58rem 1.05rem; border-radius: 4px; text-decoration: none;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: background .16s ease, border-color .16s ease, color .16s ease;
}
.btn--primary { background: var(--ink); color: var(--ground); }
.btn--primary:hover { background: var(--blue); }
.btn--ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn--ghost:hover { border-color: var(--ink-2); }
.btn--lg { padding: .78rem 1.5rem; font-size: .97rem; }

/* ── hero ───────────────────────────────────────────────────── */
.hero > .wrap { padding-block: clamp(3rem, 7vw, 5rem) clamp(2.5rem, 5vw, 3.5rem); }
.hero h1 { font-size: clamp(2.15rem, 5.4vw, 3.5rem); letter-spacing: -.022em; }
.hero .lede { font-size: clamp(1.06rem, 1.9vw, 1.2rem); max-width: 54ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.9rem; align-items: center; }
.hero-note { font-family: var(--f-mono); font-size: .78rem; color: var(--muted); }

.pricetag {
  display: inline-flex; align-items: baseline; gap: .5rem;
  font-family: var(--f-mono); font-size: .8rem; color: var(--ink-2);
  border: 1px solid var(--line); background: var(--surface);
  padding: .3rem .7rem; border-radius: 100px; margin-bottom: 1.4rem;
}
.pricetag b { color: var(--green); font-weight: 600; }

/* ── terminal ───────────────────────────────────────────────── */
.term {
  background: var(--term-bg); color: var(--term-ink);
  border-radius: 6px; border: 1px solid var(--term-line);
  font-family: var(--f-mono); font-size: .805rem; line-height: 1.72;
  overflow: hidden; box-shadow: var(--shadow);
}
.term-bar {
  display: flex; align-items: center; gap: .6rem;
  padding: .5rem .85rem; border-bottom: 1px solid var(--term-line);
  color: var(--term-dim); font-size: .72rem; letter-spacing: .04em;
}
.term-bar .dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--term-line); }
.term-body { padding: .85rem 1rem 1rem; overflow-x: auto; }
.term-body pre { margin: 0; font: inherit; white-space: pre; }
.term .c { color: var(--term-dim); }
.term .g { color: #5FCB98; }
.term .b { color: #7EB6EA; }
.term .r { color: #F08B82; }
.term .y { color: #DFAE63; }
.term .w { color: #E8F0ED; }
.caret { display: inline-block; width: .55ch; background: #5FCB98; animation: blink 1.15s steps(1) infinite; }
@keyframes blink { 0%,49% { opacity: 1; } 50%,100% { opacity: 0; } }

.hero-proof { display: grid; gap: 1.1rem; margin-top: 2.6rem; grid-template-columns: 1fr; }
@media (min-width: 940px) { .hero-proof { grid-template-columns: 1.55fr 1fr; align-items: start; } }

.scorecard {
  border: 1px solid var(--line); background: var(--surface);
  border-radius: 6px; padding: 1.15rem 1.25rem;
}
.scorecard h3 { font-family: var(--f-mono); font-size: .705rem; font-weight: 500; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); }
.score-rows { display: flex; flex-direction: column; gap: .1rem; margin-top: .95rem; }
.score-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: .42rem 0; border-bottom: 1px dashed var(--line-soft); }
.score-row:last-child { border-bottom: 0; }
.score-row span { font-size: .855rem; color: var(--ink-2); }
.score-row b { font-family: var(--f-mono); font-size: .95rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.score-row b.ok { color: var(--green); }
.footnote { font-size: .775rem; color: var(--muted); margin-top: 1rem; line-height: 1.5; }

/* ── generic grid of items ──────────────────────────────────── */
.grid { display: grid; gap: 1.6rem 2.2rem; margin-top: 2.4rem; }
@media (min-width: 700px)  { .grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 920px)  { .grid--3 { grid-template-columns: repeat(3, 1fr); } }
.item h3 { font-family: var(--f-body); font-size: 1rem; font-weight: 600; letter-spacing: 0; margin-bottom: .35rem; display: flex; align-items: baseline; gap: .5rem; }
.item p { font-size: .9rem; color: var(--ink-2); }
.tick { color: var(--green); font-family: var(--f-mono); font-size: .82rem; flex: none; }

/* ── backup proof ───────────────────────────────────────────── */
.proof-pair { display: grid; gap: 1.1rem; margin-top: 2.4rem; }
@media (min-width: 880px) { .proof-pair { grid-template-columns: 1fr 1fr; } }
.proof-label { display: flex; align-items: center; gap: .5rem; font-family: var(--f-mono); font-size: .755rem; letter-spacing: .09em; text-transform: uppercase; margin-bottom: .6rem; }
.pill { display: inline-flex; align-items: center; gap: .35rem; font-family: var(--f-mono); font-size: .68rem; letter-spacing: .07em; text-transform: uppercase; padding: .16rem .5rem; border-radius: 3px; font-weight: 500; }
.pill--ok   { background: var(--green-bg); color: var(--green); }
.pill--bad  { background: var(--red-bg);   color: var(--red); }
.pill--warn { background: var(--amber-bg); color: var(--amber); }
.pill--info { background: var(--blue-bg);  color: var(--blue); }

.callout {
  border-left: 2px solid var(--blue); background: var(--surface);
  padding: 1rem 1.2rem; margin-top: 2rem; border-radius: 0 4px 4px 0;
}
.callout p { font-size: .92rem; color: var(--ink-2); }
.callout strong { color: var(--ink); }

/* ── pricing table ──────────────────────────────────────────── */
.tbl-scroll { overflow-x: auto; margin-top: 2.4rem; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; min-width: 46rem; }
th, td { text-align: left; padding: .95rem 1.1rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; font-size: .885rem; }
thead th { background: var(--sunken); font-family: var(--f-mono); font-size: .705rem; font-weight: 500; letter-spacing: .11em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
tbody tr:last-child td { border-bottom: 0; }
.pkg { font-family: var(--f-body); font-weight: 600; font-size: .97rem; }
.pkg .amt { display: block; font-family: var(--f-mono); font-size: 1.35rem; font-weight: 600; margin-top: .3rem; letter-spacing: -.02em; }
.pkg .per { font-size: .78rem; color: var(--muted); font-weight: 400; }
td ul { margin: 0; padding-left: 1.05rem; }
td li { margin-bottom: .28rem; }
td li::marker { color: var(--muted); }
.excl li::marker { color: var(--amber); }
.excl { color: var(--muted); }

/* ── cost table ─────────────────────────────────────────────── */
.costs { margin-top: 2rem; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--surface); }
.cost-row { display: grid; grid-template-columns: 1fr auto; gap: 1rem; padding: .78rem 1.1rem; border-bottom: 1px solid var(--line-soft); align-items: baseline; }
.cost-row:last-child { border-bottom: 0; background: var(--sunken); font-weight: 600; }
.cost-row .who { font-size: .78rem; color: var(--muted); font-family: var(--f-mono); }
.cost-row .amt { font-family: var(--f-mono); font-variant-numeric: tabular-nums; font-size: .9rem; }

/* ── steps ──────────────────────────────────────────────────── */
.steps { margin-top: 2.4rem; display: flex; flex-direction: column; }
.step { display: grid; grid-template-columns: 2.6rem 1fr; gap: 1.2rem; padding: 1.15rem 0; border-top: 1px solid var(--line-soft); }
.step:first-child { border-top: 0; }
.step .n { font-family: var(--f-mono); font-size: .8rem; color: var(--blue); font-weight: 600; padding-top: .18rem; }
.step h3 { font-family: var(--f-body); font-size: 1rem; font-weight: 600; }
.step p { font-size: .9rem; color: var(--ink-2); margin-top: .2rem; }
.step .when { font-family: var(--f-mono); font-size: .74rem; color: var(--muted); margin-top: .35rem; }

/* ── about ──────────────────────────────────────────────────── */
.about { display: grid; gap: 2rem; margin-top: 2.2rem; }
@media (min-width: 880px) { .about { grid-template-columns: 1.35fr 1fr; gap: 3rem; } }
.about p + p { margin-top: .95rem; }
.creds { border: 1px solid var(--line); border-radius: 6px; background: var(--surface); padding: 1.15rem 1.25rem; align-self: start; }
.creds dl { margin: 0; display: flex; flex-direction: column; gap: .8rem; }
.creds dt { font-family: var(--f-mono); font-size: .68rem; letter-spacing: .11em; text-transform: uppercase; color: var(--muted); }
.creds dd { margin: .15rem 0 0; font-size: .9rem; }

/* ── faq ────────────────────────────────────────────────────── */
.faq { margin-top: 2.2rem; border-top: 1px solid var(--line-soft); }
details { border-bottom: 1px solid var(--line-soft); }
summary { cursor: pointer; padding: 1rem 0; font-weight: 600; font-size: .96rem; list-style: none; display: flex; gap: .9rem; align-items: baseline; }
summary::-webkit-details-marker { display: none; }
summary::before { content: "+"; font-family: var(--f-mono); color: var(--blue); font-weight: 600; flex: none; width: .8rem; }
details[open] summary::before { content: "\2212"; }
details p { padding: 0 0 1.1rem 1.7rem; font-size: .91rem; color: var(--ink-2); max-width: 66ch; }
details p + p { padding-top: 0; margin-top: -.4rem; }

/* ── cta / footer ───────────────────────────────────────────── */
.cta { text-align: center; }
.cta .wrap { padding-block: clamp(3.5rem, 8vw, 6rem); }
.cta h2 { font-size: clamp(1.75rem, 3.6vw, 2.4rem); }
.cta .lede { margin-inline: auto; }
.cta-actions { display: flex; flex-wrap: wrap; gap: .7rem; justify-content: center; margin-top: 2rem; }
.site-foot { border-top: 1px solid var(--line); }
.site-foot .wrap { padding-block: 2rem; display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; font-size: .82rem; color: var(--muted); font-family: var(--f-mono); }
.site-foot a { color: var(--muted); }
.site-foot .sep { margin-left: auto; }

/* ── start page ─────────────────────────────────────────────── */
.start-head { padding-block: clamp(2.5rem, 6vw, 3.75rem) 0; }
.start-head h1 { font-size: clamp(1.9rem, 4.4vw, 2.7rem); }
.start-grid { display: grid; gap: 2.5rem; align-items: start; padding-block: 2.25rem clamp(3rem, 6vw, 4.5rem); }
@media (min-width: 980px) { .start-grid { grid-template-columns: minmax(0,1.5fr) minmax(17rem,.85fr); gap: 3.25rem; } }

/* The form panel is pinned to a light surface in BOTH themes, deliberately.
   Tally renders the form's own typography and has a single theme, so with
   `transparentBackground=1` the page's ground shows through - and in dark mode
   that puts Tally's dark form text on a dark background, unreadable. Keeping
   the panel light means the embed is legible whatever theme the visitor is in,
   and it reads as a paper form laid on the page rather than a mistake.
   The frame still uses theme tokens, so it sits correctly in dark mode. */
.form-shell {
  background: #FFFFFF;
  color: #10171C;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .5rem clamp(.5rem, 2vw, 1.25rem);
  /* No tall min-height: Tally's dynamicHeight reports the form's real height
     (157px on the first page) and resizes the iframe as the visitor advances,
     so a fixed minimum would just pin a slab of empty panel under a short page.
     The small floor only stops the panel collapsing if the embed fails. */
  min-height: 9rem;
  box-shadow: var(--shadow);
  transition: none;
}
.form-shell iframe { display: block; width: 100%; border: 0; }
.form-shell a { color: #14538C; }

/* Sits under the panel to explain why it is light while the page is dark. */
.form-note { font-size: .78rem; color: var(--muted); margin-top: .7rem; font-family: var(--f-mono); }

.form-fallback { padding: 2.5rem 1.5rem; text-align: center; }
.form-fallback p { color: var(--ink-2); font-size: .92rem; max-width: 40ch; margin-inline: auto; }
.form-fallback p + p { margin-top: .8rem; }

.aside-card { border: 1px solid var(--line); border-radius: 6px; background: var(--surface); padding: 1.15rem 1.25rem; }
.aside-card + .aside-card { margin-top: 1rem; }
.aside-card h2 { font-family: var(--f-mono); font-size: .705rem; font-weight: 500; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); margin-bottom: .8rem; }
.aside-card p { font-size: .875rem; color: var(--ink-2); }
.aside-card p + p { margin-top: .7rem; }
.aside-card--flag { border-left: 2px solid var(--blue); }

.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .55rem; }
.checklist li { display: grid; grid-template-columns: 1.1rem 1fr; gap: .55rem; font-size: .875rem; color: var(--ink-2); align-items: baseline; }
.checklist li::before { content: "→"; font-family: var(--f-mono); color: var(--blue); font-size: .8rem; }

/* ── writing ────────────────────────────────────────────────── */
.article { padding-block: clamp(2.5rem, 6vw, 4rem) clamp(3rem, 7vw, 5rem); }
.article-head { max-width: 46rem; }
.article-head h1 { font-size: clamp(1.95rem, 4.4vw, 2.9rem); letter-spacing: -.02em; }
.article-meta { font-family: var(--f-mono); font-size: .76rem; color: var(--muted); letter-spacing: .04em; margin-top: 1rem; }
.article-meta a { color: var(--muted); }

/* Prose measure is deliberately narrower than the page: long technical
   paragraphs become unreadable past about 70 characters. */
.prose { max-width: 40rem; margin-top: 2.5rem; }
.prose > * + * { margin-top: 1.15rem; }
.prose h2 { font-size: clamp(1.3rem, 2.4vw, 1.6rem); margin-top: 2.75rem; }
.prose h3 { font-family: var(--f-body); font-size: 1.03rem; font-weight: 600; margin-top: 2rem; letter-spacing: 0; }
.prose p, .prose li { color: var(--ink-2); }
.prose strong { color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.2rem; }
.prose li + li { margin-top: .4rem; }
.prose code { font-family: var(--f-mono); font-size: .875em; background: var(--sunken); padding: .1em .35em; border-radius: 3px; }
.prose blockquote {
  margin: 1.6rem 0; padding: .1rem 0 .1rem 1.1rem;
  border-left: 2px solid var(--blue); color: var(--ink-2);
}
/* Code blocks break out of the prose measure - they need the width. */
.prose .term { margin-block: 1.6rem; width: min(52rem, 92vw); }
.prose .term code { background: none; padding: 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin-block: 2.5rem; }

.article-cta {
  margin-top: 3rem; border: 1px solid var(--line); border-left: 2px solid var(--green);
  background: var(--surface); border-radius: 0 6px 6px 0; padding: 1.25rem 1.4rem;
  max-width: 40rem;
}
.article-cta h2 { font-family: var(--f-body); font-size: 1rem; font-weight: 600; margin: 0 0 .5rem; letter-spacing: 0; }
.article-cta p { font-size: .9rem; color: var(--ink-2); }
.article-cta .btn { margin-top: 1rem; }

.post-list { display: flex; flex-direction: column; margin-top: 2.5rem; max-width: 46rem; }
.post-list a {
  display: block; text-decoration: none; padding: 1.25rem 0;
  border-top: 1px solid var(--line-soft);
}
.post-list a:first-child { border-top: 0; }
.post-list h2 { font-size: 1.12rem; }
.post-list a:hover h2 { color: var(--blue); }
.post-list p { font-size: .9rem; color: var(--ink-2); margin-top: .35rem; }
.post-list .when { font-family: var(--f-mono); font-size: .72rem; color: var(--muted); margin-top: .5rem; letter-spacing: .05em; }
