:root {
  --bg: #f4f7f8;
  --surface: #ffffff;
  --surface-soft: #f8faf9;
  --ink: #111827;
  --muted: #5f6b7a;
  --line: #dbe3e7;
  --line-strong: #c4d0d6;
  --accent: #0f766e;
  --accent-strong: #115e59;
  --accent-soft: #e5f5f2;
  --warning: #fff8e8;
  --warning-line: #ead6a8;
  --ad-bg: #f7f9fa;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 18px 45px rgba(15, 23, 42, 0.08);
  --radius: 8px;
  --font-body: "Aptos", "Segoe UI", sans-serif;
  --font-display: "Source Serif 4", Georgia, serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(229, 245, 242, 0.78) 0, rgba(244, 247, 248, 0) 360px),
    var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.62;
}

a {
  color: var(--accent-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: #0b4d48;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 20;
  padding: 10px 12px;
  background: var(--ink);
  color: #fff;
  border-radius: 6px;
}

.skip-link:focus {
  top: 12px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(219, 227, 231, 0.9);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 7px;
  background: var(--accent-strong);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.main-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  font-size: 0.9rem;
}

.main-nav a {
  padding: 8px 10px;
  border-radius: 6px;
  color: #334155;
  text-decoration: none;
}

.main-nav a:hover {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  gap: 24px;
  width: min(1220px, calc(100% - 32px));
  margin: 28px auto;
}

main,
.sidebar,
.site-footer {
  min-width: 0;
}

.page,
.sidebar-panel,
.site-footer {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.page {
  padding: clamp(18px, 3vw, 34px);
}

.hero-panel,
.page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.75fr);
  gap: 26px;
  align-items: stretch;
  margin: -8px -8px 30px;
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid #c8ded8;
  border-radius: 10px;
  background:
    linear-gradient(135deg, #eef8f5 0%, #ffffff 58%),
    var(--surface);
}

.compact-hero {
  grid-template-columns: minmax(0, 1fr) 180px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  color: var(--ink);
  line-height: 1.18;
}

h1 {
  max-width: 880px;
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.7rem);
  font-weight: 760;
  letter-spacing: 0;
}

h2 {
  margin: 34px 0 14px;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2vw, 1.7rem);
}

h3 {
  margin: 0 0 7px;
  font-size: 1.02rem;
}

.lead {
  max-width: 820px;
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.button-link.primary {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
  color: #fff;
}

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

.status-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.status-strip div,
.range-card,
.winner-card,
.empty-state {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  box-shadow: var(--shadow-sm);
}

.status-strip span,
.winner-card span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.status-strip strong,
.winner-card strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 1.1rem;
}

.hero-stat,
.ticker-badge,
.versus-card {
  display: grid;
  align-content: center;
  min-height: 108px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-sm);
}

.hero-stat span,
.ticker-badge span,
.ticker-badge small,
.versus-card span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.hero-stat strong,
.ticker-badge strong,
.versus-card strong {
  display: block;
  margin-top: 6px;
  font-size: 1.65rem;
  line-height: 1.1;
}

.versus-card {
  justify-items: center;
  text-align: center;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 0.84rem;
}

.breadcrumbs a {
  color: var(--muted);
}

.metric-grid,
.card-grid,
.insight-grid,
.split {
  display: grid;
  gap: 14px;
}

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

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

.insight-grid,
.split {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric-card,
.insight-card {
  display: block;
  min-height: 104px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  box-shadow: var(--shadow-sm);
}

.metric-card span,
.metric-card small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.metric-card strong {
  display: block;
  margin-top: 7px;
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1.2;
}

.link-card {
  color: var(--ink);
  text-decoration: none;
}

.link-card:hover {
  border-color: #9fb8b1;
  transform: translateY(-1px);
}

.link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.link-list a {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: #243244;
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
}

.link-list a:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.dashboard-band {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 30px;
}

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

.insight-list li {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

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

th {
  background: #eef5f3;
  color: #243244;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

tr:hover td {
  background: #fbfdfc;
}

.sidebar {
  display: grid;
  align-content: start;
  gap: 16px;
}

.sidebar-panel {
  padding: 18px;
}

.sidebar-panel h2 {
  margin-top: 0;
  font-size: 1.18rem;
}

.sidebar-panel a {
  display: block;
  margin-top: 10px;
  font-weight: 650;
}

.trust-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.notice {
  padding: 18px;
  border: 1px solid var(--warning-line);
  border-radius: var(--radius);
  background: var(--warning);
}

.data-status {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 22px 0;
  padding: 14px;
  border: 1px solid #bfd2c7;
  border-radius: var(--radius);
  background: #edf6f1;
}

.range-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.86rem;
}

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

.range-track {
  position: relative;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #dbeafe, #99f6e4, #fde68a);
  overflow: hidden;
}

.range-track span {
  position: absolute;
  top: -4px;
  width: 4px;
  height: 20px;
  border-radius: 999px;
  background: var(--ink);
  transform: translateX(-50%);
}

.sparkline {
  width: 100%;
  max-width: 360px;
  height: 86px;
  margin-top: 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.sparkline polyline {
  fill: none;
  stroke: var(--accent-strong);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.empty-state {
  margin-top: 12px;
  color: var(--muted);
  font-weight: 650;
}

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

.winner-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.data-status p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.disclaimer-panel {
  margin-top: 28px;
}

.sitemap-groups {
  display: grid;
  gap: 18px;
}

.sitemap-group {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.faq-item {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.faq-item p {
  margin: 0;
  color: var(--muted);
}

.calculator {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  box-shadow: var(--shadow-sm);
}

.calculator label {
  display: grid;
  gap: 6px;
  color: #344256;
  font-size: 0.86rem;
  font-weight: 750;
}

.calculator input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #b9c7ce;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.calculator input:focus {
  outline: 3px solid rgba(15, 118, 110, 0.18);
  border-color: var(--accent);
}

.calculator button {
  min-height: 46px;
  padding: 12px 16px;
  border: 0;
  border-radius: 6px;
  background: var(--accent-strong);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.calculator button:hover {
  background: #0b4d48;
}

.calculator output {
  display: grid;
  align-items: center;
  min-height: 46px;
  padding: 12px;
  border: 1px solid #b8d5cf;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 800;
}

.site-footer {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto 32px;
  padding: 24px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 0.88rem;
}

.footer-links a {
  font-weight: 650;
}

.disclaimer {
  max-width: 1020px;
  color: var(--muted);
  font-size: 0.94rem;
}

@media (max-width: 1000px) {
  .layout {
    grid-template-columns: 1fr;
  }

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

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

  .hero-panel,
  .page-hero,
  .compact-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 15px;
  }

  .header-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .main-nav {
    justify-content: flex-start;
    width: 100%;
  }

  .main-nav a {
    padding: 7px 8px;
  }

  .layout {
    width: min(100% - 20px, 1220px);
    margin-top: 18px;
  }

  .page {
    padding: 16px;
  }

  .hero-panel,
  .page-hero {
    margin: -4px -4px 24px;
    padding: 20px;
  }

  .hero-stat-grid,
  .status-strip,
  .dashboard-band,
  .metric-grid,
  .card-grid,
  .insight-grid,
  .split,
  .data-status,
  .calculator,
  .sidebar {
    grid-template-columns: 1fr;
  }

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

  .hero-actions {
    flex-direction: column;
  }

  .button-link {
    width: 100%;
  }

  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  th,
  td {
    padding: 11px;
  }

  .site-footer {
    width: min(100% - 20px, 1220px);
    padding: 18px;
  }
}
