:root {
  --bg: #fcfcfd;
  --ink: #111111;
  --muted: #5c5c5c;
  --line: #e6e6e6;
  --teal: #0f6f78;
  --cyan: #0891b2;
  --purple: #6d4acb;
  --teal-soft: #e8f4f4;
  --warn: #c45c16;
  --ok: #1f6b45;
  --conflict: #b42318;
  --max: 1100px;
  --pad: 24px;
  /* site/ main canvas */
  --canvas: #fcfcfd;
  --canvas-muted: #f6f7f9;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  background-color: var(--canvas);
}
body {
  margin: 0;
  min-height: 100vh;
  /* site/ main body gradient (app.css) */
  background-color: var(--canvas);
  background-image:
    radial-gradient(circle at 92% 88%, rgba(8, 145, 178, 0.045), transparent 34rem),
    radial-gradient(circle at 8% 12%, rgba(139, 92, 246, 0.035), transparent 30rem),
    linear-gradient(180deg, var(--canvas), var(--canvas));
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: var(--ink);
  font: 400 17px/1.55 Inter, ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
.wrap {
  width: min(calc(100% - (var(--pad) * 2)), var(--max));
  margin-inline: auto;
}

.site-header {
  width: min(calc(100% - (var(--pad) * 2)), var(--max));
  margin: 0 auto;
  padding: 20px 0 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
  display: block;
  background: #111;
}
.brand-name {
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.site-nav,
.footer-links {
  display: flex;
  align-items: center;
  gap: 20px;
}
.site-nav > a:not(.button),
.footer-links a {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}
.site-nav > a:not(.button):hover,
.footer-links a:hover { color: var(--ink); }
.button-small {
  min-height: 40px;
  padding: 8px 14px;
  font-size: 14px;
}

/* Eyebrow: one continuous header, not spaced like clickable chips */
.eyebrow {
  margin: 0 0 18px;
  color: var(--teal);
  font: 700 12px/1.35 JetBrains Mono, ui-monospace, monospace;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: normal;
}

.hero {
  display: grid;
  gap: 36px;
  padding: 28px 0 64px;
}
.page-hero {
  padding: 56px 0 72px;
}
.page-hero h1 {
  margin: 0 0 22px;
  max-width: 18ch;
  font-size: clamp(34px, 7vw, 52px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.hero-copy {
  min-width: 0;
}
.hero h1 {
  margin: 0 0 22px;
  font-size: clamp(34px, 8.4vw, 52px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.045em;
  max-width: 14ch;
  text-wrap: balance;
}
.lede {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.5;
  max-width: 38rem;
}
.lede strong {
  color: var(--ink);
  font-weight: 700;
}

.hn-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}
.hn-y {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: #ff6600;
  color: #fff;
  font: 700 13px/1 Inter, sans-serif;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  border: 1px solid #111;
  border-radius: 4px;
  background: #111;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
}
.button:hover { background: #222; }
.button:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}

/* Hero visual: site/ main HeroWorkflow (ticket → terminal preflight) */
.hero-visual {
  margin: 0;
  align-self: center;
  min-width: 0;
  width: 100%;
}

/* ---- HeroWorkflow shell (ported from site/src/lib/components/HeroWorkflow.svelte) ---- */
/* Author display:flex rules beat UA [hidden] unless forced — without this, every
   animated step paints at once (typing + bot comment + empty second prompt). */
.hw-shell [hidden] {
  display: none !important;
}
.hw-shell {
  position: relative;
  height: 470px;
  overflow: hidden;
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  background: #fcfcfd;
  box-shadow: 0 24px 60px rgba(24, 24, 27, 0.12);
  color: #18181b;
  text-align: left;
  font-size: 0.8rem;
  isolation: isolate;
}
.hw-layer {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  transition: opacity 0.55s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.hw-ticket {
  opacity: 1;
  transform: none;
}
.hw-shell.is-terminal .hw-ticket {
  opacity: 0;
  transform: scale(1.04);
  pointer-events: none;
}
.hw-terminal {
  opacity: 0;
  transform: translate(26px, 32px) scale(0.9);
  transform-origin: bottom right;
  pointer-events: none;
  background: #18181b;
  border-radius: 12px;
}
.hw-terminal.is-active {
  opacity: 1;
  transform: none;
}

.hw-chrome {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 0.9rem;
  background: #fff;
  border-bottom: 1px solid #ececef;
  font-size: 0.75rem;
}
.hw-ws-mark {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(135deg, #0891b2, #8b5cf6);
}
.hw-ws-name { font-weight: 600; }
.hw-crumb { color: #a1a1aa; }
.hw-chrome-spacer { flex: 1; }
.hw-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #ede9fe;
  color: #6d28d9;
  font-weight: 600;
}
.hw-avatar-sm { width: 22px; height: 22px; font-size: 0.65rem; }
.hw-avatar-xs { width: 15px; height: 15px; font-size: 0.55rem; margin-right: 0.3rem; }

.hw-issue-body {
  flex: 1;
  padding: 1.05rem 1.1rem;
  overflow: hidden;
}
.hw-issue-head {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}
.hw-issue-id {
  font-family: JetBrains Mono, ui-monospace, monospace;
  font-size: 0.7rem;
  color: #a1a1aa;
}
.hw-issue-title {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.hw-issue-desc {
  margin: 0.4rem 0 0;
  font-size: 0.76rem;
  line-height: 1.45;
  color: #71717a;
}
.hw-issue-story {
  margin: 0.5rem 0 0;
  font-size: 0.74rem;
  line-height: 1.45;
  color: #52525b;
}
.hw-story-label {
  display: inline-block;
  margin-right: 0.4rem;
  padding: 0.02rem 0.35rem;
  border-radius: 4px;
  background: #f4f4f5;
  color: #71717a;
  font-size: 0.58rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.hw-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.7rem;
}
.hw-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border: 1px solid #e4e4e7;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 500;
  background: #fff;
}
.hw-pill-ghost { color: #52525b; }
.hw-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  border: 2px solid #f59e0b;
  border-right-color: transparent;
}
.hw-divider {
  height: 1px;
  margin: 1rem 0 0.85rem;
  background: #ececef;
}
.hw-activity-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #a1a1aa;
  margin-bottom: 0.7rem;
}

.hw-comment {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.6rem;
}
.hw-bot-mark {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background:
    linear-gradient(90deg, transparent 49%, rgba(255, 255, 255, 0.85) 49% 51%, transparent 51%),
    linear-gradient(135deg, #0891b2, #8b5cf6);
}
.hw-typing {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: #71717a;
  font-size: 0.74rem;
  padding-top: 0.25rem;
}
.hw-who { font-weight: 600; color: #18181b; }
.hw-dots { display: inline-flex; gap: 3px; }
.hw-dots i {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: #a1a1aa;
  animation: hw-blink 1.2s infinite;
}
.hw-dots i:nth-child(2) { animation-delay: 0.2s; }
.hw-dots i:nth-child(3) { animation-delay: 0.4s; }
@keyframes hw-blink {
  0%, 60%, 100% { opacity: 0.3; }
  30% { opacity: 1; }
}
.hw-comment-body { flex: 1; min-width: 0; }
.hw-comment-head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.74rem;
}
.hw-bot-tag {
  padding: 0.02rem 0.3rem;
  border-radius: 4px;
  background: #f5f3ff;
  color: #7c3aed;
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.hw-when { color: #a1a1aa; }
.hw-comment-text {
  margin: 0.4rem 0 0.6rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: #3f3f46;
}
.hw-decision-link {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid #e4e4e7;
  border-left: 2px solid #8b5cf6;
  border-radius: 6px;
  background: #faf9ff;
  font-size: 0.72rem;
}
.hw-dl-top {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  min-width: 0;
}
.hw-link-id {
  font-family: JetBrains Mono, ui-monospace, monospace;
  font-size: 0.68rem;
  color: #6d28d9;
  font-weight: 600;
}
.hw-link-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #3f3f46;
  font-weight: 500;
}
.hw-dl-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.66rem;
  color: #71717a;
}
.hw-dl-dot { color: #d4d4d8; }
.hw-dl-field { color: #a1a1aa; }
.hw-dl-src {
  font-family: JetBrains Mono, ui-monospace, monospace;
  color: #6d28d9;
}
.hw-dl-val {
  font-family: JetBrains Mono, ui-monospace, monospace;
  color: #52525b;
}
.hw-link-badge {
  padding: 0.05rem 0.35rem;
  border-radius: 4px;
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
  font-size: 0.6rem;
  font-weight: 600;
}
.hw-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.7rem;
}
.hw-btn {
  position: relative;
  padding: 0.4rem 0.7rem;
  border: 1px solid #e4e4e7;
  border-radius: 6px;
  background: #fff;
  font-size: 0.72rem;
  font-weight: 500;
  color: #3f3f46;
}
.hw-btn-primary {
  background: #18181b;
  border-color: #18181b;
  color: #fff;
  transition: transform 0.12s ease;
}
.hw-btn-primary.is-pressed { transform: scale(0.95); }
.hw-cursor {
  position: absolute;
  right: -6px;
  bottom: -8px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
  animation: hw-cursor-in 0.4s ease both;
}
@keyframes hw-cursor-in {
  from { opacity: 0; transform: translate(6px, 6px); }
  to { opacity: 1; transform: none; }
}
.hw-recorded {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.7rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  background: #f0fdf4;
  font-size: 0.74rem;
  color: #166534;
}
.hw-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  border-radius: 999px;
  background: #16a34a;
  color: #fff;
  font-size: 0.6rem;
}
.hw-ledger-word {
  color: #0e7490;
  font-weight: 600;
}

.hw-term-chrome {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid #27272a;
}
.hw-tdot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
}
.hw-tdot-r { background: #ff5f57; }
.hw-tdot-y { background: #febc2e; }
.hw-tdot-g { background: #28c840; }
.hw-term-path {
  margin-left: 0.5rem;
  font-family: JetBrains Mono, ui-monospace, monospace;
  font-size: 0.68rem;
  color: #71717a;
}
.hw-term-body {
  flex: 1;
  padding: 1rem 1.1rem;
  font-family: JetBrains Mono, ui-monospace, monospace;
  font-size: 0.74rem;
  line-height: 1.7;
  color: #e4e4e7;
  overflow: hidden;
}
.hw-term-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.hw-prompt { color: #22d3ee; font-weight: 700; }
.hw-cmd { color: #f4f4f5; }
.hw-caret {
  display: inline-block;
  width: 7px;
  height: 14px;
  background: #22d3ee;
  animation: hw-caret 1s step-end infinite;
  vertical-align: middle;
}
@keyframes hw-caret {
  50% { opacity: 0; }
}
.hw-head { margin-top: 0.7rem; }
.hw-dot {
  color: #22d3ee;
  animation: hw-pulse 1.4s ease-in-out infinite;
}
@keyframes hw-pulse {
  50% { opacity: 0.45; }
}
.hw-dim2 { color: #71717a; }
.hw-tree {
  margin: 0.2rem 0 0 5px;
  padding-left: 14px;
  border-left: 1px solid #3f3f46;
}
.hw-row {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.16rem 0;
  font-size: 0.7rem;
  white-space: nowrap;
}
.hw-b-date {
  color: #71717a;
  font-variant-numeric: tabular-nums;
}
.hw-b-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #d4d4d8;
}
.hw-row.is-struck .hw-b-text {
  color: #71717a;
  text-decoration: line-through;
}
.hw-b-src { color: #5b7f93; }
.hw-b-tag { color: #b45309; }
.hw-row.is-match {
  margin: 0.05rem -8px;
  padding: 0.16rem 8px;
  background: rgba(34, 211, 238, 0.1);
}
.hw-row.is-match .hw-b-text { color: #a5f3fc; }
.hw-row.is-match .hw-b-src { color: #67e8f9; }
.hw-followup { margin-top: 0.85rem; }
.hw-ctx-quote {
  margin: 0;
  color: #d4d4d8;
  font-style: normal;
  line-height: 1.55;
  white-space: normal;
}
.hw-ctx-attr {
  margin-top: 0.3rem;
  color: #5b7f93;
  font-size: 0.66rem;
}
.hw-provenance {
  margin-top: 0.3rem;
  padding-top: 0.4rem;
  border-top: 1px solid #27272a;
  color: #5b7f93;
  font-size: 0.66rem;
  white-space: normal;
}
.hw-prov-expand { color: #22d3ee; }

.hw-rise { animation: hw-rise 0.4s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes hw-rise {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.hw-fade { animation: hw-fade 0.4s ease both; }
@keyframes hw-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .hw-layer,
  .hw-rise,
  .hw-fade,
  .hw-cursor,
  .hw-dots i,
  .hw-caret {
    animation: none !important;
    transition: none !important;
  }
}
.terminal-bar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #d7e4e6;
  padding: 0 0 10px;
  color: #5e6970;
  font: 700 11px/1.2 JetBrains Mono, monospace;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.demo-label {
  display: block;
  margin-bottom: 6px;
  color: #5e6970;
  font: 700 10px/1.2 JetBrains Mono, monospace;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.problem {
  padding: 8px 0 40px;
  border-top: 1px solid var(--line);
}
.hook {
  margin: 36px 0 12px;
  font-size: clamp(32px, 7vw, 44px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
}
.problem-lead {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 18px;
  max-width: 34rem;
}

.flow {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}
.flow li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  padding: 16px 16px;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.flow li:last-child { border-bottom: 0; }
.flow-num {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal);
  font: 700 13px/1 JetBrains Mono, monospace;
}
.flow strong {
  display: block;
  margin-bottom: 4px;
  font-size: 16px;
}
.flow p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}
.flow-close {
  margin: 0 0 28px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  max-width: 34rem;
}

.quote {
  margin: 0 0 20px;
  padding: 0 0 0 16px;
  border-left: 3px solid var(--teal);
  background: transparent;
}
.quote p {
  margin: 0 0 10px;
  font-size: 17px;
  line-height: 1.5;
}
.quote cite,
.stat cite,
.card cite {
  display: block;
  color: #666;
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.quote cite a,
.stat cite a { text-decoration: underline; text-underline-offset: 2px; }

/* Jin green whitespace feedback: tight gap between quote and stat */
.stat {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: start;
  margin: 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
}
.stat-num {
  color: var(--teal);
  font-size: clamp(42px, 10vw, 56px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.04em;
}
.stat-copy p {
  margin: 2px 0 8px;
  font-size: 16px;
  line-height: 1.4;
}

.solve-section {
  padding: 48px 0 40px;
  border-top: 1px solid var(--line);
}
.solve-section h2 {
  margin: 0 0 12px;
  font-size: clamp(30px, 6.5vw, 42px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.12;
  max-width: 16ch;
  text-wrap: balance;
}
.solve-sub {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.5;
  max-width: 36rem;
}

/* Upstream flow — site/ UpstreamLayer.svelte (main) */
.upstream-flow {
  margin-top: 8px;
  padding: 20px 0 8px;
}
.node-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 6px;
  background: #f4f4f5;
  border: 1px solid #e4e4e7;
}
.node-tile-sm {
  width: 19px;
  height: 19px;
  border-radius: 5px;
}
.node-glyph { display: block; }

.flow-desktop {
  position: relative;
  width: 100%;
  aspect-ratio: 1000 / 460;
  display: none;
}
.flow-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.path-label {
  position: absolute;
  z-index: 1;
  font-family: JetBrains Mono, ui-monospace, monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  transform: translateX(-50%);
  white-space: nowrap;
  opacity: 0;
}
.label-faulty { color: #dc2626; }
.label-gov { color: #0e7490; }

.conflict-badge {
  position: absolute;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transform: translate(-50%, -50%);
  padding: 3px 9px 3px 6px;
  border-radius: 999px;
  border: 1px solid rgba(220, 38, 38, 0.3);
  background: #fff;
  font-family: JetBrains Mono, ui-monospace, monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #dc2626;
  box-shadow: 0 4px 12px rgba(24, 24, 27, 0.08);
  opacity: 0;
}
.conflict-badge svg { width: 12px; height: 12px; }

.dnode {
  position: absolute;
  z-index: 2;
  width: 27%;
  min-width: 210px;
  padding: 11px 13px;
  border: 1px solid #e4e4e7;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(24, 24, 27, 0.07);
  transform: translate(-50%, -50%);
  opacity: 0;
}
.dnode-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dnode-src {
  font-size: 13px;
  font-weight: 600;
  color: #18181b;
}
.dnode-meta {
  margin-left: auto;
  font-family: JetBrains Mono, ui-monospace, monospace;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #a1a1aa;
}
.dnode-decision {
  margin: 9px 0 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: #52525b;
}
.dnode-decision strong {
  font-weight: 600;
  color: #18181b;
}

.approval {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 22%;
  min-width: 200px;
  padding: 14px 14px 13px;
  border: 1.5px solid rgba(8, 145, 178, 0.45);
  border-radius: 14px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(8, 145, 178, 0.07), transparent 75%),
    #fff;
  box-shadow:
    0 0 0 1px rgba(8, 145, 178, 0.05),
    0 18px 46px rgba(8, 145, 178, 0.16);
  transform: translate(-50%, -50%) scale(0.95);
  opacity: 0;
}
.approval-head {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #0891b2;
}
.approval-name {
  font-size: 14px;
  font-weight: 700;
  color: #18181b;
}
.approval-tag {
  margin-left: auto;
  font-family: JetBrains Mono, ui-monospace, monospace;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0891b2;
}
.approval-note {
  display: block;
  margin: 7px 0 11px;
  font-family: JetBrains Mono, ui-monospace, monospace;
  font-size: 9.5px;
  letter-spacing: 0.02em;
  color: #a1a1aa;
}
.approval-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 8px;
  border: 1px solid #eee;
}
.approval-row + .approval-row { margin-top: 7px; }
.is-approved {
  border-color: rgba(22, 163, 74, 0.28);
  background: rgba(22, 163, 74, 0.05);
}
.is-rejected {
  border-color: rgba(220, 38, 38, 0.25);
  background: rgba(220, 38, 38, 0.04);
}
.approval-text {
  font-size: 11.5px;
  font-weight: 500;
  color: #3f3f46;
}
.verdict {
  margin-left: auto;
  font-family: JetBrains Mono, ui-monospace, monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 5px;
}
.verdict.ok { color: #15803d; background: #dcfce7; }
.verdict.no { color: #b91c1c; background: #fee2e2; }
.strk {
  text-decoration: line-through;
  text-decoration-color: rgba(220, 38, 38, 0.6);
  color: #a1a1aa;
}

.agentctx {
  position: absolute;
  z-index: 2;
  width: 21%;
  min-width: 188px;
  padding: 12px 13px 13px;
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(24, 24, 27, 0.07);
  transform: translate(-50%, -50%);
  opacity: 0;
}
.agentctx-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 11px;
  font-size: 13px;
  font-weight: 600;
  color: #18181b;
}
.ctx-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 500;
  padding: 5px 0;
}
.ctx-item + .ctx-item { border-top: 1px solid #f4f4f5; }
.ctx-icon { font-size: 11px; line-height: 1; }
.ctx-good { color: #15803d; }
.ctx-bad { color: #dc2626; }

.line-in,
.line-gov,
.line-faulty {
  stroke-dasharray: 520;
  stroke-dashoffset: 520;
}
.pulse { opacity: 0; }

.upstream-flow.is-live .flow-desktop .dnode {
  animation: up-node-in 0.55s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.upstream-flow.is-live .flow-desktop .conflict-badge {
  animation: up-fade-in 0.5s ease 0.5s forwards;
}
.upstream-flow.is-live .flow-desktop .line-in {
  animation: up-draw 0.8s ease 0.55s forwards;
}
.upstream-flow.is-live .flow-desktop .approval {
  animation: up-gate-in 0.65s cubic-bezier(0.16, 1, 0.3, 1) 0.7s forwards;
}
.upstream-flow.is-live .flow-desktop .line-gov {
  animation: up-draw 0.8s ease 1.25s forwards;
}
.upstream-flow.is-live .flow-desktop .agentctx {
  animation: up-node-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) 1.35s forwards;
}
.upstream-flow.is-live .flow-desktop .line-faulty {
  animation: up-draw 1s ease 1.7s forwards;
}
.upstream-flow.is-live .flow-desktop .label-gov {
  animation: up-fade-in 0.5s ease 1.5s forwards;
}
.upstream-flow.is-live .flow-desktop .label-faulty {
  animation: up-fade-in 0.5s ease 2.1s forwards;
}
.upstream-flow.is-live .flow-desktop .pulse {
  animation: up-fade-in 0.6s ease 1.6s forwards;
}

@keyframes up-node-in {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.92); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@keyframes up-gate-in {
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@keyframes up-draw {
  to { stroke-dashoffset: 0; }
}
@keyframes up-fade-in {
  to { opacity: 1; }
}

.flow-mobile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.dnode-m,
.approval-m,
.agentctx-m {
  position: static;
  transform: none;
  opacity: 1;
  width: 100%;
  max-width: 320px;
  min-width: 0;
}
.conflict-m {
  position: static;
  transform: none;
  opacity: 1;
}
.down-arrow {
  width: 14px;
  height: 16px;
}
.arrow-pair {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.faulty-m {
  font-family: JetBrains Mono, ui-monospace, monospace;
  font-size: 10px;
  font-weight: 600;
  color: #dc2626;
}

@media (min-width: 768px) {
  .flow-desktop { display: block; }
  .flow-mobile { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .flow-desktop .dnode,
  .flow-desktop .approval,
  .flow-desktop .agentctx,
  .flow-desktop .conflict-badge,
  .flow-desktop .path-label,
  .flow-desktop .pulse {
    opacity: 1 !important;
    animation: none !important;
  }
  .flow-desktop .dnode,
  .flow-desktop .agentctx {
    transform: translate(-50%, -50%) !important;
  }
  .flow-desktop .approval {
    transform: translate(-50%, -50%) scale(1) !important;
  }
  .line-in,
  .line-gov,
  .line-faulty {
    stroke-dashoffset: 0;
  }
}


.outcomes {
  padding: 48px 0 40px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 72px;
}
.outcomes h2 {
  margin: 0 0 24px;
  font-size: clamp(28px, 6vw, 40px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.12;
  max-width: 18ch;
}
.outcome-grid {
  display: grid;
  gap: 14px;
}
.card {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 18px;
}
.card-kicker {
  margin: 0 0 8px;
  color: var(--teal);
  font: 700 12px/1.2 JetBrains Mono, monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.card-stat {
  margin: 0 0 8px;
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}
.card h3 {
  margin: 0 0 8px;
  font-size: 20px;
  letter-spacing: -0.03em;
}
.card p {
  margin: 0 0 10px;
  color: var(--muted);
}

.showcase-grid {
  display: grid;
  gap: 28px;
  margin-top: 36px;
}
.showcase { margin: 0; }
.showcase-frame {
  min-height: 360px;
  height: 360px;
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  background: #fafaf9;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(24, 24, 27, 0.06);
  transition: box-shadow 0.4s ease, opacity 0.4s ease, filter 0.4s ease;
}
.showcase:not(.is-active) .showcase-frame {
  opacity: 0.72;
  filter: saturate(0.85);
}
.showcase.is-active .showcase-frame {
  box-shadow:
    0 0 0 1px rgba(8, 145, 178, 0.25),
    0 16px 40px rgba(8, 145, 178, 0.12);
}
.showcase-frame-dark {
  background: #18181b;
  border-color: #27272a;
}
.showcase-cap { margin-top: 14px; }
.showcase-title {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.showcase-text {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

/* ---- Controlled corpus (site/ ControlledCorpusAnimation) ---- */
.corpus-demo {
  height: 100%;
  min-height: 360px;
  overflow: hidden;
  background: #fafaf9;
  color: #18181b;
  text-align: left;
}
.cc-split {
  display: grid;
  grid-template-columns: 40% 60%;
  height: 100%;
  min-height: 360px;
}
.cc-ledger {
  border-right: 1px solid #e5e5e5;
  background: #fafaf9;
  padding: 10px 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.cc-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 7px 9px;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 5px;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--i) * 90ms);
}
.cc-row.is-on { opacity: 1; transform: none; }
.cc-row.is-proposed { border-left: 2px solid #f59e0b; }
.cc-row.selected { border-color: #0891b2; background: #ecfeff; }
.cc-row-top { display: flex; align-items: center; gap: 5px; }
.cc-status { font-size: 9px; color: #10b981; line-height: 1; }
.cc-status.warn { color: #f59e0b; }
.cc-badge {
  padding: 1px 5px;
  border-radius: 4px;
  font-family: JetBrains Mono, ui-monospace, monospace;
  font-size: 8px;
  font-weight: 600;
  border: 1px solid;
  text-transform: lowercase;
}
.cc-badge-proposed { background: #fef3c7; color: #92400e; border-color: #fcd34d; }
.cc-badge-approved { background: #f0fdf4; color: #166534; border-color: #86efac; }
.cc-summary {
  font-size: 11px;
  font-weight: 600;
  color: #18181b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cc-feature { font-size: 9px; color: #a1a1aa; }
.cc-detail {
  position: relative;
  overflow: hidden;
  background: #fff;
  padding: 14px 16px;
}
.cc-scroll {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.cc-fall {
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.5s ease, transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.cc-fall.on { opacity: 1; transform: none; }
.cc-region.cc-fall { transition-delay: calc(var(--fi) * 110ms); }
.cc-head-top { display: flex; align-items: center; gap: 6px; }
.cc-title {
  margin: 8px 0 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: #18181b;
}
.cc-crumb {
  display: block;
  margin-top: 3px;
  font-family: JetBrains Mono, ui-monospace, monospace;
  font-size: 10px;
  color: #a1a1aa;
}
.cc-section h4 {
  margin: 0 0 6px;
  font-family: JetBrains Mono, ui-monospace, monospace;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9ca3af;
}
.cc-evidence { font-size: 11px; }
.cc-ev-meta { display: flex; align-items: baseline; gap: 8px; }
.cc-ev-meta code {
  font-family: JetBrains Mono, ui-monospace, monospace;
  font-size: 10px;
  color: #4338ca;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cc-pointer {
  font-family: JetBrains Mono, ui-monospace, monospace;
  font-size: 9px;
  color: #a1a1aa;
  flex: 0 0 auto;
}
.cc-evidence blockquote {
  margin: 5px 0 0;
  padding: 6px 10px;
  border-left: 3px solid #e5e5e5;
  border-radius: 0 6px 6px 0;
  background: #f9fafb;
  color: #374151;
  font-size: 11px;
  font-style: italic;
  line-height: 1.4;
}
.cc-cite-prov {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 6px;
}
.cc-cite-tag {
  font-family: JetBrains Mono, ui-monospace, monospace;
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #92400e;
  background: #fffbeb;
  border: 1px dashed #fbbf24;
  border-radius: 4px;
  padding: 1px 5px;
}
.cc-cite-by {
  font-family: JetBrains Mono, ui-monospace, monospace;
  font-size: 9px;
  color: #a1a1aa;
}
.cc-region { font-size: 11px; line-height: 1.6; }
.cc-region code {
  font-family: JetBrains Mono, ui-monospace, monospace;
  font-size: 10.5px;
  color: #4338ca;
}
.cc-conflict {
  padding: 9px 12px;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 7px;
  color: #92400e;
}
.cc-conflict h4 {
  margin: 0 0 4px;
  font-size: 11.5px;
  font-weight: 700;
  color: #92400e;
}
.cc-conflict p { margin: 0; font-size: 10px; line-height: 1.45; }
.cc-accept-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 11px;
}
.cc-btn {
  border-radius: 6px;
  padding: 7px 14px;
  font-size: 11px;
  font-weight: 600;
}
.cc-accept {
  border: 1px solid #e5e5e5;
  background: #f4f4f5;
  color: #c4c4c8;
  cursor: not-allowed;
}
.cc-reject {
  border: 1px solid #e5e5e5;
  background: #fff;
  color: #3f3f46;
  cursor: pointer;
}

/* ---- Curation terminal (site/ CurationTerminal) ---- */
.terminal-demo {
  height: 100%;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #18181b;
  color: #e4e4e7;
  text-align: left;
}
.terminal-demo [hidden] { display: none !important; }
.ct-chrome {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid #27272a;
}
.ct-dot { width: 11px; height: 11px; border-radius: 999px; }
.ct-r { background: #ff5f57; }
.ct-y { background: #febc2e; }
.ct-g { background: #28c840; }
.ct-path {
  margin-left: 0.5rem;
  font-family: JetBrains Mono, ui-monospace, monospace;
  font-size: 0.68rem;
  color: #71717a;
}
.ct-body {
  flex: 1;
  position: relative;
  overflow: hidden;
  padding: 1rem 1.1rem;
  font-family: JetBrains Mono, ui-monospace, monospace;
  font-size: 0.74rem;
  line-height: 1.7;
  color: #e4e4e7;
}
.ct-scroll {
  position: relative;
  display: flex;
  flex-direction: column;
  transition: transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}
.ct-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.ct-head { margin-top: 0.7rem; }
.ct-cand-head { margin-top: 1rem; }
.ct-ind {
  color: #22d3ee;
  animation: ct-pulse 1.4s ease-in-out infinite;
}
.ct-ind-amber { color: #fbbf24; }
@keyframes ct-pulse { 50% { opacity: 0.45; } }
.ct-dim { color: #71717a; }
.ct-tree {
  margin: 0.2rem 0 0 5px;
  padding-left: 14px;
  border-left: 1px solid #3f3f46;
}
.ct-tree-amber { border-left-color: #92691a; }
.ct-row {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.16rem 0;
  font-size: 0.7rem;
  white-space: nowrap;
}
.ct-date { color: #71717a; font-variant-numeric: tabular-nums; }
.ct-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #d4d4d8;
}
.ct-src { color: #5b7f93; }
.ct-src-row { padding: 0.3rem 0; }
.ct-src-row + .ct-src-row { border-top: 1px solid #27272a; }
.ct-src-meta {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  font-size: 0.7rem;
}
.ct-num {
  color: #71717a;
  font-variant-numeric: tabular-nums;
  flex: 0 0 auto;
}
.ct-sentence {
  margin-top: 0.15rem;
  padding-left: 1.4rem;
  font-size: 0.7rem;
  line-height: 1.5;
  color: #d4d4d8;
  white-space: normal;
}
.ct-gen { color: #d4d4d8; }
.ct-ask {
  margin-top: 0.7rem;
  padding-top: 0.5rem;
  border-top: 1px solid #27272a;
  color: #f4f4f5;
}
.ct-opt { color: #fbbf24; }
.ct-yes { color: #34d399; }
.ct-caret {
  display: inline-block;
  width: 7px;
  height: 14px;
  background: #22d3ee;
  animation: ct-caret 1s step-end infinite;
  vertical-align: middle;
}
@keyframes ct-caret { 50% { opacity: 0; } }
.ct-rise { animation: ct-rise 0.4s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes ct-rise {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.ct-fade { animation: ct-fade 0.4s ease both; }
@keyframes ct-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .cc-row, .cc-scroll, .cc-fall, .ct-scroll, .ct-rise, .ct-fade, .ct-caret, .ct-ind {
    animation: none !important;
    transition: none !important;
  }
}


.roadmap-grid {
  display: grid;
  gap: 14px;
  margin: 36px 0;
}
.roadmap-grid article {
  border-top: 2px solid var(--cyan);
  padding-top: 14px;
}
.roadmap-grid article:last-child { border-top-color: var(--purple); }
.roadmap-grid h2 {
  margin: 0 0 7px;
  font-size: 20px;
  letter-spacing: -0.03em;
}
.roadmap-grid p:last-child {
  margin: 0;
  color: var(--muted);
}

.cta {
  padding: 48px 0 56px;
  border-top: 1px solid var(--line);
}
.cta h2 {
  margin: 0 0 14px;
  font-size: clamp(28px, 6vw, 40px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.12;
  max-width: 18ch;
}
.cta p {
  margin: 0 0 24px;
  color: var(--muted);
  max-width: 36rem;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}
.contact-form {
  display: grid;
  gap: 14px;
  margin-top: 8px;
  max-width: 420px;
}
.contact-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}
.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}
.contact-form select { appearance: auto; }
.contact-form textarea { resize: vertical; }
.contact-form .button {
  width: fit-content;
  margin-top: 4px;
  border: 0;
  cursor: pointer;
}
.contact-form .button:disabled { cursor: wait; opacity: .65; }
.optional {
  color: #666;
  font-size: 12px;
  font-weight: 400;
}
.form-status {
  min-height: 1.5em;
  margin: 0;
  font-size: 14px;
}
.form-status.is-success { color: #17633f; }
.form-status.is-error { color: #9f1c14; }
.form-status a { text-decoration: underline; text-underline-offset: 2px; }
.form-note { margin-top: 18px; }

@media (min-width: 760px) {
  :root { --pad: 32px; --max: 1100px; }
  /* Two-column like site/ main homepage: copy + preflight hero image */
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 1.1fr);
    align-items: center;
    gap: 56px;
  }
  .hero h1 { font-size: clamp(42px, 5vw, 62px); max-width: 16ch; }
  .outcome-grid,
  .roadmap-grid,
  .showcase-grid {
    grid-template-columns: 1fr 1fr;
  }
  .solve-section h2,
  .outcomes h2,
  .cta h2 {
    max-width: 20ch;
  }
}

@media (max-width: 620px) {
  .site-nav > a:not(.button) { display: none; }
  .button-small {
    min-height: 38px;
    padding: 7px 11px;
    font-size: 13px;
  }
  .site-footer { flex-direction: column; }
  .footer-links { flex-wrap: wrap; gap: 10px 18px; }
}

@media (max-width: 420px) {
  .hero h1 {
    font-size: 32px;
    max-width: none;
  }
  .stat {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .ledger-demo { grid-template-columns: 1fr; }
  .demo-list { border-right: 0; border-bottom: 1px solid var(--line); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
