:root {
  --ink: #0e1a2b;
  --ink-2: #3b4658;
  --muted: #6b7482;
  --paper: #faf8f4;
  --card: #ffffff;
  --line: #e6e1d8;
  --line-2: #f0ece5;
  --accent: #0f5c4b;
  --accent-2: #e2a33b;
  --accent-soft: #e5f0ec;
  --neg: #b3261e;
  --pos: #1c7a5a;
  --bar: #1f4d7a;
  --bar-neg: #c2554d;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(14, 26, 43, .05), 0 4px 16px rgba(14, 26, 43, .04);
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #e9edf2; --ink-2: #c3cad4; --muted: #8b95a3; --paper: #0d1420; --card: #131c2a;
    --line: #243044; --line-2: #1a2434; --accent: #5cc6a4; --accent-soft: #15302a;
    --neg: #ff8a80; --pos: #6fd3a8; --bar: #6aa6e0; --bar-neg: #e0827a; color-scheme: dark;
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  --ink: #e9edf2; --ink-2: #c3cad4; --muted: #8b95a3; --paper: #0d1420; --card: #131c2a;
  --line: #243044; --line-2: #1a2434; --accent: #5cc6a4; --accent-soft: #15302a;
  --neg: #ff8a80; --pos: #6fd3a8; --bar: #6aa6e0; --bar-neg: #e0827a; color-scheme: dark; --shadow: none;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 var(--sans); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.fine { font-size: .82rem; margin-top: .5rem; }
.lead { font-size: 1.08rem; max-width: 68ch; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.neg { color: var(--neg); }
.empty { padding: 1.2rem; background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); color: var(--ink-2); }
.page { padding-top: 1.5rem; padding-bottom: 3rem; }
.block { margin-top: 2rem; margin-bottom: 2rem; }
.section-h { font-size: 1.2rem; margin-top: .5rem; }
.section-h .muted { font-family: var(--sans); font-size: .85rem; font-weight: 400; }

/* Header */
.site-head { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.head-row { display: flex; align-items: center; gap: 1.25rem; height: 62px; }
.brand { display: flex; align-items: center; gap: .5rem; color: var(--ink); font-weight: 500; font-size: 1.1rem; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand b, .brand-foot b { font-weight: 600; color: var(--accent); }
.brand svg { color: var(--ink); }
.head-nav { display: flex; gap: 1.1rem; margin-left: auto; font-size: .93rem; }
.head-nav a { color: var(--ink-2); white-space: nowrap; }

/* Search */
.search { position: relative; display: flex; align-items: stretch; background: var(--card); border: 1px solid var(--line); border-radius: 999px; transition: border-color .15s, box-shadow .15s; }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); font: inherit; padding: .55rem 1rem; outline: none; }
.search input::-webkit-search-cancel-button { display: none; }
.search button { border: 0; background: transparent; color: var(--ink-2); padding: 0 .9rem; cursor: pointer; }
.search-compact { flex: 1; max-width: 380px; }
.search-hero { max-width: 680px; margin: 1.4rem 0 1rem; box-shadow: var(--shadow); }
.search-hero input { font-size: 1.1rem; padding: .95rem 1.4rem; }
.search-hero button { background: var(--accent); color: #fff; border-radius: 999px; margin: 5px; padding: 0 1.2rem; }
.suggest { position: absolute; top: calc(100% + 6px); left: 0; right: 0; list-style: none; margin: 0; padding: .35rem; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(14,26,43,.14); z-index: 30; }
.suggest li a { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem .7rem; border-radius: 8px; color: var(--ink); }
.suggest li a:hover, .suggest li a.active { background: var(--accent-soft); text-decoration: none; }
.suggest small { color: var(--muted); white-space: nowrap; }

/* Hero / home */
.hero { padding: 3.5rem 0 2.5rem; background:
  radial-gradient(1200px 300px at 80% -10%, var(--accent-soft), transparent 70%), var(--paper); border-bottom: 1px solid var(--line); }
.hero h1 { max-width: 20ch; font-size: clamp(2rem, 4.6vw, 3.2rem); }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; color: var(--accent); font-weight: 600; margin-bottom: .8rem; }
.hero-stats { display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; font-size: .92rem; }
.hero-stats b { color: var(--ink); font-variant-numeric: tabular-nums; }
.home-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-top: 2rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.3rem; box-shadow: var(--shadow); }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.card-head h2 { font-size: 1.15rem; }
.card-head a { font-size: .88rem; white-space: nowrap; }
.rank-list { margin: 0; padding-left: 1.4rem; }
.rank-list.plain { list-style: none; padding: 0; }
.rank-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .42rem 0; border-bottom: 1px solid var(--line-2); }
.rank-list li:last-child { border-bottom: 0; }
.rank-list li a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-list li span { white-space: nowrap; font-size: .9rem; }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip { padding: .3rem .75rem; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink-2); font-size: .88rem; }
.chip:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.explain { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; border-top: 1px solid var(--line); padding-top: 2rem; }
.explain p { color: var(--ink-2); font-size: .95rem; }

/* Crumbs, tags */
.crumbs { display: flex; flex-wrap: wrap; gap: .45rem; font-size: .85rem; color: var(--muted); margin-bottom: 1rem; }
.crumbs a { color: var(--muted); }
.tag { display: inline-block; font-size: .78rem; padding: .12rem .55rem; border-radius: 6px; background: var(--line-2); color: var(--ink-2); border: 1px solid var(--line); vertical-align: middle; }
.tag-accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.tag-warn { background: #fdf1dc; color: #8a5a00; border-color: transparent; }

/* Company */
.co-head { display: grid; grid-template-columns: 1fr minmax(260px, 420px); gap: 2rem; align-items: start; padding-bottom: 1.2rem; border-bottom: 1px solid var(--line); }
.co-head h1 { margin-bottom: .4rem; }
.co-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; }
.co-facts { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .7rem 1.4rem; font-size: .92rem; }
.co-facts dt { color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; }
.co-facts dd { margin: 0; overflow-wrap: anywhere; }
.activity { margin: 1.2rem 0 0; max-width: 80ch; color: var(--ink-2); font-family: var(--serif); font-size: 1.12rem; line-height: 1.5; }
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: 1.6rem; }
.kpi { background: var(--card); padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .15rem; }
.kpi-l { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.kpi-v { font-size: 1.45rem; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.kpi-d { font-size: .82rem; font-variant-numeric: tabular-nums; }
.kpi-d.up { color: var(--pos); }
.kpi-d.down { color: var(--neg); }
.charts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 1.5rem; }
.chart { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem .5rem; }
.chart figcaption { font-size: .88rem; font-weight: 500; margin-bottom: .3rem; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .axis { stroke: var(--line); stroke-width: 1; }
.chart rect.pos { fill: var(--bar); }
.chart rect.neg { fill: var(--bar-neg); }
.chart .yr { font-size: 10px; fill: var(--muted); text-anchor: middle; font-family: var(--sans); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { padding: .5rem .8rem; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: top; }
thead th { font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 500; background: var(--line-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
thead th.sorted { color: var(--accent); }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
table.fin { min-width: 640px; }
table.fin tbody th { font-weight: 400; color: var(--ink-2); white-space: nowrap; position: sticky; left: 0; background: var(--card); }
table.fin tr.grp th { font-family: var(--serif); font-weight: 600; color: var(--ink); font-size: 1rem; padding-top: 1rem; background: var(--card); }
table.fin tr.strong th, table.fin tr.strong td { font-weight: 600; color: var(--ink); }
table.list td .sub { display: block; font-size: .78rem; color: var(--muted); }
table.list tr.dim td { opacity: .72; }
table.list .rank { width: 3rem; }
.filings .docs a { margin-right: .9rem; white-space: nowrap; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; }
.people { list-style: none; margin: 0; padding: 0; }
.people li { display: flex; flex-direction: column; padding: .55rem 0; border-bottom: 1px solid var(--line-2); }
.people li span { font-size: .85rem; }
.former { margin-top: .8rem; }
.former summary { cursor: pointer; color: var(--accent); font-size: .92rem; }

/* Lists */
.tabs { display: flex; flex-wrap: wrap; gap: .3rem; margin: 1.2rem 0; border-bottom: 1px solid var(--line); }
.tabs a { padding: .55rem .9rem; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; font-size: .93rem; }
.tabs a.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 500; }
.tabs a:hover { text-decoration: none; color: var(--accent); }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 1.4rem; }
.results { list-style: none; margin: 0; padding: 0; }
.results li { padding: .8rem 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: .1rem; }
.results li > a { font-size: 1.08rem; font-weight: 500; }
.results .kv { font-size: .88rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.muni-grid { list-style: none; padding: 0; margin: 1.4rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .1rem 1.5rem; }
.muni-grid li { display: flex; justify-content: space-between; padding: .45rem 0; border-bottom: 1px solid var(--line-2); }

/* Prose, forms */
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.8rem; }
.prose li { margin-bottom: .4rem; }
code { font-size: .9em; background: var(--line-2); padding: .1em .35em; border-radius: 4px; }
.form { display: grid; gap: 1rem; max-width: 560px; }
.form label { display: grid; gap: .3rem; font-size: .92rem; font-weight: 500; }
.form input, .form textarea { font: inherit; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); }
.form input:focus, .form textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.hp { position: absolute; left: -9999px; }
.btn { justify-self: start; background: var(--accent); color: #fff; border: 0; border-radius: 8px; padding: .65rem 1.2rem; font: inherit; font-weight: 500; cursor: pointer; }
.notice { padding: 1rem 1.2rem; border-radius: var(--radius); background: var(--accent-soft); color: var(--ink); }
.notice.error { background: #fde8e6; color: #7a1a13; }
.error-page { text-align: left; max-width: 720px; }

/* Footer */
.site-foot { border-top: 1px solid var(--line); background: var(--card); padding: 2.5rem 0 1.5rem; margin-top: 3rem; font-size: .92rem; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
.foot-grid a, .foot-grid span { display: block; margin-bottom: .35rem; color: var(--ink-2); }
.foot-h { font-weight: 600; margin-bottom: .6rem; }
.brand-foot { font-size: 1.1rem; margin-bottom: .5rem; }
.foot-note { margin-top: 2rem; font-size: .8rem; border-top: 1px solid var(--line-2); padding-top: 1rem; }

@media (max-width: 960px) {
  .head-nav { display: none; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .kpi:first-child { grid-column: span 2; }
  .charts { grid-template-columns: 1fr; }
  .co-head { grid-template-columns: 1fr; gap: 1rem; }
}
@media (max-width: 720px) {
  .head-row { gap: .75rem; }
  .brand span { display: none; }
  .search-compact { max-width: none; }
  .home-grid, .two-col, .explain, .foot-grid { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
  .hero { padding: 2.2rem 0 1.8rem; }
  .co-facts { grid-template-columns: 1fr; }
  th, td { padding: .5rem .6rem; }
}
