/* mcp-lab.css — MCP Lab standalone page + 6-act visualization.
   CSS variables only — no hardcoded hex outside :root. */

:root {
    --mcp-tangle:   rgba(255, 255, 255, 0.13);   /* messy connectors (faint base line) */
    --mcp-flow:     var(--mcp-tool);              /* warm flowing data (Act 1 is amber, cyan is reserved for the MCP solution in Act 2) */
    --mcp-flow-glow: rgba(255, 158, 109, 0.4);
    --mcp-tool:     #FF9E6D;                       /* tool nodes (warm contrast to mint) */
    --mcp-tool-soft: rgba(255, 158, 109, 0.14);
    --mcp-swap:     #4D6BFE;                       /* the swapped-in model (DeepSeek) */
    --mcp-swap-glow: rgba(77, 107, 254, 0.45);
    --mcp-stage-bg: #060606;
    --danger-soft:  rgba(255, 92, 92, 0.18);
    --danger-glow:  rgba(255, 92, 92, 0.45);
    --mcp-stage-h:  480px;                          /* shared height: stage box + copy column */
    /* act 2 glossy plumbing */
    --mcp-pipe-dark:  #15110d;                      /* pipe shadow edge */
    --mcp-pipe-mid:   #7c828c;                      /* metallic sheen highlight (cylinder top) */
    --mcp-pipe-gloss: rgba(255, 255, 255, 0.5);     /* thin specular streak */
    --mcp-collar:     #41454d;                      /* coupling metal */
    --mcp-collar-rim: rgba(255, 255, 255, 0.28);    /* coupling rim line */
    --mcp-chip-tile:  #f5f5f3;                       /* light app-icon tile behind brand logos */
}

/* ─── page frame ─────────────────────────────────────────────────────────────── */

.mcp-lab-page {
    background: var(--bg);
    color: var(--ink);
    min-height: 100vh;
}

#mcp-main {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: calc(var(--nav-h) + var(--space-6)) var(--space-6) var(--space-12);
}

.mcp-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    margin-top: var(--space-16);
    padding-top: var(--space-6);
    border-top: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    color: var(--ink-muted);
}
.mcp-footer-back {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--accent);
    text-decoration: none;
    transition: gap var(--dur-fast) var(--ease-out);
}
.mcp-footer-back:hover { gap: var(--space-3); }

/* ─── act header: per-act heading in a full-width bar at the top ──────────────── */

.mcp-actheader {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}
.mcp-actheader-text { flex: 1; min-width: 0; }
.mcp-header-nav {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-shrink: 0;
    padding-top: var(--space-1);
}
.mcp-actheader .mcp-eyebrow { margin: 0 0 var(--space-2); }
.mcp-actheader .mcp-title {
    font-size: clamp(1.5rem, 3.2vw, 2.2rem);
    margin: 0;
}
.mcp-actheader .mcp-body-text {
    margin: var(--space-2) 0 0;
    max-width: 92ch;
    color: var(--ink-muted);
    font-size: var(--text-sm);
}
/* hidden until the Act 1 phrase journey completes */
.mcp-body-hidden { opacity: 0; pointer-events: none; }

/* ─── body grid: dominant stage (left) with supporting text beside it (right) ─── */

.mcp-bodygrid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.65fr);
    gap: var(--space-5);
    align-items: start;
}

/* the stage column holds the large visualization */
.mcp-stage-col { display: flex; flex-direction: column; }

/* story beat 0: stage hidden, copy fills full grid width */
.mcp-story--no-stage {
    grid-template-columns: 1fr;
}

/* intro mode: stage-col spans full width, copy hidden, controls hidden inside stage-col */
.mcp-lab--intro .mcp-bodygrid { grid-template-columns: 1fr; }
.mcp-lab--intro .mcp-copy { display: none; }
.mcp-lab--intro .mcp-controls { display: none; }
.mcp-lab--intro .mcp-stagewrap { height: min(60vh, 480px); }

/* stage entrance glow — runs once when the stage column first appears */
@keyframes mcp-stage-enter {
    0%   { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 80px var(--accent-glow), inset 0 0 0 1px rgba(0,255,209,0.18); }
    55%  { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 28px var(--accent-glow); }
    100% { border-color: var(--border); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03), 0 0 0 1px var(--border), 0 24px 64px rgba(0,0,0,0.5); }
}
.mcp-stagewrap--entering {
    animation: mcp-stage-enter 1.6s ease-out forwards;
}

.mcp-stagewrap {
    position: relative;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(ellipse 90% 55% at 50% -5%, rgba(0,255,209,0.13) 0%, transparent 60%),
        radial-gradient(ellipse 55% 40% at 85% 85%, rgba(255,158,109,0.07) 0%, transparent 55%),
        var(--mcp-stage-bg);
    overflow: hidden;
    height: min(58vh, 500px);
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.03),
        0 0 0 1px var(--border),
        0 24px 64px rgba(0,0,0,0.5);
}
.mcp-stage {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    padding: var(--space-5);
}
.mcp-svg { width: 100%; height: 100%; display: block; }

/* ─── stage tools: replay + expand, top-right of the visual box ──────────────── */
.mcp-stage-tools {
    position: absolute;
    top: var(--space-3);
    right: var(--space-3);
    z-index: 6;
    display: flex;
    gap: var(--space-2);
}
.mcp-stage-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    font-size: var(--text-base);
    line-height: 1;
    color: var(--ink-muted);
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: color var(--dur-fast) var(--ease-out),
                border-color var(--dur-fast) var(--ease-out),
                box-shadow var(--dur-fast) var(--ease-out);
}
.mcp-stage-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
}

/* Stage-embedded nav buttons (prev / next) */
@keyframes mcp-next-pulse {
    0%, 100% { box-shadow: 0 0 6px var(--accent-glow), 0 0 0 1px var(--accent); }
    50%       { box-shadow: 0 0 18px var(--accent-glow), 0 0 0 1px var(--accent); }
}
.mcp-stage-nav { width: 32px; height: 32px; font-size: 18px; }
.mcp-nav-prev:disabled { opacity: 0.25; cursor: default; }
.mcp-nav-prev:not(:disabled) { color: var(--ink-muted); }
.mcp-nav-next:not(:disabled) {
    color: var(--accent);
    border-color: var(--accent);
    animation: mcp-next-pulse 2s ease-in-out infinite;
}
.mcp-nav-next:not(:disabled):hover {
    box-shadow: 0 0 24px var(--accent-glow), 0 0 0 1px var(--accent);
    animation: none;
}

/* Hide the controls while the Act 1 phrase-journey overlay owns the stage. */
.mcp-lab--intro .mcp-stage-tools { display: none; }
.mcp-lab--intro .mcp-header-nav  { display: none; }

.mcp-stage-backdrop {
    position: fixed;
    inset: 0;
    z-index: 199;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(6px);
}
.mcp-stagewrap--expanded {
    position: fixed;
    inset: 4vh 4vw;
    z-index: 200;
    height: auto;
    width: auto;
    margin: 0;
}

/* scan-line / blade wipe overlay */
.mcp-wipe {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}
.mcp-blade {
    position: absolute;
    top: -6%;
    left: -4%;
    width: 5px;
    height: 112%;
    background: var(--accent);
    transform: rotate(1.6deg);
    box-shadow:
        0 0 12px var(--accent-glow),
        0 0 40px var(--accent-glow),
        0 0 80px var(--accent-glow);
    opacity: 0.9;
}

/* ─── copy column ────────────────────────────────────────────────────────────── */

/* The copy column sizes to its content and never scrolls internally — a tall act
   simply makes the page taller (normal page scroll), no broken mid-page scrollbar. */
.mcp-copy {
    display: flex;
    flex-direction: column;
}
.mcp-eyebrow {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    letter-spacing: 0.1em;
    color: var(--accent);
    margin: 0 0 var(--space-2);
}
.mcp-title {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    line-height: 1.05;
    margin: 0 0 var(--space-4);
    min-height: 1.15em;
    letter-spacing: -0.02em;
}
.mcp-body-text {
    color: var(--ink);
    font-size: var(--text-base);
    line-height: 1.55;
    margin: 0 0 var(--space-4);
}
.mcp-scene-extra { display: flex; flex-direction: column; gap: var(--space-4); }

.mcp-caption {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    color: var(--accent);
    margin: 0;
    padding-left: var(--space-3);
    border-left: 2px solid var(--accent);
}
.mcp-origin {
    font-size: var(--text-sm);
    color: var(--ink-muted);
    line-height: 1.5;
    margin: 0;
}

/* labeled fact rows (Origin / Adoption) in the copy column */
.mcp-fact {
    font-size: var(--text-sm);
    color: var(--ink-muted);
    line-height: 1.55;
    margin: 0;
}
.mcp-fact-label {
    display: inline-block;
    margin-right: var(--space-2);
    padding: 1px var(--space-2);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--accent);
    background: var(--accent-soft);
}
.mcp-fact-text { color: var(--ink-muted); }

/* "The HTTP of AI" lead framing — the resonant analogy gets a tinted callout */
.mcp-fact--http {
    padding: var(--space-3) var(--space-4);
    border-left: 2px solid var(--accent);
    border-radius: var(--radius-sm);
    background: var(--accent-soft);
}
.mcp-fact--http .mcp-fact-text { color: var(--ink); }

/* ─── controls ───────────────────────────────────────────────────────────────── */

.mcp-controls {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: var(--space-4);
    padding-top: var(--space-6);
    border-top: 1px solid var(--border);
}

/* pill wrapper: prev | dots | next — perfectly centered */
.mcp-nav-pill {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: 99px;
    padding: var(--space-2) var(--space-4);
}

.mcp-nav-btn {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-muted);
    background: transparent;
    border: none;
    border-radius: 99px;
    padding: var(--space-2) var(--space-5);
    min-height: 36px;
    cursor: pointer;
    transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.mcp-nav-btn:hover:not(:disabled) {
    color: var(--ink);
    background: rgba(255,255,255,0.06);
}
.mcp-nav-btn:disabled { opacity: 0.25; cursor: default; }
/* Next button — always highlighted as primary CTA */
.mcp-nav-next:not(:disabled) {
    color: var(--accent);
    background: var(--accent-soft);
    box-shadow: 0 0 12px var(--accent-glow);
}
.mcp-nav-next:not(:disabled):hover {
    background: rgba(0,255,209,0.2);
    box-shadow: 0 0 22px var(--accent-glow);
}

/* dots inside the pill */
.mcp-dots { display: flex; align-items: center; gap: var(--space-2); padding: 0 var(--space-2); }
.mcp-dot {
    width: 8px; height: 8px;
    padding: 0;
    border-radius: 99px;
    border: 1px solid var(--border-strong);
    background: transparent;
    cursor: pointer;
    transition: width 0.3s var(--ease-out), background 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out), border-color 0.2s;
}
.mcp-dot:hover { border-color: var(--accent); background: rgba(0,255,209,0.2); }
.mcp-dot.is-deeper { border-style: dashed; }
.mcp-dot:first-of-type.is-deeper { margin-left: var(--space-2); }
.mcp-dot[aria-selected="true"] {
    width: 22px;
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 8px var(--accent-glow);
}

/* FAQ — subtle text link, pinned to the top-right of the intro header */
.mcp-faq-btn {
    position: absolute;
    top: 0;
    right: 0;
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-subtle);
    background: transparent;
    border: none;
    padding: var(--space-2) var(--space-1);
    cursor: pointer;
    transition: color var(--dur-fast) var(--ease-out);
}
.mcp-faq-btn:hover { color: var(--accent); }

/* ─── SVG nodes + wires ──────────────────────────────────────────────────────── */

.mcp-node-rect {
    fill: var(--bg-card);
    stroke: var(--border-strong);
    stroke-width: 1;
}
.mcp-node-label {
    fill: var(--ink);
    font-family: var(--font-mono);
    font-size: 14px;
}
.mcp-node--ai    .mcp-node-rect { stroke: var(--axis-ai);    filter: drop-shadow(0 0 6px var(--axis-ai-glow)); }
.mcp-node--cloud .mcp-node-rect { stroke: var(--axis-cloud); filter: drop-shadow(0 0 6px var(--axis-cloud-glow)); }
.mcp-node--biz   .mcp-node-rect { stroke: var(--axis-biz);   filter: drop-shadow(0 0 6px var(--axis-biz-glow)); }
.mcp-node--tool  .mcp-node-rect { stroke: var(--mcp-tool); }
.mcp-node--tool  .mcp-node-label { fill: var(--ink); }
.mcp-node--server .mcp-node-rect { stroke: var(--accent); filter: drop-shadow(0 0 6px var(--accent-glow)); }
.mcp-node--server .mcp-node-label { fill: var(--accent); font-size: 13px; }
.mcp-node--swap  .mcp-node-rect { stroke: var(--mcp-swap); filter: drop-shadow(0 0 6px var(--mcp-swap-glow)); }
.mcp-node--swap  .mcp-node-label { fill: var(--mcp-swap); }
/* the model you swapped away from — desaturated + faded (opacity set inline by GSAP) */
.mcp-node--dim   .mcp-node-rect { stroke: var(--border-strong); filter: grayscale(1); }
.mcp-node--dim   .mcp-node-label, .mcp-node--dim .mcp-node-sub { fill: var(--ink-subtle); }
.mcp-node--dim   .mcp-logo-img { filter: grayscale(1); }
.mcp-node--new   .mcp-node-rect { stroke: var(--danger); filter: drop-shadow(0 0 8px var(--danger)); }
.mcp-node--break .mcp-node-rect { stroke: var(--danger); filter: drop-shadow(0 0 10px var(--danger)); }
.mcp-node--break .mcp-node-label { fill: var(--danger); }

.mcp-node-sub { fill: var(--ink-subtle); font-family: var(--font-mono); font-size: 9px; }
.mcp-node--tool .mcp-node-sub { fill: var(--mcp-tool); }
.mcp-node--break .mcp-node-sub { fill: var(--danger); }

.mcp-wire        { stroke: var(--mcp-tangle); stroke-width: 1.5; }
.mcp-wire--clean { stroke: var(--accent); stroke-width: 2.6; filter: drop-shadow(0 0 4px var(--accent-glow)); }
.mcp-wire--clean-edge { stroke: rgba(0, 0, 0, 0.6); stroke-width: 7; stroke-linecap: round; }
.mcp-wire--old   { stroke: rgba(255, 255, 255, 0.34); stroke-width: 2.5; }

/* act 2 old-world glossy "pipes": dark edge + metallic gradient body + specular
   gloss streak, with an amber flow line riding inside (defs in mcp-lab.js) */
.mcp-pipe-edge   { stroke: var(--mcp-pipe-dark); stroke-width: 22; stroke-linecap: round; }
.mcp-pipe-body   { stroke-width: 16; stroke-linecap: round; }            /* stroke set to url(#mcpPipeGrad) inline */
.mcp-pipe-gloss  { stroke: var(--mcp-pipe-gloss); stroke-width: 3; stroke-linecap: round; opacity: 0.55; }
.mcp-pipe-flow   { stroke: var(--mcp-tool); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 5 13; filter: drop-shadow(0 0 4px var(--mcp-flow-glow)); }
.mcp-flow-arrow  { stroke: var(--mcp-tool); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 3px var(--mcp-flow-glow)); }
.mcp-pipe-break  { stroke: var(--danger); stroke-width: 2.4; stroke-linecap: round; }
.mcp-pipe-drip   { fill: var(--mcp-tool); opacity: 0.85; }

/* metallic coupling collars */
.mcp-collar-band { fill: var(--mcp-collar); stroke: rgba(0, 0, 0, 0.5); stroke-width: 1; }
.mcp-collar-rim  { stroke: var(--mcp-collar-rim); stroke-width: 1; }

/* gradient stops for the metallic pipe body (presentation set via CSS, var()-safe) */
.mcp-pipe-grad-edge { stop-color: var(--mcp-pipe-dark); }
.mcp-pipe-grad-mid  { stop-color: var(--mcp-pipe-mid); }

/* soft depth shadow used by device/endpoint/pipe groups */
.mcp-soft-shadow { flood-color: rgba(0, 0, 0, 0.5); flood-opacity: 1; }

/* device node (rack-style AI Model): top gloss bar + status LED + port nubs */
.mcp-device-gloss { fill: rgba(255, 255, 255, 0.12); }
.mcp-device-led   { fill: var(--accent); filter: drop-shadow(0 0 4px var(--accent-glow)); }
.mcp-port-nub     { fill: var(--mcp-collar); stroke: rgba(0, 0, 0, 0.5); stroke-width: 1; }

/* brand-logo app-icon endpoints */
.mcp-endpoint-chip  { fill: var(--mcp-chip-tile); stroke: var(--border-strong); stroke-width: 1; }
.mcp-endpoint-label { fill: var(--ink); font-family: var(--font-mono); font-size: 13px; text-anchor: middle; }

/* fragile system-prompts scroll icon */
.mcp-scroll-page { fill: var(--bg-card); stroke: var(--ink-muted); stroke-width: 1.4; }
.mcp-scroll-curl { fill: var(--bg-elev); stroke: var(--ink-muted); stroke-width: 1.2; }
.mcp-scroll-line { stroke: var(--ink-subtle); stroke-width: 1.4; }
.mcp-scroll-accent { stroke: var(--mcp-tool); stroke-width: 1.6; opacity: 0.7; }
.mcp-wire--danger{ stroke: var(--danger); stroke-width: 1.8; }
.mcp-wire--break { stroke: var(--danger); stroke-width: 1.8; stroke-dasharray: 5 5; }
.mcp-break-x     { fill: var(--danger); font-family: var(--font-mono); font-size: 13px; font-weight: 700; }

/* ─── act 2: The Old World vs The MCP World ──────────────────────────────────── */
.mcp-std-bg { fill: rgba(0, 255, 209, 0.04); }
.mcp-std-divider { stroke: rgba(255, 255, 255, 0.22); stroke-width: 1; stroke-dasharray: 3 6; }
.mcp-std-panel-title {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 18px;
    fill: var(--ink-muted);
    letter-spacing: 0.01em;
}
.mcp-std-panel-title--mcp { fill: var(--accent); }

/* friction annotations on the tangled old-world wires */
.mcp-friction-pill { fill: rgba(6,6,6,0.82); }
.mcp-friction-label {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
    fill: var(--mcp-tool);
    letter-spacing: 0.03em;
    paint-order: stroke fill;
    stroke: var(--mcp-stage-bg);
    stroke-width: 4px;
}
.mcp-friction-label--caption { font-size: 10px; font-weight: 500; }

/* inline keyword highlights in narration text */
.mcp-accent { color: var(--accent); font-weight: 600; }

/* in-panel caption boxes (native SVG text) */
.mcp-caption-rect { fill: var(--bg-card); stroke: var(--border-strong); stroke-width: 1; }
.mcp-caption-rect--mcp { stroke: var(--accent); filter: drop-shadow(0 0 12px var(--accent-glow)); }
.mcp-caption-text { fill: var(--ink-muted); font-family: var(--font-sans); font-size: 14px; }
.mcp-caption-text--mcp { fill: var(--ink); }

/* the MCP standard ring hub */
.mcp-ring-outer { stroke: var(--accent); stroke-width: 2.5; filter: drop-shadow(0 0 14px var(--accent-glow)); }
.mcp-ring-inner { stroke: var(--accent); stroke-width: 1; opacity: 0.45; }
.mcp-ring-tick  { stroke: var(--accent); stroke-width: 1.5; opacity: 0.6; }
.mcp-ring-nub   { fill: var(--bg-elev); stroke: var(--accent); stroke-width: 1.2; }
.mcp-ring-label { fill: var(--accent); font-family: var(--font-mono); font-weight: 700; font-size: 16px; letter-spacing: 0.08em; }
.mcp-ring-sub   { fill: var(--accent); font-family: var(--font-mono); font-size: 11px; opacity: 0.8; }

/* a soft warm data stream drifting along each messy wire — gentle, not neon */
.mcp-wire-flow {
    fill: none;
    stroke: var(--mcp-flow);
    stroke-width: 1.8;
    stroke-linecap: round;
    opacity: 0.55;
    filter: drop-shadow(0 0 3px var(--mcp-flow-glow));
}
.mcp-wire-flow--danger {
    stroke: var(--danger);
    opacity: 0.7;
    filter: drop-shadow(0 0 3px var(--danger-glow));
}

/* ◆ connector chip — one per bespoke integration, a hand-made amber connector */
.mcp-glue {
    fill: var(--mcp-tool-soft);
    stroke: var(--mcp-tool);
    stroke-width: 1;
    opacity: 0;
}

.mcp-hub-rect {
    fill: var(--bg-elev);
    stroke: var(--accent);
    stroke-width: 1.5;
    filter: drop-shadow(0 0 18px var(--accent-glow));
}
.mcp-hub-label {
    fill: var(--accent);
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.12em;
}
.mcp-hub-port { fill: var(--accent); font-size: 22px; }

/* ─── act 1 copy: realizations + counter + actions ───────────────────────────── */

.mcp-pains { display: flex; flex-direction: column; gap: var(--space-4); }
.mcp-pain {
    display: flex;
    gap: var(--space-3);
    align-items: flex-start;
    transition: opacity var(--dur-base) var(--ease-out);
}
.mcp-pain-dot {
    flex: none;
    width: 8px; height: 8px;
    margin-top: 5px;
    border-radius: 50%;
    background: var(--ink-subtle);
    transition: background var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.mcp-pain.is-active .mcp-pain-dot { background: var(--accent); box-shadow: 0 0 10px var(--accent-glow); }
.mcp-pain-body { display: flex; flex-direction: column; gap: 2px; }
.mcp-pain-title { font-family: var(--font-mono); font-size: var(--text-sm); font-weight: 700; color: var(--ink); }
.mcp-pain.is-active .mcp-pain-title { color: var(--accent); }
.mcp-pain-note { font-size: var(--text-xs); color: var(--ink-muted); line-height: 1.45; }

.mcp-action-row { display: flex; gap: var(--space-3); flex-wrap: wrap; }

.mcp-counter { font-family: var(--font-mono); }
.mcp-counter-num {
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--accent);
    text-shadow: 0 0 18px var(--accent-glow);
}
.mcp-counter-label { color: var(--ink-muted); font-size: var(--text-sm); }

.mcp-action-btn {
    align-self: flex-start;
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid var(--accent);
    border-radius: var(--radius-md);
    padding: var(--space-2) var(--space-5);
    min-height: var(--tap-min);
    cursor: pointer;
    transition: box-shadow var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.mcp-action-btn:hover:not(:disabled) { box-shadow: 0 0 0 1px var(--accent-soft), 0 0 22px var(--accent-glow); transform: translateY(-1px); }
.mcp-action-btn:disabled { opacity: 0.4; cursor: default; }
/* toggled-on state — a soft cyan tint + glow ring */
.mcp-action-btn.is-on { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent), 0 0 18px var(--accent-glow); }

/* ─── act 1 intro: phrase journey overlay ────────────────────────────────────── */

@keyframes mcp-caret-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

.mcp-mess-intro {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-5);
    padding: var(--space-8) var(--space-6);
    background: var(--mcp-stage-bg);
    font-family: var(--font-mono);
    text-align: center;
    cursor: pointer;
    outline: none;
}
.mcp-mess-line {
    font-size: clamp(var(--text-base), 2.2vw, var(--text-xl));
    font-weight: 600;
    color: var(--ink);
    max-width: 38ch;
    line-height: 1.4;
    margin: 0;
}
.mcp-mess-line::after {
    content: "▋";
    display: inline-block;
    color: var(--accent);
    margin-left: 3px;
    animation: mcp-caret-blink 0.9s step-start infinite;
}
/* static stacked layout (reduced motion) */
.mcp-mess-lines { display: flex; flex-direction: column; gap: var(--space-3); }
.mcp-mess-lines .mcp-mess-line::after { display: none; }
.mcp-mess-lines .mcp-mess-line:last-child::after { display: inline-block; }

.mcp-mess-hint {
    font-size: var(--text-xs);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-subtle);
    margin: 0;
    transition: opacity 0.3s;
}
.mcp-mess-cta {
    font-family: var(--font-mono);
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid var(--accent);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-8);
    cursor: pointer;
    transition: box-shadow var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.mcp-mess-cta:hover { box-shadow: 0 0 0 1px var(--accent-soft), 0 0 28px var(--accent-glow); transform: translateY(-1px); }

/* copy column hidden while intro is active */
.mcp-scene-extra.is-pending {
    opacity: 0;
    transform: translateY(6px);
    pointer-events: none;
    transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
/* body text hidden during intro */
.mcp-body-text.mcp-body-hidden { opacity: 0; pointer-events: none; }

/* story-beat continue button — drives progressive reveal */
.mcp-continue-btn {
    align-self: flex-start;
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--ink);
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: 99px;
    padding: var(--space-2) var(--space-6);
    min-height: 38px;
    cursor: pointer;
    transition: border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.mcp-continue-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent-soft), 0 0 18px var(--accent-glow);
    transform: translateY(-1px);
}

/* ─── "in plain terms" analogy toggle (foot of every act's copy column) ───────── */
/* Collapsed by default; reveals (.is-ready) only after the act's entrance settles. */

.mcp-analogy-slot {
    margin-top: auto;
    padding-top: var(--space-4);
}
.mcp-analogy {
    opacity: 0;
    transform: translateY(6px);
    transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.mcp-analogy.is-ready {
    opacity: 1;
    transform: none;
}
.mcp-analogy-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: transparent;
    border: 1px solid var(--border-strong);
    border-radius: var(--space-2);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    letter-spacing: 0.04em;
    color: var(--accent);
    cursor: pointer;
    transition: border-color var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out);
}
.mcp-analogy-toggle:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
}
.mcp-analogy-glyph {
    font-size: var(--text-base);
    line-height: 1;
    filter: drop-shadow(0 0 8px var(--accent-glow));
}
.mcp-analogy-chevron {
    font-size: var(--text-base);
    line-height: 1;
    transition: transform var(--dur-base) var(--ease-out);
}
.mcp-analogy.is-open .mcp-analogy-chevron {
    transform: rotate(90deg);
}
.mcp-analogy-panel {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    padding: 0 var(--space-4);
    border-left: 2px solid var(--accent);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    transition: max-height var(--dur-base) var(--ease-out), opacity var(--dur-base) var(--ease-out),
        padding var(--dur-base) var(--ease-out), margin var(--dur-base) var(--ease-out);
}
.mcp-analogy.is-open .mcp-analogy-panel {
    max-height: 360px;
    opacity: 1;
    margin-top: var(--space-3);
    padding: var(--space-3) var(--space-4);
}
.mcp-analogy-text,
.mcp-analogy-lead {
    margin: 0;
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    line-height: 1.5;
    color: var(--ink);
}
.mcp-analogy-lead {
    font-weight: 600;
}
.mcp-analogy-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}
.mcp-analogy-point {
    position: relative;
    padding-left: var(--space-4);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    line-height: 1.5;
    color: var(--ink-muted);
}
.mcp-analogy-point::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
}

/* act 2: key points — cyan-dot list, matches the Act 1 pain-dot aesthetic */
.mcp-points {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin: 0;
    padding: 0;
}
.mcp-point {
    position: relative;
    padding-left: var(--space-5);
    color: var(--ink);
    font-size: var(--text-sm);
    line-height: 1.5;
}
.mcp-point::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent-glow);
}

/* ─── act 3: built for humans (iteration loop → cached code → flawless runs) ───── */

/* the ~2-week iteration ring */
.mcp-loop-ring {
    stroke: var(--border-strong);
    stroke-width: 1.5;
    stroke-dasharray: 5 6;
}
/* the human-integrator node carries a longer label — shrink it to fit the box */
.mcp-node--human .mcp-node-label { font-size: 11px; }

/* animated human figure (Act 3) */
.mcp-human-head  { fill: var(--ink-muted); stroke: none; }
.mcp-human-body, .mcp-human-arms, .mcp-human-leg { stroke: var(--ink-muted); stroke-width: 2.5; stroke-linecap: round; }
.mcp-human-glow  { stroke: var(--accent); stroke-width: 1.5; opacity: 0.6; }

.mcp-loop-node { fill: var(--ink-subtle); }
.mcp-loop-label {
    fill: var(--ink-muted);
    font-family: var(--font-mono);
    font-size: 12px;
    transition: fill var(--dur-fast) var(--ease-out);
}
.mcp-loop-step.is-active .mcp-loop-node {
    fill: var(--accent);
    filter: drop-shadow(0 0 6px var(--accent-glow));
}
.mcp-loop-step.is-active .mcp-loop-label { fill: var(--accent); }

/* the token grinding round the loop */
.mcp-loop-token {
    fill: var(--accent);
    filter: drop-shadow(0 0 6px var(--accent-glow));
}
.mcp-loop-effort {
    fill: var(--ink-subtle);
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.04em;
}

/* the deterministic-code artifact the struggle crystallizes into */
.mcp-code-rect {
    fill: var(--bg-elev);
    stroke: var(--accent);
    stroke-width: 1.5;
    filter: drop-shadow(0 0 16px var(--accent-glow));
}
/* doc icon inside the artifact — "the docs, turned into code" */
.mcp-doc-page { fill: none; stroke: var(--accent); stroke-width: 1.4; }
.mcp-doc-fold { fill: none; stroke: var(--accent); stroke-width: 1.4; }
.mcp-doc-line { stroke: var(--accent); stroke-width: 1.2; opacity: 0.7; }
.mcp-code-glyph {
    fill: var(--accent);
    font-family: var(--font-mono);
    font-size: 17px;
    font-weight: 700;
}
.mcp-code-tag {
    fill: var(--accent);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* the flawless-runs payoff */
.mcp-run-counter {
    fill: var(--accent);
    font-family: var(--font-mono);
    font-size: 34px;
    font-weight: 700;
    filter: drop-shadow(0 0 10px var(--accent-glow));
}
.mcp-run-note {
    fill: var(--ink-muted);
    font-family: var(--font-mono);
    font-size: 12px;
}
.mcp-run-check {
    fill: var(--accent);
    font-family: var(--font-mono);
    font-size: 15px;
    font-weight: 700;
}
/* the API ring pulse when the code invokes it */
.mcp-api-pulse { stroke: var(--accent); stroke-width: 2; }

/* step-by-step narration synced with the visual on the left */
.mcp-narration {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin: 0 0 var(--space-2);
    padding: 0;
    counter-reset: narr;
}
.mcp-narr {
    position: relative;
    padding-left: var(--space-6);
    color: var(--ink);
    font-size: var(--text-sm);
    line-height: 1.5;
    counter-increment: narr;
}
.mcp-narr::before {
    content: counter(narr, decimal-leading-zero);
    position: absolute;
    left: 0;
    top: 0.1em;
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--accent);
}

/* closing AI-contrast line that sets up the next act */
.mcp-bridge {
    color: var(--ink-muted);
    font-size: var(--text-sm);
    line-height: 1.55;
    margin: 0;
    padding-left: var(--space-3);
    border-left: 2px solid var(--border-strong);
}

/* ─── act 4: under the hood (client ↔ server, primitives, discover→call loop) ──── */

.mcp-uh-rect {
    fill: rgba(255, 255, 255, 0.02);
    stroke: var(--border-strong);
    stroke-width: 1.5;
}
.mcp-uh-panel--client .mcp-uh-rect { stroke: var(--axis-ai); filter: drop-shadow(0 0 10px var(--axis-ai-glow)); }
.mcp-uh-panel--server .mcp-uh-rect { stroke: var(--accent); filter: drop-shadow(0 0 10px var(--accent-glow)); }
.mcp-uh-title {
    fill: var(--ink);
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 18px;
}
.mcp-uh-sub {
    fill: var(--ink-muted);
    font-family: var(--font-mono);
    font-size: 11px;
}
.mcp-uh-divider { stroke: var(--border); stroke-width: 1; }

/* client internal parts (Model / Instruction / Tools) */
.mcp-uh-part-rect {
    fill: var(--bg-elev);
    stroke: var(--border-strong);
    stroke-width: 1;
    transition: stroke var(--dur-fast) var(--ease-out);
}
.mcp-uh-part-label { fill: var(--ink); font-family: var(--font-mono); font-size: 13px; }
.mcp-uh-part.is-active .mcp-uh-part-rect { stroke: var(--axis-ai); filter: drop-shadow(0 0 8px var(--axis-ai-glow)); }

/* server primitive cards — name + who-controls tag */
.mcp-prim-card-rect {
    fill: var(--bg-elev);
    stroke: var(--border-strong);
    stroke-width: 1;
    transition: stroke var(--dur-fast) var(--ease-out);
}
.mcp-prim-card-name { fill: var(--accent); font-family: var(--font-mono); font-size: 14px; font-weight: 600; }
.mcp-prim-card-ctrl { fill: var(--ink-subtle); font-family: var(--font-mono); font-size: 10px; }
.mcp-prim-card.is-active .mcp-prim-card-rect { stroke: var(--accent); filter: drop-shadow(0 0 10px var(--accent-glow)); }
.mcp-prim-card.is-call .mcp-prim-card-rect { stroke: var(--accent); filter: drop-shadow(0 0 16px var(--accent-glow)); }

/* communication channels + flying capability labels */
.mcp-channel-label { fill: var(--ink-muted); font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; }
.mcp-fly-cap { fill: var(--accent); font-family: var(--font-mono); font-size: 11px; }

/* copy-column primitives legend */
.mcp-prim-legend { display: flex; flex-direction: column; gap: var(--space-3); }
.mcp-prim-legend-row { display: flex; align-items: baseline; gap: var(--space-2); flex-wrap: wrap; }
.mcp-prim-legend-ctrl {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--ink-subtle);
}
.mcp-prim-legend-note {
    flex: 1 1 100%;
    color: var(--ink-muted);
    font-size: var(--text-sm);
    line-height: 1.45;
}

/* ─── act 5: handshake ───────────────────────────────────────────────────────── */

.mcp-hs { display: flex; flex-direction: column; height: 100%; gap: var(--space-3); }
.mcp-hs-rail { width: 100%; height: 70px; flex: none; }
.mcp-rail-line { stroke: var(--border-strong); stroke-width: 2; stroke-dasharray: 4 5; }
.mcp-rail-end--client { fill: var(--axis-ai); filter: drop-shadow(0 0 6px var(--axis-ai-glow)); }
.mcp-rail-end--server { fill: var(--accent); filter: drop-shadow(0 0 6px var(--accent-glow)); }
.mcp-rail-cap { fill: var(--ink-muted); font-family: var(--font-mono); font-size: 12px; }

/* one JSON-RPC message card shown at a time, centered (one card fits, no scroll) */
.mcp-hs-cardhost {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: var(--space-2) var(--space-2) 0;
}
.mcp-log {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    padding-right: var(--space-2);
}
.mcp-msg {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    padding: var(--space-3);
    width: 100%;
    max-width: 560px;
}
.mcp-msg--c2s { border-left: 2px solid var(--axis-ai); }
.mcp-msg--s2c { border-right: 2px solid var(--accent); }
.mcp-msg--key { box-shadow: 0 0 0 1px var(--accent-soft), 0 0 22px var(--accent-glow); border-color: var(--accent); }
.mcp-msg-head { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-2); }
.mcp-msg-arrow { color: var(--accent); font-family: var(--font-mono); }
.mcp-msg-method { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--ink); font-weight: 700; }
.mcp-msg-dir { margin-left: auto; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--ink-subtle); }
.mcp-msg-note { font-size: var(--text-xs); color: var(--ink-muted); margin: 0 0 var(--space-2); }
.mcp-msg-json {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--ink-muted);
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: var(--space-2);
    margin: 0;
    overflow-x: auto;
    white-space: pre;
}
.mcp-json-tool { color: var(--accent); font-weight: 700; }
.mcp-json-hl { background: var(--accent-soft); border-radius: 2px; padding: 0 2px; color: var(--ink); font-weight: 600; }
.mcp-discover { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-2); }

/* chips */
.mcp-chiprow { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.mcp-chip {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong);
    color: var(--ink);
    white-space: nowrap;
}
.mcp-chip--server { border-color: var(--mcp-tool); color: var(--mcp-tool); }
.mcp-chip--client { border-color: var(--axis-ai); color: var(--axis-ai); }
.mcp-chip--trans  { border-color: var(--axis-cloud); color: var(--axis-cloud); }
.mcp-chip--tool   { border-color: var(--border-strong); }
.mcp-chip--found  { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 12px var(--accent-glow); }
.mcp-chip--safe   { border-color: var(--era-deloitte); color: var(--era-deloitte); }

.mcp-prim, .mcp-trans { display: flex; flex-direction: column; gap: var(--space-2); }
.mcp-prim-h { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted); margin: 0; }
.mcp-prim-sub { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--ink-subtle); margin: var(--space-1) 0 0; }
.mcp-trans-row { display: flex; align-items: center; gap: var(--space-2); }
.mcp-trans-note { font-size: var(--text-xs); color: var(--ink-muted); }

/* JSON-RPC explainer + synced step list (right column) */
.mcp-hs-intro { font-size: var(--text-sm); color: var(--ink-muted); line-height: 1.5; margin: 0 0 var(--space-2); }
.mcp-hs-steps { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-2); }
.mcp-hs-step {
    display: flex;
    gap: var(--space-2);
    padding: var(--space-1) var(--space-2);
    border-left: 2px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: opacity var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.mcp-hs-step:hover { background: rgba(255, 255, 255, 0.05); border-left-color: var(--border-strong); }
.mcp-hs-step:focus-visible { outline: 1px solid var(--accent); outline-offset: 1px; }
.mcp-hs-step-arrow { font-family: var(--font-mono); font-size: var(--text-sm); }
.mcp-hs-step--c2s .mcp-hs-step-arrow { color: var(--axis-ai); }
.mcp-hs-step--s2c .mcp-hs-step-arrow { color: var(--accent); }
.mcp-hs-step-body { display: flex; flex-direction: column; gap: 1px; }
.mcp-hs-step-label { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--ink); }
.mcp-hs-step-note { font-size: var(--text-xs); color: var(--ink-muted); line-height: 1.4; }
.mcp-hs-step.is-active {
    background: var(--accent-soft);
    border-left-color: var(--accent);
}
.mcp-hs-step.is-active .mcp-hs-step-label { color: var(--accent); font-weight: 700; }
.mcp-hs-step.is-done .mcp-hs-step-label { color: var(--ink-muted); }

/* ─── act 6: adapter ─────────────────────────────────────────────────────────── */

.mcp-adapter { display: flex; flex-direction: column; gap: var(--space-4); height: 100%; }
.mcp-adapter-req {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    color: var(--accent);
    margin: 0;
}
.mcp-adapter-boards { display: flex; align-items: center; gap: var(--space-3); }
.mcp-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    border: 1px solid var(--border-strong);
    background: var(--bg-card);
}
.mcp-box--mcp { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent-soft), 0 0 24px var(--accent-glow); }
.mcp-box--backend { border-color: var(--border-strong); background: var(--bg-elev); }
.mcp-box-tag { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--ink); font-weight: 700; }
.mcp-box-sub { font-size: var(--text-xs); color: var(--accent); }
.mcp-box-flag {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    letter-spacing: 0.1em;
    color: var(--ink-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1px var(--space-2);
    align-self: flex-start;
}
.mcp-box-link { color: var(--accent); font-size: var(--text-xl); }

.mcp-calls { display: flex; flex-direction: column; gap: var(--space-2); }
.mcp-callrow {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    padding: var(--space-2);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}
.mcp-callrow-mcp { color: var(--accent); }
.mcp-callrow-arrow { color: var(--ink-subtle); }
.mcp-callrow-be { color: var(--ink-muted); }

.mcp-meter-wrap { display: flex; flex-direction: column; gap: var(--space-1); margin-top: auto; }
.mcp-meter-label { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--ink-muted); }
.mcp-meter { height: 10px; border-radius: 999px; background: var(--bg-card); border: 1px solid var(--border); overflow: hidden; }
.mcp-meter-fill { height: 100%; width: 0; background: var(--accent); box-shadow: 0 0 12px var(--accent-glow); transition: none; }
.mcp-meter-fill.is-high { background: var(--danger); box-shadow: 0 0 12px var(--danger-glow); }
.mcp-meter-stat { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--ink-muted); }

.mcp-toggle { display: flex; gap: var(--space-2); }
.mcp-toggle-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    padding: var(--space-3);
    cursor: pointer;
    transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.mcp-toggle-btn[aria-selected="true"] {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent-soft), 0 0 18px var(--accent-glow);
}
.mcp-toggle-label { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--ink); font-weight: 700; }
.mcp-toggle-tag { font-size: var(--text-xs); color: var(--ink-muted); }

/* ─── act 7: landscape ───────────────────────────────────────────────────────── */

.mcp-landscape { display: flex; flex-direction: column; height: 100%; justify-content: center; }
.mcp-layers { display: flex; flex-direction: column; gap: var(--space-3); }
.mcp-layer {
    display: flex;
    align-items: baseline;
    gap: var(--space-4);
    padding: var(--space-4);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-strong);
    background: var(--bg-card);
    border-left-width: 3px;
}
.mcp-layer--ai    { border-left-color: var(--axis-ai); }
.mcp-layer--cloud { border-left-color: var(--axis-cloud); }
.mcp-layer--biz   { border-left-color: var(--axis-biz); }
.mcp-layer.is-lead { box-shadow: 0 0 0 1px var(--accent-soft), 0 0 22px var(--accent-glow); border-color: var(--accent); }
.mcp-layer-name { font-family: var(--font-mono); font-weight: 700; font-size: var(--text-base); color: var(--ink); min-width: 9.5rem; }
.mcp-layer-role { color: var(--ink-muted); font-size: var(--text-sm); }

.mcp-timeline { display: flex; flex-direction: column; gap: var(--space-3); }
.mcp-timeline-rail { display: flex; flex-direction: column; gap: var(--space-3); border-left: 1px solid var(--border-strong); padding-left: var(--space-4); }
.mcp-milestone { position: relative; display: flex; flex-direction: column; gap: 2px; }
.mcp-milestone-dot { position: absolute; left: calc(-1 * var(--space-4) - 5px); top: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent-glow); }
.mcp-milestone-when { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--accent); }
.mcp-milestone-what { font-size: var(--text-sm); color: var(--ink); }

/* ─── act 6: caveats ─────────────────────────────────────────────────────────── */

.mcp-caveats { display: flex; flex-direction: column; gap: var(--space-4); height: 100%; }
.mcp-poison { display: flex; flex-direction: column; gap: var(--space-2); }
.mcp-poison-code {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: var(--space-3);
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}
.mcp-poison-clean { color: var(--ink-muted); }
.mcp-poison-evil { color: var(--danger); text-shadow: 0 0 8px var(--danger-glow); }

.mcp-risks { display: flex; flex-direction: column; gap: var(--space-3); }
.mcp-risk {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-strong);
    border-left: 3px solid var(--danger);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    padding: var(--space-3) var(--space-4);
}
.mcp-risk-name { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--danger); font-weight: 700; }
.mcp-risk-note { margin: var(--space-1) 0 0; font-size: var(--text-sm); color: var(--ink-muted); }
.mcp-risk-scan {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, var(--danger-soft), transparent);
    transform: translateX(-100%);
    animation: mcp-risk-sweep 2.4s var(--ease-in-out) 1;
    pointer-events: none;
}
@keyframes mcp-risk-sweep { to { transform: translateX(100%); } }

.mcp-mitig { display: flex; flex-direction: column; gap: var(--space-2); }

/* ─── act 6: an abstraction, not a replacement (isometric 3D stack) ───────────── */

/* shared face edges (not the chip die, which keeps its accent outline) */
.mcp-iso-slab polygon:not(.mcp-iso-die) { stroke: rgba(255, 255, 255, 0.16); stroke-width: 1; stroke-linejoin: round; }

/* base — existing infrastructure (grey) */
.mcp-iso-base-top   { fill: rgba(255, 255, 255, 0.15); }
.mcp-iso-base-left  { fill: rgba(255, 255, 255, 0.08); }
.mcp-iso-base-right { fill: rgba(255, 255, 255, 0.05); }

/* board — the MCP server abstraction layer (amber) */
.mcp-iso-board-top   { fill: var(--mcp-tool); }
.mcp-iso-board-left  { fill: var(--mcp-tool); fill-opacity: 0.66; }
.mcp-iso-board-right { fill: var(--mcp-tool); fill-opacity: 0.42; }

/* components on the board */
.mcp-iso-comp-top   { fill: var(--mcp-tool); stroke: rgba(0,0,0,0.25); }
.mcp-iso-comp-left  { fill: var(--mcp-tool); fill-opacity: 0.7; }
.mcp-iso-comp-right { fill: var(--mcp-tool); fill-opacity: 0.5; }

/* components on the board */
.mcp-iso-cap { fill: var(--mcp-tool); stroke: rgba(0,0,0,0.3); stroke-width: 1; }

/* chip — AI model / agent (light, cyan-edged) */
.mcp-iso-chip-top   { fill: var(--ink); stroke: var(--accent); stroke-width: 1.5; }
.mcp-iso-chip-left  { fill: var(--ink-muted); }
.mcp-iso-chip-right { fill: var(--ink-subtle); }
.mcp-iso-die        { fill: var(--bg-elev); stroke: var(--accent); stroke-width: 1; }

/* circuit traces (chip top + board), pins/legs, landing pads */
.mcp-iso-trace        { stroke: rgba(0,0,0,0.28); stroke-width: 1.2; }
.mcp-iso-trace--chip  { stroke: var(--ink-subtle); }
.mcp-iso-leg          { stroke: var(--ink-muted); stroke-width: 2; }
.mcp-iso-pad          { fill: var(--mcp-tool); fill-opacity: 0.85; }

.mcp-layer-conn { stroke: var(--border-strong); stroke-width: 1.5; }
.mcp-layer-label { fill: var(--ink); font-family: var(--font-mono); font-size: 18px; font-weight: 600; }
.mcp-layer-label--sub { fill: var(--ink-muted); font-size: 15px; font-weight: 400; }

/* upward data-flow chevrons rising through the stack */
.mcp-flow-arrow { stroke: var(--mcp-tool); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

/* side callout box (native SVG text) */
.mcp-callout-rect { fill: var(--bg-card); stroke: var(--border-strong); stroke-width: 1; }
.mcp-callout-text { fill: var(--ink); font-family: var(--font-sans); font-size: 18px; }

/* ─── FAQ drawer (unused — kept as dead styles) ──────────────────────────────── */

.mcp-drawer {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: none;
}
.mcp-drawer.is-open { display: block; }
.mcp-drawer-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(2px); }
.mcp-drawer-panel {
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: min(440px, 92vw);
    background: var(--bg-elev);
    border-left: 1px solid var(--border-strong);
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    padding: var(--space-6);
    overflow-y: auto;
}
.mcp-drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-5); }
.mcp-drawer-title { font-family: var(--font-sans); font-size: var(--text-xl); margin: 0; }
.mcp-drawer-close {
    background: transparent; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
    color: var(--ink-muted); width: 36px; height: 36px; cursor: pointer;
    transition: color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.mcp-drawer-close:hover { color: var(--accent); border-color: var(--accent); }
.mcp-faq-list { display: flex; flex-direction: column; gap: var(--space-2); }
.mcp-faq-item { border-bottom: 1px solid var(--border); padding: var(--space-3) 0; }
.mcp-faq-q { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--ink); cursor: pointer; list-style: none; }
.mcp-faq-q::-webkit-details-marker { display: none; }
.mcp-faq-q::before { content: "▸ "; color: var(--accent); }
.mcp-faq-item[open] .mcp-faq-q::before { content: "▾ "; }
.mcp-faq-a { font-size: var(--text-sm); color: var(--ink-muted); line-height: 1.5; margin: var(--space-2) 0 0; }
.mcp-faq-jump {
    margin-top: var(--space-2);
    font-family: var(--font-mono); font-size: var(--text-xs);
    color: var(--accent); background: transparent;
    border: 1px solid var(--accent); border-radius: var(--radius-sm);
    padding: var(--space-1) var(--space-3); cursor: pointer;
}
.mcp-faq-jump:hover { box-shadow: 0 0 14px var(--accent-glow); }

/* ─── responsive ─────────────────────────────────────────────────────────────── */

@media (max-width: 860px) {
    .mcp-bodygrid { grid-template-columns: 1fr; }
    .mcp-stagewrap { min-height: 360px; }
}

@media (max-width: 600px) {
    #mcp-main { padding: calc(var(--nav-h) + var(--space-8)) var(--space-4) var(--space-12); }
    .mcp-stagewrap { min-height: 320px; }
    .mcp-stage { padding: var(--space-3); }
    .mcp-msg { max-width: 96%; }
    .mcp-adapter-boards { flex-direction: column; align-items: stretch; }
    .mcp-box-link { align-self: center; transform: rotate(90deg); }
    .mcp-toggle { flex-direction: column; }
    .mcp-controls { gap: var(--space-3); }
    .mcp-faq-btn { top: auto; bottom: 0; font-size: var(--text-xs); }
    .mcp-layer { flex-direction: column; gap: var(--space-1); }
    .mcp-layer-name { min-width: 0; }
}

/* ─── reduced motion ─────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    .mcp-risk-scan { animation: none; display: none; }
    .mcp-blade { display: none; }
}

/* ═══ AI Lab hub (/ai-concepts/) ════════════════════════════════════════════ */

.ai-concepts-page { background: var(--bg); color: var(--ink); min-height: 100vh; }
#concepts-main {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: calc(var(--nav-h) + var(--space-12)) var(--space-6) var(--space-16);
}

.concepts-header { margin-bottom: var(--space-12); max-width: 60ch; }
.concepts-tag {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 var(--space-3);
}
.concepts-title {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: clamp(2rem, 5vw, var(--text-3xl));
    line-height: 1.05;
    margin: 0 0 var(--space-4);
}
.concepts-sub { color: var(--ink-muted); font-size: var(--text-lg); line-height: 1.5; margin: 0; }

.concepts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-6);
}

.concept-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    padding: var(--space-6);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(120% 120% at 0% 0%, var(--accent-soft) 0%, transparent 45%),
        var(--bg-card);
    cursor: pointer;
    transition: border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.concept-card:hover, .concept-card:focus-visible {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent-soft), 0 0 32px var(--accent-glow);
    transform: translateY(-3px);
    outline: none;
}

.concept-card-head { display: flex; align-items: center; justify-content: space-between; }
.concept-card-num {
    font-family: var(--font-mono);
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--accent);
    opacity: 0.5;
}
.concept-card-status {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    letter-spacing: 0.1em;
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: var(--radius-sm);
    padding: 1px var(--space-2);
}
.concept-card-title { font-family: var(--font-sans); font-weight: 700; font-size: var(--text-xl); margin: 0; }
.concept-card-tagline { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--accent); margin: 0; }
.concept-card-desc { color: var(--ink-muted); font-size: var(--text-sm); line-height: 1.55; margin: 0; flex: 1; }

.concept-tags { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.concept-tag {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--ink-muted);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    padding: var(--space-1) var(--space-2);
}

.concept-launch {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    align-self: flex-start;
    margin-top: var(--space-2);
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    color: var(--accent);
    text-decoration: none;
    transition: gap var(--dur-fast) var(--ease-out);
}
.concept-card:hover .concept-launch { gap: var(--space-3); }

.concepts-teaser {
    margin-top: var(--space-8);
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    color: var(--ink-subtle);
}

@media (max-width: 600px) {
    #concepts-main { padding: calc(var(--nav-h) + var(--space-8)) var(--space-4) var(--space-12); }
    .concepts-grid { grid-template-columns: 1fr; }
}

/* ─── act 7: build it yourself ──────────────────────────────────────────────── */

/* ── Act 7: Wire It Yourself ── */

/* Taller stage box for Act 7 only */
.mcp-stagewrap.mcp-stagewrap--buildit {
    height: min(82vh, 740px);
}

.mcp-bi-wrap {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: var(--space-2) var(--space-3);
    gap: var(--space-2);
    box-sizing: border-box;
    overflow-y: auto;
    position: relative;
}

/* ── Weather API card ── */
.mcp-bi-api-card {
    flex-shrink: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius-md);
    padding: var(--space-2) var(--space-3);
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.mcp-bi-api-card-top {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.mcp-bi-api-method {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--accent);
    background: var(--accent-soft);
    border-radius: var(--radius-sm);
    padding: 2px var(--space-2);
    flex-shrink: 0;
}

.mcp-bi-api-endpoint {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    color: var(--ink);
}

.mcp-bi-api-returns {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.mcp-bi-api-returns-label {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--ink-muted);
    flex-shrink: 0;
}

.mcp-bi-api-returns-val {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--ink-muted);
}

.mcp-bi-api-desc {
    font-family: var(--font-sans);
    font-size: var(--text-xs);
    color: var(--ink-muted);
    line-height: 1.5;
    margin: 0;
}

/* ── Step rail ── */
.mcp-bi-step-rail {
    display: flex;
    align-items: flex-start;
    gap: 0;
    flex-shrink: 0;
    padding: var(--space-1) 0;
    position: relative;
}

/* Connecting line between steps */
.mcp-bi-step-rail::before {
    content: "";
    position: absolute;
    top: calc(var(--space-2) + 10px);
    left: 10px;
    right: 10px;
    height: 1px;
    background: var(--border);
}

.mcp-bi-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-1);
    flex: 1;
    opacity: 0.35;
    transition: opacity 0.3s;
    position: relative;
    z-index: 1;
}

.mcp-bi-step.is-active { opacity: 1; }
.mcp-bi-step.is-done   { opacity: 0.7; }

.mcp-bi-step-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--ink-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.3s, border-color 0.3s, color 0.3s;
}

.mcp-bi-step.is-active .mcp-bi-step-dot {
    background: var(--accent);
    border-color: var(--accent);
    color: #000;
    box-shadow: 0 0 10px var(--accent-glow);
}

.mcp-bi-step.is-done .mcp-bi-step-dot {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
}

.mcp-bi-step-text {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--ink-muted);
    text-align: center;
    line-height: 1.3;
}

.mcp-bi-step.is-active .mcp-bi-step-text { color: var(--accent); }
.mcp-bi-step.is-done   .mcp-bi-step-text { color: var(--ink-muted); }

/* ── Two-column window grid ── */
.mcp-bi-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
    flex-shrink: 0;
}

/* Window chrome */
.mcp-bi-col {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    padding: var(--space-2);
    position: relative;
    overflow: hidden; /* clip gate overlay */
}

.mcp-bi-col--api { border-top: 2px solid var(--mcp-tool); }
.mcp-bi-col--mcp { border-top: 2px solid var(--accent); }

.mcp-bi-col-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-shrink: 0;
    gap: var(--space-2);
    padding-bottom: var(--space-2);
    border-bottom: 1px solid var(--border);
    margin-bottom: var(--space-1);
}

.mcp-bi-col-title {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--mcp-tool);
    line-height: 1.4;
}
.mcp-bi-col-title--mcp { color: var(--accent); }

.mcp-bi-col-count { font-weight: 700; }
.mcp-bi-col--api .mcp-bi-col-count { color: var(--mcp-tool); }
.mcp-bi-col--mcp .mcp-bi-col-count { color: var(--accent); }

.mcp-bi-friction {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    white-space: nowrap;
    flex-shrink: 0;
}
.mcp-bi-friction-label { color: var(--ink-muted); }
.mcp-bi-friction--zero .mcp-bi-col-count { color: var(--accent); }

/* Column body holds the stage blocks */
.mcp-bi-col-body {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.mcp-bi-col-body--empty .mcp-bi-stage {
    display: none;
}

.mcp-bi-placeholder {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-subtle);
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    text-align: center;
    padding: var(--space-8) var(--space-4);
    margin: 0;
}

.mcp-bi-col-body:not(.mcp-bi-col-body--empty) .mcp-bi-placeholder {
    display: none;
}

/* One stage block */
.mcp-bi-stage {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.mcp-bi-stage-label {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.mcp-bi-stage-n {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--ink-muted);
    flex-shrink: 0;
}

.mcp-bi-stage-name {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--ink);
    flex-shrink: 0;
}

/* Status badges */
.mcp-bi-badge {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 600;
    padding: 1px var(--space-1);
    border-radius: var(--radius-sm);
    white-space: nowrap;
}
.mcp-bi-badge--rewrites { color: var(--mcp-tool); background: var(--mcp-tool-soft); }
.mcp-bi-badge--frozen   { color: var(--accent);   background: var(--accent-soft);   }

.mcp-bi-code {
    font-size: 0.67rem;
    line-height: 1.6;
    /* inherits .mcp-msg-json background, padding, border-radius, font-family */
}

.mcp-bi-parse-note {
    font-family: var(--font-mono);
    font-size: 0.63rem;
    color: var(--mcp-tool);
    line-height: 1.5;
    flex-shrink: 0;
    padding: var(--space-1) var(--space-2);
    background: var(--mcp-tool-soft);
    border-radius: var(--radius-sm);
}

/* Simulated result panel */
.mcp-bi-result {
    display: none;
    font-family: var(--font-mono);
    font-size: 0.67rem;
    line-height: 1.6;
    padding: var(--space-2);
    border-radius: var(--radius-sm);
    color: var(--ink-muted);
}
.mcp-bi-result.is-visible { display: block; }
.mcp-bi-result--api { border: 1px solid var(--mcp-tool); background: var(--mcp-tool-soft); }
.mcp-bi-result--mcp { border: 1px solid var(--accent);   background: var(--accent-soft);   }
.mcp-bi-result-output {
    color: var(--ink);
    font-weight: 700;
    margin-top: var(--space-1);
}

/* MCP "locked" badge — shown only while gate is open */
.mcp-bi-locked {
    display: none;
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid var(--accent);
    border-radius: var(--radius-sm);
    padding: var(--space-1) var(--space-2);
    text-align: center;
}
.mcp-bi-locked.is-visible { display: block; }

/* ── Gate overlay (sits over the API window body) ── */
.mcp-bi-gate {
    position: absolute;
    inset: 0;
    background: rgba(6, 6, 6, 0.88);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    padding: var(--space-4);
    z-index: 10;
    border-radius: var(--radius-md);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0s; /* GSAP controls this */
}
.mcp-bi-gate.is-open {
    pointer-events: auto;
    opacity: 1;
}

.mcp-bi-gate-warn {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--mcp-tool);
    text-align: center;
    line-height: 1.6;
    margin: 0;
    max-width: 28ch;
}

.mcp-bi-approve-btn {
    background: var(--mcp-tool);
    color: #000;
    border: none;
    font-weight: 700;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    transition: box-shadow 0.15s;
}
.mcp-bi-approve-btn:hover {
    box-shadow: 0 0 18px var(--mcp-flow-glow);
}
.mcp-bi-approve-btn:active { transform: scale(0.97); }

/* ── Friction meter ── */
.mcp-bi-meter-row {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-shrink: 0;
}

.mcp-bi-meter-track {
    flex: 1;
    height: 5px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}

.mcp-bi-meter-fill {
    height: 100%;
    width: 0%;
    border-radius: 3px;
    transition: width 0.5s var(--ease-out);
}
.mcp-bi-meter-fill--api { background: var(--mcp-tool); }

.mcp-bi-meter-label {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--ink-muted);
    white-space: nowrap;
}

/* ── Controls (lives in the right copy column) ── */
.mcp-bi-controls {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
    margin-bottom: var(--space-3);
}

.mcp-bi-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-2);
    background: transparent;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--ink-muted);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s, opacity 0.15s;
    line-height: 1;
}
.mcp-bi-chip:disabled { opacity: 0.35; cursor: default; pointer-events: none; }
.mcp-bi-chip:hover { border-color: var(--accent); color: var(--ink); }
.mcp-bi-chip.is-active {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
}
.mcp-bi-chip:active { transform: scale(0.95); }

.mcp-bi-chip-logo {
    width: 14px;
    height: 14px;
    object-fit: contain;
    opacity: 0.85;
    flex-shrink: 0;
}

.mcp-bi-run-btn:active { transform: scale(0.96); }

/* ── Diff-flash spans (GSAP sets bg inline) ── */
.mcp-json-hl--diff {
    display: inline-block;
    border-radius: 2px;
}

/* ── Packet FX layer ── */
.mcp-bi-fx {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 20;
    overflow: hidden;
}

.mcp-bi-packet {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}
.mcp-bi-packet--amber {
    background: var(--mcp-tool);
    box-shadow: 0 0 8px 2px rgba(255,158,109,0.7);
}
.mcp-bi-packet--cyan {
    background: var(--accent);
    box-shadow: 0 0 8px 2px rgba(0,255,209,0.7);
}

/* ── Copy column ── */
.mcp-bi-narr {
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    color: var(--ink);
    line-height: 1.65;
    margin: 0 0 var(--space-4);
}

.mcp-bi-log {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.mcp-bi-log-row {
    line-height: 1.6;
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
}
.mcp-bi-log-row--api { color: var(--mcp-tool); background: var(--mcp-tool-soft); }
.mcp-bi-log-row--mcp { color: var(--accent);   background: var(--accent-soft);   }

/* ── Responsive ── */
@media (max-width: 720px) {
    .mcp-bi-grid {
        grid-template-columns: 1fr;
    }
    .mcp-bi-col--mcp {
        border-top: 1px solid var(--border);
        padding-top: var(--space-2);
    }
}
