:root {
  --bg: #dfe8ec;
  --panel: #d4e0e5;
  --panel-strong: #c7d5dc;
  --text: #2d3a40;
  --muted: #6d7c83;
  --line: #b7c8d0;
  --accent: #557986;
  --accent-2: #8aa3ad;
  --danger: #9a5b63;
  --shadow: rgba(45, 58, 64, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

code {
  padding: 0.12rem 0.35rem;
  border-radius: 4px;
  background: var(--panel-strong);
  color: var(--text);
  font-size: 0.92em;
}

.site-header {
  width: 100%;
  border-bottom: 1px solid var(--line);
}

.nav {
  width: min(920px, calc(100% - 32px));
  min-height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.brand {
  font-weight: 700;
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 0.94rem;
}

.nav-links a {
  padding: 6px 0;
}

.nav-links a.active,
.nav-links a:hover {
  color: var(--text);
}

.page {
  width: 100%;
  padding: 72px 16px 96px;
}

.column {
  width: min(640px, 100%);
  margin: 0 auto;
}

.column.wide {
  width: min(860px, 100%);
}

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

h1 {
  margin: 0 0 22px;
  color: var(--text);
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.04;
  letter-spacing: 0;
}

p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 1.04rem;
}

.hero-image {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  margin: 34px 0;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 50px var(--shadow);
}

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

.stat {
  min-height: 82px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.stat b {
  display: block;
  color: var(--text);
  font-size: 1.45rem;
  line-height: 1.1;
}

.stat span {
  color: var(--muted);
  font-size: 0.82rem;
}

.chart-shell,
.table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 14px 36px var(--shadow);
}

.chart-head {
  min-height: 52px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.chart-head p {
  margin: 0;
  font-size: 0.9rem;
}

button {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  background: var(--panel-strong);
  font: inherit;
  cursor: pointer;
}

button:hover {
  border-color: var(--accent-2);
}

#stats-chart {
  display: block;
  width: 100%;
  height: 420px;
}

.axis,
.grid-line {
  stroke: var(--line);
  stroke-width: 1;
}

.axis-label,
.tick-label {
  fill: var(--muted);
  font-size: 12px;
}

.line-series {
  fill: none;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: stroke;
}

.line-hit-area {
  fill: none;
  stroke: transparent;
  stroke-width: 14;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feedback-dot {
  fill: var(--danger);
}

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

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

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

th {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

td {
  color: var(--text);
}

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

tbody tr {
  cursor: pointer;
}

tbody tr:hover,
tbody tr.selected,
tbody tr.active {
  background: var(--panel-strong);
}

tbody tr.dimmed {
  opacity: 0.28;
}

tbody tr:focus {
  outline: 2px solid var(--accent-2);
  outline-offset: -2px;
}

@media (max-width: 720px) {
  .page {
    padding-top: 44px;
  }

  .nav {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 12px 0;
  }

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

  #stats-chart {
    height: 340px;
  }
}
