:root {
  color-scheme: dark;
  --bg: #07100d;
  --panel: #0d1814;
  --panel-strong: #101f19;
  --ink: #f0f6e8;
  --muted: #91a59a;
  --line: rgba(207, 255, 127, 0.15);
  --acid: #d7ff73;
  --acid-deep: #9dcc38;
  --amber: #ffc85a;
  --red: #ff7c6e;
  font-family:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 77% -10%, rgba(157, 204, 56, 0.16), transparent 34rem),
    linear-gradient(rgba(215, 255, 115, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(215, 255, 115, 0.025) 1px, transparent 1px),
    var(--bg);
  background-size: auto, 64px 64px, 64px 64px, auto;
  -webkit-font-smoothing: antialiased;
}

button,
a {
  color: inherit;
}

button {
  font: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--acid);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 50;
  top: 12px;
  left: 12px;
  min-height: 44px;
  padding: 12px 16px;
  border-radius: 6px;
  color: var(--bg);
  background: var(--acid);
  font-weight: 800;
  text-decoration: none;
  transform: translateY(calc(-100% - 24px));
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.topbar,
main,
footer {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 84px;
  border-bottom: 1px solid var(--line);
}

.back-link,
.live-mark,
.eyebrow,
.section-kicker,
.event-kind,
.source-state,
.verdict-meta,
.summary-grid span,
.window-bar span,
.command-card span,
footer {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.back-link {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  min-height: 44px;
  font-size: 0.72rem;
  font-weight: 800;
  text-decoration: none;
}

.live-mark {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  color: var(--muted);
  font-size: 0.66rem;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 18px rgba(215, 255, 115, 0.74);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
  gap: clamp(48px, 10vw, 140px);
  align-items: end;
  padding: clamp(82px, 12vw, 150px) 0 68px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 18px;
  color: var(--acid);
  font-size: 0.68rem;
  font-weight: 800;
}

.hero h1 {
  margin: 0;
  font-size: clamp(3.7rem, 9vw, 7.8rem);
  font-weight: 540;
  letter-spacing: -0.075em;
  line-height: 0.92;
}

.hero h1 em {
  color: var(--acid);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-style: normal;
  letter-spacing: -0.06em;
}

.hero-copy {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.14rem);
  line-height: 1.85;
}

.verdict-panel {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: clamp(32px, 7vw, 88px);
  align-items: center;
  min-height: 390px;
  padding: clamp(30px, 5vw, 68px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(circle at 15% 50%, rgba(215, 255, 115, 0.11), transparent 20rem),
    rgba(13, 24, 20, 0.9);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.22);
}

.radar-visual {
  position: relative;
  width: min(280px, 100%);
  aspect-ratio: 1;
  margin-inline: auto;
  overflow: hidden;
  border: 1px solid rgba(215, 255, 115, 0.26);
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 49.7%, rgba(215, 255, 115, 0.11) 50%, transparent 50.3%),
    linear-gradient(transparent 49.7%, rgba(215, 255, 115, 0.11) 50%, transparent 50.3%),
    rgba(4, 13, 10, 0.88);
  box-shadow:
    inset 0 0 60px rgba(215, 255, 115, 0.08),
    0 0 44px rgba(215, 255, 115, 0.06);
}

.radar-ring {
  position: absolute;
  inset: 17%;
  border: 1px solid rgba(215, 255, 115, 0.19);
  border-radius: 50%;
}

.radar-ring--two {
  inset: 34%;
}

.radar-core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 24px rgba(215, 255, 115, 0.9);
  transform: translate(-50%, -50%);
}

.radar-sweep {
  position: absolute;
  inset: 50% 50% 0 0;
  transform-origin: 100% 0;
  background: conic-gradient(from 270deg at 100% 0, rgba(215, 255, 115, 0.4), transparent 38deg);
  animation: radar-sweep 3.8s linear infinite;
}

@keyframes radar-sweep {
  to {
    transform: rotate(360deg);
  }
}

.verdict-meta {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: var(--acid);
  font-size: 0.66rem;
  font-weight: 800;
}

.verdict-copy h2 {
  margin: 24px 0 18px;
  max-width: 15ch;
  font-size: clamp(2.4rem, 5vw, 4.9rem);
  font-weight: 540;
  letter-spacing: -0.055em;
  line-height: 1;
}

.verdict-copy > p {
  max-width: 670px;
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.verdict-actions {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-top: 32px;
}

.primary-action,
.command-card button {
  min-height: 44px;
  border: 1px solid var(--acid);
  border-radius: 999px;
  padding: 10px 18px;
  color: var(--bg);
  background: var(--acid);
  font-weight: 800;
  cursor: pointer;
}

.primary-action:disabled {
  cursor: wait;
  opacity: 0.58;
}

.auto-refresh {
  color: var(--muted);
  font-size: 0.76rem;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-top: 0;
}

.summary-grid article {
  min-height: 170px;
  padding: 28px;
  border-left: 1px solid var(--line);
}

.summary-grid article:first-child {
  border-left: 0;
}

.summary-grid span {
  color: var(--muted);
  font-size: 0.62rem;
}

.summary-grid strong {
  display: block;
  margin: 18px 0 12px;
  color: var(--acid);
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 500;
  letter-spacing: -0.06em;
}

.summary-grid small {
  color: var(--muted);
  line-height: 1.5;
}

.summary-private strong {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  letter-spacing: 0.03em;
}

.window-bar {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: center;
  padding: 40px 0;
  border-bottom: 1px solid var(--line);
}

.window-bar span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.62rem;
}

.window-bar strong {
  font-size: 1.35rem;
}

.window-buttons {
  display: flex;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.window-buttons button {
  min-width: 72px;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.window-buttons button[aria-pressed="true"] {
  color: var(--bg);
  background: var(--acid);
  font-weight: 800;
}

.account-check,
.method-section {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: clamp(42px, 9vw, 120px);
  padding: 96px 0;
  border-bottom: 1px solid var(--line);
}

.account-check h2,
.section-head h2,
.method-section h2 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 540;
  letter-spacing: -0.05em;
  line-height: 1.05;
}

.account-check p:not(.section-kicker),
.method-grid p {
  color: var(--muted);
  line-height: 1.8;
}

.command-card {
  display: grid;
  align-content: center;
  justify-items: start;
  min-height: 260px;
  padding: 34px;
  border: 1px solid rgba(215, 255, 115, 0.3);
  border-radius: 14px;
  background: var(--panel-strong);
}

.command-card span {
  color: var(--muted);
  font-size: 0.62rem;
}

.command-card code {
  margin: 18px 0 24px;
  color: var(--acid);
  font-size: clamp(2.8rem, 7vw, 5.6rem);
  letter-spacing: -0.07em;
}

.command-card small {
  margin-top: 18px;
  color: var(--muted);
  line-height: 1.55;
}

.feed-section,
.sources-section {
  padding: 96px 0;
  border-bottom: 1px solid var(--line);
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  align-items: end;
  margin-bottom: 36px;
}

.section-head > p {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
  text-align: right;
  line-height: 1.65;
}

.event-list {
  display: grid;
  gap: 12px;
}

.event-card {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr) 150px;
  gap: 28px;
  align-items: start;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(13, 24, 20, 0.72);
}

.event-kind {
  color: var(--acid);
  font-size: 0.62rem;
  font-weight: 800;
}

.event-card--implementation .event-kind {
  color: var(--amber);
}

.event-card--pending .event-kind {
  color: var(--amber);
}

.event-card--reset {
  border-color: rgba(215, 255, 115, 0.34);
  background:
    linear-gradient(90deg, rgba(215, 255, 115, 0.07), transparent 42%),
    rgba(13, 24, 20, 0.82);
}

.event-card--incident .event-kind,
.event-card--error .event-kind {
  color: var(--red);
}

.event-card h3 {
  margin: 0 0 10px;
  font-size: clamp(1.25rem, 2.3vw, 1.8rem);
  font-weight: 600;
  letter-spacing: -0.025em;
}

.event-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.event-meta {
  display: grid;
  gap: 10px;
  justify-items: end;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.68rem;
  text-align: right;
}

.event-meta a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--acid);
}

.source-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.source-card {
  min-height: 220px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(13, 24, 20, 0.72);
}

.source-state {
  color: var(--acid);
  font-size: 0.61rem;
  font-weight: 800;
}

.source-card[data-state="error"] .source-state,
.source-card[data-state="stale"] .source-state,
.source-card[data-state="fallback-stale"] .source-state {
  color: var(--red);
}

.source-card[data-state="fallback"] .source-state {
  color: var(--amber);
}

.source-card[data-state="live"] {
  border-color: rgba(215, 255, 115, 0.3);
}

.source-card h3 {
  margin: 34px 0 12px;
  font-size: 1.35rem;
}

.source-card p {
  min-height: 4.8em;
  margin: 0 0 24px;
  color: var(--muted);
  line-height: 1.6;
}

.source-card a,
.method-grid a,
.noscript-note a {
  color: var(--acid);
  text-underline-offset: 4px;
}

.source-card > a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.method-section {
  grid-template-columns: minmax(260px, 0.7fr) minmax(0, 1.3fr);
}

.method-section > .section-kicker {
  grid-column: 1;
  margin-bottom: 0;
}

.method-section > h2 {
  grid-column: 1;
}

.method-grid {
  display: grid;
  grid-column: 2;
  grid-row: 1 / span 2;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px;
  align-self: end;
}

.method-grid p {
  margin: 0;
}

.method-grid code,
.noscript-note code {
  color: var(--acid);
}

.noscript-note {
  padding: 24px;
  border: 1px solid var(--red);
  color: var(--muted);
  line-height: 1.7;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 30px 0 42px;
  color: var(--muted);
  font-size: 0.62rem;
}

footer button {
  min-height: 44px;
  border: 0;
  color: var(--acid);
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}

@media (max-width: 820px) {
  .hero,
  .account-check,
  .method-section {
    grid-template-columns: 1fr;
  }

  .method-section > .section-kicker,
  .method-section > h2,
  .method-grid {
    grid-column: auto;
    grid-row: auto;
  }

  .hero {
    gap: 36px;
  }

  .verdict-panel {
    grid-template-columns: 210px 1fr;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .summary-grid article:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .summary-grid article:nth-child(4) {
    border-top: 1px solid var(--line);
  }

  .source-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .source-card {
    min-height: 0;
  }
}

@media (max-width: 620px) {
  .topbar,
  main,
  footer {
    width: min(100% - 28px, 1180px);
  }

  .topbar {
    min-height: 72px;
  }

  .live-mark {
    max-width: 15ch;
    text-align: right;
    line-height: 1.5;
  }

  .hero {
    padding: 64px 0 48px;
  }

  .hero h1 {
    font-size: clamp(3.2rem, 16vw, 5rem);
  }

  .verdict-panel {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 24px;
  }

  .radar-visual {
    width: 180px;
  }

  .verdict-meta,
  .verdict-actions,
  .window-bar,
  .section-head,
  footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .verdict-meta {
    margin-top: 12px;
  }

  .verdict-actions {
    display: flex;
  }

  .summary-grid article {
    min-height: 145px;
    padding: 22px;
  }

  .window-bar {
    display: flex;
  }

  .window-buttons {
    width: 100%;
  }

  .window-buttons button {
    flex: 1;
  }

  .account-check,
  .feed-section,
  .sources-section,
  .method-section {
    padding: 72px 0;
  }

  .event-card {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 22px;
  }

  .event-meta {
    justify-items: start;
    text-align: left;
  }

  .section-head {
    display: flex;
    gap: 20px;
  }

  .section-head > p {
    text-align: left;
  }

  .method-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .source-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
