/* ==========================================================================
   Chipwright — chipwright.dev
   Palette: teal is the only accent. Every neutral carries a slight cyan cast,
   the way a board reads under light.
   ========================================================================== */

:root {
  /* brand */
  --teal:       #17a2b0;
  --teal-lit:   #1fbccb;
  --ink:        #161616;

  /* type */
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body:    "Instrument Sans", "Archivo", system-ui, -apple-system, sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* rhythm */
  --wrap: 1240px;
  --gut: clamp(20px, 5vw, 56px);
  --sec-y: clamp(80px, 9.5vw, 142px);
  --r: 4px;

  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* dark only */
:root {
  --bg:        #0a0e0f;
  --bg-2:      #0d1213;
  --surface:   #101617;
  --surface-2: #131b1c;
  --line:      #1d2728;
  --line-2:    #273334;
  --fg:        #e6eded;
  --fg-2:      #9fb0b1;
  --fg-3:      #6a7c7d;
  --accent:    var(--teal-lit);
  --accent-dim:#0f6b75;
  --on-accent: #05191b;
  --glow:      rgba(31, 188, 203, .16);
  --trace:     #2f4547;
  --shadow:    0 24px 60px -24px rgba(0, 0, 0, .8);
}


/* ── base ───────────────────────────────────────────────────────────────── */

*, *::before, *::after { 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: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: var(--accent); color: var(--on-accent); }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: var(--on-accent);
  padding: 10px 16px; font: 500 14px/1 var(--mono);
}
.skip:focus { left: 12px; top: 12px; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gut);
}

/* ── type ───────────────────────────────────────────────────────────────── */

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  font-stretch: 108%;
  letter-spacing: -.022em;
  line-height: 1.06;
  margin: 0;
  text-wrap: balance;
}

.display {
  font-size: clamp(2.05rem, 5vw, 4.15rem);
  font-stretch: 112%;
  max-width: 21ch;
  margin-bottom: .5em;
}
.display em {
  font-style: normal;
  color: var(--fg-2);
  display: block;
}

.display-sm { font-size: clamp(2rem, 4.2vw, 3.1rem); }

h2 { font-size: clamp(1.75rem, 3.3vw, 2.7rem); max-width: 20ch; }
h3 { font-size: 1.2rem; font-stretch: 104%; letter-spacing: -.012em; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

.lede {
  font-size: clamp(1.05rem, 1.5vw, 1.28rem);
  line-height: 1.55;
  color: var(--fg-2);
  max-width: 60ch;
  margin-bottom: 2.2rem;
}

code, pre, .mono { font-family: var(--mono); font-variant-ligatures: none; }

.sec-copy code {
  font-size: .88em;
  color: var(--accent);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: .08em .34em;
}

/* eyebrows carry the layer of the stack a feature lives in */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font: 500 12px/1 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin: 0 0 1.4rem;
  flex-wrap: wrap;
}
.eyebrow .layer {
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  border-radius: 2px;
  padding: 5px 9px 4px;
}

/* ── buttons ────────────────────────────────────────────────────────────── */

.btn {
  --btn-y: 13px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: var(--btn-y) 22px;
  border-radius: var(--r);
  border: 1px solid transparent;
  font: 500 15px/1 var(--body);
  letter-spacing: -.005em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background .18s var(--ease), border-color .18s var(--ease),
              color .18s var(--ease), transform .18s var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
}
.btn-primary:hover { background: var(--teal-lit); }

.btn-ghost {
  border-color: var(--line-2);
  color: var(--fg);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-sm { --btn-y: 9px; padding-inline: 16px; font-size: 14px; }
.btn-lg { --btn-y: 16px; padding-inline: 28px; font-size: 16px; }

.arr { width: 15px; height: 15px; flex: none; transition: transform .18s var(--ease); }
.btn:hover .arr { transform: translateX(3px); }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.cta-row.center-row { justify-content: center; }

.cta-note {
  margin-top: 1.1rem;
  font-size: 14px;
  color: var(--fg-3);
}

/* ── nav ────────────────────────────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.nav.stuck { border-bottom-color: var(--line); }

.nav-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 66px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--fg);
  flex: none;
}
.mark { width: 74px; height: auto; color: var(--fg); }
.mark-knockout { fill: var(--bg); }
.wordmark {
  font-family: var(--display);
  font-weight: 700;
  font-stretch: 106%;
  font-size: 19px;
  letter-spacing: -.028em;
  transform: translateY(3px);
}

.nav-links {
  display: flex;
  gap: 26px;
  margin-inline: auto;
  font-size: 14.5px;
  color: var(--fg-2);
}
.nav-links a { text-decoration: none; transition: color .15s var(--ease); }
.nav-links a:hover { color: var(--fg); }

.nav-actions { display: flex; align-items: center; gap: 12px; flex: none; }


/* ── hero ───────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  padding-top: clamp(64px, 9vw, 128px);
  padding-bottom: clamp(72px, 9vw, 130px);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -30% 20% auto -10%;
  height: 620px;
  background: radial-gradient(50% 50% at 30% 50%, var(--glow), transparent 70%);
  pointer-events: none;
}
.hero > .wrap { position: relative; }

.hero .lede { max-width: 54ch; }

/* signature: definition on the left, traces fanning out to what it produces */

.fanout-wrap { margin-top: clamp(48px, 5vw, 68px); }

.fanout {
  display: flex;
  align-items: center;
  gap: 0;
}

.manifest {
  flex: 1 1 460px;
  min-width: 0;
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  position: relative;
  z-index: 2;
}

.traces {
  flex: 0 1 auto;
  display: flex;
  align-items: center;
  margin-left: -1px;
}

.trace-svg { width: 430px; height: 420px; flex: none; }

.trace-lines path {
  stroke: var(--trace);
  stroke-width: 1.5;
}
.trace-pins rect { fill: var(--trace); }
.trace-pads circle {
  fill: var(--bg);
  stroke: var(--trace);
  stroke-width: 1.5;
}

/* drawn-in on load, then still */
.traces.armed .trace-lines path {
  stroke: var(--accent);
  stroke-dasharray: var(--len);
  stroke-dashoffset: var(--len);
  animation: route .9s var(--ease) forwards;
  animation-delay: calc(var(--i) * 90ms);
}
.traces.armed .trace-pads circle {
  opacity: 0;
  animation: land .4s var(--ease) forwards;
  animation-delay: calc(var(--i) * 90ms + 800ms);
}
@keyframes route {
  to { stroke-dashoffset: 0; stroke: var(--trace); }
}
@keyframes land {
  from { opacity: 0; r: 2; }
  to   { opacity: 1; r: 5.5; }
}

.artifacts {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1 1 auto;
  min-width: 210px;
}
.artifacts li {
  height: 70px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 16px;
  border-bottom: 1px solid transparent;
}
.artifacts .pad { display: none; }
.artifacts .a-name {
  font-size: 15.5px;
  flex: 1 1 auto;
  color: var(--fg);
  letter-spacing: -.01em;
}
.artifacts .a-kind {
  font: 400 11px/1 var(--mono);
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--fg-3);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 4px 6px 3px;
}

.traces li.lit .a-name { color: var(--accent); }

/* ── panels and code ────────────────────────────────────────────────────── */

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  font: 500 11.5px/1 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.panel-name { color: var(--fg-2); }
.panel-note { color: var(--fg-3); }

.code {
  margin: 0;
  padding: 20px 18px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.75;
  color: var(--fg-2);
  tab-size: 2;
}
.code .k  { color: var(--fg); }
.code .s  { color: var(--accent); }
.code .n  { color: var(--accent); }
.code .cm { color: var(--fg-3); }
.code .add { color: var(--accent); }

.diff { font-size: 13.5px; }

.panel-foot {
  padding: 13px 16px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  font: 400 12.5px/1.4 var(--mono);
  color: var(--fg-2);
  display: flex;
  align-items: center;
  gap: 10px;
}
.pad {
  width: 7px; height: 7px; flex: none;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.copy {
  background: transparent;
  border: 1px solid var(--line-2);
  border-radius: 2px;
  color: var(--fg-3);
  font: 500 11px/1 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 5px 9px 4px;
  cursor: pointer;
  transition: color .15s var(--ease), border-color .15s var(--ease);
}
.copy:hover { color: var(--accent); border-color: var(--accent); }

/* ── band ───────────────────────────────────────────────────────────────── */

.band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
  padding-block: clamp(40px, 5vw, 62px);
}
.band-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: clamp(16px, 4vw, 56px);
}
.band-line {
  font-family: var(--display);
  font-weight: 700;
  font-stretch: 110%;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  letter-spacing: -.025em;
  margin: 0;
  flex: none;
}
.band-sub {
  margin: 0;
  color: var(--fg-2);
  max-width: 52ch;
  font-size: 15.5px;
}

/* ── sections ───────────────────────────────────────────────────────────── */

.sec { padding-block: var(--sec-y); }
.sec-alt { background: var(--bg-2); border-block: 1px solid var(--line); }

.sec-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: clamp(40px, 6vw, 92px);
  align-items: center;
}
.sec-grid-flip .sec-copy { order: 2; }
.sec-grid-flip .sec-art  { order: 1; }

.sec-copy h2 { margin-bottom: 1.1rem; }
.sec-copy p { color: var(--fg-2); max-width: 46ch; font-size: 16.5px; }

.ticks {
  list-style: none;
  margin: 1.8rem 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.ticks li {
  padding: 13px 0 13px 26px;
  border-bottom: 1px solid var(--line);
  position: relative;
  font-size: 15px;
  color: var(--fg-2);
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 2px; top: 50%;
  width: 9px; height: 9px;
  margin-top: -4px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
}

.sec-head { margin-bottom: clamp(36px, 4.5vw, 60px); max-width: 62ch; }
.sec-head h2 { margin-bottom: .8rem; }
.sec-head-sub { color: var(--fg-2); max-width: 56ch; font-size: 16.5px; }
.sec-head.center { margin-inline: auto; text-align: center; }
.sec-head.center h2 { max-width: none; }
.sec-head.center .sec-head-sub { margin-inline: auto; margin-bottom: 2rem; }

.art-note {
  margin-top: 14px;
  font: 400 12.5px/1.5 var(--mono);
  color: var(--fg-3);
}

/* file tree */
.tree {
  list-style: none;
  margin: 0;
  padding: 18px 18px 20px;
  font: 400 13px/1 var(--mono);
}
.tree li { padding: 7px 0; color: var(--fg-2); }
.tree .dir { color: var(--fg); }
.tree .ind { padding-left: 20px; color: var(--fg-3); }
.tree .f { color: var(--accent); }
.tree .t-note {
  margin-left: 8px;
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--fg-3);
}

/* checks plate */
.checks {
  list-style: none;
  margin: 0;
  padding: 6px 18px 10px;
}
.checks li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  color: var(--fg-2);
}
.checks li:last-child { border-bottom: 0; }

/* ── twin ───────────────────────────────────────────────────────────────── */

.twin-readout {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 20px 8px;
}
.twin-value { display: flex; align-items: baseline; gap: 4px; }
.tv-num {
  font-family: var(--display);
  font-weight: 700;
  font-stretch: 100%;
  font-size: clamp(2.6rem, 5vw, 3.6rem);
  line-height: .9;
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
  color: var(--fg);
}
.tv-unit { font-family: var(--display); font-size: 1.2rem; color: var(--fg-3); }
.twin-meta { text-align: right; font: 400 11.5px/1.7 var(--mono); letter-spacing: .06em; }
.twin-meta .k { display: block; color: var(--fg-3); }
.twin-meta .v { display: block; color: var(--accent); text-transform: uppercase; letter-spacing: .12em; }

.twin.faulted .twin-meta .v { color: var(--fg-3); }
.twin.faulted .tv-num { color: var(--fg-2); }

.twin-chart { width: 100%; height: 168px; padding: 0; }
.twin-chart .grid line { stroke: var(--line); stroke-width: 1; }
.twin-line { stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.twin-true { stroke: var(--trace); stroke-width: 1.25; stroke-dasharray: 2 4; }
.twin.faulted .twin-line { stroke: var(--fg-3); }

.twin-legend { display: none; }
.twin.faulted .twin-legend { display: inline; }

.twin-axis {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 20px 0;
  font: 400 10.5px/1 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.twin-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  padding: 20px;
  margin-top: 14px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}
.ctl { display: flex; align-items: center; gap: 11px; }
.ctl-label {
  font: 400 11px/1 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.seg {
  display: flex;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--surface);
}
.seg button {
  appearance: none;
  background: transparent;
  border: 0;
  border-right: 1px solid var(--line);
  color: var(--fg-2);
  font: 400 12px/1 var(--mono);
  padding: 9px 12px;
  cursor: pointer;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.seg button:last-child { border-right: 0; }
.seg button:hover { color: var(--fg); background: var(--surface-2); }
.seg button.on { background: var(--accent); color: var(--on-accent); }

/* provider marks: nominative use, kept quiet so teal stays the only accent */

.providers {
  margin-top: 1.9rem;
  padding-top: 1.3rem;
  border-top: 1px solid var(--line);
}
.p-k {
  margin: 0 0 14px;
  font: 500 11px/1 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.providers ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 26px;
}
.providers li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14.5px;
  color: var(--fg-2);
  transition: color .18s var(--ease);
}
.providers li:hover { color: var(--fg); }
.p-mark {
  width: 19px;
  height: 19px;
  flex: none;
  color: var(--fg-3);
  transition: color .18s var(--ease);
}
.providers li:hover .p-mark { color: var(--accent); }

@media (max-width: 620px) {
  .providers ul { gap: 12px 20px; }
  .providers li { font-size: 14px; }
}

/* ── cloud split ────────────────────────────────────────────────────────── */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

.spec dl { margin: 0; border-top: 1px solid var(--line); }
.spec dl > div {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 20px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}
.spec dt {
  font: 500 11.5px/1.5 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
}
.spec dd { margin: 0; color: var(--fg-2); font-size: 15.5px; line-height: 1.5; }

.steps {
  list-style: none;
  counter-reset: s;
  margin: 0;
  padding: 8px 20px 14px;
}
.steps li {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 16px;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.steps li:last-child { border-bottom: 0; }
.s-n {
  font: 500 11.5px/1.6 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
}
.s-t { color: var(--fg-2); font-size: 15px; line-height: 1.5; }

/* ── duo cards ──────────────────────────────────────────────────────────── */

.duo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(20px, 2.5vw, 32px);
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 30px 28px 32px;
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.card h3 { margin-bottom: .7rem; }
.card p { color: var(--fg-2); font-size: 15.5px; margin: 0; }

/* ── install ────────────────────────────────────────────────────────────── */

.install .routes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  margin-top: clamp(40px, 5vw, 64px);
}
.route {
  background: var(--bg);
  padding: 24px 22px 26px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 15px;
  color: var(--fg-2);
}
.r-k {
  font: 500 11px/1 var(--mono);
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.route a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-dim);
  align-self: flex-start;
  transition: border-color .15s var(--ease);
}
.route a:hover { border-bottom-color: var(--accent); }

.quickstart { margin: 22px auto 0; max-width: 660px; }

/* ── footer as a drawing title block ────────────────────────────────────── */

.foot {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  padding-block: clamp(48px, 6vw, 80px) 40px;
}


.foot-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 28px;
}
.foot-links nav { display: flex; flex-direction: column; gap: 9px; align-items: flex-start; }
.fl-k {
  font: 500 10.5px/1 var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 3px;
}
.foot-links a {
  font-size: 14.5px;
  color: var(--fg-2);
  text-decoration: none;
  transition: color .15s var(--ease);
}
.foot-links a:hover { color: var(--accent); }

.colophon {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 28px;
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font: 400 11.5px/1.5 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.colophon a {
  color: var(--fg-2);
  text-decoration: none;
  border-bottom: 1px solid var(--line-2);
  transition: color .15s var(--ease), border-color .15s var(--ease);
}
.colophon a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ── reveal on load and on scroll ───────────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: rise .7s var(--ease) forwards;
  animation-delay: var(--d, 0ms);
}
@keyframes rise { to { opacity: 1; transform: none; } }

/* ── responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 1180px) {
  .trace-svg { display: none; }
  .traces { margin-left: 0; flex: 1 1 300px; }
  .artifacts { border-left: 1px solid var(--line); }
  .artifacts li {
    height: auto;
    padding: 16px 16px 16px 20px;
    gap: 12px;
    border-bottom: 1px solid var(--line);
  }
  .artifacts li:last-child { border-bottom: 0; }
  .artifacts .pad { display: block; }
}

@media (max-width: 480px) {
  .nav-inner { gap: 16px; }
  .brand { gap: 9px; }
  .mark { width: 58px; }
  .wordmark { font-size: 17px; }
  .nav-actions .btn-sm { font-size: 13px; padding-inline: 14px; }
}

@media (max-width: 940px) {
  .nav-links { display: none; }
  .fanout { flex-direction: column; align-items: stretch; gap: 0; }
  .manifest {
    flex: 0 0 auto;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }
  .traces { margin-top: -1px; }
  .artifacts {
    border: 1px solid var(--line);
    border-radius: 0 0 var(--r) var(--r);
    background: var(--surface-2);
    min-width: 0;
  }
  .artifacts li { padding-left: 22px; padding-right: 16px; }

  .sec-grid { grid-template-columns: minmax(0, 1fr); }
  .sec-grid-flip .sec-copy { order: 1; }
  .sec-grid-flip .sec-art  { order: 2; }
  .split { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .band-inner { flex-direction: column; gap: 12px; }
  .spec dl > div { grid-template-columns: minmax(0, 1fr); gap: 5px; }
  .steps li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .twin-controls { flex-direction: column; align-items: flex-start; }
  .seg { flex-wrap: wrap; }
  .code { font-size: 10.8px; padding: 16px 14px; }
  .btn { width: 100%; justify-content: center; }
  .cta-row { flex-direction: column; align-items: stretch; }
  .nav-actions .btn { width: auto; }
}

/* ── motion preferences ─────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .traces.armed .trace-lines path { stroke-dashoffset: 0; stroke: var(--trace); }
  .traces.armed .trace-pads circle { opacity: 1; }
}
