/* Mission Control , proposed design system (Wave 0)
   Single source of truth for tokens + components.
   Used by every "After" mockup. */

/* SELF-HOSTED FONTS (2026-06-12): Inter (body) + IBM Plex Sans 700
   (the MISSION CONTROL wordmark) are served from our own /static/fonts
   instead of Google Fonts. This removes the only third-party browser
   dependency MC had, kills the cold-load font flash (the file is local,
   so it's ready before paint), and survives a corp firewall that blocks
   Google. Inter ships as one variable file covering 100..900. URLs are
   relative to this stylesheet (/static/mc.css -> /static/fonts/...).
   font-display:swap is belt-and-suspenders; same-origin fonts almost
   always arrive before first paint anyway. */
@font-face {
    font-family: 'Inter';
    src: url('fonts/inter-variable.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'IBM Plex Sans';
    src: url('fonts/ibm-plex-sans-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Surface */
    --mc-bg:          #f1f5f9;
    --mc-surface:     #ffffff;
    --mc-surface-2:   #f8fafc;
    --mc-surface-3:   #f1f5f9;
    --mc-border:      #e2e8f0;
    --mc-border-2:    #cbd5e1;
    /* CHROME-SURFACE (2026-06-08): a separate token for the
       topbar + rail backgrounds so themed states can carry the
       theme colour into the chrome without forcing card surfaces
       to follow. In Light + Dark this defaults to --mc-surface
       (white) which matches the historical behaviour. Themed
       states (cool) override to a theme-tinted value so chrome
       and content read as one design, not "Pulse is themed but
       chrome is still Light." */
    --mc-chrome:      var(--mc-surface);

    /* Text. Bug B-CSS7: --mc-text-faint was #94a3b8 which fails WCAG AA
       contrast on pure white surfaces (4.2:1 < 4.5:1 required for normal
       text). Darkened to #6b7a8f so placeholder text + faint metadata
       meet AA on both --mc-surface (white) and --mc-bg (off-white). */
    --mc-text:         #1e293b;
    --mc-text-bright:  #0f172a;
    --mc-text-muted:   #475569;
    --mc-text-faint:   #6b7a8f;

    /* Brand + semantic accents (one of each) */
    /* INTERACTIVE accent (buttons, links, active nav, focus rings).
       Retuned 2026-06-12 from #2563eb to #2f4fce: same hue as the
       deep-ocean brand ink, just brighter, so the two blues read as one
       family rather than two unrelated blues. */
    --mc-brand:         #2f4fce;
    --mc-brand-soft:    rgba(47, 79, 206, 0.10);
    /* THE Mission Control brand colour (deep ocean). LOCKED — single
       source of truth for the brand mark wherever it's a solid fill:
       the badge tile, the assistant bubble, the user avatar, and the
       wordmark ink. Constant across themes (the mark is always this
       navy with a white glyph), so it is intentionally NOT overridden
       in the dark :root block. Distinct from --mc-brand (#2f4fce), the
       brighter INTERACTIVE accent for buttons / links / active states.
       Never hardcode #1e3a8a again — reference this token so the brand
       can be retuned in exactly one place. */
    --mc-brand-ink:     #1e3a8a;
    --mc-success:       #16a34a;
    --mc-success-soft:  rgba(22, 163, 74, 0.10);
    --mc-warn:          #d97706;
    --mc-warn-soft:     rgba(217, 119, 6, 0.10);
    --mc-danger:        #dc2626;
    --mc-danger-soft:   rgba(220, 38, 38, 0.10);
    --mc-info:          #0d9488;          /* AI / synthesized , teal */
    --mc-info-soft:     rgba(20, 184, 166, 0.12);

    /* Type scale */
    --mc-text-xs:   11px;
    --mc-text-sm:   13px;
    --mc-text-md:   14px;
    --mc-text-lg:   16px;
    --mc-text-xl:   20px;
    --mc-text-2xl:  28px;

    /* Radius */
    --mc-r-sm:  6px;
    --mc-r-md:  10px;
    --mc-r-lg:  14px;

    /* Spacing */
    --mc-s-1: 4px;  --mc-s-2: 8px;  --mc-s-3: 12px;
    --mc-s-4: 16px; --mc-s-5: 24px; --mc-s-6: 32px;
    --mc-s-7: 48px;

    /* Shadow */
    --mc-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
    --mc-shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
    --mc-shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.16);

    /* Wave 12 audit Phase C: canonical modal-backdrop opacity. Previously
       every modal hand-rolled its own rgba(0,0,0,X) value (0.40 / 0.45 /
       0.65 across the app). This token dedupes the centered-modal class;
       slide-in side panels (AI panel, CN modal) intentionally keep their
       lighter backdrops (0.30 / 0.35) — they're a different intent. */
    --mc-overlay: rgba(0, 0, 0, 0.40);

    /* Layout
       Post-Phase 4 polish (2026-05-14): topbar trimmed from 56px to
       52px. Pill + search + avatar are ~34px tall; 52px is the
       tightest size that still gives them comfortable breathing room
       without the topbar reading as a panel. Reads as chrome, not
       as a page section. */
    --mc-rail-w:    192px;
    --mc-topbar-h:  52px;
}

[data-theme="dark"] {
    --mc-bg:          #0a1628;
    --mc-surface:     #0f1f3a;
    --mc-surface-2:   #152a48;
    --mc-surface-3:   #060e1a;
    --mc-border:      #1a3050;
    --mc-border-2:    #284870;
    /* Dark theme chrome = surface (unchanged from historical). */
    --mc-chrome:      var(--mc-surface);

    --mc-text:         #d0d8e8;
    --mc-text-bright:  #f0f4f8;
    --mc-text-muted:   #9aabc4;
    --mc-text-faint:   #6c7e9a;

    --mc-brand:         #38bdf8;
    --mc-brand-soft:    rgba(56, 189, 248, 0.14);
    --mc-success:       #4ade80;
    --mc-success-soft:  rgba(74, 222, 128, 0.14);
    --mc-warn:          #fbbf24;
    --mc-warn-soft:     rgba(251, 191, 36, 0.14);
    --mc-danger:        #f87171;
    --mc-danger-soft:   rgba(248, 113, 113, 0.14);
    --mc-info:          #5eead4;
    --mc-info-soft:     rgba(94, 234, 212, 0.16);

    --mc-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.30);
    --mc-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.36);
    --mc-shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.50);

    --mc-overlay: rgba(0, 0, 0, 0.65);
}

/* Reset & base */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0 !important; padding: 0 !important; }
/* Bug RAIL-LAYOUT (browser-test): the user reported a thin grey strip
   above the topbar. Browsers paint the <html> element behind <body>
   in any sub-pixel rounding gap or scroll-overshoot area. Setting
   html background to match the topbar surface means any phantom
   strip becomes invisible (white-on-white) , the body keeps its
   --mc-bg so .mc-main padding still reads grey as intended. !important
   added because some pages may set html/body bg in their own
   head_extra blocks. */
html {
    background: var(--mc-surface) !important;
    min-height: 100vh;
}
body {
    background: var(--mc-bg);
    color: var(--mc-text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: var(--mc-text-md);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    /* Bug RAIL-LAYOUT (browser-test): user reports grey strip above
       topbar even in InPrivate / fresh cache. Whatever's painting it
       (browser-specific quirk, possibly a forced-color-mode artifact),
       cover it with a fixed pseudo-element that paints the top 60px
       of the viewport in surface color, behind the topbar (z-index:0,
       topbar is z:10). Belt-and-suspenders over the html bg fix. */
    position: relative;
}
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0;
    /* Exactly the topbar height , the strip fills any phantom gap
       above the topbar's painted first pixel without adding visible
       white space below the topbar. */
    height: var(--mc-topbar-h);
    background: var(--mc-surface);
    z-index: 0;
    pointer-events: none;
}
/* Force the app shell to its container's exact top edge , no margin
   or padding above it can sneak in from page-level styles. */
.mc-app {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Type */
h1, h2, h3, h4 { color: var(--mc-text-bright); font-weight: 700; line-height: 1.25; margin: 0; }
h1 { font-size: var(--mc-text-2xl); letter-spacing: -0.01em; }
h2 { font-size: var(--mc-text-xl); }
h3 { font-size: var(--mc-text-lg); }
.mc-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.mc-text-muted { color: var(--mc-text-muted); }
.mc-text-faint { color: var(--mc-text-faint); }
.mc-text-xs { font-size: var(--mc-text-xs); }
.mc-text-sm { font-size: var(--mc-text-sm); }

/* ── Page header (title + subtitle wrapper) ─────────────────────
   PAGE-HEAD-UNIFY (2026-05-23 PM). Single canonical class for the
   title-and-subtitle band at the top of every signed-in page.
   Replaces six per-page variants that drifted apart over the past
   year: .pulse-head, .day-head, .review-page-head,
   .report-page-head, .page-head (admin), and the
   .settings-main h1+.subtitle pattern. They had drifted on padding
   (0-28px), font sizing (token vs hardcoded), line-height
   (1.45 vs 1.5), and one had a border-bottom no other had.

   Banded modifier (.mc-page-head--banded) is opt-in for pages whose
   content has a clear "workflow zone" beneath the header (Review
   Board, Report, Admin). Pulse, My Day, and Settings stay flat.

   IMPORTANT: this rule controls ONLY the title-and-subtitle wrapper.
   The cards, tables, toolbars, sub-rails, etc. on each page are
   styled by their own page-specific CSS and are not touched here. */
.mc-page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--mc-s-4);
    flex-wrap: wrap;
    /* PAGE-HEAD-ALIGN (2026-05-24): horizontal padding dropped from 24px
       to 0 so the title's left edge sits on the same vertical line as
       the cards / content below it. Both the title and the .mc-main
       content area sit inside .mc-main's own 32px L/R padding, so 0
       horizontal padding here means "align with whatever .mc-main is
       containing." The banded modifier below puts the 24px inset back
       for pages whose header has a visible background band (Review,
       Report, Admin) where the contents shouldn't touch the band edge. */
    padding: 22px 0 18px;
}
.mc-page-head__main { min-width: 0; flex: 1; }
.mc-page-head h1 {
    font-size: var(--mc-text-xl);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.2px;
    color: var(--mc-text-bright);
    margin: 0 0 4px;
}
.mc-page-head .subtitle {
    font-size: var(--mc-text-sm);
    color: var(--mc-text-muted);
    line-height: 1.5;
    margin: 0;
    max-width: 720px;
}
.mc-page-head .actions {
    display: flex;
    gap: var(--mc-s-2);
    align-items: center;
    flex-shrink: 0;
}
.mc-page-head--banded {
    background: var(--mc-surface);
    border-bottom: 1px solid var(--mc-border);
    /* Banded pages (Report, Admin Users) keep the 24px
       inset so the title/subtitle/actions don't sit flush against the
       band's left/right edges — that was the explicit design call when
       we picked the banded treatment for those pages. */
    padding: 22px 24px 18px;
}

/* Buttons */
.mc-btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: var(--mc-s-2);
    padding: 9px 16px;
    border: 1px solid transparent;
    border-radius: var(--mc-r-sm);
    background: var(--mc-surface-2);
    color: var(--mc-text-bright);
    font: inherit; font-size: var(--mc-text-sm); font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background .12s, border-color .12s, transform .05s;
}
.mc-btn:hover { background: var(--mc-surface-3); }
.mc-btn:active { transform: translateY(1px); }
/* BTN-DISABLED (2026-09-21): the shared button had NO disabled state,
   and that single gap produced both halves of a button-consistency
   problem.

   Buttons that needed one wrote their own class rather than use the
   system (.mc-note-post-btn and .mc-pick-save each rolled a near-copy
   of .mc-btn-ghost that then drifted on weight, padding and hover) ,
   which is the inconsistency the user noticed.

   Worse, buttons that DID use the system correctly got no disabled
   treatment at all. Report's Generate Draft and Download measured
   `disabled=true` with `background: rgb(47,79,206)`, `opacity: 1`,
   `cursor: pointer` , full brand blue and apparently clickable while
   inert, on the page a manager uses once a month.

   :disabled covers <button>; [disabled] and aria-disabled cover the
   <a class="mc-btn"> cases, which cannot take the pseudo-class.
   `filter: none` is needed because .mc-btn-primary:hover brightens,
   and a disabled primary must not light up under the cursor. */
.mc-btn:disabled,
.mc-btn[disabled],
.mc-btn[aria-disabled="true"] {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: auto;   /* keep the not-allowed cursor visible */
}
/* Hover must not move a disabled button. Declared per variant because
   each has a different RESTING background, and there is no CSS way to
   say "whatever this element would otherwise be" , `inherit` would take
   the parent's, which is a different colour entirely. */
.mc-btn:disabled:hover,
.mc-btn[disabled]:hover,
.mc-btn[aria-disabled="true"]:hover {
    filter: none;
    background: var(--mc-surface-2);
}
.mc-btn-primary:disabled:hover,
.mc-btn-primary[disabled]:hover,
.mc-btn-primary[aria-disabled="true"]:hover { background: var(--mc-brand); }
.mc-btn-ghost:disabled:hover,
.mc-btn-ghost[disabled]:hover,
.mc-btn-ghost[aria-disabled="true"]:hover { background: transparent; }
.mc-btn-danger:disabled:hover,
.mc-btn-danger[disabled]:hover,
.mc-btn-danger[aria-disabled="true"]:hover { background: var(--mc-danger); }
.mc-btn-icon:disabled:hover,
.mc-btn-icon[disabled]:hover,
.mc-btn-icon[aria-disabled="true"]:hover { background: transparent; }
/* In-flight state. Also absent from the shared system, and also
   re-invented by the one-offs (.mc-note-post-btn.is-busy). Distinct
   from disabled: the action IS happening, so `progress` rather than
   `not-allowed`, and a lighter fade. */
.mc-btn.is-busy {
    opacity: 0.6;
    cursor: progress;
}
.mc-btn:disabled:active,
.mc-btn[disabled]:active,
.mc-btn[aria-disabled="true"]:active {
    transform: none;
}
.mc-btn-primary {
    background: var(--mc-brand); color: #fff;
}
.mc-btn-primary:hover { background: var(--mc-brand); filter: brightness(1.08); }
.mc-btn-ghost {
    background: transparent;
    border-color: var(--mc-border);
    color: var(--mc-text);
}
.mc-btn-ghost:hover { background: var(--mc-surface-2); }
.mc-btn-danger {
    background: var(--mc-danger); color: #fff;
}
.mc-btn-icon {
    width: 36px; height: 36px;
    padding: 0; border-radius: var(--mc-r-sm);
    background: transparent; border-color: transparent;
    color: var(--mc-text-muted);
}
.mc-btn-icon:hover {
    background: var(--mc-surface-2);
    color: var(--mc-text-bright);
}
.mc-btn-sm { padding: 5px 10px; font-size: var(--mc-text-xs); }

/* Pill button — used for filter chips, tab-like nav, status-style toggles.
   Wave 12 audit Phase A: consolidates the .filter-pill class previously
   defined identically in both review.html and admin_users.html. Adding
   .mc-btn-pill onto .mc-btn-sm gives the rounded form-factor while keeping
   the rest of the .mc-btn family's hover/active/disabled treatment. */
.mc-btn-pill {
    border-radius: 999px;
    padding: 4px 12px;
    font-size: var(--mc-text-xs);
    font-weight: 600;
    color: var(--mc-text-muted);
    background: var(--mc-surface);
    border-color: var(--mc-border);
}
.mc-btn-pill:hover {
    background: var(--mc-surface-2);
    color: var(--mc-text-bright);
}
.mc-btn-pill.active {
    background: var(--mc-brand-soft);
    color: var(--mc-brand);
    border-color: var(--mc-brand);
}
.mc-btn-pill .count {
    margin-left: 4px;
    color: var(--mc-text-faint);
    font-weight: 500;
}
.mc-btn-pill.active .count { color: var(--mc-brand); }
.mc-btn-pill .badge {
    margin-left: 4px;
    background: var(--mc-warn); color: #fff;
    border-radius: 999px;
    padding: 0 6px; font-size: 10px; font-weight: 700;
}

/* Refresh chip — promoted from pulse.html (UAT sweep 2026-05-18) so
   My Day + future pages can use the same "↻ N · ▾" pill instead of
   bespoke refresh buttons. On Pulse the chip shows an auto-refresh
   countdown; on My Day it's a click-to-refresh-now control. Same
   chrome, different state label. */
.mc-refresh-chip {
    display: inline-flex; align-items: center;
    font-size: 11px;
    color: var(--mc-text-muted);
    padding: 4px 8px;
    border: 1px solid var(--mc-border);
    border-radius: 999px;
    background: var(--mc-surface);
    cursor: pointer;
    user-select: none;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.mc-refresh-chip:hover {
    background: var(--mc-brand-soft);
    color: var(--mc-brand);
    border-color: var(--mc-brand);
}
.mc-refresh-chip .mc-refresh-caret {
    /* PICK-CARET-SIZE (2026-06-08, revised PM): see conn-chip
       comment — same fix here. 11px caret = same as the chip's text
       which read as half-height due to ▾ fill ratio. 14px gives the
       glyph the visible mass to read as a real dropdown affordance. */
    margin-left: 4px;
    font-size: 14px;
    opacity: 0.65;
    color: var(--mc-text-faint);
    transition: color 0.12s;
}
.mc-refresh-chip:hover .mc-refresh-caret { color: var(--mc-brand); }

/* 2026-05-22: brief brand-colour flash on the "last HH:MM:SS"
   timestamp inside the refresh chip , confirms to the user that
   auto-refresh actually fired (the underlying data may not have
   changed, but the timestamp will have moved). */
#lastRefreshChip {
    transition: color 800ms ease, font-weight 800ms ease;
}
#lastRefreshChip.mc-refresh-flash {
    color: var(--mc-brand);
    font-weight: 600;
    transition: none;
}

/* Priority pill — Wave 12 audit Phase A: single canonical priority chip
   shape used by every page that renders a P1 / P2 / P3 / P4 / P5 badge.
   Previously each page hand-rolled its own (my_day.html's .pri.p1 with
   hard-coded hex, report.html's .rpt-priority-badge, review.html's
   .priority-badge, _shell.html's .mc-tickets-table .pri.p1). They differed
   in radius (3 / 4 / 999), weight (600–800), and dark-theme behaviour
   (My Day broke dark-mode by hard-coding light-mode reds). Now: one shape,
   tokens for colour, dark-mode works automatically. */
.mc-priority-pill {
    /* Wave 12 audit Phase A hotfix (2026-05-18): the original shipped
       `font: 700 var(--mc-text-xs)/1 inherit` — `inherit` is not a valid
       font-family token inside the `font` shorthand, so the entire
       declaration was being dropped by the parser. Pills then fell
       back to body's 14px / 400, rendering ~30% larger than intended.
       Replaced with explicit longhand properties. */
    display: inline-block;
    font-size: var(--mc-text-xs);
    font-weight: 700;
    line-height: 1;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.mc-priority-pill.p1 { background: var(--mc-danger-soft);  color: var(--mc-danger); }
.mc-priority-pill.p2 { background: var(--mc-warn-soft);    color: var(--mc-warn); }
.mc-priority-pill.p3 { background: var(--mc-brand-soft);   color: var(--mc-brand); }
.mc-priority-pill.p4 { background: var(--mc-success-soft); color: var(--mc-success); }
.mc-priority-pill.p5 { background: var(--mc-surface-2);    color: var(--mc-text-muted); }

/* State badge — Wave 12 audit Phase B: single canonical state-pill family
   replacing admin_users.html's .status-pill and report.html's
   .rpt-state-badge. Same shape (rounded-pill, 10px/700 Title-case) gives
   "approval state", "draft / sent / scoping" and SNOW ticket states a
   consistent visual treatment across pages. My Day's state cell now also
   wraps its raw SNOW state in this class so the affordance reads the
   same. Title-case (not UPPERCASE) per audit: matches SNOW's own UI. */
.mc-state-badge {
    /* Wave 12 audit Phase B hotfix (2026-05-18): same broken-shorthand
       issue as .mc-priority-pill — `font: 700 var(--mc-text-xs)/1 inherit`
       silently dropped, rendering badges at body 14px/400 instead of
       11px/700. Replaced with longhand properties. */
    display: inline-block;
    font-size: var(--mc-text-xs);
    font-weight: 700;
    line-height: 1;
    padding: 3px 9px;
    border-radius: 999px;
    letter-spacing: 0.2px;
    white-space: nowrap;
    border: 1px solid transparent;
}
.mc-state-badge.is-success  { background: var(--mc-success-soft); color: var(--mc-success); border-color: var(--mc-success); }
.mc-state-badge.is-warn     { background: var(--mc-warn-soft);    color: var(--mc-warn);    border-color: var(--mc-warn); }
.mc-state-badge.is-danger   { background: var(--mc-danger-soft);  color: var(--mc-danger);  border-color: var(--mc-danger); }
.mc-state-badge.is-info     { background: var(--mc-info-soft);    color: var(--mc-info);    border-color: var(--mc-info); }
.mc-state-badge.is-brand    { background: var(--mc-brand-soft);   color: var(--mc-brand);   border-color: var(--mc-brand); }
.mc-state-badge.is-neutral  { background: var(--mc-surface-2);    color: var(--mc-text-muted); border-color: var(--mc-border); }

/* Connection chip — Wave 12 audit Phase C: canonical conn-status pill
   used in Pulse + My Day topbars to show ServiceNow / AzDO connection
   state. Previously defined identically in two places (pulse.html +
   my_day.html, ~80 lines total of CSS). Now a single source of truth.
   The .is-attention animation + dot animations live here; pages can
   still scope animation NAMES via their own @keyframes if they want
   to vary timing, but the class shape is shared. */
.conn-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px; border-radius: 999px;
    font-size: var(--mc-text-xs); font-weight: 600;
    border: 0; cursor: pointer; font-family: inherit;
    transition: filter 0.12s, transform 0.08s;
}
.conn-chip:hover  { filter: brightness(0.96); }
.conn-chip:active { transform: translateY(1px); }
.conn-chip.ok      { background: var(--mc-success-soft); color: var(--mc-success); }
.conn-chip.off     { background: var(--mc-warn-soft);    color: var(--mc-warn); }
.conn-chip.warming { background: var(--mc-brand-soft);   color: var(--mc-brand); }
.conn-chip.warn    { background: var(--mc-warn-soft);    color: var(--mc-warn); }
.conn-chip.expired {
    background: var(--mc-warn-soft);
    color: var(--mc-warn);
    box-shadow: 0 0 0 0 var(--mc-warn);
}
.conn-chip .dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: currentColor; position: relative;
}
/* PICK-CARET-SIZE (2026-06-08, revised 2026-06-08 PM): the first
   pass bumped these to 11px to "match parent text size." That
   missed the glyph-fill-ratio issue — the ▾ Unicode character only
   fills ~50% of its em-square, so a same-size caret physically
   reads as half the height of the surrounding letters and still
   feels tiny. 14px brings the visible glyph height up to roughly
   match an 11px letter's x-height — i.e. it reads as deliberately
   present but secondary. 0.65 opacity + 4px left margin keep the
   tone right. */
.conn-chip .chip-caret { font-size: 14px; opacity: 0.65; margin-left: 4px; }
/* Pulsing dot for live-OK chips. Animation name `connPulse` is
   defined in pulse.html + my_day.html to keep this shared rule from
   reaching into a global animation namespace. */
.conn-chip.ok .dot::after {
    content: ''; position: absolute; inset: -3px;
    border-radius: 50%; background: currentColor; opacity: 0.45;
    animation: connPulse 1.8s ease-out infinite;
}
.conn-chip.warming .dot { animation: mcDotPulse 1.2s ease-in-out infinite; }

/* Card */
.mc-card {
    background: var(--mc-surface);
    border: 1px solid var(--mc-border);
    border-radius: var(--mc-r-md);
    padding: var(--mc-s-5);
    box-shadow: var(--mc-shadow-sm);
}
.mc-card-elevated { box-shadow: var(--mc-shadow-md); }
.mc-card-hero {
    border-radius: var(--mc-r-lg);
    padding: 36px 40px;
    box-shadow: var(--mc-shadow-lg);
}

/* Input */
.mc-input {
    /* UAT sweep 2026-05-18: was padding 9px 12px / font 14px (h:41) — heavier
       than Settings forms which override locally to 7px 10px / 13px (h:36).
       Canonical aligned to the denser spec; modals now inherit it cleanly.
       Use .mc-input-sm for table-cell / toggle-row contexts (h:30). */
    display: block; width: 100%;
    padding: 7px 10px;
    background: var(--mc-surface);
    border: 1px solid var(--mc-border);
    border-radius: var(--mc-r-sm);
    color: var(--mc-text-bright);
    font-size: var(--mc-text-sm);
}
.mc-input-sm {
    /* Compact variant — used in Settings toggle-row inputs, admin inline
       editors, anywhere a single-line dense list needs editable cells. */
    padding: 5px 8px;
    font-size: 12px;
    height: 30px;
}
.mc-input:focus {
    outline: none;
    border-color: var(--mc-brand);
    box-shadow: 0 0 0 3px var(--mc-brand-soft);
}
.mc-input::placeholder { color: var(--mc-text-faint); }

/* Badge / pill */
.mc-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: var(--mc-text-xs); font-weight: 700;
    letter-spacing: 0.3px;
    border: 1px solid transparent;
}
.mc-badge-success { background: var(--mc-success-soft); color: var(--mc-success); border-color: var(--mc-success); }
.mc-badge-warn    { background: var(--mc-warn-soft);    color: var(--mc-warn);    border-color: var(--mc-warn); }
.mc-badge-danger  { background: var(--mc-danger-soft);  color: var(--mc-danger);  border-color: var(--mc-danger); }
.mc-badge-info    { background: var(--mc-info-soft);    color: var(--mc-info);    border-color: var(--mc-info); }
.mc-badge-neutral { background: var(--mc-surface-2);    color: var(--mc-text-muted); border-color: var(--mc-border); }
.mc-badge-brand   { background: var(--mc-brand-soft);   color: var(--mc-brand);   border-color: var(--mc-brand); }

/* Wordmark */
.mc-wordmark {
    font-weight: 800; letter-spacing: 1.5px;
    color: var(--mc-text-bright);
}
.mc-wordmark .glyph { color: var(--mc-brand); margin-right: 4px; }

/* Empty state */
.mc-empty {
    display: flex; flex-direction: column; align-items: center;
    padding: 60px 20px; text-align: center;
    color: var(--mc-text-muted);
}
.mc-empty .icon {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: var(--mc-brand-soft);
    color: var(--mc-brand);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 16px;
}

/* Table */
.mc-table {
    width: 100%; border-collapse: separate; border-spacing: 0;
    background: var(--mc-surface);
    border: 1px solid var(--mc-border);
    border-radius: var(--mc-r-md);
    overflow: hidden;
}
.mc-table th, .mc-table td {
    padding: 10px 14px;
    text-align: left;
    font-size: var(--mc-text-sm);
    border-bottom: 1px solid var(--mc-border);
}
.mc-table th {
    background: var(--mc-surface-2);
    color: var(--mc-text-muted);
    font-weight: 700;
    font-size: var(--mc-text-xs);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky; top: 0;
}
.mc-table tbody tr:last-child td { border-bottom: none; }
.mc-table tbody tr:hover { background: var(--mc-surface-2); }

/* App shell , topbar spans full width across the top, rail + main
   sit below it. Matches the Option B preview the user signed off on:
     +--------------------------------+
     |  TOPBAR (wordmark + ws pill)   |
     +---------+--------------------- +
     |  RAIL   |   MAIN content       |
     +---------+--------------------- +
*/
.mc-app {
    min-height: 100vh;
    display: grid;
    grid-template-columns: var(--mc-rail-w) 1fr;
    grid-template-rows: var(--mc-topbar-h) 1fr;
    grid-template-areas:
        "topbar topbar"
        "rail   main";
}
.mc-rail {
    grid-area: rail;
    /* CHROME-SURFACE (2026-06-08): was var(--mc-surface). In Light
       and Dark these resolve to the same value (surface == chrome).
       In themed states (Mercury / Cool / Glacier), chrome follows
       bg so the rail blends with the main content area for a
       unified theme frame instead of "Pulse area is themed but
       rail is still white." */
    background: var(--mc-chrome);
    border-right: 1px solid var(--mc-border);
    display: flex; flex-direction: column;
    /* RAIL-PAGE-TITLE-ALIGN (2026-05-24): padding-top bumped from 12px
       to 22px so the first rail item's text baseline lines up with the
       page <h1> baseline on the right. Previously the rail's first item
       sat ~10px higher than the page title (rail padding 12 + item
       padding 9 = 21px from rail top, vs main padding-top 8 +
       page-head padding-top 22 = 30px from main top — a visible
       vertical mismatch when the eye sweeps from "Pulse" in the rail
       to "Pulse" in the page header). 22 + 9 = 31px ≈ 30px on the
       right; close enough that they read as on one line. */
    padding: 22px 0 12px;
    gap: 2px;
    /* Sticky just below the topbar so the rail stays visible while the
       main content scrolls. Height is viewport minus topbar. */
    position: sticky;
    top: var(--mc-topbar-h);
    height: calc(100vh - var(--mc-topbar-h));
}
/* Labeled rail items , icon + text. Active state uses a soft brand
   background plus a left brand bar so the selected page is unmissable.
   Pattern matches Slack / Notion / Linear left rails. */
.mc-rail-item {
    display: flex; align-items: center; gap: 12px;
    padding: 9px 16px;
    /* RAIL-MATCH-TITLE (2026-06-08): rail labels share the page
       title's --mc-text-bright (was --mc-text-muted). Rail items
       are navigation, same hierarchy level as the page name —
       they shouldn't read as secondary. Active state still
       overrides to brand, hover already used bright. */
    color: var(--mc-text-bright);
    cursor: pointer;
    text-decoration: none;
    /* UAT sweep 2026-05-18: was 13.5px (fractional, off the type scale).
       Rounded to var(--mc-text-md) = 14px. Visually indistinguishable on
       most displays but cleanly on-scale. */
    font-size: var(--mc-text-md);
    font-weight: 600;
    border-left: 3px solid transparent;
    transition: background-color 0.12s, color 0.12s;
}
.mc-rail-item svg { flex-shrink: 0; }
.mc-rail-item .rail-label {
    white-space: nowrap;
}
/* "Coming Up" badge for not-yet-built features (e.g. My Day until the
   team_member features ship). Tiny, muted, sits at end of the rail
   row so it doesn't compete with the label itself. */
.mc-rail-coming-up {
    margin-left: auto;
    padding: 2px 7px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--mc-text-faint);
    background: var(--mc-surface-3);
    border: 1px solid var(--mc-border);
    border-radius: 10px;
    white-space: nowrap;
}
.mc-rail-item.active .mc-rail-coming-up {
    /* When the rail item is active (currently viewing My Day), keep the
       badge readable against the brand-soft background. */
    background: var(--mc-surface);
    color: var(--mc-text-muted);
}
/* RAIL-DIRECTION-A (2026-06-07): hover gets a 2px horizontal nudge
   for tactility (subtle; only fires on non-active items so the active
   item stays anchored). Plus a slight transition on transform so the
   shift reads as movement not flicker. */
.mc-rail-item:hover { background: var(--mc-surface-2); color: var(--mc-text-bright); }
.mc-rail-item:hover:not(.active) { transform: translateX(2px); }
.mc-rail-item.active {
    background: var(--mc-brand-soft);
    color: var(--mc-brand);
    border-left-color: var(--mc-brand);
}
.mc-rail-item.active:hover { background: var(--mc-brand-soft); color: var(--mc-brand); }
/* RAIL-DIRECTION-A: the active item's icon also picks up the brand
   colour (the SVG uses currentColor so this just rides the .active
   color rule, but stating it explicitly here makes the contract
   obvious and survives an accidental future refactor that switches
   the SVG to a hard-coded stroke). */
.mc-rail-item.active svg { color: var(--mc-brand); }
.mc-rail-spacer { flex: 1; }

/* RAIL-DIRECTION-A: rail-group wrapper. The `flex: 1` reserved the
   bottom space for an identity footer (avatar + sign-out) which was
   removed 2026-06-08 per user feedback — the topbar avatar dropdown
   already handles sign-out. Kept the wrapper as a no-op container so
   the markup stays consistent; the rail just sits naturally at the
   top with no footer. */
.mc-rail-group-rest {
    display: flex; flex-direction: column;
    gap: 2px;
    min-height: 0;
}

/* RAIL-DIRECTION-A: hairline divider between the daily-use cluster
   (Pulse / My Day / Report) and the config cluster (Admin / Settings).
   Subtle horizontal rule with breathing room above and below — reads
   as "these are different kinds of things" without the visual weight
   of an explicit eyebrow label (Direction B was that; we picked A
   because at 5 items the divider is enough). */
.mc-rail-divider {
    margin: 10px 16px 8px;
    border-top: 1px solid var(--mc-border);
}

.mc-topbar {
    grid-area: topbar;
    /* CHROME-SURFACE (2026-06-08): see .mc-rail above. Themed
       states make this follow bg for unified theme frame. */
    background: var(--mc-chrome);
    border-bottom: 1px solid var(--mc-border);
    /* Phase 4d (2026-05-14): switched from flex+space-between to grid
       so the search column is always TRULY centered regardless of how
       wide the left/right clusters are. With three columns 1fr/auto/1fr
       the left and right halves balance into equal fractional slots
       and the search (middle, auto-sized) sits at the topbar's
       mathematical center. Resolves the long-standing "search drifts
       right because the user-avatar+name on the right is wider than
       the workspace pill on the left" issue.

       The right cluster (.mc-topbar-right) uses justify-self: end below
       so its content hugs the right edge of the third column. */
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 0 24px;
    gap: 24px;
    position: sticky; top: 0; z-index: 10;
    /* Bug RAIL-LAYOUT (browser-test): user reported a thin grey strip
       still visible above the topbar after html bg fix. Defense in
       depth: explicit 100% height fills the grid row exactly so any
       sub-pixel rounding can't expose body bg. */
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}
.mc-topbar .mc-page-title {
    font-size: var(--mc-text-lg);
    font-weight: 700;
    color: var(--mc-text-bright);
}
/* The pill + its dropdown live inside .mc-workspace-pill-wrap (added
   2026-05-14). The wrap is position:relative so the dropdown's
   absolute positioning anchors to the pill's left edge instead of
   bubbling up to whatever wider ancestor happens to be relative. */
.mc-topbar .mc-workspace-pill-wrap {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
}
.mc-topbar .mc-workspace-pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 12px;
    background: var(--mc-surface-2);
    border: 1px solid var(--mc-border);
    border-radius: 999px;
    font-size: var(--mc-text-sm);
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}
/* Multi-queue topbar pill (2026-05-14 Phase 3):
   - Clickable affordance: small hover lift + brighter border on hover.
   - Caret chevron sits on the right edge; sized intentionally larger
     than typical so it reads as a CTA, not decoration (per
     Shyam's request 2026-05-14: "make caret slightly larger").
   - +N badge appears between the queue name and the caret when the
     workspace has 2+ queues configured. */
.mc-topbar .mc-workspace-pill.mc-ws-pill-clickable:hover {
    border-color: var(--mc-border-2);
    background: var(--mc-surface);
}
.mc-topbar .mc-workspace-pill.mc-ws-pill-clickable[aria-expanded="true"] {
    border-color: var(--mc-brand);
    background: var(--mc-brand-soft);
}
.mc-topbar .mc-workspace-pill .ws-caret {
    color: var(--mc-text-faint);
    margin-left: 2px;
    flex-shrink: 0;
    transition: transform 0.15s, color 0.12s;
}
.mc-topbar .mc-workspace-pill[aria-expanded="true"] .ws-caret {
    transform: rotate(180deg);
    color: var(--mc-brand);
}
/* Queue-count suffix on the workspace pill — quiet descriptor,
   not a badge. Reads as part of the same phrase as "My Desk":
   "My Desk · 3 queues ▾". Muted to keep "My Desk" as the focal
   identity. */
.mc-topbar .mc-workspace-pill .ws-queue-count {
    color: var(--mc-text-muted);
    font-weight: 500;
    margin-left: 2px;
    white-space: nowrap;
}

/* ADD HINT (2026-08-19, user): with one queue the pill read just "My Desk" and
   nothing suggested a team could be added , the count only renders above one.
   A quiet plus, brightening with the pill on hover. Not a button: the pill is
   already role="button" and nesting interactive elements breaks keyboard and
   screen-reader use, so this is a visual cue and the pill does the work. */
.mc-topbar .mc-workspace-pill .ws-add-hint {
    margin-left: 5px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    color: var(--mc-text-faint);
    transition: color 0.12s;
}
.mc-topbar .mc-workspace-pill:hover .ws-add-hint,
.mc-topbar .mc-workspace-pill[aria-expanded="true"] .ws-add-hint {
    color: var(--mc-brand);
}

/* Dropdown menu — positioned absolutely relative to the pill's
   containing flex row (mc-topbar-brand). Hidden by default; JS toggles
   the `is-open` class on click + Esc/outside-click to close. */
.mc-ws-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    /* Align with the pill's left edge. The pill is the 2nd child in the
       brand row; rough px offset accounts for the wordmark width. */
    left: 0;
    min-width: 260px;
    background: var(--mc-surface);
    border: 1px solid var(--mc-border);
    border-radius: var(--mc-r-md);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 100;
    display: none;
    overflow: hidden;
}
.mc-ws-dropdown.is-open { display: block; }
.mc-ws-dropdown-header {
    padding: 10px 14px 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--mc-text-faint);
    /* TYPO-UNIFY (2026-06-08): Plex extends from the wordmark
       into uppercase section labels. Body / labels stay Inter. */
    font-family: 'IBM Plex Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
.mc-ws-dropdown-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 9px 14px;
    font-size: var(--mc-text-sm);
    color: var(--mc-text);
    cursor: pointer;
    text-decoration: none;
    line-height: 1.4;
}
.mc-ws-dropdown-item:hover { background: var(--mc-surface-2); color: var(--mc-text-bright); }
.mc-ws-dropdown-item .left {
    display: inline-flex; align-items: center; gap: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mc-ws-dropdown-item .ws-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--mc-success);
    flex-shrink: 0;
}
.mc-ws-dropdown-item .qname {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* Cross-team hint on the pick-up card (2026-08-18). Quiet by default , it is a
   teaching line, not an action the page is asking for. */
.my-crossteam-hint {
    padding: 9px 14px; font-size: 11.5px; line-height: 1.5;
    color: var(--mc-text-faint); border-top: 1px solid var(--mc-border);
}
.my-crossteam-link {
    font: inherit; font-weight: 600; cursor: pointer;
    background: transparent; border: 0; padding: 0;
    color: var(--mc-brand-ink); text-decoration: underline;
}
[data-theme="dark"] .my-crossteam-link { color: var(--mc-brand); }

/* INLINE QUEUE PICKER (2026-08-18) , the My Desk dropdown does the whole job
   now instead of linking to Settings, which team members cannot open. */
.mc-ws-q-remove {
    flex: 0 0 auto;
    border: 0; background: transparent; cursor: pointer;
    color: var(--mc-text-faint);
    font-size: 15px; line-height: 1;
    padding: 2px 5px; border-radius: 4px;
    opacity: 0;                     /* revealed on row hover, like the list rows */
}
.mc-ws-q:hover .mc-ws-q-remove { opacity: 1; }
.mc-ws-q-remove:hover { color: var(--mc-danger, #dc2626); background: var(--mc-danger-soft, rgba(220,38,38,0.10)); }
.mc-ws-q-remove:focus-visible { opacity: 1; outline: 2px solid var(--mc-brand); outline-offset: 1px; }

.mc-ws-add-toggle {
    width: 100%; border: 0; background: transparent; text-align: left;
    font: inherit; font-size: var(--mc-text-sm);
    color: var(--mc-brand-ink);
    font-weight: 600;
}
[data-theme="dark"] .mc-ws-add-toggle { color: var(--mc-brand); }
.mc-ws-add-panel { padding: 4px 14px 12px; }
.mc-ws-add-input {
    width: 100%; box-sizing: border-box;
    padding: 7px 9px;
    font: inherit; font-size: var(--mc-text-sm);
    color: var(--mc-text-bright);
    background: var(--mc-surface);
    border: 1px solid var(--mc-border); border-radius: 7px;
}
.mc-ws-add-input:focus { outline: none; border-color: var(--mc-brand); }
.mc-ws-add-results { max-height: 190px; overflow-y: auto; margin-top: 6px; }
.mc-ws-add-results .row {
    padding: 7px 9px; border-radius: 6px; cursor: pointer;
    font-size: var(--mc-text-sm); color: var(--mc-text);
    display: flex; flex-direction: column; gap: 1px;
}
.mc-ws-add-results .row:hover { background: var(--mc-brand-soft); color: var(--mc-brand-ink); }
[data-theme="dark"] .mc-ws-add-results .row:hover { color: #fff; }
.mc-ws-add-results .row .sub { font-size: 10.5px; color: var(--mc-text-faint); }
.mc-ws-add-results .row.is-on { opacity: 0.5; cursor: default; }
.mc-ws-add-msg {
    margin-top: 7px; font-size: 11.5px; line-height: 1.45;
    color: var(--mc-text-muted);
}
.mc-ws-add-msg.is-error { color: var(--mc-danger, #dc2626); }

.mc-ws-dropdown-item .qgear {
    color: var(--mc-text-faint);
    text-decoration: none;
    font-size: 14px;
    padding: 2px 4px;
    border-radius: 4px;
}
.mc-ws-dropdown-item .qgear:hover {
    color: var(--mc-brand);
    background: var(--mc-brand-soft);
}
.mc-ws-dropdown-sep {
    height: 1px;
    background: var(--mc-border);
    margin: 4px 0;
}
.mc-ws-dropdown-add {
    color: var(--mc-brand);
    font-weight: 600;
}
.mc-ws-dropdown-add:hover { background: var(--mc-brand-soft); }
/* Phase 3: "+ Add queue" is intentionally disabled until Phase 4 wires
   up the inline SNOW group picker. The is-disabled state visually
   signals "you can see it but can't use it yet" + carries a "Soon"
   pill on the right. Pointer events are turned off so clicks no-op. */
.mc-ws-dropdown-add.is-disabled {
    color: var(--mc-text-faint);
    cursor: not-allowed;
    pointer-events: none;
    opacity: 0.65;
}
.mc-ws-dropdown-add.is-disabled:hover { background: transparent; }
.mc-ws-dropdown-soon {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 6px;
    border-radius: 8px;
    background: var(--mc-surface-3);
    color: var(--mc-text-faint);
}
.mc-ws-dropdown-empty {
    padding: 14px;
    text-align: center;
    font-size: 12px;
    color: var(--mc-text-faint);
    font-style: italic;
}

/* App wordmark in the topbar , matches the login page brand row
   exactly so users see one consistent identity from sign-in through
   every authenticated screen.

   2026-05-28 brand refresh: the lockup is a dark navy badge containing
   a white orbit glyph (SVG inlined in _shell.html), with "MISSION
   CONTROL" in IBM Plex Sans to the right. No shadow on the badge in
   chrome - looks heavy. Same shape as the hero badge on /login and on
   the SNOW OAuth consent screen, just scaled.

   2026-05-28 (PM) polish — Row 4 from
   mockups/preview-topbar-wordmark-options.html, picked by Shyam:
     - Badge bumped 40 -> 44px (orbit detail reads more legibly; the
       40px version felt small next to the wordmark text)
     - Glyph SVG inside the badge bumped 32 -> 36px (proportional to
       the new badge size, see _shell.html for the inlined width/height)
     - Wordmark goes 18px/600/1.5sp -> 22px/700/1px:
         · BIGGER  (18 -> 22px)  per Shyam's "make it pop more" feedback
         · BOLDER  (600 -> 700)  to give the wordmark presence at the
                                 larger size without feeling spindly
         · TIGHTER (1.5 -> 1px letter-spacing) — the wider it gets,
                                 the more 1.5px spacing reads as
                                 stretched; 1px keeps it legible
   Net lockup width grows ~6-8px; desk pill still fits comfortably at
   normal viewports (verified in preview-topbar-wordmark-options.html). */
.mc-brand-wordmark {
    /* ORBIT-REVERT (2026-06-08): the previous HEX+PULSE design used a
       dark navy badge container as a self-contained graphic. This
       revert drops the badge entirely — the orbit glyph and wordmark
       are now theme-aware ink shapes that sit directly on the topbar
       surface. Both elements inherit `color`, which the CSS rules
       below set per-theme: deep ocean (#1e3a8a) on light, white on
       dark. SVG fills + strokes use `currentColor` so a single color
       rule controls both elements.
       Inner gap scaled from 10px → 12px alongside the 2026-06-08
       proportional bump (22/30/12) so the orbit satellite doesn't
       crowd the M of MISSION. */
    display: inline-flex; align-items: center; gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
    /* Ink colour for the lockup — light theme default. The svg
       inherits this via currentColor; the wordmark inherits it via
       color: inherit. One rule controls both elements. */
    color: var(--mc-brand-ink);
}
.mc-brand-wordmark .brand-glyph {
    /* SQUARE-TILE (2026-06-12): the orbit glyph now sits in a deep-ocean
       rounded-square tile (app-icon look, matches the navy assistant
       bubble). The tile is ALWAYS navy with a WHITE glyph on both
       themes, so color:#fff here overrides the theme-aware ink that
       .mc-brand-wordmark sets (otherwise the glyph would be navy-on-navy
       on light). The wordmark text keeps the theme ink via its own
       color:inherit. Supersedes the 2026-06-08 badge-less revert. */
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    width: 38px; height: 38px;
    border-radius: 10px;
    background: var(--mc-brand-ink);
    color: #ffffff;
}
.mc-brand-wordmark .brand-glyph svg { display: block; width: 24px; height: 24px; }
/* On dark the navy tile can blend into the chrome; a hairline ring
   keeps its edge crisp. */
:root[data-theme="dark"] .mc-brand-wordmark .brand-glyph {
    box-shadow: 0 0 0 1px rgba(255,255,255,0.14);
}
.mc-brand-wordmark .brand-text {
    font-family: 'IBM Plex Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 1.3px;
    /* inherit the wordmark ink from .mc-brand-wordmark (which the
       theme rule below flips). */
    color: inherit;
    line-height: 1;
    white-space: nowrap;
    text-transform: uppercase;
}
/* ORBIT-REVERT (2026-06-08): dark theme flips the lockup ink from
   deep ocean to white. Both the SVG (via currentColor) and the
   wordmark (via color: inherit) follow. Replaces the previous
   wordmark-only inversion that was needed when the badge was a
   self-contained dark graphic. */
:root[data-theme="dark"] .mc-brand-wordmark { color: #ffffff; }
/* Mobile: drop the wordmark text, keep just the glyph as a tiny
   home affordance. The glyph itself stays the same size — no
   badge container to resize anymore. */
@media (max-width: 768px) {
    .mc-brand-wordmark .brand-text { display: none; }
    .mc-brand-wordmark { gap: 0; }
}

/* Top-bar search (D8). Pill-shaped, subtle, modern. The icon and the
   ⌘K hint live INSIDE the input visually (input has padding to make room).
   Subtle surface-2 background by default; brand glow on focus.

   2026-05-14: kept the original flex-flow positioning. An earlier attempt
   to absolute-position the search at left:50% pushed it off-screen at
   typical viewport widths because the calc() reservation didn't match
   the actual left/right cluster sizes. Reverted; true centering needs
   a structural switch to CSS Grid on the topbar (planned for Phase 4
   polish). The slight rightward drift from flex space-between with
   uneven left/right clusters is acceptable for now. */
.mc-topbar-search {
    position: relative;
    /* Phase 4d (2026-05-14): now a grid item (middle column = auto)
       on the topbar grid, so flex sizing is ignored. Explicit width
       gives the auto column predictable size; the surrounding 1fr
       slots absorb leftover space symmetrically and keep this input
       at the topbar's true center. min/max-width let it breathe on
       narrower viewports without collapsing past usability. */
    width: 380px;
    min-width: 220px;
    max-width: 380px;
    margin: 0;
}
.mc-topbar-search input {
    width: 100%;
    height: 34px;
    padding: 0 56px 0 38px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--mc-surface-2);
    color: var(--mc-text-bright);
    font: inherit;
    font-size: var(--mc-text-sm);
    transition: background .12s, border-color .12s, box-shadow .12s;
}
.mc-topbar-search input:hover {
    background: var(--mc-surface-3);
}
.mc-topbar-search input:focus {
    outline: none;
    border-color: var(--mc-brand);
    box-shadow: 0 0 0 3px var(--mc-brand-soft);
    background: var(--mc-surface);
}
.mc-topbar-search input::placeholder { color: var(--mc-text-faint); }
.mc-topbar-search .search-icon {
    position: absolute; left: 14px; top: 50%;
    transform: translateY(-50%);
    color: var(--mc-text-faint);
    pointer-events: none;
}
.mc-topbar-search kbd {
    position: absolute; right: 8px; top: 50%;
    transform: translateY(-50%);
    font-family: 'Inter', ui-sans-serif, system-ui;
    font-size: 10px; font-weight: 600;
    color: var(--mc-text-faint);
    padding: 0;
    background: transparent;
    border: none;
    pointer-events: none;
    letter-spacing: 0.5px;
}
.mc-topbar .mc-workspace-pill:hover { border-color: var(--mc-border-2); }
.ws-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--mc-brand); display: inline-block; }
/* Mobile: collapse the pill to a small colored block with initials.
   Slack/Discord pattern - identifies the workspace, lets you switch on tap,
   doesn't eat 200px of topbar real estate. */
@media (max-width: 768px) {
    .mc-topbar .mc-workspace-pill {
        max-width: none;
        padding: 0;
        background: var(--mc-brand);
        border-color: var(--mc-brand);
        color: #fff;
        width: 32px; height: 32px;
        border-radius: 8px;
        justify-content: center;
        font-weight: 700;
        font-size: 12px;
        letter-spacing: 0.5px;
    }
    .mc-topbar .mc-workspace-pill .ws-dot,
    .mc-topbar .mc-workspace-pill .ws-full,
    .mc-topbar .mc-workspace-pill .ws-queue-count,
    /* The narrow pill collapses to initials only, so the add hint goes too ,
       it would sit next to a two-letter badge and read as punctuation. */
    .mc-topbar .mc-workspace-pill .ws-add-hint,
    .mc-topbar .mc-workspace-pill .ws-chev { display: none; }
    .mc-topbar .mc-workspace-pill::before {
        content: attr(data-ws-initials);
    }
}
.mc-topbar-right {
    /* Phase 4d (2026-05-14): hug the right edge of the third grid
       column on .mc-topbar (which is 1fr — wider than this cluster's
       intrinsic width). Without justify-self the cluster would sit at
       the left edge of that column, leaving a gap on the right. */
    justify-self: end;
    display: flex; align-items: center; gap: 8px;
}
/* Post-Phase 4 polish (2026-05-14): the user-menu is a real
   dropdown now. Wrap is position:relative so the menu anchors to the
   button's right edge. The button itself is the existing pill-style
   thing; clicking it toggles the dropdown. */
.mc-user-menu-wrap {
    position: relative;
    display: inline-flex;
}
.mc-user-menu {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 4px 10px 4px 4px;
    border-radius: 999px;
    cursor: pointer;
    background: transparent;
    border: 1px solid transparent;
    color: inherit;
    font: inherit;
}
.mc-user-menu-clickable {
    transition: background-color .12s, border-color .12s;
}
.mc-user-menu:hover,
.mc-user-menu-clickable:hover { background: var(--mc-surface-2); }
.mc-user-menu-clickable[aria-expanded="true"] {
    background: var(--mc-surface-2);
    border-color: var(--mc-border);
}
.mc-user-menu-caret {
    color: var(--mc-text-faint);
    transition: transform .15s, color .12s;
}
.mc-user-menu-clickable[aria-expanded="true"] .mc-user-menu-caret {
    transform: rotate(180deg);
    color: var(--mc-brand);
}
.mc-avatar {
    width: 30px; height: 30px;
    border-radius: 50%;
    /* Brand mark colour (deep ocean), NOT the interactive --mc-brand,
       so the avatar matches the badge tile / wordmark / assistant. */
    background: var(--mc-brand-ink);
    color: #fff;
    font-weight: 700; font-size: 12px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

/* Dropdown menu — anchors to the button's right edge so it doesn't
   spill off the right side of the topbar. */
.mc-user-menu-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 240px;
    background: var(--mc-surface);
    border: 1px solid var(--mc-border);
    border-radius: var(--mc-r-md);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 100;
    display: none;
    overflow: hidden;
    padding: 6px 0;
}
.mc-user-menu-dropdown.is-open { display: block; }
.mc-user-menu-header {
    padding: 8px 14px 10px;
}
.mc-user-menu-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--mc-text-bright);
    line-height: 1.3;
}
.mc-user-menu-email {
    font-size: 11px;
    color: var(--mc-text-muted);
    margin-top: 2px;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 220px;
}
.mc-user-menu-sep {
    height: 1px;
    background: var(--mc-border);
    margin: 4px 0;
}
.mc-user-menu-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 14px;
    color: var(--mc-text);
    text-decoration: none;
    font-size: 13px;
    transition: background-color .1s, color .1s;
}
.mc-user-menu-item:hover {
    background: var(--mc-surface-2);
    color: var(--mc-text-bright);
}
.mc-user-menu-item svg {
    color: var(--mc-text-muted);
    flex-shrink: 0;
}
.mc-user-menu-item:hover svg {
    color: var(--mc-text-bright);
}
.mc-user-menu-item-danger {
    color: var(--mc-danger);
}
.mc-user-menu-item-danger:hover {
    background: var(--mc-danger-soft, rgba(220, 38, 38, 0.08));
    color: var(--mc-danger);
}
.mc-user-menu-item-danger svg {
    color: var(--mc-danger);
}
.mc-user-menu-item-danger:hover svg {
    color: var(--mc-danger);
}

.mc-main {
    grid-area: main;
    /* RAIL-LAYOUT (browser-test): top padding shrunk from 24px to
       8px so the page heading sits closer to the topbar. The 24px
       was creating a visible grey gap between topbar and content
       that read as "wasted space". */
    padding: 8px 32px 64px;
    overflow-y: auto;
}

/* Page-level header inside main */
.mc-page-header {
    display: flex; justify-content: space-between; align-items: flex-end;
    gap: 24px;
    margin-bottom: 20px;
}
.mc-page-header h1 {
    font-size: var(--mc-text-2xl);
    margin-bottom: 4px;
}
.mc-page-header .subtitle {
    color: var(--mc-text-muted);
    font-size: var(--mc-text-sm);
}

/* Stat tile */
.mc-stat {
    background: var(--mc-surface);
    border: 1px solid var(--mc-border);
    border-radius: var(--mc-r-md);
    padding: 16px 20px;
}
.mc-stat .label {
    font-size: var(--mc-text-xs);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--mc-text-muted);
    font-weight: 700;
    margin-bottom: 4px;
    /* TYPO-UNIFY (2026-06-08): Plex extends from the wordmark
       into uppercase section labels. Body / labels stay Inter. */
    font-family: 'IBM Plex Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
.mc-stat .value {
    font-size: var(--mc-text-2xl);
    font-weight: 700;
    color: var(--mc-text-bright);
    line-height: 1.1;
}
.mc-stat .delta {
    font-size: var(--mc-text-xs);
    color: var(--mc-text-muted);
    margin-top: 4px;
}

/* Microsoft logo for SSO button */
.ms-logo { width: 18px; height: 18px; }

/* ─── Responsive breakpoints ──────────────────────────────────────
   Mobile-first means we keep the desktop styles as the default
   (this app is desktop-heavy) and progressively *simplify* for
   smaller screens. Three breakpoints:
     <=1024px  → rail collapses to hamburger overlay; topbar trims
     <=768px   → cards stack, tables horizontal-scroll, rail-overlay full
     <=480px   → typography tightens, page padding shrinks
*/

/* Phone , rail collapses to overlay only on real mobile, not tablets/laptops.
   This keeps the persistent left bar visible on the Report and other pages
   even when they're rendered in narrow preview panels. */
@media (max-width: 768px) {
    :root {
        --mc-rail-w: 0px;  /* rail hidden by default; toggled open as overlay */
    }
    .mc-rail {
        position: fixed;
        left: 0; top: 0;
        width: 220px;  /* expanded width when overlay is open */
        height: 100vh;
        background: var(--mc-chrome);
        border-right: 1px solid var(--mc-border);
        z-index: 100;
        transform: translateX(-100%);
        transition: transform .18s ease;
        align-items: stretch;
        padding: 12px 8px;
    }
    .mc-rail.open { transform: translateX(0); box-shadow: var(--mc-shadow-lg); }
    .mc-rail-item {
        width: auto; height: auto;
        padding: 10px 14px;
        justify-content: flex-start;
        gap: 12px;
    }
    /* Mobile: inline labels render via the same .rail-label span used on
       desktop. Old ::after { content: attr(title) } pseudo-label was
       redundant once the labeled-rail layout shipped (it would echo the
       full title attribute alongside the label). */

    /* Hamburger trigger lives in the topbar */
    .mc-app { grid-template-columns: 1fr; grid-template-areas: "topbar" "main"; }
    .mc-rail-overlay {
        position: fixed; inset: 0; background: rgba(0,0,0,0.4);
        z-index: 99; opacity: 0; pointer-events: none;
        transition: opacity .18s;
    }
    .mc-rail-overlay.show { opacity: 1; pointer-events: auto; }

    /* Show hamburger button (desktop hides it) */
    .mc-hamburger { display: inline-flex !important; }
}

/* Mobile (≤768px) , proper mobile layout, NOT just "stack everything" */
@media (max-width: 768px) {
    /* Prevent any element from forcing horizontal overflow */
    html, body { overflow-x: hidden; }

    /* Topbar trims hard on mobile */
    .mc-topbar { padding: 0 12px; gap: 8px; }
    .mc-topbar .mc-page-title { font-size: var(--mc-text-md); }
    /* Workspace pill - compact: dot + name only, no chevron, truncate name */
    .mc-topbar .mc-workspace-pill {
        padding: 4px 10px; font-size: var(--mc-text-xs);
        max-width: 140px;
        overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
        flex-shrink: 1; min-width: 0;
    }
    .mc-topbar .mc-workspace-pill svg { display: none; }
    /* Hide connection chip on mobile - it's a "nice to know" */
    .connection-chip { display: none !important; }
    /* Topbar search collapses to an icon-only button on mobile.
       Phase 4d (2026-05-14): topbar is now CSS Grid so flex sizing is
       inert here — set explicit width/min-width to override the desktop
       380px and let the search column shrink to a 38px icon. */
    .mc-topbar-search {
        width: 38px;
        min-width: 38px;
        max-width: 38px;
        margin: 0;
    }
    .mc-topbar-search input {
        width: 38px; height: 38px;
        padding: 0;
        cursor: pointer;
        background: transparent;
        border-color: transparent;
        font-size: 0;
    }
    .mc-topbar-search input::placeholder { color: transparent; }
    .mc-topbar-search .search-icon { left: 50%; transform: translate(-50%, -50%); }
    .mc-topbar-search kbd { display: none; }
    /* User menu: avatar only, no name, no chevron */
    .mc-user-menu .mc-text-sm { display: none; }
    .mc-user-menu svg:last-child { display: none; }
    .mc-user-menu { padding: 4px; }
    /* Role tag hidden on mobile - role is implicit from what the user
       sees (My Work vs Triage). The badge was crowding the topbar. */
    .role-tag { display: none !important; }

    /* Page title doesn't wrap - it stays one line and the workspace
       pill shrinks/truncates around it. */
    .mc-topbar .mc-page-title { white-space: nowrap; }

    /* Main content padding tightens */
    .mc-main { padding: 14px 12px 60px; }

    /* Page header */
    .mc-page-header { flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 14px; }
    .mc-page-header h1 { font-size: var(--mc-text-xl); }
    .mc-page-header .subtitle { font-size: var(--mc-text-xs); }

    /* STATS: 2-column grid on mobile for ALL stat-row variants. Covers
       stats-row, cards-row, stats-row6 (top KPIs), and stats-and-azdo
       (the row that pairs the 3 KPIs with the AZDO donut). All tiles
       become 1 cell each; the AZDO card spans both columns of one row
       so the donut still fits. */
    .stats-row, .cards-row, .stats-row6, .stats-and-azdo {
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
        margin-bottom: 14px !important;
    }
    .stats-and-azdo > .azdo-card { grid-column: span 2 !important; }
    /* Team workload + Top closers side-by-side stacks on mobile */
    .pulse-pair { grid-template-columns: 1fr !important; }
    /* Compact stat tile */
    .mc-stat {
        padding: 10px 12px;
        border-radius: var(--mc-r-sm);
    }
    .mc-stat .label { font-size: 9px; margin-bottom: 2px; }
    .mc-stat .value { font-size: 22px; }
    .mc-stat .delta { font-size: 10px; margin-top: 2px; }

    /* Other grids that should still stack (workload split, settings layout, etc.) */
    .split-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    /* Section cards tighten up */
    .section-card, .mc-card {
        padding: 12px 14px;
        margin-bottom: 12px;
        border-radius: var(--mc-r-sm);
    }
    .section-card-head { margin-bottom: 8px; }

    /* Tables horizontal-scroll inside their card */
    .mc-table, table.mc-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        font-size: var(--mc-text-xs);
    }
    .mc-table th, .mc-table td { padding: 8px 10px; }

    /* Compact welcome / hero row on dashboards */
    .welcome-row {
        padding: 12px 14px !important;
        margin-bottom: 12px !important;
        gap: 10px !important;
    }
    .welcome-row .avatar { width: 36px !important; height: 36px !important; font-size: 13px !important; }
    .welcome-row h2 { font-size: var(--mc-text-md) !important; }
    .welcome-row p { font-size: var(--mc-text-xs) !important; line-height: 1.4 !important; }

    /* Auth-flow hero cards */
    .mc-card-hero {
        padding: 28px 20px;
        border-radius: var(--mc-r-md);
    }

    /* Command bar: hide kbd hint, smaller padding */
    .command-bar { padding: 6px 8px !important; margin-bottom: 12px !important; }
    .command-bar kbd { display: none; }

    /* Bigger touch targets where they matter (real buttons) */
    .mc-btn { min-height: 38px; }
    .mc-btn-icon { width: 38px; height: 38px; min-height: 0; }
    .mc-btn-sm { min-height: 30px; padding: 4px 10px; }
}

/* Tiny phones (≤480px) , smaller stats stay 2-col but go even denser */
@media (max-width: 480px) {
    h1 { font-size: var(--mc-text-lg); }
    .mc-stat { padding: 8px 10px; }
    .mc-stat .value { font-size: 18px; }
    .mc-stat .label { font-size: 9px; letter-spacing: 0.3px; }
    .mc-stat .delta { display: none; }  /* keep just label + value on tiny screens */
    .mc-main { padding: 10px 8px 60px; }
    .stats-row { gap: 6px !important; }
}

/* Hamburger is hidden by default (desktop), shown by responsive rules above */
.mc-hamburger { display: none; }


/* ── A11y additions (bugs B-CSS5 / B-CSS6 / B-CSS8 / B-CSS9) ─────── */

/* B-CSS5: Skip-to-main-content link. Hidden until focused; lets
   keyboard users bypass the rail + topbar. */
.mc-skip-link {
    position: absolute;
    top: -40px;
    left: 8px;
    z-index: 10000;
    padding: 8px 14px;
    background: var(--mc-brand);
    color: #fff;
    text-decoration: none;
    border-radius: var(--mc-r-sm);
    font-weight: 600;
    transition: top 0.12s ease-out;
}
.mc-skip-link:focus {
    top: 8px;
}

/* B-CSS8: Visible focus indicator on interactive elements that
   previously suppressed `outline: none` without providing a
   replacement focus signal. :focus-visible (not :focus) means mouse
   users don't see the ring on click but keyboard users always do. */
.filter-pill:focus-visible,
.mc-rail-item:focus-visible,
.mc-list-filter-pill:focus-visible,
.mc-list-type-pill:focus-visible,
.mc-tabs button:focus-visible,
.mc-people-list .item:focus-visible,
.mc-search-results .item:focus-visible,
button.mc-btn-icon:focus-visible,
button.icon-btn:focus-visible,
button.close-btn:focus-visible {
    outline: 2px solid var(--mc-brand);
    outline-offset: 2px;
    border-radius: var(--mc-r-xs, 3px);
}

/* B-CSS6: Layout for screens below 380px (foldables, very old phones).
   The 480px breakpoint above already adjusts a few things; this adds
   a safety net for ultra-narrow widths so .kpi tiles can shrink. */
@media (max-width: 380px) {
    .mc-stat,
    .kpi {
        flex-basis: 100% !important;
        min-width: 0;
    }
    .mc-main {
        padding-left: 4px;
        padding-right: 4px;
    }
}

/* B-CSS9: Use semantic colour tokens for status-pill text so dark
   theme picks up the inverted palette. The hardcoded color values
   in template inline styles still need replacing (tracked separately
   by the templates that use them); this is the design-system-side
   fallback. */
.priority-pill[data-pri="1"], .pri.p1   { color: var(--mc-danger); }
.priority-pill[data-pri="2"], .pri.p2   { color: var(--mc-warn); }
.priority-pill[data-pri="3"], .pri.p3   { color: var(--mc-info); }
.priority-pill[data-pri="4"], .pri.p4   { color: var(--mc-text-muted); }
.priority-pill[data-pri="5"], .pri.p5   { color: var(--mc-text-faint); }

/* B-CSS10: avatar pill wrap-protection on long names in topbar.
   `.mc-user-menu` is `display: inline-flex` , without min-width: 0
   the username span couldn't shrink-and-ellipsis on tablets. */
.mc-user-menu {
    flex-shrink: 1;
    min-width: 0;
}
.mc-user-menu .mc-text-sm {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

/* B-CSS11: scrollbar-gutter reserves space so the rightmost column
   of the list flyout doesn't get clipped by a Windows-style
   persistent scrollbar. */
.mc-list-body {
    scrollbar-gutter: stable;
}

/* SCROLLBAR-TINT (2026-06-04, revision 2): on Windows the default
   scrollbar track is near-white (~#f0f0f0), which presses against our
   slightly bluer --mc-bg (#f1f5f9) and reads as a "white strip" running
   down the right edge of /pulse. Style the track + thumb to use page
   tokens so the strip disappears. Also explicitly background .mc-main
   in case any browser falls back to the parent's bg for the gutter
   region. Tokens auto-adapt for the dark theme. */
.mc-main {
    background: var(--mc-bg);
}
html, body, .mc-main, .mc-list-body, .mc-detail-body {
    scrollbar-color: var(--mc-border-2) var(--mc-bg);   /* Firefox + modern Chromium */
    scrollbar-width: auto;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar,
.mc-main::-webkit-scrollbar,
.mc-list-body::-webkit-scrollbar,
.mc-detail-body::-webkit-scrollbar,
*::-webkit-scrollbar {
    width: 12px;
    height: 12px;
    background: var(--mc-bg);
}
html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track,
.mc-main::-webkit-scrollbar-track,
.mc-list-body::-webkit-scrollbar-track,
.mc-detail-body::-webkit-scrollbar-track,
*::-webkit-scrollbar-track {
    background: var(--mc-bg) !important;
}
html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
.mc-main::-webkit-scrollbar-thumb,
.mc-list-body::-webkit-scrollbar-thumb,
.mc-detail-body::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-thumb {
    background: var(--mc-border-2);
    border-radius: 6px;
}
*::-webkit-scrollbar-thumb:hover {
    background: var(--mc-text-faint);
}
*::-webkit-scrollbar-corner {
    background: var(--mc-bg);
}

/* ─── Customization preferences (Wave 8 / PMC-CUSTOM1) ────────────────
   Wired via mc_user_prefs in localStorage + applyMcPrefs() in _shell.html.
   Density and reduce_motion render as classes on <body> / <html>. */

/* Compact density: tighter card padding, smaller card titles, denser rows.
   Targets the most visual elements without rewriting every component. */
body.mc-density-compact .mc-card,
body.mc-density-compact .mc-cardlib-tile,
body.mc-density-compact .field-card {
    padding: 12px 14px;
}
body.mc-density-compact .mc-tickets-table td,
body.mc-density-compact .mc-tickets-table th {
    padding: 6px 8px;
    font-size: 12px;
}
body.mc-density-compact .kpi {
    padding: 12px 14px;
}
body.mc-density-compact h2,
body.mc-density-compact .mc-card h3 {
    font-size: 14px;
}

/* Spacious density: more breathing room. */
body.mc-density-spacious .mc-card,
body.mc-density-spacious .mc-cardlib-tile,
body.mc-density-spacious .field-card {
    padding: 24px 26px;
}
body.mc-density-spacious .mc-tickets-table td,
body.mc-density-spacious .mc-tickets-table th {
    padding: 14px 14px;
}
body.mc-density-spacious .kpi {
    padding: 24px 22px;
}

/* Reduce motion: kill animations + transitions globally. Honours the
   accessibility preference for users sensitive to motion , also kicks
   in when the OS has prefers-reduced-motion set (defence in depth). */
html.mc-reduce-motion *,
html.mc-reduce-motion *::before,
html.mc-reduce-motion *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

/* USAGE-TELEMETRY REMOVED (2026-08-11): telemetry-card styles deleted. */

