:root {
  color-scheme: dark;
  --bg: #080b12;
  --panel: rgba(18, 25, 39, 0.82);
  --panel-strong: rgba(28, 38, 58, 0.92);
  --line: rgba(155, 176, 210, 0.18);
  --text: #eef4ff;
  --muted: #9fb0c8;
  --accent: #58c7ff;
  --accent-2: #8a7dff;
  --green: #37d889;
  --red: #ff6677;
  --amber: #ffc857;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 0%, rgba(88, 199, 255, 0.22), transparent 28rem),
    linear-gradient(145deg, #080b12 0%, #101827 48%, #0b1420 100%);
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: #98e2ff;
}

code,
.mono {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.site-header {
  padding: 22px clamp(16px, 4vw, 48px) 34px;
  border-bottom: 1px solid var(--line);
}

.site-header.compact {
  padding-bottom: 24px;
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 auto;
  max-width: 1320px;
}

.brand {
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
}

.nav-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: 28px;
  align-items: end;
  margin: 58px auto 0;
  max-width: 1320px;
}

.hero h1,
.page-title h1 {
  margin: 6px 0 12px;
  font-size: clamp(34px, 6vw, 76px);
  line-height: 1.02;
}

.lead,
.page-title p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.eyebrow {
  margin: 0;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-metrics,
.panel,
.mini-card,
.stat {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-metrics {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 8px;
}

.hero-metrics div,
.stat {
  display: grid;
  gap: 6px;
}

.hero-metrics span,
.stat span,
.muted {
  color: var(--muted);
}

.hero-metrics strong {
  overflow-wrap: anywhere;
}

.layout {
  width: min(1320px, calc(100% - 32px));
  margin: 28px auto 44px;
}

.day-block {
  margin-bottom: 30px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.day-title,
.section-head,
.action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.day-title h2,
.section-head h2,
.mini-card h3,
.version-card h3 {
  margin: 0;
}

.panel,
.mini-card {
  border-radius: 8px;
  padding: 18px;
}

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

.stat {
  min-height: 86px;
  border-radius: 8px;
  padding: 16px;
}

.stat strong {
  font-size: 26px;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0;
}

.compact-list {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.compact-list li {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin-top: 14px;
}

table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: #c9d8ee;
  font-size: 13px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.04);
}

tbody tr:hover {
  background: rgba(88, 199, 255, 0.08);
}

.metric {
  color: var(--green);
  font-weight: 800;
}

.pill,
.button,
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 5px 10px;
  white-space: nowrap;
}

.pill {
  color: #dbeafe;
  border: 1px solid rgba(88, 199, 255, 0.38);
  background: rgba(88, 199, 255, 0.12);
}

.button {
  color: #06121f;
  font-weight: 800;
  background: linear-gradient(90deg, var(--green), var(--accent));
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge {
  font-size: 12px;
  border: 1px solid var(--line);
}

.badge-risk {
  color: #ffd9de;
  background: rgba(255, 102, 119, 0.18);
  border-color: rgba(255, 102, 119, 0.34);
}

.badge-good {
  color: #d6ffe9;
  background: rgba(55, 216, 137, 0.16);
  border-color: rgba(55, 216, 137, 0.34);
}

.badge-neutral {
  color: #e8ecff;
  background: rgba(138, 125, 255, 0.16);
  border-color: rgba(138, 125, 255, 0.32);
}

.empty,
.error-box {
  padding: 22px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.error-box {
  overflow-x: auto;
  color: #ffd9de;
  background: rgba(255, 102, 119, 0.08);
}

.page-title {
  max-width: 1320px;
  margin: 42px auto 0;
}

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

.version-grid > div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

footer {
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto 32px;
  color: var(--muted);
}

@media (max-width: 980px) {
  .hero,
  .mini-grid,
  .version-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  nav,
  .day-title,
  .section-head {
    align-items: flex-start;
  }

  .nav-links {
    justify-content: flex-start;
  }

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

  .hero h1,
  .page-title h1 {
    font-size: 38px;
  }
}
