/* Editorial landing page, scoped to Agents. The scientific UI keeps its own hierarchy. */
#agents-view { display:block; padding:0 5vw 40px; background:var(--bg-card); }
#agents-view > * { max-width:1440px; margin-inline:auto; }
.agents-experience { position:relative; display:grid; grid-template-columns:minmax(0,1.05fr) minmax(0,1fr); gap:3vw; }
.agents-story { grid-column:1; grid-row:1; min-width:0; }
.agents-chapter { min-height:0; box-sizing:border-box; display:flex; flex-direction:column; justify-content:center; align-items:flex-start; padding:64px 0; scroll-margin-top:36px; }
#agents-view .agents-intro { min-height:72vh; padding-top:36px; }
#agents-view .agents-intro h1 { margin:0 0 28px; max-width:760px; font-size:clamp(48px,5.8vw,90px); font-family:var(--font-family); font-weight:600; line-height:1.06; letter-spacing:-.045em; color:var(--text-primary); }
.agents-intro h1 .agents-title-line { display:block; white-space:nowrap; color:inherit; }
.agents-intro h1 em { color:var(--primary); font-style:normal; }
#agents-view .agents-chapter p { max-width:470px; margin:0; color:var(--text-secondary); font-size:18px; line-height:1.7; }
#agents-view .agents-primary-link { display:inline-flex; align-items:center; justify-content:space-between; gap:32px; padding:15px 20px; border:1px solid var(--primary); border-radius:6px; background:var(--primary); color:white; text-decoration:none; font-family:inherit; font-size:14px; font-weight:500; line-height:1.5; cursor:pointer; transition:background .2s,box-shadow .2s; }
#agents-view .agents-primary-link:hover { background:var(--primary-dark); box-shadow:0 4px 18px rgb(25 109 99 / 12%); text-decoration:none; }
#agents-view .agents-primary-link:focus-visible, #agents-view .agents-text-button:focus-visible { outline:2px solid var(--primary); outline-offset:4px; }
.agents-intro .agents-primary-link { margin-top:34px; }
#agents-view .agents-scroll-link { display:inline-flex; gap:22px; align-items:center; margin-top:30px; color:var(--text-muted); font-size:13px; text-decoration:none; }
#agents-view .agents-scroll-link:hover { color:var(--primary); }
#agents-view .agents-chapter h2 { margin:20px 0 26px; font-size:clamp(28px,2.8vw,42px); line-height:1.1; font-weight:600; letter-spacing:-.035em; }
.agents-chapter-number { display:block; color:var(--primary); font-size:12px; letter-spacing:.025em; }
#agents-view .agents-chapter .agents-science-note { margin-top:26px; font-size:13px; color:var(--text-muted); }
.agents-molecule { grid-column:2; grid-row:1; position:sticky; top:0; height:calc(100dvh - 90px); min-height:500px; align-self:start; pointer-events:none; }
.agents-molecule-stage { position:absolute; inset:0 -3vw 35px; background:radial-gradient(ellipse at 50% 50%,rgb(213 236 229 / 44%), transparent 67%); }
.agents-molecule canvas { display:block; width:100%; height:100%; }
.agents-molecule-caption { position:absolute; bottom:24px; left:0; right:0; display:flex; align-items:center; justify-content:center; gap:10px; font-size:11px; letter-spacing:.015em; color:var(--text-muted); }
.agents-caption-dot { width:5px; height:5px; flex:none; border-radius:50%; background:#aa456f; }
#agents-view .agents-onboarding { padding:72px 0; margin-top:0; scroll-margin-top:30px; }
.agents-setup-content { width:100%; max-width:620px; margin-inline:auto; }
#agents-view .agents-onboarding h2 { margin:0; font:500 clamp(32px,3.4vw,48px)/1.12 var(--font-family); letter-spacing:-.035em; }
#agents-view .agents-setup-intro { margin:20px 0 28px; color:var(--text-secondary); font-size:16px; line-height:1.6; }
.agents-server-row { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:16px 0; border-block:1px solid var(--border-color); }
.agents-server-row code { min-width:0; overflow-wrap:anywhere; color:var(--text-primary); font-size:13px; background:none; padding:0; }
#agents-view .agents-text-button { flex:none; border:0; background:none; color:var(--primary); font:500 13px var(--font-family); padding:6px 0 6px 8px; cursor:pointer; }
.agents-text-button:hover { text-decoration:underline; text-underline-offset:3px; }
.agents-mission-actions { display:flex; flex-wrap:wrap; align-items:center; column-gap:24px; row-gap:16px; margin-top:28px; }
#agents-view .agents-onboarding .agents-primary-link { padding:13px 20px; font-size:14px; }
.agents-mission-preview { display:contents; }
.agents-mission-preview summary { width:fit-content; color:var(--text-secondary); cursor:pointer; font-size:13px; list-style:none; text-decoration:underline; text-underline-offset:4px; }
.agents-mission-preview summary::-webkit-details-marker { display:none; }
#agents-view [data-agent-starter] { width:100%; flex-basis:100%; box-sizing:border-box; padding:16px; border:1px solid var(--border-color); border-radius:0; background:var(--bg-header); color:var(--text-primary); font:12px/1.6 ui-monospace,monospace; resize:vertical; }
.agents-connection-help { margin-top:28px; font-size:13px; color:var(--text-secondary); }
.agents-connection-help summary { cursor:pointer; width:fit-content; }
.agents-connection-help p { margin:12px 0; line-height:1.7; }
#agents-view .agents-connection-help a { color:inherit; text-underline-offset:3px; }
#agents-view .agents-publishing-note { margin:16px 0 0; color:var(--text-muted); font-size:12px; line-height:1.6; }
#agents-view [data-agent-status] { margin:12px 0 0; font-size:13px; color:var(--primary); }
#agents-view [data-agent-status]:empty { display:none; }
@media(min-width:1800px) { #agents-view .agents-intro h1 { font-size:96px; } }
@media(max-width:760px) {
    #agents-view { padding:0 24px 30px; }
    .agents-experience { display:block; }
    #agents-view .agents-intro { min-height:auto; padding:64px 0 20px; }
    #agents-view .agents-intro h1 { max-width:600px; font-size:clamp(45px,9vw,68px); }
    #agents-view .agents-chapter p { font-size:16px; }
    .agents-molecule { position:relative; align-self:stretch; height:420px; min-height:0; margin:0 -12px; }
    .agents-molecule-stage { inset:0 0 28px; }
    .agents-molecule-caption { bottom:12px; font-size:10px; }
    .agents-story { display:contents; }
    .agents-experience { display:flex; flex-direction:column; }
    .agents-intro { order:0; }
    .agents-molecule { order:1; }
    .agents-chapter:not(.agents-intro) { order:2; min-height:0; padding:54px 0; border-top:1px solid var(--border-color); }
    #agents-view .agents-chapter h2 { font-size:36px; }
    #agents-view .agents-onboarding { margin-top:0; padding-top:40px; }

}
@media(prefers-reduced-motion:reduce) { #agents-view .agents-primary-link { transition:none; } }

/* The original headline stays on two lines, including on narrow screens. */
#agents-view .agents-intro h1 { font-size:clamp(28px, 4.1vw, 70px); }
.agents-structure-source { position:absolute; right:0; bottom:4px; pointer-events:auto; color:var(--text-muted); font-size:10px; text-decoration:none; }
.agents-structure-source:hover { text-decoration:underline; }
.agents-molecule-stage { background:radial-gradient(ellipse at 54% 50%,rgb(218 235 227 / 52%),transparent 67%); }
@media(max-width:760px) { #agents-view .agents-intro h1 { font-size:clamp(25px, 7.4vw, 51px); } .agents-structure-source { bottom:-3px; right:12px; } }

/* Let the two-line headline extend into the open space beside the molecule. */
#agents-view .agents-intro h1 {
    position:relative;
    z-index:1;
    width:max-content;
    max-width:none;
    font-size:clamp(36px, 5.2vw, 88px);
}
@media(max-width:760px) {
    #agents-view .agents-intro h1 { font-size:clamp(25px, 7.8vw, 56px); }
}

.agents-intro h1 em {
    color:var(--primary);
    background:linear-gradient(110deg, #086b72 0%, #168e87 52%, #39866f 100%);
    background-clip:text;
    -webkit-background-clip:text;
    -webkit-text-fill-color:transparent;
}
@media(forced-colors:active) {
    .agents-intro h1 em { background:none; -webkit-text-fill-color:CanvasText; color:CanvasText; }
}

/* One quiet illustration per argument, blended by the scroll position. */
.agents-molecule-stage { left:24px; right:-3vw; }
.agents-explainer-scene { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; opacity:0; will-change:opacity,transform; }
.agents-explainer-scene svg { width:100%; max-height:100%; overflow:visible; }
.agents-explainer-scene text { font-family:var(--font-family); font-size:12px; fill:var(--text-secondary); }
.scene-paper { fill:#fff; stroke:#bcd5cd; stroke-width:1; filter:drop-shadow(0 8px 12px rgb(23 77 62 / 5%)); }
.scene-line { stroke:#d4e1dc; stroke-width:1.5; fill:none; stroke-linecap:round; }
.scene-connectors { fill:none; stroke:#a3c4ba; stroke-width:1.4; }
.scene-halo { fill:#eaf3ef; }
.scene-core { fill:#f8fbf9; stroke:#659d8e; stroke-width:1.3; }
.agents-explainer-scene .scene-center-label { fill:#226b5e; font-weight:500; font-size:14px; }
.scene-signals { fill:#aa5579; }
.scene-orbit { fill:none; stroke:#e0ebe5; stroke-width:1; }
.scene-dashed { stroke-dasharray:4 8; stroke-dashoffset:var(--agents-flow,0); }
.scene-agent > circle { fill:#fff; stroke:#99bdaf; stroke-width:1.2; }
.scene-agent > .scene-agent-core { fill:#e2efea; stroke:none; }
.scene-agent > path { stroke:#4c8c79; stroke-width:1; }
.scene-record-back { opacity:.5; }
.agents-explainer-scene .scene-record-title { font-size:19px; font-weight:500; fill:#276a59; }
.scene-record-mark { fill:#7da996; }
.scene-next-path { fill:none; stroke:#a7c4b7; stroke-width:1.2; }
.scene-next-node { fill:#edf5ef; stroke:#7da996; }
.scene-next-arrow { fill:none; stroke:#4c8c79; stroke-width:1.4; }
@media(max-width:760px) {
    #agents-view .agents-intro h1 { font-size:clamp(25px, 7.4vw, 52px); }
    #agents-view .agents-chapter h2 { font-size:30px; }
    .agents-chapter:not(.agents-intro) { padding:32px 0; }
    .agents-molecule-stage { left:0; right:0; }
    .agents-mobile-visual { height:250px; position:relative; margin:20px 0 0; align-self:stretch; }
    .agents-mobile-visual .agents-explainer-scene { opacity:1; }
}

.agents-mobile-visual { display:none; }
@media(max-width:760px) { .agents-mobile-visual { display:block; } }

/* Text pauses on a pinned stage; short transitions separate longer reading intervals. */
@media(min-width:761px) and (prefers-reduced-motion:no-preference) {
    .agents-experience { display:block; height:calc(var(--agents-viewport, 90vh) * 7.19); }
    .agents-pinned { position:sticky; top:0; height:var(--agents-viewport, 90vh); display:grid; grid-template-columns:minmax(0,1.05fr) minmax(0,1fr); gap:3vw; }
    .agents-story { position:relative; height:100%; }
    #agents-view .agents-chapter { position:absolute; inset:0; min-height:0; padding:0; margin:0; justify-content:center; opacity:0; pointer-events:none; will-change:opacity,transform; }
    #agents-view .agents-intro { opacity:1; pointer-events:auto; }
    .agents-molecule { position:relative; height:100%; min-height:0; }
    .agents-molecule-stage { left:48px; right:-3vw; }
}
#agents-view .agents-intro h1 { font-size:clamp(38px,5.6vw,96px); }
@media(max-width:760px) { #agents-view .agents-intro h1 { font-size:clamp(25px,7.7vw,54px); } }
@media(prefers-reduced-motion:reduce) {
    .agents-pinned { display:grid; grid-template-columns:minmax(0,1.05fr) minmax(0,1fr); gap:3vw; }
    .agents-story .agents-chapter { opacity:1!important; transform:none!important; visibility:visible!important; }
    .agents-mobile-visual { display:block; height:250px; position:relative; margin-top:20px; align-self:stretch; }
    .agents-mobile-visual .agents-explainer-scene { opacity:1; }
    .agents-molecule { position:relative; height:600px; }
}
@media(max-width:760px) {
    .agents-pinned { display:flex; flex-direction:column; }
    .agents-story { display:contents; }
}

@media(min-width:761px) and (prefers-reduced-motion:no-preference) {
    .agents-story { clip-path:inset(0 -50vw 0 0); }
    #agents-view .agents-chapter { will-change:transform; }
}
@media(prefers-reduced-motion:reduce) { .agents-experience { display:block; height:auto; } }

/* Consistent typography across both lines of the onboarding heading. */
#agents-view #agents-onboarding-title { font-family:var(--font-family); font-style:normal; font-weight:500; color:var(--text-primary); }
.agents-collaboration-scene svg { overflow:hidden; }

.agents-shared-traveler { position:absolute; inset:0; pointer-events:none; z-index:2; }
.agents-shared-traveler svg { width:100%; height:100%; }

.agents-dna-inspector { position:absolute; inset:0; pointer-events:none; }
.agents-dna-inspector svg { display:block; width:100%; height:100%; }

/* The impact grows across the entire pinned reading area, not just the illustration. */
.agents-impact { position:absolute; inset:0 -5vw; z-index:5; width:calc(100% + 10vw); height:100%; pointer-events:none; overflow:hidden; }
@media(max-width:760px), (prefers-reduced-motion:reduce) { .agents-impact { display:none; } }

/* The setup continues on the liquid's color after the impact fills the viewport. */
#agents-view .agents-onboarding {
    --text-primary:#102f36;
    --text-secondary:#153c43;
    --text-muted:#153c43;
    --primary:#153c43;
    --primary-dark:#0e3036;
    --border-color:rgb(16 47 54 / 24%);
    --bg-header:rgb(255 255 255 / 82%);
    position:relative;
    z-index:6;
    background:radial-gradient(circle at 32% 22%,#effbf8 0%,#d9f1ec 35%,#b0ded9 70%,#84c7c3 100%);
    box-shadow:0 0 0 100vmax #d9f1ec;
    clip-path:inset(0 -100vmax);
    color:var(--text-primary);
    border-top:0;
}
#agents-view .agents-onboarding #agents-onboarding-title { color:var(--text-primary); }
#agents-view .agents-onboarding .agents-primary-link { background:#153c43; border-color:#153c43; }
#agents-view .agents-onboarding .agents-primary-link:hover { background:#0e3036; }
#agents-view .agents-onboarding :focus-visible { outline:2px solid #102f36; outline-offset:4px; }

/* One setup section occupies the final pinned frame, above the liquid. */
#agents-view .agents-onboarding.agents-setup-pinned {
    position:absolute;
    inset:0;
    display:flex;
    flex-direction:column;
    justify-content:center;
    margin:0;
    padding:40px 0;
    box-sizing:border-box;
    background:none;
    box-shadow:none;
    clip-path:none;
    visibility:hidden;
    pointer-events:none;
    overflow-y:auto;
}
#agents-view .agents-onboarding.agents-setup-pinned.agents-setup-visible { visibility:visible; pointer-events:auto; }
.agents-setup-pinned .agents-setup-content { flex:none; }
@media(max-height:650px) and (min-width:761px) {
    #agents-view .agents-onboarding.agents-setup-pinned { justify-content:flex-start; padding:24px 0; }

}
