:root {
  --bg: #080a0b;
  --bg-soft: #0d1012;
  --panel: rgba(17, 21, 24, 0.86);
  --panel-solid: #111518;
  --panel-2: #151b1e;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #f4f6f2;
  --muted: #949e9b;
  --muted-2: #68716f;
  --accent: #c9ff5f;
  --accent-soft: rgba(201, 255, 95, 0.12);
  --cyan: #73e7dd;
  --warning: #ffd46b;
  --danger: #ff826e;
  --radius: 18px;
  --radius-sm: 11px;
  --max: 1180px;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.014) 1px, transparent 1px),
    var(--bg);
  background-size: 48px 48px;
  overflow-x: hidden;
}

::selection {
  color: #091007;
  background: var(--accent);
}

a { color: inherit; }

button, a { -webkit-tap-highlight-color: transparent; }

button { font: inherit; }

code, pre, .eyebrow, .micro-label, .concept-badge, .card-number, .demo-kicker, .panel-label {
  font-family: var(--mono);
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 1000;
  padding: 10px 14px;
  background: var(--accent);
  color: #111;
  border-radius: 8px;
}

.skip-link:focus { top: 16px; }

.ambient {
  position: fixed;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  filter: blur(130px);
  opacity: .09;
  pointer-events: none;
  z-index: -1;
}

.ambient-a {
  background: var(--accent);
  top: -190px;
  right: -120px;
}

.ambient-b {
  background: var(--cyan);
  bottom: 5vh;
  left: -250px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: min(calc(100% - 34px), 1240px);
  margin: 12px auto 0;
  min-height: 62px;
  padding: 0 15px;
  display: flex;
  align-items: center;
  gap: 24px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(8, 10, 11, .76);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 40px rgba(0,0,0,.24);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -.02em;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(201,255,95,.35);
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
  font: 700 12px var(--mono);
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}

.top-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
}

.top-nav a:hover { color: var(--text); }

.header-repo-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 10px;
  border: 1px solid rgba(201, 255, 95, .22);
  border-radius: 8px;
  color: var(--accent);
  text-decoration: none;
  font: 600 11px var(--mono);
  white-space: nowrap;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}

.header-repo-link:hover,
.header-repo-link:focus-visible {
  background: rgba(201, 255, 95, .08);
  border-color: rgba(201, 255, 95, .48);
  color: var(--text);
}

.header-repo-link span {
  font-size: 13px;
}

.concept-badge {
  padding: 7px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.section {
  width: min(calc(100% - 40px), var(--max));
  margin-inline: auto;
  padding: 110px 0;
}

.compact-section { padding-top: 40px; }

.hero {
  min-height: calc(100vh - 76px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(400px, .95fr);
  gap: 70px;
  align-items: center;
  padding-top: 82px;
}

.eyebrow {
  color: var(--accent);
  font-size: 11px;
  letter-spacing: .13em;
  font-weight: 700;
  margin-bottom: 20px;
}

.hero h1,
.section-heading h2,
.principle-left h2,
.challenge-layout h2,
.final-card h2 {
  margin: 0;
  letter-spacing: -.055em;
  line-height: .98;
}

.hero h1 {
  font-size: clamp(48px, 6.5vw, 89px);
  max-width: 790px;
}

.hero h1 span { color: #aab3af; }

.hero-lede {
  max-width: 680px;
  margin: 30px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.65;
}

.hero-lede strong { color: var(--text); font-weight: 550; }

.hero-actions, .final-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 34px;
}

.button {
  min-height: 48px;
  padding: 0 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  border-radius: 10px;
  border: 1px solid var(--line);
  text-decoration: none;
  font-weight: 650;
  font-size: 14px;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.button:hover { transform: translateY(-2px); }

.button-primary {
  background: var(--accent);
  color: #11150e;
  border-color: var(--accent);
}

.button-ghost {
  background: rgba(255,255,255,.025);
  color: var(--text);
}

.button-ghost:hover { border-color: var(--line-strong); }

.hero-rule {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 25px;
  color: var(--muted);
  font-size: 13px;
}

.hero-rule strong { color: var(--text); }

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(201,255,95,.4);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  70% { box-shadow: 0 0 0 9px rgba(201,255,95,0); }
  100% { box-shadow: 0 0 0 0 rgba(201,255,95,0); }
}

.terminal-window {
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: #0b0e10;
  box-shadow: 0 40px 100px rgba(0,0,0,.35);
  overflow: hidden;
  transform: rotate(1.5deg);
}

.terminal-bar {
  min-height: 49px;
  padding: 0 15px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font: 11px var(--mono);
}

.window-dots { display: flex; gap: 6px; }
.window-dots i { width: 8px; height: 8px; border-radius: 50%; background: #394045; }
.terminal-bar > span:nth-child(2) { text-align: center; }

.terminal-live {
  justify-self: end;
  color: var(--accent);
  font-weight: 700;
}

.lease-preview { padding: 30px; }

.lease-preview-top, .claim-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 15px;
}

.micro-label {
  display: inline-block;
  color: var(--muted-2);
  font-size: 10px;
  letter-spacing: .13em;
  font-weight: 700;
}

.lease-preview h3 {
  margin: 7px 0 0;
  font: 600 24px var(--mono);
  letter-spacing: -.04em;
}

.status {
  display: inline-flex;
  align-items: center;
  padding: 5px 7px;
  border-radius: 6px;
  font: 700 9px var(--mono);
  letter-spacing: .08em;
  white-space: nowrap;
}

.status-active {
  color: var(--accent);
  border: 1px solid rgba(201,255,95,.25);
  background: rgba(201,255,95,.08);
}

.status-recheck {
  color: var(--warning);
  border: 1px solid rgba(255,212,107,.25);
  background: rgba(255,212,107,.08);
}

.status-disputed {
  color: var(--danger);
  border: 1px solid rgba(255,130,110,.25);
  background: rgba(255,130,110,.08);
}

.claim-grid {
  margin: 30px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.claim-grid div {
  padding: 14px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.claim-grid div:nth-child(2n) { border-right: 0; }
.claim-grid div:nth-last-child(-n+2) { border-bottom: 0; }

.claim-grid dt, .interactive-claim dt {
  color: var(--muted-2);
  font: 9px var(--mono);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.claim-grid dd, .interactive-claim dd {
  margin: 5px 0 0;
  color: #d9dfdc;
  font: 12px var(--mono);
}

.lease-meter-copy {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
}

.lease-meter-copy strong { color: var(--accent); font-family: var(--mono); }

.meter-track {
  height: 6px;
  margin-top: 8px;
  border-radius: 999px;
  background: #1e2425;
  overflow: hidden;
}

.meter-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--accent));
}

.terminal-caption {
  margin: 0;
  padding: 15px 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font: 11px var(--mono);
  background: rgba(255,255,255,.015);
}

.terminal-caption > span { color: var(--accent); }

.section-heading {
  max-width: 820px;
  margin-bottom: 46px;
}

.section-heading h2,
.principle-left h2,
.challenge-layout h2,
.final-card h2 {
  font-size: clamp(40px, 5vw, 67px);
}

.section-heading p,
.principle-left p,
.challenge-layout p,
.final-card p {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.section-heading strong, .challenge-layout strong { color: var(--text); }

.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px;
}

.comparison-card {
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(13,16,18,.72);
}

.accent-card {
  border-color: rgba(201,255,95,.2);
  background:
    radial-gradient(circle at 90% 0%, rgba(201,255,95,.06), transparent 45%),
    rgba(13,16,18,.82);
}

.card-number {
  color: var(--muted-2);
  font-size: 10px;
  letter-spacing: .1em;
  margin-bottom: 22px;
}

.repo-strip, .commit-change {
  min-height: 49px;
  padding: 0 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #0b0e10;
  color: var(--muted);
  font-size: 12px;
}

.repo-strip code, .commit-change code {
  color: var(--cyan);
  font-size: 11px;
}

.agent-row, .sidebar-agent, .stream-event {
  display: flex;
  align-items: center;
  gap: 12px;
}

.agent-row {
  padding: 15px 4px;
  border-bottom: 1px solid var(--line);
}

.agent-row div, .sidebar-agent div, .stream-event div { min-width: 0; }

.agent-row strong, .sidebar-agent strong, .stream-event strong {
  display: block;
  font-size: 13px;
}

.agent-row small, .sidebar-agent small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.agent-avatar {
  flex: 0 0 auto;
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  font: 700 11px var(--mono);
  border: 1px solid var(--line);
}

.avatar-test { background: rgba(115,231,221,.09); color: var(--cyan); }
.avatar-sec { background: rgba(255,212,107,.08); color: var(--warning); }
.avatar-code { background: rgba(201,255,95,.08); color: var(--accent); }

.mini-ok {
  margin-left: auto;
  color: var(--accent);
  font-weight: 800;
}

.commit-change { margin-top: 16px; }
.commit-change div { display: flex; gap: 8px; align-items: center; }
.commit-change b { color: var(--danger); }
.bad-change { border-color: rgba(255,130,110,.18); }

.stale-context {
  margin-top: 12px;
  padding: 14px;
  border: 1px dashed rgba(255,130,110,.24);
  border-radius: 9px;
  color: var(--muted);
  font-size: 11px;
}

.stale-context div {
  margin-top: 9px;
  color: #cfd5d2;
  text-decoration: line-through;
  text-decoration-color: rgba(255,130,110,.55);
}

.context-question {
  margin: 17px 0 11px;
  display: flex;
  gap: 13px;
  padding: 13px;
  border: 1px solid rgba(201,255,95,.16);
  border-radius: 10px;
  background: rgba(201,255,95,.035);
}

.context-question > span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--accent);
  background: rgba(201,255,95,.1);
  font-family: var(--mono);
}

.context-question p {
  margin: 2px 0 0;
  color: #dce2de;
  font-size: 12px;
}

.mini-result {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 11px;
  align-items: center;
  padding: 13px 7px;
  border-bottom: 1px solid var(--line);
}

.result-icon {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  font: 700 10px var(--mono);
}

.active-result .result-icon { background: rgba(201,255,95,.09); color: var(--accent); }
.warn-result .result-icon { background: rgba(255,212,107,.08); color: var(--warning); }

.mini-result strong { display: block; font-size: 12px; }
.mini-result small { display: block; margin-top: 3px; color: var(--muted); font: 10px var(--mono); }

.demo-section { padding-top: 130px; }

.demo-shell {
  border: 1px solid var(--line-strong);
  border-radius: 19px;
  overflow: hidden;
  background: #0a0d0f;
  box-shadow: 0 45px 120px rgba(0,0,0,.35);
}

.demo-topbar {
  min-height: 67px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.demo-topbar strong { display: block; margin-top: 4px; font-size: 13px; }

.demo-kicker {
  color: var(--muted-2);
  font: 9px var(--mono);
  letter-spacing: .13em;
}

.demo-progress { display: flex; gap: 7px; }

.progress-dot {
  width: 28px;
  height: 5px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: #2b3133;
  cursor: pointer;
  transition: background .2s ease, width .2s ease;
}

.progress-dot.active { background: var(--accent); width: 40px; }

.demo-body {
  display: grid;
  grid-template-columns: 235px 1fr;
  min-height: 620px;
}

.demo-sidebar {
  padding: 24px 17px;
  border-right: 1px solid var(--line);
  background: #0c0f11;
}

.sidebar-label {
  margin: 0 5px 18px;
  color: var(--muted-2);
  font: 9px var(--mono);
  letter-spacing: .13em;
}

.sidebar-agent {
  min-height: 59px;
  padding: 9px 5px;
}

.sidebar-agent div { flex: 1; }

.agent-led {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3c4445;
}

.led-active {
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(201,255,95,.07);
}

.sidebar-divider { height: 1px; margin: 23px 4px; background: var(--line); }

.sidebar-meta { margin: 14px 5px; }
.sidebar-meta span { display: block; color: var(--muted-2); font-size: 10px; }
.sidebar-meta code, .sidebar-meta strong { display: block; margin-top: 5px; color: #cfd6d2; font-size: 10px; }

.demo-stage {
  position: relative;
  padding: 43px 45px 84px;
  min-width: 0;
}

.demo-panel {
  display: none;
  max-width: 750px;
  animation: panelIn .3s ease;
}

.demo-panel.active { display: block; }

@keyframes panelIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.panel-label {
  color: var(--accent);
  font-size: 10px;
  letter-spacing: .1em;
}

.demo-panel h3 {
  max-width: 710px;
  margin: 13px 0 15px;
  font-size: clamp(28px, 3vw, 42px);
  letter-spacing: -.04em;
  line-height: 1.08;
}

.demo-panel > p {
  max-width: 690px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}

.demo-panel code { color: var(--cyan); font-size: .92em; }

.event-stream {
  margin-top: 32px;
  border: 1px solid var(--line);
  border-radius: 13px;
  overflow: hidden;
}

.stream-event {
  padding: 17px;
  border-bottom: 1px solid var(--line);
}

.stream-event:last-child { border-bottom: 0; }
.stream-event div { flex: 1; }

.stream-event p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.event-time { color: var(--muted-2); font: 10px var(--mono); }

.claims-two {
  margin-top: 27px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

.interactive-claim {
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0d1113;
}

.interactive-claim h4 {
  margin: 16px 0;
  font: 600 15px var(--mono);
}

.interactive-claim dl { margin: 0; }
.interactive-claim dl div {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.interactive-claim dl div:last-child { border-bottom: 0; }

.big-action {
  width: min(100%, 570px);
  margin-top: 30px;
  padding: 19px 21px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid rgba(201,255,95,.25);
  border-radius: 12px;
  background: rgba(201,255,95,.07);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.big-action span { font-weight: 700; }
.big-action small { color: var(--accent); }

.commit-result {
  display: none;
  width: min(100%, 570px);
  margin-top: 13px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #0d1113;
}

.commit-result.show { display: grid; gap: 7px; animation: panelIn .3s ease; }
.commit-result strong { font-size: 13px; }
.commit-result small { color: var(--muted); line-height: 1.5; }
.commit-arrow { color: var(--cyan); font: 11px var(--mono); }
.commit-arrow b { padding: 0 8px; color: var(--accent); }

.query-box {
  margin-top: 27px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0a0d0f;
  overflow: hidden;
}

.query-title {
  min-height: 47px;
  padding: 0 13px 0 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.query-title span { color: var(--muted-2); font: 9px var(--mono); letter-spacing: .1em; }

.query-title button, .code-window-bar button {
  padding: 7px 10px;
  border: 1px solid rgba(201,255,95,.22);
  border-radius: 7px;
  background: rgba(201,255,95,.07);
  color: var(--accent);
  font: 10px var(--mono);
  cursor: pointer;
}

.query-box pre {
  margin: 0;
  padding: 20px;
  overflow-x: auto;
  color: #c9d0cc;
  font: 12px/1.8 var(--mono);
}

.query-results {
  margin-top: 13px;
  display: grid;
  gap: 8px;
}

.query-placeholder {
  padding: 17px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  color: var(--muted-2);
  font: 11px var(--mono);
}

.query-result {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 11px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0d1113;
}

.query-result .result-icon { align-self: start; }
.query-result strong { display: block; font-size: 12px; }
.query-result small { display: block; margin-top: 3px; color: var(--muted); font: 10px var(--mono); }

.expiry-card {
  margin-top: 29px;
  padding: 21px;
  display: grid;
  grid-template-columns: 1.5fr .6fr .8fr;
  gap: 20px;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: #0d1113;
}

.expiry-card h4 { margin: 7px 0 0; font: 600 14px var(--mono); }
.countdown-wrap span { display: block; color: var(--muted-2); font-size: 10px; }
.countdown-wrap strong { display: block; margin-top: 5px; color: var(--accent); font: 700 25px var(--mono); }
.expiry-status small { display: block; margin-top: 6px; color: var(--muted); font: 9px var(--mono); }
.countdown-button { grid-column: 1 / -1; justify-self: start; border: 0; }

.big-quote {
  margin: 25px 0 0;
  padding: 18px 21px;
  border-left: 2px solid var(--accent);
  background: rgba(201,255,95,.035);
  color: #c9d0cc;
  font-size: 14px;
  line-height: 1.7;
}

.big-quote strong { color: var(--accent); }

.demo-controls {
  position: absolute;
  left: 45px;
  right: 45px;
  bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.demo-controls > span { color: var(--muted-2); font: 10px var(--mono); }

.demo-nav-button {
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.demo-nav-button.next { color: var(--accent); font-weight: 700; }
.demo-nav-button:disabled { opacity: .25; cursor: default; }

.principle-section { padding-top: 30px; }

.principle-card {
  padding: 38px;
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  column-gap: 50px;
  row-gap: 18px;
  align-items: center;
  border: 1px solid rgba(201,255,95,.18);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 0% 100%, rgba(201,255,95,.065), transparent 35%),
    #0d1113;
}

.principle-left {
  display: block;
}

.principle-left h2 { font-size: clamp(39px, 4vw, 58px); }

.primitive-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  min-height: 110px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  align-self: center;
  background: #0b0f10;
}

.primitive-grid div {
  min-height: 110px;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--line);
  transition: background .22s ease;
}

.primitive-grid div:last-child { border-right: 0; }

.primitive-grid span {
  color: var(--muted-2);
  font: 9px var(--mono);
  transition: color .18s ease;
}

.primitive-grid strong {
  display: block;
  font-size: 16px;
  color: var(--text);
  transition: color .18s ease, transform .18s ease;
}

.primitive-grid div:hover {
  background:
    radial-gradient(circle at 82% 16%, rgba(115, 231, 221, .14), transparent 38%),
    linear-gradient(155deg, rgba(201, 255, 95, .14), rgba(201, 255, 95, .035) 58%, rgba(8, 10, 11, .2));
}

.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.why-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0d1113;
}

.why-card.dim { opacity: .75; }

.arkiv-card {
  border-color: rgba(201,255,95,.22);
  background:
    linear-gradient(145deg, rgba(201,255,95,.055), transparent 40%),
    #0d1113;
}

.why-title {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding-bottom: 19px;
  border-bottom: 1px solid var(--line);
}

.why-title span { font: 700 15px var(--mono); }
.why-title strong { color: var(--muted); font-size: 11px; font-weight: 500; }

.why-card ul {
  list-style: none;
  padding: 10px 0 0;
  margin: 0;
}

.why-card li {
  padding: 10px 0;
  color: #d4dad6;
  font-size: 13px;
}

.why-card li span { display: inline-block; width: 24px; color: var(--accent); }
.why-card li.muted { color: var(--muted); }
.why-card li.muted span { color: var(--muted-2); }

.architecture {
  margin-top: 16px;
  padding: 25px;
  display: grid;
  grid-template-columns: 1fr auto 1.5fr auto 1fr;
  align-items: center;
  gap: 19px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(13,17,19,.75);
}

.arch-agent {
  min-width: 0;
  text-align: center;
}

.arch-agent .agent-avatar { margin: 0 auto 9px; }
.arch-agent strong { display: block; font-size: 12px; }
.arch-agent small { display: block; margin-top: 4px; color: var(--muted-2); font-size: 9px; }

.arch-arrow { color: var(--muted-2); font-family: var(--mono); }

.arch-entity {
  padding: 17px;
  border: 1px solid rgba(201,255,95,.22);
  border-radius: 10px;
  background: rgba(201,255,95,.045);
}

.arch-entity > span {
  display: block;
  margin-bottom: 10px;
  color: var(--accent);
  font: 9px var(--mono);
  letter-spacing: .1em;
}

.arch-entity code {
  display: block;
  padding: 4px 0;
  color: #c8d0cc;
  font-size: 10px;
}

.entity-tabs {
  display: inline-flex;
  padding: 4px;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0c0f11;
}

.entity-tab {
  padding: 9px 14px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: 11px var(--mono);
}

.entity-tab.active {
  color: #111;
  background: var(--accent);
}

.entity-viewer {
  margin-top: 14px;
  display: grid;
  grid-template-columns: .7fr 1.3fr;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #0d1113;
  overflow: hidden;
}

.entity-summary { padding: 34px; }
.entity-summary h3 {
  margin: 12px 0;
  font-size: 28px;
  letter-spacing: -.04em;
}

.entity-summary p {
  color: var(--muted);
  line-height: 1.7;
  font-size: 13px;
}

.entity-status-row {
  margin-top: 25px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.entity-status-row > span:last-child { color: var(--muted-2); font: 9px var(--mono); }

.code-window {
  min-width: 0;
  border-left: 1px solid var(--line);
  background: #090c0e;
}

.code-window-bar {
  min-height: 48px;
  padding: 0 12px 0 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  color: var(--muted-2);
  font: 10px var(--mono);
}

.code-window pre {
  min-height: 340px;
  margin: 0;
  padding: 24px;
  overflow: auto;
  color: #cbd3ce;
  font: 11px/1.7 var(--mono);
}

.off-arkiv {
  margin-top: 14px;
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 23px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 13px;
}

.off-arkiv p { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.off-arrow { color: var(--muted-2); font-size: 23px; }

.challenge-section { padding-top: 55px; }

.challenge-layout {
  display: grid;
  grid-template-columns: 1fr .9fr;
  gap: 75px;
  align-items: center;
}

.challenge-stack {
  min-height: 270px;
  position: relative;
}

.stack-card {
  position: absolute;
  width: min(100%, 440px);
  padding: 24px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #101416;
  box-shadow: 0 25px 55px rgba(0,0,0,.28);
}

.stack-card > span { display: block; color: var(--muted-2); font: 9px var(--mono); letter-spacing: .1em; }
.stack-card > strong { display: block; margin-top: 13px; font: 600 15px var(--mono); }
.stack-card > small { display: block; margin-top: 7px; color: var(--muted); font: 10px var(--mono); }

.back-card { top: 10px; left: 0; transform: rotate(-3deg); opacity: .72; }
.front-card {
  right: 0;
  bottom: 12px;
  border-color: rgba(255,130,110,.24);
  transform: rotate(2deg);
}
.front-card > div { margin-top: 27px; display: flex; justify-content: space-between; align-items: center; }
.front-card small { color: var(--muted); font: 9px var(--mono); }

.final-section { padding-bottom: 60px; }

.final-card {
  padding: 70px;
  text-align: center;
  border: 1px solid rgba(201,255,95,.18);
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 0%, rgba(201,255,95,.075), transparent 45%),
    #0d1113;
}

.final-card h2 { max-width: 920px; margin-inline: auto; }
.final-card h2 span { color: var(--accent); }
.final-card p { max-width: 680px; margin-inline: auto; }
.final-actions { justify-content: center; }

.resource-placeholder { opacity: .65; }

footer {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
  padding: 26px 0 45px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font: 10px var(--mono);
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 300;
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #151a1c;
  color: var(--text);
  font: 11px var(--mono);
  box-shadow: 0 15px 35px rgba(0,0,0,.3);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}

.toast.show { opacity: 1; transform: translateY(0); }

.reveal {
  opacity: 0;
  transform: translateY(15px);
  transition: opacity .65s ease, transform .65s ease;
}

.reveal.visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: .09s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

@media (max-width: 980px) {
  .top-nav { display: none; }
  .concept-badge { margin-left: auto; }

  .header-repo-link {
    margin-left: auto;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-top: 100px;
  }

  .hero-visual { max-width: 680px; }

  .comparison-grid,
  .why-grid,
  .challenge-layout,
  .principle-card,
  .entity-viewer {
    grid-template-columns: 1fr;
  }

  .primitive-grid {
    grid-template-columns: repeat(5, minmax(100px, 1fr));
    overflow-x: auto;
  }

  .demo-body { grid-template-columns: 1fr; }
  .demo-sidebar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .sidebar-label, .sidebar-divider, .sidebar-meta { display: none; }
  .sidebar-agent { padding: 5px; }

  .code-window { border-left: 0; border-top: 1px solid var(--line); }

  .architecture { grid-template-columns: 1fr; text-align: center; }
  .arch-arrow { transform: rotate(90deg); }

  .challenge-stack { max-width: 550px; }

  .final-card { padding: 50px 28px; }
}

@media (max-width: 680px) {
  .site-header {
    width: calc(100% - 20px);
    min-height: 55px;
    margin-top: 7px;
    gap: 10px;
    padding-inline: 10px;
  }

  .brand > span:last-child { font-size: 13px; }
  .concept-badge { display: none; }

  .header-repo-link {
    margin-left: auto;
    padding: 7px 8px;
    font-size: 10px;
  }

  .section {
    width: min(calc(100% - 28px), var(--max));
    padding: 78px 0;
  }

  .compact-section { padding-top: 20px; }

  .hero {
    padding-top: 75px;
    gap: 43px;
  }

  .hero h1 { font-size: clamp(44px, 15vw, 62px); }

  .terminal-window { transform: none; }
  .lease-preview { padding: 20px; }
  .claim-grid { grid-template-columns: 1fr; }
  .claim-grid div { border-right: 0; }
  .claim-grid div:nth-last-child(-n+2) { border-bottom: 1px solid var(--line); }
  .claim-grid div:last-child { border-bottom: 0; }

  .comparison-grid { grid-template-columns: 1fr; }

  .demo-topbar { align-items: flex-start; padding: 16px; }
  .demo-progress { margin-top: 5px; }
  .progress-dot { width: 17px; }
  .progress-dot.active { width: 25px; }

  .demo-sidebar { grid-template-columns: 1fr; padding: 12px; }
  .sidebar-agent { min-height: 47px; }
  .sidebar-agent:nth-of-type(n+3) { display: none; }

  .demo-stage { padding: 30px 20px 82px; }
  .claims-two { grid-template-columns: 1fr; }

  .expiry-card { grid-template-columns: 1fr; }
  .countdown-button { grid-column: auto; }

  .demo-controls { left: 20px; right: 20px; }

  .principle-card {
    padding: 26px;
    column-gap: 30px;
    row-gap: 14px;
  }
  .primitive-grid div {
    min-height: 90px;
    padding: 16px 14px;
  }

  .why-card { padding: 20px; }

  .entity-summary { padding: 25px; }
  .off-arkiv { grid-template-columns: 1fr; }
  .off-arrow { transform: rotate(90deg); }

  .challenge-layout { gap: 38px; }
  .challenge-stack { min-height: 300px; }

  footer { width: calc(100% - 28px); flex-direction: column; }
}

/* ============================================================
   Attributable Expiry + visible verifiability (per spec §58)
   ============================================================ */

.provenance {
  margin-top: 22px;
  margin-bottom: 36px;
  padding: 16px;
  border: 1px solid rgba(201, 255, 95, .18);
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(201, 255, 95, .055), rgba(13, 17, 19, .92) 70%),
    #0d1113;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.provenance-row {
  display: flex;
  align-items: center;
  gap: 11px;
}

.provenance-row strong {
  display: block;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.provenance-row small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
}

.provenance-row code {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  background: rgba(201, 255, 95, .08);
  padding: 1px 6px;
  border-radius: 4px;
}

.verified-tick {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: #091007;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.provenance-owner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 10px 12px;
  background: rgba(255, 255, 255, .025);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.provenance-owner small {
  color: var(--muted-2);
  font: 9px var(--mono);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.provenance-owner code {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text);
}

.provenance-button {
  align-self: flex-start;
  padding: 9px 13px;
  border: 1px solid rgba(201, 255, 95, .3);
  border-radius: 8px;
  background: transparent;
  color: var(--accent);
  font: 600 12px var(--mono);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background .15s ease, transform .15s ease;
}

.provenance-button:hover {
  background: rgba(201, 255, 95, .08);
  transform: translateY(-1px);
}

.provenance-button span {
  font-size: 13px;
}

/* Mini provenance on inline Step-2 cards */
.mini-provenance {
  margin-top: 14px;
  padding: 10px 12px;
}

.mini-provenance .provenance-row strong {
  display: none;
}

.mini-provenance .provenance-row {
  gap: 8px;
}

.mini-provenance .provenance-row small {
  display: inline;
  margin-top: 0;
}

/* Risk band badge (per spec §64 numeric bands) */
.risk-band {
  display: inline-block;
  padding: 2px 6px;
  margin-left: 4px;
  border-radius: 4px;
  font: 700 9px var(--mono);
  letter-spacing: .06em;
  vertical-align: middle;
}

.risk-band-low {
  color: var(--accent);
  border: 1px solid rgba(201, 255, 95, .25);
  background: rgba(201, 255, 95, .08);
}

.risk-band-medium {
  color: var(--warning);
  border: 1px solid rgba(255, 212, 107, .25);
  background: rgba(255, 212, 107, .08);
}

.risk-band-high {
  color: var(--danger);
  border: 1px solid rgba(255, 130, 110, .25);
  background: rgba(255, 130, 110, .08);
}

/* Attributable Expiry footnote in primitive section */
.principle-card .primitive-footnote {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  max-width: none;
}

.principle-card .primitive-footnote strong {
  color: var(--accent);
  font-weight: 600;
}

.principle-card .primitive-footnote code {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--cyan);
  background: rgba(115, 231, 221, .08);
  padding: 1px 6px;
  border-radius: 4px;
}

/* Mobile compaction for new blocks */
@media (max-width: 720px) {
  .provenance { padding: 14px; }
  .provenance-row strong { font-size: 12px; }
  .provenance-row small { font-size: 10px; }
  .principle-card .primitive-footnote { font-size: 12px; }
}
