@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=Source+Serif+4:wght@600&display=swap");

:root {
  --ink: #1a1f2e;
  --muted: #5c6578;
  --line: #c8d0de;
  --head: #eef1f7;
  --paper: #eceff5;
  --bar: #3d6fb8;
  --accent: #4f46a8;
  --accent-tint: #f3f1fb;
  --green: #1f7a4c;
  --green-bg: #e8f6ee;
  --amber: #a16207;
  --amber-bg: #fef9c3;
  --red: #a12828;
  --red-bg: #f8eaea;
  --radius: 10px;
  --positive: #1f7a4c;
  --neutral: #a16207;
  --negative: #a12828;
  --focus: #4f46a8;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "IBM Plex Sans", "Avenir Next", "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.35;
}

body { min-height: 100vh; }

button, select, input { font: inherit; }

button, .nav-btn, a, label[for] { cursor: pointer; }

button:focus-visible,
select:focus-visible,
input:focus-visible,
.nav-btn:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.page {
  width: min(1280px, calc(100% - 32px));
  margin: 20px auto 40px;
  padding: 20px 28px 28px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(26, 31, 46, 0.1);
  border-radius: 12px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px 28px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--ink);
}

.page-header-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  min-width: 0;
}

.header-logo {
  display: block;
  height: 48px;
  width: auto;
  max-width: 160px;
}

h1 {
  margin: 0;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 8px;
}

.header-title-sep { color: var(--muted); font-weight: 500; }

.header-title-domain {
  color: var(--bar);
  font-weight: 650;
}

.meta {
  text-align: right;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.meta strong { color: var(--ink); font-weight: 650; }

.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 12px;
  align-items: center;
}

.view-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.nav-btn {
  appearance: none;
  border: 0;
  margin: 0;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  color: #475569;
  background: #fff;
  border-right: 1px solid var(--line);
}

.nav-btn:last-of-type { border-right: 0; }

.nav-btn:hover { background: #f5f7fb; }

.nav-btn[aria-current="page"] {
  background: #1e3a5f;
  color: #fff;
}

.ghost {
  appearance: none;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  color: var(--bar);
  border: 1px solid #c5d0e4;
  background: #fff;
  border-radius: 6px;
}

.nav-btn:disabled,
.ghost:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: end;
  background: #f5f7fb;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 16px;
}

.field { display: flex; flex-direction: column; gap: 4px; }

.field span,
.check span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

select, input[type="search"] {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 8px 10px;
  min-width: 148px;
  border-radius: 8px;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.kpi {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: 0 1px 0 rgba(26, 31, 46, 0.04);
}

.kpi .label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.kpi .value {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

.kpi .hint { font-size: 11px; color: var(--muted); margin-top: 2px; }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  min-width: 0;
}

.panel h2 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
}

.chart-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  margin-right: 6px;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  vertical-align: middle;
}

.chart-sub {
  margin: -2px 0 10px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.35;
}

.implication {
  background: var(--accent-tint);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, #fff);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin: 0 0 14px;
  font-size: 13px;
}

.implication strong {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}

.implication-list {
  margin: 0;
  padding-left: 18px;
}

.implication-list li { margin: 0 0 6px; }

.block-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 14px;
  background: #fff;
}

.section-bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 14px;
  background: var(--accent);
  color: #fff;
}

.section-bar h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
}

.section-bar p {
  margin: 0;
  font-size: 12px;
  opacity: 0.9;
  font-weight: 500;
}

.section-body { padding: 14px 16px; background: #fff; }

.section-body .implication-list { font-size: 14px; }

.chart-box { position: relative; height: 220px; }

.chart-box.tall { height: 280px; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th, td {
  text-align: left;
  padding: 7px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 700;
  background: var(--head);
}

.num { font-variant-numeric: tabular-nums; text-align: right; }
th.num { text-align: right; }

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

.badge.Positive { color: var(--green); background: var(--green-bg); }
.badge.Neutral { color: var(--amber); background: var(--amber-bg); }
.badge.Negative { color: var(--red); background: var(--red-bg); }

a { color: var(--bar); }

.note {
  color: var(--muted);
  font-size: 12px;
  margin: 8px 0 0;
}

.table-wrap { overflow: auto; max-height: 520px; }

.search-wide { min-width: 220px; }

.muted { color: var(--muted); }

footer.site {
  margin-top: 24px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .page { width: calc(100% - 16px); padding: 16px; }
  .page-header, .kpis { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .meta { text-align: left; }
  h1 { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
