/* Panel — Inkroot's visual system, for the website.
   1-bit e-ink honesty: two colours, hard 2px ink borders, no radius, no shadows,
   ordered dithers instead of greys. Dark mode is the panel inverted, not a new palette.
   Tokens match tools/brand/templates/panel.css (tools/site/check.mjs keeps them in step). */

@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("../fonts/IBMPlexSans-Regular-Latin1.woff2") format("woff2");
  unicode-range: U+0000, U+000D, U+0020-007E, U+00A0-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2013-2014, U+2018-201A, U+201C-201E, U+2020-2022, U+2026, U+2030, U+2039-203A, U+2044, U+20AC, U+2122, U+2212, U+FB01-FB02; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("../fonts/IBMPlexSans-Regular-Pi.woff2") format("woff2");
  unicode-range: U+2000-200D, U+2015, U+2028-2029, U+202F, U+2032-2033, U+2190-2199, U+2713; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-style: normal; font-display: swap;
  src: url("../fonts/IBMPlexSans-SemiBold-Latin1.woff2") format("woff2");
  unicode-range: U+0000, U+000D, U+0020-007E, U+00A0-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2013-2014, U+2018-201A, U+201C-201E, U+2020-2022, U+2026, U+2030, U+2039-203A, U+2044, U+20AC, U+2122, U+2212, U+FB01-FB02; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-style: normal; font-display: swap;
  src: url("../fonts/IBMPlexSans-SemiBold-Pi.woff2") format("woff2");
  unicode-range: U+2000-200D, U+2015, U+2028-2029, U+202F, U+2032-2033, U+2190-2199, U+2713; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("../fonts/IBMPlexMono-Regular-Latin1.woff2") format("woff2");
  unicode-range: U+0000, U+000D, U+0020-007E, U+00A0-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2013-2014, U+2018-201A, U+201C-201E, U+2020-2022, U+2026, U+2030, U+2039-203A, U+2044, U+20AC, U+2122, U+2212, U+FB01-FB02; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("../fonts/IBMPlexMono-Regular-Pi.woff2") format("woff2");
  unicode-range: U+2000-200D, U+2015, U+2028-2029, U+202F, U+2032-2033, U+2190-2199, U+2713; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 600; font-style: normal; font-display: swap;
  src: url("../fonts/IBMPlexMono-SemiBold-Latin1.woff2") format("woff2");
  unicode-range: U+0000, U+000D, U+0020-007E, U+00A0-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2013-2014, U+2018-201A, U+201C-201E, U+2020-2022, U+2026, U+2030, U+2039-203A, U+2044, U+20AC, U+2122, U+2212, U+FB01-FB02; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 600; font-style: normal; font-display: swap;
  src: url("../fonts/IBMPlexMono-SemiBold-Pi.woff2") format("woff2");
  unicode-range: U+2000-200D, U+2015, U+2028-2029, U+202F, U+2032-2033, U+2190-2199, U+2713; }

:root {
  --panel: #E8E9E4;
  --ink: #111111;
  --muted: #555555;
  --rule: 2px solid var(--ink);
  --sans: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --wrap: 1120px;
  --gutter: 16px;
  /* Ordered-dither fills (2px cells): 25%, 50%, 75% ink. */
  --d25: conic-gradient(var(--ink) 0 25%, transparent 0) 0 0 / 4px 4px;
  --d50: repeating-conic-gradient(var(--ink) 0 25%, transparent 0 50%) 0 0 / 4px 4px;
  --d75: conic-gradient(var(--ink) 0 75%, transparent 0) 0 0 / 4px 4px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --panel: #111111; --ink: #E8E9E4; --muted: #AAAAAA; color-scheme: dark; }
}
@media (min-width: 720px) { :root { --gutter: 32px; } }

*, *::before, *::after { box-sizing: border-box; border-radius: 0; box-shadow: none; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
html, body { margin: 0; background: var(--panel); color: var(--ink); }
body { font: 400 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-wrap: break-word; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
code { font: 400 0.88em/1 var(--mono); background: var(--panel); border: 1px solid var(--ink); padding: 0.1em 0.3em; white-space: nowrap; }
strong { font-weight: 600; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: var(--gutter); top: 8px; z-index: 10; background: var(--ink); color: var(--panel); padding: 8px 12px; }

/* Type */
h1, h2, h3, .h { font-family: var(--sans); font-weight: 600; letter-spacing: -0.025em; line-height: 1.08; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(38px, 7vw, 68px); }
h2 { font-size: clamp(28px, 4.4vw, 40px); margin-bottom: 18px; }
h3 { font-size: 21px; letter-spacing: -0.015em; margin-bottom: 8px; }
.label { display: block; font: 400 13px/1.4 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.lede { font-size: clamp(18px, 2.2vw, 21px); line-height: 1.5; max-width: 34em; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }

/* Inverted ink-block chip with a drawn 7×7 pixel dot (Plex has no ●). */
.chip { display: inline-flex; align-items: center; gap: 0.75em; background: var(--ink); color: var(--panel);
  font: 600 13px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; padding: 0.75em 0.95em; }
.dot { flex: none; width: 7px; height: 7px; background: currentColor;
  clip-path: polygon(2px 0, 5px 0, 5px 1px, 6px 1px, 6px 2px, 7px 2px, 7px 5px, 6px 5px, 6px 6px, 5px 6px, 5px 7px, 2px 7px, 2px 6px, 1px 6px, 1px 5px, 0 5px, 0 2px, 1px 2px, 1px 1px, 2px 1px); }

/* Buttons: primary = solid ink block, secondary = outlined. Instant invert on hover (e-ink has no fades). */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.6em; min-height: 48px;
  padding: 0.8em 1.2em; border: var(--rule); background: var(--panel); color: var(--ink);
  font: 600 14px/1.2 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; }
.btn:hover, .btn-primary { background: var(--ink); color: var(--panel); }
.btn-primary:hover { background: var(--panel); color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* Dither fills */
.d25 { background: var(--d25); }
.d50 { background: var(--d50); }
.d75 { background: var(--d75); }
.d100 { background: var(--ink); }
/* A stepped 1-bit ramp: panel → 25 → 50 → 75 → ink. */
.ramp { display: grid; grid-template-columns: repeat(5, 1fr); height: 14px; border-block: var(--rule); }
.ramp > i:nth-child(2) { background: var(--d25); }
.ramp > i:nth-child(3) { background: var(--d50); }
.ramp > i:nth-child(4) { background: var(--d75); }
.ramp > i:nth-child(5) { background: var(--ink); }

/* Header */
.top { border-bottom: var(--rule); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.brand { display: block; margin-left: -9px; flex: none; }
.brand img { width: 153px; height: 48px; } /* 0.75 × the 204×64 wordmark: every dither cell lands on whole pixels */
.nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 20px; font: 400 13px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; }
.nav a { text-decoration: none; padding: 10px 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--ink); }
.nav .wide { display: none; }
@media (max-width: 419px) { .nav .gh { display: none; } .nav { gap: 4px 16px; } }
.notes code { white-space: normal; overflow-wrap: anywhere; }
@media (min-width: 760px) { .nav .wide { display: inline; } }

/* Hero */
.hero { padding: 48px 0 56px; }
.hero .wrap { display: grid; gap: 40px; align-items: center; }
.hero h1 { margin-bottom: 22px; }
.hero .pitch { font-weight: 600; margin-bottom: 0.4em; }
.hero .chip { margin-top: 26px; }
@media (min-width: 960px) {
  .hero { padding: 72px 0 80px; }
  .hero .wrap { grid-template-columns: 1fr 1.05fr; gap: 56px; }
}
.stage { position: relative; padding: 28px 0 28px 28px; }
.field { position: absolute; inset: 0 calc(-1 * var(--gutter)) 0 0; display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; }
.field > i:nth-child(2) { background: var(--d25); }
.field > i:nth-child(3) { background: var(--d50); }
.field > i:nth-child(4) { background: var(--d75); }
@media (min-width: 1184px) { .field { right: calc((var(--wrap) - 100vw) / 2 + var(--gutter) - 32px); } }

/* A screenshot shown as a screen: hard frame, panel-coloured like an e-ink display in either theme. */
.screen { position: relative; border: var(--rule); background: #E8E9E4; }
.screen img { width: 100%; }

/* Sections */
.section { padding: 64px 0; border-top: var(--rule); }
.section-head { max-width: 42em; margin-bottom: 32px; }

/* Downloads */
.downloads { display: grid; gap: 12px; grid-template-columns: 1fr; margin: 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .downloads { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .downloads { grid-template-columns: repeat(4, 1fr); } }
.dl { display: flex; flex-direction: column; gap: 6px; height: 100%; min-height: 148px; padding: 16px 16px 14px;
  border: var(--rule); background: var(--panel); color: var(--ink); text-decoration: none; }
.dl .os { font: 600 20px/1.15 var(--sans); letter-spacing: -0.015em; }
.dl .for { font: 400 13px/1.4 var(--mono); color: var(--muted); }
.dl .file { margin-top: auto; padding-top: 14px; font: 400 12px/1.35 var(--mono); word-break: break-all; }
.dl .get { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font: 600 13px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; }
.dl .rec { display: none; }
.dl[data-primary] { background: var(--ink); color: var(--panel); }
.dl[data-primary] .for { color: inherit; }
.dl[data-primary] .rec { display: block; font: 600 11px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; }
.dl:hover { outline: 2px solid var(--ink); outline-offset: 2px; }
.dl:hover .get span:first-child { text-decoration: underline; text-underline-offset: 4px; }
.notes { display: grid; gap: 20px; margin-top: 28px; }
@media (min-width: 860px) { .notes { grid-template-columns: 1fr 1fr; gap: 32px; } }
.notes p { font-size: 15px; }
.beta { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; border: 4px solid var(--ink); padding: 14px 16px; margin-bottom: 24px; }
.beta .chip { padding: 0.55em 0.7em; }
.beta p { font-size: 15px; }
.ver { margin: 14px 0 0; }

/* Steps */
.steps { display: grid; gap: 20px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps > li { display: flex; flex-direction: column; border: var(--rule); counter-increment: step; }
.steps .body { padding: 18px 18px 22px; }
.steps .num { display: inline-block; background: var(--ink); color: var(--panel); font: 600 13px/1 var(--mono); letter-spacing: 0.12em; padding: 6px 8px; margin-bottom: 14px; }
.steps .num::before { content: "STEP 0" counter(step); }
.steps p { font-size: 16px; }
.steps .screen { margin-top: auto; border-width: 2px 0 0; }

/* Inverted callout block */
.callout { background: var(--ink); color: var(--panel); }
.callout .wrap { display: grid; gap: 32px; align-items: center; padding-top: 56px; padding-bottom: 56px; }
@media (min-width: 900px) { .callout .wrap { grid-template-columns: 1.2fr 1fr; } }
.callout .label { color: inherit; }
.callout .btn { border-color: var(--panel); background: var(--panel); color: var(--ink); }
.callout .btn:hover { background: var(--ink); color: var(--panel); }
.callout .screen { border-color: var(--panel); }
.callout code { background: transparent; border-color: var(--panel); }
.callout-ramp { display: grid; grid-template-columns: repeat(4, 1fr); height: 24px; }
.callout-ramp > i:nth-child(1) { background: var(--d25); }
.callout-ramp > i:nth-child(2) { background: var(--d50); }
.callout-ramp > i:nth-child(3) { background: var(--d75); }
.callout-ramp > i:nth-child(4) { background: var(--ink); }

/* Prose */
.prose { max-width: 40em; }
.prose ol, .prose ul { padding-left: 1.4em; margin: 0 0 1em; }
.prose li { margin-bottom: 0.35em; }
.split { display: grid; gap: 28px; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; } }

/* FAQ */
.faq { border-top: var(--rule); max-width: 52em; }
.faq details { border-bottom: var(--rule); }
.faq summary { display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; cursor: pointer; list-style: none;
  font: 600 19px/1.3 var(--sans); letter-spacing: -0.01em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 28px; height: 28px; border: var(--rule); display: grid; place-items: center;
  font: 600 18px/1 var(--mono); }
.faq details[open] summary::after { content: "\2212"; background: var(--ink); color: var(--panel); }
.faq summary:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.answer { padding: 0 0 22px; max-width: 42em; font-size: 16px; }
.answer ol { padding-left: 1.4em; margin: 0 0 1em; }
.answer li { margin-bottom: 0.3em; }
.answer blockquote { margin: 0 0 1em; padding: 12px 14px; border-left: 6px solid var(--ink); background: var(--panel); }
.answer blockquote p { font-size: 15px; }

/* Numbered cable steps */
.cable-steps { margin: 0; padding: 0; list-style: none; counter-reset: c; display: grid; gap: 0; border-top: var(--rule); }
.cable-steps li { counter-increment: c; display: grid; grid-template-columns: 56px 1fr; gap: 16px; align-items: baseline; padding: 16px 0; border-bottom: var(--rule); font-size: 18px; }
.cable-steps li::before { content: counter(c); font: 600 34px/1 var(--mono); }
.cable-steps strong { font-weight: 600; }

.art { color: var(--ink); }
.art svg { width: 100%; height: auto; }
.need { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 760px) { .need { grid-template-columns: repeat(3, 1fr); } }
.need li { border: var(--rule); padding: 16px; font-size: 16px; }
.need h3 { margin-bottom: 6px; }

/* Footer */
.foot { border-top: var(--rule); padding: 40px 0 56px; font-size: 14px; }
.foot .wrap { display: grid; gap: 14px; }
.foot p { max-width: 62em; }
.foot .links { display: flex; flex-wrap: wrap; gap: 8px 22px; font: 400 13px/1.4 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 8px; }

/* 404 */
.lost { min-height: 60vh; display: grid; align-content: center; padding: 64px 0; }
.after-steps { margin-top: 16px; font-size: 15px; }
.art-screen { background: var(--panel); padding: 36px 28px; }
.callout .art { max-width: 520px; }
.downloads.compact { grid-template-columns: 1fr 1fr; margin-top: 8px; }
.downloads.compact .dl { min-height: 120px; }
[hidden] { display: none !important; }
.callout .art { color: var(--panel); }
.downloads.compact .get { margin-top: auto; padding-top: 10px; }
