/* Titleblock: a theme for software products, drawn from the engineering drawing sheet.
   Graphite on vellum, title-block cells, revision deltas, dimension lines, one red pencil. */

:root {
  color-scheme: light;
  --vellum: #f3f2ec;       /* page ground */
  --sheet: #fcfcf9;        /* raised sheets, inputs */
  --sheet-2: #e9e8e0;      /* hover, tints, table heads */
  --line: #d6d4ca;
  --line-strong: #a9a69a;
  --ink: #1d1e21;          /* graphite */
  --ink-2: #44464c;
  --ink-3: #5d5f66;
  --red: #c4381d;          /* the one accent: red pencil */
  --red-ink: #a92f16;      /* accent as small text */
  --red-soft: #f6e0d8;
  --on-red: #ffffff;
  --ok: #2c6a45;
  --ok-soft: #dde9dd;
  --code-bg: #1d1e21;
  --code-ink: #e8e6de;
  --code-dim: #9b9ea8;
  --shadow-sheet: 0 1px 1px rgb(29 30 33 / .06), 0 14px 30px -18px rgb(29 30 33 / .32);
  --shadow-float: 0 2px 4px rgb(29 30 33 / .07), 0 26px 50px -24px rgb(29 30 33 / .42);

  --font-text: "Saira", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px;
  --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(72px, 10vw, 128px);
  --max: 1200px;
  --r-1: 3px;   /* controls */
  --r-2: 6px;   /* sheets, panels */

  --t-display: clamp(2.6rem, 1.5rem + 4.6vw, 5.4rem);
  --t-h2: clamp(1.9rem, 1.4rem + 2vw, 3rem);
  --t-h3: clamp(1.25rem, 1.1rem + .5vw, 1.5rem);
  --t-lede: clamp(1.08rem, 1rem + .35vw, 1.28rem);
  --t-label: .6875rem;     /* title-block labels */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --vellum: #151619; --sheet: #1d1f23; --sheet-2: #272a2f;
    --line: #33363c; --line-strong: #555963;
    --ink: #ecebe5; --ink-2: #c2c1b9; --ink-3: #a2a199;
    --red: #f26a4b; --red-ink: #ff8f74; --red-soft: #3b231c; --on-red: #151619;
    --ok: #82c79b; --ok-soft: #1c3024;
    --code-bg: #0e0f11; --code-ink: #e8e6de; --code-dim: #8f939d;
    --shadow-sheet: 0 1px 1px rgb(0 0 0 / .3), 0 14px 30px -18px rgb(0 0 0 / .7);
    --shadow-float: 0 2px 4px rgb(0 0 0 / .3), 0 26px 50px -24px rgb(0 0 0 / .85);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --vellum: #151619; --sheet: #1d1f23; --sheet-2: #272a2f;
  --line: #33363c; --line-strong: #555963;
  --ink: #ecebe5; --ink-2: #c2c1b9; --ink-3: #a2a199;
  --red: #f26a4b; --red-ink: #ff8f74; --red-soft: #3b231c; --on-red: #151619;
  --ok: #82c79b; --ok-soft: #1c3024;
  --code-bg: #0e0f11; --code-ink: #e8e6de; --code-dim: #8f939d;
  --shadow-sheet: 0 1px 1px rgb(0 0 0 / .3), 0 14px 30px -18px rgb(0 0 0 / .7);
  --shadow-float: 0 2px 4px rgb(0 0 0 / .3), 0 26px 50px -24px rgb(0 0 0 / .85);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scrollbar-color: var(--line-strong) var(--vellum); }
body {
  margin: 0; background: var(--vellum); color: var(--ink);
  font-family: var(--font-text); font-size: 1.0625rem; line-height: 1.6; font-stretch: 94%;
  overflow-x: clip; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
::selection { background: var(--red); color: var(--on-red); }
img, svg { display: block; max-width: 100%; }
a { color: var(--ink); text-decoration-color: var(--red); text-decoration-thickness: 1.5px; text-underline-offset: .22em; }
a:hover { color: var(--red-ink); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 1px; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.04; letter-spacing: -0.02em; text-wrap: balance; font-stretch: 78%; }
p { margin: 0; text-wrap: pretty; }
.num, .mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: 0; font-stretch: 100%; }
.label { font-family: var(--font-mono); font-size: var(--t-label); font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-stretch: 100%; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--vellum); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }

.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.section + .section { padding-top: 0; }
.lede { font-size: var(--t-lede); color: var(--ink-2); max-width: 54ch; line-height: 1.5; }

/* ---------- signatures ---------- */
/* revision delta: an outlined triangle with the revision inside */
.rev { display: inline-grid; place-items: center; width: 34px; height: 30px; position: relative; color: var(--red); flex: none; }
.rev svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.rev span { position: relative; top: 4px; font: 600 .6875rem/1 var(--font-mono); color: var(--red-ink); }
/* detail bubble: a circled letter, as on a drawing */
.bubble { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--red); background: var(--sheet); color: var(--red-ink); font: 600 .75rem/1 var(--font-mono); flex: none; }
/* title block: bordered cells, tiny label over value */
.tblock { display: grid; border: 1.5px solid var(--ink); background: var(--sheet); }
.tblock > div { padding: 6px 10px 7px; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); display: grid; gap: 2px; min-width: 0; }
.tblock b { font-weight: 600; font-size: .875rem; line-height: 1.25; overflow-wrap: anywhere; }
/* dimension line: arrows at both ends, value in the middle */
.dim { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; color: var(--red); font: 500 .75rem/1 var(--font-mono); }
.dim::before, .dim::after { content: ""; height: 9px; background: linear-gradient(currentColor, currentColor) 0 50% / 100% 1px no-repeat; }
.dim::before { border-left: 1px solid currentColor; }
.dim::after { border-right: 1px solid currentColor; }
.dim span { color: var(--red-ink); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 0 20px; border-radius: var(--r-1);
  font: 600 1rem/1 var(--font-text); font-stretch: 94%; text-decoration: none; cursor: pointer;
  border: 1.5px solid var(--ink); background: transparent; color: var(--ink);
  transition: background .18s var(--ease-out), color .18s, transform .18s var(--ease-out), border-color .18s;
}
.btn:hover { background: var(--ink); color: var(--vellum); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--red); border-color: var(--red); color: var(--on-red); }
.btn--primary:hover { background: var(--ink); border-color: var(--ink); color: var(--vellum); }
.btn--ghost { border-color: transparent; padding-inline: 4px; text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: .25em; }
.btn--ghost:hover { background: transparent; color: var(--red-ink); }
.btn--sm { min-height: 38px; padding: 0 14px; font-size: .9375rem; }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.btn[aria-busy="true"] { pointer-events: none; }
.btn[aria-busy="true"]::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- header ---------- */
.site-head { position: sticky; top: 0; z-index: 20; background: var(--vellum); border-bottom: 1px solid var(--ink); }
.site-head .wrap { display: flex; align-items: center; gap: var(--s-5); min-height: 66px; position: relative; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 1.3rem; letter-spacing: -0.01em; font-stretch: 80%; color: var(--ink); }
.brand svg { width: 28px; height: 28px; }
.nav { display: flex; align-items: center; gap: var(--s-5); margin-left: auto; }
.nav a:not(.btn) { text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: .975rem; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:not(.btn):hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--red); }
.head-tools { display: flex; gap: 8px; align-items: center; }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: var(--r-1); border: 1px solid var(--line-strong); background: transparent; color: var(--ink); cursor: pointer; }
.icon-btn:hover { background: var(--sheet-2); }
.icon-btn svg { width: 19px; height: 19px; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: block; }
}
.menu-btn { display: none; }
@media (max-width: 820px) {
  .menu-btn { display: inline-grid; }
  .head-tools { margin-left: auto; }
  .nav { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 4px var(--gutter) 20px; background: var(--vellum); border-bottom: 1px solid var(--ink); display: none; }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav a[aria-current="page"] { border-bottom-color: var(--line); color: var(--red-ink); }
  .nav .btn { margin-top: 16px; }
}

/* ---------- hero ---------- */
.hero { padding-block: clamp(44px, 7vw, 96px) var(--section); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { font-size: var(--t-display); font-weight: 750; font-stretch: 70%; letter-spacing: -0.025em; line-height: .95; }
.hero h1 em { font-style: normal; color: var(--red); }
.hero .lede { margin-top: var(--s-5); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4); margin-top: var(--s-6); }
.hero-note { margin-top: var(--s-4); font-size: .9rem; color: var(--ink-3); }
@media (max-width: 960px) { .hero .wrap { grid-template-columns: 1fr; } }

/* the drawing frame around the hero's product panel: zone letters and numbers, as on a sheet */
.frame { margin: 0; display: grid; grid-template-columns: 18px minmax(0, 1fr) 18px; grid-template-rows: 18px auto 18px; border: 1px solid var(--ink); background: var(--sheet-2); }
.frame .zx, .frame .zy { display: flex; justify-content: space-around; align-items: center; font: 500 .625rem/1 var(--font-mono); color: var(--ink-3); }
.frame .zx { grid-column: 2; }
.frame .zx span, .frame .zy span { flex: 1; text-align: center; }
.frame .zx span + span { border-left: 1px solid var(--line-strong); }
.frame .zy { flex-direction: column; grid-row: 2; }
.frame .zy span { display: grid; place-items: center; width: 100%; }
.frame .zy span + span { border-top: 1px solid var(--line-strong); }
.frame .zx--b { grid-row: 3; }
.frame .zy--r { grid-column: 3; }
.frame .zy--l { grid-column: 1; }
.frame .zx--t { grid-row: 1; }
.frame .board { grid-column: 2; grid-row: 2; border: 1px solid var(--ink); background: var(--vellum); padding: clamp(14px, 2.4vw, 26px); }
.frame figcaption { grid-column: 1 / -1; grid-row: 4; padding: 10px 2px 0; font-size: .8125rem; color: var(--ink-3); background: var(--vellum); }

.panel { position: relative; background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r-2); box-shadow: var(--shadow-float); padding: 20px 22px 0; }
.panel-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.panel-head h2 { font-size: 1.3rem; font-stretch: 82%; letter-spacing: -0.01em; }
.panel-head p { color: var(--ink-3); font-size: .875rem; margin-top: 2px; }
.lines { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: .875rem; }
.lines th { text-align: left; font-weight: 500; padding: 0 0 6px; border-bottom: 1px solid var(--ink); }
.lines td { padding: 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.lines .num { text-align: right; padding-left: 12px; white-space: nowrap; }
.lines tfoot td { border-bottom: 0; padding-top: 10px; font-weight: 700; font-size: 1rem; }
.lines tfoot .num { font-weight: 600; }
.track { list-style: none; margin: 14px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; font-size: .75rem; color: var(--ink-3); }
.track li { display: grid; gap: 4px; position: relative; }
.track li::before { content: ""; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--ink); }
.track li.now::before { border-color: var(--red); background: var(--red); }
.track b { color: var(--ink); font-weight: 600; font-size: .8125rem; }
.track-dim { margin: 10px 0 0; }
.panel .tblock { grid-template-columns: 1.4fr 1fr .6fr .8fr; margin: 18px -22px 0; border-width: 1.5px 0 0; border-radius: 0 0 var(--r-2) var(--r-2); background: transparent; }
.panel .tblock > div { border-bottom: 0; }
.panel .tblock > div:last-child { border-right: 0; }
.panel .bubble { position: absolute; }
@media (prefers-reduced-motion: no-preference) {
  .track-dim::before, .track-dim::after { animation: draw .9s var(--ease-out) .5s both; }
  .track-dim::before { transform-origin: right; }
  .track-dim::after { transform-origin: left; }
  .track-dim span { animation: fadein .4s ease-out 1.1s both; }
  .panel .bubble { animation: pop .5s var(--ease-out) both; }
  .panel .bubble:nth-of-type(2) { animation-delay: .15s; }
  .panel .bubble:nth-of-type(3) { animation-delay: .3s; }
  @keyframes draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  @keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
  @keyframes pop { from { transform: scale(.4); opacity: 0; filter: blur(2px); } to { transform: none; opacity: 1; filter: none; } }
}
.notes { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; font-size: .875rem; color: var(--ink-2); }
.notes li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: center; }
@media (max-width: 560px) {
  .frame { grid-template-columns: 0 minmax(0, 1fr) 0; grid-template-rows: 16px auto 0; border-width: 1px 0 0; background: transparent; }
  .frame .zy, .frame .zx--b { display: none; }
  .frame .board { border-width: 0; padding: 12px 0 0; }
  .panel { padding: 16px 16px 0; }
  .panel .tblock { margin-inline: -16px; grid-template-columns: 1fr 1fr; }
  .panel .tblock > div:nth-child(2) { border-right: 0; }
  .panel .tblock > div:nth-child(-n+2) { border-bottom: 1px solid var(--ink); }
  .track { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 12px; }
}

/* ---------- section heads ---------- */
.head { display: grid; gap: var(--s-4); max-width: 760px; margin-bottom: clamp(36px, 5vw, 64px); }
.head h2 { font-size: var(--t-h2); }
.head p { color: var(--ink-2); font-size: 1.125rem; max-width: 58ch; }

/* ---------- outcomes ---------- */
.outcome { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 72px); align-items: center; padding-block: var(--s-7); border-top: 1px solid var(--ink); }
.outcome h3, .split h3 { font-size: var(--t-h3); margin-bottom: var(--s-3); }
.outcome p, .split p { color: var(--ink-2); max-width: 46ch; }
.outcome .fact { margin-top: var(--s-4); color: var(--ink); }
.outcome .fact b { font-family: var(--font-mono); color: var(--red-ink); font-weight: 600; font-size: .95em; }
.split { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.split > div { padding: var(--s-7) 0; min-width: 0; }
.split > div:first-child { padding-right: clamp(24px, 4vw, 56px); }
.split > div + div { padding-left: clamp(24px, 4vw, 56px); border-left: 1px solid var(--line); }
@media (max-width: 860px) {
  .outcome { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .split > div:first-child { padding-right: 0; }
  .split > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
}

/* timesheet to invoice, measured */
.convert { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 28px; }
.convert .dim { grid-column: 1 / -1; }
.sheet { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r-2); box-shadow: var(--shadow-sheet); padding: 14px 16px; font-size: .8125rem; min-width: 0; }
.sheet h4 { font-size: .9375rem; font-weight: 600; letter-spacing: 0; font-stretch: 90%; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.sheet ul { list-style: none; margin: 0; padding: 0; }
.sheet li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); }
.sheet li span:first-child { min-width: 0; }
.sheet li.total { border-top: 1px solid var(--ink); font-weight: 700; }
@media (max-width: 560px) { .convert { grid-template-columns: 1fr; } }

/* reminder schedule */
.schedule { list-style: none; margin: var(--s-5) 0 0; padding: 0; border-top: 1px solid var(--ink); }
.schedule li { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--line); }
.schedule .day { font-family: var(--font-mono); font-size: .8125rem; color: var(--ink-3); }
.schedule b { font-weight: 600; }
.schedule em { font-style: normal; display: block; color: var(--ink-3); font-size: .875rem; }
.chip { display: inline-flex; align-items: center; gap: 6px; font: 500 .6875rem/1 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; padding: 5px 8px; border: 1px solid var(--line-strong); border-radius: var(--r-1); color: var(--ink-2); white-space: nowrap; }
.chip--ok { border-color: color-mix(in srgb, var(--ok) 50%, transparent); background: var(--ok-soft); color: var(--ok); }
.chip--due { border-color: color-mix(in srgb, var(--red) 50%, transparent); background: var(--red-soft); color: var(--red-ink); }

/* ledger table */
.ledger { width: 100%; border-collapse: collapse; margin-top: var(--s-5); font-size: .9rem; }
.ledger caption { text-align: left; padding-bottom: 8px; }
.ledger th { text-align: left; font-weight: 500; padding: 0 8px 6px 0; border-bottom: 1px solid var(--ink); }
.ledger td { padding: 9px 8px 9px 0; border-bottom: 1px solid var(--line); }
.ledger .num { text-align: right; padding-right: 0; }
.ledger td:first-child, .ledger th:first-child { text-align: left; padding-right: 16px; width: 64px; }
.ledger tfoot td { border-bottom: 3px double var(--ink); font-weight: 700; }

/* ---------- how it works: one strip, bubbles on a leader ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); position: relative; }
.steps::before { content: ""; position: absolute; top: 18px; left: 18px; right: 0; height: 1px; background: var(--ink); }
.steps li { position: relative; padding-right: clamp(20px, 3vw, 40px); display: grid; gap: 12px; align-content: start; }
.steps .bubble { width: 36px; height: 36px; font-size: .875rem; position: relative; background: var(--vellum); }
.steps h3 { font-size: 1.35rem; margin-top: 10px; }
.steps p { color: var(--ink-2); font-size: .985rem; max-width: 34ch; }
.steps .label { margin-top: 4px; }
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; gap: 32px; }
  .steps::before { top: 18px; bottom: 18px; left: 18px; right: auto; width: 1px; height: auto; }
  .steps li { grid-template-columns: 36px 1fr; column-gap: 18px; row-gap: 8px; padding-right: 0; }
  .steps li > :not(.bubble) { grid-column: 2; }
  .steps .bubble { grid-row: 1 / span 3; }
  .steps h3 { margin-top: 4px; }
}

/* ---------- proof ---------- */
.proof { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.compare { width: 100%; border-collapse: collapse; }
.compare th, .compare td { padding: 15px 12px 15px 0; text-align: left; border-bottom: 1px solid var(--line); }
.compare thead th { font-weight: 500; border-bottom: 1px solid var(--ink); }
.compare thead th + th { text-align: right; }
.compare tbody th { font-weight: 500; }
.compare td { font-family: var(--font-mono); font-size: 1.125rem; white-space: nowrap; text-align: right; }
.compare td.was { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--red); text-decoration-thickness: 1.5px; }
.compare td.now { color: var(--ink); font-weight: 600; padding-right: 0; }
.footnote { margin-top: var(--s-4); font-size: .875rem; color: var(--ink-3); max-width: 60ch; }
.quote { margin: 0; padding-top: var(--s-5); border-top: 3px double var(--ink); }
.quote p { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem); line-height: 1.28; font-weight: 600; letter-spacing: -0.01em; font-stretch: 82%; }
.quote footer { margin-top: var(--s-4); color: var(--ink-3); font-size: .9375rem; }
@media (max-width: 860px) { .proof { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .compare th, .compare td { padding-right: 8px; } .compare td { font-size: 1rem; } }

/* ---------- closing ---------- */
.closing { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 340px); border: 1.5px solid var(--ink); background: var(--sheet); }
.closing-main { padding: clamp(28px, 5vw, 60px); }
.closing h2 { font-size: var(--t-h2); }
.closing p { color: var(--ink-2); margin-top: var(--s-4); max-width: 50ch; }
.closing .tblock { border-width: 0 0 0 1.5px; grid-template-columns: 1fr 1fr; align-content: stretch; }
.closing .tblock > div { padding: 12px 14px; }
.closing .tblock > div:nth-child(2n) { border-right: 0; }
.closing .tblock > div:nth-last-child(-n+2) { border-bottom: 0; }
.closing .tblock .wide { grid-column: 1 / -1; border-right: 0; }
.closing .tblock .big { font: 700 2.2rem/1 var(--font-text); font-stretch: 70%; color: var(--red); }
@media (max-width: 760px) { .closing { grid-template-columns: 1fr; } .closing .tblock { border-width: 1.5px 0 0; } }

/* ---------- footer ---------- */
.site-foot { margin-top: 0; border-top: 1px solid var(--ink); padding-block: var(--s-7) var(--s-8); font-size: .9375rem; color: var(--ink-2); }
.site-foot .wrap { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: var(--s-6); }
.site-foot h2 { margin-bottom: 10px; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-foot a { text-decoration: none; color: var(--ink-2); }
.site-foot a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--red); }
.site-foot .fine { margin-top: var(--s-4); color: var(--ink-3); font-size: .875rem; max-width: 36ch; }
@media (max-width: 760px) { .site-foot .wrap { grid-template-columns: 1fr 1fr; } .site-foot .wrap > :first-child { grid-column: 1 / -1; } }

/* ---------- inner page head ---------- */
.page-head { padding-block: clamp(44px, 7vw, 88px) clamp(32px, 4vw, 48px); }
.page-head h1 { font-size: clamp(2.4rem, 1.5rem + 3.8vw, 4.4rem); font-weight: 750; font-stretch: 70%; letter-spacing: -0.025em; line-height: .96; max-width: 16ch; }
.page-head .lede { margin-top: var(--s-4); }

/* ---------- pricing ---------- */
.billing-switch { display: inline-flex; margin-top: var(--s-6); padding: 3px; border: 1px solid var(--ink); border-radius: var(--r-2); background: var(--sheet); }
.billing-switch button { font: 600 .9375rem/1 var(--font-text); font-stretch: 94%; min-height: 38px; padding: 0 16px; border: 0; border-radius: var(--r-1); background: transparent; color: var(--ink-2); cursor: pointer; }
.billing-switch button:hover { color: var(--ink); }
.billing-switch button[aria-pressed="true"] { background: var(--ink); color: var(--vellum); }
.billing-switch .save { font: 500 .75rem/1 var(--font-mono); color: var(--red-ink); margin-left: 6px; }
.billing-switch button[aria-pressed="true"] .save { color: inherit; opacity: .8; }

.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1.5px solid var(--ink); background: var(--sheet); }
.plans { grid-template-rows: repeat(4, auto); }
.plan { display: grid; grid-row: span 4; grid-template-rows: subgrid; }
.plan + .plan { border-left: 1px solid var(--ink); }
.plan-top { display: grid; grid-template-columns: 1fr auto; border-bottom: 1px solid var(--ink); }
.plan-top > div { padding: 8px 14px; display: grid; gap: 2px; }
.plan-top > div + div { border-left: 1px solid var(--ink); text-align: right; }
.plan-top h2 { font-size: 1.5rem; font-stretch: 78%; }
.plan-top b { font: 600 .875rem/1.6 var(--font-mono); }
.plan-body { padding: 20px 20px 0; display: grid; gap: 6px; align-content: start; }
.plan .for { color: var(--ink-2); font-size: .975rem; }
.price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.price .amount { font-family: var(--font-mono); font-size: clamp(2.2rem, 1.8rem + 1.4vw, 2.9rem); font-weight: 600; letter-spacing: -0.04em; line-height: 1; }
.price .per { color: var(--ink-3); font-size: .875rem; }
.price-note { font-size: .8125rem; color: var(--ink-3); min-height: 1.4em; }
.plan ul { list-style: none; margin: 0; padding: 18px 20px 24px; display: grid; gap: 9px; align-content: start; font-size: .9375rem; }
.plan li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; }
.plan li svg { width: 16px; height: 16px; margin-top: 4px; color: var(--ink-2); }
.plan .cta { padding: 0 20px 22px; }
.plan--lead .plan-top { background: var(--ink); color: var(--vellum); }
.plan--lead .plan-top .label { color: color-mix(in srgb, var(--vellum) 75%, var(--ink)); }
.plan--lead .plan-top > div + div { border-left-color: color-mix(in srgb, var(--vellum) 30%, var(--ink)); }
.plan .lead-note { margin-top: 6px; display: flex; gap: 8px; align-items: center; font-size: .8125rem; color: var(--red-ink); font-weight: 600; }
@media (max-width: 900px) {
  .plans { grid-template-columns: 1fr; grid-template-rows: none; }
  .plan { grid-row: auto; grid-template-rows: auto; }
  .plan + .plan { border-left: 0; border-top: 1.5px solid var(--ink); }
}

.compare-wrap { overflow-x: auto; border: 1.5px solid var(--ink); background: var(--sheet); }
.matrix { width: 100%; min-width: 620px; border-collapse: collapse; font-size: .9375rem; }
.matrix th, .matrix td { padding: 11px 16px; border-bottom: 1px solid var(--line); text-align: left; }
.matrix thead th { font-size: .9375rem; font-weight: 600; background: var(--sheet-2); border-bottom: 1px solid var(--ink); }
.matrix thead th:not(:first-child) { text-align: center; }
.matrix tbody th { font-weight: 400; }
.matrix td { text-align: center; font-family: var(--font-mono); font-size: .875rem; color: var(--ink-2); }
.matrix .group th { padding-top: 20px; border-bottom: 1px solid var(--ink); }
.matrix tr:last-child > * { border-bottom: 0; }
.matrix svg { width: 16px; height: 16px; margin-inline: auto; color: var(--ink); }
.matrix .no { color: var(--ink-3); }
.scroll-hint { display: none; margin-top: 8px; font-size: .8125rem; color: var(--ink-3); }
@media (max-width: 680px) { .scroll-hint { display: block; } }

.faq { border-top: 1px solid var(--ink); max-width: 860px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 18px 0; font-weight: 600; font-size: 1.0625rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--red-ink); }
.faq summary svg { width: 18px; height: 18px; flex: none; color: var(--red); transition: transform .25s var(--ease-out); }
.faq details[open] summary svg { transform: rotate(45deg); }
.faq details p { padding: 0 0 22px; color: var(--ink-2); max-width: 64ch; }

/* ---------- changelog / docs ---------- */
.revtable { width: 100%; border-collapse: collapse; border: 1.5px solid var(--ink); background: var(--sheet); font-size: .9375rem; }
.revtable th, .revtable td { border: 1px solid var(--ink); padding: 8px 12px; text-align: left; vertical-align: top; }
.revtable thead th { background: var(--sheet-2); }
.revtable td:first-child, .revtable th:first-child { width: 64px; text-align: center; }
.revtable td.num { white-space: nowrap; width: 120px; }
.revtable a { text-decoration: none; }
.revtable a:hover { text-decoration: underline; text-decoration-color: var(--red); }
@media (max-width: 600px) { .revtable .by { display: none; } .revtable td.num { width: auto; } }

.docs { padding-bottom: var(--section); display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.toc { position: sticky; top: 90px; font-size: .9375rem; }
.toc h2 { margin-bottom: 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a { display: grid; grid-template-columns: 44px 1fr; gap: 6px; padding: 7px 0 7px 14px; margin-left: -1px; text-decoration: none; color: var(--ink-2); border-left: 2px solid transparent; }
.toc a:hover { color: var(--ink); }
.toc a[aria-current="true"] { color: var(--ink); border-left-color: var(--red); font-weight: 600; }
.toc a .num { font-size: .8125rem; padding-top: 2px; color: var(--red-ink); }
.toc .subscribe { margin-top: var(--s-5); padding-top: var(--s-4); border-top: 1px solid var(--line); color: var(--ink-3); font-size: .875rem; }
@media (max-width: 900px) {
  .docs { grid-template-columns: 1fr; }
  .toc { position: static; }
  .toc ol { display: flex; overflow-x: auto; border-left: 0; border-bottom: 1px solid var(--line); }
  .toc a { grid-template-columns: auto; white-space: nowrap; padding: 8px 14px; border-left: 0; border-bottom: 2px solid transparent; margin: 0 0 -1px; }
  .toc a[aria-current="true"] { border-bottom-color: var(--red); }
  .toc a span:last-child { display: none; }
  .toc .subscribe { display: none; }
}

.release { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: var(--s-6); padding-block: var(--s-7); border-top: 1px solid var(--ink); scroll-margin-top: 80px; }
.release:first-child { border-top: 0; padding-top: 0; }
.release-meta { display: grid; gap: 8px; align-content: start; justify-items: start; font-size: .875rem; color: var(--ink-3); }
.release-meta time { font-family: var(--font-mono); font-size: .8125rem; color: var(--ink-2); }
.prose { max-width: 68ch; min-width: 0; }
.prose h2 { font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.2rem); margin-bottom: var(--s-4); }
.prose h3 { font-size: 1.2rem; margin: var(--s-6) 0 var(--s-2); font-stretch: 84%; }
.prose p, .prose ul, .prose ol { margin: 0 0 var(--s-4); color: var(--ink-2); }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin-bottom: 6px; }
.prose li::marker { color: var(--red); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose code { font-family: var(--font-mono); font-size: .86em; background: var(--sheet-2); padding: 1px 5px; border-radius: 2px; color: var(--ink); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--s-4); }

.code { background: var(--code-bg); color: var(--code-ink); border-radius: var(--r-2); overflow: hidden; margin: var(--s-5) 0; }
.code-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 7px 8px 7px 16px; border-bottom: 1px solid color-mix(in srgb, var(--code-ink) 18%, transparent); font: 500 .75rem/1 var(--font-mono); color: var(--code-dim); }
.code-head button { font: 500 .75rem/1 var(--font-mono); color: var(--code-ink); background: transparent; border: 1px solid color-mix(in srgb, var(--code-ink) 30%, transparent); border-radius: 2px; padding: 6px 10px; cursor: pointer; }
.code-head button:hover { background: color-mix(in srgb, var(--code-ink) 12%, transparent); }
.code pre { margin: 0; padding: 16px; overflow-x: auto; font: 400 .8125rem/1.65 var(--font-mono); tab-size: 2; }
.code pre code { background: none; padding: 0; color: inherit; font-size: inherit; }
.code .k { color: #ff9c84; } .code .s { color: #cde2b0; } .code .c { color: var(--code-dim); font-style: italic; } .code .n { color: #f1d48c; }
.code pre::selection, .code pre *::selection { background: #f26a4b; color: #151619; }
.callout { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: var(--r-2); background: var(--sheet); margin: var(--s-5) 0; font-size: .95rem; }
.callout .bubble { width: 24px; height: 24px; }
.callout p { margin: 0; color: var(--ink-2); }
.callout b { color: var(--ink); }
.callout--warn { border-color: color-mix(in srgb, var(--red) 55%, var(--line)); background: var(--red-soft); }
.callout--warn .bubble { background: var(--red); color: var(--on-red); }
@media (max-width: 640px) { .release { grid-template-columns: 1fr; gap: var(--s-4); } .release-meta { grid-auto-flow: column; justify-content: start; gap: 14px; align-items: center; } }

/* ---------- forms / sign-in ---------- */
.auth { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 96px); align-items: start; padding-block: clamp(40px, 7vw, 96px); }
.auth h1 { font-size: clamp(2.3rem, 1.6rem + 2.6vw, 3.6rem); font-weight: 750; font-stretch: 70%; letter-spacing: -0.025em; }
.auth .lede { margin-top: var(--s-3); font-size: 1.0625rem; }
.auth-form { max-width: 440px; }
.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--ink); margin: var(--s-6) 0 var(--s-5); }
.tabs button { font: 600 1rem/1 var(--font-text); font-stretch: 94%; background: none; border: 0; padding: 12px 0; margin-bottom: -1px; color: var(--ink-3); border-bottom: 3px solid transparent; cursor: pointer; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--red); }
.field { display: grid; gap: 6px; margin-bottom: var(--s-4); }
.field[hidden] { display: none; }
.field label { font-weight: 600; font-size: .9375rem; }
.field .help { font-size: .8125rem; color: var(--ink-3); }
.input { width: 100%; min-height: 46px; padding: 10px 12px; font: 400 1rem/1.3 var(--font-text); font-stretch: 94%; color: var(--ink); background: var(--sheet); border: 1px solid var(--line-strong); border-radius: var(--r-1); caret-color: var(--red); }
.input::placeholder { color: var(--ink-3); }
.input:hover { border-color: var(--ink-3); }
.input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 28%, transparent); }
.input[aria-invalid="true"] { border-color: var(--red); }
.error { color: var(--red-ink); font-size: .875rem; font-weight: 500; }
.error[hidden] { display: none; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: var(--s-5); font-size: .9375rem; }
.row[hidden] { display: none; }
.check { display: inline-flex; gap: 10px; align-items: center; }
.check input { width: 18px; height: 18px; accent-color: var(--red); }
.or { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; color: var(--ink-3); font-size: .875rem; margin: var(--s-5) 0; }
.or::before, .or::after { content: ""; height: 1px; background: var(--line-strong); }
.notice { margin-top: var(--s-4); padding: 14px 16px; border: 1px solid var(--ok); background: var(--ok-soft); color: var(--ink); border-radius: var(--r-2); font-size: .9375rem; }
.notice[hidden] { display: none; }
.auth-side { display: grid; gap: var(--s-4); }
.auth-side .fine { color: var(--ink-3); font-size: .875rem; }
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 680px) {
  .matrix tbody th[scope="row"], .matrix thead th:first-child { position: sticky; left: 0; z-index: 1; background: var(--sheet); box-shadow: 1px 0 0 var(--line); }
  .matrix thead th:first-child { background: var(--sheet-2); }
}
