:root {
  color-scheme: light;
  --ink: #17211c;
  --muted: #5c6b63;
  --line: #d9e2dc;
  --paper: #fbfcf8;
  --panel: #ffffff;
  --blue: #2357d9;
  --green: #0d7f61;
  --gold: #9b6b00;
  --rose: #b3385a;
  --shadow: 0 18px 50px rgba(30, 45, 38, 0.10);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 56px;
  padding: 0 max(16px, calc((100vw - 1160px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(251, 252, 248, 0.94);
  backdrop-filter: blur(10px);
}

.topbar a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 680;
}

.topbar .brand {
  margin-right: auto;
  color: var(--green);
  font-weight: 800;
}

main {
  width: min(1160px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

a {
  color: var(--blue);
}

.intro {
  min-height: min(680px, calc(100vh - 44px));
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  gap: 36px;
  align-items: center;
  padding-bottom: 28px;
}

.intro-copy {
  max-width: 640px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(2.6rem, 8vw, 5.8rem);
  line-height: 0.94;
  letter-spacing: 0;
  max-width: 9ch;
}

h2 {
  margin: 0 0 16px;
  font-size: clamp(1.3rem, 3vw, 2rem);
  line-height: 1.1;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 8px;
  font-size: 1.02rem;
  letter-spacing: 0;
}

.lede {
  margin: 22px 0 0;
  max-width: 58ch;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
}

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

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.stats span {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 0 12px;
  color: var(--muted);
}

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

.actions a,
.surface {
  min-height: 44px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  text-decoration: none;
}

.actions a {
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  padding: 0 14px;
  font-weight: 720;
}

.actions a:first-child {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.beacon-map {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel {
  border-top: 1px solid var(--line);
  padding: 28px 0;
}

.traffic-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(340px, 1.1fr);
  gap: 24px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: clamp(18px, 4vw, 34px);
  margin: 0 0 30px;
}

.traffic-panel h2 {
  margin: 0;
  color: var(--blue);
  font-size: clamp(4.2rem, 14vw, 9rem);
  line-height: 0.9;
  letter-spacing: 0;
}

.traffic-caption,
.traffic-note {
  margin: 12px 0 0;
  color: var(--muted);
}

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

.traffic-card {
  min-height: 116px;
  display: grid;
  align-content: space-between;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf7;
  padding: 14px;
}

.traffic-card span {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 680;
}

.traffic-card strong {
  color: var(--ink);
  font-size: clamp(1.8rem, 5vw, 3rem);
  line-height: 1;
  letter-spacing: 0;
}

.traffic-note {
  grid-column: 1 / -1;
  max-width: 88ch;
  font-size: 0.95rem;
}

.article-main {
  width: min(920px, calc(100vw - 32px));
}

.article {
  padding: 34px 0 64px;
}

.article h1 {
  max-width: 11ch;
}

.article-section {
  border-top: 1px solid var(--line);
  padding: 26px 0;
}

.article-section p {
  max-width: 78ch;
  color: var(--muted);
}

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

.surface {
  display: grid;
  gap: 8px;
  align-content: start;
  border-radius: 8px;
  padding: 16px;
}

.surface span {
  font-weight: 760;
}

.surface small,
.section-note,
.keyword-group p {
  color: var(--muted);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px;
}

.split .panel {
  min-width: 0;
}

.checklist,
.metrics,
.keyword-group ul {
  margin: 0;
  padding-left: 1.1rem;
}

.checklist li,
.metrics li,
.keyword-group li {
  margin: 7px 0;
}

.metrics {
  columns: 2;
}

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

.keyword-group {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 18px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

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

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

th {
  color: var(--ink);
  background: #f3f6f4;
}

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

code {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f3f6f4;
  padding: 0.12rem 0.3rem;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.92em;
}

@media (max-width: 860px) {
  main {
    width: min(100% - 24px, 700px);
    padding-top: 18px;
  }

  .intro,
  .split,
  .keyword-grid,
  .traffic-panel,
  .surface-grid {
    grid-template-columns: 1fr;
  }

  .intro {
    min-height: auto;
    gap: 22px;
  }

  h1 {
    max-width: none;
  }

  .metrics {
    columns: 1;
  }

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

  .topbar {
    position: static;
    flex-wrap: wrap;
    gap: 10px 14px;
    padding: 12px;
  }

  .topbar .brand {
    flex-basis: 100%;
  }

  .article h1 {
    max-width: none;
  }
}
