:root {
  --ink: #14181f;
  --ink-2: #46505f;
  --ink-3: #5f6a7a;
  --line: #e2e6ec;
  --bg: #ffffff;
  --bg-2: #f6f8fa;
  --accent: #0f5c4a;
  --accent-soft: #e6f2ee;
  --radius: 10px;
  --wrap: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f2f5f8;
    --ink-2: #b3bcc8;
    --ink-3: #8b95a3;
    --line: #2a3038;
    --bg: #12161b;
    --bg-2: #1a2027;
    --accent: #58c9a8;
    --accent-soft: #16302a;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-variant-numeric: tabular-nums;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: var(--bg); padding: 10px 16px; z-index: 10;
}
.skip:focus { left: 8px; top: 8px; }

.sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

header.site {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky; top: 0; z-index: 5;
}
header.site .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 60px;
}
.brand {
  font-weight: 700; font-size: 1.05rem; color: var(--ink);
  text-decoration: none; display: inline-flex; align-items: center; gap: 8px;
}
.brand svg { flex: none; border-radius: 7px; }
.brand-accent { color: var(--accent); }
header nav { display: flex; gap: 18px; flex-wrap: wrap; }
header nav a { color: var(--ink-2); text-decoration: none; font-size: .92rem; }
header nav a:hover { color: var(--accent); }

main { padding: 28px 0 56px; }
h1 { font-size: clamp(1.55rem, 3.2vw, 2.15rem); line-height: 1.2; letter-spacing: -.02em; margin: 10px 0 10px; }
h2 { font-size: 1.22rem; letter-spacing: -.01em; margin: 2.2rem 0 .5rem; }
h3 { font-size: 1rem; margin: 1.4rem 0 .3rem; }
p { margin: .65rem 0; color: var(--ink-2); }
.lede { font-size: 1.08rem; color: var(--ink-2); max-width: 62ch; }
.dek { color: var(--ink-3); font-size: .95rem; margin-top: -.2rem; }
section { max-width: 68ch; }

.crumbs ol {
  list-style: none; display: flex; flex-wrap: wrap; gap: 6px;
  padding: 0; margin: 0 0 8px; font-size: .82rem; color: var(--ink-3);
}
.crumbs li:not(:last-child)::after { content: "/"; margin-left: 6px; color: var(--line); }
.crumbs a { color: var(--ink-3); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }

.hero { max-width: 70ch; padding: 6px 0 4px; }
.hero h1 { margin-top: 0; }
.lookup { display: flex; gap: 8px; margin: 18px 0 10px; max-width: 560px; }
.lookup input {
  flex: 1; min-width: 0; padding: 11px 14px; font: inherit; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
}
.lookup input::placeholder { color: var(--ink-3); opacity: 1; }
.lookup input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.lookup button {
  padding: 11px 18px; font: inherit; font-weight: 600; cursor: pointer;
  color: var(--bg); background: var(--accent); border: 0; border-radius: var(--radius);
}
.lookup button:hover { filter: brightness(1.06); }
.hint { font-size: .88rem; color: var(--ink-3); }
#results { margin: 14px 0 8px; }

.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px; margin: 18px 0 22px; max-width: 800px;
}
.stat {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; background: var(--bg-2);
  display: flex; flex-direction: column; gap: 1px;
}
.stat .k { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.stat .v { font-size: 1.24rem; font-weight: 700; letter-spacing: -.01em; }
.stat .n { font-size: .76rem; color: var(--ink-3); }

table.pay, table.index {
  width: 100%; border-collapse: collapse; margin: 16px 0 8px;
  font-size: .94rem; max-width: 800px;
}
table caption { text-align: left; font-size: .82rem; color: var(--ink-3); padding-bottom: 8px; }
table th, table td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; }
table thead th {
  font-size: .74rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-3); font-weight: 600; border-bottom: 1px solid var(--ink-3);
}
table td { text-align: right; }
table thead th:not(:first-child) { text-align: right; }
table tbody th { font-weight: 500; }
table tbody th a { text-decoration: none; }
table tbody th a:hover { text-decoration: underline; }
table tbody tr:hover { background: var(--bg-2); }
table tr.hl { background: var(--accent-soft); }
table tr.hl th, table tr.hl td { font-weight: 700; border-bottom-color: var(--accent); }

.table-scroll {
  max-width: 800px; position: relative;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.table-scroll > table { margin: 16px 0 8px; }
.table-scroll > table > caption { position: sticky; left: 0; max-width: calc(100vw - 40px); }

.range { margin: 18px 0 8px; max-width: 640px; position: relative; padding-top: 36px; }
.range .bar {
  height: 10px; border-radius: 99px; position: relative;
  background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line);
}
.range .bar::before {
  content: ""; position: absolute; top: 2px; bottom: 2px; left: 2px;
  right: calc(100% - var(--med)); border-radius: 99px;
  background: var(--accent);
}
.range .med {
  position: absolute; top: -6px; left: var(--med); width: 4px; height: 22px;
  transform: translateX(-50%);
  background: var(--ink); border-radius: 2px; box-shadow: 0 0 0 2px var(--bg);
}
.range .labels {
  display: flex; justify-content: space-between; margin-top: 8px;
  font-size: .85rem; color: var(--ink-2);
}
.range .labels small { display: block; color: var(--ink-3); font-size: .72rem; }
.range .labels span:last-child { text-align: right; }
.range .med-label {
  position: absolute; top: 0;
  left: clamp(30px, var(--med), calc(100% - 30px));
  transform: translateX(-50%); text-align: center; white-space: nowrap;
  font-size: .85rem; color: var(--ink-2); line-height: 1.25;
}
.range .med-label small { display: block; color: var(--ink-3); font-size: .72rem; }

.cards {
  list-style: none; padding: 0; margin: 14px 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px;
}
.cards li a {
  display: flex; flex-direction: column; gap: 2px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: var(--ink); background: var(--bg);
  transition: border-color .12s ease, transform .12s ease;
}
.cards li a:hover { border-color: var(--accent); transform: translateY(-1px); }
.cards .t { font-weight: 600; font-size: .95rem; line-height: 1.35; }
.cards .m { font-size: .82rem; color: var(--ink-3); }

ul.groups {
  list-style: none; padding: 0; margin: 14px 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px;
}
ul.groups a {
  display: flex; flex-direction: column; gap: 3px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: var(--ink);
}
ul.groups a:hover { border-color: var(--accent); }
ul.groups .t { font-weight: 600; font-size: .95rem; }
ul.groups .m { font-size: .8rem; color: var(--ink-3); }

.faq { margin: 12px 0 8px; max-width: 70ch; }
.faq details { border-bottom: 1px solid var(--line); padding: 0 0 2px; }
.faq summary {
  cursor: pointer; font-weight: 600; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px 0;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--ink-3); font-weight: 400; font-size: 1.15rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq p { margin: 2px 0 12px; font-size: .95rem; }

.note, .source {
  margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: .9rem; color: var(--ink-3);
}

footer.site {
  border-top: 1px solid var(--line); background: var(--bg-2);
  padding: 30px 0 40px; font-size: .88rem;
}
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 24px; }
.foot-grid > div { display: flex; flex-direction: column; gap: 4px; }
.foot-grid strong { font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.foot-grid a { color: var(--ink-2); text-decoration: none; }
.foot-grid a:hover { color: var(--accent); }
.foot-grid p { margin: 0; font-size: .86rem; }
.fine { margin-top: 22px; font-size: .78rem; color: var(--ink-3); max-width: 90ch; }

@media (max-width: 640px) {
  .foot-grid { grid-template-columns: 1fr; gap: 16px; }
  .foot-grid a { display: inline-flex; align-items: center; min-height: 40px; }
  .lookup { flex-direction: column; }
  .lookup button { width: 100%; }
  header.site .wrap {
    flex-direction: column; align-items: flex-start; justify-content: center;
    gap: 0; padding-top: 4px; padding-bottom: 6px;
  }
  .brand { min-height: 40px; }
  header nav { width: 100%; justify-content: space-between; gap: 12px; font-size: .85rem; }
  header nav a { display: inline-flex; align-items: center; min-height: 40px; }
  table th, table td { padding: 8px 8px; }
  table td { white-space: nowrap; }
  table tbody th a { display: block; margin: -8px; padding: 8px; }
}

@media print {
  header.site, footer.site, .lookup, .skip { display: none; }
  body { font-size: 12pt; }
  a { color: inherit; text-decoration: none; }
}
