:root {
  color-scheme: dark;
  --bg: #0c100e;
  --panel: #111712;
  --raised: #171f17;
  --text: #eef3e6;
  --muted: #aab6a6;
  --line: #303d32;
  --accent: #c1f779;
  --gold: #f0c782;
  --red: #ffaba0;
  --mono: 'IBM Plex Mono', 'Cascadia Code', 'SFMono-Regular', Consolas, monospace;
  --display: 'Avenir Next', 'Trebuchet MS', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 1rem/1.55 var(--display); }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
p, h1, h2, h3, figure { margin: 0; }
.shell { width: min(1180px, calc(100% - 80px)); margin-inline: auto; }
.accent { color: var(--accent); }
.subtle { color: var(--muted); font-size: .88rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 2; opacity: 0; pointer-events: none; background: var(--accent); color: var(--bg); padding: 10px 16px; }
.skip-link:focus { opacity: 1; pointer-events: auto; color: var(--bg); }

.site-header { border-bottom: 1px solid var(--line); }
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 1.25rem; font-weight: 800; letter-spacing: -.05em; }
.brand img { display: block; border-radius: 7px; }
.network, .kicker, .section-label, .radar-top, figcaption, .metric-label, .scan-meta, .badge { font: 700 .68rem/1.4 var(--mono); letter-spacing: .1em; }
.network { text-transform: uppercase; color: var(--muted); }
.status-dot, .radar-top i { width: 7px; height: 7px; display: inline-block; background: var(--accent); border-radius: 50%; margin-right: 5px; }
.header-inner nav { display: flex; gap: clamp(14px, 3vw, 34px); font-size: .87rem; font-weight: 700; }
.header-inner nav span { color: var(--accent); }

.hero { display: grid; grid-template-columns: 1.12fr .88fr; align-items: center; gap: clamp(24px, 5vw, 76px); padding-block: clamp(42px, 7vw, 95px) clamp(44px, 6vw, 76px); }
.hero-content { min-width: 0; }
.kicker { color: var(--accent); }
.index-mark { display: inline-block; border: 1px solid #536e3d; border-radius: 3px; padding: 3px 5px; margin-right: 7px; }
h1 { margin: 18px 0 21px; font-size: clamp(3.1rem, 7.2vw, 6.65rem); line-height: .93; letter-spacing: -.095em; font-weight: 800; }
h1 em { color: var(--accent); font-style: normal; }
.intro { color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.2rem); max-width: 42ch; }
#scan { scroll-margin-top: 20px; margin-top: 29px; }
.scan-field { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 7px; padding: 6px 6px 6px 13px; }
.scan-field:focus-within { border-color: #82a655; }
.scan-field svg { color: var(--accent); }
.scan-field input, .share-fallback input { width: 100%; min-width: 0; border: 0; color: var(--text); background: transparent; font: .9rem/1.4 var(--mono); }
.scan-field input { padding: 10px 0; outline-offset: 0; }
.scan-field input:focus-visible { outline: none; }
.scan-field input::placeholder { color: var(--muted); opacity: 1; }
.primary, .secondary { display: inline-flex; justify-content: center; align-items: center; gap: 9px; min-height: 44px; padding: 8px 14px; border: 1px solid transparent; border-radius: 4px; font-weight: 800; white-space: nowrap; transition: background-color .2s, color .2s, border-color .2s; }
.primary { background: var(--accent); color: #14200c; }
.primary:not(:disabled):hover { background: #dcffa6; }
.secondary { border-color: var(--line); background: var(--raised); color: var(--text); font-size: .83rem; }
.secondary:hover { color: var(--accent); border-color: #82a655; }
.scan-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 2px 12px; margin-top: 6px; color: var(--muted); letter-spacing: .025em; }
.text-button { padding: 10px 0; min-height: 44px; background: none; border: 0; color: var(--accent); text-align: left; }
.text-button:not(:disabled):hover { text-decoration: underline; }
.text-button span { margin-right: 4px; }
.input-note { color: var(--muted); font-size: .79rem; }
.scan-status:not(:empty) { margin-top: 9px; color: var(--muted); font-size: .89rem; }
.scan-status[data-state="error"]:not(:empty) { color: var(--red); }

.radar { position: relative; display: grid; grid-template-rows: auto 1fr auto; isolation: isolate; margin: 0; border: 1px solid #3c503a; border-radius: 5px; background: radial-gradient(ellipse at 51% 50%, #1b2b19, transparent 72%), #111911; overflow: hidden; }
.radar::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, #394a3629 1px, transparent 1px), linear-gradient(#394a3629 1px, transparent 1px); background-size: 23px 23px; mask-image: linear-gradient(transparent, #171f17 20% 80%, transparent); }
.radar-top, figcaption { display: flex; justify-content: space-between; gap: 10px; padding: 13px 15px; color: #b8c7b4; font-size: .59rem; }
.radar-top { border-bottom: 1px solid #3e503d; }
figcaption { border-top: 1px solid #3e503d; }
.scope { width: 100%; display: block; }
.scope-labels { font-family: var(--mono); }
.scope-sweep { transform-origin: 225px 180px; animation: sweep 4.8s ease-out; }
@keyframes sweep { to { transform: rotate(360deg); } }

.section-label { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; border-block: 1px solid var(--line); padding: 13px 0; color: var(--muted); }
.section-label > :first-child { color: var(--accent); }
.report { margin-bottom: 55px; }
.report-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; padding: 23px 0 18px; }
.report-head > div:first-child { min-width: 0; }
.report-head h2, .guide-intro h2 { font-size: clamp(1.9rem, 4.5vw, 3.8rem); line-height: 1.02; letter-spacing: -.075em; overflow-wrap: anywhere; }
.report-head code { display: block; color: var(--accent); margin: 10px 0 5px; font-size: .77rem; overflow-wrap: anywhere; }
.report-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.badge { color: var(--accent); padding: 4px 7px; border: 1px solid currentColor; border-radius: 3px; }
.badge[data-partial="true"], .tone-warn { color: var(--gold); }
.tone-good { color: var(--accent); }
.tone-muted { color: var(--muted); }
.share-fallback { display: grid; gap: 6px; margin-bottom: 17px; }
.share-fallback input { border: 1px solid var(--line); border-radius: 4px; padding: 10px; }
.metrics { display: grid; grid-template-columns: 1.1fr 1fr 1fr 1fr; border: solid var(--line); border-width: 1px 0 0 1px; }
.metric { min-width: 0; padding: clamp(12px, 2vw, 21px); border: solid var(--line); border-width: 0 1px 1px 0; background: var(--panel); }
.metric-label { display: block; color: var(--muted); }
.metric strong { display: block; margin-top: 6px; font-size: clamp(1.05rem, 2.1vw, 1.7rem); line-height: 1.15; letter-spacing: -.05em; overflow-wrap: anywhere; }
.market-note { margin: 9px 0 19px; }
.report-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.report-panel { min-width: 0; border: 1px solid var(--line); border-radius: 5px; padding: clamp(16px, 2.5vw, 26px); background: var(--panel); }
.report-panel h3 { margin: 7px 0 15px; font-size: clamp(1.22rem, 2.8vw, 1.65rem); line-height: 1.12; letter-spacing: -.055em; }
.report-panel p.subtle { margin-top: 12px; }
.data-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, auto); gap: 8px 16px; align-items: baseline; border-top: 1px solid var(--line); padding: 10px 0; font-size: .9rem; overflow-wrap: anywhere; }
.data-row > :last-child { text-align: right; }
.data-row a, .source-link, .bar-header a { color: var(--accent); text-decoration: underline; text-underline-offset: .2em; }
.data-row a.tone-warn { color: var(--gold); }
.data-row a:hover, .source-link:hover, .bar-header a:hover { color: var(--text); }
.disclosure { margin: 8px 0 0; border-top: 1px solid var(--line); font-size: .9rem; }
.disclosure summary { padding: 11px 0; }
.disclosure ul { margin: 0 0 9px; padding-left: 20px; color: var(--muted); overflow-wrap: anywhere; }
.bars { display: grid; gap: 11px; margin: 8px 0 10px; }
.bar-header { display: flex; justify-content: space-between; gap: 10px; font-size: .82rem; overflow-wrap: anywhere; }
.bar-header > :first-child { min-width: 0; }
.bar-track { height: 5px; margin-top: 4px; overflow: hidden; border-radius: 2px; background: #29382a; }
.bar-track span { display: block; height: 100%; background: var(--accent); }
.time-picker { display: flex; flex-wrap: wrap; gap: 4px; margin: 13px 0 10px; }
.time-picker button { min-height: 36px; min-width: 42px; border: 1px solid var(--line); border-radius: 3px; background: var(--raised); color: var(--muted); font: 700 .73rem var(--mono); }
.time-picker button:hover { border-color: var(--accent); color: var(--text); }
.time-picker button[aria-pressed="true"] { background: var(--accent); color: #14200c; border-color: var(--accent); }
.sources { margin-top: 14px; padding: 0 17px; border: 1px solid var(--line); border-radius: 5px; }
.sources summary { padding: 13px 0; font-weight: 800; }
.sources summary span { margin-left: 7px; font-size: .83rem; color: var(--muted); font-weight: 400; }
.sources-body { padding-bottom: 13px; }

.field-guide { scroll-margin-top: 18px; margin-bottom: 64px; }
.guide-grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: clamp(20px, 5vw, 75px); padding-top: 26px; }
.guide-intro p { margin-top: 12px; }
.guide-items { border-top: 1px solid var(--line); }
.guide-items details { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; }
summary::marker { color: var(--accent); }
.guide-items summary { display: grid; grid-template-columns: 30px 1fr 16px; align-items: baseline; gap: 9px; padding: 12px 0; font-weight: 800; list-style: none; }
.guide-items summary::-webkit-details-marker { display: none; }
.guide-items summary::after { content: '+'; justify-self: end; color: var(--accent); font-family: var(--mono); }
.guide-items details[open] summary::after { content: '−'; }
.guide-number { color: var(--accent); font: 700 .72rem var(--mono); }
.guide-items details p { margin: 0 22px 14px 39px; font-size: .9rem; color: var(--muted); }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .81rem; }
.footer-inner { flex-wrap: wrap; padding-block: 12px; }
.footer-brand { color: var(--text); font-size: 1.06rem; font-weight: 800; letter-spacing: -.045em; }

@media (max-width: 850px) {
  .shell { width: calc(100% - 48px); }
  .hero { gap: 24px; }
  .radar-top, figcaption { padding: 9px 8px; font-size: .53rem; }
}

@media (max-width: 690px) {
  .shell { width: calc(100% - 36px); }
  .header-inner { min-height: 62px; }
  .network, .nav-guide { display: none; }
  .hero, .guide-grid, .report-grid { grid-template-columns: 1fr; }
  .hero { gap: 24px; padding-block: 36px 43px; }
  h1 { font-size: clamp(3.1rem, 11.75vw, 5rem); }
  .radar { width: min(100%, 480px); }
  .scope { max-height: 230px; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .guide-grid { gap: 19px; }
  .field-guide { margin-bottom: 42px; }
}

@media (max-width: 365px) {
  .scan-field { grid-template-columns: auto minmax(0, 1fr); }
  .scan-field button { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scope-sweep { animation: none; }
  .primary, .secondary { transition: none; }
}
