:root {
  --bg: #f6f7f9; --panel: #ffffff; --text: #16181d; --muted: #5d6573; --line: #e2e5ea;
  --accent: #0f766e; --accent-2: #115e59; --spy: #8a94a6; --sim: rgba(138, 148, 166, .10); --hero: #071a19; --hero-text: #eafcf9;
  --hero-muted: #b7d9d4; --ok: #0f766e; --err: #b42318;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1115; --panel: #171a21; --text: #e7e9ee; --muted: #9aa3b2; --line: #2a2f3a;
    --accent: #2bb3a3; --accent-2: #5fd3c5; --spy: #8a94a6; --sim: rgba(154, 163, 178, .10); --ok: #5fd3c5; --err: #f97066;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1115; --panel: #171a21; --text: #e7e9ee; --muted: #9aa3b2; --line: #2a2f3a;
  --accent: #2bb3a3; --accent-2: #5fd3c5; --spy: #8a94a6; --sim: rgba(154, 163, 178, .10); --ok: #5fd3c5; --err: #f97066;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; }
a { color: var(--accent); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 24px;
  background: var(--hero); color: var(--hero-text); }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 700; font-size: 18px; }
.brand img { border-radius: 8px; }
.top nav { display: flex; gap: 18px; flex-wrap: wrap; }
.top nav a { color: var(--hero-muted); text-decoration: none; font-size: 15px; }
.top nav a:hover { color: var(--hero-text); }
.xlink { display: inline-flex; align-items: center; gap: 6px; }
.xlogo { width: 14px; height: 14px; fill: currentColor; flex: none; }
.brand span { white-space: nowrap; }
@media (max-width: 420px) { .top .xtext { display: none; } .top .xlogo { width: 20px; height: 20px; } }

.hero { background: linear-gradient(115deg, #061615 0%, #0b2f2c 55%, #11504a 100%); color: var(--hero-text);
  padding: 72px 24px 64px; }
.hero > * { max-width: 860px; margin-left: auto; margin-right: auto; }
.hero h1 { font-size: clamp(30px, 5vw, 50px); line-height: 1.12; margin-top: 0; margin-bottom: 18px; letter-spacing: -.5px; }
.hero h1 span { color: #5fd3c5; }
.lead { font-size: clamp(17px, 2.2vw, 20px); color: var(--hero-muted); margin-bottom: 28px; }
.wl { display: flex; gap: 10px; flex-wrap: wrap; }
.wl input[type=email] { flex: 1 1 260px; min-width: 0; padding: 13px 16px; border-radius: 10px; border: 1px solid rgba(95, 211, 197, .45);
  background: rgba(234, 252, 249, .08); color: var(--hero-text); font-size: 16px; }
.wl input[type=email]::placeholder { color: #8fb8b2; }
.wl button { padding: 13px 22px; border-radius: 10px; border: 0; background: #2bb3a3; color: #04201d; font-weight: 700;
  font-size: 16px; cursor: pointer; }
.wl button:disabled { opacity: .6; cursor: default; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; }
.wl-msg { min-height: 1.5em; margin: 10px auto 0; font-weight: 600; }
.wl-msg.ok { color: #8af0e2; } .wl-msg.err { color: #ffb4ab; }
.fine { font-size: 14px; color: #8fb8b2; margin-top: 4px; }
.fine a { color: #8af0e2; }

section.how, section.record { max-width: 1060px; margin: 0 auto; padding: 56px 24px 8px; }
h2 { font-size: 28px; margin: 0 0 18px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 16px; }
.cards article { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.cards h3 { margin: 0 0 6px; font-size: 18px; }
.cards p { margin: 0; color: var(--muted); }

.sub { color: var(--muted); margin: -8px 0 18px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; }
.tile .lbl { font-size: 13px; color: var(--muted); }
.tile .val { font-size: 28px; font-weight: 700; line-height: 1.2; }
.tile .cmp { font-size: 14px; color: var(--muted); }
.chart { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 16px 12px; }
.legend { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); flex-wrap: wrap; margin-bottom: 6px; }
.key { display: inline-block; width: 18px; height: 3px; border-radius: 2px; margin-left: 8px; }
.key:first-child { margin-left: 0; }
.k-port { background: var(--accent); } .k-spy { background: var(--spy); }
.plot { position: relative; width: 100%; }
.plot svg { display: block; width: 100%; height: auto; overflow: visible; }
.plot .grid line { stroke: var(--line); stroke-width: 1; }
.plot .axis text { fill: var(--muted); font-size: 12px; }
.plot .sim { fill: var(--sim); }
.plot .simlbl { fill: var(--muted); font-size: 12px; }
.plot .port { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; }
.plot .spy { fill: none; stroke: var(--spy); stroke-width: 2; stroke-linejoin: round; }
.plot .endlbl { font-size: 12px; font-weight: 600; fill: var(--text); }
.plot .live { stroke: var(--muted); stroke-dasharray: 4 4; stroke-width: 1; }
.plot .cross { stroke: var(--muted); stroke-width: 1; }
.plot .dot-port { fill: var(--accent); stroke: var(--panel); stroke-width: 2; }
.plot .dot-spy { fill: var(--spy); stroke: var(--panel); stroke-width: 2; }
.tip { position: absolute; pointer-events: none; background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: 6px 10px; font-size: 13px; box-shadow: 0 4px 14px rgba(0, 0, 0, .12); white-space: nowrap; }
.tip b { display: block; }
figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; }

.cards.reports h3 a { color: var(--text); text-decoration: none; }
.cards.reports h3 a:hover { color: var(--accent); }
.rdate { margin-top: 8px !important; font-size: 13px; }

/* report pages */
.report { max-width: 820px; margin: 0 auto; padding: 32px 24px 8px; }
.report h1 { font-size: clamp(26px, 4vw, 36px); line-height: 1.2; margin: 6px 0 12px; }
.crumb { font-size: 13px; color: var(--muted); margin: 0; }
.crumb a { color: var(--muted); }
.rsum { font-size: 18px; color: var(--muted); margin: 0 0 12px; }
.rmeta { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 13px; color: var(--muted); margin: 0 0 8px; }
.rbadge { background: var(--accent); color: #fff; font-weight: 700; border-radius: 999px; padding: 2px 10px; }
.rnote { font-size: 13px; color: var(--muted); border-left: 3px solid var(--line); padding-left: 10px; }
.rbody { line-height: 1.65; }
.rbody h2 { font-size: 22px; margin: 32px 0 10px; }
.rbody h3 { font-size: 18px; margin: 24px 0 8px; }
.rbody li { margin: 4px 0; }
.rbody .table-wrap { overflow-x: auto; }
.rbody table { border-collapse: collapse; font-size: 14px; margin: 12px 0; }
.rbody th, .rbody td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; }
.rbody th { background: var(--panel); }
.rbody .report-fig { margin: 18px 0; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.rbody .report-fig img { display: block; width: 100%; height: auto; border-radius: 6px; }
.rbody .report-fig figcaption { font-size: 12px; color: var(--muted); margin-top: 6px; }
.rbody hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
.rbody code { font-size: 90%; }
.rcta { margin: 32px 0 0; padding: 16px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
@media (max-width: 560px) { .report { padding: 24px 16px 8px; } }

.foot { max-width: 1060px; margin: 48px auto 0; padding: 20px 24px 36px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.foot .links a { color: var(--muted); }
@media (max-width: 560px) {
  .top { padding: 12px 16px; } .top nav a:not(:last-child) { display: none; }
  .hero { padding: 48px 16px 44px; } section.how, section.record { padding: 40px 16px 8px; } .foot { padding: 20px 16px 32px; }
}
