:root {
  --ink: #102a35;
  --ink-2: #3d5866;
  --ink-3: #6b8592;
  --paper: #f3f6f7;
  --surface: #ffffff;
  --line: #dde6ea;
  --line-2: #c6d3d9;
  --navy: #1f3864;
  --navy-2: #2b4a7e;
  --band: #04161a;
  --teal: #0c9a95;
  --teal-glow: #2ee6e0;
  --teal-wash: #e3f6f4;
  --up: #0e8a6e;
  --down: #b86a0c;
  --down-wash: #fdf1e2;
  --focus: #1b7fd6;
  --radius: 10px;
  --font: "Instrument Sans", system-ui, sans-serif;
  --display: "Bodoni Moda", Georgia, serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.5 var(--font);
  font-variant-numeric: tabular-nums;
}
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- Band ---------- */
.band {
  background: radial-gradient(120% 140% at 0% 0%, #0b3a40 0%, var(--band) 55%);
  color: #e6f5f6;
  border-bottom: 1px solid #0f4d52;
}
.band-inner {
  max-width: 1360px;
  margin: 0 auto;
  padding: 14px 24px 0;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "brand title" "tabs tabs";
  gap: 6px 22px;
  align-items: center;
}
.brand { grid-area: brand; display: block; line-height: 0; }
.brand img { width: 170px; height: auto; }
.band-title { grid-area: title; min-width: 0; }
.band-title h1 {
  margin: 0;
  font: 700 clamp(22px, 2.6vw, 30px)/1.1 var(--display);
  letter-spacing: 0.005em;
}
.stamp { margin: 4px 0 0; color: #9cc3c8; font-size: 13px; }
.tabs { grid-area: tabs; display: flex; gap: 4px; margin-top: 10px; }
.tabs button {
  appearance: none;
  border: 0;
  background: transparent;
  color: #9cc3c8;
  padding: 10px 18px 12px;
  border-radius: 10px 10px 0 0;
  cursor: pointer;
  text-align: left;
  display: grid;
  line-height: 1.2;
}
.tabs button:hover { color: #e6f5f6; }
.tabs button[aria-selected="true"] { background: var(--paper); color: var(--ink); }
.tab-name { font-weight: 700; font-size: 16px; }
.tab-sub { font-size: 12.5px; opacity: .8; }

/* ---------- Layout ---------- */
main { max-width: 1360px; margin: 0 auto; padding: 18px 24px 40px; }
.panel { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 2px solid var(--navy);
  padding-bottom: 6px;
  margin-bottom: 12px;
}
.section-head h2 { margin: 0; font: 700 21px/1.2 var(--display); color: var(--navy); }
.section-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -8px 0 22px; }
.section-nav-label { font-size: 12px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; margin-right: 2px; }
.section-nav-btn { height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--navy); font-weight: 600; font-size: 13px; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.section-nav-btn:hover, .section-nav-btn:focus-visible { background: var(--navy); border-color: var(--navy); color: #fff; }
.to-top { position: fixed; left: 18px; bottom: 18px; z-index: 40; height: 38px; padding: 0 14px; border-radius: 999px; border: 2px solid #fff; background: #0a1626; color: #fff; font-weight: 700; font-size: 13px; cursor: pointer; box-shadow: 0 0 0 1px #0a1626, 0 8px 22px -6px rgba(5, 12, 22, .7); opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .2s, transform .2s, background .15s; }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover, .to-top:focus-visible { background: var(--navy); }
.to-top span { font-size: 15px; }
.section-head p { margin: 0; color: var(--ink-3); font-size: 13px; }
.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  min-width: 0;
}
.card h3 { margin: 0 0 10px; font-size: 14.5px; font-weight: 700; color: var(--navy); }
.card h3 small { font-weight: 500; color: var(--ink-3); margin-left: 6px; }
.chart { width: 100%; height: 320px; }
.chart.tall { height: 420px; }
.chart.short { height: 260px; }

/* ---------- Filters ---------- */
.filters {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: flex-end;
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 6px 18px -14px rgba(16, 42, 53, .45);
}
.field { display: grid; gap: 4px; min-width: 0; }
.field > span { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.field input[type="date"], .field input[type="number"], .field select {
  height: 36px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
}
.field input[type="number"] { width: 84px; }
.date-pair { display: flex; gap: 6px; align-items: center; }
.date-pair input { width: 150px; }
.filters .spacer { flex: 1 1 0; }
.btn {
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--line-2);
  background: #fff;
  padding: 0 14px;
  cursor: pointer;
  font-weight: 600;
  color: var(--ink-2);
}
.btn:hover { border-color: var(--teal); color: var(--ink); }

/* Multi-select */
.ms { position: relative; }
.ms-btn {
  height: 36px;
  min-width: 132px;
  max-width: 220px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: #fff;
  padding: 0 30px 0 10px;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
}
.ms-btn::after {
  content: "";
  position: absolute;
  right: 11px;
  top: 14px;
  border: 5px solid transparent;
  border-top-color: var(--ink-3);
}
.ms-btn.active { border-color: var(--teal); background: var(--teal-wash); }
.ms-pop {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 40;
  width: 260px;
  max-height: 340px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  box-shadow: 0 18px 40px -18px rgba(16, 42, 53, .45);
}
.ms-pop input[type="search"] { margin: 8px; height: 32px; border: 1px solid var(--line-2); border-radius: 7px; padding: 0 9px; }
.ms-list { overflow: auto; padding: 2px 6px 6px; }
.ms-list label { display: flex; gap: 8px; align-items: center; padding: 5px 6px; border-radius: 6px; cursor: pointer; font-size: 14px; }
.ms-list label:hover { background: var(--paper); }
.ms-actions { display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding: 6px 8px; }
.ms-actions button { border: 0; background: none; color: var(--teal); font-weight: 600; cursor: pointer; padding: 4px 6px; }

/* ---------- KPIs ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.kpi { padding: 14px 16px 15px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 0; position: relative; }
.kpi::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: var(--kpi-accent, var(--navy)); }
.kpi:nth-child(4n) { border-right: 0; }
.kpis-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kpis-5 .kpi:nth-child(4n) { border-right: 1px solid var(--line); }
.kpis-5 .kpi:nth-child(5n) { border-right: 0; }
.kpi-label { font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.kpi-value { font-size: clamp(22px, 2.4vw, 30px); font-weight: 700; line-height: 1.15; margin-top: 4px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kpi-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; }
.kpi.hero .kpi-value { font-family: var(--display); font-size: clamp(28px, 3.2vw, 40px); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { padding: 7px 10px; text-align: right; white-space: nowrap; }
th:first-child, td:first-child, th.left, td.left { text-align: left; }
thead th {
  background: var(--navy);
  color: #fff;
  font-weight: 600;
  font-size: 12.5px;
  position: sticky;
  top: 0;
}
thead th.sortable { cursor: pointer; user-select: none; }
thead th.sortable:hover { background: var(--navy-2); }
thead th[aria-sort="ascending"]::after { content: " ▲"; font-size: 9px; }
thead th[aria-sort="descending"]::after { content: " ▼"; font-size: 9px; }
tbody tr { border-bottom: 1px solid var(--line); }
tbody tr:nth-child(even) { background: #f8fafb; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover { background: var(--teal-wash); }
tfoot td { background: #dfe6f2; font-weight: 700; border-top: 2px solid var(--navy); }
td.rank { color: var(--ink-3); width: 2em; }
td.strong { font-weight: 700; color: var(--navy); }
.pos { color: var(--up); }
.neg { color: var(--down); }
.muted { color: var(--ink-3); }
.bar-cell { position: relative; }
.bar-cell i { position: absolute; left: 6px; top: 5px; bottom: 5px; border-radius: 3px; background: linear-gradient(90deg, #6f95cf, rgba(111, 149, 207, .15)); z-index: 0; }
.bar-cell span { position: relative; z-index: 1; }
.heat { text-align: center; }

/* ---------- Share links ---------- */
.scope { display: inline-block; vertical-align: middle; margin-left: 10px; font: 600 14px/1.2 var(--font); color: #04161a; background: var(--teal-glow); padding: 5px 12px; border-radius: 999px; }
.band-inner { position: relative; }
.share-btn { position: absolute; right: 24px; top: 18px; height: 36px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(46, 230, 224, .6); background: rgba(46, 230, 224, .1); color: var(--teal-glow); font-weight: 600; cursor: pointer; }
.share-btn:hover { background: var(--teal-glow); color: #04161a; }
.lock-note { flex: 1 0 100%; display: flex; gap: 10px; align-items: center; background: var(--teal-wash); border: 1px solid #b7e6e2; border-radius: 8px; padding: 9px 12px; font-size: 14px; color: var(--ink); }
.lock-icon { width: 14px; height: 16px; flex: none; position: relative; }
.lock-icon::before { content: ""; position: absolute; left: 2px; right: 2px; top: 0; height: 9px; border: 2px solid var(--teal); border-bottom: 0; border-radius: 6px 6px 0 0; }
.lock-icon::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 9px; background: var(--teal); border-radius: 2px; }
.share-dialog { border: 0; border-radius: 14px; padding: 0; width: min(560px, calc(100vw - 32px)); box-shadow: 0 30px 80px -20px rgba(4, 22, 26, .6); color: var(--ink); }
.share-dialog::backdrop { background: rgba(4, 22, 26, .55); }
.share-dialog form { padding: 22px 24px; display: grid; gap: 14px; }
.share-dialog h2 { margin: 0; font: 700 22px/1.2 var(--display); color: var(--navy); }
.share-dialog p { margin: 0; font-size: 14px; }
.share-dialog input:not([type="checkbox"]) { height: 38px; border: 1px solid var(--line-2); border-radius: 8px; padding: 0 10px; width: 100%; }
.share-dialog fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 0; }
.share-dialog legend { font-size: 12px; font-weight: 600; color: var(--ink-3); padding: 0 4px; }
.check-row { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; cursor: pointer; }
.check-row input { margin-top: 4px; }
.check-row b { display: block; }
.check-row small { color: var(--ink-3); font-size: 12.5px; }
.check-row small.warn { color: var(--down); font-weight: 600; }
.share-error { color: #a1281b; background: #fdecea; padding: 8px 10px; border-radius: 8px; }
.share-result { display: grid; gap: 6px; background: var(--teal-wash); padding: 12px; border-radius: 10px; font-weight: 600; }
.share-url { display: flex; gap: 8px; }
.share-url input { font-size: 13px; background: #fff; }
.share-actions { display: flex; justify-content: flex-end; gap: 8px; }
.btn-primary { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn-primary:hover { background: var(--navy-2); color: #fff; }

/* ---------- Public demo banner ---------- */
.demo-banner { max-width: 1360px; margin: 14px auto 0; padding: 12px 16px; display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; justify-content: space-between;
  background: linear-gradient(90deg, #e3f6f4, #f0fbfa); border: 1px solid #b7e6e2; border-radius: 12px; color: var(--ink); font-size: 14px; }
.demo-banner p { margin: 0; }
.demo-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.demo-actions a { color: var(--teal); font-weight: 600; }
.demo-actions .demo-cta { background: var(--navy); color: #fff; padding: 7px 14px; border-radius: 999px; text-decoration: none; }
@media (max-width: 1400px) { .demo-banner { margin-left: 24px; margin-right: 24px; } }
@media (max-width: 560px) { .demo-banner { margin-left: 16px; margin-right: 16px; } }

/* ---------- Shareable links tab ---------- */
.links-help p { margin: 0; color: var(--ink-2); }
.links-help a { color: var(--teal); font-weight: 600; }
.links { display: grid; gap: 12px; }
.link-card { display: grid; gap: 10px; }
.link-top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.link-top h3 { margin: 0; font-size: 17px; }
.link-top .muted { font-size: 13px; }
.link-scope { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 14px; color: var(--ink-2); }
.link-scope b { display: inline-block; min-width: 92px; color: var(--navy); }
.link-url { display: flex; gap: 8px; flex-wrap: wrap; }
.link-url input { flex: 1 1 280px; min-width: 0; height: 36px; border: 1px solid var(--line-2); border-radius: 8px; padding: 0 10px; font-size: 13px; background: var(--paper); }
.link-url a.btn { display: inline-flex; align-items: center; text-decoration: none; }
.link-card.is-off { background: #f7f9fa; }
.link-card.is-off .link-url input { color: var(--ink-3); text-decoration: line-through; }
.off-badge { margin-left: 10px; font-size: 12px; font-weight: 600; color: var(--down); background: var(--down-wash); padding: 2px 9px; border-radius: 999px; vertical-align: middle; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-off { color: var(--down); }
.btn-off:hover { border-color: var(--down); color: var(--down); }

/* ---------- Kevin, the report guide: standing figure + chat (chat about 3.5 x 4 in) ---------- */
.guide-figure {
  position: fixed; right: 16px; bottom: 10px; z-index: 60;
  width: 67px; height: 160px; padding: 0; border: 0; background: none; cursor: pointer;
  filter: drop-shadow(0 8px 10px rgba(4, 22, 26, .35));
}
.guide-figure img { width: 67px; height: 160px; display: block; transform-origin: 50% 100%; transition: transform .25s cubic-bezier(.2, .8, .2, 1); }
.guide-figure:hover img, .guide-figure:focus-visible img { transform: translateY(-3px) rotate(-2deg); }
.guide-figure:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: 10px; }
.guide-bubble {
  position: absolute; bottom: calc(100% + 6px); right: 4px; white-space: nowrap;
  background: #fff; color: var(--navy); font: 700 13px/1 var(--font); padding: 8px 11px; border-radius: 12px;
  border: 1.5px solid var(--navy); box-shadow: 0 6px 16px -8px rgba(4, 22, 26, .45);
  animation: guide-float 3s ease-in-out infinite;
}
.guide-bubble::after { content: ""; position: absolute; right: 22px; bottom: -7px; width: 11px; height: 11px; background: #fff; border-right: 1.5px solid var(--navy); border-bottom: 1.5px solid var(--navy); transform: rotate(45deg); }
.guide-figure.is-open .guide-bubble { display: none; }
@keyframes guide-float { 50% { transform: translateY(-3px); } }
@keyframes guide-pop { from { opacity: 0; transform: translateY(8px) scale(.96); } }
.guide-panel {
  position: fixed; right: 92px; bottom: 16px; z-index: 61;
  width: min(336px, calc(100vw - 24px)); height: min(384px, calc(100vh - 120px));
  display: grid; grid-template-rows: auto 1fr auto;
  background: #fff; border-radius: 16px; overflow: hidden;
  box-shadow: 0 24px 60px -20px rgba(4, 22, 26, .55), 0 0 0 1px rgba(16, 42, 53, .08);
  animation: guide-pop .25s ease-out both;
}
.guide-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--band); color: #e6f5f6; }
.guide-head img { border-radius: 50%; flex: none; }
.guide-head div { flex: 1; display: grid; line-height: 1.2; }
.guide-head small { color: #9cc3c8; font-size: 12px; }
.guide-close { border: 0; background: none; color: #9cc3c8; font-size: 24px; line-height: 1; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.guide-close:hover { color: #fff; }
.guide-log { overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; background: var(--paper); overscroll-behavior: contain; }
.guide-msg { max-width: 88%; padding: 8px 11px; border-radius: 12px; font-size: 13.5px; line-height: 1.45; }
.guide-msg.bot { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-top-left-radius: 4px; color: var(--ink); }
.guide-msg.user { align-self: flex-end; background: var(--navy); color: #fff; border-top-right-radius: 4px; }
.guide-msg a { color: var(--teal); font-weight: 600; }
.guide-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.guide-chip { border: 1px solid #b7e6e2; background: var(--teal-wash); color: #0b5f5b; font: 600 12.5px/1.25 var(--font); padding: 6px 10px; border-radius: 999px; cursor: pointer; text-align: left; }
.guide-chip:hover { background: #cdeeea; border-color: var(--teal); }
.guide-chip.ghost { background: #fff; border-color: var(--line-2); color: var(--ink-2); }
.guide-ask { border-top: 1px solid var(--line); padding: 8px; background: #fff; }
.guide-ask-row { display: flex; gap: 6px; }
.guide-ask input { flex: 1; min-width: 0; height: 36px; border: 1px solid var(--line-2); border-radius: 999px; padding: 0 12px; font-size: 13.5px; }
.guide-ask button { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--navy); color: #fff; cursor: pointer; font-size: 15px; flex: none; }
.guide-ask .guide-mic { display: grid; place-items: center; background: var(--teal-wash); color: #0b5f5b; border: 1px solid #b7e6e2; }
.guide-ask .guide-mic:hover { border-color: var(--teal); }
.guide-ask .guide-mic.is-listening { background: #d93a3a; color: #fff; border-color: #d93a3a; animation: guide-listen 1.2s ease-out infinite; }
@keyframes guide-listen { 0% { box-shadow: 0 0 0 0 rgba(217, 58, 58, .55); } 100% { box-shadow: 0 0 0 10px rgba(217, 58, 58, 0); } }
.contact-line a { color: var(--teal); font-weight: 600; }
@media (max-width: 560px) {
  .guide-figure, .guide-figure img { width: 50px; height: 120px; }
  .guide-figure { right: 10px; bottom: 6px; }
  .guide-panel { right: 12px; bottom: 140px; height: min(384px, calc(100vh - 170px)); }
}

/* ---------- Misc ---------- */
.notice {
  background: var(--surface);
  border: 1px dashed var(--line-2);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
}
.notice h2 { font: 700 26px/1.2 var(--display); margin: 0 0 8px; color: var(--navy); }
.notice p { margin: 0 auto; max-width: 52ch; color: var(--ink-2); }
.loading { opacity: .55; transition: opacity .2s; pointer-events: none; }
details.more { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
details.more > summary { cursor: pointer; padding: 12px 16px; font-weight: 600; color: var(--navy); }
details.more[open] > summary { border-bottom: 1px solid var(--line); }
details.more > .inner { padding: 16px; display: grid; gap: 16px; }
.checks td:last-child { font-weight: 700; }
.inline-field { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-3); font-weight: 500; }
.inline-field select, .inline-field input { height: 30px; border: 1px solid var(--line-2); border-radius: 7px; padding: 0 8px; background: #fff; color: var(--ink); }
.head-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.notes { color: var(--ink-2); font-size: 13.5px; margin: 0; padding-left: 18px; }
.notes li + li { margin-top: 4px; }
.foot { max-width: 1360px; margin: 0 auto; padding: 0 24px 36px; color: var(--ink-3); font-size: 12.5px; }
.foot p { margin: 2px 0; }
.privacy-note { font-size: 12.5px; color: var(--ink-3); margin: 6px 0 0; }

@media (max-width: 1100px) {
  .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .cols-2, .cols-3, .cols-4 { grid-template-columns: minmax(0, 1fr); }
  .span-2 { grid-column: auto; }
  .kpis, .kpis-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi:nth-child(4n), .kpis-5 .kpi:nth-child(4n), .kpis-5 .kpi:nth-child(5n) { border-right: 1px solid var(--line); }
  .kpi:nth-child(2n), .kpis-5 .kpi:nth-child(2n) { border-right: 0; }
  .filters { position: static; }
}
@media (max-width: 560px) {
  main, .band-inner, .foot { padding-left: 16px; padding-right: 16px; }
  .band-inner { grid-template-columns: 1fr; grid-template-areas: "brand" "title" "tabs"; }
  .brand img { width: 140px; }
  .share-btn { position: static; justify-self: start; }
  .tabs button { flex: 1; padding: 9px 12px 11px; }
  .date-pair input { width: 136px; }
  .chart { height: 280px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- Company Insight ---------- */
.kpis-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.kpis-6 .kpi:nth-child(4n) { border-right: 1px solid var(--line); }
.kpis-6 .kpi:nth-child(6n) { border-right: 0; }
.kpis-6 .kpi-value { font-size: clamp(19px, 1.7vw, 26px); }
.kpis-6 .kpi.hero .kpi-value { font-size: clamp(22px, 2vw, 30px); }
/* Wide screens: a short last row stretches its cards to fill the full width (60-column grid, 6 cards per full row). */
@media (min-width: 1101px) {
  .kpis-6 { grid-template-columns: repeat(60, minmax(0, 1fr)); }
  .kpis-6 > .kpi { grid-column: span 10; }
  .kpis-6 > .kpi:last-child { border-right: 0; }
  .kpis-6 > .kpi:nth-child(6n+1):nth-last-child(1), .kpis-6 > .kpi:nth-child(6n+1):nth-last-child(1) ~ .kpi { grid-column: span 60; }
  .kpis-6 > .kpi:nth-child(6n+1):nth-last-child(2), .kpis-6 > .kpi:nth-child(6n+1):nth-last-child(2) ~ .kpi { grid-column: span 30; }
  .kpis-6 > .kpi:nth-child(6n+1):nth-last-child(3), .kpis-6 > .kpi:nth-child(6n+1):nth-last-child(3) ~ .kpi { grid-column: span 20; }
  .kpis-6 > .kpi:nth-child(6n+1):nth-last-child(4), .kpis-6 > .kpi:nth-child(6n+1):nth-last-child(4) ~ .kpi { grid-column: span 15; }
  .kpis-6 > .kpi:nth-child(6n+1):nth-last-child(5), .kpis-6 > .kpi:nth-child(6n+1):nth-last-child(5) ~ .kpi { grid-column: span 12; }
}
.panel > .showing { margin: -6px 0 18px; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 8px; }
.card-head h3 { margin: 0; }
.notes { margin: 12px 0 0; padding-left: 18px; font-size: 13px; color: var(--ink-2); display: grid; gap: 3px; }
.small { font-size: 12.5px; margin: 8px 0 0; }
.strong { font-weight: 700; }
.placeholder { margin: 0; min-height: 200px; display: grid; place-items: center; text-align: center; padding: 24px; color: var(--ink-3); background: #fbf7ea; border: 1px dashed #e2cf8e; border-radius: 8px; font-size: 13.5px; }
.risk, .sev { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.risk-critical, .sev-high { background: #fde6e3; color: #a3271b; }
.risk-watch, .sev-medium { background: #fff1d9; color: #9a5a00; }
.risk-healthy { background: #e2f5ec; color: #0e6e4a; }
.sev-low { background: #eef2f4; color: var(--ink-2); }
td.sev-text-high { color: #a3271b; font-weight: 700; }
td.sev-text-medium { color: #9a5a00; font-weight: 700; }
td.band-0 { color: #2e8b57; font-weight: 700; } td.band-1 { color: #4a9a63; font-weight: 700; } td.band-2 { color: #8f8f1a; font-weight: 700; }
td.band-3 { color: #c07a12; font-weight: 700; } td.band-4 { color: #d0620f; font-weight: 700; } td.band-5 { color: #c8453b; font-weight: 700; }
@media (max-width: 1100px) {
  .kpis-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpis-6 .kpi:nth-child(6n) { border-right: 1px solid var(--line); }
  .kpis-6 .kpi:nth-child(3n) { border-right: 0; }
}
@media (max-width: 820px) {
  .kpis-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis-6 .kpi:nth-child(3n) { border-right: 1px solid var(--line); }
  .kpis-6 .kpi:nth-child(2n) { border-right: 0; }
}
.filters.filters-static { position: static; }
