:root {
  --navy: #0a203b;
  --navy-deep: #06172a;
  --navy-soft: #112b49;
  --gold: #c7a45c;
  --gold-bright: #efd486;
  --cream: #f3efe7;
  --paper: #fffdf8;
  --ink: #14233a;
  --muted: #697586;
  --line: rgba(15, 38, 65, .15);
  --danger: #9d3d32;
  --serif: "Noto Serif SC", "Songti SC", SimSun, Georgia, serif;
  --sans: "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body { min-height: 100%; margin: 0; color: var(--ink); font-family: var(--sans); background: var(--cream); }
button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.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; }

/* Cover */
.cover { --cover-image-width: max(100vw, 177.68svh); --cover-image-height: max(56.28vw, 100svh); position: relative; width: 100%; min-height: 100svh; overflow: hidden; background: var(--navy); }
.cover-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: left center; }
.cover-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5, 24, 46, .18) 0%, rgba(5, 24, 46, .03) 48%, rgba(5, 24, 46, .08) 100%); pointer-events: none; }
.cover-brand { position: absolute; top: clamp(28px, 5vw, 70px); left: clamp(28px, 4vw, 70px); z-index: 2; color: #fff; text-shadow: 0 2px 18px rgba(0, 20, 45, .35); }
.cover-brand p { margin: 0 0 6px; color: #f7e7b8; font-size: 10px; letter-spacing: .23em; }
.cover-brand h1 { margin: 0; font: 500 clamp(30px, 3.4vw, 54px)/1 var(--serif); letter-spacing: .08em; }
.cover-brand span { display: block; margin-top: 12px; font-size: 12px; letter-spacing: .12em; }
.cover-hotspots { position: absolute; inset: 0; z-index: 3; }
.cover-hotspots input { position: absolute; left: calc(var(--cover-image-width) * .0238); top: calc((100svh - var(--cover-image-height)) / 2 + var(--cover-image-height) * .4135); width: calc(var(--cover-image-width) * .331); height: calc(var(--cover-image-height) * .0805); border: 1px solid rgba(10, 32, 59, .22); border-radius: 11px; outline: 0; background: rgba(255, 252, 247, .38); color: var(--navy); padding: 0 calc(var(--cover-image-width) * .048); font: 500 clamp(16px, 1.45vw, 25px)/1 var(--serif); box-shadow: inset 0 0 28px rgba(255,255,255,.25); transition: .2s ease; }
.cover-hotspots input:focus { background: rgba(255, 252, 247, .72); border-color: var(--gold); box-shadow: 0 0 0 4px rgba(239, 212, 134, .24); }
.cover-hotspots button { position: absolute; top: calc((100svh - var(--cover-image-height)) / 2 + var(--cover-image-height) * .5123); height: calc(var(--cover-image-height) * .0845); border: 1px solid transparent; border-radius: 10px; background: transparent; transition: .2s ease; }
.cover-hotspots button:hover, .cover-hotspots button:focus-visible { border-color: var(--gold-bright); box-shadow: 0 0 0 4px rgba(239, 212, 134, .2), 0 12px 30px rgba(0, 20, 45, .2); outline: 0; }
.cover-signup { left: calc(var(--cover-image-width) * .0238); width: calc(var(--cover-image-width) * .1545); }
.cover-login { left: calc(var(--cover-image-width) * .1895); width: calc(var(--cover-image-width) * .1655); }
.cover-message { position: absolute; z-index: 4; left: 2.4%; bottom: 4%; margin: 0; min-height: 20px; padding: 7px 11px; color: #fff; background: rgba(6, 23, 42, .62); border-radius: 5px; font-size: 12px; opacity: 0; transform: translateY(4px); transition: .2s ease; }
.cover-message.visible { opacity: 1; transform: translateY(0); }
.turnstile-slot { position: fixed; right: 18px; bottom: 18px; z-index: 8; }
.cover.is-busy button { pointer-events: none; opacity: .72; }
.cover-mobile-card { display: none; }

/* Observer */
.observer-shell { min-height: 100svh; display: grid; grid-template-columns: 286px minmax(0, 1fr); }
.observer-sidebar { position: sticky; top: 0; z-index: 20; height: 100svh; display: flex; flex-direction: column; background: var(--navy-deep); color: #fff; border-right: 1px solid rgba(199, 164, 92, .22); }
.observer-brandbar { min-height: 142px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 15px; padding: 22px 24px 20px; border-bottom: 1px solid rgba(255,255,255,.1); }
.observer-logo { min-width: 0; color: inherit; text-align: center; text-decoration: none; }
.observer-logo span { color: var(--gold-bright); font: 600 25px/1 var(--serif); letter-spacing: .08em; }
.direction-switch { display: inline-grid; grid-template-columns: repeat(2, 54px); padding: 4px; border: 1px solid rgba(199,164,92,.5); border-radius: 999px; background: rgba(255,255,255,.03); }
.direction-switch button { width: 54px; height: 30px; padding: 0; color: #91a3b7; background: transparent; border: 0; border-radius: 999px; font: 500 14px var(--serif); transition: .18s ease; }
.direction-switch button:hover { color: #fff; }
.direction-switch button[aria-pressed="true"] { color: var(--navy-deep); background: var(--gold-bright); box-shadow: 0 4px 14px rgba(0,0,0,.2); }
.observer-direction { padding: 25px 28px 20px; }
.observer-direction span { display: block; color: #7890aa; font-size: 9px; letter-spacing: .18em; text-transform: uppercase; }
.observer-direction strong { display: block; margin-top: 8px; font: 400 24px/1.3 var(--serif); }
.observer-nav { overflow-y: auto; padding: 0 16px 20px; }
.observer-nav button { width: 100%; min-height: 58px; display: grid; grid-template-columns: 58px 1fr; align-items: center; gap: 5px; color: #aebbc9; text-align: left; background: transparent; border: 0; border-left: 2px solid transparent; padding: 8px 12px; transition: .18s ease; }
.observer-nav button b { color: var(--gold); font: 500 12px var(--serif); letter-spacing: .04em; }
.observer-nav button span { font-size: 13px; }
.observer-nav button:hover { color: #fff; background: rgba(255,255,255,.045); }
.observer-nav button.active { color: #fff; border-left-color: var(--gold); background: linear-gradient(90deg, rgba(199,164,92,.14), transparent); }
.observer-sidebar footer { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding: 20px 28px; color: #71849a; font-size: 10px; border-top: 1px solid rgba(255,255,255,.1); }
.observer-sidebar footer button { padding: 0; color: #d9c78f; background: transparent; border: 0; }
.observer-main { min-width: 0; background: var(--paper); }
.observer-topbar { min-height: 116px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 25px clamp(24px, 4.5vw, 72px); background: #fff; border-bottom: 1px solid var(--line); }
.observer-topbar p { margin: 0 0 4px; color: #947238; font-size: 9px; letter-spacing: .18em; text-transform: uppercase; }
.observer-topbar h1 { margin: 0; font: 400 clamp(27px, 3vw, 42px)/1.15 var(--serif); }
.observer-sync { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 11px; }
.observer-sync button, .sidebar-toggle { min-height: 38px; padding: 0 16px; color: var(--navy); background: #fff; border: 1px solid var(--gold); letter-spacing: .08em; }
.sidebar-toggle { display: none; }
.demo-notice { display: flex; align-items: center; gap: 15px; margin: 26px clamp(24px, 4.5vw, 72px) 0; padding: 13px 17px; color: #70551e; background: #fff8df; border: 1px solid #e6ce8e; font-size: 12px; }
.demo-notice strong { white-space: nowrap; }
.observer-view { padding: clamp(48px, 6vw, 82px) clamp(24px, 4.5vw, 72px) 80px; }
.view-heading { display: grid; grid-template-columns: 120px minmax(0, 1fr); column-gap: 26px; align-items: end; margin-bottom: 42px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.view-heading > span { grid-row: 1 / 3; align-self: start; color: var(--gold); font: 500 15px var(--serif); letter-spacing: .05em; }
.view-heading h2 { margin: 0; font: 400 clamp(35px, 4vw, 58px)/1.08 var(--serif); letter-spacing: .02em; }
.view-heading p { margin: 12px 0 0; color: var(--muted); font-size: 14px; }
.data-block + .data-block { margin-top: 42px; }
.data-block h3 { margin: 0 0 16px; font: 400 25px var(--serif); }
.data-block > p { color: var(--muted); font-size: 13px; }
.metric-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 24px; }
.metric { min-height: 98px; padding: 18px 20px; background: var(--cream); border: 1px solid var(--line); }
.metric span { display: block; color: var(--muted); font-size: 10px; letter-spacing: .1em; }
.metric strong { display: block; margin-top: 10px; color: var(--navy); font: 400 28px var(--serif); }
.table-wrap { width: 100%; overflow-x: auto; border-top: 2px solid var(--navy); }
table { width: 100%; border-collapse: collapse; font-size: 12px; background: #fff; }
th, td { padding: 13px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: #7a6743; background: #faf6ed; font-weight: 600; letter-spacing: .04em; }
td:first-child { color: var(--navy); font-weight: 700; }
.status-pill { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; color: #176346; background: #e8f5ee; border-radius: 999px; font-weight: 600; }
.status-pill.warn { color: #8b3b2c; background: #fff0ec; }
.checkpoint-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.checkpoint-card { min-width: 0; padding: 20px; border: 1px solid var(--line); background: #fff; }
.checkpoint-card h3 { margin: 0 0 15px; color: var(--navy); font: 400 21px var(--serif); }
.split-output { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.empty-state { padding: 38px; color: var(--muted); text-align: center; border: 1px dashed var(--line); }
.scheme-pending { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 24px; padding: 14px 17px; color: #70551e; background: #fff8df; border: 1px solid #e6ce8e; font-size: 12px; }
.scheme-pending strong { white-space: nowrap; }
.short-note-list { margin: 22px 0 0; padding: 20px 24px 20px 42px; color: var(--muted); background: var(--cream); border-left: 2px solid var(--gold); font-size: 13px; line-height: 1.75; }
.short-note-list li + li { margin-top: 5px; }

@media (max-width: 980px) {
  .observer-shell { grid-template-columns: 236px minmax(0, 1fr); }
  .observer-sync span { display: none; }
  .metric-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .checkpoint-grid, .split-output { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .cover-image { object-position: 69% center; }
  .cover-shade { background: linear-gradient(180deg, rgba(6,23,42,.08), rgba(6,23,42,.1) 40%, rgba(6,23,42,.72)); }
  .cover-brand { top: 28px; left: 22px; }
  .cover-brand h1 { font-size: 36px; }
  .cover-hotspots { display: none; }
  .cover-mobile-card { position: absolute; z-index: 3; left: 18px; right: 18px; bottom: 24px; display: block; padding: 24px; color: #fff; background: rgba(6, 23, 42, .74); border: 1px solid rgba(239,212,134,.55); backdrop-filter: blur(12px); }
  .cover-mobile-card > p { margin: 0 0 5px; color: var(--gold-bright); font-size: 9px; letter-spacing: .16em; }
  .cover-mobile-card h2 { margin: 0 0 18px; font: 400 25px var(--serif); }
  .cover-mobile-card label { display: block; margin-bottom: 7px; font-size: 11px; }
  .cover-mobile-card input { width: 100%; min-height: 48px; padding: 0 13px; color: var(--navy); background: rgba(255,255,255,.93); border: 1px solid rgba(255,255,255,.7); outline: 0; }
  .cover-mobile-card > div { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
  .cover-mobile-card button { min-height: 44px; color: var(--gold-bright); background: var(--navy); border: 1px solid var(--gold); }
  .cover-mobile-card button:last-child { color: var(--navy); background: var(--gold-bright); }
  .cover-message { left: 18px; right: 18px; bottom: 268px; }

  .observer-shell { display: block; }
  .observer-sidebar { position: fixed; inset: 0 auto 0 0; width: min(84vw, 310px); height: 100svh; transform: translateX(-102%); transition: transform .24s ease; box-shadow: 20px 0 50px rgba(0,0,0,.3); }
  .observer-sidebar.open { transform: translateX(0); }
  .observer-topbar { min-height: 98px; padding: 18px 20px; }
  .sidebar-toggle { display: inline-flex; align-items: center; }
  .observer-sync span { display: none; }
  .observer-sync button { padding: 0 11px; }
  .demo-notice { align-items: flex-start; flex-direction: column; gap: 4px; margin: 18px 20px 0; }
  .observer-view { padding: 44px 20px 60px; }
  .view-heading { grid-template-columns: 1fr; gap: 7px; margin-bottom: 30px; }
  .view-heading > span { grid-row: auto; }
  .view-heading h2 { font-size: 36px; }
  .view-heading p { margin-top: 5px; }
  .metric-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  th, td { padding: 11px 9px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
