/* ==========================================================================
   Page IA — builds on site.css (tokens, nav, buttons, chips, agents).
   Motion-only rules sit under html.ia-motion (set in <head> unless the
   visitor prefers reduced motion); without it, every scene shows its
   finished state and nothing is pinned.
   ========================================================================== */

/* ── Opening: pinned pipeline ── */
.ia-hero { position: relative; }
.ia-motion .ia-hero { height: 360vh; height: 360svh; }
.ia-hero__sticky {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: center;
  padding: calc(var(--nav-h) + 24px) 0 40px;
  overflow: hidden;
  background:
    radial-gradient(60% 60% at 75% 55%, rgba(46, 255, 140, .10), transparent 70%),
    var(--bg);
}
.ia-motion .ia-hero__sticky { position: sticky; top: 0; height: 100svh; padding-bottom: 24px; }
.ia-hero__sticky::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 60% 50%, #000 20%, transparent 85%);
          mask-image: radial-gradient(ellipse 70% 70% at 60% 50%, #000 20%, transparent 85%);
  opacity: .5;
}
.ia-hero__grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 600px); gap: clamp(28px, 4vw, 64px); align-items: center; }
.ia-hero__title {
  font: 900 clamp(38px, 4.3vw, 70px)/.94 var(--font-display); font-stretch: 104%;
  letter-spacing: -.035em; text-transform: uppercase; margin-bottom: 22px;
}
.ia-hero__lede { color: var(--text-muted); font-size: 17px; max-width: 520px; margin-bottom: 26px; }
.ia-hero__hint { display: none; align-items: center; gap: 12px; margin-top: 34px; font: 500 12px/1.3 var(--font-mono); letter-spacing: .06em; color: var(--text-faint); }
.ia-motion .ia-hero__hint { display: flex; }
.ia-hero__mouse { position: relative; width: 18px; height: 28px; border: 1.5px solid var(--text-faint); border-radius: 10px; flex: none; }
.ia-hero__mouse::after { content: ""; position: absolute; left: 50%; top: 6px; width: 2px; height: 6px; margin-left: -1px; border-radius: 1px; background: var(--accent); animation: wheel 1.6s ease-in-out infinite; }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(8px); opacity: 0; } 100% { opacity: 0; } }

/* the stage: fixed 600×560 coordinate space, sized by container units */
.stage {
  position: relative; margin: 0;
  width: 100%; aspect-ratio: 600 / 560;
  container-type: inline-size;
  border: 1px solid var(--line-strong); border-radius: 20px;
  background: rgba(16, 18, 19, .72);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.stage__edges { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.stage__edges path { fill: none; stroke: var(--line-strong); stroke-width: 1.4; stroke-dasharray: 4 5; }
.stage__edges path.lit { stroke: var(--accent); stroke-width: 2; stroke-dasharray: 1; stroke-dashoffset: 1; }
.stage__edges circle { fill: var(--accent); filter: drop-shadow(0 0 4px rgba(46, 255, 140, .9)); opacity: 0; }

.st-chat { position: absolute; left: 3%; top: 2.6%; width: 46%; display: flex; flex-direction: column; gap: 1.2cqw; }
.st-chat__msg {
  display: flex; flex-direction: column; gap: .4cqw; padding: 1.4cqw 1.8cqw; border-radius: 1.8cqw;
  font-size: 2.3cqw; line-height: 1.35; width: max-content; max-width: 100%;
}
.st-chat__msg--me { background: var(--bg-raise-2); border: 1px solid var(--line-strong); }
.st-chat__msg--bot { background: rgba(61, 214, 255, .1); border: 1px solid rgba(61, 214, 255, .4); margin-left: 4cqw; }
.st-chat__who { font: 500 1.7cqw/1 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint); }
.st-caret { display: inline-block; width: .35cqw; height: 2.6cqw; margin-left: .3cqw; vertical-align: -.4cqw; background: var(--accent); animation: blink 1s steps(2) infinite; }
.st-chat__msg--me { flex-direction: row; flex-wrap: wrap; align-items: baseline; column-gap: 1.2cqw; }
.st-chat__msg--me .st-chat__who { flex-basis: 100%; }
.ia-motion [data-pipeline]:not(.is-p1) [data-reply] { opacity: 0; transform: translateY(6px); }
[data-reply] { transition: opacity .4s ease, transform .4s ease; }

.st-node {
  --c: var(--accent);
  position: absolute; left: calc(var(--x) / 600 * 100%); top: calc(var(--y) / 560 * 100%);
  transform: translate(-50%, -50%);
  display: flex; flex-direction: column; gap: .5cqw;
  min-width: 23cqw; padding: 1.5cqw 2cqw; border-radius: 1.8cqw;
  background: var(--bg-raise); border: 1px solid var(--line-strong);
  font-size: 2.3cqw; line-height: 1.2;
  transition: opacity .35s ease, border-color .35s ease, box-shadow .35s ease, transform .35s ease;
}
.st-node b { font-family: var(--font-display); font-weight: 800; font-stretch: 106%; letter-spacing: -.01em; }
.st-node small { font: 400 1.8cqw/1.3 var(--font-mono); color: var(--text-muted); }
.st-node--planner { --c: #3dd6ff; }
.st-node[data-node^="w"] { --c: #ffb23d; }
.st-node--sheet { --c: var(--accent); }
.st-node--check { --c: #2ee6d6; }
.st-node--human { --c: #ff5fa8; }
.ia-motion .st-node { opacity: .32; }
.ia-motion .st-node.is-on { opacity: 1; border-color: var(--c); box-shadow: 0 0 0 1px var(--c), 0 0 32px color-mix(in srgb, var(--c) 28%, transparent); transform: translate(-50%, -50%) scale(1.04); }
.ia-motion .st-node.is-done { opacity: 1; border-color: color-mix(in srgb, var(--c) 45%, transparent); }
.st-node.is-done b::after { content: " ✓"; color: var(--c); }
.st-gap { color: var(--gold); font-variant-numeric: tabular-nums; }
.st-gap.is-zero { color: var(--accent); }
.st-status {
  position: absolute; right: 3%; bottom: 3%;
  display: inline-flex; align-items: center; gap: 1.2cqw;
  padding: 1cqw 1.8cqw; border-radius: var(--pill); border: 1px solid var(--line-strong); background: var(--bg);
  font: 500 1.8cqw/1 var(--font-mono); color: var(--text-muted); white-space: nowrap;
}
.st-status .dot { width: 1.2cqw; height: 1.2cqw; box-shadow: 0 0 0 .6cqw var(--accent-soft); }
.st-agents { position: absolute; inset: 0; pointer-events: none; }
.st-agents .agent__tag { font-size: 1.7cqw; }
.st-agents .agent svg { width: 3.2cqw; height: 3.5cqw; }

/* ── Project sections ── */
.ia-project__grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.status-badge {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 28px;
  padding: 8px 14px; border-radius: var(--pill); border: 1px solid rgba(46, 255, 140, .4); background: var(--accent-soft);
  font: 600 12px/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent);
}
.status-badge .dot { width: 6px; height: 6px; box-shadow: 0 0 0 3px var(--accent-soft); animation: blink 1.6s ease-in-out infinite; }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 32px; }
.kpis div { padding-top: 14px; border-top: 1px solid var(--line-strong); }
.kpis dt { font: 900 clamp(26px, 2.6vw, 38px)/1 var(--font-display); font-stretch: 108%; letter-spacing: -.03em; color: var(--text); white-space: nowrap; font-variant-numeric: tabular-nums; }
.kpis dd { margin-top: 8px; font-size: 13px; line-height: 1.45; color: var(--text-muted); }
.steps { counter-reset: s; display: flex; flex-direction: column; gap: 10px; margin-bottom: 26px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 28px 1fr; gap: 8px; font-size: 15px; color: var(--text-muted); }
.steps li::before { content: counter(s, decimal-leading-zero); font: 500 12px/1.9 var(--font-mono); color: var(--accent); }
.ia-project__role { font-size: 15px; color: var(--text-muted); padding: 16px 18px; border-left: 2px solid var(--accent); background: var(--bg-raise); border-radius: 0 10px 10px 0; margin-bottom: 18px; }

/* ── Placements demo ── */
.demo {
  position: relative;
  border-radius: 20px; border: 1px solid var(--line-strong);
  background: var(--bg-raise);
  overflow: hidden;
}
.demo__bar { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.demo__title { flex: 1; min-width: 0; font: 500 13px/1.3 var(--font-mono); color: var(--text); overflow-wrap: anywhere; }
.demo__replay {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-strong);
  background: transparent; color: var(--text-muted); font-size: 16px; cursor: pointer;
  transition: color .18s ease, border-color .18s ease, transform .3s ease;
}
.demo__replay:hover { color: var(--text); border-color: var(--text); transform: rotate(-90deg); }
.demo__body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 18px; padding: 18px; }
.demo__label { display: block; margin-bottom: 10px; font: 500 11px/1.2 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); }
.demo__hint { margin-top: 10px; font-size: 12px; color: var(--text-faint); }

.statement__lines { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--bg); }
.statement__lines li {
  display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 8px; align-items: baseline;
  padding: 9px 12px; border-bottom: 1px solid var(--line);
  font-size: 12.5px; line-height: 1.35;
  transition: background-color .25s ease, opacity .25s ease;
}
.statement__lines li:last-child { border-bottom: 0; }
.statement__lines time { font: 400 11px/1.35 var(--font-mono); color: var(--text-faint); }
.statement__lines .amt { font: 500 12px/1.35 var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.statement__lines li.is-active { background: rgba(255, 178, 61, .12); }
.statement__lines li.is-sent { opacity: .5; }
.statement__lines li.is-lit { background: var(--accent-soft); opacity: 1; }

.sheet__grid { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--bg); font-variant-numeric: tabular-nums; }
.sheet__grid th, .sheet__grid td { padding: 0 8px; height: 44px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
.sheet__grid tr:last-child th, .sheet__grid tr:last-child td { border-bottom: 0; }
.sheet__grid th:last-child, .sheet__grid td:last-child { border-right: 0; }
.sheet__grid thead th { height: 34px; font: 500 11px/1 var(--font-mono); color: var(--text-faint); text-align: right; background: var(--bg-raise-2); }
.sheet__grid tbody th { font: 500 12px/1.2 var(--font-body); color: var(--text-muted); text-align: left; white-space: nowrap; }
.sheet__grid thead th:first-child { width: 30%; }
.sheet__grid td { font: 500 12px/1 var(--font-mono); overflow: hidden; text-overflow: clip; text-align: right; white-space: nowrap; transition: background-color .25s ease, box-shadow .25s ease; }
.sheet__grid td.is-filled { color: var(--text); cursor: help; }
.sheet__grid td.is-new { background: rgba(46, 255, 140, .16); }
.sheet__grid td.is-lit, .sheet__grid td:focus-visible { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); outline: none; }

.demo__foot { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 18px; align-items: end; padding: 0 18px 18px; }
.balance strong { display: block; font: 900 26px/1 var(--font-display); font-stretch: 106%; color: var(--gold); font-variant-numeric: tabular-nums; transition: color .3s ease; }
.balance.is-zero strong { color: var(--accent); }
.balance__track { display: block; height: 4px; margin-top: 10px; border-radius: 2px; background: var(--bg-raise-2); overflow: hidden; }
.balance__fill { display: block; height: 100%; width: 100%; background: var(--gold); transform-origin: left; transition: transform .35s ease, background-color .3s ease; }
.balance.is-zero .balance__fill { background: var(--accent); }
.entry { position: relative; transition: opacity .4s ease, transform .4s ease; }
.entry p { font-size: 14px; color: var(--text-muted); }
.entry b { color: var(--text); font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.ia-motion .demo:not(.is-done) .entry { opacity: .25; }
.stamp {
  position: absolute; right: -6px; top: -34px;
  padding: 5px 9px; border-radius: 6px; border: 1.5px solid #2ee6d6; color: #2ee6d6; background: rgba(8, 9, 10, .9);
  font: 600 10px/1.1 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
  transform: rotate(-6deg);
}
.ia-motion .demo .stamp { opacity: 0; transform: rotate(-6deg) scale(1.6); transition: opacity .25s ease, transform .35s cubic-bezier(.2, 1.4, .4, 1); }
.ia-motion .demo .stamp.on { opacity: 1; transform: rotate(-6deg) scale(1); }
.demo__sign { white-space: nowrap; }
.demo__sign:disabled { opacity: .35; cursor: not-allowed; transform: none; }
.demo__sign.is-ready { animation: ready 1.4s ease-in-out 3; }
.demo__sign.is-signed { background: transparent; color: var(--accent); border-color: rgba(46, 255, 140, .5); }
@keyframes ready { 50% { box-shadow: 0 0 0 8px var(--accent-soft); } }
.demo__agents { position: absolute; inset: 0; pointer-events: none; }
.fly {
  position: absolute; left: 0; top: 0; z-index: 5; pointer-events: none;
  padding: 4px 8px; border-radius: 6px; background: #ffb23d; color: #08090a;
  font: 600 11.5px/1 var(--font-mono); white-space: nowrap; font-variant-numeric: tabular-nums;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .45);
}

.ia-next { padding-block: 56px; }
.ia-next__row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 18px; }
.ia-next .kicker { margin: 0; }

/* ── Responsive ── */
@media (max-width: 1080px) {
  .ia-hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 480px); }
  .ia-project__grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .ia-hero__grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .ia-hero__title { font-size: clamp(34px, 9vw, 56px); margin-bottom: 12px; }
  .ia-hero__lede { font-size: 15px; margin-bottom: 16px; }
  .ia-hero__hint { margin-top: 14px; }
  .ia-motion .ia-hero__text .hero__actions { display: none; }
  .stage { max-width: 520px; justify-self: center; }
  .kpis { grid-template-columns: 1fr 1fr 1fr; }
}
@media (max-width: 640px) {
  .ia-motion .ia-hero__lede { display: none; }
  .demo__body { grid-template-columns: 1fr; }
  .demo__foot { grid-template-columns: 1fr 1fr; }
  .demo__sign { grid-column: 1 / -1; }
  .kpis { grid-template-columns: 1fr; gap: 0; }
  .kpis div { display: grid; grid-template-columns: 140px 1fr; gap: 12px; align-items: baseline; padding-block: 12px; }
  .kpis dd { margin-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .ia-hero__mouse::after, .status-badge .dot { animation: none; }
}

/* ==========================================================================
   Projects 02 – 06
   ========================================================================== */
@media (min-width: 1081px) {
  .ia-project--flip .ia-project__grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
  .ia-project--flip .demo { order: -1; }
}
.principles { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.principles li { position: relative; padding-left: 22px; font-size: 15px; color: var(--text-muted); }
.principles li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 8px; height: 8px; border-radius: 2px; border: 1.5px solid var(--accent); }
.ia-project__idea { margin-bottom: 24px; font: 700 clamp(19px, 1.8vw, 23px)/1.35 var(--font-display); font-stretch: 104%; color: var(--text); }

/* ── 02 Portal ── */
.quiz { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.quiz legend { padding: 0; }
.quiz__opt {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px;
  border: 1px solid var(--line-strong); background: var(--bg); cursor: pointer; font-size: 14px;
  transition: border-color .2s ease, background-color .2s ease;
}
.quiz__opt:hover { border-color: var(--text-faint); }
.quiz__opt input { appearance: none; -webkit-appearance: none; flex: none; width: 34px; height: 20px; margin: 0; border-radius: 10px; background: var(--bg-raise-2); border: 1px solid var(--line-strong); position: relative; cursor: pointer; transition: background-color .2s ease, border-color .2s ease; }
.quiz__opt input::after { content: ""; position: absolute; left: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--text-faint); transition: transform .2s ease, background-color .2s ease; }
.quiz__opt input:checked { background: var(--accent-soft); border-color: var(--accent); }
.quiz__opt input:checked::after { transform: translateX(14px); background: var(--accent); }
.quiz__opt input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.quiz__opt:has(input:checked) { border-color: rgba(46, 255, 140, .45); background: rgba(46, 255, 140, .05); }
.docs { display: flex; flex-direction: column; min-width: 0; }
.docs__list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; min-height: 150px; }
.docs__list li {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px;
  background: var(--bg); border: 1px solid var(--line); font-size: 13px;
}
.docs__list li::before { content: ""; width: 12px; height: 15px; flex: none; border-radius: 2px; border: 1.5px solid var(--text-faint); border-top-right-radius: 5px; }
.docs__list li.is-in { animation: doc-in .35s cubic-bezier(.2, .8, .3, 1.2) both; }
.docs__list li.is-in::before { border-color: var(--accent); }
@keyframes doc-in { from { opacity: 0; transform: translateX(-12px) scale(.96); } }
.docs__fee strong { display: block; font: 900 28px/1 var(--font-display); font-stretch: 106%; font-variant-numeric: tabular-nums; }
.demo__foot--board { grid-template-columns: minmax(0, 1fr); align-items: start; }
.demo__foot--board .btn { justify-self: start; }
.board { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.board li {
  position: relative; padding: 8px 4px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line);
  font: 500 10.5px/1.25 var(--font-mono); color: var(--text-faint); text-align: center; letter-spacing: .01em; overflow-wrap: anywhere;
  transition: color .25s ease, border-color .25s ease, background-color .25s ease;
}
.board li.is-past { color: var(--text-muted); border-color: rgba(46, 255, 140, .25); }
.board li.is-here { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }

/* ── 03 Org chart ── */
.demo__body--org { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
.org-data { width: 100%; border-collapse: collapse; font-size: 12px; }
.org-data th { padding: 0 6px 8px; font: 500 10px/1 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint); text-align: left; }
.org-data td { padding: 7px 6px; border-top: 1px solid var(--line); color: var(--text-muted); transition: background-color .25s ease, color .25s ease; }
.org-data td:last-child { font-family: var(--font-mono); text-align: right; white-space: nowrap; }
.org-data tr.is-lit td { background: rgba(255, 178, 61, .12); color: var(--text); }
.org-canvas { position: relative; min-width: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.org-svg { display: block; width: 100%; height: auto; }
.org-svg .o-node rect { fill: var(--bg-raise); stroke: var(--line-strong); stroke-width: 1; }
.org-svg .o-node.is-person rect { fill: #161a1f; stroke: rgba(61, 214, 255, .5); }
.org-svg .o-node text { fill: var(--text); font: 600 11px var(--font-body); text-anchor: middle; dominant-baseline: middle; }
.org-svg .o-edge line { stroke: var(--text-faint); stroke-width: 1.2; }
.org-svg .o-edge.is-cross line { stroke: #ff6b5a; }
.org-svg .o-label rect { fill: var(--bg); stroke: rgba(255, 178, 61, .55); }
.org-svg .o-label text { fill: #ffb23d; font: 500 9px var(--font-mono); text-anchor: middle; dominant-baseline: middle; }
.org-svg .o-lens circle { fill: rgba(46, 230, 214, .06); stroke: #2ee6d6; stroke-width: 2; }
.org-svg .o-lens line { stroke: #2ee6d6; stroke-width: 3; stroke-linecap: round; }
.org-meter { position: absolute; right: 10px; top: 10px; padding: 8px 12px; border-radius: 10px; background: rgba(8, 9, 10, .9); border: 1px solid var(--line-strong); text-align: right; }
.org-meter .demo__label { margin-bottom: 4px; }
.org-meter strong { font: 900 24px/1 var(--font-display); color: #ff6b5a; font-variant-numeric: tabular-nums; transition: color .3s ease; }
.org-meter.is-zero strong { color: var(--accent); }
.demo__foot--org { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.rules { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.rules li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-faint); transition: color .25s ease; }
.rules li::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--line-strong); flex: none; transition: background-color .25s ease, border-color .25s ease; }
.rules li.is-ok { color: var(--text); }
.rules li.is-ok::before { background: #2ee6d6 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%2308090a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat; border-color: #2ee6d6; }

/* ── 04 Certification ── */
.demo__body--cert { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
.pool { display: flex; flex-direction: column; gap: 6px; min-height: 120px; }
.pool li { display: flex; justify-content: space-between; gap: 8px; padding: 9px 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line-strong); font-size: 12.5px; transition: opacity .3s ease; }
.pool li small { font: 500 11px/1.4 var(--font-mono); color: var(--text-faint); white-space: nowrap; }
.pool li.is-gone { opacity: .25; }
.months { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; height: 230px; padding: 0 4px 26px; border-bottom: 1px solid var(--line-strong); }
.month { position: relative; display: flex; flex-direction: column-reverse; gap: 2px; }
.month__name { position: absolute; left: 0; right: 0; bottom: -24px; font: 500 11px/1 var(--font-mono); color: var(--text-faint); text-align: center; }
.month__sum { position: absolute; left: 0; right: 0; font: 600 11px/1 var(--font-mono); color: var(--text-muted); text-align: center; transition: bottom .4s ease, color .3s ease; font-variant-numeric: tabular-nums; }
.month__block { border-radius: 4px; background: var(--bg-raise-2); border: 1px solid var(--line-strong); transition: height .45s cubic-bezier(.2, .8, .3, 1); }
.month__block.is-new { background: rgba(46, 255, 140, .25); border-color: var(--accent); }
.month.is-over .month__block { border-color: rgba(255, 107, 90, .8); }
.month.is-over .month__block.is-new { background: rgba(255, 107, 90, .35); }
.month.is-over .month__sum { color: #ff6b5a; }
.cap { position: absolute; left: 0; right: 0; border-top: 1.5px dashed var(--gold); pointer-events: none; }
.cap span { position: absolute; right: 0; top: -16px; font: 500 10px/1 var(--font-mono); color: var(--gold); }
.ai-card {
  margin: 0 18px 18px; padding: 16px 18px; border-radius: 14px;
  border: 1px solid rgba(61, 214, 255, .45); background: rgba(61, 214, 255, .07);
  animation: doc-in .4s cubic-bezier(.2, .8, .3, 1.2) both;
}
.ai-card__who { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font: 600 11px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: #3dd6ff; }
.ai-card__who .dot { background: #3dd6ff; box-shadow: 0 0 0 4px rgba(61, 214, 255, .15); }
.ai-card__text { font-size: 15px; margin-bottom: 10px; }
.ai-card__raw { margin-bottom: 14px; }
.ai-card__raw summary { cursor: pointer; font: 500 12px/1.4 var(--font-mono); color: var(--text-muted); }
.ai-card__raw summary:hover { color: var(--text); }
.ai-card__raw pre { margin: 10px 0 0; padding: 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); font: 400 11.5px/1.6 var(--font-mono); color: var(--text-muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.ai-card__raw pre b { color: #3dd6ff; font-weight: 500; }
.ai-card__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ai-card__note { font-size: 13px; color: var(--text-muted); }

/* ── 05 + 06 duo ── */
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.duo__card { display: flex; flex-direction: column; gap: 22px; padding: 26px; border-radius: 20px; border: 1px solid var(--line); background: radial-gradient(100% 60% at 100% 0%, rgba(46, 255, 140, .06), transparent 60%), var(--bg); min-width: 0; }
.duo__head .status-badge { margin-bottom: 18px; }
.duo__head h3 { margin-bottom: 12px; font: 900 clamp(26px, 2.6vw, 36px)/1 var(--font-display); font-stretch: 108%; letter-spacing: -.03em; text-transform: uppercase; }
.duo__head p:not(.status-badge) { color: var(--text-muted); font-size: 15px; }
.kpis--sm { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 0; }
.demo--compact { background: var(--bg-raise); }
.demo__scroll { overflow-x: auto; padding: 14px 16px 6px; }
.tb { width: 100%; min-width: 420px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tb th, .tb td { padding: 7px 8px; border-bottom: 1px solid var(--line); font-size: 12px; white-space: nowrap; }
.tb thead th { font: 500 10px/1 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint); text-align: right; }
.tb thead th:first-child, .tb tbody th, .tb tfoot th { text-align: left; }
.tb tbody th { font-weight: 500; color: var(--text-muted); }
.tb td { font-family: var(--font-mono); text-align: right; color: var(--text); transition: background-color .25s ease, color .25s ease; }
.tb td.is-empty { color: transparent; }
.tb td.is-new { background: rgba(46, 255, 140, .14); }
.tb tr.is-flag th, .tb tr.is-flag td { background: rgba(255, 107, 90, .12); color: #ff8a7a; }
.tb tr.is-fixed th, .tb tr.is-fixed td { background: rgba(46, 230, 214, .1); }
.tb tfoot th, .tb tfoot td { border-bottom: 0; border-top: 1px solid var(--line-strong); font-weight: 700; }
.tb tfoot td.is-zero { color: var(--accent); }
.loop { min-height: 40px; margin: 0; padding: 8px 16px 14px; font: 500 12px/1.5 var(--font-mono); color: var(--text-muted); }
.loop b { color: var(--text); font-weight: 600; }
.loop .is-red { color: #ff8a7a; }
.loop .is-green { color: var(--accent); }
.cost { font: 500 11px/1 var(--font-mono); color: var(--text-faint); white-space: nowrap; }
.cost b { color: var(--gold); font-weight: 600; font-variant-numeric: tabular-nums; }
ol.stations { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; padding: 18px 16px 8px; }
.stations li {
  position: relative; display: flex; flex-direction: column; gap: 4px; padding: 10px 6px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg); text-align: center; min-width: 0;
  transition: border-color .25s ease, box-shadow .25s ease, opacity .25s ease;
}
.stations b { font: 700 11.5px/1.2 var(--font-display); font-stretch: 104%; overflow-wrap: anywhere; }
.stations small { font: 400 9.5px/1.2 var(--font-mono); color: var(--text-faint); }
.stations li.is-here { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 20px rgba(46, 255, 140, .2); }
.stations li.is-past { border-color: rgba(46, 255, 140, .3); }
.stations li.is-stuck { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.stations li::after { content: ""; position: absolute; right: -6px; top: 50%; width: 6px; height: 1px; background: var(--line-strong); }
.stations li:last-child::after { display: none; }
[data-demo="clip"] .btn { margin: 0 16px 16px; }
[data-demo="clip"] .btn.is-signed { background: transparent; color: var(--accent); border-color: rgba(46, 255, 140, .5); }

.ia-next__text { font: 900 clamp(26px, 3vw, 40px)/1.05 var(--font-display); font-stretch: 108%; letter-spacing: -.03em; text-transform: uppercase; }

@media (max-width: 1080px) {
  .duo { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .demo__body--org, .demo__body--cert { grid-template-columns: 1fr; }
  .demo__foot--board, .demo__foot--org { grid-template-columns: 1fr; }
  .board { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .months { height: 190px; }
  .kpis--sm { grid-template-columns: minmax(0, 1fr); }
  .kpis--sm div { grid-template-columns: 120px minmax(0, 1fr); }
  ol.stations { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; padding-inline: 10px; }
  .stations b { font-size: 8.5px; overflow-wrap: normal; -webkit-hyphens: auto; hyphens: auto; }
  .stations small { font-size: 8px; }
  .duo__card { padding: 18px; }
}

/* ==========================================================================
   Method · Lab · Architecture · Stack · Path
   ========================================================================== */
/* ── Method ── */
.rules-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.rule {
  position: relative; display: flex; flex-direction: column; gap: 10px; padding: 24px; border-radius: 18px;
  border: 1px solid var(--line); background: var(--bg-raise); overflow: hidden;
  transition: border-color .25s ease, transform .25s ease;
}
.rule::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s ease;
  background: radial-gradient(60% 80% at 100% 0%, rgba(46, 255, 140, .12), transparent 70%);
}
.rule:hover, .rule.is-on { border-color: rgba(46, 255, 140, .4); transform: translateY(-2px); }
.rule:hover::after, .rule.is-on::after { opacity: 1; }
.rule__n { font: 500 12px/1 var(--font-mono); color: var(--accent); }
.rule h3 { font: 800 clamp(19px, 1.7vw, 22px)/1.2 var(--font-display); font-stretch: 104%; letter-spacing: -.01em; }
.rule p { font-size: 14.5px; color: var(--text-muted); }
.method-map { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; font: 500 12px/1 var(--font-mono); color: var(--text-faint); }
.method-map a { display: inline-grid; place-items: center; width: 36px; height: 30px; border-radius: 8px; border: 1px solid var(--line-strong); color: var(--text-faint); text-decoration: none; transition: color .2s ease, border-color .2s ease, background-color .2s ease; }
.method-map a.is-on { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.method-map a:hover { color: var(--text); border-color: var(--text); }

/* ── Lab ── */
.lab { display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); gap: 20px; align-items: start; }
.lab__skills { display: flex; flex-direction: column; gap: 10px; }
.skill-card {
  display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: 16px; text-align: left;
  border: 1px solid var(--line-strong); background: var(--bg-raise); color: var(--text); cursor: pointer;
  font: inherit; transition: border-color .2s ease, transform .2s ease, background-color .2s ease;
}
.skill-card:hover { transform: translateY(-2px); border-color: var(--text-faint); }
.skill-card:active { transform: translateY(0) scale(.99); }
.skill-card[aria-pressed="true"] { border-color: var(--accent); background: radial-gradient(100% 100% at 0% 0%, rgba(46, 255, 140, .12), transparent 70%), var(--bg-raise); }
.skill-card__file { font: 500 11px/1 var(--font-mono); color: var(--accent); }
.skill-card b { font: 800 18px/1.2 var(--font-display); font-stretch: 104%; }
.skill-card small { font-size: 13px; color: var(--text-muted); }
.graph { position: relative; aspect-ratio: 600 / 330; container-type: inline-size; margin: 8px 12px 0; }
.graph__edges, .arch__edges { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.graph__edges path, .arch__edges path { fill: none; stroke: var(--line-strong); stroke-width: 1.4; stroke-dasharray: 4 5; }
.graph__edges path.lit, .arch__edges path.lit { stroke: var(--accent); stroke-width: 2; stroke-dasharray: 1; stroke-dashoffset: 1; }
.graph__edges circle, .arch__edges circle { fill: var(--accent); filter: drop-shadow(0 0 4px rgba(46, 255, 140, .9)); opacity: 0; }
.g-node, .a-node, .a-badge {
  position: absolute; left: calc(var(--x) / 600 * 100%); top: calc(var(--y) / 330 * 100%);
  transform: translate(-50%, -50%);
}
.g-node {
  --c: var(--accent);
  display: flex; flex-direction: column; gap: .4cqw; min-width: 22cqw; padding: 1.4cqw 1.8cqw; border-radius: 1.6cqw;
  border: 1px solid var(--line-strong); background: var(--bg); font-size: 2.3cqw; line-height: 1.2; text-align: center;
  transition: border-color .3s ease, box-shadow .3s ease, opacity .3s ease;
}
.g-node b { font-family: var(--font-display); font-weight: 800; font-stretch: 104%; }
.g-node small { font: 400 1.7cqw/1.2 var(--font-mono); color: var(--text-faint); }
.g-node--skill { --c: var(--accent); }
.g-node--tool { --c: #ffb23d; }
.g-node--check { --c: #2ee6d6; }
.g-node--human { --c: #ff5fa8; }
.g-node--agent { --c: #3dd6ff; }
[data-lab]:not(.is-loaded) .g-node:not(.g-node--agent) { opacity: .3; }
.g-node.is-on { border-color: var(--c); box-shadow: 0 0 0 1px var(--c), 0 0 26px color-mix(in srgb, var(--c) 30%, transparent); }
.g-node.is-done { border-color: color-mix(in srgb, var(--c) 50%, transparent); }
ol.term {
  list-style: none; margin: 10px 12px 12px; padding: 12px 14px; min-height: 150px; border-radius: 12px;
  background: #050606; border: 1px solid var(--line); font: 400 12px/1.65 var(--font-mono); color: var(--text-muted);
}
.term li { animation: doc-in .25s ease both; overflow-wrap: anywhere; }
.term li::before { content: "› "; color: var(--accent); }
.term .ok { color: var(--accent); }
.term .tool { color: #ffb23d; }
.term .chk { color: #2ee6d6; }

/* ── Architecture ── */
.arch .demo__bar { flex-wrap: wrap; }
.switch { display: inline-flex; align-items: center; gap: 12px; padding: 0; border: 0; background: none; color: var(--text); font: 600 14px/1 var(--font-body); cursor: pointer; }
.switch__track { position: relative; width: 52px; height: 30px; border-radius: 15px; background: var(--bg-raise-2); border: 1px solid var(--line-strong); transition: background-color .25s ease, border-color .25s ease; flex: none; }
.switch__thumb { position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--text-faint); transition: transform .25s cubic-bezier(.3, 1.4, .5, 1), background-color .25s ease; }
.switch[aria-checked="true"] .switch__track { background: var(--accent-soft); border-color: var(--accent); }
.switch[aria-checked="true"] .switch__thumb { transform: translateX(22px); background: var(--accent); }
.switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 16px; }
.arch__mode { flex: 1; min-width: 220px; font-size: 14px; color: var(--text-muted); }
.arch__canvas { position: relative; aspect-ratio: 900 / 330; container-type: inline-size; margin: 18px; }
.arch__canvas .a-node, .arch__canvas .a-badge { left: calc(var(--x) / 900 * 100%); top: calc(var(--y) / 330 * 100%); }
.a-node {
  display: flex; flex-direction: column; gap: .3cqw; min-width: 14cqw; padding: 1cqw 1.4cqw; border-radius: 1.2cqw; text-align: center;
  border: 1px solid var(--line-strong); background: var(--bg); font-size: 1.6cqw; line-height: 1.2;
  transition: opacity .35s ease, border-color .35s ease, box-shadow .35s ease;
}
.a-node b { font-family: var(--font-display); font-weight: 800; font-stretch: 104%; }
.a-node small { font: 400 1.2cqw/1.25 var(--font-mono); color: var(--text-faint); }
.a-node--ai { border-color: rgba(61, 214, 255, .45); }
.a-badge { padding: .8cqw 1.4cqw; border-radius: var(--pill); border: 1px solid rgba(255, 95, 168, .5); background: rgba(255, 95, 168, .1); color: #ff8fc1; font: 600 1.3cqw/1 var(--font-mono); white-space: nowrap; transition: opacity .35s ease; }
.arch__edges path.ai { stroke: rgba(61, 214, 255, .35); }
[data-arch]:not(.is-ai) .a-node--ai, [data-arch]:not(.is-ai) .a-badge, [data-arch]:not(.is-ai) .arch__edges path.ai { opacity: .12; }
[data-arch]:not(.is-ai) .arch__edges path.lit.ai-lit { opacity: 0; }
.a-node.is-on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 22px rgba(46, 255, 140, .25); }

/* ── Stack ── */
.stack { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stack__card {
  display: flex; flex-direction: column; gap: 12px; padding: 22px; border-radius: 18px; min-width: 0;
  border: 1px solid var(--line); background: var(--bg-raise); transition: border-color .25s ease, transform .25s ease;
}
.stack__card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.stack__card h3 { font: 800 18px/1.2 var(--font-display); font-stretch: 104%; }
.stack__card p { font-size: 13.5px; color: var(--text-muted); }

/* ── Path ── */
ol.road { position: relative; display: flex; flex-direction: column; gap: 0; padding-left: 28px; --road: 1; }
.road::before { content: ""; position: absolute; left: 7px; top: 10px; bottom: 10px; width: 2px; background: var(--line-strong); }
.road::after { content: ""; position: absolute; left: 7px; top: 10px; bottom: 10px; width: 2px; background: linear-gradient(var(--accent), #3dd6ff); transform: scaleY(var(--road)); transform-origin: top; }
.road__stop { position: relative; display: grid; grid-template-columns: 120px minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; padding: 22px 0; border-top: 1px solid var(--line); transition: opacity .4s ease; }
.road__stop::before { content: ""; position: absolute; left: -27px; top: 28px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line-strong); transition: border-color .3s ease, background-color .3s ease, box-shadow .3s ease; z-index: 1; }
.road__stop.is-on::before { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.ia-motion .road__stop:not(.is-on) { opacity: .45; }
.road__stop time { font: 500 13px/1.6 var(--font-mono); color: var(--accent); }
.road__stop h3 { margin-bottom: 4px; font: 800 20px/1.2 var(--font-display); font-stretch: 104%; }
.road__stop p { font-size: 14.5px; color: var(--text-muted); }
.road__keep { align-self: start; padding: 10px 14px; border-radius: 10px; border: 1px solid rgba(61, 214, 255, .35); background: rgba(61, 214, 255, .06); color: var(--text) !important; }
.road__stop--now h3 { color: var(--accent); }
.road__quote {
  margin-top: 48px; max-width: 900px;
  font: 900 clamp(28px, 4vw, 56px)/1.02 var(--font-display); font-stretch: 108%; letter-spacing: -.03em; text-transform: uppercase;
  background: linear-gradient(90deg, var(--text), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent;
}

@media (max-width: 1080px) {
  .rules-grid, .stack { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lab { grid-template-columns: minmax(0, 1fr); }
  .lab__skills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lab__skills .demo__hint { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .rules-grid, .stack { grid-template-columns: minmax(0, 1fr); }
  .lab__skills { grid-template-columns: minmax(0, 1fr); }
  .road__stop { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .arch__canvas { margin: 10px 4px; }
  .a-node { font-size: 2.1cqw; min-width: 16cqw; padding: 1cqw; }
  .a-node small { font-size: 1.6cqw; }
}
@media (max-width: 640px) {
  .arch { overflow-x: auto; }
  .arch .demo__bar { position: sticky; left: 0; }
  .arch__canvas { width: 640px; margin: 14px; }
  .a-node { font-size: 1.7cqw; }
  .a-node small { font-size: 1.3cqw; }
}

.arch__hint { display: none; margin: 0 18px 14px; font: 500 11px/1 var(--font-mono); color: var(--text-faint); }
@media (max-width: 640px) { .arch__hint { display: block; position: sticky; left: 0; } }
