/* Homepage only (index.html). Shared header, buttons, contact card and footer come from portal.css. */
.home {
  --night: #0a1530;
  --night-2: #112654;
  --beam: #8fb4ff;
  --focus: #ffc861;
  --on-night: #e9f0ff;
  --on-night-muted: #a9bad8;
}

/* Header floats dark over the hero, turns back to the light header after it. */
.home .site-header { transition: background-color 280ms, border-color 280ms, box-shadow 280ms; }
.home .site-header.over-hero { background: #0a1530d9; border-bottom-color: #ffffff14; box-shadow: none; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.home .site-header.over-hero .brand,
.home .site-header.over-hero .mobile-menu summary { color: var(--on-night); }
.home .site-header.over-hero .brand img { filter: brightness(0) invert(1); }
.home .site-header.over-hero .brand-cn { border-inline-start-color: #ffffff38; }
.home .site-header.over-hero .desktop-nav a { color: var(--on-night-muted); }
.home .site-header.over-hero .desktop-nav a:hover { color: #fff; }
.home .site-header.over-hero .header-bank { color: var(--on-night); background: #ffffff10; border-color: #ffffff33; }
.home .site-header.over-hero .header-bank:hover { background: #ffffff1f; border-color: #ffffff59; }
.home .site-header.over-hero .mobile-menu[open] summary { background: #ffffff1a; color: #fff; }

/* ---------- Hero ---------- */
.lens-hero {
  position: relative; overflow: hidden; isolation: isolate;
  padding-block: clamp(40px, 6vw, 88px) clamp(56px, 7vw, 104px);
  color: var(--on-night);
  background:
    radial-gradient(60% 70% at 78% 50%, #1d3f86 0%, transparent 70%),
    radial-gradient(40% 50% at 10% 0%, #17336b 0%, transparent 70%),
    linear-gradient(180deg, var(--night) 0%, var(--night-2) 100%);
}
.lens-hero::before { /* faint graph-paper grid */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .35;
  background-image: linear-gradient(#ffffff0d 1px, transparent 1px), linear-gradient(90deg, #ffffff0d 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(80% 80% at 60% 50%, #000 30%, transparent 80%); mask-image: radial-gradient(80% 80% at 60% 50%, #000 30%, transparent 80%);
}
.hero-symbols { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-symbols span {
  position: absolute; left: var(--x); top: var(--y);
  color: #b9cdf5; opacity: calc(.10 + var(--z) * .12); white-space: nowrap;
  font: italic 500 calc(13px + var(--z) * 9px) / 1 "Times New Roman", "Songti SC", serif;
  translate: calc(var(--px, 0) * var(--z) * 22px) calc(var(--py, 0) * var(--z) * 16px);
  transition: translate 900ms cubic-bezier(.2, .7, .2, 1);
}
.lens-grid { display: grid; grid-template-columns: minmax(0, 46fr) minmax(0, 54fr); align-items: center; gap: clamp(16px, 3vw, 48px); }
.hero-kicker { display: flex; align-items: center; gap: 8px; color: var(--beam); font-size: 13px; font-weight: 700; letter-spacing: .08em; }
.kicker-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--focus); box-shadow: 0 0 0 4px #ffc86126; }
.lens-copy h1 { margin-block: 18px 16px; font-size: clamp(36px, 4.4vw, 60px); font-weight: 700; line-height: 1.14; letter-spacing: -.045em; color: #fff; text-wrap: balance; }
.lens-copy h1 em {
  font-style: normal;
  background: linear-gradient(90deg, #cfe0ff 0%, #ffd98a 45%, #cfe0ff 90%); background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lens-lede { max-width: 30em; color: var(--on-night-muted); font-size: 17px; }
.lens-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.lens-actions .button { min-height: 50px; padding-inline: 20px; font-size: 15px; }
.button.glow { background: var(--blue); border-color: #ffffff40; box-shadow: 0 6px 24px #2854a366, inset 0 1px 0 #ffffff2e; }
.button.glow:hover { background: var(--blue-hover); border-color: #ffffff66; }
.button.ghost { color: var(--on-night); background: #ffffff0d; border-color: #ffffff33; }
.button.ghost:hover { background: #ffffff1a; border-color: #ffffff59; }

.lens-stage { position: relative; }
.lens-svg { display: block; width: 100%; height: auto; overflow: visible; }
.axis { stroke: #ffffff26; stroke-dasharray: 2 6; }
.axis-dot { fill: #ffffff59; }
.axis-label { fill: #ffffff66; font: italic 600 15px "Times New Roman", serif; }
.beam-base { fill: none; stroke: url(#beamIn); stroke-width: 1.6; opacity: .55; stroke-linejoin: round; }
.beam-flow { fill: none; stroke: #d8e6ff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 3 22; opacity: .65; }
.photon { fill: #fff; filter: drop-shadow(0 0 4px #9fc0ff); }
.beam { transition: opacity 260ms; }
.lens-svg.has-hover .beam { opacity: .28; }
.lens-svg.has-hover .beam.is-hot { opacity: 1; }
.beam.is-hot .beam-base { stroke-width: 3; opacity: 1; }
.beam.is-hot .beam-flow { stroke: #ffe3a3; opacity: 1; }
.lens-body { fill: url(#lensGlass); stroke: #cfe0ff; stroke-opacity: .6; stroke-width: 1.4; }
.lens-shine { fill: none; stroke: #fff; stroke-opacity: .35; stroke-width: 3; stroke-linecap: round; }
.lens { transform-box: fill-box; transform-origin: center; }
.focus-glow { fill: url(#focusGlow); }
.focus-core { fill: #fff6df; }
.focus-ring { fill: none; stroke: var(--focus); stroke-width: 1.5; opacity: 0; transform-box: fill-box; transform-origin: center; }
.focus-label { fill: #ffe3a3; font: 700 22px var(--ui); letter-spacing: .12em; text-anchor: middle; }
.focus { transform-box: fill-box; transform-origin: center; }
.beam-link { cursor: pointer; }
.beam-link rect { fill: #0f2149; stroke: #8fb4ff66; stroke-width: 1.2; transition: fill 200ms, stroke 200ms; }
.beam-link text { fill: var(--on-night); font: 700 17px var(--ui); text-anchor: middle; letter-spacing: .04em; }
.beam-link:hover rect, .beam-link:focus-visible rect, .beam-link.is-hot rect { fill: #1c3a7a; stroke: #ffd98a; }
.beam-link:focus { outline: none; }
.beam-link:focus-visible rect { stroke-width: 2.5; }
.lens-caption { margin-top: 4px; text-align: center; color: #ffffff59; font-size: 12px; letter-spacing: .08em; }
.scroll-cue { position: absolute; left: 50%; bottom: 18px; translate: -50% 0; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; }
.scroll-cue span { width: 18px; height: 28px; border: 1.5px solid #ffffff59; border-radius: 10px; position: relative; }
.scroll-cue span::after { content: ""; position: absolute; left: 50%; top: 6px; width: 3px; height: 6px; margin-left: -1.5px; border-radius: 2px; background: #ffffffa6; }

/* ---------- Entrances ---------- */
.entries { background: var(--canvas); }
.entries-head { margin-bottom: 28px; }
.entries-head h2 { margin-top: 6px; }
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.tile {
  --mx: 50%; --my: 50%; --rx: 0deg; --ry: 0deg;
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; justify-content: space-between; gap: 20px;
  min-height: 300px; padding: clamp(20px, 2.6vw, 30px);
  background: var(--white); border: 1px solid var(--line); border-radius: 22px;
  box-shadow: 0 1px 2px #1f365a0a;
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 400ms cubic-bezier(.2, .8, .2, 1), box-shadow 300ms, border-color 300ms;
}
.tile::before { /* spotlight that follows the pointer */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity 300ms;
  background: radial-gradient(360px circle at var(--mx) var(--my), #dfe9fb 0%, transparent 60%);
}
.tile.is-hot { border-color: var(--blue-line); box-shadow: 0 18px 50px -18px #1f365a40; }
.tile.is-hot::before { opacity: 1; }
.tile-gufen { grid-column: span 4; flex-direction: row; align-items: stretch; background: linear-gradient(135deg, #eef4ff, #fff 60%); border-color: var(--blue-line); }
.tile-kaoqing { grid-column: span 2; }
.tile-tiku { grid-column: span 3; flex-direction: row; align-items: stretch; }
.tile-beikao { grid-column: span 3; flex-direction: row; align-items: stretch; }
.tile-copy { position: relative; display: flex; flex-direction: column; min-width: 0; }
.tile-gufen .tile-copy, .tile-tiku .tile-copy, .tile-beikao .tile-copy { flex: 1 1 56%; }
.tile-tag { color: var(--blue); font-size: 13px; font-weight: 700; letter-spacing: .04em; }
.tile h3 { margin-top: 6px; font-size: clamp(24px, 2.4vw, 30px); font-weight: 700; letter-spacing: -.035em; }
.tile-copy > p:not(.tile-tag) { margin-top: 8px; color: var(--muted); font-size: 15px; }
.tile-links { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 16px; margin-top: auto; padding-top: 18px; }
.text-link.strong { font-size: 15px; }

/* gauge */
.gauge { flex: 0 0 42%; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.gauge svg { width: 100%; max-width: 280px; overflow: visible; }
.gauge-track { fill: none; stroke: #dbe5f5; stroke-width: 12; stroke-linecap: round; }
.gauge-fill { fill: none; stroke: var(--blue); stroke-width: 12; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--g, 0) * 100); }
.gauge-ticks line { stroke: #9fb3d3; stroke-width: 1.2; }
.gauge text { fill: var(--muted); font: 600 11px var(--ui); text-anchor: middle; }
.gauge-needle { transform-origin: 110px 115px; transform: rotate(calc(-90deg + var(--g, 0) * 180deg)); }
.gauge-needle line { stroke: var(--ink); stroke-width: 3.5; stroke-linecap: round; }
.gauge-needle circle { fill: var(--ink); stroke: #fff; stroke-width: 3; }
.gauge-read { margin-top: -2px; font-size: 34px; font-weight: 700; letter-spacing: -.04em; color: var(--ink); }
.gauge-read small { font-size: 15px; color: var(--muted); font-weight: 600; letter-spacing: 0; }

/* mini bars */
.mini-bars { display: grid; grid-template-columns: repeat(6, 1fr); align-items: end; gap: 6px; height: 108px; }
.mini-bars span { position: relative; display: flex; align-items: flex-end; justify-content: center; height: 100%; font-size: 12px; color: var(--muted); }
.mini-bars span::before { content: ""; position: absolute; left: 10%; right: 10%; bottom: 20px; height: calc(var(--h) * 2.6px); border-radius: 6px 6px 3px 3px; background: #b7cbea; transform-origin: bottom; transform: scaleY(var(--grow, 1)); transition: transform 900ms cubic-bezier(.2, .9, .25, 1.15); transition-delay: var(--delay, 0ms); }
.mini-bars span.hot::before { background: var(--blue); }
.mini-bars span:nth-child(2) { --delay: 60ms; } .mini-bars span:nth-child(3) { --delay: 120ms; } .mini-bars span:nth-child(4) { --delay: 180ms; } .mini-bars span:nth-child(5) { --delay: 240ms; } .mini-bars span:nth-child(6) { --delay: 300ms; }
.mini-note { margin-top: -12px; color: var(--muted); font-size: 12px; text-align: center; }

/* paper fan */
.paper-fan { position: relative; flex: 0 0 38%; min-height: 190px; }
.sheet {
  position: absolute; left: 50%; top: 50%; width: 118px; height: 160px; margin: -80px 0 0 -59px;
  display: flex; flex-direction: column; gap: 9px; padding: 18px 14px;
  background: #fff; border: 1px solid #d9e2ef; border-radius: 6px; box-shadow: 0 10px 24px -14px #1f365a59;
  transform: translate(var(--tx, 0), var(--ty, 0)) rotate(var(--rot, 0deg));
  transition: transform 650ms cubic-bezier(.2, .9, .25, 1.2);
}
.sheet i { display: block; height: 5px; border-radius: 3px; background: #e5ebf4; }
.sheet i:nth-child(odd) { width: 78%; }
.sheet b { font-size: 12px; color: var(--blue); letter-spacing: .02em; }
.sheet.s3 { --rot: -9deg; --tx: -10px; }
.sheet.s2 { --rot: 5deg; --tx: 8px; }
.sheet.s1 { --rot: -1deg; }
.tile-tiku.is-hot .sheet.s3 { --rot: -20deg; --tx: -54px; --ty: 6px; }
.tile-tiku.is-hot .sheet.s2 { --rot: 17deg; --tx: 54px; --ty: 6px; }
.tile-tiku.is-hot .sheet.s1 { --ty: -10px; --rot: 0deg; }

/* stairs + bouncing ball */
.stairs { position: relative; flex: 0 0 40%; align-self: center; }
.stairs svg { display: block; width: 100%; overflow: visible; }
.stair { fill: #e8effb; stroke: #c7d6ee; stroke-width: 1.2; }
.stairs text { fill: var(--blue); font: 700 11px var(--ui); text-anchor: middle; }
.stairs { --u: 1; }
.hop-x { position: absolute; left: 20%; top: 74.5%; width: 14px; height: 14px; margin: -14px 0 0 -7px; transform-origin: 50% 100%; }
.hop-y { transform-origin: 50% 100%; }
.hop-y { display: block; width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ffe3a3, #f0a020); box-shadow: 0 2px 6px #f0a02066; }

.minor-entry {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px 14px;
  margin-top: 16px; padding: 6px 8px 6px 16px; border: 1px dashed var(--line-strong); border-radius: 14px;
  color: var(--muted); font-size: 15px;
}
.minor-entry b { color: var(--ink); }
.minor-entry .text-link { margin-inline-start: auto; font-size: 15px; }
.minor-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); }

/* ---------- Facts at a glance ---------- */
.glance { background: var(--white); }
.glance-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 16px 24px; margin-bottom: 28px; }
.glance-head h2 { margin-top: 6px; }
.seg { position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: #edf2f9; }
.seg button { position: relative; z-index: 1; min-width: 84px; min-height: 44px; border: 0; background: none; color: var(--muted); font-size: 15px; font-weight: 700; transition: color 250ms; }
.seg button[aria-selected="true"] { color: var(--blue); }
.seg-thumb { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 9px; background: #fff; box-shadow: 0 1px 4px #20395d1f; transition: transform 420ms cubic-bezier(.3, 1.3, .4, 1); }
.seg.second .seg-thumb { transform: translateX(100%); }
.glance-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: stretch; }
.glance-panel.is-entering { animation: glance-in 480ms var(--ease) both; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-content: start; }
.fact { padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--canvas); }
.fact.big { grid-column: 1 / -1; background: #102449; border-color: #102449; color: var(--on-night); }
.fact-num { display: flex; align-items: baseline; gap: 3px; color: var(--blue); }
.fact-num b { font-size: clamp(34px, 3.6vw, 46px); font-weight: 700; letter-spacing: -.05em; line-height: 1.05; }
.fact-num small { font-size: 15px; font-weight: 700; }
.fact > p:last-child { margin-top: 6px; font-size: 15px; color: var(--muted); line-height: 1.55; }
.fact.big .fact-num { color: var(--focus); }
.fact.big > p:last-child { color: var(--on-night-muted); }
.trend { display: flex; flex-direction: column; justify-content: center; padding: 20px; border: 1px solid var(--line); border-radius: 16px; }
.trend figcaption { font-size: 15px; color: var(--muted); }
.trend figcaption b { color: var(--ink); }
.trend svg { width: 100%; margin-block: 8px 4px; overflow: visible; }
.trend-base { stroke: var(--line-strong); }
.trend-line { fill: none; stroke: var(--blue); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 100; stroke-dashoffset: var(--draw, 0); transition: stroke-dashoffset 1400ms cubic-bezier(.4, 0, .2, 1); }
.trend-dots circle { fill: #fff; stroke: var(--blue); stroke-width: 2.5; }
.trend-dots .drop { fill: #d6453d; stroke: #fff; }
.trend-dots .rise { fill: #e2981c; stroke: #fff; }
.trend-val text { fill: var(--ink); font: 700 14px var(--ui); text-anchor: middle; }
.trend-year text { fill: var(--muted); font: 400 12px var(--ui); text-anchor: middle; }
.trend-note { margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.glance-more { margin-top: 20px; }
.glance-more .button { min-height: 48px; white-space: normal; text-align: start; }

/* ---------- Preparation tiers ---------- */
.prep { background: linear-gradient(180deg, var(--canvas), #fff); border-top: 1px solid var(--line); }
.prep-sub { margin-top: 8px; color: var(--muted); }
.tiers { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: end; }
.tier { position: relative; padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: 18px; }
.tier::before { content: ""; position: absolute; left: 22px; right: 22px; top: 0; height: 4px; border-radius: 0 0 4px 4px; background: var(--tier, #b7cbea); }
.tier.t1 { --tier: #7fa2d8; }
.tier.t2 { --tier: var(--blue); margin-bottom: 28px; }
.tier.t3 { --tier: #c7d3e4; margin-bottom: 56px; }
.tier-step { color: var(--blue); font-size: 13px; font-weight: 700; letter-spacing: .08em; }
.tier h3 { margin-top: 4px; font-size: 20px; }
.tier dl { display: grid; gap: 10px; margin-top: 12px; }
.tier dl > div { display: grid; grid-template-columns: 2.6em minmax(0, 1fr); gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.tier dt { font-size: 13px; font-weight: 700; color: var(--ink); }
.tier dd { font-size: 15px; color: var(--muted); line-height: 1.6; }
.prep + .contact-section { padding-top: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile-gufen { grid-column: 1 / -1; }
  .tile-kaoqing, .tile-tiku, .tile-beikao { grid-column: span 1; }
  .tile-tiku, .tile-beikao { flex-direction: column; }
  .paper-fan { flex-basis: auto; min-height: 180px; }
  .stairs { flex-basis: auto; width: min(260px, 100%); align-self: center; }
  .glance-panel { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 820px) {
  .lens-grid { grid-template-columns: minmax(0, 1fr); }
  .lens-stage { max-width: 560px; margin-inline: auto; width: 100%; }
  .tiers { grid-template-columns: minmax(0, 1fr); align-items: stretch; }
  .tier.t2, .tier.t3 { margin-bottom: 0; }
  .tier.t2 { margin-inline-start: 14px; } .tier.t3 { margin-inline-start: 28px; }
}
@media (max-width: 600px) {
  .lens-hero { padding-block: 32px 64px; }
  .lens-copy h1 { font-size: clamp(32px, 9vw, 40px); }
  .lens-lede { font-size: 17px; }
  .lens-actions .button { flex: 1 1 auto; }
  .bento { grid-template-columns: minmax(0, 1fr); }
  .tile, .tile-gufen, .tile-kaoqing, .tile-tiku, .tile-beikao { grid-column: auto; min-height: 0; }
  .tile-gufen { flex-direction: column; }
  .gauge { flex-basis: auto; }
  .gauge svg { max-width: 230px; }
  .facts { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
  .fact:last-child { grid-column: 1 / -1; }
  .fact { padding: 14px; }
  .minor-entry .text-link { margin-inline-start: 0; }
  .tier.t2, .tier.t3 { margin-inline-start: 0; }
  .home .site-header.over-hero .header-bank { padding-inline: 9px; }
}

/* ---------- Motion (only when the visitor allows it) ---------- */
@keyframes flow { to { stroke-dashoffset: -250; } }
@keyframes focus-pulse { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(4.2); } }
@keyframes focus-breathe { 50% { transform: scale(1.12); } }
@keyframes lens-breathe { 50% { transform: scaleX(1.06); } }
@keyframes shimmer { to { background-position: -220% 0; } }
@keyframes drift { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-18px) rotate(2deg); } }
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(9px); opacity: 0; } 100% { opacity: 0; } }
@keyframes float-sheet { 50% { translate: 0 -5px; } }
@keyframes hop-x { 0% { transform: translateX(0); } 30% { transform: translateX(calc(var(--u) * 60px)); } 60%, 100% { transform: translateX(calc(var(--u) * 120px)); } }
@keyframes hop-y {
  0% { transform: translateY(0) scale(1.15, .85); animation-timing-function: cubic-bezier(.2, .7, .4, 1); }
  15% { transform: translateY(calc(var(--u) * -46px)) scale(.95, 1.05); animation-timing-function: cubic-bezier(.6, 0, .8, .3); }
  30% { transform: translateY(calc(var(--u) * -22px)) scale(1.15, .85); animation-timing-function: cubic-bezier(.2, .7, .4, 1); }
  45% { transform: translateY(calc(var(--u) * -66px)) scale(.95, 1.05); animation-timing-function: cubic-bezier(.6, 0, .8, .3); }
  60% { transform: translateY(calc(var(--u) * -44px)) scale(1.15, .85); }
  64%, 84% { transform: translateY(calc(var(--u) * -44px)) scale(1); opacity: 1; }
  94% { transform: translateY(calc(var(--u) * -44px)) scale(.4); opacity: 0; }
  100% { transform: translateY(0) scale(.4); opacity: 0; }
}
@keyframes glance-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: no-preference) {
  .lens-copy > * { animation: rise-in 700ms var(--ease) both; }
  .lens-copy h1 { animation-delay: 80ms; }
  .lens-lede { animation-delay: 160ms; }
  .lens-actions { animation-delay: 240ms; }
  .lens-stage { animation: rise-in 900ms 120ms var(--ease) both; }

  [data-live].is-live .beam-flow { animation: flow 3.2s linear infinite; }
  [data-live].is-live .focus-ring { animation: focus-pulse 2.4s cubic-bezier(.2, .6, .3, 1) infinite; }
  [data-live].is-live .focus-ring.r2 { animation-delay: 1.2s; }
  [data-live].is-live .focus-core { transform-box: fill-box; transform-origin: center; animation: focus-breathe 2.4s ease-in-out infinite; }
  [data-live].is-live .lens { animation: lens-breathe 6s ease-in-out infinite; }
  [data-live].is-live .lens-copy h1 em { animation: shimmer 7s linear infinite; }
  [data-live].is-live .hero-symbols span { animation: drift 14s ease-in-out infinite; animation-delay: var(--d); }
  [data-live].is-live .scroll-cue span::after { animation: cue 1.8s ease-in-out infinite; }

  .js .entries .mini-bars:not(.grown) span { --grow: 0; }
  .tile-tiku.in-view:not(.is-hot) .sheet.s1 { animation: float-sheet 4s ease-in-out infinite; }
  .tile-beikao.in-view .hop-x { animation: hop-x 3.6s linear infinite; }
  .tile-beikao.in-view .hop-y { animation: hop-y 3.6s infinite; }
  .js [data-reveal]:not(.revealed) { opacity: 0; transform: translateY(18px); }
  .js [data-reveal] { transition: opacity 650ms var(--ease), transform 650ms var(--ease); transition-delay: var(--stagger, 0ms); }
  .js .tile[data-reveal].revealed { transition: opacity 650ms var(--ease) var(--stagger, 0ms), transform 400ms cubic-bezier(.2, .8, .2, 1), box-shadow 300ms, border-color 300ms; }
  .js .trend:not(.drawn) .trend-line { --draw: 100; }
  .js .trend .trend-dots circle, .js .trend .trend-val text { transition: opacity 400ms; }
  .js .trend:not(.drawn) .trend-dots circle, .js .trend:not(.drawn) .trend-val text { opacity: 0; }
  .js .trend.drawn .trend-dots circle:nth-child(2), .js .trend.drawn .trend-val text:nth-child(2) { transition-delay: 300ms; }
  .js .trend.drawn .trend-dots circle:nth-child(3), .js .trend.drawn .trend-val text:nth-child(3) { transition-delay: 600ms; }
  .js .trend.drawn .trend-dots circle:nth-child(4), .js .trend.drawn .trend-val text:nth-child(4) { transition-delay: 900ms; }
  .js .trend.drawn .trend-dots circle:nth-child(5), .js .trend.drawn .trend-val text:nth-child(5) { transition-delay: 1200ms; }
}
@media (prefers-reduced-motion: reduce) {
  .photon { display: none; }
  .beam-flow { stroke-dasharray: none; opacity: .4; }
  .tile { transform: none !important; }
}

/* portal.js also tags revealed elements; the homepage uses its own transition instead of that keyframe
   (a filled keyframe would pin `transform` and stop the tile tilt). */
.home .revealed { animation: none; }
.gauge-hint { color: var(--muted); font-size: 12px; }
.nw { display: inline-block; }
/* Touch screens have no hover: fan the papers once the tile is on screen. */
@media (hover: none) and (prefers-reduced-motion: no-preference) {
  .tile-tiku.in-view .sheet.s3 { --rot: -16deg; --tx: -42px; --ty: 6px; transition-delay: 300ms; }
  .tile-tiku.in-view .sheet.s2 { --rot: 13deg; --tx: 42px; --ty: 6px; transition-delay: 300ms; }
}
@media (max-width: 600px) {
  .beam-link text { font-size: 20px; }
  .lens-caption { font-size: 12px; }
  .trend-val text { font-size: 20px; }
  .trend-year text { font-size: 17px; }
  .paper-fan { min-height: 150px; transform: scale(.85); }
  .gauge svg { max-width: 200px; }
  .stairs { width: min(220px, 100%); }
  .tile { gap: 12px; }
}
