:root {
  color-scheme: light;
  --bg: #f5f2eb;
  --surface: rgba(255, 255, 255, 0.76);
  --surface-solid: #fffdf8;
  --ink: #13231d;
  --muted: #65716c;
  --line: rgba(19, 35, 29, 0.14);
  --accent: #ff5c35;
  --accent-strong: #e84620;
  --green: #1e7b59;
  --soft-green: #dcece3;
  --shadow: 0 28px 80px rgba(27, 49, 40, 0.12);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101915;
  --surface: rgba(25, 40, 34, 0.78);
  --surface-solid: #192822;
  --ink: #f4f0e7;
  --muted: #aeb9b4;
  --line: rgba(240, 246, 241, 0.14);
  --accent: #ff7654;
  --accent-strong: #ff8b6e;
  --green: #70d4aa;
  --soft-green: #203e32;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 92, 53, 0.14), transparent 25rem),
    radial-gradient(circle at 88% 42%, rgba(30, 123, 89, 0.13), transparent 28rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  transition: color 180ms ease, background-color 180ms ease;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  opacity: 0.35;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 70%);
  pointer-events: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

button {
  font: inherit;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  color: #fff;
  background: var(--accent-strong);
  border-radius: 8px;
  transform: translateY(-160%);
}

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

.page-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

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

.brand {
  display: inline-flex;
  gap: 11px;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-decoration: none;
}

.brand-mark {
  width: 13px;
  height: 13px;
  background: var(--accent);
  border: 3px solid var(--ink);
  border-radius: 50%;
  box-shadow: 5px 5px 0 var(--soft-green);
}

.theme-toggle {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 9px 13px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease;
}

.theme-toggle:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.theme-icon {
  color: var(--accent);
  font-size: 1.15rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: clamp(48px, 8vw, 108px);
  align-items: center;
  min-height: 680px;
  padding: 78px 0 84px;
}

.eyebrow {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0 0 22px;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.18em;
}

.eyebrow span {
  width: 28px;
  height: 2px;
  background: currentColor;
}

h1,
h2,
h3,
p {
  text-wrap: pretty;
}

h1 {
  max-width: 680px;
  margin: 0;
  font-family: Georgia, "Noto Serif SC", "Songti SC", serif;
  font-size: clamp(4rem, 8vw, 7.6rem);
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.065em;
}

h1 em {
  display: block;
  color: var(--accent);
  font-weight: inherit;
}

.hero-description {
  max-width: 620px;
  margin: 34px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.18rem);
  line-height: 1.9;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.button {
  display: inline-flex;
  gap: 34px;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-3px);
}

.button:focus-visible,
.theme-toggle:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent);
  outline-offset: 3px;
}

.button-primary {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 12px 28px rgba(232, 70, 32, 0.2);
}

.button-primary:hover {
  background: var(--accent-strong);
  box-shadow: 0 16px 36px rgba(232, 70, 32, 0.28);
}

.button-primary.is-tested {
  background: var(--green);
  animation: button-pop 360ms ease;
}

.button-secondary {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line);
}

.quick-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 30px 0 0;
  padding: 0;
  color: var(--muted);
  font-size: 0.88rem;
  list-style: none;
}

.quick-facts span {
  color: var(--green);
  font-weight: 900;
}

.status-panel {
  position: relative;
  overflow: hidden;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.status-panel::after {
  position: absolute;
  right: -80px;
  bottom: -80px;
  width: 220px;
  height: 220px;
  content: "";
  background: rgba(255, 92, 53, 0.08);
  border-radius: 50%;
  pointer-events: none;
}

.panel-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.live-pill {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  padding: 7px 10px;
  color: var(--green);
  background: var(--soft-green);
  border-radius: 999px;
  letter-spacing: 0.1em;
}

.live-pill i {
  width: 7px;
  height: 7px;
  background: currentColor;
  border-radius: 50%;
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--green) 14%, transparent);
  animation: live-pulse 1.8s infinite;
}

.signal-visual {
  position: relative;
  display: grid;
  place-items: center;
  height: 285px;
}

.signal-core {
  position: relative;
  z-index: 2;
  display: grid;
  width: 112px;
  height: 112px;
  place-items: center;
  color: #fff;
  background: var(--ink);
  border: 8px solid var(--surface-solid);
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line), 0 16px 30px rgba(17, 34, 27, 0.18);
}

.signal-core span {
  font-family: Georgia, serif;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.orbit {
  position: absolute;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.orbit::before {
  position: absolute;
  top: 50%;
  left: -5px;
  width: 10px;
  height: 10px;
  content: "";
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 13%, transparent);
}

.orbit-one {
  width: 190px;
  height: 190px;
  animation: orbit-spin 10s linear infinite;
}

.orbit-two {
  width: 255px;
  height: 255px;
  animation: orbit-spin 17s linear reverse infinite;
}

.orbit-two::before {
  top: 14%;
  left: auto;
  right: 18px;
  background: var(--green);
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.status-item {
  position: relative;
  z-index: 1;
  padding: 14px;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.status-item strong,
.status-item span {
  display: block;
}

.status-item strong {
  margin-top: 6px;
  font-size: 0.82rem;
}

.status-name {
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 800;
}

.timestamp {
  position: relative;
  z-index: 1;
  margin: 16px 2px 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.timestamp time {
  color: var(--ink);
  font-weight: 700;
}

.checklist {
  padding: 96px 0 110px;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 42px;
}

.section-heading .eyebrow {
  margin: 0;
}

h2 {
  max-width: 620px;
  margin: 0;
  font-family: Georgia, "Noto Serif SC", "Songti SC", serif;
  font-size: clamp(2rem, 4vw, 3.6rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.test-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.test-card {
  min-height: 230px;
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  transition: transform 180ms ease, border-color 180ms ease;
}

.test-card:hover {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
  transform: translateY(-5px);
}

.card-number {
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 800;
}

.test-card h3 {
  margin: 48px 0 12px;
  font-size: 1.15rem;
}

.test-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.8;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 0 38px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
}

.site-footer p {
  margin: 0;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  display: flex;
  gap: 12px;
  align-items: center;
  max-width: calc(100% - 48px);
  padding: 15px 18px;
  color: #fff;
  background: #173e30;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast-check {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: #173e30;
  background: #9ce2c3;
  border-radius: 50%;
  font-weight: 900;
}

.error-body {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.error-card {
  width: min(620px, 100%);
  padding: clamp(32px, 7vw, 70px);
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.error-code {
  margin: 0;
  color: var(--accent);
  font-family: Georgia, serif;
  font-size: clamp(5rem, 18vw, 10rem);
  line-height: 0.9;
}

.error-card h1 {
  margin: 24px 0 16px;
  font-family: inherit;
  font-size: clamp(1.7rem, 5vw, 2.6rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.error-card p:not(.error-code) {
  margin: 0 0 28px;
  color: var(--muted);
  line-height: 1.8;
}

@keyframes orbit-spin {
  to { transform: rotate(360deg); }
}

@keyframes live-pulse {
  50% { opacity: 0.45; transform: scale(0.72); }
}

@keyframes button-pop {
  50% { transform: scale(0.96); }
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 60px;
    padding-top: 62px;
  }

  .status-panel {
    width: min(560px, 100%);
  }

  .section-heading {
    display: block;
  }

  .section-heading .eyebrow {
    margin-bottom: 18px;
  }

  .test-cards {
    grid-template-columns: 1fr;
  }

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

  .test-card h3 {
    margin-top: 28px;
  }
}

@media (max-width: 560px) {
  .page-shell {
    width: min(100% - 28px, 1180px);
  }

  .site-header {
    min-height: 76px;
  }

  .theme-toggle {
    width: 42px;
    height: 42px;
    justify-content: center;
    padding: 0;
  }

  #theme-label {
    position: absolute;
    overflow: hidden;
    width: 1px;
    height: 1px;
    clip: rect(0 0 0 0);
  }

  h1 {
    font-size: clamp(3.7rem, 20vw, 5.8rem);
  }

  .hero {
    min-height: auto;
    padding-bottom: 72px;
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .status-panel {
    padding: 18px;
    border-radius: 22px;
  }

  .signal-visual {
    height: 240px;
  }

  .orbit-one {
    width: 165px;
    height: 165px;
  }

  .orbit-two {
    width: 220px;
    height: 220px;
  }

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

  .status-item strong,
  .status-name {
    display: inline;
  }

  .status-item strong {
    margin-left: 8px;
  }

  .checklist {
    padding: 72px 0 80px;
  }

  .site-footer {
    display: block;
  }

  .site-footer p + p {
    margin-top: 8px;
  }

  .toast {
    right: 14px;
    bottom: 14px;
    max-width: calc(100% - 28px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
