/* 220 Labs — the one stylesheet for every page under 220labs.dev; no build step.
   Palette, type and the minimalism rule: docs/brand.md. The page contract (header, footer,
   a tool page's order): docs/brand-brief-2026-10-04.md section 6.
   A tool page adds one <style> block for its own hero and never redefines these tokens.
   Layout: one column, 40rem, the name in the header and the pen's stroke as the only ornament. */
:root {
  --ink: #15171C;      /* Ink: text, the mark */
  --ground: #FFFFFF;   /* Paper */
  --mute: #5B606B;     /* Graphite, 6.3:1 on Paper */
  --rule: #E3E4E8;     /* hairlines between rows; never text */
  --stroke: 3px;       /* the wordmark's pen at 24 px: the section rule is the same line */
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light dark;
}

/* D3 of the brand brief: the site follows the OS. */
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #FFFFFF;
    --ground: #15171C;
    --mute: #A9ADB6;   /* Mist, 8.0:1 on Ink; Graphite would be 2.8 */
    --rule: #2C2F36;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 18px/1.6 var(--sans);
}

.page {
  max-width: 40rem;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header: the lockup home, one link per shipped tool, GitHub. Nothing else. */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-block: 40px 8px;
}

.site-header .home { display: block; line-height: 0; }
.site-header .home img { display: block; height: 24px; width: auto; }

.site-header nav { display: flex; gap: 20px; font-size: 0.9375rem; }
.site-header nav a { text-decoration: none; }
.site-header nav a:hover,
.site-header nav a[aria-current="page"] { text-decoration: underline; }

/* Links are Ink, underlined: the lab has no accent colour. */
a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }

main { padding-block: 48px 8px; }

h1 {
  font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.5rem);
  line-height: 1.15;
  font-weight: 650;
  letter-spacing: -0.015em;
  text-wrap: balance;
  margin: 0 0 20px;
}

.lede { font-size: 1.1875rem; line-height: 1.55; margin: 0; max-width: 36rem; }

section { margin-block: 56px; }

/* Section labels: system mono, upper case, under one stroke of the pen. */
h2 {
  display: inline-block;
  font: 600 0.8125rem/1.4 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
  margin: 0 0 16px;
  padding-top: 12px;
  border-top: var(--stroke) solid var(--ink);
}

p { margin: 0 0 12px; }

.quiet { color: var(--mute); }

/* What a tool cannot do, said first and set apart: the two rules. */
.rules {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  font-weight: 600;
  font-size: 1.0625rem;
}

/* Rows of a term and its meaning: Why 220, and a tool's facts. */
.rows { margin: 0; padding: 0; list-style: none; }
.rows > * {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 16px;
  padding-block: 12px;
}
.rows > * + * { border-top: 1px solid var(--rule); }
.rows dt, .rows .term {
  font: 600 0.9375rem/1.7 var(--mono);
  font-variant-numeric: tabular-nums;
}
.rows dd { margin: 0; }

/* A plain list where the order carries nothing. */
.lines { margin: 0; padding: 0; list-style: none; }
.lines li { padding-block: 10px; }
.lines li + li { border-top: 1px solid var(--rule); }

/* Steps where the order is the information. */
.steps { margin: 0 0 16px; padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2rem minmax(0, 1fr); padding-block: 10px; }
.steps li + li { border-top: 1px solid var(--rule); }
.steps li::before { content: counter(step); font: 600 0.9375rem/1.7 var(--mono); color: var(--mute); }

code {
  font: 0.875em var(--mono);
  overflow-wrap: anywhere;
}

.links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 16px; }

/* The tool's line on the lab page: its mark, its name, then what it cannot do. */
.tool-title { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; }
.tool-title img { display: block; width: 28px; height: 28px; }
.tool-title a { font-size: 1.375rem; font-weight: 650; text-decoration: none; }
.tool-title a:hover { text-decoration: underline; }

.site-footer {
  border-top: 1px solid var(--rule);
  padding-block: 24px 48px;
  margin-top: 64px;
  color: var(--mute);
  font-size: 0.875rem;
}
.site-footer p { margin: 0 0 4px; }
.site-footer a { color: var(--mute); }

@media (max-width: 480px) {
  body { font-size: 17px; }
  .page { padding: 0 16px; }
  .site-header { padding-block: 24px 4px; }
  main { padding-block: 32px 4px; }
  section { margin-block: 40px; }
  .lede { font-size: 1.125rem; }
  .rows > * { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
