:root {
  --ink: #171a19;
  --ink-soft: #292d2b;
  --paper: #f3f0e9;
  --paper-deep: #e8e1d6;
  --bone: #fffdf8;
  --copper: #bd6f4c;
  --copper-dark: #88482e;
  --sage: #667267;
  --sage-light: #dce2da;
  --blueprint: #586a76;
  --danger: #8c4e42;
  --line: rgba(23, 26, 25, 0.15);
  --line-dark: rgba(255, 255, 255, 0.14);
  --display: "Bodoni 72", Didot, "Baskerville Old Face", Baskerville, Georgia, serif;
  --body: Aptos, Candara, "Segoe UI", sans-serif;
  --mono: "Aptos Mono", Consolas, monospace;
  --shadow: 0 22px 60px rgba(31, 28, 23, 0.09);
  --radius: 2px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--ink);
  background:
    linear-gradient(90deg, transparent 0, transparent calc(100% - 1px), rgba(23, 26, 25, 0.035) calc(100% - 1px)) 0 0 / 72px 100%,
    var(--paper);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button { color: inherit; }
a { color: inherit; }

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 14px;
  color: var(--ink);
  background: var(--bone);
  transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }

:focus-visible {
  outline: 3px solid var(--copper);
  outline-offset: 3px;
}

.site-frame { min-height: 100vh; }

.masthead {
  position: relative;
  overflow: hidden;
  min-height: 470px;
  padding: 30px clamp(24px, 5vw, 76px) 0;
  color: #f7f2e8;
  background:
    radial-gradient(circle at 84% 20%, rgba(189, 111, 76, 0.2), transparent 25%),
    linear-gradient(125deg, #141817 0%, #1f2522 62%, #252a27 100%);
}

.masthead::after {
  content: "";
  position: absolute;
  top: 92px;
  right: -80px;
  width: min(48vw, 620px);
  height: 300px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  transform: skewX(-14deg);
  pointer-events: none;
}

.masthead-grid {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(255,255,255,.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.14) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(90deg, transparent 0, black 40%, black 100%);
}

.brand-row,
.hero-copy,
.period-ribbon {
  position: relative;
  z-index: 1;
  width: min(1400px, 100%);
  margin-inline: auto;
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  gap: 13px;
  align-items: center;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.48);
  color: #f5ede0;
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: -.08em;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  text-transform: uppercase;
}

.brand-copy strong { font-size: 13px; letter-spacing: .19em; }
.brand-copy small { margin-top: 5px; color: rgba(255,255,255,.58); font-size: 9px; letter-spacing: .28em; }

.privacy-mark {
  display: flex;
  gap: 9px;
  align-items: center;
  color: rgba(255,255,255,.65);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.privacy-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9eb4a0;
  box-shadow: 0 0 0 5px rgba(158,180,160,.12);
}

.hero-copy {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(230px, .6fr);
  gap: 64px;
  align-items: end;
  padding-top: 74px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 14px;
  color: var(--copper);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.hero-copy h1 {
  max-width: 850px;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(46px, 6vw, 88px);
  font-weight: 400;
  letter-spacing: -.055em;
  line-height: .91;
}

.hero-copy h1 em { color: #c9b8a0; font-weight: 400; }

.hero-note {
  max-width: 340px;
  margin: 0 0 8px;
  padding-left: 20px;
  border-left: 1px solid rgba(255,255,255,.3);
  color: rgba(255,255,255,.66);
  font-size: 14px;
  line-height: 1.65;
}

.period-ribbon {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 60px;
  border-top: 1px solid var(--line-dark);
  background: rgba(8, 10, 9, .25);
  backdrop-filter: blur(12px);
}

.period-block {
  min-height: 94px;
  padding: 20px 22px;
  border-right: 1px solid var(--line-dark);
}

.period-block:last-child { border-right: 0; }
.period-block small { display: block; margin-bottom: 6px; color: rgba(255,255,255,.45); font-size: 9px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.period-block strong { display: block; font-family: var(--display); font-size: 19px; font-weight: 400; letter-spacing: -.02em; }
.period-block span { color: rgba(255,255,255,.54); font-size: 11px; }

.loading-line { grid-column: 1 / -1; padding: 32px; color: rgba(255,255,255,.55); }

.view-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(243, 240, 233, .93);
  backdrop-filter: blur(16px);
}

.view-nav-inner {
  display: flex;
  align-items: stretch;
  width: min(1400px, calc(100% - clamp(32px, 8vw, 120px)));
  min-height: 66px;
  margin-inline: auto;
}

.view-tab {
  position: relative;
  flex: 0 0 auto;
  padding: 0 22px;
  border: 0;
  background: transparent;
  color: #676761;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.view-tab::after {
  content: "";
  position: absolute;
  right: 22px;
  bottom: -1px;
  left: 22px;
  height: 3px;
  background: var(--copper);
  transform: scaleX(0);
  transition: transform 180ms ease;
}

.view-tab:hover { color: var(--ink); }
.view-tab.is-active { color: var(--ink); }
.view-tab.is-active::after { transform: scaleX(1); }
.nav-rule { flex: 1; }
.build-label { display: grid; place-items: center; color: #88877f; font-family: var(--mono); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }

main {
  width: min(1400px, calc(100% - clamp(32px, 8vw, 120px)));
  min-height: 620px;
  margin-inline: auto;
  padding: clamp(46px, 6vw, 86px) 0 110px;
}

.view-enter { animation: rise-in 420ms cubic-bezier(.2,.75,.2,1) both; }
@keyframes rise-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

.view-heading {
  display: flex;
  gap: 40px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 42px;
}

.view-heading h2 {
  max-width: 780px;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(38px, 5vw, 64px);
  font-weight: 400;
  letter-spacing: -.045em;
  line-height: .98;
}

.view-heading > p {
  max-width: 410px;
  margin: 0;
  color: #6d6d66;
  font-size: 14px;
  line-height: 1.7;
}

.status-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, .6fr);
  overflow: hidden;
  margin-bottom: 36px;
  border: 1px solid var(--line);
  background: var(--bone);
  box-shadow: var(--shadow);
}

.status-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--copper);
}

.status-copy { padding: clamp(28px, 4vw, 52px); }
.status-copy h3 { max-width: 700px; margin: 0 0 16px; font-family: var(--display); font-size: clamp(28px, 3vw, 42px); font-weight: 400; letter-spacing: -.03em; }
.status-copy p { max-width: 720px; margin: 0; color: #666760; line-height: 1.7; }
.status-aside { display: flex; flex-direction: column; justify-content: center; padding: 28px 34px; border-left: 1px solid var(--line); background: #ebe6dc; }
.status-aside small { color: #73736d; font-size: 9px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.status-aside strong { margin: 8px 0 4px; font-family: var(--display); font-size: 27px; font-weight: 400; }
.status-aside span { color: #75756f; font-size: 12px; }

.metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 36px;
  border: 1px solid var(--line);
  background: var(--bone);
}

.metric-card {
  min-height: 154px;
  padding: 24px 22px;
  border-right: 1px solid var(--line);
}
.metric-card:last-child { border-right: 0; }
.metric-label { display: block; min-height: 30px; color: #77776f; font-size: 9px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.metric-value { display: block; margin: 12px 0 4px; font-family: var(--display); font-size: clamp(30px, 3vw, 42px); font-weight: 400; letter-spacing: -.04em; line-height: 1; }
.metric-note { color: #8b8982; font-size: 11px; }
.metric-card.is-unavailable .metric-value { color: #a7a39a; }

.content-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(290px, .65fr); gap: 28px; }
.panel { border: 1px solid var(--line); background: rgba(255,253,248,.86); }
.panel-header { display: flex; gap: 22px; align-items: start; justify-content: space-between; padding: 24px 26px; border-bottom: 1px solid var(--line); }
.panel-header h3 { margin: 0; font-family: var(--display); font-size: 24px; font-weight: 400; letter-spacing: -.025em; }
.panel-header p { margin: 4px 0 0; color: #83817a; font-size: 11px; }
.panel-body { padding: 26px; }

.method-list { display: grid; gap: 17px; margin: 0; padding: 0; list-style: none; counter-reset: method; }
.method-list li { position: relative; padding: 0 0 17px 38px; border-bottom: 1px solid var(--line); }
.method-list li:last-child { padding-bottom: 0; border-bottom: 0; }
.method-list li::before { counter-increment: method; content: "0" counter(method); position: absolute; top: 1px; left: 0; color: var(--copper); font-family: var(--mono); font-size: 10px; }
.method-list strong { display: block; margin-bottom: 3px; font-size: 13px; }
.method-list span { color: #76766f; font-size: 12px; }

.next-steps { display: grid; gap: 0; }
.next-step { display: grid; grid-template-columns: 48px 1fr; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.next-step:last-child { border-bottom: 0; }
.step-number { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid var(--line); color: var(--copper-dark); font-family: var(--display); }
.next-step strong { display: block; margin-bottom: 3px; font-size: 13px; }
.next-step p { margin: 0; color: #74746e; font-size: 12px; }

.lane-switch { display: inline-flex; padding: 4px; border: 1px solid var(--line); background: #e9e4da; }
.lane-switch button { padding: 8px 12px; border: 0; background: transparent; color: #77766f; cursor: pointer; font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.lane-switch button.is-active { color: var(--bone); background: var(--ink); }
.lane-switch button:disabled { cursor: not-allowed; opacity: .42; }

.empty-chart {
  display: grid;
  min-height: 300px;
  place-items: center;
  padding: 44px;
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 48px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 14.285% 100%;
}
.empty-chart-inner { max-width: 420px; padding: 28px; text-align: center; background: rgba(243,240,233,.91); }
.empty-chart-inner span { display: inline-block; margin-bottom: 14px; color: var(--copper); font-family: var(--display); font-size: 48px; line-height: 1; }
.empty-chart-inner h3 { margin: 0 0 8px; font-family: var(--display); font-size: 26px; font-weight: 400; }
.empty-chart-inner p { margin: 0; color: #74736d; font-size: 13px; }

.trend-bars { display: grid; gap: 20px; padding: 30px; }
.trend-row { display: grid; grid-template-columns: 135px minmax(0, 1fr) 86px; gap: 18px; align-items: center; }
.trend-label strong { display: block; font-size: 11px; }
.trend-label span { color: #88867f; font-size: 10px; }
.bar-track { position: relative; height: 28px; background: #e5dfd5; }
.bar-fill { height: 100%; min-width: 2px; background: var(--ink-soft); transform-origin: left; animation: bar-in 700ms cubic-bezier(.2,.75,.2,1) both; }
.trend-row.is-preliminary .bar-fill { background: repeating-linear-gradient(135deg, var(--copper), var(--copper) 7px, #d49170 7px, #d49170 12px); }
.trend-value { text-align: right; }
.trend-value strong { display: block; font-family: var(--display); font-size: 22px; font-weight: 400; }
.trend-value span { color: #8b8982; font-size: 9px; text-transform: uppercase; }
@keyframes bar-in { from { transform: scaleX(0); } }

.membership-strip { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 28px; border: 1px solid var(--line); background: var(--bone); }
.membership-item { padding: 20px 24px; border-right: 1px solid var(--line); }
.membership-item:last-child { border-right: 0; }
.membership-item small { color: #7d7c75; font-size: 9px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.membership-item strong { display: block; margin-top: 5px; font-family: var(--display); font-size: 30px; font-weight: 400; }

.table-panel { overflow: hidden; border: 1px solid var(--line); background: var(--bone); box-shadow: 0 14px 42px rgba(31,28,23,.06); }
.table-tools { display: flex; gap: 18px; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.table-tools p { margin: 0; color: #76756f; font-size: 11px; }
.table-scroll { max-width: 100%; overflow-x: auto; }
table { width: 100%; min-width: 940px; border-collapse: collapse; }
th { padding: 13px 14px; border-bottom: 1px solid var(--line); color: #77776f; background: #ede8de; font-size: 9px; font-weight: 700; letter-spacing: .1em; text-align: left; text-transform: uppercase; white-space: nowrap; }
td { padding: 16px 14px; border-bottom: 1px solid rgba(23,26,25,.09); font-size: 12px; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f7f3eb; }
.rank-cell { width: 62px; color: var(--copper-dark); font-family: var(--display); font-size: 20px; }
.query-cell { min-width: 270px; }
.query-cell strong { display: block; font-size: 13px; font-weight: 650; }
.query-cell small { display: block; max-width: 360px; overflow: hidden; margin-top: 4px; color: #8b8982; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.score-cell strong { font-family: var(--display); font-size: 20px; font-weight: 400; }
.score-track { width: 72px; height: 3px; margin-top: 5px; background: #ded8ce; }
.score-track span { display: block; height: 100%; background: var(--copper); }
.number-cell { font-family: var(--mono); font-size: 11px; font-variant-numeric: tabular-nums; }
.fixed-badge, .state-badge { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 8px; border: 1px solid #d4c1b5; color: var(--copper-dark); background: #f3e7df; font-size: 8px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.state-badge { border-color: #c7d1c6; color: #536254; background: #e8eee7; }
.state-badge.preliminary { border-color: #dbc3b7; color: #8b4e35; background: #f4e6df; }
.leading-link { display: inline-block; max-width: 235px; overflow: hidden; color: #596b76; text-decoration-color: rgba(89,107,118,.35); text-overflow: ellipsis; white-space: nowrap; }
.leading-link:hover { color: var(--copper-dark); }

.query-controls { display: grid; grid-template-columns: minmax(240px, 1fr) auto; gap: 18px; align-items: center; margin-bottom: 22px; }
.search-box { position: relative; }
.search-box::before { content: "⌕"; position: absolute; top: 50%; left: 16px; color: #77766f; font-family: var(--display); font-size: 23px; transform: translateY(-55%); }
.search-box input { width: 100%; height: 52px; padding: 0 18px 0 48px; border: 1px solid var(--line); border-radius: 0; color: var(--ink); background: var(--bone); }
.filter-group { display: flex; gap: 8px; }
.filter-chip { height: 38px; padding: 0 13px; border: 1px solid var(--line); background: transparent; color: #706f69; cursor: pointer; font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.filter-chip.is-active { border-color: var(--ink); color: var(--bone); background: var(--ink); }
.result-count { margin: 0 0 12px; color: #7b7a73; font-size: 11px; }

.scoring-detail { margin-top: 26px; border-top: 1px solid var(--line); }
.scoring-detail summary { padding: 18px 0; cursor: pointer; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.scoring-detail p { max-width: 830px; margin: 0 0 18px; color: #6f6f68; font-size: 13px; }

.site-footer {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 36px;
  align-items: end;
  padding: 48px clamp(24px, 5vw, 76px);
  color: rgba(255,255,255,.58);
  background: var(--ink);
  font-size: 10px;
  letter-spacing: .04em;
}
.site-footer > div { display: flex; gap: 12px; align-items: center; }
.site-footer p { margin: 0; }
.site-footer > p:last-child { text-align: right; }
.brand-mark-small { width: 34px; height: 34px; font-size: 12px; }

.loading-state { padding-top: 40px; }
.loading-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; height: 170px; background: var(--line); }
.loading-grid span { background: linear-gradient(90deg, #ebe6dc 25%, #f7f3eb 50%, #ebe6dc 75%) 0 0 / 200% 100%; animation: shimmer 1.5s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.error-panel { padding: 34px; border: 1px solid #cfb3a9; color: #6e382f; background: #f5e7e1; }
.error-panel h2 { margin-top: 0; font-family: var(--display); font-size: 32px; font-weight: 400; }

@media (max-width: 1080px) {
  .metric-grid { grid-template-columns: repeat(3, 1fr); }
  .metric-card:nth-child(3) { border-right: 0; }
  .metric-card:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .content-grid { grid-template-columns: 1fr; }
  .status-panel { grid-template-columns: 1fr; }
  .status-aside { border-top: 1px solid var(--line); border-left: 0; }
}

@media (max-width: 760px) {
  body { background-size: 46px 100%; }
  .masthead { min-height: 560px; padding-inline: 20px; }
  .privacy-mark { font-size: 8px; letter-spacing: .08em; }
  .hero-copy { grid-template-columns: 1fr; gap: 28px; padding-top: 66px; }
  .hero-copy h1 { font-size: clamp(43px, 13vw, 62px); }
  .hero-note { max-width: 310px; }
  .period-ribbon { grid-template-columns: 1fr; margin-top: 48px; }
  .period-block { min-height: 72px; padding: 14px 18px; border-right: 0; border-bottom: 1px solid var(--line-dark); }
  .period-block:last-child { border-bottom: 0; }
  .period-block strong { font-size: 16px; }
  .view-nav { overflow-x: auto; }
  .view-nav-inner { width: max-content; min-width: 100%; min-height: 58px; padding-inline: 10px; }
  .view-tab { padding-inline: 14px; font-size: 9px; }
  .view-tab::after { right: 14px; left: 14px; }
  .nav-rule, .build-label { display: none; }
  main { width: calc(100% - 32px); padding-top: 46px; }
  .view-heading { display: block; margin-bottom: 30px; }
  .view-heading h2 { font-size: 42px; }
  .view-heading > p { margin-top: 18px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .metric-card { min-height: 132px; }
  .metric-card:nth-child(2n) { border-right: 0; }
  .metric-card:nth-child(-n+4) { border-bottom: 1px solid var(--line); }
  .metric-card:nth-child(3) { border-right: 1px solid var(--line); }
  .metric-value { font-size: 34px; }
  .status-copy { padding: 30px 24px; }
  .status-aside { padding: 22px 24px; }
  .membership-strip { grid-template-columns: 1fr; }
  .membership-item { border-right: 0; border-bottom: 1px solid var(--line); }
  .membership-item:last-child { border-bottom: 0; }
  .trend-row { grid-template-columns: 92px minmax(80px,1fr) 66px; gap: 10px; }
  .trend-bars { padding: 22px 16px; }
  .query-controls { grid-template-columns: 1fr; }
  .filter-group { max-width: 100%; overflow-x: auto; padding-bottom: 4px; }
  .filter-chip { flex: 0 0 auto; }
  .table-tools { align-items: start; flex-direction: column; }
  .site-footer { grid-template-columns: 1fr; gap: 24px; }
  .site-footer > p:last-child { text-align: left; }
}

@media (max-width: 420px) {
  .brand-copy { display: none; }
  .privacy-mark { max-width: 170px; text-align: right; }
  .metric-card { padding: 20px 16px; }
  .panel-body { padding: 20px; }
  .empty-chart { min-height: 330px; padding: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

