/* OpenMAD — presentation site.
 *
 * Palette, radii and type stack come from the app's own CSS (src/mad68/hud.py)
 * so the site and the tool read as one product.
 *
 * The visual language is an instrument panel, not a landing page: hairline
 * rules, corner ticks, monospace indices and left-aligned measures. Nothing is
 * centred except the one CTA that earns it, and there is no soft radial bloom
 * behind the headline — the red shows up as an edge or a marker, never as a
 * wash. The keyboard sits inside a measured frame instead of floating.
 */

/* Display face for headings. Self-hosted (latin subset only, ~19 KB total) so
   the page keeps no external dependency and nothing about a visitor leaks to a
   font CDN. Chakra Petch earns its place rather than being decoration: its
   terminals are cut at an angle, which is the same geometry as the corner ticks
   and the panel edges used throughout. */
@font-face {
  font-family: "Chakra Petch";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/chakrapetch-600.woff2") format("woff2");
}
@font-face {
  font-family: "Chakra Petch";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/chakrapetch-700.woff2") format("woff2");
}

:root {
  color-scheme: dark;

  --bg: #0d0d0f;
  --bg-deep: #050506;
  --panel-brd: rgba(255,255,255,0.09);
  --panel-brd-hi: rgba(255,255,255,0.18);
  --ink: #f4f4f5;
  --ink-2: #a9a9b2;
  --ink-3: #74747e;
  --accent: #ec3339;
  --accent-hi: #ff5c45;
  --accent-dim: rgba(236,51,57,0.14);

  --r1:#4a1418; --r2:#68171e; --r3:#871a24; --r4:#a91d28; --r5:#ca222d;
  --r6:#e63036; --r7:#f75c45; --r8:#ff8a68; --r9:#ffb894;

  --radius: 6px;
  --radius-lg: 10px;
  --nav-h: 68px;
  --maxw: 1200px;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "Cascadia Mono", Consolas, monospace;
  --display: "Chakra Petch", var(--font);
}

/* Headings take the display face. It is already narrow and angular, so the
   tight negative tracking the system font wanted would close it up too far. */
h1, h2, h3, .brand-word {
  font-family: var(--display);
  letter-spacing: -.005em;
  font-weight: 700;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
/* A long unbroken token (a URL, a filename) must never widen the page. */
h1, h2, h3, h4, p, li, summary { overflow-wrap: break-word; }
a { color: var(--accent-hi); text-decoration: none; }
a:hover { text-decoration: underline; }
code {
  font: 0.9em var(--mono);
  background: rgba(255,255,255,.07); padding: 1px 6px; border-radius: 4px;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.wrap.narrow { max-width: 860px; }
.sep { opacity: .4; margin: 0 4px; }

/* ------------------------------------------------------------------ icons
   Tabler Icons (MIT, tabler.io/icons) — drawn on a 24×24 grid with a 2px
   stroke. Inlined rather than loaded, so there is no icon font and no request.
   The caps and joins are overridden from Tabler's default round to square and
   mitre, which gives every icon the same cut-corner geometry as Chakra Petch
   and the corner ticks. Note the caps must not be `butt`: several Tabler icons
   draw their dots as zero-length segments (`M6 10l0 .01`), which only render
   because the cap has area. */
.ic svg, .btn .i, .kofi-i, .to-top svg, .fq-i {
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: square; stroke-linejoin: miter;
}

/* Corner ticks — the recurring motif. Used on the device frame and the
   download panel to suggest a measured, technical object. */
.tick {
  position: absolute; width: 9px; height: 9px; pointer-events: none;
  border: 0 solid var(--accent); opacity: .75;
}
.tick.tl { top: -1px; left: -1px; border-top-width: 2px; border-left-width: 2px; }
.tick.tr { top: -1px; right: -1px; border-top-width: 2px; border-right-width: 2px; }
.tick.bl { bottom: -1px; left: -1px; border-bottom-width: 2px; border-left-width: 2px; }
.tick.br { bottom: -1px; right: -1px; border-bottom-width: 2px; border-right-width: 2px; }

/* ---------------------------------------------------------------- buttons */

/* The hero buttons were only clickable along their top edge. It was not the
   button box at all: .board-glow sat at height:190% with no pointer-events:none,
   so an invisible blurred layer covered everything below its first few pixels.
   Every decorative overlay is now either gone or explicitly click-through. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 22px; border-radius: var(--radius); border: 1px solid transparent;
  font: 600 14px/1 var(--font); letter-spacing: .01em; cursor: pointer;
  white-space: nowrap; text-align: center; vertical-align: middle;
  transition: transform .18s ease, box-shadow .18s ease,
              background .18s ease, border-color .18s ease, color .18s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn .i { width: 17px; height: 17px; flex: none; }

.btn-red { background: var(--accent); color: #fff; }
.btn-red:hover { background: #f4404a; box-shadow: 0 8px 24px rgba(236,51,57,.34); }

.btn-quiet {
  background: transparent; color: var(--ink); border-color: var(--panel-brd-hi);
}
.btn-quiet:hover { background: rgba(255,255,255,.06); border-color: var(--ink-3); }

.btn-lg { padding: 15px 26px; font-size: 15px; }
.btn-xl { padding: 17px 40px; font-size: 16.5px; }

/* ------------------------------------------------------------------- nav */

.nav {
  --na: 0;
  position: fixed; inset: 0 0 auto 0; height: var(--nav-h); z-index: 60;
  display: flex; align-items: center;
  background: rgba(10,10,12, calc(var(--na) * 0.84));
  border-bottom: 1px solid rgba(255,255,255, calc(var(--na) * 0.09));
  transition: backdrop-filter .3s ease;
}
.nav.is-stuck {
  backdrop-filter: blur(16px) saturate(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
}
.nav-in {
  width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px;
  display: flex; align-items: center; gap: 28px;
}

.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 25px; height: auto; }
.brand-word { font: 700 20px/1 var(--display); letter-spacing: .005em; color: var(--ink); }
.brand-word span { color: var(--accent); }

.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a {
  position: relative; padding: 8px 14px; border-radius: var(--radius);
  color: var(--ink-2); font: 500 14px/1 var(--font);
  display: inline-flex; align-items: center;
  transition: color .18s ease, background .18s ease;
}
.nav-links a:hover { color: var(--ink); background: rgba(255,255,255,.05); text-decoration: none; }
/* A short red underscore rather than a full-width underline. */
.nav-links a::after {
  content: ""; position: absolute; left: 14px; bottom: 3px; width: 0; height: 2px;
  background: var(--accent); transition: width .22s ease;
}
.nav-links a.active { color: var(--ink); }
.nav-links a.active::after { width: 14px; }

.nav-cta { display: flex; align-items: center; gap: 8px; flex: none; }
.ghost-link {
  padding: 8px 12px; color: var(--ink-2); font: 500 14px/1 var(--font);
  display: inline-flex; align-items: center;
}
.ghost-link:hover { color: var(--ink); text-decoration: none; }

.nav-burger {
  display: none; width: 40px; height: 40px; padding: 0; margin-left: auto;
  background: transparent; border: 1px solid var(--panel-brd-hi);
  border-radius: var(--radius); cursor: pointer; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px;
}
.nav-burger span {
  display: block; width: 17px; height: 2px; background: var(--ink);
  border-radius: 2px; transition: transform .22s ease, opacity .22s ease;
}
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ------------------------------------------------------------------ hero */

.hero { position: relative; padding: calc(var(--nav-h) + 84px) 0 104px; overflow: hidden; }

/* A faint engineering grid that fades out to the right, plus one red hairline
   down the left gutter. No radial bloom. */
.hero-mesh {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.030) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.030) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(105deg, #000 0%, rgba(0,0,0,.35) 46%, transparent 78%);
  -webkit-mask-image: linear-gradient(105deg, #000 0%, rgba(0,0,0,.35) 46%, transparent 78%);
}

.hero-in {
  position: relative;
  display: grid; grid-template-columns: minmax(0,1.02fr) minmax(0,0.98fr);
  gap: 62px; align-items: center;
}

/* mono label with a red bar, in place of a centred pill */
.tag {
  display: flex; align-items: center; gap: 11px; margin: 0 0 26px;
  color: var(--ink-3); font: 600 11.5px/1 var(--mono);
  letter-spacing: .16em; text-transform: uppercase;
}
.tag-bar { width: 26px; height: 2px; background: var(--accent); flex: none; }

.hero h1 {
  margin: 0 0 24px; font-size: clamp(2.35rem, 4.7vw, 3.9rem);
  line-height: 1.06; letter-spacing: -.008em; font-weight: 700;
}
.grad {
  background: linear-gradient(96deg, var(--accent) 4%, var(--accent-hi) 58%, #ff9d7e 98%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.lede { max-width: 560px; margin: 0 0 34px; color: var(--ink-2); font-size: 1.03rem; }
.lede strong { color: var(--ink); font-weight: 600; }

.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-fine {
  margin: 24px 0 0; color: var(--ink-3);
  font: 12.5px/1.6 var(--mono); letter-spacing: .02em;
}

/* --- the device frame --- */
.hero-rig { display: flex; flex-direction: column; gap: 18px; }

.device {
  position: relative; margin: 0; padding: 30px 26px 26px;
  border: 1px solid var(--panel-brd); border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255,255,255,.030), rgba(255,255,255,.008)),
    rgba(255,255,255,.012);
}
.dv-label {
  position: absolute; top: 11px; left: 26px;
  color: var(--ink-3); font: 600 10.5px/1 var(--mono);
  letter-spacing: .18em; text-transform: uppercase;
}
.board-img {
  width: 100%; filter: drop-shadow(0 18px 34px rgba(0,0,0,.62));
  animation: hover 8s ease-in-out infinite;
}
@keyframes hover {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-7px); }
}

/* --- the log --- */
/* min-width:0 on both: the <pre> is white-space:pre and would otherwise set a
   floor on the flex/grid track and blow the page out sideways on narrow
   screens. The log scrolls inside itself instead. */
.hero-rig { min-width: 0; }
.term {
  min-width: 0;
  border: 1px solid var(--panel-brd); border-radius: var(--radius-lg);
  background: rgba(0,0,0,.42); overflow: hidden;
}
.term-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 14px; border-bottom: 1px solid var(--panel-brd);
  background: rgba(255,255,255,.028);
}
.tdot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.16); flex: none; }
.term-name {
  margin-left: 6px; color: var(--ink-3);
  font: 600 11px/1 var(--mono); letter-spacing: .08em;
}
.term-live {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  color: var(--ink-3); font: 600 10.5px/1 var(--mono);
  letter-spacing: .14em; text-transform: uppercase;
}
.term-live i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  animation: blip 2s ease-in-out infinite;
}
@keyframes blip { 0%,100% { opacity: .35; } 50% { opacity: 1; } }

.term-body {
  margin: 0; padding: 14px 16px 16px; min-height: 118px;
  font: 11.6px/1.85 var(--mono); color: var(--ink-2);
  white-space: pre; overflow-x: auto;
}
.term-body .t { color: var(--ink-3); }
.term-body .k { color: var(--accent-hi); }
.term-body .n { color: var(--ink-3); }
.term-body .cur {
  display: inline-block; width: 7px; height: 13px; vertical-align: -2px;
  background: var(--accent); animation: blip 1.05s steps(1) infinite;
}

/* ----------------------------------------------------------------- bands */

.band { padding: 112px 0; position: relative; }
.band.alt { background: rgba(255,255,255,.016); border-block: 1px solid var(--panel-brd); }

/* Left-aligned head with the kicker riding a hairline that runs to the edge. */
.sec-head { max-width: 760px; margin: 0 0 54px; }
.kicker {
  display: flex; align-items: center; gap: 14px; margin-bottom: 20px;
  color: var(--accent); font: 700 11.5px/1 var(--mono);
  letter-spacing: .18em; text-transform: uppercase;
}
.kicker::after {
  content: ""; flex: 1 1 auto; height: 1px;
  background: linear-gradient(90deg, rgba(236,51,57,.5), transparent);
}
.sec-head h2 {
  margin: 0 0 16px; font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  line-height: 1.16; letter-spacing: -.006em; font-weight: 700;
}
.sec-sub { margin: 0; color: var(--ink-2); font-size: 1.02rem; }

/* -------------------------------------------------------------- compare */

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.compare {
  position: relative; padding: 28px 28px 30px;
  border: 1px solid var(--panel-brd); border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  background: rgba(255,255,255,.014);
}
.compare.hi {
  border-color: rgba(236,51,57,.32); background: rgba(236,51,57,.035);
}
/* A red rule across the full top edge, flush with the border corners. The
   previous version was a floating 2px spine inset from the top and bottom,
   which read as a stray mark rather than part of the panel. */
.compare.hi::before {
  content: ""; position: absolute; left: -1px; right: -1px; top: -1px;
  height: 2px; background: var(--accent);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.compare h3 {
  display: flex; align-items: center; gap: 10px; margin: 0 0 16px;
  font: 700 11.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3);
}
.compare.hi h3 { color: var(--ink); }
.dot { width: 7px; height: 7px; flex: none; }
.dot-mute { background: var(--ink-3); }
.dot-red { background: var(--accent); }

.cmp { list-style: none; margin: 0; padding: 0; }
.cmp li {
  position: relative; padding: 10px 0 10px 24px; color: var(--ink-2);
  font-size: 14.8px; border-top: 1px solid rgba(255,255,255,.05);
}
.cmp li:first-child { border-top: 0; }
.cmp li::before {
  content: ""; position: absolute; left: 2px; top: 19px;
  width: 8px; height: 1px; background: var(--ink-3);
}
.compare.hi .cmp li { color: var(--ink); }
.compare.hi .cmp li::before { background: var(--accent); width: 12px; }

/* ---------------------------------------------------------------- cards */

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
         background: var(--panel-brd); border: 1px solid var(--panel-brd);
         border-radius: var(--radius-lg); overflow: hidden; }
/* Cells in one grid rather than six floating cards: the hairlines between them
   come from the grid gap showing through, which reads as a panel, not a deck. */
.card {
  position: relative; padding: 34px 28px 32px; background: var(--bg);
  transition: background .25s ease;
}
.card:hover { background: rgba(255,255,255,.028); }
/* Red rule that wipes in along the top edge on hover. */
.card::before {
  content: ""; position: absolute; top: 0; left: 0; width: 0; height: 2px;
  background: var(--accent); transition: width .3s cubic-bezier(.22,.61,.36,1);
}
.card:hover::before { width: 100%; }

.idx {
  display: block; margin-bottom: 22px;
  color: var(--ink-3); font: 700 11.5px/1 var(--mono); letter-spacing: .14em;
  transition: color .25s ease;
}
.card:hover .idx { color: var(--accent); }

/* Icon sits in the top-right corner, small and unboxed. */
.ic { position: absolute; top: 30px; right: 26px; }
.ic svg {
  width: 22px; height: 22px; stroke: var(--ink-3); stroke-width: 1.8;
  transition: stroke .25s ease;
}
.card:hover .ic svg { stroke: var(--accent-hi); }

.card h3 { margin: 0 0 10px; font-size: 1.14rem; font-weight: 700; letter-spacing: .002em; }
.card p { margin: 0; color: var(--ink-2); font-size: 14.6px; }

.ramp { display: flex; gap: 2px; margin-top: 18px; }
.ramp i { flex: 1; height: 4px; }
.ramp i:nth-child(1){background:var(--r1)} .ramp i:nth-child(2){background:var(--r2)}
.ramp i:nth-child(3){background:var(--r3)} .ramp i:nth-child(4){background:var(--r4)}
.ramp i:nth-child(5){background:var(--r5)} .ramp i:nth-child(6){background:var(--r6)}
.ramp i:nth-child(7){background:var(--r7)} .ramp i:nth-child(8){background:var(--r8)}
.ramp i:nth-child(9){background:var(--r9)}

/* ---------------------------------------------------------------- steps */

/* A flow, not three stacked rules. The top borders were saying "sequence" at
   the same time as the numbers were, and the red one on the first step read as
   an error marker. Now the panels are neutral and a chevron in each gap does
   the sequencing, which is the one job it can do unambiguously. */
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 52px;
}
.step {
  position: relative; padding: 26px 26px 28px;
  border: 1px solid var(--panel-brd); border-radius: var(--radius-lg);
  background: rgba(255,255,255,.014);
  transition: background .25s ease, border-color .25s ease;
}
.step:hover { background: rgba(255,255,255,.032); border-color: var(--panel-brd-hi); }

/* Chevron sitting in the gap, pointing at the next step. */
.step::after {
  content: ""; position: absolute; top: 50%; right: -34px;
  width: 11px; height: 11px; margin-top: -7px;
  border-top: 2px solid var(--accent); border-right: 2px solid var(--accent);
  transform: rotate(45deg); opacity: .9;
}
.step:last-child::after { display: none; }

.num {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; margin: 0 0 18px;
  border: 1px solid rgba(236,51,57,.42); border-radius: var(--radius);
  color: var(--accent); font: 700 15px/1 var(--mono); letter-spacing: .02em;
}
.step h3 { margin: 0 0 9px; font-size: 1.06rem; font-weight: 700; letter-spacing: -.015em; }
.step p { margin: 0; color: var(--ink-2); font-size: 14.6px; }

/* --------------------------------------------------------------- safety */

.safety { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.sfeat {
  padding: 24px 26px 26px; border: 1px solid var(--panel-brd);
  border-radius: var(--radius-lg); background: rgba(255,255,255,.014);
  border-left: 2px solid var(--accent);
  transition: background .25s ease;
}
.sfeat:hover { background: rgba(255,255,255,.032); }
.sfeat h3 { margin: 0 0 8px; font-size: 1.01rem; font-weight: 700; letter-spacing: -.012em; }
.sfeat p { margin: 0; color: var(--ink-2); font-size: 14.5px; }

.note {
  margin: 32px 0 0; padding: 20px 22px; border-radius: var(--radius);
  background: rgba(250,178,25,.06); border: 1px solid rgba(250,178,25,.24);
  color: var(--ink-2); font-size: 14.3px;
}
.note strong { color: var(--ink); }

/* ------------------------------------------------------------- download */

.download { text-align: center; }
.dl-box {
  position: relative; max-width: 660px; margin: 0 auto;
  padding: 54px 44px 46px;
  border: 1px solid rgba(236,51,57,.26); border-radius: var(--radius-lg);
  background: rgba(255,255,255,.018);
}
.dl-mark { width: 54px; margin: 0 auto 22px; }
.dl-box h2 {
  margin: 0 0 12px; font-size: clamp(1.75rem, 3.7vw, 2.4rem);
  letter-spacing: -.006em; font-weight: 700;
}
.dl-sub { margin: 0 auto 32px; max-width: 420px; color: var(--ink-2); font-size: .99rem; }
.dl-meta {
  margin: 18px 0 0; color: var(--ink-3);
  font: 12.4px/1.6 var(--mono); letter-spacing: .02em; min-height: 20px;
}
.dl-meta.err { color: var(--accent-hi); }
.dl-alt { margin: 26px 0 0; color: var(--ink-3); font-size: 13.4px; }
.dl-alt a { color: var(--ink-2); }
.dl-alt a:hover { color: var(--accent-hi); }

/* ------------------------------------------------------------------ faq */

.faq { display: flex; flex-direction: column; }
.faq details {
  border-top: 1px solid var(--panel-brd);
  transition: background .2s ease;
}
.faq details:last-child { border-bottom: 1px solid var(--panel-brd); }
.faq details[open] { background: rgba(255,255,255,.02); }
/* Lighter wash on hover, so a closed row reacts before you click it. */
.faq details:hover { background: rgba(255,255,255,.035); }
.faq details[open]:hover { background: rgba(255,255,255,.045); }
.faq summary {
  /* Left padding so the +/- is inset from the edge of the hover wash instead
     of sitting flush against it. */
  padding: 20px 22px 20px 22px; cursor: pointer; font-weight: 600; font-size: 15.3px;
  list-style: none; display: flex; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
/* A real disclosure chevron from the icon set, in place of a typed +/- glyph.
   It points right when closed and rotates down on open, so one drawing does
   both states instead of swapping characters. */
.fq-i {
  flex: none; width: 18px; height: 18px; stroke: var(--accent);
  transform: rotate(-90deg); transition: transform .24s cubic-bezier(.22,.61,.36,1);
}
.faq details[open] .fq-i { transform: rotate(0deg); }
.faq details p {
  margin: 0; padding: 0 22px 22px 56px; color: var(--ink-2); font-size: 14.7px;
}

/* --------------------------------------------------------------- footer */

.foot {
  border-top: 1px solid var(--panel-brd); background: var(--bg-deep);
  padding: 68px 0 0;
}
.foot-in { display: grid; grid-template-columns: 1.15fr 2fr; gap: 52px; }
.foot-logo { width: 186px; margin-bottom: 18px; }
.foot-brand p { margin: 0; color: var(--ink-3); font-size: 13.7px; line-height: 1.65; }

.foot-cols { display: grid; grid-template-columns: 1fr 1fr 1.5fr; gap: 32px; }
/* White, per the brief — these were grey and read as disabled. */
.foot-cols h4 {
  margin: 0 0 15px; color: var(--ink);
  font: 700 11.5px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase;
}
.foot-cols a { display: block; margin-bottom: 10px; color: var(--ink-2); font-size: 14.3px; }
.foot-cols a:hover { color: var(--accent-hi); text-decoration: none; }
.foot-support p { margin: 0 0 16px; color: var(--ink-3); font-size: 13.7px; }

/* Ko-fi. A stroked cup at 18px read as thin and undersized against a solid red
   fill, so the mark is filled now — at this size a solid shape holds far better
   than hairlines. The cup's visual mass sits low in its box, so a hair of
   optical lift centres it against the cap-height of the label rather than
   against the label's full line box. */
/* Written as `.foot-cols a.kofi`, not `.kofi`, and that is the whole fix.
   `.foot-cols a` sets display:block and scores (0,1,1) — a class plus an
   element — while a bare `.kofi` scores only (0,1,0), so the block won and the
   button was never a flex container at all. align-items, justify-content and
   gap were all inert, which dropped the icon onto the text baseline instead of
   centring it. Matching the element in the selector takes it to (0,2,1). */
.foot-cols a.kofi {
  display: inline-flex; align-items: center; justify-content: center; gap: 11px;
  margin-bottom: 0;                     /* .foot-cols a adds 10px; not wanted here */
  padding: 13px 24px; border-radius: var(--radius);
  background: var(--accent); color: #fff;
  font: 700 14.5px/1 var(--display); letter-spacing: .015em;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.foot-cols a.kofi:hover {
  transform: translateY(-2px); text-decoration: none; background: #f4404a;
  box-shadow: 0 8px 24px rgba(236,51,57,.4);
}
.foot-cols a.kofi span { display: inline-block; line-height: 1; }
/* Tabler's coffee cup: its ink sits low in the box (steam starts at y=3, cup
   bottom at y=21), so a small lift optically centres it against the label. */
.kofi-i { width: 21px; height: 21px; flex: none; transform: translateY(-1px); }

.foot-bar {
  margin-top: 58px; padding-top: 24px; padding-bottom: 30px;
  border-top: 1px solid var(--panel-brd);
  text-align: center; color: var(--ink-3); font-size: 13.1px;
}

/* ---------------------------------------------------------- back to top */

.to-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 55;
  width: 46px; height: 46px; padding: 0; display: grid; place-items: center;
  border-radius: 50%; cursor: pointer;
  background: rgba(20,20,23,.86); border: 1px solid rgba(236,51,57,.4);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  opacity: 0; visibility: hidden; transform: translateY(12px) scale(.9);
  transition: opacity .28s ease, transform .28s ease, visibility .28s,
              background .2s ease, border-color .2s ease;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--accent); border-color: var(--accent); }
.to-top svg { width: 19px; height: 19px; stroke: var(--ink); }
.to-top:hover svg { stroke: #fff; }

/* -------------------------------------------------------- reveal on scroll */

.reveal {
  opacity: 0; transform: translateY(20px);
  transition: opacity .7s cubic-bezier(.22,.61,.36,1),
              transform .7s cubic-bezier(.22,.61,.36,1);
}
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: .08s; }
.reveal[data-d="2"] { transition-delay: .16s; }
.reveal[data-d="3"] { transition-delay: .24s; }
.reveal[data-d="4"] { transition-delay: .32s; }
.reveal[data-d="5"] { transition-delay: .40s; }
.reveal[data-d="6"] { transition-delay: .48s; }

/* ---------------------------------------------------------------- mobile */

@media (max-width: 1000px) {
  /* minmax(0,1fr), not 1fr: a grid track defaults to min-width:auto, and the
     monospace <pre> in the log refuses to shrink below its content, which
     pushes the whole column past the viewport. */
  .hero-in { grid-template-columns: minmax(0,1fr); gap: 48px; }
  .lede { max-width: none; }
  .cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 940px) {
  .split, .steps, .safety { grid-template-columns: 1fr; }
  /* Stacked, so the chevron turns to point down the column instead of off
     the right-hand edge into nothing. */
  .steps { gap: 44px; }
  .step::after {
    top: auto; right: auto; bottom: -30px; left: 50%;
    margin: 0 0 0 -6px; transform: rotate(135deg);
  }

  /* Footer centres once it stacks. Left-aligned columns under a centred page
     read as debris. */
  .foot-in { grid-template-columns: 1fr; gap: 38px; text-align: center; }
  .foot-logo { margin-left: auto; margin-right: auto; }
  .foot-cols { grid-template-columns: 1fr 1fr; text-align: center; }
  .foot-support { display: flex; flex-direction: column; align-items: center; }
  .foot-bar { margin-top: 44px; }
}

/* The bar runs out of room before the layout does: brand + four links + GitHub
   + Download needs ~730px, so it is swapped for the burger well before the
   content columns collapse. */
@media (max-width: 860px) {
  .nav-burger { display: flex; }
  .nav-cta { display: none; }

  .nav-links {
    position: fixed; inset: var(--nav-h) 0 auto 0;
    flex-direction: column; gap: 0; margin: 0; padding: 10px 24px 22px;
    max-height: calc(100vh - var(--nav-h)); overflow-y: auto;
    background: rgba(10,10,12,.97);
    backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--panel-brd);
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: opacity .22s ease, transform .22s ease;
  }
  .nav-links.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a {
    padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.05); font-size: 16px;
  }
  .nav-links a::after { display: none; }
}

@media (max-width: 760px) {
  .band { padding: 78px 0; }
  .hero { padding: calc(var(--nav-h) + 52px) 0 76px; }
  .cards { grid-template-columns: 1fr; }

  .device { padding: 28px 18px 20px; }
  .dv-label { left: 18px; }
  .dl-box { padding: 40px 22px 36px; }
  .btn-xl { padding: 15px 24px; font-size: 15px; width: 100%; }
  .to-top { right: 16px; bottom: 16px; width: 42px; height: 42px; }
  .term-body { font-size: 10.4px; }
  .faq details p { padding-left: 22px; }
}

@media (max-width: 560px) {
  .wrap, .nav-in { padding-left: 18px; padding-right: 18px; }
  .band { padding: 64px 0; }
  /* nowrap on the labels means these cannot share a row on a narrow screen. */
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; }
  .foot-cols { grid-template-columns: 1fr; gap: 30px; }
  .step { padding: 24px 20px 26px; }
  .compare { padding: 24px 20px 26px; }
  .sfeat { padding: 22px 20px 24px; }
  .card { padding: 30px 22px 28px; }
  .ic { right: 20px; }
  .dl-alt { line-height: 2; }
}

/* ------------------------------------------------------- reduced motion */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
