/* AI Console — app layer on top of the Kulikov design system (tokens.css + components.css).
   Shell, login and tables follow source-gateway / messages-gateway; colours, radii, shadows come from tokens. */

[hidden] { display: none !important; }
body { font-size: 14px; line-height: 22px; }
a { color: inherit; }
code, .mono { font-family: var(--font-mono); font-size: 12.5px; }
.muted { color: var(--ink-muted); }
.faint { color: var(--ink-faint); }
.num { font-variant-numeric: tabular-nums; }
.neg { color: var(--negative); }
.pos { color: var(--positive); }
svg.i { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------------------------------------------------------------- shell: sidebar + content */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.shell.is-login { display: block; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--line); z-index: 20; }
.brand { display: flex; align-items: center; gap: 10px; padding: 16px 16px 12px; font: 600 16px/1 var(--font-sans); letter-spacing: -.02em; color: var(--ink); text-decoration: none; }
.brand__name { flex: 1; }
.brand .mk-logo-tile svg { width: 20px; height: 20px; }
.brand .mk-label { font-size: 12px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.side nav { flex: 1; overflow-y: auto; padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; }
.nav-group { padding: 14px 8px 4px; font: 500 11px/16px var(--font-sans); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); }
.nav-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 6px 8px; min-height: 44px; border: 0; background: none; border-radius: var(--radius-sm); color: var(--ink-muted); font: 500 14px/20px var(--font-sans); text-decoration: none; }
.nav-item:hover { background: var(--surface-sunken); color: var(--ink); }
.nav-item[aria-current="page"] { background: var(--surface-sunken); color: var(--ink); }
.nav-item .icontile { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); box-shadow: 0 1px 0 var(--line); }
.nav-item[aria-current="page"] .icontile { background: var(--graphite); color: var(--on-graphite); border-color: var(--graphite); }
.nav-item .nl { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-foot { border-top: 1px solid var(--line); padding: 8px 10px; }
.side-foot__row { display: flex; align-items: center; gap: 4px; }
.side-foot .nav-item { flex: 1; min-width: 0; }
.side-scrim { display: none; }
.content { min-width: 0; }
#app { max-width: 1320px; padding: 24px 40px 64px; }
.shell.is-login #app { max-width: none; padding: 0; }
.mobile-bar { display: none; }

/* ---------------------------------------------------------------- filter bar */
.filterbar { position: sticky; top: 0; z-index: 12; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); padding: 12px 40px; }
.filterbar__row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; max-width: 1240px; }
.filterbar__row + .filterbar__row { margin-top: 8px; }
.filterbar .spacer { flex: 1; }
.periods { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--radius-sm); background: var(--surface-sunken); }
.periods button { border: 0; background: none; padding: 5px 10px; border-radius: 7px; font: 500 13px/18px var(--font-sans); color: var(--ink-muted); cursor: pointer; white-space: nowrap; }
.periods button:hover { color: var(--ink); }
.periods button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.daterange { display: inline-flex; gap: 6px; align-items: center; }
.daterange .mk-input { height: 32px; font-size: 13px; padding: 0 8px; }
.period-label { font: 500 13px/18px var(--font-sans); color: var(--ink-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

.ms { position: relative; }
.ms__btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); font: 500 13px/18px var(--font-sans); cursor: pointer; white-space: nowrap; }
.ms__btn:hover { border-color: var(--border-control); }
.ms__btn.is-on { border-color: var(--ink); }
.ms__btn .count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--on-accent); font-size: 11px; line-height: 18px; text-align: center; }
.ms__btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; }
.ms__pop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; width: 300px; max-width: calc(100vw - 32px); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-2); padding: 8px; }
.ms__pop .mk-input { width: 100%; height: 34px; font-size: 13px; margin-bottom: 6px; }
.ms__list { max-height: 300px; overflow: auto; display: flex; flex-direction: column; }
.ms__opt { display: flex; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 8px; cursor: pointer; font-size: 13px; line-height: 18px; }
.ms__opt:hover { background: var(--surface-sunken); }
.ms__opt input { width: 16px; height: 16px; accent-color: var(--graphite); flex: none; margin: 0; }
.ms__opt span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms__opt small { color: var(--ink-faint); font-size: 12px; }
.ms__foot { display: flex; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chips .mk-chip { cursor: default; }
.chips .mk-chip button { border: 0; background: none; padding: 0; margin-left: 2px; cursor: pointer; color: inherit; display: inline-flex; }
.chips .mk-chip b { font-weight: 500; color: var(--ink-muted); margin-right: 2px; }

/* ---------------------------------------------------------------- page head */
.page-head { display: flex; align-items: flex-end; gap: 16px; margin: 8px 0 20px; flex-wrap: wrap; }
.page-head__t { flex: 1 1 420px; min-width: 0; }
.page-head .mk-headline { margin: 0; }
.page-head__sub { margin: 6px 0 0; color: var(--ink-muted); font-size: 15px; line-height: 22px; max-width: 90ch; }
.page-head__sub b { color: var(--ink); font-weight: 600; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--ink-muted); text-decoration: none; font: 500 13px/18px var(--font-sans); }
.back:hover { color: var(--ink); }
.section-title { display: flex; align-items: baseline; gap: 12px; margin: 32px 0 12px; font: 600 18px/24px var(--font-sans); letter-spacing: -.01em; }
.section-title .spacer { flex: 1; }
.section-title small { font: 400 13px/18px var(--font-sans); color: var(--ink-muted); }

/* ---------------------------------------------------------------- KPI */
.mk-stats { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); margin-bottom: 16px; }
.mk-stat { position: relative; gap: 8px; }
.mk-stat__value { font-size: 30px; }
.mk-stat .spark { align-self: flex-end; margin: -2px 0 -6px; opacity: .9; }
.mk-stat--focus .spark .s-d3 { stroke: var(--on-accent); }
.mk-stat--focus .spark .dot-focus { fill: var(--surface); stroke: var(--on-accent); }
.mk-stat__meta .mk-delta { margin-right: 4px; }
.mk-delta--flat { color: var(--ink-muted); }
.mk-stat--focus .mk-delta--up, .mk-stat--focus .mk-delta--down { color: var(--on-accent); }

/* ---------------------------------------------------------------- cards and grids */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 20px; min-width: 0; }
.card + .card { margin-top: 16px; }
.card__head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card__head > div:first-child { flex: 1 1 260px; min-width: 0; }
.card__label { font: 500 12px/16px var(--font-sans); color: var(--ink-muted); }
.card__title { margin: 2px 0 0; font: 500 16px/22px var(--font-sans); letter-spacing: -.01em; }
.card__title .mk-mark { padding: 0 3px; }
.card__src { margin-top: 10px; font: 500 12px/16px var(--font-sans); color: var(--ink-muted); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.grid2 > .card + .card { margin-top: 0; }
.grid-main { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 16px; }
.grid-main > .card + .card { margin-top: 0; }
.chart { min-height: 120px; }
.mk-tabs.small .mk-tab { padding: 4px 10px; font-size: 13px; }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--radius-sm); background: var(--surface-sunken); flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 4px 10px; border-radius: 7px; font: 500 12.5px/18px var(--font-sans); color: var(--ink-muted); cursor: pointer; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.card__ctl { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* forecast */
.fc { display: flex; flex-direction: column; gap: 14px; }
.fc__big { font: 500 34px/1 var(--font-sans); letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.fc__rows { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-size: 13px; line-height: 20px; }
.fc__rows dt { color: var(--ink-muted); }
.fc__rows dd { margin: 0; text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; }
.fc__bar { position: relative; height: 10px; border-radius: 5px; background: var(--data-5); overflow: hidden; }
.fc__bar .done { position: absolute; inset: 0 auto 0 0; background: var(--data-1); }
.fc__bar .proj { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(135deg, var(--data-3) 0 3px, transparent 3px 6px); }
.fc__bar .prev { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--accent); box-shadow: 0 0 0 1px var(--data-focus-edge); }

/* ---------------------------------------------------------------- charts */
.mk-chart text { font-variant-numeric: tabular-nums; }
.mk-chart .hover-band { fill: transparent; cursor: default; }
.mk-chart .hover-band.on { fill: var(--ink); opacity: .04; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: 12px; line-height: 16px; color: var(--ink-muted); }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 10px; height: 10px; flex: none; }
.sw--focus { background: var(--data-focus); box-shadow: inset 0 0 0 1px var(--data-focus-edge); }
.sw--d1 { background: var(--data-1); } .sw--d2 { background: var(--data-2); } .sw--d3 { background: var(--data-3); }
.sw--d4 { background: var(--data-4); } .sw--d5 { background: var(--data-5); }
.chart-tip { position: fixed; z-index: 60; pointer-events: none; min-width: 160px; max-width: 320px; padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--graphite); color: var(--on-graphite); box-shadow: var(--shadow-2); font: 400 12px/18px var(--font-sans); font-variant-numeric: tabular-nums; }
.tip-head { font-weight: 600; margin-bottom: 4px; }
.tip-row { display: flex; align-items: center; gap: 8px; }
.tip-row span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .85; }
.tip-row b { font-weight: 600; }
.tip-total { border-top: 1px solid color-mix(in srgb, var(--on-graphite) 20%, transparent); margin-top: 4px; padding-top: 4px; }
.chart-tip .sw--d4, .chart-tip .sw--d3 { box-shadow: 0 0 0 1px color-mix(in srgb, var(--on-graphite) 30%, transparent); }

.hbars { display: flex; flex-direction: column; gap: 10px; }
.hbar { display: grid; grid-template-columns: minmax(90px, 38%) 1fr; gap: 12px; align-items: center; font-size: 13px; line-height: 18px; }
.hbar__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar__label a { text-decoration: none; }
.hbar__label a:hover { text-decoration: underline; text-underline-offset: 3px; }
.hbar__sub { display: block; color: var(--ink-faint); font-size: 12px; line-height: 16px; overflow: hidden; text-overflow: ellipsis; }
.hbar__track { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hbar__fill { height: 16px; background: var(--data-3); flex: none; max-width: calc(100% - 72px); }
.hbar.is-focus .hbar__fill { background: var(--data-focus); box-shadow: inset 0 0 0 1px var(--data-focus-edge); }
.hbar__val { font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }

.heat { display: grid; grid-template-columns: 28px repeat(24, minmax(0, 1fr)); gap: 2px; font-size: 11px; line-height: 14px; color: var(--ink-muted); }
.heat__h { text-align: left; font-variant-numeric: tabular-nums; }
.heat__d { align-self: center; }
.heat__c { aspect-ratio: 1; min-height: 12px; background: color-mix(in srgb, var(--data-1) var(--p), var(--data-5)); }
.heat__c.is-peak { background: var(--data-focus); box-shadow: inset 0 0 0 1px var(--data-focus-edge); }

/* ---------------------------------------------------------------- table */
.mk-tablewrap { margin-top: 0; }
.mk-table td { vertical-align: middle; }
.mk-table th.sortable { cursor: pointer; user-select: none; }
.mk-table th.sortable:hover, .mk-table th.sorted { color: var(--ink); }
.mk-table th .arrow { display: inline-block; width: 10px; margin-left: 2px; }
.mk-table tbody tr.clickable { cursor: pointer; }
.mk-table td .cell-main { font-weight: 500; color: var(--ink); text-decoration: none; }
.mk-table td a.cell-main:hover { text-decoration: underline; text-underline-offset: 3px; }
.cell-sub { display: block; color: var(--ink-muted); font-size: 12px; line-height: 16px; font-weight: 400; }
.mk-table .num .cell-sub { text-align: right; }
.share { display: block; height: 3px; margin-top: 4px; background: var(--data-5); }
.share i { display: block; height: 100%; background: var(--data-2); }
.mk-table tr.is-total td { font-weight: 600; background: var(--surface-sunken); }
.mk-table td.spark-cell { width: 110px; padding-top: 6px; padding-bottom: 6px; }
.mk-table td.err { color: var(--negative); max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
.table-foot { display: flex; justify-content: center; padding: 14px; }
.table-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.table-tools .spacer { flex: 1; }
.search-field { position: relative; display: flex; flex: 0 1 280px; }
.search-field svg { position: absolute; left: 10px; top: 9px; color: var(--ink-muted); pointer-events: none; }
.search-field .mk-input { width: 100%; height: 34px; padding-left: 32px; font-size: 13px; }
select.mk-input { height: 34px; font-size: 13px; padding-right: 30px; appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b6b66' stroke-width='1.8' stroke-linecap='round'><path d='m6 9 6 6 6-6'/></svg>");
  background-repeat: no-repeat; background-position: right 8px center; background-size: 14px; }
.mk-input:focus { outline: 2px solid var(--focus); outline-offset: 1px; border-color: var(--ink); }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--positive); margin-right: 6px; vertical-align: 1px; }
.status-dot.is-fail { background: var(--negative); }
.mk-tag { white-space: nowrap; }
.mk-tag--sm { font-size: 11px; line-height: 16px; padding: 0 6px; }

/* budgets */
.budget { position: relative; height: 8px; min-width: 120px; background: var(--data-5); margin: 6px 0 4px; }
.budget__fill { position: absolute; inset: 0 auto 0 0; background: var(--data-1); }
.budget__fc { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(135deg, var(--data-3) 0 3px, transparent 3px 6px); }
.budget.is-over .budget__fc { background: repeating-linear-gradient(135deg, var(--negative) 0 3px, transparent 3px 6px); }
.limit-meter { font-variant-numeric: tabular-nums; }
.limit-meter.is-hot { color: var(--negative); font-weight: 600; }

/* ---------------------------------------------------------------- drawer (request detail) */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 45; width: min(560px, 100vw); background: var(--surface); border-left: 1px solid var(--line);
  box-shadow: var(--shadow-2); overflow-y: auto; padding: 20px 24px 40px; animation: slidein .18s ease-out; }
.drawer-scrim { position: fixed; inset: 0; z-index: 44; background: rgba(21,21,20,.28); }
@keyframes slidein { from { transform: translateX(24px); opacity: 0; } }
.drawer__head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; }
.drawer__head > div { flex: 1; min-width: 0; }
.drawer__head h2 { margin: 4px 0 0; font: 600 18px/24px var(--font-sans); letter-spacing: -.01em; }
.drawer .mk-stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
.drawer .mk-stat { padding: 12px 14px; }
.drawer .mk-stat__value { font-size: 20px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 16px; font-size: 13px; line-height: 20px; }
.kv dt { color: var(--ink-muted); }
.kv dd { margin: 0; word-break: break-word; }
.timing { position: relative; height: 22px; background: var(--surface-sunken); margin: 6px 0 16px; }
.timing .wait { position: absolute; top: 0; bottom: 0; left: 0; background: var(--data-4); }
.timing .gen { position: absolute; top: 0; bottom: 0; background: var(--data-focus); box-shadow: inset 0 0 0 1px var(--data-focus-edge); }
pre.json { margin: 0; padding: 12px 14px; background: var(--code-bg); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: auto; max-height: 420px;
  font: 400 12px/18px var(--font-mono); white-space: pre; }
.err-box { padding: 12px 14px; background: var(--negative-tint); border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 13px; line-height: 20px; word-break: break-word; }
.err-box b { color: var(--negative); }

/* ---------------------------------------------------------------- notices, empty */
.note { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius-md); margin-bottom: 16px; font-size: 14px; line-height: 22px; }
.note--negative { background: var(--negative-tint); color: var(--ink); }
.note--negative b { color: var(--negative); }
.note--accent { background: var(--accent-tint); color: var(--ink); }
.empty { padding: 40px 24px; text-align: center; color: var(--ink-muted); }
.skeleton { min-height: 160px; border-radius: var(--radius-sm); background: linear-gradient(90deg, var(--surface-sunken), var(--line), var(--surface-sunken)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; opacity: .6; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------------------------------------------------------------- login */
.login { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; padding: 24px 16px; }
.login-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-2); padding: 32px; display: flex; flex-direction: column; gap: 24px; }
.login-brand { display: flex; align-items: center; gap: 10px; font: 600 16px/1 var(--font-sans); letter-spacing: -.02em; }
.login-brand .mk-logo-tile svg { width: 20px; height: 20px; }
.login-card form { display: flex; flex-direction: column; gap: 14px; }
.login-card .mk-input { height: 52px; border-radius: 12px; font-size: 16px; }
.byline { display: flex; align-items: center; gap: 8px; color: var(--ink-muted); font: 500 12px/16px var(--font-sans); }
.byline svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: square; stroke-linejoin: miter; }
.login-error { color: var(--negative); font-size: 13px; line-height: 18px; min-height: 18px; margin: -6px 0 0; }
.hint { color: var(--ink-muted); font-size: 14px; line-height: 22px; }

/* ---------------------------------------------------------------- toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 70; max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: var(--radius-md);
  background: var(--graphite); color: var(--on-graphite); box-shadow: var(--shadow-2); font: 500 14px/20px var(--font-sans); animation: rise .18s ease-out; }
.toast--negative { background: var(--negative); color: #fff; }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 8px); } }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1100px) {
  #app { padding: 20px 24px 56px; }
  .filterbar { padding: 10px 24px; }
  .grid-main { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .grid2 { grid-template-columns: 1fr; }
  .hide-md { display: none; }
}
@media (max-width: 720px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 280px; height: auto; transform: translateX(-100%); transition: transform .2s ease-out; box-shadow: var(--shadow-2); z-index: 40; }
  body.show-nav .side { transform: none; }
  body.show-nav .side-scrim { display: block; position: fixed; inset: 0; z-index: 30; background: rgba(21,21,20,.38); }
  .mobile-bar:not([hidden]) { display: flex; position: sticky; top: 0; z-index: 15; align-items: center; gap: 4px; padding: 8px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
  .mobile-bar .brand { padding: 0 0 0 8px; }
  .filterbar { position: static; padding: 10px 16px; }
  .periods { overflow-x: auto; max-width: 100%; }
  #app { padding: 16px 16px 48px; }
  .login-card { padding: 24px; }
  .mk-headline--sm { --mk-h: 24px; }
  .hide-sm { display: none; }
  .mk-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .mk-stat { padding: 14px; }
  .mk-stat__value { font-size: 22px; }
  .mk-stat .spark { display: none; }
  .card { padding: 16px; }
  .drawer .mk-stats { grid-template-columns: repeat(2, 1fr); }
  .heat { grid-template-columns: 22px repeat(24, minmax(0, 1fr)); gap: 1px; }
  .heat__c { min-height: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .toast, .drawer, .skeleton { animation: none; }
  .side { transition: none; }
}

/* first column keeps names on one line where possible */
.mk-table td:first-child { min-width: 170px; }
.mk-table td:first-child .cell-main { white-space: nowrap; }
