/* SOCX by CyberX — same identity as QAX v3 (CyberX purple, lavender frame, Space Grotesk / Almarai /
   IBM Plex Mono), with a "crystal" layer: frosted panels over a soft violet-to-blue aurora. */
@font-face { font-family: 'Space Grotesk'; font-weight: 500; font-display: swap; src: url(fonts/space-grotesk-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-weight: 700; font-display: swap; src: url(fonts/space-grotesk-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Almarai'; font-weight: 400; font-display: swap; src: url(fonts/almarai-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Almarai'; font-weight: 700; font-display: swap; src: url(fonts/almarai-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-mono-latin-400-normal.woff2) format('woff2'); }

:root {
  color-scheme: light;
  --frame: #f4effc; --sheet: rgb(255 255 255 / .78); --sheet-solid: #fff; --raised: #faf7fe; --active: #ece3fa;
  --border: #e5ddf2; --rule: #f0eaf8; --control: #cdc2e2; --text: #14112a; --muted: #56526d; --faint: #6a6681;
  --accent: #671db4; --primary: #671db4; --on-primary: #fff;
  --mint: #2ee6c5; --pink: #e8336d; --blue: #2f6bff;
  --ok: #0a7c65; --ok-bg: #dbf7ef; --ok-ink: #075443;
  --warn: #9a5d00; --warn-bg: #fff0d4; --warn-ink: #6b4100;
  --bad: #d1175c; --bad-bg: #ffe4ee; --bad-ink: #890d3b;
  --info: #2458e0; --info-bg: #e5edff; --info-ink: #173c99;
  --none: #6b6880; --none-bg: #eeecf3; --none-ink: #45425a;
  --sev-critical: #a0104a; --sev-high: #e8336d; --sev-medium: #e09400; --sev-low: #2f6bff; --sev-info: #8c88a0;
  --c1: #6b2fd0; --c2: #0f9e84; --c3: #2f6bff; --c4: #e8336d; --c5: #c27c00; --c6: #b04fc4;
  --grid: #ece6f5;
  --glass-edge: rgb(255 255 255 / .9); --glass-shadow: 0 1px 0 rgb(255 255 255 / .8) inset, 0 8px 28px rgb(70 30 140 / .07);
  --aurora-1: rgb(123 63 228 / .16); --aurora-2: rgb(47 107 255 / .13); --aurora-3: rgb(46 230 197 / .10);
  --float-shadow: 0 14px 40px rgb(40 16 90 / .18);
  --font-ui: 'Almarai', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Space Grotesk', 'Almarai', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --frame: #0f0c1d; --sheet: rgb(27 22 50 / .72); --sheet-solid: #17132a; --raised: #1f1a36; --active: #2b2348;
  --border: #2f2850; --rule: #241e3d; --control: #4a4069; --text: #f2eef9; --muted: #b6afcc; --faint: #9c95b5;
  --accent: #b893f7; --primary: #7b3fe4; --on-primary: #fff;
  --mint: #3fe0be; --pink: #ff5c8d; --blue: #6e9bff;
  --ok: #3fe0be; --ok-bg: #0f2a27; --ok-ink: #72efd3;
  --warn: #f2b441; --warn-bg: #2d2310; --warn-ink: #f7c870;
  --bad: #ff5c8d; --bad-bg: #33121f; --bad-ink: #ff8fb0;
  --info: #7ea4ff; --info-bg: #141f3d; --info-ink: #a9c1ff;
  --none: #9c95b5; --none-bg: #241e3a; --none-ink: #c9c3dc;
  --sev-critical: #ff4d8b; --sev-high: #ff7aa0; --sev-medium: #f2b441; --sev-low: #6e9bff; --sev-info: #9c95b5;
  --c1: #8e5ceb; --c2: #169c82; --c3: #4a78e8; --c4: #e23c72; --c5: #bc800c; --c6: #b155cc;
  --grid: #2a2445;
  --glass-edge: rgb(255 255 255 / .07); --glass-shadow: 0 1px 0 rgb(255 255 255 / .05) inset, 0 10px 30px rgb(0 0 0 / .35);
  --aurora-1: rgb(123 63 228 / .28); --aurora-2: rgb(47 107 255 / .18); --aurora-3: rgb(46 230 197 / .08);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font: 14px/1.5 var(--font-ui); color: var(--text); background: var(--frame); -webkit-font-smoothing: antialiased; }
body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(60vw 50vh at 85% -10%, var(--aurora-1), transparent 70%), radial-gradient(50vw 45vh at 10% 110%, var(--aurora-2), transparent 70%), radial-gradient(35vw 30vh at 55% 55%, var(--aurora-3), transparent 70%); }
::selection { background: color-mix(in srgb, var(--accent) 22%, transparent); }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
h1, h2, h3, .display { font-family: var(--font-display); letter-spacing: -.01em; }
h1 { font-size: 24px; line-height: 30px; margin: 0; font-weight: 700; }
h2 { font-size: 16px; line-height: 22px; margin: 0; font-weight: 700; }
h3 { font-size: 14px; margin: 0 0 8px; font-weight: 700; }
code, .mono { font-family: var(--font-mono); font-size: 12.5px; }
.num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 99; background: var(--sheet-solid); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* shell: L-frame + glass sheet */
.shell { display: grid; grid-template-columns: 236px 1fr; grid-template-rows: 56px 1fr; height: 100vh; }
.side { grid-row: 1 / 3; display: flex; flex-direction: column; padding: 14px 10px 10px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 14px; }
.brand img { height: 30px; }
.brand b { font-family: var(--font-display); font-size: 21px; letter-spacing: -.02em; }
.brand small { display: block; color: var(--muted); font-size: 11px; margin-top: -3px; }
.scope { color: var(--muted); font-size: 12px; padding: 0 10px 10px; }
.nav-group { color: var(--faint); font-size: 11.5px; padding: 12px 10px 4px; }
.nav a { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: 10px; color: var(--text); font-size: 14px; }
.nav a:hover { background: color-mix(in srgb, var(--active) 70%, transparent); text-decoration: none; }
.nav a.on { background: var(--active); font-weight: 700; box-shadow: 0 0 0 1px var(--glass-edge) inset; }
.nav a .badge { margin-inline-start: auto; }
.nav svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.6; color: var(--muted); flex: none; }
.nav a.on svg { color: var(--accent); }
.side-foot { margin-top: auto; padding: 10px; font-size: 12px; color: var(--muted); display: grid; gap: 8px; }
.top { display: flex; align-items: center; gap: 12px; padding: 0 16px 0 8px; min-width: 0; }
.crumbs { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumbs b { color: var(--text); }
.top .spacer { flex: 1; }
.fresh { color: var(--muted); font-size: 12px; white-space: nowrap; }
.sheet { margin: 0 8px 8px 0; border-radius: 22px; background: var(--sheet); backdrop-filter: blur(22px) saturate(140%); -webkit-backdrop-filter: blur(22px) saturate(140%);
  border: 1px solid var(--glass-edge); box-shadow: var(--glass-shadow); overflow-y: auto; min-width: 0; }
.page { padding: 24px; max-width: 1640px; margin: 0 auto; }
.title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.title-row p { margin: 4px 0 0; color: var(--muted); }
.menu-btn { display: none; }

/* buttons & inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--accent);
  background: transparent; color: var(--accent); font: 700 13px var(--font-ui); cursor: pointer; white-space: nowrap; transition: background .15s, transform .15s; }
.btn:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 70%, var(--blue))); border-color: transparent; color: var(--on-primary); box-shadow: 0 6px 18px color-mix(in srgb, var(--primary) 30%, transparent); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { border-color: var(--control); color: var(--text); }
.btn.danger { border-color: var(--bad); color: var(--bad); }
.btn.sm { height: 28px; padding: 0 12px; font-size: 12px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.icon-btn { width: 34px; height: 34px; border-radius: 999px; border: 1px solid var(--control); background: transparent; color: var(--text); cursor: pointer; display: inline-grid; place-items: center; }
.icon-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.7; }
.input, select.input, textarea.input { height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--control); background: var(--sheet-solid); color: var(--text); font: 14px var(--font-ui); min-width: 0; }
textarea.input { height: auto; padding: 10px 12px; resize: vertical; }
.field { display: grid; gap: 6px; } .field label { font-size: 13px; font-weight: 700; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.seg { display: inline-flex; background: var(--raised); border: 1px solid var(--border); border-radius: 999px; padding: 3px; }
.seg button { border: 0; background: transparent; color: var(--muted); font: 700 12px var(--font-ui); padding: 5px 12px; border-radius: 999px; cursor: pointer; }
.seg button.on { background: var(--sheet-solid); color: var(--text); box-shadow: 0 1px 3px rgb(0 0 0 / .1); }

/* panels */
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.s3 { grid-column: span 3; } .s4 { grid-column: span 4; } .s5 { grid-column: span 5; } .s6 { grid-column: span 6; } .s7 { grid-column: span 7; } .s8 { grid-column: span 8; } .s12 { grid-column: span 12; }
.panel { background: color-mix(in srgb, var(--sheet-solid) 72%, transparent); border: 1px solid var(--border); border-radius: 18px; padding: 16px; min-width: 0;
  box-shadow: 0 1px 0 var(--glass-edge) inset; }
.panel-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.panel-h .meta { color: var(--muted); font-size: 12px; }
.empty { color: var(--muted); padding: 18px 4px; }
.unavail { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); padding: 10px 2px; font-size: 13px; }

/* KPI strip */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; margin-bottom: 16px;
  background: color-mix(in srgb, var(--sheet-solid) 72%, transparent); }
.kpi { padding: 14px 16px; border-inline-end: 1px solid var(--rule); min-width: 0; display: block; color: inherit; }
a.kpi:hover { background: var(--raised); text-decoration: none; }
.kpi .l { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .v { font: 700 28px/36px var(--font-display); font-variant-numeric: tabular-nums; }
.kpi .v small { font-size: 13px; color: var(--muted); font-weight: 500; margin-inline-start: 4px; }
.kpi .sub { font-size: 12px; color: var(--muted); }
.v.ok { color: var(--ok); } .v.warn { color: var(--warn); } .v.bad { color: var(--bad); } .v.info { color: var(--info); }

/* posture hero */
.hero { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; }
.ring { position: relative; width: 168px; height: 168px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .c { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring .c b { font: 700 46px/1 var(--font-display); display: block; }
.ring .c span { color: var(--muted); font-size: 12px; }
.grade { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; font: 700 16px var(--font-display); color: #fff; margin-inline-end: 8px; vertical-align: middle; }
.verdict { font: 700 20px/28px var(--font-display); margin: 0 0 6px; }
.calc { margin-top: 10px; font-size: 13px; }
.calc summary { cursor: pointer; color: var(--accent); font-weight: 700; }
.calc table td:last-child { text-align: end; }

/* service rail */
.rail { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0; border: 1px solid var(--border); border-radius: 18px; overflow: hidden; margin-bottom: 16px;
  background: color-mix(in srgb, var(--sheet-solid) 72%, transparent); }
.rail a { padding: 10px 14px; border-inline-end: 1px solid var(--rule); border-bottom: 1px solid var(--rule); color: var(--text); display: grid; gap: 2px; }
.rail a:hover { background: var(--raised); text-decoration: none; }
.rail .n { font-weight: 700; font-size: 13px; display: flex; gap: 6px; align-items: center; }
.rail .r { color: var(--muted); font-size: 11.5px; }

/* pills / severity */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; flex: none;
  background: var(--none-bg); color: var(--none-ink); }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok { background: var(--ok-bg); color: var(--ok-ink); } .pill.warn { background: var(--warn-bg); color: var(--warn-ink); }
.pill.bad { background: var(--bad-bg); color: var(--bad-ink); } .pill.info { background: var(--info-bg); color: var(--info-ink); }
.pill.plain::before { display: none; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; background: var(--none); }
.dot.up { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 20%, transparent); }
.dot.down { background: var(--bad); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 22%, transparent); }
.dot.degraded { background: var(--warn); }
.sev { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--text);
  border: 1px solid color-mix(in srgb, var(--sc) 45%, transparent); background: color-mix(in srgb, var(--sc) 12%, transparent); white-space: nowrap; }
.sev::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--sc); }
.sev.critical { --sc: var(--sev-critical); } .sev.high { --sc: var(--sev-high); } .sev.medium { --sc: var(--sev-medium); } .sev.low { --sc: var(--sev-low); } .sev.info { --sc: var(--sev-info); }
.lvl { display: inline-grid; place-items: center; min-width: 30px; height: 22px; border-radius: 7px; font: 700 12px var(--font-mono); color: #fff; background: var(--sev-info); }
.lvl.critical { background: var(--sev-critical); } .lvl.high { background: var(--sev-high); } .lvl.medium { background: var(--sev-medium); color: #1a1200; } .lvl.low { background: var(--sev-low); }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; }
.tag { display: inline-block; font-size: 11.5px; padding: 1px 8px; border-radius: 999px; background: var(--raised); border: 1px solid var(--border); color: var(--muted); margin: 1px 2px 1px 0; }

/* tables */
.tw { overflow-x: auto; border-radius: 12px; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.t th { text-align: start; font-size: 12px; font-weight: 700; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.t td { padding: 9px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; unicode-bidi: plaintext; }
.t tr:last-child td { border-bottom: 0; }
.t tbody tr.click { cursor: pointer; } .t tbody tr.click:hover td { background: color-mix(in srgb, var(--active) 45%, transparent); }
.t td.r, .t th.r { text-align: end; font-variant-numeric: tabular-nums; }
.t .ellip { max-width: 520px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t .muted { color: var(--muted); }

/* bars & charts */
.hbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; font-size: 13px; }
.hbar .lab { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .track { grid-column: 1 / 3; height: 6px; border-radius: 999px; background: var(--raised); overflow: hidden; margin-bottom: 6px; }
.hbar .fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--c1), var(--c3)); }
.chart { width: 100%; height: 190px; display: block; }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--font-ui); }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 5px; vertical-align: -1px; }
.donut-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.donut-wrap svg { width: 130px; height: 130px; }
.tip { position: fixed; z-index: 50; pointer-events: none; background: var(--sheet-solid); border: 1px solid var(--border); box-shadow: var(--float-shadow); padding: 6px 10px; border-radius: 8px; font-size: 12px; }

/* MITRE */
.mitre { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(170px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.mitre .col h3 { font-size: 12.5px; padding: 8px 10px; border-radius: 10px; background: var(--active); margin-bottom: 8px; display: flex; justify-content: space-between; }
.tech { display: block; padding: 8px 10px; border-radius: 10px; margin-bottom: 6px; border: 1px solid var(--border); color: var(--text); font-size: 12.5px;
  background: color-mix(in srgb, var(--c1) calc(var(--h) * 55%), var(--sheet-solid)); }
.tech:hover { text-decoration: none; border-color: var(--accent); }
.tech b { display: block; font-family: var(--font-mono); font-size: 11.5px; }

/* drawer / dialogs */
.drawer-bg { position: fixed; inset: 0; background: rgb(15 10 35 / .35); backdrop-filter: blur(3px); z-index: 30; }
.drawer { position: fixed; top: 8px; bottom: 8px; inset-inline-end: 8px; width: min(720px, calc(100vw - 16px)); z-index: 31; background: var(--sheet-solid); border: 1px solid var(--border);
  border-radius: 20px; box-shadow: var(--float-shadow); display: flex; flex-direction: column; }
.drawer-h { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.drawer-h h2 { flex: 1; min-width: 0; }
.drawer-b { padding: 16px 18px; overflow-y: auto; flex: 1; }
.drawer-f { padding: 12px 18px; border-top: 1px solid var(--border); display: flex; gap: 8px; flex-wrap: wrap; }
dl.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 14px; margin: 0 0 14px; font-size: 13px; }
dl.kv dt { color: var(--muted); } dl.kv dd { margin: 0; word-break: break-word; unicode-bidi: plaintext; }
pre.code { background: var(--raised); border: 1px solid var(--border); border-radius: 12px; padding: 12px; overflow-x: auto; font: 12px/1.55 var(--font-mono); white-space: pre-wrap; word-break: break-word; max-height: 420px; }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 60; background: var(--text); color: var(--frame); padding: 10px 16px; border-radius: 12px; font-size: 13px; box-shadow: var(--float-shadow); max-width: 90vw; }
.toast.err { background: var(--bad); color: #fff; }

/* AI */
.ai-box { display: grid; gap: 12px; }
.answer { background: linear-gradient(135deg, color-mix(in srgb, var(--c1) 7%, var(--sheet-solid)), color-mix(in srgb, var(--c3) 6%, var(--sheet-solid)));
  border: 1px solid var(--border); border-radius: 16px; padding: 14px 18px; line-height: 1.6; }
.answer h4 { margin: 10px 0 4px; font-family: var(--font-display); } .answer ul { margin: 4px 0; padding-inline-start: 20px; } .answer p { margin: 6px 0; }
.q { font-weight: 700; color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--border); background: var(--raised); color: var(--text); border-radius: 999px; padding: 5px 12px; font: 12.5px var(--font-ui); cursor: pointer; }
.chip:hover { border-color: var(--accent); }
.notice { border: 1px dashed var(--control); border-radius: 14px; padding: 12px 14px; color: var(--muted); font-size: 13px; background: var(--raised); }
.finding { border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; background: color-mix(in srgb, var(--sheet-solid) 80%, transparent); }
.finding summary { cursor: pointer; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; list-style: none; }
.finding summary::-webkit-details-marker { display: none; }
.finding summary b { flex: 1; min-width: 200px; }
.spin { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: sp .8s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }
.skel { background: var(--raised); border-radius: 8px; height: 14px; margin: 8px 0; }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login form { width: min(400px, 100%); display: grid; gap: 14px; padding: 28px; border-radius: 24px; background: var(--sheet); backdrop-filter: blur(24px); border: 1px solid var(--glass-edge); box-shadow: var(--glass-shadow); }
.login .brand { justify-content: center; padding-bottom: 6px; }
.err { color: var(--bad); font-size: 13px; }

/* responsive */
@media (max-width: 1280px) { .s3 { grid-column: span 6; } .s4, .s5, .s7, .s8 { grid-column: span 12; } .s6 { grid-column: span 12; } }
@media (max-width: 1100px) and (min-width: 641px) {
  .shell { grid-template-columns: 64px 1fr; }
  .brand b, .brand small, .scope, .nav-group, .nav a span.t, .nav a .badge, .side-foot { display: none; }
  .nav a { justify-content: center; padding: 0; }
}
@media (max-width: 640px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: 56px 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 40; background: var(--frame); transform: translateX(-105%); transition: transform .2s; box-shadow: var(--float-shadow); }
  .side.open { transform: none; }
  .menu-btn { display: inline-grid; }
  .sheet { margin: 0 6px 6px; border-radius: 16px; }
  .page { padding: 16px; }
  .s3 { grid-column: span 12; }
  .hero { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .fresh { display: none; }
  dl.kv { grid-template-columns: 1fr; }
}
@media print { .side, .top { display: none; } .shell { display: block; } .sheet { margin: 0; box-shadow: none; } }

/* fixes */
.btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.7; flex: none; }
.panel-h h2 svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.7; vertical-align: -2px; margin-inline-end: 4px; color: var(--accent); }
.icon-btn.menu-btn { display: none; }
@media (max-width: 640px) { .icon-btn.menu-btn { display: inline-grid; } }
.kpis { grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); }
