:root {
  color-scheme: light;
  --paper: #f4f4f2;
  --surface: #fbfbf9;
  --white: #fff;
  --ink: #171717;
  --muted: #686864;
  --line: #d8d8d3;
  --red: #c80c18;
  --red-dark: #920914;
  --red-soft: #f2d7d9;
  --gold: #c8a254;
  --gold-soft: #f3ead5;
  --graphite: #2c2c2a;
  --success: #2e6653;
  --header: 70px;
  font-family: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); line-height: 1.65; letter-spacing: 0; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 50; opacity: .16; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.12'/%3E%3C/svg%3E"); mix-blend-mode: multiply; }
img { display: block; max-width: 100%; }
button, input { font: inherit; }
a { color: inherit; }
h1, h2, p { margin-top: 0; }

.skip-link { position: fixed; top: -70px; left: 18px; z-index: 100; padding: 10px 14px; background: var(--ink); color: #fff; }
.skip-link:focus { top: 10px; }
.scroll-progress { position: fixed; inset: 0 auto auto 0; z-index: 80; width: 100%; height: 3px; background: var(--red); transform: scaleX(0); transform-origin: left; }

.lab-header { position: sticky; top: 0; z-index: 40; height: var(--header); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 28px; padding: 0 clamp(18px, 4vw, 64px); border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--paper) 94%, transparent); backdrop-filter: blur(18px); }
.lab-brand { display: flex; align-items: center; gap: 14px; width: max-content; text-decoration: none; font-weight: 750; white-space: nowrap; }
.lab-brand img { width: 145px; }
.lab-brand span { padding-left: 14px; border-left: 1px solid var(--line); }
.lab-header nav { display: flex; gap: clamp(18px, 2.6vw, 38px); }
.lab-header nav a, .back-link { color: var(--muted); font-size: 13px; text-decoration: none; transition: color .2s ease; }
.lab-header nav a:hover, .lab-header nav a:focus-visible, .back-link:hover, .back-link:focus-visible { color: var(--red); }
.back-link { justify-self: end; border-bottom: 1px solid var(--red); }

.sandbox { min-height: calc(100dvh - var(--header)); display: grid; grid-template-columns: minmax(360px, .72fr) minmax(620px, 1.28fr); grid-template-rows: auto auto; align-content: center; column-gap: clamp(48px, 4vw, 72px); padding-block: clamp(18px, 2.6vh, 28px); border-bottom: 1px solid var(--line); }
.sandbox-copy { grid-row: 1 / span 2; align-self: center; padding: clamp(42px, 5vw, 82px) 0 clamp(42px, 5vw, 82px) clamp(24px, 5vw, 82px); }
.eyebrow { margin-bottom: 20px; color: var(--red); font-size: 12px; font-weight: 800; }
.sandbox h1 { max-width: none; margin-bottom: 28px; font-size: clamp(30px, 2.65vw, 44px); line-height: 1.1; white-space: nowrap; }
.sandbox h1 span { display: block; white-space: nowrap; }
.sandbox-copy > p:not(.eyebrow) { max-width: 31em; color: var(--muted); font-size: clamp(16px, 1.3vw, 20px); }
.scenario-key { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.scenario-key span { padding: 7px 10px; border: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 700; }
.replay-button { display: inline-flex; align-items: center; gap: 8px; margin-top: 24px; padding: 9px 0; border: 0; border-bottom: 1px solid var(--red); background: transparent; color: var(--ink); font-size: 12px; font-weight: 750; cursor: pointer; }
.replay-button span { color: var(--red); font-size: 18px; }

.grid-terminal { grid-column: 2; grid-row: 1; align-self: end; margin: 0 clamp(20px, 4vw, 64px) 0 0; border: 1px solid var(--line); background: var(--surface); box-shadow: 0 22px 58px rgba(30, 20, 20, .08); }
.terminal-head { min-height: 78px; display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.terminal-head div:first-child { display: grid; }
.terminal-head span { color: var(--muted); font-size: 10px; }
.terminal-head strong { font-size: 15px; }
.terminal-controls { display: flex; align-items: center; gap: 16px; padding-top: 3px; }
.pause-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-width: 72px; height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 3px; background: var(--surface); color: var(--ink); cursor: pointer; }
.pause-button:hover, .pause-button:focus-visible, .pause-button[aria-pressed="true"] { border-color: var(--red); color: var(--red); }
.pause-button span { color: currentColor; font-size: 12px; font-weight: 900; }
.pause-button b { font-size: 11px; }
.market-state { display: flex; align-items: center; gap: 8px; min-height: 32px; }
.market-state i { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 5px rgba(46,102,83,.1); }
.live-position { display: flex !important; align-items: baseline; gap: 8px; min-height: 30px; margin-top: 7px; }
.live-position span { color: var(--muted); font-size: 10px; font-weight: 700; }
.live-position b { color: var(--ink); font-size: 24px; line-height: 1; font-variant-numeric: tabular-nums; }
.live-position em { color: var(--muted); font-size: 10px; font-style: normal; font-weight: 700; }
.live-position.is-buy b, .live-position.is-buy em { color: var(--red); }
.live-position.is-sell b, .live-position.is-sell em { color: var(--success); }
.chart-shell { position: relative; min-height: 270px; overflow: hidden; background: #f8f8f5; }
.grid-chart { display: block; width: 100%; height: 270px; min-height: 0; }
.grid-line { stroke: #aaa9a3; stroke-width: 1.5; }
.grid-line.major { stroke: #777771; stroke-width: 2; }
.grid-line.is-mid { stroke: var(--red); stroke-width: 2.5; opacity: .72; }
.grid-line-reveal { opacity: 0; }
.grid-terminal.is-grid-visible .grid-line-reveal { animation: grid-impact .85s cubic-bezier(.16,1,.3,1) forwards; }
.grid-terminal.is-grid-visible .grid-line { animation: grid-draw .72s cubic-bezier(.16,1,.3,1) both; animation-delay: calc(var(--line-index) * 55ms); }
.grid-label { fill: var(--muted); font-size: 11px; font-weight: 700; }
.grid-action { fill: #8c8c86; font-size: 9px; font-weight: 700; }
.price-trail { fill: none; stroke: var(--red); stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 4px 5px rgba(200,12,24,.12)); }
.price-guide { stroke: var(--red); stroke-width: 1; stroke-dasharray: 4 8; opacity: .26; }
.price-marker circle:first-child { fill: var(--surface); stroke: var(--red); stroke-width: 4; }
.price-marker circle:last-child { fill: var(--red); }
.trade-badge { opacity: .5; transition: opacity .22s ease; }
.trade-badge.is-latest { opacity: 1; }
.trade-badge .trade-node { fill: var(--surface); stroke-width: 3; }
.trade-badge .trade-node-core { stroke: none; }
.trade-badge.buy .trade-node { stroke: var(--red); }
.trade-badge.buy .trade-node-core { fill: var(--red); }
.trade-badge.sell .trade-node { stroke: var(--success); }
.trade-badge.sell .trade-node-core { fill: var(--success); }
.trade-callout { transition: opacity .18s ease; }
.trade-badge:not(.is-latest) .trade-callout { opacity: 0; }
.trade-callout line { stroke-width: 1.5; }
.trade-badge.buy .trade-callout line { stroke: var(--red); }
.trade-badge.sell .trade-callout line { stroke: var(--success); }
.trade-action-label, .profit-label { font-weight: 850; paint-order: stroke; stroke: var(--surface); stroke-width: 5px; stroke-linejoin: round; }
.trade-action-label { font-size: 12px; dominant-baseline: middle; }
.trade-badge.buy .trade-action-label { fill: var(--red); }
.trade-badge.sell .trade-action-label { fill: var(--success); }
.profit-label { fill: var(--success); font-size: 9px; }
.scene-caption { position: absolute; top: 16px; right: 18px; display: flex; max-width: calc(100% - 36px); align-items: baseline; gap: 12px; padding: 9px 14px; background: color-mix(in srgb, var(--ink) 94%, transparent); color: #fff; text-align: left; white-space: nowrap; opacity: 0; transform: translateY(-4px); transition: opacity .25s ease, transform .25s ease; }
.scene-caption.is-visible { opacity: 1; transform: translateY(0); }
.scene-caption span { display: inline; color: #efb1b5; font-size: 10px; font-weight: 800; }.scene-caption strong { font-size: 13px; }
.terminal-metrics { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.terminal-metrics > div { min-width: 0; padding: 9px 13px 10px; border-right: 1px solid var(--line); }
.terminal-metrics > div:last-child { border-right: 0; }
.terminal-metrics span { display: block; color: var(--muted); font-size: 10px; }
.terminal-metrics strong { display: block; margin-top: 3px; font-size: clamp(16px, 1.35vw, 21px); font-variant-numeric: tabular-nums; white-space: nowrap; }
.terminal-metrics b { font-weight: 850; }
.metric-accent { background: var(--gold-soft); }
.performance-duel { grid-column: 2; grid-row: 2; width: auto; margin: -1px clamp(20px, 4vw, 64px) 0 0; border: 1px solid var(--line); border-top: 3px solid var(--red); background: var(--surface); box-shadow: 0 18px 48px rgba(30,20,20,.07); }
.performance-duel > header { padding: 10px 16px 9px; border-bottom: 1px solid var(--line); }
.performance-duel > header span { color: var(--red); font-size: 10px; font-weight: 850; }
.performance-duel > header h2 { margin: 2px 0 1px; font-size: clamp(20px, 2vw, 29px); }
.performance-duel > header p { margin: 0; color: var(--muted); font-size: 10px; }
.comparison-panel { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 76px minmax(0, 1fr); }
.comparison-panel article { position: relative; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 18px 13px; }
.comparison-panel article:first-child { grid-column: 1; }
.comparison-panel article:last-child { grid-column: 3; border-left: 1px solid var(--line); }
.comparison-panel span { color: var(--muted); font-size: 13px; font-weight: 750; }
.comparison-panel strong { grid-row: 1 / span 2; grid-column: 2; align-self: center; justify-self: start; width: auto; font-size: clamp(25px, 2.45vw, 38px); line-height: 1; white-space: nowrap; font-variant-numeric: tabular-nums; }
.comparison-panel small { color: #7f1721; font-size: 14px; font-weight: 850; }
.comparison-panel small b { color: #7f1721; font-size: 1.08em; }
.comparison-panel i { grid-column: 1 / -1; height: 5px; margin-top: 7px; background: var(--line); overflow: hidden; }
.comparison-panel em { display: block; width: 100%; height: 100%; background: var(--graphite); transform: scaleX(0); transform-origin: left; transition: transform .8s cubic-bezier(.16,1,.3,1); }
.comparison-panel .is-grid em { background: var(--red); }
.comparison-vs { position: absolute; left: 50%; top: 50%; z-index: 2; display: grid; width: 40px; height: 40px; place-items: center; translate: -50% -50%; border: 2px solid var(--red); border-radius: 50%; background: var(--ink); color: #fff; font-size: 11px; font-weight: 900; box-shadow: 0 0 0 6px var(--surface); }
.terminal-note { margin: 0; padding: 6px 13px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; }

.section-pad { padding: clamp(86px, 10vw, 148px) clamp(22px, 6vw, 96px); border-bottom: 1px solid var(--line); }
.section-heading { max-width: 930px; margin-bottom: clamp(52px, 7vw, 88px); }
.section-heading h2 { margin-bottom: 26px; font-size: clamp(38px, 5vw, 72px); line-height: 1.06; text-wrap: balance; }
#regime-title { font-size: clamp(34px, 4.6vw, 72px); white-space: nowrap; }
#portfolio-title { font-size: clamp(30px, 4vw, 58px); white-space: nowrap; }
.section-heading > p:last-child { max-width: 52em; color: var(--muted); font-size: clamp(17px, 1.65vw, 23px); }

.regime { background: var(--ink); color: #fff; }
.regime .eyebrow { color: #ff7b83; }
.regime .section-heading > p:last-child, .regime .data-caveat { color: #bdbdb8; }
.regime-board { display: grid; grid-template-columns: minmax(260px, .65fr) minmax(500px, 1.35fr); border-top: 1px solid #454542; border-bottom: 1px solid #454542; }
.regime-stat { padding: 44px clamp(20px, 4vw, 58px) 48px 0; border-right: 1px solid #454542; }
.regime-stat > span { display: block; color: #bdbdb8; font-size: 12px; }
.regime-stat strong { font-size: clamp(80px, 11vw, 170px); line-height: .92; color: #fff; font-variant-numeric: tabular-nums; }
.regime-stat em { color: #ff7b83; font-size: clamp(28px, 4vw, 54px); font-style: normal; font-weight: 850; }
.regime-stat p { max-width: 29em; margin: 25px 0 0; color: #d7d7d1; }
.regime-track { min-width: 0; padding: 48px 0 48px clamp(26px, 5vw, 70px); }
.track-label { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 20px; color: #bdbdb8; font-size: 12px; }
.track-bar { position: relative; height: 84px; background: #343431; overflow: hidden; }
.track-range { display: block; width: 72%; height: 100%; background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform 2.45s cubic-bezier(.16,1,.3,1); transition-delay: 1.15s; }
.regime-board.is-visible .track-range { transform: scaleX(1); }
.track-split { position: absolute; left: 70%; top: 50%; transform: translate(-50%, -50%); font-style: normal; font-weight: 850; }
.track-legend { display: flex; gap: 30px; margin-top: 17px; color: #d7d7d1; font-size: 12px; }
.track-legend i { display: inline-block; width: 16px; height: 4px; margin-right: 8px; vertical-align: middle; }
.is-range { background: var(--red); }
.is-trend { background: #666662; }
.regime-pulses { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 46px; }
.regime-pulses button { padding: 12px 8px; border: 1px solid #444440; background: transparent; color: #aaa9a4; text-align: center; font: inherit; font-size: 12px; cursor: pointer; transition: border-color .25s ease, color .25s ease, background .25s ease; }
.regime-pulses button:hover, .regime-pulses button:focus-visible { border-color: #ff7b83; background: #292927; color: #fff; outline: none; }
.data-caveat { margin: 25px 0 0; font-size: 12px; }

.regime-detail { width: min(560px, calc(100vw - 32px)); padding: 34px; border: 1px solid #555550; border-radius: 0; background: #1c1c1a; color: #fff; box-shadow: 0 24px 80px rgba(0,0,0,.35); }
.regime-detail::backdrop { background: rgba(15,15,14,.72); backdrop-filter: blur(5px); }
.regime-detail > span { display: block; color: #ff7b83; font-size: 12px; font-weight: 850; letter-spacing: .08em; }
.regime-detail > strong { display: block; margin-top: 9px; font-size: clamp(24px, 4vw, 38px); }
.regime-detail > p { margin: 18px 0 24px; color: #d0d0cb; line-height: 1.8; }
.regime-detail dl { margin: 0; border-top: 1px solid #444440; }
.regime-detail dl div { display: grid; grid-template-columns: 90px 1fr; gap: 18px; padding: 15px 0; border-bottom: 1px solid #444440; }
.regime-detail dt { color: #ff7b83; font-weight: 800; }.regime-detail dd { margin: 0; color: #d0d0cb; }
.regime-detail-close { position: absolute; right: 15px; top: 11px; width: 34px; height: 34px; border: 0; background: transparent; color: #fff; font-size: 26px; cursor: pointer; }

.screening { background: var(--surface); }
.positioning-heading { max-width: 1120px; margin-inline: auto; text-align: center; }
.positioning-heading h2 { margin-bottom: 8px; font-size: clamp(44px, 5vw, 72px); }
.positioning-heading > p:not(.eyebrow) { max-width: none; }
.positioning-switch { display: grid; grid-template-columns: minmax(220px, 320px) 54px minmax(220px, 320px); justify-content: center; align-items: center; gap: clamp(18px, 3vw, 44px); margin: 58px auto 38px; }
.positioning-switch > div { display: grid; gap: 10px; min-height: 152px; place-content: center; border: 2px solid #dedee2; border-radius: 28px; background: #f8f8fa; }
.positioning-switch span { color: var(--muted); font-size: 14px; }
.positioning-switch strong { font-size: clamp(28px, 3vw, 42px); }
.positioning-switch > i { color: var(--gold); font-size: 42px; font-style: normal; }
.positioning-switch .volatility-harvest { border-color: var(--red); background: #fff8f8; }
.direction-bet strong { color: var(--ink); }.volatility-harvest strong { color: var(--red); }
.positioning-heading .positioning-detail { max-width: 50em; margin: 0 auto; color: var(--muted); font-size: 15px; line-height: 1.8; }
.factor-machine { display: grid; grid-template-columns: 1fr; justify-items: center; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.universe-bank, .factor-processor, .selection-output { width: min(100%, 1040px); min-width: 0; }
.universe-bank { padding: 36px clamp(18px, 4vw, 58px); text-align: center; }
.universe-bank > strong { display: block; font-size: clamp(27px, 3.4vw, 46px); }
.universe-bank > p { margin: 9px 0 0; color: var(--muted); font-size: 12px; }
.universe-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; margin-top: 24px; }
.universe-chips i { min-width: 72px; padding: 9px 14px; border: 1px solid #c6c6c1; color: var(--muted); font-size: 11px; font-style: normal; text-align: center; opacity: 0; transform: translateY(-8px); }
.factor-machine.is-visible .universe-chips i { animation: processor-input .55s calc(var(--chip, 0) * .08s) cubic-bezier(.16,1,.3,1) forwards; }
.universe-chips i:nth-child(1){--chip:0}.universe-chips i:nth-child(2){--chip:1}.universe-chips i:nth-child(3){--chip:2}.universe-chips i:nth-child(4){--chip:3}.universe-chips i:nth-child(5){--chip:4}.universe-chips i:nth-child(6){--chip:5}.universe-chips i:nth-child(7){--chip:6}
.universe-chips .is-more { min-width: 44px; border-style: dashed; }
.flow-arrow { position: relative; width: 2px; height: 54px; background: var(--red); transform: scaleY(0); transform-origin: top; }
.flow-arrow::after { content: ""; position: absolute; left: 50%; bottom: -1px; width: 10px; height: 10px; border-right: 2px solid var(--red); border-bottom: 2px solid var(--red); transform: translateX(-50%) rotate(45deg); }
.factor-machine.is-visible .flow-arrow { animation: arrow-grow .6s .6s cubic-bezier(.16,1,.3,1) forwards; }
.flow-arrow.is-output { height: 48px; }
.factor-machine.is-visible .flow-arrow.is-output { animation-delay: 1.45s; }
.factor-processor { position: relative; padding: 26px clamp(18px, 4vw, 48px) 30px; border: 1px solid #232321; background: #20201e; color: #fff; box-shadow: 12px 12px 0 rgba(200,12,24,.1); }
.factor-processor::before, .factor-processor::after { content: ""; position: absolute; top: 16px; bottom: 16px; width: 9px; background: repeating-linear-gradient(to bottom,var(--red) 0 10px,transparent 10px 18px); }
.factor-processor::before { left: -10px; }.factor-processor::after { right: -10px; }
.factor-processor header { display: grid; justify-items: center; gap: 5px; text-align: center; }
.factor-processor header span { color: #ff858c; font-size: 9px; font-weight: 850; letter-spacing: .12em; }
.factor-processor header strong { font-size: clamp(24px, 3vw, 40px); }
.factor-processor header em { color: #bdbdb8; font-size: 10px; font-style: normal; }
.processor-core { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; margin: 24px 0 18px; }
.processor-core i { height: 1px; background: linear-gradient(90deg,transparent,var(--red)); }
.processor-core i:last-child { background: linear-gradient(90deg,var(--red),transparent); }
.processor-core b { padding: 9px 16px; border: 1px solid #676762; font-size: 12px; }
.factor-processor ul { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin: 0; padding: 0; list-style: none; }
.factor-processor li { display: grid; gap: 4px; min-height: 66px; align-content: center; padding: 10px 8px; border: 1px solid #444440; color: #deded8; text-align: center; font-size: 10px; opacity: 0; }
.factor-processor li b { color: #fff; font-size: 11px; }.factor-processor li span { color: #bdbdb8; line-height: 1.45; }
.factor-machine.is-visible .factor-processor li { animation: factor-cell .5s calc(.85s + var(--cell,0) * .1s) ease forwards; }
.factor-processor li:nth-child(1){--cell:0}.factor-processor li:nth-child(2){--cell:1}.factor-processor li:nth-child(3){--cell:2}.factor-processor li:nth-child(4){--cell:3}.factor-processor li:nth-child(5){--cell:4}.factor-processor li:nth-child(6){--cell:5}
.selection-output { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(48px, 8vw, 116px); padding: 0 clamp(20px, 4vw, 54px) 42px; }
.selection-column { min-width: 0; padding: 10px clamp(16px, 2vw, 28px) 0; }
.selection-column + .selection-column { padding-left: clamp(16px, 2vw, 28px); border-left: 0; }
.selection-column header span { color: var(--red); font-size: 10px; font-weight: 800; }
.selection-column.is-short header span { color: var(--graphite); }
.selection-column header strong { display: block; margin-top: 7px; font-size: clamp(20px, 2vw, 29px); }
.selection-column header p { color: var(--muted); font-size: 11px; }
.selection-column ol { list-style: none; margin: 25px 0 0; padding: 0; counter-reset: selection; }
.selection-column li { counter-increment: selection; display: flex; justify-content: space-between; align-items: center; min-height: 42px; border-top: 1px solid var(--line); font-weight: 750; opacity: .24; transform: translateY(8px); }
.selection-column li::after { content: "0" counter(selection); min-width: 30px; margin-left: 20px; color: var(--muted); font-size: 10px; text-align: right; }
.factor-machine.is-visible .selection-column li { animation: result-in .62s calc(1.85s + var(--delay, 0s)) cubic-bezier(.16,1,.3,1) forwards; }
.selection-column li:nth-child(1) { --delay: .08s; }.selection-column li:nth-child(2) { --delay: .16s; }.selection-column li:nth-child(3) { --delay: .24s; }.selection-column li:nth-child(4) { --delay: .32s; }.selection-column li:nth-child(5) { --delay: .40s; }
.sample-note { margin: 22px 0 0; color: var(--muted); font-size: 12px; }

.portfolio { overflow: hidden; }
.alpha-stage { position: relative; min-height: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.grid-harvest { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 7vw, 110px); padding: 30px clamp(18px, 4vw, 58px) 54px; }
.grid-bank { --wave-color: var(--red); min-width: 0; }
.grid-bank.is-short { --wave-color: #1f6553; }
.grid-bank header { display: grid; grid-template-columns: auto 1fr; align-items: end; column-gap: 12px; padding-bottom: 13px; border-bottom: 2px solid var(--wave-color); }
.grid-bank header span { grid-column: 1 / -1; color: var(--wave-color); font-size: 9px; font-weight: 850; letter-spacing: .1em; }
.grid-bank header strong { font-size: 17px; }
.grid-bank header em { justify-self: end; color: var(--muted); font-size: 10px; font-style: normal; }
.micro-grid-list article { --wave-duration: 7s; --wave-delay: 0s; display: grid; grid-template-columns: 58px minmax(0,1fr); align-items: center; gap: 14px; min-height: 72px; border-bottom: 1px solid var(--line); }
.micro-grid-list b { display: grid; gap: 2px; font-size: 11px; font-weight: 720; }
.micro-grid-list b small { color: var(--wave-color); font-size: 8px; font-weight: 700; white-space: nowrap; }
.micro-grid-list svg { width: 100%; height: 54px; overflow: visible; }
.micro-levels path { fill: none; stroke: #d8d8d3; stroke-width: 1; }
.micro-wave { fill: none; stroke: var(--wave-color); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 440; stroke-dashoffset: 440; }
.trade-dot { opacity: 0; stroke: #fff; stroke-width: 1.5; }
.trade-dot.is-buy { fill: var(--red); }
.trade-dot.is-sell { fill: #1f6553; }
.micro-grid-list i { display: none; }
.grid-bank.is-long article:nth-child(1) { --wave-duration: 7.4s; --wave-delay: .12s; }
.grid-bank.is-long article:nth-child(2) { --wave-duration: 6.5s; --wave-delay: .42s; }
.grid-bank.is-long article:nth-child(3) { --wave-duration: 8.1s; --wave-delay: .2s; }
.grid-bank.is-long article:nth-child(4) { --wave-duration: 7s; --wave-delay: .58s; }
.grid-bank.is-long article:nth-child(5) { --wave-duration: 6.2s; --wave-delay: .34s; }
.grid-bank.is-short article:nth-child(1) { --wave-duration: 7.8s; --wave-delay: .3s; }
.grid-bank.is-short article:nth-child(2) { --wave-duration: 6.7s; --wave-delay: .55s; }
.grid-bank.is-short article:nth-child(3) { --wave-duration: 8.4s; --wave-delay: .16s; }
.grid-bank.is-short article:nth-child(4) { --wave-duration: 7.2s; --wave-delay: .48s; }
.grid-bank.is-short article:nth-child(5) { --wave-duration: 6.4s; --wave-delay: .26s; }
.alpha-stage.is-visible .micro-wave { animation: wave-harvest var(--wave-duration) var(--wave-delay) cubic-bezier(.32,.03,.2,1) forwards; animation-iteration-count: 1; }
.alpha-stage.is-visible .trade-dot { animation: trade-dot-in .42s calc(var(--wave-delay) + var(--dot-delay,2.8s)) ease forwards; }

.profit-pipeline { position: relative; height: 222px; margin: 18px clamp(18px, 4vw, 58px) 0; border-top: 0; }
.profit-pipeline svg { width: 100%; height: 100%; overflow: visible; }
.pipe-branches path { fill: none; stroke: #c9c9c4; stroke-width: 4; stroke-linecap: round; opacity: .8; }
.pipe-branches path:nth-child(-n+5) { stroke: color-mix(in srgb, var(--red) 42%, #d6d6d1); }
.pipe-branches path:nth-child(n+6) { stroke: color-mix(in srgb, #1f6553 45%, #d6d6d1); }
.pipe-trunk { fill: none; stroke: #aaa9a2; stroke-width: 12; stroke-linecap: round; }
.profit-particle { fill: var(--gold); filter: drop-shadow(0 0 5px rgba(201,159,73,.55)); }
.profit-particle.is-long { fill: var(--red); }
.profit-particle.is-short { fill: #1f6553; }
.pipeline-labels { position: absolute; z-index: 2; top: 4px; display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 9px; font-weight: 750; }
.pipeline-labels.is-long { left: 0; color: var(--red); }.pipeline-labels.is-short { right: 0; color: #1f6553; text-align: right; }
.pipeline-labels li { min-height: 28px; }
.profit-pipeline > span { position: absolute; left: 50%; bottom: 24px; translate: -50% 0; padding: 5px 10px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .08em; }

.alpha-result { position: relative; padding: 34px clamp(18px, 4vw, 62px) 40px; border-top: 1px solid var(--line); background: #fff; }
.alpha-result::before { content: ""; position: absolute; left: 50%; top: 0; width: 12px; height: 28px; translate: -50% -50%; border-radius: 0 0 8px 8px; background: #aaa9a2; }
.alpha-result header { display: flex; justify-content: space-between; align-items: end; gap: 24px; }
.alpha-result header div { display: grid; gap: 7px; }
.alpha-result header span { color: var(--red); font-size: 9px; font-weight: 850; letter-spacing: .1em; }
.alpha-result header strong { font-size: clamp(20px, 2.3vw, 32px); }
.alpha-result header p { display: grid; justify-items: end; gap: 2px; margin: 0; }
.alpha-result header p b { color: var(--red); font-size: clamp(24px, 3vw, 40px); }
.alpha-result header p em { color: var(--muted); font-size: 10px; font-style: normal; }
.return-chart { width: 100%; min-height: 310px; margin-top: 18px; overflow: visible; }
.return-grid-line { stroke: #ddddda; stroke-width: 1; }
.return-axis-line { stroke: #8f8e88; stroke-width: 1.2; }
.return-axis-label { fill: var(--muted); font-size: 12px; font-family: inherit; }
.return-axis-title { fill: #181817; font-size: 11px; font-weight: 800; font-family: inherit; }
.return-area { fill: rgba(205,8,20,.055); stroke: none; }
.alpha-path { fill: none; stroke: var(--red); stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1600; stroke-dashoffset: 1600; }
.return-end { fill: #fff; stroke: var(--red); stroke-width: 4; opacity: 0; }
.alpha-stage.is-visible .alpha-path { animation: draw-alpha 3.6s .65s cubic-bezier(.16,1,.3,1) forwards; }
.alpha-stage.is-visible .return-end { animation: end-point-in .4s 4s ease forwards; }
.alpha-result footer { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-top: 10px; }
.alpha-result footer strong { font-size: clamp(19px, 2.2vw, 30px); }
.alpha-result footer span { color: var(--muted); font-size: 10px; }
.risk-rail { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 72px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.risk-rail > div { padding: 29px clamp(18px, 3vw, 42px) 34px 0; }
.risk-rail > div + div { padding-left: clamp(18px, 3vw, 42px); border-left: 1px solid var(--line); }
.risk-rail span { color: var(--red); font-size: 10px; }
.risk-rail strong { display: block; margin-top: 8px; font-size: 20px; }
.risk-rail p { margin: 14px 0 0; color: var(--muted); font-size: 13px; }
.strategy-compare-table { margin-top: clamp(76px, 9vw, 128px); border: 1px solid var(--line); background: #fff; }
.strategy-compare-table header { padding: 32px clamp(18px, 4vw, 46px); text-align: center; }
.strategy-compare-table h3 { margin: 0; font-size: clamp(28px, 4vw, 52px); }
.strategy-compare-table header p { margin: 8px 0 0; color: var(--muted); }
.compare-row { display: grid; grid-template-columns: minmax(120px,.72fr) minmax(220px,1.3fr) minmax(260px,1.55fr); border-top: 1px solid var(--line); }
.compare-row > * { display: grid; min-width: 0; align-items: center; margin: 0; padding: 17px clamp(14px, 2.5vw, 32px); font-style: normal; }
.compare-row b { color: var(--ink); }.compare-row span { color: var(--muted); }.compare-row em { background: #fff4f5; color: var(--red); font-weight: 780; }
.compare-row.is-head { background: var(--ink); color: #fff; }.compare-row.is-head b { color: #fff; }.compare-row.is-head strong:last-child { background: var(--red); }
blockquote { max-width: 23em; margin: clamp(76px, 10vw, 140px) 0 0 auto; padding: 0; border: 0; font-size: clamp(30px, 4.6vw, 66px); font-weight: 850; line-height: 1.2; }

footer { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 30px; padding: 36px clamp(22px, 6vw, 96px); background: var(--white); }
footer img { width: 150px; }
footer p { max-width: 58em; margin: 0; color: var(--muted); font-size: 11px; }
footer a { color: var(--red); font-size: 12px; font-weight: 750; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s cubic-bezier(.16,1,.3,1); }
.reveal.is-visible { opacity: 1; transform: none; }
@keyframes toast-in { 0%{opacity:0;transform:translate(-50%,-8px)} 18%,70%{opacity:1;transform:translate(-50%,0)} 100%{opacity:0;transform:translate(-50%,-5px)} }
@keyframes grid-impact { from{opacity:0;transform:scale(.96)} to{opacity:1;transform:none} }
@keyframes grid-draw { from{stroke-dasharray:700;stroke-dashoffset:700} to{stroke-dasharray:700;stroke-dashoffset:0} }
@keyframes state-pulse { 0%,100%{border-color:#444440;color:#aaa9a4} 50%{border-color:var(--red);color:#fff} }
@keyframes chip-scan { 0%,100%{border-color:var(--line);color:var(--muted);transform:none} 45%{border-color:var(--red);color:var(--ink);transform:translateY(-2px)} }
@keyframes factor-scan { 0%{transform:translateX(-110%)} 55%,100%{transform:translateX(245%)} }
@keyframes result-in { to{opacity:1;transform:none} }
@keyframes processor-input { to{opacity:1;transform:none} }
@keyframes arrow-grow { to{transform:scaleY(1)} }
@keyframes factor-cell { to{opacity:1;border-color:#777770} }
@keyframes wave-harvest { 0%{stroke-dashoffset:440;opacity:.12} 82%,100%{stroke-dashoffset:0;opacity:.96} }
@keyframes trade-dot-in { from{opacity:0;transform:scale(.2);transform-box:fill-box;transform-origin:center} to{opacity:1;transform:scale(1);transform-box:fill-box;transform-origin:center} }
@keyframes draw-alpha { to{stroke-dashoffset:0} }
@keyframes end-point-in { from{opacity:0;transform:scale(.2);transform-box:fill-box;transform-origin:center} to{opacity:1;transform:scale(1);transform-box:fill-box;transform-origin:center} }

@media (max-width: 1060px) {
  .lab-header { grid-template-columns: 1fr auto; }
  .lab-header nav { display: none; }
  .sandbox { grid-template-columns: 1fr; grid-template-rows: auto auto auto; align-content: start; gap: 0; padding-block: 0; }
  .sandbox-copy { grid-row: auto; }
  .sandbox-copy { padding-bottom: 28px; }
  .grid-terminal { grid-column: 1; grid-row: auto; margin: 0 clamp(18px, 5vw, 54px); }
  .performance-duel { grid-column: 1; grid-row: auto; width: auto; margin: -1px clamp(18px, 5vw, 54px) clamp(32px, 5vw, 52px); }
  .regime-board { grid-template-columns: 1fr; }
  .regime-stat { border-right: 0; border-bottom: 1px solid #454542; }
  .regime-track { padding-left: 0; }
  .factor-machine { grid-template-columns: 1fr; }
  .selection-output { padding-left: 0; }
  .grid-harvest { gap: 32px; padding-inline: 22px; }
  .profit-pipeline { margin-inline: 22px; }
}

@media (min-width: 681px) and (max-width: 1060px) {
  .grid-harvest { grid-template-columns: 1fr 1fr; }
  .micro-grid-list article { grid-template-columns: 45px minmax(0,1fr); gap: 8px; }
  .grid-bank header em { display: none; }
}

@media (max-width: 680px) {
  :root { --header: 60px; }
  .lab-header { padding: 0 15px; }
  .lab-brand img { width: 112px; }
  .lab-brand span { display: none; }
  .back-link { font-size: 11px; }
  .sandbox-copy { padding: 50px 18px 25px; }
  .sandbox h1 { font-size: clamp(27px, 7.6vw, 30px); }
  .scene-caption { left: 12px; right: 12px; max-width: none; justify-content: center; gap: 7px; padding: 8px 9px; }
  .scene-caption span { font-size: 8px; }
  .scene-caption strong { font-size: 10px; }
  .grid-terminal { margin: 0 10px; }
  .terminal-head { padding-inline: 12px; }
  .terminal-head { min-height: 94px; }
  .terminal-controls { display: grid; justify-items: end; gap: 6px; }
  .market-state { order: -1; }
  .live-position { flex-wrap: wrap; max-width: 190px; }
  .live-position em { flex-basis: 100%; }
  .chart-shell { min-height: 238px; }
  .grid-chart { height: 238px; min-height: 0; }
  .terminal-metrics { grid-template-columns: 1fr 1fr; }
  .terminal-metrics > div:nth-child(2) { border-right: 0; }
  .terminal-metrics > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .terminal-metrics > div { padding: 8px 10px 9px; }
  .terminal-metrics strong { font-size: 16px; }
  .terminal-note { padding: 5px 10px; font-size: 8px; }
  .performance-duel { width: auto; margin: -1px 10px 34px; }
  .performance-duel > header { padding: 9px 12px 8px; }
  .performance-duel > header h2 { font-size: 21px; }
  .comparison-panel { grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr); }
  .comparison-panel article { display: grid; grid-template-columns: 1fr; gap: 3px; padding: 11px 10px 12px; }
  .comparison-panel strong { grid-row: auto; grid-column: auto; font-size: 25px; }
  .comparison-panel small { font-size: 12px; }
  .comparison-panel i { margin-top: 5px; }
  .comparison-vs { top: 50%; width: 34px; height: 34px; font-size: 9px; box-shadow: 0 0 0 4px var(--surface); }
  .section-pad { padding: 76px 18px; }
  .section-heading h2 { font-size: 40px; }
  #regime-title { font-size: clamp(25px, 7.2vw, 30px); }
  #portfolio-title { font-size: clamp(21px, 5.7vw, 25px); }
  .regime-stat { padding-top: 32px; }
  .regime-stat strong { font-size: 104px; }
  .track-label { display: grid; gap: 2px; }
  .regime-pulses { grid-template-columns: repeat(3, 1fr); }
  .factor-machine { grid-template-columns: 1fr; }
  .universe-bank { padding: 28px 0; }
  .factor-processor { padding-inline: 14px; }
  .factor-processor ul { grid-template-columns: 1fr 1fr; }
  .positioning-switch { grid-template-columns: 1fr; gap: 14px; margin-top: 36px; }
  .positioning-switch > div { min-height: 122px; }
  .positioning-switch > i { rotate: 90deg; font-size: 32px; }
  .selection-output { grid-template-columns: 1fr; gap: 0; padding-inline: 0; }
  .selection-column { padding: 28px 0; }
  .selection-column + .selection-column { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .alpha-stage { min-height: 0; }
  .grid-harvest { grid-template-columns: 1fr; gap: 24px; padding: 22px 0 0; }
  .grid-bank header { padding-inline: 4px; }
  .micro-grid-list article { grid-template-columns: 46px minmax(0,1fr); gap: 9px; }
  .grid-harvest { padding-bottom: 38px; }
  .profit-pipeline { height: 132px; margin: 12px 0 0; overflow: hidden; }
  .profit-pipeline svg { width: 180%; margin-left: -40%; }
  .profit-pipeline > span { bottom: 10px; }
  .pipeline-labels { display: none; }
  .alpha-result { padding-inline: 10px; }
  .alpha-result header { align-items: start; }
  .alpha-result header strong { font-size: 19px; }
  .return-chart { min-height: 245px; }
  .alpha-result footer { align-items: start; }
  .alpha-result footer strong { max-width: 10em; }
  .risk-rail { grid-template-columns: 1fr; }
  .risk-rail > div { padding: 26px 0; }
  .risk-rail > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .strategy-compare-table { overflow-x: auto; }
  .compare-row { min-width: 760px; }
  blockquote { margin-left: 0; font-size: 36px; }
  footer { grid-template-columns: 1fr; gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .track-range { transform: scaleX(1); }
  .selection-column li { opacity: 1; transform: none; }
  .alpha-path { stroke-dashoffset: 0; }
}
