/* Ballast (ballastgroup.ai)
   Fonts are self-hosted (SIL Open Font License); nothing loads from third parties. */

@font-face {
  font-family: "Newsreader";
  src: url("fonts/newsreader-latin-opsz-normal.woff2") format("woff2");
  font-weight: 200 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("fonts/newsreader-latin-opsz-italic.woff2") format("woff2");
  font-weight: 200 800; font-style: italic; font-display: swap;
}
@font-face { font-family: "Plex Sans"; src: url("fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("fonts/ibm-plex-sans-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --paper: #f4f1ea;
  --paper-2: #ebe7dd;
  --ink: #16181a;
  --ink-2: #3a3d3f;
  --muted: #6b6d6a;
  --rule: #d6d1c4;
  --rule-strong: #16181a;
  --accent: #1f4a39;      /* deep green: trust, secondary colour */
  --signal: #ff5a1f;      /* safety orange: the ~10% accent. Only ever paired with --ink text (5.7:1). */
  --dark: #15201b;
  --dark-ink: #ece8de;
  --dark-muted: #a3aaa4;
  --dark-rule: #2f3b35;
  --error: #9b2c1f;

  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Plex Sans", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "Plex Mono", ui-monospace, Menlo, Consolas, monospace;

  --wrap: 1240px;
  --gutter: 40px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  font-kerning: normal;
}
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; }
::selection { background: var(--signal); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 10px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 16px; }
.skip-link:focus { left: 10px; }

/* ---------- Masthead ---------- */
.masthead {
  position: sticky; top: 0; z-index: 20;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.masthead-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.wordmark {
  font-family: var(--serif); font-size: 1.35rem; font-weight: 500; letter-spacing: -0.01em;
  text-decoration: none; font-variation-settings: "opsz" 36;
}
.wordmark { display: inline-flex; align-items: center; color: var(--ink); line-height: 0; }
.logo-lockup { display: block; height: 28px; width: auto; overflow: visible; }
.colophon .logo-lockup { height: 32px; }
.logo-lockup .boat { transform-box: fill-box; transform-origin: 50% 90%; }
.wordmark:hover .boat { animation: bob 1.6s ease-in-out; }
@keyframes bob { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-6deg); } 65% { transform: rotate(3deg); } }
.site-nav { display: flex; align-items: center; gap: 32px; font-size: 0.92rem; }
.site-nav a { text-decoration: none; color: var(--ink-2); padding: 4px 0; border-bottom: 1px solid transparent; }
.site-nav a:hover { border-bottom-color: var(--ink); color: var(--ink); }
.site-nav .nav-cta { color: var(--ink); font-weight: 500; border-bottom: 2px solid var(--signal); }
.menu-btn {
  display: none; font: 500 0.9rem var(--sans); color: var(--ink);
  background: none; border: 1px solid var(--ink); padding: 7px 14px; cursor: pointer;
}

/* ---------- Buttons & links ---------- */
.button {
  display: inline-block; font: 500 0.95rem/1 var(--sans); letter-spacing: 0.01em;
  color: var(--ink); background: var(--signal); border: 1px solid var(--signal);
  padding: 16px 26px; text-decoration: none; cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.button:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.button:active { transform: translateY(1px); }
.text-link {
  font-weight: 500; font-size: 0.95rem; text-decoration: none;
  border-bottom: 1px solid currentColor; padding-bottom: 2px;
}
.text-link::after { content: "\2192"; display: inline-block; margin-left: 6px; transition: transform .25s ease; }
.text-link:hover::after { transform: translateX(4px); }
.text-link:hover { color: var(--accent); }

/* ---------- Opening ---------- */
.opening { padding: 96px 0 0; }
.kicker {
  font: 500 0.78rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 36px;
  display: flex; align-items: center; gap: 12px;
}
.kicker::before { content: ""; width: 10px; height: 10px; background: var(--signal); flex: none; }
.opening h1 {
  font-family: var(--serif); font-weight: 380; font-variation-settings: "opsz" 72;
  font-size: clamp(2.6rem, 6.4vw, 5.6rem); line-height: 1.02; letter-spacing: -0.025em;
  max-width: 15ch;
}
.opening-foot {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 48px; align-items: end;
  margin-top: 56px; padding-bottom: 72px;
}
.opening-copy { max-width: 56ch; font-size: 1.12rem; color: var(--ink-2); }
.opening-actions { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }

.givens {
  list-style: none; display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--rule-strong);
}
.givens li {
  padding: 22px 28px 26px 0; font-size: 0.98rem; color: var(--ink-2);
  border-right: 1px solid var(--rule);
}
.givens li + li { padding-left: 28px; }
.givens li:last-child { border-right: 0; }
.givens .num { display: block; font-family: var(--serif); font-style: italic; color: var(--accent); font-size: 1.1rem; margin-bottom: 6px; }

/* ---------- Chapters ---------- */
.chapter { padding: 120px 0; border-top: 1px solid var(--rule); }
.chapter:first-of-type { border-top: 0; }
.chapter-grid { display: grid; grid-template-columns: 4fr 8fr; gap: var(--gutter); }
.chapter-grid > *, .contact-grid > * { min-width: 0; }
.chapter-head { align-self: start; position: sticky; top: 104px; padding-right: 24px; }
.chapter-no { font: 500 0.8rem/1 var(--mono); color: var(--accent); margin-bottom: 18px; }
.chapter-head h2 {
  font-family: var(--serif); font-variation-settings: "opsz" 60; font-weight: 400;
  font-size: clamp(2rem, 3.4vw, 2.9rem); line-height: 1.05; letter-spacing: -0.02em; margin-bottom: 18px;
}
.chapter-head p { color: var(--muted); max-width: 34ch; }

/* Ledger (practice) */
.ledger { border-top: 1px solid var(--rule-strong); }
.ledger-row { display: grid; grid-template-columns: 200px 1fr; gap: 32px; padding: 30px 0; border-bottom: 1px solid var(--rule); }
.ledger dt { font-family: var(--serif); font-size: 1.5rem; font-variation-settings: "opsz" 36; line-height: 1.2; }
.ledger dd { color: var(--ink-2); max-width: 60ch; }

/* Schematic (console) */
.schematic {
  margin: 0 0 48px; display: grid;
  grid-template-columns: 1fr 40px 1.25fr 40px 1fr; align-items: center;
  border-top: 1px solid var(--rule-strong); padding-top: 28px;
}
.sch-col { display: grid; gap: 8px; }
.sch-label { font: 500 0.75rem/1.3 var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 6px; }
.sch-label span { display: block; text-transform: none; letter-spacing: 0; font-weight: 400; margin-top: 4px; color: var(--accent); }
.sch-box { border: 1px solid var(--ink); background: var(--paper); padding: 12px 14px; font-size: 0.88rem; line-height: 1.4; }
.sch-core { padding: 16px; border: 1px solid var(--accent); background: var(--paper-2); }
.sch-core .sch-box { border-color: var(--rule); }
.sch-core .sch-data { border-style: dashed; border-color: var(--accent); }
.sch-arrow { position: relative; height: 1px; background: var(--ink); margin: 0 6px; }
.sch-arrow::before, .sch-arrow::after { content: ""; position: absolute; top: -4px; border: 4px solid transparent; }
.sch-arrow::after { right: -2px; border-left: 6px solid var(--ink); border-right: 0; }
.sch-arrow::before { left: -2px; border-right: 6px solid var(--ink); border-left: 0; }
.schematic figcaption {
  grid-column: 1 / -1; margin-top: 20px; font-size: 0.88rem; color: var(--muted); font-style: italic; max-width: 70ch;
}
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); }
.prose p { color: var(--ink-2); }
.prose strong { color: var(--ink); font-weight: 600; }

/* Safety (dark chapter) */
.chapter-dark { background: var(--dark); color: var(--dark-ink); border-top: 0; }
.chapter-dark .chapter-no { color: #9cc7b0; }
.chapter-dark .chapter-head p, .chapter-dark .fine { color: var(--dark-muted); }
.standards {
  list-style: none; counter-reset: s; display: grid; grid-template-columns: 1fr 1fr;
  column-gap: var(--gutter); border-top: 1px solid var(--dark-ink);
}
.standards li { counter-increment: s; padding: 26px 0 28px 44px; border-bottom: 1px solid var(--dark-rule); position: relative; }
.standards li::before {
  content: counter(s, decimal-leading-zero); position: absolute; left: 0; top: 30px;
  font: 500 0.75rem var(--mono); color: #9cc7b0;
}
.standards h3 { font-family: var(--serif); font-size: 1.3rem; font-variation-settings: "opsz" 30; margin-bottom: 8px; }
.standards p { color: var(--dark-muted); font-size: 0.95rem; }
.nevers { margin-top: 56px; background: var(--signal); color: var(--ink); padding: 40px 44px; }
.nevers h3 { font-family: var(--serif); font-style: italic; font-size: 1.75rem; font-variation-settings: "opsz" 48; margin-bottom: 20px; }
.nevers ul { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 14px var(--gutter); }
.nevers li { padding-left: 28px; position: relative; }
.nevers li { font-weight: 500; }
.nevers li::before { content: ""; position: absolute; left: 0; top: 0.8em; width: 14px; height: 2px; background: var(--ink); }
.fine { margin-top: 28px; font-size: 0.88rem; color: var(--muted); max-width: 70ch; }

.demo-link { margin-top: 32px; }
.demo-link-2 { margin-top: 12px; }

/* Ownership table */
.table-scroll { overflow-x: auto; border-top: 1px solid var(--rule-strong); }
.compare { width: 100%; border-collapse: collapse; min-width: 640px; font-size: 0.95rem; }
.compare th, .compare td { text-align: left; vertical-align: top; padding: 18px 20px 18px 0; border-bottom: 1px solid var(--rule); }
.compare thead th { font-family: var(--serif); font-weight: 500; font-size: 1.35rem; font-variation-settings: "opsz" 36; padding-top: 22px; }
.compare tbody th { font-weight: 500; color: var(--ink); width: 28%; }
.compare td { color: var(--ink-2); }
.compare .col-mark { background: var(--paper-2); padding-left: 20px; }
.compare thead .col-mark { color: var(--accent); }

/* Sequence (engagement) */
.sequence { list-style: none; border-top: 1px solid var(--rule-strong); }
.sequence li { display: grid; grid-template-columns: 120px 1fr; gap: 32px; padding: 26px 0; border-bottom: 1px solid var(--rule); }
.when { font: 500 0.78rem/1.9 var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); }
.sequence h3 { font-family: var(--serif); font-size: 1.4rem; font-variation-settings: "opsz" 36; margin-bottom: 6px; }
.sequence p { color: var(--ink-2); max-width: 60ch; }

/* FAQ */
.faq { border-top: 1px solid var(--rule-strong); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  list-style: none; cursor: pointer; padding: 24px 40px 24px 0; position: relative;
  font-family: var(--serif); font-size: 1.35rem; font-variation-settings: "opsz" 36; line-height: 1.3;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 22px; font-family: var(--sans); font-weight: 300; font-size: 1.5rem; }
.faq details[open] summary::after { content: "\2212"; }
.faq summary:hover { color: var(--accent); }
.faq details p { padding: 0 0 26px; color: var(--ink-2); max-width: 64ch; }

/* ---------- Contact ---------- */
.contact { background: var(--paper-2); border-top: 1px solid var(--rule-strong); padding: 120px 0; }
.contact-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 80px; }
.contact h2 {
  font-family: var(--serif); font-variation-settings: "opsz" 72; font-weight: 380;
  font-size: clamp(2.4rem, 4.6vw, 3.8rem); line-height: 1.04; letter-spacing: -0.02em; margin-bottom: 24px;
}
.contact-grid > div > p { color: var(--ink-2); max-width: 42ch; }
.direct { margin-top: 28px; font-size: 0.95rem; }
.direct a { text-decoration-thickness: 1px; text-underline-offset: 3px; }

.form { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 32px; align-content: start; }
.field { display: grid; gap: 6px; }
.field-wide { grid-column: 1 / -1; }
.field label { font-size: 0.85rem; font-weight: 500; }
.opt { color: var(--muted); font-weight: 400; margin-left: 6px; }
.field input, .field select, .field textarea {
  font: 400 1rem/1.4 var(--sans); color: var(--ink); width: 100%;
  background: transparent; border: 0; border-bottom: 1px solid var(--ink);
  border-radius: 0; padding: 8px 0 10px; appearance: none; -webkit-appearance: none;
}
.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 10px) 52%, calc(100% - 5px) 52%; background-size: 5px 5px; background-repeat: no-repeat;
}
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-bottom: 2px solid var(--accent); padding-bottom: 9px; }
.field [aria-invalid="true"] { border-bottom-color: var(--error); }
.hint { font-size: 0.82rem; color: var(--muted); }
.check { grid-template-columns: auto 1fr; gap: 12px; align-items: start; }
.check input { width: 16px; height: 16px; margin: 3px 0 0; accent-color: var(--accent); }
.check label { font-weight: 400; color: var(--ink-2); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-end { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.form-status { font-size: 0.9rem; }
.form-status.ok { color: var(--accent); }
.form-status.err { color: var(--error); }

/* ---------- Colophon ---------- */
/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .chapter-grid { grid-template-columns: 1fr; gap: 48px; }
  .chapter-head { position: static; padding-right: 0; }
  .chapter-head p { max-width: 52ch; }
  .opening-foot { grid-template-columns: 1fr; gap: 32px; }
  .contact-grid { grid-template-columns: 1fr; gap: 56px; }
}
@media (max-width: 860px) {
  :root { --gutter: 24px; }
  .menu-btn { display: block; }
  .site-nav {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--rule-strong); padding: 0 var(--gutter) 16px;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 16px 0; border-bottom: 1px solid var(--rule); font-size: 1.05rem; }
  .site-nav .nav-cta { border-bottom-color: var(--rule); }
  .givens { grid-template-columns: 1fr; }
  .givens li, .givens li + li { padding: 18px 0; border-right: 0; border-bottom: 1px solid var(--rule); }
  .schematic { grid-template-columns: 1fr; }
  .sch-arrow { width: 1px; height: 28px; margin: 6px auto; }
  .sch-arrow::after { right: auto; top: auto; bottom: -2px; left: -4px; border: 4px solid transparent; border-top: 6px solid var(--ink); border-bottom: 0; }
  .sch-arrow::before { left: -4px; top: -2px; border: 4px solid transparent; border-bottom: 6px solid var(--ink); border-top: 0; }
  .two-col, .standards, .nevers ul { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  .opening { padding-top: 56px; }
  .kicker { margin-bottom: 24px; }
  .opening-foot { margin-top: 36px; padding-bottom: 48px; }
  .chapter, .contact { padding: 80px 0; }
  .ledger-row, .sequence li { grid-template-columns: 1fr; gap: 8px; }
  .nevers { padding: 28px 22px; }
  .form { grid-template-columns: 1fr; }
}

/* =====================================================================
   Extended sections
   ===================================================================== */

/* Reading progress (ink, hairline) */
.progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none; }
.progress span { display: block; height: 100%; background: var(--ink); transform-origin: 0 50%; transform: scaleX(0); }

/* Why projects stall */
.stall { margin-top: 64px; padding: 110px 0 120px; border-top: 1px solid var(--rule-strong); }
.stall-title {
  font-family: var(--serif); font-variation-settings: "opsz" 60; font-weight: 400;
  font-size: clamp(1.9rem, 3.6vw, 3rem); line-height: 1.12; letter-spacing: -0.015em; max-width: 26ch;
}
.stall-title span { color: var(--muted); }
.stall-list { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gutter); margin-top: 72px; }
.stall-list li { border-top: 1px solid var(--rule-strong); padding-top: 26px; }
.stall-no { font-family: var(--serif); font-style: italic; font-size: 3rem; line-height: 1; color: var(--accent); margin-bottom: 20px; }
.stall-list h3 { font-family: var(--serif); font-size: 1.55rem; font-variation-settings: "opsz" 36; margin-bottom: 12px; }
.stall-problem { color: var(--muted); }
.stall-answer { margin-top: 20px; padding-left: 16px; border-left: 2px solid var(--ink); color: var(--ink-2); }
.stall-answer::before { content: "Our answer"; display: block; font: 500 0.72rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink); margin-bottom: 8px; }

/* Use-case explorer */
.explorer { display: grid; grid-template-columns: 250px 1fr; gap: 56px; border-top: 1px solid var(--rule-strong); padding-top: 28px; }
.explorer-tabs { display: none; }
.js .explorer-tabs { position: relative; display: flex; flex-direction: column; align-self: start; border-left: 1px solid var(--rule); }
.explorer-tabs button {
  text-align: left; background: none; border: 0; cursor: pointer; color: var(--muted);
  font-family: var(--serif); font-size: 1.2rem; font-variation-settings: "opsz" 30; line-height: 1.25;
  padding: 12px 0 12px 20px; transition: color .2s ease;
}
.explorer-tabs button:hover { color: var(--ink-2); }
.explorer-tabs button[aria-selected="true"] { color: var(--ink); }
.explorer-indicator {
  position: absolute; left: -1px; top: 0; width: 2px; height: 0; background: var(--ink);
  transition: transform .45s cubic-bezier(.2,.7,.1,1), height .45s cubic-bezier(.2,.7,.1,1), width .45s cubic-bezier(.2,.7,.1,1);
}
html:not(.js) .explorer { grid-template-columns: 1fr; }
html:not(.js) .panel + .panel { margin-top: 48px; }
.panel h3 { font-family: var(--serif); font-size: 2rem; font-variation-settings: "opsz" 48; line-height: 1.1; margin-bottom: 14px; }
.panel-lead { font-size: 1.12rem; color: var(--ink-2); max-width: 54ch; margin-bottom: 28px; }
.panel-facts > div { display: grid; grid-template-columns: 140px 1fr; gap: 24px; padding: 16px 0; border-top: 1px solid var(--rule); }
.panel-facts dt { font: 500 0.74rem/1.9 var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.panel-facts dd { color: var(--ink-2); }
.panel.enter { animation: panelIn .5s cubic-bezier(.2,.7,.1,1); }
@keyframes panelIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Schematic motion: a request travels in, passes each control, travels out */
.sch-arrow { overflow: visible; }
.packet { position: absolute; top: -3px; left: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--ink); opacity: 0; }
.schematic.in .packet { animation: travel 5s linear infinite; }
.schematic.in .sch-arrow:nth-child(4) .packet { animation-delay: 2.4s; }
.sch-step { transition: none; }
.schematic.in .sch-step { animation: checked 5s ease infinite; }
.schematic.in .sch-step:nth-of-type(1) { animation-delay: 1.00s; }
.schematic.in .sch-step:nth-of-type(2) { animation-delay: 1.35s; }
.schematic.in .sch-step:nth-of-type(3) { animation-delay: 1.70s; }
.schematic.in .sch-step:nth-of-type(4) { animation-delay: 2.05s; }
@keyframes travel {
  0% { left: 0; opacity: 0; }
  3% { opacity: 1; }
  18% { left: calc(100% - 7px); opacity: 1; }
  21%, 100% { left: calc(100% - 7px); opacity: 0; }
}
@keyframes checked {
  0% { box-shadow: inset 0 0 0 0 var(--accent); background: var(--paper); }
  4%, 38% { box-shadow: inset 3px 0 0 0 var(--accent); background: #fbfaf6; }
  50%, 100% { box-shadow: inset 0 0 0 0 var(--accent); background: var(--paper); }
}

/* Audit log */
.logbook { border: 1px solid var(--ink); background: #fbfaf6; margin-bottom: 48px; }
.logbook-head {
  display: flex; justify-content: space-between; align-items: center; padding: 12px 18px;
  border-bottom: 1px solid var(--rule); font: 500 0.72rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.06em;
}
.logbook-live { color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }
.logbook-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: blink 2.4s ease-in-out infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
.log { list-style: none; padding: 0 18px; font: 400 0.82rem/1.4 var(--mono); }
.log li { display: grid; grid-template-columns: 72px 92px minmax(0, 1fr); gap: 14px; align-items: baseline; padding: 12px 0; border-bottom: 1px dashed var(--rule); }
.log li:last-child { border-bottom: 0; }
.log time { color: var(--muted); }
.t { justify-self: start; font: 500 0.68rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.05em; border: 1px solid currentColor; padding: 4px 6px; }
.t-ok { color: var(--accent); }
.t-redact { color: var(--ink-2); }
.t-hold { color: #8a5a00; }
.t-block { color: var(--error); }
.log-msg { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log li.new { animation: logIn .7s cubic-bezier(.2,.7,.1,1); }
@keyframes logIn { from { opacity: 0; transform: translateY(-6px); background: var(--paper-2); } to { opacity: 1; transform: none; background: transparent; } }

/* Founders' note */
.note { background: var(--paper-2); border-top: 1px solid var(--rule); padding: 120px 0; }
.note-inner { margin: 0 auto; max-width: 920px; position: relative; }
.note blockquote { margin: 0; }
.note blockquote p {
  font-family: var(--serif); font-variation-settings: "opsz" 60; font-weight: 380;
  font-size: clamp(1.5rem, 2.8vw, 2.3rem); line-height: 1.32; letter-spacing: -0.01em; text-indent: -0.4em;
}
.note blockquote p::before { content: "\201C"; color: var(--accent); }
.note blockquote p::after { content: "\201D"; color: var(--accent); }
.note figcaption { margin-top: 32px; display: flex; align-items: center; gap: 14px; font: 500 0.78rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.note figcaption::before { content: ""; width: 36px; height: 1px; background: var(--ink); }

/* Ownership table hover */
.compare tbody tr th, .compare tbody tr td { transition: background .2s ease; }
.compare tbody tr:hover th, .compare tbody tr:hover td:not(.col-mark) { background: rgba(22, 24, 26, 0.035); }

/* FAQ smooth open (where supported) */
:root { interpolate-size: allow-keywords; }
.faq details::details-content { block-size: 0; overflow: hidden; transition: block-size .35s ease, content-visibility .35s allow-discrete; }
.faq details[open]::details-content { block-size: auto; }

/* Contact points */
.contact-points { list-style: none; margin-top: 28px; display: grid; gap: 10px; }
.contact-points li { padding-left: 26px; position: relative; color: var(--ink-2); }
.contact-points li::before { content: ""; position: absolute; left: 0; top: 0.8em; width: 14px; height: 1px; background: var(--ink); }

/* Footer */
.colophon { padding: 72px 0 40px; border-top: 1px solid var(--rule-strong); }
.colophon-top { display: grid; grid-template-columns: 1.1fr 2fr; gap: var(--gutter); }
.colophon-line { margin-top: 12px; color: var(--muted); max-width: 32ch; font-size: 0.95rem; }
.colophon-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gutter); }
.colophon-cols > div { display: grid; gap: 10px; align-content: start; }
.colophon-h { font: 500 0.72rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 6px; }
.colophon-cols a { text-decoration: none; color: var(--ink-2); font-size: 0.95rem; }
.colophon-cols a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.colophon-note { margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--rule); font-size: 0.82rem; color: var(--muted); }

/* =====================================================================
   Entrance motion (only when JS is running; never for reduced motion)
   ===================================================================== */
.headline .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.12em; margin-bottom: -0.12em; }
.headline .w > span { display: inline-block; }
.js .headline .w > span { transform: translateY(108%); transition: transform 1s cubic-bezier(.2,.7,.1,1); transition-delay: var(--d, 0s); }
.js .headline.ready .w > span { transform: none; }

.mark { position: relative; font-style: italic; z-index: 0; }
.mark::after {
  content: ""; position: absolute; left: -0.04em; right: -0.04em; bottom: 0.1em; height: 0.11em; z-index: -1;
  background: var(--signal); transform-origin: 0 50%;
}
.js .mark::after { transform: scaleX(0); transition: transform .9s cubic-bezier(.65,0,.2,1) 1.1s; }
.js .headline.ready .mark::after { transform: scaleX(1); }

.js .rise { opacity: 0; transform: translateY(16px); transition: opacity .8s ease, transform .9s cubic-bezier(.2,.7,.1,1); transition-delay: var(--d, 0s); }
.js .rise.in { opacity: 1; transform: none; }

/* =====================================================================
   Responsive additions
   ===================================================================== */
@media (max-width: 1080px) {
  .colophon-top { grid-template-columns: 1fr; gap: 48px; }
}
@media (max-width: 860px) {
  .stall-list { grid-template-columns: 1fr; gap: 48px; }
  .explorer { grid-template-columns: 1fr; gap: 32px; }
  .js .explorer-tabs { flex-direction: row; overflow-x: auto; border-left: 0; border-bottom: 1px solid var(--rule); scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); }
  .js .explorer-tabs::-webkit-scrollbar { display: none; }
  .js .explorer-tabs { gap: 26px; }
  .explorer-tabs button { white-space: nowrap; padding: 12px 0 14px; font-size: 1.05rem; flex: none; }
  .explorer-indicator { top: auto; bottom: -1px; left: 0; height: 2px; width: 0; }
  .sch-arrow .packet { top: 0; left: -3px; }
  .schematic.in .packet { animation-name: travelDown; }
  .log li { grid-template-columns: auto minmax(0, 1fr); row-gap: 6px; }
  .log time { display: none; }
}
@keyframes travelDown {
  0% { top: 0; opacity: 0; }
  3% { opacity: 1; }
  18% { top: calc(100% - 7px); opacity: 1; }
  21%, 100% { top: calc(100% - 7px); opacity: 0; }
}
@media (max-width: 600px) {
  .stall { padding: 72px 0 80px; margin-top: 48px; }
  .stall-list { margin-top: 48px; }
  .panel-facts > div { grid-template-columns: 1fr; gap: 4px; }
  .note { padding: 80px 0; }
  .colophon-cols { grid-template-columns: 1fr 1fr; }
  .log-msg { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .rise, .js .headline .w > span { opacity: 1; transform: none; }
  .js .mark::after { transform: scaleX(1); }
  .packet { display: none; }
}
