/* ═══════════════════════════════════════════════════════════════════════════════════════════════════════════
   RMH design system - "Control Room"  (2026-10-05, docs/design/)
   Loaded by every board AFTER its own CSS. Every rule is scoped under html.ds, which a tiny inline script in each
   board's head sets - unless someone switched to the previous look (localStorage rmh-ds=off) - so removing the
   class restores the old look exactly. Rules that HIDE a board's own controls are scoped under html.ds.ds-js:
   they only apply once rmh-ds.js has built the menus that replace those controls, so a script failure can never
   leave anyone without a sign-out button.

   Principles
   1. Gold is the brand and the main action - never a status.
   2. Status has its own colour AND words; colour is never the only signal.
   3. Mono type is for IDs, dates and numbers only.
   4. One top bar: page, search, + New, you.
   5. Nothing under 12 px; nothing to tap under 28 px in dense rows (WCAG 2.2 floor: 24 px).
   6. Light and dark share every token name; both are checked for contrast.

   Breakpoints: phone < 600 px, tablet 600-899 px (menu becomes a drawer below 900), desktop >= 900 px.
   ═══════════════════════════════════════════════════════════════════════════════════════════════════════════ */

/* ── tokens ─────────────────────────────────────────────────────────────────────────────────────────────── */
html.ds[data-theme="light"], html.ds:not([data-theme]) {
  --bg:#eef0f3; --bg2:#ffffff; --bg3:#f2f4f7; --card:#ffffff; --card-b:#dde1e7; --border:#d6dbe2; --grid:#f2f4f7;
  --text:#111418; --text2:#3d4451; --text3:#5b6473; --slate:#4c5563;
  --gold:#f5b133; --gold-d:#d99a22; --orange:#935400; --orange-d:#7a4500; --orange-soft:rgba(245,177,51,.2);
  --blue:#1f5fbf; --green:#0f6b44; --teal:#0f6b44; --red:#b3261e; --rust:#b3261e; --amber:#9a5000; --violet:#6a46c4;   /* each >= 4.5:1 on its own 14% tint */
  --focus:#1f5fbf; --badge-red:#b3261e; --ink-on-gold:#1a1204; --ds-menu-shadow:0 14px 36px rgba(17,20,24,.16);
  --shadow-sm:0 1px 0 rgba(17,20,24,.04); --shadow:0 8px 24px rgba(17,20,24,.08); --shadow-lg:0 20px 50px rgba(17,20,24,.14);
}
html.ds[data-theme="dark"] {
  --bg:#0c0e11; --bg2:#111419; --bg3:#191d24; --card:#13171c; --card-b:#252a33; --border:#272c35; --grid:#191d24;
  --text:#eef1f5; --text2:#b7bec9; --text3:#959eac; --slate:#9aa3b2;
  --gold:#f5b133; --gold-d:#d99a22; --orange:#f5b133; --orange-d:#d99a22; --orange-soft:rgba(245,177,51,.13);
  --blue:#7ab4ff; --green:#3ddc97; --teal:#3ddc97; --red:#ff6b61; --rust:#ff6b61; --amber:#ffa24a; --violet:#b69cff;
  --focus:#7ab4ff; --badge-red:#c0362c; --ink-on-gold:#1a1204; --ds-menu-shadow:0 16px 40px rgba(0,0,0,.45);
  --shadow-sm:0 1px 0 rgba(0,0,0,.25); --shadow:0 10px 30px rgba(0,0,0,.45); --shadow-lg:0 24px 60px rgba(0,0,0,.6);
}
html.ds { --radius:10px; --radius-sm:7px; --topbar-h:52px; --sidebar-w:232px; }
html.ds body { font-size:14px; }
html.ds :focus-visible { outline:2px solid var(--focus) !important; outline-offset:2px; }
html.ds ::selection { background:#2f6fdb; color:#fff; }

/* ── top bar: page, search, + New, you ─────────────────────────────────────────────────────────────────── */
html.ds .topbar { height:var(--topbar-h); min-height:var(--topbar-h); background:var(--bg2); box-shadow:none; gap:12px; padding:0 16px; }
html.ds .topbar-title { font-family:var(--display); font-size:16px; letter-spacing:-.01em; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
html.ds .topbar-right { flex:none; gap:8px; }   /* a long title shortens; the actions never push the page wider than the screen */
html.ds .topbar-sub { color:var(--text3); font-size:13px; }
/* links to other boards (Intelligence, Editor board) are navigation, not account: they stay on desktop, quieter */
html.ds .topbar-right a.switch-board, html.ds .topbar-right a#ed-board-link { background:none; border-color:transparent; color:var(--text2); font-weight:600; }
html.ds .topbar-right a.switch-board:hover, html.ds .topbar-right a#ed-board-link:hover { color:var(--text); border-color:var(--border); }
html.ds.ds-js #rtw-bar-wrap, html.ds.ds-js #api-pill, html.ds.ds-js .topbar-user, html.ds.ds-js #theme-btn, html.ds.ds-js .topbar-right button[onclick*="toggleTheme"],
html.ds.ds-js .topbar-right button[onclick*="openHelp"], html.ds.ds-js .topbar-right .logout-btn { display:none !important; }
html.ds .ds-trigger { display:inline-flex; align-items:center; gap:6px; height:34px; padding:0 12px; border-radius:8px; border:1px solid var(--border);
  background:var(--bg3); color:var(--text); font:600 13px var(--font); cursor:pointer; white-space:nowrap; }
html.ds .ds-trigger:hover { border-color:var(--text3); }
html.ds #ds-new { background:var(--gold); color:var(--ink-on-gold); border-color:transparent; }
html.ds #ds-new:hover { background:#ffc24d; }
html.ds #ds-new.ds-phone-only { display:none; }
/* split: "+ Task" | ▾ read as one gold control */
html.ds #ds-new:not(.ds-phone-only) { border-top-right-radius:0; border-bottom-right-radius:0; }
html.ds #ds-new-more { background:var(--gold); color:var(--ink-on-gold); border-color:transparent; border-left:1px solid rgba(26,18,4,.25);
  border-top-left-radius:0; border-bottom-left-radius:0; padding:0 8px; margin-left:-8px; }
html.ds #ds-new-more:hover { background:#ffc24d; }
html.ds #ds-acct { width:34px; padding:0; justify-content:center; border-radius:50%; }
html.ds .ds-av { font:700 13px var(--display); }
html.ds #ds-acct .ds-dot { position:absolute; width:9px; height:9px; border-radius:50%; margin:22px 0 0 22px; border:2px solid var(--bg2); }
html.ds #ds-acct { position:relative; }
html.ds #ds-acct .ds-dot.bad { background:var(--red); }
.ds-menu { position:fixed; z-index:9600; min-width:230px; max-width:min(320px, calc(100vw - 16px)); background:var(--card); border:1px solid var(--card-b);
  border-radius:10px; box-shadow:var(--ds-menu-shadow); padding:6px; font-family:var(--font); }
.ds-menu-item { display:flex; width:100%; align-items:center; justify-content:space-between; gap:12px; padding:9px 10px; border:0; border-radius:7px;
  background:none; color:var(--text); font:500 13.5px var(--font); text-align:left; cursor:pointer; min-height:36px; }
.ds-menu-item:hover, .ds-menu-item:focus-visible { background:var(--bg3); }
.ds-menu-item.danger { color:var(--red); }
.ds-menu-item[aria-checked="true"]::after { content:"✓"; color:var(--text2); }
.ds-menu-item kbd { font:500 11.5px var(--mono); color:var(--text3); }
.ds-menu-head { padding:8px 10px 10px; font:700 14px var(--font); color:var(--text); display:flex; flex-direction:column; }
.ds-menu-head small { font:500 12px var(--font); color:var(--text3); margin-top:2px; }
.ds-menu-label { padding:8px 10px 2px; font:600 12px var(--font); color:var(--text3); }
.ds-menu-sep { height:1px; background:var(--border); margin:6px 4px; }

/* ── sidebar: sentence-case groups that fold, a quiet "you are here" ───────────────────────────────────── */
html.ds .side, html.ds .sidebar { background:var(--bg2); padding:12px 10px; }
html.ds .nav-group-label { font-family:var(--font) !important; font-size:12px !important; font-weight:600; letter-spacing:.01em !important;
  text-transform:none !important; color:var(--text3) !important; padding:12px 10px 4px !important; }
html.ds.ds-js .nav-group-label[data-ds-fold] { cursor:pointer; user-select:none; border-radius:6px; }
html.ds.ds-js .nav-group-label[data-ds-fold]:hover { color:var(--text2) !important; }
html.ds.ds-js .nav-group-label[data-ds-fold]::after { content:"▾"; float:right; font-size:11px; opacity:.6; }
html.ds.ds-js .nav-group-label[aria-expanded="false"]::after { content:"▸"; }
html.ds .nav-item { min-height:34px; padding:7px 10px !important; border-radius:8px !important; font-size:13.5px !important; color:var(--text2) !important; font-weight:500 !important; }
html.ds .nav-item:hover { background:var(--bg3) !important; color:var(--text) !important; }
html.ds .nav-item.on, html.ds .nav-item.active { background:var(--bg3) !important; color:var(--text) !important; font-weight:650 !important; box-shadow:inset 3px 0 0 var(--gold); }
html.ds .nav-item.on svg, html.ds .nav-item.active svg { color:var(--orange); }
html.ds .nav-subitem { font-size:13px !important; color:var(--text2) !important; min-height:30px; }
html.ds .nav-subitem.on { color:var(--text) !important; font-weight:600; }
html.ds .nav-item .n, html.ds .nav-badge { font:600 11.5px var(--mono) !important; background:var(--bg3) !important; color:var(--text2) !important; min-width:20px; text-align:center; }
html.ds .nav-item .n.red, html.ds .nav-item .red.n, html.ds .nav-badge { background:var(--badge-red) !important; color:#fff !important; }

/* ── type: one scale (12 / 13 / 14 / 16 / 22 / 28), mono only for data ───────────────────────────────── */
html.ds h1, html.ds .panel-header h1, html.ds .page-head h1, html.ds .page-head h2 { font-family:var(--display); font-size:22px !important; font-weight:700; letter-spacing:-.015em; }
html.ds .panel-header p, html.ds .page-head p, html.ds .page-head .sub { color:var(--text2); font-size:13.5px; }
html.ds .kpi-label, html.ds .kpi-l, html.ds .stat .sk, html.ds .badge, html.ds .tag, html.ds .flag, html.ds .kan-who, html.ds .gs-type, html.ds .api-pill {
  font-family:var(--font) !important; letter-spacing:0 !important; }
html.ds .kpi-label, html.ds .kpi-l, html.ds .stat .sk { font-size:12.5px !important; color:var(--text2) !important; text-transform:none !important; font-weight:600; }
html.ds .kpi-value, html.ds .kpi-v, html.ds .stat .sv, html.ds .concept-num, html.ds .kan-due, html.ds .att-count { font-family:var(--mono) !important; font-variant-numeric:tabular-nums; }
html.ds .kpi-foot, html.ds .kpi-s { font-size:12px !important; color:var(--text3) !important; }
html.ds .badge, html.ds .tag, html.ds .flag, html.ds .kan-due { font-size:12px !important; font-weight:600 !important; text-transform:none !important; padding:2px 8px !important; border-radius:6px !important; }
html.ds table.tbl th, html.ds .tbl th { font-family:var(--font) !important; text-transform:none !important; letter-spacing:0 !important; font-size:12px !important; font-weight:600; color:var(--text2); }
html.ds table.tbl td { padding-top:9px; padding-bottom:9px; }
/* The 12 px floor. Most small text is written inline by the boards' own JavaScript (style="font-size:11px"); no
   class reaches it, so it is raised here by attribute. Sizes of 12 px and up are untouched. */
html.ds [style*="font-size:9px"], html.ds [style*="font-size:9.5px"], html.ds [style*="font-size:10px"], html.ds [style*="font-size:10.5px"],
html.ds [style*="font-size:11px"], html.ds [style*="font-size:11.5px"], html.ds [style*="font-size: 10px"], html.ds [style*="font-size: 11px"] { font-size:12px !important; }
html.ds .note, html.ds .muted, html.ds .hint, html.ds small { font-size:max(12px, 1em); }
/* ...and the classes that set 8.5-11.5 px in the boards' own CSS - each only in its own context, because some of these
   names mean something else elsewhere (.n is a 23 px figure on the personal boards) */
html.ds .kan-card :is(.kan-batch, .kan-who, .kan-age, .kan-cmt, .kan-rwk, .kan-wait, .concept-num, .kan-iter),
html.ds .kan-col-head :is(.kan-grip, .kan-caret, .kan-wip), html.ds .kan-col-head,
html.ds .trow :is(.tmeta, .tmeta span, .rep, .over-txt, .act, .mini), html.ds .trow + .act,
html.ds :is(.ql-go, .bar-sfx, .stat-go, .note-inline, .chk-sec-t, .chk-ct, .nav-un),
html.ds .cs-chip.sm, html.ds .lg-btn, html.ds :is(.side-foot, .sidebar-footer), html.ds .nav-item .n, html.ds .nav-badge { font-size:12px !important; }
html.ds .kan-card .kan-batch { line-height:1.35; }

/* ── status: own colours + words (never gold) ───────────────────────────────────────────────────────────── */
html.ds .tag.mof { background:color-mix(in srgb, var(--amber) 15%, transparent) !important; color:var(--amber) !important; }
html.ds .tag.tof { background:color-mix(in srgb, var(--blue) 14%, transparent) !important; color:var(--blue) !important; }
html.ds .tag.bof { background:color-mix(in srgb, var(--green) 14%, transparent) !important; color:var(--green) !important; }
html.ds .kan-card.urg-red, html.ds .kan-card.rework { box-shadow:inset 3px 0 0 var(--red); border-left-color:var(--card-b) !important; }
html.ds .kan-card.urg-amber, html.ds .kan-card.iter { box-shadow:inset 3px 0 0 var(--amber); border-left-color:var(--card-b) !important; background:var(--card) !important; }
html.ds .kan-due.over { background:color-mix(in srgb, var(--red) 14%, transparent); color:var(--red); }
html.ds .badge.orange, html.ds .badge.b-auto { background:color-mix(in srgb, var(--amber) 14%, transparent) !important; color:var(--amber) !important; border-color:transparent !important; }

/* "selected / on" controls painted with --orange behind DARK text broke once light --orange became a readable amber
   text colour: they are gold + ink in both themes now (one rule for every board's chips, pickers and counters) */
html.ds :is(.dp-day.sel, .sel-opt.sel, .orgopen:hover, .cs-chip.on, .nav-un, .fchip.on, .trk-tab.on .trk-tab-n, .undo-toast .undo-btn, .sf-badge, .scale button.on,
  .rsd-btn.pri, .rok-btn.pri, .rsc-btn.pri, .rli-btn.pri, .rok-steps .on .rok-sn, .rok-steps .done .rok-sn) {   /* modules alias their accent to --orange */
  background:var(--gold) !important; color:var(--ink-on-gold) !important; border-color:var(--gold) !important; }
html.ds .att-count.amber { color:var(--amber) !important; }
/* calendar chips are buttons in the new look (rmh_ds.js), so 24 px tall (WCAG 2.5.8); a faded count in a segment fails contrast */
html.ds .cal-ev { min-height:24px; line-height:18px; box-sizing:border-box; }
html.ds .seg-btn .trk-tab-n { opacity:1 !important; }
/* graphics are the brand, not text: the logo and bar/dot fills keep honey gold in BOTH themes (light --orange is a text amber) */
html.ds .brand-mark polygon, html.ds .topbar-logo polygon, html.ds .login-logo polygon { fill:var(--gold) !important; }
html.ds [style*="background:var(--orange)"], html.ds :is(.mixbar i, .tb-mof, .ntf-dot, .nav-dot, .status-now .dot, .res-score.s4) { background:var(--gold) !important; }
html.ds .chk-ct { opacity:1 !important; }
html.ds[data-theme="light"] .act.go { color:#fff !important; }
html.ds .kan-who { background:var(--bg3) !important; color:var(--text2) !important; }   /* who has it is a person, not a status */
/* colours hard-coded for the light theme only (#c23b32, #b8460f, #8a5a00) failed on dark: on the status tokens now */
html.ds .out-bq.warn { color:var(--red) !important; background:color-mix(in srgb, var(--red) 12%, transparent) !important; }
html.ds .out-pmore { color:var(--orange) !important; }
html.ds .age { color:var(--orange) !important; border-color:color-mix(in srgb, var(--orange) 40%, transparent) !important; }
html.ds .out-stk-due.soon { color:var(--amber) !important; }
/* stuck-work flow: more stuck (up) is bad, fewer (down) is good - same meanings, readable in both themes */
html.ds .out-fl .up, html.ds .out-flw i.up, html.ds .out-sc.bad .out-cb { color:var(--red) !important; }
html.ds .out-fl .dn { color:var(--green) !important; }
/* the rest of the Output report's light-only hexes, by meaning: late/red, attention/amber, good/green */
html.ds :is(.out-cb, .out-stk-due.over, .out-fln.up, .out-spark.dn) { color:var(--red) !important; }
html.ds :is(.out-attc, .out-stk-d, .out-stuck-d, .out-warn, .out-fg.age) { color:var(--amber) !important; }
html.ds :is(.out-fln.dn, .out-spark.up) { color:var(--green) !important; }
html.ds .out-d.down { color:var(--amber) !important; background:color-mix(in srgb, var(--amber) 13%, transparent) !important; }
html.ds .out-d.up { color:var(--green) !important; background:color-mix(in srgb, var(--green) 13%, transparent) !important; }
html.ds .out-fg.age { border-color:color-mix(in srgb, var(--amber) 40%, transparent) !important; }
html.ds .out-sc .out-fg { color:var(--amber) !important; border-color:color-mix(in srgb, var(--amber) 45%, transparent) !important; }
html.ds .out-fg { font-size:12px !important; }
html.ds a.lnk-chip, html.ds .note a { color:var(--orange) !important; }   /* #b46f00 on a gold tint was 2.9:1; note links were too dim in dark */
html.ds .lnk-chip .lc-txt { color:inherit !important; }
html.ds[data-theme="light"] :is(.seg-green .seg-btn.on, .rsc-seg button.on, .rtw-a.go, .cast-seg .cs-opt.cs-ok.active) { color:#fff !important; }   /* near-black on the (now darker) light green. NOT .cal-ev.call: the Engine's is a pale tint (personal.html fixes its own) */
html.ds .lg-live { color:var(--green) !important; background:color-mix(in srgb, var(--green) 12%, transparent) !important; border-color:color-mix(in srgb, var(--green) 30%, transparent) !important; }
html.ds .lg-paused { color:var(--amber) !important; background:color-mix(in srgb, var(--amber) 14%, transparent) !important; border-color:color-mix(in srgb, var(--amber) 32%, transparent) !important; }
/* the Output report's own small labels (11-11.5 px) */
html.ds :is(.out-cn, .out-cf, .out-pmore, .out-stk-w, .out-stk-d, .out-stk-n, .out-stk-m, .out-stk-due), html.ds .out-cr .s, html.ds .out-cr b, html.ds .out-cr i { font-size:12px !important; }
html.ds :is(a.out-ct, .out-cr a.l, .out-more) { min-height:24px; display:inline-flex; align-items:center; }
html.ds .acc-caret-btn { min-width:24px; min-height:24px; display:inline-flex; align-items:center; justify-content:center; }
html.ds .seg-r b { color:var(--bg2) !important; }   /* label on the blue refunds segment */
html.ds .feed-post .cat { font-family:var(--font) !important; font-size:12px !important; text-transform:none !important; color:var(--orange) !important; }   /* gold-d on gold tint was 3.0:1 */
html.ds .kan-card .kan-meta, html.ds .kan-card .kan-meta span, html.ds .kan-bgrp-h span { font-size:12px !important; }
html.ds :is(.tag.pending, .badge.pending), html.ds .badge.submitted { color:var(--violet) !important; background:color-mix(in srgb, var(--violet) 12%, transparent) !important; border-color:color-mix(in srgb, var(--violet) 32%, transparent) !important; }

/* targets: nothing tappable under 24 px (WCAG 2.2 2.5.8) - these were 13-23 px tall */
html.ds .trow .tlink, html.ds .nav-subitem [role="button"], html.ds .lg, html.ds .cs-chip.sm { min-height:24px; display:inline-flex; align-items:center; }
html.ds .trow .tlink { display:flex; }
html.ds .pod-edit, html.ds .chk-del { min-width:24px; min-height:24px; display:inline-flex; align-items:center; justify-content:center; }

/* ── surfaces ──────────────────────────────────────────────────────────────────────────────────────────── */
html.ds .panel, html.ds .section-card, html.ds .kpi-card, html.ds .kpi, html.ds .stat, html.ds .tile, html.ds .att-card { border-radius:var(--radius) !important; box-shadow:none !important; }
html.ds .kan-col { background:var(--bg2); border-radius:var(--radius); }
html.ds .kan-card { border-radius:8px; padding:12px 13px; }
html.ds .kan-card:hover { border-color:var(--text3); }
html.ds .btn { min-height:34px; padding:0 14px; border-radius:8px; font-size:13px; display:inline-flex; align-items:center; justify-content:center; gap:6px; }
html.ds .btn.sm, html.ds .act { min-height:28px; }
html.ds .btn.primary { background:var(--gold); color:var(--ink-on-gold); }
html.ds .modal-overlay, html.ds .ov { background:rgba(5,6,8,.6) !important; backdrop-filter:none !important; }
html.ds .modal, html.ds .modal-box { border-radius:12px !important; }
/* B's stat strip: a row of figures reads as one instrument, not four boxes */
html.ds .card-grid:has(> .kpi-card), html.ds .kpis, html.ds .stat-grid { gap:0 !important; background:var(--card); border:1px solid var(--card-b); border-radius:var(--radius); overflow:hidden; }
html.ds .card-grid:has(> .kpi-card) > *, html.ds .kpis > *, html.ds .stat-grid > * { border:0 !important; border-right:1px solid var(--border) !important;
  border-radius:0 !important; background:transparent !important; box-shadow:none !important; }
html.ds .card-grid:has(> .kpi-card) > *:last-child, html.ds .kpis > *:last-child, html.ds .stat-grid > *:last-child { border-right:0 !important; }
html.ds .card-grid > .kpi-card.on, html.ds .card-grid > .kpi-card.active, html.ds .card-grid > .kpi-card.sel { box-shadow:inset 0 -3px 0 var(--gold) !important; }

/* ── states ─────────────────────────────────────────────────────────────────────────────────────────────── */
html.ds .state-block { border-radius:var(--radius); font-size:13.5px; color:var(--text2); }
/* a board's content area before its first render was blank - say it is loading (U-16) */
html.ds #main:empty::before { content:"Loading…"; display:block; padding:32px 4px; color:var(--text3); font-size:13.5px; }
/* "the Engine was updated": bottom-right, out of the way of the top bar (U-15) */
html.ds #rmh-ver { top:auto !important; bottom:16px !important; left:auto !important; right:16px !important; transform:none !important; }

/* "Skip to content": invisible until it has keyboard focus */
html.ds #ds-skip { position:fixed; z-index:9700; left:12px; top:-60px; padding:10px 14px; border-radius:8px; background:var(--gold); color:var(--ink-on-gold);
  font:700 14px var(--font); text-decoration:none; box-shadow:var(--ds-menu-shadow); }
html.ds #ds-skip:focus { top:10px; }
/* containers that take focus programmatically (skip-link target, personal.html's dialog card): no ring around the whole
   area. :is(#main,...) carries #main's weight, so this beats the !important :focus-visible ring above */
html.ds :is(#main, main, .content, .rep-card):is(:focus, :focus-visible) { outline:none !important; }

/* "you were sent here" (U-17) */
html.ds #ds-note { position:fixed; z-index:9500; top:calc(var(--topbar-h) + 10px); left:50%; transform:translateX(-50%); width:max-content; max-width:min(560px, calc(100vw - 24px));
  display:flex; gap:12px; align-items:flex-start; padding:10px 12px 10px 14px; border-radius:10px; font:500 13.5px/1.45 var(--font); color:var(--text);
  background:color-mix(in srgb, var(--blue) 12%, var(--card)); border:1px solid color-mix(in srgb, var(--blue) 40%, transparent); box-shadow:var(--ds-menu-shadow); }
html.ds #ds-note button { flex:none; width:28px; height:28px; border:0; border-radius:6px; background:none; color:var(--text2); font-size:18px; cursor:pointer; }
html.ds #ds-note button:hover { background:var(--bg3); }

/* ── narrow screens: the menu becomes a drawer; phones get B's bottom bar ─────────────────────────────── */
html.ds #ds-navbtn, html.ds #ds-bottom, html.ds #ds-scrim { display:none; }
html.ds .ds-burger, html.ds .ds-burger::before, html.ds .ds-burger::after { display:block; width:16px; height:2px; background:currentColor; border-radius:2px; position:relative; }
html.ds .ds-burger::before, html.ds .ds-burger::after { content:""; position:absolute; left:0; }
html.ds .ds-burger::before { top:-5px; } html.ds .ds-burger::after { top:5px; }
@media (max-width: 899px) {
  html.ds.ds-js #ds-navbtn { display:inline-flex; width:36px; padding:0; justify-content:center; }
  html.ds.ds-js .side, html.ds.ds-js .sidebar { display:flex !important; flex-direction:column; position:fixed !important; z-index:900; top:var(--topbar-h); bottom:0; left:0;
    width:280px !important; min-width:0 !important; max-width:85vw; transform:translateX(-102%); transition:transform .18s ease; box-shadow:0 20px 50px rgba(0,0,0,.35); overflow-y:auto; }
  html.ds.ds-js.ds-nav-open .side, html.ds.ds-js.ds-nav-open .sidebar { transform:none; }
  html.ds.ds-js.ds-nav-open #ds-scrim { display:block; position:fixed; inset:var(--topbar-h) 0 0 0; background:rgba(0,0,0,.45); z-index:899; }
  html.ds.ds-js .sidebar .nav-item span, html.ds.ds-js .sidebar .nav-group-label { display:revert !important; }
  html.ds .topbar-sub, html.ds .topbar-search, html.ds .cs-search { display:none !important; }
  html.ds.ds-js .topbar-right a.switch-board, html.ds.ds-js .topbar-right a#ed-board-link { display:none !important; }   /* in the account menu instead */
  html.ds .topbar { padding:0 10px; gap:8px; }
  html.ds .topbar-right { gap:6px; }
}
@media (max-width: 599px) {
  html.ds.ds-js #ds-bottom { display:flex; position:fixed; left:0; right:0; bottom:0; height:62px; z-index:880; background:var(--bg2); border-top:1px solid var(--border);
    padding-bottom:env(safe-area-inset-bottom); }
  html.ds.ds-js #ds-bottom button { flex:1; border:0; background:none; color:var(--text2); font:500 12px var(--font); display:flex; flex-direction:column; align-items:center;
    justify-content:center; gap:3px; min-height:48px; position:relative; cursor:pointer; }
  html.ds.ds-js #ds-bottom button.on { color:var(--text); font-weight:650; box-shadow:inset 0 3px 0 var(--gold); }
  html.ds.ds-js #ds-bottom svg { width:20px; height:20px; }
  html.ds.ds-js #ds-bottom .ico { font-size:18px; line-height:1; }
  html.ds.ds-js #ds-bottom .n { position:absolute; top:5px; left:calc(50% + 6px); background:var(--badge-red); color:#fff; font:600 11px var(--mono); border-radius:8px; padding:0 5px; }
  html.ds.ds-js body { padding-bottom:62px; }
  html.ds.ds-js #rmh-ver { bottom:76px !important; }
  html.ds #ds-new .ds-new-word { display:none; }
  html.ds #ds-new-more { display:none !important; }
  html.ds #ds-new { border-radius:8px !important; }
  html.ds.ds-js #ds-new.ds-phone-only { display:inline-flex; }
  html.ds.ds-js .topbar-right .tbtn { display:none !important; }
  html.ds .main, html.ds #main, html.ds .content, html.ds main { padding-left:14px !important; padding-right:14px !important; overflow-x:clip; }   /* sub-pixel panel rounding must not widen the phone page */
  /* lists that put a long title and a chip side by side: stack them, so a title is not one word per line */
  html.ds .row-item, html.ds .trow { flex-wrap:wrap; }
  html.ds .row-item > .row-main { flex:1 1 100%; }
  html.ds .kan-due { white-space:normal !important; }   /* 'Final cut due: overdue 14d - 21 Sept, 17:00 CET' wraps instead of widening the page */
  html.ds .card-grid:has(> .kpi-card), html.ds .kpis, html.ds .stat-grid { display:grid !important; grid-template-columns:1fr 1fr !important; }
  html.ds .card-grid:has(> .kpi-card) > *, html.ds .kpis > *, html.ds .stat-grid > * { border-bottom:1px solid var(--border) !important; }
}
@media (prefers-reduced-motion: reduce) { html.ds .side, html.ds .sidebar { transition:none !important; } }
