* { box-sizing: border-box; }
:root {
  --ink: #111;
  --sub: #666;
  --faint: #999;
  --line: #e3e3e0;
  --card-line: #d8d8d4;
  --bg: #fdfdfc;
  --hover: #f4f4f2;
}
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }

header {
  max-width: 1080px;
  margin: 0 auto;
  padding: 22px 28px 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.brand {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
}
.vintage { font-size: 12px; color: var(--faint); }

main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 12px 28px 90px;
}

/* ---------- dropdowns (underlined trigger + searchable panel) ---------- */
.dd { position: relative; display: inline-block; vertical-align: baseline; }
.dd-btn {
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  background: none;
  border: none;
  border-bottom: 2px solid var(--ink);
  border-radius: 0;
  padding: 0 2px 2px;
  cursor: pointer;
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  max-width: 300px;
}
.dd-btn:hover, .dd-btn:focus-visible, .dd.open .dd-btn { background: var(--hover); outline: none; }
.dd-lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-caret { width: 10px; height: 6px; flex: none; align-self: center; }

.dd-pop {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 60;
  min-width: 230px;
  max-width: 330px;
  width: max-content;
  background: #fff;
  border: 1px solid var(--card-line);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .10), 0 2px 8px rgba(0, 0, 0, .06);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0;
  color: var(--ink);
  text-align: left;
}
.dd-pop.right { left: auto; right: 0; }
.dd-search {
  display: block;
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--line);
  border-radius: 10px 10px 0 0;
  padding: 10px 12px;
  font: inherit;
  background: transparent;
}
.dd-search:focus { outline: none; }
.dd-list { max-height: 296px; overflow-y: auto; padding: 6px; }
.dd-opt {
  position: relative;
  padding: 7px 12px 7px 28px;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dd-opt.act { background: var(--hover); }
.dd-opt.sel { font-weight: 600; }
.dd-opt.sel::before {
  content: "✓";
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
}
.dd-none { padding: 12px; font-size: 13px; color: var(--faint); }

/* ---------- landing ---------- */
.landing {
  min-height: 62vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.madlib {
  font-size: 34px;
  line-height: 1.75;
  font-weight: 400;
  max-width: 860px;
  letter-spacing: -.01em;
}
.madlib .dd-btn {
  font-size: 34px;
  font-weight: 600;
  gap: 10px;
  max-width: 480px;
}
.madlib .dd-caret { width: 14px; height: 9px; }
.golink {
  margin-top: 46px;
}
.golink button {
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  background: var(--ink);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 26px;
  cursor: pointer;
}
.golink button:hover { background: #000; }
.natline { margin-top: 34px; font-size: 13px; color: var(--sub); }

/* ---------- controls row ---------- */
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 28px 40px;
  padding: 18px 0 6px;
  margin-bottom: 8px;
}
.ctrl { display: flex; flex-direction: column; gap: 6px; }
.ctrl label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--faint);
}
.ctrl .dd { align-self: flex-start; }
.ctrl .dd-btn { font-size: 15px; padding-bottom: 3px; }
.context { font-size: 13px; color: var(--sub); margin: 4px 0 18px; }

/* ---------- breadcrumb + page titles ---------- */
.crumb { font-size: 13px; margin: 14px 0 4px; }
.crumb a { color: var(--sub); text-decoration: none; }
.crumb a:hover { color: var(--ink); text-decoration: underline; }
h1.page {
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -.01em;
  margin: 6px 0 2px;
}
.page-sub { font-size: 14px; color: var(--sub); margin: 0 0 6px; max-width: 720px; }

/* ---------- stat cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin: 10px 0 34px;
}
.card {
  border: 1px solid var(--card-line);
  border-radius: 10px;
  padding: 16px 18px 14px;
  background: #fff;
}
.clabel { font-size: 12.5px; color: var(--sub); margin-bottom: 8px; }
.cval { font-size: 31px; font-weight: 650; letter-spacing: -.02em; }
.csub { font-size: 12px; color: var(--faint); margin-top: 6px; }

/* ---------- sections + tables ---------- */
section { margin: 0 0 44px; }
.sechead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 4px;
}
section h2 { font-size: 16px; font-weight: 700; margin: 0; }
.secctl { font-size: 13.5px; color: var(--sub); display: flex; align-items: baseline; gap: 8px; }
.secctl .dd-btn { font-size: 13.5px; font-weight: 600; }

.tw { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 10px 14px 8px 0;
  border-bottom: 1px solid var(--ink);
  white-space: nowrap;
}
td {
  padding: 9px 14px 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  vertical-align: top;
}
th.num, td.num { text-align: right; font-variant-numeric: tabular-nums; }
th:last-child, td:last-child { padding-right: 0; }
td.dim { color: var(--sub); }
tr:hover td { background: transparent; }
.rowlink { text-decoration: none; font-weight: 600; border-bottom: 1px solid #c9c9c4; }
.rowlink:hover { border-bottom-color: var(--ink); }
.est { color: #444; }
.est::before { content: "≈ "; color: var(--faint); }

.note { font-size: 12px; color: var(--faint); max-width: 760px; margin-top: 26px; line-height: 1.55; }
.empty {
  border: 1px dashed var(--card-line);
  border-radius: 10px;
  padding: 40px 24px;
  text-align: center;
  color: var(--sub);
  font-size: 14px;
  margin: 24px 0;
}

@media (max-width: 640px) {
  main, header { padding-left: 18px; padding-right: 18px; }
  .madlib { font-size: 24px; }
  .madlib .dd-btn { font-size: 24px; max-width: 300px; }
  .cval { font-size: 26px; }
  .controls { gap: 16px 24px; }
}
