:root {
  --bg: #090a10;
  --text: #d8deea;
  --dim: #aab5c8;
  --muted: #718098;
  --accent: #7090d0;
  --rgb: 112, 144, 208;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background: radial-gradient(ellipse at 50% 18%, rgba(36,43,82,.46), transparent 48rem), linear-gradient(135deg,#090a10,#121526 52%,#090a10);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  opacity: .13;
  background-image: linear-gradient(rgba(110,128,170,.1) 1px,transparent 1px), linear-gradient(90deg,rgba(110,128,170,.1) 1px,transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(black, transparent 88%);
}
button { color: inherit; font: inherit; }
.skip { position: fixed; top: 8px; left: 8px; z-index: 99; padding: 8px 12px; transform: translateY(-150%); color: #090a10; background: #80a8ef; }
.skip:focus { transform: none; }

header { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid rgba(100,100,150,.24); background: rgba(8,9,15,.94); backdrop-filter: blur(18px); }
.brand-row { display: flex; max-width: 1440px; align-items: baseline; justify-content: space-between; gap: 20px; margin: auto; padding: 14px 26px 4px; }
.brand-block { display: flex; align-items: baseline; gap: 12px; }
.brand { color: #8ca8ff; font-size: 22px; font-weight: 850; letter-spacing: .14em; text-shadow: 0 0 18px rgba(112,144,208,.45); }
.brand-sub { color: var(--muted); font-size: 10px; letter-spacing: .13em; text-transform: uppercase; }
.presence { flex: none; color: #77849a; font-size: 9px; letter-spacing: .12em; text-transform: uppercase; }
.presence i { display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: #55cda2; box-shadow: 0 0 9px #55cda2; }
.deck-headline { max-width: 1440px; margin: 0 auto; padding: 0 26px 11px; color: #93a2bd; font-size: 11.5px; line-height: 1.5; }

.tabs { display: flex; max-width: 1440px; gap: 2px; margin: auto; padding: 0 17px 8px; overflow-x: auto; scrollbar-width: thin; scrollbar-color: #8080ff transparent; }
.tab { flex: none; padding: 11px 13px 9px; border: 0; border-bottom: 2px solid transparent; color: #7f8ca3; background: none; cursor: pointer; font-size: 9.5px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.tab:hover { color: #b9c5d8; background: rgba(100,100,150,.08); }
.tab[aria-selected="true"] { border-color: #8080ff; color: #aab8ff; background: linear-gradient(rgba(128,128,255,.12),transparent); text-shadow: 0 0 11px rgba(128,128,255,.5); }
.tab:focus-visible, .next:focus-visible { outline: 2px solid #8ca8ff; outline-offset: 2px; }
.progress { height: 2px; background: rgba(255,255,255,.04); }
.progress span { display: block; width: 9.09%; height: 100%; background: linear-gradient(90deg,#7090d0,#8080ff,#ee6fa7); box-shadow: 0 0 12px #8080ff; transition: width .24s ease; }

main { max-width: 1240px; margin: auto; padding: 42px 32px 70px; animation: reveal .28s ease-out; }
@keyframes reveal { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.intro { display: grid; grid-template-columns: 96px minmax(0,1fr); gap: 28px; align-items: center; max-width: 1100px; margin: 0 auto 26px; }
.chapter { display: grid; width: 88px; height: 88px; place-items: center; border: 1px solid var(--accent); border-radius: 50%; color: var(--accent); background: radial-gradient(circle,rgba(var(--rgb),.18),transparent 68%); box-shadow: inset 0 0 24px rgba(var(--rgb),.12),0 0 24px rgba(var(--rgb),.1); font: 750 27px/1 ui-monospace,monospace; }
.eyebrow { margin: 0 0 8px; color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
h1 { margin: 0; color: #dde3ef; font-size: clamp(27px,3.6vw,42px); line-height: 1.1; letter-spacing: -.03em; text-wrap: balance; }
.lead { max-width: 860px; margin: 14px 0 0; color: var(--dim); font-size: clamp(14.5px,1.55vw,17.5px); line-height: 1.55; }
.lead strong { color: #dfe5f0; }

/* Views of one chapter: the simple cut first, the harder ones behind it. */
.subtabs { display: flex; gap: 6px; max-width: 1180px; margin: 0 auto 12px; }
.subtab { padding: 7px 14px; border: 1px solid rgba(var(--rgb),.28); border-radius: 999px; color: #8b98ad; background: rgba(10,13,22,.5); cursor: pointer; font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; transition: color .15s, border-color .15s, background .15s; }
.subtab:hover { color: #cbd5e6; border-color: rgba(var(--rgb),.5); }
.subtab[aria-selected="true"] { color: #0a0c14; background: var(--accent); border-color: var(--accent); }
.subtab:focus-visible { outline: 2px solid #8ca8ff; outline-offset: 2px; }
.claims-layer { display: none; }

.stage-wrap { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 20px; align-items: start; max-width: 1180px; margin: 0 auto; }
/* No node selected: the explanation column collapses so the diagram gets the width. */
.stage-wrap:has(> .node-detail[hidden]) { grid-template-columns: minmax(0,1fr); }
.node-stage { position: relative; height: clamp(560px,62vw,830px); overflow: hidden; border: 1px solid rgba(100,100,150,.3); border-radius: 16px; background: radial-gradient(ellipse at center,#1a1a2e 0%,#0a0a0f 100%); box-shadow: 0 24px 58px rgba(0,0,0,.35); }
.node-stage canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.stage-hint { position: absolute; right: 14px; bottom: 10px; margin: 0; color: #5d6880; font-size: 9px; letter-spacing: .09em; text-transform: uppercase; pointer-events: none; }

/* The claim words sit over the canvas as HTML: they can be large and can pulse
   on the compositor, without a canvas redraw or an animation loop. */
.claim { position: absolute; margin: 0; pointer-events: none; }
.claim b { display: block; color: var(--accent); font-size: clamp(15px,1.6vw,21px); font-weight: 850; letter-spacing: .16em; text-shadow: 0 0 16px rgba(var(--rgb),.55); animation: claim-pulse 3.4s ease-in-out infinite; }
.claim span { display: block; margin-top: 4px; color: #8895ac; font-size: 10.5px; letter-spacing: .04em; }
.claim-tl { top: 18px; left: 22px; }
.claim-tr { top: 18px; right: 22px; text-align: right; }
.claim-bl { bottom: 30px; left: 22px; }
.claim-br { bottom: 30px; right: 22px; text-align: right; }
.claim-tr b, .claim-br b { letter-spacing: .16em; }
.claim-tl b { animation-delay: 0s; }
.claim-tr b { animation-delay: .85s; }
.claim-bl b { animation-delay: 1.7s; }
.claim-br b { animation-delay: 2.55s; }
@keyframes claim-pulse {
  0%, 100% { opacity: .58; text-shadow: 0 0 10px rgba(var(--rgb),.28); }
  50%      { opacity: 1;   text-shadow: 0 0 24px rgba(var(--rgb),.75); }
}

.node-detail { position: sticky; top: 150px; padding: 18px 18px 20px; border: 1px solid color-mix(in srgb, var(--node,#7090d0) 42%, transparent); border-radius: 14px; background: linear-gradient(rgba(var(--rgb),.07), rgba(10,12,20,.7)); box-shadow: 0 18px 40px rgba(0,0,0,.3); }
.node-detail b { display: block; margin-bottom: 4px; color: var(--node,#dce2ec); font-size: 15px; }
.node-detail .node-detail-caption { display: block; margin-bottom: 11px; color: var(--muted); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.node-detail p { margin: 0; color: #b3bfd2; font-size: 12.5px; line-height: 1.62; }
.node-items { margin: 14px 0 0; padding: 13px 0 0; border-top: 1px solid rgba(var(--rgb),.22); list-style: none; display: grid; gap: 9px; }
.node-items li b { display: block; margin: 0 0 1px; color: var(--node,#dce2ec); font-size: 12px; }
.node-items li span { display: block; color: #8f9cb1; font-size: 11px; line-height: 1.5; }

/* A compact, clickable catalogue of visible cognitive workflows. */
.workflow-examples { max-width: 1180px; margin: 30px auto 0; }
.workflow-intro { display: grid; grid-template-columns: minmax(0,1fr) minmax(240px,.65fr); gap: 28px; align-items: end; margin-bottom: 13px; }
.workflow-kicker { margin: 0 0 6px; color: var(--accent); font-size: 9.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.workflow-intro h2 { margin: 0; color: #dce3ef; font-size: clamp(20px,2.2vw,28px); line-height: 1.15; letter-spacing: -.02em; }
.workflow-intro > p { margin: 0; color: #8794a9; font-size: 12px; line-height: 1.55; text-align: right; }
.workflow-cycle { display: block; width: 100%; padding: 17px 18px 14px; border: 1px solid rgba(var(--rgb),.34); border-radius: 15px; color: inherit; background: linear-gradient(135deg,rgba(var(--rgb),.09),rgba(9,11,18,.82)); box-shadow: 0 18px 40px rgba(0,0,0,.25); cursor: pointer; text-align: left; transition: border-color .17s, transform .17s, background .17s; }
.workflow-cycle:hover { border-color: rgba(var(--rgb),.7); background: linear-gradient(135deg,rgba(var(--rgb),.14),rgba(9,11,18,.86)); transform: translateY(-1px); }
.workflow-cycle:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.workflow-meta { display: flex; justify-content: space-between; gap: 20px; align-items: baseline; }
.workflow-meta strong { color: var(--accent); font-size: 13px; letter-spacing: .04em; }
.workflow-meta > span { color: #7f8ba0; font: 700 9.5px/1 ui-monospace,monospace; letter-spacing: .09em; text-transform: uppercase; }
.workflow-track { display: flex; align-items: stretch; gap: 8px; margin-top: 13px; padding: 2px 1px 7px; overflow-x: auto; scrollbar-width: thin; scrollbar-color: rgba(var(--rgb),.45) transparent; }
.workflow-step { position: relative; display: grid; flex: 1 0 118px; min-height: 58px; place-items: center; padding: 15px 10px 8px; border: 1px solid color-mix(in srgb,var(--step-color) 58%,transparent); border-radius: 9px; color: color-mix(in srgb,var(--step-color) 28%,#edf2f9); background: color-mix(in srgb,var(--step-color) 9%,rgba(6,9,15,.9)); box-shadow: inset 0 0 18px color-mix(in srgb,var(--step-color) 9%,transparent); font-size: 11px; font-weight: 680; line-height: 1.35; text-align: center; }
.workflow-step::before { content: attr(data-step); position: absolute; top: 5px; left: 6px; display: grid; width: 15px; height: 15px; place-items: center; border: 1px solid color-mix(in srgb,var(--step-color) 65%,transparent); border-radius: 50%; color: var(--step-color); background: color-mix(in srgb,var(--step-color) 12%,#080b12); font: 800 8px/1 ui-monospace,monospace; box-shadow: 0 0 10px color-mix(in srgb,var(--step-color) 32%,transparent); }
.workflow-arrow { display: grid; flex: 0 0 16px; place-items: center; color: var(--arrow-color,var(--accent)); font-size: 18px; text-shadow: 0 0 12px color-mix(in srgb,var(--arrow-color,var(--accent)) 70%,transparent); }
.workflow-note { display: block; min-height: 17px; margin-top: 7px; color: #8e9baf; font-size: 10.5px; line-height: 1.55; }
.workflow-prompt { display: block; margin-top: 4px; color: var(--accent); font: 750 9px/1.2 ui-monospace,monospace; letter-spacing: .08em; text-align: right; text-transform: uppercase; }

/* A real screenshot, shown under the diagram: the abstraction, then the thing. */
.shot { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(0,1fr); gap: 26px; align-items: start; max-width: 1180px; margin: 30px auto 0; padding: 22px; border: 1px solid rgba(var(--rgb),.28); border-radius: 16px; background: linear-gradient(rgba(var(--rgb),.05), rgba(10,12,20,.55)); }
.shot img { display: block; width: 100%; height: auto; border: 1px solid rgba(100,100,150,.34); border-radius: 10px; }
.shot figcaption b { display: block; margin-bottom: 12px; color: #dce2ec; font-size: 15px; }
.shot ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 11px; }
.shot li { color: #97a4b8; font-size: 12px; line-height: 1.6; }
.shot li span { display: block; color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
@media (max-width:900px) { .shot { grid-template-columns: minmax(0,1fr); } }

.next { display: grid; grid-template-columns: 120px 1fr auto; gap: 20px; align-items: center; width: 100%; max-width: 1180px; margin: 44px auto 0; padding: 21px 0; border: 0; border-top: 1px solid rgba(var(--rgb),.38); color: var(--text); background: transparent; cursor: pointer; text-align: left; transition: padding .17s,border-color .17s; }
.next:hover { padding-inline: 12px; border-color: var(--accent); }
.next span { color: var(--accent); font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.next strong { font-size: clamp(18px,2.5vw,26px); }
.next i { color: var(--accent); font-size: 28px; font-style: normal; }
footer { padding: 0 24px 32px; color: #657188; font-size: 9px; letter-spacing: .1em; text-align: center; text-transform: uppercase; }

@media (max-width:1080px) {
  .stage-wrap { grid-template-columns: minmax(0,1fr); }
  .node-detail { position: static; }
}
@media (max-width:760px) {
  .brand-row { padding-inline: 14px; }
  .presence { display: none; }
  .deck-headline { padding-inline: 14px; font-size: 11px; }
  .tabs { padding-inline: 7px; }
  .tab { padding-inline: 10px; font-size: 8.5px; }
  main { padding: 26px 14px 50px; }
  .intro { grid-template-columns: 1fr; gap: 14px; }
  .chapter { width: 60px; height: 60px; font-size: 20px; }
  .node-stage { height: 520px; border-radius: 12px; }
  .workflow-intro { grid-template-columns: minmax(0,1fr); gap: 7px; }
  .workflow-intro > p { text-align: left; }
  .workflow-cycle { padding-inline: 12px; }
  .workflow-step { flex-basis: 132px; }
  .next { grid-template-columns: 90px 1fr auto; margin-top: 34px; }
}
@media (prefers-reduced-motion:reduce) {
  html { scroll-behavior: auto; }
  main { animation: none; }
  .claim b { animation: none; opacity: 1; }
  *,*::before,*::after { animation-duration: .01ms!important; transition-duration: .01ms!important; }
}
