/* Fundamental Finance — one stylesheet, light and dark. */
:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --surface-2: #f0eee7;
  --ink: #14201b;
  --ink-2: #3a4742;
  --muted: #6b7570;
  --line: #e2ded3;
  --line-2: #d3cec1;
  --brand: #0d3b2e;
  --brand-2: #14624a;
  --accent: #1f8a63;
  --accent-soft: #e3f1ea;
  --gold: #b7862c;
  --neg: #b4382a;
  --pos: #1f7a55;
  --c1: #14624a;   /* chart: revenue */
  --c2: #c58b2a;   /* chart: net income */
  --c3: #5b7fa8;   /* chart: third series */
  --shadow: 0 1px 2px rgba(20, 32, 27, .06), 0 4px 16px rgba(20, 32, 27, .05);
  --radius: 12px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, ui-serif, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1513;
    --surface: #161e1b;
    --surface-2: #1c2622;
    --ink: #e8ece9;
    --ink-2: #c3cbc6;
    --muted: #8d9892;
    --line: #26322d;
    --line-2: #34423c;
    --brand: #8fd3b3;
    --brand-2: #6cc19c;
    --accent: #5cc093;
    --accent-soft: #1b2f27;
    --gold: #d9aa55;
    --neg: #f08070;
    --pos: #6ccf9e;
    --c1: #5cc093;
    --c2: #e0a84a;
    --c3: #7fa4cf;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--sans); }
a { color: var(--brand-2); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; letter-spacing: -.01em; color: var(--ink); }
h1 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.8rem); margin: .2em 0 .35em; }
h2 { font-size: 1.45rem; margin: 1.6em 0 .6em; }
h3 { font-size: 1.12rem; margin: 1.3em 0 .4em; }
code { font-family: var(--mono); font-size: .88em; background: var(--surface-2); padding: .08em .35em; border-radius: 4px; }
.muted { color: var(--muted); }
.wrap { width: min(1160px, 100% - 2.5rem); margin-inline: auto; }
.narrow { max-width: 760px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--brand); color: #fff; padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ---- header ---------------------------------------------------------------------------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.header-row { display: flex; align-items: center; gap: 1.5rem; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--brand); }
.brand-mark { width: 30px; height: 30px; color: var(--brand); }
@media (prefers-color-scheme: dark) { .brand-mark { color: #14624a; } }
.brand-name { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; color: var(--ink); letter-spacing: -.01em; }
.brand-name span { color: var(--brand-2); margin-left: .18em; }
.site-nav { display: flex; align-items: center; gap: .15rem; margin-left: auto; flex-wrap: wrap; }
.site-nav a { color: var(--ink-2); text-decoration: none; font-size: .92rem; padding: .4rem .6rem; border-radius: 8px; }
.site-nav a:hover { background: var(--surface-2); color: var(--ink); }
.site-nav a.active { color: var(--brand-2); background: var(--accent-soft); }
.site-nav a.nav-db { font-weight: 600; color: var(--brand-2); }
.nav-search input { width: 9.5rem; font: inherit; font-size: .9rem; padding: .38rem .7rem; border: 1px solid var(--line-2); border-radius: 999px; background: var(--bg); color: var(--ink); margin-left: .4rem; }
.nav-search input:focus { width: 13rem; transition: width .2s; }
.nav-toggle { display: none; margin-left: auto; font: inherit; font-size: .9rem; background: none; border: 1px solid var(--line-2); border-radius: 8px; padding: .35rem .8rem; color: var(--ink); }
@media (max-width: 1100px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 64px; background: var(--surface); border-bottom: 1px solid var(--line); padding: .6rem 1.25rem 1rem; flex-direction: column; align-items: stretch; }
  .site-nav.open { display: flex; }
  .site-nav a { padding: .6rem .5rem; }
  .nav-search input, .nav-search input:focus { width: 100%; margin: .5rem 0 0; }
}

/* ---- buttons ---------------------------------------------------------------------------- */
.btn { display: inline-block; background: var(--brand); color: #fff; border: 0; font: inherit; font-weight: 600; font-size: .95rem; padding: .7rem 1.15rem; border-radius: 10px; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--brand-2); color: #fff; }
@media (prefers-color-scheme: dark) { .btn { background: #14624a; } .btn:hover { background: #1f8a63; } }
.btn-ghost { background: transparent; color: var(--brand-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn-ghost:hover { background: var(--surface); color: var(--brand); }
.btn-small { padding: .45rem .8rem; font-size: .88rem; }

/* ---- home ------------------------------------------------------------------------------- */
.hero { background:
    radial-gradient(1200px 400px at 85% -10%, var(--accent-soft), transparent 60%),
    linear-gradient(var(--surface), var(--bg));
  border-bottom: 1px solid var(--line); padding: 3.5rem 0 3rem; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 3rem; align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 700; color: var(--gold); margin: 0; }
.hero h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.1rem); margin-top: .35rem; }
.lede { font-size: 1.12rem; color: var(--ink-2); max-width: 62ch; }
.hero-actions { display: flex; gap: .7rem; flex-wrap: wrap; margin-top: 1.5rem; }
.hero-cards { display: grid; gap: 1rem; }
.co-card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem 1rem; box-shadow: var(--shadow); text-decoration: none; color: var(--ink); transition: transform .15s, border-color .15s; }
.co-card:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--ink); }
.co-card-head { display: flex; align-items: center; gap: .6rem; }
.co-name { font-weight: 600; }
.co-card-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin: .8rem 0 .4rem; }
.co-card-stats .k { display: block; font-size: .75rem; color: var(--muted); }
.co-card-stats .v { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.co-card-foot { font-size: .78rem; color: var(--muted); }
.spark { height: 46px; margin: .2rem 0 .3rem; }
.spark svg { display: block; width: 100%; height: 100%; }
.ticker { display: inline-block; font-family: var(--mono); font-size: .78rem; font-weight: 700; letter-spacing: .04em; color: #fff; background: var(--brand); padding: .14rem .45rem; border-radius: 6px; vertical-align: .08em; }
@media (prefers-color-scheme: dark) { .ticker { background: #14624a; } }
.ticker-lg { font-size: 1.05rem; padding: .4rem .7rem; border-radius: 9px; }

.band { padding: 2.6rem 0 .5rem; }
.band-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); margin-bottom: 1.2rem; }
.band-head h2 { margin: 0 0 .5rem; }
.band-head a { font-size: .92rem; text-decoration: none; }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.feature h3 { margin-top: 0; font-size: 1.05rem; }
.feature p { margin: 0; color: var(--ink-2); font-size: .95rem; }
.feature { border-top: 3px solid var(--accent); padding-top: .9rem; }
.starter-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.starter { display: flex; flex-direction: column; gap: .25rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; text-decoration: none; color: var(--ink); }
.starter:hover { border-color: var(--accent); color: var(--ink); }
.starter-sec { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: var(--gold); }
.starter-title { font-family: var(--serif); font-size: 1.12rem; font-weight: 600; }
.starter-sum { font-size: .9rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.section-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem 2rem; padding-bottom: 3rem; }
.section-card h3 { margin: 0 0 .25rem; font-size: 1.2rem; }
.section-card h3 a { color: var(--ink); text-decoration: none; }
.section-card h3 a:hover { color: var(--brand-2); }
.section-card p { margin: 0 0 .5rem; font-size: .92rem; }
.section-card ul { list-style: none; padding: 0; margin: 0 0 .5rem; }
.section-card li { padding: .2rem 0; font-size: .95rem; }
.section-card li a { color: var(--ink-2); text-decoration: none; }
.section-card li a:hover { color: var(--brand-2); text-decoration: underline; }
.more { font-size: .9rem; font-weight: 600; text-decoration: none; }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .starter-grid, .section-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .feature-grid, .starter-grid, .section-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 2rem; }
}

/* ---- generic page ---------------------------------------------------------------------- */
.page { padding: 1.4rem 0 4rem; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: .6rem; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand-2); }
.crumbs .sep { margin: 0 .45rem; opacity: .5; }
.page-head { margin-bottom: 1.6rem; }
.toc-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1rem; }
.toc-chips a { font-size: .88rem; text-decoration: none; padding: .3rem .75rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); }
.toc-chips a:hover { border-color: var(--accent); color: var(--brand-2); }
.group h2 { font-size: 1.25rem; padding-bottom: .4rem; border-bottom: 1px solid var(--line); }
.article-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: .2rem 2rem; }
@media (max-width: 760px) { .article-list { grid-template-columns: 1fr; } }
.article-row { display: flex; flex-direction: column; padding: .8rem 0; text-decoration: none; color: var(--ink); border-bottom: 1px dashed var(--line); }
.article-row:hover .ar-title { color: var(--brand-2); text-decoration: underline; }
.ar-title { font-weight: 600; font-size: 1.02rem; }
.ar-sum { color: var(--muted); font-size: .9rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ar-meta { font-size: .78rem; color: var(--muted); margin-top: .15rem; }

/* ---- article ---------------------------------------------------------------------------- */
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 3.5rem; }
.article { max-width: 720px; }
.article-head h1 { margin-bottom: .2rem; }
.byline { color: var(--muted); font-size: .9rem; margin: 0 0 1.4rem; }
.notice { background: #fbf3e2; border: 1px solid #ecd9ad; color: #5a4614; padding: .8rem 1rem; border-radius: 10px; font-size: .92rem; margin-bottom: 1.5rem; }
.notice a { color: inherit; }
.notice-quiet { background: var(--surface-2); border-color: var(--line); color: var(--ink-2); }
@media (prefers-color-scheme: dark) { .notice { background: #2a2414; border-color: #4a3d1c; color: #ecd9a4; } .notice-quiet { background: var(--surface-2); border-color: var(--line); color: var(--ink-2); } }
.prose { font-size: 1.06rem; line-height: 1.72; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.05em; }
.prose li { margin: .25em 0; }
.prose h2 { font-size: 1.4rem; }
.prose h3 { font-size: 1.18rem; }
.prose h4 { font-family: var(--sans); font-size: 1rem; margin: 1.3em 0 .4em; }
.prose img { display: block; margin: 1.2rem auto; border-radius: 8px; background: #fff; padding: 4px; border: 1px solid var(--line); }
.prose blockquote { margin: 1.2em 0; padding: .2em 1.1em; border-left: 3px solid var(--accent); color: var(--ink-2); }
.prose table { border-collapse: collapse; margin: 1.2em 0; font-size: .92rem; display: block; overflow-x: auto; max-width: 100%; }
.prose td, .prose th { border: 1px solid var(--line); padding: .35rem .6rem; vertical-align: top; }
.prose th { background: var(--surface-2); text-align: left; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.article-side { display: flex; flex-direction: column; gap: 1.2rem; padding-top: 2.2rem; }
.side-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; position: relative; }
.side-box h2 { font-family: var(--sans); font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--gold); margin: 0 0 .5rem; }
.side-box ul { list-style: none; padding: 0; margin: 0 0 .6rem; }
.side-box li { padding: .3rem 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.side-box li:last-child { border-bottom: 0; }
.side-box li a { text-decoration: none; color: var(--ink-2); }
.side-box li a:hover { color: var(--brand-2); }
.side-cta p { font-size: .92rem; color: var(--ink-2); margin: 0 0 .8rem; }
@media (max-width: 960px) { .article-layout { grid-template-columns: 1fr; gap: 1rem; } .article-side { padding-top: 0; } }

/* ---- company --------------------------------------------------------------------------- */
.co-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.co-title { display: flex; align-items: center; gap: 1rem; }
.co-title h1 { margin: 0; }
.co-meta { margin: .2rem 0 0; color: var(--muted); font-size: .9rem; }
.co-asof { margin: 0; font-size: .82rem; color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: .7rem; margin-bottom: 1.4rem; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem .9rem; display: flex; flex-direction: column; min-width: 0; }
.tile .k { font-size: .75rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.tile .v { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.25; margin: .15rem 0; }
.tile .s { font-size: .75rem; color: var(--muted); }

@media (max-width: 620px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
.view-bar, .filing-filter { display: inline-flex; align-items: center; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 3px; margin-bottom: 1rem; }
.view-label { font-size: .8rem; color: var(--muted); padding: 0 .6rem 0 .5rem; }
.seg { font: inherit; font-size: .88rem; background: none; border: 0; padding: .4rem .9rem; border-radius: 7px; color: var(--ink-2); cursor: pointer; }
.seg.active { background: var(--brand); color: #fff; }
@media (prefers-color-scheme: dark) { .seg.active { background: #14624a; } }
.charts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 0 0 2rem; }
.chart-card { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem .6rem; min-width: 0; }
.chart-card figcaption { font-weight: 600; font-size: .92rem; margin-bottom: .4rem; }
.chart { height: 220px; position: relative; }
.chart svg { width: 100%; height: 100%; display: block; overflow: visible; }
.chart .axis text, .chart .lbl { fill: var(--muted); font-size: 10px; font-family: var(--sans); }
.chart .grid line { stroke: var(--line); }
.chart .zero { stroke: var(--line-2); }
.legend { display: flex; flex-wrap: wrap; gap: .3rem .9rem; font-size: .75rem; color: var(--muted); margin-top: .3rem; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: .3rem; vertical-align: -1px; }
.chart-tip { position: absolute; pointer-events: none; background: var(--ink); color: var(--bg); font-size: .75rem; padding: .35rem .5rem; border-radius: 6px; white-space: nowrap; transform: translate(-50%, -110%); z-index: 2; line-height: 1.35; }
.chart-tip[hidden] { display: none; }
@media (max-width: 1000px) { .charts { grid-template-columns: 1fr 1fr; } }
@media (max-width: 680px) { .charts { grid-template-columns: 1fr; } }

.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; overflow-x: auto; }
.tab { font: inherit; font-weight: 600; font-size: .95rem; background: none; border: 0; border-bottom: 2px solid transparent; padding: .65rem .95rem; color: var(--muted); cursor: pointer; white-space: nowrap; margin-bottom: -1px; }
.tab:hover { color: var(--ink); }
.tab.active { color: var(--brand-2); border-bottom-color: var(--accent); }
.js .panel { display: none; }
.js .panel.active { display: block; }
.js .panel-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.panel-title { font-size: 1.1rem; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.fin { border-collapse: separate; border-spacing: 0; width: 100%; font-size: .9rem; font-variant-numeric: tabular-nums; }
table.fin th, table.fin td { padding: .42rem .75rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.fin thead th { position: sticky; top: 0; background: var(--surface-2); text-align: right; font-weight: 600; vertical-align: bottom; z-index: 1; }
table.fin thead th .pl { display: block; }
table.fin thead th .pe { display: block; font-size: .72rem; font-weight: 400; color: var(--muted); }
table.fin th.line { text-align: left; position: sticky; left: 0; background: var(--surface); font-weight: 400; min-width: 15rem; white-space: normal; z-index: 1; }
table.fin thead th.line { background: var(--surface-2); z-index: 2; }
table.fin td.num { text-align: right; }
table.fin td.neg { color: var(--neg); }
table.fin tr:hover td, table.fin tr:hover th.line { background: var(--accent-soft); }
table.fin tr.subtotal th, table.fin tr.subtotal td { font-weight: 600; }
table.fin tr.total th, table.fin tr.total td { font-weight: 700; border-top: 1px solid var(--line-2); background: var(--surface-2); }
table.fin tr.total th.line { background: var(--surface-2); }
table.fin tr.memo th, table.fin tr.memo td { color: var(--muted); font-size: .85rem; }
table.fin tr.computed th.line { font-style: italic; }
table.fin tr.grp th { text-align: left; background: var(--surface-2); font-family: var(--serif); font-weight: 600; font-size: .95rem; position: static; }
table.fin .unit { color: var(--muted); font-size: .75rem; }
sup.der { color: var(--gold); font-size: .7em; margin-left: 1px; }
.table-note { font-size: .82rem; color: var(--muted); margin: .7rem 0; max-width: 90ch; }
.downloads { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; font-size: .9rem; }
.downloads span { color: var(--muted); }
.downloads a { text-decoration: none; padding: .35rem .75rem; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); }
.downloads a:hover { border-color: var(--accent); }
.filings, .about-data { margin-top: 2.5rem; }
.filing-table, .co-table { border-collapse: collapse; width: 100%; font-size: .92rem; }
.filing-table th, .filing-table td, .co-table th, .co-table td { text-align: left; padding: .55rem .8rem; border-bottom: 1px solid var(--line); }
.filing-table thead th, .co-table thead th { background: var(--surface-2); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.co-table td.num, .co-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.co-table th small { text-transform: none; letter-spacing: 0; }
.co-table tr:hover td { background: var(--accent-soft); }
.co-link { text-decoration: none; font-weight: 600; color: var(--ink); white-space: nowrap; }
.form { font-family: var(--mono); font-size: .78rem; font-weight: 700; padding: .1rem .4rem; border-radius: 5px; background: var(--surface-2); }
.form-10k { background: var(--accent-soft); color: var(--brand-2); }
.form-10q { background: #e6eef8; color: #2d5a8c; }
@media (prefers-color-scheme: dark) { .form-10q { background: #1b2533; color: #9fc0e6; } }
.js tr.nonperiodic { display: none; }
.js .show-all tr.nonperiodic { display: table-row; }
.about-data p { color: var(--ink-2); max-width: 85ch; }
.method { max-width: 780px; margin-top: 3rem; }

/* ---- search / sitemap / footer -------------------------------------------------------- */
.search-big { display: flex; gap: .6rem; margin: 1rem 0 1.6rem; }
.search-big input { flex: 1; font: inherit; font-size: 1.05rem; padding: .7rem 1rem; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); color: var(--ink); }
.sitemap-grid { columns: 3 300px; column-gap: 2.5rem; }
.sitemap-grid section { break-inside: avoid; margin-bottom: 1.5rem; }
.sitemap-grid h2 { margin-top: 0; font-size: 1.2rem; }
.sitemap-grid h2 a { color: var(--ink); text-decoration: none; }
.sitemap-grid h3 { font-family: var(--sans); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--gold); margin: .8rem 0 .2rem; }
.sitemap-grid ul { margin: 0; padding-left: 1rem; font-size: .92rem; }
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 2.6rem 0 1.4rem; margin-top: 2rem; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem; }
.footer-grid h2 { font-family: var(--sans); font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 0 0 .6rem; }
.footer-grid a:not(.brand) { display: block; color: var(--ink-2); text-decoration: none; padding: .15rem 0; }
.footer-grid a:not(.brand):hover { color: var(--brand-2); }
.footer-grid p { margin: .5rem 0 0; max-width: 34ch; }
.footer-base { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 2rem; padding-top: 1rem; color: var(--muted); font-size: .82rem; }
.footer-base a { color: inherit; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
/* expenses are shown in parentheses; keep red for negative totals and ratios only */
table.fin td.neg { color: inherit; }
table.fin tr.total td.neg, table.fin tr.subtotal td.neg, .panel[data-tab="ratios"] table.fin td.neg { color: var(--neg); }

/* valuation strip on the company page */
.valuation { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: var(--radius); padding: 1rem 1.2rem; margin: 0 0 1.4rem; }
.val-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem 1rem; }
.val-head h2 { margin: 0; font-size: 1.15rem; }
.val-head p { margin: 0; font-size: .85rem; }
.val-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: .8rem; margin-top: .8rem; }
.val-grid .k { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.val-grid .v { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 900px) { .val-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 520px) { .val-grid { grid-template-columns: repeat(2, 1fr); } }

/* company list: filters, sort links, paging, sectors */
.co-filter { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 0 0 1rem; }
.co-filter input[type=search] { flex: 1 1 16rem; font: inherit; padding: .5rem .8rem; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); color: var(--ink); }
.co-filter select { font: inherit; padding: .5rem .6rem; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); color: var(--ink); }
.co-filter .clear { font-size: .88rem; }
.sector-chips a[aria-current] { background: var(--brand); border-color: var(--brand); color: #fff; }
.sector-chips .n { font-size: .78rem; color: var(--muted); margin-left: .15rem; }
.sector-chips a[aria-current] .n { color: inherit; opacity: .8; }
.list-count { font-size: .88rem; margin: .2rem 0 .6rem; }
.co-table th a.sort { color: inherit; text-decoration: none; white-space: nowrap; }
.co-table th a.sort:hover, .co-table th a.sort.active { color: var(--brand-2); }
.co-table td.neg { color: var(--neg); }
.co-table .sec-link { color: var(--ink-2); text-decoration: none; }
.co-table .sec-link:hover { color: var(--brand-2); text-decoration: underline; }
.pager { display: flex; flex-wrap: wrap; gap: .35rem; margin: 1rem 0; }
.pager a, .pager span { padding: .3rem .65rem; border-radius: 8px; border: 1px solid var(--line); text-decoration: none; font-size: .9rem; background: var(--surface); }
.pager span[aria-current] { background: var(--brand); border-color: var(--brand); color: #fff; }
.sector-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1rem; }
.sector-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; }
.sector-card h2 { font-size: 1.2rem; margin: 0 0 .2rem; }
.sector-card h2 a { text-decoration: none; }
.sector-card p { font-size: .85rem; margin: 0 0 .6rem; }
.sector-card ul { list-style: none; padding: 0; margin: 0 0 .6rem; font-size: .9rem; }
.sector-card li { display: flex; justify-content: space-between; gap: .5rem; padding: .2rem 0; }
.sector-card li a { text-decoration: none; color: var(--ink); }
.sector-card .more { font-size: .88rem; }
.co-meta a { color: inherit; }
