:root {
  --bg: #f4f6f5; --surface: #ffffff; --ink: #16211f; --ink2: #55605d; --muted: #8a9491; --line: #e3e7e5; --grid: #e8ebe9;
  --brand: #0e5a4c; --brand2: #1d8a72; --side: #0d2b26; --side-ink: #b9cbc6;
  --blue: #2a78d6; --good: #0ca30c; --good-ink: #067a06; --warning: #fab219; --warning-ink: #9a6a00; --serious: #ec835a; --critical: #d03b3b;
  --r: 14px; --shadow: 0 1px 2px rgba(16, 33, 30, .05), 0 1px 8px rgba(16, 33, 30, .04);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 14px/1.5 'Inter', 'IBM Plex Sans Arabic', system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
[dir=rtl] body { font-family: 'IBM Plex Sans Arabic', 'Inter', system-ui, sans-serif; }
a { color: var(--blue); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.01em; }
button { font: inherit; cursor: pointer; }
.muted { color: var(--muted); } .small { font-size: 12px; } .pad { padding: 8px 12px; }
.pos { color: var(--good-ink); font-weight: 600; } .neg { color: var(--critical); font-weight: 600; }

/* ---------- shell ---------- */
.side { position: fixed; inset-block: 0; inset-inline-start: 0; width: 236px; background: var(--side); color: var(--side-ink); display: flex; flex-direction: column; padding: 18px 12px; z-index: 30; }
.brand { display: flex; gap: 10px; align-items: center; padding: 4px 8px 18px; }
.brand-name { color: #fff; font-weight: 700; font-size: 17px; }
.brand-sub { font-size: 11.5px; opacity: .8; }
nav { display: flex; flex-direction: column; gap: 2px; }
nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 9px; color: var(--side-ink); font-weight: 500; }
nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
nav a.on { background: var(--brand2); color: #fff; }
nav a:first-child { margin-bottom: 10px; border: 1px dashed rgba(255, 255, 255, .22); }
nav a:first-child.on { border-color: transparent; }
.side-foot { margin-top: auto; padding: 8px; }
.co { border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 14px; margin-bottom: 12px; }
.co-name { color: #fff; font-weight: 600; font-size: 13px; }
.co-note { font-size: 11px; opacity: .7; margin-top: 2px; }
.lang { width: 100%; background: rgba(255, 255, 255, .08); color: #fff; border: 1px solid rgba(255, 255, 255, .18); border-radius: 9px; padding: 8px; font-family: 'IBM Plex Sans Arabic', 'Inter', sans-serif; font-weight: 600; }
.lang:hover { background: rgba(255, 255, 255, .14); }
main { margin-inline-start: 236px; padding: 0 28px 48px; min-width: 0; }
.mobile-top { display: none; }
.loading { padding: 80px; text-align: center; color: var(--muted); }

/* ---------- filters ---------- */
#filterbar { position: sticky; top: 0; z-index: 20; background: rgba(244, 246, 245, .92); backdrop-filter: blur(8px); margin: 0 -28px; padding: 12px 28px; border-bottom: 1px solid var(--line); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.filters label { display: flex; flex-direction: column; gap: 3px; }
.filters label span { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
[dir=rtl] .filters label span { text-transform: none; letter-spacing: 0; }
.filters select { font: inherit; padding: 7px 30px 7px 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2355605d' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 10px center; appearance: none; min-width: 140px; color: var(--ink); }
[dir=rtl] .filters select { padding: 7px 10px 7px 30px; background-position: left 10px center; }
.btn { border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 9px; padding: 8px 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.btn.sm { padding: 7px 12px; }
.btn.primary { background: var(--brand2); border-color: var(--brand2); color: #fff; }
.btn.primary:hover { background: var(--brand); }
.btn.ghost:hover { background: #eef1f0; }
.btn.big { padding: 13px 22px; font-size: 15px; }
.btn:disabled { opacity: .45; cursor: default; }

/* ---------- page ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; padding: 22px 0 16px; }
.page-head h1 { font-size: 24px; }
.page-head p { margin: 4px 0 0; color: var(--ink2); }
.asof { font-size: 12px; color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px; min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 4px; }
.card-head h3 { font-size: 15px; font-weight: 650; }
.card-sub { color: var(--muted); font-size: 12.5px; margin: 0 0 12px; }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.chart-box { position: relative; width: 100%; margin-top: 8px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpis.kpis-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpis:not(.kpis-4) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi { padding: 15px 16px; }
.kpi-label { font-size: 12px; color: var(--ink2); font-weight: 600; }
.kpi-value { font-size: 24px; font-weight: 700; margin: 4px 0 2px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: 12px; color: var(--muted); }
.meter { height: 6px; background: #eef1f0; border-radius: 6px; margin-top: 8px; overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: 6px; }
.delta { font-weight: 650; font-size: 12px; }
.delta.up { color: var(--good-ink); } .delta.down { color: var(--critical); } .delta.flat { color: var(--muted); font-weight: 500; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 2px 9px 2px 7px; border-radius: 99px; background: #f0f2f1; color: var(--ink); white-space: nowrap; }
.pill i { width: 8px; height: 8px; border-radius: 50%; }
.pill.good i { background: var(--good); } .pill.warning i { background: var(--warning); } .pill.serious i { background: var(--serious); } .pill.critical i { background: var(--critical); } .pill.info i { background: var(--blue); }
.pill.critical { background: #fbeaea; } .pill.warning { background: #fdf4e0; } .pill.good { background: #e8f5e8; } .pill.serious { background: #fcede6; } .pill.info { background: #e7f0fb; }

/* insights */
.insights { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.insight { display: flex; gap: 12px; padding: 12px 14px; border-radius: 11px; border: 1px solid var(--line); color: var(--ink); background: #fbfcfb; transition: border-color .15s, transform .15s; }
.insight:hover { border-color: #b9c4c0; transform: translateY(-1px); }
.insight .ic { flex: 0 0 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 13px; }
.insight.critical .ic { background: var(--critical); } .insight.warning .ic { background: var(--warning); color: #3a2a00; } .insight.good .ic { background: var(--good); } .insight.info .ic { background: var(--blue); }
.in-title { font-weight: 650; }
.in-text { color: var(--ink2); font-size: 13px; margin-top: 2px; }

/* tile map */
.tilemap { display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(6, minmax(52px, auto)); gap: 4px; margin-top: 8px; direction: ltr; }
.big-map .tilemap { grid-template-rows: repeat(6, minmax(66px, auto)); }
.tile { border: 2px solid #fff; border-radius: 9px; padding: 6px 8px; text-align: start; display: flex; flex-direction: column; justify-content: center; gap: 1px; min-width: 0; transition: transform .12s, box-shadow .12s; font-family: inherit; }
[dir=rtl] .tile { text-align: right; direction: rtl; }
.tile:hover { transform: scale(1.02); box-shadow: 0 4px 14px rgba(0, 0, 0, .12); z-index: 1; }
.tile.sel { outline: 3px solid var(--ink); outline-offset: -2px; }
.t-name { font-size: 11px; font-weight: 600; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-val { white-space: nowrap; font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.t-sub { font-size: 11px; opacity: .8; }
.legend-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.lg-scale { display: inline-flex; } .lg-scale i { width: 22px; height: 10px; }
.lg-scale i:first-child { border-radius: 3px 0 0 3px; } .lg-scale i:last-child { border-radius: 0 3px 3px 0; }

/* channel split + stacks */
.stack { display: flex; height: 12px; border-radius: 6px; overflow: hidden; gap: 2px; background: #fff; width: 100%; }
.stack.tall { height: 26px; border-radius: 8px; margin: 10px 0 14px; }
.stack span { display: block; height: 100%; min-width: 2px; }
.ch-row { display: grid; grid-template-columns: 12px 1fr auto auto auto; gap: 8px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.ch-row i, .aging-legend i { width: 10px; height: 10px; border-radius: 3px; }
.ch-row em { color: var(--muted); font-style: normal; }
#ch-split .stack { margin: 14px 0 6px; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.mini-stats div { background: #f6f8f7; border-radius: 10px; padding: 10px; }
.mini-stats b { display: block; font-size: 17px; }
.mini-stats span { font-size: 11.5px; color: var(--muted); }
.aging-legend div { display: grid; grid-template-columns: 12px 1fr auto 44px; gap: 8px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); }
.aging-legend em { font-style: normal; color: var(--muted); text-align: end; }
.ag-rows { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.ag-row { display: grid; grid-template-columns: 150px 1fr 90px 120px; gap: 12px; align-items: center; font-size: 13px; }
.ag-row .stack { height: 14px; background: transparent; }
.ag-row em { font-style: normal; font-size: 12px; text-align: end; }

/* movers */
.movers { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.mv-h { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.mv-row b { white-space: nowrap; }
.mv-row { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.mv-row:hover .mv-name { color: var(--blue); }
.mv-name { font-weight: 550; font-size: 13px; min-width: 0; }
.mv-name em { display: block; font-style: normal; font-size: 11.5px; color: var(--muted); font-weight: 400; }

/* segmented */
.seg { display: inline-flex; background: #eef1f0; padding: 3px; border-radius: 10px; gap: 2px; margin: 4px 0 10px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; font-weight: 600; font-size: 12.5px; color: var(--ink2); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }

/* tables */
.tbl-scroll { overflow: auto; max-height: 560px; border: 1px solid var(--line); border-radius: 10px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { position: sticky; top: 0; background: #f6f8f7; text-align: start; font-size: 11.5px; font-weight: 650; color: var(--ink2); padding: 9px 12px; border-bottom: 1px solid var(--line); cursor: pointer; white-space: nowrap; user-select: none; z-index: 1; }
.tbl th.sorted { color: var(--ink); }
.tbl td { padding: 9px 12px; border-bottom: 1px solid #eef1f0; vertical-align: middle; }
.tbl .n { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl tr.click { cursor: pointer; }
.tbl tbody tr:hover { background: #f7faf9; }
.tbl.compact td, .tbl.compact th { padding: 7px 10px; }
.search { width: 100%; max-width: 320px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; font: inherit; margin-bottom: 10px; }
.empty { padding: 28px; text-align: center; color: var(--muted); }
.ach { font-weight: 700; } .ach.good { color: var(--good-ink); } .ach.warning { color: var(--warning-ink); } .ach.critical { color: var(--critical); }
.reach { display: inline-block; width: 56px; height: 6px; background: #eef1f0; border-radius: 4px; overflow: hidden; vertical-align: middle; margin-inline-end: 6px; }
.reach i { display: block; height: 100%; background: var(--blue); border-radius: 4px; }
.reach.over i { background: var(--critical); }
.spark { display: block; }

/* heatmaps */
.heat { display: grid; gap: 2px; font-size: 12px; min-width: 560px; }
.card > .heat, #heat, #seas { overflow-x: auto; }
.hh { font-size: 11px; font-weight: 650; color: var(--ink2); text-align: center; padding: 4px 2px; line-height: 1.2; }
.hr { font-weight: 550; padding: 6px 8px 6px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
[dir=rtl] .hr { padding: 6px 0 6px 8px; }
.hc { text-align: center; padding: 7px 2px; border-radius: 4px; font-variant-numeric: tabular-nums; font-weight: 600; }
.hc.na { color: var(--muted); background: #f6f8f7; font-weight: 400; }

/* abc */
.abc { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 10px; }
.abc-col { background: #f8faf9; border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.abc-k { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 16px; margin-bottom: 6px; }
.abc-col b { font-size: 20px; }

/* expiry */
.ex-list { display: flex; flex-direction: column; max-height: 520px; overflow: auto; }
.ex-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }

/* drawer */
#scrim { position: fixed; inset: 0; background: rgba(13, 30, 27, .35); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 40; }
#drawer { position: fixed; inset-block: 0; inset-inline-end: 0; width: min(720px, 100vw); background: var(--bg); z-index: 50; transform: translateX(105%); transition: transform .25s ease; overflow: auto; box-shadow: -10px 0 40px rgba(0, 0, 0, .15); }
[dir=rtl] #drawer { transform: translateX(-105%); }
.drawer-open #scrim { opacity: 1; pointer-events: auto; }
.drawer-open #drawer { transform: none; }
.dr-head { display: flex; justify-content: space-between; gap: 12px; padding: 22px 24px 16px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 2; }
.dr-head h2 { font-size: 20px; margin: 2px 0; }
.x { border: 0; background: #eef1f0; width: 34px; height: 34px; border-radius: 50%; font-size: 20px; line-height: 1; flex: none; }
.dr-body { padding: 18px 24px 40px; }
.dr-body h4 { font-size: 13px; margin: 22px 0 8px; color: var(--ink2); }
.kpis.tight { gap: 10px; } .kpis.tight .kpi-value { font-size: 18px; }
.dr-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.mix-row { display: grid; grid-template-columns: 1fr 70px 36px; gap: 8px; align-items: center; font-size: 12.5px; padding: 4px 0; }
.mix-row .reach { width: 70px; }
.mix-row b { text-align: end; }
.xs-row { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.eyebrow { font-size: 11.5px; font-weight: 700; color: var(--brand2); text-transform: uppercase; letter-spacing: .06em; }
[dir=rtl] .eyebrow { text-transform: none; letter-spacing: 0; }
#drawer .card { background: #fff; }

/* ---------- story (before / after) ---------- */
.story-hero { padding: 34px 0 20px; max-width: 900px; }
.story-hero h1 { font-size: 34px; line-height: 1.15; margin: 8px 0 12px; letter-spacing: -.025em; }
.lead { font-size: 16px; color: var(--ink2); margin: 0; }
.story-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.sheet-card { padding: 0; overflow: hidden; }
.xl-titlebar { display: flex; align-items: center; gap: 10px; background: #1f6e43; color: #fff; padding: 8px 14px; font-size: 13px; direction: ltr; }
.xl-logo { background: #fff; color: #1f6e43; font-weight: 800; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 4px; font-size: 12px; }
.xl-file { font-weight: 600; }
.xl-saved { margin-inline-start: auto; opacity: .8; font-size: 12px; }
.xl-toolbar { display: flex; gap: 8px; align-items: center; padding: 12px 14px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.toggle { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--ink2); margin-inline-start: 6px; }
.xl-steps { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px; background: #fafbfa; border-bottom: 1px solid var(--line); }
.xl-steps .st { font-size: 11.5px; padding: 3px 9px; border-radius: 99px; background: #eef1f0; color: var(--muted); }
.xl-steps .st.done { background: #e3f3e6; color: var(--good-ink); }
.xl-steps .st.cur { background: var(--good); color: #fff; }
.xl-wrap { overflow: auto; max-height: 640px; }
.xl { border-collapse: collapse; font: 12.5px/1.3 Calibri, 'Segoe UI', Arial, sans-serif; width: 100%; min-width: 980px; }
.xl th { background: #f3f3f3; color: #555; font-weight: 400; border: 1px solid #d4d4d4; padding: 3px 6px; position: sticky; top: 0; z-index: 1; }
.xl td { border: 1px solid #e1e1e1; padding: 4px 7px; white-space: nowrap; height: 24px; transition: background .4s; }
.xl td.rn { background: #f3f3f3; color: #777; text-align: center; width: 34px; border-color: #d4d4d4; }
.xl td.num { text-align: right; }
.xl tr.hdr td:not(.rn) { font-weight: 700; background: #dde8f5; }
.xl tr.sub td:not(.rn), .xl tr.grand td:not(.rn) { font-weight: 700; background: #fbf3d5; }
.xl tr.grand.clean td:not(.rn) { background: #e3f3e6; }
.xl tr.fill-y td:not(.rn) { background: #fff59d; }
.xl tr.fill-r td:not(.rn) { color: #c00000; }
.xl td.err { color: #c00000; font-weight: 700; }
.xl td.bad { box-shadow: inset 0 0 0 2px #e34948; background: #fff1f0 !important; }
.xl tr.issue-row td:not(.rn) { box-shadow: inset 0 2px 0 #e34948, inset 0 -2px 0 #e34948; background: #fff1f0 !important; }
.xl tr.dup-row td:not(.rn) { text-decoration: line-through; text-decoration-color: rgba(227, 73, 72, .6); }
.xl td.fixed { animation: fixed 1.6s ease; }
@keyframes fixed { 0% { background: #9be59b; } 100% { background: transparent; } }
.xl-tabs { display: flex; gap: 2px; background: #f3f3f3; border-top: 1px solid #d4d4d4; padding: 0 10px; font: 12px Calibri, 'Segoe UI', sans-serif; }
.xl-tabs span { padding: 5px 12px; color: #555; }
.xl-tabs span.on { background: #fff; color: #1f6e43; font-weight: 700; border-bottom: 2px solid #1f6e43; }
.story-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 16px; }
.big-num { font-size: 46px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; margin: 4px 0 10px; color: var(--critical); font-variant-numeric: tabular-nums; }
.bar { height: 8px; background: #eef1f0; border-radius: 6px; overflow: hidden; margin-bottom: 8px; }
.bar span { display: block; height: 100%; background: var(--good); transition: width .5s; }
.facts { margin: 10px 0 0; padding: 0; list-style: none; }
.facts li { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.facts b { color: var(--critical); font-size: 15px; margin-inline-end: 4px; }
.tot-row { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; font-size: 13px; }
.tot-row b { font-variant-numeric: tabular-nums; }
#xl-true b { color: var(--good-ink); }
.pivot-card { margin-top: 16px; }
.pivots { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 10px 0; }
.pv-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; }
[dir=rtl] .pv-title { text-transform: none; }
.pv-title.bad { color: var(--critical); } .pv-title.good { color: var(--good-ink); }
.pv-row { display: grid; grid-template-columns: minmax(0, 1.3fr) 1fr 64px; gap: 8px; align-items: center; font-size: 12.5px; padding: 3px 0; }
.pv-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-bar { height: 10px; background: #f1f3f2; border-radius: 3px; overflow: hidden; }
.pv-bar i { display: block; height: 100%; background: var(--blue); border-radius: 3px; }
.pv-val { text-align: end; font-variant-numeric: tabular-nums; }
.compare { margin-top: 34px; }
.compare h2 { font-size: 24px; margin-bottom: 14px; }
.cmp-table { display: grid; grid-template-columns: 1.1fr 1fr 1.2fr; background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); }
.cmp-table > div { padding: 13px 16px; border-bottom: 1px solid var(--line); }
.cmp-h { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; background: #f6f8f7; }
[dir=rtl] .cmp-h { text-transform: none; }
.cmp-h.bad { color: var(--critical); } .cmp-h.good { color: var(--good-ink); }
.cmp-q { font-weight: 600; }
.cmp-b { color: var(--ink2); background: #fffafa; }
.cmp-a { background: #f8fcf8; }
.cmp-a a { white-space: nowrap; font-weight: 600; font-size: 12.5px; margin-inline-start: 6px; }
.cta-row { display: flex; justify-content: center; padding: 28px 0 10px; }

/* ---------- responsive ---------- */
@media (max-width: 1200px) {
  .kpis, .kpis.kpis-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid > .card { grid-column: span 12 !important; }
  .story-grid { grid-template-columns: 1fr; }
  .story-side { position: static; display: grid; grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  .side { transform: translateX(-100%); transition: transform .2s; }
  [dir=rtl] .side { transform: translateX(100%); }
  .nav-open .side { transform: none; }
  main { margin-inline-start: 0; padding: 0 16px 40px; }
  #filterbar { margin: 0 -16px; padding: 10px 16px; top: 48px; }
  .filters select { min-width: 0; width: 100%; }
  .filters label { flex: 1 1 140px; }
  .mobile-top { display: flex; position: sticky; top: 0; z-index: 25; align-items: center; gap: 12px; padding: 10px 16px; background: var(--side); color: #fff; font-weight: 700; height: 48px; }
  .mobile-top button { background: none; border: 0; color: #fff; font-size: 20px; }
  .story-side { grid-template-columns: 1fr; }
  .story-hero h1 { font-size: 26px; }
  .pivots, .movers, .dr-cols, .abc { grid-template-columns: 1fr; }
  .cmp-table { grid-template-columns: 1fr; }
  .cmp-h:first-child { display: none; }
  .cmp-h { display: none; }
  .cmp-b::before { content: "Excel: "; font-weight: 700; color: var(--critical); }
  .ag-row { grid-template-columns: 90px 1fr 70px; } .ag-row em { display: none; }
  .kpi-value { font-size: 20px; }
  .tilemap .t-sub { display: none; }
}
@media (max-width: 480px) { .kpis, .kpis.kpis-4 { grid-template-columns: 1fr 1fr; gap: 10px; } .kpi { padding: 12px; } }
