/* The landing page shares type and theme tokens with the documentation. */
.landing { --header-h: 80px; --landing-surface: #f0efe9; --landing-accent: #a44c32; background: var(--bg); }
:root[data-theme="dark"] .landing { --landing-surface: #1a1a1c; --landing-accent: #d4a27f; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .landing { --landing-surface: #1a1a1c; --landing-accent: #d4a27f; }
}
.landing .landing-content { padding: 0; }
.landing-content > * { max-width: none; }
.landing-wrap { width: min(1200px, calc(100% - 112px)); margin-inline: auto; }
.landing h1, .landing h2, .landing h3, .landing p { margin-top: 0; }
.landing h2 { font: 400 clamp(34px, 3.7vw, 48px)/1.12 var(--serif); letter-spacing: -.035em; }
.landing h3 { font-weight: 500; }
.landing-content a:not(.btn-dark) { font-weight: 400; text-decoration: none; color: inherit; }
.landing a:hover { text-decoration: none; }
.skip-link { position: absolute; top: -80px; left: 20px; z-index: 60; padding: 10px 16px; background: var(--text); color: var(--bg); border-radius: 6px; }
.skip-link:focus { top: 12px; }

/* A single product navigation replaces the documentation's three-column frame. */
.landing-header { position: sticky; top: 0; z-index: 30; background: var(--bg); border-bottom: 1px solid var(--line); }
.landing-bar { min-height: 80px; display: flex; align-items: center; gap: 36px; }
.landing-bar .logo { font-size: 30px; gap: 9px; }
.landing-bar .logo .mark { width: 26px; height: 26px; color: var(--landing-accent); }
.landing-nav { display: flex; align-items: center; gap: 30px; margin-left: auto; font-size: 16px; }
.landing-nav a { display: inline-flex; align-items: center; gap: 6px; }
.landing-nav a:hover, .landing-footer a:hover { color: var(--landing-accent); }
.landing-tools { display: flex; align-items: center; gap: 12px; }
.landing-tools .theme-btn { display: grid; }
.landing-tools .btn-dark { height: 38px; border-radius: 7px; padding-inline: 18px; }

.hero { display: grid; grid-template-columns: .82fr 1.18fr; align-items: center; gap: 56px; padding-top: 48px; padding-bottom: 56px; }
.hero h1 { font-size: clamp(52px, 5.1vw, 70px); line-height: 1.04; letter-spacing: -.045em; margin-bottom: 24px; }
.hero-desc { max-width: 430px; font-size: 20px; line-height: 1.6; margin-bottom: 30px; }
.hero-actions { display: flex; flex-direction: column; align-items: stretch; gap: 10px; max-width: 328px; }
.landing-button { display: inline-flex; align-items: center; justify-content: space-between; gap: 30px; min-height: 46px; border: 1px solid var(--line-strong); border-radius: 7px; padding: 10px 18px; font-size: 16px; line-height: 1.4; transition: background .15s, border-color .15s; }
.landing-content .landing-button.primary { background: var(--btn-dark-bg); color: var(--btn-dark-text); border-color: var(--btn-dark-bg); }
.landing-content .landing-button.secondary { background: var(--landing-surface); border-color: transparent; }
.landing-button:hover { opacity: .85; }
.landing-button span { font-size: 20px; }

/* Case studies keep memory use separate from the final task result. */
.case-demo { background: var(--bg-raised); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 48px rgba(30, 28, 20, .05); overflow: hidden; }
.demo-topline { display: flex; align-items: center; gap: 9px; padding: 16px 22px; font-size: 14px; color: var(--text-3); background: var(--landing-surface); border-bottom: 1px solid var(--line); }
.demo-mark { color: var(--landing-accent); font-size: 20px; line-height: 1; }
.case-tabs { margin: 0; }
.case-tabs .tab-list { padding: 0 24px; margin-bottom: 0; gap: 26px; }
.case-tabs .tab-list button { padding: 15px 0 12px; font-size: 14px; }
.case-tabs .tab-list button[aria-selected="true"] { border-color: var(--landing-accent); color: var(--text); }
.case-tabs .tab-panel { outline-offset: -3px; }
.case-body { padding: 28px 30px 22px; }
.case-body h2 { font-size: 27px; line-height: 1.2; letter-spacing: -.025em; margin: 0 0 27px; }
.trace { list-style: none; padding: 0; margin: 0; }
.trace li { display: grid; grid-template-columns: 14px 1fr; gap: 16px; position: relative; margin: 0; padding-bottom: 25px; }
.trace li:not(:last-child)::after { content: ""; position: absolute; width: 1px; top: 10px; bottom: -7px; left: 5px; background: var(--line-strong); }
.trace-point { position: relative; z-index: 1; height: 11px; width: 11px; margin-top: 7px; border: 1px solid var(--text-3); border-radius: 50%; background: var(--bg-raised); }
.trace-harm .trace-point { background: var(--landing-accent); border-color: var(--landing-accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.trace-benefit .trace-point { background: var(--good); border-color: var(--good); }
.trace-label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; font-size: 13px; font-weight: 500; color: var(--text-3); }
.trace-label > span { margin-left: auto; font: 400 12px var(--mono); }
.trace p { font-size: 15px; line-height: 1.6; margin: 4px 0 0; }
.case-result { display: grid; grid-template-columns: 1fr 1fr; padding: 17px 20px; border-radius: 8px; background: var(--landing-surface); gap: 20px; }
.case-result > div + div { border-left: 1px solid var(--line-strong); padding-left: 24px; }
.case-result span { display: block; font-size: 13px; color: var(--text-3); margin-bottom: 4px; }
.case-result strong { font: 400 22px/1.3 var(--serif); }
.case-result .result-harm { color: var(--landing-accent); }
.case-result .result-benefit { color: var(--good); }
.research-byline { display: flex; justify-content: space-between; gap: 24px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 22px 0; font-size: 14px; color: var(--text-3); }
.research-byline > span:first-child { display: flex; gap: 12px; align-items: center; }
.landing-content .research-byline a { font-family: var(--serif); font-size: 20px; color: var(--text); }
.research-byline > span:last-child { text-align: right; }

.method-section { padding-block: 84px; }
.method-section .section-intro { margin-bottom: 0; }
.section-intro { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; margin-bottom: 48px; }
.section-intro h2 { margin-bottom: 0; }
.section-copy { max-width: 465px; font-size: 17px; line-height: 1.75; }
.section-copy p:last-child { margin-bottom: 0; }
.landing-content .text-link { display: inline-flex; gap: 20px; align-items: baseline; color: var(--text); font-size: 16px; padding-bottom: 3px; border-bottom: 1px solid var(--line-strong); }
.landing-content .text-link:hover { border-bottom-color: var(--text); }
.workflow-section { background: var(--landing-surface); padding-block: 88px 60px; }
.project-row { display: grid; grid-template-columns: 40px .8fr 1.2fr 30px; align-items: center; gap: 24px; padding: 30px 12px; border-top: 1px solid var(--line-strong); }
.project-row:last-child { border-bottom: 1px solid var(--line-strong); }
.project-row:hover { background: var(--bg-hover); }
.project-number { font: 400 13px var(--mono); color: var(--text-3); }
.project-row h3 { font: 400 30px/1.2 var(--serif); margin: 0; letter-spacing: -.025em; }
.project-row p { font-size: 16px; max-width: 440px; margin: 0; }
.project-arrow { font-size: 25px; text-align: right; }
.workflow-foot { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 24px; font-size: 18px; padding-top: 24px; color: var(--text-3); }
.landing-content .workflow-foot .text-link { font-size: inherit; }

.research-section { background: #262922; color: #d9d9cc; padding-block: 86px; }
.research-layout { display: grid; grid-template-columns: 1.1fr .9fr; gap: 120px; align-items: center; }
.research-section h2 { color: #f3f1e8; font-size: clamp(48px, 5vw, 68px); margin-bottom: 16px; }
.research-subtitle { font: 400 22px/1.3 var(--serif); max-width: 390px; color: #f3f1e8; text-wrap: balance; }
.research-copy > p:not([class]) { font-size: 16px; max-width: 440px; line-height: 1.8; }
.research-links { display: flex; flex-wrap: wrap; gap: 22px; align-items: center; margin-top: 28px; }
.landing-content .research-links .landing-button { color: #252820; background: #f3f1e8; border-color: #f3f1e8; }
.landing-content .research-links .text-link { color: #f3f1e8; border-color: #777c6c; }
.study-numbers > div { border-top: 1px solid #575e4d; padding-top: 18px; margin-bottom: 30px; }
.study-numbers strong { font: 400 clamp(50px, 5vw, 70px)/1.1 var(--serif); letter-spacing: -.04em; color: #d4dcbb; }
.study-numbers strong span { font-size: .5em; }
.study-numbers p { font-size: 15px; line-height: 1.65; margin: 8px 0 0; }
.study-numbers .study-note { color: #b7bba9; font-size: 13px; margin-top: 16px; }

.start-section { display: grid; grid-template-columns: 1fr .85fr; gap: 120px; padding-block: 100px; align-items: center; }
.start-section h2 { margin-bottom: 20px; }
.start-section > div > p:not([class]) { font-size: 17px; max-width: 350px; margin-bottom: 24px; }
.contribute-panel { padding: 34px; border: 1px solid var(--line-strong); border-radius: 10px; }
.status-label { display: flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 13px; margin-bottom: 22px; }
.status-label > span { width: 6px; height: 6px; background: var(--landing-accent); border-radius: 50%; }
.contribute-panel h3 { font: 400 27px/1.2 var(--serif); letter-spacing: -.025em; margin-bottom: 14px; }
.start-section .contribute-panel > p:not([class]) { font-size: 15px; line-height: 1.8; }
.landing-footer { display: flex; gap: 26px; align-items: center; border-top: 1px solid var(--line); padding-block: 30px 40px; }
.footer-brand { font: 400 26px var(--serif); color: var(--text); }
.landing-footer p { font-size: 13px; color: var(--text-3); margin: 0; }
.landing-footer nav a { display: inline-flex; gap: 6px; align-items: center; }
.landing-footer nav { display: flex; gap: 22px; margin-left: auto; font-size: 14px; }

@media (min-width: 1500px) { .hero { padding-block: 100px; } }
@media (max-width: 1100px) {
	.case-body { padding: 24px; }
	.case-body h2 { font-size: 24px; }
	.landing-wrap { width: calc(100% - 64px); }
	.hero { gap: 36px; }
	.hero h1 { font-size: 54px; }
	.hero-desc { font-size: 19px; }
	.section-intro, .research-layout, .start-section { gap: 56px; }
	.landing-bar { gap: 24px; }
	.landing-nav { gap: 22px; }
}
@media (max-width: 800px) {
	.case-demo { max-width: 600px; width: 100%; }
	.case-body h2 { font-size: 28px; }
	.landing { --header-h: 110px; }
	.landing-bar { min-height: 100px; flex-wrap: wrap; justify-content: space-between; column-gap: 16px; row-gap: 0; padding-top: 12px; }
	.landing-nav { order: 3; flex-basis: 100%; justify-content: space-between; margin: 8px 0 0; padding-bottom: 12px; font-size: 14px; }
	.landing-bar .logo { font-size: 25px; }
	.hero { grid-template-columns: 1fr; gap: 40px; padding-block: 52px; }
	.hero h1 { font-size: clamp(46px, 8vw, 64px); }
	.hero-desc { max-width: 520px; }
	.hero-actions { flex-direction: row; max-width: none; }
	.hero-actions .landing-button { gap: 24px; }
	.section-intro { grid-template-columns: 1fr; gap: 24px; margin-bottom: 36px; }
	.section-copy { max-width: none; }
	.method-section, .start-section { padding-block: 64px; }
	.workflow-section { padding-block: 60px 44px; }
	.project-row { grid-template-columns: 28px 1fr 24px; gap: 12px 18px; padding-block: 24px; }
	.project-row h3 { font-size: 28px; }
	.project-row p { grid-column: 2; grid-row: 2; }
	.project-arrow { grid-column: 3; grid-row: 1 / 3; }
	.workflow-foot { flex-direction: column; gap: 10px; }
	.research-layout { gap: 40px; grid-template-columns: 1fr 1fr; }
	.research-section { padding-block: 60px; }
	.start-section { grid-template-columns: 1fr; gap: 40px; }
	.contribute-panel { max-width: 540px; }
	.landing-footer { flex-wrap: wrap; gap: 16px; }
	.landing-footer p { flex: 1 1 60%; }
	.landing-footer nav { margin: 0; }
}
@media (max-width: 480px) {
	.case-tabs .tab-list { padding-inline: 20px; gap: 22px; }
	.case-tabs .tab-list button { font-size: 13px; }
	.case-body { padding: 24px 20px 18px; }
	.case-body h2 { font-size: 26px; }
	.trace li { gap: 12px; }
	.trace p { font-size: 14px; }
	.trace-label { font-size: 12px; }
	.case-result { padding: 16px; gap: 12px; }
	.case-result > div + div { padding-left: 16px; }
	.case-result strong { font-size: 21px; }
	.landing-bar { column-gap: 12px; }
	.landing-bar .logo { font-size: 23px; gap: 8px; }
	.landing-bar .logo .mark { width: 22px; height: 22px; }
	.landing-tools { gap: 6px; }
	.landing-tools .btn-dark { padding-inline: 12px; font-size: 15px; }
	.landing-wrap { width: calc(100% - 40px); }
	.hero-actions { flex-direction: column; }
	.hero h1 { font-size: 48px; }
	.hero-desc { font-size: 16px; }
	.research-byline { flex-direction: column; gap: 12px; }
	.research-byline > span:last-child { text-align: left; font-size: 13px; }
	.research-layout { grid-template-columns: 1fr; gap: 42px; }
	.study-numbers { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
	.study-numbers strong { font-size: 42px; }
	.study-numbers p { font-size: 13px; }
	.study-numbers > div { margin-bottom: 0; }
	.study-note { grid-column: 1 / -1; }
	.contribute-panel { padding: 26px; }
	.landing-footer nav { gap: 24px; }
}
@media (prefers-reduced-motion: reduce) { .landing-button { transition: none; } }

/* The graph and assessment share one playback state, with direct selection. */
.memory-demo { --demo-green: #4d7350; --demo-green-soft: rgba(77, 115, 80, .12); --demo-green-line: #b5c5ab; --demo-clay: #b3775a; --demo-clay-ink: #93674d; --demo-clay-soft: rgba(179, 119, 90, .15); margin-top: 42px; padding: 20px; background: var(--landing-surface); border: 1px solid var(--line); border-radius: 16px; }
:root[data-theme="dark"] .memory-demo { --demo-green: #9cc495; --demo-green-soft: rgba(156, 196, 149, .13); --demo-green-line: #4a5c47; --demo-clay: #d4a27f; --demo-clay-ink: #d4a27f; --demo-clay-soft: rgba(212, 162, 127, .15); }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .memory-demo { --demo-green: #9cc495; --demo-green-soft: rgba(156, 196, 149, .13); --demo-green-line: #4a5c47; --demo-clay: #d4a27f; --demo-clay-ink: #d4a27f; --demo-clay-soft: rgba(212, 162, 127, .15); }
}
.memory-demo button:focus-visible { outline: 2px solid var(--demo-green); outline-offset: 3px; }

/* Each step carries its own progress track, filled over the step's duration. */
.playback-toolbar { display: flex; align-items: flex-end; gap: 18px; margin-bottom: 18px; }
.playback-steps { display: flex; flex: 1; gap: 12px; min-width: 0; }
.playback-steps button { position: relative; flex: 1 1 0; min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 10px 8px; border: 0; padding: 4px 0 0; background: none; cursor: pointer; font-size: 14px; color: var(--text-3); text-align: left; transition: color .2s; }
.playback-steps button:hover, .playback-steps [aria-current] { color: var(--text); }
.playback-steps .completed { color: var(--text-2); }
.step-number { font: 12px var(--mono); color: var(--text-3); }
.playback-steps :is(.completed, [aria-current]) .step-number { color: var(--demo-green); }
.step-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.playback-steps i { position: relative; grid-column: 1 / -1; height: 3px; border-radius: 3px; background: var(--line-strong); overflow: hidden; }
.playback-steps i::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--demo-green); transform: scaleX(0); transform-origin: left; transition: transform .3s; }
.playback-steps :is(.completed, [aria-current]) i::after { transform: none; }
.memory-demo.is-playing .playback-steps [aria-current] i::after { animation: step-fill var(--dur) linear both; }
.playback-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 86px; height: 36px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--bg-raised); font-size: 14px; color: var(--text); cursor: pointer; transition: border-color .15s; }
.playback-toggle:hover { border-color: var(--text-3); }
.playback-toggle svg { width: 11px; height: 11px; fill: currentColor; }
.playback-toggle .icon-play, .playback-toggle.is-paused .icon-pause { display: none; }
.playback-toggle.is-paused .icon-play { display: inline; }

.demo-workspace { display: grid; grid-template-columns: 1.7fr 1fr; gap: 18px; align-items: stretch; }
.graph-panel, .assessment-panel { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-raised); overflow: hidden; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 22px; border-bottom: 1px solid var(--line); }
.panel-heading h3 { font: 500 17px/1.4 var(--sans); margin: 0; }
.panel-heading > span { padding: 2px 8px; border-radius: 6px; background: var(--bg-muted); font: 12px/1.6 var(--mono); color: var(--text-3); }

/* Lanes are HTML so labels keep their size at any width; only the two
   delivery curves are stretched SVG, addressed in lane units (x 0–100, y 0–3). */
.graph { --gutter: 72px; --lane: 92px; padding: 20px 24px 14px; }
.graph-axis { display: flex; align-items: center; gap: 12px; margin: 0 0 4px var(--gutter); font-size: 12px; color: var(--text-3); }
.graph-axis i { position: relative; flex: 1; height: 1px; background: var(--line-strong); }
.graph-axis i::after { content: ""; position: absolute; top: 50%; right: 0; width: 6px; height: 6px; border: solid var(--text-3); border-width: 1px 1px 0 0; translate: 0 -50%; rotate: 45deg; }
.graph-lanes { position: relative; margin-left: var(--gutter); isolation: isolate; }
.graph-edge { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; fill: none; stroke: var(--demo-green-line); stroke-width: 1.5; stroke-linecap: round; transition: stroke .3s; }
.graph-edge path { vector-effect: non-scaling-stroke; }
.graph-edge.is-selected { z-index: 1; stroke: var(--demo-green); stroke-width: 2.25; }
.lane { position: relative; height: var(--lane); }
.lane::before { content: ""; position: absolute; inset: 50% 0 auto; height: 1px; background: var(--line-strong); }
.lane-name { position: absolute; top: 50%; left: calc(-1 * var(--gutter)); translate: 0 -50%; font-size: 13px; color: var(--text-2); white-space: nowrap; }

.node { position: absolute; top: 50%; left: var(--x); z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; translate: -50% -50%; border: 0; border-radius: 50%; padding: 0; background: none; }
.node::before { content: ""; box-sizing: border-box; width: 16px; height: 16px; border: 2px solid var(--text-3); border-radius: 50%; background: var(--bg-raised); transition: background .3s, border-color .3s, box-shadow .3s; }
.node b { position: absolute; bottom: calc(50% + 15px); left: 50%; translate: -50%; font-size: 12.5px; font-weight: 500; line-height: 1.3; color: var(--text-2); white-space: nowrap; transition: color .3s; }
.node.write::before { width: 18px; height: 18px; border: 0; border-radius: 5px; background: var(--demo-clay); }
.node.write b { color: var(--demo-clay-ink); }
.node.recall { cursor: pointer; }
.node.recall::before { width: 20px; height: 20px; border-color: var(--demo-green); }
.node.recall:hover::before { box-shadow: 0 0 0 6px var(--demo-green-soft); }
.node.recall[aria-pressed="true"]::before { background: var(--demo-green); box-shadow: 0 0 0 6px var(--demo-green-soft); }
.node.recall[aria-pressed="true"] b { color: var(--demo-green); font-weight: 600; }
.node.recall::after { content: ""; position: absolute; width: 20px; height: 20px; border: 1.5px solid var(--demo-green); border-radius: 50%; opacity: 0; pointer-events: none; }
.memory-demo.is-playing .node.recall[aria-pressed="true"]::after { animation: ping 2.4s ease-out infinite; }
.node.step { transition: opacity .35s var(--d, 0s), scale .35s var(--d, 0s) cubic-bezier(.34, 1.56, .64, 1); }
.memory-demo[data-phase="0"] .node.step { opacity: 0; scale: .5; transition-delay: 0s; }
.node.check::after { content: ""; position: absolute; width: 7px; height: 4px; border: solid var(--bg-raised); border-width: 0 0 1.75px 1.75px; translate: 0 -1px; rotate: -45deg; opacity: 0; transition: opacity .3s; }
.has-evidence .is-selected .linked::before { border-color: var(--demo-green); transition-delay: .6s; }
.has-evidence .is-selected .check::before { background: var(--demo-green); transition-delay: 1.2s; }
.has-evidence .is-selected .check::after { opacity: 1; transition-delay: 1.2s; }

/* Evidence marks appear only on the selected lane, wiped in along time. */
.credit-window { position: absolute; top: calc(50% - 38px); z-index: -1; height: 58px; border-radius: 12px; background: var(--demo-green-soft); opacity: 0; clip-path: inset(0 100% 0 0 round 12px); transition: opacity .25s, clip-path 0s .25s; }
.has-evidence .is-selected .credit-window { opacity: 1; clip-path: inset(0 round 12px); transition: clip-path .6s cubic-bezier(.4, 0, .2, 1); }
.influence { position: absolute; top: 50%; z-index: 1; height: 2.5px; translate: 0 -50%; background: var(--demo-green); opacity: 0; clip-path: inset(-8px 100% -8px 0); transition: opacity .25s, clip-path 0s .25s; }
.influence::after { content: ""; position: absolute; top: 50%; right: 11px; width: 7px; height: 7px; border: solid var(--demo-green); border-width: 2px 2px 0 0; translate: 0 -50%; rotate: 45deg; }
.has-evidence .is-selected .influence { opacity: 1; clip-path: inset(-8px 0); transition: clip-path .5s calc(.3s + var(--d, 0s)) cubic-bezier(.4, 0, .2, 1); }
.window-note { position: absolute; top: calc(50% + 25px); display: grid; justify-items: end; font-size: 12px; line-height: 20px; white-space: nowrap; }
.window-note > * { grid-area: 1 / 1; opacity: 0; transition: opacity .3s; }
.window-caption { color: var(--demo-green); }
.verdict-chip { padding: 0 10px; border-radius: 10px; background: var(--demo-green); color: var(--bg-raised); font-weight: 500; }
.lane[data-for="ignored"] .verdict-chip { background: var(--bg-raised); box-shadow: inset 0 0 0 1px var(--text-3); color: var(--text-2); }
.memory-demo[data-phase="2"] .is-selected .window-caption, .memory-demo[data-phase="3"] .is-selected .verdict-chip { opacity: 1; transition-delay: .3s; }

.graph-foot { display: grid; grid-template-columns: 1fr 1.1fr; margin-top: auto; border-top: 1px solid var(--line); }
.memory-entry { display: flex; align-items: flex-start; gap: 12px; padding: 16px 22px; }
.memory-symbol { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 8px; background: var(--demo-clay-soft); color: var(--demo-clay-ink); font: 500 12.5px var(--mono); }
.memory-entry strong { display: block; font-size: 14px; font-weight: 500; line-height: 1.5; }
.memory-entry p { font-size: 13px; line-height: 1.5; color: var(--text-3); margin: 2px 0 0; }
.trajectory-events { padding: 16px 22px; border-left: 1px solid var(--line); }
.trajectory-heading { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 12px; color: var(--text-3); }
.trajectory-heading::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); transition: background .3s; }
.memory-demo[data-phase="1"] .trajectory-heading::before { background: var(--demo-clay); }
.memory-demo.is-playing[data-phase="1"] .trajectory-heading::before { animation: blink 1s ease-in-out infinite; }
.has-evidence .trajectory-heading::before { background: var(--demo-green); }
.trajectory-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 12px; font-size: 12.5px; line-height: 1.9; color: var(--text-2); transition: opacity .35s var(--d, 0s); }
.trajectory-row > span:first-child { font-family: var(--mono); color: var(--text-3); }
.memory-demo[data-phase="0"] .trajectory-row { opacity: .3; transition-delay: 0s; }

.assessment-body { display: flex; flex-direction: column; flex: 1; padding: 22px 24px 20px; }
.assessment-subject { margin-bottom: 10px; font: 12px/1.6 var(--mono); color: var(--text-3); }
.assessment-state { margin-bottom: 10px; font: 400 27px/1.2 var(--serif); letter-spacing: -.025em; color: var(--text); transition: color .3s; }
.memory-demo[data-phase="3"][data-delivery="used"] .assessment-state { color: var(--demo-green); }
.assessment-description { min-height: 4.95em; margin-bottom: 14px; font-size: 15px; line-height: 1.65; text-wrap: pretty; }
.assessment-stack { display: grid; }
.assessment-stack > * { grid-area: 1 / 1; align-self: start; margin: 0; transition: opacity .3s, visibility .3s; }
.memory-demo[data-phase="3"] .evidence-list, .memory-demo:not([data-phase="3"]) .assessment-signals { opacity: 0; visibility: hidden; }
.evidence-list { padding: 0; list-style: none; }
.evidence-list li { display: flex; gap: 12px; margin: 0; padding: 12px 0; border-top: 1px solid var(--line); }
.evidence-check { box-sizing: border-box; display: grid; place-items: center; flex: none; width: 18px; height: 18px; margin-top: 2px; border: 1.5px solid var(--line-strong); border-radius: 50%; }
.evidence-check::after { content: ""; width: 8px; height: 4px; border: solid var(--bg-raised); border-width: 0 0 1.75px 1.75px; translate: 0 -1px; rotate: -45deg; }
.has-evidence .evidence-check { background: var(--demo-green); border-color: var(--demo-green); transition: background .3s var(--d), border-color .3s var(--d); }
.evidence-list strong { display: block; font-size: 14px; font-weight: 500; line-height: 1.5; }
.evidence-list li div > span { display: block; font-size: 13px; line-height: 1.5; color: var(--text-3); }
.assessment-signals > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.assessment-signals dt { color: var(--text-3); }
.assessment-signals dd { margin: 0; font-weight: 500; color: var(--demo-green); }
.assessment-signals dd.is-quiet { font-weight: 400; color: var(--text-3); }
.memory-demo .assessment-foot { margin: auto 0 0; padding-top: 18px; font-size: 12px; color: var(--text-3); }

/* Entrances replay when the script re-adds .is-entering for a new scene. */
.is-entering[data-phase="0"] .graph-edge { animation: edge-draw .7s .3s cubic-bezier(.4, 0, .2, 1) both; }
.is-entering[data-phase="0"] .node.write { animation: pop .4s both; }
.is-entering[data-phase="0"] .node.recall { animation: pop .4s .8s both; }
.is-entering :is(.assessment-state, .assessment-description) { animation: rise .45s both; }
.is-entering[data-phase="3"] .assessment-signals > div { animation: rise .45s calc(.1s + var(--i) * 70ms) both; }
@keyframes step-fill { from { transform: scaleX(0); } }
@keyframes ping { 0% { opacity: .7; scale: 1; } 70%, 100% { opacity: 0; scale: 2.3; } }
@keyframes blink { 50% { opacity: .3; } }
@keyframes edge-draw { from { clip-path: inset(-12px 100% -12px 0); } to { clip-path: inset(-12px var(--end) -12px 0); } }
@keyframes pop { from { opacity: 0; scale: .4; } }
@keyframes rise { from { opacity: 0; translate: 0 6px; } }

@media (max-width: 1000px) {
	.demo-workspace { grid-template-columns: 1fr; gap: 14px; }
	.assessment-description { min-height: 3.3em; }
}
@media (max-width: 860px) {
	/* Only the current step shows its name. The others keep it in flow, transparent,
	   so every number shares one baseline and assistive technology still reads it. */
	.playback-steps button:not([aria-current]) { flex: 0 0 30px; }
	.playback-steps button:not([aria-current]) .step-name { opacity: 0; text-overflow: clip; }
}
@media (max-width: 700px) {
	.memory-demo { padding: 12px; }
	.playback-toolbar { gap: 10px; margin-bottom: 14px; }
	.playback-steps { gap: 8px; }
	.playback-toggle { min-width: 36px; }
	.playback-label { display: none; }
	.graph { --gutter: 52px; padding: 16px 14px 12px; }
	.lane-name, .node b { font-size: 12px; }
	.graph-foot { grid-template-columns: 1fr; }
	.trajectory-events { border-top: 1px solid var(--line); border-left: 0; }
	.panel-heading, .memory-entry, .trajectory-events, .assessment-body { padding-inline: 16px; }
	.assessment-description { min-height: 4.95em; }
}
@media (prefers-reduced-motion: reduce) {
	.memory-demo *, .memory-demo *::before, .memory-demo *::after { animation: none !important; transition: none !important; }
}
