/* codeeraser.dev — committed dark, the icon's world.
   Palette: one ink ground, neutral greys in five steps, one coral
   accent (the eraser in the icon) spent in three places only: the
   primary button, a link's underline and hover, and the deciding
   operator in a formula. Teal and amber survive as the terminal's
   ok / warn signals.
   Editing this file? Bump ?v= on every page's <link> — HTML is served
   uncached but this sheet is edge/browser-cached for 4h; without the
   bump, fresh HTML pairs with a stale sheet on returning visitors.
   Every rule the ten pages share lives in two sheets and nowhere
   else — this one (tokens, base type, header, page openers, folds)
   and style.css (the components), loaded in that order with one ?v=
   key; the picture viewer's rules live in viewer.css, loaded only by
   the six pages that hang a picture. html and css are scan-only,
   outside the judged set, so a block copied into two pages is
   duplication no gate can see.
   One column, one width: every block between the header and the
   footer spans --container; running prose inside it is capped at a
   reading measure (--measure: about 70 Latin characters, about 40
   CJK characters). Spacing runs on an 8px grid. */
:root {
  color-scheme: dark;
  interpolate-size: allow-keywords;
  /* ground, raised surface, hovered surface, terminal well */
  --ink-0: #0b0e14;
  --ink-1: #0f131b;
  --panel: #131924;
  --panel-2: #18202c;
  --well: #080a0f;
  /* hairlines: a quiet rule, a visible edge */
  --line: rgba(255, 255, 255, 0.075);
  --panel-edge: rgba(255, 255, 255, 0.11);
  --edge-strong: rgba(255, 255, 255, 0.17);
  --surface: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
  /* text: headline, body, secondary, muted (every step AA on --ink-0 and --panel) */
  --paper: #f5f1ea;
  --text: #dfe4ee;
  --text-2: #bcc4d3;
  --muted: #9aa5ba;
  /* the one accent, and the ink that sits on it */
  --accent: #ff6f5e;
  --accent-ink: #1b0a07;
  --accent-wash: rgba(255, 111, 94, 0.10);
  --accent-edge: rgba(255, 111, 94, 0.5);
  /* terminal-only signals (the roast block's prompt, pass and roast) */
  --teal: #5fd0b0;
  --amber: #e0ac63;
  --verm: var(--accent);
  --cjk: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC";
  --mono: "IBM Plex Mono", ui-monospace, Consolas, var(--cjk), monospace;
  --sans: "IBM Plex Sans", var(--cjk), system-ui, sans-serif;
  /* fluid type: small / body / lead / h3 / h2 / h1 / hero */
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-body: 1rem;
  --fs-lead: clamp(1.125rem, 1rem + 0.45vw, 1.3rem);
  --fs-h3: 1.125rem;
  --fs-h2: clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem);
  --fs-h1: clamp(2.2rem, 1.5rem + 2.6vw, 3.4rem);
  --fs-hero: clamp(2.8rem, 1.6rem + 4.6vw, 5.25rem);
  --lh: 1.65;
  --measure: 68ch;
  --measure-lead: 36em;
  /* 8px grid: inside a block / between blocks / between sections */
  --s-1: 8px;
  --s-2: 16px;
  --s-3: 24px;
  --s-4: 32px;
  --s-5: 48px;
  --s-6: 64px;
  --section: clamp(64px, 8vw, 112px);
  --container: 1160px;
  --gutter: 32px;
  --r-frame: 16px;
  --r-chip: 10px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 24px 60px -24px rgba(0, 0, 0, 0.6);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}
/* CJK: a taller line, a measure counted in characters, no tracking */
:lang(zh) { --lh: 1.85; --measure: 40em; --measure-lead: 30em; }
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; overflow-x: clip; }
body {
  background:
    radial-gradient(ellipse 60% 36rem at 70% -6rem, rgba(255, 111, 94, 0.07), transparent 70%),
    radial-gradient(ellipse 50% 30rem at 10% -4rem, rgba(95, 140, 255, 0.05), transparent 70%),
    var(--ink-0);
  color: var(--text);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: var(--lh);
  min-height: 100vh;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* a link in running text: headline ink on a coral hairline; coral on hover */
a { color: var(--paper); text-decoration: underline; text-decoration-color: var(--accent-edge); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color 0.15s ease, text-decoration-color 0.15s ease; }
a:hover { color: var(--accent); text-decoration-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
button { font: inherit; color: inherit; }
code { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.wrap { max-width: calc(var(--container) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

/* One heading rule everywhere: Plex Sans, tight; the larger the size
   the tighter the tracking. CJK takes none. */
h1, h2, h3 { font-family: var(--sans); font-weight: 600; color: var(--paper); letter-spacing: -0.015em; text-wrap: balance; }
h1 { letter-spacing: -0.035em; }
h2 { font-size: var(--fs-h2); line-height: 1.15; letter-spacing: -0.028em; margin: var(--section) 0 var(--s-3); max-width: 24em; }
:lang(zh) :is(h1, h2, h3) { letter-spacing: 0; }
p { text-wrap: pretty; }
/* the small tracked label over a section title or a page title */
.eyebrow {
  display: flex; align-items: center; gap: 12px; margin-top: var(--section);
  font-family: var(--mono); font-size: var(--fs-xs); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.16em; color: var(--muted);
}
.eyebrow::before { content: ""; width: 20px; height: 1px; background: var(--edge-strong); }
:lang(zh) .eyebrow { letter-spacing: 0.08em; font-family: var(--sans); }
.eyebrow + h2 { margin-top: var(--s-2); }

/* The header stays with the reader: translucent ink, blurred, one
   hairline — the band runs the full viewport width behind a header
   that keeps the column's. */
header.site {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-height: 64px; padding: 12px 0;
}
header.site::before {
  content: ""; position: absolute; inset: 0 50%; margin: 0 -50vw; z-index: -1;
  background: rgba(11, 14, 20, 0.72); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: saturate(150%) blur(16px); backdrop-filter: saturate(150%) blur(16px);
}
/* the lockup is a link home on every page but the home page itself */
header.site .home { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
header.site img { width: 28px; height: 28px; border-radius: 7px; }
header.site .name { font-family: var(--mono); font-weight: 600; font-size: 1rem; letter-spacing: -0.01em; color: var(--paper); }
header.site nav {
  flex: 1 1 18rem; display: flex; flex-wrap: wrap; justify-content: flex-end;
  gap: 4px 26px; align-items: center; font-size: 0.9rem;
}
header.site nav a { color: var(--text-2); text-decoration: none; }
header.site nav a:hover { color: var(--paper); }
/* the last link is the download: a quiet pill, coral on hover */
header.site nav a:last-child[href$="/releases/latest"] {
  color: var(--paper); border: 1px solid var(--edge-strong); border-radius: 999px; padding: 5px 14px;
  transition: border-color 0.15s ease, color 0.15s ease;
}
header.site nav a:last-child[href$="/releases/latest"]:hover { border-color: var(--accent-edge); color: var(--accent); }

/* Two openers on purpose. The home hero sets the pitch beside the
   proof — the real terminal — so the first screen holds what it is,
   how to get it and evidence it works; a fine grid under a soft glow
   gives it depth. The sub-pages' lede is a title over one lead. */
.hero { position: relative; isolation: isolate; display: grid; gap: var(--s-5) 56px; align-items: center; padding: clamp(56px, 7vw, 104px) 0 var(--s-2); }
.hero::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  inset: 0 50% -48px; margin: 0 -50vw;
  background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 48px 48px; background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 55% 70% at 50% 35%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 55% 70% at 50% 35%, #000 20%, transparent 75%);
}
/* beside the pitch only when the terminal's longest line fits unwrapped (see style.css) */
@media (min-width: 1280px) {
  .hero { grid-template-columns: minmax(0, 1fr) auto; }
}
.hero .mark { display: block; width: 64px; height: 64px; border-radius: 16px; margin-bottom: var(--s-3); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06); }
.hero h1 { font-size: var(--fs-hero); line-height: 0.98; letter-spacing: -0.045em; }
/* beside the terminal the title shares the row: after the base size so it wins */
@media (min-width: 1280px) { .hero h1 { font-size: clamp(3.25rem, 0.5rem + 3.4vw, 4rem); } }
.hero h1 .tm { font-size: 0.28em; vertical-align: super; color: var(--muted); letter-spacing: 0; margin-left: 2px; font-weight: 400; }
.hero p.tag { font-size: var(--fs-lead); line-height: 1.55; color: var(--text-2); margin-top: var(--s-3); max-width: var(--measure-lead); }
:lang(zh) .hero p.tag { line-height: 1.8; }
.hero p.tag em { color: var(--paper); font-style: normal; font-weight: 600; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: var(--s-4); }
.btn {
  display: inline-flex; align-items: center; gap: 10px; background: var(--accent); color: var(--accent-ink); font-weight: 600; text-decoration: none;
  padding: 13px 22px; border-radius: 12px; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset, 0 10px 30px -8px rgba(255, 111, 94, 0.55);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.btn::after { content: "→"; transition: transform 0.18s var(--ease); }
.btn:hover { color: var(--accent-ink); transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset, 0 16px 36px -8px rgba(255, 111, 94, 0.65); }
.btn:hover::after { transform: translateX(3px); }
.cta-note { font-size: var(--fs-sm); color: var(--muted); }
.cta-note a { color: var(--text-2); }

.lede, .page-head { padding: clamp(56px, 7vw, 96px) 0 0; }
.lede .eyebrow, .page-head .eyebrow { margin: 0 0 var(--s-2); }
.lede h1, .page-head h1 { font-size: var(--fs-h1); line-height: 1.08; max-width: 18em; }
.lede p, .page-head p { color: var(--text-2); margin-top: var(--s-2); max-width: var(--measure); }
.lede > p:first-of-type, .page-head > p:first-of-type { font-size: var(--fs-lead); line-height: 1.55; color: var(--text); max-width: var(--measure-lead); margin-top: var(--s-3); }
:lang(zh) :is(.lede, .page-head) > p:first-of-type { line-height: 1.8; }
.lede p em { color: var(--paper); font-style: normal; font-weight: 600; }
.lede p strong { color: var(--text); font-weight: 600; }
.lede p code { color: var(--text); font-size: 0.92em; }

/* a framed figure straight after a page's opener keeps a block's breath */
:is(.lede, .page-head) + :is(.arch, .term, .installs) { margin-top: var(--s-5); }

/* Folded prose: the long form under a short one, opened on demand.
   Native <details>, so no script and every word stays in the page;
   a chevron turns and the body eases open where the engine can
   animate to auto (interpolate-size), and simply appears elsewhere. */
details.more { margin-top: var(--s-2); }
details.more > summary {
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer; list-style: none;
  font-size: var(--fs-sm); font-weight: 600; color: var(--text-2); user-select: none;
  transition: color 0.15s ease;
}
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before {
  content: ""; width: 7px; height: 7px; margin: 0 2px 3px 2px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg); transition: transform 0.18s var(--ease);
}
details.more[open] > summary::before { transform: rotate(45deg); margin-bottom: 5px; }
details.more > summary:hover { color: var(--accent); }
details.more::details-content { block-size: 0; overflow: clip; opacity: 0; transition: block-size 0.2s var(--ease), opacity 0.2s ease, content-visibility 0.2s allow-discrete; }
details.more[open]::details-content { block-size: auto; opacity: 1; }
details.more[open] > summary { margin-bottom: var(--s-1); }
details.intro { margin: 0 0 var(--s-3); }
