/* Weave website. No build step, no third-party requests.
   Palette: ink and paper, with three dye colours used for the three kinds of thread. */

@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/instrument-serif-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/instrument-serif-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("../fonts/geist-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/geist-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0d0c0b;
  --bg-2: #141311;
  --bg-3: #1b1917;
  --line: #2b2824;
  --line-2: #3a362f;
  --text: #f0eadf;
  --muted: #a8a093;
  --faint: #7d766a;
  --madder: #ff6a45;
  --indigo: #86a3ff;
  --weld: #ecbc4e;
  --moss: #86d392;
  --madder-soft: rgba(255, 106, 69, 0.13);
  --indigo-soft: rgba(134, 163, 255, 0.13);
  --weld-soft: rgba(236, 188, 78, 0.13);
  --moss-soft: rgba(134, 211, 146, 0.13);
  --on-accent: #1a0c06;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
  --weave-a: rgba(255, 255, 255, 0.025);
  --weave-b: rgba(255, 255, 255, 0.012);

  --serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;

  --wrap: 1280px;
  --gutter: clamp(20px, 4vw, 40px);
  --radius: 8px;
  --radius-sm: 5px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f1e8;
  --bg-2: #efe9dd;
  --bg-3: #fffcf6;
  --line: #ddd4c4;
  --line-2: #c9bfad;
  --text: #1b1815;
  --muted: #5c554a;
  --faint: #7b7366;
  --madder: #c93a17;
  --indigo: #2f4fc4;
  --weld: #8f6400;
  --moss: #2a7438;
  --madder-soft: rgba(201, 58, 23, 0.1);
  --indigo-soft: rgba(47, 79, 196, 0.09);
  --weld-soft: rgba(143, 100, 0, 0.11);
  --moss-soft: rgba(42, 116, 56, 0.1);
  --on-accent: #fff8f3;
  --shadow: 0 30px 70px -35px rgba(60, 40, 10, 0.35);
  --weave-a: rgba(0, 0, 0, 0.03);
  --weave-b: rgba(0, 0, 0, 0.015);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
/* A faint plain-weave texture behind everything. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: repeating-linear-gradient(0deg, var(--weave-a) 0 1px, transparent 1px 7px),
    repeating-linear-gradient(90deg, var(--weave-b) 0 1px, transparent 1px 7px);
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 30%, transparent 100%);
}
img,
svg {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
  text-decoration-color: var(--line-2);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
a:hover {
  text-decoration-color: currentColor;
}
:focus-visible {
  outline: 2px solid var(--indigo);
  outline-offset: 3px;
  border-radius: 4px;
}
::selection {
  background: var(--madder);
  color: var(--on-accent);
}
h1,
h2,
h3,
h4,
p,
ul,
ol,
figure,
pre,
dl,
dd {
  margin: 0;
}
ul,
ol {
  padding: 0;
  list-style: none;
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
code,
kbd,
pre {
  font-family: var(--mono);
  font-size: 0.9em;
}
:not(pre) > code {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.08em 0.38em;
  overflow-wrap: anywhere;
}
.wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--text);
  color: var(--bg);
  padding: 10px 14px;
  border-radius: 5px;
  text-decoration: none;
}
.skip:focus {
  top: 12px;
}

/* ---------- type ---------- */
.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.9rem, 7.4vw, 6.1rem);
  line-height: 0.98;
  letter-spacing: -0.022em;
  text-wrap: balance;
}
.display em,
.h2 em {
  font-style: italic;
  color: var(--madder);
}
.h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.1rem, 4.6vw, 3.7rem);
  line-height: 1.04;
  letter-spacing: -0.018em;
  text-wrap: balance;
}
.h3 {
  font-size: 1.16rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.lede {
  font-size: clamp(1.08rem, 1.5vw, 1.3rem);
  color: var(--muted);
  line-height: 1.55;
  max-width: 62ch;
  text-wrap: pretty;
}
.lede strong,
.prose strong {
  color: var(--text);
  font-weight: 550;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--faint);
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow b {
  color: var(--madder);
  font-weight: 500;
}
.eyebrow::after {
  content: "";
  height: 1px;
  flex: 0 0 44px;
  background: var(--line-2);
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 0.88rem;
}
.mono {
  font-family: var(--mono);
}
.c-madder {
  color: var(--madder);
}
.c-indigo {
  color: var(--indigo);
}
.c-weld {
  color: var(--weld);
}
.c-moss {
  color: var(--moss);
}

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.nav.is-stuck {
  border-bottom-color: var(--line);
}
.nav__in {
  display: flex;
  align-items: center;
  gap: 22px;
  height: 66px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 1.08rem;
}
.brand svg {
  width: 26px;
  height: 26px;
}
.brand small {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 0.7rem;
  color: var(--faint);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 1px 7px;
}
.nav__links {
  display: flex;
  gap: 4px;
  margin-left: auto;
  align-items: center;
}
.nav__links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.93rem;
  padding: 7px 11px;
  border-radius: 5px;
  transition: color 0.2s, background 0.2s;
}
.nav__links a:hover,
.nav__links a[aria-current="page"] {
  color: var(--text);
  background: var(--bg-3);
}
.icon-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  color: var(--muted);
  border: 1px solid var(--line);
  transition: color 0.2s, border-color 0.2s;
}
.icon-btn:hover {
  color: var(--text);
  border-color: var(--line-2);
}
.icon-btn svg {
  width: 17px;
  height: 17px;
}
:root[data-theme="light"] .i-moon,
:root:not([data-theme="light"]) .i-sun {
  display: none;
}
@media (max-width: 760px) {
  .nav__links .hide-s {
    display: none;
  }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-weight: 550;
  font-size: 0.97rem;
  padding: 12px 18px;
  border-radius: 5px;
  text-decoration: none;
  border: 1px solid var(--line-2);
  transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s, color 0.2s;
  white-space: nowrap;
}
.btn:hover {
  transform: translateY(-1px);
  border-color: var(--faint);
}
.btn svg {
  width: 17px;
  height: 17px;
}
.btn--primary {
  background: var(--madder);
  border-color: var(--madder);
  color: var(--on-accent);
}
.btn--primary:hover {
  border-color: var(--madder);
  filter: brightness(1.07);
}
.btn--sm {
  padding: 8px 13px;
  font-size: 0.9rem;
  border-radius: 5px;
}

/* copyable command */
.cmd {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  font-family: var(--mono);
  font-size: 0.93rem;
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  border-radius: 5px;
  padding: 12px 12px 12px 16px;
  text-align: left;
  transition: border-color 0.2s;
  position: relative;
}
.cmd:hover {
  border-color: var(--faint);
}
.cmd__p {
  color: var(--madder);
  user-select: none;
}
.cmd__t {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}
.cmd__t::-webkit-scrollbar {
  display: none;
}
.cmd__c {
  flex: none;
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 4px 9px;
  min-width: 58px;
  text-align: center;
}
.cmd.is-copied .cmd__c {
  color: var(--moss);
  border-color: var(--moss);
}

/* ---------- hero ---------- */
.hero {
  padding: clamp(46px, 8vw, 96px) 0 clamp(50px, 7vw, 90px);
}
.hero__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 26px;
  max-width: 980px;
}
.hero__cta {
  display: grid;
  grid-template-columns: minmax(0, 430px) auto auto;
  gap: 12px;
  align-items: center;
  margin-top: 8px;
}
@media (max-width: 860px) {
  .hero__cta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hero__cta .cmd {
    grid-column: 1 / -1;
  }
}
@media (max-width: 440px) {
  .hero__cta {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero__cta .cmd {
    grid-column: auto;
  }
}
.hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--faint);
}
.hero__facts b {
  color: var(--text);
  font-weight: 500;
}

/* the loom: evidence threads woven into a setup */
.loom {
  margin-top: clamp(40px, 6vw, 70px);
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(110px, 17vw, 230px) minmax(0, 1.08fr);
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  padding: clamp(18px, 3vw, 34px);
  box-shadow: var(--shadow);
}
.loom__label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 12px;
}
.loom__left,
.loom__right {
  min-width: 0;
}
.strands {
  display: grid;
  gap: 10px;
}
.strand {
  --c: var(--madder);
  --cs: var(--madder-soft);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 11px;
  align-items: baseline;
  padding: 10px 13px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-left: 2px solid var(--c);
  border-radius: 5px;
  font-size: 0.86rem;
  line-height: 1.4;
  opacity: 0.35;
  transform: translateX(-6px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), border-color 0.4s, background 0.4s;
}
.strand.is-on {
  opacity: 1;
  transform: none;
}
.strand.is-hot {
  background: var(--cs);
  border-color: var(--c);
}
.strand[data-dye="indigo"] {
  --c: var(--indigo);
  --cs: var(--indigo-soft);
}
.strand[data-dye="weld"] {
  --c: var(--weld);
  --cs: var(--weld-soft);
}
.strand[data-dye="faint"] {
  --c: var(--faint);
  --cs: var(--bg-2);
}
.strand[data-dye="moss"] {
  --c: var(--moss);
  --cs: var(--moss-soft);
}
.strand__k {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c);
  grid-column: 1 / -1;
}
.strand__q {
  grid-column: 1 / -1;
  color: var(--text);
  overflow-wrap: anywhere;
}
.strand__n {
  grid-column: 1 / -1;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--faint);
}
.loom__threads {
  align-self: stretch;
  position: relative;
  min-height: 300px;
}
.loom__threads svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.thread {
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  opacity: 0.22;
  transition: opacity 0.5s;
}
.thread.is-on {
  opacity: 1;
}
.thread--pulse {
  fill: none;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-dasharray: 14 400;
  stroke-dashoffset: 14;
  opacity: 0;
}
.thread--pulse.is-run {
  opacity: 1;
  animation: pulse 1.25s var(--ease) forwards;
}
@keyframes pulse {
  to {
    stroke-dashoffset: -400;
  }
}

.filecard {
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 0.82rem;
}
.filecard__bar {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.76rem;
}
.filecard__bar i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line-2);
}
.filecard__bar span:last-child {
  margin-left: auto;
  color: var(--faint);
}
.filecard__body {
  padding: 12px 0;
  line-height: 1.75;
}
.fl {
  display: block;
  padding: 0 14px 0 30px;
  position: relative;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border-left: 2px solid transparent;
  transition: background 0.5s, color 0.5s, opacity 0.5s, max-height 0.5s var(--ease);
}
.fl--dim {
  color: var(--faint);
}
.fl--add,
.fl--del {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
}
.fl--add.is-on,
.fl--del.is-on {
  max-height: 6em;
  opacity: 1;
}
.fl--add.is-on {
  background: var(--cs, var(--moss-soft));
  border-left-color: var(--c, var(--moss));
}
.fl--add.is-on::before {
  content: "+";
  position: absolute;
  left: 12px;
  color: var(--c, var(--moss));
}
.fl--del.is-on {
  color: var(--faint);
  text-decoration: line-through;
  text-decoration-color: var(--madder);
}
.fl--del.is-on::before {
  content: "−";
  position: absolute;
  left: 12px;
  color: var(--madder);
  text-decoration: none;
}
.fl[data-dye="madder"] {
  --c: var(--madder);
  --cs: var(--madder-soft);
}
.fl[data-dye="indigo"] {
  --c: var(--indigo);
  --cs: var(--indigo-soft);
}
.fl[data-dye="weld"] {
  --c: var(--weld);
  --cs: var(--weld-soft);
}
.outputs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 0.76rem;
  padding: 5px 10px;
  border-radius: 99px;
  border: 1px solid var(--line-2);
  color: var(--muted);
  background: var(--bg-3);
  transition: opacity 0.5s, transform 0.5s var(--ease), border-color 0.4s, color 0.4s;
}
.chip i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c, var(--faint));
}
.chip--out {
  opacity: 0.3;
}
.chip--out.is-on {
  opacity: 1;
  color: var(--text);
  border-color: var(--c);
}
.loom__foot {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  font-size: 0.84rem;
  color: var(--faint);
}
.loom__foot button {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 3px 10px;
}
.loom__foot button:hover {
  color: var(--text);
  border-color: var(--line-2);
}
@media (max-width: 900px) {
  .loom {
    grid-template-columns: 1fr;
  }
  .loom__threads {
    min-height: 0;
    height: 54px;
    margin: 6px 0;
  }
  .loom__threads svg {
    display: none;
  }
  .loom__threads::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 4px;
    bottom: 4px;
    width: 46px;
    transform: translateX(-50%);
    background: repeating-linear-gradient(90deg, var(--madder) 0 2px, transparent 2px 11px, var(--indigo) 11px 13px, transparent 13px 22px, var(--weld) 22px 24px, transparent 24px 33px, var(--moss) 33px 35px, transparent 35px 46px);
    opacity: 0.75;
  }
}

/* ---------- sections ---------- */
.section {
  padding: clamp(64px, 9vw, 128px) 0;
  border-top: 1px solid var(--line);
}
.section--tight {
  padding: clamp(48px, 6vw, 84px) 0;
}
.section__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  margin-bottom: clamp(34px, 5vw, 60px);
  max-width: 860px;
}
.grid {
  display: grid;
  gap: 16px;
}
.grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 900px) {
  .grid--3 {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .grid--2 {
    grid-template-columns: 1fr;
  }
}
.card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(20px, 2.4vw, 28px);
  display: grid;
  gap: 10px;
  align-content: start;
  min-width: 0;
}
.card p {
  color: var(--muted);
  font-size: 0.97rem;
}
.card p a {
  color: var(--text);
}
.card .stat__n.c-madder {
  color: var(--madder);
}
.card .stat__n.c-weld {
  color: var(--weld);
}
.card .stat__n.c-indigo {
  color: var(--indigo);
}

/* stats */
.card .stat__n {
  font-family: var(--serif);
  font-size: clamp(3rem, 6vw, 4.6rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--text);
}
.card .stat__src {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--faint);
  margin-top: 6px;
}
.card .stat__src a {
  color: var(--muted);
}

/* before / after */
.ba {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}
@media (max-width: 820px) {
  .ba {
    grid-template-columns: 1fr;
  }
}
.ba__col {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
  overflow: hidden;
  min-width: 0;
}
.ba__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--muted);
}
.ba__tag {
  padding: 2px 9px;
  border-radius: 99px;
  font-size: 0.7rem;
  white-space: nowrap;
}
.ba__tag--bad {
  background: var(--madder-soft);
  color: var(--madder);
}
.ba__tag--good {
  background: var(--moss-soft);
  color: var(--moss);
}
.ba pre {
  padding: 16px;
  font-size: 0.8rem;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--muted);
  max-height: 340px;
  overflow: auto;
}
.ba pre mark {
  background: var(--madder-soft);
  color: var(--text);
  border-radius: 3px;
  padding: 0 2px;
}
.ba pre .ok {
  color: var(--text);
}
.ba pre .note {
  color: var(--faint);
  font-style: italic;
}

/* ---------- how it works (tabs) ---------- */
.how {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(20px, 3vw, 44px);
  align-items: start;
}
@media (max-width: 940px) {
  .how {
    grid-template-columns: 1fr;
  }
}
.steps {
  display: grid;
  gap: 8px;
}
.step {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 2px 12px;
  text-align: left;
  width: 100%;
  padding: 16px 18px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  position: relative;
  transition: background 0.3s, border-color 0.3s;
}
.step:hover {
  background: var(--bg-2);
}
.step[aria-selected="true"] {
  background: var(--bg-2);
  border-color: var(--line);
}
.step__n {
  font-family: var(--serif);
  font-size: 2rem;
  line-height: 1;
  color: var(--faint);
  grid-row: span 2;
  transition: color 0.3s;
}
.step[aria-selected="true"] .step__n {
  color: var(--madder);
}
.step__t {
  font-weight: 600;
  font-size: 1.08rem;
  letter-spacing: -0.01em;
}
.step__d {
  color: var(--muted);
  font-size: 0.95rem;
  display: none;
}
.step[aria-selected="true"] .step__d {
  display: block;
}
.step__bar {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 0;
  height: 2px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
  opacity: 0;
}
.step[aria-selected="true"] .step__bar {
  opacity: 1;
}
.step__bar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--madder);
}
.step[aria-selected="true"].is-auto .step__bar i {
  animation: fill var(--dur, 9s) linear forwards;
}
@keyframes fill {
  to {
    width: 100%;
  }
}

.stage {
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--bg-2);
  box-shadow: var(--shadow);
  overflow: hidden;
  min-width: 0;
  position: sticky;
  top: 88px;
}
@media (max-width: 940px) {
  .stage {
    position: static;
  }
}
.stage__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 15px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--muted);
}
.stage__bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line-2);
}
.stage__bar span {
  margin-left: 8px;
}
.panel {
  padding: clamp(16px, 2.2vw, 24px);
  min-height: 430px;
  font-size: 0.92rem;
}
.panel[hidden] {
  display: none;
}

/* chat */
.chat {
  display: grid;
  gap: 12px;
}
.msg {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: 8px;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}
.msg.is-on {
  opacity: 1;
  transform: none;
}
.msg--a {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
}
.msg--u {
  background: var(--indigo-soft);
  border: 1px solid color-mix(in srgb, var(--indigo) 35%, transparent);
  justify-self: end;
  border-bottom-right-radius: 4px;
}
.msg small {
  display: block;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 3px;
}
.note-line {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--faint);
  padding-left: 12px;
  border-left: 2px solid var(--line-2);
}
.note-line b {
  color: var(--moss);
  font-weight: 500;
}

/* terminal */
.term {
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.term .d {
  color: var(--faint);
}
.term .p {
  color: var(--madder);
}
.term .g {
  color: var(--moss);
}
.term .r {
  color: var(--madder);
}
.term .y {
  color: var(--weld);
}
.term .b {
  color: var(--indigo);
}
.term .w {
  color: var(--text);
  font-weight: 600;
}

/* proposal */
.proposal {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-3);
  overflow: hidden;
}
.proposal + .proposal {
  margin-top: 12px;
}
.proposal__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}
.proposal__body {
  padding: 13px 14px;
  display: grid;
  gap: 9px;
}
.kv {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 10px;
  font-size: 0.86rem;
}
.kv dt {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--faint);
  padding-top: 3px;
}
.kv dd {
  color: var(--muted);
  min-width: 0;
  overflow-wrap: anywhere;
}
.diff {
  font-family: var(--mono);
  font-size: 0.8rem;
  border-radius: 5px;
  padding: 7px 10px;
  display: block;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.diff--add {
  background: var(--moss-soft);
  color: var(--text);
}
.diff--del {
  background: var(--madder-soft);
  color: var(--muted);
  text-decoration: line-through;
}
.proposal__act {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.pill-btn {
  font-size: 0.82rem;
  font-weight: 550;
  padding: 6px 13px;
  border-radius: 5px;
  border: 1px solid var(--line-2);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.pill-btn:hover {
  border-color: var(--faint);
}
.pill-btn--yes {
  background: var(--moss);
  border-color: var(--moss);
  color: #0c1a0e;
}
:root[data-theme="light"] .pill-btn--yes {
  color: #fff;
}
.proposal.is-applied {
  border-color: var(--moss);
}
.proposal.is-skipped {
  opacity: 0.5;
}
.proposal__state {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--moss);
}
.proposal.is-skipped .proposal__state {
  color: var(--faint);
}

/* tables */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.93rem;
}
th,
td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
tr:last-child > td {
  border-bottom: 0;
}
th {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--faint);
  white-space: nowrap;
}
td {
  color: var(--muted);
}
td:first-child {
  color: var(--text);
}
.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 99px;
  white-space: nowrap;
}
.tag--ok {
  background: var(--moss-soft);
  color: var(--moss);
}
.tag--warn {
  background: var(--weld-soft);
  color: var(--weld);
}
.tag--bad {
  background: var(--madder-soft);
  color: var(--madder);
}
.tag--info {
  background: var(--indigo-soft);
  color: var(--indigo);
}

/* ---------- routing ---------- */
.route {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(16px, 3vw, 40px);
}
@media (max-width: 860px) {
  .route {
    grid-template-columns: 1fr;
  }
}
.route__list {
  display: grid;
  gap: 8px;
  align-content: start;
}
.route__item {
  --c: var(--madder);
  text-align: left;
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--c);
  border-radius: 5px;
  background: var(--bg-2);
  display: grid;
  gap: 2px;
  transition: background 0.25s, border-color 0.25s, transform 0.25s var(--ease);
}
.route__item:hover {
  transform: translateX(3px);
}
.route__item[aria-pressed="true"] {
  background: var(--bg-3);
  border-color: var(--c);
}
.route__item b {
  font-weight: 600;
  font-size: 0.98rem;
}
.route__item span {
  color: var(--muted);
  font-size: 0.86rem;
}
.route__out {
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--bg-2);
  padding: clamp(18px, 2.4vw, 28px);
  display: grid;
  gap: 14px;
  align-content: start;
  position: sticky;
  top: 88px;
  min-width: 0;
}
@media (max-width: 860px) {
  .route__out {
    position: static;
  }
}
.route__arrow {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--faint);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.route__dest {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1.05;
}
.route__out pre {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 13px 15px;
  font-size: 0.8rem;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* ---------- playground ---------- */
.play {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--bg-2);
  overflow: hidden;
  box-shadow: var(--shadow);
}
@media (max-width: 900px) {
  .play {
    grid-template-columns: 1fr;
  }
}
.play__in,
.play__out {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.play__in {
  border-right: 1px solid var(--line);
}
@media (max-width: 900px) {
  .play__in {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}
.play__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--muted);
  min-height: 46px;
}
.play__bar div {
  display: flex;
  gap: 6px;
}
.play__bar button {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 3px 9px;
}
.play__bar button:hover {
  color: var(--text);
  border-color: var(--line-2);
}
.play textarea {
  flex: 1;
  width: 100%;
  min-height: 420px;
  resize: vertical;
  border: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.7;
  padding: 16px;
  outline-offset: -2px;
  tab-size: 2;
}
.play__opts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--muted);
}
.play__opts label {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  cursor: pointer;
}
.play__opts input {
  accent-color: var(--madder);
}
.score {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}
.score__ring {
  --v: 100;
  --col: var(--moss);
  width: 74px;
  height: 74px;
  flex: none;
  border-radius: 50%;
  background: conic-gradient(var(--col) calc(var(--v) * 1%), var(--line) 0);
  display: grid;
  place-items: center;
  transition: background 0.4s;
}
.score__ring span {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--bg-2);
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 1.75rem;
  line-height: 1;
}
.score__t {
  font-weight: 600;
}
.score__s {
  font-size: 0.86rem;
  color: var(--muted);
}
.findings {
  padding: 8px 8px 12px;
  overflow: auto;
  max-height: 460px;
  display: grid;
  gap: 4px;
  align-content: start;
}
.finding {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 10px;
  padding: 9px 10px;
  border-radius: 5px;
  font-size: 0.86rem;
  text-align: left;
  width: 100%;
}
.finding:hover {
  background: var(--bg-3);
}
.finding__m {
  grid-column: 2;
  color: var(--muted);
}
.finding__h {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--faint);
}
.finding__h b {
  color: var(--text);
  font-weight: 500;
}
.findings__empty {
  padding: 30px 16px;
  text-align: center;
  color: var(--muted);
}

/* ---------- nos ---------- */
.no {
  position: relative;
  padding-left: 54px;
}
.no::before {
  content: "No";
  position: absolute;
  left: 0;
  top: -4px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.9rem;
  color: var(--madder);
  line-height: 1.2;
}

/* ---------- tree ---------- */
.tree {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(16px, 3vw, 36px);
  align-items: start;
}
@media (max-width: 860px) {
  .tree {
    grid-template-columns: 1fr;
  }
}
.tree__list {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
  padding: 10px;
  font-family: var(--mono);
  font-size: 0.84rem;
}
.tree__row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 7px 10px;
  border-radius: 5px;
  color: var(--muted);
}
.tree__row:hover,
.tree__row[aria-pressed="true"] {
  background: var(--bg-3);
  color: var(--text);
}
.tree__row i {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  flex: none;
  background: var(--c, var(--faint));
}
.tree__row span {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--faint);
  white-space: nowrap;
}
.tree__info {
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--bg-2);
  padding: clamp(18px, 2.4vw, 28px);
  display: grid;
  gap: 12px;
  position: sticky;
  top: 88px;
}
@media (max-width: 860px) {
  .tree__info {
    position: static;
  }
}
.tree__info h3 {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.tree__info p {
  color: var(--muted);
}

/* ---------- install ---------- */
.tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-2);
  flex-wrap: wrap;
}
.tab {
  padding: 8px 15px;
  border-radius: 5px;
  font-size: 0.92rem;
  color: var(--muted);
  font-weight: 500;
}
.tab[aria-selected="true"] {
  background: var(--bg-3);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.install {
  margin-top: 18px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--bg-2);
  padding: clamp(20px, 3vw, 34px);
  display: grid;
  gap: 18px;
}
.install[hidden] {
  display: none;
}
.install ol {
  display: grid;
  gap: 16px;
  counter-reset: s;
}
.install ol > li {
  counter-increment: s;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 6px 12px;
}
.install ol > li::before {
  content: counter(s);
  font-family: var(--serif);
  font-size: 1.5rem;
  line-height: 1.15;
  color: var(--madder);
}
.install ol > li > * {
  grid-column: 2;
}
.install li p {
  color: var(--muted);
  font-size: 0.96rem;
}
.dl {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  align-items: center;
  padding: 16px;
  border: 1px dashed var(--line-2);
  border-radius: 8px;
}
.dl__meta {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--faint);
  overflow-wrap: anywhere;
  min-width: 0;
  flex: 1 1 260px;
}
.dl__meta b {
  color: var(--muted);
  font-weight: 500;
}

/* ---------- faq ---------- */
.faq {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
  max-width: 900px;
}
.faq details {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 40px 20px 0;
  font-size: 1.1rem;
  font-weight: 550;
  letter-spacing: -0.01em;
  position: relative;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 14px;
  font-family: var(--serif);
  font-size: 1.9rem;
  color: var(--faint);
  transition: transform 0.3s var(--ease), color 0.3s;
}
.faq details[open] summary::after {
  transform: rotate(45deg);
  color: var(--madder);
}
.faq details > div {
  padding: 0 0 22px;
  color: var(--muted);
  max-width: 72ch;
  display: grid;
  gap: 10px;
}

/* ---------- closing + footer ---------- */
.closing {
  text-align: center;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  justify-items: center;
}
.closing__btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.closing .cmd {
  max-width: 470px;
}
.footer {
  border-top: 1px solid var(--line);
  padding: 34px 0 44px;
  font-size: 0.88rem;
  color: var(--faint);
}
.footer__in {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
  align-items: center;
  justify-content: space-between;
}
.footer a {
  color: var(--muted);
  text-decoration: none;
}
.footer a:hover {
  color: var(--text);
}
.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

/* ---------- reveal ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ---------- docs ---------- */
.docs {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: clamp(24px, 4vw, 64px);
  padding: 44px 0 100px;
  align-items: start;
}
.toc {
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 110px);
  overflow: auto;
  font-size: 0.9rem;
  padding-right: 6px;
}
.toc h2 {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 500;
  margin: 20px 0 6px 10px;
}
.toc h2:first-child {
  margin-top: 0;
}
.toc a {
  display: block;
  padding: 5px 10px;
  border-radius: 5px;
  color: var(--muted);
  text-decoration: none;
  border-left: 2px solid transparent;
}
.toc a:hover {
  color: var(--text);
}
.toc a.is-active {
  color: var(--text);
  background: var(--bg-2);
  border-left-color: var(--madder);
}
.toc__toggle {
  display: none;
}
@media (max-width: 900px) {
  .docs {
    grid-template-columns: 1fr;
    padding-top: 20px;
  }
  .toc {
    position: static;
    max-height: none;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-2);
    padding: 6px;
  }
  .toc__toggle {
    display: flex;
    width: 100%;
    justify-content: space-between;
    padding: 9px 10px;
    font-weight: 550;
  }
  .toc__body {
    display: none;
    padding: 6px 0;
  }
  .toc.is-open .toc__body {
    display: block;
  }
}
.prose {
  min-width: 0;
  max-width: 800px;
}
.prose > header {
  display: grid;
  gap: 16px;
  margin-bottom: 20px;
}
.prose h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 76px 0 16px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.prose h3 {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 38px 0 10px;
}
.prose h4 {
  font-family: var(--mono);
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text);
  margin: 26px 0 8px;
}
.prose p,
.prose li {
  color: var(--muted);
}
.prose p {
  margin: 12px 0;
}
.prose ul,
.prose ol {
  margin: 12px 0;
  padding-left: 22px;
  display: grid;
  gap: 7px;
}
.prose ul {
  list-style: none;
}
.prose ul > li {
  position: relative;
}
.prose ul > li::before {
  content: "";
  position: absolute;
  left: -17px;
  top: 0.72em;
  width: 7px;
  height: 1.5px;
  background: var(--madder);
}
.prose ol {
  list-style: decimal;
}
.prose ol > li::marker {
  color: var(--madder);
  font-family: var(--mono);
  font-size: 0.85em;
}
.prose a {
  color: var(--text);
}
.prose pre {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 15px 17px;
  margin: 16px 0;
  overflow-x: auto;
  font-size: 0.83rem;
  line-height: 1.7;
  position: relative;
}
.prose pre .c {
  color: var(--faint);
}
.prose .table-wrap {
  margin: 18px 0;
}
.prose td code,
.prose th code {
  white-space: nowrap;
}
.callout {
  border: 1px solid var(--line);
  border-left: 2px solid var(--indigo);
  background: var(--bg-2);
  border-radius: 5px;
  padding: 13px 16px;
  margin: 18px 0;
  font-size: 0.95rem;
  color: var(--muted);
}
.callout--warn {
  border-left-color: var(--weld);
}
.callout b {
  color: var(--text);
}
.anchor {
  opacity: 0;
  margin-left: 8px;
  text-decoration: none;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.6em;
}
h2:hover .anchor,
h3:hover .anchor,
.anchor:focus {
  opacity: 1;
}
.pre-copy {
  position: absolute;
  top: 8px;
  right: 8px;
  font-family: var(--sans);
  font-size: 0.72rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 8px;
  background: var(--bg-2);
  opacity: 0;
  transition: opacity 0.2s;
}
.prose pre:hover .pre-copy,
.pre-copy:focus {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
@media print {
  .nav,
  .toc,
  .footer {
    display: none;
  }
}

/* Single-column grids must be allowed to shrink below their content's width. */
.route__out,
.tree__info,
.card,
.install,
.proposal__body,
.steps,
.route__list,
.chat,
.strands {
  grid-template-columns: minmax(0, 1fr);
}
.route__out .tag {
  white-space: normal;
}


/* =====================================================================
   Art direction: an editorial grid with hairlines instead of boxes,
   a rail of section numbers, and figures drawn by code.
   ===================================================================== */

.h2 {
  font-size: clamp(2.3rem, 5.2vw, 4.4rem);
  line-height: 1;
  letter-spacing: -0.024em;
}
.h2 em {
  color: inherit;
}
.lede {
  max-width: 58ch;
}

/* ---------- hero ---------- */
.hero {
  padding: clamp(18px, 3vw, 34px) 0 clamp(40px, 5vw, 64px);
}
.hero__meta {
  display: flex;
  justify-content: space-between;
  gap: 8px 24px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.hero__meta span:first-child {
  color: var(--madder);
}
.hero__mark {
  margin: clamp(14px, 2.4vw, 30px) 0 clamp(18px, 3vw, 40px);
}
.hero__mark canvas,
.closing__mark canvas {
  display: block;
  width: 100%;
  aspect-ratio: 2.92 / 1;
  touch-action: pan-y;
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(24px, 5vw, 80px);
  align-items: start;
}
.hero .display {
  font-size: clamp(2.5rem, 5.6vw, 5rem);
  line-height: 0.98;
}
.hero__side {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}
.hero__side .lede {
  font-size: clamp(1.02rem, 1.25vw, 1.16rem);
}
.hero__btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.hero__btns .btn {
  flex: 1 1 150px;
}
@media (max-width: 900px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }
}
.hero__facts {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin-top: clamp(34px, 5vw, 64px);
  border-top: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 0.86rem;
  color: var(--muted);
}
.hero__facts li {
  display: grid;
  gap: 2px;
  padding: 16px 16px 0 0;
}
.hero__facts li + li {
  padding-left: 16px;
  border-left: 1px solid var(--line);
}
.hero__facts b {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 3.4vw, 3rem);
  line-height: 1;
  color: var(--text);
}
@media (max-width: 760px) {
  .hero__facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hero__facts li {
    padding: 14px 12px 14px 0;
    border-bottom: 1px solid var(--line);
  }
  .hero__facts li + li {
    padding-left: 0;
    border-left: 0;
  }
  .hero__facts li:nth-child(even) {
    padding-left: 14px;
    border-left: 1px solid var(--line);
  }
}

/* a woven edge between major parts of the page */
.selvedge {
  height: 9px;
  background-image: repeating-linear-gradient(90deg, transparent 0 3px, var(--bg) 3px 4px),
    repeating-linear-gradient(90deg, var(--madder) 0 48px, var(--text) 48px 64px, var(--indigo) 64px 112px, var(--weld) 112px 136px, var(--text) 136px 152px, var(--moss) 152px 200px);
  opacity: 0.9;
}

/* ---------- section rail ---------- */
.section {
  padding: clamp(60px, 8vw, 120px) 0;
}
.section--first {
  border-top: 0;
}
.sec {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  column-gap: clamp(24px, 4vw, 72px);
}
.sec__rail {
  position: sticky;
  top: 92px;
  align-self: start;
  display: grid;
  gap: 8px;
}
.sec__no {
  font-family: var(--serif);
  font-size: 3.3rem;
  line-height: 0.85;
  color: var(--line-2);
}
.sec__name {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--faint);
  padding-top: 10px;
  border-top: 1px solid var(--line-2);
}
.sec__body {
  min-width: 0;
}
@media (max-width: 1040px) {
  .sec {
    grid-template-columns: minmax(0, 1fr);
  }
  .sec__rail {
    position: static;
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 22px;
  }
  .sec__no {
    font-size: 1.5rem;
    line-height: 1;
  }
  .sec__name {
    border-top: 0;
    padding-top: 0;
  }
}
.section__head {
  max-width: 900px;
}

/* ---------- figures ---------- */
.figs {
  display: grid;
  gap: clamp(24px, 4vw, 56px);
}
.figs--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 820px) {
  .figs--2 {
    grid-template-columns: minmax(0, 1fr);
  }
}
.fig {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-content: start;
  padding-top: 20px;
  border-top: 1px solid var(--line-2);
  min-width: 0;
}
.fig--wide {
  margin-top: clamp(34px, 5vw, 60px);
}
.fig figcaption {
  color: var(--muted);
  font-size: 0.96rem;
  max-width: 62ch;
}
.fig figcaption b {
  color: var(--text);
  font-weight: 600;
}
.fig figcaption a {
  font-family: var(--mono);
  font-size: 0.78rem;
  white-space: nowrap;
}
.fig__svg {
  width: 100%;
  height: auto;
  overflow: visible;
}
.fig__draw[data-fig="ruler"] {
  overflow-x: auto;
}
.fig__draw[data-fig="ruler"] .fig__svg {
  min-width: 640px;
}
.fig__cell {
  fill: var(--text);
  stroke: var(--text);
  stroke-width: 1;
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
.fig__cell.is-stale {
  fill: none;
  stroke: var(--faint);
}
.is-in .fig__cell,
.fig__cell.is-in {
  opacity: 1;
}
.fig__bar--grow {
  transform: scaleX(0);
  transform-origin: left center;
  transform-box: fill-box;
  transition: transform 1.1s var(--ease) 0.25s;
}
.is-in .fig__bar--grow {
  transform: scaleX(1);
}
.fig__line {
  fill: var(--line-2);
}
.fig__line--tree,
.lg--tree {
  fill: var(--indigo);
  background: var(--indigo);
}
.fig__line--vague,
.lg--vague {
  fill: var(--weld);
  background: var(--weld);
}
.fig__line--shout,
.lg--shout {
  fill: var(--moss);
  background: var(--moss);
}
.fig__line--dead,
.lg--dead {
  fill: var(--madder);
  background: var(--madder);
}
.legend {
  display: grid;
  gap: 6px;
  font-size: 0.86rem;
  color: var(--muted);
}
.legend li {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lg {
  width: 18px;
  height: 3px;
  flex: none;
}
.fig--inpanel {
  border-top: 1px solid var(--line);
  margin: 18px 0 12px;
  padding-top: 14px;
  gap: 8px;
}
.fig__title {
  font-family: var(--mono);
  font-size: 0.72rem !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint) !important;
}

/* generated file against kept file */
.versus {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(24px, 4vw, 64px);
  margin-top: clamp(40px, 6vw, 80px);
  align-items: start;
}
@media (max-width: 900px) {
  .versus {
    grid-template-columns: minmax(0, 1fr);
  }
}
.versus__label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.versus__b {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--line-2);
}
.versus__b pre {
  font-size: 0.84rem;
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--text);
  padding: 4px 0 4px 18px;
  border-left: 2px solid var(--moss);
}
.versus__b pre .ok {
  color: var(--text);
}

/* ---------- loop ring ---------- */
.how__left {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-content: start;
}
.ring {
  width: min(360px, 100%);
  margin: 0 0 6px;
  overflow: visible;
}
.ring__track {
  fill: none;
  stroke: var(--line-2);
  stroke-width: 1;
  stroke-dasharray: 2 5;
}
.ring__orbit {
  transform-origin: 130px 132px;
  transform: rotate(calc(var(--step, 0) * 90deg));
  transition: transform 1s var(--ease);
}
.ring__arc {
  fill: none;
  stroke: var(--madder);
  stroke-width: 2;
  stroke-linecap: round;
}
.ring__dot {
  fill: var(--madder);
}
.ring__node circle {
  fill: var(--bg);
  stroke: var(--faint);
  stroke-width: 1.5;
}
.ring__node text {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  fill: var(--faint);
  transition: fill 0.4s;
}
.ring__node.is-on text {
  fill: var(--text);
}
.ring__center {
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  fill: var(--muted);
}
@media (max-width: 940px) {
  .ring {
    display: none;
  }
}
.step {
  border-radius: 0;
  border: 0;
  border-top: 1px solid var(--line);
  padding: 16px 4px;
}
.step:hover,
.step[aria-selected="true"] {
  background: transparent;
}
.step[aria-selected="true"] {
  border-top-color: var(--text);
}
.step__bar {
  left: 0;
  right: 0;
  top: -1px;
  bottom: auto;
  height: 1px;
  background: transparent;
}
.steps {
  gap: 0;
}

/* ---------- de-boxed lists ---------- */
.nots {
  display: grid;
  border-bottom: 1px solid var(--line);
}
.nots li {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 8px clamp(20px, 4vw, 64px);
  align-items: baseline;
  padding: clamp(18px, 2.4vw, 30px) 0;
  border-top: 1px solid var(--line);
}
.nots h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
}
.nots h3 i {
  color: var(--madder);
}
.nots p {
  color: var(--muted);
  max-width: 56ch;
}
@media (max-width: 760px) {
  .nots li {
    grid-template-columns: minmax(0, 1fr);
  }
}
.notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 44px);
  margin-top: clamp(28px, 4vw, 48px);
}
@media (max-width: 860px) {
  .notes {
    grid-template-columns: minmax(0, 1fr);
  }
}
.note {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-content: start;
  padding-top: 16px;
  border-top: 1px solid var(--line-2);
}
.note p {
  color: var(--muted);
  font-size: 0.96rem;
}

/* quieter containers */
.loom {
  border-radius: 8px;
  box-shadow: none;
  background: var(--bg-2);
}
.stage,
.play,
.route__out,
.tree__info,
.install {
  box-shadow: none;
}
.route__item {
  border-radius: 0;
  border-width: 0 0 0 2px;
  background: transparent;
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
}
.route__list {
  gap: 0;
  border-top: 1px solid var(--line);
}
.route__item,
.route__item[aria-pressed="true"] {
  border-bottom: 1px solid var(--line);
}
.route__item[aria-pressed="true"] {
  background: var(--bg-2);
}
.faq {
  max-width: none;
}
.faq summary {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

/* ---------- closing ---------- */
.closing {
  padding: clamp(60px, 9vw, 130px) 0 0;
  text-align: left;
  display: block;
}
.closing__title {
  font-size: clamp(2.8rem, 8vw, 7.4rem);
  max-width: 13ch;
}
.closing__row {
  display: grid;
  grid-template-columns: minmax(0, 460px) minmax(0, 1fr);
  gap: 14px clamp(16px, 3vw, 40px);
  align-items: center;
  margin-top: clamp(28px, 4vw, 52px);
}
.closing__btns {
  justify-content: flex-start;
}
@media (max-width: 860px) {
  .closing__row {
    grid-template-columns: minmax(0, 1fr);
  }
}
.closing__mark {
  margin-top: clamp(50px, 8vw, 110px);
  margin-bottom: -1px;
}
.footer {
  border-top: 1px solid var(--line);
}
