:root {
  color-scheme: light;
  --bg: #f4f1ea;
  --bg-soft: #ece7dd;
  --surface: #fffdf9;
  --surface-2: #f1ece3;
  --surface-3: #e7e0d4;
  --text: #17191d;
  --muted: #5f656d;
  --faint: #8a8f97;
  --border: #ddd6c9;
  --border-strong: #c8bfae;
  --accent: #b4111b;
  --accent-soft: #f6d9d7;
  --accent-2: #0d7268;
  --accent-2-soft: #d4ebe6;
  --amber: #a85a08;
  --amber-soft: #f7e6c9;
  --blue: #1d4ed8;
  --positive: #147a5a;
  --negative: #b42318;
  --shadow: 0 1px 2px rgba(32, 26, 16, .04), 0 12px 32px rgba(32, 26, 16, .07);
  --shadow-soft: 0 1px 2px rgba(32, 26, 16, .04), 0 4px 14px rgba(32, 26, 16, .05);
  --chart-1: #0d7268;
  --chart-2: #b4111b;
  --chart-3: #c97a12;
  --chart-4: #2f5fb3;
  --chart-5: #6d4c9f;
  --chart-6: #4d7c2f;
  --chart-7: #a34d7d;
  --chart-8: #5c6b7a;
  --radius: 18px;
  --radius-sm: 12px;
  --font-body: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: Georgia, "Times New Roman", serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c0f13;
  --bg-soft: #11151b;
  --surface: #151a21;
  --surface-2: #1b222b;
  --surface-3: #232c37;
  --text: #f3f0e9;
  --muted: #a0a8b2;
  --faint: #7c8792;
  --border: #29323d;
  --border-strong: #3a4654;
  --accent: #ff6b6b;
  --accent-soft: #3a1d21;
  --accent-2: #2dd4bf;
  --accent-2-soft: #12322f;
  --amber: #f0a84a;
  --amber-soft: #332617;
  --blue: #7aa2ff;
  --positive: #4ade9a;
  --negative: #ff7b72;
  --shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 16px 40px rgba(0, 0, 0, .28);
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, .2), 0 6px 18px rgba(0, 0, 0, .2);
  --chart-1: #2dd4bf;
  --chart-2: #ff6b6b;
  --chart-3: #f0a84a;
  --chart-4: #7aa2ff;
  --chart-5: #b79cff;
  --chart-6: #86c76a;
  --chart-7: #e78fbf;
  --chart-8: #93a4b5;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0c0f13;
    --bg-soft: #11151b;
    --surface: #151a21;
    --surface-2: #1b222b;
    --surface-3: #232c37;
    --text: #f3f0e9;
    --muted: #a0a8b2;
    --faint: #7c8792;
    --border: #29323d;
    --border-strong: #3a4654;
    --accent: #ff6b6b;
    --accent-soft: #3a1d21;
    --accent-2: #2dd4bf;
    --accent-2-soft: #12322f;
    --amber: #f0a84a;
    --amber-soft: #332617;
    --blue: #7aa2ff;
    --positive: #4ade9a;
    --negative: #ff7b72;
    --shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 16px 40px rgba(0, 0, 0, .28);
    --shadow-soft: 0 1px 2px rgba(0, 0, 0, .2), 0 6px 18px rgba(0, 0, 0, .2);
    --chart-1: #2dd4bf;
    --chart-2: #ff6b6b;
    --chart-3: #f0a84a;
    --chart-4: #7aa2ff;
    --chart-5: #b79cff;
    --chart-6: #86c76a;
    --chart-7: #e78fbf;
    --chart-8: #93a4b5;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 500px at 85% -10%, var(--bg-soft), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.12;
  margin: 0;
}

h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
h2 { font-size: clamp(1.25rem, 2vw, 1.6rem); }
h3 { font-size: 1.1rem; }

p { margin: 0 0 .9rem; }
a { color: var(--accent-2); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--text); }

code {
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: .9em;
  background: var(--surface-2);
  padding: .1em .35em;
  border-radius: 5px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; top: -100px; left: 16px; z-index: 1000;
  background: var(--accent); color: #fff; padding: 10px 14px;
  border-radius: 8px; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1320px; margin: 0 auto; padding: 14px 24px 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); flex: 0 0 auto; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), #7c0a10);
  color: #fff; font-weight: 800; font-size: .78rem; letter-spacing: .08em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--font-display); font-size: 1.12rem; letter-spacing: -.01em; }
.brand-text small { color: var(--muted); font-size: .74rem; letter-spacing: .02em; }

.header-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

.search-field {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 0 12px; height: 40px;
  min-width: 230px; transition: border-color .15s, box-shadow .15s;
}
.search-field:focus-within { border-color: var(--accent-2); box-shadow: 0 0 0 3px var(--accent-2-soft); }
.search-field svg { fill: var(--muted); flex: 0 0 auto; }
.search-field input {
  border: 0; background: transparent; color: var(--text);
  font: inherit; font-size: .9rem; outline: none; width: 100%; min-width: 0;
}
.search-field.large { min-width: 320px; height: 46px; }
.header-search { min-width: 250px; }

.select-field select {
  appearance: none; height: 40px; padding: 0 34px 0 14px;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%23686d75' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") no-repeat right 12px center;
  color: var(--text); font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer;
}
.select-field select:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

.mode-toggle {
  display: inline-flex; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 999px; padding: 3px; height: 40px; align-items: center;
}
.mode-toggle button {
  border: 0; background: transparent; color: var(--muted);
  font: inherit; font-size: .78rem; font-weight: 600; padding: 6px 11px;
  border-radius: 999px; cursor: pointer; white-space: nowrap;
}
.mode-toggle button.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-soft); }
.mode-toggle button:disabled { opacity: .35; cursor: not-allowed; }

.icon-button {
  width: 40px; height: 40px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  display: grid; place-items: center; cursor: pointer;
}
.icon-button svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-button .icon-moon { display: none; }
:root[data-theme="dark"] .icon-button .icon-sun { display: none; }
:root[data-theme="dark"] .icon-button .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-button .icon-sun { display: none; }
  :root:not([data-theme="light"]) .icon-button .icon-moon { display: block; }
}

/* Tabs */
.tabs {
  max-width: 1320px; margin: 0 auto; padding: 0 24px;
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  border: 0; background: transparent; color: var(--muted);
  font: inherit; font-size: .9rem; font-weight: 600;
  padding: 10px 12px 12px; cursor: pointer; white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--text); border-bottom-color: var(--accent); }

/* Main */
.main { max-width: 1320px; margin: 0 auto; padding: 28px 24px 64px; }
.panel { animation: rise .35s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
[hidden] { display: none !important; }

.loading { padding: 80px 0; text-align: center; color: var(--muted); font-size: 1rem; }
.error-box {
  background: var(--accent-soft); border: 1px solid var(--accent);
  color: var(--text); padding: 16px 18px; border-radius: var(--radius-sm); margin-bottom: 20px;
}

.eyebrow {
  text-transform: uppercase; letter-spacing: .14em; font-size: .7rem;
  font-weight: 800; color: var(--accent-2); margin: 0 0 10px;
}
.lead { color: var(--muted); font-size: 1.05rem; max-width: 72ch; }
.muted { color: var(--muted); font-size: .88rem; margin: 0; }
.note {
  color: var(--muted); font-size: .8rem; line-height: 1.5;
  border-left: 3px solid var(--border-strong); padding-left: 12px; margin-top: 14px;
}

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--text); font: inherit; font-weight: 600; font-size: .9rem;
  padding: 10px 16px; border-radius: 999px; cursor: pointer;
  transition: transform .1s, background .15s, border-color .15s;
}
.button:hover { background: var(--surface-2); transform: translateY(-1px); }
.button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.button.primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.text-button {
  border: 0; background: transparent; color: var(--accent-2);
  font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.text-button:hover { color: var(--text); }

/* Hero */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px;
  align-items: center; padding: clamp(24px, 4vw, 48px);
  border: 1px solid var(--border); border-radius: 26px;
  background:
    radial-gradient(800px 300px at 100% 0%, var(--accent-2-soft), transparent 70%),
    linear-gradient(135deg, var(--surface), color-mix(in srgb, var(--surface) 70%, var(--bg-soft)));
  box-shadow: var(--shadow); margin-bottom: 24px;
}
.hero-copy h1 { margin-bottom: 14px; max-width: 16ch; }
.hero-copy .lead { font-size: 1.08rem; max-width: 62ch; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.hero-badge {
  width: 160px; height: 160px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 1px solid var(--border-strong);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  box-shadow: inset 0 0 0 8px color-mix(in srgb, var(--surface-2) 60%, transparent);
  text-align: center; transform: rotate(-4deg);
}
.hero-badge-year { font-family: var(--font-display); font-size: 2.6rem; line-height: 1; letter-spacing: -.04em; }
.hero-badge-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .16em; color: var(--muted); margin-top: 6px; font-weight: 700; }

/* Cards and grids */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 18px 16px; box-shadow: var(--shadow-soft);
  display: flex; flex-direction: column; gap: 4px; min-height: 132px;
  position: relative; overflow: hidden;
}
.stat-card::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 4px;
  background: var(--stat-color, var(--accent-2));
}
.stat-label { color: var(--muted); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.stat-value { font-family: var(--font-display); font-size: clamp(1.55rem, 2.4vw, 2.1rem); line-height: 1.1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat-sub { color: var(--muted); font-size: .8rem; }
.stat-sub strong { color: var(--text); font-weight: 600; }
.stat-delta { font-size: .78rem; font-weight: 700; }
.stat-delta.positive { color: var(--positive); }
.stat-delta.negative { color: var(--negative); }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow-soft); min-width: 0;
}
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.card-head h2 { margin-bottom: 4px; }
.card-head .muted { max-width: 58ch; }

.chart { width: 100%; min-width: 0; }
.chart-tall { height: 300px; }
.overview-history-card { margin-bottom: 18px; }
.overview-history-chart { height: 380px; }
.overview-growth { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.growth-item { border: 1px solid var(--border); border-left: 3px solid var(--chart-1); border-radius: var(--radius-sm); background: var(--surface-2); padding: 10px 12px; }
.growth-item:nth-child(2) { border-left-color: var(--chart-4); }
.growth-item .k { display: block; color: var(--muted); font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.growth-item strong { display: block; font-family: var(--font-display); font-size: 1.12rem; margin-top: 2px; font-variant-numeric: tabular-nums; }
.growth-item strong small { font-family: inherit; font-size: .62rem; font-weight: 600; color: var(--muted); }
.growth-item span:not(.k) { display: block; color: var(--muted); font-size: .78rem; margin-top: 1px; }
@media (max-width: 700px) {
  .overview-history-chart { height: 320px; }
  .overview-growth { grid-template-columns: 1fr; }
}
.revenue-sources { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(230px, 1fr); gap: 20px; align-items: start; }
.revenue-sources .chart { height: 320px; }
@media (max-width: 900px) { .revenue-sources { grid-template-columns: 1fr; gap: 4px; } }
@media (max-width: 640px) {
  .revenue-sources .chart { display: none; }
  .revenue-sources .mini-row .name { white-space: normal; }
}
.chart-medium { height: 300px; }
.chart-explorer { height: 460px; }
.chart-history { height: 430px; }

.mini-list { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.mini-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px;
  align-items: center; padding: 7px 4px; border-top: 1px solid var(--border);
  font-size: .86rem;
}
.mini-row:first-child { border-top: 0; }
.mini-row .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-row .val { font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }

.highlight-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.highlight-card {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-2); padding: 13px 14px;
}
.highlight-card .k { color: var(--muted); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
.highlight-card .v { font-family: var(--font-display); font-size: 1.4rem; letter-spacing: -.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.highlight-card .s { color: var(--muted); font-size: .76rem; margin-top: 2px; }
.teaser-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 14px 0 18px; }
.teaser { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; text-align: left; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); padding: 11px 13px; color: var(--text); font: inherit; cursor: pointer; box-shadow: var(--shadow-soft); }
.teaser:hover { border-color: var(--accent-2); background: var(--surface-2); }
.teaser .k { color: var(--muted); font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.teaser strong { font-size: .9rem; line-height: 1.3; }
.teaser .s { color: var(--muted); font-size: .72rem; }
@media (max-width: 900px) { .teaser-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.overview-bars { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.overview-bar-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) 100px; gap: 10px; align-items: center; font-size: .86rem; }
.overview-bar-row .name { font-weight: 600; }
.overview-bar-row .bar { height: 9px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.overview-bar-row .bar span { display: block; height: 100%; border-radius: 999px; background: var(--accent-2); }
.overview-bar-row .val { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.payer-list { display: flex; flex-direction: column; gap: 0; }
.payer-row { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 4px 10px; align-items: baseline; padding: 9px 0; border-top: 1px solid var(--border); }
.payer-row:first-child { border-top: 0; }
.payer-kind { color: var(--muted); font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.payer-name { font-weight: 650; }
.payer-val { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.payer-note { grid-column: 2 / -1; color: var(--muted); font-size: .72rem; }
.jst-top-row { width: 100%; border: 0; background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.jst-top-row:hover { background: var(--surface-2); }
.jst-top-row .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jst-top-row .val::after { content: " ›"; color: var(--muted); }
@media (max-width: 560px) {
  .overview-bar-row { grid-template-columns: 95px minmax(0, 1fr) 82px; font-size: .8rem; }
  .payer-row { grid-template-columns: 1fr auto; }
  .payer-kind { grid-column: 1 / -1; }
  .payer-note { grid-column: 1 / -1; }
}

.sector-mini { display: flex; flex-direction: column; gap: 8px; }
.sector-mini-row { display: grid; grid-template-columns: 120px minmax(0,1fr) auto; gap: 12px; align-items: center; font-size: .86rem; }
.sector-mini-bar { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.sector-mini-bar span { display: block; height: 100%; border-radius: 999px; background: var(--bar-color, var(--chart-1)); }
.sector-mini-row .val { font-variant-numeric: tabular-nums; color: var(--muted); }

/* Section head */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.section-head .lead { margin-top: 8px; }
.section-note { color: var(--muted); font-size: .86rem; margin-top: 8px; max-width: 72ch; }
.section-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }

/* Explorer */
.explorer { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); gap: 16px; margin-bottom: 16px; }
.explorer-main { min-width: 0; }
.explorer-side { align-self: start; position: sticky; top: 136px; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-bottom: 12px; font-size: .84rem; }
.breadcrumb button {
  border: 0; background: transparent; color: var(--accent-2); font: inherit; font-weight: 700;
  cursor: pointer; padding: 3px 6px; border-radius: 6px;
}
.breadcrumb button:hover { background: var(--surface-2); }
.breadcrumb .sep { color: var(--faint); }
.breadcrumb .current { color: var(--text); font-weight: 700; padding: 3px 6px; }
.explorer-summary { display: flex; gap: 22px; flex-wrap: wrap; align-items: baseline; margin: 4px 0 14px; }
.explorer-summary .big { font-family: var(--font-display); font-size: 2rem; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.explorer-summary .sub { color: var(--muted); font-size: .84rem; }
.explorer-summary .sub strong { color: var(--text); }

.drill-list { display: flex; flex-direction: column; margin-top: 10px; }
#exp-list {
  max-height: 520px; overflow-y: auto; padding-right: 4px;
  overscroll-behavior: contain; scrollbar-width: thin;
}
.scroll-hint { color: var(--muted); font-size: .74rem; margin: 8px 4px 0; }
.drill-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 120px auto; gap: 12px;
  align-items: center; padding: 10px 6px; border-top: 1px solid var(--border);
  background: transparent; border-left: 0; border-right: 0; border-bottom: 0;
  color: var(--text); font: inherit; text-align: left; cursor: pointer; width: 100%;
}
.drill-row:hover { background: var(--surface-2); }
.drill-row .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; }
.drill-row .name small { display: block; color: var(--muted); font-size: .74rem; }
.drill-row .bar { height: 7px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.drill-row .bar span { display: block; height: 100%; background: var(--accent-2); border-radius: 999px; }
.drill-row .val { font-variant-numeric: tabular-nums; font-size: .88rem; white-space: nowrap; }
.drill-row.is-selected { background: var(--accent-2-soft); }

.detail-title { font-family: var(--font-display); font-size: 1.35rem; line-height: 1.2; margin: 4px 0 4px; }
.detail-path { color: var(--muted); font-size: .76rem; margin-bottom: 14px; }
.detail-kv { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-size: .86rem; margin: 12px 0; }
.detail-kv dt { color: var(--muted); }
.detail-kv dd { margin: 0; font-variant-numeric: tabular-nums; text-align: right; }
.detail-econ { margin-top: 16px; }
.detail-econ h3 { font-family: var(--font-body); font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 8px; }
.detail-econ .mini-row { font-size: .82rem; }
.progress-note { color: var(--muted); font-size: .8rem; margin-top: 14px; }

.reserve-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.reserve-card {
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2);
  padding: 14px;
}
.reserve-card .k { color: var(--muted); font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
.reserve-card .v { font-family: var(--font-display); font-size: 1.35rem; margin-top: 4px; font-variant-numeric: tabular-nums; }
.reserve-card .s { color: var(--muted); font-size: .78rem; margin-top: 4px; }

/* Tables */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .86rem; min-width: 620px; }
.data-table th, .data-table td { padding: 9px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.data-table th { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 800; white-space: nowrap; }
.data-table td.num, .data-table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.data-table tr:hover td { background: var(--surface-2); }
.data-table .link-row { cursor: pointer; }
.data-table .muted { color: var(--muted); }

/* Segmented */
.segmented { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 3px; }
.segmented button {
  border: 0; background: transparent; color: var(--muted); font: inherit; font-size: .8rem; font-weight: 600;
  padding: 7px 12px; border-radius: 999px; cursor: pointer; white-space: nowrap;
}
.segmented button.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-soft); }

/* Taxes */
.taxes-nav { margin-bottom: 18px; }
.tax-panel { animation: rise .3s ease both; }
.tax-controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.tax-controls .search-field { min-width: 260px; }
.tax-controls .select-field select { height: 40px; }
.cit-name { font-weight: 600; }
.cit-nip { color: var(--muted); font-size: .78rem; font-variant-numeric: tabular-nums; }
.cit-rate { color: var(--muted); font-size: .8rem; }
#cit-table .data-table { min-width: 900px; }

/* Debt */
.financing-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.finance-card { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); padding: 13px 14px; }
.finance-card .k { color: var(--muted); font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
.finance-card .v { font-family: var(--font-display); font-size: 1.3rem; margin-top: 3px; font-variant-numeric: tabular-nums; }
.finance-card .s { color: var(--muted); font-size: .75rem; margin-top: 3px; }
.financing-warning { grid-column: 1 / -1; margin: 0 0 2px; padding: 10px 12px; border: 1px solid var(--amber); border-radius: var(--radius-sm); background: var(--amber-soft); color: var(--text); font-size: .8rem; line-height: 1.5; }
.details { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 12px; }
.details summary { cursor: pointer; color: var(--accent-2); font-weight: 700; font-size: .85rem; }
.details p { color: var(--muted); font-size: .84rem; margin-top: 8px; }

/* Sector */
.sector-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.sector-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow-soft); min-height: 150px;
}
.sector-card .k { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 800; }
.sector-card .v { font-family: var(--font-display); font-size: 1.55rem; margin-top: 6px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.sector-card .s { color: var(--muted); font-size: .78rem; margin-top: 4px; }
.sector-card .tag { display: inline-block; margin-top: 10px; font-size: .7rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.sector-card.accent { border-color: var(--accent-2); background: linear-gradient(160deg, var(--surface), var(--accent-2-soft)); }
.sector-note { color: var(--muted); font-size: .78rem; margin-top: 10px; }

/* JST */
.jst-controls { display: grid; grid-template-columns: minmax(240px, 2fr) repeat(3, minmax(150px, 1fr)); gap: 12px; align-items: end; margin-bottom: 18px; }
.jst-control { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.jst-control-label { color: var(--muted); font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.jst-control .search-field { width: 100%; min-width: 0; }
.jst-control .select-field { display: block; }
.jst-control .select-field select { width: 100%; }
.jst-summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 22px; margin-bottom: 16px; }
.jst-summary-item { display: inline-flex; align-items: baseline; gap: 7px; }
.jst-summary-item .k { color: var(--muted); font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.jst-summary-item .v { font-size: .95rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.jst-summary-note { color: var(--muted); font-size: .78rem; }
.jst-layout { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 16px; align-items: start; }
.jst-results-card { position: sticky; top: 136px; max-height: calc(100vh - 156px); display: flex; flex-direction: column; }
.jst-results-card .card-head { align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.jst-results-card .card-head > div { min-width: 0; }
.jst-results-card .card-head h2 { font-size: 1.05rem; }
.jst-sort { flex: 0 0 auto; }
.jst-jump { margin-top: 6px; border: 0; background: transparent; color: var(--accent-2); font: inherit; font-size: .78rem; font-weight: 700; padding: 5px 0; cursor: pointer; text-align: left; }
.jst-jump:hover { text-decoration: underline; }
.jst-sort select { height: 34px; padding: 0 30px 0 11px; border-radius: 8px; font-size: .8rem; }
.jst-results-head {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px;
  padding: 0 6px 7px; border-bottom: 1px solid var(--border-strong);
  color: var(--muted); font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em;
}
.jst-results-head span:last-child { text-align: right; }
.jst-results { flex: 1; min-height: 0; overflow-y: auto; padding-right: 4px; scrollbar-width: thin; }
.jst-result {
  display: grid; grid-template-columns: minmax(0, 1fr) auto 12px; gap: 10px; align-items: center;
  width: 100%; text-align: left; background: transparent; border: 0; border-bottom: 1px solid var(--border);
  color: var(--text); font: inherit; padding: 11px 6px; cursor: pointer;
  box-shadow: inset 3px 0 0 transparent;
}
.jst-result:hover { background: var(--surface-2); }
.jst-result.is-selected { background: var(--accent-2-soft); box-shadow: inset 3px 0 0 var(--accent-2); }
.jst-result .name { display: block; font-weight: 650; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jst-result .meta { display: block; color: var(--muted); font-size: .74rem; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jst-result .val { text-align: right; font-variant-numeric: tabular-nums; font-size: .86rem; font-weight: 650; white-space: nowrap; }
.jst-result-arrow { color: var(--muted); font-size: .95rem; line-height: 1; text-align: right; }
.jst-result.is-selected .jst-result-arrow { color: var(--accent-2); }
.jst-badge { display: inline-block; font-size: .7rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.jst-detail-card { scroll-margin-top: 132px; }
.jst-detail-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 18px; }
.jst-title { min-width: 0; }
.jst-title h2 { margin: 5px 0 6px; line-height: 1.08; }
.jst-title .meta { color: var(--muted); font-size: .86rem; }
.jst-year-pill { flex: 0 0 auto; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 5px 11px; font-size: .8rem; font-weight: 700; }
.jst-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.jst-kpi { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; background: var(--surface-2); }
.jst-kpi .k { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 800; }
.jst-kpi .v { font-family: var(--font-display); font-size: clamp(1.35rem, 2vw, 1.7rem); margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.jst-kpi .s { color: var(--muted); font-size: .78rem; margin-top: 4px; }
.jst-kpi .s strong { color: var(--text); font-weight: 600; }
.jst-kpi.is-negative .v { color: var(--negative); }
.jst-kpi.is-positive .v { color: var(--positive); }
.jst-context { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px; padding: 13px 0; border-top: 1px solid var(--border); }
.jst-context .k { display: block; color: var(--muted); font-size: .68rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 800; }
.jst-context .v { display: block; font-size: .98rem; font-weight: 700; margin-top: 3px; font-variant-numeric: tabular-nums; }
.jst-structure { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--border); }
.jst-section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 12px; }
.jst-section-head h3 { margin: 0 0 3px; font-family: var(--font-display); font-size: 1.25rem; }
.jst-section-head p { margin: 0; }
.jst-view-switch { flex: 0 0 auto; }
.jst-view-switch button { padding: 8px 14px; font-size: .82rem; }
.jst-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.jst-table thead th { padding: 8px; border-bottom: 1px solid var(--border-strong); color: var(--muted); font-size: .68rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 800; text-align: left; }
.jst-table thead th.num { text-align: right; }
.jst-table tbody th, .jst-table tbody td { padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.jst-table tbody th { font-weight: 400; text-align: left; }
.jst-table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.jst-table th:first-child, .jst-table td:first-child { width: 46%; }
.jst-table th.num { width: 18%; }
.jst-row-btn { display: flex; width: 100%; align-items: flex-start; gap: 8px; border: 0; background: transparent; color: var(--text); font: inherit; text-align: left; padding: 0; cursor: pointer; }
.jst-row-btn:hover .jst-row-name { color: var(--accent-2); }
.jst-row-btn:disabled { cursor: default; }
.jst-row-btn:disabled .jst-chevron { opacity: .25; }
.jst-chevron { flex: 0 0 14px; width: 14px; color: var(--muted); font-size: .85rem; line-height: 1.4; transition: transform .15s; }
.jst-dzial.is-open .jst-chevron { transform: rotate(90deg); }
.jst-dzial.is-open th, .jst-dzial.is-open td { background: var(--surface-2); }
.jst-dzial.is-open th:first-child { box-shadow: inset 3px 0 0 var(--accent-2); }
.jst-row-label { min-width: 0; flex: 1; }
.jst-row-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 650; line-height: 1.3; }
.jst-row-bar { display: block; height: 5px; margin-top: 6px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.jst-row-bar span { display: block; height: 100%; border-radius: 999px; background: var(--jst-bar-color, var(--chart-2)); }
.jst-table.is-revenue { --jst-bar-color: var(--chart-1); }
.jst-table.is-expenditure { --jst-bar-color: var(--chart-2); }
.jst-rozdzial-row th, .jst-rozdzial-row td { background: var(--surface-2); font-size: .85rem; }
.jst-table tbody .jst-rozdzial-row th { padding-left: 30px; }
.jst-rozdzial-row .jst-row-name { font-weight: 500; }
.jst-rozdzial-row .jst-row-bar { height: 4px; margin-top: 5px; opacity: .8; }
.jst-chapter-rest .jst-row-name { color: var(--muted); font-weight: 600; }
.jst-other-row th, .jst-other-row td { background: var(--surface-2); color: var(--muted); font-weight: 600; }
.jst-other-row .jst-other-label { display: block; padding-left: 22px; }
.jst-other-row .jst-row-bar { margin-left: 22px; }
.jst-show-all { margin-top: 10px; border: 0; background: transparent; color: var(--accent-2); font: inherit; font-size: .85rem; font-weight: 700; padding: 6px 0; cursor: pointer; }
.jst-show-all:hover { text-decoration: underline; }
.jst-table tbody .jst-chapter-more-row td { background: var(--surface-2); border-bottom: 0; padding: 0 8px 10px 30px; }
.jst-chapter-more-row .jst-show-all { margin-top: 0; }
.jst-compare-card { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--border); }
.jst-compare-card h3 { margin-bottom: 4px; font-family: var(--font-display); font-size: 1.25rem; }
.jst-compare-card .jst-section-head { margin-bottom: 10px; }
.jst-compare table { width: 100%; border-collapse: collapse; font-size: .86rem; }
@media (min-width: 561px) {
  .jst-compare table { table-layout: fixed; }
  .jst-compare th:first-child, .jst-compare td:first-child { width: 46%; }
  .jst-compare th.num { width: 18%; }
}
.jst-compare th, .jst-compare td { padding: 10px 8px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.jst-compare th { color: var(--muted); font-size: .68rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 800; }
.jst-compare td.num, .jst-compare th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.jst-compare tr.is-current td, .jst-compare tr.is-current th { background: var(--accent-2-soft); }
.jst-compare .jst-comp-name { display: block; font-weight: 600; }
.jst-compare .jst-comp-bar { display: block; height: 4px; max-width: 320px; margin-top: 5px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.jst-compare .jst-comp-bar span { display: block; height: 100%; border-radius: 999px; background: var(--accent-2); opacity: .55; }
.jst-compare tr.is-current .jst-comp-bar span { opacity: 1; }
.jst-compare .is-negative { color: var(--negative); }
.jst-note { color: var(--muted); font-size: .78rem; margin-top: 10px; }
.jst-empty { padding: 28px 4px; max-width: 52ch; }
.jst-empty h2 { margin-bottom: 8px; }
.jst-empty p { color: var(--muted); }
.jst-loading { padding: 18px 0; }
@media (max-width: 1100px) {
  .jst-layout { grid-template-columns: 1fr; }
  .jst-results-card { position: static; max-height: 420px; }
  .jst-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jst-control-search { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  .jst-section-head { flex-direction: column; align-items: stretch; }
  .jst-view-switch { align-self: flex-start; }
}
@media (max-width: 560px) {
  .jst-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jst-control-search { grid-column: 1 / -1; }
  .jst-results-card { max-height: min(60vh, 520px); }
  .jst-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
  .jst-summary-note { grid-column: 1 / -1; }
  .jst-kpis { grid-template-columns: 1fr; }
  .jst-kpi { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 2px 12px; padding: 12px 14px; }
  .jst-kpi .k { grid-column: 1; }
  .jst-kpi .v { grid-column: 2; grid-row: 1; margin: 0; font-size: 1.35rem; }
  .jst-kpi .s { grid-column: 1 / -1; }
  .jst-context { grid-template-columns: 1fr; gap: 10px; }
  .jst-context > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
  .jst-context .k { margin: 0; }
  .jst-context .v { margin: 0; text-align: right; }
  .jst-table th.num.plan, .jst-table td.plan { display: none; }
  .jst-table thead th:last-child,
  .jst-table tbody tr:not(.jst-chapter-more-row) td:last-child,
  .jst-table tbody tr:not(.jst-chapter-more-row) th:last-child { display: none; }
  .jst-table th:first-child, .jst-table td:first-child { width: 70%; }
  .jst-table th.num { width: 30%; }
  .jst-compare table { table-layout: fixed; }
  .jst-compare th:first-child, .jst-compare td:first-child { width: 40%; }
  .jst-compare th.num { width: 20%; }
  .jst-compare th, .jst-compare td { padding: 8px 4px; font-size: .78rem; }
  .jst-detail-head h2 { font-size: 1.5rem; }
}

/* History */
.history-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.history-kpi { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); padding: 11px 13px; }
.history-kpi .k { display: block; color: var(--muted); font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.history-kpi strong { display: block; font-family: var(--font-display); font-size: 1.05rem; margin-top: 3px; font-variant-numeric: tabular-nums; }
.history-kpi span:not(.k) { display: block; color: var(--muted); font-size: .78rem; margin-top: 2px; }
@media (max-width: 700px) {
  .history-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .history-kpi { padding: 8px 9px; }
  .history-kpi .k { font-size: .56rem; letter-spacing: .04em; }
  .history-kpi strong { font-size: .8rem; margin-top: 2px; }
  .history-kpi span:not(.k) { font-size: .66rem; }
}

/* Sector taxes */
.sector-tax-intro { color: var(--muted); font-size: .88rem; max-width: 85ch; margin-bottom: 16px; }
#sector-tax-bank, #sector-tax-gaming, #sector-tax-mining, #sector-tax-dividends { scroll-margin-top: 120px; }
#tax-sector .grid-2 { align-items: start; }
.taxes-nav { position: sticky; top: 104px; z-index: 25; background: var(--bg); padding: 6px 0; }
.sector-tax-intro p { margin: 0; }
.sector-tax-intro strong { color: var(--text); }
.sector-tax-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.sector-tax-fact { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); padding: 11px 13px; }
.sector-tax-fact .k { display: block; color: var(--muted); font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.sector-tax-fact .v { display: block; font-family: var(--font-display); font-size: 1.25rem; margin-top: 3px; font-variant-numeric: tabular-nums; }
.sector-tax-fact .s { display: block; color: var(--muted); font-size: .72rem; margin-top: 2px; }
.sector-tax-subhead { margin: 18px 0 8px; font-family: var(--font-display); font-size: 1.05rem; }
.sector-tax-note { color: var(--muted); font-size: .8rem; margin-top: 10px; }
.sector-tax-sources { color: var(--muted); font-size: .76rem; margin-top: 12px; line-height: 1.6; }
.sector-tax-sources .k { font-weight: 800; text-transform: uppercase; letter-spacing: .07em; font-size: .66rem; }
.sector-tax-sources a { color: var(--accent-2); }
.sector-tax-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.sector-tax-chips .tag { display: inline-block; border: 1px solid var(--border); border-radius: 999px; padding: 3px 8px; background: var(--surface-2); font-size: .72rem; }
.sector-tax-table { min-width: 0; font-size: .82rem; }
.sector-tax-table-wide { min-width: 560px; }
.sector-tax-table th, .sector-tax-table td { vertical-align: top; }
.sector-tax-table tr.is-aggregate td { background: var(--surface-2); font-weight: 600; }
.sector-tax-table td a { color: var(--accent-2); }
@media (max-width: 1100px) {
  #tax-sector .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .taxes-nav { top: 0; width: 100%; border-radius: 16px; }
  .taxes-nav button { flex: 0 0 auto; }
  #sector-tax-bank, #sector-tax-gaming, #sector-tax-mining, #sector-tax-dividends { scroll-margin-top: 12px; }
  .tab, .segmented button, .jst-sort select, .jst-row-btn, .details summary { min-height: 44px; }
  .details summary { display: flex; align-items: center; padding: 8px 0; }
  .sector-tax-sources a, .search-result .muted { display: inline-block; padding: 3px 0; }
}
@media (max-width: 700px) {
  .sector-tax-facts { grid-template-columns: 1fr; }
  .sector-tax-table-wide { min-width: 0; }
  .sector-tax-table-wide thead { display: none; }
  .sector-tax-table-wide, .sector-tax-table-wide tbody, .sector-tax-table-wide tr, .sector-tax-table-wide td { display: block; width: 100%; }
  .sector-tax-table-wide tbody tr { border-bottom: 1px solid var(--border); padding: 8px 0; }
  .sector-tax-table-wide tbody td { border: 0; padding: 3px 0; white-space: normal; }
  .sector-tax-table-wide tbody td::before { content: attr(data-label); display: inline-block; min-width: 78px; color: var(--muted); font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
  .sector-tax-table-wide tbody td.num { text-align: left; }
}
@media (max-width: 560px) {
  #sector-tax-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #sector-tax-stats .stat-value { font-size: 1.35rem; }
}

/* Legal pages */
.legal-page { max-width: 980px; margin: 0 auto; }
.legal-page h1 { margin-bottom: 16px; }
.legal-page h2 { margin-top: 26px; }
.legal-page p, .legal-page li { line-height: 1.65; }
.legal-page a { color: var(--accent-2); }
.legal-page .data-table { min-width: 720px; }

/* Prose */
.prose { max-width: 78ch; }
.card.prose { max-width: none; }
.card.prose > p, .card.prose > ul, .card.prose > ol { max-width: 78ch; }
#cit-chart { height: 520px; }
#tax-cit .grid-2 > .card, #tax-pit .grid-2 > .card, #tax-vat .grid-2 > .card { align-self: start; }
.share-list { display: flex; flex-direction: column; gap: 10px; }
.share-row { display: grid; grid-template-columns: 180px minmax(0, 1fr) 64px; gap: 12px; align-items: center; font-size: .86rem; }
.share-row .bar { height: 9px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.share-row .bar span { display: block; height: 100%; border-radius: 999px; background: var(--chart-1); }
.share-row .val { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.prose h2 { margin-bottom: 10px; }
.prose p, .prose li { color: var(--muted); font-size: .93rem; }
.prose p strong, .prose li strong { color: var(--text); }
.prose ul { padding-left: 20px; margin: 0 0 .9rem; }
.prose li { margin-bottom: 6px; }
.source-list a { font-weight: 600; }
.method-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

/* Search */
.alias-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.alias-card {
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface);
  padding: 13px 14px; cursor: pointer; text-align: left; color: var(--text); font: inherit;
  transition: transform .12s, border-color .12s;
}
.alias-card:hover { transform: translateY(-2px); border-color: var(--accent-2); }
.alias-card .k { font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.alias-card .v { font-family: var(--font-display); font-size: 1.25rem; margin-top: 3px; font-variant-numeric: tabular-nums; }
.alias-card .s { color: var(--muted); font-size: .76rem; margin-top: 3px; }

.search-results { display: flex; flex-direction: column; gap: 8px; }
.search-result {
  display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 16px; align-items: center;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface);
  padding: 13px 15px; cursor: pointer; text-align: left; color: var(--text); font: inherit;
}
.search-result:hover { border-color: var(--accent-2); background: var(--surface-2); }
.search-result .path { display: block; color: var(--muted); font-size: .74rem; margin-bottom: 2px; }
.search-result .name { font-weight: 600; }
.search-result .val { font-variant-numeric: tabular-nums; font-family: var(--font-display); font-size: 1.15rem; white-space: nowrap; }
.search-empty { color: var(--muted); padding: 30px 4px; text-align: center; }

.global-results {
  position: fixed; z-index: 80; top: 64px; right: max(24px, calc((100vw - 1320px) / 2 + 24px));
  width: min(480px, calc(100vw - 32px)); max-height: 70vh; overflow: auto;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px;
}
.global-result {
  display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px;
  padding: 10px 12px; border-radius: 10px; cursor: pointer; border: 0; background: transparent;
  color: var(--text); font: inherit; text-align: left; width: 100%;
}
.global-result:hover, .global-result.is-active { background: var(--surface-2); }
.global-result .path { display: block; color: var(--muted); font-size: .72rem; }
.global-result .global-note { display: block; color: var(--muted); font-size: .7rem; margin-top: 1px; }
.global-all { display: block; width: 100%; margin-top: 6px; padding: 9px 12px; border: 0; border-top: 1px solid var(--border); background: transparent; color: var(--accent-2); font: inherit; font-size: .78rem; font-weight: 700; text-align: left; cursor: pointer; }
.global-all:hover { background: var(--surface-2); }
.global-result .val { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.global-empty { color: var(--muted); padding: 14px 12px; font-size: .86rem; }

/* Footer */
.site-footer {
  max-width: 1320px; margin: 0 auto; padding: 24px 24px 40px;
  border-top: 1px solid var(--border); display: flex; justify-content: space-between;
  gap: 24px; color: var(--muted); font-size: .8rem;
}
.site-footer strong { color: var(--text); font-family: var(--font-display); }
.site-footer p { max-width: 70ch; margin: 4px 0 0; }
.footer-links { margin-top: 6px; }
.footer-links a { color: var(--accent-2); }
.footer-meta { display: flex; flex-direction: column; gap: 4px; text-align: right; white-space: nowrap; }

/* Focus */
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
button:focus-visible { outline-offset: 2px; }

/* Responsive */
@media (max-width: 1100px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sector-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .explorer { grid-template-columns: 1fr; }
  .explorer-side { position: static; }
  .method-grid { grid-template-columns: 1fr; }
  .alias-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .site-header { position: static; }
  .jst-detail-card { scroll-margin-top: 12px; }
  .header-inner { align-items: flex-start; flex-direction: column; }
  .header-controls { width: 100%; justify-content: flex-start; }
  .header-search { flex: 1 1 100%; min-width: 0; }
  .hero { grid-template-columns: 1fr; }
  .hero-badge { display: none; }
  .grid-2 { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .section-actions { width: 100%; justify-content: flex-start; }
  .search-field.large { width: 100%; min-width: 0; }
  .sector-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reserve-grid { grid-template-columns: 1fr; }
  .highlight-grid { grid-template-columns: 1fr; }
  .financing-grid { grid-template-columns: 1fr; }
  .site-footer { flex-direction: column; }
  .footer-meta { text-align: left; }
}

@media (max-width: 560px) {
  #overview-exp-chart, #overview-rev-chart, #revenue-parts-chart, #exp-composition-card { display: none; }
  .main { padding: 18px 16px 48px; }
  .header-inner { padding: 12px 16px 8px; }
  .tabs { padding: 0 16px; }
  .stat-grid { grid-template-columns: 1fr; }
  .sector-grid { grid-template-columns: 1fr; }
  .alias-grid { grid-template-columns: 1fr; }
  .hero { padding: 22px; border-radius: 20px; }
  .card { padding: 16px; }
  .drill-row { grid-template-columns: minmax(0,1fr) auto; }
  .drill-row .bar { display: none; }
  .sector-mini-row { grid-template-columns: 90px minmax(0,1fr) auto; }
  .global-results { top: 120px; right: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Statyczne strony SEO */
.seo-nav { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.seo-nav a { color: var(--muted); text-decoration: none; font-size: .82rem; font-weight: 600; }
.seo-nav a:hover { color: var(--text); }
.seo-content { max-width: 980px; margin: 0 auto; }
.seo-content h1 { margin-bottom: 10px; }
.seo-content .lead { font-size: 1.05rem; }
.seo-stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; margin: 18px 0 24px; }
.seo-stat { border: 1px solid var(--border); border-left: 3px solid var(--accent-2); border-radius: var(--radius-sm); background: var(--surface-2); padding: 11px 12px; }
.seo-stat .k { display: block; color: var(--muted); font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.seo-stat strong { display: block; font-family: var(--font-display); font-size: 1.12rem; margin-top: 2px; font-variant-numeric: tabular-nums; }
.seo-stat .s { display: block; color: var(--muted); font-size: .74rem; margin-top: 2px; }
.seo-table-wrap { overflow-x: auto; margin: 12px 0 18px; }
.seo-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.seo-table th, .seo-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; }
.seo-table th { color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; }
.seo-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.seo-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 18px; }
.seo-links a { display: inline-block; padding: 7px 10px; border: 1px solid var(--border); border-radius: 999px; text-decoration: none; font-size: .82rem; color: var(--text); background: var(--surface); }
.seo-links a:hover { border-color: var(--accent-2); }
.seo-updated { margin-top: 24px; color: var(--muted); font-size: .76rem; }
@media (max-width: 800px) {
  .seo-stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .seo-nav {
    display: flex; flex-wrap: nowrap; width: 100%;
    gap: 14px; overflow-x: auto; padding: 2px 0 4px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .seo-nav::-webkit-scrollbar { display: none; }
  .seo-nav a { flex: 0 0 auto; white-space: nowrap; padding: 4px 0; }
}
.seo-sitemap-list { margin: 12px 0 20px; padding-left: 20px; }
.seo-sitemap-list li { margin: 6px 0; }
.seo-sitemap-list a { font-weight: 700; color: var(--accent); text-decoration: none; }
.seo-sitemap-list a:hover { text-decoration: underline; }
.seo-index { margin: 18px 0; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.seo-index summary { cursor: pointer; font-weight: 700; }
.seo-index .seo-sitemap-list { columns: 2; column-gap: 28px; margin-bottom: 0; }
.seo-index .seo-sitemap-list li { break-inside: avoid; }
@media (max-width: 700px) { .seo-index .seo-sitemap-list { columns: 1; } }
.panel-h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
.seo-breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; color: var(--muted); font-size: .78rem; margin-bottom: 12px; }
.seo-breadcrumb a { color: var(--muted); text-decoration: none; }
.seo-breadcrumb a:hover { color: var(--text); }
.filters-row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 0 0 18px; }
.filters-row .year-switch, .filters-row .view-switch { margin: 0; }
.year-switch { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; margin: 0 0 18px; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.year-switch > span { color: var(--muted); font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; margin-right: 4px; }
.year-switch a { padding: 3px 7px; border-radius: 999px; color: var(--muted); text-decoration: none; font-size: .8rem; font-weight: 700; }
.year-switch a:hover { color: var(--text); background: var(--surface); }
.year-switch a[aria-current="page"] { background: var(--accent); color: #fff; }
.year-switch .disabled { color: var(--faint); font-size: .78rem; font-weight: 700; padding: 3px 6px; }
.view-switch { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; margin: -8px 0 18px; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.view-switch > span { color: var(--muted); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; margin-right: 4px; }
.view-switch a { padding: 3px 8px; border-radius: 999px; color: var(--muted); text-decoration: none; font-size: .78rem; font-weight: 700; }
.view-switch a.is-active { background: var(--accent-2); color: #fff; }
@media (max-width: 800px) {
  .year-switch { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .year-switch::-webkit-scrollbar { display: none; }
  .year-switch a, .year-switch .disabled { flex: 0 0 auto; }
  .view-switch { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .view-switch::-webkit-scrollbar { display: none; }
  .view-switch a { flex: 0 0 auto; }
}
.year-prev-next { display: flex; gap: 14px; margin: 10px 0 18px; font-size: .84rem; font-weight: 700; }
.year-prev-next a { color: var(--accent-2); text-decoration: none; }
.year-prev-next a:hover { text-decoration: underline; }
.route-breadcrumbs { max-width: 1180px; margin: 10px auto 0; padding: 0 16px; color: var(--muted); font-size: .8rem; }
.route-breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; list-style: none; margin: 0; padding: 0; }
.route-breadcrumbs li + li::before { content: "/"; color: var(--faint); margin-right: 6px; }
.route-breadcrumbs a { color: var(--muted); text-decoration: none; }
.route-breadcrumbs a:hover { color: var(--text); text-decoration: underline; }
.route-loading { max-width: 860px; margin: 0 auto; padding: 28px 16px 8px; text-align: left; color: var(--text); }
.route-loading p { margin: 4px 0; }
.route-loading .eyebrow { color: var(--muted); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
.route-loading a { color: var(--accent, #0d7268); }
.noscript { margin: 16px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); font-size: .9rem; }
.noscript p { margin: 0 0 6px; }
.seo-faq { display: grid; gap: 8px; margin: 10px 0 18px; }
.seo-faq details { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); padding: 10px 12px; }
.seo-faq summary { cursor: pointer; font-weight: 700; }
.seo-faq details p { margin: 8px 0 0; color: var(--muted); }
.news-filter { flex-wrap: wrap; margin-bottom: 14px; }
.news-title, #panel-aktualnosci .section-actions { flex-wrap: wrap; }
.news-list { display: grid; gap: 12px; }
.news-card { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); padding: 16px 18px; }
.news-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--muted); font-size: .76rem; }
.news-cat { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-weight: 700; }
.news-card h2 { font-size: clamp(1.15rem, 1.8vw, 1.4rem); margin: 6px 0 6px; }
.news-impact { color: var(--muted); font-size: .9rem; }
.news-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 8px; }
.news-source { color: var(--muted); font-size: .78rem; }
.news-mini-list { display: grid; gap: 4px; }
.news-mini { display: grid; grid-template-columns: 104px minmax(0,1fr) auto; gap: 10px; align-items: baseline; padding: 9px 0; border-top: 1px solid var(--border); color: var(--text); text-decoration: none; }
.news-mini:first-child { border-top: 0; }
.news-mini:hover .news-mini-title { color: var(--accent); }
.news-mini-date { color: var(--muted); font-size: .74rem; white-space: nowrap; }
.news-mini-title { font-weight: 700; font-size: .88rem; }
.news-mini-cat { color: var(--muted); font-size: .72rem; white-space: nowrap; }
@media (max-width: 700px) {
  .news-mini { grid-template-columns: 1fr auto; }
  .news-mini-date { grid-column: 1 / -1; }
}
.seo-news-list { display: grid; gap: 16px; margin: 18px 0 22px; }
.seo-news-item { border-top: 1px solid var(--border); padding-top: 16px; scroll-margin-top: 90px; }
.seo-news-item:first-child { border-top: 0; padding-top: 0; }
.seo-news-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; color: var(--muted); font-size: .78rem; margin-bottom: 2px; }
.seo-news-cat { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-weight: 700; }
.seo-news-item h2 { font-size: clamp(1.2rem, 2vw, 1.5rem); margin: 4px 0 8px; }
.seo-news-links { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: .85rem; margin-top: 6px; }
html { overflow-x: clip; }
body { overscroll-behavior-x: none; }
.tabs { overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.error-page .eyebrow { color: var(--accent); }
.error-search { margin: 18px 0 24px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.error-search label { display: block; font-size: .78rem; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.error-search > div { display: flex; flex-wrap: wrap; gap: 8px; }
.error-search input { flex: 1 1 220px; min-width: 0; height: 42px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); padding: 0 14px; font: inherit; }
.seo-chart { margin: 14px 0 18px; overflow-x: auto; }
.seo-chart svg { display: block; width: 100%; height: auto; max-width: 100%; }
.tax-calc { margin: 18px 0; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.tax-calc label { display: block; font-size: .78rem; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.tax-calc input { width: 100%; max-width: 240px; height: 42px; padding: 0 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; margin-bottom: 12px; }
