@font-face { font-family: 'Lexend'; src: url("Lexend-VariableFont_wght.568877957c46.ttf") format('truetype'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Zalando Expanded'; src: url("ZalandoSans_Expanded-SemiBold.2c590138a0d6.ttf") format('truetype'); font-weight: 600; font-display: swap; }

.viz-root {
  color-scheme: light;
  --page: #efefe7;
  --surface-1: #ffffff;
  --border: #e3e3db;
  --grid: #ececE5;
  --text-primary: #1d1d1b;
  --text-secondary: #5e5e58;
  --text-muted: #8c8c84;
  --brand: #104e14;
  --lime: #b9d660;
  --series-single: #1f7a3a;
  --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a;
  --series-4: #eda100; --series-5: #e87ba4; --series-6: #008300;
  --good: #11713a; --bad: #c62b1e;
}
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.45 'Lexend', system-ui, sans-serif; color: var(--text-primary); background: var(--page);
       display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
a { color: inherit; }
.side { background: var(--brand); color: #fff; padding: 22px 14px; display: flex; flex-direction: column; gap: 22px;
        position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; font: 600 18px 'Zalando Expanded', 'Lexend', sans-serif; padding: 0 8px; }
.brand small { display: block; font: 400 12px 'Lexend', sans-serif; opacity: .7; }
.logo { width: 36px; height: 36px; border-radius: 11px; background: #f6e36a; color: var(--brand); display: grid; place-items: center;
        font: 700 18px 'Zalando Expanded', sans-serif; }
.side nav { display: flex; flex-direction: column; gap: 2px; }
.side nav a { text-decoration: none; padding: 9px 12px; border-radius: 10px; color: rgba(255,255,255,.82); }
.side nav a:hover { background: rgba(255,255,255,.08); }
.side nav a.on { background: var(--lime); color: var(--brand); font-weight: 600; }
.logout { margin-top: auto; }
.logout button { background: none; border: 0; color: rgba(255,255,255,.7); font: inherit; cursor: pointer; padding: 8px 12px; }
main { padding: 26px 32px 60px; min-width: 0; }
.top h1 { font: 600 26px 'Zalando Expanded', 'Lexend', sans-serif; margin: 0 0 14px; color: var(--brand); }
.top .sub { color: var(--text-muted); margin: 10px 0 0; font-size: 12.5px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filters.inline { margin-bottom: 14px; }
.chip { display: inline-block; padding: 7px 14px; border-radius: 40px; border: 1.4px solid var(--border); background: var(--surface-1);
        text-decoration: none; font: inherit; color: var(--text-primary); cursor: pointer; }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip.ghost { background: transparent; }
select, input[type=file] { font: inherit; padding: 8px 10px; border-radius: 10px; border: 1.4px solid var(--border); background: #fff; }
.flash { background: #e2f4e7; color: var(--good); padding: 10px 14px; border-radius: 10px; margin: 16px 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin: 22px 0; }
.kpi { background: var(--surface-1); border-radius: 16px; padding: 16px 18px; }
.kpi-label { color: var(--text-secondary); font-size: 13px; }
.kpi-value { font-size: 30px; font-weight: 600; letter-spacing: -.5px; margin: 4px 0 6px; font-variant-numeric: tabular-nums; }
.kpi-foot { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; }
.delta { font-weight: 600; color: var(--text-secondary); }
.delta.good { color: var(--good); } .delta.bad { color: var(--bad); }
.delta .vs, .note, .muted { color: var(--text-muted); font-weight: 400; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(460px, 1fr)); gap: 14px; margin-bottom: 14px; }
.grid.one { grid-template-columns: 1fr; }
.card { background: var(--surface-1); border-radius: 16px; padding: 18px 20px; margin: 0; min-width: 0; }
.card figcaption { display: flex; align-items: baseline; gap: 10px; justify-content: space-between; margin-bottom: 8px; }
.card h2 { font-size: 15px; font-weight: 600; margin: 0; }
.plot { position: relative; height: 240px; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--text-secondary); min-height: 4px; margin-bottom: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.tbl-toggle { font: inherit; font-size: 12px; border: 1px solid var(--border); background: none; border-radius: 20px; padding: 3px 10px;
              cursor: pointer; color: var(--text-secondary); }
.tbl-toggle[aria-pressed=true] { background: var(--page); }
table { border-collapse: collapse; width: 100%; }
.list th, .list td, .cohort th, .cohort td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--grid); font-size: 13px; }
.list th, .cohort th { color: var(--text-muted); font-weight: 500; font-size: 12px; }
.list.small td { font-size: 12px; }
.num { text-align: right !important; font-variant-numeric: tabular-nums; }
.clip { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.empty { color: var(--text-muted); padding: 18px 8px !important; }
.scroll { overflow-x: auto; }
.cohort td.heat { text-align: center !important; border-left: 2px solid #fff; }
.table-view { max-height: 260px; overflow: auto; }
.funnel { display: flex; flex-direction: column; gap: 10px; padding: 6px 0; }
.frow { display: grid; grid-template-columns: 170px 1fr 220px; gap: 14px; align-items: center; }
.fbar { background: var(--page); border-radius: 6px; height: 24px; overflow: hidden; }
.fbar span { display: block; height: 100%; background: var(--series-single); border-radius: 0 4px 4px 0; min-width: 2px; }
.upload { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.btn { background: var(--brand); color: #fff; border: 0; border-radius: 40px; padding: 9px 18px; font: 500 14px 'Lexend', sans-serif; cursor: pointer; }
.btn.wide { width: 100%; padding: 12px; }
.note.wide { margin-top: 4px; }
.login-page { display: grid; place-items: center; grid-template-columns: 1fr; }
.login { width: 340px; display: flex; flex-direction: column; gap: 14px; padding: 28px; }
.login .brand { color: var(--brand); padding: 0 0 6px; }
.login label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-secondary); }
.login input { font: inherit; padding: 10px 12px; border: 1.4px solid var(--border); border-radius: 10px; }
.error { color: var(--bad); margin: 0; }
@media (max-width: 900px) { body { grid-template-columns: 1fr; } .side { position: static; height: auto; } .grid { grid-template-columns: 1fr; }
  .frow { grid-template-columns: 1fr; } main { padding: 18px; } }
@media print { body { grid-template-columns: 1fr; background: #fff; } .side, .filters, .tbl-toggle, .upload { display: none !important; }
  .card, .kpi { border: 1px solid var(--border); break-inside: avoid; } main { padding: 0; } }
