/* siftwise site. Dark first; light from the system setting or the toggle (html[data-theme]).
   System fonts only. Colours from the siftwise dashboard (siftwise.css): accent #4fc79e,
   light-mode ink #1d7556. No external resources. */

:root {
  color-scheme: dark;
  --bg: #0f1216;
  --bg-2: #161a1f;
  --term: #0a0d10;
  --fg: #e6e8eb;
  --muted: #a3acb6;
  --line: #2a3138;
  --line-2: #3a434c;
  --acc: #4fc79e;          /* fills, focus, the "selected" key */
  --acc-ink: #4fc79e;      /* links and accent text */
  --on-acc: #062b1f;       /* text on an accent fill */
  --track: #3a434c;
  --frame: #232a31;
  --lg-in: #6e7681;
  --lg-acc: #2dd4bf;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --wrap: 1200px;
  --gut: 40px;
}
/* Light: the same values twice, for the system setting and for the toggle. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #f1f6f3; --bg-2: #e5eee8; --card: #ffffff; --card-border: #cfe0d5; --term: #0d1117; --term-border: #16261e; --fg: #16261e; --muted: #4a5b52; --line: #d2e2d8; --line-2: #b1c8ba; --acc: #1d7556; --acc-ink: #1d7556; --on-acc: #ffffff; --btn-bg: #4fc79e; --on-btn: #062b1f; --fill: #309874; --track: #c0d5c8; --frame: #ffffff; --frame-border: #c1d5c8; --code-bg: #ffffff; --lg-in: #94a89c; --lg-acc: #0e7c66;
    --term-shadow: 0 1px 2px rgba(16, 38, 30, .10), 0 14px 30px -18px rgba(16, 38, 30, .55); --card-shadow: 0 1px 2px rgba(16, 38, 30, .07);
  }
}
:root[data-theme="light"] {
  /* light palette: soft green (cards white, text dark green-grey; bars #309874 for 3:1) */
  color-scheme: light;
  --bg: #f1f6f3; --bg-2: #e5eee8; --card: #ffffff; --card-border: #cfe0d5; --term: #0d1117; --term-border: #16261e; --fg: #16261e; --muted: #4a5b52; --line: #d2e2d8; --line-2: #b1c8ba; --acc: #1d7556; --acc-ink: #1d7556; --on-acc: #ffffff; --btn-bg: #4fc79e; --on-btn: #062b1f; --fill: #309874; --track: #c0d5c8; --frame: #ffffff; --frame-border: #c1d5c8; --code-bg: #ffffff; --lg-in: #94a89c; --lg-acc: #0e7c66;
  --term-shadow: 0 1px 2px rgba(16, 38, 30, .10), 0 14px 30px -18px rgba(16, 38, 30, .55); --card-shadow: 0 1px 2px rgba(16, 38, 30, .07);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.6 var(--sans); overflow-wrap: break-word; }
a { color: var(--acc-ink); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; border-radius: 2px; }
code { font: 0.92em var(--mono); }
p code, li code, dd code, td code { background: var(--code-bg, var(--bg-2)); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; }
h1, h2, h3 { line-height: 1.15; }
.wrap { max-width: calc(var(--wrap) + 2 * var(--gut)); margin: 0 auto; padding-left: var(--gut); padding-right: var(--gut); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nowrap { white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -48px; z-index: 10; background: var(--acc); color: var(--on-acc); padding: 8px 12px; border-radius: 4px; }
.skip:focus { top: 8px; }

/* top bar */
.bar { position: sticky; top: 0; z-index: 5; background: var(--bg); border-bottom: 1px solid var(--line); }
.bar-in { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: block; margin-right: auto; line-height: 0; }
.logo { display: block; }
.lg-in { fill: var(--lg-in); }
.lg-funnel { stroke: var(--lg-acc); }
.lg-out { fill: var(--lg-acc); }
.lg-text { fill: var(--fg); font-family: var(--sans); }
.bar ul { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; font: 14px var(--mono); }
.bar nav a { color: var(--muted); text-decoration: none; }
.bar nav a:hover { color: var(--fg); }
.theme { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--fg); cursor: pointer; }
.theme[hidden] { visibility: hidden; }   /* space kept: revealing it moves nothing */
.theme:hover { border-color: var(--line-2); }

/* hero */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; padding-top: 72px; padding-bottom: 64px; }
.kicker { margin: 0 0 20px; font: 13px var(--mono); letter-spacing: .04em; color: var(--muted); }
h1 { font-size: 54px; letter-spacing: -0.03em; font-weight: 750; margin: 0 0 24px; }
.lede { font-size: 19px; color: var(--muted); margin: 0 0 28px; max-width: 34em; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.btn { display: inline-block; padding: 11px 20px; border: 1px solid var(--line-2); border-radius: 6px; color: var(--fg); text-decoration: none; font-weight: 600; }
.btn:hover { border-color: var(--fg); }
.btn.primary { background: var(--btn-bg, var(--acc)); border-color: var(--btn-bg, var(--acc)); color: var(--on-btn, var(--on-acc)); }
.btn.primary:hover { filter: brightness(1.08); }
.chip { display: inline-flex; align-items: center; max-width: 100%; border: 1px dashed var(--line-2); border-radius: 6px; padding: 6px 6px 6px 14px; gap: 10px; }
.chip code { font-size: 14px; color: var(--muted); overflow-x: auto; white-space: nowrap; }
.proof { list-style: none; margin: 28px 0 0; padding: 0; border-top: 1px solid var(--line); }
.proof li { padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 15px; }
.proof b { color: var(--fg); font-size: 19px; font-variant-numeric: tabular-nums; margin-right: 2px; }
.proof a { font: 13px var(--mono); margin-left: 4px; }

.term { margin: 0; background: var(--term); border: 1px solid var(--term-border, var(--line)); border-radius: 8px; overflow: hidden; min-width: 0; box-shadow: var(--term-shadow, none); }
.term figcaption { display: flex; justify-content: space-between; gap: 16px; padding: 10px 16px; font: 12px var(--mono); color: #8b949e; border-bottom: 1px solid #22282e; }
.term pre { margin: 0; padding: 20px 18px 24px; font: 14px/1.8 var(--mono); color: #e6edf3; overflow-x: auto; }
.t-c, .t-m { color: #8b949e; }
.t-p { color: #3fb950; }
.t-a { color: #4fc79e; font-weight: 700; }

/* copy buttons */
.copy { font: 12px var(--mono); color: var(--muted); background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 4px 10px; cursor: pointer; }
.copy:hover { color: var(--fg); border-color: var(--line-2); }
.copy[hidden] { display: inline-block; visibility: hidden; }   /* space kept, as above */
.copy.done { color: var(--acc-ink); border-color: var(--acc); }

/* the sieve strip */
.sieve { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-2); padding: 36px 0 32px; }
.sieve-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 24px; margin-bottom: 20px; }
.sieve h2 { margin: 0; font: 600 14px var(--mono); color: var(--fg); }
.sieve-head p { margin: 0; font: 14px var(--mono); color: var(--muted); }
.sieve-head b { color: var(--fg); font-size: 18px; }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bars li { display: grid; grid-template-columns: 88px minmax(0, 1fr) 210px; align-items: center; gap: 18px; font: 14px var(--mono); }
.pr { color: var(--muted); }
.v { text-align: right; color: var(--muted); }
.v b { color: var(--fg); }
.track { position: relative; height: 18px; background: repeating-linear-gradient(90deg, var(--track) 0 6px, transparent 6px 8px); }
.fill { position: absolute; top: 0; bottom: 0; left: 0; background: var(--fill, var(--acc)); transform-origin: left; }
.w1 { width: 3.6%; }   /* 6 / 165 */
.w2 { width: 3.0%; }   /* 5 / 167 */
.w3 { width: 4.0%; }   /* 7 / 174 */
.w4 { width: 21.8%; }  /* 38 / 174 */
.w5 { width: 78.2%; }  /* 136 / 174 */
.legend { display: flex; align-items: center; gap: 8px; margin: 16px 0 0; font: 13px var(--mono); color: var(--muted); }
.key { display: inline-block; width: 14px; height: 14px; }
.key.sel { background: var(--fill, var(--acc)); }
.key.off { margin-left: 16px; background: repeating-linear-gradient(90deg, var(--track) 0 6px, transparent 6px 8px); outline: 1px solid var(--line-2); }
.note { margin: 10px 0 0; font-size: 14px; color: var(--muted); max-width: 60em; }
/* The bars fill one after another, each ending at its exact width (the .w1-.w5 values). */
@media (prefers-reduced-motion: no-preference) {
  .js .sieve .fill { transform: scaleX(0); transition: transform .7s cubic-bezier(.25, .8, .25, 1); }
  .js .sieve.in .fill { transform: scaleX(1); }
  .js .sieve.in li:nth-child(2) .fill { transition-delay: .45s; }
  .js .sieve.in li:nth-child(3) .fill { transition-delay: .9s; }
  .js .sieve.in li:nth-child(4) .fill { transition-delay: 1.35s; }
  .js .sieve.in li:nth-child(5) .fill { transition-delay: 1.8s; }
}

/* section headings */
section { padding-top: 80px; padding-bottom: 8px; }
.sieve { padding-top: 36px; }
h2.sec { font-size: 32px; letter-spacing: -0.02em; margin: 0 0 10px; }
.sec-sub { margin: 0 0 32px; color: var(--muted); max-width: 46em; }

/* results */
.group { margin: 40px 0 0; padding-bottom: 12px; font: 600 13px var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--fg); }
.group span { text-transform: none; letter-spacing: 0; color: var(--muted); font-weight: 400; margin-left: 10px; }
.band { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { padding: 28px 28px 28px 0; min-width: 0; }
.stat + .stat { padding-left: 28px; border-left: 1px solid var(--line); }
.tag { margin: 0 0 14px; font: 12px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.num { margin: 0 0 12px; font: 750 64px/1 var(--sans); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; color: var(--fg); }
.num small { font-size: 28px; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.lbl { margin: 0 0 14px; color: var(--muted); font-size: 15px; }
.stat > a, .speed > a { font: 13px var(--mono); }
.aside { margin: 14px 0 0; color: var(--muted); font-size: 15px; }
.split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 56px; margin-top: 48px; align-items: start; }
.mut { width: 100%; border-collapse: collapse; font: 14px var(--mono); }
.mut caption { text-align: left; color: var(--muted); padding-bottom: 12px; font: 15px/1.5 var(--sans); }
.mut caption a { font: 13px var(--mono); margin-left: 6px; white-space: nowrap; }
.mut th, .mut td { text-align: left; padding: 9px 12px 9px 0; border-bottom: 1px solid var(--line); font-weight: 400; }
.mut thead th { color: var(--muted); }
.mut td { white-space: nowrap; }
.mut tbody td:nth-child(2) { color: var(--acc-ink); font-weight: 700; }
.speed { border-left: 1px solid var(--line); padding-left: 28px; }
.speed .num { font-size: 52px; }

/* how it works */
.how { margin-top: 72px; background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding-bottom: 56px; }
.diagram { margin: 8px 0 32px; }
.diagram svg { display: block; width: 100%; height: auto; }
.d-box rect { fill: var(--bg); stroke: var(--line-2); stroke-width: 1.5; }
.d-box.acc rect { stroke: var(--acc); }
.d-box.db rect { stroke-dasharray: 5 4; }
.d-t { fill: var(--fg); font: 600 20px var(--sans); }
.d-s { fill: var(--muted); font: 15px var(--mono); }
.d-s.fb { fill: var(--muted); font-style: italic; }
.d-n { fill: var(--acc-ink); font: 700 20px var(--mono); }
.d-line path { stroke: var(--muted); stroke-width: 1.5; }
.d-arrowhead { fill: var(--muted); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.steps h3 { margin: 0 0 8px; font-size: 20px; }
.steps h3 span { font: 700 18px var(--mono); color: var(--acc-ink); margin-right: 6px; }
.steps p { margin: 0; color: var(--muted); }

/* code blocks and tabs */
.code { border: 1px solid var(--term-border, var(--line)); border-radius: 8px; overflow: hidden; margin: 12px 0; background: var(--term); box-shadow: var(--term-shadow, none); }
.code-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 8px 6px 14px; border-bottom: 1px solid #22282e; font: 12px var(--mono); color: #8b949e; }
.code-h .copy { background: transparent; color: #c9d1d9; border-color: #3a434c; }
.code-h .copy.done { color: #4fc79e; border-color: #4fc79e; }
.code pre { margin: 0; padding: 14px 16px; overflow-x: auto; font: 13.5px/1.65 var(--mono); color: #e6edf3; tab-size: 2; }
.code pre code { font: inherit; background: none; border: 0; padding: 0; border-radius: 0; }
.code.out pre { color: #8b949e; }
.tablist { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.tablist[hidden] { display: none; }
[role="tab"] { font: 600 15px var(--sans); color: var(--muted); background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 14px; margin-bottom: -1px; cursor: pointer; }
[role="tab"]:hover { color: var(--fg); }
[role="tab"][aria-selected="true"] { color: var(--fg); border-bottom-color: var(--acc); }
.panel { max-width: 900px; }
.panel > p { color: var(--muted); margin: 0 0 8px; }
.panel + .panel { margin-top: 48px; }
.js .panel + .panel { margin-top: 0; }
.js .panel-h { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.panel-h { font-size: 20px; margin: 0 0 8px; }
.panel[hidden] { display: none; }
.more { color: var(--muted); font-size: 15px; }

/* run it locally */
.local { margin-top: 72px; background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding-bottom: 48px; }
.qs { list-style: none; counter-reset: qs; margin: 0; padding: 0; max-width: 900px; }
.qs > li { counter-increment: qs; position: relative; padding-left: 48px; margin-bottom: 28px; }
.qs > li::before { content: counter(qs); position: absolute; left: 0; top: 0; width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--acc); border-radius: 50%; font: 700 14px var(--mono); color: var(--acc-ink); }
.qs h3 { margin: 4px 0 6px; font-size: 18px; }
.qs p { margin: 0 0 6px; color: var(--muted); }

/* features */
.feat { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 8px 0 0; border-top: 1px solid var(--line); }
.feat > div { padding: 22px 24px 22px 0; border-bottom: 1px solid var(--line); }
.feat > div:not(:nth-child(3n + 1)) { padding-left: 24px; border-left: 1px solid var(--line); }
.feat dt { font-weight: 700; margin-bottom: 6px; }
.feat dd { margin: 0; color: var(--muted); font-size: 15px; }

/* dashboard */
.dash { margin-top: 72px; }
.shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.shot { margin: 0; min-width: 0; }
.shot.big { grid-column: 1 / -1; }
/* A frame that stays visible on both themes: a dark screenshot never merges into the page. */
.shot a { display: block; padding: 8px; background: var(--frame); border: 1px solid var(--frame-border, var(--line-2)); border-radius: 10px; box-shadow: var(--card-shadow, none); }
.shot a:hover { border-color: var(--acc); }
.shot img { display: block; width: 100%; height: auto; border-radius: 4px; box-shadow: 0 0 0 1px var(--line); }
.shot figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); }
.shot .build { display: block; margin-top: 2px; font: 12px var(--mono); }
.shot a.for-light { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .shot a.for-light { display: block; }
  :root:not([data-theme="dark"]) .shot a.for-dark { display: none; }
}
:root[data-theme="light"] .shot a.for-light { display: block; }
:root[data-theme="light"] .shot a.for-dark { display: none; }

/* why and limits */
.why-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; }
.pros { list-style: none; margin: 0; padding: 0; }
.pros li { padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--muted); }
.pros li:first-child { border-top: 1px solid var(--line); }
.pros b { color: var(--fg); }
.cons { border: 1px solid var(--card-border, var(--line)); border-radius: 8px; padding: 20px 24px; background: var(--card, var(--bg-2)); box-shadow: var(--card-shadow, none); }
.cons h3 { margin: 0 0 8px; font-size: 18px; }
.cons ul { margin: 0 0 12px; padding-left: 20px; color: var(--muted); }
.cons li { margin-bottom: 8px; }
.cons p { margin: 0; }

/* links */
.linklist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 56px; }
.linklist li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; padding: 12px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.linklist a { font-weight: 600; }
.linklist span { color: var(--muted); font-size: 14px; min-width: 0; }
.linklist span code { overflow-wrap: anywhere; }

/* about */
.about { padding-bottom: 64px; }
.about-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 56px; }
.who { font-size: 20px; margin-top: 0; }
.about-grid p { color: var(--muted); }
.about-grid .who { color: var(--fg); }
.contact { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.contact li { display: flex; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.contact span { width: 72px; flex: none; font: 13px/1.9 var(--mono); color: var(--muted); }
.contact a { overflow-wrap: anywhere; }

.foot { border-top: 1px solid var(--line); }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 20px; padding-bottom: 28px; font-size: 14px; color: var(--muted); }
.foot p { margin: 0; }

/* narrower screens */
@media (max-width: 1000px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-top: 48px; }
  h1 { font-size: 44px; }
  .band, .steps { grid-template-columns: minmax(0, 1fr); }
  .stat, .stat + .stat { padding: 22px 0; border-left: 0; }
  .stat + .stat { border-top: 1px solid var(--line); }
  .split, .why-grid, .about-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .speed { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 20px; }
  .feat { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feat > div:not(:nth-child(3n + 1)) { padding-left: 0; border-left: 0; }
  .feat > div:nth-child(even) { padding-left: 24px; border-left: 1px solid var(--line); }
  .diagram { display: none; }   /* too wide to read below 1000px; the numbered steps say the same */
}
@media (max-width: 720px) {
  :root { --gut: 20px; }
  /* the nav wraps onto its own row under the logo, and the bar stops being sticky */
  .bar { position: static; }
  .bar-in { flex-wrap: wrap; height: auto; padding-top: 8px; padding-bottom: 6px; row-gap: 2px; }
  .bar nav { order: 3; flex-basis: 100%; }
  .bar ul { flex-wrap: wrap; column-gap: 18px; row-gap: 0; }
  h1 { font-size: 36px; }
  .lede { font-size: 17px; }
  h2.sec { font-size: 26px; }
  .num { font-size: 52px; }
  .num small { font-size: 22px; }
  .bars li { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
  .bars .track { grid-column: 1 / -1; grid-row: 2; }
  .feat, .linklist, .shots { grid-template-columns: minmax(0, 1fr); }
  .feat > div:nth-child(even) { padding-left: 0; border-left: 0; }
  .qs > li { padding-left: 0; }
  .qs > li::before { position: static; display: inline-grid; margin-bottom: 6px; }
  section { padding-top: 56px; }
  .how, .local, .dash { margin-top: 56px; }
}
@media print {
  .bar, .copy, .theme, .skip { display: none !important; }
}

/* 404 */
.nf { padding-top: 96px; padding-bottom: 96px; }

/* Screenshots open full size in the same tab (plain links, no script). */
/* The label sits in the frame's bottom margin, never over the screenshot. */
.shot a { position: relative; cursor: zoom-in; padding-bottom: 36px; }
.zoom { position: absolute; right: 10px; bottom: 7px; font: 12px var(--mono); color: #ffffff; background: rgba(13, 17, 23, 0.82); border-radius: 4px; padding: 3px 8px; }
.shot a:hover .zoom, .shot a:focus-visible .zoom { background: #1d7556; }

/* The hero terminal types itself: site.js animates a clip-path on each line, which changes
   no layout, so nothing on the page moves while it plays. */
.replay { margin-left: 10px; font: 12px var(--mono); color: #c9d1d9; background: transparent; border: 1px solid #3a434c; border-radius: 4px; min-height: 24px; min-width: 24px; padding: 2px 10px; cursor: pointer; }
.replay:hover { border-color: #8b949e; }
.replay[hidden] { display: inline-block; visibility: hidden; }
.term figcaption a { color: #8b949e; }
.term figcaption a:hover { color: #e6edf3; }

/* links in compact places */
.kicker a { color: var(--muted); }
.kicker a:hover { color: var(--fg); }
.chip-links { margin: 8px 0 0; font: 13px var(--mono); color: var(--muted); }
.pr a { color: var(--muted); }
.pr a:hover { color: var(--fg); }
.mut th a { color: var(--fg); }
.feat dt a { color: var(--fg); text-decoration-color: var(--acc); }
.pros b a { color: var(--fg); text-decoration-color: var(--acc); }

/* "Copy setup" */
.setup { max-width: 900px; margin: 0 0 32px; padding: 16px 20px 6px; border: 1px solid var(--card-border, var(--line-2)); border-radius: 8px; background: var(--card, var(--bg)); box-shadow: var(--card-shadow, none); }
.setup[hidden] { display: none; }
.setup .tablist { margin-bottom: 14px; }
.setup .panel > p { margin: 0 0 10px; }
.setup-note { color: var(--muted); font-size: 15px; }
.copy-setup.done { filter: none; }

/* ---- Every screen size ------------------------------------------------------------------ */

/* Hero: on wide screens the terminal's top lines up with the headline's top (the kicker above
   the headline is 24px tall plus its 20px margin). Stacked below 1000px, as before. */
.hero { align-items: start; }
.kicker { line-height: 24px; }
@media (min-width: 1001px) { .hero .term { margin-top: 44px; } }

/* Buttons don't inherit fonts; main buttons are at least 44px tall. */
.btn { font: 600 16px/1.25 var(--sans); min-height: 44px; }
.copy { min-height: 28px; }

/* Tap targets of at least 24px for links that stand on their own (links inside sentences
   keep the line's height, as WCAG 2.5.8 allows). */
.bar nav a, .kicker a, .chip-links a, .pr a, .foot a, .proof a, .stat > a, .speed > a,
.mut caption a, .term figcaption a, .linklist a, .contact a {
  display: inline-block; padding-top: 3px; padding-bottom: 3px; line-height: 18px; min-height: 24px;
}

/* Scroll boxes: code blocks and the table scroll on their own, with a visible scrollbar. */
pre, .table-scroll { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
pre::-webkit-scrollbar, .table-scroll::-webkit-scrollbar { height: 8px; }
pre::-webkit-scrollbar-thumb, .table-scroll::-webkit-scrollbar-thumb { background: #3a434c; border-radius: 4px; }
.table-scroll { overflow-x: auto; max-width: 100%; }
.table-scroll:focus-visible { outline-offset: 2px; }

/* Comfortable line length on wide screens. */
.aside, .more, .note { max-width: 52em; }

/* Long commands, URLs and names wrap inside their box rather than push it wider. */
.chip { flex-wrap: wrap; }
.chip code { white-space: normal; overflow-wrap: anywhere; overflow-x: visible; }
.linklist a, .contact a { overflow-wrap: anywhere; }

/* Phones (portrait and landscape) and small tablets: no text under 14px. */
@media (max-width: 940px) {
  .kicker, .chip-links, .copy, .replay, .term figcaption, .term pre, .legend, .group, .group span,
  .tag, .stat > a, .speed > a, .mut caption a, .code-h, .code pre, .zoom, .build, .linklist span,
  .contact span, .proof a, .sieve-head p, p code, li code, dd code, td code, th code,
  .shot .build, .shot .zoom { font-size: 14px; }
}
/* Short landscape screens: the bar scrolls away instead of covering a third of the screen. */
@media (max-height: 500px) { .bar { position: static; } html { scroll-padding-top: 0; } }

/* Phones: the hero terminal's lines wrap instead of scrolling. Each line is a block with a
   hanging indent, so the "$" stays in the first column and wrapped text lines up after it.
   (Up to 699px: below that the stacked terminal is too narrow for its longest line.)
   break-spaces keeps the space at a wrap inside the box instead of letting it hang past it. */
@media (max-width: 699px) {
  .term pre.typed { white-space: normal; overflow-x: visible; }
  .term pre.typed .ln { display: block; white-space: break-spaces; overflow-wrap: anywhere; padding-left: 2ch; text-indent: -2ch; }
}

/* "How it works" loop (site.js adds .anim only when motion is allowed): a dot moves along the
   arrows; the box it is in lights up (border and number in the accent). Only SVG attributes
   and colours change, so the page layout never moves. */
.d-dot { fill: var(--fill, var(--acc)); opacity: 0; }
.diagram.anim .d-dot.show { opacity: 1; }
.diagram.anim .d-box.acc rect { stroke: var(--line-2); }
.diagram.anim .d-n { fill: var(--muted); }
.diagram.anim .d-box rect, .diagram.anim .d-n, .diagram.anim .d-s.fb { transition: stroke .25s, fill .25s, stroke-width .25s; }
.diagram.anim .d-box.on rect { stroke: var(--acc); stroke-width: 2.5; }
.diagram.anim .d-box.on .d-n { fill: var(--acc-ink); }
.diagram.anim .d-s.fb.on { fill: var(--acc-ink); }
