/* Spindle's site: the product's own paper-and-ink palette (spindle/chrome/panel.css),
   an editorial serif for headlines, monospace for labels and code. No web fonts, no
   scripts required, no third-party requests. */

:root {
  --page: #f6f2e9;
  --surface: #fbf8f1;
  --soft: #f1ece1;
  --ink: #26291f;
  --muted: #5a5f51;
  --line: #cfc9b8;
  --rule: #b9b29e;
  --accent: #3f5b2f;
  --accent-soft: #e9ecdc;
  --on-accent: #fbf8f1;
  --code-bg: #efeadf;
  --code: #334a2a;
  --warn: #8f3a28;
  --grain: #2a21140f;
  --serif: "Iowan Old Style", "Charter", "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --wide: 1120px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #111511;
    --surface: #171d15;
    --soft: #1c241a;
    --ink: #dfe4d6;
    --muted: #a4b194;
    --line: #34412b;
    --rule: #46553a;
    --accent: #b9e07f;
    --accent-soft: #233019;
    --on-accent: #16200d;
    --code-bg: #0d110b;
    --code: #c3d3ab;
    --warn: #f3b3a0;
    --grain: #ffffff08;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background-color: var(--page);
  /* A faint paper grain, as the product's textured background. */
  background-image: radial-gradient(var(--grain) 0.6px, transparent 0.8px);
  background-size: 3px 3px;
  color: var(--ink);
  font: 17px/1.6 var(--sans);
}
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
img, svg { max-width: 100%; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--page); padding: 8px 12px; }
.skip:focus { left: 8px; top: 8px; z-index: 10; }

.wrap { width: min(var(--wide), 100% - 40px); margin: 0 auto; }

/* ---- Header ---------------------------------------------------------------------- */
.top { border-bottom: 1px solid var(--line); background: var(--page); position: sticky; top: 0; z-index: 5; }
.top .wrap { display: flex; align-items: center; gap: 20px; min-height: 60px; flex-wrap: wrap; }
.mark { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 600; letter-spacing: .01em; }
.mark .glyph { font: 600 18px/1 var(--mono); border: 2px solid var(--ink); padding: 3px 6px 4px; position: relative; }
.mark .glyph::after { content: ""; position: absolute; right: 4px; bottom: 4px; width: 7px; height: 3px; background: var(--accent); }
.mark .crumb { color: var(--muted); font-weight: 400; }
.top nav { margin-left: auto; display: flex; align-items: center; gap: 8px 18px; flex-wrap: wrap; }
.top nav a { color: var(--muted); text-decoration: none; font-size: 14.5px; }
.top nav a:hover, .top nav a[aria-current] { color: var(--ink); }
/* The section in view (assets/site.js), underlined in the accent. */
.top nav a[aria-current="true"] { text-decoration: underline 2px var(--accent); text-underline-offset: 7px; }
.top .cta { color: var(--ink); font-weight: 600; font-size: 14.5px; border: 1.5px solid var(--ink); padding: 5px 13px; text-decoration: none; }
.top .cta:hover { background: var(--ink); color: var(--page); }

/* ---- Type ------------------------------------------------------------------------ */
.eyebrow { font: 500 12px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
h1 { font-size: clamp(2.5rem, 6.2vw, 4.6rem); line-height: 1.02; margin: 0 0 22px; max-width: 15ch; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); line-height: 1.12; margin: 0 0 14px; max-width: 28ch; }
h3 { font-size: 1.22rem; line-height: 1.25; margin: 0 0 8px; }
h1, h2, h3, summary { text-wrap: balance; }
p, li, td, figcaption { text-wrap: pretty; }
.lead { font-size: clamp(1.08rem, 1.6vw, 1.26rem); color: var(--muted); max-width: 62ch; margin: 0 0 30px; }
.lead strong { color: var(--ink); font-weight: 600; }
p { margin: 0 0 14px; }
code, kbd { font: 0.88em/1.4 var(--mono); background: var(--code-bg); color: var(--code); padding: 1px 5px; }
pre { background: var(--code-bg); color: var(--code); border: 1px solid var(--line); padding: 16px 18px; overflow-x: auto; font: 14px/1.6 var(--mono); margin: 0 0 16px; }
/* A short name or command stays on one line; a long one (.long) may break anywhere. */
:not(pre) > code { white-space: nowrap; }
code.long { white-space: normal; overflow-wrap: anywhere; }
pre code { background: none; padding: 0; font-size: inherit; }
pre .c { color: var(--muted); }

/* ---- Buttons --------------------------------------------------------------------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.button { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 20px; border: 1.5px solid var(--ink); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15.5px; background: transparent; }
.button:hover { background: var(--soft); text-decoration: none; }
.button.primary { background: var(--ink); color: var(--page); }
.button.primary:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.button small { font: 500 12.5px/1 var(--mono); opacity: .78; }
.note { font-size: 14px; color: var(--muted); max-width: 84ch; }
.trust { font: 500 13px/1.5 var(--mono); letter-spacing: .04em; color: var(--ink); margin: 22px 0 6px; }
.hero .note { margin: 0; }
.subhead { margin: 40px 0 8px; }

/* ---- Sections -------------------------------------------------------------------- */
.hero { padding: clamp(56px, 9vw, 112px) 0 clamp(40px, 6vw, 72px); }
section.block { padding: clamp(56px, 8vw, 96px) 0; border-top: 1px solid var(--line); }
.head { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; margin-bottom: 36px; }
.head .num { font: 500 12px/1 var(--mono); letter-spacing: .14em; color: var(--accent); }
.head p { color: var(--muted); max-width: 64ch; margin: 0; }

.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); padding: 22px 22px 18px; }
.card p { color: var(--muted); font-size: 15.5px; margin: 0; }
.card .tag { font: 500 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); display: block; margin-bottom: 12px; }
.card.link { text-decoration: none; display: block; color: inherit; transition: border-color .15s; }
.card.link:hover { border-color: var(--ink); }
.card.link .more { display: inline-block; margin-top: 14px; color: var(--accent); font-weight: 600; font-size: 15px; }

/* A page of prose (the privacy policy): one readable column. */
.prose { max-width: 76ch; }
.prose h2 { font-size: clamp(1.3rem, 2.4vw, 1.6rem); margin: 34px 0 10px; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 20px; margin: 0 0 14px; }
.prose li { margin-bottom: 10px; }

/* Principles: numbered, with a rule between. */
.principles { list-style: none; padding: 0; margin: 0; counter-reset: p; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); border-top: 1px solid var(--line); }
.principles.four { grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.principles li { counter-increment: p; padding: 26px 26px 26px 0; border-bottom: 1px solid var(--line); }
.principles li::before { content: counter(p, decimal-leading-zero); font: 500 12px/1 var(--mono); color: var(--accent); letter-spacing: .12em; display: block; margin-bottom: 14px; }
.principles p { color: var(--muted); margin: 0; font-size: 15.5px; }

/* "Is / is not" pairs. */
.contrast { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 0; border: 1px solid var(--line); background: var(--surface); }
.contrast div { padding: 20px 22px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: -1px -1px 0 0; }
.contrast b { display: block; font: 600 14px/1.3 var(--mono); margin-bottom: 6px; }
.contrast b.no { color: var(--warn); }
.contrast b.yes { color: var(--accent); }
.contrast p { font-size: 15px; color: var(--muted); margin: 0; }

/* Figures: the thread, the hosts. */
figure.diagram { margin: 0; background: var(--surface); border: 1px solid var(--line); padding: clamp(14px, 3vw, 28px); }
figure.diagram figcaption { font-size: 14px; color: var(--muted); margin-top: 14px; max-width: 70ch; }
.diagram svg { display: block; width: 100%; height: auto; }
.diagram .ink { stroke: var(--ink); }
.diagram .inkf { fill: var(--ink); }
.diagram .acc { stroke: var(--accent); }
.diagram .accf { fill: var(--accent); }
.diagram .mut { fill: var(--muted); }
.diagram .bg { fill: var(--surface); }
.diagram .soft { fill: var(--soft); }
.diagram .line { stroke: var(--line); }
.diagram text { font-family: var(--mono); }
.diagram .label { font-size: 13px; fill: var(--ink); }
.diagram .small { font-size: 11.5px; fill: var(--muted); }
.diagram .title { font-family: var(--serif); font-size: 18px; font-weight: 600; fill: var(--ink); }

/* Tables. */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); background: var(--surface); }
table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--line); }
th { font: 500 12px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); background: var(--soft); }
tr:last-child td { border-bottom: 0; }
td:first-child { font-weight: 600; white-space: nowrap; width: 9.5rem; }

/* Steps (install). */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr)); }
.steps > li { counter-increment: s; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; background: var(--surface); border: 1px solid var(--line); padding: 20px 22px; }
.steps > li::before { content: counter(s); font: 600 15px/38px var(--mono); width: 38px; height: 38px; text-align: center; border: 1.5px solid var(--ink); }
.steps h3 { margin-top: 6px; }
.steps p, .steps li li { color: var(--muted); font-size: 15.5px; max-width: 68ch; }
.steps pre { margin-top: 10px; }

/* FAQ. */
details.qa { border-bottom: 1px solid var(--line); padding: 4px 0; }
.head + details.qa { border-top: 1px solid var(--line); }
details.qa summary { cursor: pointer; list-style: none; padding: 14px 0; font-family: var(--serif); font-size: 1.15rem; font-weight: 600; display: flex; gap: 12px; }
details.qa summary::-webkit-details-marker { display: none; }
details.qa summary::before { content: "+"; font: 500 18px/1.3 var(--mono); color: var(--accent); width: 14px; flex: none; }
details.qa[open] summary::before { content: "\2212"; }
details.qa div { padding: 0 0 18px 26px; color: var(--muted); max-width: 72ch; }

/* Callouts. */
.callout { border-left: 3px solid var(--accent); background: var(--accent-soft); padding: 16px 20px; margin: 22px 0 0; font-size: 15.5px; }
.callout.warn { border-left-color: var(--warn); background: var(--soft); }

/* Wide diagrams scroll inside their frame on narrow screens rather than shrink past reading. */
@media (max-width: 760px) {
  figure.diagram:has(svg) { overflow-x: auto; }
  .diagram svg { min-width: 720px; }
}

/* Speed bars (the measured table, drawn): each bar's length is how many times faster the
   wasm Linux ran, on one linear scale from zero, labelled at its end. */
.bars { display: grid; gap: 16px; list-style: none; margin: 0; padding: 0; }
.bar { display: grid; grid-template-columns: minmax(150px, 34%) minmax(0, 1fr); gap: 6px 20px; align-items: center; font-size: 14.5px; }
.bar small { color: var(--muted); font: 12.5px/1.4 var(--mono); }
.bar .scale { display: flex; align-items: center; gap: 10px; border-left: 1px solid var(--rule); min-height: 30px; }
.bar .fill { height: 12px; width: calc((100% - 64px) * var(--x)); min-width: 4px; background: var(--accent); border-radius: 0 4px 4px 0; }
.bar b { font: 600 14px/1 var(--mono); white-space: nowrap; }

/* Provider chips. */
.chips { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.chips li { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; border: 1px solid var(--line); background: var(--surface); padding: 11px 14px; font-weight: 600; font-size: 15px; }
.chips small { font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
@media (max-width: 900px) { .chips { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .chips { grid-template-columns: minmax(0, 1fr); } }

.callout ul { margin: 10px 0 12px; padding-left: 20px; }
.callout li { margin-bottom: 6px; max-width: 72ch; }
@media (min-width: 960px) {
  .callout ul { columns: 2; column-gap: 44px; }
  .callout li { break-inside: avoid; }
}

/* The panel mock on the product page. */
.split { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.panel { background: var(--page); border: 1.5px solid var(--ink); box-shadow: 10px 10px 0 var(--soft); max-width: 420px; justify-self: end; width: 100%; font-size: 14px; }
.panel .bar-top { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.panel .bar-top b { font-size: 13.5px; }
.panel .bar-top .glyph { font-size: 14px; padding: 2px 5px 3px; }
.panel .bar-top .glyph::after { width: 5px; height: 2px; right: 3px; bottom: 3px; }
.panel .bar-top small { display: block; color: var(--muted); font-size: 11.5px; }
.panel .body { padding: 14px 12px; display: grid; gap: 10px; }
.panel .you { background: var(--soft); border-left: 3px solid var(--ink); padding: 9px 11px; }
.panel .role { font: 500 10.5px/1 var(--mono); letter-spacing: .12em; color: var(--muted); display: block; margin-bottom: 6px; }
.panel .step { border: 1px solid var(--line); background: var(--surface); padding: 8px 10px; display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.panel .step span:last-child { color: var(--muted); font-family: var(--mono); font-size: 12px; }
.panel .ws { border: 1px solid var(--line); background: var(--soft); padding: 9px 11px; font: 500 11px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.panel .ws::before { content: "\25B8  "; }
.panel .ans p { margin: 0; }
.panel .box { border-top: 1px solid var(--line); padding: 10px 12px; color: var(--muted); display: flex; justify-content: space-between; }
.panel .box span:last-child { background: var(--ink); color: var(--page); padding: 1px 9px; }
@media (max-width: 880px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .panel { justify-self: center; }
}

/* The closing call, after the questions. */
.closing h2 { font-size: clamp(2rem, 4.6vw, 3.3rem); line-height: 1.05; max-width: 16ch; margin-bottom: 26px; }
.closing .note { margin: 18px 0 0; }

/* Footer. */
footer { border-top: 1px solid var(--line); padding: 36px 0 48px; color: var(--muted); font-size: 14.5px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
footer a { color: var(--muted); }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .top { position: static; }
  .top .wrap { gap: 10px 12px; }
  .top .cta { order: 1; margin-left: auto; }
  .top nav { order: 2; width: 100%; margin: 0 0 12px; gap: 14px; }
  .steps > li { grid-template-columns: minmax(0, 1fr); }
  .bar { grid-template-columns: minmax(0, 1fr); }
  .principles li { padding-right: 0; }
}
