:root {
  --bg: #0b0f14;
  --surface: #131a22;
  --surface-2: #18222e;
  --border: #233244;
  --border-strong: #324760;
  --ink: #e6edf3;
  --ink-2: #b4c4d4;
  --ink-muted: #8ea4ba;
  --cyan: #22d3ee;
  --cyan-soft: rgba(34, 211, 238, 0.12);
  --emerald: #34d399;
  --emerald-soft: rgba(52, 211, 153, 0.13);
  --amber: #fbbf24;
  --amber-soft: rgba(251, 191, 36, 0.12);
  --rose: #fb7185;
  --rose-soft: rgba(251, 113, 133, 0.12);
  --radius: 10px;
  --radius-sm: 6px;
  --max-w: 1120px;
  --font-display: "Chakra Petch", system-ui, sans-serif;
  --font-body: "Red Hat Text", system-ui, -apple-system, sans-serif;
  --font-mono: "Azeret Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.62;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 420px at 14% -8%, rgba(34, 211, 238, 0.08), transparent 65%),
    radial-gradient(760px 380px at 88% -10%, rgba(52, 211, 153, 0.06), transparent 62%),
    var(--bg);
  color: var(--ink);
}

a {
  color: var(--cyan);
  text-decoration: underline;
  text-decoration-color: rgba(34, 211, 238, 0.35);
  text-underline-offset: 3px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

a:hover {
  color: #67e8f9;
  text-decoration-color: #67e8f9;
}

.wrap {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(11, 15, 20, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
  padding: 10px 0;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.08rem;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.brand:hover {
  color: var(--cyan);
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.2), rgba(52, 211, 153, 0.18));
  border: 1px solid rgba(34, 211, 238, 0.42);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--emerald);
  background: var(--emerald-soft);
  border: 1px solid rgba(52, 211, 153, 0.3);
  border-radius: 4px;
  padding: 2px 6px;
  letter-spacing: 0.04em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  white-space: nowrap;
}

.site-nav a:hover {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--border);
}

.site-nav a[aria-current="page"] {
  color: var(--cyan);
  background: var(--cyan-soft);
  border-color: rgba(34, 211, 238, 0.32);
}

/* Hero */
.hero {
  padding: 38px 0 26px;
  border-bottom: 1px solid var(--border);
}

.meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.meta-pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 4px 9px;
  letter-spacing: 0.02em;
}

.meta-pill.accent {
  color: var(--emerald);
  background: var(--emerald-soft);
  border-color: rgba(52, 211, 153, 0.34);
}

.meta-pill.cyan {
  color: var(--cyan);
  background: var(--cyan-soft);
  border-color: rgba(34, 211, 238, 0.34);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.2;
  letter-spacing: 0.01em;
  margin-top: 0;
}

h1 {
  font-size: clamp(1.72rem, 3.6vw, 2.55rem);
  font-weight: 700;
  margin-bottom: 14px;
  max-width: 28ch;
}

h2 {
  font-size: clamp(1.26rem, 2.3vw, 1.62rem);
  font-weight: 700;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

h3 {
  font-size: 1.08rem;
  font-weight: 600;
  margin: 0 0 8px;
}

.lead {
  font-size: 1.04rem;
  color: var(--ink-2);
  max-width: 78ch;
  margin: 0 0 22px;
}

.lead strong {
  color: var(--ink);
}

.byline {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--ink-muted);
}

.byline strong {
  color: var(--ink-2);
  font-weight: 500;
}

/* Main sections */
main {
  padding: 28px 0 56px;
}

section {
  margin-bottom: 40px;
}

p {
  margin: 0 0 14px;
  max-width: 78ch;
  color: var(--ink-2);
}

p strong {
  color: var(--ink);
}

ul, ol {
  margin: 0 0 16px;
  padding-left: 20px;
  color: var(--ink-2);
  max-width: 78ch;
}

li {
  margin-bottom: 7px;
}

li strong {
  color: var(--ink);
}

/* KPI grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0 8px;
}

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.kpi-card.winner {
  border-color: rgba(52, 211, 153, 0.45);
  background: linear-gradient(180deg, rgba(52, 211, 153, 0.07), var(--surface) 60%);
}

.kpi-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  margin-bottom: 6px;
}

.kpi-val {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.15;
  margin-bottom: 4px;
}

.kpi-card.winner .kpi-val {
  color: var(--emerald);
}

.kpi-sub {
  font-size: 0.82rem;
  color: var(--ink-muted);
  line-height: 1.4;
}

/* Data tables */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 16px 0 18px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  min-width: 680px;
}

thead th {
  background: var(--surface-2);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: left;
  padding: 11px 11px;
  border-bottom: 1px solid var(--border-strong);
  vertical-align: bottom;
  line-height: 1.35;
}

tbody td {
  padding: 11px 11px;
  border-bottom: 1px solid var(--border);
  color: var(--ink-2);
  vertical-align: top;
  line-height: 1.45;
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr.row-top {
  background: rgba(52, 211, 153, 0.055);
}

tbody tr.row-top td:first-child {
  color: var(--ink);
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.num {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  white-space: nowrap;
  color: var(--ink);
}

.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.69rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.badge-win {
  color: #06281c;
  background: var(--emerald);
}

.badge-cyan {
  color: var(--cyan);
  background: var(--cyan-soft);
  border: 1px solid rgba(34, 211, 238, 0.34);
}

.badge-warn {
  color: var(--amber);
  background: var(--amber-soft);
  border: 1px solid rgba(251, 191, 36, 0.32);
}

.badge-muted {
  color: var(--ink-muted);
  background: rgba(142, 164, 186, 0.12);
  border: 1px solid var(--border);
}

/* Bar charts */
.chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 16px 0 20px;
}

.chart-title {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
  margin-bottom: 14px;
}

.bar-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.bar-row {
  display: grid;
  grid-template-columns: 168px 1fr 122px;
  align-items: center;
  gap: 12px;
}

.bar-name {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink);
}

.bar-track {
  height: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 99px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--cyan);
}

.bar-fill.win {
  background: var(--emerald);
}

.bar-fill.warn {
  background: var(--amber);
}

.bar-fill.high {
  background: var(--rose);
}

.bar-val {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-2);
  text-align: right;
  white-space: nowrap;
}

/* Cards & Grids */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 16px 0;
}

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

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.card.featured {
  border-color: rgba(52, 211, 153, 0.45);
  background: linear-gradient(180deg, rgba(52, 211, 153, 0.06), var(--surface) 42%);
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.score-pill {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--cyan);
  background: var(--cyan-soft);
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: 6px;
  padding: 3px 8px;
  white-space: nowrap;
}

.card.featured .score-pill {
  color: var(--emerald);
  background: var(--emerald-soft);
  border-color: rgba(52, 211, 153, 0.4);
}

.card-meta {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--ink-muted);
  margin-bottom: 12px;
}

.pc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.pc-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.pc-label.pro {
  color: var(--emerald);
}

.pc-label.con {
  color: var(--amber);
}

.pc-list {
  margin: 0;
  padding-left: 16px;
  font-size: 0.86rem;
  color: var(--ink-2);
}

.pc-list li {
  margin-bottom: 5px;
}

/* Report Index Cards */
.report-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.report-card:hover {
  border-color: var(--cyan);
  transform: translateY(-2px);
}

.report-card h3 {
  color: var(--ink);
  margin-bottom: 8px;
}

.report-card p {
  font-size: 0.88rem;
  color: var(--ink-muted);
  margin-bottom: 12px;
}

.report-cta {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--cyan);
}

/* Code blocks */
.code-block {
  background: #0d131a;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 14px 0 18px;
}

.code-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
}

pre {
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.55;
  color: #dbe8f5;
}

code {
  font-family: var(--font-mono);
  font-size: 0.84em;
  background: var(--surface-2);
  color: #7dd3fc;
  padding: 1px 5px;
  border-radius: 4px;
}

pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  font-size: inherit;
}

/* Callout box */
.callout {
  background: var(--surface);
  border: 1px solid rgba(34, 211, 238, 0.32);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 16px 0 20px;
}

.callout-title {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--cyan);
  margin-bottom: 6px;
}

.callout p:last-child {
  margin-bottom: 0;
}

/* FAQ blocks */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.faq-item h3 {
  font-size: 1rem;
  margin-bottom: 6px;
  color: var(--ink);
}

.faq-item p {
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 26px 0 38px;
  background: rgba(19, 26, 34, 0.55);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  font-size: 0.84rem;
  color: var(--ink-muted);
}

.footer-links {
  display: flex;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
}

.footer-links a {
  color: var(--ink-2);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--cyan);
}

/* Responsive */
@media (max-width: 900px) {
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid-2, .grid-3 {
    grid-template-columns: 1fr;
  }
  .pc-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .wrap {
    padding: 0 15px;
  }
  .hero {
    padding: 26px 0 20px;
  }
  .site-nav {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }
  .kpi-grid {
    grid-template-columns: 1fr;
  }
  .bar-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }
  .bar-val {
    text-align: left;
  }
  table {
    font-size: 0.82rem;
  }
}
