/* Yodel layouts (Kai, 4 Dec 2026): the brand, the three navigation layouts (html[data-layout] = sidebar | topnav |
   rail; public/app.js draws them from public/nav-model.mjs), the top bar's chip and user menu, the phone drawer, the sign-in
   card (no scene: one card on the theme's background), and the per-theme shapes: pills on Ultraviolet, dense tables on
   Daylight, frosted glass, blobs and glows on the two HD themes while html[data-hd="on"]. Loaded after style.css (the
   Funnels base: tokens, cards, tables, dialogs) and overrides its sidebar-footer assumptions. Theme tokens and color-mix()
   only (scripts/check-colours.mjs). */

/* ---------- brand ---------- */
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--t1); min-width: 0; }
.brand-badge { width: 28px; height: 28px; border-radius: 8px; background: color-mix(in srgb, var(--accent) 14%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); color: var(--accent); display: inline-grid; place-items: center; flex-shrink: 0; }
.brand-badge .yd-mark { width: 18px; height: 18px; display: block; }
.au-brand .brand-badge .yd-mark { width: 22px; height: 22px; }
.brand-t { font-family: var(--font-head); font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-t em { font-style: normal; color: var(--accl); font-weight: 600; }
.sb-ver { font-family: var(--mono); font-size: 10px; color: var(--t3); padding: 0 4px; }

/* ---------- which containers show: one per layout; the sidebar doubles as the phone drawer for all three ---------- */
.tn, .rail, .rail-col { display: none; }
html[data-layout="topnav"] .tn { display: flex; }
html[data-layout="rail"] .rail { display: flex; }
html[data-layout="rail"] .rail-col:not([hidden]) { display: flex; }
@media (min-width: 761px) {
  html[data-layout="topnav"] .sb, html[data-layout="rail"] .sb { display: none; }
}
@media (max-width: 760px) {
  .tn, .rail, .rail-col { display: none !important; }
  html .sb { display: flex; }
}

/* ---------- layout 1: the sidebar, grouped and collapsible (style.css .sb / .sbi draw the rows) ---------- */
.sb { width: 212px; }
.sb-logo { gap: 9px; }
.sb-grp { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.sb-grp:first-child { margin-top: 0; }
.sb-grp-h { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 9px 4px; border: 0; background: none; color: var(--t3); font: inherit; font-family: var(--mono); font-size: 9.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; border-radius: 7px; text-align: left; }
.sb-grp-h:hover { color: var(--t2); }
.sb-grp-h:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.sb-grp-h .sb-grp-chev { margin-left: auto; font-size: 13px; transition: transform .25s ease; }
.sb-grp.closed .sb-grp-chev { transform: rotate(-90deg); }
.sb-grp.closed .sb-grp-b { display: none; }
.sb-grp-b { display: flex; flex-direction: column; gap: 2px; }
.sbi { text-decoration: none; }
.sb-foot { display: flex; align-items: center; justify-content: center; min-height: 32px; }
/* mini mode: icons only, the group headings become thin rules, titles carry the labels */
@media (min-width: 761px) {
  .sb.mini { width: 64px; }
  .sb.mini .brand-t, .sb.mini .sb-ver { display: none; }
  .sb.mini .sb-grp-h { height: 1px; padding: 0; margin: 8px 10px 6px; background: var(--bd); color: transparent; overflow: hidden; pointer-events: none; }
  .sb.mini .sb-grp-h .sb-grp-chev, .sb.mini .sb-grp-h span { display: none; }
  .sb.mini .sb-grp.closed .sb-grp-b { display: flex; }
  .sb.mini .sbi { justify-content: center; }
  .sb.mini .sbi i { font-size: 18px; }
}

/* ---------- layout 2: the top bar with a drop-down per group ---------- */
.tn { align-items: center; gap: 14px; height: 50px; padding: 0 18px; border-bottom: 1px solid var(--bd); background: var(--sidebar, var(--s1)); flex-shrink: 0; }
.tn .brand { margin-right: 10px; }
.tn-groups { display: flex; align-items: center; gap: 4px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.tn-groups::-webkit-scrollbar { display: none; }
.tn-g { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border: 1px solid transparent; border-radius: 8px; background: none; color: var(--t2); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.tn-g i { font-size: 16px; color: var(--t3); }
.tn-g .tn-chev { font-size: 12px; margin-left: -2px; }
.tn-g:hover, .tn-g[aria-expanded="true"] { color: var(--t1); background: color-mix(in srgb, var(--fg) 5%, transparent); }
.tn-g.on { color: var(--t1); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.tn-g.on i { color: var(--accl); }
.tn-g:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
/* the panel: in #fd-float, placed under its group button by public/overlay.js */
.tn-dd { position: fixed; z-index: 950; min-width: 220px; padding: 6px; background: var(--s2); border: 1px solid var(--bd3); border-radius: var(--radius); box-shadow: 0 12px 34px color-mix(in srgb, var(--shadow-ink) 45%, transparent); display: flex; flex-direction: column; gap: 2px; }
.tn-dd[hidden] { display: none; }
.tn-dd .sbi { border-radius: calc(var(--radius) - 3px); padding: 8px 10px; }
.tn-dd .sbi small { display: block; font-size: 10.5px; color: var(--t3); font-weight: 400; margin-top: 1px; white-space: normal; }
.tn-dd .sbi .sbi-t { display: flex; flex-direction: column; }

/* ---------- layout 3: the icon rail and its second column ---------- */
.rail { width: 60px; flex-direction: column; align-items: center; gap: 6px; padding: 12px 0; background: var(--sidebar, var(--s1)); border-right: 1px solid var(--bd); flex-shrink: 0; }
.rail .brand { margin-bottom: 10px; }
.rail-body { display: flex; flex-direction: column; gap: 6px; width: 100%; align-items: center; }
.rail-g { width: 42px; height: 42px; display: inline-grid; place-items: center; border: 1px solid transparent; border-radius: 10px; background: none; color: var(--t2); font-size: 20px; cursor: pointer; position: relative; }
.rail-g:hover, .rail-g[aria-expanded="true"] { color: var(--t1); background: color-mix(in srgb, var(--fg) 6%, transparent); }
.rail-g.on { color: var(--accl); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.rail-g:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.rail-g .rail-lbl { position: absolute; font-size: 8.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; bottom: -1px; left: 0; right: 0; text-align: center; color: inherit; opacity: .8; font-family: var(--mono); }
.rail-g i { margin-top: -8px; }
.rail-col { width: 200px; flex-direction: column; background: var(--s1); border-right: 1px solid var(--bd); flex-shrink: 0; padding: 12px 8px; gap: 2px; }
.rail-col-h { display: flex; align-items: center; justify-content: space-between; padding: 4px 9px 8px; font-family: var(--font-head); font-weight: 700; font-size: 13px; color: var(--t1); }
.rail-col-h button { background: none; border: 0; color: var(--t3); cursor: pointer; font-size: 15px; padding: 2px; border-radius: 5px; }
.rail-col-h button:hover { color: var(--t1); }
.rail-col .sbi small { display: block; font-size: 10.5px; color: var(--t3); font-weight: 400; white-space: normal; }
.rail-col .sbi .sbi-t { display: flex; flex-direction: column; }

/* ---------- the top bar: hamburger, title, the UTC chip, the bell and the account menu ---------- */
.feed-chips { display: flex; align-items: center; gap: 3px; padding: 2px; border: 1px solid var(--bd2); border-radius: 999px; background: var(--s2); max-width: 46vw; overflow-x: auto; scrollbar-width: none; }
.feed-chips::-webkit-scrollbar { display: none; }
.feed-chips:empty { display: none; }
.feed-chip { height: 24px; padding: 0 10px; border: 0; border-radius: 999px; background: none; color: var(--t2); font: inherit; font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: .03em; cursor: pointer; white-space: nowrap; }
.feed-chip:hover { color: var(--t1); }
.feed-chip[aria-pressed="true"] { background: var(--accent-fill); color: var(--accent-fg); }
.feed-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.topbar { height: 52px; }
.topbar-r { gap: 10px; }
.tz-chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border: 1px solid var(--bd2); border-radius: 999px; background: var(--s2); font-family: var(--mono); font-size: 10.5px; color: var(--t2); white-space: nowrap; cursor: help; }
.tz-chip i { color: var(--amb); font-size: 13px; }
.tz-chip b { color: var(--t1); font-weight: 700; }
.tz-chip-s { display: none; }
.drp-wrap[hidden] { display: none; }
.topbar .sb-me { flex: none; gap: 8px; padding: 3px 6px 3px 3px; border: 1px solid transparent; border-radius: 999px; }
.topbar .sb-me:hover, .topbar .sb-me[aria-expanded="true"] { border-color: var(--bd2); background: var(--s2); }
.topbar .sb-me:hover .sb-un { color: var(--t1); }
.topbar .sb-me-t { max-width: 160px; }
.topbar .sb-un { font-size: 12px; max-width: none; }
.sb-me-caret { font-size: 12px; color: var(--t3); }
.sb-menu { min-width: 200px; }
.sb-menu .sb-menu-who { padding: 6px 9px 8px; border-bottom: 1px solid var(--bd); margin-bottom: 4px; display: flex; flex-direction: column; gap: 1px; }
.sb-menu .sb-menu-who b { font-size: 12px; color: var(--t1); overflow: hidden; text-overflow: ellipsis; }
.sb-menu .sb-menu-who small { font-size: 10.5px; color: var(--t3); font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; }
.sb-menu button.danger { color: var(--red); }
.hamb[aria-expanded="true"] { border-color: var(--acc); color: var(--accl); }

/* ---------- phones (under 760 px): every layout is the drawer behind the hamburger; cards stack, tables scroll sideways ---------- */
@media (max-width: 760px) {
  .sb { width: min(84vw, 300px); }
  .sb.mini { width: min(84vw, 300px); }
  .topbar { height: 50px; }
  .tz-chip { padding: 0 8px; gap: 4px; }
  .tz-chip-t { display: none; }
  .tz-chip-s { display: inline; }
  .topbar .sb-me-t, .sb-me-caret { display: none; }
  .topbar .sb-me { padding: 2px; }
  .feed-chips { max-width: 40vw; }
  .ov-cards, .bigcards, .yd-grid { grid-template-columns: 1fr !important; }
  .tbl-card { max-width: 100%; }
  .lg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- the page roots and the "lands in step n" placeholder ---------- */
.page-root { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.page-root > :empty { display: none; }
.yd-soon { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 46vh; text-align: center; color: var(--t2); background: var(--s1); border: 1px dashed var(--bd2); border-radius: var(--radius); padding: 32px 20px; }
.yd-soon i { font-size: 34px; color: var(--accl); }
.yd-soon b { font-size: 16px; color: var(--t1); font-family: var(--font-head); }
.yd-soon p { margin: 0; max-width: 48ch; font-size: 13px; line-height: 1.5; }
.yd-soon .rs { margin-top: 4px; }
.yd-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.yd-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.yd-row .sp, .toolbar .sp { flex: 1; }
.yd-note { font-size: 12px; color: var(--t2); line-height: 1.5; }
.yd-note b { color: var(--t1); }
.yd-lock { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: calc(var(--radius) - 2px); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); background: color-mix(in srgb, var(--warn) 8%, transparent); color: var(--amb); font-size: 12px; }
.yd-lock i { font-size: 15px; }
.yd-kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; font-size: 12px; }
.yd-kv dt { color: var(--t3); font-family: var(--mono); font-size: 10.5px; align-self: center; }
.yd-kv dd { margin: 0; color: var(--t1); min-width: 0; overflow-wrap: anywhere; }
.ov-card .ov-card-title .dupbtn { text-transform: none; letter-spacing: 0; }
.acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.us-table th, .us-table td { padding: 8px 10px; }

/* ---------- Status: the state dots ---------- */
.st-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--t3); margin-right: 7px; vertical-align: middle; box-shadow: 0 0 0 3px color-mix(in srgb, var(--t3) 20%, transparent); }
.st-dot[data-tone="good"] { background: var(--grn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 22%, transparent); }
.st-dot[data-tone="warn"] { background: var(--amb); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 22%, transparent); }
.st-dot[data-tone="bad"] { background: var(--red); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 22%, transparent); }
.st-state { font-weight: 600; color: var(--t1); }
.st-state[data-tone="good"] { color: var(--grn); } .st-state[data-tone="warn"] { color: var(--amb); } .st-state[data-tone="bad"] { color: var(--red); } .st-state[data-tone="muted"] { color: var(--t2); }
.st-vars td.l code { font-family: var(--mono); font-size: 11px; color: var(--t1); }

/* ---------- Users: the campaign-name tag chips and the chip input ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tag-chip { display: inline-flex; align-items: center; gap: 4px; font-family: var(--mono); font-size: 10.5px; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 10%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); color: var(--accl); white-space: nowrap; }
.tag-chip button { background: none; border: 0; color: inherit; cursor: pointer; font-size: 12px; line-height: 1; padding: 0; opacity: .7; }
.tag-chip button:hover { opacity: 1; }
.chip-input { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; min-height: 34px; padding: 4px 6px; background: var(--s2); border: 1px solid var(--bd2); border-radius: 5px; cursor: text; }
.chip-input:focus-within { border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.chip-input input { flex: 1; min-width: 120px; border: 0; background: none; outline: none; color: var(--t1); font-family: var(--mono); font-size: 12px; padding: 3px 4px; }
.chip-input.disabled { opacity: .55; pointer-events: none; }
.us-head-chips { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.us-chip { display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 10.5px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--bd2); background: var(--s2); color: var(--t2); }
.us-chip b { color: var(--t1); }
.us-chip.warn { border-color: color-mix(in srgb, var(--warn) 40%, transparent); color: var(--amb); background: color-mix(in srgb, var(--warn) 8%, transparent); }
.us-chip.warn b { color: var(--amb); }
tr.inactive td { opacity: .55; }

/* ---------- Audit ---------- */
.au-as { color: var(--t3); font-style: normal; }
.au-details { font-family: var(--mono); font-size: 10.5px; max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }

/* ---------- Profile › Appearance: the layout picker (three schematics) and the HD switch ---------- */
.layout-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.layout-card { text-align: left; background: var(--s2); border: 2px solid var(--bd2); border-radius: 10px; padding: 8px; cursor: pointer; color: var(--t1); font: inherit; display: flex; flex-direction: column; gap: 6px; }
.layout-card:hover { border-color: var(--bd3); }
.layout-card.on { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.layout-card b { font-size: 13px; font-weight: 600; }
.layout-card small { font-size: 11px; color: var(--t2); }
.lay-s { height: 84px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); display: grid; overflow: hidden; }
.lay-s > i { display: block; background: var(--panel); border-color: var(--line); }
.lay-s .lay-c { display: flex; flex-direction: column; gap: 5px; padding: 6px; }
.lay-s .lay-c span { display: block; height: 10px; border-radius: 3px; background: color-mix(in srgb, var(--muted) 25%, transparent); }
.lay-s .lay-c span:first-child { width: 50%; background: color-mix(in srgb, var(--accent) 40%, transparent); }
.lay-s.sidebar { grid-template-columns: 30px 1fr; } .lay-s.sidebar > i { border-right: 1px solid var(--line); }
.lay-s.topnav { grid-template-rows: 16px 1fr; } .lay-s.topnav > i { border-bottom: 1px solid var(--line); }
.lay-s.rail { grid-template-columns: 14px 1fr; } .lay-s.rail > i { border-right: 1px solid var(--line); }
.yd-switch { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 12.5px; color: var(--t1); cursor: pointer; }
.yd-switch .dim { font-size: 11px; }
.yd-switch input { accent-color: var(--acc); width: 16px; height: 16px; }
@media (max-width: 760px) { .layout-grid { grid-template-columns: 1fr; } }

/* ---------- the sign-in screens (public/auth.js): one card on the theme's background, no scene ---------- */
.auth-bg { position: fixed; inset: 0; z-index: 1100; overflow: auto; background: var(--bg); color: var(--fg); display: grid; place-items: center; padding: 24px 16px; }
.auth-bg.au-leave { opacity: 0; transition: opacity .35s ease; pointer-events: none; }
.auth-card { width: 400px; max-width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 26px 24px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 20px 60px color-mix(in srgb, var(--shadow-ink) 30%, transparent); }
.auth-bg.auth-wide .auth-card { width: 980px; }
.au-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.au-brand .brand-badge { width: 34px; height: 34px; border-radius: 10px; }
.au-brand b { font-family: var(--font-head); font-size: 15px; font-weight: 700; color: var(--t1); }
.au-brand b em { font-style: normal; color: var(--accl); font-weight: 600; }
.au-fld { margin-top: 10px; }
.au-lblrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 5px; }
.au-lbl { font-size: 12px; font-weight: 600; color: var(--t2); }
.au-lblrow a, .au-link { color: var(--accl); text-decoration: none; font-size: 12px; background: none; border: 0; font-family: inherit; cursor: pointer; padding: 0; }
.au-lblrow a:hover, .au-link:hover { text-decoration: underline; }
.au-inp { position: relative; display: flex; align-items: center; }
.au-inp .au-ic { position: absolute; left: 10px; width: 16px; height: 16px; color: var(--t3); pointer-events: none; }
.au-inp .au-ic svg { width: 16px; height: 16px; }
.au-inp .modal-inp { padding-left: 34px; font-family: var(--ui); }
.au-inp.has-eye .modal-inp { padding-right: 38px; }
.au-eye { position: absolute; right: 6px; width: 28px; height: 28px; display: grid; place-items: center; background: none; border: 0; color: var(--t3); cursor: pointer; border-radius: 6px; }
.au-eye:hover { color: var(--t1); } .au-eye svg { width: 16px; height: 16px; }
.au-primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.au-primary svg { width: 16px; height: 16px; }
.au-foot { display: flex; align-items: center; gap: 6px; margin-top: 14px; font-size: 11px; color: var(--t3); }
.au-foot svg { width: 14px; height: 14px; }
.au-trust { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 12.5px; color: var(--t1); }
.au-trust input { accent-color: var(--acc); }
.au-links { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; }
.au-code { font-family: var(--mono); font-size: 24px; letter-spacing: .45em; text-align: center; padding: 10px 0 10px .45em; }
.auth-f .modal-inp.au-code { font-size: 24px; }
.auth-foot { flex-wrap: wrap; }
.auth-title { font-family: var(--font-head); }
.auth-msg { font-size: 12.5px; line-height: 1.5; color: var(--t2); padding: 10px 12px; border-radius: 6px; background: color-mix(in srgb, var(--accent) 8%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); }
.auth-msg b { color: var(--t1); }
.auth-row .modal-cancel.copied { color: var(--grn); }
body.auth-open .shell { visibility: hidden; }
@media (max-width: 760px) { .auth-bg { padding: 12px; align-items: start; } .auth-card { padding: 22px 18px 20px; } .au-code { letter-spacing: .3em; } }

/* ---------- Ultraviolet: pill-shaped navigation items and buttons ---------- */
html[data-theme="ultraviolet"] :is(.sbi, .tn-g, .rail-g, .sec-btn, .modal-apply, .modal-cancel, .tb-btn, .icon-btn, .drp-trigger, .auth-btn, .dupbtn.pill, .fc, .si, .modal-inp, .chip-input, .ptabs, .theme-card, .layout-card, .us-chip) { border-radius: 999px; }
html[data-theme="ultraviolet"] :is(.ptabs .pt) { border-radius: 999px; }
html[data-theme="ultraviolet"] .sbi { padding: 8px 14px; }
html[data-theme="ultraviolet"] .sbi.on { background: linear-gradient(90deg, color-mix(in srgb, var(--accent-2, var(--accent)) 28%, transparent), color-mix(in srgb, var(--accent) 10%, transparent)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent); }
html[data-theme="ultraviolet"] .tn-g.on { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent); }
html[data-theme="ultraviolet"] :is(.bc, .ov-card, .chart-card, .tbl-card, .modal, .auth-card, .tn-dd, .sb-menu, .yd-soon) { border-radius: var(--radius); }
html[data-theme="ultraviolet"] .brand-badge { border-radius: 10px; }

/* ---------- Daylight: dense tables ---------- */
html[data-theme="daylight"] td { height: 34px; font-size: 11px; padding: 0 10px; }
html[data-theme="daylight"] th { padding: 6px 10px; font-size: 9.5px; }
html[data-theme="daylight"] .us-table th, html[data-theme="daylight"] .us-table td { padding: 5px 10px; }
html[data-theme="daylight"] td .cn { font-size: 11.5px; }
html[data-theme="daylight"] .tbl-foot { padding: 6px 12px; }
html[data-theme="daylight"] :is(.bc, .ov-card, .chart-card, .tbl-card, .modal, .auth-card) { border-radius: var(--radius); }
html[data-theme="daylight"] .bc { padding: 12px 14px; }

/* ---------- the HD themes: glass on every surface while html[data-hd="on"]; solid panels otherwise ---------- */
html[data-theme^="glass-"] :is(.bc, .ov-card, .chart-card, .tbl-card, .modal, .auth-card, .yd-soon, .tn-dd, .sb-menu, .theme-card, .layout-card) { border-radius: var(--radius); }
html[data-theme^="glass-"] :is(.tn, .rail, .rail-col) { background: var(--sidebar, var(--panel)); }
html[data-hd="on"][data-theme^="glass-"] body { background: var(--bg); }
html[data-hd="on"][data-theme^="glass-"] :is(.sb, .tn, .rail, .rail-col, .topbar, .bc, .ov-card, .chart-card, .modal, .auth-card, .yd-soon, .tn-dd, .sb-menu, .bell-dd, .drp-panel, .tz-chip, .icon-btn, .us-chip, .tag-chip, .theme-card, .layout-card, .chip-input, .modal-inp, .fc, .si, .sec-btn.ghost, .modal-cancel) {
  background: var(--glass); border-color: var(--glass-line);
  -webkit-backdrop-filter: blur(var(--glass-blur, 26px)) saturate(170%); backdrop-filter: blur(var(--glass-blur, 26px)) saturate(170%);
}
html[data-hd="on"]:is([data-theme="glass-dark"], [data-theme="glass-aurora"], [data-theme="glass-sunset"], [data-theme="glass-mono"]) :is(.sb, .tn, .rail, .rail-col, .topbar, .bc, .ov-card, .chart-card, .modal, .auth-card, .yd-soon, .tn-dd, .sb-menu, .bell-dd, .drp-panel) { -webkit-backdrop-filter: blur(var(--glass-blur, 28px)) saturate(170%); backdrop-filter: blur(var(--glass-blur, 28px)) saturate(170%); }
html[data-hd="on"][data-theme^="glass-"] :is(.bc, .ov-card, .chart-card, .modal, .auth-card, .yd-soon, .tn-dd, .sb-menu, .theme-card, .layout-card) { box-shadow: inset 0 1px 0 var(--glass-hi), 0 10px 30px color-mix(in srgb, var(--shadow-ink) 14%, transparent); }
html[data-hd="on"]:is([data-theme="glass-dark"], [data-theme="glass-aurora"], [data-theme="glass-sunset"], [data-theme="glass-mono"]) :is(.bc, .ov-card, .chart-card, .modal, .auth-card, .yd-soon, .tn-dd, .sb-menu) { box-shadow: inset 0 1px 0 var(--glass-hi), 0 16px 40px color-mix(in srgb, var(--shadow-ink) 45%, transparent); }
/* the tables stay one opaque surface so the sticky header hides what scrolls under it */
html[data-hd="on"][data-theme^="glass-"] .tbl-card { background: var(--panel); border-color: var(--glass-line); }
/* the blobs show behind the sign-in card too */
html[data-hd="on"][data-theme^="glass-"] body.auth-open #fd-fx { display: block; }
html[data-hd="on"][data-theme^="glass-"] .auth-bg { background: transparent; }
/* the key numbers glow on Glass Dark HD */
html[data-hd="on"]:is([data-theme="glass-dark"], [data-theme="glass-aurora"], [data-theme="glass-sunset"], [data-theme="glass-mono"]) :is(.bc-val, .kpi-val, .yd-glow) { text-shadow: 0 0 18px color-mix(in srgb, var(--glow) 60%, transparent), 0 0 2px color-mix(in srgb, var(--glow) 30%, transparent); }
html[data-hd="on"]:is([data-theme="glass-dark"], [data-theme="glass-aurora"], [data-theme="glass-sunset"], [data-theme="glass-mono"]) .brand-badge { box-shadow: 0 0 22px color-mix(in srgb, var(--glow) 45%, transparent); }
/* HD off, or a device that asked for less: no blur, no blobs, no motion (style.css #fd-fx shows only under data-hd="on") */
html[data-hd="off"] * { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
html[data-hd="off"] #fd-fx { display: none !important; }
@media (prefers-reduced-motion: reduce) {
  #fd-fx b, .sb, .sb-grp-h .sb-grp-chev, .auth-bg { animation: none !important; transition: none !important; }
}

/* ---------- the filter bar under the top bar: the feed chips, domain, device, and the admins' view switch (always shown) ---------- */
.filterbar { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 14px; border-bottom: 1px solid var(--bd); background: color-mix(in srgb, var(--s1) 92%, var(--bg)); overflow-x: auto; scrollbar-width: none; flex: none; }
.filterbar::-webkit-scrollbar { display: none; }
.filterbar .feed-chips { max-width: none; flex: none; }
.f-sel { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 6px 0 9px; border: 1px solid var(--bd2); border-radius: 999px; background: var(--s2); color: var(--t2); font-size: 11.5px; flex: none; }
.f-sel:focus-within { border-color: var(--accent); }
.f-sel i { font-size: 14px; }
.f-sel select { border: 0; background: transparent; color: var(--t1); font: inherit; font-size: 11.5px; font-weight: 600; max-width: 170px; padding-right: 2px; cursor: pointer; outline: none; }
.f-sel select option { background: var(--s2); color: var(--t1); }
.f-note { margin-left: auto; flex: none; }
.f-clear { height: 26px; padding: 0 9px; border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--bd2)); border-radius: 999px; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--t1); font: inherit; font-size: 11px; cursor: pointer; white-space: nowrap; }
.f-clear:hover { background: color-mix(in srgb, var(--accent) 22%, transparent); }
html[data-theme="daylight"] .filterbar { background: var(--s1); }
.sbi-star { color: var(--amb); }
@media (max-width: 760px) { .filterbar { padding: 4px 10px; gap: 6px; } .f-note { margin-left: 0; } }

/* ---------- Campaigns (step 2, Kai 4 Dec 2026): the tree table's small parts; the table itself is #cp-table in style.css ---------- */
.cp-tools .sec-sub { white-space: nowrap; }
.exp-sp { display: inline-block; width: 20px; flex-shrink: 0; }
.namecell-t { min-width: 0; display: flex; flex-direction: column; }
.namecell-t .cn { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 420px; }
.namecell-t .cs { display: block; font-family: var(--mono); font-size: 10px; color: var(--t3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.namecell-t .cs .st-chip { vertical-align: middle; }
.cs-link { color: var(--acc); text-decoration: none; } .cs-link:hover { text-decoration: underline; }
#cp-table tr.is-off .cn { color: var(--t2); }
#cp-table tr.lvl-adset td.stk2, #cp-table tr.lvl-ad td.stk2 { padding-left: 26px; }
#cp-table tr.lvl-ad td.stk2 { padding-left: 46px; }
#cp-table tr.lvl-adset td, #cp-table tr.lvl-ad td { background: color-mix(in srgb, var(--fg) 2%, transparent); }
#cp-table tr.selected td { background: color-mix(in srgb, var(--accent) 7%, transparent); }
#cp-table td.tone-pos { color: var(--grn); } #cp-table td.tone-neg { color: var(--red); }
.bk-body { margin: 8px 0 12px; }
.bk-body .lp-table { min-width: 640px; }
.st-errs { margin: 0; padding-left: 16px; } .st-errs li { margin: 2px 0; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .cp-tools { gap: 6px; }
  .cp-tools .sw { flex: 1 1 100%; } .cp-tools .sw .si { width: 100%; }
  .cp-tools .sec-sub { display: none; }
  .cp-tools .tb-btn { padding: 0 9px; }
  .namecell-t .cn { max-width: 150px; }
  .bulk-bar { font-size: 11.5px; }
  .modal.bulk-modal { padding: 16px; }
}
