@font-face { font-family: "Inter Variable"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/assets/inter-latin-wght-normal-Dx4kXJAl.woff2) format("woff2-variations"); }
@font-face { font-family: "Space Grotesk Variable"; font-style: normal; font-weight: 300 700; font-display: swap; src: url(/assets/space-grotesk-latin-wght-normal-BhU9QXUp.woff2) format("woff2-variations"); }

:root {
  --bg: #f3f7fa; --surface: #ffffff; --surface-2: #eef4f8;
  --ink: #111c2e; --muted: #4a5d74; --faint: #7a8aa0;
  --line: #dbe7ef; --line-strong: #b5cfe0; --grid: #e6ecf4;
  --accent: #1f6f9a; --accent-soft: #dcecf5; --value: #cc7c2f; --value-soft: #f8ebdd;
  --hero-1: #0f2238; --hero-2: #16304d; --hero-ink: #f2f7fb; --hero-muted: #b7cadb; --hero-accent: #9fcddf;
  --shadow: 0 1px 2px rgba(17, 28, 46, .05), 0 12px 32px -18px rgba(17, 28, 46, .25);
  --sans: "Inter Variable", Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Space Grotesk Variable", "Space Grotesk", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1422; --surface: #101c2e; --surface-2: #15243a;
    --ink: #f2f5fb; --muted: #a8b2c7; --faint: #7d8aa3;
    --line: #1f2d4d; --line-strong: #34457a; --grid: #1a2742;
    --accent: #3f9fd0; --accent-soft: #163247; --value: #d8862f; --value-soft: #33230f;
    --hero-1: #08111e; --hero-2: #10233a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 14px 34px -18px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.015em; margin: 0; }
a { color: var(--accent); }
button, select { font: inherit; color: inherit; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }

/* header */
header.site { background: var(--hero-1); color: var(--hero-ink); }
header.site .bar { max-width: 1180px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
@media (max-width: 640px) { header.site .bar { padding: 12px 16px; } }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.brand img { border-radius: 50%; box-shadow: 0 4px 18px -4px rgba(63, 143, 181, .55); }
.brand strong { display: block; font-family: var(--display); font-size: 18px; line-height: 1; }
.brand em { display: block; font-style: normal; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--hero-accent); margin-top: 3px; font-weight: 600; }
nav.top { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
nav.top a { color: var(--hero-muted); text-decoration: none; padding: 7px 12px; border-radius: 8px; font-size: 14px; font-weight: 500; }
nav.top a:hover, nav.top a[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, .08); }
nav.top a.cta { background: var(--hero-accent); color: #0b1422; font-weight: 600; margin-left: 6px; }
nav.top a.cta:hover { background: #b9dcec; }

/* hero */
.hero { background: radial-gradient(1200px 400px at 85% -20%, rgba(159, 205, 223, .18), transparent 60%), linear-gradient(180deg, var(--hero-1), var(--hero-2)); color: var(--hero-ink); padding: 44px 0 96px; }
.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: 12px; font-weight: 700; color: var(--hero-accent); margin: 0 0 10px; }
.hero h1 { font-size: clamp(30px, 4.4vw, 48px); line-height: 1.08; max-width: 820px; }
.lede { color: var(--hero-muted); max-width: 720px; font-size: 17px; margin: 14px 0 0; }
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 30px; }
@media (max-width: 900px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); border-radius: 14px; padding: 14px 16px; backdrop-filter: blur(4px); }
.kpi b { display: block; font-family: var(--display); font-size: 30px; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; color: #fff; }
.kpi span { font-size: 12.5px; color: var(--hero-muted); }

/* filters */
.filters-wrap { position: sticky; top: 0; z-index: 10; margin-top: -58px; }
.filters { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)) auto; gap: 10px; align-items: end; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow); }
.filters-wrap.stuck .filters { border-radius: 0 0 16px 16px; }
.filters label { display: grid; gap: 3px; min-width: 0; }
.filters label span { font-size: 11px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; }
.filters select { width: 100%; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 9px; padding: 7px 8px; font-size: 13.5px; min-width: 0; cursor: pointer; }
.filters select.on { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.fx { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; min-width: 110px; }
.count { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.reset { border: 0; background: none; color: var(--accent); font-weight: 600; cursor: pointer; padding: 2px 0; font-size: 13px; }
@media (max-width: 1100px) { .filters { grid-template-columns: repeat(4, minmax(0, 1fr)); } .fx { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; } }
@media (max-width: 560px) { .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } .filters-wrap { position: static; } }

/* layout */
main.wrap { padding-top: 22px; padding-bottom: 50px; }
.grid { display: grid; gap: 18px; margin-bottom: 18px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid.two { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px; box-shadow: var(--shadow); min-width: 0; margin-bottom: 18px; }
.grid .card { margin-bottom: 0; }
.card h2 { font-size: 19px; }
.card .sub { color: var(--muted); font-size: 13.5px; margin: 3px 0 16px; }
.head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; padding: 2px; background: var(--surface-2); }
.seg button { border: 0; background: none; padding: 4px 10px; border-radius: 7px; cursor: pointer; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.empty { color: var(--faint); text-align: center; padding: 26px 0; font-size: 14px; }

/* regions */
.regions { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.region { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; cursor: pointer; background: var(--surface); text-align: left; position: relative; overflow: hidden; }
.region:hover { border-color: var(--accent); }
.region[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.region .nm { font-size: 13px; font-weight: 600; color: var(--muted); }
.region .v { font-family: var(--display); font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.2; }
.region .sh { font-size: 12px; color: var(--faint); }
.region .bar { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--accent); border-radius: 0 4px 0 0; }
.region .val { font-size: 12px; color: var(--muted); margin-top: 4px; }
.region .val b { color: var(--value); }

/* ranked bars */
.bars { display: grid; gap: 8px; }
.brow { display: grid; grid-template-columns: minmax(110px, 34%) 1fr 58px; gap: 12px; align-items: center; font-size: 14px; cursor: pointer; border-radius: 8px; padding: 2px 4px; margin: 0 -4px; }
.brow:hover { background: var(--surface-2); }
.brow .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track { height: 12px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.fill { height: 100%; background: var(--accent); border-radius: 0 4px 4px 0; min-width: 2px; transition: width .35s ease; }
.fill.value { background: var(--value); }
.brow .num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

/* sector table */
.stable { width: 100%; border-collapse: collapse; font-size: 14px; }
.stable th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); font-weight: 600; padding: 0 10px 8px; border-bottom: 1px solid var(--line); }
.stable td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.stable tr { cursor: pointer; }
.stable tbody tr:hover td { background: var(--surface-2); }
.stable .cellbar { display: flex; align-items: center; gap: 10px; }
.stable .cellbar .track { flex: 1; min-width: 60px; }
.stable .cellbar b { min-width: 44px; text-align: right; font-variant-numeric: tabular-nums; }
.stable .num { text-align: right; font-variant-numeric: tabular-nums; }
.stable .rank { color: var(--faint); width: 24px; font-variant-numeric: tabular-nums; }
@media (max-width: 700px) { .stable .hide-sm { display: none; } }
.legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--muted); margin: -6px 0 12px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }

/* matrix */
.matrix svg { width: 100%; height: auto; display: block; overflow: visible; }
.matrix .ax { fill: var(--faint); font-size: 11px; }
.matrix .axl { fill: var(--muted); font-size: 11.5px; font-weight: 600; }
.matrix .q { fill: var(--faint); font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.matrix .gl { stroke: var(--grid); }
.matrix .ml { stroke: var(--line-strong); stroke-dasharray: 4 4; }
.matrix circle { fill: var(--accent); fill-opacity: .78; stroke: var(--surface); stroke-width: 2; cursor: pointer; transition: fill-opacity .15s; }
.matrix circle:hover { fill-opacity: 1; }
.matrix .lbl { fill: var(--ink); font-size: 11.5px; font-weight: 600; pointer-events: none; paint-order: stroke; stroke: var(--surface); stroke-width: 3px; }

/* columns (time) */
.cols { display: flex; align-items: flex-end; gap: 8px; height: 170px; padding-top: 8px; border-bottom: 1px solid var(--line-strong); }
.col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; cursor: default; }
.col .cb { width: 100%; max-width: 42px; background: var(--accent); border-radius: 4px 4px 0 0; min-height: 2px; transition: height .35s ease; }
.col .cv { font-size: 12px; font-weight: 600; margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.colx { display: flex; gap: 8px; }
.colx span { flex: 1; text-align: center; font-size: 12px; color: var(--faint); padding-top: 6px; }

/* top cases */
.tops { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.tcase { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; background: var(--surface); }
.tcase .org { font-size: 12.5px; color: var(--muted); font-weight: 600; display: flex; justify-content: space-between; gap: 8px; }
.tcase .nm { font-family: var(--display); font-weight: 600; font-size: 16px; line-height: 1.25; }
.tcase .res { font-size: 13px; color: var(--muted); }
.tcase .foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 6px; font-size: 12.5px; }
.tcase .mult { color: var(--value); font-weight: 700; font-size: 14px; }
.chip { display: inline-block; background: var(--surface-2); color: var(--muted); border-radius: 99px; padding: 1px 8px; font-size: 11.5px; font-weight: 600; }
.chip.new { background: var(--accent-soft); color: var(--accent); }

.method { max-width: 860px; color: var(--muted); font-size: 14px; margin: 28px 0 10px; }
.method h2 { font-size: 17px; color: var(--ink); margin-bottom: 8px; }
.note { color: var(--muted); }

footer.site { border-top: 1px solid var(--line); padding: 20px 0; color: var(--faint); font-size: 13px; }
footer.site .bar { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
footer.site nav { display: flex; gap: 14px; flex-wrap: wrap; }
footer.site a { color: var(--muted); text-decoration: none; }
footer.site a:hover { color: var(--accent); }

.tip { position: fixed; z-index: 30; pointer-events: none; background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); border-radius: 10px; padding: 8px 11px; font-size: 12.5px; box-shadow: var(--shadow); max-width: 280px; }
.tip b { display: block; font-size: 14px; }
.tip .l { color: var(--muted); }
main.loading .card { opacity: .6; }
.kpi-note { color: var(--hero-muted); font-size: 12.5px; margin: 12px 0 0; }
.kpi-note a { color: var(--hero-accent); }
