@font-face {
  font-family: "Inter";
  src: url("assets/fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --tint: #f7f7f5;
  --surface: #ffffff;
  --line: #e8e7e3;
  --line-2: #d9d8d3;
  --text: #0b0b0b;
  --text-2: #52514e;
  --muted: #77766f;
  --series-1: #2a78d6;
  --series-1-soft: #e3eefb;
  --ref: #8a8983;
  --good: #1b7a3a;
  --warn: #9a5b00;
  --wrap: 1160px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  font-feature-settings: "cv11";
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
p, dl, dd, figure { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
svg { display: block; }
:focus-visible { outline: 2px solid var(--series-1); outline-offset: 2px; border-radius: 4px; }
section[id] { scroll-margin-top: 72px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--text); color: #fff; padding: 8px 14px; border-radius: 6px; }
.skip:focus { left: 8px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 44px; padding: 0 18px; border-radius: 8px;
  font-size: 15px; font-weight: 500; text-decoration: none; white-space: nowrap;
  transition: background-color .15s, border-color .15s;
}
.btn--dark { background: var(--text); color: #fff; }
.btn--dark:hover { background: #2b2b2a; }
.btn--line { border: 1px solid var(--line-2); background: var(--surface); }
.btn--line:hover { border-color: var(--muted); }
.btn--sm { height: 36px; padding: 0 14px; font-size: 14px; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nav__inner { display: flex; align-items: center; gap: 40px; height: 60px; }
.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 650; font-size: 17px; letter-spacing: -0.02em; text-decoration: none; }
.logo svg { width: 22px; height: 22px; }
.nav__links { display: flex; gap: 28px; margin-right: auto; font-size: 14.5px; color: var(--text-2); }
.nav__links a { text-decoration: none; }
.nav__links a:hover { color: var(--text); }
@media (max-width: 720px) {
  .nav__links { display: none; }
  .nav__inner { justify-content: space-between; }
}

/* Type helpers */
.kicker { font-size: 14px; font-weight: 500; color: var(--series-1); margin-bottom: 14px; }
.lead { margin-top: 16px; font-size: 17px; color: var(--text-2); max-width: 620px; }
h2 { font-size: clamp(28px, 3.6vw, 40px); letter-spacing: -0.03em; max-width: 720px; }

/* Hero */
.hero { padding: 88px 0 0; }
.hero h1 { font-size: clamp(38px, 6vw, 64px); font-weight: 650; letter-spacing: -0.04em; line-height: 1.04; max-width: 780px; }
.hero__lead { margin-top: 22px; font-size: 18px; color: var(--text-2); max-width: 640px; }
.hero__actions { margin-top: 32px; display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 640px) { .hero { padding-top: 56px; } }

/* App frame */
.app {
  margin-top: 64px; border: 1px solid var(--line); border-radius: 12px; background: var(--tint);
  padding: 20px; box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 12px 40px -16px rgba(0,0,0,.12);
}
.app__top { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; }
.app__title strong { display: block; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.app__title span { font-size: 13px; color: var(--muted); }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 7px; background: var(--surface); padding: 2px; font-size: 13px; }
.seg span { padding: 4px 10px; border-radius: 5px; color: var(--text-2); }
.seg .is-on { background: var(--tint); color: var(--text); font-weight: 500; }
.app__cap { margin-top: 12px; font-size: 12px; color: var(--muted); text-align: right; }

.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.kpi { background: var(--surface); padding: 14px 16px; min-width: 0; }
.kpi dt { font-size: 13px; color: var(--text-2); }
.kpi dd { margin-top: 4px; font-size: 24px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.delta { margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.delta--up { color: var(--good); }
.delta--up::before { content: "▲ "; font-size: 9px; vertical-align: 1px; }

.app__grid { margin-top: 12px; display: grid; grid-template-columns: 1.6fr 1fr; gap: 12px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px; min-width: 0; }
.panel--table { grid-column: 1 / -1; }
.panel__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.panel__head h3 { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--text-2); }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; }
.sw--bar { width: 10px; height: 10px; border-radius: 2px; background: var(--series-1); }
.sw--line { width: 14px; height: 2px; background: var(--ref); }
.note { margin-top: 6px; font-size: 13px; color: var(--text-2); }
.note b { color: var(--warn); font-weight: 600; }

.chart svg { width: 100%; height: auto; overflow: visible; }
.chart text { font-family: var(--font); font-size: 11px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .base { stroke: var(--line-2); stroke-width: 1; }
.chart .bar { fill: var(--series-1); }
.chart .bar--dim { fill: var(--series-1-soft); }
.chart .refline { fill: none; stroke: var(--ref); stroke-width: 2; stroke-linejoin: round; }
.chart .dot { fill: var(--ref); stroke: var(--surface); stroke-width: 2; }
.chart .label { fill: var(--text-2); font-weight: 500; }
.chart .hit { fill: transparent; cursor: default; }
.chart .hit:hover + .hover, .chart .hover.is-on { opacity: 1; }
.chart .hover { fill: rgba(0,0,0,.04); opacity: 0; pointer-events: none; }

.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.tbl th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12.5px; padding: 6px 10px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: var(--tint); }
.tbl .num { text-align: right; }
.tbl th:first-child, .tbl td:first-child { padding-left: 0; }
.meter { display: inline-block; vertical-align: middle; width: 120px; height: 6px; border-radius: 3px; background: var(--series-1-soft); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--series-1); border-radius: 3px; }
.meter__v { display: inline-block; margin-left: 10px; min-width: 42px; color: var(--text-2); }

@media (max-width: 960px) {
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .kpi:nth-child(n+4) { display: none; }
  .app__grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .app { padding: 12px; margin-top: 40px; border-radius: 10px; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi:nth-child(3) { display: none; }
  .kpi dd { font-size: 20px; }
  .seg { display: none; }
  .hide-s { display: none; }
  .meter { width: 60px; }
}
@media (max-width: 420px) { .hide-xs { display: none; } }

/* Sections */
.section { padding: 112px 0; }
.section--tint { background: var(--tint); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.head { margin-bottom: 56px; }
@media (max-width: 640px) { .section { padding: 72px 0; } .head { margin-bottom: 36px; } }

.metrics { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.metrics > div { padding: 24px 24px 28px 0; border-bottom: 1px solid var(--line); }
.metrics > div:not(:nth-child(4n)) { border-right: 1px solid var(--line); }
.metrics > div:not(:nth-child(4n+1)) { padding-left: 24px; }
.metrics h3, .facts h3 { font-size: 16px; }
.metrics p, .facts p { margin-top: 8px; font-size: 14.5px; color: var(--text-2); }
@media (max-width: 960px) {
  .metrics { grid-template-columns: 1fr 1fr; }
  .metrics > div { border-right: 0 !important; padding-left: 0 !important; }
  .metrics > div:nth-child(odd) { border-right: 1px solid var(--line) !important; padding-right: 24px; }
  .metrics > div:nth-child(even) { padding-left: 24px !important; }
}
@media (max-width: 560px) {
  .metrics { grid-template-columns: 1fr; }
  .metrics > div { border-right: 0 !important; padding: 20px 0 !important; }
}

.modules { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.mgroup { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 28px; }
.mgroup h3 { font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-bottom: 6px; }
.mgroup dl > div { display: grid; grid-template-columns: 130px 1fr; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.mgroup dl > div:last-child { border-bottom: 0; padding-bottom: 0; }
.mgroup dt { font-weight: 600; font-size: 15px; }
.mgroup dd { font-size: 14.5px; color: var(--text-2); }
@media (max-width: 860px) { .modules { grid-template-columns: 1fr; } }
@media (max-width: 480px) {
  .mgroup { padding: 20px; }
  .mgroup dl > div { grid-template-columns: 1fr; gap: 2px; }
}

.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.facts > div { border-top: 2px solid var(--text); padding-top: 18px; }
@media (max-width: 860px) { .facts { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .facts { grid-template-columns: 1fr; gap: 24px; } }

.contact { display: grid; grid-template-columns: 1.2fr 1fr; gap: 64px; align-items: end; }
.contact .btn { margin-top: 28px; }
.people { border-top: 1px solid var(--line-2); }
.people li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line-2); }
.people span { font-weight: 600; }
.people a { color: var(--text-2); text-decoration: none; }
.people a:hover { color: var(--series-1); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; gap: 40px; } }

.footer { padding: 28px 0 40px; font-size: 13.5px; color: var(--muted); }
.footer__inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* Tooltip */
.tip {
  position: fixed; z-index: 50; pointer-events: none;
  background: var(--text); color: #fff; font-size: 12.5px; line-height: 1.45;
  padding: 7px 10px; border-radius: 6px; font-variant-numeric: tabular-nums;
  box-shadow: 0 6px 20px rgba(0,0,0,.18); white-space: nowrap;
}
.tip b { font-weight: 600; }
.tip span { color: #c9c8c2; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
