*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #ffffff; --tint: #f5f7fa; --surf: #ffffff; --surf2: #f0f2f7;
  --border: rgba(67,98,137,0.11); --bord2: rgba(67,98,137,0.2);
  --acc: #436289; --acc2: #6caac4; --acc3: #cc5536;
  --acc-light: #e8eff6; --acc2-light: #e0f0f5;
  --text: #1e2330; --muted: #5a7a73;
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'DM Sans', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --r: 6px; --max: 1120px;
}
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 15px; line-height: 1.7; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
strong { color: var(--acc); font-weight: 600; }
::selection { background: rgba(67,98,137,0.18); color: var(--text); }
.skip-link { position: absolute; left: 1rem; top: -3rem; z-index: 300; background: var(--acc); color: #08090d; font-family: var(--mono); font-size: 0.68rem; padding: 0.45rem 0.7rem; border-radius: 4px; transition: top 0.2s; }
.skip-link:focus { top: 0.7rem; }
.progress-bar { position: fixed; top: 0; left: 0; height: 3px; width: 0%; background: linear-gradient(90deg, var(--acc), var(--acc2)); z-index: 999; transition: width 0.1s linear; pointer-events: none; }
:focus-visible { outline: 2px solid var(--acc2); outline-offset: 2px; }
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 200; height: 56px; background: rgba(255,255,255,0.92); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border); }
.nav-inner { max-width: var(--max); margin: 0 auto; padding: 0 2rem; height: 100%; display: flex; align-items: center; justify-content: space-between; }
.nav-logo { display: flex; align-items: center; gap: 0.6rem; }
.logo-mark { background: var(--acc); color: #fff; font-family: var(--mono); font-size: 0.7rem; font-weight: 500; padding: 0.18rem 0.42rem; border-radius: 3px; }
.logo-text { font-family: var(--mono); font-size: 0.85rem; color: var(--text); letter-spacing: 0.04em; }
.nav-links { list-style: none; display: flex; gap: 1.8rem; }
.nav-toggle { display: none; align-items: center; justify-content: center; gap: 3px; flex-direction: column; width: 36px; height: 36px; border-radius: 6px; border: 1px solid var(--border); background: var(--surf); cursor: pointer; }
.nav-toggle span { width: 15px; height: 1.5px; background: var(--text); border-radius: 1px; display: block; }
.nav-links a { font-size: 0.75rem; font-weight: 500; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--acc); }
@media (max-width: 700px) {
  .nav-toggle { display: inline-flex; }
  .nav-links { position: absolute; top: 56px; left: 0; right: 0; display: none; flex-direction: column; gap: 0; background: rgba(247,246,242,0.98); border-bottom: 1px solid var(--border); }
  .nav-links.open { display: flex; }
  .nav-links li { border-top: 1px solid var(--border); }
  .nav-links a { display: block; padding: 0.82rem 2rem; font-size: 0.72rem; }
}
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center; overflow: hidden; padding-top: 56px; background: linear-gradient(135deg, #e8eef7 0%, #f0f4f0 35%, #f7f5ef 65%, #edf2f7 100%); }
#grid-canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.7; }
.hero-content { position: relative; z-index: 1; max-width: 800px; padding: 5rem 2rem; text-align: center; }
.hero-badge { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--acc); border: 1px solid rgba(67,98,137,0.28); border-radius: 100px; display: inline-block; padding: 0.28rem 1rem; margin-bottom: 2rem; animation: fu 0.8s ease both; background: rgba(255,255,255,0.6); backdrop-filter: blur(8px); }
.hero-title { font-family: var(--serif); font-size: clamp(3.2rem,7.5vw,5.8rem); line-height: 1.02; letter-spacing: -0.02em; color: #1a2030; margin-bottom: 0.7rem; animation: fu 0.8s 0.1s ease both; }
.hero-title em { color: var(--acc); font-style: italic; }
.hero-sub { font-family: var(--mono); font-size: 0.84rem; color: var(--muted); letter-spacing: 0.04em; margin-bottom: 1.4rem; animation: fu 0.8s 0.15s ease both; }
.hero-desc { font-size: 0.97rem; color: var(--muted); max-width: 560px; margin: 0 auto 2.5rem; animation: fu 0.8s 0.2s ease both; line-height: 1.75; }
.hero-meta { display: inline-flex; align-items: center; background: rgba(255,255,255,0.85); backdrop-filter: blur(12px); border: 1px solid rgba(67,98,137,0.15); border-radius: 100px; overflow: hidden; margin-bottom: 2.5rem; animation: fu 0.8s 0.3s ease both; box-shadow: 0 4px 24px rgba(67,98,137,0.10); }
.hm { display: flex; flex-direction: column; align-items: center; padding: 0.75rem 1.8rem; }
.hm-v { font-family: var(--mono); font-size: 1.25rem; font-weight: 600; color: var(--acc); line-height: 1; }
.hm-k { font-size: 0.6rem; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; margin-top: 3px; }
.hm-sep { width: 1px; height: 36px; background: var(--border); }
.hero-cta { display: flex; gap: 0.8rem; justify-content: center; animation: fu 0.8s 0.4s ease both; }
.hero-dna { margin-top: 2.5rem; max-width: 600px; margin-left: auto; margin-right: auto; animation: fu 0.8s 0.55s ease both; }
.hero-dna-label { font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.5rem; text-align: left; }
.hero-dna-bar { height: 20px; border-radius: 4px; overflow: hidden; display: flex; background: rgba(67,98,137,0.08); box-shadow: 0 2px 8px rgba(67,98,137,0.10); }
.hero-dna-seg { height: 100%; transition: width 0.8s cubic-bezier(0.16,1,0.3,1); flex-shrink: 0; }
.hero-dna-axis { display: flex; justify-content: space-between; padding-top: 0.3rem; }
.hero-dna-axis span { font-family: var(--mono); font-size: 0.58rem; color: var(--muted); opacity: 0.7; }
.btn-primary { background: var(--acc); color: #fff; font-weight: 600; font-size: 0.85rem; padding: 0.65rem 1.7rem; border-radius: 100px; border: none; cursor: pointer; transition: opacity 0.2s, transform 0.15s; display: inline-block; }
.btn-primary:hover { opacity: 0.85; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text); font-size: 0.85rem; font-weight: 500; padding: 0.65rem 1.7rem; border-radius: 100px; border: 1px solid var(--bord2); cursor: pointer; transition: border-color 0.2s, transform 0.15s; display: inline-block; }
.btn-ghost:hover { border-color: var(--acc); transform: translateY(-1px); }
.btn-full { width: 100%; text-align: center; border-radius: var(--r); }
@keyframes fu { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.section { padding: 6rem 0; scroll-margin-top: 56px; }
.section-tinted { background: var(--tint); }
.container { max-width: var(--max); margin: 0 auto; padding: 0 2rem; }
.sec-label { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--acc); margin-bottom: 0.8rem; display: flex; align-items: center; gap: 0.6rem; }
.sec-label::before { content: ''; display: inline-block; width: 16px; height: 1.5px; background: currentColor; opacity: 0.45; flex-shrink: 0; }
.in-kicker { font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--acc2); margin-bottom: 0.5rem; }
/* Don't show the line decorator inside cards */
.finding-card .sec-label::before,
.p2-card .sec-label::before,
.ms .sec-label::before,
.error-hdr .sec-label::before { display: none; }
.sec-title { font-family: var(--serif); font-size: clamp(2rem,3.8vw,3rem); line-height: 1.08; color: #1a2030; margin-bottom: 1rem; }
.sec-sub { font-size: 0.93rem; color: var(--muted); max-width: 600px; margin-bottom: 3rem; line-height: 1.75; }
.subsec-title { font-family: var(--serif); font-size: 1.35rem; color: #1a2030; }
.two-col { display: grid; grid-template-columns: 260px 1fr; gap: 4rem; align-items: start; }
@media (max-width: 780px) { .two-col { grid-template-columns: 1fr; gap: 2rem; } }
.abs-text { font-size: 0.92rem; color: var(--muted); margin-bottom: 1rem; line-height: 1.78; }
.abs-text strong { color: var(--acc); }
.abs-stat-row { display: grid; grid-template-columns: repeat(5,1fr); gap: 0.8rem; margin-bottom: 3rem; }
@media(max-width:780px){.abs-stat-row{grid-template-columns:repeat(3,1fr);}}
@media(max-width:480px){.abs-stat-row{grid-template-columns:repeat(2,1fr);}}
.abs-stat { background: var(--surf); border: 1px solid var(--border); border-radius: var(--r); padding: 1.2rem 1rem; text-align: center; box-shadow: 0 1px 8px rgba(67,98,137,0.06); transition: transform 0.2s; }
.abs-stat:hover { transform: translateY(-2px); }
.abs-stat-v { font-family: var(--mono); font-size: 1.3rem; font-weight: 600; color: var(--acc); display: block; line-height: 1.1; margin-bottom: 0.35rem; letter-spacing: -0.02em; }
.abs-stat-k { font-size: 0.65rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; display: block; }
.abs-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1.4rem; }
.tag { font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--acc); background: var(--acc-light); border: 1px solid rgba(67,98,137,0.2); padding: 0.22rem 0.65rem; border-radius: 100px; }
.findings-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(290px,1fr)); gap: 1.2rem; }
.finding-card { background: var(--surf); border: 1px solid var(--border); border-left: 3px solid var(--fc-accent, var(--acc)); border-radius: var(--r); padding: 1.8rem 1.6rem 1.4rem; position: relative; overflow: hidden; transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s; box-shadow: 0 1px 6px rgba(67,98,137,0.06); }
.finding-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg,var(--fc-accent,var(--acc)),transparent 70%); }
.finding-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(67,98,137,0.12); border-color: var(--fc-accent,var(--acc)); }
.fc-icon { font-size: 1.5rem; margin-bottom: 0.6rem; display: block; line-height: 1; }
.fc-num { font-family: var(--mono); font-size: 0.6rem; font-weight: 600; letter-spacing: 0.1em; color: var(--fc-accent,var(--acc)); text-transform: uppercase; margin-bottom: 0.4rem; }
.finding-card h3 { font-family: var(--serif); font-size: 1.05rem; color: #1a2030; margin-bottom: 0.6rem; line-height: 1.25; }
.finding-card p { font-size: 0.85rem; color: var(--muted); line-height: 1.65; margin-bottom: 0.9rem; }
.fc-tag { font-family: var(--mono); font-size: 0.6rem; color: var(--fc-accent,var(--acc)); text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.75; }
.findings-grid .reveal:nth-child(1){transition-delay:0s}
.findings-grid .reveal:nth-child(2){transition-delay:0.08s}
.findings-grid .reveal:nth-child(3){transition-delay:0.16s}
.findings-grid .reveal:nth-child(4){transition-delay:0.24s}
.findings-grid .reveal:nth-child(5){transition-delay:0.32s}
.findings-grid .reveal:nth-child(6){transition-delay:0.40s}
.fc-num { font-family: var(--mono); font-size: 0.6rem; font-weight: 700; color: var(--fc-accent,var(--acc)); letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 0.4rem; display: block; }
.finding-card h3 { font-family: var(--serif); font-size: 1.08rem; color: #1a2030; margin-bottom: 0.55rem; line-height: 1.25; }
.finding-card p { font-size: 0.855rem; color: var(--muted); line-height: 1.65; }
.fc-tag { margin-top: 1.1rem; font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--acc2); background: var(--acc2-light); padding: 0.2rem 0.55rem; border-radius: 100px; display: inline-block; border: 1px solid rgba(108,170,196,0.2); }
.channel-layout { display: grid; grid-template-columns: 1fr 1.5fr; gap: 3rem; margin-bottom: 3rem; align-items: start; }
@media (max-width: 820px) { .channel-layout { grid-template-columns: 1fr; } }
.channel-bars { display: flex; flex-direction: column; gap: 1.5rem; }
.ch-row { display: flex; flex-direction: column; gap: 0.4rem; }
.ch-meta { display: flex; justify-content: space-between; align-items: baseline; }
.ch-name { font-size: 0.9rem; font-weight: 600; color: var(--text); }
.ch-pct { font-family: var(--mono); font-size: 0.88rem; color: var(--acc); font-weight: 600; }
.ch-sub { font-family: var(--mono); font-size: 0.62rem; color: var(--muted); }
.ch-track { height: 10px; background: var(--surf2); border-radius: 100px; overflow: hidden; }
.ch-fill { height: 100%; border-radius: 100px; width: 0; transition: width 1.2s cubic-bezier(0.16,1,0.3,1); }
.channel-table-wrap { overflow: hidden; border: 1px solid var(--border); border-radius: var(--r); box-shadow: 0 2px 12px rgba(67,98,137,0.06); }
.tbl-caption { font-family: var(--mono); font-size: 0.68rem; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; padding: 0.7rem 0.85rem; background: var(--surf2); border-bottom: 1px solid var(--border); }
.tbl-scroll { overflow-x: auto; }
.rtable { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.rtable th { text-align: left; padding: 0.6rem 0.85rem; background: var(--surf2); color: var(--muted); font-family: var(--mono); font-size: 0.65rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; border-bottom: 2px solid var(--border); }
.rtable td { padding: 0.52rem 0.85rem; border-bottom: 1px solid var(--border); font-family: var(--mono); font-size: 0.78rem; color: var(--text); transition: background 0.15s; }
.rtable tr:hover td { background: var(--acc-light); }
.rtable tr:last-child td { border-bottom: none; }
.rtable td:first-child { font-family: var(--sans); color: var(--text); font-size: 0.8rem; font-weight: 500; }
.rtable td.best { color: var(--acc); font-weight: 700; position: relative; }
.rtable td.best::after { content: '▲'; font-size: 0.5rem; vertical-align: super; margin-left: 2px; opacity: 0.6; }
.tr-base td { color: var(--muted) !important; font-style: italic; }
.tr-best td { background: var(--acc-light); }
.tr-best td:first-child { font-weight: 600; color: var(--acc) !important; }
.tr-base td { opacity: 0.4; }
.tr-best { background: rgba(67,98,137,0.05); }
.tr-best td { color: var(--acc) !important; }
.error-block { margin-top: 4rem; padding-top: 3rem; border-top: 1px solid var(--border); }
.error-hdr { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; margin-bottom: 1.8rem; }
@media (max-width: 700px) { .error-hdr { grid-template-columns: 1fr; } }
.error-note { font-size: 0.875rem; color: var(--muted); line-height: 1.75; }
.error-note strong { color: var(--acc3); }
.hourly-wrap { background: var(--surf); border: 1px solid var(--border); border-radius: var(--r); padding: 1.4rem 1.4rem 0.8rem; box-shadow: 0 1px 6px rgba(67,98,137,0.05); }
.hourly-chart { display: flex; align-items: flex-end; gap: 2px; height: 110px; }
.h-bar { flex: 1; border-radius: 2px 2px 0 0; transition: opacity 0.2s; cursor: default; min-width: 0; }
.h-bar:hover { opacity: 0.7; }
.hourly-axis { display: flex; justify-content: space-between; padding: 0.4rem 0 0; font-family: var(--mono); font-size: 0.58rem; color: var(--muted); }
.gtabs { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 2rem; }
.gtab { background: var(--surf); border: 1px solid var(--border); color: var(--muted); font-size: 0.78rem; font-weight: 500; padding: 0.42rem 1.1rem; border-radius: 100px; cursor: pointer; transition: all 0.2s; font-family: var(--sans); }
.gtab:hover { border-color: var(--acc); color: var(--text); }
.gtab.active { background: var(--acc); color: #fff; border-color: var(--acc); font-weight: 600; }
.groups-body { display: grid; grid-template-columns: 1fr 300px; gap: 2.5rem; align-items: start; }
@media (max-width: 860px) { .groups-body { grid-template-columns: 1fr; } }
#groups-chart { background: var(--surf); border: 1px solid var(--border); border-radius: var(--r); padding: 1.8rem; min-height: 180px; box-shadow: 0 2px 12px rgba(67,98,137,0.07); }
.gc-row { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.gc-lbl { width: 140px; font-size: 0.8rem; color: var(--text); flex-shrink: 0; font-weight: 500; }
.gc-bars { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.gc-track { height: 34px; background: var(--surf2); border-radius: 5px; overflow: hidden; }
.gc-fill { height: 100%; border-radius: 5px; display: flex; align-items: center; padding-left: 0.6rem; width: 0; transition: width 0.9s cubic-bezier(0.16,1,0.3,1); }
.gc-fill span { font-family: var(--mono); font-size: 0.72rem; font-weight: 600; color: #fff; white-space: nowrap; text-shadow: 0 1px 2px rgba(0,0,0,0.15); }
.groups-note { background: var(--surf); border: 1px solid rgba(67,98,137,0.2); border-left: 3px solid var(--acc); border-radius: var(--r); padding: 1.4rem 1.5rem; font-size: 0.875rem; color: var(--muted); line-height: 1.78; transition: opacity 0.25s ease; box-shadow: 0 2px 12px rgba(67,98,137,0.06); }
.groups-note.fading { opacity: 0; }
.groups-note strong { color: var(--acc); }
.demo-wrap { display: grid; grid-template-columns: 270px 1fr; gap: 1.4rem; align-items: start; }
@media (max-width: 820px) { .demo-wrap { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .container { padding: 0 1rem; }
  .hero-content { padding: 4rem 1rem; }
  .hero-meta { display: grid; grid-template-columns: repeat(3,1fr); border-radius: var(--r); overflow: hidden; }
  .hm-sep { display: none; }
  .hm { padding: 0.6rem 0.8rem; }
  .hm-v { font-size: 1rem; }
  .hero-dna { max-width: 100%; }
  .abs-stat-row { grid-template-columns: repeat(2,1fr) !important; }
  .groups-note { padding: 1rem; }
  .demo-panel, .demo-out, #groups-chart, .hourly-wrap { border-radius: 4px; }
  #swarm-canvas { height: 320px; }
  .two-col { grid-template-columns: 1fr !important; }
  .inertia-bignums { grid-template-columns: repeat(2,1fr); }
  .hero-cta { flex-direction: column; align-items: center; }
  .btn-primary, .btn-ghost { width: 100%; max-width: 280px; text-align: center; }
}
.demo-panel { background: var(--surf); border: 1px solid var(--border); border-radius: var(--r); padding: 1.5rem; display: flex; flex-direction: column; gap: 1.2rem; }
.dp-group { display: flex; flex-direction: column; gap: 0.45rem; }
.dp-label { font-family: var(--mono); font-size: 0.63rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.dp-opts { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.dp-opt { background: var(--surf2); border: 1px solid var(--border); color: var(--muted); font-size: 0.76rem; font-weight: 500; padding: 0.3rem 0.8rem; border-radius: 100px; cursor: pointer; transition: all 0.14s; }
.dp-opt:hover { border-color: var(--acc); color: var(--text); }
.dp-opt.active { background: var(--acc); color: #fff; border-color: var(--acc); font-weight: 600; }
.dp-acc { font-family: var(--mono); font-size: 0.75rem; color: var(--acc2); text-align: center; min-height: 1.2em; }
.demo-out { background: var(--surf); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.demo-out-hdr { padding: 0.9rem 1.3rem; border-bottom: 1px solid var(--border); font-family: var(--mono); font-size: 0.72rem; color: var(--muted); }
#tl-wrap { padding: 1.3rem; min-height: 160px; }
.tl-empty { display: flex; align-items: center; justify-content: center; height: 120px; color: var(--muted); font-size: 0.88rem; }
.tl-hours { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 0.58rem; color: var(--muted); margin-bottom: 0.6rem; padding: 0 2px; }
.tl-track { display: flex; height: 40px; border-radius: 3px; overflow: hidden; margin-bottom: 0.4rem; }
.tl-seg { height: 100%; transition: opacity 0.15s; cursor: default; position: relative; }
.tl-seg:hover { opacity: 0.75; }
.tl-seg::after { content: attr(title); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: #1a2030; color: #f7f6f2; font-family: var(--mono); font-size: 0.6rem; padding: 0.28rem 0.55rem; border-radius: 4px; border: 1px solid rgba(67,98,137,0.2); white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity 0.15s; z-index: 10; }
.tl-seg:hover::after { opacity: 1; }
#tl-legend { padding: 0 1.3rem 1.3rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tl-li { display: flex; align-items: center; gap: 0.35rem; font-size: 0.7rem; color: var(--muted); }
.tl-dot { width: 9px; height: 9px; border-radius: 2px; flex-shrink: 0; }
.methods-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(270px,1fr)); gap: 1.2rem; }
.methods-grid .reveal:nth-child(1){transition-delay:0s}
.methods-grid .reveal:nth-child(2){transition-delay:0.06s}
.methods-grid .reveal:nth-child(3){transition-delay:0.12s}
.methods-grid .reveal:nth-child(4){transition-delay:0.18s}
.methods-grid .reveal:nth-child(5){transition-delay:0.24s}
.methods-grid .reveal:nth-child(6){transition-delay:0.30s}
.ms { background: var(--surf); border: 1px solid var(--border); border-radius: var(--r); padding: 1.8rem 1.6rem 1.5rem; transition: border-color 0.2s, transform 0.18s, box-shadow 0.2s; position: relative; overflow: hidden; }
.ms::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--acc), var(--acc2)); opacity: 0.5; transition: opacity 0.2s; }
.ms:hover { border-color: rgba(67,98,137,0.3); transform: translateY(-3px); box-shadow: 0 8px 24px rgba(67,98,137,0.10); }
.ms:hover::before { opacity: 1; }
.ms-n { font-family: var(--mono); font-size: 1.4rem; font-weight: 600; color: rgba(67,98,137,0.15); letter-spacing: -0.02em; margin-bottom: 0.6rem; display: block; line-height: 1; }
.ms h3 { font-family: var(--serif); font-size: 1.08rem; color: #1a2030; margin-bottom: 0.5rem; }
.ms p { font-size: 0.845rem; color: var(--muted); line-height: 1.68; }
/* ===== INERTIA + PHASE2 ===== */
.inertia-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(290px,1fr)); gap: 1rem; margin-bottom: 2rem; }
.in-card { background: var(--surf); border: 1px solid var(--border); border-radius: var(--r); padding: 1.4rem; }
.in-kicker { font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--acc2); margin-bottom: 0.5rem; }
.in-card h3 { font-family: var(--serif); font-size: 1.05rem; margin-bottom: 0.8rem; color: #1a2030; }
.in-metrics { display: flex; align-items: center; gap: 0.85rem; margin-bottom: 0.7rem; }
.in-m { display: flex; flex-direction: column; gap: 0.1rem; }
.in-v { font-family: var(--mono); font-size: 1.25rem; color: var(--acc); line-height: 1; }
.in-v-hot { color: var(--acc3); }
.in-l { font-size: 0.64rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-family: var(--mono); }
.in-vs { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }
.in-desc { font-size: 0.84rem; color: var(--muted); line-height: 1.7; }
.in-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.8rem; }
.in-bars { display: flex; flex-direction: column; gap: 0.9rem; }
.ib-row { background: var(--surf); border: 1px solid var(--border); border-radius: var(--r); padding: 0.95rem 1rem; display: grid; grid-template-columns: 220px 1fr 86px; gap: 1rem; align-items: center; }
.ib-head { display: flex; flex-direction: column; }
.ib-title { font-size: 0.79rem; color: var(--text); }
.ib-ds { font-family: var(--mono); font-size: 0.6rem; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }
.ib-tracks { display: flex; flex-direction: column; gap: 0.42rem; }
.ib-line { display: grid; grid-template-columns: 82px 1fr; gap: 0.5rem; align-items: center; }
.ib-lbl { font-family: var(--mono); font-size: 0.62rem; color: var(--muted); text-transform: uppercase; }
.ib-track { height: 18px; background: var(--surf2); border-radius: 3px; overflow: hidden; }
.ib-fill { width: 0; height: 100%; border-radius: 3px; display: flex; align-items: center; justify-content: flex-end; padding-right: 0.35rem; transition: width 0.9s cubic-bezier(0.16,1,0.3,1); }
.ib-fill span { font-family: var(--mono); font-size: 0.62rem; color: #08090d; font-weight: 600; }
.ib-fill.model { background: linear-gradient(90deg,#6caac4,#436289); }
.ib-fill.base { background: linear-gradient(90deg,#cc5536,#e4a3a1); }
.ib-delta { font-family: var(--mono); font-size: 0.69rem; text-align: right; }
.ib-delta.good { color: #436289; }
.ib-delta.bad { color: #cc5536; }
@media (max-width: 920px){ .ib-row { grid-template-columns: 1fr; gap: 0.7rem; } .ib-delta { text-align: left; } }

.p2-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(300px,1fr)); gap: 1rem; }
.p2-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.6rem; }
.p2-pill { font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.1em; text-transform: uppercase; border-radius: 100px; padding: 0.18rem 0.58rem; border: 1px solid transparent; }
.p2-pill.ok { color: #61847d; background: rgba(97,132,125,0.1); border-color: rgba(97,132,125,0.3); }
.p2-pill.run { color: var(--acc); background: var(--acc-light); border-color: rgba(67,98,137,0.3); animation: pill-pulse 2s ease-in-out infinite; }
.p2-pill.next { color: #fbbf24; background: rgba(251,191,36,0.08); border-color: rgba(251,191,36,0.24); }
@keyframes pill-pulse { 0%,100%{box-shadow:0 0 0 0 rgba(67,98,137,0.0)} 50%{box-shadow:0 0 0 4px rgba(67,98,137,0.15)} }
.p2-code { font-family: var(--mono); font-size: 0.62rem; color: var(--muted); }
.p2-card { background: var(--surf); border: 1px solid var(--border); border-radius: var(--r); padding: 1.4rem; transition: border-color 0.2s, transform 0.18s, box-shadow 0.2s; position: relative; overflow: hidden; }
.p2-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--acc2), var(--acc)); }
.p2-card:hover { border-color: rgba(67,98,137,0.25); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(67,98,137,0.10); }
.p2-card h3 { font-family: var(--serif); font-size: 1.02rem; margin-bottom: 0.45rem; color: #1a2030; }
.p2-card p { font-size: 0.84rem; color: var(--muted); line-height: 1.65; }
.p2-pill.ok { color: #5cffc3; background: rgba(92,255,195,0.08); border-color: rgba(92,255,195,0.24); }
.p2-pill.run { color: #57d9ff; background: rgba(87,217,255,0.09); border-color: rgba(87,217,255,0.24); }
.p2-pill.next { color: #fbbf24; background: rgba(251,191,36,0.08); border-color: rgba(251,191,36,0.24); }
.p2-code { font-family: var(--mono); font-size: 0.62rem; color: var(--muted); }
.p2-card h3 { font-family: var(--serif); font-size: 1.02rem; margin-bottom: 0.45rem; color: #1a2030; }
.p2-card p { font-size: 0.84rem; color: var(--muted); line-height: 1.65; }

.refs-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(320px,1fr)); gap: 1rem; }
.ref-card { background: var(--surf); border: 1px solid var(--border); border-radius: var(--r); padding: 1.3rem; }
.boot-ci-wrap { margin-top: 1rem; }
.ci-row { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.ci-lbl { width: 100px; font-size: 0.8rem; font-weight: 500; color: var(--text); flex-shrink: 0; }
.ci-track { flex: 1; height: 28px; background: var(--surf2); border-radius: 4px; position: relative; overflow: hidden; }
.ci-range { position: absolute; top: 4px; bottom: 4px; border-radius: 3px; left: 0; width: 0; }
.ci-mean { position: absolute; top: 6px; bottom: 6px; width: 3px; border-radius: 2px; left: 0; }
.ci-vals { width: 140px; font-family: var(--mono); font-size: 0.72rem; flex-shrink: 0; }
.ci-ci { color: var(--muted); font-size: 0.65rem; }
.ref-card { background: var(--surf); border: 1px solid var(--border); border-radius: var(--r); padding: 1.6rem; position: relative; overflow: hidden; transition: transform 0.2s, box-shadow 0.2s; box-shadow: 0 1px 6px rgba(67,98,137,0.05); }
.ref-card::before { content: ''; position: absolute; top: 0; left: 0; bottom: 0; width: 3px; background: linear-gradient(180deg, var(--acc2), var(--acc)); opacity: 0.5; transition: opacity 0.2s; }
.ref-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(67,98,137,0.10); }
.ref-card:hover::before { opacity: 1; }
.ref-card p { font-size: 0.855rem; color: var(--muted); line-height: 1.72; }
.ref-card p strong { color: var(--text); font-weight: 600; }
.ref-n { font-family: var(--mono); font-size: 0.6rem; font-weight: 600; color: var(--acc2); letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 0.65rem; display: inline-block; background: var(--acc2-light); padding: 0.15rem 0.5rem; border-radius: 3px; }
.ref-card p { font-size: 0.84rem; color: var(--muted); line-height: 1.72; }
.ref-card p strong { color: var(--acc); }

/* ===== SWARM SIMULATION ===== */
.swarm-section { margin-top: 3rem; border-top: 1px solid var(--border); padding-top: 2.5rem; }
.swarm-hdr { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 0.9rem; margin-bottom: 1.2rem; }
.swarm-title { font-family: var(--serif); font-size: 1.12rem; color: #2a3e67; margin-top: 0.25rem; letter-spacing: 0; }
.swarm-controls { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.swarm-time { font-family: var(--mono); font-size: 1.2rem; font-weight: 600; color: #3e5684; min-width: 4rem; background: #f8fafe; padding: 0.16rem 0.5rem; border-radius: 5px; border: 1px solid #dde4f0; box-shadow: none; }
.swarm-phase { font-size: 0.68rem; color: #687ca1; font-family: var(--mono); background: #f9fbff; padding: 0.15rem 0.45rem; border-radius: 100px; border: 1px solid #e1e7f2; }
.swarm-btn { background: #5f78a8; border: 1px solid #566e9d; color: #f5f8ff; font-size: 0.69rem; font-weight: 600; padding: 0.32rem 0.72rem; border-radius: 5px; cursor: pointer; transition: opacity 0.16s; font-family: var(--sans); box-shadow: none; }
.swarm-btn:hover { opacity: 0.92; transform: none; filter: none; }
.swarm-btn-ghost { background: #fbfcff; color: #7086aa; border: 1px solid #e2e8f3; box-shadow: none; }
.swarm-btn-ghost:hover { border-color: #c8d4e9; color: #2f4f85; background: #f7f9fd; opacity: 1; }
.swarm-speed { display: flex; align-items: center; gap: 0.3rem; margin-left: 0.2rem; }
.swarm-spd-lbl { font-family: var(--mono); font-size: 0.54rem; color: #95a4bf; text-transform: uppercase; letter-spacing: 0.1em; }
.swarm-spd { background: #fbfcff; border: 1px solid #e4eaf4; color: #9babc1; font-size: 0.62rem; padding: 0.16rem 0.44rem; border-radius: 100px; cursor: pointer; font-family: var(--mono); transition: all 0.15s; }
.swarm-spd:hover { border-color: #d1dbec; color: #7086aa; }
.swarm-spd.active { background: #6e86b2; color: #f5f8ff; border-color: #667eaa; font-weight: 600; box-shadow: none; }
.swarm-body { background: #ffffff; border: 1px solid #d5dbe6; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 8px rgba(25,40,68,0.06); }
.swarm-desc { font-size: 0.8rem; color: #63779b; padding: 0.7rem 0.95rem 0.48rem; line-height: 1.56; border-bottom: 1px solid #e5eaf2; background: #ffffff; }
.swarm-progress-bar { position: relative; height: 6px; background: #e7edf6; margin: 0; }
.swarm-progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #6f97e5, #8aa8e8 52%, #a8bbea 100%); transition: width 0.16s linear; box-shadow: none; }
.swarm-progress-labels { display: flex; justify-content: space-between; padding: 0.22rem 0.75rem; background: #fbfcff; border-bottom: 1px solid #e5ebf4; }
.swarm-progress-labels span { font-family: var(--mono); font-size: 0.54rem; color: #8c9ab3; }
#swarm-canvas { display: block; width: 100%; height: 560px; cursor: default; background: #f7f9fc; border-radius: 0; }
.swarm-legend { display: flex; flex-wrap: wrap; gap: 0.45rem 0.8rem; padding: 0.72rem 1rem; border-top: 1px solid #e4eaf4; background: #fbfcff; backdrop-filter: none; }
.swarm-li,.swarm-legend-item { display: flex; align-items: center; gap: 0.32rem; font-size: 0.64rem; color: #7a8dae; font-family: var(--mono); }
.swarm-dot,.swarm-legend-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }

@keyframes swarmPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(126,158,243,0.0), 0 0 14px rgba(126,158,243,0.14); }
  50% { box-shadow: 0 0 0 6px rgba(126,158,243,0.08), 0 0 20px rgba(126,158,243,0.22); }
}

#swarm-canvas {
  animation: none;
}

.footer { border-top: 1px solid var(--border); padding: 3rem 0 2rem; background: var(--tint); }
.footer-inner { max-width: var(--max); margin: 0 auto; padding: 0 2rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1.5rem; }
.footer-logo { font-family: var(--mono); font-size: 0.9rem; font-weight: 500; display: flex; align-items: center; gap: 0.5rem; }
.footer-info { font-size: 0.68rem; color: var(--muted); font-family: var(--mono); line-height: 1.8; }
.footer-accent { display: inline-block; font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--acc); border: 1px solid rgba(67,98,137,0.2); border-radius: 100px; padding: 0.2rem 0.7rem; margin-top: 0.5rem; }

/* ===== DEMO 2 ===== */
.demo2-wrap { display: grid; grid-template-columns: 300px 1fr; gap: 2rem; align-items: start; }
@media(max-width:780px){.demo2-wrap{grid-template-columns:1fr;}}
.demo2-panel { background: var(--surf); border: 1px solid var(--border); border-radius: var(--r); padding: 1.6rem; box-shadow: 0 2px 16px rgba(67,98,137,0.07); position: sticky; top: 72px; }
.dp2-section { margin-bottom: 1.4rem; }
.dp2-label { font-family: var(--mono); font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); display: block; margin-bottom: 0.55rem; }
.dp2-opts { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.dp2-opt { background: var(--surf2); border: 1.5px solid var(--border); border-radius: 6px; padding: 0.45rem 0.75rem; cursor: pointer; transition: all 0.15s; display: flex; flex-direction: column; gap: 1px; text-align: left; }
.dp2-opt:hover { border-color: var(--acc); }
.dp2-opt.active { background: var(--acc); border-color: var(--acc); }
.dp2-opt-name { font-size: 0.78rem; font-weight: 500; color: var(--text); line-height: 1; }
.dp2-opt.active .dp2-opt-name { color: #fff; }
.dp2-opt-sub { font-family: var(--mono); font-size: 0.58rem; color: var(--muted); }
.dp2-opt.active .dp2-opt-sub { color: rgba(255,255,255,0.7); }
.demo2-run { width: 100%; margin-top: 0.5rem; background: var(--acc); color: #fff; font-weight: 600; font-size: 0.85rem; padding: 0.75rem 1rem; border-radius: var(--r); border: none; cursor: pointer; transition: opacity 0.2s, transform 0.15s; letter-spacing: 0.04em; }
.demo2-run:hover { opacity: 0.85; transform: translateY(-1px); }
.demo2-run:active { transform: scale(0.98); }
.demo2-run.running { animation: run-pulse 0.8s ease-in-out infinite; }
@keyframes run-pulse { 0%,100%{opacity:1} 50%{opacity:0.6} }

.demo2-out { display: flex; flex-direction: column; gap: 1.2rem; }
.demo2-clock { display: flex; align-items: center; gap: 1rem; background: var(--surf); border: 1px solid var(--border); border-radius: var(--r); padding: 1rem 1.4rem; box-shadow: 0 1px 6px rgba(67,98,137,0.05); }
.demo2-time { font-family: var(--mono); font-size: 2rem; font-weight: 500; color: var(--acc); line-height: 1; min-width: 4.5rem; }
.demo2-act { font-size: 0.9rem; color: var(--muted); font-style: italic; }
.demo2-tl-wrap { background: var(--surf); border: 1px solid var(--border); border-radius: var(--r); padding: 1.2rem; box-shadow: 0 1px 6px rgba(67,98,137,0.05); }
.demo2-tl { height: 52px; border-radius: 4px; overflow: hidden; background: var(--surf2); display: flex; position: relative; }
.demo2-tl-seg { height: 100%; transition: width 0.12s ease; flex-shrink: 0; }
.demo2-tl-cursor { position: absolute; top: 0; bottom: 0; width: 2px; background: #1a2030; opacity: 0.7; transition: left 0.12s ease; pointer-events: none; }
.demo2-tl-axis { display: flex; justify-content: space-between; padding-top: 0.4rem; }
.demo2-tl-axis span { font-family: var(--mono); font-size: 0.6rem; color: var(--muted); }
.demo2-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 0.75rem; }
.demo2-stat { background: var(--surf); border: 1px solid var(--border); border-radius: var(--r); padding: 1rem; text-align: center; }
.demo2-stat-v { font-family: var(--mono); font-size: 1.4rem; font-weight: 500; color: var(--acc); display: block; line-height: 1.1; }
.demo2-stat-k { font-size: 0.65rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; display: block; margin-top: 0.3rem; }
.demo2-breakdown { margin: 0.5rem 0; height: 12px; border-radius: 6px; overflow: hidden; display: flex; background: var(--surf2); }
.demo2-breakdown-seg { height: 100%; transition: width 0.7s cubic-bezier(0.16,1,0.3,1); flex-shrink: 0; }
.demo2-legend { display: flex; flex-wrap: wrap; gap: 0.4rem 0.9rem; padding: 0.6rem 0; }
.demo2-li { display: flex; align-items: center; gap: 0.35rem; font-size: 0.7rem; color: var(--muted); font-family: var(--mono); }
.demo2-dot { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }

/* ===== INERTIA BIG NUMBERS ===== */
.inertia-bignums { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; margin-bottom: 2.5rem; }
@media(max-width:700px){.inertia-bignums{grid-template-columns:repeat(2,1fr);}}
.ibn-card { background: var(--surf); border: 1px solid var(--border); border-radius: var(--r); padding: 1.8rem 1.4rem 1.4rem; text-align: center; box-shadow: 0 2px 16px rgba(67,98,137,0.07); transition: transform 0.2s, box-shadow 0.2s; position: relative; overflow: hidden; }
.ibn-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--acc), var(--acc2)); }
.ibn-card--good::before { background: linear-gradient(90deg, #60a898, #aad498); }
.ibn-card--bad::before { background: linear-gradient(90deg, var(--acc3), #e4a3a1); }
.ibn-card:hover { transform: translateY(-4px); box-shadow: 0 8px 28px rgba(67,98,137,0.12); }
.ibn-card--good .ibn-v { color: #61847d; }
.ibn-card--bad .ibn-v { color: var(--acc3); }
.ibn-v { font-family: var(--mono); font-size: 1.8rem; font-weight: 600; color: var(--acc); display: block; line-height: 1.1; margin-bottom: 0.5rem; letter-spacing: -0.02em; }
.ibn-l { font-size: 0.8rem; color: var(--text); font-weight: 600; display: block; margin-bottom: 0.25rem; }
.ibn-sub { font-family: var(--mono); font-size: 0.62rem; color: var(--muted); display: block; }

/* ===== UK VS US COMPARISON ===== */
.ukus-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-bottom: 2.5rem; }
@media(max-width:650px){.ukus-grid{grid-template-columns:1fr;}}
.ukus-chart-wrap { background: var(--surf); border: 1px solid var(--border); border-radius: var(--r); padding: 1.6rem; box-shadow: 0 2px 14px rgba(67,98,137,0.07); }
.ukus-chart-label { font-family: var(--mono); font-size: 0.65rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 1.4rem; display: flex; align-items: center; gap: 0.5rem; }
.ukus-chart-label::before { font-size: 1rem; }
.ukus-bars { display: flex; flex-direction: column; gap: 1rem; }
.ukus-bar-row { display: flex; align-items: center; gap: 0.8rem; }
.ukus-bar-lbl { width: 70px; font-size: 0.78rem; color: var(--text); flex-shrink: 0; font-weight: 500; }
.ukus-bar-track { flex: 1; height: 32px; background: var(--surf2); border-radius: 5px; overflow: hidden; position: relative; }
.ukus-bar-fill { height: 100%; border-radius: 5px; width: 0; transition: width 1s cubic-bezier(0.16,1,0.3,1); display: flex; align-items: center; padding-left: 0.6rem; }
.ukus-bar-fill span { font-family: var(--mono); font-size: 0.7rem; color: #fff; font-weight: 600; white-space: nowrap; text-shadow: 0 1px 2px rgba(0,0,0,0.15); }
.ukus-findings { display: flex; flex-direction: column; gap: 0.65rem; }
.ukus-fi { display: flex; align-items: flex-start; gap: 0.85rem; background: var(--surf); border: 1px solid var(--border); border-radius: var(--r); padding: 1rem 1.2rem; font-size: 0.875rem; color: var(--muted); line-height: 1.65; transition: transform 0.2s, box-shadow 0.2s; }
.ukus-fi:hover { transform: translateX(3px); box-shadow: 0 2px 12px rgba(67,98,137,0.08); }
.ukus-fi em { color: var(--text); font-style: normal; font-weight: 500; }
.ukus-fi-n { font-family: var(--mono); font-size: 0.65rem; color: var(--acc); background: var(--acc-light); padding: 0.15rem 0.45rem; border-radius: 3px; flex-shrink: 0; margin-top: 0.15rem; font-weight: 600; }

/* ===== ENHANCED FINDING CARDS ===== */
.finding-card { cursor: default; }
.finding-card .fc-num { font-family: var(--mono); font-size: 1.6rem; font-weight: 300; color: var(--fc-accent,var(--acc)); opacity: 0.25; position: absolute; top: 1rem; right: 1.2rem; line-height: 1; transition: opacity 0.25s, transform 0.25s; pointer-events: none; }
.finding-card:hover .fc-num { opacity: 0.9; transform: scale(1.15) translateY(-2px); }
.finding-card h3 { font-family: var(--serif); font-size: 1.08rem; color: #1a2030; margin-bottom: 0.55rem; line-height: 1.25; padding-right: 2rem; }

.hmap-controls { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.hmap-btn { background: var(--surf); border: 1px solid var(--border); color: var(--muted); font-size: 0.78rem; font-weight: 500; padding: 0.38rem 1rem; border-radius: 100px; cursor: pointer; transition: all 0.2s; font-family: var(--sans); }
.hmap-btn:hover { border-color: var(--acc); color: var(--text); }
.hmap-btn.active { background: var(--acc); color: #fff; border-color: var(--acc); font-weight: 600; }
.hmap-wrap { display: flex; flex-direction: column; gap: 3px; margin-bottom: 0.5rem; }
.hmap-row { display: flex; align-items: center; gap: 4px; }
.hmap-row-lbl { width: 110px; font-size: 0.72rem; color: var(--text); font-family: var(--mono); flex-shrink: 0; text-align: right; padding-right: 0.5rem; font-weight: 500; }
.hmap-cells { display: flex; gap: 2px; flex: 1; }
.hmap-cell { flex: 1; height: 34px; border-radius: 2px; transition: opacity 0.15s; cursor: default; position: relative; }
.hmap-cell:hover { opacity: 0.75; }
.hmap-axis { display: flex; padding-left: 114px; gap: 2px; margin-bottom: 1rem; }
.hmap-axis span { flex: 1; font-family: var(--mono); font-size: 0.55rem; color: var(--muted); text-align: center; }
.hmap-legend { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; padding-top: 0.5rem; border-top: 1px solid var(--border); }
.hmap-li { display: flex; align-items: center; gap: 0.3rem; font-size: 0.68rem; color: var(--muted); font-family: var(--mono); }
.hmap-dot { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }
@media (max-width: 600px) { .hmap-row-lbl { width: 70px; font-size: 0.6rem; } .hmap-axis { padding-left: 74px; } }
.back-to-top { position: fixed; bottom: 2rem; right: 2rem; z-index: 100; width: 40px; height: 40px; border-radius: 50%; background: var(--acc); border: none; color: #fff; font-size: 1rem; cursor: pointer; opacity: 0; pointer-events: none; transition: opacity 0.25s, transform 0.2s; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 12px rgba(67,98,137,0.25); }
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { transform: translateY(-2px); box-shadow: 0 4px 18px rgba(67,98,137,0.35); }
.footer-inner { max-width: var(--max); margin: 0 auto; padding: 0 2rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.footer-logo { font-family: var(--mono); font-size: 0.85rem; font-weight: 500; display: flex; align-items: center; gap: 0.5rem; }
.footer-info { font-size: 0.72rem; color: var(--muted); font-family: var(--mono); }
.reveal { opacity: 0; transform: translateY(24px) scale(0.99); transition: opacity 0.6s cubic-bezier(0.16,1,0.3,1), transform 0.6s cubic-bezier(0.16,1,0.3,1); }
.reveal.visible { opacity: 1; transform: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111318; --tint: #161a22; --surf: #1a1f2b; --surf2: #222838;
    --border: rgba(108,170,196,0.10); --bord2: rgba(108,170,196,0.18);
    --acc: #6caac4; --acc2: #8accc9; --acc3: #e07a60;
    --acc-light: rgba(108,170,196,0.12); --acc2-light: rgba(138,204,201,0.12);
    --text: #e8edf5; --muted: #8aa0a8;
  }
  .hero { background: linear-gradient(135deg, #0f1520 0%, #141c28 35%, #111a18 65%, #0f1824 100%); }
  .hero-meta, .hero-badge { background: rgba(26,31,43,0.85); }
  .nav { background: rgba(17,19,24,0.94); }
  .finding-card h3, .ms h3, .p2-card h3, .ref-card p strong { color: #d8e2f0; }
  .hero-title { color: #e8edf5; }
  .logo-mark { background: var(--acc); }
  .btn-primary { background: var(--acc); }
  #grid-canvas { opacity: 0.5; }
  .rtable tr:hover td { background: rgba(108,170,196,0.08); }
  .tr-best td { background: rgba(108,170,196,0.10); }
  .swarm-canvas, #swarm-canvas { background: #141c28 !important; }
  .abs-stat { background: var(--surf); }
  .ibn-card::before { opacity: 0.7; }
}

@media print {
  .nav, .back-to-top, .progress-bar, #grid-canvas, #swarm-canvas, .swarm-section,
  .hero-cta, .hero-dna, .demo2-panel, .demo2-run, .hmap-controls, .gtabs { display: none !important; }
  body { font-size: 11pt; color: #000; background: #fff; }
  .hero { min-height: auto; padding: 2rem 0 1rem; background: #fff; }
  .hero-title { font-size: 2rem; color: #000; }
  .hero-meta { box-shadow: none; border: 1px solid #ccc; }
  .section { padding: 2rem 0; page-break-inside: avoid; }
  .finding-card, .ms, .ref-card, .p2-card, .ibn-card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
  .finding-card h3, .ms h3 { color: #000; }
  a[href]::after { content: ' (' attr(href) ')'; font-size: 0.7em; color: #666; }
  .container { max-width: 100%; padding: 0 1cm; }
  .two-col { grid-template-columns: 1fr 2fr; }
}

