/* =============================================================================
   MNPS Action Tracker — liquid-glass design system v2
   -----------------------------------------------------------------------------
   Dark-first. Floating glass panels with gradient light edges, specular sheens,
   layered depth shadows, and an animated teal/gold ambient field behind it all.
   Brand: Metro Nashville Public Schools — teal + gold.
   Theming via <html data-theme="dark|light"> (dark is the default).
   ============================================================================= */

:root {
    /* Brand constants — azure + gold, matched to the district wallpaper artwork */
    --mnps-teal: #1E7CB8;
    --mnps-gold: #F2AE1C;

    --blur: blur(18px) saturate(1.5);
    --blur-soft: blur(12px) saturate(1.4);
    --r-lg: 24px;
    --r-md: 18px;
    --r-sm: 14px;
}

/* ------------------------------- DARK (default) --------------------------- */
:root,
:root[data-theme="dark"] {
    --bg-base: #070d17;
    --text: #EAF3F9;
    --text-muted: #8FA7B8;
    --border: rgba(255, 255, 255, .09);

    --glass: rgba(17, 32, 48, .52);
    --glass-strong: rgba(23, 41, 60, .72);
    --glass-soft: rgba(17, 32, 48, .32);
    --edge-hi: rgba(255, 255, 255, .30);
    --edge-lo: rgba(255, 255, 255, .05);
    --sheen: rgba(255, 255, 255, .09);
    --inner-light: rgba(255, 255, 255, .13);

    --shadow-1: 0 1px 2px rgba(0, 0, 0, .38), 0 14px 36px -8px rgba(0, 0, 0, .58);
    --shadow-2: 0 3px 6px rgba(0, 0, 0, .45), 0 28px 68px -12px rgba(0, 0, 0, .72);

    --primary: #4AA3E0;
    --primary-hover: #6DB9EC;
    --primary-soft: rgba(74, 163, 224, .17);
    /* wallpaper fade veils — heavy enough that content stays razor legible */
    --bg-veil: rgba(5, 10, 18, .87);
    --bg-veil-2: rgba(5, 10, 18, .94);
    --bg-veil-auth: rgba(5, 10, 18, .78);
    --bg-veil-auth-2: rgba(5, 10, 18, .88);
    --gold: #F5B62E;
    --gold-soft: rgba(245, 182, 46, .16);
    --danger: #F26F68;
    --danger-soft: rgba(242, 111, 104, .15);

    --sidebar-text: #94ACBC;
    --sidebar-text-active: #FFFFFF;

    --st-new: #4AA3E0;
    --st-progress: #F5B62E;
    --st-blocked: #F26F68;
    --st-done: #47C489;
    --st-cancelled: #7F96A3;
    --st-await: #A78BFA;
    --st-warn: #FF9F43;      /* delivery "about to be late" — orange, NOT brand gold */
    --plate-glow: #5E82FF;   /* neutral project-plate halo (no health verdict) */

    --pr-low: #7F96A3;
    --pr-medium: #4AA3E0;
    --pr-high: #F2913E;
    --pr-critical: #F26F68;

    --orb-teal: rgba(30, 124, 184, .28);
    --orb-gold: rgba(242, 174, 28, .17);
    --dots: rgba(255, 255, 255, .05);

    /* near-opaque glass for high-count scroll-path elements (no backdrop-filter) */
    --glass-opaque-top: rgba(27, 45, 64, .92);
    --glass-opaque: rgba(18, 32, 47, .92);
}

/* --------------------------------- LIGHT ---------------------------------- */
:root[data-theme="light"] {
    --bg-base: #E7EFF5;
    --text: #0D2836;
    --text-muted: #4D6B7C;
    --border: rgba(13, 60, 84, .13);

    --glass: rgba(255, 255, 255, .58);
    --glass-strong: rgba(255, 255, 255, .80);
    --glass-soft: rgba(255, 255, 255, .40);
    --edge-hi: rgba(255, 255, 255, .95);
    --edge-lo: rgba(255, 255, 255, .30);
    --sheen: rgba(255, 255, 255, .35);
    --inner-light: rgba(255, 255, 255, .85);

    --shadow-1: 0 1px 2px rgba(10, 55, 75, .09), 0 14px 36px -8px rgba(10, 55, 75, .20);
    --shadow-2: 0 3px 6px rgba(10, 55, 75, .12), 0 28px 68px -12px rgba(10, 55, 75, .30);

    --primary: #1D6FA8;
    --primary-hover: #16577F;
    --primary-soft: rgba(29, 111, 168, .14);
    --bg-veil: rgba(231, 239, 245, .93);
    --bg-veil-2: rgba(231, 239, 245, .965);
    --bg-veil-auth: rgba(231, 239, 245, .88);
    --bg-veil-auth-2: rgba(231, 239, 245, .94);
    --gold: #E7A414;
    --gold-soft: rgba(231, 164, 20, .18);
    --danger: #D4403A;
    --danger-soft: rgba(212, 64, 58, .12);

    --sidebar-text: #3D5D6C;
    --sidebar-text-active: #0D2836;

    --st-new: #1E7CB8;
    --st-progress: #DD9A10;
    --st-blocked: #DE4B45;
    --st-done: #2E9E68;
    --st-cancelled: #7E95A2;
    --st-await: #7C5CD6;
    --st-warn: #E07B1A;
    --plate-glow: #1E3C78;

    --pr-low: #7E95A2;
    --pr-medium: #1E7CB8;
    --pr-high: #DE7B12;
    --pr-critical: #DE4B45;

    --orb-teal: rgba(30, 124, 184, .24);
    --orb-gold: rgba(242, 174, 28, .30);
    --dots: rgba(13, 60, 84, .06);

    --glass-opaque-top: rgba(255, 255, 255, .96);
    --glass-opaque: rgba(247, 250, 253, .93);
}

/* ---------- typography: Poppins (self-hosted, latin subset) ---------- */

@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/poppins-400.woff2') format('woff2');
}

@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/poppins-500.woff2') format('woff2');
}

@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/poppins-600.woff2') format('woff2');
}

@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/poppins-700.woff2') format('woff2');
}

@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url('../fonts/poppins-800.woff2') format('woff2');
}

/* ---------- base ---------- */

* { box-sizing: border-box; }

html { font-size: 16px; }

body {
    margin: 0;
    font-family: 'Poppins', 'Segoe UI Variable Text', 'Segoe UI', system-ui,
        -apple-system, 'Helvetica Neue', sans-serif;
    background: var(--bg-base);
    color: var(--text);
    transition: color .35s ease;
    min-height: 100vh;
    /* dvh tracks the phone browser's collapsing toolbar so fixed-bottom UI
       (the tab bar) never plays hide-and-seek during scroll */
    min-height: 100dvh;
}

/* District wallpaper + veil + dot grid: one STATIC composited fixed layer.
   (background-attachment: fixed forces full repaints on scroll — this doesn't.) */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        radial-gradient(var(--dots) 1px, transparent 1.5px) 0 0 / 28px 28px,
        linear-gradient(180deg, var(--bg-veil), var(--bg-veil-2)),
        url('../img/brand-bg.svg') center / cover no-repeat;
    transform: translateZ(0);
}

/* Ambient orbs drift on the compositor (transform-only animation) */
body::after {
    content: "";
    position: fixed;
    inset: -14%;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(52rem 38rem at 12% 4%, var(--orb-teal), transparent 62%),
        radial-gradient(46rem 34rem at 90% -6%, var(--orb-gold), transparent 60%),
        radial-gradient(56rem 42rem at 80% 98%, var(--orb-teal), transparent 62%),
        radial-gradient(38rem 30rem at -2% 84%, var(--orb-gold), transparent 58%);
    animation: ambient-drift 46s ease-in-out infinite alternate;
}

@keyframes ambient-drift {
    to { transform: translate3d(3%, -2.5%, 0) scale(1.07); }
}

@media (prefers-reduced-motion: reduce) {
    body::before { animation: none; }
}

h1 { font-size: 1.85rem; margin: 0; letter-spacing: -.015em; font-weight: 700; }
h1:focus { outline: none; }
h2 { font-size: 1.25rem; margin: 1.8rem 0 .9rem; letter-spacing: -.015em; font-weight: 700; }
h3 { font-size: 1.05rem; margin: 0; font-weight: 700; }
a { color: var(--primary); text-decoration: none; }
pre { white-space: pre-wrap; word-break: break-word; margin: 0; font-size: .88rem; }
code { background: var(--glass-soft); padding: .12em .45em; border-radius: 6px; }

::selection { background: var(--gold-soft); }

.muted { color: var(--text-muted); font-size: .89rem; }
.page-subtitle { margin: .35rem 0 0; color: var(--text-muted); font-size: .98rem; }

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 6px;
}

/* =============================== GLASS CORE ===============================
   Panels: translucent gradient fill + gradient light edge (border-box trick)
   + inset top light + layered drop shadows + diagonal specular sheen.      */

.card,
.sidebar,
.quick-add,
.toast,
.modal,
.auth-card,
.item-row,
.project-chip,
.stat-tile,
.empty-state,
.error-panel,
.skeleton-row {
    position: relative;
    border: 1px solid transparent;
    background:
        linear-gradient(180deg,
            color-mix(in srgb, var(--glass-strong) 55%, transparent),
            var(--glass)) padding-box,
        linear-gradient(150deg, var(--edge-hi), var(--edge-lo) 45%, var(--edge-lo)) border-box;
    -webkit-backdrop-filter: var(--blur);
    backdrop-filter: var(--blur);
    box-shadow: inset 0 1px 0 var(--inner-light), var(--shadow-1);
}

/* Specular sheen sweep across the top of every panel */
.card::before,
.sidebar::before,
.quick-add::before,
.toast::before,
.modal::before,
.auth-card::before,
.item-row::before,
.stat-tile::before,
.empty-state::before,
.error-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(120deg, var(--sheen), transparent 40%);
    pointer-events: none;
}

/* PERF: high-count elements in the scroll path use near-opaque glass instead of
   backdrop-filter — visually near-identical, dramatically cheaper to scroll. */
.item-row,
.project-chip,
.stat-tile,
.skeleton-row {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background:
        linear-gradient(180deg, var(--glass-opaque-top), var(--glass-opaque)) padding-box,
        linear-gradient(150deg, var(--edge-hi), var(--edge-lo) 45%, var(--edge-lo)) border-box;
}

/* PERF: small numerous controls skip backdrop-filter too */
.btn,
.btn-icon,
.input,
.pill,
.team-chip,
.bug-button,
.bug-nav,
.date-field,
.section-divider-label {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .card, .sidebar, .quick-add, .toast, .modal, .auth-card, .item-row,
    .project-chip, .stat-tile, .empty-state, .error-panel, .skeleton-row,
    .input, .btn, .btn-icon, .pill {
        background: var(--glass-strong);
    }
}

/* ---------- app shell ---------- */

.app-shell {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh; /* same toolbar-tracking rule as body */
}

.app-main { flex: 1; min-width: 0; }

.float-controls {
    position: fixed;
    top: 22px;
    right: 26px;
    z-index: 60;
    display: flex;
    gap: .6rem;
}

.content {
    /* extra top clearance for the floating user chip / theme toggle */
    padding: 5.6rem 2.6rem 3.2rem;
    max-width: 1220px;
    margin: 0 auto;
    animation: page-in .32s cubic-bezier(.22, .9, .35, 1);
}

@keyframes page-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}

.page-loading {
    display: grid;
    place-items: center;
    min-height: 50vh;
    color: var(--text-muted);
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.page-header-actions { display: flex; gap: .55rem; }

/* Action row below a page header — keeps buttons clear of the floating top bar */
.page-toolbar {
    display: flex;
    justify-content: flex-end;
    gap: .55rem;
    margin: -.5rem 0 1.1rem;
}
.breadcrumb { font-size: .88rem; color: var(--text-muted); }
.breadcrumb:hover { color: var(--primary); }

/* ---------- floating island sidebar ---------- */

.sidebar {
    width: 282px;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
    align-self: flex-start;
    height: calc(100vh - 40px);
    margin: 20px 0 20px 20px;
    border-radius: 28px;
    display: flex;
    flex-direction: column;
    z-index: 30;
    overflow: hidden;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: 1.35rem 1.3rem 1.1rem;
}

.logo-img {
    width: 46px;
    height: 46px;
    display: block;
    filter: drop-shadow(0 3px 8px rgba(6, 30, 45, .45));
}

.logo-text { display: flex; flex-direction: column; line-height: 1.25; gap: .06rem; }

.logo-text strong {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: .06em;
    color: var(--text);
}

.logo-text small {
    font-size: .64rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .22em;
    color: var(--gold);
    white-space: nowrap;
}

.sidebar-nav {
    flex: 1;
    padding: .6rem .85rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
}

.nav-section {
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .14em;
    padding: 1.25rem .8rem .4rem;
    color: var(--text-muted);
    opacity: .75;
}

.nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .68rem .85rem;
    border-radius: 14px;
    color: var(--sidebar-text);
    font-size: .98rem;
    font-weight: 500;
    transition: background-color .18s ease, color .18s ease, transform .18s ease,
        box-shadow .18s ease;
}

/* v2.23 (Luke): nav icons breathe gently and continually; the icon for the page
   you're ON magnifies (Apple-dock style) and colorizes — the rest stay as they
   were. Kept subtle on purpose. Fully stilled for prefers-reduced-motion. */
@keyframes navIdle { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-1.5px); } }
@keyframes navActive { 0%, 100% { transform: scale(1.22); } 50% { transform: scale(1.32); } }
.nav-link svg {
    width: 20px; height: 20px; flex-shrink: 0; opacity: .85; transform-origin: center;
    transition: transform .28s cubic-bezier(.34, 1.56, .64, 1), color .18s ease, opacity .18s ease;
    animation: navIdle 4s ease-in-out infinite;
}
/* stagger so they drift like a soft wave instead of bobbing in lockstep */
.sidebar-nav .nav-link:nth-of-type(even) svg { animation-delay: 2s; }

.nav-link:hover {
    color: var(--sidebar-text-active);
    background: var(--glass-soft);
    transform: translateX(3px);
}
.nav-link:hover svg { animation: none; transform: scale(1.16); opacity: 1; }
@media (prefers-reduced-motion: reduce) {
    .nav-link svg, .nav-link.active svg { animation: none; }
}

.nav-link.active {
    color: var(--sidebar-text-active);
    font-weight: 700;
    background: linear-gradient(180deg,
        color-mix(in srgb, var(--glass-strong) 80%, transparent), var(--glass-strong));
    box-shadow: inset 0 1px 0 var(--inner-light), 0 6px 18px -6px rgba(0, 0, 0, .35);
}

.nav-link.active svg { opacity: 1; color: var(--primary); animation: navActive 2.6s ease-in-out infinite; }

.nav-link.active::before {
    content: "";
    position: absolute;
    left: -.85rem;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 58%;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--gold), color-mix(in srgb, var(--gold) 60%, #b97e00));
    box-shadow: 0 0 12px var(--gold-soft);
}

.sidebar-version {
    padding: .85rem 1rem 1rem;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--text-muted);
    opacity: .75;
    user-select: none;
}

.auth-version {
    margin: 1.3rem 0 0;
    text-align: center;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-muted);
    opacity: .75;
    position: relative;
    z-index: 1;
}

/* Signed-in user chip (floats top-right): gradient-ring avatar, bold name, role */
.user-card {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .42rem .55rem .42rem .45rem;
    border-radius: 999px;
    border: 1px solid transparent;
    background:
        linear-gradient(180deg,
            color-mix(in srgb, var(--glass-strong) 60%, transparent),
            var(--glass)) padding-box,
        linear-gradient(150deg, var(--edge-hi), var(--edge-lo) 45%, var(--edge-lo)) border-box;
    -webkit-backdrop-filter: var(--blur);
    backdrop-filter: var(--blur);
    box-shadow: inset 0 1px 0 var(--inner-light), var(--shadow-1);
}

.avatar-ring {
    display: inline-flex;
    padding: 2.5px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--mnps-teal) 70%);
    box-shadow: 0 0 16px -2px color-mix(in srgb, var(--gold) 45%, transparent);
    flex-shrink: 0;
}

.avatar-ring .avatar { border: 2px solid var(--bg-base); width: 60px; height: 60px; font-size: 1.15rem; }

.user-card-info { display: flex; flex-direction: column; min-width: 0; gap: .1rem; flex: 1; padding-right: .2rem; }

.user-card-name {
    color: var(--sidebar-text-active);
    font-size: .98rem;
    font-weight: 750;
    letter-spacing: -.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-card-role {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-muted);
}

.user-card-role::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--st-done);
    box-shadow: 0 0 8px var(--st-done);
}

.logout-form { margin: 0; display: flex; }

.user-signout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all .18s ease;
}

.user-signout svg { width: 17px; height: 17px; }

.user-signout:hover {
    color: var(--danger);
    background: var(--danger-soft);
    transform: translateX(2px);
}

/* ---------- buttons & inputs ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    padding: .62rem 1.2rem;
    font-size: .95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    background: var(--glass-strong);
    color: var(--text);
    -webkit-backdrop-filter: var(--blur-soft);
    backdrop-filter: var(--blur-soft);
    box-shadow: inset 0 1px 0 var(--inner-light), var(--shadow-1);
    transition: transform .13s ease, box-shadow .2s ease, background-color .18s ease,
        border-color .18s ease, color .18s ease, filter .18s ease;
}

.btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: inset 0 1px 0 var(--inner-light), var(--shadow-2); }
.btn:active:not(:disabled) { transform: translateY(0) scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.btn-primary {
    background: linear-gradient(180deg,
        color-mix(in srgb, var(--primary) 82%, #fff) 0%,
        var(--primary) 52%,
        color-mix(in srgb, var(--primary) 82%, #063a4e) 100%);
    border-color: rgba(255, 255, 255, .32);
    color: #06222e;
    font-weight: 700;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45),
        0 10px 26px -8px color-mix(in srgb, var(--primary) 60%, transparent);
}

:root[data-theme="light"] .btn-primary { color: #fff; }

.btn-primary:hover:not(:disabled) {
    filter: brightness(1.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45),
        0 14px 34px -8px color-mix(in srgb, var(--primary) 75%, transparent);
}

.btn-ghost { background: var(--glass-soft); }
.btn-ghost:hover:not(:disabled) { background: var(--glass-strong); }

.btn-danger { background: transparent; border-color: transparent; box-shadow: none; color: var(--danger); }
.btn-danger:hover:not(:disabled) { background: var(--danger-soft); box-shadow: none; }

/* Standout page actions (item Edit / Delete) — unmistakably buttons */
.btn-edit,
.btn-delete {
    padding: .68rem 1.35rem;
    font-weight: 700;
    border-radius: 15px;
}

.btn-edit svg,
.btn-delete svg { width: 17px; height: 17px; }

.btn-edit {
    color: var(--primary);
    border-color: color-mix(in srgb, var(--primary) 45%, transparent);
    background: linear-gradient(180deg,
        color-mix(in srgb, var(--primary) 22%, transparent),
        color-mix(in srgb, var(--primary) 12%, transparent));
    box-shadow: inset 0 1px 0 var(--inner-light),
        0 8px 22px -8px color-mix(in srgb, var(--primary) 45%, transparent);
}

.btn-edit:hover:not(:disabled) {
    box-shadow: inset 0 1px 0 var(--inner-light),
        0 12px 30px -8px color-mix(in srgb, var(--primary) 65%, transparent);
}

.btn-delete {
    color: var(--danger);
    border-color: color-mix(in srgb, var(--danger) 45%, transparent);
    background: linear-gradient(180deg,
        color-mix(in srgb, var(--danger) 20%, transparent),
        color-mix(in srgb, var(--danger) 11%, transparent));
    box-shadow: inset 0 1px 0 var(--inner-light),
        0 8px 22px -8px color-mix(in srgb, var(--danger) 40%, transparent);
}

.btn-delete:hover:not(:disabled) {
    box-shadow: inset 0 1px 0 var(--inner-light),
        0 12px 30px -8px color-mix(in srgb, var(--danger) 60%, transparent);
}

.btn-sm { padding: .38rem .8rem; font-size: .84rem; border-radius: 11px; }
.btn-block { width: 100%; }

.btn-icon {
    background: var(--glass-strong);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text);
    -webkit-backdrop-filter: var(--blur-soft);
    backdrop-filter: var(--blur-soft);
    box-shadow: inset 0 1px 0 var(--inner-light), var(--shadow-1);
    transition: transform .2s ease, box-shadow .2s ease;
}

.btn-icon:hover { transform: rotate(10deg) scale(1.06); box-shadow: inset 0 1px 0 var(--inner-light), var(--shadow-2); }
.btn-icon svg { width: 20px; height: 20px; }

.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

/* ---------- notification bell ---------- */

.notify-wrap { position: relative; }

.notify-bell { position: relative; }

.notify-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .68rem;
    font-weight: 800;
    background: linear-gradient(180deg, #FFC94F, var(--mnps-gold));
    color: #43300A;
    border: 2px solid var(--bg-base);
    box-shadow: 0 0 14px color-mix(in srgb, var(--mnps-gold) 60%, transparent);
    animation: badge-pop .3s cubic-bezier(.34, 1.56, .64, 1);
}

.notify-backdrop {
    position: fixed;
    inset: 0;
    z-index: 70;
    background: transparent;
}

.notify-panel {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    z-index: 80;
    width: 340px;
    max-height: 420px;
    overflow-y: auto;
    border-radius: 20px;
    border: 1px solid transparent;
    background:
        linear-gradient(180deg,
            color-mix(in srgb, var(--glass-strong) 70%, transparent),
            var(--glass-strong)) padding-box,
        linear-gradient(150deg, var(--edge-hi), var(--edge-lo) 45%, var(--edge-lo)) border-box;
    -webkit-backdrop-filter: var(--blur);
    backdrop-filter: var(--blur);
    box-shadow: inset 0 1px 0 var(--inner-light), var(--shadow-2);
    animation: modal-in .24s cubic-bezier(.34, 1.3, .64, 1);
    padding: .5rem;
}

.notify-head {
    font-size: .74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--text-muted);
    padding: .55rem .7rem .45rem;
}

.notify-empty { padding: 1rem .7rem 1.1rem; color: var(--text-muted); font-size: .92rem; }

.notify-item {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    padding: .6rem .7rem;
    border-radius: 13px;
    color: var(--text);
    transition: background-color .15s ease;
}

.notify-item:hover { background: var(--glass-soft); }

.notify-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: .42rem;
    background: var(--gold);
    box-shadow: 0 0 10px var(--gold);
    flex-shrink: 0;
}

.notify-item-main { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.notify-item-title { font-size: .92rem; font-weight: 600; line-height: 1.35; }
.notify-item-time { font-size: .76rem; color: var(--text-muted); }

/* unseen indicator on dashboard rows */
.unseen-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    margin-right: .45rem;
    vertical-align: 2px;
    background: var(--gold);
    box-shadow: 0 0 10px var(--gold);
    animation: badge-pop .3s ease;
}

/* quick-capture modal extras */
.capture-title {
    margin: 0 0 1rem;
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.4;
    padding: .7rem .9rem;
    border-radius: var(--r-sm);
    background: var(--gold-soft);
    border: 1px solid color-mix(in srgb, var(--gold) 30%, transparent);
}

.field-hint-inline {
    font-weight: 500;
    text-transform: none;
    color: var(--text-muted);
    opacity: .8;
}

.input {
    width: 100%;
    background: var(--glass-strong);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    padding: .62rem .85rem;
    font-size: .95rem;
    font-family: inherit;
    -webkit-backdrop-filter: var(--blur-soft);
    backdrop-filter: var(--blur-soft);
    box-shadow: inset 0 1px 0 var(--inner-light);
    transition: border-color .18s ease, box-shadow .2s ease, background-color .3s ease;
}

.input::placeholder { color: var(--text-muted); }

.input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: inset 0 1px 0 var(--inner-light), 0 0 0 4px var(--primary-soft),
        0 6px 20px -6px color-mix(in srgb, var(--primary) 35%, transparent);
}

select.input { cursor: pointer; }
textarea.input { resize: vertical; }

select.input option {
    background: var(--bg-base);
    color: var(--text);
}

.form-field { margin-bottom: 1rem; display: flex; flex-direction: column; gap: .35rem; }
.form-field label { font-size: .85rem; font-weight: 600; color: var(--text-muted); }
.field-error { color: var(--danger); font-size: .8rem; }
.field-hint { color: var(--text-muted); font-size: .78rem; }

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .92rem;
    cursor: pointer;
    user-select: none;
}

input[type="checkbox"] { accent-color: var(--primary); width: 16px; height: 16px; }

/* ---------- cards ---------- */

.card {
    border-radius: var(--r-lg);
    padding: 1.4rem 1.55rem;
    transition: box-shadow .25s ease;
}

.card-label {
    display: block;
    font-size: .76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--text-muted);
    margin-bottom: .65rem;
}

.table-card { padding: 0; overflow-x: auto; }
.table-card::before { display: none; } /* sheen distorts sticky headers */

/* ---------- stat strip ---------- */

.stat-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.6rem;
}

.stat-tile {
    border-radius: 20px;
    padding: 1.05rem 1.25rem .95rem;
    display: flex;
    flex-direction: column;
    gap: .1rem;
    transition: transform .18s ease, box-shadow .22s ease;
}

.stat-tile:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 var(--inner-light), var(--shadow-2); }

.stat-num {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.1;
    color: var(--st-new);
    text-shadow: 0 0 24px color-mix(in srgb, var(--st-new) 40%, transparent);
}

.stat-tile-progress .stat-num { color: var(--st-progress); text-shadow: 0 0 24px color-mix(in srgb, var(--st-progress) 40%, transparent); }
.stat-tile-blocked .stat-num { color: var(--st-blocked); text-shadow: 0 0 24px color-mix(in srgb, var(--st-blocked) 40%, transparent); }
.stat-tile-idle .stat-num { color: var(--pr-high); text-shadow: 0 0 24px color-mix(in srgb, var(--pr-high) 40%, transparent); }

.stat-label {
    font-size: .76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--text-muted);
}

/* ---------- badges ---------- */

.badge {
    display: inline-flex;
    align-items: center;
    gap: .38rem;
    font-size: .78rem;
    font-weight: 700;
    padding: .3rem .7rem;
    border-radius: 999px;
    white-space: nowrap;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22);
    animation: badge-pop .28s cubic-bezier(.34, 1.56, .64, 1);
}

@keyframes badge-pop {
    from { transform: scale(.7); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.badge-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }

.status-new { background: color-mix(in srgb, var(--st-new) 17%, transparent); color: var(--st-new); }
.status-progress { background: color-mix(in srgb, var(--st-progress) 18%, transparent); color: var(--st-progress); }
.status-blocked { background: color-mix(in srgb, var(--st-blocked) 17%, transparent); color: var(--st-blocked); }
.status-awaiting { background: color-mix(in srgb, var(--st-await) 17%, transparent); color: var(--st-await); }
.status-done { background: color-mix(in srgb, var(--st-done) 17%, transparent); color: var(--st-done); }
.status-cancelled { background: color-mix(in srgb, var(--st-cancelled) 19%, transparent); color: var(--st-cancelled); }

.badge-outline { background: transparent; border: 1.5px solid currentColor; box-shadow: none; }
.prio-low { color: var(--pr-low); }
.prio-medium { color: var(--pr-medium); }
.prio-high { color: var(--pr-high); }
.prio-critical { color: var(--pr-critical); animation: badge-pop .28s ease, critical-pulse 2s ease-in-out infinite; }

@keyframes critical-pulse {
    0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--pr-critical) 40%, transparent); }
    50% { box-shadow: 0 0 0 6px transparent; }
}

/* ---------- quick add (hero capture bar) ---------- */

.quick-add {
    display: flex;
    align-items: center;
    gap: .8rem;
    border-radius: 22px;
    padding: .95rem 1.2rem;
    margin-bottom: 1.6rem;
    cursor: text; /* the whole bar focuses the input on click */
    transition: box-shadow .28s ease, transform .28s ease;
}

.quick-add:focus-within {
    transform: translateY(-1px);
    box-shadow: inset 0 1px 0 var(--inner-light),
        0 0 0 3px var(--gold-soft),
        0 0 42px -6px color-mix(in srgb, var(--gold) 45%, transparent),
        var(--shadow-2);
}

.quick-add-icon { width: 22px; height: 22px; color: var(--gold); flex-shrink: 0; }

.quick-add-input {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 1.08rem;
    padding: .4rem 0;
    font-family: inherit;
    position: relative;
    z-index: 1;
}

.quick-add-input:focus { outline: none; }
.quick-add-input::placeholder { color: var(--text-muted); }

/* Empty bar: a quiet keyboard hint teaching the fast path */
.quick-add-hint {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: var(--text-muted);
    font-size: .8rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: .75;
    flex-shrink: 0;
}

.kbd {
    display: inline-flex;
    align-items: center;
    padding: .14rem .5rem;
    border-radius: 7px;
    border: 1px solid var(--border);
    background: var(--glass-soft);
    box-shadow: inset 0 -2px 0 var(--border);
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .02em;
}

.kbd-dark {
    border-color: rgba(67, 48, 10, .35);
    background: rgba(255, 255, 255, .35);
    box-shadow: inset 0 -2px 0 rgba(67, 48, 10, .3);
    color: #43300A;
}

/* Text present: the hint morphs into the gold capture pill */
.quick-add-go {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .55rem 1.15rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .4);
    background: linear-gradient(180deg, #FFC94F 0%, var(--mnps-gold) 60%, #E19E12 100%);
    color: #43300A;
    font-family: inherit;
    font-size: .92rem;
    font-weight: 800;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55),
        0 8px 22px -8px color-mix(in srgb, var(--mnps-gold) 70%, transparent);
    animation: capture-pop .28s cubic-bezier(.34, 1.56, .64, 1);
    transition: transform .12s ease, box-shadow .18s ease, filter .18s ease;
}

.quick-add-go:hover:not(:disabled) {
    transform: translateY(-1px);
    filter: brightness(1.05);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55),
        0 12px 30px -8px color-mix(in srgb, var(--mnps-gold) 85%, transparent);
}

.quick-add-go:active:not(:disabled) { transform: scale(.97); }
.quick-add-go:disabled { opacity: .6; cursor: wait; }

@keyframes capture-pop {
    from { transform: scale(.8); opacity: 0; }
}

/* ---------- feedback: bug + idea submission ---------- */

/* Sidebar feedback trigger — pinned at the bottom of the nav list */
.bug-nav {
    display: flex;
    align-items: center;
    gap: .7rem;
    margin-top: auto;
    padding: .68rem .85rem;
    border-radius: 14px;
    cursor: pointer;
    font-family: inherit;
    border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent);
    background: linear-gradient(180deg,
        color-mix(in srgb, var(--gold) 16%, transparent),
        color-mix(in srgb, var(--gold) 8%, transparent));
    color: var(--text);
    font-weight: 700;
    font-size: .93rem;
    box-shadow: inset 0 1px 0 var(--inner-light),
        0 6px 18px -6px color-mix(in srgb, var(--gold) 45%, transparent);
    transition: transform .15s ease, box-shadow .2s ease;
    white-space: nowrap;
}

.bug-nav:hover {
    transform: translateY(-1px);
    box-shadow: inset 0 1px 0 var(--inner-light),
        0 10px 26px -6px color-mix(in srgb, var(--gold) 60%, transparent);
}

.bug-nav .bug-emoji {
    display: inline-block;
    font-size: 1.1rem;
    animation: bug-wiggle 2.6s ease-in-out infinite;
}

.bug-button {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .55rem 1.05rem;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent);
    background: linear-gradient(180deg,
        color-mix(in srgb, var(--gold) 18%, transparent),
        color-mix(in srgb, var(--gold) 9%, transparent));
    -webkit-backdrop-filter: var(--blur-soft);
    backdrop-filter: var(--blur-soft);
    color: var(--text);
    font-family: inherit;
    font-size: .9rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: inset 0 1px 0 var(--inner-light),
        0 8px 22px -8px color-mix(in srgb, var(--gold) 50%, transparent);
    transition: transform .15s ease, box-shadow .2s ease;
    white-space: nowrap;
}

.bug-button:hover {
    transform: translateY(-1px);
    box-shadow: inset 0 1px 0 var(--inner-light),
        0 12px 30px -8px color-mix(in srgb, var(--gold) 65%, transparent);
}

.bug-button .bug-emoji {
    display: inline-block;
    font-size: 1.05rem;
    animation: bug-wiggle 2.6s ease-in-out infinite;
}

@keyframes bug-wiggle {
    0%, 84%, 100% { transform: rotate(0); }
    88% { transform: rotate(-16deg); }
    92% { transform: rotate(12deg); }
    96% { transform: rotate(-8deg); }
}

@media (prefers-reduced-motion: reduce) {
    .bug-button .bug-emoji { animation: none; }
}

.nav-badge {
    margin-left: auto;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .72rem;
    font-weight: 800;
    background: linear-gradient(180deg, #FFC94F, var(--mnps-gold));
    color: #43300A;
    box-shadow: 0 0 10px color-mix(in srgb, var(--mnps-gold) 50%, transparent);
}

.pick-row { display: flex; gap: .9rem; margin: .4rem 0 1.2rem; }

.pick-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .45rem;
    padding: 1.5rem 1rem 1.3rem;
    border-radius: 18px;
    cursor: pointer;
    border: 1px solid var(--border);
    background: var(--glass-soft);
    transition: all .18s ease;
    text-align: center;
}

.pick-card:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--gold) 55%, transparent);
    background: color-mix(in srgb, var(--gold) 10%, transparent);
    box-shadow: 0 14px 34px -10px color-mix(in srgb, var(--gold) 45%, transparent);
}

.pick-card .pick-emoji { font-size: 2.6rem; line-height: 1; }
.pick-card .pick-title { font-weight: 700; font-size: 1.02rem; color: var(--text); }
.pick-card .pick-sub { font-size: .8rem; color: var(--text-muted); }

.severity-row { display: flex; gap: .55rem; }

.severity-pill {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .2rem;
    padding: .7rem .4rem;
    border-radius: 14px;
    cursor: pointer;
    border: 1px solid var(--border);
    background: var(--glass-soft);
    font-size: .78rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all .15s ease;
    text-align: center;
    user-select: none;
}

.severity-pill span:first-child { font-size: 1.35rem; }

.severity-pill.sel {
    border-color: color-mix(in srgb, var(--gold) 55%, transparent);
    background: color-mix(in srgb, var(--gold) 13%, transparent);
    color: var(--text);
    box-shadow: 0 0 0 3px var(--gold-soft);
}

.bug-modal-hint { margin: 0 0 1rem; color: var(--text-muted); font-size: .9rem; }

.stat-tile-done .stat-num {
    color: var(--st-done);
    text-shadow: 0 0 24px color-mix(in srgb, var(--st-done) 40%, transparent);
}

/* ---------- team workload strip ---------- */

.team-strip {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .85rem;
    margin: .4rem 0 1.7rem;
}

.team-strip-people {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
}

.team-chip {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: .4rem .55rem .4rem .4rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--glass);
    -webkit-backdrop-filter: var(--blur-soft);
    backdrop-filter: var(--blur-soft);
    color: var(--text-muted);
    font-family: inherit;
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: inset 0 1px 0 var(--inner-light), var(--shadow-1);
    transition: all .18s ease;
}

.team-chip:hover { color: var(--text); transform: translateY(-1px); box-shadow: inset 0 1px 0 var(--inner-light), var(--shadow-2); }

.team-chip-name { line-height: 1; }

.team-chip-count {
    min-width: 26px;
    height: 26px;
    padding: 0 8px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .82rem;
    font-weight: 800;
    background: var(--glass-strong);
    color: var(--text);
    box-shadow: inset 0 1px 0 var(--inner-light);
}

/* "Everyone" — the master chip: teal presence, mini team-avatar stack, larger */
.team-chip-everyone {
    padding: .68rem 1.35rem .68rem .8rem;
    gap: .75rem;
    font-size: 1rem;
    font-weight: 800;
    color: var(--text);
    border-color: color-mix(in srgb, var(--primary) 55%, transparent);
    background: linear-gradient(180deg,
        color-mix(in srgb, var(--primary) 22%, transparent),
        color-mix(in srgb, var(--primary) 10%, transparent));
    box-shadow: inset 0 1px 0 var(--inner-light),
        0 8px 24px -8px color-mix(in srgb, var(--primary) 55%, transparent);
}

.team-chip-everyone:hover { color: var(--text); }

.avatar-xs { width: 34px; height: 34px; font-size: .68rem; }
.team-chip-stack .avatar { margin-left: -12px; border-width: 1.5px; }
.team-chip-stack .avatar:first-child { margin-left: 0; }

.empty-state-roomy { padding: 4.4rem 1.4rem; margin-top: 2.2rem; }

/* Selected scope chip — radio-group semantics, exactly one is always gold.
   Specificity beats .team-chip-everyone so gold always wins when selected. */
.team-strip .team-chip-sel {
    color: #43300A;
    border-color: rgba(255, 255, 255, .4);
    background: linear-gradient(180deg, #FFC94F 0%, var(--mnps-gold) 60%, #E19E12 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55),
        0 10px 26px -8px color-mix(in srgb, var(--mnps-gold) 70%, transparent);
}

.team-strip .team-chip-sel:hover { color: #43300A; }

.team-strip .team-chip-sel .team-chip-count {
    background: rgba(255, 255, 255, .85);
    color: #43300A;
    box-shadow: none;
}

/* ---------- section divider (overview ⇢ find & filter) ---------- */

.section-divider {
    display: flex;
    align-items: center;
    gap: 1.3rem;
    margin: 3rem 0 2.2rem;
}

.section-divider::before,
.section-divider::after {
    content: "";
    flex: 1;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg,
        transparent,
        color-mix(in srgb, var(--primary) 65%, transparent) 30%,
        color-mix(in srgb, var(--gold) 75%, transparent) 70%,
        transparent);
    background-size: 200% 100%;
    box-shadow: 0 0 22px color-mix(in srgb, var(--primary) 40%, transparent),
        0 0 8px color-mix(in srgb, var(--gold) 25%, transparent);
    animation: divider-flow 7s linear infinite;
}

.section-divider::after {
    background: linear-gradient(90deg,
        transparent,
        color-mix(in srgb, var(--gold) 75%, transparent) 30%,
        color-mix(in srgb, var(--primary) 65%, transparent) 70%,
        transparent);
    background-size: 200% 100%;
    animation-direction: reverse;
}

@keyframes divider-flow {
    from { background-position: 0% 0; }
    to { background-position: 200% 0; }
}

@media (prefers-reduced-motion: reduce) {
    .section-divider::before, .section-divider::after { animation: none; }
}

.section-divider-label {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: .6rem 1.25rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--glass);
    -webkit-backdrop-filter: var(--blur-soft);
    backdrop-filter: var(--blur-soft);
    box-shadow: inset 0 1px 0 var(--inner-light), var(--shadow-1);
    font-size: .84rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .16em;
    color: var(--text);
    white-space: nowrap;
}

.section-divider-label svg { width: 18px; height: 18px; color: var(--gold); }

.divider-count {
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: 0;
    background: linear-gradient(180deg, #FFC94F, var(--mnps-gold));
    color: #43300A;
    box-shadow: 0 0 10px color-mix(in srgb, var(--mnps-gold) 45%, transparent);
}

/* ---------- overview rings (dashboard concept D) ---------- */

.ring-strip {
    display: grid;
    grid-template-columns: 1.25fr 1.25fr 1fr 1fr;
    gap: .95rem;
    margin-bottom: 1.3rem;
}

.ring-tile {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.2rem;
    border-radius: 20px;
}

.ring { position: relative; width: 92px; height: 92px; flex-shrink: 0; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track { stroke: color-mix(in srgb, var(--text) 8%, transparent); }

.ring-center {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: -.02em;
}

.ring-center-sm { font-size: 1.05rem; }

.ring-info { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.ring-legend { display: flex; flex-direction: column; gap: .18rem; }

.ring-leg {
    display: flex;
    align-items: center;
    gap: .4rem;
    background: none;
    border: none;
    padding: .14rem .45rem .14rem .3rem;
    margin-left: -.3rem;
    border-radius: 8px;
    font-family: inherit;
    font-size: .8rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: background-color .14s ease, color .14s ease;
    white-space: nowrap;
}

.ring-leg i {
    width: 9px;
    height: 9px;
    border-radius: 3px;
    background: var(--leg);
    box-shadow: 0 0 8px var(--leg);
    flex-shrink: 0;
}

.ring-leg b { margin-left: .15rem; color: var(--text); }
.ring-leg:hover { background: var(--glass-soft); color: var(--text); }

.ring-leg-active {
    background: color-mix(in srgb, var(--leg) 16%, transparent);
    color: var(--text);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--leg) 45%, transparent);
}

.stat-tile-click {
    cursor: pointer;
    border: 1px solid transparent;
    font-family: inherit;
    text-align: left;
    transition: transform .18s ease, box-shadow .22s ease;
}

.stat-tile-click:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 var(--inner-light), var(--shadow-2); }

.stat-tile-active {
    box-shadow: inset 0 1px 0 var(--inner-light),
        0 0 0 2px color-mix(in srgb, var(--gold) 60%, transparent),
        0 10px 28px -8px color-mix(in srgb, var(--gold) 50%, transparent);
}

/* ---------- filter bar ---------- */

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .8rem;
    margin-bottom: 1.6rem;
}

.filter-search { position: relative; flex: 1 1 240px; min-width: 210px; }

.filter-search svg {
    position: absolute;
    left: .7rem;
    top: 50%;
    transform: translateY(-50%);
    width: 17px;
    height: 17px;
    color: var(--text-muted);
    pointer-events: none;
    z-index: 1;
}

.filter-search .input { padding-left: 2.3rem; }

.filter-select { width: auto; min-width: 138px; }
.filter-dates { display: flex; align-items: center; gap: .65rem; }
.filter-closed { color: var(--text-muted); }

/* ---------- date fields (custom-skinned native pickers) ---------- */

.date-field {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    min-width: 158px;
    padding: .68rem 1rem;
    border-radius: var(--r-sm);
    border: 1px solid var(--border);
    background: var(--glass-strong);
    -webkit-backdrop-filter: var(--blur-soft);
    backdrop-filter: var(--blur-soft);
    box-shadow: inset 0 1px 0 var(--inner-light), var(--shadow-1);
    color: var(--text-muted);
    font-size: .92rem;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: transform .15s ease, box-shadow .2s ease, color .18s ease, border-color .18s ease;
}

.date-field:hover { color: var(--text); transform: translateY(-1px); box-shadow: inset 0 1px 0 var(--inner-light), var(--shadow-2); }

.date-field:focus-within {
    border-color: var(--primary);
    box-shadow: inset 0 1px 0 var(--inner-light), 0 0 0 4px var(--primary-soft);
}

.date-field svg { width: 17px; height: 17px; flex-shrink: 0; }

.date-field-has-value {
    color: var(--text);
    border-color: color-mix(in srgb, var(--primary) 45%, transparent);
}

.date-field-has-value svg { color: var(--primary); }

/* The real input covers the whole field invisibly, so any click opens the picker */
.date-field input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    border: 0;
    padding: 0;
    margin: 0;
}

.date-field input::-webkit-calendar-picker-indicator {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.pill {
    border: 1px solid var(--border);
    background: var(--glass);
    -webkit-backdrop-filter: var(--blur-soft);
    backdrop-filter: var(--blur-soft);
    color: var(--text-muted);
    border-radius: 999px;
    padding: .55rem 1.05rem;
    font-size: .9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    box-shadow: inset 0 1px 0 var(--inner-light), var(--shadow-1);
    transition: all .18s ease;
}

.pill:hover { color: var(--text); transform: translateY(-1px); }

.pill-active {
    background: linear-gradient(180deg, #FFC94F 0%, var(--mnps-gold) 58%, #D9970D 100%);
    border-color: rgba(255, 255, 255, .4);
    color: #43300A;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55),
        0 10px 26px -8px color-mix(in srgb, var(--mnps-gold) 65%, transparent);
}

.pill-active:hover { color: #43300A; }

/* ---------- project strip & cards ---------- */

.project-strip {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    margin-bottom: 1.5rem;
}

.project-chip {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .12rem;
    border-radius: 15px;
    padding: .58rem .95rem;
    cursor: pointer;
    font-family: inherit;
    color: var(--text);
    transition: all .18s ease;
}

.project-chip:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 var(--inner-light), var(--shadow-2); }

.project-chip-active {
    box-shadow: inset 0 1px 0 var(--inner-light), 0 0 0 2px var(--primary),
        0 8px 24px -6px color-mix(in srgb, var(--primary) 45%, transparent);
}

.project-chip-title { font-size: .9rem; font-weight: 600; }
.project-chip-count { font-size: .74rem; color: var(--text-muted); }
.project-chip-link { justify-content: center; color: var(--primary); font-size: .88rem; font-weight: 600; }

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.1rem;
}

/* External ticket reference — classy gold ticket-stub badge */
.ticket-badge {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    width: fit-content;
    padding: .32rem .75rem;
    border-radius: 10px;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .07em;
    color: var(--gold);
    background: color-mix(in srgb, var(--gold) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--gold) 42%, transparent);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18),
        0 4px 14px -6px color-mix(in srgb, var(--gold) 40%, transparent);
    white-space: nowrap;
}

.ticket-badge svg { width: 15px; height: 15px; flex-shrink: 0; }

.ticket-badge-sm {
    padding: .16rem .5rem;
    font-size: .72rem;
    border-radius: 8px;
    gap: .35rem;
}

.ticket-badge-sm svg { width: 12px; height: 12px; }

.project-chip-ticket {
    color: var(--gold);
    font-weight: 700;
    letter-spacing: .04em;
}

.project-card { display: flex; flex-direction: column; gap: .65rem; }
.project-card:hover { box-shadow: inset 0 1px 0 var(--inner-light), var(--shadow-2); }
.project-card-header { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.project-desc { margin: 0; color: var(--text-muted); font-size: .92rem; }
.project-card-stats { display: flex; gap: 1rem; font-size: .92rem; }

.project-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin-top: auto;
    padding-top: .6rem;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

.project-card-actions { display: flex; gap: .3rem; }

/* ---------- item list ---------- */

.item-list { display: flex; flex-direction: column; gap: .8rem; }

/* Results area dims briefly while fresh data loads — no teardown, no stutter */
.results-zone { transition: opacity .15s ease; }
.results-zone.refreshing { opacity: .55; pointer-events: none; }

.item-row {
    --row-accent: var(--st-new);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-radius: var(--r-md);
    padding: 1.05rem 1.3rem;
    color: var(--text);
    transition: transform .17s ease, box-shadow .22s ease, opacity .2s ease;
    animation: row-in .18s ease;
}

@keyframes row-in {
    from { opacity: 0; }
}

/* status accent: soft color bar fused into the glass edge */
.item-row::after {
    content: "";
    position: absolute;
    left: 0;
    top: 14%;
    bottom: 14%;
    width: 4px;
    border-radius: 0 999px 999px 0;
    background: linear-gradient(180deg,
        color-mix(in srgb, var(--row-accent) 90%, #fff),
        var(--row-accent));
    box-shadow: 0 0 14px color-mix(in srgb, var(--row-accent) 55%, transparent);
}

.item-row:hover {
    transform: translateY(-2px) scale(1.004);
    box-shadow: inset 0 1px 0 var(--inner-light), var(--shadow-2),
        0 10px 34px -10px color-mix(in srgb, var(--row-accent) 40%, transparent);
}

.status-new-border { --row-accent: var(--st-new); }
.status-progress-border { --row-accent: var(--st-progress); }
.status-blocked-border { --row-accent: var(--st-blocked); }
.status-awaiting-border { --row-accent: var(--st-await); }
.status-done-border { --row-accent: var(--st-done); }
.status-cancelled-border { --row-accent: var(--st-cancelled); }

.item-closed { opacity: .52; }
.item-closed .item-title { text-decoration: line-through; }

.item-main { min-width: 0; display: flex; flex-direction: column; gap: .28rem; padding-left: .35rem; }
.item-title { font-weight: 650; font-size: 1.03rem; letter-spacing: -.005em; }
.item-meta { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; font-size: .84rem; color: var(--text-muted); }

.item-project {
    background: var(--primary-soft);
    border-radius: 8px;
    padding: .15rem .55rem;
    font-size: .78rem;
    font-weight: 600;
    color: var(--primary);
}

.item-side { display: flex; align-items: center; gap: .75rem; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }

.notes-count {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    color: var(--text-muted);
    font-size: .86rem;
}

.notes-count svg { width: 16px; height: 16px; }

.aging-chip {
    font-size: .74rem;
    font-weight: 700;
    padding: .24rem .58rem;
    border-radius: 999px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25);
}

.aging-warn { background: color-mix(in srgb, var(--pr-high) 19%, transparent); color: var(--pr-high); }

.aging-danger {
    background: color-mix(in srgb, var(--pr-critical) 19%, transparent);
    color: var(--pr-critical);
    animation: critical-pulse 2s ease-in-out infinite;
}

.list-summary { color: var(--text-muted); font-size: .84rem; text-align: right; }

/* ---------- avatars ---------- */

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* v2.21.4: +50% over original everywhere (36→54, Luke upsized twice) and a
       photo layer — the <img> covers the initials when the user has a profile
       photo; its onerror removes it on 404 */
    position: relative;
    overflow: hidden;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--mnps-teal);
    color: #fff;
    font-size: .82rem;
    font-weight: 700;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, .35);
    box-shadow: 0 3px 10px rgba(4, 22, 34, .4), inset 0 1px 0 rgba(255, 255, 255, .3);
}

:root[data-theme="light"] .avatar { border-color: rgba(255, 255, 255, .85); }

.avatar-sm { width: 45px; height: 45px; font-size: .88rem; }
.avatar-photo {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover; border-radius: 50%;
}
.avatar-stack { display: inline-flex; }
.avatar-stack .avatar { margin-left: -12px; transition: transform .15s ease; }
.avatar-stack .avatar:first-child { margin-left: 0; }
.avatar-stack:hover .avatar { transform: translateX(2px); }
.avatar-more { background: var(--glass-strong); color: var(--text-muted); }
.avatars-empty { color: var(--text-muted); font-size: .8rem; font-style: italic; }

/* ---------- detail page ---------- */

.item-detail-title { margin-top: .35rem; }
.item-detail-meta { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; margin-top: .6rem; }

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 1.2rem;
    margin-top: 1.3rem;
    align-items: start;
}

.detail-main { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.detail-side { position: sticky; top: 24px; }

.status-actions { display: flex; gap: .6rem; position: relative; z-index: 1; }
.status-actions .input { max-width: 230px; }

.note-input { width: 100%; position: relative; z-index: 1; }
.note-actions { display: flex; justify-content: flex-end; margin-top: .6rem; position: relative; z-index: 1; }

.assignee-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .55rem; }
.assignee-list li { display: flex; align-items: center; gap: .55rem; font-size: .94rem; }

.assignee-picker {
    display: flex;
    flex-direction: column;
    gap: .4rem;
    max-height: 210px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    padding: .65rem;
    background: var(--glass-soft);
}

/* ---------- timeline ---------- */

.timeline-heading { margin-top: .5rem; }

.timeline {
    position: relative;
    padding-left: 1.6rem;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background: linear-gradient(180deg, var(--primary), var(--gold));
    opacity: .4;
    border-radius: 999px;
}

.timeline-item { position: relative; animation: page-in .3s ease; }

.timeline-dot {
    position: absolute;
    left: -1.6rem;
    top: 5px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 3px solid var(--bg-base);
    background: var(--text-muted);
    box-shadow: 0 0 0 2px var(--border), 0 0 12px color-mix(in srgb, var(--primary) 30%, transparent);
}

.timeline-created .timeline-dot { background: var(--st-new); box-shadow: 0 0 0 2px var(--border), 0 0 12px color-mix(in srgb, var(--st-new) 50%, transparent); }
.timeline-note .timeline-dot { background: var(--gold); box-shadow: 0 0 0 2px var(--border), 0 0 12px color-mix(in srgb, var(--gold) 50%, transparent); }
.timeline-statuschanged .timeline-dot { background: var(--primary); box-shadow: 0 0 0 2px var(--border), 0 0 12px color-mix(in srgb, var(--primary) 50%, transparent); }
.timeline-assigned .timeline-dot { background: var(--st-done); box-shadow: 0 0 0 2px var(--border), 0 0 12px color-mix(in srgb, var(--st-done) 50%, transparent); }

.timeline-header { display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; font-size: .93rem; }
.timeline-verb { color: var(--text-muted); }
.timeline-time { color: var(--text-muted); font-size: .8rem; margin-left: auto; }

.timeline-status-change { display: flex; align-items: center; gap: .5rem; margin-top: .4rem; }
.timeline-arrow { color: var(--text-muted); }

.timeline-body {
    margin: .5rem 0 0;
    background: var(--glass);
    -webkit-backdrop-filter: var(--blur-soft);
    backdrop-filter: var(--blur-soft);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    padding: .7rem .9rem;
    font-size: .94rem;
    white-space: pre-wrap;
    word-break: break-word;
    box-shadow: inset 0 1px 0 var(--inner-light);
}

/* ---------- tables ---------- */

.data-table { width: 100%; min-width: 900px; border-collapse: collapse; font-size: .9rem; }

.data-table th {
    text-align: left;
    font-size: .73rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--text-muted);
    padding: .8rem 1rem;
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: .7rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.data-table tbody tr { transition: background-color .12s ease; }
.data-table tbody tr:hover { background: var(--glass-soft); }
.data-table tbody tr:last-child td { border-bottom: none; }

.row-inactive { opacity: .5; }
.cell-name { margin-left: .55rem; font-weight: 600; }
.cell-actions { text-align: right; white-space: nowrap; }
.cell-actions .btn { margin-left: .3rem; }
.cell-nowrap { white-space: nowrap; }
.cell-message { max-width: 500px; overflow: hidden; text-overflow: ellipsis; }

.cell-person {
    white-space: nowrap;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cell-email {
    white-space: nowrap;
    max-width: 210px;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-muted);
}

.data-table .badge { white-space: nowrap; }

.log-row { cursor: pointer; }
.log-detail-row td { background: var(--glass-soft); }
.log-detail { margin: 0; display: grid; grid-template-columns: 116px 1fr; gap: .45rem .85rem; }
.log-detail dt { font-weight: 700; font-size: .8rem; color: var(--text-muted); }
.log-detail dd { margin: 0; min-width: 0; }
.log-exception { color: var(--danger); }

.pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.1rem;
    margin-top: 1.1rem;
}

/* ---------- skeleton loaders ---------- */

.skeleton-list { display: flex; flex-direction: column; gap: .7rem; }

.skeleton-row {
    display: flex;
    align-items: center;
    gap: .9rem;
    border-radius: var(--r-md);
    padding: 1.1rem;
}

.skeleton {
    position: relative;
    overflow: hidden;
    background: var(--glass-soft);
    border-radius: 9px;
}

.skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent,
            color-mix(in srgb, var(--text) 9%, transparent), transparent);
    animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
    100% { transform: translateX(100%); }
}

.skeleton-line { height: 15px; flex: 1; }
.skeleton-chip { height: 22px; width: 76px; border-radius: 999px; }
.skeleton-circle { height: 30px; width: 30px; border-radius: 50%; }

/* ---------- toasts ---------- */

.toast-stack {
    position: fixed;
    bottom: 1.4rem;
    right: 1.4rem;
    display: flex;
    flex-direction: column;
    gap: .6rem;
    z-index: 1000;
    max-width: 380px;
}

.toast {
    display: flex;
    align-items: center;
    gap: .75rem;
    color: var(--text);
    border-radius: 16px;
    padding: .8rem 1rem;
    font-size: .94rem;
    box-shadow: inset 0 1px 0 var(--inner-light), var(--shadow-2);
    animation: toast-in .34s cubic-bezier(.34, 1.3, .64, 1);
}

.toast::after {
    content: "";
    position: absolute;
    left: 0;
    top: 18%;
    bottom: 18%;
    width: 4px;
    border-radius: 0 999px 999px 0;
    background: var(--st-new);
    box-shadow: 0 0 12px color-mix(in srgb, var(--st-new) 60%, transparent);
}

.toast-success::after { background: var(--st-done); box-shadow: 0 0 12px color-mix(in srgb, var(--st-done) 60%, transparent); }
.toast-error::after { background: var(--st-blocked); box-shadow: 0 0 12px color-mix(in srgb, var(--st-blocked) 60%, transparent); }
.toast-info::after { background: var(--st-new); }

@keyframes toast-in {
    from { opacity: 0; transform: translateX(34px) scale(.95); }
    to { opacity: 1; transform: none; }
}

.toast-out { animation: toast-out .25s ease forwards; }

@keyframes toast-out {
    to { opacity: 0; transform: translateX(34px) scale(.95); }
}

.toast-message { flex: 1; position: relative; z-index: 1; }

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: .82rem;
    padding: .15rem;
    position: relative;
    z-index: 1;
}

.toast-close:hover { color: var(--text); }

/* ---------- modal ---------- */

.modal-backdrop {
    position: fixed;
    inset: 0;
    /* House rule (Luke, v2.18.2): popup backdrops dim HARD and blur — the page
       behind is context, not competition. Applies to every overlay below too. */
    background: rgba(2, 6, 12, .72);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    backdrop-filter: blur(14px) saturate(1.2);
    display: grid;
    place-items: center;
    z-index: 900;
    animation: fade-in .2s ease;
    padding: 1rem;
}

@keyframes fade-in {
    from { opacity: 0; }
}

.modal {
    border-radius: var(--r-lg);
    width: 100%;
    max-width: 500px;
    max-height: 88vh;
    overflow-y: auto;
    animation: modal-in .28s cubic-bezier(.34, 1.3, .64, 1);
    box-shadow: inset 0 1px 0 var(--inner-light), var(--shadow-2);
}

@keyframes modal-in {
    from { opacity: 0; transform: scale(.92) translateY(16px); }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.15rem 1.35rem .65rem;
    position: relative;
    z-index: 1;
}

.modal-body { padding: .45rem 1.35rem; position: relative; z-index: 1; }

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: .55rem;
    padding: .9rem 1.35rem 1.25rem;
    position: relative;
    z-index: 1;
}

/* ---------- empty state / errors ---------- */

.empty-state {
    text-align: center;
    padding: 3.6rem 1.2rem;
    color: var(--text-muted);
    border-radius: var(--r-lg);
}

.empty-state h3 { color: var(--text); margin-bottom: .45rem; }

.error-panel {
    max-width: 480px;
    margin: 3.2rem auto;
    text-align: center;
    border-radius: var(--r-lg);
    padding: 2.2rem;
}

.error-panel-actions { display: flex; justify-content: center; gap: .65rem; margin-top: 1.1rem; position: relative; z-index: 1; }

.alert {
    border-radius: var(--r-sm);
    padding: .7rem 1rem;
    font-size: .92rem;
    margin-bottom: 1rem;
}

.alert-error {
    background: var(--danger-soft);
    color: var(--danger);
    border: 1px solid color-mix(in srgb, var(--danger) 32%, transparent);
}

/* ---------- auth pages ---------- */

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1rem;
    /* Slightly lighter veil than the app — the brand artwork gets its hero moment.
       No 'fixed' attachment: it forces repaints on scroll. */
    background:
        linear-gradient(180deg, var(--bg-veil-auth), var(--bg-veil-auth-2)),
        url('../img/brand-bg.svg') center / cover no-repeat,
        var(--bg-base);
}

.auth-shell::before {
    content: "";
    position: fixed;
    inset: -14%;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(48rem 36rem at 18% 12%, var(--orb-teal), transparent 62%),
        radial-gradient(44rem 32rem at 84% 18%, var(--orb-gold), transparent 60%),
        radial-gradient(50rem 38rem at 58% 100%, var(--orb-teal), transparent 62%);
    animation: ambient-drift 46s ease-in-out infinite alternate;
}

.auth-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    border-radius: 26px;
    padding: 2.4rem;
    box-shadow: inset 0 1px 0 var(--inner-light), var(--shadow-2);
    animation: page-in .38s cubic-bezier(.22, .9, .35, 1);
}

.auth-card h1 { font-size: 1.45rem; margin-bottom: 1.2rem; position: relative; z-index: 1; }
.auth-card form, .auth-card .alert, .auth-card p, .auth-card a { position: relative; z-index: 1; }

.auth-logo {
    display: flex;
    align-items: center;
    gap: .7rem;
    font-weight: 700;
    font-size: 1.08rem;
    margin-bottom: 1.5rem;
    color: var(--text);
    position: relative;
    z-index: 1;
}

.auth-logo img {
    width: 48px;
    height: 48px;
    filter: drop-shadow(0 3px 8px rgba(6, 30, 45, .4));
}

.auth-note { color: var(--text-muted); font-size: .92rem; }
.auth-card .checkbox-label { margin-bottom: 1.1rem; }

/* ---------- scrollbars ---------- */

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }

::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--text) 16%, transparent);
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--text) 30%, transparent); background-clip: padding-box; }

/* ---------- responsive ---------- */

@media (max-width: 1024px) {
    .sidebar { width: 84px; margin: 14px 0 14px 14px; border-radius: 22px; }
    .logo-text, .nav-link span, .bug-nav-text { display: none; }
    .bug-nav { justify-content: center; padding: .6rem .5rem; }
    .sidebar-logo { justify-content: center; padding: 1.1rem .4rem .8rem; }
    .nav-link { justify-content: center; padding: .7rem .5rem; }
    .nav-link.active::before { left: -.55rem; }
    .content { padding: 5.2rem 1.6rem 2.4rem; }
    .detail-grid { grid-template-columns: 1fr; }
    .detail-side { position: static; }
}

@media (max-width: 1100px) {
    .ring-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
    .content { padding: 4.6rem 1rem 2rem; }
    .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ring-strip { grid-template-columns: 1fr; }
    .item-row { flex-direction: column; align-items: flex-start; }
    .item-side { justify-content: flex-start; }
    .filter-dates { display: none; }
    .float-controls { top: 12px; right: 12px; }
    .user-card-info { display: none; }
}

/* =========================================================================
   Users roster (v2.0) — per-person stat cards on /admin/users
   ========================================================================= */
.roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1rem; }
.person-card { border-radius: 20px; padding: 1.15rem 1.25rem 1rem; display: flex; flex-direction: column; gap: .8rem; }
.person-inactive { opacity: .6; filter: saturate(.6); }
.person-top { display: flex; align-items: center; gap: .8rem; }
.person-top .avatar { width: 44px; height: 44px; font-size: .95rem; }
.person-id { display: flex; flex-direction: column; gap: .1rem; min-width: 0; flex: 1; }
.person-id strong { font-size: 1.02rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-id span { font-size: .76rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-role { font-size: .7rem; font-weight: 800; padding: .2rem .6rem; border-radius: 999px; border: 1.5px solid var(--border); color: var(--text-muted); letter-spacing: .06em; flex: none; }
.person-role.role-admin { border-color: var(--primary); color: var(--primary); }
.person-seen { display: flex; align-items: center; gap: .45rem; font-size: .78rem; color: var(--text-muted); flex-wrap: wrap; min-height: 1.4rem; }
.person-seen i { width: 8px; height: 8px; border-radius: 50%; background: var(--st-done); box-shadow: 0 0 8px var(--st-done); flex: none; }
.person-seen.away i { background: var(--text-muted); box-shadow: none; opacity: .55; }
.person-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.pstat { display: flex; flex-direction: column; align-items: center; gap: .1rem; padding: .55rem .2rem; border-radius: 12px; background: var(--glass-soft); border: 1px solid var(--border); }
.pstat b { font-size: 1.15rem; font-weight: 800; line-height: 1.2; }
.pstat span { font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); }
.pstat.open b { color: var(--st-new); }
.pstat.done b { color: var(--st-done); }
.pstat.bugs b { color: var(--st-blocked); }
.pstat.ideas b { color: var(--gold); }
.person-load { display: flex; align-items: center; gap: .6rem; font-size: .74rem; color: var(--text-muted); }
.person-load > span { flex: none; }
.loadbar { flex: 1; height: 7px; border-radius: 999px; background: var(--glass-soft); overflow: hidden; display: flex; }
.loadbar i { height: 100%; }
.load-open { background: var(--st-new); }
.load-done { background: color-mix(in srgb, var(--st-done) 45%, transparent); }
.load-none { background: var(--glass-soft); }
.person-foot { display: flex; justify-content: flex-end; gap: .3rem; border-top: 1px solid var(--border); padding-top: .7rem; flex-wrap: wrap; }

/* =========================================================================
   Changelog (v2.0) — sidebar version badge opens the release story
   ========================================================================= */
button.sidebar-version {
    width: 100%;
    background: none;
    border: none;
    border-top: 1px solid var(--border);
    font-family: inherit;
    cursor: pointer;
    transition: opacity .18s ease, color .18s ease;
}
button.sidebar-version:hover { opacity: 1; color: var(--gold); }
.version-spark { opacity: 0; transition: opacity .18s ease; }
button.sidebar-version:hover .version-spark { opacity: 1; }

.changelog-backdrop {
    position: fixed; inset: 0; z-index: 240;
    background: rgba(2, 6, 12, .72);
    backdrop-filter: blur(12px) saturate(1.15); -webkit-backdrop-filter: blur(12px) saturate(1.15);
    display: flex; align-items: center; justify-content: center;
    padding: 1.2rem;
    animation: clg-fade .18s ease;
}
.changelog-panel {
    position: relative;
    width: min(620px, 100%);
    max-height: min(84vh, 760px);
    overflow-y: auto;
    border-radius: 24px;
    padding: 1.6rem 1.7rem 1.5rem;
    background: linear-gradient(180deg, var(--glass-opaque-top), var(--glass-opaque));
    border: 1px solid var(--border);
    box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
    animation: clg-pop .22s cubic-bezier(.2, .9, .3, 1.2);
}
.changelog-close {
    position: absolute; top: .85rem; right: .9rem;
    width: 32px; height: 32px; border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--glass-soft);
    color: var(--text-muted);
    cursor: pointer; font-size: .8rem;
    display: grid; place-items: center;
    transition: color .15s ease, border-color .15s ease;
}
.changelog-close:hover { color: var(--text); border-color: var(--primary); }
.changelog-kicker { font-size: .68rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.changelog-head h2 { margin: .25rem 0 .5rem; font-size: 1.45rem; }
.changelog-intro { font-size: .88rem; color: var(--text-muted); line-height: 1.55; margin: 0 0 1.3rem; }
.changelog-rail { position: relative; padding-left: 2.3rem; display: flex; flex-direction: column; gap: 1.15rem; }
.changelog-rail::before {
    content: ""; position: absolute; left: 15px; top: 8px; bottom: 8px; width: 3px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--gold), var(--primary) 55%, transparent);
    opacity: .5;
}
.release { position: relative; }
.release-node {
    position: absolute; left: -2.3rem; top: -3px;
    width: 32px; height: 32px; border-radius: 50%;
    display: grid; place-items: center; font-size: .95rem;
    background: var(--glass-opaque); border: 1px solid var(--border);
}
.release-current .release-node { border-color: var(--gold); box-shadow: 0 0 14px var(--gold-soft); }
.release-head {
    display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
    width: 100%; background: none; border: none; padding: 0;
    font-family: inherit; color: inherit; cursor: pointer; text-align: left;
}
.release-pill {
    font-size: .72rem; font-weight: 800; padding: .18rem .6rem; border-radius: 999px;
    background: var(--primary-soft); color: var(--primary); letter-spacing: .04em; flex: none;
}
.release-current .release-pill { background: var(--gold-soft); color: var(--gold); }
.release-title { font-weight: 700; font-size: .98rem; }
.release-here {
    font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em;
    color: var(--gold); border: 1px dashed var(--gold);
    padding: .12rem .45rem; border-radius: 999px; flex: none; opacity: .85;
}
.release-date { margin-left: auto; font-size: .74rem; color: var(--text-muted); flex: none; }
.release-chev { font-size: .8rem; color: var(--text-muted); transition: transform .2s ease; flex: none; }
.release.expanded .release-chev { transform: rotate(180deg); }
.release-summary { margin: .3rem 0 0; font-size: .8rem; color: var(--text-muted); }
.release-items {
    margin: .6rem 0 0; padding: .75rem .9rem .75rem 1.7rem;
    border-radius: 14px; background: var(--glass-soft); border: 1px solid var(--border);
    display: flex; flex-direction: column; gap: .45rem;
    font-size: .82rem; line-height: 1.45;
    animation: clg-fade .25s ease;
}
.release-items li::marker { color: var(--gold); }

@keyframes clg-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes clg-pop { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }

@media (max-width: 700px) {
    .changelog-panel { padding: 1.25rem 1rem 1.1rem; }
    .release-date { display: none; }
    .roster { grid-template-columns: 1fr; }
}

/* Roster momentum (v2.1) — quiet signal for who's shipping; no negative styling */
.week-chip {
    margin-left: auto; flex: none;
    font-size: .68rem; font-weight: 800;
    padding: .16rem .55rem; border-radius: 999px;
    background: var(--primary-soft); color: var(--primary);
    white-space: nowrap;
}
.week-chip.lead { background: var(--gold-soft); color: var(--gold); }
.person-lead {
    outline: 1px solid var(--gold);
    outline-offset: -1px;
    box-shadow: 0 0 22px -8px var(--gold);
}

/* Quick-add bar sits clear of the fixed top-right user chip cluster */
.quick-add { margin-top: 2rem; }

/* Dashboard → Action items CTA under the team strip */
.dash-cta { display: flex; justify-content: center; margin: .4rem 0 1.4rem; }

/* =============================================================================
   THEMES 3 & 4 (v2.1): Batman and Alfred
   Linear-inspired discipline: solid panels, hairline borders, zero blur,
   restrained gradients. Batman glows bat-signal gold on black; Alfred is
   the white-glove counterpart: paper, ink, and gold pinstripes.
   ============================================================================= */
:root[data-theme="batman"] {
    --blur: none;
    --blur-soft: none;
    --bg-base: #08090A;
    --text: #EDEEF0;
    --text-muted: #83888F;
    --border: rgba(255, 255, 255, .075);

    --glass: #0F1013;
    --glass-strong: #14151A;
    --glass-soft: #101116;
    --edge-hi: rgba(255, 255, 255, .09);
    --edge-lo: rgba(255, 255, 255, .02);
    --sheen: rgba(255, 255, 255, .015);
    --inner-light: rgba(255, 255, 255, .05);

    --shadow-1: 0 1px 2px rgba(0, 0, 0, .5), 0 10px 28px -10px rgba(0, 0, 0, .7);
    --shadow-2: 0 3px 8px rgba(0, 0, 0, .55), 0 22px 54px -14px rgba(0, 0, 0, .8);

    --primary: #F7C948;
    --primary-hover: #FFD966;
    --primary-soft: rgba(247, 201, 72, .12);
    --bg-veil: #08090A;
    --bg-veil-2: #08090A;
    --bg-veil-auth: rgba(8, 9, 10, .97);
    --bg-veil-auth-2: #08090A;
    --gold: #F7C948;
    --gold-soft: rgba(247, 201, 72, .14);
    --danger: #FF5C5C;
    --danger-soft: rgba(255, 92, 92, .12);

    --sidebar-text: #9AA0A8;
    --sidebar-text-active: #F7C948;

    --st-new: #5E9EFF;
    --st-progress: #F7C948;
    --st-blocked: #FF5C5C;
    --st-done: #3FDD8C;
    --st-cancelled: #6E747C;
    --st-await: #B08CFF;
    --st-warn: #FFAB4A;
    --plate-glow: #F7C948;

    --pr-low: #6E747C;
    --pr-medium: #5E9EFF;
    --pr-high: #FFA23E;
    --pr-critical: #FF5C5C;

    --orb-teal: transparent;
    --orb-gold: transparent;
    --dots: transparent;

    --glass-opaque-top: #121316;
    --glass-opaque: #0E0F12;
}

/* =============================================================================
   💜 AMETHYST — deep indigo night behind royal-purple frosted glass.
   Unlike Batman/Alfred this theme is ABOUT the blur: panels stay translucent,
   the wallpaper glows through a violet veil, and the accents are champagne
   gold on lavender light.
   ============================================================================= */
/* Amethyst Royal (v2.21.2, Luke-approved mock): batman-black base, royal indigo
   highlights, white-glow hovers. Champagne gold and every semantic color system
   (status, health, ping) ride on top untouched. Storage key stays 'amethyst'. */
:root[data-theme="amethyst"] {
    --blur: blur(20px) saturate(1.4);
    --blur-soft: blur(14px) saturate(1.3);
    --bg-base: #060509;
    --text: #F4F1FF;
    --text-muted: #8F86B8;
    --border: rgba(140, 120, 240, .20);

    --glass: rgba(22, 17, 44, .55);
    --glass-strong: rgba(30, 24, 58, .65);
    --glass-soft: rgba(124, 102, 255, .06);
    --edge-hi: rgba(255, 255, 255, .10);
    --edge-lo: rgba(255, 255, 255, .03);
    --sheen: rgba(255, 255, 255, .04);
    --inner-light: rgba(255, 255, 255, .07);

    --shadow-1: 0 1px 2px rgba(0, 0, 0, .6), 0 10px 28px -10px rgba(0, 0, 0, .8);
    --shadow-2: 0 3px 8px rgba(0, 0, 0, .65), 0 22px 54px -14px rgba(0, 0, 0, .9);

    --primary: #7C66FF;
    --primary-hover: #927FFF;
    --primary-soft: rgba(124, 102, 255, .18);
    --bg-veil: rgba(6, 5, 9, .82);
    --bg-veil-2: rgba(6, 5, 9, .92);
    --bg-veil-auth: rgba(6, 5, 9, .72);
    --bg-veil-auth-2: rgba(6, 5, 9, .86);
    --gold: #E6C57E;
    --gold-soft: rgba(230, 197, 126, .16);
    --danger: #FF6B8B;
    --danger-soft: rgba(255, 107, 139, .14);

    --sidebar-text: #8F86B8;
    --sidebar-text-active: #F4F1FF;

    --st-new: #7FB4FF;
    --st-progress: #E6C57E;
    --st-blocked: #FF6B8B;
    --st-done: #5EE6A8;
    --st-cancelled: #7B7694;
    --st-await: #D9A8FF;
    --st-warn: #FFB066;
    --plate-glow: #7C66FF;

    --pr-low: #7B7694;
    --pr-medium: #7FB4FF;
    --pr-high: #FFB35C;
    --pr-critical: #FF6B8B;

    --orb-teal: rgba(124, 102, 255, .30);
    --orb-gold: rgba(90, 60, 220, .18);
    --dots: rgba(244, 241, 255, .04);

    --glass-opaque-top: #171226;
    --glass-opaque: #0D0A16;
}
/* True blackout backdrop (v2.21.6, Luke: "doesn't look blacked out") — same
   treatment batman uses: kill the wallpaper watermark + animated orbs, flat
   near-black with a whisper of royal indigo up top. */
:root[data-theme="amethyst"] body::before {
    background: radial-gradient(720px 320px at 26% -10%, rgba(124, 102, 255, .07), transparent 70%), #060509;
}
:root[data-theme="amethyst"] body::after { animation: none; background: none; }

/* Royal indigo primary is deep enough for a dark glyph, and glows */
:root[data-theme="amethyst"] .btn-primary { color: #0D0A16; box-shadow: 0 0 18px -6px #7C66FF; }
:root[data-theme="amethyst"] .nav-link.active { color: #B9A8FF; box-shadow: inset 2px 0 0 #7C66FF; }
:root[data-theme="amethyst"] .team-chip-sel,
:root[data-theme="amethyst"] .quick-add:focus-within { box-shadow: 0 0 24px -8px rgba(124, 102, 255, .65); }

:root[data-theme="batman"] body::before {
    background: radial-gradient(720px 320px at 26% -10%, rgba(247, 201, 72, .06), transparent 70%), #08090A;
}
:root[data-theme="batman"] body::after { animation: none; background: none; }
:root[data-theme="batman"] .nav-link.active { color: #F7C948; box-shadow: inset 2px 0 0 #F7C948; }
:root[data-theme="batman"] .team-chip-sel,
:root[data-theme="batman"] .quick-add:focus-within { box-shadow: 0 0 22px -8px rgba(247, 201, 72, .55); }

:root[data-theme="alfred"] {
    --blur: none;
    --blur-soft: none;
    --bg-base: #F7F6F2;
    --text: #191C1F;
    --text-muted: #6E7378;
    --border: rgba(25, 28, 31, .10);

    --glass: #FFFFFF;
    --glass-strong: #FFFFFF;
    --glass-soft: #FBFAF6;
    --edge-hi: rgba(255, 255, 255, 1);
    --edge-lo: rgba(255, 255, 255, .6);
    --sheen: rgba(255, 255, 255, 0);
    --inner-light: rgba(255, 255, 255, .9);

    --shadow-1: 0 1px 2px rgba(25, 28, 31, .05), 0 10px 26px -12px rgba(25, 28, 31, .12);
    --shadow-2: 0 3px 8px rgba(25, 28, 31, .07), 0 22px 50px -16px rgba(25, 28, 31, .16);

    --primary: #23272B;
    --primary-hover: #000000;
    --primary-soft: rgba(35, 39, 43, .07);
    --bg-veil: #F7F6F2;
    --bg-veil-2: #F7F6F2;
    --bg-veil-auth: rgba(247, 246, 242, .97);
    --bg-veil-auth-2: #F7F6F2;
    --gold: #A87E0B;
    --gold-soft: rgba(168, 126, 11, .12);
    --danger: #DC2626;
    --danger-soft: rgba(220, 38, 38, .10);

    --sidebar-text: #5F656B;
    --sidebar-text-active: #191C1F;

    --st-new: #2563EB;
    --st-progress: #B45309;
    --st-blocked: #DC2626;
    --st-done: #059669;
    --st-cancelled: #8A9096;
    --st-await: #6D28D9;
    --st-warn: #C96A10;
    --plate-glow: #8A7645;

    --pr-low: #8A9096;
    --pr-medium: #2563EB;
    --pr-high: #C2570C;
    --pr-critical: #DC2626;

    --orb-teal: transparent;
    --orb-gold: transparent;
    --dots: transparent;

    --glass-opaque-top: #FFFFFF;
    --glass-opaque: #FBFAF6;
}

:root[data-theme="alfred"] body::before {
    background: radial-gradient(720px 320px at 26% -10%, rgba(168, 126, 11, .05), transparent 70%), #F7F6F2;
}
:root[data-theme="alfred"] body::after { animation: none; background: none; }
:root[data-theme="alfred"] .nav-link.active { color: #191C1F; box-shadow: inset 2px 0 0 #A87E0B; }

/* ---------- Theme picker menu ---------- */
.theme-wrap { position: relative; }
.theme-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 90;
    min-width: 172px;
    padding: .4rem;
    border-radius: 16px;
    background: linear-gradient(180deg, var(--glass-opaque-top), var(--glass-opaque));
    border: 1px solid var(--border);
    box-shadow: var(--shadow-2);
    display: flex;
    flex-direction: column;
    gap: .15rem;
    animation: clg-fade .16s ease;
}
.theme-menu button {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .5rem .7rem;
    border: none;
    border-radius: 10px;
    background: none;
    color: var(--text);
    font-family: inherit;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
}
.theme-menu button:hover { background: var(--primary-soft); }
.theme-menu button.sel { color: var(--gold); background: var(--gold-soft); }
.theme-menu .theme-check { margin-left: auto; font-size: .75rem; }
.theme-scrim { position: fixed; inset: 0; z-index: 85; background: transparent; border: none; cursor: default; }

/* =============================================================================
   Dashboard v3 (v2.1): clean stat board — four numbers + per-person plates
   ============================================================================= */
.tb-head { display: flex; align-items: baseline; gap: .6rem; margin: 0 0 .6rem .2rem; flex-wrap: wrap; }
.tb-head h3 { font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); margin: 0; }
.tb-head span { font-size: .72rem; color: var(--text-muted); opacity: .75; }

.dstat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: .7rem; margin-bottom: 1.5rem; }
.dstat {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: .9rem 1.05rem;
    background: var(--glass-soft);
    cursor: pointer;
    text-align: left;
    color: var(--text);
    font-family: inherit;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.dstat:hover { border-color: var(--primary); box-shadow: 0 0 20px -10px var(--primary); }
.dstat b { display: block; font-size: 1.7rem; font-weight: 800; line-height: 1.1; }
.dstat span { font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }
.dstat.s-new b { color: var(--st-new); }
.dstat.s-prog b { color: var(--st-progress); }
.dstat.s-block b { color: var(--st-blocked); }
.dstat.s-await b { color: var(--st-await); }
.dstat.s-done b { color: var(--st-done); }

.team-board { display: flex; flex-direction: column; gap: .45rem; margin-bottom: 1.4rem; }
.tb-row {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .72rem .95rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--glass-soft);
    cursor: pointer;
    color: var(--text);
    font-family: inherit;
    text-align: left;
    transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.tb-row:hover { border-color: var(--primary); transform: translateX(2px); box-shadow: 0 0 20px -10px var(--primary); }
.tb-row .avatar { width: 34px; height: 34px; font-size: .78rem; flex: none; }
.tb-who { display: flex; flex-direction: column; min-width: 130px; }
.tb-who strong { font-size: .92rem; }
.tb-who small { font-size: .7rem; color: var(--text-muted); display: flex; align-items: center; gap: .3rem; }
.tb-who small i { width: 6px; height: 6px; border-radius: 50%; background: var(--st-done); box-shadow: 0 0 6px var(--st-done); flex: none; }
.tb-who small.away i { background: var(--text-muted); box-shadow: none; opacity: .5; }
.tb-status { display: flex; gap: .4rem; flex: 1; flex-wrap: wrap; }
.tb-chip { font-size: .72rem; font-weight: 700; padding: .16rem .55rem; border-radius: 999px; white-space: nowrap; }
.tb-chip.c-new { background: color-mix(in srgb, var(--st-new) 15%, transparent); color: var(--st-new); }
.tb-chip.c-prog { background: color-mix(in srgb, var(--st-progress) 15%, transparent); color: var(--st-progress); }
.tb-chip.c-block { background: color-mix(in srgb, var(--st-blocked) 15%, transparent); color: var(--st-blocked); }
.tb-chip.c-await { background: color-mix(in srgb, var(--st-await) 15%, transparent); color: var(--st-await); }
.tb-bar { width: 110px; height: 6px; border-radius: 999px; background: color-mix(in srgb, var(--text-muted) 14%, transparent); overflow: hidden; display: flex; flex: none; }
.tb-bar i { height: 100%; }
.tb-total { font-weight: 800; font-size: .95rem; width: 56px; text-align: right; flex: none; }
.tb-total small { font-weight: 600; font-size: .66rem; color: var(--text-muted); display: block; }
.tb-arrow { color: var(--text-muted); font-size: .85rem; flex: none; }
.tb-clear { font-size: .75rem; color: var(--text-muted); padding: .5rem .3rem 0; margin: 0; }
.tb-clear b { color: var(--st-done); font-weight: 700; }

.proj-line {
    display: flex;
    align-items: center;
    gap: .7rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: .7rem .95rem;
    background: var(--glass-soft);
    font-size: .8rem;
}
.proj-line .pl-ico { color: var(--gold); }
.proj-line b { font-size: .82rem; }
.proj-line .muted { color: var(--text-muted); font-size: .8rem; }
.proj-line a { margin-left: auto; color: var(--primary); font-weight: 700; font-size: .76rem; white-space: nowrap; }

@media (max-width: 700px) {
    .dstat-row { grid-template-columns: repeat(2, 1fr); }
    .tb-bar { display: none; }
    .tb-who { min-width: 105px; }
}

/* v2.1 stats-move: plates carry momentum + quiet contribution counts */
.tb-row.tb-lead {
    outline: 1px solid var(--gold);
    outline-offset: -1px;
    box-shadow: 0 0 22px -8px var(--gold);
}
.tb-status .week-chip { margin-left: 0; }
.tb-contrib { display: flex; gap: .45rem; font-size: .7rem; color: var(--text-muted); flex: none; white-space: nowrap; }
.cell-sub { display: block; font-size: .7rem; color: var(--text-muted); max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-signin { font-size: .8rem; color: var(--text-muted); }

/* =============================================================================
   MOBILE SHELL (v2.2 "The Pocket Release") — phones get a native-app experience:
   bottom tab bar with a gold capture button, sheets instead of centered modals,
   swipeable scope chips, and desktop chrome cut rather than shrunk.
   ============================================================================= */

/* Hidden everywhere except the phone breakpoint */
.tabbar, .more-scrim, .more-sheet { display: none; }

@keyframes sheet-up {
    from { transform: translateY(36px); opacity: 0; }
    to { transform: none; opacity: 1; }
}

@media (max-width: 700px) {
    /* ---------- shell ---------- */
    .sidebar { display: none; }
    .content { padding: 4.3rem .95rem calc(5.6rem + env(safe-area-inset-bottom)); }
    .float-controls { top: 10px; right: 10px; gap: .45rem; }

    /* ---------- bottom tab bar ---------- */
    .tabbar {
        display: flex;
        align-items: flex-end;
        justify-content: space-around;
        position: fixed;
        left: 0; right: 0; bottom: 0;
        z-index: 120;
        padding: .4rem .4rem calc(.45rem + env(safe-area-inset-bottom));
        background: linear-gradient(180deg, var(--glass-opaque-top), var(--glass-opaque));
        border-top: 1px solid var(--border);
        box-shadow: 0 -12px 30px -18px rgba(0, 0, 0, .55);
        /* v2.12: pin hard. Own compositor layer so the bar can't lag or blink
           while the phone browser's toolbar collapses/expands mid-scroll. */
        transform: translateZ(0);
        will-change: transform;
    }
    .tabbar .tab {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: .18rem;
        min-width: 58px;
        padding: .32rem .5rem;
        position: relative;
        background: none;
        border: none;
        border-radius: 12px;
        cursor: pointer;
        font-family: inherit;
        font-size: .6rem;
        font-weight: 700;
        letter-spacing: .04em;
        color: var(--sidebar-text);
        text-decoration: none;
        -webkit-tap-highlight-color: transparent;
    }
    .tabbar .tab svg { width: 21px; height: 21px; }
    .tabbar .tab.active { color: var(--gold); }
    .tab-badge {
        position: absolute;
        top: -2px;
        right: 4px;
        background: var(--gold);
        color: #1B2430;
        font-size: .58rem;
        font-weight: 800;
        border-radius: 999px;
        padding: .06rem .34rem;
        border: 2px solid var(--glass-opaque-top);
    }
    .tab-capture {
        width: 54px;
        height: 54px;
        margin-top: -22px;
        border-radius: 50%;
        border: none;
        cursor: pointer;
        background: var(--gold);
        color: #1B2430;
        font-size: 1.9rem;
        font-weight: 700;
        line-height: 1;
        font-family: inherit;
        display: grid;
        place-items: center;
        box-shadow: 0 10px 26px -8px var(--gold), inset 0 1px 0 rgba(255, 255, 255, .5);
        -webkit-tap-highlight-color: transparent;
    }
    .tab-capture:active { transform: scale(.94); }

    /* ---------- More sheet ---------- */
    .more-scrim {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 115;
        background: rgba(2, 6, 12, .72);
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
        border: none;
    }
    .more-sheet {
        display: flex;
        flex-direction: column;
        gap: .15rem;
        position: fixed;
        left: 0; right: 0; bottom: 0;
        z-index: 118;
        padding: 1rem .9rem calc(5.6rem + env(safe-area-inset-bottom));
        border-radius: 24px 24px 0 0;
        background: linear-gradient(180deg, var(--glass-opaque-top), var(--glass-opaque));
        border: 1px solid var(--border);
        border-bottom: none;
        animation: sheet-up .22s cubic-bezier(.2, .9, .3, 1.08);
    }
    .more-sheet a, .more-sheet button {
        display: flex;
        align-items: center;
        gap: .75rem;
        padding: .72rem .8rem;
        border-radius: 12px;
        background: none;
        border: none;
        color: var(--text);
        font-family: inherit;
        font-weight: 600;
        font-size: .95rem;
        text-align: left;
        cursor: pointer;
        text-decoration: none;
        -webkit-tap-highlight-color: transparent;
    }
    .more-sheet a:active, .more-sheet button:active { background: var(--primary-soft); }
    .more-sheet svg { width: 19px; height: 19px; flex: none; }
    .more-sheet .nav-badge, .more-sheet .more-hint { margin-left: auto; }
    .more-hint { font-size: .72rem; color: var(--text-muted); font-weight: 600; }
    .more-emoji { width: 19px; text-align: center; }

    /* ---------- modals become bottom sheets ---------- */
    .modal-backdrop { align-items: flex-end; place-items: end stretch; padding: 0; }
    .modal {
        width: 100%;
        max-width: none;
        border-radius: 24px 24px 0 0;
        max-height: 92dvh;
        overflow-y: auto;
        padding-bottom: calc(env(safe-area-inset-bottom) + .4rem);
        animation: sheet-up .24s cubic-bezier(.2, .9, .3, 1.05);
    }

    /* iOS zooms any focused input under 16px — never let it */
    .input, .quick-add-input, select.input, textarea.input { font-size: 16px; }

    /* ---------- capture bar ---------- */
    .quick-add { margin-top: 1rem; margin-bottom: 1.2rem; padding: .85rem 1rem; border-radius: 18px; }
    .quick-add-hint { display: none; }         /* the Enter keycap means nothing to thumbs */
    .quick-add-go .kbd { display: none; }
    .quick-add-input::placeholder { font-size: .86rem; }

    /* ---------- dashboard ---------- */
    .tb-head { margin-top: .2rem; }
    .tb-head span { display: none; }           /* keep the label, cut the lecture */
    .dstat-row { gap: .55rem; margin-bottom: 1.2rem; }
    .dstat { padding: .68rem .8rem; border-radius: 14px; }
    .dstat b { font-size: 1.45rem; }
    .dstat span { font-size: .6rem; }
    .tb-row { flex-wrap: wrap; gap: .45rem .7rem; padding: .72rem .85rem; }
    .tb-who { min-width: 0; flex: 1; }
    .tb-status { flex-basis: 100%; order: 5; margin-top: .1rem; }
    .tb-contrib { display: none; }             /* cut on phones — lives in the tooltip world */
    .tb-bar { display: none; }
    .tb-total { width: auto; }
    .tb-arrow { display: none; }
    .proj-line { flex-wrap: wrap; font-size: .78rem; }
    .proj-line a { margin-left: 0; }

    /* ---------- scope chips: one swipeable line ---------- */
    .team-strip { margin: .2rem 0 1.2rem; gap: .6rem; }
    .team-strip-people {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        max-width: 100%;
        padding: .15rem .15rem .35rem;
        margin: -.15rem;
    }
    .team-strip-people::-webkit-scrollbar { display: none; }
    .team-chip { flex: none; }

    /* ---------- filter bar ---------- */
    .filter-bar { gap: .55rem; margin-bottom: 1.2rem; }
    .filter-search { flex: 1 1 100%; min-width: 0; }
    .filter-select { flex: 1 1 40%; min-width: 0; }

    /* ---------- item rows ---------- */
    .item-row { flex-direction: column; align-items: stretch; gap: .55rem; }
    .item-side { justify-content: flex-start; flex-wrap: wrap; }
    .item-meta { flex-wrap: wrap; }

    /* ---------- tables scroll inside their card ---------- */
    .table-card { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .table-card .data-table { min-width: 560px; }

    /* ---------- page furniture ---------- */
    .page-header h1 { font-size: 1.4rem; }
    .section-divider { margin: 1.2rem 0 .9rem; }
    .roster { grid-template-columns: 1fr; }
    .changelog-panel { border-radius: 20px; }
}

/* Tablets (701–1120px) keep the icon-rail sidebar; give content sane padding */
@media (min-width: 701px) and (max-width: 1120px) {
    .content { padding: 5rem 1.6rem 2.6rem; }
}

/* Brand lockup pinned top-left on phones (sidebar hidden there); tablets keep
   the icon rail's own logo top-left. Tap = home. */
.float-brand { display: none; }
@media (max-width: 700px) {
    .float-brand {
        position: fixed;
        top: 10px;
        left: 12px;
        z-index: 60;
        display: flex;
        align-items: center;
        gap: .6rem;
        padding: .4rem .95rem .4rem .5rem;
        border-radius: 999px;
        background: linear-gradient(180deg, var(--glass-opaque-top), var(--glass-opaque));
        border: 1px solid var(--border);
        box-shadow: var(--shadow-1);
        text-decoration: none;
        -webkit-tap-highlight-color: transparent;
    }
    .float-brand img { width: 36px; height: 36px; display: block; }
    .float-brand-text { display: flex; flex-direction: column; line-height: 1.1; }
    .float-brand-text strong { font-size: 1.05rem; font-weight: 800; color: var(--text); letter-spacing: .02em; }
    /* The spelled-out line only fits alongside the user-chip cluster on wider
       phones (Max/Plus models); standard phones show logo + MNPS. */
    .float-brand-text small { display: none; font-size: .56rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
}
@media (min-width: 430px) and (max-width: 700px) {
    .float-brand-text small { display: block; }
}

/* =============================================================================
   MEETINGS (v2.3 "The Monday Release") — the Monday 10-11 AM agenda page.
   ============================================================================= */
.mon-strip { display: flex; gap: .5rem; align-items: stretch; margin: .2rem 0 1.3rem; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: .15rem; }
.mon-strip::-webkit-scrollbar { display: none; }
.mon-chip {
    display: flex; flex-direction: column; align-items: center; gap: .12rem;
    padding: .5rem .95rem; border-radius: 14px;
    border: 1px solid var(--border); background: var(--glass-soft);
    cursor: pointer; color: var(--text); font-family: inherit; flex: none;
    transition: border-color .15s ease;
    -webkit-tap-highlight-color: transparent;
}
.mon-chip:hover { border-color: var(--primary); }
.mon-chip small { font-size: .62rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }
.mon-chip b { font-size: .9rem; white-space: nowrap; }
.mon-chip .mc-state { font-size: .6rem; font-weight: 800; white-space: nowrap; }
.mon-chip.done .mc-state { color: var(--st-done); }
.mon-chip.skip .mc-state { color: var(--text-muted); }
.mon-chip.next .mc-state { color: var(--st-new); }
.mon-chip.sel { border-color: var(--gold); box-shadow: 0 0 18px -8px var(--gold); background: var(--gold-soft); }
.mon-chip.sel b { color: var(--gold); }

.meet-hero { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.1rem; flex-wrap: wrap; }
.meet-date { display: flex; flex-direction: column; }
.meet-date b { font-size: 1.35rem; font-weight: 800; letter-spacing: -.01em; }
.meet-date span { font-size: .78rem; color: var(--text-muted); }
.meet-state { font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: .34rem .8rem; border-radius: 999px; white-space: nowrap; }
.meet-state.upcoming { background: color-mix(in srgb, var(--st-new) 16%, transparent); color: var(--st-new); }
.meet-state.live { background: color-mix(in srgb, var(--st-blocked) 18%, transparent); color: var(--st-blocked); animation: pulse-live 1.6s ease-in-out infinite; }
.meet-state.happened { background: color-mix(in srgb, var(--st-done) 16%, transparent); color: var(--st-done); }
.meet-state.skipped { background: color-mix(in srgb, var(--text-muted) 14%, transparent); color: var(--text-muted); }
@keyframes pulse-live { 50% { box-shadow: 0 0 16px -2px var(--st-blocked); } }
.meet-count { margin-left: auto; font-size: .78rem; color: var(--text-muted); }

.tp-add {
    display: flex; align-items: center; gap: .7rem;
    border: 1px solid var(--border); border-radius: 16px;
    padding: .65rem .9rem; background: var(--glass-soft);
    margin-bottom: 1.1rem; cursor: text;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.tp-add:focus-within { border-color: var(--gold); box-shadow: 0 0 18px -8px var(--gold); }
.tp-add svg { width: 18px; height: 18px; color: var(--gold); flex: none; }
.tp-add-input { flex: 1; min-width: 0; background: none; border: none; outline: none; color: var(--text); font-family: inherit; font-size: .92rem; }
.tp-add-input::placeholder { color: var(--text-muted); }

.tp-list { display: flex; flex-direction: column; gap: .5rem; }
.tp-row {
    display: flex; align-items: center; gap: .8rem;
    border: 1px solid var(--border); border-left-width: 3px; border-radius: 14px;
    padding: .75rem .95rem; background: var(--glass-soft);
}
.tp-row .avatar { width: 32px; height: 32px; font-size: .72rem; flex: none; }
.tp-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .12rem; }
.tp-main strong { font-size: .93rem; }
.tp-main small { font-size: .7rem; color: var(--text-muted); }
.carry { display: inline-flex; align-items: center; gap: .25rem; font-size: .66rem; font-weight: 700; padding: .12rem .5rem; border-radius: 999px; background: var(--gold-soft); color: var(--gold); margin-left: .4rem; vertical-align: middle; white-space: nowrap; }
.tp-linked { background: var(--primary-soft); color: var(--primary); text-decoration: none; }
.tp-actions { display: flex; gap: .3rem; flex: none; }
.tp-row.tp-open { border-left-color: var(--st-new); }
.tp-row.discussed { border-left-color: var(--st-done); opacity: .55; }
.tp-row.discussed .tp-main strong { text-decoration: line-through; }

.skip-card { text-align: center; padding: 2.2rem 1.5rem; border: 1.5px dashed var(--border); border-radius: 20px; background: var(--glass-soft); }
.skip-card .skip-emoji { font-size: 2.2rem; display: block; margin-bottom: .5rem; }
.skip-card h3 { margin: 0 0 .4rem; }
.skip-card p { margin: 0 auto; color: var(--text-muted); font-size: .85rem; max-width: 460px; }
.skip-card .skip-flag { display: inline-block; margin-top: .9rem; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); border: 1px solid var(--border); padding: .35rem .8rem; border-radius: 999px; }

@media (max-width: 700px) {
    .meet-date b { font-size: 1.15rem; }
    .meet-count { margin-left: 0; flex-basis: 100%; }
    .tp-row { flex-wrap: wrap; }
    .tp-actions { flex-basis: 100%; justify-content: flex-end; }
    .tp-add-input { font-size: 16px; }
}

/* Dashboard Monday banner (v2.3.1) — the next meeting's fate, one tap away */
.meet-line {
    display: flex;
    align-items: center;
    gap: .7rem;
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: .72rem .95rem;
    background: var(--glass-soft);
    color: var(--text);
    font-family: inherit;
    cursor: pointer;
    text-align: left;
    margin-bottom: 1.3rem;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.meet-line:hover { border-color: var(--gold); box-shadow: 0 0 20px -10px var(--gold); }
.meet-line .ml-ico { color: var(--gold); display: grid; place-items: center; flex: none; }
.meet-line .ml-text { flex: 1; min-width: 0; font-size: .85rem; }
.meet-line .ml-text b { font-size: .88rem; }
.meet-line .ml-text .muted { font-size: .8rem; }
.meet-line .ml-state { flex: none; }
.meet-line-live { border-color: color-mix(in srgb, var(--st-blocked) 45%, var(--border)); }

/* Users admin desk: avatar left, name over the username · email line with air */
.cell-person { display: flex; align-items: flex-start; gap: .65rem; }
.cell-person .cell-name { display: block; padding-top: .15rem; font-weight: 600; }
.cell-person .cell-sub { margin-top: .3rem; }

@media (max-width: 700px) {
    .meet-line { flex-wrap: wrap; }
    .meet-line .ml-text { flex-basis: calc(100% - 60px); }
    .meet-line .ml-state { margin-left: auto; }
}

/* =============================================================================
   Small-viewport audit fixes (v2.3.2)
   ============================================================================= */

/* #2/#3: a modal taller than the viewport must scroll its BODY only — the
   header (close X) and footer (the actions) stay pinned and reachable at every
   size. Flex column + scrolling body; overflow on .modal itself is disabled. */
.modal {
    display: flex;
    flex-direction: column;
    max-height: calc(100dvh - 24px);
    overflow: hidden;
}
.modal-body {
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
}
.modal-footer { flex: none; }
.modal-header { flex: none; }

/* #1: below ~360px the full brand pill collides with the user-chip cluster —
   drop to the logo-only badge on the very smallest phones. */
@media (max-width: 359px) {
    .float-brand { padding: .4rem .5rem; gap: 0; }
    .float-brand-text { display: none; }
}

/* Business-analyst chip on project cards (roster lives in dbo.BusinessAnalysts) */
.project-badges { display: flex; gap: .45rem; flex-wrap: wrap; align-items: center; }
.ba-chip {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .72rem;
    font-weight: 700;
    padding: .22rem .6rem;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    white-space: nowrap;
}
/* SQL server chip on project details (v2.23) — reads like the BA chip, teal-ish */
.sql-chip {
    display: inline-flex; align-items: center; gap: .3rem;
    font-size: .72rem; font-weight: 700; padding: .22rem .6rem; border-radius: 999px;
    background: color-mix(in srgb, var(--st-done) 16%, transparent); color: var(--st-done);
    font-family: var(--font-mono, monospace); white-space: nowrap;
}
/* SuperAdmin role badge on the Users desk (v2.23) — distinct from the Admin outline */
.badge-super {
    background: color-mix(in srgb, var(--gold) 18%, transparent);
    color: var(--gold); border: 1.5px solid color-mix(in srgb, var(--gold) 45%, transparent);
    box-shadow: none;
}
/* Feedback "show closed" toggle (v2.23) — closed items hidden by default */
.fb-closed-toggle {
    display: inline-flex; align-items: center; gap: .45rem;
    margin: 0 0 1rem; font-size: .84rem; color: var(--text-muted); cursor: pointer;
    user-select: none;
}
.fb-closed-toggle input { width: 15px; height: 15px; accent-color: var(--primary); cursor: pointer; }
.fb-closed-count {
    background: color-mix(in srgb, var(--text-muted) 20%, transparent); color: var(--text);
    border-radius: 999px; padding: 0 .5rem; font-size: .72rem; font-weight: 700;
}

/* Dashboard section captions: the quiet explainer line under each glowing divider */
.section-caption {
    text-align: center;
    margin: -.5rem 0 .9rem;
    font-size: .72rem;
    color: var(--text-muted);
    opacity: .75;
}
@media (max-width: 700px) {
    .section-caption { display: none; } /* dividers alone carry it on phones */
}

/* =============================================================================
   Dashboard zone heads (v2.3.x take two): editorial, not template. A small
   left-aligned eyebrow with ONE pulsing MNPS gradient tick and a hairline that
   fades out to the right. The Monday banner labels itself from within.
   ============================================================================= */
.zone-head {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin: 2rem 0 .85rem;
    min-width: 0;
}
.zone-head::before {
    content: "";
    width: 3px;
    height: 15px;
    border-radius: 3px;
    flex: none;
    background: linear-gradient(180deg, var(--gold), var(--mnps-teal));
    box-shadow: 0 0 8px color-mix(in srgb, var(--gold) 45%, transparent);
    animation: zone-pulse 3.6s ease-in-out infinite;
}
.zone-head h3 {
    margin: 0;
    font-size: .73rem;
    font-weight: 800;
    letter-spacing: .17em;
    text-transform: uppercase;
    color: var(--text);
    opacity: .85;
    white-space: nowrap;
}
.zone-count { font-size: .73rem; font-weight: 800; color: var(--gold); flex: none; }
.zone-sub {
    font-size: .72rem;
    color: var(--text-muted);
    opacity: .75;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
.zone-head::after {
    content: "";
    flex: 1;
    height: 1px;
    min-width: 24px;
    background: linear-gradient(90deg, var(--border), transparent);
}
@keyframes zone-pulse {
    50% { box-shadow: 0 0 14px color-mix(in srgb, var(--gold) 75%, transparent); opacity: .75; }
}

/* Monday banner labels itself: gold eyebrow inside, no header hat */
.meet-line .ml-text { display: flex; flex-direction: column; gap: .1rem; }
.ml-eyebrow {
    font-size: .58rem;
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--gold);
    line-height: 1;
}
.ml-line { display: flex; align-items: baseline; gap: .45rem; flex-wrap: wrap; min-width: 0; }

@media (max-width: 700px) {
    .zone-head { margin: 1.4rem 0 .7rem; }
    .zone-sub { display: none; }
}

/* =============================================================================
   Filter drawer (v2.3.x): the workroom's filter bar hides behind a slim toggle
   at the end of the zone head. Gold + count when refinements are active, and
   the drawer forces open when filters are why the list looks empty.
   ============================================================================= */
.filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .34rem .75rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--glass-soft);
    color: var(--text-muted);
    font-family: inherit;
    font-size: .74rem;
    font-weight: 700;
    cursor: pointer;
    flex: none;
    order: 2;
    transition: color .15s ease, border-color .15s ease, box-shadow .15s ease;
    -webkit-tap-highlight-color: transparent;
}
.filter-toggle:hover { color: var(--text); border-color: var(--primary); }
.filter-toggle svg { width: 13px; height: 13px; }
.filter-toggle.ft-active {
    color: var(--gold);
    border-color: var(--gold);
    box-shadow: 0 0 14px -6px var(--gold);
}
.ft-count {
    background: var(--gold);
    color: #1B2430;
    font-size: .64rem;
    font-weight: 800;
    border-radius: 999px;
    padding: .05rem .38rem;
}
.ft-chev { font-size: .7rem; transition: transform .2s ease; }
.ft-chev.up { transform: rotate(180deg); }
.zone-head-items::after { order: 1; }

.filter-drawer {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    transition: grid-template-rows .28s cubic-bezier(.2, .8, .3, 1), opacity .22s ease;
}
.filter-drawer > div { overflow: hidden; min-height: 0; }
.filter-drawer.open { grid-template-rows: 1fr; opacity: 1; }
.filter-drawer.open > div { padding-top: .2rem; }
.filter-drawer .filter-bar { margin-bottom: 1rem; }

/* =============================================================================
   Full-review fixes (v2.3.1)
   ============================================================================= */

/* Bugs/Ideas boards: 3 tiles via class (the old inline style defeated the
   mobile 2-column rule); phones fall back to the shared 2-col stat-strip rule */
.stat-strip-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 700px) {
    .stat-strip-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Alfred readability: its --primary is near-black ink and --gold is deep bronze,
   so the dark-navy glyphs hardcoded for the bright dark-theme palette vanish */
:root[data-theme="alfred"] .btn-primary { color: #fff; }
:root[data-theme="alfred"] .tab-badge,
:root[data-theme="alfred"] .tab-capture,
:root[data-theme="alfred"] .ft-count { color: #fff; }

/* Notification dropdown: never wider than the viewport (SE/Fold-size phones) */
.notify-panel { width: min(340px, calc(100vw - 24px)); }

/* Drop button on talking points reads as a quiet destructive affordance */
.tp-drop { color: var(--text-muted); }
.tp-drop:hover { color: var(--danger); }

/* =============================================================================
   WIKI (v2.4) — dead-simple pages: search, grid, split editor, files, undo
   ============================================================================= */
.wiki-top { display: flex; gap: .7rem; align-items: center; margin-bottom: 1.1rem; }
.wiki-search-wrap { position: relative; flex: 1; display: flex; align-items: center; }
.wiki-search-wrap svg { position: absolute; left: .8rem; width: 16px; height: 16px; color: var(--text-muted); pointer-events: none; z-index: 1; }
.wiki-search-wrap .input { padding-left: 2.4rem; }
.sug-scrim { position: fixed; inset: 0; z-index: 40; background: transparent; border: none; }
.sug-drop {
    position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 50;
    background: linear-gradient(180deg, var(--glass-opaque-top), var(--glass-opaque));
    border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-2);
    overflow: hidden; animation: clg-fade .14s ease;
}
.sug-group { font-size: .6rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); padding: .5rem .9rem .15rem; }
.sug-row { display: flex; align-items: baseline; gap: .5rem; padding: .4rem .9rem; text-decoration: none; color: var(--text); }
.sug-row:hover { background: var(--primary-soft); }
.sug-text { font-weight: 700; font-size: .88rem; }
.sug-snip { font-size: .76rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sug-where { margin-left: auto; font-size: .7rem; color: var(--text-muted); flex: none; }

.wiki-row:hover td { background: var(--primary-soft); cursor: pointer; }
.wiki-title { font-weight: 700; }

.wiki-page { animation: page-in .28s ease; }
.wk-head { display: flex; align-items: center; gap: .8rem; border-bottom: 1px solid var(--border); padding-bottom: .7rem; margin-bottom: .3rem; }
.wk-title { margin: 0; font-size: 1.5rem; letter-spacing: -.015em; flex: 1; }
.wk-title-input { flex: 1; font-size: 1.35rem; font-weight: 700; font-family: inherit; border: 1px solid var(--border); border-radius: 12px; padding: .5rem .75rem; background: var(--glass-soft); color: var(--text); }
.wk-head-actions { display: flex; gap: .35rem; flex: none; }
.wk-byline { font-size: .74rem; color: var(--text-muted); margin: .5rem 0 1rem; }

.undo-bar { display: flex; align-items: center; gap: .7rem; border: 1.5px solid var(--gold); background: var(--gold-soft); border-radius: 12px; padding: .55rem .9rem; font-size: .86rem; margin-bottom: 1rem; }
.undo-ring { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--gold); border-top-color: transparent; display: grid; place-items: center; font-size: .72rem; font-weight: 800; color: var(--gold); animation: spin 1s linear infinite; flex: none; }
.undo-bar .btn { margin-left: auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* body render (view + preview share .wk-body) */
.wk-body { font-size: .95rem; line-height: 1.7; }
.wk-body h3 { font-size: 1.02rem; margin: 1.2rem 0 .4rem; padding-bottom: .25rem; border-bottom: 1px solid var(--border); }
.wk-body h3:first-child { margin-top: 0; }
.wk-body ul { margin: .3rem 0; padding-left: 1.3rem; }
.wk-body li { margin-bottom: .25rem; }
.wk-body li::marker { color: var(--gold); }
.wk-body p { margin: 0 0 .7rem; }
.wk-body code { font-size: .86em; }
.wk-view { padding: .3rem 0 1rem; }

/* split editor */
.wk-editor { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.2rem; align-items: start; }
.wk-editor-col { min-width: 0; }
.wk-col-head { display: flex; align-items: center; gap: .5rem; font-size: .62rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); margin-bottom: .4rem; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--st-done); box-shadow: 0 0 6px var(--st-done); animation: pulse-live 1.6s ease-in-out infinite; }
.prev-toggle { margin-left: auto; display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.prev-toggle button { border: none; background: none; font: inherit; font-size: .62rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: .18rem .6rem; color: var(--text-muted); cursor: pointer; }
.prev-toggle button.on { background: var(--gold-soft); color: var(--gold); }
.wk-area {
    width: 100%; min-height: 55vh; box-sizing: border-box;
    border: 1px solid var(--border); border-radius: 12px; padding: .8rem .9rem;
    font-family: Consolas, 'Cascadia Code', monospace; font-size: .84rem; line-height: 1.6;
    background: white; color: var(--text); resize: vertical;
}
/* Dark-side themes swap the editor's white paper for their glass — EVERY new
   dark theme must join this list or the editor goes white-on-white (Amethyst
   shipped without it and the page editor was unreadable). */
:root[data-theme="dark"] .wk-area,
:root[data-theme="batman"] .wk-area,
:root[data-theme="amethyst"] .wk-area { background: var(--glass-soft); }
.wk-prev { min-height: 55vh; border: 1px solid var(--border); border-radius: 12px; padding: .9rem 1rem; background: var(--glass-soft); overflow: auto; }
.wk-prev-html { font-family: Consolas, monospace; font-size: .78rem; white-space: pre-wrap; word-break: break-word; color: var(--text-muted); }

/* files in edit mode */
.wk-files { margin-top: 1.4rem; }
.f-row { display: flex; align-items: center; gap: .6rem; border: 1px solid var(--border); border-radius: 12px; padding: .55rem .8rem; background: var(--glass-soft); margin-bottom: .45rem; flex-wrap: wrap; }
.f-ico { font-size: 1.05rem; flex: none; }
.f-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.f-main .fname { font-weight: 700; font-size: .86rem; color: var(--text); text-decoration: none; }
.f-main .fname:hover { color: var(--primary); text-decoration: underline; }
.f-main small { font-size: .72rem; color: var(--text-muted); }
.f-acts { margin-left: auto; display: flex; gap: .3rem; align-items: center; }
.f-ren { display: flex; align-items: center; gap: .4rem; flex: 1; }
.f-ren .input { flex: 1; padding: .35rem .6rem; font-size: .85rem; }
.f-replace { position: relative; overflow: hidden; cursor: pointer; }
.wk-drop { display: block; border: 2px dashed var(--border); border-radius: 12px; padding: .9rem; text-align: center; color: var(--text-muted); font-size: .82rem; background: var(--glass-soft); cursor: pointer; margin-top: .5rem; }
.wk-drop:hover { border-color: var(--gold); color: var(--gold); }
.wk-nofiles { font-size: .82rem; color: var(--text-muted); }

/* revisions */
.rev-list { display: flex; flex-direction: column; gap: .4rem; }
.rev-row { display: flex; align-items: center; gap: .7rem; padding: .5rem .1rem; border-bottom: 1px dashed var(--border); }
.rev-main { display: flex; flex-direction: column; gap: .1rem; flex: 1; min-width: 0; }
.rev-main small { font-size: .72rem; color: var(--text-muted); }
.rev-acts { display: flex; gap: .3rem; flex: none; }

@media (max-width: 900px) {
    .wk-editor { grid-template-columns: 1fr; }
    .wk-area, .wk-prev { min-height: 34vh; }
}
@media (max-width: 700px) {
    .wk-head { flex-wrap: wrap; }
    .wk-head-actions { flex-basis: 100%; justify-content: flex-end; }
    .f-acts { flex-basis: 100%; justify-content: flex-end; margin-left: 0; }
}

/* Manager's corner (SuperAdmin only) */
.mgr-card { border: 1px solid var(--gold); border-radius: 18px; padding: 1rem 1.2rem; margin-bottom: 1.4rem; background: linear-gradient(180deg, var(--gold-soft), transparent); box-shadow: 0 0 24px -14px var(--gold); }
.mgr-head { display: flex; align-items: baseline; gap: .6rem; margin-bottom: .7rem; }
.mgr-badge { font-size: .74rem; font-weight: 800; letter-spacing: .06em; color: var(--gold); }
.mgr-sub { font-size: .7rem; color: var(--text-muted); }
.mgr-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .7rem; }
.mgr-stat { display: flex; flex-direction: column; gap: .1rem; }
.mgr-label { font-size: .62rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }
.mgr-stat b { font-size: .95rem; }
.mgr-bad { color: var(--st-blocked); }
.mgr-deletes { margin-top: .8rem; padding-top: .7rem; border-top: 1px dashed var(--border); display: flex; flex-direction: column; gap: .2rem; }
.mgr-del { font-size: .76rem; color: var(--text-muted); }
@media (max-width: 700px) { .mgr-grid { grid-template-columns: repeat(2, 1fr); } }

/* Wiki auto-links: pasted URLs become unmistakable, new-tab links (st-new is a
   readable blue in all four themes, unlike --primary which is ink in Alfred). */
.wk-body a.wk-link {
    color: var(--st-new);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 2px;
    word-break: break-all;
}
.wk-body a.wk-link::after { content: "↗"; font-size: .75em; margin-left: .15em; }
.wk-body a.wk-link:hover { text-decoration-style: solid; }

/* Wiki bodies are GitHub Markdown now (Markdig, HTML disabled): style the full output */
.wk-md-hint { margin-left: auto; font-size: .6rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); border: 1px solid var(--border); border-radius: 999px; padding: .14rem .55rem; }
.wk-body h1 { font-size: 1.25rem; margin: 1.3rem 0 .45rem; padding-bottom: .3rem; border-bottom: 1px solid var(--border); }
.wk-body h2 { font-size: 1.05rem; margin: 1.2rem 0 .4rem; padding-bottom: .25rem; border-bottom: 1px solid var(--border); }
.wk-body h1:first-child, .wk-body h2:first-child { margin-top: 0; }
.wk-body a { color: var(--st-new); font-weight: 600; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 2px; word-break: break-all; }
.wk-body a:hover { text-decoration-style: solid; }
.wk-body a[target="_blank"]::after { content: "↗"; font-size: .75em; margin-left: .15em; }
.wk-body table { border-collapse: collapse; margin: .6rem 0; font-size: .86rem; }
.wk-body th, .wk-body td { border: 1px solid var(--border); padding: .35rem .7rem; text-align: left; }
.wk-body th { font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.wk-body input[type="checkbox"] { accent-color: var(--gold); margin-right: .3rem; }
.wk-body ol { margin: .3rem 0; padding-left: 1.4rem; }
.wk-body ol li::marker { color: var(--gold); font-weight: 700; }
.wk-body del { color: var(--text-muted); }
.wk-body blockquote { margin: .6rem 0; padding: .3rem .9rem; border-left: 3px solid var(--gold); background: var(--glass-soft); border-radius: 0 10px 10px 0; }

/* =============================================================================
   Tags (v2.4.x) — quick labels on documentation pages, filter strip on the hub
   ============================================================================= */
.tag-strip { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.tag-chip {
    display: inline-flex; align-items: center; gap: .35rem;
    border: 1px solid var(--border); border-radius: 999px;
    padding: .28rem .7rem; font: inherit; font-size: .76rem; font-weight: 700;
    background: var(--glass-soft); color: var(--text); cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease;
    -webkit-tap-highlight-color: transparent;
}
.tag-chip:hover { border-color: var(--primary); }
.tag-chip.sel { border-color: var(--gold); background: var(--gold-soft); color: var(--gold); box-shadow: 0 0 12px -6px var(--gold); }
.tag-cnt { font-size: .64rem; font-weight: 800; color: var(--gold); }
.tag-chip.sel .tag-cnt { color: inherit; }
.tag-clear { color: var(--text-muted); border-style: dashed; }
.tag-mini {
    display: inline-block; margin-left: .45rem; padding: .08rem .45rem;
    border-radius: 999px; font-size: .64rem; font-weight: 700;
    background: var(--primary-soft); color: var(--primary); vertical-align: middle;
}

/* on-page tag row */
.ptags { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: -.3rem 0 1rem; }
.ptag { cursor: default; }
.ptag-x { border: none; background: none; color: var(--text-muted); cursor: pointer; font-size: .68rem; padding: 0 0 0 .1rem; }
.ptag-x:hover { color: var(--danger); }
.ptag-add { color: var(--text-muted); border-style: dashed; }
.ptag-add:hover { color: var(--gold); border-color: var(--gold); }
.ptag-input-wrap { position: relative; display: inline-flex; }
.ptag-input {
    border: 1.5px solid var(--gold); border-radius: 999px;
    padding: .28rem .8rem; font: inherit; font-size: .78rem;
    background: var(--glass-soft); color: var(--text); width: 190px; outline: none;
}
.ptag-sug {
    position: absolute; top: calc(100% + 6px); left: 0; z-index: 60; min-width: 190px;
    display: flex; flex-direction: column;
    background: linear-gradient(180deg, var(--glass-opaque-top), var(--glass-opaque));
    border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-2);
    overflow: hidden; animation: clg-fade .14s ease;
}
.ptag-sug button {
    display: flex; justify-content: space-between; gap: .8rem;
    border: none; background: none; font: inherit; font-size: .78rem; font-weight: 600;
    color: var(--text); padding: .4rem .8rem; cursor: pointer; text-align: left;
}
.ptag-sug button:hover { background: var(--primary-soft); }
.ptag-sug button b { color: var(--gold); font-size: .68rem; }

/* =============================================================================
   Documentation polish (v2.4.2) — smart edit entry + a no-runoff pass
   ============================================================================= */
/* The split editor slides in when Edit is clicked (or a blank page auto-opens it) */
.wk-editor { animation: wk-split-in .25s ease; }
@keyframes wk-split-in {
    from { opacity: 0; transform: translateX(-14px); }
    to { opacity: 1; transform: none; }
}

/* A td can never opt out of table layout — .cell-sub is display:block for
   in-cell subtitle spans, and on a td that skews the whole column's grid */
td.cell-sub { display: table-cell; }

/* Status-change popup (v2.4.8) — picking a new status asks for the why */
.status-flow { display: flex; align-items: center; gap: .6rem; margin-bottom: 1rem; }

/* Linkified descriptions (v2.4.12) — pasted URLs become compact host chips
   instead of unwrappable strings bleeding off the card */
.project-desc { overflow-wrap: anywhere; } /* belt & braces for any other long string */
.desc-link {
    display: inline-block; max-width: 100%; padding: .04rem .55rem; margin: 0 .08rem;
    border: 1px solid var(--border); border-radius: 999px; background: var(--glass-soft);
    color: var(--st-new); font-size: .78rem; font-weight: 700; text-decoration: none;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle;
    transition: border-color .15s ease;
}
.desc-link::before { content: "🔗 "; font-size: .72em; }
.desc-link::after { content: " ↗"; font-size: .75em; }
.desc-link:hover { border-color: var(--st-new); }
/* links INTO the app: same tab, titled by what they are (📄 lives in the label) */
.desc-link-in::before { content: ""; }
.desc-link-in::after { content: ""; }

/* =============================================================================
   @mentions (v2.5) — "@Name" pings in notes, agenda points, and project
   descriptions. Chips in rendered text, a type-@ autocomplete popup, and
   mention rows in the bell. When the mention is YOU, it glows.
   ============================================================================= */
.mention {
    display: inline-block; padding: .02rem .5rem; border-radius: 999px;
    background: var(--primary-soft); color: var(--primary);
    font-weight: 700; font-size: .92em; white-space: nowrap;
}
.mention-you {
    background: var(--gold-soft); color: var(--gold);
    box-shadow: 0 0 14px -4px var(--gold);
    animation: mention-hello .6s ease 1;
}
@keyframes mention-hello {
    0% { transform: scale(.85); }
    55% { transform: scale(1.08); }
    100% { transform: scale(1); }
}

/* the type-@ autocomplete (positioned by JS, one shared instance) */
.mention-pop {
    position: fixed; z-index: 300; min-width: 220px; max-width: 320px;
    display: flex; flex-direction: column; overflow: hidden;
    background: linear-gradient(180deg, var(--glass-opaque-top), var(--glass-opaque));
    border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-2);
    animation: clg-fade .12s ease;
}
.mention-pop button {
    border: none; background: none; font: inherit; font-size: .84rem; font-weight: 600;
    color: var(--text); padding: .45rem .85rem; cursor: pointer; text-align: left;
}
.mention-pop button.on, .mention-pop button:hover { background: var(--primary-soft); color: var(--primary); }

/* bell rows for mentions */
.notify-mention .notify-at {
    flex: none; width: 22px; height: 22px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--gold-soft); color: var(--gold);
    font-size: .72rem; font-weight: 800;
}

/* =============================================================================
   v2.6 — copy-link pills, project pages, timeline moderation
   ============================================================================= */
/* Copy link: the PWA hides the address bar, so this is how pages get shared */
.copy-link {
    display: inline-flex; align-items: center; gap: .4rem;
    border: 1px solid var(--border); border-radius: 999px; padding: .34rem .85rem;
    background: var(--glass-soft); color: var(--text-muted);
    font: inherit; font-size: .78rem; font-weight: 700; cursor: pointer;
    transition: color .15s ease, border-color .15s ease, box-shadow .2s ease;
}
.copy-link svg { width: 14px; height: 14px; }
.copy-link:hover { color: var(--gold); border-color: var(--gold); }
.copy-link.copied {
    color: var(--gold); border-color: var(--gold); background: var(--gold-soft);
    box-shadow: 0 0 18px -6px var(--gold);
    animation: copy-pop .35s ease;
}
@keyframes copy-pop { 0% { transform: scale(.92); } 55% { transform: scale(1.06); } 100% { transform: scale(1); } }

/* Project page */
.proj-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: .6rem 0 .8rem; }
.proj-desc-page { font-size: .95rem; margin: 0 0 .4rem; max-width: 70ch; }

/* Project details card (v2.7.1) — labeled rows, click any value to edit it */
.pd-card { margin-bottom: 1.4rem; }
.pd-grid { display: grid; grid-template-columns: 120px 1fr; gap: .55rem .9rem; align-items: start; }
.pd-label { font-size: .62rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); padding-top: .35rem; }
.pd-val { min-width: 0; }
.pd-chip {
    display: block; width: 100%; text-align: left; border: 1px dashed transparent;
    background: none; font: inherit; color: inherit; cursor: pointer;
    border-radius: 10px; padding: .2rem .45rem; margin: 0 -.45rem;
    transition: border-color .15s ease, background .15s ease;
}
.pd-chip:hover { border-color: var(--gold); background: var(--glass-soft); }
.pd-chip:hover::after { content: " ✎"; font-size: .72em; color: var(--gold); }
.pd-desc { font-size: .92rem; line-height: 1.55; overflow-wrap: anywhere; }
.pd-empty { color: var(--text-muted); font-size: .85rem; font-style: italic; }
.pd-static { padding: .2rem 0; font-size: .85rem; color: var(--text-muted); }
.pd-input { width: 100%; }
.pd-hint { display: block; margin-top: .25rem; font-size: .68rem; color: var(--text-muted); }
.pd-editable { cursor: pointer; border-radius: 10px; transition: color .15s ease; }
.pd-editable:hover { color: var(--gold); }
@media (max-width: 700px) { .pd-grid { grid-template-columns: 1fr; gap: .15rem; } .pd-label { padding-top: .5rem; } }
.proj-add { display: flex; gap: .5rem; margin: .8rem 0 1rem; }
.proj-add .input { flex: 1; }
.proj-row-closed { opacity: .55; }
.project-title-link { color: inherit; text-decoration: none; }
.project-title-link:hover { color: var(--gold); }
.card-clickable { cursor: pointer; transition: border-color .15s ease, box-shadow .2s ease; }
.card-clickable:hover { border-color: var(--gold); box-shadow: var(--shadow-2), 0 0 22px -12px var(--gold); }

/* Table builder (v2.7) — "how does this look?" preview before inserting */
.tbl-toggle { display: flex; align-items: center; gap: .5rem; font-size: .84rem; font-weight: 600; margin-bottom: .7rem; cursor: pointer; }
.tbl-preview { max-height: 46vh; overflow: auto; border: 1px solid var(--border); border-radius: 12px; padding: .7rem .9rem; background: var(--glass-soft); }

/* Drag-drop uploads (v2.7): the file input blankets the zone invisibly, so a
   desktop drag lands on it natively; .dragging is toggled by a JS listener */
.wk-drop { position: relative; }
.wk-drop-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.wk-drop.dragging { border-color: var(--gold); color: var(--gold); background: var(--gold-soft); box-shadow: 0 0 24px -10px var(--gold); }

/* Bell dismissal (v2.7) — ✕ per row + dismiss all; the PWA badge follows */
.notify-item { position: relative; }
.notify-x {
    flex: none; align-self: center; border: none; background: none;
    color: var(--text-muted); font-size: .72rem; cursor: pointer; padding: .2rem .3rem;
    opacity: 0; transition: opacity .15s ease, color .15s ease;
}
.notify-item:hover .notify-x { opacity: 1; }
.notify-x:hover { color: var(--danger); }
@media (max-width: 700px) { .notify-x { opacity: .55; } } /* no hover on phones */
.notify-clear-all {
    display: block; width: 100%; text-align: right;
    border: none; background: none; color: var(--text-muted); cursor: pointer;
    font: inherit; font-size: .7rem; font-weight: 700; padding: .5rem .9rem .1rem;
}
.notify-clear-all:hover { color: var(--gold); }

/* Timeline note moderation (v2.6; v2.8.1 made the control IMPOSSIBLE to miss —
   the old hover-reveal 11px ✕ was invisible and the team never found it) */
.tl-del {
    display: inline-flex; align-items: center; gap: .3rem;
    min-height: 26px; padding: .1rem .7rem; margin-left: .35rem;
    border: 1.5px solid var(--danger); border-radius: 999px;
    background: var(--danger-soft); color: var(--danger);
    font: inherit; font-size: .72rem; font-weight: 800; cursor: pointer;
    transition: background .15s ease, color .15s ease, transform .1s ease, box-shadow .15s ease;
}
.tl-del:hover { background: var(--danger); color: #fff; transform: translateY(-1px); box-shadow: 0 0 14px -6px var(--danger); }
.tl-del.confirm { animation: mention-hello .3s ease; }
/* v2.23: the initial delete affordance is a red trash icon, not a text pill */
.tl-del-icon {
    display: inline-grid; place-items: center; width: 28px; height: 28px; margin-left: .35rem;
    border: none; background: none; color: var(--danger); cursor: pointer; border-radius: 8px;
    transition: background .15s ease, transform .1s ease;
}
.tl-del-icon svg { width: 16px; height: 16px; }
.tl-del-icon:hover:not(:disabled) { background: color-mix(in srgb, var(--danger) 14%, transparent); transform: translateY(-1px); }
.tl-del-icon:disabled { opacity: .4; cursor: default; }
.tl-keep {
    display: inline-flex; align-items: center;
    min-height: 26px; padding: .1rem .7rem; margin-left: .25rem;
    border: 1.5px solid var(--border); border-radius: 999px;
    background: var(--glass-soft); color: var(--text-muted);
    font: inherit; font-size: .72rem; font-weight: 800; cursor: pointer;
    transition: border-color .15s ease, color .15s ease;
}
.tl-keep:hover { border-color: var(--st-done); color: var(--st-done); }
.tl-pending-chip {
    display: inline-flex; align-items: center; gap: .3rem;
    border: 1px dashed var(--pr-high); border-radius: 999px; padding: .06rem .55rem;
    color: var(--pr-high); font-size: .68rem; font-weight: 700;
}
.timeline-pending .timeline-content { opacity: .65; }
.timeline-pending .timeline-body { text-decoration: line-through; text-decoration-color: var(--pr-high); text-decoration-thickness: 1px; }

/* SuperAdmin review desk (/admin/deletes) */
.dr-card { margin-bottom: .8rem; }
.dr-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem; font-size: .88rem; }
.dr-head a { color: var(--st-new); font-weight: 700; }
.dr-when { margin-left: auto; font-size: .72rem; color: var(--text-muted); }
.dr-note {
    margin: .6rem 0; padding: .5rem .9rem; font-size: .88rem;
    border-left: 3px solid var(--pr-high); background: var(--glass-soft);
    border-radius: 0 10px 10px 0; overflow-wrap: anywhere;
}
.dr-acts { display: flex; gap: .5rem; flex-wrap: wrap; }
.dr-row { display: flex; align-items: center; gap: .6rem; padding: .45rem .1rem; border-bottom: 1px dashed var(--border); font-size: .82rem; flex-wrap: wrap; }
.dr-row-main { flex: 1; min-width: 0; }
.dr-row a { color: var(--st-new); }

/* Mention toasts (v2.5.5) — the "right now" layer on top of the bell. Slides in
   bottom-right (above the regular toasts), gold-edged because it's a YOU moment,
   auto-hides after 8s (the draining bar), View jumps straight to the mention. */
.mtoasts {
    position: fixed; right: 24px; bottom: 96px; z-index: 260;
    display: flex; flex-direction: column; gap: .6rem; align-items: flex-end;
}
.mtoast {
    position: relative; width: 380px; max-width: calc(100vw - 32px);
    display: flex; gap: .75rem; align-items: flex-start;
    background: linear-gradient(180deg, var(--glass-opaque-top), var(--glass-opaque));
    border: 1px solid var(--border); border-left: 3px solid var(--gold);
    border-radius: 16px; padding: .85rem 1rem; overflow: hidden;
    box-shadow: var(--shadow-2), 0 0 30px -12px var(--gold);
    animation: mtoast-in .35s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes mtoast-in { from { transform: translateX(120%); opacity: 0; } to { transform: none; opacity: 1; } }
.mtoast-at {
    flex: none; width: 38px; height: 38px; border-radius: 50%;
    display: grid; place-items: center; font-weight: 800; font-size: .95rem;
    background: var(--gold-soft); color: var(--gold);
    box-shadow: 0 0 0 1px var(--gold-soft), 0 0 18px -6px var(--gold);
}
.mtoast-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.mtoast-who { font-size: .84rem; }
.mtoast-who b { color: var(--gold); }
.mtoast-ctx { font-size: .76rem; color: var(--text-muted); line-height: 1.45; overflow-wrap: anywhere; }
.mtoast-view {
    align-self: flex-start; margin-top: .55rem;
    border-radius: 999px; padding: .28rem 1.1rem;
    background: var(--gold); color: #12253A; font-size: .76rem; font-weight: 700;
    text-decoration: none;
}
.mtoast-view:hover { filter: brightness(1.08); }
.mtoast-x { flex: none; border: none; background: none; color: var(--text-muted); font-size: .8rem; cursor: pointer; padding: 0; }
.mtoast-x:hover { color: var(--text); }
.mtoast-bar {
    position: absolute; left: 0; right: 0; bottom: 0; height: 2.5px;
    background: linear-gradient(90deg, var(--gold), transparent);
    animation: mtoast-drain 10s linear forwards; transform-origin: left;
}
/* reading it? the drain pauses with the countdown (see ExpireAsync) */
.mtoast:hover .mtoast-bar { animation-play-state: paused; }
@keyframes mtoast-drain { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (max-width: 700px) {
    .mtoasts { bottom: 88px; right: 12px; } /* clear the phone tab bar */
}

/* Documentation trail (v2.4.11) — the path you walked, every crumb a click back */
.doc-trail { display: flex; align-items: center; flex-wrap: wrap; gap: .15rem .4rem; margin-bottom: .55rem; font-size: .74rem; animation: clg-fade .18s ease; }
.trail-crumb { color: var(--text-muted); text-decoration: none; font-weight: 600; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.trail-crumb:hover { color: var(--gold); }
.trail-root { font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.trail-here { color: var(--text); font-weight: 700; }
.trail-sep, .trail-more { color: var(--text-muted); opacity: .55; }
@media (max-width: 700px) { .trail-crumb { max-width: 128px; } }

/* Documentation editor (v2.4.7) — full-width editor + formatting toolbar;
   Preview is a mode you flip to, not a pane shadowing every keystroke */
.wk-toolbar { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .5rem; animation: wk-split-in .25s ease; }
.wk-mode { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; flex: none; }
.wk-mode button { border: none; background: none; font: inherit; font-size: .72rem; font-weight: 800; letter-spacing: .04em; padding: .32rem .85rem; color: var(--text-muted); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.wk-mode button.on { background: var(--gold-soft); color: var(--gold); }
/* v2.7.3: bigger, color-coded — the tiny grey glyphs were unreadable */
.wk-fmt { display: flex; gap: .3rem; flex-wrap: wrap; }
.wk-fmt button, .wk-fmt .fmt-img {
    display: inline-grid; place-items: center;
    border: 1px solid var(--border); background: var(--glass-soft);
    border-radius: 10px; min-width: 36px; height: 34px; padding: 0 .55rem;
    font-family: Consolas, 'Cascadia Code', monospace; font-size: .95rem; font-weight: 800;
    cursor: pointer; transition: border-color .15s ease, transform .1s ease, box-shadow .15s ease;
}
.wk-fmt button:hover, .wk-fmt .fmt-img:hover { border-color: currentColor; transform: translateY(-1px); box-shadow: var(--shadow-1); }
.fmt-h     { color: var(--gold); }
.fmt-b     { color: var(--text); }
.fmt-i     { color: var(--text-muted); font-style: italic; }
.fmt-code  { color: var(--st-done); font-size: .78rem; }
.fmt-fence { color: var(--st-done); font-size: .78rem; }
.fmt-link  { color: var(--st-new); font-size: .85rem; }
.fmt-ul    { color: var(--pr-high); font-size: 1.05rem; }
.fmt-ol    { color: var(--pr-high); }
.fmt-task  { color: var(--st-done); }
.fmt-table { color: var(--primary); font-size: 1.05rem; }
.fmt-img   { color: var(--text); font-size: .95rem; }

/* The WYSIWYG (v2.8) — SunEditor dressed to sit in the glass UI: the editor
   itself stays white "paper" (WYSIWYG colors need a stable canvas), the frame
   matches the app. */
.wk-html-shell { margin-bottom: 1.2rem; }
.wk-save { font-weight: 800; box-shadow: 0 0 18px -8px var(--gold); }
.wk-html-shell .sun-editor {
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-1);
}
.wk-html-shell .se-toolbar { outline: none; border-bottom: 1px solid rgba(0, 0, 0, .08); }
.wk-html-shell .se-resizing-bar { border-top: none; }

/* Image tray (v2.7.7) — thumbnails for images living in the editor text */
.img-tray {
    display: flex; align-items: flex-start; flex-wrap: wrap; gap: .5rem;
    border: 1px dashed var(--border); border-radius: 12px;
    padding: .5rem .7rem; margin-bottom: .6rem; background: var(--glass-soft);
}
.img-tray-label { flex-basis: 100%; font-size: .64rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }
.img-thumb { position: relative; display: flex; flex-direction: column; align-items: center; gap: .15rem; width: 74px; }
.img-thumb img {
    width: 70px; height: 48px; object-fit: cover; border-radius: 8px;
    border: 1px solid var(--border); cursor: pointer;
    transition: border-color .15s ease, transform .1s ease;
}
.img-thumb img:hover { border-color: var(--gold); transform: translateY(-1px); }
.img-thumb small { max-width: 74px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .62rem; color: var(--text-muted); }
.img-thumb-x {
    position: absolute; top: -6px; right: -4px; width: 18px; height: 18px;
    border: none; border-radius: 50%; background: var(--danger); color: #fff;
    font-size: .6rem; line-height: 1; cursor: pointer; opacity: 0;
    transition: opacity .15s ease;
}
.img-thumb:hover .img-thumb-x { opacity: 1; }
@media (max-width: 700px) { .img-thumb-x { opacity: .7; } }

/* inline images in descriptions + the small "insert one" pickers */
.desc-img { display: block; max-width: min(100%, 560px); border-radius: 12px; margin: .5rem 0; border: 1px solid var(--border); }
.pd-img-pick { color: var(--st-new); font-weight: 700; cursor: pointer; margin-left: .4rem; }
.pd-img-pick:hover { text-decoration: underline; }
.wk-editor-pane { animation: wk-split-in .25s ease; margin-bottom: 1.2rem; }
@media (max-width: 700px) {
    .wk-toolbar .wk-md-hint { display: none; } /* the toolbar earns the row on phones */
}

/* Tag manager (v2.4.4) — admin CRUD on tags, opened from the hub strip */
.tag-manage { color: var(--text-muted); border-style: dashed; }
.tag-manage:hover { color: var(--gold); border-color: var(--gold); }
.tagm-hint { font-size: .78rem; color: var(--text-muted); margin: 0 0 .8rem; }
.tagm-new { display: flex; gap: .4rem; margin-bottom: .9rem; }
.tagm-new .input { flex: 1; }
.tagm-row { display: flex; align-items: center; gap: .6rem; padding: .45rem .1rem; border-bottom: 1px dashed var(--border); flex-wrap: wrap; }
.tagm-row:last-of-type { border-bottom: none; }
.tagm-meta { font-size: .72rem; color: var(--text-muted); }
.tagm-acts { margin-left: auto; display: flex; gap: .3rem; align-items: center; }
.tagm-ren { flex: 1; min-width: 140px; padding: .35rem .6rem; font-size: .85rem; }

/* Nothing may run off the page: long words wrap, code and tables scroll in place */
.wk-body { overflow-wrap: break-word; }
.wk-body pre { overflow-x: auto; max-width: 100%; background: var(--glass-soft); border: 1px solid var(--border); border-radius: 10px; padding: .65rem .85rem; }
.wk-body pre code { white-space: pre; }
.wk-body table { display: block; width: max-content; max-width: 100%; overflow-x: auto; }
.wk-body img { max-width: 100%; border-radius: 8px; }
.wk-title { min-width: 0; overflow-wrap: anywhere; }
.wk-title-input { min-width: 0; }
.f-main .fname { overflow-wrap: anywhere; }
.wk-col-head { flex-wrap: wrap; }

@media (max-width: 700px) {
    /* iOS zooms any focused input under 16px — the editor missed the global rule */
    .wk-area, .wk-title-input, .ptag-input { font-size: 16px; }
    .wk-area, .wk-prev { min-height: 40vh; }
    /* the suggestion flyout hugs the left edge instead of overflowing the right
       (min-width must drop to 0 or it beats max-width and the clamp is inert) */
    .ptag-sug { left: 0; right: auto; min-width: 0; width: max-content; max-width: calc(100vw - 2.4rem); }
    /* thumbs, not cursors: the editor toolbar and tag ✕ were desktop-sized */
    .wk-fmt button { height: 38px; min-width: 40px; font-size: .82rem; }
    .wk-mode button { padding: .5rem 1rem; }
    .ptag-x { padding: .3rem .4rem; font-size: .8rem; }
}

/* =============================================================================
   Timeline reactions (v2.10) — one chip per reaction kind in use; hovering a
   chip (or tabbing to it) reveals WHO reacted as avatar bubbles + names. The
   smiley+ opens the five-emoji picker. "mine" glows gold like every YOU moment.
   ============================================================================= */
.reaction-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-top: .55rem; }

.reaction-chip-wrap { position: relative; display: inline-flex; }
.reaction-chip {
    display: inline-flex; align-items: center; gap: .4rem;
    min-height: 28px; padding: .15rem .7rem;
    border: 1.5px solid var(--border); border-radius: 999px;
    background: var(--glass-soft); color: var(--text);
    font: inherit; font-size: .84rem; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: border-color .15s ease, background .15s ease, transform .1s ease, box-shadow .15s ease;
}
.reaction-chip:hover:not(:disabled) {
    border-color: color-mix(in srgb, var(--gold) 55%, transparent);
    transform: translateY(-1px);
}
.reaction-chip.mine {
    border-color: color-mix(in srgb, var(--gold) 65%, transparent);
    background: var(--gold-soft);
    box-shadow: 0 0 10px -4px var(--gold);
}
.reaction-emoji { font-size: .98rem; line-height: 1; }
.reaction-count { font-weight: 800; font-size: .78rem; color: var(--text-muted); }
.reaction-chip.mine .reaction-count { color: var(--gold); }

/* who reacted — bubbles + names, shown on hover or keyboard focus */
.reaction-pop {
    display: none; position: absolute; bottom: calc(100% + 8px); left: 0; z-index: 41;
    flex-direction: column; align-items: flex-start; gap: .45rem;
    width: max-content; max-width: min(300px, calc(100vw - 2.5rem));
    padding: .6rem .75rem;
    background: linear-gradient(180deg, var(--glass-opaque-top), var(--glass-opaque));
    border: 1px solid var(--border); border-radius: 12px;
    box-shadow: var(--shadow-2);
    animation: clg-fade .14s ease;
    pointer-events: none; /* purely informative — never steals the click */
}
.reaction-chip-wrap:hover .reaction-pop,
.reaction-chip-wrap:focus-within .reaction-pop { display: flex; }
.reaction-pop-names { font-size: .78rem; line-height: 1.35; color: var(--text); overflow-wrap: anywhere; }
.reaction-pop-verb { color: var(--text-muted); }

/* the smiley+ add button and its picker */
.reaction-add-wrap { position: relative; display: inline-flex; }
.reaction-add {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 28px; min-width: 36px; padding: .15rem .5rem;
    border: 1.5px dashed var(--border); border-radius: 999px;
    background: transparent; color: var(--text-muted); cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.reaction-add svg { width: 17px; height: 17px; }
.reaction-add:hover:not(:disabled), .reaction-add.open {
    border-color: color-mix(in srgb, var(--gold) 55%, transparent);
    border-style: solid; color: var(--gold); background: var(--gold-soft);
}
.reaction-backdrop { position: fixed; inset: 0; z-index: 40; background: transparent; }
.reaction-picker {
    position: absolute; bottom: calc(100% + 8px); left: 0; z-index: 41;
    display: flex; gap: .2rem;
    max-width: calc(100vw - 2.5rem);
    padding: .35rem;
    background: linear-gradient(180deg, var(--glass-opaque-top), var(--glass-opaque));
    border: 1px solid var(--border); border-radius: 12px;
    box-shadow: var(--shadow-2);
    animation: clg-fade .14s ease;
}
.reaction-pick {
    display: grid; place-items: center;
    min-width: 40px; min-height: 40px; padding: .3rem;
    border: 1.5px solid transparent; border-radius: 10px;
    background: transparent;
    font: inherit; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background .15s ease, border-color .15s ease, transform .1s ease;
}
.reaction-pick .reaction-emoji { font-size: 1.35rem; }
.reaction-pick:hover { background: var(--gold-soft); transform: translateY(-1px); }
.reaction-pick.mine {
    border-color: color-mix(in srgb, var(--gold) 65%, transparent);
    background: var(--gold-soft); color: var(--gold);
}

/* Images in timeline notes (v2.11.1) — same pipeline as project descriptions,
   but capped in height so a screenshot can't swallow the feed; the image links
   to itself full-size in a new tab. */
.timeline-body .desc-img { max-height: 320px; width: auto; margin: .45rem 0; }
.desc-img-link { display: inline-block; max-width: 100%; line-height: 0; }
.desc-img-link:hover .desc-img { border-color: var(--gold); }
.note-actions { align-items: center; gap: .8rem; } /* extends the base rule at "notes" */
.note-img-hint { font-size: .72rem; color: var(--text-muted); margin-right: auto; }
/* v2.23: breathing room so the composer doesn't clash with the last comment below */
.note-card { margin-bottom: 1.75rem; }
/* v2.23: project delete is a quiet trash icon next to the pencil, not a loud button */
.pd-del-btn {
    display: inline-grid; place-items: center; width: 32px; height: 32px;
    border: 1px solid var(--border); border-radius: 9px; background: none;
    color: var(--text-muted); cursor: pointer; transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.pd-del-btn svg { width: 17px; height: 17px; }
.pd-del-btn:hover:not(:disabled) {
    color: var(--danger); border-color: color-mix(in srgb, var(--danger) 50%, transparent);
    background: color-mix(in srgb, var(--danger) 10%, transparent);
}
.pd-del-btn:disabled { opacity: .4; cursor: default; }

/* =============================================================================
   Wiki drafts (v2.12) — the work-in-progress parking lot. Gold-dashed because
   drafts are promises, not pages yet.
   ============================================================================= */
.wk-draft-chip {
    display: inline-flex; align-items: center; gap: .3rem;
    border: 1.5px dashed color-mix(in srgb, var(--gold) 65%, transparent);
    border-radius: 999px; padding: .12rem .6rem;
    color: var(--gold); background: var(--gold-soft);
    font-size: .66rem; font-weight: 800; letter-spacing: .08em;
    white-space: nowrap;
}
.wk-draft-banner {
    display: flex; flex-wrap: wrap; align-items: center; gap: .7rem;
    border: 1.5px dashed color-mix(in srgb, var(--gold) 45%, transparent);
    border-radius: 14px; padding: .6rem .9rem; margin: -.2rem 0 .9rem;
    background: var(--gold-soft); font-size: .82rem;
}
.wk-draft-banner .btn { margin-left: auto; }
.drafts-card {
    border-style: dashed;
    border-color: color-mix(in srgb, var(--gold) 40%, transparent);
    padding: .8rem 1rem;
    margin-bottom: 1rem;
}
.drafts-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .35rem; }
.drafts-hint { font-size: .72rem; color: var(--text-muted); }
.draft-row {
    display: flex; align-items: baseline; gap: .7rem;
    padding: .45rem .2rem; border-bottom: 1px dashed var(--border);
    color: var(--text); text-decoration: none; font-size: .9rem;
    transition: color .15s ease;
}
.draft-row:last-child { border-bottom: none; }
.draft-row:hover .draft-title { color: var(--gold); }
.draft-title { font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.draft-owner { font-size: .74rem; color: var(--text-muted); border: 1px solid var(--border); border-radius: 999px; padding: .05rem .5rem; white-space: nowrap; }
.draft-when { margin-left: auto; font-size: .72rem; color: var(--text-muted); white-space: nowrap; }

/* =============================================================================
   Mobile pass (v2.12) — the item detail header stops being rough on phones
   ============================================================================= */
@media (max-width: 700px) {
    /* Stack: breadcrumb / title / meta / actions — nothing fights for width. */
    .page-header { flex-direction: column; gap: .55rem; }
    .page-header > div { min-width: 0; width: 100%; }
    .item-detail-title {
        font-size: 1.18rem; line-height: 1.3; margin: .25rem 0 0;
        overflow-wrap: anywhere;
        display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
        overflow: hidden; /* 3 lines max, then … */
    }
    .item-detail-meta { gap: .35rem .5rem; margin-top: .45rem; font-size: .76rem; }
    .item-detail-meta .badge { font-size: .64rem; }
    /* long project names / tickets truncate with … instead of wrapping forever */
    .item-detail-meta .item-project, .item-detail-meta .ticket-badge {
        max-width: 70vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }
    .item-detail-meta .muted { flex-basis: 100%; font-size: .72rem; }
    .page-header-actions { width: 100%; justify-content: flex-end; gap: .45rem; }
    .page-header-actions .btn { padding: .45rem .8rem; font-size: .78rem; }
}

/* Live clock (v2.13, glow-up v2.15.2) — Nashville time + a labeled Monday-
   meeting countdown that links to the agenda. Desktop-only by design. */
.float-clock {
    position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 59;
    display: flex; align-items: center; gap: .9rem;
    padding: .55rem 1.35rem;
    background: linear-gradient(180deg, var(--glass-opaque-top), var(--glass-opaque));
    border: 1px solid color-mix(in srgb, var(--gold) 28%, var(--border));
    border-radius: 999px;
    box-shadow: var(--shadow-1), 0 0 26px -14px var(--gold), inset 0 1px 0 var(--inner-light);
    white-space: nowrap;
    visibility: hidden; /* JS reveals it on the first tick — no empty-pill flash */
}
.float-clock.ticking { visibility: visible; }
.clock-time {
    font-weight: 800; font-size: 1.12rem; letter-spacing: .04em;
    font-variant-numeric: tabular-nums; min-width: 118px;
    color: var(--text);
    text-shadow: 0 0 18px color-mix(in srgb, var(--gold) 35%, transparent);
}
.clock-date { color: var(--text-muted); font-weight: 700; font-size: .82rem; }
.clock-meet-link {
    display: flex; flex-direction: column; align-items: flex-start; gap: .05rem;
    border-left: 1px dashed var(--border); padding-left: .9rem;
    text-decoration: none;
    transition: transform .12s ease;
}
.clock-meet-link:hover { transform: translateY(-1px); }
.clock-meet-label {
    font-size: .58rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
    color: var(--gold);
}
.clock-meet { color: var(--text); font-weight: 700; font-size: .78rem; }
.clock-meet.live { color: var(--gold); text-shadow: 0 0 12px var(--gold-soft); animation: mention-hello .6s ease 1; }
/* tablets AND phones: the top bar is busy — the clock is a desktop luxury */
@media (max-width: 980px) { .float-clock { display: none; } }

/* View-as lens (v2.14.2) — the manager's monocle. The eye button lives with
   the float controls; the banner makes an active lens impossible to forget. */
.viewas-wrap { position: relative; display: inline-flex; }
.viewas-on { color: var(--gold) !important; box-shadow: 0 0 14px -4px var(--gold); }
.viewas-scrim { position: fixed; inset: 0; z-index: 200; background: none; border: none; cursor: default; }
.viewas-menu {
    position: absolute; top: calc(100% + 8px); right: 0; z-index: 201;
    min-width: 220px; display: flex; flex-direction: column; overflow: hidden;
    background: linear-gradient(180deg, var(--glass-opaque-top), var(--glass-opaque));
    border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-2);
    animation: clg-fade .14s ease;
}
.viewas-menu-head {
    font-size: .64rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
    color: var(--text-muted); padding: .6rem .9rem .3rem;
}
.viewas-menu button {
    display: flex; align-items: baseline; justify-content: space-between; gap: .8rem;
    border: none; background: none; font: inherit; font-size: .86rem; font-weight: 700;
    color: var(--text); padding: .5rem .9rem; cursor: pointer; text-align: left;
}
.viewas-menu button small { font-weight: 600; font-size: .68rem; color: var(--text-muted); }
.viewas-menu button:hover { background: var(--primary-soft); }
.viewas-menu button.on { color: var(--gold); background: var(--gold-soft); }
.viewas-banner {
    position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 250;
    display: flex; align-items: center; gap: .9rem; max-width: calc(100vw - 2rem);
    padding: .55rem 1.1rem;
    background: linear-gradient(180deg, var(--glass-opaque-top), var(--glass-opaque));
    border: 1.5px solid var(--gold); border-radius: 999px;
    box-shadow: var(--shadow-2), 0 0 26px -8px var(--gold);
    font-size: .8rem;
}
.viewas-banner b { color: var(--gold); }
.viewas-banner button {
    border: 1px solid var(--gold); border-radius: 999px; padding: .25rem .8rem;
    background: var(--gold-soft); color: var(--gold);
    font: inherit; font-size: .72rem; font-weight: 800; cursor: pointer; white-space: nowrap;
}
@media (max-width: 700px) {
    .viewas-banner { bottom: calc(76px + env(safe-area-inset-bottom)); } /* clear the tab bar */
}

/* Feedback page (v2.14.1) — one home for bugs AND ideas. The view toggle is
   the page's steering wheel: big, centered, impossible to miss. */
.fb-view-toggle {
    display: flex; justify-content: center; gap: .6rem;
    margin: -.3rem 0 1.2rem;
}
.fb-view {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .6rem 1.4rem;
    border: 2px solid var(--border); border-radius: 999px;
    background: var(--glass-soft); color: var(--text-muted);
    font: inherit; font-size: .95rem; font-weight: 800; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: border-color .15s ease, background .15s ease, color .15s ease, box-shadow .15s ease, transform .1s ease;
}
.fb-view:hover { border-color: color-mix(in srgb, var(--gold) 45%, transparent); transform: translateY(-1px); }
.fb-view.on {
    border-color: var(--gold); color: var(--text);
    background: var(--gold-soft);
    box-shadow: 0 0 18px -8px var(--gold);
}
.fb-view-count {
    font-size: .66rem; font-weight: 800; color: var(--gold);
    border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent);
    border-radius: 999px; padding: .1rem .5rem;
}
@media (max-width: 700px) {
    .fb-view { flex: 1; justify-content: center; padding: .7rem .5rem; }
    .fb-view-toggle { gap: .45rem; }
}

/* Capture popup pieces (shared with the modal since v2.14) */
.fb-capture { margin-bottom: 1.2rem; }
.fb-kind-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: .9rem; }
.fb-kind {
    display: flex; flex-direction: column; align-items: center; gap: .15rem;
    padding: .7rem .6rem;
    border: 2px solid var(--border); border-radius: 14px;
    background: var(--glass-soft); color: var(--text-muted);
    font: inherit; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: border-color .15s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
}
.fb-kind b { font-size: .9rem; }
.fb-kind small { font-size: .68rem; }
.fb-kind:hover { border-color: color-mix(in srgb, var(--gold) 45%, transparent); }
.fb-kind.on {
    border-color: var(--gold); color: var(--text);
    background: var(--gold-soft);
    box-shadow: 0 0 18px -8px var(--gold);
}
.fb-kind.on b { color: var(--gold); }
.fb-capture-foot { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; }
.fb-capture-foot .severity-row { margin-right: auto; }

/* =============================================================================
   Team stats (v2.14) — podium, the numbers table, and the candid corner
   ============================================================================= */
.stat-range { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.stat-range button {
    border: none; background: none; font: inherit; font-size: .76rem; font-weight: 800;
    letter-spacing: .03em; padding: .4rem 1rem; color: var(--text-muted); cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.stat-range button.on { background: var(--gold-soft); color: var(--gold); }

.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; margin-bottom: 1.2rem; }
.podium-card {
    display: flex; flex-direction: column; align-items: center; gap: .3rem;
    padding: 1rem .8rem .9rem;
    border: 1px solid var(--border); border-radius: 18px;
    background: var(--glass); text-align: center;
}
.podium-card.place-1 {
    border-color: color-mix(in srgb, var(--gold) 55%, transparent);
    background: linear-gradient(180deg, var(--gold-soft), transparent);
    box-shadow: 0 0 30px -14px var(--gold);
}
.podium-medal { font-size: 1.6rem; }
.podium-avatar { width: 66px; height: 66px; font-size: 1.3rem; }
.podium-name { font-size: .95rem; }
.podium-score { color: var(--gold); font-weight: 800; font-size: .85rem; }
.podium-sub { color: var(--text-muted); font-size: .68rem; }

/* Project activity events (v2.20) — task milestones inside the discussion */
.pact-event {
    display: flex; align-items: baseline; gap: .6rem;
    padding: .35rem .85rem; font-size: .8rem;
    color: var(--text-muted); text-decoration: none;
    border-left: 2px dashed var(--border); margin-left: 1.1rem;
    transition: color .15s ease;
}
.pact-event:hover { color: var(--text); }
.pact-event b { color: var(--text); font-weight: 700; }
.pact-event:hover b { color: var(--gold); }
.pact-text { min-width: 0; overflow-wrap: anywhere; }
.pact-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; align-self: center; }
.pact-add { background: var(--st-new); box-shadow: 0 0 8px -2px var(--st-new); }
.pact-done { background: var(--st-done); box-shadow: 0 0 8px -2px var(--st-done); }
.pact-event .pnote-time { margin-left: auto; flex: none; }

/* Project discussion (v2.16) */
.pnote-list { display: flex; flex-direction: column; gap: .55rem; margin-bottom: 1.2rem; }
.pnote {
    display: flex; gap: .6rem; align-items: flex-start;
    border: 1px solid var(--border); border-radius: 14px;
    background: var(--glass-soft); padding: .65rem .85rem;
}
.pnote-main { flex: 1; min-width: 0; }
/* Profile photo editor (v2.21): circular crop viewport — drag to pan, wheel or
   slider to zoom. The circle IS the final bubble, WYSIWYG. */
.av-editor { display: flex; flex-direction: column; gap: 1rem; align-items: center; }
.av-toprow { display: flex; align-items: center; gap: 1rem; }
.av-currentwrap {
    width: 56px; height: 56px; border-radius: 50%; overflow: hidden;
    border: 2px solid var(--border); flex: none;
}
.av-current { width: 100%; height: 100%; object-fit: cover; }
.av-pick { cursor: pointer; }
.av-stage { flex-direction: column; align-items: center; gap: .9rem; width: 100%; }
.av-wrap {
    position: relative;
    width: 260px; height: 260px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid color-mix(in srgb, var(--gold) 55%, transparent);
    box-shadow: 0 0 0 999px color-mix(in srgb, var(--bg-base) 55%, transparent);
    cursor: grab;
    touch-action: none;
    background: #0a0d16;
}
.av-wrap:active { cursor: grabbing; }
.av-img { position: absolute; left: 0; top: 0; max-width: none; user-select: none; pointer-events: none; }
.av-zoom { width: 260px; }
.av-hint { margin: 0; font-size: .78rem; color: var(--text-muted); text-align: center; }
.av-remove { margin-right: auto; }

/* Radar-ping "Waiting on others" (v2.20.20, Luke-approved mock): the ONLY animated
   element in the app — an Awaiting-response task pulses a slow violet ring and its
   row dims: waiting on someone outside DEV, nothing for us to do. */
.await-badge { display: inline-flex; align-items: center; gap: .45rem; white-space: nowrap; }
/* v2.22: wait-list manager rows (group · date · remove) */
.wl-head { display: flex; align-items: center; gap: .7rem; padding: 0 .8rem .4rem; }
.wl-collabel {
    font-size: .66rem; font-weight: 800; letter-spacing: .09em;
    text-transform: uppercase; color: var(--text-muted);
}
.wl-col-name { flex: 1; min-width: 0; }
.wl-col-date { width: 150px; flex: none; }
.wl-col-x { width: 26px; flex: none; }
.wl-list { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1rem; }
.wl-row {
    display: flex; align-items: center; gap: .7rem;
    border: 1px solid var(--border); border-radius: 12px;
    background: var(--glass-soft); padding: .5rem .8rem;
}
.wl-name { flex: 1; min-width: 0; font-weight: 700; font-size: .92rem; }
.wl-date { width: 150px; padding: .3rem .55rem; font-size: .84rem; flex: none; }
.wl-add { display: flex; align-items: center; gap: .5rem; }
.wl-add select { flex: 1; min-width: 0; }

/* v2.21.7: one line per group being waited on */
.await-lines { display: flex; flex-direction: column; gap: .2rem; align-items: flex-start; }
.await-line { white-space: nowrap; }
.await-badge.await-multi { align-items: flex-start; padding-top: .35rem; padding-bottom: .35rem; }
.await-badge.await-multi .await-ping { margin-top: .3rem; }
.await-since { font-weight: 600; opacity: .85; }
.await-ping { position: relative; width: 10px; height: 10px; flex: none; }
.ap-dot { position: absolute; inset: 0; border-radius: 50%; background: var(--st-await); }
.ap-ring {
    position: absolute; inset: -4px; border-radius: 50%;
    border: 1.5px solid var(--st-await);
    animation: await-ping 2.2s ease-out infinite;
}
@keyframes await-ping {
    0% { transform: scale(.6); opacity: .9; }
    80% { transform: scale(2.1); opacity: 0; }
    100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .ap-ring { animation: none; transform: scale(1.4); opacity: .3; }
}
/* Row dim: everything fades EXCEPT the cell holding the badge (that's the point) */
tr.row-await td { opacity: .62; }
tr.row-await td:has(.await-badge) { opacity: 1; }
a.item-row.row-await .item-main { opacity: .62; }
:root[data-theme="light"] tr.row-await td,
:root[data-theme="light"] a.item-row.row-await .item-main { opacity: .55; }

/* iMessage-style ownership (v2.20.19): YOUR timeline entries are unmistakably
   yours — gold "You" label, gold dot, gold-washed bubble. Everyone else stays
   neutral, so a glance finds your own posts like your own texts. */
.tl-you { color: var(--gold); }
.tl-mine .timeline-dot {
    background: var(--gold);
    box-shadow: 0 0 0 2px var(--border), 0 0 10px color-mix(in srgb, var(--gold) 55%, transparent);
}
.tl-mine .timeline-body {
    background: color-mix(in srgb, var(--gold) 9%, var(--glass));
    border-color: color-mix(in srgb, var(--gold) 40%, var(--border));
}
.tl-mine .timeline-status-change .timeline-arrow { color: var(--gold); }
.pnote-mine {
    background: color-mix(in srgb, var(--gold) 8%, var(--glass-soft));
    border-color: color-mix(in srgb, var(--gold) 38%, var(--border));
}

.pnote-head { display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; font-size: .84rem; }
.pnote-time { font-size: .7rem; color: var(--text-muted); }
.pnote-body { margin: .25rem 0 0; font-size: .9rem; white-space: pre-wrap; overflow-wrap: anywhere; }

/* File extension badge (v2.16) — replaces the emoji file icons */
.f-ext {
    display: inline-grid; place-items: center;
    min-width: 40px; padding: .16rem .3rem;
    border: 1px solid var(--border); border-radius: 7px;
    background: var(--glass-soft); color: var(--text-muted);
    font-size: .58rem; font-weight: 800; letter-spacing: .06em;
}

/* Project ticket chips (v2.19.2, reworked v2.20.2) — the chip deep-links into the
   ticket system; the ✕ is its own clearly separate control (house rule: visible,
   real tap target). Add flow has explicit Add/Cancel, no blur-save surprises. */
.tk-editor { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; }
.tk-chip { display: inline-flex; align-items: center; gap: .25rem; }
a.tk-open { text-decoration: none; cursor: pointer; }
a.tk-open:hover {
    border-color: var(--gold);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--gold) 40%, transparent);
}
.tk-ext { font-size: .68rem; margin-left: .3rem; opacity: .75; }
.tk-x {
    display: inline-grid; place-items: center;
    width: 26px; height: 26px;
    border: 1px solid var(--border); border-radius: 50%;
    background: none; color: var(--text-muted);
    cursor: pointer; font-size: .7rem; line-height: 1;
}
.tk-x:hover { color: var(--danger); border-color: var(--danger); }
.tk-addrow { display: inline-flex; align-items: center; gap: .35rem; }
.tk-input { width: 150px; padding: .28rem .7rem; font-size: .8rem; }
.tk-save { white-space: nowrap; }

/* Who-chips (v2.20.6) — bubble + full name on project task rows; ownership
   must read at a glance, never from a hover */
.who-list { display: inline-flex; flex-direction: column; gap: .3rem; }
.who-chip {
    display: inline-flex; align-items: center; gap: .45rem;
    font-size: .88rem; font-weight: 600; white-space: nowrap;
}
.who-chip .avatar-sm { width: 39px; height: 39px; font-size: .78rem; flex: none; }
.who-creator { color: var(--text-muted); font-weight: 500; }
.who-none { color: var(--text-muted); font-style: italic; font-size: .85rem; }

/* Signature byline (v2.20.8, mock A) — creator signs the project, crew finishes
   the sentence. Lives under the title so the columns stay pure data. */
.proj-name { display: block; font-size: 1rem; }
.proj-byline {
    display: flex; align-items: center; flex-wrap: wrap; gap: .4rem;
    margin: .45rem 0 0 1.35rem; font-size: .8rem; font-weight: 500; color: var(--text-muted);
}
.by-tasknames { color: var(--text-muted); }

/* Delivery health (v2.20.9 fusion): lamp = verdict, nested runway = room left,
   pill = the math done. Red wash is RESERVED for late rows so it always means
   something. Deliberately roomy — Luke: "ample padding, nothing smushed". */
.proj-table td { padding-top: .95rem; padding-bottom: .95rem; }

/* v2.20.10: rows read as separate PLATES (Luke: "difficult to determine where
   projects start and end") — spaced card rows like the dashboard plates,
   not a run-on grid. border-collapse must be separate for row gaps. */
.proj-table { border-collapse: separate; border-spacing: 0 1.15rem; }
.proj-table thead th { border-bottom: none; padding-bottom: 0; }
/* v2.20.14 health plates: per-cell box-shadow glow is GONE on desktop — in table
   layout each cell's halo bleeds onto its neighbors and every column boundary
   lights up as a seam (Luke: "hard to tell what the F is going on"). Health now
   reads from a calm trio: tinted plate + colored hairline + 4px left edge bar.
   Mobile keeps the true glow (there the whole row is one block — no seams). */
.proj-table tbody tr { --hglow: var(--plate-glow); }
.proj-table tbody tr.ph-new { --hglow: var(--st-new); }
.proj-table tbody tr.ph-ok { --hglow: var(--st-done); }
.proj-table tbody tr.ph-warn { --hglow: var(--st-warn); }
.proj-table tbody tr.ph-late { --hglow: var(--st-blocked); }
.proj-table tbody td {
    background: color-mix(in srgb, var(--hglow) 5%, var(--glass-soft));
    border-top: 1px solid color-mix(in srgb, var(--hglow) 45%, var(--border));
    border-bottom: 1px solid color-mix(in srgb, var(--hglow) 45%, var(--border));
}
.proj-table tbody td:first-child {
    border-left: 4px solid color-mix(in srgb, var(--hglow) 80%, transparent);
    border-radius: 14px 0 0 14px;
}
.proj-table tbody td:last-child {
    border-right: 1px solid color-mix(in srgb, var(--hglow) 45%, var(--border));
    border-radius: 0 14px 14px 0;
}
.proj-table tbody tr.ph-late td { background: color-mix(in srgb, var(--st-blocked) 11%, var(--glass-soft)); }
.proj-table tbody tr:hover { background: transparent; }
/* Hover = a soft white lift, not a color (gold clashed with the health palette).
   No box-shadow here — the per-cell seam physics applies on hover too. */
.proj-table tbody tr:hover td {
    border-color: color-mix(in srgb, #FFFFFF 40%, var(--border));
    background: color-mix(in srgb, #FFFFFF 4%, color-mix(in srgb, var(--hglow) 5%, var(--glass-soft)));
}
.proj-table tbody tr:hover td:first-child { border-left-color: var(--hglow); }
:root[data-theme="light"] .proj-table tbody tr:hover td {
    border-color: color-mix(in srgb, #1D2530 30%, var(--border));
    background: color-mix(in srgb, #1D2530 3%, color-mix(in srgb, var(--hglow) 5%, var(--glass-soft)));
}
/* Late rows keep their stronger red wash while hovered */
.proj-table tbody tr.ph-late:hover td {
    background: color-mix(in srgb, #FFFFFF 4%, color-mix(in srgb, var(--st-blocked) 11%, var(--glass-soft)));
}
.proj-table tbody tr:last-child td { border-bottom-width: 1px; }

/* Legend D2 (v2.20.13): counts that are also filters */
.health-legend {
    display: flex; flex-wrap: wrap; gap: .5rem;
    justify-content: center; margin: 0 0 1.1rem;
}
.hl-pill {
    font: inherit; font-size: .78rem; font-weight: 700; cursor: pointer;
    border-radius: 999px; padding: .3rem .85rem;
    background: color-mix(in srgb, var(--hl) 13%, transparent);
    color: var(--hl);
    border: 1px solid color-mix(in srgb, var(--hl) 40%, transparent);
    transition: box-shadow .15s ease, transform .1s ease;
}
.hl-pill:hover { transform: translateY(-1px); box-shadow: 0 0 12px -3px var(--hl); }
.hl-pill.on { box-shadow: 0 0 0 2px color-mix(in srgb, var(--hl) 65%, transparent), 0 0 14px -3px var(--hl); }
.hl-pill:disabled { opacity: .4; cursor: default; transform: none; box-shadow: none; }
.hl-new { --hl: var(--st-new); }
.hl-ok { --hl: var(--st-done); }
.hl-warn { --hl: var(--st-warn); }
.hl-late { --hl: var(--st-blocked); }
.hl-none { --hl: var(--st-cancelled); border-style: dashed; font-weight: 600; }

/* Mobile A (v2.20.11, Luke's pick): each plate becomes a stacked card — full
   project cell (name, byline, runway) on top, the data cells flow underneath
   as an inline meta row. On mobile the TR is the card, so tds shed their
   borders/backgrounds and the health tint moves up to the row. */
@media (max-width: 700px) {
    /* .table-card .data-table sets min-width 560px at this breakpoint — outrank it */
    .proj-table, .table-card .proj-table { display: block; min-width: 0; }
    .proj-table thead { display: none; }
    .proj-table tbody { display: block; }
    .proj-table tbody tr {
        display: block;
        border: 1px solid color-mix(in srgb, var(--hglow) 35%, var(--border));
        border-radius: 14px;
        background: var(--glass-soft);
        padding: .55rem .35rem;
        margin-bottom: 1.1rem;
        box-shadow: 0 0 18px -4px color-mix(in srgb, var(--hglow) 40%, transparent),
                    0 0 4px color-mix(in srgb, var(--hglow) 22%, transparent);
    }
    .proj-table tbody td,
    .proj-table tbody td:first-child,
    .proj-table tbody td:last-child {
        display: inline-block;
        vertical-align: middle;
        border: none;
        border-radius: 0;
        background: none;
        box-shadow: none;
        padding: .3rem .6rem;
    }
    .proj-table tbody td:first-child { display: block; padding: .45rem .6rem .2rem; }
    .proj-cell { min-width: 0; }
    .runway { max-width: none; margin-right: .2rem; }
    /* empty-state dashes are noise on a phone — hide cells that only hold one */
    .proj-table tbody td .muted:only-child { display: none; }
    .proj-table tbody tr.ph-late {
        background: color-mix(in srgb, var(--st-blocked) 10%, var(--glass-soft));
        border-left: 3px solid var(--st-blocked);
    }
    .proj-table tbody tr.ph-warn { border-left: 3px solid var(--st-warn); }
    .proj-table tbody tr.ph-late td,
    .proj-table tbody tr.ph-warn td { background: none; border: none; box-shadow: none; }
}
.proj-cell { min-width: 300px; }
.proj-head { display: flex; align-items: center; gap: .6rem; }
.lamp { width: 11px; height: 11px; border-radius: 50%; flex: none; background: color-mix(in srgb, var(--border) 80%, transparent); }
.lamp-new { background: var(--st-new); box-shadow: 0 0 9px 1px color-mix(in srgb, var(--st-new) 75%, transparent); }
.lamp-ok { background: var(--st-done); box-shadow: 0 0 9px 1px color-mix(in srgb, var(--st-done) 70%, transparent); }
.lamp-warn { background: var(--st-warn); box-shadow: 0 0 9px 1px color-mix(in srgb, var(--st-warn) 75%, transparent); }
.lamp-late { background: var(--st-blocked); box-shadow: 0 0 11px 2px color-mix(in srgb, var(--st-blocked) 85%, transparent); }

.runway {
    display: flex; align-items: center; gap: 1rem;
    margin: 1.05rem .5rem .25rem 1.35rem; max-width: 380px;
}
.rw-track {
    position: relative; flex: 1; height: 5px; border-radius: 999px;
    background: color-mix(in srgb, var(--border) 55%, transparent);
    margin-top: 14px; /* room for the flag labels above */
}
.rw-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; }
.rw-new { background: var(--st-new); }
.rw-ok { background: var(--st-done); }
.rw-warn { background: var(--st-warn); }
.rw-late { background: var(--st-blocked); }
.rw-today {
    position: absolute; top: -5px; width: 2px; height: 15px;
    background: var(--text); border-radius: 2px; transform: translateX(-1px);
}
.rw-today-late { background: var(--st-blocked); }
.rw-flag {
    position: absolute; top: -17px; transform: translateX(-50%);
    font-size: .64rem; font-weight: 600; color: var(--text-muted); white-space: nowrap;
}
.rw-flag-prod { right: 0; left: auto; transform: none; }
.rw-flag-done { color: var(--st-done); }
.rw-flag-late { color: var(--st-blocked); }
.rw-pill {
    flex: none; font-size: .72rem; font-weight: 700;
    border-radius: 999px; padding: .22rem .65rem; white-space: nowrap;
}
.rw-pill-new { color: var(--st-new); background: color-mix(in srgb, var(--st-new) 14%, transparent); }
.rw-pill-ok { color: var(--st-done); background: color-mix(in srgb, var(--st-done) 14%, transparent); }
.rw-pill-warn { color: var(--st-warn); background: color-mix(in srgb, var(--st-warn) 16%, transparent); }
.rw-pill-late { color: var(--st-blocked); background: color-mix(in srgb, var(--st-blocked) 20%, transparent); }
.rw-setdates {
    display: inline-block; margin: .8rem 0 .2rem 1.35rem;
    border: 1px dashed color-mix(in srgb, #e9a23b 55%, transparent); color: #e9a23b;
    border-radius: 999px; padding: .22rem .75rem; font-size: .72rem; font-weight: 600;
}

/* Project page: owner picker + date fields */
.pd-owner-add { width: auto; min-width: 150px; padding: .28rem .7rem; font-size: .8rem; }
.pd-date { width: 175px; }
.by-sig {
    color: var(--gold);
    border-bottom: 1.5px solid color-mix(in srgb, var(--gold) 40%, transparent);
    padding-bottom: 1px;
}
.by-dot { opacity: .6; }
.by-crew { display: inline-flex; }
.by-av {
    width: 20px; height: 20px; font-size: .56rem;
    border: 1.5px solid var(--bg-base);
}
.by-crew .by-av { margin-left: -7px; }
.by-crew .by-av:first-child { margin-left: 0; }
.by-names { color: var(--text); }
.by-none { color: #e9a23b; font-style: italic; }

/* Project cards (v2.20.17) — the table is gone. Every card is self-describing
   with labeled rows, identical on desktop and phone. Cards are single blocks,
   so the health glow finally works with NO seams. */
.pcard-sortbar {
    display: flex; justify-content: flex-end; align-items: center; gap: .55rem;
    margin: 0 0 1rem; font-size: .8rem; color: var(--text-muted);
}
.pcard-sortbar label { font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .68rem; }
.pcard-sort { width: auto; padding: .4rem 2rem .4rem .85rem; font-size: .85rem; }
.pcard-list { display: flex; flex-direction: column; gap: 1.25rem; }
.pcard {
    /* Neutral cards (no verdict / no dates) are GRAY — the same gray as the
       legend's "without dates" pill. Every card color must map 1:1 to a legend
       pill in every theme; the decorative --plate-glow broke that (it was gold
       on Batman, violet on Amethyst — a sixth color the legend never explained). */
    --hglow: var(--st-cancelled);
    position: relative;
    border: 1px solid color-mix(in srgb, var(--hglow) 45%, var(--border));
    border-left: 4px solid color-mix(in srgb, var(--hglow) 80%, transparent);
    border-radius: 16px;
    background: color-mix(in srgb, var(--hglow) 5%, var(--glass-soft));
    box-shadow: 0 0 26px -6px color-mix(in srgb, var(--hglow) 45%, transparent);
    padding: 1.1rem 1.35rem 1rem;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.pcard.ph-new { --hglow: var(--st-new); }
.pcard.ph-ok { --hglow: var(--st-done); }
.pcard.ph-warn { --hglow: var(--st-warn); }
.pcard.ph-late { --hglow: var(--st-blocked); background: color-mix(in srgb, var(--st-blocked) 11%, var(--glass-soft)); }
.pcard:hover {
    border-color: color-mix(in srgb, #FFFFFF 40%, var(--border));
    border-left-color: var(--hglow);
    background: color-mix(in srgb, #FFFFFF 4%, color-mix(in srgb, var(--hglow) 5%, var(--glass-soft)));
}
.pcard.ph-late:hover { background: color-mix(in srgb, #FFFFFF 4%, color-mix(in srgb, var(--st-blocked) 11%, var(--glass-soft))); }
:root[data-theme="light"] .pcard {
    box-shadow: 0 3px 14px color-mix(in srgb, var(--hglow) 22%, transparent), 0 1px 3px rgba(20, 30, 50, .1);
}
:root[data-theme="light"] .pcard:hover { border-color: color-mix(in srgb, #1D2530 30%, var(--border)); }
.pcard-top { display: flex; align-items: center; gap: .65rem; margin-bottom: .95rem; }
.pcard-name { flex: 1; min-width: 0; font-size: 1.06rem; font-weight: 800; overflow-wrap: anywhere; }
/* v2.21.5: status leads the card, left of the title, with ample breathing room */
.pcard-status { margin-right: .9rem; flex: none; }
/* wait entries in the project activity feed — violet dot, plain sentence */
.pact-wait { align-items: center; }
.pact-waitdot { background: var(--st-await); box-shadow: 0 0 8px -2px var(--st-await); }
.pact-text { flex: 1; min-width: 0; font-size: .88rem; color: var(--text); }
.pcard-grid {
    display: grid; grid-template-columns: 76px minmax(0, 1fr) 76px minmax(0, 1fr);
    gap: .7rem 1.1rem; align-items: center;
}
.pcard-label {
    font-size: .66rem; font-weight: 800; letter-spacing: .09em;
    text-transform: uppercase; color: var(--text-muted); align-self: center;
}
.pcard-val { display: flex; flex-wrap: wrap; gap: .4rem .55rem; align-items: center; min-width: 0; font-size: .9rem; }
.pcard-val .runway { flex: 1; min-width: 220px; }
.pcard-empty { color: var(--text-muted); font-style: italic; font-size: .84rem; }
.pg-num-loud { font-size: .84rem; font-weight: 600; color: var(--text); white-space: nowrap; }
.pcard-foot {
    margin-top: .95rem; padding-top: .6rem;
    border-top: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
    font-size: .75rem; color: var(--text-muted);
}
/* Mobile timeline = vertical delivery tracker (approved mock). Desktop keeps
   the horizontal runway; this is display-switched, both are always rendered. */
.rwv { display: none; }
@media (max-width: 700px) {
    .pcard { padding: .95rem 1rem .85rem; }
    .pcard-grid { grid-template-columns: 70px minmax(0, 1fr); gap: .6rem .8rem; }
    .pcard-sortbar { justify-content: flex-start; }
    /* The status badge refuses to shrink (flex:none), so beside the title it
       crushed it to a sliver. Title owns the first row with the lamp; the
       badge always wraps to its own full row underneath. */
    .pcard-top { flex-wrap: wrap; row-gap: .55rem; }
    .pcard-top .lamp { order: 0; }
    .pcard-name { order: 1; flex: 1 0 calc(100% - 32px); }
    .pcard-status { order: 2; margin-right: 0; max-width: 100%; }
    .await-line { white-space: normal; }
    /* runway out, tracker in; label sits above the full-width tracker */
    .pcard-val .runway { display: none; }
    .rwv { display: block; }
    .pl-time, .pv-time { grid-column: 1 / -1; }
    .pv-time { display: block; }
    .rwv-step { display: flex; align-items: center; gap: .6rem; }
    .rwv-dot {
        width: 20px; height: 20px; border-radius: 50%; flex: none;
        display: inline-flex; align-items: center; justify-content: center;
        font-size: .7rem; font-weight: 800;
    }
    .rwv-dot-done { background: color-mix(in srgb, var(--st-done) 20%, transparent); color: var(--st-done); }
    .rwv-dot-next { border: 2px solid var(--hglow); background: none; }
    .rwv-nm { flex: 1; min-width: 0; font-size: .86rem; font-weight: 600; }
    .rwv-dt { color: var(--text-muted); font-size: .8rem; white-space: nowrap; }
    .rwv-seg {
        display: block; width: 2px; height: 14px; margin: 2px 0 2px 9px;
        background: color-mix(in srgb, var(--border) 85%, transparent);
        position: relative;
    }
    .rwv-seg-done { background: var(--st-done); }
    .rwv-seg-today {
        height: 28px;
        background: linear-gradient(var(--st-done) 45%, color-mix(in srgb, var(--border) 85%, transparent) 45%);
    }
    .rwv-today {
        position: absolute; top: 8px; left: 12px;
        font-size: .64rem; font-weight: 700; color: var(--text);
        background: color-mix(in srgb, var(--text) 12%, transparent);
        border-radius: 999px; padding: 1px 8px; white-space: nowrap;
    }
    .rwv .rw-pill { margin-left: .3rem; }
}

/* AI page (v2.23) — briefed project cards + ask box. One AI signature app-wide:
   the violet ✦ (--st-await family). Cards borrow the pcard health language. */
.aip-sub { color: var(--text-muted); font-size: .85rem; }
.aip-offline {
    border: 1px dashed color-mix(in srgb, #e9a23b 55%, transparent); color: #e9a23b;
    border-radius: 12px; padding: .6rem .9rem; font-size: .85rem; margin-bottom: 1rem;
}
.aip-ask {
    display: flex; align-items: center; gap: .6rem;
    border: 1px solid color-mix(in srgb, var(--st-await) 50%, transparent);
    background: color-mix(in srgb, var(--st-await) 6%, transparent);
    border-radius: 14px; padding: .55rem .9rem; margin-bottom: .6rem;
}
.aip-spark { color: var(--st-await); font-size: 1rem; flex: none; }
.aip-input {
    flex: 1; min-width: 0; border: none; background: none; color: var(--text);
    font: inherit; font-size: .95rem; outline: none;
}
.aip-input::placeholder { color: var(--text-muted); }
.aip-recent {
    display: flex; align-items: center; flex-wrap: wrap; gap: .4rem;
    margin: 0 0 1rem; font-size: .74rem; color: var(--text-muted);
}
.aip-recent-label { font-weight: 700; text-transform: uppercase; letter-spacing: .07em; font-size: .64rem; }
.aip-chip {
    border: 1px solid var(--border); background: none; color: var(--text-muted);
    border-radius: 999px; padding: .18rem .7rem; font: inherit; font-size: .76rem; cursor: pointer;
}
.aip-chip:hover { color: var(--st-await); border-color: color-mix(in srgb, var(--st-await) 55%, transparent); }
.aip-thread {
    border: 1px solid var(--border); border-radius: 14px; background: var(--glass-soft);
    padding: .8rem 1rem; margin-bottom: 1.2rem;
}
.aip-thread-head { display: flex; align-items: center; gap: .5rem; font-weight: 700; font-size: .86rem; margin-bottom: .35rem; }
.aip-priv {
    background: color-mix(in srgb, var(--st-await) 15%, transparent); color: var(--st-await);
    border-radius: 999px; padding: .1rem .6rem; font-size: .64rem; font-weight: 700;
}
.aip-msg { display: flex; gap: .55rem; margin: .55rem 0 0; align-items: flex-start; }
.aip-av {
    width: 26px; height: 26px; border-radius: 50%; flex: none;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: .62rem; font-weight: 800;
}
.aip-av-you { background: color-mix(in srgb, var(--gold) 22%, transparent); color: var(--gold); }
.aip-av-ai { background: color-mix(in srgb, var(--st-await) 20%, transparent); color: var(--st-await); font-size: .8rem; }
.aip-bubble {
    background: color-mix(in srgb, var(--text) 7%, transparent);
    border-radius: 12px; padding: .45rem .75rem; flex: 1; min-width: 0;
    font-size: .88rem; white-space: pre-line; overflow-wrap: anywhere;
}
.aip-bubble-you { background: color-mix(in srgb, var(--gold) 12%, transparent); }
.aip-bubble-ai { background: color-mix(in srgb, var(--st-await) 10%, transparent); }
.aip-name-you { color: var(--gold); font-weight: 700; font-size: .78rem; }
.aip-name-ai { color: var(--st-await); font-weight: 700; font-size: .78rem; }
.aip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.aip-card {
    --hglow: var(--st-cancelled);
    border: 1px solid color-mix(in srgb, var(--hglow) 45%, var(--border));
    border-left: 4px solid color-mix(in srgb, var(--hglow) 80%, transparent);
    border-radius: 14px;
    background: color-mix(in srgb, var(--hglow) 5%, var(--glass-soft));
    box-shadow: 0 0 22px -8px color-mix(in srgb, var(--hglow) 45%, transparent);
    padding: .95rem 1.1rem .75rem;
}
.aip-card.ph-new { --hglow: var(--st-new); }
.aip-card.ph-ok { --hglow: var(--st-done); }
.aip-card.ph-warn { --hglow: var(--st-warn); }
.aip-card.ph-late { --hglow: var(--st-blocked); }
:root[data-theme="light"] .aip-card {
    box-shadow: 0 3px 12px color-mix(in srgb, var(--hglow) 20%, transparent), 0 1px 3px rgba(20, 30, 50, .08);
}
.aip-card-top { display: flex; align-items: center; gap: .55rem; margin-bottom: .3rem; }
.aip-title { flex: 1; min-width: 0; font-weight: 800; font-size: .98rem; color: var(--text); overflow-wrap: anywhere; }
.aip-title:hover { color: var(--gold); }
.rw-pill-none { color: var(--st-cancelled); background: color-mix(in srgb, var(--st-cancelled) 14%, transparent); }
.aip-sl {
    font-size: .62rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase;
    color: var(--st-await); margin: .6rem 0 .15rem;
}
.aip-sl-warn { color: var(--st-warn); }
.aip-sl-none { color: var(--text-muted); }
.aip-body { font-size: .87rem; line-height: 1.5; }
.aip-thinking { color: var(--st-await); font-size: .85rem; font-style: italic; margin: .7rem 0 .4rem; }
.aip-card-foot {
    display: flex; align-items: center; gap: .55rem; margin-top: .75rem; padding-top: .5rem;
    border-top: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
    font-size: .72rem; color: var(--text-muted);
}
.aip-refresh {
    margin-left: auto; border: 1px solid var(--border); background: none; color: var(--text-muted);
    border-radius: 50%; width: 26px; height: 26px; cursor: pointer; font-size: .85rem;
    display: inline-grid; place-items: center;
}
.aip-refresh:hover:not(:disabled) { color: var(--st-await); border-color: var(--st-await); }
.aip-refresh:disabled, .aip-chip:disabled { opacity: .45; cursor: default; }
.aip-askme { font-size: .7rem; padding: .14rem .6rem; }
.aip-foot {
    display: flex; align-items: flex-start; gap: .5rem; margin-top: 1.3rem;
    font-size: .74rem; color: var(--text-muted); line-height: 1.5;
}
.aip-dot {
    width: 8px; height: 8px; border-radius: 50%; background: var(--st-done); flex: none; margin-top: .3rem;
    box-shadow: 0 0 7px 1px color-mix(in srgb, var(--st-done) 60%, transparent);
}
@media (max-width: 700px) {
    .aip-grid { grid-template-columns: 1fr; }
    .aip-input { font-size: 16px; } /* iOS no-zoom */
    .aip-ask { flex-wrap: wrap; }
}

/* Global AI assistant (v2.23) — floating ✦ button + proactive popup, every page.
   One AI signature: violet ✦ (--st-await family). */
.aia-fab {
    position: fixed; bottom: 20px; right: 20px; z-index: 900;
    height: 50px; padding: 0 18px 0 15px; border: none; border-radius: 999px;
    background: var(--primary); color: #fff; cursor: pointer;
    display: inline-flex; align-items: center; gap: .55rem;
    font: inherit; font-weight: 700; font-size: .88rem;
    box-shadow: 0 10px 30px color-mix(in srgb, var(--primary) 55%, transparent);
    transition: transform .12s ease, box-shadow .12s ease;
}
.aia-fab:hover { transform: translateY(-2px); box-shadow: 0 14px 38px color-mix(in srgb, var(--primary) 60%, transparent); }
.aia-fab-sp { font-size: 1.2rem; line-height: 1; }
/* Batman's primary is bat-gold — dark glyph reads better than white on it */
:root[data-theme="batman"] .aia-fab, :root[data-theme="alfred"] .aia-fab { color: #0D0A16; }
.aia-fab-pulse {
    width: 8px; height: 8px; border-radius: 50%; background: var(--st-done);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--st-done) 30%, transparent);
}
.aia-scrim {
    position: fixed; inset: 0; z-index: 899; border: none;
    background: color-mix(in srgb, var(--bg-base) 45%, transparent);
    backdrop-filter: blur(1px); cursor: default;
}
.aia-pop {
    position: fixed; bottom: 20px; right: 20px; z-index: 901;
    width: 350px; max-width: calc(100vw - 24px); max-height: min(76vh, 640px);
    display: flex; flex-direction: column;
    background: var(--glass-opaque, var(--bg-elev, #0D0A16));
    border: 1px solid color-mix(in srgb, var(--st-await) 30%, var(--border));
    border-radius: 18px; overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
}
.aia-head { display: flex; align-items: center; gap: .6rem; padding: .8rem .9rem; border-bottom: 1px solid var(--border); flex: none; }
.aia-orb {
    width: 30px; height: 30px; border-radius: 50%; flex: none;
    display: inline-grid; place-items: center; color: #fff; font-size: .95rem;
    background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--st-await) 70%, #fff), var(--primary));
    box-shadow: 0 0 16px color-mix(in srgb, var(--primary) 55%, transparent);
}
.aia-who { min-width: 0; line-height: 1.25; }
.aia-who b { font-weight: 700; font-size: .84rem; display: block; }
.aia-on { font-size: .66rem; color: var(--st-done); }
.aia-off { font-size: .66rem; color: var(--st-warn); }
.aia-x { margin-left: auto; background: none; border: none; color: var(--text-muted); font-size: .95rem; cursor: pointer; flex: none; }
.aia-x:hover { color: var(--text); }
.aia-body { padding: .9rem; overflow-y: auto; flex: 1; min-height: 0; }
.aia-greet { font-size: .95rem; font-weight: 700; margin-bottom: .15rem; }
.aia-sub { font-size: .8rem; color: var(--text-muted); margin-bottom: .8rem; }
.aia-today {
    border: 1px solid color-mix(in srgb, var(--st-await) 25%, var(--border));
    border-radius: 13px; background: color-mix(in srgb, var(--st-await) 5%, transparent);
    padding: .7rem .75rem; margin-bottom: .9rem;
}
.aia-cap { font-size: .6rem; letter-spacing: .09em; text-transform: uppercase; color: var(--st-await); font-weight: 800; margin-bottom: .45rem; }
.aia-allclear { font-size: .8rem; color: var(--st-done); }
.aia-trow {
    display: flex; gap: .55rem; align-items: flex-start; width: 100%;
    background: none; border: none; padding: .35rem 0; text-align: left;
    color: var(--text); font: inherit; font-size: .8rem; cursor: pointer;
}
.aia-trow:hover .aia-tb { color: var(--st-await); }
.aia-tdot { width: 7px; height: 7px; border-radius: 50%; flex: none; margin-top: .3rem; }
.aia-tdot-late { background: var(--st-blocked); }
.aia-tdot-warn { background: var(--st-warn); }
.aia-tb { font-weight: 700; }
.aia-prompt { font-size: .74rem; color: var(--text-muted); margin-bottom: .5rem; }
.aia-asks { display: flex; flex-direction: column; gap: .45rem; }
.aia-ask {
    display: flex; align-items: center; gap: .55rem; width: 100%;
    border: 1px solid color-mix(in srgb, var(--st-await) 30%, var(--border));
    background: color-mix(in srgb, var(--st-await) 4%, transparent);
    border-radius: 11px; padding: .55rem .75rem; text-align: left;
    color: var(--text); font: inherit; font-size: .82rem; cursor: pointer;
}
.aia-ask:hover { border-color: var(--st-await); background: color-mix(in srgb, var(--st-await) 10%, transparent); }
.aia-ask:disabled { opacity: .5; cursor: default; }
.aia-ic { color: var(--st-await); font-size: .85rem; flex: none; }
.aia-go { margin-left: auto; color: var(--text-muted); font-size: .75rem; }
.aia-msg { display: flex; gap: .5rem; margin: .55rem 0; align-items: flex-start; }
.aia-av { width: 24px; height: 24px; border-radius: 50%; flex: none; display: inline-grid; place-items: center; font-size: .6rem; font-weight: 800; }
.aia-av-you { background: color-mix(in srgb, var(--gold) 22%, transparent); color: var(--gold); }
.aia-av-ai { background: color-mix(in srgb, var(--st-await) 20%, transparent); color: var(--st-await); font-size: .8rem; }
.aia-bubble { border-radius: 12px; padding: .45rem .7rem; min-width: 0; font-size: .85rem; overflow-wrap: anywhere; white-space: pre-line; }
.aia-bubble-you { background: color-mix(in srgb, var(--gold) 12%, transparent); }
.aia-bubble-ai { background: color-mix(in srgb, var(--st-await) 11%, transparent); }
.aia-nm-you { color: var(--gold); font-weight: 700; font-size: .68rem; }
.aia-nm-ai { color: var(--st-await); font-weight: 700; font-size: .68rem; }
.aia-typing { color: var(--text-muted); font-style: italic; }
.aia-inbar {
    display: flex; align-items: center; gap: .5rem; flex: none;
    margin: .5rem .7rem; padding: .45rem .75rem;
    border: 1px solid color-mix(in srgb, var(--st-await) 40%, transparent);
    border-radius: 999px; background: color-mix(in srgb, var(--st-await) 5%, transparent);
}
.aia-sp { color: var(--st-await); flex: none; }
.aia-input { flex: 1; min-width: 0; border: none; background: none; color: var(--text); font: inherit; font-size: .85rem; outline: none; }
.aia-input::placeholder { color: var(--text-muted); }
.aia-send {
    flex: none; width: 26px; height: 26px; border-radius: 50%; border: none; cursor: pointer;
    background: var(--primary); color: #fff; font-size: .78rem; display: inline-grid; place-items: center;
}
:root[data-theme="batman"] .aia-send, :root[data-theme="alfred"] .aia-send { color: #0D0A16; }
.aia-send:disabled { opacity: .45; cursor: default; }
.aia-disc { display: flex; align-items: flex-start; gap: .4rem; padding: 0 .95rem .8rem; font-size: .66rem; color: var(--text-muted); line-height: 1.45; flex: none; }
.aia-lock { color: var(--st-done); flex: none; font-size: .5rem; margin-top: .25rem; }
@media (max-width: 700px) {
    /* clear the pinned mobile tab bar */
    .aia-fab { bottom: 78px; }
    .aia-pop { bottom: 0; right: 0; left: 0; width: 100%; max-width: 100%; max-height: 82vh; border-radius: 18px 18px 0 0; }
    .aia-input { font-size: 16px; } /* iOS no-zoom */
}

/* Apple-style emoji picker (v2.23) — smiley trigger opens a "most used" row +
   full catalog by category. Reusable anywhere (chat composer today). */
.emoji-picker-wrap { position: relative; flex: none; display: inline-flex; }
.emoji-trigger {
    width: 34px; height: 34px; border: none; background: none; cursor: pointer;
    color: var(--text-muted); border-radius: 10px; display: inline-grid; place-items: center;
}
.emoji-trigger svg { width: 22px; height: 22px; }
.emoji-trigger:hover, .emoji-trigger.open { color: var(--st-await); background: color-mix(in srgb, var(--st-await) 12%, transparent); }
.emoji-backdrop { position: fixed; inset: 0; z-index: 1200; }
.emoji-pop {
    position: absolute; bottom: calc(100% + 8px); left: 0; z-index: 1201;
    width: 320px; max-width: calc(100vw - 24px); max-height: 340px;
    display: flex; flex-direction: column; overflow: hidden;
    background: var(--glass-opaque, var(--bg-elev, #0D0A16));
    border: 1px solid color-mix(in srgb, var(--st-await) 30%, var(--border));
    border-radius: 14px; box-shadow: 0 20px 50px rgba(0, 0, 0, .5); padding: .5rem;
}
.emoji-scroll { overflow-y: auto; }
.emoji-sec-label {
    font-size: .62rem; letter-spacing: .09em; text-transform: uppercase; font-weight: 800;
    color: var(--text-muted); padding: .5rem .3rem .25rem; position: sticky; top: 0;
    background: var(--glass-opaque, #0D0A16);
}
.emoji-recent + .emoji-scroll .emoji-sec-label:first-child { padding-top: .3rem; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 1px; }
.emoji-btn {
    border: none; background: none; cursor: pointer; border-radius: 8px;
    font-size: 1.25rem; line-height: 1; padding: .28rem 0; text-align: center;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}
.emoji-btn:hover { background: color-mix(in srgb, var(--st-await) 16%, transparent); }
.emoji-recent { margin-bottom: .15rem; }
@media (max-width: 700px) {
    .emoji-pop { width: calc(100vw - 24px); left: -8px; }
    .emoji-grid { grid-template-columns: repeat(9, 1fr); }
}

/* Team chat (v2.23) — room list + thread. Rooms visible to the whole team;
   project channels auto-created. Violet accents (--st-await / --primary). */
.chat-shell {
    display: flex; gap: 0; height: calc(100dvh - 150px); min-height: 460px;
    border: 1px solid var(--border); border-radius: 16px; overflow: hidden;
    background: var(--glass-soft);
}
.chat-rooms {
    /* v2.23: wider so real room names fit — the old 210px truncated almost every
       project channel to "additional-sources-f…". */
    width: 268px; flex: none; border-right: 1px solid var(--border);
    display: flex; flex-direction: column; overflow-y: auto; padding: .5rem 0 .8rem;
}
.chat-rooms-head { display: flex; align-items: center; padding: .5rem .9rem .4rem; font-weight: 700; font-size: .95rem; }
.chat-rgroup { margin-bottom: .35rem; }
.chat-picker { display: none; }
.chat-new {
    margin-left: auto; width: 26px; height: 26px; border-radius: 8px; border: none;
    background: color-mix(in srgb, var(--st-await) 15%, transparent); color: var(--st-await);
    font-size: 1.1rem; line-height: 1; cursor: pointer;
}
.chat-new:hover { background: color-mix(in srgb, var(--st-await) 28%, transparent); }
/* v2.23: the group headers were unreadable grey-on-black micro-caps. Now they
   carry a colored dot, real contrast, a count, and a divider so "Team rooms" and
   "Project channels" read as two genuinely separate sections. */
.chat-rsec {
    display: flex; align-items: center; gap: .45rem;
    font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 800;
    padding: .85rem .9rem .3rem; color: var(--text);
    border-top: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
    margin-top: .3rem;
}
.chat-rgroup:first-of-type .chat-rsec { border-top: none; margin-top: 0; }
.chat-rsec-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.chat-rsec-team { color: var(--gold); }
.chat-rsec-team .chat-rsec-dot { background: var(--gold); box-shadow: 0 0 7px -1px var(--gold); }
.chat-rsec-proj { color: var(--st-await); }
.chat-rsec-proj .chat-rsec-dot { background: var(--st-await); box-shadow: 0 0 7px -1px var(--st-await); }
.chat-rsec-n {
    margin-left: auto; background: color-mix(in srgb, currentColor 16%, transparent);
    border-radius: 999px; padding: 0 .42rem; font-size: .65rem; font-weight: 800;
}
.chat-rsec-sub { font-size: .68rem; color: var(--text-muted); padding: 0 .9rem .35rem; font-style: italic; }
.chat-room {
    display: flex; align-items: flex-start; gap: .5rem; width: 100%; border: none; background: none;
    padding: .45rem .9rem; font: inherit; font-size: .88rem; color: var(--text-muted); cursor: pointer; text-align: left;
}
.chat-room:hover { background: color-mix(in srgb, var(--st-await) 8%, transparent); color: var(--text); }
.chat-room-on { background: color-mix(in srgb, var(--st-await) 12%, transparent); color: var(--text); font-weight: 600; box-shadow: inset 3px 0 0 var(--primary); }
.chat-room-unread { color: var(--text); font-weight: 700; }
.chat-hash { color: var(--text-muted); flex: none; line-height: 1.35; }
/* Long room names wrap to a second line instead of being cut off mid-word. */
.chat-rname { flex: 1; min-width: 0; overflow-wrap: anywhere; line-height: 1.35; }
.chat-unread { flex: none; background: var(--primary); color: #fff; border-radius: 999px; padding: 0 .4rem; font-size: .68rem; font-weight: 700; }
:root[data-theme="batman"] .chat-unread, :root[data-theme="alfred"] .chat-unread { color: #0D0A16; }
.chat-thread { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chat-thead { display: flex; align-items: center; gap: .5rem; padding: .8rem 1rem; border-bottom: 1px solid var(--border); flex: none; }
.chat-thead b { font-weight: 700; font-size: .98rem; }
.chat-topic { color: var(--text-muted); font-size: .8rem; }
.chat-projlink:hover { color: var(--gold); }
.chat-admin { position: relative; margin-left: auto; }
.chat-gear { border: none; background: none; color: var(--text-muted); font-size: 1.2rem; line-height: 1; cursor: pointer; padding: .1rem .4rem; border-radius: 8px; }
.chat-gear:hover { color: var(--text); background: var(--glass-soft); }
.chat-menu-backdrop { position: fixed; inset: 0; z-index: 1100; }
.chat-menu {
    position: absolute; top: calc(100% + 4px); right: 0; z-index: 1101; min-width: 160px;
    background: var(--glass-opaque, #0D0A16); border: 1px solid var(--border); border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .5); padding: .3rem; display: flex; flex-direction: column;
}
.chat-menu button {
    border: none; background: none; color: var(--text); font: inherit; font-size: .86rem; text-align: left;
    padding: .5rem .6rem; border-radius: 8px; cursor: pointer;
}
.chat-menu button:hover { background: var(--glass-soft); }
.chat-menu-danger { color: var(--danger); }
.chat-menu-danger:hover { background: color-mix(in srgb, var(--danger) 12%, transparent) !important; }
/* v2.23: per-message edit/delete, the "edited" marker, and the deleted tombstone */
.chat-mact { display: inline-flex; gap: .1rem; margin-left: .3rem; opacity: 0; transition: opacity .12s ease; }
.chat-msg:hover .chat-mact, .chat-mact:focus-within { opacity: 1; }
.chat-act {
    border: none; background: none; color: var(--text-muted); cursor: pointer;
    font-size: .78rem; line-height: 1; padding: .12rem .25rem; border-radius: 6px;
}
.chat-act:hover { color: var(--text); background: var(--glass-soft); }
.chat-act-del:hover { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); }
.chat-edited { font-size: .64rem; color: var(--text-muted); font-style: italic; }
.chat-pending { font-size: .64rem; color: var(--st-warn); font-weight: 700; }
.chat-tomb {
    font-size: .82rem; font-style: italic; color: var(--text-muted);
    background: color-mix(in srgb, var(--text-muted) 10%, transparent);
    border-radius: 10px; padding: .3rem .6rem; display: inline-block;
}
.chat-edit { display: flex; flex-direction: column; gap: .35rem; margin-top: .2rem; }
.chat-edit-box { width: 100%; font-size: .88rem; }
.chat-edit-actions { display: flex; gap: .4rem; }
.chat-img-link { display: inline-block; margin-top: .15rem; }
.chat-img { max-width: min(320px, 70vw); max-height: 280px; border-radius: 12px; display: block; border: 1px solid var(--border); }
.chat-back { display: none; background: none; border: none; color: var(--text-muted); font-size: 1.4rem; line-height: 1; cursor: pointer; padding: 0 .2rem 0 0; }
.chat-body { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .7rem; }
.chat-empty { margin: auto; color: var(--text-muted); font-size: .9rem; }
.chat-day { align-self: center; font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); margin: .3rem 0; }
.chat-msg { display: flex; gap: .6rem; align-items: flex-start; max-width: 82%; }
.chat-mine { flex-direction: row-reverse; align-self: flex-end; }
.chat-mine .chat-mc { align-items: flex-end; }
.chat-mine .chat-mh { flex-direction: row-reverse; }
.chat-av { flex: none; }
.chat-mc { min-width: 0; display: flex; flex-direction: column; }
.chat-mh { display: flex; align-items: baseline; gap: .5rem; }
.chat-mn { font-weight: 700; font-size: .8rem; }
.chat-mn-you { color: var(--gold); }
.chat-mt { font-size: .68rem; color: var(--text-muted); }
.chat-mb {
    margin-top: .12rem; font-size: .9rem; line-height: 1.45; overflow-wrap: anywhere; white-space: pre-wrap;
    background: color-mix(in srgb, var(--text) 7%, transparent); border-radius: 12px; padding: .4rem .7rem;
}
.chat-mine .chat-mb { background: color-mix(in srgb, var(--gold) 13%, transparent); }
.chat-composer { display: flex; align-items: flex-end; gap: .5rem; padding: .7rem .9rem; border-top: 1px solid var(--border); flex: none; }
.chat-input {
    flex: 1; min-width: 0; resize: none; border: 1px solid var(--border); border-radius: 14px;
    background: var(--glass); color: var(--text); font: inherit; font-size: .92rem;
    padding: .55rem .8rem; max-height: 120px; line-height: 1.4; outline: none;
}
.chat-input:focus { border-color: color-mix(in srgb, var(--st-await) 50%, var(--border)); }
.chat-send {
    flex: none; width: 38px; height: 38px; border-radius: 50%; border: none; cursor: pointer;
    background: var(--primary); color: #fff; font-size: 1rem; display: inline-grid; place-items: center;
}
:root[data-theme="batman"] .chat-send, :root[data-theme="alfred"] .chat-send { color: #0D0A16; }
.chat-send:disabled { opacity: .5; cursor: default; }
@media (max-width: 700px) {
    /* v2.23: phones get a room PICKER, not a column. A 15-room sidebar on a
       375px screen was unusable, and the list/thread shuffle lost people. */
    .chat-shell { height: calc(100dvh - 130px); flex-direction: column; }
    .chat-rooms { display: none; }
    .chat-thread { display: flex; }
    .chat-back { display: none; }
    .chat-picker {
        display: flex; align-items: center; gap: .5rem; flex: none;
        padding: .55rem .6rem; border-bottom: 1px solid var(--border);
    }
    .chat-picker .input { flex: 1; min-width: 0; font-size: 16px; } /* iOS no-zoom */
    .chat-new-mobile { margin-left: 0; flex: none; width: 34px; height: 34px; font-size: 1.2rem; }
    .chat-input { font-size: 16px; }
    .chat-msg { max-width: 92%; }
    .chat-mact { opacity: 1; } /* no hover on touch — always show the actions */
}

/* AI review desk (v2.23) — flag queue + full interaction log, SuperAdmin only */
.aiw-clear { margin: .2rem 0 1.4rem; }
.aiw-list { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1.6rem; }
.aiw-card {
    border: 1px solid color-mix(in srgb, var(--st-warn) 45%, var(--border));
    border-left: 4px solid var(--st-warn);
    border-radius: 12px; background: color-mix(in srgb, var(--st-warn) 6%, var(--glass-soft));
    padding: .7rem .95rem;
}
.aiw-top { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .3rem; }
.aiw-reason {
    color: var(--st-warn); background: color-mix(in srgb, var(--st-warn) 15%, transparent);
    border-radius: 999px; padding: .12rem .65rem; font-size: .7rem; font-weight: 700;
}
.aiw-who { margin-left: auto; font-size: .74rem; color: var(--text-muted); }
.aiw-q { font-size: .92rem; font-weight: 600; overflow-wrap: anywhere; }
.aiw-a { font-size: .8rem; color: var(--text-muted); margin-top: .25rem; }
.aiw-actions { margin-top: .55rem; }
.aiw-log-head { margin-top: .4rem; }
.aiw-filters { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin: 0 0 .9rem; }
.aiw-filters .input { width: auto; }
.aiw-search { min-width: 180px; flex: 1; }
.aiw-check { display: inline-flex; align-items: center; gap: .35rem; font-size: .82rem; color: var(--text-muted); }
.aiw-row {
    display: flex; align-items: baseline; gap: .7rem;
    border: 1px solid var(--border); border-radius: 10px;
    background: var(--glass-soft); padding: .45rem .8rem; font-size: .85rem;
}
.aiw-row-ai { background: color-mix(in srgb, var(--st-await) 6%, var(--glass-soft)); }
.aiw-row-flagged { border-color: color-mix(in srgb, var(--st-warn) 55%, var(--border)); }
.aiw-kind { flex: none; font-weight: 700; font-size: .74rem; min-width: 74px; }
.aiw-row-ai .aiw-kind { color: var(--st-await); }
.aiw-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.aiw-meta { flex: none; display: inline-flex; align-items: center; gap: .45rem; font-size: .72rem; color: var(--text-muted); white-space: nowrap; }
.aiw-flagchip { color: var(--st-warn); font-weight: 700; }
@media (max-width: 700px) {
    .aiw-row { flex-wrap: wrap; }
    .aiw-meta { margin-left: auto; }
    .aiw-filters .input, .aiw-search { width: 100%; flex: 1 1 100%; }
}

/* Projects portfolio table (v2.20.4, mock 5) — dense, sortable, row = link */
.proj-table .th-sort {
    border: none; background: none; padding: 0; cursor: pointer;
    font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit;
    white-space: nowrap;
}
.proj-table .th-sort:hover { color: var(--gold); }
.pg-wrap { display: inline-flex; align-items: center; gap: .5rem; }
.pg-track {
    display: inline-block; width: 90px; height: 6px;
    background: color-mix(in srgb, var(--border) 60%, transparent);
    border-radius: 999px; overflow: hidden; flex: none;
}
.pg-fill { display: block; height: 100%; background: var(--gold); border-radius: 999px; }
.pg-fill.pg-done { background: var(--success, #5dcaa5); }
.pg-num { font-size: .74rem; color: var(--text-muted); white-space: nowrap; }
.proj-open { color: var(--gold); font-weight: 800; }
/* flex lives on an inner span — display:flex on a td breaks table layout (the .cell-sub lesson) */
.tk-cell-wrap { display: inline-flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
@media (max-width: 700px) {
    .pg-track { width: 56px; }
}

/* Task-row tickets (v2.21): the ticket leads the task name. A missing ticket is
   an always-visible amber chip that doubles as the inline add control. */
.tk-lead { margin-right: .5rem; vertical-align: middle; }
input.tk-lead { width: 110px; }
.tk-missing {
    display: inline-block;
    padding: .16rem .5rem;
    font-size: .72rem;
    border-radius: 8px;
    border: 1px dashed color-mix(in srgb, var(--warning, #e9a23b) 60%, transparent);
    color: var(--warning, #e9a23b);
    background: transparent;
    cursor: pointer;
    white-space: nowrap;
    font-weight: 600;
}
.tk-missing:hover {
    background: color-mix(in srgb, var(--warning, #e9a23b) 12%, transparent);
    border-style: solid;
}

/* Team load meters (v2.19) — click-to-set bars, gradient by load */
.alloc-hero { margin-bottom: 1.1rem; padding: 1rem 1.2rem; }
.alloc-donut .donut-num { font-size: 20px; }
.alloc-list { display: flex; flex-direction: column; gap: .55rem; }
.alloc-row {
    display: flex; align-items: center; gap: .7rem;
    border: 1px solid var(--border); border-radius: 14px;
    background: var(--glass-soft); padding: .6rem .9rem;
}
.alloc-mine {
    border-color: color-mix(in srgb, var(--gold) 45%, transparent);
    box-shadow: 0 0 18px -10px var(--gold);
}
.alloc-nameblock { width: 170px; flex: none; display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.alloc-name { font-size: .86rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alloc-updated { font-size: .68rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.alloc-meter {
    position: relative; flex: 1; height: 22px; border-radius: 11px;
    background: var(--glass); border: 1px solid var(--border); overflow: hidden;
}
.alloc-meter.clickable { cursor: pointer; }
.alloc-meter.clickable:hover { border-color: color-mix(in srgb, var(--gold) 55%, transparent); }
.alloc-fill {
    height: 100%; border-radius: 11px 0 0 11px;
    transition: width .25s ease, background .25s ease;
    min-width: 0;
}
.alloc-ticks {
    position: absolute; inset: 0; pointer-events: none;
    background-image: repeating-linear-gradient(90deg,
        transparent, transparent calc(25% - 1px), var(--border) calc(25% - 1px), var(--border) 25%);
    opacity: .6;
}
.alloc-pct { width: 48px; text-align: right; font-size: .88rem; font-variant-numeric: tabular-nums; flex: none; }
@media (max-width: 700px) {
    .alloc-nameblock { width: 96px; }
    .alloc-row { padding: .55rem .65rem; gap: .5rem; }
    .alloc-meter { height: 28px; } /* thumb-sized tap target */
}

/* Plain changelog node (v2.16) — the emoji medallions are gone */
.release-node-plain::after {
    content: ""; display: block; width: 10px; height: 10px; border-radius: 50%;
    background: var(--gold); box-shadow: 0 0 10px -2px var(--gold);
    margin: auto;
}

/* Items list "Show more" (v2.15.2) — paging without pagination chrome */
.list-more { display: flex; justify-content: center; margin: .8rem 0 .2rem; }
.list-more .btn { gap: .5rem; }

/* Global search (v2.17) — the gold pill that pops without shouting, and the
   Ctrl+K palette. */
.gsearch-btn {
    display: inline-flex; align-items: center; gap: .5rem;
    height: 38px; padding: 0 .9rem;
    border: 1.5px solid color-mix(in srgb, var(--gold) 45%, var(--border));
    border-radius: 999px;
    background: linear-gradient(180deg, var(--glass-opaque-top), var(--glass-opaque));
    color: var(--text-muted);
    font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer;
    box-shadow: 0 0 16px -8px var(--gold);
    -webkit-tap-highlight-color: transparent;
    transition: border-color .15s ease, color .15s ease, box-shadow .2s ease, transform .1s ease;
}
.gsearch-btn svg { width: 15px; height: 15px; color: var(--gold); }
.gsearch-btn:hover {
    border-color: var(--gold); color: var(--text);
    box-shadow: 0 0 22px -6px var(--gold);
    transform: translateY(-1px);
}
.gsearch-kbd { font-size: .6rem; }
@media (max-width: 700px) {
    .gsearch-btn { padding: 0 .6rem; }
    .gsearch-btn-label, .gsearch-kbd { display: none; } /* icon-only on phones */
}

.gsearch-backdrop {
    position: fixed; inset: 0; z-index: 300;
    background: rgba(2, 6, 12, .72);
    -webkit-backdrop-filter: blur(12px) saturate(1.15);
    backdrop-filter: blur(12px) saturate(1.15);
}
.gsearch-panel {
    position: fixed; top: 12vh; left: 50%; transform: translateX(-50%); z-index: 301;
    width: min(620px, calc(100vw - 2rem));
    max-height: 70vh; display: flex; flex-direction: column; overflow: hidden;
    background: linear-gradient(180deg, var(--glass-opaque-top), var(--glass-opaque));
    border: 1px solid color-mix(in srgb, var(--gold) 35%, var(--border));
    border-radius: 18px;
    box-shadow: var(--shadow-2), 0 0 40px -12px var(--gold);
    animation: clg-fade .14s ease;
}
.gsearch-input-row {
    display: flex; align-items: center; gap: .7rem;
    padding: .85rem 1.1rem; border-bottom: 1px solid var(--border);
}
.gsearch-input-row svg { width: 18px; height: 18px; color: var(--gold); flex: none; }
.gsearch-input {
    flex: 1; border: none; background: none; outline: none;
    font: inherit; font-size: 1rem; color: var(--text);
}
/* v2.23: AI answer that rides on top of the search results (Version 1). Computed
   answers read blue "this is a real, exact number"; AI answers read violet ✦. */
.gsa { padding: .7rem .8rem 0; }
.gsa-think { display: flex; align-items: center; gap: .45rem; color: var(--st-await); font-size: .9rem; font-style: italic; padding: .5rem .3rem; }
.gsa-spark { color: var(--st-await); }
.gsa-card {
    display: flex; align-items: center; gap: .9rem;
    border-radius: 12px; padding: .8rem 1rem;
}
.gsa-computed {
    border: 1px solid color-mix(in srgb, var(--st-new) 40%, transparent);
    background: color-mix(in srgb, var(--st-new) 9%, transparent);
}
.gsa-ai {
    border: 1px solid color-mix(in srgb, var(--st-await) 40%, transparent);
    background: color-mix(in srgb, var(--st-await) 9%, transparent);
    align-items: flex-start;
}
.gsa-big { font-size: 2rem; font-weight: 800; color: var(--st-new); line-height: 1; flex: none; }
.gsa-main { flex: 1; min-width: 0; }
.gsa-head { font-size: 1rem; font-weight: 700; color: var(--text); }
.gsa-detail { font-size: .82rem; color: var(--text-muted); margin-top: .1rem; }
.gsa-answer { font-size: .95rem; color: var(--text); line-height: 1.45; overflow-wrap: anywhere; }
.gsa-ai .gsa-spark { font-size: 1.05rem; margin-top: .1rem; flex: none; }
.gsa-link {
    flex: none; border: 1px solid color-mix(in srgb, var(--st-new) 45%, transparent);
    background: none; color: var(--st-new); border-radius: 999px;
    padding: .28rem .8rem; font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.gsa-link:hover { background: color-mix(in srgb, var(--st-new) 14%, transparent); }
/* v2.23: the pages the AI actually read — click to go read the real thing */
.gsa-sources { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .55rem; }
.gsa-src {
    border: 1px solid color-mix(in srgb, var(--st-await) 40%, transparent);
    background: color-mix(in srgb, var(--st-await) 8%, transparent);
    color: var(--st-await); border-radius: 999px; padding: .16rem .65rem;
    font: inherit; font-size: .72rem; font-weight: 700; cursor: pointer;
    max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gsa-src:hover { background: color-mix(in srgb, var(--st-await) 18%, transparent); }

.gsearch-results { overflow-y: auto; padding: .4rem 0 .6rem; }
.gsearch-group {
    font-size: .62rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
    color: var(--text-muted); padding: .55rem 1.1rem .2rem;
}
.gsearch-row {
    display: flex; align-items: baseline; gap: .7rem; width: 100%;
    border: none; background: none; font: inherit; text-align: left; cursor: pointer;
    padding: .42rem 1.1rem;
}
.gsearch-row:hover, .gsearch-row.on { background: var(--gold-soft); }
.gsearch-row.on .gsearch-title { color: var(--gold); }
.gsearch-title { font-size: .9rem; font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gsearch-sub { font-size: .72rem; color: var(--text-muted); white-space: nowrap; margin-left: auto; }
.gsearch-empty { padding: 1.1rem; font-size: .82rem; color: var(--text-muted); }

/* Sleek user chip (v2.15) — avatar only; identity and sign-out one click away */
.uchip-wrap { position: relative; display: inline-flex; }
.uchip {
    position: relative; border: none; background: none; padding: 0; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.uchip-avatar {
    width: 57px; height: 57px; font-size: 1.05rem;
    border: 2px solid var(--border);
    transition: border-color .15s ease, box-shadow .15s ease, transform .1s ease;
}
.uchip:hover .uchip-avatar {
    border-color: color-mix(in srgb, var(--gold) 65%, transparent);
    box-shadow: 0 0 14px -4px var(--gold);
    transform: translateY(-1px);
}
.uchip-presence {
    position: absolute; right: -1px; bottom: -1px;
    width: 11px; height: 11px; border-radius: 50%;
    background: var(--st-done);
    border: 2px solid var(--bg-base);
    box-shadow: 0 0 8px -1px var(--st-done);
}
.uchip-scrim { position: fixed; inset: 0; z-index: 200; background: none; border: none; cursor: default; }
.uchip-menu {
    position: absolute; top: calc(100% + 10px); right: 0; z-index: 201;
    min-width: 230px; overflow: hidden;
    background: linear-gradient(180deg, var(--glass-opaque-top), var(--glass-opaque));
    border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-2);
    animation: clg-fade .14s ease;
}
.uchip-menu-head {
    display: flex; align-items: center; gap: .7rem;
    padding: .85rem .95rem .7rem; border-bottom: 1px dashed var(--border);
}
.uchip-menu-avatar { width: 60px; height: 60px; font-size: 1.1rem; }
.uchip-menu-who { display: flex; flex-direction: column; min-width: 0; }
.uchip-menu-who b { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uchip-menu-who small {
    font-size: .64rem; font-weight: 800; letter-spacing: .1em;
    text-transform: uppercase; color: var(--gold);
}
.uchip-signout {
    display: flex; align-items: center; gap: .55rem; width: 100%;
    border: none; background: none; font: inherit; font-size: .84rem; font-weight: 700;
    color: var(--text-muted); padding: .65rem .95rem; cursor: pointer; text-align: left;
    transition: color .15s ease, background .15s ease;
}
.uchip-signout svg { width: 15px; height: 15px; }
.uchip-signout:hover { color: var(--danger); background: var(--danger-soft); }

/* My profile entry (v2.22) — same shape as sign-out, gold on hover */
.uchip-profile {
    display: flex; align-items: center; gap: .55rem; width: 100%;
    font-size: .84rem; font-weight: 700; text-decoration: none;
    color: var(--text-muted); padding: .65rem .95rem;
    transition: color .15s ease, background .15s ease;
}
.uchip-profile svg { width: 15px; height: 15px; }
.uchip-profile:hover { color: var(--gold); background: var(--gold-soft); }

/* /profile (v2.22) — labeled facts + self-serve bubble controls */
.profile-card { max-width: 720px; }
.profile-avatar-val { align-items: center; gap: 1rem; }
.profile-preview { width: 72px; height: 72px; font-size: 1.3rem; flex: none; }
.profile-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.profile-color {
    width: 54px; height: 34px; padding: 2px;
    border: 1px solid var(--border); border-radius: 8px;
    background: var(--glass-soft); cursor: pointer;
}
.profile-card .av-stage { margin-top: 1.1rem; }

/* charts (v2.15) — inline SVG, theme tokens, recessive grids, thin marks */
.charts-grid {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .9rem; margin-bottom: 1.2rem;
}
.chart-card { padding: .9rem 1.05rem; }
.chart-wide { grid-column: 1 / -1; }
.chart-head { display: flex; align-items: baseline; gap: .6rem; margin-bottom: .5rem; flex-wrap: wrap; }
.chart-head b { font-size: .92rem; }
.chart-sub { font-size: .7rem; color: var(--text-muted); }
.chart-legend { margin-left: auto; display: flex; gap: .9rem; }
.lg { display: inline-flex; align-items: center; gap: .35rem; font-size: .72rem; color: var(--text-muted); }
.lg b { color: var(--text); }
.lg-line { width: 16px; height: 2px; display: inline-block; }
.lg-dashed { height: 0; border-top: 2px dashed; background: none !important; }
.lg-dot { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.pulse-svg { width: 100%; height: 190px; display: block; }
.grid-line { stroke: var(--border); stroke-width: 1; }
.grid-dash { stroke-dasharray: 2 4; }
.axis-txt { fill: var(--text-muted); font-size: 10px; }
.donut-row { display: flex; align-items: center; gap: 1rem; }
.donut-svg { width: 128px; height: 128px; flex: none; }
.donut-num { fill: var(--text); font-size: 22px; font-weight: 800; }
.donut-sub { fill: var(--text-muted); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.donut-legend { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.chart-empty { color: var(--text-muted); font-size: .82rem; margin: .6rem 0; }
.chart-foot { font-size: .66rem; color: var(--text-muted); margin: .5rem 0 0; }
.hbars { display: flex; flex-direction: column; gap: .45rem; }
.hbar-row { display: flex; align-items: center; gap: .5rem; }
.hbar-name { font-size: .78rem; font-weight: 700; width: 64px; flex: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-track { flex: 1; height: 10px; border-radius: 5px; background: var(--glass-soft); overflow: hidden; }
.hbar-fill { display: block; height: 100%; border-radius: 5px; min-width: 6px; }
.hbar-gold { background: var(--gold); }
.hbar-val { font-size: .76rem; white-space: nowrap; }
.birds { display: flex; flex-direction: column; gap: .45rem; }
.bird-row { display: flex; align-items: center; gap: .5rem; font-size: .8rem; }
.bird-name { font-weight: 700; width: 64px; flex: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bird-time { color: var(--text-muted); }
.bird-time b { color: var(--text); font-variant-numeric: tabular-nums; }
.bird-wins {
    font-size: .68rem; font-weight: 800; color: var(--gold);
    border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent);
    border-radius: 999px; padding: .05rem .45rem;
}
.bird-seen { margin-left: auto; font-size: .7rem; color: var(--text-muted); white-space: nowrap; }

.handle-hero .handle-num { font-size: 2.3rem; font-weight: 800; color: var(--gold); line-height: 1; }
.handle-hero .handle-sub { font-size: .72rem; color: var(--text-muted); margin-bottom: .7rem; }
.handle-bars { margin-top: .5rem; }
@media (max-width: 900px) {
    .charts-grid { grid-template-columns: 1fr; }
}

.stats-table td, .stats-table th { text-align: center; }
.stats-table td:first-child, .stats-table th:first-child { text-align: left; }
.stats-table .avatar-sm { margin-right: .45rem; vertical-align: middle; }
.stats-strong { font-weight: 800; color: var(--gold); }
.stats-me { background: var(--gold-soft); }

.candid-card {
    margin-top: 1.2rem;
    border-style: dashed;
    border-color: color-mix(in srgb, var(--pr-high) 45%, transparent);
}
.candid-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .6rem; margin-bottom: .3rem; }
.candid-badge {
    font-size: .66rem; font-weight: 800; letter-spacing: .1em; color: var(--pr-high);
    border: 1.5px dashed color-mix(in srgb, var(--pr-high) 55%, transparent);
    border-radius: 999px; padding: .15rem .6rem;
}
.candid-sub { font-size: .7rem; color: var(--text-muted); }
.candid-disclaimer { font-size: .78rem; color: var(--text-muted); margin: .2rem 0 .8rem; max-width: 70ch; }
.candid-bad { color: var(--pr-high); font-weight: 800; }

@media (max-width: 700px) {
    .podium { grid-template-columns: 1fr; }
    .stats-table { display: block; overflow-x: auto; }
}

/* Talking-point inline edit (v2.13) */
.tp-edit-wrap { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.tp-edit-input { flex: 1; min-width: 220px; padding: .4rem .7rem; font-size: .9rem; }

/* Web push opt-in (v2.11) — one honest row at the bottom of the bell panel */
.notify-push {
    display: block; width: 100%; text-align: left;
    border: none; border-top: 1px dashed var(--border); background: none;
    color: var(--text-muted); cursor: pointer;
    font: inherit; font-size: .74rem; font-weight: 700;
    padding: .6rem .9rem .65rem; margin-top: .4rem;
    transition: color .15s ease;
}
.notify-push:hover:not(:disabled) { color: var(--gold); }
.notify-push:disabled { cursor: default; opacity: .7; }

@media (max-width: 700px) {
    /* thumbs, not cursors — and the picker wraps instead of running off-screen */
    .reaction-chip { min-height: 36px; padding: .3rem .85rem; }
    .reaction-add { min-height: 36px; min-width: 44px; }
    .reaction-pick { min-width: 46px; min-height: 46px; }
    .reaction-picker { flex-wrap: wrap; }
    /* anchor the pop and picker to the BAR, not the chip — a mid-row chip would
       shove a 300px flyout off the right edge of a phone */
    .reaction-bar { position: relative; }
    .reaction-chip-wrap, .reaction-add-wrap { position: static; }
    .reaction-pop, .reaction-picker { left: 0; max-width: 100%; }
}
