@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=DM+Sans:wght@400;500;600;700&family=Fraunces:opsz,wght@9..144,500;9..144,600&display=swap");

:root {
  color-scheme: light;
  --ink: #241f18;
  --muted: #827968;
  --paper: #f4efdf;
  --card: #fbf8ef;
  --line: #e5decb;
  --gold: #bb8740;
  --gold-dark: #745021;
  --green: #41694f;
  --red: #984a3d;
  --mono: "DM Mono", "Cascadia Code", Consolas, monospace;
  --sans: "DM Sans", "Segoe UI", sans-serif;
  --serif: "Fraunces", Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 6rem; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 76% 12%, rgba(232, 209, 153, 0.2), transparent 32rem),
    var(--paper);
  font: 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font: inherit; }
button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 3px solid #b9853f;
  outline-offset: 4px;
}

.site-header, main, .site-footer {
  width: min(1160px, calc(100% - 64px));
  margin-inline: auto;
}
.site-header {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(104, 86, 54, 0.14);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.22em;
}
.brand-mark { color: var(--gold-dark); font-size: 24px; line-height: 1; }
nav { display: flex; align-items: center; gap: 30px; }
nav a, .site-footer > a:last-child {
  color: #5f5749;
  font-size: 13px;
  text-decoration: none;
  transition: color 160ms ease;
}
nav a:hover, .site-footer > a:last-child:hover, .text-link:hover { color: var(--gold-dark); }
.nav-github { font-weight: 600; }

.hero {
  min-height: 500px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
  gap: 48px;
  align-items: center;
  padding: 58px 0 72px;
}
.eyebrow, .card-kicker {
  color: var(--gold-dark);
  font: 500 11px/1.4 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.hero h1 {
  max-width: 660px;
  margin: 18px 0 20px;
  font: 500 clamp(44px, 6vw, 72px)/0.99 var(--serif);
  letter-spacing: -0.055em;
}
.hero h1 em { color: #967044; font-weight: 500; }
.lede { max-width: 570px; color: #625b4e; font-size: 17px; line-height: 1.7; }
.lede b { color: var(--ink); font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: 28px; }
.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button-primary { color: #fffaf0; background: #30281d; box-shadow: 0 5px 14px rgba(45, 35, 23, 0.12); }
.button-primary:hover:not(:disabled) { background: #4a3924; }
.button-quiet { color: #615948; background: transparent; border-color: var(--line); }
.button-quiet:hover:not(:disabled) { color: var(--ink); background: #f5f0e4; border-color: #c9bea7; }
.button:disabled { cursor: not-allowed; opacity: 0.5; }
.hero-note { color: var(--muted); font-size: 12px; }
.hero-proof { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 34px; color: #6f6859; font-size: 11px; }
.hero-proof span { display: inline-flex; align-items: center; gap: 7px; }
.proof-dot { width: 6px; height: 6px; border-radius: 50%; background: #a88851; }

.rook-stage {
  min-height: 350px;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(160, 130, 79, 0.18);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(255, 252, 242, 0.85), rgba(231, 218, 188, 0.6));
  box-shadow: 0 22px 65px rgba(103, 79, 38, 0.08), inset 0 1px rgba(255,255,255,0.7);
}
.rook-stage::before {
  position: absolute;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  background: rgba(226, 190, 117, 0.22);
  filter: blur(36px);
  content: "";
}
#rook { z-index: 1; width: 220px; overflow: visible; filter: drop-shadow(0 18px 15px rgba(82, 56, 25, 0.2)); animation: rook-float 5s ease-in-out infinite; }
.facet { stroke: #4a3822; stroke-width: 1.5; stroke-linejoin: round; }
.shell { fill: url(#g); }
.shard { fill: url(#g-light); transition: opacity 700ms ease, transform 700ms ease; transform-box: fill-box; transform-origin: center; }
.shard.fat:nth-of-type(3) { fill: #c79343; }
.molt-done .shard.fat { opacity: 0.14; transform: translate(18px, -10px) rotate(14deg); }
.stage-orbit { position: absolute; z-index: 0; width: 270px; height: 270px; border: 1px solid rgba(159, 129, 78, 0.18); border-radius: 50%; }
.orbit-two { width: 330px; height: 330px; border-style: dashed; opacity: 0.55; }
.rook-label, .stage-caption {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #766b58;
  font: 10px var(--mono);
  letter-spacing: 0.04em;
}
.rook-label { top: 20px; right: 22px; left: 22px; text-transform: uppercase; }
.rook-label span:first-child { color: var(--gold-dark); font-weight: 500; }
.stage-caption { right: 20px; bottom: 17px; left: 20px; justify-content: center; gap: 8px; }
.stage-spark { color: var(--gold-dark); font-size: 15px; }
@keyframes rook-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.demo-section { padding: 45px 0 86px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 24px; }
.section-heading h2, .integration-copy h2 {
  margin: 8px 0 0;
  font: 500 clamp(30px, 4vw, 42px)/1.08 var(--serif);
  letter-spacing: -0.035em;
}
.section-aside { max-width: 340px; margin: 0 0 3px; color: var(--muted); font-size: 13px; }
.demo-console {
  overflow: hidden;
  border: 1px solid #e3dac6;
  border-radius: 13px;
  background: rgba(251, 248, 239, 0.88);
  box-shadow: 0 16px 44px rgba(61, 48, 28, 0.07);
}
.demo-toolbar { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 20px; border-bottom: 1px solid var(--line); }
.demo-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.button-icon { color: #e6c27b; }
.button-speak { min-width: 132px; }
.run-status { display: flex; align-items: center; gap: 9px; color: #766d5e; font-size: 12px; }
.status-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: #b69e71; }
.status-dot.is-working { background: #c48b3f; animation: pulse 1s infinite alternate; }
.status-dot.is-success { background: var(--green); }
.status-dot.is-error { background: var(--red); }
@keyframes pulse { to { opacity: 0.35; } }
.storage-notice { display: flex; align-items: flex-start; gap: 10px; padding: 11px 20px; color: #6b634f; background: #f3eddd; font-size: 11px; line-height: 1.5; }
.storage-notice.is-atlas { color: #42664d; background: #edf3e8; }
.storage-notice.is-error { color: #8f4338; background: #f7e9e4; }
.storage-icon { flex: 0 0 auto; font-size: 13px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 16px; }
.harness-card { min-width: 0; padding: 19px 20px 16px; border: 1px solid #e9e1d0; border-radius: 9px; background: rgba(255, 253, 247, 0.78); }
.after-card { border-color: #dfe6d8; background: #fbfcf7; }
.card-heading { min-height: 49px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.card-kicker { color: #8a806e; font-size: 9px; }
.card-heading h3 { margin: 2px 0 0; font: 500 23px var(--serif); }
.generation-tag, .quality-badge { padding: 5px 8px; border-radius: 4px; color: #786b53; background: #f0eadb; font: 9px var(--mono); letter-spacing: 0.04em; }
.quality-badge { color: #42664d; background: #e9f0e5; }
.quality-badge.is-fail { color: #8e453b; background: #f6e7e2; }
.meter { min-height: 20px; margin: 5px 0 12px; color: #856234; font: 11px var(--mono); font-variant-numeric: tabular-nums; }
.organ-list { min-height: 110px; display: grid; align-content: start; margin: 0; padding: 0; list-style: none; }
.organ-list li {
  position: relative;
  padding: 7px 2px 7px 15px;
  border-bottom: 1px solid rgba(224, 216, 198, 0.7);
  color: #514b40;
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.organ-list li::before { position: absolute; top: 11px; left: 2px; width: 5px; height: 5px; border-radius: 50%; background: #b3925e; content: ""; }
.organ-list li.spine { color: #675436; }
.organ-list li.spine::before { background: #9a7436; }
.organ-list li.dead { color: #aaa08d; text-decoration: line-through; }
.organ-list li.dead::before { background: #c5bcaa; }
.organ-list li.empty-state { border: 0; color: #a49a87; font-style: italic; }
.organ-list li.empty-state::before { display: none; }
.result-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 13px 20px 15px; border-top: 1px solid var(--line); }
.estimate-note { margin: 0; color: #89806f; font-size: 10px; }
.estimate-note span { color: var(--gold-dark); }
.trace-details { position: relative; flex: 0 0 auto; }
.trace-details summary { color: #766143; cursor: pointer; font-size: 11px; }
.trace-details pre { position: absolute; z-index: 3; right: 0; bottom: 28px; width: min(520px, 80vw); max-height: 310px; overflow: auto; margin: 0; padding: 16px; border: 1px solid #4b4030; border-radius: 7px; color: #f2dfae; background: #28231b; box-shadow: 0 14px 36px rgba(30, 23, 15, 0.2); font: 10px/1.5 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }

.integrate-section { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(390px, 1.1fr); gap: 66px; align-items: center; padding: 58px 0 78px; border-top: 1px solid rgba(104, 86, 54, 0.16); }
.integration-copy > p:not(.eyebrow) { max-width: 450px; color: #6e6658; font-size: 14px; line-height: 1.75; }
.text-link { display: inline-flex; gap: 7px; margin-top: 9px; color: #76552d; font-size: 12px; font-weight: 600; text-decoration: none; }
.code-card { overflow: hidden; border: 1px solid #40372a; border-radius: 10px; color: #f1e6ca; background: #29251e; box-shadow: 0 16px 38px rgba(39, 31, 21, 0.13); }
.code-bar { height: 39px; display: flex; align-items: center; gap: 6px; padding: 0 14px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.code-bar > span { width: 7px; height: 7px; border-radius: 50%; background: #a66d50; }
.code-bar > span:nth-child(2) { background: #b89453; }
.code-bar > span:nth-child(3) { background: #688663; }
.code-bar label { margin-left: 8px; color: #a99d86; font: 9px var(--mono); }
.code-card pre { overflow-x: auto; margin: 0; padding: 21px; color: #f3e7ca; font: 11px/1.8 var(--mono); }
.code-comment { color: #ab9c80; }
.code-footnote { display: flex; align-items: center; gap: 7px; margin: 0; padding: 10px 16px; border-top: 1px solid rgba(255,255,255,0.08); color: #aea48f; font-size: 10px; }
.api-dot { width: 6px; height: 6px; border-radius: 50%; background: #8ba77b; }
.site-footer { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-top: 1px solid rgba(104, 86, 54, 0.16); }
.site-footer .brand { font-size: 11px; }
.site-footer .brand-mark { font-size: 19px; }
.site-footer > span { color: #948a77; font-size: 11px; }

/* ---------- Life layer: depth, motion, texture ---------- */
:root {
  --gold-grad: linear-gradient(135deg, #e9c47c 0%, #bb8740 55%, #8a5f27 100%);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
body {
  background:
    radial-gradient(ellipse 60rem 34rem at 82% -6%, rgba(236, 200, 128, 0.38), transparent 70%),
    radial-gradient(ellipse 46rem 30rem at -8% 38%, rgba(190, 150, 86, 0.14), transparent 70%),
    radial-gradient(ellipse 50rem 26rem at 70% 96%, rgba(120, 150, 110, 0.10), transparent 70%),
    var(--paper);
  background-attachment: fixed;
}
body::before {
  position: fixed; inset: 0; z-index: 100; pointer-events: none; opacity: 0.35; mix-blend-mode: multiply; content: "";
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.45  0 0 0 0 0.36  0 0 0 0 0.2  0 0 0 0.16 0'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>");
}

.site-header {
  position: sticky; top: 0; z-index: 50; width: 100%; padding-inline: max(32px, calc((100% - 1160px) / 2));
  background: rgba(244, 239, 223, 0.72); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
}
.brand-mark { display: inline-block; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; transition: transform 600ms var(--ease); }
.brand-icon { display: block; border-radius: 8px; transition: transform 500ms var(--ease); }
.brand:hover .brand-icon { transform: rotate(-8deg) scale(1.08); }
nav a:not(.nav-github) { position: relative; }
nav a:not(.nav-github)::after { position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform 300ms var(--ease); content: ""; }
nav a:not(.nav-github):hover::after { transform: scaleX(1); }
.nav-github { padding: 7px 14px; border: 1px solid rgba(116, 80, 33, 0.28); border-radius: 999px; background: rgba(255, 252, 242, 0.6); transition: all 200ms ease; }
.nav-github:hover { background: #30281d; color: #fff6e0 !important; border-color: #30281d; }

/* Hero entrance */
.hero-copy > * { opacity: 0; animation: rise 800ms var(--ease) forwards; }
.hero-copy > :nth-child(1) { animation-delay: 60ms; }
.hero-copy > :nth-child(2) { animation-delay: 160ms; }
.hero-copy > :nth-child(3) { animation-delay: 280ms; }
.hero-copy > :nth-child(4) { animation-delay: 400ms; }
.hero-copy > :nth-child(5) { animation-delay: 520ms; }
.rook-stage { opacity: 0; animation: rise 1000ms var(--ease) 250ms forwards; }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; padding: 5px 12px 5px 10px; border: 1px solid rgba(187, 135, 64, 0.3); border-radius: 999px; background: rgba(255, 249, 232, 0.7); }
.eyebrow::before { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(187, 135, 64, 0.18); animation: pulse 1.6s infinite alternate; content: ""; }
.hero h1 { font-size: clamp(48px, 6.4vw, 80px); }
.hero h1 em {
  font-style: italic; padding-right: 0.06em;
  background: linear-gradient(100deg, #b07a2e, #e2b865 45%, #8a5f27); background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: sheen 6s ease-in-out infinite alternate;
}
@keyframes sheen { to { background-position: 100% 0; } }

.button { border-radius: 10px; position: relative; overflow: hidden; }
.button-primary {
  background: linear-gradient(180deg, #43362a, #261f16); border-color: #55432d;
  box-shadow: 0 8px 22px rgba(45, 35, 23, 0.28), inset 0 1px rgba(255, 235, 190, 0.18);
}
.button-primary::after { position: absolute; inset: 0; background: linear-gradient(105deg, transparent 30%, rgba(255, 226, 150, 0.35) 50%, transparent 70%); transform: translateX(-120%); content: ""; }
.button-primary:hover:not(:disabled)::after { transform: translateX(120%); transition: transform 700ms var(--ease); }
.button-primary:hover:not(:disabled) { background: linear-gradient(180deg, #54432f, #30281d); box-shadow: 0 12px 28px rgba(45, 35, 23, 0.34), 0 0 0 4px rgba(187, 135, 64, 0.18), inset 0 1px rgba(255, 235, 190, 0.25); }
.button-primary:active:not(:disabled) { transform: translateY(1px); }
#go:not(:disabled) .button-icon { display: inline-block; animation: spin-slow 8s linear infinite; }
@keyframes spin-slow { to { transform: rotate(360deg); } }
.hero-proof span { padding: 6px 11px; border: 1px solid rgba(116, 80, 33, 0.14); border-radius: 999px; background: rgba(255, 252, 242, 0.55); }

/* Rook stage */
.rook-stage {
  border-radius: 28px; border-color: rgba(187, 135, 64, 0.3);
  background:
    radial-gradient(circle at 50% 46%, rgba(255, 233, 170, 0.75), transparent 55%),
    linear-gradient(150deg, rgba(255, 252, 242, 0.95), rgba(228, 211, 170, 0.7));
  box-shadow: 0 30px 80px rgba(120, 82, 28, 0.18), 0 2px 0 rgba(255, 255, 255, 0.8) inset, 0 0 0 1px rgba(255, 255, 255, 0.4) inset;
}
.rook-stage::after { position: absolute; inset: 0; background-image: radial-gradient(rgba(116, 80, 33, 0.16) 1px, transparent 1.2px); background-size: 18px 18px; mask-image: radial-gradient(circle at center, transparent 30%, #000 100%); -webkit-mask-image: radial-gradient(circle at center, transparent 30%, #000 100%); content: ""; pointer-events: none; }
.rook-stage::before { width: 300px; height: 300px; background: radial-gradient(circle, rgba(244, 202, 120, 0.55), transparent 65%); filter: blur(10px); animation: breathe 4s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.15); opacity: 0.75; } }
.stage-orbit { animation: orbit 40s linear infinite; }
.orbit-two { animation-duration: 70s; animation-direction: reverse; }
@keyframes orbit { to { transform: rotate(360deg); } }
.stage-orbit::after { position: absolute; top: -4px; left: 50%; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 12px 2px rgba(222, 170, 80, 0.7); content: ""; }
#rook { filter: drop-shadow(0 24px 22px rgba(82, 56, 25, 0.28)) drop-shadow(0 0 28px rgba(240, 195, 105, 0.35)); transition: transform 500ms var(--ease); cursor: pointer; }
.rook-stage:hover #rook { transform: scale(1.05) rotate(-2deg); }
.eye { transform-box: fill-box; transform-origin: center; animation: blink 5s infinite; }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 96.5% { transform: scaleY(0.1); } }
.spark { position: absolute; z-index: 2; width: 7px; height: 7px; background: #f3cf85; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: twinkle 3s ease-in-out infinite; }
.s1 { top: 22%; left: 16%; } .s2 { top: 30%; right: 14%; width: 10px; height: 10px; animation-delay: 0.8s; }
.s3 { bottom: 26%; left: 20%; width: 9px; height: 9px; animation-delay: 1.5s; } .s4 { bottom: 20%; right: 22%; animation-delay: 2.1s; }
@keyframes twinkle { 0%, 100% { opacity: 0.15; transform: scale(0.6); } 50% { opacity: 1; transform: scale(1.25); } }
.molt-done #rook { animation: rook-float 5s ease-in-out infinite, molt-pop 900ms var(--ease); }
@keyframes molt-pop { 0% { transform: scale(1); } 30% { transform: scale(1.14) rotate(-4deg); } 100% { transform: scale(1); } }

/* Marquee */
.marquee { margin: 0 0 20px; padding: 18px 0 8px; }
.marquee-label { margin: 0 0 12px; text-align: center; color: var(--muted); font: 500 11px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; }
.marquee-track { display: flex; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track > div { display: flex; flex: 0 0 auto; gap: 12px; padding-right: 12px; animation: scroll 38s linear infinite; }
.marquee-track:hover > div { animation-play-state: paused; }
.marquee-track span { white-space: nowrap; padding: 8px 15px; border: 1px dashed rgba(116, 80, 33, 0.3); border-radius: 999px; color: #8a7f69; background: rgba(255, 252, 242, 0.5); font: 12px var(--mono); text-decoration: line-through; text-decoration-color: rgba(152, 74, 61, 0.55); }
@keyframes scroll { to { transform: translateX(-100%); } }

/* Reveal */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 800ms var(--ease), transform 800ms var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.code-card.reveal { transition-delay: 150ms; }

/* Demo console */
.section-heading h2, .integration-copy h2 { font-size: clamp(34px, 4.6vw, 52px); }
.demo-console {
  position: relative; border: 1px solid rgba(187, 135, 64, 0.28); border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 253, 246, 0.92), rgba(247, 241, 224, 0.85));
  box-shadow: 0 40px 90px rgba(80, 56, 20, 0.14), 0 2px 0 rgba(255, 255, 255, 0.9) inset;
}
.demo-console::before { position: absolute; top: 0; left: 8%; right: 8%; height: 2px; background: linear-gradient(90deg, transparent, #d9a850, transparent); content: ""; }
.demo-toolbar { background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), transparent); }
.harness-card { border-radius: 16px; background: rgba(255, 254, 249, 0.85); box-shadow: 0 1px 2px rgba(80, 56, 20, 0.05), 0 10px 26px rgba(80, 56, 20, 0.05); transition: transform 300ms var(--ease), box-shadow 300ms var(--ease); }
.harness-card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(80, 56, 20, 0.06), 0 22px 40px rgba(80, 56, 20, 0.1); }
.after-card { border-color: rgba(65, 105, 79, 0.28); background: linear-gradient(180deg, #fbfdf6, #f4f8ee); }
.card-heading h3 { font-size: 28px; }
.generation-tag, .quality-badge { padding: 6px 11px; border-radius: 999px; font-size: 10px; font-weight: 500; }
.generation-tag { border: 1px solid rgba(116, 80, 33, 0.2); }
.quality-badge { border: 1px solid rgba(65, 105, 79, 0.3); animation: badge-in 600ms var(--ease); }
.quality-badge::before { content: "✓ "; }
.quality-badge.is-fail::before { content: "✕ "; }
@keyframes badge-in { from { opacity: 0; transform: scale(0.6); } }
.meter { font-size: 12px; font-weight: 500; }

.organ-list { gap: 5px; }
.organ-list li {
  display: flex; align-items: center; gap: 9px; padding: 9px 12px; border: 1px solid rgba(224, 214, 190, 0.7); border-radius: 10px;
  background: rgba(255, 255, 255, 0.6); font-size: 12px; opacity: 0; animation: organ-in 500ms var(--ease) forwards; animation-delay: calc(var(--i, 0) * 38ms);
  transition: background 200ms ease, border-color 200ms ease, transform 200ms ease;
}
.organ-list li:hover { background: #fff; border-color: rgba(187, 135, 64, 0.5); transform: translateX(3px); }
@keyframes organ-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.organ-list li::before { position: static; flex: 0 0 auto; width: 7px; height: 7px; background: var(--gold); box-shadow: 0 0 0 3px rgba(187, 135, 64, 0.15); }
.organ-title { flex: 1; min-width: 0; font-weight: 500; }
.organ-kind { flex: 0 0 auto; padding: 2px 8px; border-radius: 999px; background: #efe8d6; color: #7a6a49; font: 500 9px var(--mono); letter-spacing: 0.05em; text-transform: uppercase; }
.kind-guardrail { background: #e1ece0; color: #3b6247; }
.kind-tool { background: #f1e5c9; color: #7b5719; }
.kind-memory { background: #ece3ee; color: #6c4c78; }
.kind-rule { background: #e3e8f0; color: #43587c; }
.kind-policy { background: #f2e1dc; color: #8a4538; }
.organ-tok { flex: 0 0 auto; min-width: 52px; text-align: right; color: #9a8f77; font: 10px var(--mono); font-variant-numeric: tabular-nums; }
.organ-list li.spine { border-color: rgba(65, 105, 79, 0.35); background: linear-gradient(90deg, rgba(225, 236, 224, 0.7), rgba(255, 255, 255, 0.6)); }
.organ-list li.spine::before { background: var(--green); box-shadow: 0 0 0 3px rgba(65, 105, 79, 0.18); }
.organ-list li.spine .organ-title::after { margin-left: 8px; color: var(--green); font: 500 9px var(--mono); letter-spacing: 0.08em; content: "SPINE"; }
.organ-list li.dead { animation: organ-in 500ms var(--ease) forwards, shed 700ms var(--ease) forwards; animation-delay: calc(var(--i, 0) * 38ms), calc(450ms + var(--i, 0) * 55ms); text-decoration: none; }
.organ-list li.dead .organ-title { text-decoration: line-through; text-decoration-color: rgba(152, 74, 61, 0.6); }
@keyframes shed { to { opacity: 0.38; transform: translateX(10px) scale(0.985); filter: grayscale(1); background: rgba(240, 236, 224, 0.5); } }
.organ-list li.empty-state { display: block; padding: 28px 12px; border: 1px dashed rgba(116, 80, 33, 0.25); background: transparent; text-align: center; opacity: 1; animation: none; }
.organ-list li.empty-state:hover { transform: none; background: transparent; border-color: rgba(116, 80, 33, 0.25); }

.savings { margin: 2px 0 14px; padding: 14px 16px; border: 1px solid rgba(65, 105, 79, 0.22); border-radius: 12px; background: linear-gradient(135deg, #eaf2e3, #f6f9ee); animation: rise 600ms var(--ease); }
.savings[hidden] { display: none; }
.savings-num { display: flex; align-items: baseline; gap: 6px; color: var(--green); }
.savings-num b { font: 600 38px/1 var(--serif); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.savings-num span { font: 500 12px var(--mono); }
.savings-bar { height: 7px; margin-top: 10px; overflow: hidden; border-radius: 99px; background: rgba(65, 105, 79, 0.15); }
.savings-bar i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #5d8a6a, #8fb87d); transition: width 1.2s var(--ease) 0.2s; }

/* Integrate */
.code-card { border-radius: 16px; border-color: #4b3f2d; background: linear-gradient(180deg, #2e2920, #231f18); box-shadow: 0 34px 70px rgba(39, 31, 21, 0.28), inset 0 1px rgba(255, 235, 190, 0.08); }
.code-card pre { font-size: 12.5px; }
.code-bar > span { width: 10px; height: 10px; }
.text-link { padding: 9px 16px; border: 1px solid rgba(116, 80, 33, 0.3); border-radius: 999px; transition: all 200ms ease; }
.text-link:hover { background: #30281d; color: #fff6e0 !important; }
.site-footer { margin-top: 10px; }

@media (max-width: 760px) {
  .site-header, main, .site-footer { width: min(100% - 36px, 560px); }
  .site-header { min-height: 68px; padding-inline: 18px; }
  nav { gap: 15px; }
  nav a { font-size: 11px; }
  .hero { min-height: auto; grid-template-columns: 1fr; gap: 32px; padding: 53px 0 48px; }
  .hero h1 { max-width: 560px; font-size: clamp(45px, 12vw, 66px); }
  .lede { font-size: 15px; }
  .rook-stage { min-height: 300px; }
  #rook { width: 195px; }
  .demo-section { padding: 30px 0 55px; }
  .section-heading { display: block; }
  .section-aside { margin-top: 12px; }
  .demo-toolbar { align-items: flex-start; flex-direction: column; }
  .demo-controls { width: 100%; }
  .button-speak { margin-left: auto; }
  .run-status { min-height: 20px; }
  .cols { grid-template-columns: 1fr; padding: 11px; }
  .result-footer { align-items: flex-start; flex-direction: column; }
  .integrate-section { grid-template-columns: 1fr; gap: 28px; padding: 46px 0 54px; }
  .site-footer { min-height: 70px; flex-wrap: wrap; padding: 12px 0; }
  .site-footer > span { display: none; }
}
@media (max-width: 420px) {
  .site-header, main, .site-footer { width: calc(100% - 28px); }
  nav { gap: 10px; }
  nav a { font-size: 10px; }
  .hero-proof { gap: 12px; }
  .hero-proof span { font-size: 10px; }
  .demo-controls { gap: 6px; }
  .demo-controls .button { padding-inline: 10px; font-size: 11px; }
  .button-speak { min-width: auto; }
  .harness-card { padding: 16px 14px; }
  .site-footer > a:last-child { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal, .hero-copy > *, .rook-stage, .organ-list li { opacity: 1 !important; transform: none !important; }
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
