/* dumbmail.app — warm paper, dark ink, and one amber cursor.
   Tokens come straight from the app's brand kit (BRAND.md). */

/* ---------- Fonts (IBM Plex, SIL OFL, subset to Latin) ---------- */
@font-face { font-family: "Plex Mono"; src: url("/assets/fonts/IBMPlexMono-Regular.woff2?v=e5d132fcce") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("/assets/fonts/IBMPlexMono-Medium.woff2?v=e1ec7f304e") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("/assets/fonts/IBMPlexMono-SemiBold.woff2?v=8b58c62e0c") format("woff2"); font-weight: 600 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("/assets/fonts/IBMPlexSans-Regular.woff2?v=13667a40d1") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("/assets/fonts/IBMPlexSans-Italic.woff2?v=917c0ce0c8") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("/assets/fonts/IBMPlexSans-SemiBold.woff2?v=acdbdff832") format("woff2"); font-weight: 600 700; font-style: normal; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;
  --paper: #F6F1E7;
  --paper-sunken: #ECE4D3;
  --ink: #1F1B16;
  --ink-muted: #655C52;
  --rule: #D6CAB4;
  --amber: #E8962E;
  --on-amber: #1F1B16;
  --amber-ink: #8F520A;
  --link: #1E5A96;
  --danger: #B3261E;
  --success: #2F6B3A;
  --accent: #9A5A0E;

  --select-fill: var(--amber);
  --select-ink: var(--on-amber);
  --account: #2F6FB0; /* an account color in the mock-ups; user-chosen in the app */

  --mono: "Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --sans: "Plex Sans", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;

  --radius: 8px;
  --radius-sm: 4px;
  --measure: 68ch;
  --wide: 1080px;
  --gutter: 16px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #17140F;
    --paper-sunken: #221E18;
    --ink: #F1EADC;
    --ink-muted: #A99F90;
    --rule: #3A342B;
    --amber: #F2A33A;
    --amber-ink: #F5B25A;
    --link: #86B6EA;
    --danger: #F08A80;
    --success: #7CC28A;
    --accent: #A86512;
    --account: #6FA3DA;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #17140F;
  --paper-sunken: #221E18;
  --ink: #F1EADC;
  --ink-muted: #A99F90;
  --rule: #3A342B;
  --amber: #F2A33A;
  --amber-ink: #F5B25A;
  --link: #86B6EA;
  --danger: #F08A80;
  --success: #7CC28A;
  --accent: #A86512;
  --account: #6FA3DA;
}

/* Increase Contrast: stronger rules, and the selection swaps to the deeper accent with white text. */
@media (prefers-contrast: more) {
  :root { --rule: var(--ink-muted); --select-fill: var(--accent); --select-ink: #FFFFFF; }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
  font-kerning: normal;
}
@media (min-width: 720px) { body { font-size: 1.125rem; } }

h1, h2, h3, h4 { font-family: var(--mono); font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 .6em; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 6vw, 3.5rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.5rem, 3.6vw, 2.1rem); letter-spacing: -0.02em; }
h3 { font-size: 1.1rem; }
p, ul, ol, dl, table, blockquote { margin: 0 0 1em; }
p { text-wrap: pretty; }
a { color: var(--link); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
strong { font-weight: 600; }
/* overflow-wrap: long identifiers break rather than push the page sideways on a phone. */
code { font-family: var(--mono); font-size: .9em; background: var(--paper-sunken); padding: .05em .35em; border-radius: var(--radius-sm); overflow-wrap: anywhere; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2rem 0; }
img { max-width: 100%; height: auto; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: var(--gutter); top: 8px; z-index: 10; background: var(--paper); padding: .5em .8em; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.mono { font-family: var(--mono); }
.muted { color: var(--ink-muted); }
.small { font-size: .875rem; }
.eyebrow {
  font: 500 .8125rem/1.4 var(--mono);
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--amber-ink);
  margin: 0 0 .9em;
}

/* ---------- Layout ---------- */
.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); }
.prose { max-width: var(--measure); }
.prose-center { max-width: var(--measure); margin-left: auto; margin-right: auto; }
@media (min-width: 720px) { :root { --gutter: 32px; } }

.section { padding: clamp(3rem, 8vw, 5.5rem) 0; border-top: 1px solid var(--rule); }
.section.band { background: var(--paper-sunken); }
.section > .wrap > :last-child { margin-bottom: 0; }
.lede { font-size: 1.15em; color: var(--ink); max-width: var(--measure); }
.section-head { max-width: var(--measure); margin-bottom: 2.25rem; }
.section-head p { color: var(--ink-muted); }

.split { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 900px) { .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 4rem; } .split.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }

.stack { display: grid; gap: 2rem; }
@media (min-width: 900px) { .stack > .prose { columns: 2; column-gap: 3rem; max-width: none; } .stack > .prose > :is(.eyebrow, h2) { column-span: all; } .stack > .prose h2 { max-width: 22ch; } .stack > .prose p { break-inside: avoid; } }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.grid-3 { display: grid; gap: 2rem; }
@media (min-width: 820px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Header ---------- */
.site-header { background: var(--paper-sunken); border-bottom: 1px solid var(--rule); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.5rem; min-height: 64px; padding-top: .6rem; padding-bottom: .6rem; }
.brand { display: inline-flex; align-items: center; line-height: 0; margin-right: auto; }
.brand img { height: 28px; width: auto; }
.logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-light { display: none; }
  :root:not([data-theme="light"]) .logo-dark { display: inline; }
}
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: inline; }

.site-nav { order: 3; width: 100%; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.site-nav a { font: 500 .9375rem/1 var(--mono); color: var(--ink); text-decoration: none; padding: .45rem 0; display: inline-block; border-bottom: 2px solid transparent; }
.site-nav a:hover { border-bottom-color: var(--rule); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--amber); }
.header-actions { display: flex; align-items: center; gap: .75rem; }
@media (min-width: 760px) {
  .site-nav { order: 0; width: auto; }
}
@media (max-width: 759px) {
  .site-header .theme-toggle { display: none; }
  .site-nav ul { gap: .25rem 1rem; }
}
@media (max-width: 420px) {
  .site-nav a { font-size: .875rem; }
}
.footer-theme { margin-top: 1.5rem; }
@media (min-width: 760px) { .footer-theme { display: none; } }

.theme-toggle {
  font: 500 .8125rem/1 var(--mono); color: var(--ink-muted);
  background: transparent; border: 1px solid var(--rule); border-radius: var(--radius-sm);
  padding: .45rem .55rem; cursor: pointer;
}
.theme-toggle:hover { color: var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  font: 600 1rem/1.2 var(--mono);
  text-decoration: none;
  padding: .8rem 1.15rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--amber); color: var(--on-amber); }
.btn-primary:hover { background: color-mix(in srgb, var(--amber) 88%, var(--ink)); text-decoration: none; }
.btn-small { font-size: .875rem; padding: .5rem .8rem; }
.btn-quiet { color: var(--ink); border-color: var(--rule); background: transparent; }
.btn-quiet:hover { border-color: var(--ink-muted); }
@media (prefers-contrast: more) { .btn-primary { border-color: var(--ink); } }
.textlink { font: 500 1rem/1.2 var(--mono); color: var(--ink); text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: .3em; }
.textlink:hover { text-decoration-color: var(--ink); }

.cta { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.5rem; }
.price-note { font: 400 .875rem/1.45 var(--mono); color: var(--ink-muted); margin: .75rem 0 0; }
.price-note strong { color: var(--ink); font-weight: 600; }

/* ---------- KeyCap (reverse video, like Pine's bottom menu) ---------- */
kbd, .kc {
  display: inline-block;
  min-width: 1.6em;
  padding: .12em .38em .08em;
  font: 500 .82em/1.3 var(--mono);
  text-align: center;
  color: var(--paper);
  background: var(--ink);
  border-radius: 3px;
  vertical-align: .08em;
  white-space: nowrap;
}
.kc-dim { opacity: .4; }
.key { display: inline-flex; align-items: baseline; gap: .45em; white-space: nowrap; }
.key-label { color: var(--ink-muted); font-family: var(--mono); font-size: .875em; }
.keyline { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; font-size: 1rem; padding: 0; margin: 0; list-style: none; }

/* ---------- Command bar ---------- */
.cmdbar {
  background: var(--paper-sunken);
  border-top: 1px solid var(--rule);
  padding: .7rem .9rem;
  font-family: var(--mono);
  font-size: .875rem;
  overflow-x: auto;
}
.cmdbar-row { display: grid; grid-template-columns: repeat(7, max-content); gap: .4rem 1.1rem; list-style: none; margin: 0; padding: 0; }
.cmdbar-row + .cmdbar-row { margin-top: .45rem; }
@media (max-width: 699px) {
  .cmdbar-row { display: flex; flex-wrap: wrap; }
}
.cmdbar .key-label { font-size: 1em; }

/* Context switcher for the live command bar (pure CSS; works without JavaScript) */
.ctx { border: 0; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.ctx legend { font: 500 .8125rem/1.4 var(--mono); color: var(--ink-muted); margin-bottom: .5rem; padding: 0; width: 100%; }
.ctx input { position: absolute; opacity: 0; }
.ctx label { font: 500 .875rem/1 var(--mono); padding: .55rem .8rem; border: 1px solid var(--rule); border-radius: var(--radius-sm); cursor: pointer; }
.ctx input:checked + label { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.ctx input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.ctx-panel { display: none; }
#ctx-list:checked ~ .window .ctx-panel[data-ctx="list"],
#ctx-reader:checked ~ .window .ctx-panel[data-ctx="reader"],
#ctx-search:checked ~ .window .ctx-panel[data-ctx="search"] { display: block; }

/* ---------- Screenshots (a light and a dark copy; the theme picks one) ---------- */
.shot { margin: 1.5rem 0 0; }
.shot a { display: block; cursor: zoom-in; }
.shot img { display: block; width: 100%; height: auto; }
.shot .shot-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .shot .shot-light { display: none; }
  :root:not([data-theme="light"]) .shot .shot-dark { display: block; }
}
:root[data-theme="dark"] .shot .shot-light { display: none; }
:root[data-theme="dark"] .shot .shot-dark { display: block; }

/* Full-size view, opened by site.js */
.zoom { padding: 0; margin: 0; border: 0; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; background: transparent; overflow: auto; }
.zoom[open] { display: flex; }
.zoom::backdrop { background: rgb(0 0 0 / .92); }
.zoom img { margin: auto; padding: 3.5rem 1rem 1rem; width: auto; height: auto; max-width: 100%; max-height: 100%; box-sizing: border-box; cursor: zoom-out; }
/* On phones, show it near full size and let people pan. */
@media (max-width: 699px) { .zoom img { max-width: none; max-height: none; width: 1100px; } }
.zoom-close { position: fixed; top: .75rem; right: .75rem; font: 500 .875rem/1 var(--mono); color: var(--ink); background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius-sm); padding: .55rem .8rem; cursor: pointer; }
.zoom-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Window frame + mock message list ---------- */
.window {
  margin: 0;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--paper);
  overflow: hidden;
}
.window-bar { display: flex; align-items: center; gap: 7px; padding: 10px 12px; background: var(--paper-sunken); border-bottom: 1px solid var(--rule); }
.window-bar span { width: 11px; height: 11px; border-radius: 50%; border: 1px solid var(--rule); background: var(--paper); }
.window-title { margin-left: .5rem; font: 500 .75rem/1 var(--mono); color: var(--ink-muted); }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.locbar {
  display: flex; align-items: center; gap: .75rem;
  padding: .55rem .9rem .55rem 0;
  font: 400 .875rem/1.3 var(--mono);
  border-bottom: 1px solid var(--rule);
  min-width: 640px;
}
.locbar::before { content: ""; align-self: stretch; width: 4px; background: var(--account); }
.locbar svg { width: 16px; height: 16px; flex: none; }
.locbar b { font-weight: 600; }
.locbar .acct { color: var(--ink-muted); }
.locbar .count { margin-left: auto; color: var(--ink-muted); }

.mlist { font: 400 .875rem/1.25 var(--mono); min-width: 640px; }
.mrow {
  display: grid;
  grid-template-columns: 4.2ch 13ch 22ch minmax(0, 1fr);
  gap: 0 1.2ch;
  padding: .42rem .9rem;
  border-bottom: 1px solid color-mix(in srgb, var(--rule) 55%, transparent);
  white-space: nowrap;
}
.mrow > span { overflow: hidden; text-overflow: ellipsis; }
.mhead { background: var(--paper-sunken); border-bottom: 1px solid var(--rule); color: var(--ink-muted); font-weight: 500; font-size: .8125rem; padding-top: .35rem; padding-bottom: .35rem; }
.mhead .sorted { color: var(--ink); }
.mk { display: inline-flex; gap: .4ch; align-items: center; }
.mk-n { color: var(--amber-ink); font-weight: 600; }
.mk svg { width: 12px; height: 12px; }
.mrow.unread .from, .mrow.unread .subj { font-weight: 600; }
.mrow.sel { background: var(--select-fill); color: var(--select-ink); border-bottom-color: transparent; }
.mrow.sel .mk-n, .mrow.sel .tree { color: var(--select-ink); }
.tree { color: var(--amber-ink); }
.mrow.thread { background: color-mix(in srgb, var(--amber) 9%, transparent); }
.mrow.older { color: var(--amber-ink); grid-template-columns: 1fr; text-align: center; font-size: .8125rem; }
.mlist .empty { padding: 1.5rem .9rem; color: var(--ink-muted); text-align: center; }
.figcap { font: 400 .8125rem/1.5 var(--mono); color: var(--ink-muted); margin-top: .8rem; }

/* ---------- Cards ---------- */
.card {
  position: relative;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem 1.2rem;
  background: var(--paper);
}
.band .card { background: var(--paper); }
.card h3 { font-size: 1.05rem; margin: 0 0 .45em; padding-right: 4.5rem; }
.card p { margin: 0; font-size: 1rem; }
.card .card-key { position: absolute; top: 1.15rem; right: 1.15rem; font-size: .95rem; }
.card .card-meta { display: block; margin-top: .75rem; font: 400 .8125rem/1.4 var(--mono); color: var(--ink-muted); }

.tag {
  display: inline-block;
  font: 600 .6875rem/1 var(--mono);
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--amber-ink);
  border: 1px solid currentColor;
  border-radius: 3px;
  padding: .3em .45em .25em;
  vertical-align: .2em;
  margin-left: .35em;
  white-space: nowrap;
}

/* ---------- Hero ---------- */
.hero { padding: clamp(3rem, 9vw, 6.5rem) 0 clamp(2.5rem, 7vw, 4.5rem); }
.hero .split { align-items: center; }
@media (min-width: 900px) { .hero .split { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); } }
.hero h1 { margin-bottom: .5em; }
.hero .sub { font-size: 1.2em; max-width: 34em; margin-bottom: 1.75rem; }
.hero-art { display: flex; justify-content: center; }
.hero-art img { width: min(300px, 60vw); }
.hero .keyline { margin-top: 2.25rem; }
.status-line { font: 400 .8125rem/1.4 var(--mono); color: var(--ink-muted); margin: 0 0 1.25rem; }

.cursor {
  display: inline-block;
  width: .55em; height: .1em;
  margin-left: .08em;
  background: var(--amber);
  vertical-align: baseline;
}
@media (prefers-reduced-motion: no-preference) {
  .cursor { animation: blink 1.1s steps(1, end) infinite; }
  @keyframes blink { 50% { opacity: 0; } }
}

/* ---------- Promises ---------- */
.promise h3 { font-size: 1.3rem; display: flex; align-items: baseline; gap: .5rem; }
.promise h3 .num { font-size: .8125rem; color: var(--amber-ink); font-weight: 500; }
.promise p { color: var(--ink); }

/* ---------- Fact list ---------- */
.facts { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.facts li { padding: 1rem 0; border-top: 1px solid var(--rule); }
.facts li:last-child { border-bottom: 1px solid var(--rule); }
.facts b { display: block; font: 600 1rem/1.35 var(--mono); margin-bottom: .2rem; }

/* ---------- Lineage strip ---------- */
.lineage { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
@media (min-width: 720px) { .lineage { grid-template-columns: repeat(3, 1fr); } }
.lineage li { background: var(--paper); padding: 1rem 1.1rem; font-size: .95rem; }
.lineage b { display: block; font: 600 .9375rem/1.3 var(--mono); margin-bottom: .3rem; }
.left-out { font-family: var(--mono); font-size: .9375rem; }

/* ---------- Small item row ---------- */
.items { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem 2rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); }
.items li { font-size: .975rem; }
.items b { display: block; font: 600 .9375rem/1.3 var(--mono); margin-bottom: .15rem; }

/* ---------- Plain lists with a terminal bullet ---------- */
.dash { list-style: none; padding: 0; }
.dash li { position: relative; padding-left: 1.4em; margin-bottom: .55em; }
.dash li::before { content: "–"; position: absolute; left: 0; color: var(--ink-muted); font-family: var(--mono); }

/* ---------- Price bars ---------- */
.bars { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .55rem; font-family: var(--mono); font-size: .875rem; }
.bars li { display: grid; grid-template-columns: 11ch minmax(0, 1fr); gap: .75rem; align-items: center; }
@media (min-width: 600px) { .bars li { grid-template-columns: 14ch minmax(0, 1fr); } }
.bar-track { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.bars { --max: 300; }
.bar { height: 14px; border-radius: 2px; background: var(--ink); width: calc(var(--v) / var(--max) * 82%); min-width: 2px; flex: none; }
@media (prefers-reduced-motion: no-preference) { .bar { transition: width .4s ease; } }
.years { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0 0 1.25rem; }
.years[hidden] { display: none; }
.years-label { font: 500 .8125rem/1.4 var(--mono); color: var(--ink-muted); margin-right: .25rem; }
.years button { font: 500 .875rem/1 var(--mono); color: var(--ink); background: none; padding: .55rem .8rem; border: 1px solid var(--rule); border-radius: var(--radius-sm); cursor: pointer; }
.years button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.years .years-pause { margin-left: auto; color: var(--ink-muted); }
.years button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bars .me .bar { background: var(--amber); }
.bars .me { font-weight: 600; }
.bar-val { white-space: nowrap; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--radius); margin-bottom: 1rem; }
table.t { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.table-wrap > table { margin-bottom: 0; }
.t th, .t td { text-align: left; vertical-align: top; padding: .65rem .85rem; border-bottom: 1px solid var(--rule); }
.t thead th { background: var(--paper-sunken); font: 600 .8125rem/1.3 var(--mono); }
.t tbody th { font: 600 .9rem/1.4 var(--mono); }
.t tr:last-child > * { border-bottom: 0; }
.t .me { background: color-mix(in srgb, var(--amber) 12%, transparent); }
.t .unconfirmed { color: var(--ink-muted); }
.t td a { white-space: nowrap; }
/* Tables in a text column may run wider than the text, centered on it. */
@media (min-width: 900px) { .prose-center > .table-wrap.bleed { width: min(60rem, 100vw - 2 * var(--gutter)); position: relative; left: 50%; transform: translateX(-50%); } }
@media (min-width: 760px) { .t-storage th:first-child { width: 30%; } .t-storage th:nth-child(2) { width: 28%; } }
.table-wrap:focus-visible { outline-offset: 2px; }
.scroll-hint { display: none; font: 400 .8125rem/1.4 var(--mono); color: var(--ink-muted); margin: 0 0 .5rem; }
@media (max-width: 759px) {
  .t th, .t td { padding: .6rem .7rem; }
  .t-wide { width: max-content; min-width: 100%; }
  .t-wide th, .t-wide td { min-width: 9rem; max-width: 12rem; }
  .t-wide :is(thead, tbody) > tr > :first-child { position: sticky; left: 0; z-index: 1; min-width: 8.75rem; max-width: 8.75rem; background: var(--paper); box-shadow: 1px 0 0 var(--rule); }
  .band .t-wide tbody > tr > :first-child { background: var(--paper-sunken); }
  .t-wide thead > tr > :first-child { background: var(--paper-sunken); }
  .scroll-hint { display: block; }
}

/* Key reference table */
.keys-table td:first-child, .keys-table td:nth-child(3) { white-space: nowrap; width: 1%; }
.keys-table td { padding-top: .5rem; padding-bottom: .5rem; }
@media (max-width: 640px) {
  .keys-table, .keys-table tbody, .keys-table tr { display: block; }
  .keys-table thead { display: none; }
  .keys-table tr { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); }
  .keys-table td { border-bottom: 1px solid var(--rule); width: auto; }
  .keys-table td:empty { display: none; }
}
.mods { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem 2rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.mods li { display: flex; gap: .75rem; align-items: baseline; padding: .4rem 0; border-bottom: 1px solid var(--rule); }
.mods kbd { min-width: 4.2em; }

/* ---------- Feature groups ---------- */
.fgroup { padding: 2rem 0; border-top: 1px solid var(--rule); }
.fgroup:first-of-type { border-top: 0; padding-top: 0; }
@media (min-width: 900px) { .fgroup { display: grid; grid-template-columns: 17rem minmax(0, 1fr); gap: 2.5rem; } }
.fgroup h2 { font-size: 1.25rem; }
.fgroup ul { margin: 0; }
.fgroup li { margin-bottom: .55em; }

/* ---------- Notes, quotes, FAQ ---------- */
.note {
  border-left: 3px solid var(--amber);
  background: var(--paper-sunken);
  padding: 1rem 1.2rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 0 0 1.5rem;
}
.note > :last-child { margin-bottom: 0; }
.policy { border-top: 1px solid var(--rule); padding-top: 2rem; }
.policy h3 { margin-top: 1.75rem; }
.keys-cta { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.5rem; margin-top: 2.5rem; }
.keys-cta p { margin: 0; }
.founder { display: flex; align-items: flex-start; gap: 1.25rem; margin: 1.25rem 0 1.5rem; }
.founder-photo { flex: none; width: 96px; height: 96px; border-radius: var(--radius); object-fit: cover; background: var(--paper-sunken); }
.founder p { margin: 0 0 .5rem; }
.founder-name { font: 600 1rem/1.4 var(--mono); }
.placeholder { font-family: var(--mono); font-size: .9em; background: var(--paper-sunken); outline: 1px dashed var(--amber-ink); padding: 0 .3em; border-radius: 2px; }
details { border-top: 1px solid var(--rule); padding: .9rem 0; }
details:last-of-type { border-bottom: 1px solid var(--rule); }
summary { font: 600 1rem/1.4 var(--mono); cursor: pointer; }
details p { margin: .75rem 0 0; }

/* ---------- Page head (inner pages) ---------- */
.page-head { padding: clamp(2.5rem, 7vw, 4.5rem) 0 2rem; }
.page-head h1 { font-size: clamp(2rem, 5vw, 3rem); }
.page-head p { font-size: 1.15em; max-width: var(--measure); }

/* ---------- Keys demo ---------- */
.demo:focus-visible { outline-offset: 4px; }
/* The demo needs a hardware keyboard, so phones and touch-only tablets skip it. */
@media (max-width: 759px), (hover: none) and (pointer: coarse) {
  .keys-try { display: none; }
}
.demo-status { min-height: 1.5em; font: 400 .875rem/1.4 var(--mono); padding: .55rem .9rem; border-top: 1px solid var(--rule); background: var(--paper-sunken); }
.demo-reader { padding: 1rem .9rem 1.25rem; font: 400 .9375rem/1.55 var(--mono); min-width: 640px; }
.demo-reader .hdr { color: var(--ink-muted); margin-bottom: 1rem; }
.demo-reader .q { color: var(--ink-muted); }

/* ---------- Footer ---------- */
.site-footer { background: var(--paper-sunken); border-top: 1px solid var(--rule); padding: 3.5rem 0 2.5rem; font-size: .95rem; }
.footer-cta { padding-bottom: 2.5rem; margin-bottom: 2rem; border-bottom: 1px solid var(--rule); }
.footer-cta h2 { margin-bottom: .4em; }
.footer-grid { display: grid; gap: 2rem; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-grid img { height: 26px; width: auto; margin-bottom: 1rem; }
.footer-grid h3 { font-size: .8125rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-muted); font-weight: 500; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: .4rem; }
.footer-grid a { color: var(--ink); }
.fineprint { margin-top: 2rem; font: 400 .8125rem/1.6 var(--mono); color: var(--ink-muted); }
.fineprint a { color: var(--ink-muted); }

/* ---------- Print (the keys page fits one sheet) ---------- */
@media print {
  :root { --paper: #fff; --paper-sunken: #fff; --ink: #000; --ink-muted: #444; --rule: #bbb; }
  body { font-size: 10pt; background: #fff; }
  .site-header, .site-footer, .no-print, .skip { display: none !important; }
  .section, .page-head { padding: 0; border: 0; }
  kbd, .kc { background: #fff; color: #000; border: 1px solid #000; }
  a { color: #000; text-decoration: none; }
  .table-wrap { overflow: visible; border: 0; }
  .t th, .t td { padding: .18rem .4rem; }
  .keys-table { font-size: 9pt; }
  .print-page h1 { font-size: 16pt; margin: 0 0 .3em; }
  .print-page h2 { font-size: 11pt; margin: .8em 0 .4em; }
  .print-page .mods { grid-template-columns: repeat(3, 1fr); gap: 0 1rem; font-size: 8.5pt; }
  .print-page .mods li { padding: .12rem 0; }
  @page { margin: 12mm; }
}
.band code { background: var(--paper); }
.card p { text-wrap: wrap; }
/* Let wide mock-ups scroll inside their frames instead of widening the page. */
.split > *, .stack > *, .grid-3 > * { min-width: 0; }
.ctx { min-width: 0; }

/* ---------- Pre-launch (remove at launch) ---------- */
.prelaunch {
  margin: 0; padding: .45rem var(--gutter);
  background: var(--ink); color: var(--paper);
  font: 400 .8125rem/1.45 var(--mono); text-align: center; text-wrap: balance;
}
.prelaunch span:first-child { font-weight: 600; }
.prelaunch a { color: inherit; text-decoration-color: var(--amber); }
.soon {
  display: inline-flex; align-items: center; gap: .6em;
  margin: 0; padding: .7rem 1.05rem;
  font: 600 1rem/1.3 var(--mono);
  border: 1px dashed var(--amber-ink); border-radius: var(--radius);
}
.soon-dot { flex: none; width: .55em; height: .55em; border-radius: 50%; background: var(--amber); }
.soon + .price-note { margin-top: .9rem; }
