/* ================================================================= *
 * Grain · Landing — Manus-inspired restyle
 * monochrome, sans-serif, white space, black pill CTAs
 * ================================================================= */

:root {
  /* neutral monochrome palette + subtle Grain warmth */
  --rust: #9A3B3B;          /* Grain accent, used sparingly */
  --coral: #C4736B;
  --coral-soft: #E5E5E5;
  --peach: #E8C2BC;
  --cream: #FFFFFF;
  --cream-light: #FAFAFA;
  --cream-deep: #F0F0F0;
  --white: #FFFFFF;
  --ink: #0F0F0F;
  --ink-soft: #3D3D3D;
  --muted: #8A8A8A;
  --line: #E5E5E5;
  --line-soft: #EFEFEF;
  --ok: #3D8B52;

  --dark: #F7EEEC;
  --dark-line: #E8D6D3;
  --dark-card: #FFFFFF;

  --font-display: "Libre Baskerville", Georgia, serif;
  --font-sans: "DM Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --maxw: 1180px;
  --pad: 40px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--rust); color: var(--white); }
a { color: inherit; text-decoration: none; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }

.eyebrow {
  font-family: var(--font-sans);
  font-size: 12px; font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--rust);
  margin: 0;
}

h1, h2, h3 { font-weight: 600; margin: 0; }
.display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -.015em;
  line-height: 1.14;
}
.display em { font-style: italic; color: var(--rust); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 12px 24px; border-radius: 999px;
  font-size: 14.5px; font-weight: 500; font-family: var(--font-sans);
  cursor: pointer; white-space: nowrap;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
  border: 1px solid transparent;
}
.btn--primary { background: var(--ink); color: var(--white); }
.btn--primary:hover { background: #000; transform: translateY(-1px); }
.btn--primary::after { content: "→"; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); }

/* ================================================================= *
 * Nav
 * ================================================================= */
.nav {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--white) 82%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.nav__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 14px var(--pad);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand svg { width: 26px; height: 26px; display: block; }
.brand b { font-family: var(--font-sans); font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.nav__links { display: flex; gap: 28px; font-size: 14px; color: var(--muted); }
.nav__links a:hover { color: var(--ink); }
.nav__right { display: flex; align-items: center; gap: 18px; }
.nav__signin { font-size: 14px; color: var(--ink); }
.nav__signin:hover { color: var(--muted); }
@media (max-width: 900px) { .nav__links { display: none; } }

/* ================================================================= *
 * Section rhythm
 * ================================================================= */
section { position: relative; }
.sec { padding: 120px 0; }
.center { text-align: center; }
.sec-head { max-width: 760px; }
.sec-head.center { margin: 0 auto; }
.sec-head .eyebrow { margin-bottom: 18px; }
.sec-head h2 { font-size: clamp(28px, 3.4vw, 42px); }
.sec-head p {
  margin: 20px 0 0; font-size: 17px; color: var(--ink-soft);
  max-width: 58ch; text-wrap: pretty;
}
.sec-head.center p { margin-left: auto; margin-right: auto; }

/* ================================================================= *
 * Hero
 * ================================================================= */
.hero { padding: 100px 0 96px; text-align: center; }
.hero h1 { font-size: clamp(38px, 5vw, 64px); margin: 24px auto 0; max-width: 20ch; }
.hero__sub {
  margin: 26px auto 0; font-size: 18px; color: var(--ink-soft);
  max-width: 58ch; line-height: 1.6; text-wrap: pretty;
}
.hero__cta { display: flex; gap: 12px; justify-content: center; margin-top: 36px; flex-wrap: wrap; }
.hero__note {
  margin-top: 24px; font-size: 12.5px; color: var(--muted); letter-spacing: .01em;
}

/* ---------- Command surface ---------- */
.cmd {
  margin-top: 72px; text-align: left;
  display: grid; grid-template-columns: 1.45fr 1fr;
  background: var(--white); border: 1px solid var(--line); border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 32px 80px -40px rgba(0,0,0,.18), 0 2px 8px rgba(0,0,0,.03);
}

.cmd__composer { padding: 28px 32px 26px; display: flex; flex-direction: column; gap: 20px; }
.cmd__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted);
  padding-bottom: 16px; border-bottom: 1px solid var(--line-soft);
}
.cmd__bar b { color: var(--ink); font-weight: 500; }
.cmd__prompt {
  margin: 0; font-family: var(--font-sans); font-size: 17px; font-weight: 400; line-height: 1.6;
  color: var(--ink); letter-spacing: -.005em; text-wrap: pretty;
}
.cmd__caret { display: inline-block; width: 2px; height: 1em; background: var(--ink); vertical-align: -0.15em; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cmd__caret { animation: none; } }

.cmd__files { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-soft);
  background: var(--cream-light); border: 1px solid var(--line-soft);
  border-radius: 8px; padding: 7px 12px;
}
.chip i {
  width: 14px; height: 17px; border: 1.5px solid var(--muted); border-radius: 3px;
  display: block; position: relative; flex-shrink: 0;
}
.chip i::after { content: ""; position: absolute; left: 2px; right: 2px; top: 3px; height: 1.5px; background: var(--muted); box-shadow: 0 3px 0 var(--muted); }
.chip em { font-style: normal; color: var(--muted); }

.cmd__rows { display: grid; gap: 0; border-top: 1px solid var(--line-soft); }
.cmd__row {
  display: grid; grid-template-columns: 130px 1fr; gap: 16px; align-items: baseline;
  padding: 12px 0; border-bottom: 1px solid var(--line-soft); font-size: 13.5px;
}
.cmd__row dt { font-family: var(--font-sans); font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.cmd__row dd { margin: 0; color: var(--ink-soft); display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; }
.cmd__row dd b { color: var(--ink); font-weight: 600; }
.cmd__row code { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); background: var(--cream-light); border: 1px solid var(--line-soft); border-radius: 5px; padding: 1px 7px; }
.pill-ok { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }

.cmd__foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: auto; }
.cmd__attach { font-size: 13px; color: var(--muted); }
.cmd__attach:hover { color: var(--ink); }

/* ---------- Live run timeline (tinted rail) ---------- */
.run { background: var(--dark); color: var(--ink); padding: 26px 28px; display: flex; flex-direction: column; }
.run__head {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 16px; border-bottom: 1px solid var(--dark-line); margin-bottom: 8px;
}
.run__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rust); box-shadow: 0 0 0 3px color-mix(in srgb, var(--rust) 35%, transparent); animation: pulse 2s ease infinite; }
@keyframes pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .run__dot { animation: none; } }
.run__head b { color: var(--ink); font-weight: 500; }
.run__head .state { margin-left: auto; color: var(--rust); }

.run__steps { list-style: none; margin: 0; padding: 0; flex: 1; }
.run__step {
  display: grid; grid-template-columns: 18px 1fr; gap: 14px;
  position: relative; padding: 13px 0;
}
.run__step::before {
  content: ""; position: absolute; left: 8px; top: 34px; bottom: -6px; width: 1px;
  background: var(--dark-line);
}
.run__step:last-child::before { display: none; }
.run__mark {
  width: 17px; height: 17px; border-radius: 50%; margin-top: 3px;
  border: 1.5px solid #D9C3C0; display: grid; place-items: center;
  font-size: 9px; color: #fff; flex-shrink: 0;
}
.run__step.is-done .run__mark { background: var(--rust); border-color: var(--rust); }
.run__step.is-done .run__mark::after { content: "✓"; font-family: var(--font-mono); }
.run__step.is-wait .run__mark { border-color: var(--rust); box-shadow: 0 0 0 4px color-mix(in srgb, var(--rust) 16%, transparent); }
.run__step.is-wait .run__mark::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--rust); }
.run__step.is-next { opacity: .45; }

.run__body b { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.run__body span { display: block; font-family: var(--font-mono); font-size: 11px; color: var(--muted); margin-top: 3px; line-height: 1.5; }
.run__step.is-wait .run__body b { color: var(--rust); }

.run__cta {
  margin-top: 14px; padding: 12px 14px; border-radius: 10px;
  background: var(--dark-card); border: 1px solid var(--dark-line);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 12.5px;
}
.run__cta span { color: var(--ink-soft); }
.run__cta b { font-size: 12px; letter-spacing: .01em; color: #fff; background: var(--rust); border-radius: 999px; padding: 6px 14px; font-weight: 600; white-space: nowrap; }

/* ================================================================= *
 * Steps rail
 * ================================================================= */
.steps {
  margin-top: 64px;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 0;
  border-top: 1px solid var(--line);
}
.step { padding: 28px 26px 6px 0; position: relative; }
.step + .step { border-left: 1px solid var(--line-soft); padding-left: 26px; }
.step::before {
  content: ""; position: absolute; top: -1px; left: 0; width: 44px; height: 1px; background: var(--rust);
}
.step + .step::before { left: 26px; }
.step__n { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }
.step h3 { font-size: 19px; font-weight: 600; letter-spacing: -.02em; margin: 12px 0 0; }
.step p { margin: 9px 0 0; font-size: 13.5px; color: var(--muted); line-height: 1.6; text-wrap: pretty; }

/* ================================================================= *
 * Capability tabs
 * ================================================================= */
.cap { display: grid; grid-template-columns: 280px 1fr; gap: 32px; margin-top: 56px; align-items: start; }
.cap__tabs { display: flex; flex-direction: column; gap: 4px; border-top: 1px solid var(--line); position: sticky; top: 88px; }
.cap__tab {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px;
  text-align: left; width: 100%; cursor: pointer;
  background: transparent; border: 0; border-bottom: 1px solid var(--line-soft);
  padding: 15px 6px; color: var(--muted);
  font-family: var(--font-sans); font-size: 16px; font-weight: 500; letter-spacing: -.01em;
  transition: color .15s ease, padding .15s ease;
}
.cap__tab span { font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; opacity: .5; }
.cap__tab:hover { color: var(--ink); }
.cap__tab.is-on { color: var(--ink); padding-left: 14px; font-weight: 600; }
.cap__tab.is-on span { opacity: 1; }

.cap__panel {
  display: none;
  background: var(--white); border: 1px solid var(--line); border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 60px -36px rgba(0,0,0,.16);
}
.cap__panel.is-on { display: grid; grid-template-columns: 1fr 1.15fr; animation: capfade .35s ease; }
@keyframes capfade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.cap__copy { padding: 40px 40px 36px; }
.cap__copy h3 { font-family: var(--font-display); font-size: clamp(20px, 2.1vw, 26px); font-weight: 400; letter-spacing: -.01em; line-height: 1.3; }
.cap__copy h3 em { font-style: italic; color: var(--rust); }
.cap__lede { margin: 14px 0 0; font-size: 15.5px; color: var(--ink-soft); max-width: 46ch; text-wrap: pretty; }
.cap__proof, .cap__ex {
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-soft);
  display: grid; grid-template-columns: 82px 1fr; gap: 16px; align-items: baseline;
}
.cap__proof em, .cap__ex em {
  font-family: var(--font-sans); font-size: 10px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); font-style: normal;
}
.cap__proof span { font-size: 13.5px; color: var(--ink-soft); line-height: 1.6; }
.cap__proof span b { color: var(--ink); font-weight: 600; }
.cap__ex span { font-size: 14px; color: var(--ink); line-height: 1.55; }
.cap__ex span::before { content: "“"; color: var(--muted); }
.cap__ex span::after { content: "”"; color: var(--muted); }

.cap__mock {
  background: var(--cream-light); border-left: 1px solid var(--line-soft);
  padding: 34px 32px; display: grid; place-items: center;
  min-width: 0;
}

/* ---------- Shared mockup panel ---------- */
.mock {
  width: 100%; max-width: 430px; min-width: 0; justify-self: stretch; margin: 0 auto;
  background: var(--white); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 16px 40px -24px rgba(0,0,0,.2);
  overflow: hidden; font-size: 12.5px;
}
.mock__head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid var(--line-soft);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
}
.mock__head b { color: var(--ink); font-weight: 500; }
.mock__body { padding: 16px; display: grid; gap: 10px; }
.mock__body > * { min-width: 0; max-width: 100%; overflow: hidden; }

.kv { display: grid; grid-template-columns: 96px 1fr; gap: 10px; align-items: baseline; padding: 7px 0; border-bottom: 1px solid var(--line-soft); }
.kv:last-child { border-bottom: 0; }
.kv dt { font-family: var(--font-sans); font-size: 10px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.kv dd { margin: 0; color: var(--ink-soft); font-size: 12.5px; line-height: 1.45; }
.kv dd b { color: var(--ink); font-weight: 600; }
.kv code, .mock code { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink); background: var(--cream-deep); border-radius: 4px; padding: 1px 6px; }

.tagrow { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-family: var(--font-mono); font-size: 10px; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; background: var(--cream-light); }
.tag--deny { color: var(--muted); text-decoration: line-through; border-style: dashed; }

/* run log mockup */
.loglines { list-style: none; margin: 0; padding: 0; font-family: var(--font-mono); font-size: 11px; }
.loglines li { display: grid; grid-template-columns: 46px 1fr auto; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); color: var(--ink-soft); align-items: baseline; }
.loglines li:last-child { border-bottom: 0; }
.loglines .t { color: var(--muted); }
.loglines .s { font-size: 10px; letter-spacing: .04em; text-transform: uppercase; }
.loglines .s.ok { color: var(--ok); }
.loglines .s.warn { color: var(--rust); }
.loglines .s.dim { color: var(--muted); }
.loglines li.is-branch { padding-left: 18px; position: relative; }
.loglines li.is-branch::before { content: "└"; position: absolute; left: 2px; color: var(--muted); }

/* approval queue mockup */
.q { display: grid; gap: 8px; min-width: 0; }
.q__row {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--line-soft); border-radius: 10px; padding: 11px 12px;
  background: var(--cream-light);
  min-width: 0;
}
.q__row.is-hot { border-color: var(--ink); background: var(--white); }
.q__ic { width: 30px; height: 30px; border-radius: 8px; background: var(--cream-deep); display: grid; place-items: center; font-family: var(--font-mono); font-size: 11px; color: var(--ink); flex-shrink: 0; }
.q__row.is-hot .q__ic { background: var(--ink); color: var(--white); }
.q__meta { flex: 1; min-width: 0; overflow: hidden; }
.q__meta b { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q__meta span { font-family: var(--font-mono); font-size: 10px; color: var(--muted); }
.q__acts { display: flex; gap: 6px; flex-shrink: 0; }
.q__btn { font-family: var(--font-sans); font-size: 11px; font-weight: 500; border: 1px solid var(--line); background: var(--white); border-radius: 999px; padding: 5px 12px; color: var(--ink-soft); cursor: pointer; white-space: nowrap; }
.q__btn--go { background: var(--ink); color: var(--white); border-color: var(--ink); }

/* evidence drawer mockup */
.ev { display: grid; gap: 0; }
.ev__row { display: grid; grid-template-columns: 108px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); align-items: baseline; }
.ev__row:last-child { border-bottom: 0; }
.ev__row dt { font-family: var(--font-sans); font-size: 10px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.ev__row dd { margin: 0; font-size: 12px; color: var(--ink-soft); line-height: 1.5; }
.ev__preview {
  border: 1px dashed var(--line); border-radius: 10px; background: var(--cream-light);
  padding: 12px 14px; display: flex; align-items: center; gap: 12px;
}
.ev__thumb { width: 40px; height: 52px; background: var(--white); border: 1px solid var(--line); border-radius: 5px; position: relative; flex-shrink: 0; }
.ev__thumb::before { content: ""; position: absolute; left: 7px; right: 7px; top: 9px; height: 3px; background: var(--ink); border-radius: 2px; box-shadow: 0 8px 0 var(--line), 0 16px 0 var(--line), 0 24px 0 var(--line); }
.ev__preview b { font-size: 12px; display: block; }
.ev__preview span { font-family: var(--font-mono); font-size: 10px; color: var(--muted); display: block; margin-top: 2px; }

/* artifact packet mockup */
.pkt__items { list-style: none; margin: 0; padding: 0; }
.pkt__items li { display: flex; align-items: baseline; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 12.5px; color: var(--ink); }
.pkt__items li:last-child { border-bottom: 0; }
.pkt__items li::before { content: "▪"; color: var(--muted); font-size: 9px; }
.pkt__items li em { font-family: var(--font-mono); font-size: 10px; font-style: normal; color: var(--muted); margin-left: auto; white-space: nowrap; }
.pkt__lineage {
  margin-top: 4px; padding: 11px 13px; border-radius: 8px;
  background: var(--cream-light); border: 1px solid var(--line-soft);
  font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); line-height: 1.7;
}
.pkt__lineage b { color: var(--ink-soft); font-weight: 500; }

/* ================================================================= *
 * Use cases
 * ================================================================= */
.uses { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 52px; }
.use {
  background: var(--white); border: 1px solid var(--line); border-radius: 16px;
  padding: 24px 24px 20px; display: flex; flex-direction: column; gap: 9px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.use:hover { transform: translateY(-3px); border-color: #D4D4D4; box-shadow: 0 20px 40px -28px rgba(0,0,0,.25); }
.use__tag { font-family: var(--font-sans); font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.use h3 { font-size: 17.5px; font-weight: 600; line-height: 1.25; letter-spacing: -.02em; }
.use p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.55; flex: 1; }
.use__out {
  margin-top: 12px; padding-top: 13px; border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-soft); line-height: 1.6;
}
.use__out em { font-style: normal; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: 9.5px; display: block; margin-bottom: 3px; font-family: var(--font-sans); font-weight: 600; }

/* ================================================================= *
 * Trust (tinted)
 * ================================================================= */
.trust { background: var(--dark); color: var(--ink); }
.trust .eyebrow { color: var(--rust); }
.trust__head { max-width: 720px; }
.trust__head h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(26px, 3.2vw, 40px); line-height: 1.18; margin: 20px 0 0; color: var(--ink); letter-spacing: -.01em; }
.trust__head h2 em { font-style: italic; color: var(--rust); }
.trust__head p { margin: 22px 0 0; font-size: 16px; color: var(--ink-soft); max-width: 56ch; }

.trust__grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; background: var(--dark-line); border: 1px solid var(--dark-line); border-radius: 16px; overflow: hidden; margin-top: 56px; }
.trust__cell { background: var(--dark); padding: 26px 26px 28px; grid-column: span 2; }
.trust__cell:nth-child(4), .trust__cell:nth-child(5) { grid-column: span 3; }
.trust__cell b { display: block; font-family: var(--font-sans); font-size: 13.5px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
.trust__cell p { margin: 10px 0 0; font-size: 13.5px; line-height: 1.6; color: var(--muted); }

.trust__env {
  margin-top: 36px; border: 1px solid var(--dark-line); border-radius: 12px; background: var(--dark-card);
  font-family: var(--font-mono); font-size: 11.5px; line-height: 1.9; padding: 20px 24px;
  color: var(--muted);
  overflow-x: auto;
}
.trust__env .k { color: var(--rust); }
.trust__env .v { color: var(--ink); }
.trust__env .c { color: var(--muted); }

/* ================================================================= *
 * Final CTA + footer
 * ================================================================= */
.final { text-align: center; padding: 136px 0; }
.final h2 { font-size: clamp(30px, 4.2vw, 52px); max-width: 22ch; margin: 20px auto 0; }
.final p { margin: 24px auto 0; font-size: 17px; color: var(--ink-soft); max-width: 52ch; }
.final__cta { display: flex; gap: 12px; justify-content: center; margin-top: 38px; flex-wrap: wrap; }

.footer { background: var(--cream-light); border-top: 1px solid var(--line-soft); padding: 42px 0; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer .brand b { font-size: 17px; }
.footer__meta { font-size: 12px; color: var(--muted); letter-spacing: .01em; }

/* ================================================================= *
 * Output packet viewer (monochrome)
 * ================================================================= */
.pv {
  margin-top: 64px;
  background: var(--white); border: 1px solid var(--line); border-radius: 20px;
  overflow: hidden; text-align: left;
  box-shadow: 0 32px 80px -40px rgba(0,0,0,.18), 0 2px 8px rgba(0,0,0,.03);
}
.pv__head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px;
  padding: 18px 26px; border-bottom: 1px solid var(--line-soft);
}
.pv__title { font-family: var(--font-display); font-size: 20px; letter-spacing: -.01em; }
.pv__state {
  font-family: var(--font-sans); font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink); border: 1px solid var(--line);
  border-radius: 999px; padding: 3px 11px;
}
.pv__stats { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.pv__runmeta { margin-left: auto; font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); }

.pv__grid { display: grid; grid-template-columns: 272px 1fr 262px; }

/* artifact list */
.pv__list { border-right: 1px solid var(--line-soft); padding: 14px; display: grid; gap: 5px; align-content: start; }
.pa { padding: 10px 12px; border-radius: 10px; border: 1px solid transparent; min-width: 0; }
.pa.is-sel { background: var(--cream-light); border-color: var(--line); }
.pa__row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pa__row b { font-family: var(--font-mono); font-size: 11.5px; font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pa__meta { display: block; font-family: var(--font-mono); font-size: 10px; color: var(--muted); margin-top: 3px; }
.badge {
  font-family: var(--font-sans); font-size: 9px; font-weight: 600; font-style: normal; letter-spacing: .08em;
  text-transform: uppercase; border: 1px solid var(--line); border-radius: 999px;
  padding: 2px 8px; margin-left: auto; flex-shrink: 0; color: var(--muted);
}
.badge--ver { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 42%, transparent); }
.badge--der { color: var(--muted); }
.badge--adp { color: var(--ink); border-color: #CFCFCF; }
.badge--rev { color: var(--rust); border-color: color-mix(in srgb, var(--rust) 45%, transparent); background: color-mix(in srgb, var(--rust) 6%, transparent); }

/* document preview */
.pv__preview {
  background: var(--cream-light); border-right: 1px solid var(--line-soft);
  padding: 26px; display: flex; flex-direction: column; align-items: center; gap: 14px; min-width: 0;
}
.page {
  width: 100%; max-width: 420px; background: var(--white); border: 1px solid var(--line);
  border-radius: 8px; box-shadow: 0 14px 34px -22px rgba(0,0,0,.25);
  padding: 24px 28px 26px;
}
.page__kicker { margin: 0; font-family: var(--font-mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.page__title { margin: 10px 0 0; font-family: var(--font-display); font-size: 17px; line-height: 1.3; letter-spacing: -.01em; color: var(--ink); }
.page__sec { margin-top: 16px; padding-top: 13px; border-top: 1px solid var(--line-soft); display: grid; gap: 7px; }
.page__sec > b { font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.fl { display: block; height: 6px; border-radius: 3px; background: var(--line-soft); }
.ck { position: relative; padding-left: 20px; font-size: 11.5px; color: var(--ink-soft); line-height: 1.45; }
.ck::before { content: "○"; position: absolute; left: 0; top: 0; font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.ck--done::before { content: "✓"; color: var(--ok); }
.page__table { border: 1px solid var(--line-soft); border-radius: 6px; overflow: hidden; }
.page__table div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 11px; border-bottom: 1px solid var(--line-soft); font-size: 11px; color: var(--ink-soft); }
.page__table div:last-child { border-bottom: 0; }
.page__table div span:last-child { font-family: var(--font-mono); font-size: 10px; color: var(--muted); }
.page__reco {
  margin-top: 16px; padding: 12px 14px; border: 1px solid #D9D9D9;
  border-radius: 8px; background: var(--cream-light);
}
.page__reco b { display: block; font-family: var(--font-sans); font-size: 9px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); }
.page__reco span { display: block; margin-top: 5px; font-size: 11.5px; color: var(--ink-soft); line-height: 1.5; }
.pv__thumbs { display: flex; gap: 8px; }
.thumb { width: 26px; height: 35px; background: var(--white); border: 1px solid var(--line); border-radius: 3px; }
.thumb.is-on { border-color: var(--rust); box-shadow: 0 0 0 2px color-mix(in srgb, var(--rust) 18%, transparent); }

/* evidence rail */
.pv__rail { padding: 16px 20px; align-content: start; min-width: 0; }
.pv__rail dl { margin: 0; }

/* lineage strip */
.pv__lineage {
  border-top: 1px solid var(--line-soft); padding: 14px 26px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
}
.lg { font-family: var(--font-mono); font-size: 11px; color: var(--ink-soft); }
.lg--end { color: var(--rust); font-weight: 500; }
.lg__arr { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.lg__chips { margin-left: auto; display: flex; flex-wrap: wrap; gap: 6px; }

@media (max-width: 1080px) {
  .pv__grid { grid-template-columns: 250px 1fr; }
  .pv__rail { grid-column: 1 / -1; border-top: 1px solid var(--line-soft); }
  .pv__rail dl { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
  .pv__runmeta { margin-left: 0; width: 100%; }
}
@media (max-width: 700px) {
  .pv__grid { grid-template-columns: 1fr; }
  .pv__list { border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .pv__preview { border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .pv__rail dl { grid-template-columns: 1fr; }
  .pv__lineage { padding: 14px 20px; }
  .lg__chips { margin-left: 0; }
}

/* ================================================================= *
 * Reveal
 * ================================================================= */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ================================================================= *
 * Responsive
 * ================================================================= */
@media (max-width: 1080px) {
  .cap__panel.is-on { grid-template-columns: 1fr; }
  .cap__mock { border-left: 0; border-top: 1px solid var(--line-soft); }
}
@media (max-width: 980px) {
  .cmd { grid-template-columns: 1fr; }
  .run { border-top: 1px solid var(--dark-line); }
  .steps { grid-template-columns: 1fr 1fr; border-top: 0; }
  .step, .step + .step { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; padding-right: 0; }
  .step::before, .step + .step::before { left: 0; }
  .uses { grid-template-columns: 1fr 1fr; }
  .trust__grid { grid-template-columns: 1fr 1fr; }
  .trust__cell, .trust__cell:nth-child(4), .trust__cell:nth-child(5) { grid-column: auto; }
  .trust__cell:last-child { grid-column: 1 / -1; }
  .cap { grid-template-columns: 1fr; gap: 20px; }
  .cap__tabs { position: static; flex-direction: row; flex-wrap: wrap; border-top: 0; gap: 8px; }
  .cap__tab { width: auto; border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px; font-size: 14px; }
  .cap__tab span { display: none; }
  .cap__tab.is-on { padding-left: 16px; background: var(--ink); color: var(--white); border-color: var(--ink); }
}
@media (max-width: 620px) {
  :root { --pad: 22px; }
  .sec { padding: 84px 0; }
  .hero { padding: 68px 0 72px; }
  .final { padding: 88px 0; }
  .steps, .uses, .trust__grid { grid-template-columns: 1fr; }
  .cmd__composer { padding: 22px 20px; }
  .cmd__row { grid-template-columns: 1fr; gap: 4px; }
  .run { padding: 22px 20px; }
  .cap__copy { padding: 28px 24px; }
  .cap__mock { padding: 24px 18px; }
  .hero__cta .btn, .final__cta .btn { flex: 1; justify-content: center; }
  .q__acts { display: none; }
}
