/* Shared Ops layout styles, moved out of templates/ops/layout.html.twig (2 Nov).
   Linked with ?v= from the layout: bump opsAssetsV there after any change here. */

        /* Two themes, one set of token names. Light is the default (the palette of the
           AKC exec-assistant dock); dark is the original ink + champagne, applied by
           data-theme="dark" on <html>, which the head script sets from localStorage
           before first paint. Page templates must use these tokens, never literals:
           rgba(var(--ink-rgb), a) is the theme-aware overlay (black on light, white
           on dark), and the *-rgb tokens tint the status and accent colours. */
        :root {
            color-scheme: light;
            --bg:           #f6f6f6;
            --panel:        #ffffff;
            --panel2:       #fafafa;
            --border:       rgba(0,0,0,0.08);
            --border2:      rgba(0,0,0,0.13);
            --text:         #1f2328;
            --muted:        #4f555c;
            --dim:          #6a6f76;
            --accent:       #916f33;
            --accent-soft:  rgba(145,111,51,0.11);
            --accent-border: rgba(145,111,51,0.38);
            --accent-deep:  #7f6029;
            --accent-hover: #86662c;
            --accent-active: #735724;
            --accent-ink:   #1f2328;
            --chip:         rgba(0,0,0,0.035);
            --chip-border:  rgba(0,0,0,0.10);
            --shadow:       0 1px 3px rgba(0,0,0,0.06), 0 16px 40px rgba(0,0,0,0.10);
            --shadow-sm:    0 1px 8px rgba(0,0,0,0.06);
            --sidebar:      #fbfbfb;
            --sidebar-top:  #fbfbfb;
            --sidebar-bot:  #f8f8f8;
            --dock-top:     #fbfbfb;
            --dock-bot:     #f8f8f8;
            --skeleton-hi:  #ececec;
            --inset:        rgba(0,0,0,0.025);
            --page-glow:    none;
            --edge-shadow-r: 1px 0 0 rgba(0,0,0,0.06);
            --edge-shadow-l: -1px 0 0 rgba(0,0,0,0.06);
            /* Type: Manrope for everything, figures included (tabular digits so
               they line up). --font-code is only for real code: tool arguments,
               slugs, log lines, keyboard hints. Six sizes; use the tokens. */
            --font-display: 'Manrope', system-ui, -apple-system, sans-serif;
            --font-ui:      'Manrope', system-ui, -apple-system, sans-serif;
            --font-mono:    'Manrope', system-ui, -apple-system, sans-serif;
            --font-code:    'Geist Mono', ui-monospace, monospace;
            --t-xs:         12px;
            --t-sm:         13px;
            --t-md:         14px;
            --t-lg:         16px;
            --t-xl:         20px;
            --t-2xl:        28px;
            --ok:           #2f7d55;
            --danger:       #b4442c;
            --warn:         #9a7636;
            --orange:       #c2621a;
            --info:         #4f5bd5;
            --ink-rgb:      0,0,0;
            --accent-rgb:   145,111,51;
            --ok-rgb:       47,125,85;
            --danger-rgb:   180,68,44;
            --warn-rgb:     154,118,54;
            --orange-rgb:   194,98,26;
            --info-rgb:     79,91,213;
            --on-accent:    #ffffff;
            --on-danger:    #ffffff;
        }

        /* Dark: the OPS-40096 ink + champagne values, kept verbatim from the Mr Rehab
           assistant so the two products still match in dark mode. */
        :root[data-theme="dark"] {
            color-scheme: dark;
            --bg:           #0d0e11;
            --panel:        #16181d;
            --panel2:       #1d2025;
            --border:       rgba(255,255,255,0.07);
            --border2:      rgba(255,255,255,0.14);
            --text:         #ece8e1;
            --muted:        #aba79e;
            --dim:          #8d887d;
            --accent:       #c9a96a;
            --accent-soft:  rgba(201,169,106,0.13);
            --accent-border: rgba(201,169,106,0.34);
            --accent-deep:  #a9884d;
            --accent-hover: #d8bb80;
            --accent-active: #b7975a;
            --accent-ink:   #e9dcc0;
            --chip:         rgba(255,255,255,0.05);
            --chip-border:  rgba(255,255,255,0.10);
            --shadow:       0 2px 8px rgba(0,0,0,0.28), 0 24px 60px rgba(0,0,0,0.45);
            --shadow-sm:    0 2px 14px rgba(0,0,0,0.30);
            --sidebar:      #0a0b0e;
            --sidebar-top:  #17181c;
            --sidebar-bot:  #0e0f12;
            --dock-top:     #141518;
            --dock-bot:     #0c0d10;
            --skeleton-hi:  #272b31;
            --inset:        rgba(0,0,0,0.18);
            --page-glow:    radial-gradient(circle at 20% 0%, rgba(201,169,106,0.06) 0%, transparent 45%), radial-gradient(circle at 80% 100%, rgba(201,169,106,0.035) 0%, transparent 45%);
            --edge-shadow-r: 8px 0 30px rgba(0,0,0,0.35);
            --edge-shadow-l: -8px 0 30px rgba(0,0,0,0.35);
            --ok:           #7bb89a;
            --danger:       #e0715f;
            --warn:         #d9b066;
            --orange:       #fb923c;
            --info:         #818cf8;
            --ink-rgb:      255,255,255;
            --accent-rgb:   201,169,106;
            --ok-rgb:       123,184,154;
            --danger-rgb:   224,113,95;
            --warn-rgb:     217,176,102;
            --orange-rgb:   251,146,60;
            --info-rgb:     129,140,248;
            --on-accent:    #1a150c;
            --on-danger:    #1a0f0c;
        }

        /* Light palettes, chosen in Settings > Appearance (data-light on <html>). The
           base light values above are "Classic"; each palette overrides them. */
        :root:not([data-theme="dark"])[data-light="paper"] {
            --bg: #f7f4ee; --panel: #fffdf9; --panel2: #fbf8f2;
            --border: rgba(60,40,10,0.08); --border2: rgba(60,40,10,0.13);
            --text: #22201c; --muted: #57524a; --dim: #736e65;
            --accent: #94702f; --accent-rgb: 148,112,47; --accent-soft: rgba(148,112,47,0.11); --accent-border: rgba(148,112,47,0.38);
            --accent-deep: #795c27; --accent-hover: #826329; --accent-active: #735725;
            --warn: #94702f; --warn-rgb: 148,112,47;
            --chip: rgba(60,40,10,0.035); --chip-border: rgba(60,40,10,0.10);
            --sidebar: #f9f6f0; --sidebar-top: #f9f6f0; --sidebar-bot: #f5f2ec;
            --dock-top: #f9f6f0; --dock-bot: #f5f2ec;
            --skeleton-hi: #ebe8e2;
        }
        :root:not([data-theme="dark"])[data-light="linen"] {
            --bg: #f1ece3; --panel: #faf7f1; --panel2: #f5f1ea;
            --border: rgba(60,40,10,0.08); --border2: rgba(60,40,10,0.13);
            --text: #25211b; --muted: #5a5348; --dim: #6f685d;
            --accent: #8a6430; --accent-rgb: 138,100,48; --accent-soft: rgba(138,100,48,0.11); --accent-border: rgba(138,100,48,0.38);
            --accent-deep: #715227; --accent-hover: #79582a; --accent-active: #6c4e25;
            --warn: #8a6430; --warn-rgb: 138,100,48;
            --chip: rgba(60,40,10,0.035); --chip-border: rgba(60,40,10,0.10);
            --sidebar: #f4efe7; --sidebar-top: #f4efe7; --sidebar-bot: #f0ebe4;
            --dock-top: #f4efe7; --dock-bot: #f0ebe4;
            --skeleton-hi: #e5e0d8;
        }
        :root:not([data-theme="dark"])[data-light="sand"] {
            --bg: #f4efe6; --panel: #fffcf6; --panel2: #f9f4ea;
            --border: rgba(60,40,10,0.08); --border2: rgba(60,40,10,0.13);
            --text: #2a241b; --muted: #5e5446; --dim: #73695a;
            --accent: #9e6927; --accent-rgb: 158,105,39; --accent-soft: rgba(158,105,39,0.11); --accent-border: rgba(158,105,39,0.38);
            --accent-deep: #8a5c22; --accent-hover: #946325; --accent-active: #835721;
            --warn: #a8702a; --warn-rgb: 168,112,42;
            --chip: rgba(60,40,10,0.035); --chip-border: rgba(60,40,10,0.10);
            --sidebar: #f7f2e8; --sidebar-top: #f7f2e8; --sidebar-bot: #f3eee5;
            --dock-top: #f7f2e8; --dock-bot: #f3eee5;
            --skeleton-hi: #e8e3da;
        }
        :root:not([data-theme="dark"])[data-light="stone"] {
            --bg: #eeeeeb; --panel: #fafaf8; --panel2: #f4f4f2;
            --border: rgba(0,0,0,0.08); --border2: rgba(0,0,0,0.13);
            --text: #222222; --muted: #555552; --dim: #6a6a66;
            --accent: #5d5d58; --accent-rgb: 93,93,88; --accent-soft: rgba(93,93,88,0.11); --accent-border: rgba(93,93,88,0.38);
            --accent-deep: #4c4c48; --accent-hover: #52524d; --accent-active: #494945;
            --warn: #5d5d58; --warn-rgb: 93,93,88;
            --chip: rgba(0,0,0,0.035); --chip-border: rgba(0,0,0,0.10);
            --sidebar: #f3f3f1; --sidebar-top: #f3f3f1; --sidebar-bot: #efefed;
            --dock-top: #f3f3f1; --dock-bot: #efefed;
            --skeleton-hi: #e2e2df;
        }
        :root:not([data-theme="dark"])[data-light="cloud"] {
            --bg: #f2f4f7; --panel: #ffffff; --panel2: #f8f9fb;
            --border: rgba(15,30,60,0.08); --border2: rgba(15,30,60,0.13);
            --text: #1d2430; --muted: #4d5666; --dim: #666e7b;
            --accent: #2f5a8f; --accent-rgb: 47,90,143; --accent-soft: rgba(47,90,143,0.11); --accent-border: rgba(47,90,143,0.38);
            --accent-deep: #274a75; --accent-hover: #294f7e; --accent-active: #254670;
            --warn: #2f5a8f; --warn-rgb: 47,90,143;
            --chip: rgba(15,30,60,0.035); --chip-border: rgba(15,30,60,0.10);
            --sidebar: #f6f7f9; --sidebar-top: #f6f7f9; --sidebar-bot: #f2f3f5;
            --dock-top: #f6f7f9; --dock-bot: #f2f3f5;
            --skeleton-hi: #e6e8eb;
        }
        :root:not([data-theme="dark"])[data-light="sage"] {
            --bg: #f0f3ee; --panel: #fbfcfa; --panel2: #f5f7f3;
            --border: rgba(20,40,20,0.08); --border2: rgba(20,40,20,0.13);
            --text: #1f261f; --muted: #4f5a4f; --dim: #667065;
            --accent: #5a7a4c; --accent-rgb: 90,122,76; --accent-soft: rgba(90,122,76,0.11); --accent-border: rgba(90,122,76,0.38);
            --accent-deep: #4a643e; --accent-hover: #4f6b43; --accent-active: #465f3b;
            --warn: #5a7a4c; --warn-rgb: 90,122,76;
            --chip: rgba(20,40,20,0.035); --chip-border: rgba(20,40,20,0.10);
            --sidebar: #f4f6f2; --sidebar-top: #f4f6f2; --sidebar-bot: #f0f2ee;
            --dock-top: #f4f6f2; --dock-bot: #f0f2ee;
            --skeleton-hi: #e4e7e2;
        }
        :root:not([data-theme="dark"])[data-light="blush"] {
            --bg: #f8f1ef; --panel: #fffaf9; --panel2: #fbf5f3;
            --border: rgba(60,20,10,0.08); --border2: rgba(60,20,10,0.13);
            --text: #2a1f1d; --muted: #5f504c; --dim: #7a6964;
            --accent: #a35746; --accent-rgb: 163,87,70; --accent-soft: rgba(163,87,70,0.11); --accent-border: rgba(163,87,70,0.38);
            --accent-deep: #864739; --accent-hover: #8f4d3e; --accent-active: #7f4437;
            --warn: #a35746; --warn-rgb: 163,87,70;
            --chip: rgba(60,20,10,0.035); --chip-border: rgba(60,20,10,0.10);
            --sidebar: #faf3f1; --sidebar-top: #faf3f1; --sidebar-bot: #f6efed;
            --dock-top: #faf3f1; --dock-bot: #f6efed;
            --skeleton-hi: #ece5e3;
        }
        :root:not([data-theme="dark"])[data-light="mist"] {
            --bg: #f2f1f6; --panel: #ffffff; --panel2: #f8f7fb;
            --border: rgba(30,20,60,0.08); --border2: rgba(30,20,60,0.13);
            --text: #22202a; --muted: #555366; --dim: #6d6a7e;
            --accent: #6a58a6; --accent-rgb: 106,88,166; --accent-soft: rgba(106,88,166,0.11); --accent-border: rgba(106,88,166,0.38);
            --accent-deep: #574888; --accent-hover: #5d4d92; --accent-active: #534581;
            --warn: #6a58a6; --warn-rgb: 106,88,166;
            --chip: rgba(30,20,60,0.035); --chip-border: rgba(30,20,60,0.10);
            --sidebar: #f6f5f9; --sidebar-top: #f6f5f9; --sidebar-bot: #f2f1f5;
            --dock-top: #f6f5f9; --dock-bot: #f2f1f5;
            --skeleton-hi: #e6e5ea;
        }

        /* Dark palettes, chosen in Settings > Appearance (data-palette on <html>, set
           before first paint). Each one overrides the dark values above; the default
           is Graphite. Generated from one table so every palette sets the same tokens. */
        :root[data-theme="dark"][data-palette="graphite"] {
            --bg: #121316; --panel: #1a1c20; --panel2: #202328;
            --border: rgba(255,255,255,0.075); --border2: rgba(255,255,255,0.14);
            --text: #eeece8; --muted: #a8acb3; --dim: #878c94;
            --accent: #d8b46e; --accent-rgb: 216,180,110; --accent-soft: rgba(216,180,110,0.13); --accent-border: rgba(216,180,110,0.38);
            --accent-deep: #b1945a; --accent-hover: #ddbd7f; --accent-active: #c2a263; --accent-ink: #edddbe;
            --chip: rgba(255,255,255,0.05); --chip-border: rgba(255,255,255,0.10);
            --sidebar: #16181b; --sidebar-top: #1d1f22; --sidebar-bot: #16181b;
            --dock-top: #1b1d20; --dock-bot: #101114;
            --skeleton-hi: #2d3035;
            --page-glow: none;
            --ok: #7fc7a0; --ok-rgb: 127,199,160; --danger: #ef7a68; --danger-rgb: 239,122,104;
            --warn: #d8b46e; --warn-rgb: 216,180,110;
            --on-accent: #0e0f12;
        }
        :root[data-theme="dark"][data-palette="warm"] {
            --bg: #141210; --panel: #1c1916; --panel2: #23201c;
            --border: rgba(255,240,220,0.075); --border2: rgba(255,240,220,0.14);
            --text: #f1ebe1; --muted: #b3aa9c; --dim: #91887b;
            --accent: #d9b46a; --accent-rgb: 217,180,106; --accent-soft: rgba(217,180,106,0.13); --accent-border: rgba(217,180,106,0.38);
            --accent-deep: #b29457; --accent-hover: #debd7c; --accent-active: #c3a25f; --accent-ink: #eeddbc;
            --chip: rgba(255,240,220,0.05); --chip-border: rgba(255,240,220,0.10);
            --sidebar: #181613; --sidebar-top: #1f1d1a; --sidebar-bot: #181613;
            --dock-top: #1d1b18; --dock-bot: #12100e;
            --skeleton-hi: #302d2a;
            --page-glow: none;
            --ok: #8cc49f; --ok-rgb: 140,196,159; --danger: #e8826a; --danger-rgb: 232,130,106;
            --warn: #d9b46a; --warn-rgb: 217,180,106;
            --on-accent: #100e0d;
        }
        :root[data-theme="dark"][data-palette="midnight"] {
            --bg: #0c111c; --panel: #131a28; --panel2: #192133;
            --border: rgba(160,190,255,0.075); --border2: rgba(160,190,255,0.14);
            --text: #e8ecf3; --muted: #9ea8ba; --dim: #808aa1;
            --accent: #d9b56f; --accent-rgb: 217,181,111; --accent-soft: rgba(217,181,111,0.13); --accent-border: rgba(217,181,111,0.38);
            --accent-deep: #b2945b; --accent-hover: #debe80; --accent-active: #c3a364; --accent-ink: #eedebe;
            --chip: rgba(160,190,255,0.05); --chip-border: rgba(160,190,255,0.10);
            --sidebar: #0f1522; --sidebar-top: #161c29; --sidebar-bot: #0f1522;
            --dock-top: #141a26; --dock-bot: #0b0f19;
            --skeleton-hi: #272e3f;
            --page-glow: none;
            --ok: #6fcca0; --ok-rgb: 111,204,160; --danger: #f07a6c; --danger-rgb: 240,122,108;
            --warn: #d9b56f; --warn-rgb: 217,181,111;
            --on-accent: #0a0e16;
        }
        :root[data-theme="dark"][data-palette="black"] {
            --bg: #000000; --panel: #111113; --panel2: #18181b;
            --border: rgba(255,255,255,0.075); --border2: rgba(255,255,255,0.14);
            --text: #f5f5f4; --muted: #a3a3a0; --dim: #82827f;
            --accent: #e0bd76; --accent-rgb: 224,189,118; --accent-soft: rgba(224,189,118,0.13); --accent-border: rgba(224,189,118,0.38);
            --accent-deep: #b89b61; --accent-hover: #e4c586; --accent-active: #caaa6a; --accent-ink: #f1e1c1;
            --chip: rgba(255,255,255,0.05); --chip-border: rgba(255,255,255,0.10);
            --sidebar: #0a0a0b; --sidebar-top: #111112; --sidebar-bot: #0a0a0b;
            --dock-top: #0f0f10; --dock-bot: #000000;
            --skeleton-hi: #262629;
            --page-glow: none;
            --ok: #7fd1a5; --ok-rgb: 127,209,165; --danger: #f27b6b; --danger-rgb: 242,123,107;
            --warn: #e0bd76; --warn-rgb: 224,189,118;
            --on-accent: #000000;
        }
        :root[data-theme="dark"][data-palette="dim"] {
            --bg: #1e1f22; --panel: #26282c; --panel2: #2c2e33;
            --border: rgba(255,255,255,0.075); --border2: rgba(255,255,255,0.14);
            --text: #ececea; --muted: #adaeb2; --dim: #95979b;
            --accent: #d6b26c; --accent-rgb: 214,178,108; --accent-soft: rgba(214,178,108,0.13); --accent-border: rgba(214,178,108,0.38);
            --accent-deep: #af9259; --accent-hover: #dbbb7e; --accent-active: #c1a061; --accent-ink: #eddcbd;
            --chip: rgba(255,255,255,0.05); --chip-border: rgba(255,255,255,0.10);
            --sidebar: #222326; --sidebar-top: #292a2d; --sidebar-bot: #222326;
            --dock-top: #26272a; --dock-bot: #1b1c1f;
            --skeleton-hi: #393b3f;
            --page-glow: none;
            --ok: #80c79f; --ok-rgb: 128,199,159; --danger: #ec7b69; --danger-rgb: 236,123,105;
            --warn: #d6b26c; --warn-rgb: 214,178,108;
            --on-accent: #18191b;
        }
        :root[data-theme="dark"][data-palette="slate"] {
            --bg: #15181d; --panel: #1c2027; --panel2: #22272f;
            --border: rgba(200,215,240,0.075); --border2: rgba(200,215,240,0.14);
            --text: #e9ecf1; --muted: #a3abb8; --dim: #888f9c;
            --accent: #d8b46e; --accent-rgb: 216,180,110; --accent-soft: rgba(216,180,110,0.13); --accent-border: rgba(216,180,110,0.38);
            --accent-deep: #b1945a; --accent-hover: #ddbd7f; --accent-active: #c2a263; --accent-ink: #edddbe;
            --chip: rgba(200,215,240,0.05); --chip-border: rgba(200,215,240,0.10);
            --sidebar: #181b21; --sidebar-top: #1f2228; --sidebar-bot: #181b21;
            --dock-top: #1d2025; --dock-bot: #13161a;
            --skeleton-hi: #2f343b;
            --page-glow: none;
            --ok: #79c9a0; --ok-rgb: 121,201,160; --danger: #ee7a6a; --danger-rgb: 238,122,106;
            --warn: #d8b46e; --warn-rgb: 216,180,110;
            --on-accent: #111317;
        }
        :root[data-theme="dark"][data-palette="forest"] {
            --bg: #0f1412; --panel: #151c19; --panel2: #1b231f;
            --border: rgba(210,240,225,0.075); --border2: rgba(210,240,225,0.14);
            --text: #ebefe9; --muted: #a6b0aa; --dim: #818d85;
            --accent: #d7b46c; --accent-rgb: 215,180,108; --accent-soft: rgba(215,180,108,0.13); --accent-border: rgba(215,180,108,0.38);
            --accent-deep: #b09459; --accent-hover: #dcbd7e; --accent-active: #c2a261; --accent-ink: #edddbd;
            --chip: rgba(210,240,225,0.05); --chip-border: rgba(210,240,225,0.10);
            --sidebar: #121815; --sidebar-top: #191f1c; --sidebar-bot: #121815;
            --dock-top: #171d1a; --dock-bot: #0e1210;
            --skeleton-hi: #29302c;
            --page-glow: none;
            --ok: #86cfa3; --ok-rgb: 134,207,163; --danger: #ea7d69; --danger-rgb: 234,125,105;
            --warn: #d7b46c; --warn-rgb: 215,180,108;
            --on-accent: #0c100e;
        }
        :root[data-theme="dark"][data-palette="espresso"] {
            --bg: #15100d; --panel: #1e1713; --panel2: #251d18;
            --border: rgba(255,225,200,0.075); --border2: rgba(255,225,200,0.14);
            --text: #f2e9e1; --muted: #b9a99b; --dim: #968472;
            --accent: #d8925e; --accent-rgb: 216,146,94; --accent-soft: rgba(216,146,94,0.13); --accent-border: rgba(216,146,94,0.38);
            --accent-deep: #b1784d; --accent-hover: #dd9f71; --accent-active: #c28355; --accent-ink: #edceb7;
            --chip: rgba(255,225,200,0.05); --chip-border: rgba(255,225,200,0.10);
            --sidebar: #19130f; --sidebar-top: #201a16; --sidebar-bot: #19130f;
            --dock-top: #1e1814; --dock-bot: #130e0c;
            --skeleton-hi: #322b26;
            --page-glow: none;
            --ok: #8fc6a0; --ok-rgb: 143,198,160; --danger: #ec7864; --danger-rgb: 236,120,100;
            --warn: #d8925e; --warn-rgb: 216,146,94;
            --on-accent: #110d0a;
        }
        :root[data-theme="dark"][data-palette="plum"] {
            --bg: #130f15; --panel: #1b161e; --panel2: #221c26;
            --border: rgba(240,220,255,0.075); --border2: rgba(240,220,255,0.14);
            --text: #efe9f1; --muted: #afa5b4; --dim: #8e8494;
            --accent: #e2c48d; --accent-rgb: 226,196,141; --accent-soft: rgba(226,196,141,0.13); --accent-border: rgba(226,196,141,0.38);
            --accent-deep: #b9a174; --accent-hover: #e5cb9b; --accent-active: #cbb07f; --accent-ink: #f2e4cc;
            --chip: rgba(240,220,255,0.05); --chip-border: rgba(240,220,255,0.10);
            --sidebar: #161219; --sidebar-top: #1d1920; --sidebar-bot: #161219;
            --dock-top: #1b171e; --dock-bot: #110e13;
            --skeleton-hi: #2f2a33;
            --page-glow: none;
            --ok: #86cba3; --ok-rgb: 134,203,163; --danger: #ef7d70; --danger-rgb: 239,125,112;
            --warn: #e2c48d; --warn-rgb: 226,196,141;
            --on-accent: #0f0c11;
        }
        :root[data-theme="dark"][data-palette="ink"] {
            --bg: #101112; --panel: #18191b; --panel2: #1e1f22;
            --border: rgba(255,255,255,0.075); --border2: rgba(255,255,255,0.14);
            --text: #f0f0ef; --muted: #a9a9a7; --dim: #898986;
            --accent: #d9dadc; --accent-rgb: 217,218,220; --accent-soft: rgba(217,218,220,0.13); --accent-border: rgba(217,218,220,0.38);
            --accent-deep: #b2b3b4; --accent-hover: #dedee0; --accent-active: #c3c4c6; --accent-ink: #eeeeef;
            --chip: rgba(255,255,255,0.05); --chip-border: rgba(255,255,255,0.10);
            --sidebar: #141516; --sidebar-top: #1b1c1d; --sidebar-bot: #141516;
            --dock-top: #191a1b; --dock-bot: #0e0f10;
            --skeleton-hi: #2c2c2f;
            --page-glow: none;
            --ok: #7fcb9f; --ok-rgb: 127,203,159; --danger: #ef7a68; --danger-rgb: 239,122,104;
            --warn: #d9dadc; --warn-rgb: 217,218,220;
            --on-accent: #0d0e0e;
        }
        :root[data-theme="dark"][data-palette="olive"] {
            --bg: #131410; --panel: #1b1c17; --panel2: #21231c;
            --border: rgba(240,240,210,0.075); --border2: rgba(240,240,210,0.14);
            --text: #eeede4; --muted: #adac9e; --dim: #8b8b7e;
            --accent: #cfae62; --accent-rgb: 207,174,98; --accent-soft: rgba(207,174,98,0.13); --accent-border: rgba(207,174,98,0.38);
            --accent-deep: #aa8f50; --accent-hover: #d5b875; --accent-active: #ba9d58; --accent-ink: #e9dbb8;
            --chip: rgba(240,240,210,0.05); --chip-border: rgba(240,240,210,0.10);
            --sidebar: #161712; --sidebar-top: #1d1e19; --sidebar-bot: #161712;
            --dock-top: #1b1c17; --dock-bot: #11120e;
            --skeleton-hi: #2e302a;
            --page-glow: none;
            --ok: #8ec99c; --ok-rgb: 142,201,156; --danger: #e87d66; --danger-rgb: 232,125,102;
            --warn: #cfae62; --warn-rgb: 207,174,98;
            --on-accent: #0f100d;
        }
        :root[data-theme="dark"][data-palette="sand"] {
            --bg: #1a1714; --panel: #221e1a; --panel2: #29241f;
            --border: rgba(255,235,210,0.075); --border2: rgba(255,235,210,0.14);
            --text: #f1ebe2; --muted: #b6ab9d; --dim: #968c80;
            --accent: #dcb873; --accent-rgb: 220,184,115; --accent-soft: rgba(220,184,115,0.13); --accent-border: rgba(220,184,115,0.38);
            --accent-deep: #b4975e; --accent-hover: #e0c184; --accent-active: #c6a668; --accent-ink: #efdfc0;
            --chip: rgba(255,235,210,0.05); --chip-border: rgba(255,235,210,0.10);
            --sidebar: #1d1a16; --sidebar-top: #24211d; --sidebar-bot: #1d1a16;
            --dock-top: #221f1b; --dock-bot: #171512;
            --skeleton-hi: #36312c;
            --page-glow: none;
            --ok: #8cc8a0; --ok-rgb: 140,200,160; --danger: #ea806b; --danger-rgb: 234,128,107;
            --warn: #dcb873; --warn-rgb: 220,184,115;
            --on-accent: #151210;
        }

        * {
            box-sizing: border-box;
        }

        /* Global form element reset — prevents browser-default white backgrounds */
        input, select, textarea, button {
            color-scheme: inherit;
        }

        input:not([type="range"]):not([type="checkbox"]):not([type="radio"]):not([type="color"]),
        select,
        textarea {
            background-color: var(--panel);
            color: var(--text);
            border: 1px solid var(--border);
            font-family: inherit;
        }

        input:not([type="range"]):not([type="checkbox"]):not([type="radio"]):not([type="color"]):focus,
        select:focus,
        textarea:focus {
            outline: none;
            border-color: var(--accent);
            background-color: var(--panel2);
        }

        /* Unified dropdown styling — applies to every <select> unless explicitly overridden */
        select {
            appearance: none;
            -webkit-appearance: none;
            -moz-appearance: none;
            background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23aba79e' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='3 4.5 6 7.5 9 4.5'/%3e%3c/svg%3e");
            background-repeat: no-repeat;
            background-position: right 10px center;
            background-size: 10px 10px;
            padding-right: 28px;
            cursor: pointer;
        }
        select:hover {
            border-color: var(--border2);
        }
        select::-ms-expand { display: none; }

        /* Force opened option list to render dark (Firefox + Chromium honour this) */
        select option,
        select optgroup {
            background-color: var(--panel);
            color: var(--text);
        }
        select option:checked,
        select option:hover {
            background-color: var(--accent-soft);
            color: var(--text);
        }
        select option:disabled {
            color: var(--muted);
        }

        body {
            margin: 0;
            font-family: var(--font-ui);
            background: var(--bg);
            color: var(--text);
            -webkit-font-smoothing: antialiased;
            text-rendering: optimizeLegibility;
            font-variant-numeric: tabular-nums;
        }

        body::before {
            content: "";
            position: fixed;
            inset: 0;
            /* OPS-40096: single champagne light source, matching Mr Rehab. The old
               pair mixed orange with an unrelated indigo, which is what made the
               background read as a different product. */
            background-image: var(--page-glow);
            z-index: -1;
            transform: translateZ(0);
            will-change: transform;
            pointer-events: none;
        }

        /* While scrolling, no pointer events, so hovering doesn't repaint as cards pass under the cursor.
           2 Nov: one inherited property on body instead of restyling every element; the orbs
           spin on the compositor now, so they no longer need pausing here. */
        html.is-scrolling body { pointer-events: none; }

        /* Honor user's reduced-motion preference */
        @media (prefers-reduced-motion: reduce) {
            *, *::before, *::after {
                transition-duration: 0.01ms !important;
                animation-duration: 0.01ms !important;
            }
        }

        .app {
            --sb-w: 246px;
            display: grid;
            grid-template-columns: auto 1fr;
            min-height: 100vh;
        }

        /* ─── Sidebar ─────────────────────────────────── */

        .sidebar {
            width: var(--sb-w);
            background: linear-gradient(180deg, var(--sidebar-top) 0%, var(--sidebar-bot) 100%);
            border-right: 1px solid var(--border);
            padding: 18px 14px 16px;
            display: flex;
            flex-direction: column;
            gap: 4px;
            transition: width 0.25s ease, padding 0.25s ease;
            position: sticky;
            top: 0;
            height: 100vh;
            overflow-y: auto;
            overflow-x: hidden;
            box-shadow: var(--edge-shadow-r);
            /* Sticky makes the sidebar its own layer, so the collapse arrow (70) and the
               collapsed flyout (80) inside it could never rise above the page: a card's
               SQL logo covered the flyout and a page frame half-covered the arrow (18 Nov).
               Above page content, below the inbox scrim (88) and every dialog (300+). */
            z-index: 60;
        }

        .profile {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 11px;
            padding: 8px 6px 15px;
            margin-bottom: 6px;
            border-bottom: 1px solid var(--border);
            flex-shrink: 0;
        }

        /* Workspace brand mark in the sidebar header */
        .profile .workspace-logo {
            height: 22px;
            width: auto;
            max-width: 78%;
            object-fit: contain;
            display: block;
            transition: height 0.2s ease, max-width 0.25s ease;
        }
        /* Width-led when collapsed, so the whole mark always fits the 42px rail
           instead of being squeezed into a fixed-height box. */
        .app.sidebar-collapsed .profile .workspace-logo {
            height: auto;
            width: 100%;
            max-width: 40px;
        }
        .profile { min-width: 0; }
        .profile .workspace-logo.logo-dark { display: none; }
        :root[data-theme="dark"] .profile .workspace-logo.logo-light { display: none; }
        :root[data-theme="dark"] .profile .workspace-logo.logo-dark { display: block; }
        /* The workspace logo (Settings > Appearance): an uploaded logo is sized by its shape
           (--logo-h from Brand::height, 28 to 56px), the name-only mark is set in type and
           folds to its initials on the collapsed rail. */
        .profile .workspace-logo.brand-own { height: var(--logo-h, 28px); max-width: 84%; }
        .profile .brand-name { height: auto; max-width: 88%; display: flex; align-items: center; justify-content: center; font-size: 15.5px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.2; color: var(--text); white-space: nowrap; }
        .profile .brand-name .bn-full { overflow: hidden; text-overflow: ellipsis; }
        .profile .brand-name .bn-short { display: none; }
        .app.sidebar-collapsed .profile .brand-name { width: 34px; height: 34px; max-width: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-size: 12.5px; letter-spacing: 0.02em; }
        .app.sidebar-collapsed .profile .brand-name .bn-full { display: none; }
        .app.sidebar-collapsed .profile .brand-name .bn-short { display: block; }

        .avatar {
            width: 38px;
            height: 38px;
            /* Squircle, not a circle, and champagne on dark ink. Matches Mr Rehab. */
            border-radius: 12px;
            background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
            color: var(--on-accent);
            font-family: var(--font-display);
            font-weight: 600;
            display: grid;
            place-items: center;
            font-size: var(--t-lg);
            line-height: 1;
            flex-shrink: 0;
            box-shadow: 0 4px 14px rgba(var(--accent-rgb),0.25);
        }

        .nav {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        /* OPS-40096: hero nav item with the animated orb, ported verbatim from
           Mr Rehab. This is the single most recognisable object in his sidebar,
           so Ops looked like a different product without it. The orb is pure CSS
           (layered conic-gradients on an animated @property angle) and honours
           prefers-reduced-motion. */
        /* Adam — hero nav item */
        .nav-hero {
            margin-bottom: 6px;
            padding: 11px 12px;
            border-radius: 13px;
            background: linear-gradient(135deg, rgba(var(--accent-rgb),0.17), rgba(var(--accent-rgb),0.045));
            border: 1px solid var(--accent-border);
        }
        .nav-hero:hover {
            background: linear-gradient(135deg, rgba(var(--accent-rgb),0.24), rgba(var(--accent-rgb),0.07));
            color: var(--text);
        }
        /* Siri-style animated orb (gold theme), Adam's living mark.
           Ported from the React/Tailwind SiriOrb into plain CSS.
           2 Nov: the gradients are static and two layers spin at different
           speeds with transform only, so the browser rotates a cached picture
           instead of repainting six gradients plus a filter every frame. */
        .siri-orb {
            --c1: oklch(82% 0.10 88);
            --c2: oklch(90% 0.06 96);
            --c3: oklch(66% 0.11 60);
            --siri-blur: 6px;
            --siri-contrast: 1.9;
            --siri-duration: 180s;
            display: grid;
            grid-template-areas: "stack";
            overflow: hidden;
            border-radius: 50%;
            position: relative;
            flex-shrink: 0;
            background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 30%, transparent 70%);
        }
        .siri-orb::before, .siri-orb::after {
            content: "";
            display: block;
            grid-area: stack;
            width: 100%;
            height: 100%;
            border-radius: 50%;
            filter: blur(var(--siri-blur)) contrast(var(--siri-contrast)) saturate(1.3);
            animation: siri-spin calc(var(--siri-duration) / 8) linear infinite;
            /* --orbs pauses from outside (inbox moving, scrolling); --orb-idle pauses small resting orbs. */
            animation-play-state: var(--orbs, var(--orb-idle, running));
            will-change: transform;
        }
        .siri-orb::before {
            background:
                conic-gradient(from 0deg at 30% 65%, var(--c3) 0deg, transparent 45deg 315deg, var(--c3) 360deg),
                conic-gradient(from 210deg at 65% 75%, var(--c1) 0deg, transparent 90deg 270deg, var(--c1) 360deg),
                conic-gradient(from 120deg at 80% 80%, var(--c1) 0deg, transparent 45deg 315deg, var(--c1) 360deg),
                radial-gradient(ellipse 120% 80% at 40% 60%, var(--c3) 0%, transparent 50%);
        }
        /* Second layer turns the other way at another speed, so the colours keep
           sliding over each other; it also carries the soft highlight. */
        .siri-orb::after {
            background:
                radial-gradient(circle at 45% 55%, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0.05) 30%, transparent 60%),
                conic-gradient(from 90deg at 70% 35%, var(--c2) 0deg, transparent 60deg 300deg, var(--c2) 360deg),
                conic-gradient(from 300deg at 25% 25%, var(--c2) 0deg, transparent 30deg 330deg, var(--c2) 360deg);
            animation-duration: calc(var(--siri-duration) / 11);
            animation-direction: reverse;
        }
        @keyframes siri-spin {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }
        /* 2 Nov: small orbs (32px and under) rest until hovered or active. */
        .nav-hero .hero-orb, .ops-ibx-ag .siri-orb, .adock-chan .siri-orb, .adock-rail-agent .siri-orb, .adock-rail .adock-orb { --orb-idle: paused; }
        .nav-hero:is(:hover, .active) .hero-orb, .ops-ibx-ag:is(:hover, .on) .siri-orb, .adock-chan button:is(:hover, .on) .siri-orb,
        .adock-rail-agent:hover .siri-orb, .adock-rail-btn:hover .adock-orb, .adock-rail .adock-orb.busy { --orb-idle: running; }
        /* /assistant freezes older reply orbs by hiding ::before; keep only the highlight on the second layer there. */
        .message.assistant:not(.msg-latest) .msg-avatar.msg-orb::after {
            background: radial-gradient(circle at 45% 55%, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0.05) 30%, transparent 60%);
            animation: none;
        }
        @media (prefers-reduced-motion: reduce) {
            .siri-orb::before, .siri-orb::after { animation: none; }
        }
        .nav-hero .hero-orb { width: 32px; height: 32px; --siri-blur: 3.5px; --siri-contrast: 1.7; box-shadow: 0 3px 12px rgba(var(--accent-rgb),0.30); }
        .nav-hero .hero-label { display: flex; flex-direction: column; gap: 2px; }
        .nav-hero .hero-name { font-size: var(--t-md); color: var(--text); font-weight: 600; line-height: 1.15; letter-spacing: 0.01em; }
        .nav-hero .hero-sub { font-size: 10.5px; color: var(--accent); text-transform: uppercase; letter-spacing: 0.03em; white-space: nowrap; }

        .nav-section {
            margin: 13px 0 4px;
            font-size: var(--t-xs);
            color: var(--dim);
            font-weight: 700;
            padding: 0 12px;
            white-space: nowrap;
            overflow: hidden;
            transition: opacity 0.2s ease, max-height 0.25s ease;
        }

        .nav-item {
            display: flex;
            align-items: center;
            gap: 10px;
            text-decoration: none;
            color: var(--muted);
            padding: 8px 12px;
            border-radius: 10px;
            font-size: var(--t-sm);
            font-weight: 500;
            white-space: nowrap;
            border: 1px solid transparent;
            position: relative;
            transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
        }

        .nav-icon {
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            width: 18px;
            height: 18px;
        }

        .nav-icon svg {
            width: 16px;
            height: 16px;
            stroke-width: 1.8;
        }

        /* Sub-navigation: a page's sections (Planning projects, Work and Money tabs)
           nested under its sidebar item, expanded by default, foldable per group.
           Collapsed sidebar: shown as a small menu beside the icon on hover. */
        /* OPS-42670: hidden numbers. Every amount is drawn through window.opsHide inside
           .ops-num; while hidden it holds a placeholder, blurred. */
        .ops-num { transition: filter .2s ease; }
        html.ops-hide .ops-num { filter: blur(7px); user-select: none; }
        html.ops-hide input.ops-num-in { filter: blur(6px); }
        /* 22 Oct: every other number on screen too (opsHide.sweep): counts, scores, stats,
           numbers inside messages. Dates, times and codes stay readable. */
        html.ops-hide .ops-num-auto { filter: blur(5px); user-select: none; }
        html.ops-hide input[type="number"] { filter: blur(6px); }
        .nav-hide { flex: none; width: 100%; margin-top: 8px; border: 1px solid transparent; background: none; font-family: inherit; font-size: var(--t-sm); line-height: inherit; text-align: left; cursor: pointer; }
        .nav-hide .nav-label { display: flex; align-items: center; flex: 1; min-width: 0; }
        .nav-hide .when-on, html.ops-hide .nav-hide .when-off { display: none; }
        html.ops-hide .nav-hide .when-on { display: inline; }
        html.ops-hide .nav-hide svg.when-on { display: block; }
        html.ops-hide .nav-hide { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-border); }
        html.ops-hide .nav-hide .nav-label { color: var(--accent); }
        .ops-hide-btn svg { width: 14px; height: 14px; }
        .nav-grp { position: relative; }
        .nav-fold { position: absolute; right: 4px; top: 6px; width: 24px; height: 24px; border: 0; background: none; border-radius: 6px; color: var(--dim); cursor: pointer; display: grid; place-items: center; opacity: .7; }
        .nav-fold:hover { background: rgba(var(--ink-rgb),0.05); color: var(--text); opacity: 1; }
        .nav-fold svg { width: 14px; height: 14px; transition: transform .15s; }
        .nav-grp.folded .nav-fold svg { transform: rotate(-90deg); }
        .nav-grp .nav-item { padding-right: 30px; }
        .nav-grp .nav-item .nav-badge { margin-right: 4px; }
        .nav-sub { display: grid; gap: 1px; margin: 2px 0 6px 21px; padding-left: 9px; border-left: 1px solid var(--border); }
        .nav-sub:empty, .nav-grp.folded .nav-sub { display: none; }
        .nav-subgrp { font-size: 11px; font-weight: 600; color: var(--dim); padding: 7px 8px 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .nav-subitem { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; text-decoration: none; color: var(--muted); font-size: var(--t-sm); padding: 5px 8px; border-radius: 8px; }
        .nav-subitem:hover { background: rgba(var(--ink-rgb),0.04); color: var(--text); }
        .nav-subitem.active { background: var(--panel); color: var(--text); font-weight: 600; box-shadow: inset 0 0 0 1px var(--border2); }
        .nav-subitem .pd { width: 8px; height: 8px; border-radius: 3px; }
        .nav-subitem:not(:has(.pd)) { grid-template-columns: minmax(0, 1fr) auto; }
        .nav-subitem .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .nav-subitem .ct { font-size: 11.5px; color: var(--dim); display: inline-flex; gap: 6px; font-variant-numeric: tabular-nums; }
        .nav-subitem .ct .late, .nav-subitem .ct.late { color: var(--danger); font-weight: 600; }
        /* Counts are labelled ("2 late", "4 open") so they never read as part of
           the name beside them ("Phase 1" then "44"). */
        .nav-subitem .ct .lbl { color: var(--dim); font-weight: 400; }
        .nav-submore { border: 0; background: none; font-family: var(--font-ui); font-size: 12px; font-weight: 600; color: var(--accent); padding: 5px 8px; cursor: pointer; text-align: left; }
        .app.sidebar-collapsed .nav-fold { display: none; }
        .app.sidebar-collapsed .nav-grp .nav-item { padding-right: 12px; }
        .app.sidebar-collapsed .nav-sub { display: none; }
        /* Collapsed sidebar menu: a card with the group's name and its pages as icon
           tiles (mockup C, approved 18 Nov). Icons and header show only here. */
        .nav-subitem .ic, .nav-sub-hd { display: none; }
        .app.sidebar-collapsed .nav-grp.fly .nav-sub:not(:empty) { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; position: fixed; z-index: 80; margin: 0; padding: 0 10px 10px; width: 300px; max-height: 70vh; overflow-y: auto; background: var(--panel); border: 1px solid var(--border2); border-radius: 16px; box-shadow: 0 18px 44px rgba(40,28,8,.16), 0 2px 6px rgba(40,28,8,.08); }
        .app.sidebar-collapsed .nav-grp.fly .nav-sub-hd { display: flex; align-items: center; gap: 10px; grid-column: 1 / -1; margin: 0 -10px 4px; padding: 12px 14px; background: var(--panel2); border-bottom: 1px solid var(--border); font-weight: 600; font-size: var(--t-sm); color: var(--text); }
        .app.sidebar-collapsed .nav-grp.fly .nav-sub-hd .ic { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); }
        .app.sidebar-collapsed .nav-grp.fly .nav-sub-hd .ic svg { width: 15px; height: 15px; }
        .app.sidebar-collapsed .nav-grp.fly .nav-sub-hd .n { margin-left: auto; font-size: 11.5px; font-weight: 500; color: var(--dim); font-variant-numeric: tabular-nums; }
        .app.sidebar-collapsed .nav-grp.fly .nav-subitem { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 7px; padding: 12px 4px 10px; border: 1px solid transparent; border-radius: 11px; font-size: 12px; text-align: center; }
        .app.sidebar-collapsed .nav-grp.fly .nav-subitem .ic { display: block; line-height: 0; }
        .app.sidebar-collapsed .nav-grp.fly .nav-subitem .ic svg { width: 18px; height: 18px; }
        .app.sidebar-collapsed .nav-grp.fly .nav-subitem .nm { white-space: normal; overflow-wrap: anywhere; }
        .app.sidebar-collapsed .nav-grp.fly .nav-subitem .ct { display: none; }
        .app.sidebar-collapsed .nav-grp.fly .nav-subitem:hover { background: var(--panel2); color: var(--text); border-color: var(--border); }
        .app.sidebar-collapsed .nav-grp.fly .nav-subitem.active { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-border); box-shadow: none; font-weight: 600; }

        /* OPS-41974: the Work item's loose-ends count. Hidden until there is one. */
        .nav-badge {
            margin-left: auto;
            font-family: var(--font-mono);
            font-size: var(--t-xs);
            color: var(--danger);
            font-variant-numeric: tabular-nums;
        }

        .nav-label {
            transition: opacity 0.2s ease, max-width 0.25s ease;
            max-width: 160px;
            overflow: hidden;
        }

        .nav-item:hover {
            background: rgba(var(--ink-rgb),0.04);
            color: var(--text);
        }

        .nav-item.active {
            background: var(--accent-soft);
            color: var(--accent-ink);
            font-weight: 600;
        }

        .nav-item.active::before {
            content: "";
            position: absolute;
            left: 3px;
            top: 50%;
            transform: translateY(-50%);
            width: 3px;
            height: 18px;
            border-radius: 999px;
            background: var(--accent);
        }

        .nav-item.active .nav-icon svg {
            stroke: var(--accent);
        }

        .nav-item:hover .nav-icon svg {
            stroke: var(--text);
        }
        /* Adam hero keeps its identity even when it is the active page */
        .nav-hero.active {
            background: linear-gradient(135deg, rgba(var(--accent-rgb),0.24), rgba(var(--accent-rgb),0.07));
        }
        .nav-hero.active::before { display: none; }

        /* ─── Signed-in person (sidebar foot) ─────────── */

        .nav-me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 10px 4px; border-top: 1px solid var(--border); }
        .nav-av { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: var(--t-xs); font-weight: 700; color: var(--accent); background: var(--accent-soft); }
        .nav-me .nav-label { display: flex; flex-direction: column; min-width: 0; }
        .nav-me .nm { font-size: var(--t-sm); font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .nav-me .out { font-size: var(--t-xs); color: var(--dim); text-decoration: none; }
        .nav-me .out:hover { color: var(--accent); }

        /* ─── Main content ────────────────────────────── */

        .main {
            padding: 28px 48px 48px;
            min-width: 0;
        }

        /* ─── Sidebar toggle ──────────────────────────── */

        /* A small round arrow on the sidebar's edge, halfway down the screen, so it is
           always in reach however long the sidebar lists get. It follows the edge as
           the sidebar collapses (--sb-w, 246px unless dragged / 62px). */
        .sidebar-toggle {
            position: fixed;
            top: 50%;
            left: calc(var(--sb-w) - 12px);
            transform: translateY(-50%);
            z-index: 70;
            width: 24px;
            height: 24px;
            padding: 0;
            border-radius: 999px;
            border: 1px solid var(--border2);
            background: var(--panel);
            color: var(--muted);
            display: grid;
            place-items: center;
            cursor: pointer;
            box-shadow: 0 1px 4px rgba(0,0,0,0.12);
            transition: left 0.25s ease, color 0.15s, border-color 0.15s, background 0.15s;
        }

        .sidebar-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

        .sidebar-toggle:hover {
            color: var(--accent);
            border-color: var(--accent-border);
            background: var(--accent-soft);
        }

        .sidebar-toggle svg {
            width: 14px;
            height: 14px;
            transition: transform 0.25s ease;
            flex-shrink: 0;
        }

        /* ─── Resize handles (opsResizer in layout-pre.js) ──── */

        /* A thin strip on a column's edge: drag to resize, double-click to reset.
           The line shows on hover so the edge reads as something you can grab. */
        .ops-grip { position: absolute; top: 0; right: -4px; width: 8px; height: 100%; cursor: col-resize; z-index: 5; touch-action: none; }
        .ops-grip::after { content: ""; position: absolute; top: 0; bottom: 0; left: 3px; width: 2px; background: transparent; transition: background .15s; }
        .ops-grip:hover::after, .ops-grip:focus-visible::after, .ops-grip.on::after { background: var(--accent); }
        .ops-grip:focus-visible { outline: none; }
        /* The sidebar scrolls, so its handle is fixed to the screen like the toggle,
           and sits just under the toggle so the arrow stays clickable. */
        .sb-grip { position: fixed; left: calc(var(--sb-w) - 4px); right: auto; height: 100vh; z-index: 65; }
        .app.sidebar-collapsed .sb-grip { display: none; }
        html.ops-resizing, html.ops-resizing * { cursor: col-resize !important; user-select: none !important; }
        html.ops-resizing .sidebar, html.ops-resizing .sidebar-toggle, html.ops-resizing .assistant-layout { transition: none !important; }

        /* ─── Collapsed sidebar ───────────────────────── */

        .app.sidebar-collapsed .sidebar {
            padding: 20px 10px;
            width: 62px;
        }

        .app.sidebar-collapsed .profile {
            justify-content: center;
            padding: 4px 0 14px;
            margin-bottom: 4px;
        }

        .app.sidebar-collapsed .nav-item {
            justify-content: center;
            gap: 0;
            padding: 9px;
        }

        .app.sidebar-collapsed .nav-item.active {
            padding-left: 9px;
        }

        .app.sidebar-collapsed .nav-item.active::before {
            display: none;
        }

        /* Collapsed, the "46 to fix" text has no room, so it becomes a red dot on
           the icon rather than disappearing. The full count is in the tooltip. */
        .app.sidebar-collapsed .nav-badge:not([hidden]) {
            position: absolute; top: 5px; right: 7px; margin: 0;
            width: 7px; height: 7px; border-radius: 50%;
            background: var(--danger); font-size: 0; overflow: hidden;
        }

        .app.sidebar-collapsed .nav-label {
            opacity: 0;
            max-width: 0;
        }

        .app.sidebar-collapsed .nav-section {
            opacity: 0;
            max-height: 0;
            overflow: hidden;
            padding: 0;
            margin: 0;
        }

        .app.sidebar-collapsed .sidebar-toggle {
            left: calc(62px - 12px);
        }

        .app.sidebar-collapsed .sidebar-toggle svg {
            transform: rotate(180deg);
        }

        /* ─── Page title (Linear-grade rhythm) ─────────── */

        .page-title {
            margin: 8px 0 28px;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .page-kicker {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            color: var(--accent);
            font-size: var(--t-xs);
            font-weight: 700;
        }

        /* Loading placeholders (OPS-41798), the same on every page. One shimmer in
           the shapes pages actually have, so a page fills with its own outline while
           its data is on the way instead of a "Loading..." line. Drawn by
           opsSkeleton() or by data-skeleton="kind[:count]" on an empty element. */
        /* A slow, wide sweep that loops without a visible jump (the band starts and
           ends off the bar), and real content fades in over it instead of snapping. */
        @keyframes ops-shim { 0% { background-position: 100% 0; } 100% { background-position: 0% 0; } }
        @keyframes ops-reveal { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
        /* 2 Nov: a placeholder only shows once loading passes 300ms, so a quick load never flashes one. */
        .ops-skel { pointer-events: none; animation: ops-reveal .25s ease .3s both; }
        .ops-skel .sk, .sk.ops-sk { display: block; border-radius: 6px; background: linear-gradient(100deg, rgba(var(--ink-rgb), .055) 40%, rgba(var(--ink-rgb), .10) 50%, rgba(var(--ink-rgb), .055) 60%); background-size: 300% 100%; animation: ops-shim 1.6s ease-in-out infinite; }
        .sk.ops-sk:not(.ops-skel .sk) { animation: ops-shim 1.6s ease-in-out infinite, ops-reveal .25s ease .3s both; }
        .ops-reveal > * { animation: ops-reveal .28s ease both; }
        .sk.ops-sk { display: inline-block; vertical-align: middle; }
        .ops-skel .sk.pill { border-radius: 999px; }
        .ops-skel.row { padding: 14px 0; border-bottom: 1px solid var(--border); }
        .ops-skel.card { padding: 16px; border: 1px solid var(--border); border-radius: 12px; margin-bottom: 10px; }
        .ops-skel.lines { display: grid; gap: 10px; padding: 4px 0; }
        .ops-skel .ops-tool .sk { flex: none; }
        @media (prefers-reduced-motion: reduce) { .ops-skel, .ops-skel .sk, .sk.ops-sk, .ops-reveal > * { animation: none; } }

        .page-title-row {
            display: flex;
            align-items: flex-end;
            justify-content: space-between;
            gap: 24px;
            flex-wrap: wrap;
        }

        /* The page title, and nothing else in the header: large and light, the
           same on every page. Pages with their own header markup use .ops-title. */
        .page-title h1 {
            margin: 0;
            font-family: var(--font-ui);
            font-size: 44px;
            font-weight: 300;
            letter-spacing: -0.04em;
            line-height: 1;
            color: var(--text);
            padding: 0;
            border: 0;
            text-wrap: balance;
        }
        @media (max-width: 640px) {
            .page-title h1 { font-size: 34px; }
        }
        /* The section you are on, beside the page title (Work, Money). */
        .ops-title-sub { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; color: var(--muted); margin-left: 10px; vertical-align: middle; }
        .ops-title-sub:empty { display: none; }
        /* Section switchers inside a page are for small screens only, where the
           sidebar that normally holds them is hidden. */
        .sidebar-only-hide { display: none !important; }
        @media (max-width: 980px) { .sidebar-only-hide { display: flex !important; } }

        .page-title p {
            margin: 8px 0 0;
            color: var(--muted);
            font-size: var(--t-md);
            line-height: 1.5;
            padding: 0;
            max-width: 56ch;
        }

        /* ─── Page header ─────────────────────────────────
           One header on every page: title (with the open section beside it), one
           plain line under it, the actions on the right (the first, "New <thing>",
           is ops-btn primary) and optional in-page tabs. Written by page.head in
           templates/ops/_page.html.twig; JS-drawn tabs use window.opsTabs. */
        .ops-head-t { display: flex; flex-direction: column; min-width: 0; }
        .page-title .ops-head-sub { margin: 10px 0 0; }
        .ops-head-acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
        .ops-head-acts .ops-btn { padding: 7px 15px; }
        .ops-head-acts .ops-btn i[data-lucide], .ops-head-acts .ops-btn svg { width: 15px; height: 15px; }
        /* In-page tabs: the Work and Money section switcher, now shared. */
        .ops-tabs { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; border-bottom: 1px solid var(--border); margin-top: 12px; }
        .ops-tab { position: relative; padding: 0 0 11px; margin-bottom: -1px; border: 0; border-bottom: 1px solid transparent; background: none; cursor: pointer; font-family: var(--font-ui); font-size: var(--t-xs); font-weight: 600; color: var(--muted); text-decoration: none; white-space: nowrap; }
        .ops-tab:hover { color: var(--text); }
        .ops-tab.on { color: var(--accent); border-bottom-color: var(--accent); }
        .ops-tab .n { margin-left: 3px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
        .ops-tab.on .n { color: var(--accent); }
        .ops-tab .n.alert { color: var(--danger); }
        .ops-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
        @media (max-width: 640px) { .ops-head-acts { width: 100%; } }

        /* Every navigation link (Open Money, back to Invoices, Operations) is a
           visible pill, the same on every page. Gold on hover. */
        .pill-link {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            font-family: var(--font-ui);
            font-size: var(--t-sm);
            font-weight: 500;
            line-height: 1.2;
            color: var(--text);
            text-decoration: none;
            border: 1px solid var(--border2);
            background: var(--panel);
            border-radius: 999px;
            padding: 6px 13px;
            cursor: pointer;
            white-space: nowrap;
            transition: border-color .15s, background .15s, color .15s;
        }
        .pill-link:hover { border-color: var(--accent-border); background: var(--accent-soft); color: var(--accent); }
        .pill-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
        .pill-link.gold { color: var(--accent); border-color: var(--accent-border); }
        .pill-link i[data-lucide], .pill-link svg { width: 14px; height: 14px; }

        /* ─── Side panel ──────────────────────────────────
           One record at a time (a Planning ticket, a Work deal or project), fixed
           beside the assistant dock or its slim rail. The page gives up the same
           room, so the list narrows instead of being covered. Opened and closed
           through window.opsSidePanel. */
        .tpanel { position: fixed; top: 0; right: 0; height: 100vh; width: 460px; z-index: 55; background: var(--panel); border-left: 1px solid var(--border2); box-shadow: -14px 0 40px rgba(0,0,0,.06); display: none; flex-direction: column; transition: right .24s ease; }
        .tpanel.open { display: flex; }
        body.adock-ready .tpanel { right: 60px; }
        body.adock-ready.adock-open .tpanel { right: var(--adock-w, 420px); }
        body.tpanel-open .app { padding-right: 460px; }
        body.adock-ready.tpanel-open .app { padding-right: calc(60px + 460px); }
        body.adock-ready.adock-open.tpanel-open .app { padding-right: calc(var(--adock-w, 420px) + 460px); }
        @media (max-width: 1100px) {
            .tpanel { width: min(460px, calc(100vw - 60px)); box-shadow: -18px 0 50px rgba(0,0,0,.16); }
            body.tpanel-open .app { padding-right: 0; }
            body.adock-ready.tpanel-open .app { padding-right: 60px; }
        }
        .tp-head { padding: 16px 22px 14px; border-bottom: 1px solid var(--border); display: grid; gap: 8px; flex: none; }
        .tp-r1 { display: flex; align-items: center; gap: 8px; }
        .tp-code { font-family: var(--font-code); font-size: 12px; color: var(--dim); }
        .tp-acts { margin-left: auto; display: flex; gap: 6px; }
        .tp-icon { width: 30px; height: 30px; border-radius: 999px; border: 1px solid var(--border2); background: var(--panel); color: var(--muted); cursor: pointer; display: grid; place-items: center; }
        .tp-icon:hover { color: var(--text); border-color: var(--accent-border); }
        .tp-icon.danger:hover { color: var(--danger); border-color: rgba(var(--danger-rgb), .4); }
        .tp-icon svg { width: 15px; height: 15px; }
        .tp-head h3 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.25; color: var(--text); }
        .tp-body { overflow-y: auto; padding: 16px 22px 28px; display: grid; gap: 22px; align-content: start; flex: 1; }
        .tp-props { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 6px 12px; align-items: center; margin: 0; font-size: var(--t-sm); }
        .tp-props dt { color: var(--dim); }
        .tp-props dd { margin: 0; display: flex; align-items: center; gap: 6px; }
        .tp-sel { font-family: var(--font-ui); font-size: var(--t-sm); color: var(--text); background: transparent; border: 1px solid transparent; border-radius: 8px; padding: 4px 8px; margin-left: -8px; cursor: pointer; max-width: 100%; }
        .tp-sel:hover, .tp-sel:focus { border-color: var(--border2); background: var(--panel2); outline: none; }
        .tp-sec h4 { margin: 0 0 8px; font-size: 11.5px; font-weight: 600; color: var(--dim); letter-spacing: .06em; text-transform: uppercase; display: flex; gap: 6px; }

        /* Documents on a ticket (window.opsTaskDocs): Work page panel and dashboard. */
        .tdocs-h { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: 11.5px; font-weight: 600; color: var(--dim); letter-spacing: .06em; text-transform: uppercase; }
        .tdocs-h .n { font-family: var(--font-code); font-weight: 500; letter-spacing: 0; }
        .tdocs-h .btn { margin-left: auto; text-transform: none; letter-spacing: 0; }
        .tdocs-list { border: 1px solid var(--border); border-radius: 10px; background: var(--panel); transition: border-color .15s, background .15s; }
        .tdocs-list.over { border-color: var(--accent); background: var(--accent-soft); }
        .tdocs-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--border); font-size: var(--t-sm); }
        .tdocs-row:last-child { border-bottom: 0; }
        .tdocs-ext { font-family: var(--font-code); font-size: 9.5px; font-weight: 500; text-transform: uppercase; color: var(--muted); background: var(--chip); border: 1px solid var(--chip-border); border-radius: 5px; height: 22px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
        .tdocs-name { display: block; font-weight: 500; color: var(--text); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .tdocs-name:hover { color: var(--accent); }
        .tdocs-meta { font-size: var(--t-xs); color: var(--dim); margin-top: 2px; }
        .tdocs-row.up .tdocs-meta { color: var(--accent); }
        .tdocs-acts { display: flex; gap: 2px; opacity: 0; transition: opacity .15s; }
        .tdocs-row:hover .tdocs-acts, .tdocs-row:focus-within .tdocs-acts { opacity: 1; }
        .tdocs-acts a, .tdocs-acts button { font-family: var(--font-ui); font-size: var(--t-xs); font-weight: 500; color: var(--muted); background: none; border: 0; border-radius: 6px; padding: 4px 7px; cursor: pointer; text-decoration: none; }
        .tdocs-acts a:hover, .tdocs-acts button:hover { background: var(--panel2); color: var(--text); }
        .tdocs-acts button:hover { color: var(--danger); }
        .tdocs-empty { padding: 12px 10px; font-size: var(--t-sm); color: var(--dim); }
        @media (hover: none) { .tdocs-acts { opacity: 1; } }

        /* ─── New deal / project / contact / company ──────────
           One form each, no steps (window.opsNew). New business starts as a deal; the
           company and the person there are fields on it, picked or typed. */
        .onew { position: fixed; inset: 0; z-index: 340; background: rgba(5,6,8,.55); display: grid; place-items: start center; padding: 8vh 16px 16px; overflow-y: auto; }
        .onew[hidden] { display: none; }
        .onew-panel { width: min(520px, 100%); background: var(--panel); border: 1px solid var(--border2); border-radius: 14px; padding: 22px; box-shadow: 0 24px 60px rgba(0,0,0,.25); display: grid; gap: 14px; }
        .onew-head { display: flex; align-items: center; gap: 10px; }
        .onew-head h4 { margin: 0; font-size: var(--t-xl); font-weight: 600; }
        .onew-head .x { margin-left: auto; font-family: var(--font-ui); font-size: var(--t-xs); color: var(--dim); background: none; border: 1px solid var(--border2); border-radius: 999px; padding: 3px 10px; cursor: pointer; }
        .onew-fl { display: grid; gap: 6px; position: relative; }
        .onew-fl > label { font-size: var(--t-xs); color: var(--dim); font-weight: 600; }
        .onew-fl > label span { font-weight: 400; }
        .onew-in:not([type="checkbox"]) { width: 100%; box-sizing: border-box; background: var(--panel2); color: var(--text); border: 1px solid var(--border2); border-radius: 8px; padding: 9px 11px; font-size: var(--t-sm); font-family: var(--font-ui); }
        .onew-in:not([type="checkbox"]):focus { outline: none; border-color: var(--accent); background: var(--panel); }
        /* Floats over the fields below, so they do not jump when it opens or closes. */
        .onew-drop { position: absolute; top: 100%; left: 0; right: 0; z-index: 2; margin-top: 4px; border: 1px solid var(--border2); border-radius: 10px; overflow: hidden; background: var(--panel); box-shadow: 0 12px 30px rgba(0,0,0,.14); max-height: 260px; overflow-y: auto; }
        .onew-drop[hidden] { display: none; }
        .onew-drop button { display: flex; width: 100%; gap: 8px; align-items: center; text-align: left; font-family: var(--font-ui); font-size: var(--t-sm); color: var(--text); background: none; border: 0; border-bottom: 1px solid var(--border); padding: 8px 11px; cursor: pointer; }
        .onew-drop button:last-child { border-bottom: 0; }
        .onew-drop button:hover, .onew-drop button:focus-visible { background: var(--accent-soft); outline: none; }
        .onew-drop .k { margin-left: auto; font-size: var(--t-xs); color: var(--dim); }
        .onew-drop .add { color: var(--accent); font-weight: 600; }
        .onew-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: 10px; }
        .onew-seg { display: inline-flex; border: 1px solid var(--border2); border-radius: 999px; padding: 2px; gap: 2px; justify-self: start; }
        .onew-seg button { font-family: var(--font-ui); font-size: var(--t-xs); font-weight: 600; border: 0; background: none; color: var(--muted); padding: 4px 11px; border-radius: 999px; cursor: pointer; }
        .onew-seg button.on { background: var(--accent-soft); color: var(--accent); }
        .onew-from { font-size: var(--t-sm); color: var(--muted); background: var(--panel2); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; }
        .onew-sum { font-size: var(--t-sm); color: var(--muted); background: var(--panel2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; line-height: 1.6; }
        .onew-sum b { color: var(--text); font-weight: 600; }
        .onew-sum .need { color: var(--accent); }
        .onew-tag { font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 8px; border: 1px solid var(--border2); color: var(--muted); white-space: nowrap; }
        .onew-tag.new { color: var(--accent); border-color: var(--accent-border); background: var(--accent-soft); }
        .onew-tag.ok { color: var(--ok); border-color: rgba(var(--ok-rgb), .3); background: rgba(var(--ok-rgb), .10); }
        .onew-err { font-size: var(--t-sm); color: var(--danger); }
        .onew-err[hidden] { display: none; }
        .onew-foot { display: flex; gap: 8px; justify-content: flex-end; align-items: center; }
        /* Why Create is not available yet, said next to the button rather than in a tooltip. */
        .onew-why { margin-right: auto; font-size: var(--t-xs); color: var(--muted); }
        .onew-why:empty { display: none; }
        .onew-menu { position: fixed; z-index: 345; width: 250px; background: var(--panel); border: 1px solid var(--border2); border-radius: 12px; box-shadow: 0 18px 40px rgba(0,0,0,.16); overflow: hidden; }
        .onew-menu button { display: block; width: 100%; text-align: left; font-family: var(--font-ui); font-size: var(--t-sm); font-weight: 600; color: var(--text); background: none; border: 0; border-bottom: 1px solid var(--border); padding: 10px 14px; cursor: pointer; }
        .onew-menu button:last-child { border-bottom: 0; }
        .onew-menu button:hover, .onew-menu button:focus-visible { background: var(--accent-soft); outline: none; }
        .onew-menu small { display: block; font-weight: 400; color: var(--dim); font-size: var(--t-xs); margin-top: 2px; }

        /* ─── Timeline ─────────────────────────────────────
           One feed for a lead and the deal it became: notes, contacts
           and changes, newest first. Drawn by window.opsTimeline.mount on the lead page
           and in the deal side panel, so both read the same way. */
        .otl-compose { display: grid; gap: 8px; }
        .otl-compose textarea, .otl-edit textarea { width: 100%; font-family: var(--font-ui); font-size: var(--t-md); line-height: 1.5; border-radius: 10px; padding: 9px 11px; resize: vertical; min-height: 44px; }
        .otl-row { display: flex; gap: 6px; align-items: center; }
        .otl-row .otl-hint { margin-right: auto; font-size: var(--t-xs); color: var(--dim); }
        .otl-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 10px 0 2px; }
        .otl-ev { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: var(--t-md); }
        .otl-ev:last-child { border-bottom: 0; }
        .otl-ev .ic { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); background: var(--chip); }
        .otl-ev .ic svg { width: 12px; height: 12px; }
        .otl-ev.note .ic { background: var(--accent-soft); color: var(--accent); }
        .otl-ev.touch .ic { background: rgba(var(--ok-rgb), .12); color: var(--ok); }
        .otl-ev .b { color: var(--text); min-width: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
        .otl-ev.change .b { color: var(--muted); white-space: normal; }
        .otl-ev .b small { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; color: var(--dim); font-size: var(--t-xs); margin-top: 2px; white-space: normal; }
        .otl-ev .r { display: flex; gap: 2px; align-items: flex-start; }
        .otl-ev .when { font-size: var(--t-xs); color: var(--dim); white-space: nowrap; padding-top: 2px; }
        .otl-ev .na { opacity: 0; display: flex; gap: 2px; transition: opacity .12s; }
        .otl-ev:hover .na, .otl-ev:focus-within .na { opacity: 1; }
        .otl-ev .na button { width: 24px; height: 24px; border: 0; background: none; color: var(--dim); border-radius: 6px; cursor: pointer; display: grid; place-items: center; }
        .otl-ev .na button:hover { color: var(--text); background: var(--chip); }
        .otl-ev .na svg { width: 13px; height: 13px; }
        .otl-src { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 0 6px; border-radius: 4px; border: 1px solid var(--border2); color: var(--dim); }
        .otl-src.deal { border-color: var(--accent-border); color: var(--accent); }
        .otl-sep { display: flex; align-items: center; gap: 10px; padding: 10px 0; font-size: var(--t-xs); font-weight: 600; color: var(--accent); }
        .otl-sep::before, .otl-sep::after { content: ""; flex: 1; height: 1px; background: var(--accent-border); }
        .otl-edit { display: grid; gap: 6px; }
        .otl-edit textarea { font-size: var(--t-md); border-radius: 8px; padding: 7px 9px; min-height: 60px; }
        .otl-more { font-family: var(--font-ui); font-size: var(--t-xs); color: var(--dim); background: none; border: 0; padding: 8px 0 2px; cursor: pointer; }
        .otl-more:hover { color: var(--accent); }
        .otl-quiet { color: var(--dim); font-size: var(--t-sm); margin: 10px 0; }

        /* Side panel contents shared by every record kind. */
        .tpanel .tp-props.wide { grid-template-columns: 112px minmax(0, 1fr); }
        .tp-props dt label { color: var(--dim); cursor: pointer; }
        /* The :not() list matches the global input rule's weight, so a panel field
           reads as text until it is hovered or clicked. */
        .tp-in:not([type="range"]):not([type="checkbox"]):not([type="radio"]):not([type="color"]) { width: 100%; font-family: var(--font-ui); font-size: var(--t-sm); color: var(--text); background: transparent; border: 1px solid transparent; border-radius: 8px; padding: 5px 8px; margin-left: -8px; }
        textarea.tp-in { resize: vertical; line-height: 1.5; }
        .tp-in:not([type="range"]):not([type="checkbox"]):not([type="radio"]):not([type="color"]):hover { border-color: var(--border); background: var(--panel2); }
        .tp-in:not([type="range"]):not([type="checkbox"]):not([type="radio"]):not([type="color"]):focus { border-color: var(--accent-border); background: var(--panel); outline: none; }
        .tp-seg { display: inline-flex; border: 1px solid var(--border2); border-radius: 999px; padding: 2px; gap: 2px; }
        .tp-seg button { font-family: var(--font-ui); font-size: var(--t-xs); font-weight: 600; border: 0; background: none; color: var(--muted); padding: 4px 11px; border-radius: 999px; cursor: pointer; }
        .tp-seg button.on { background: var(--accent-soft); color: var(--accent); }
        .tp-pills { display: flex; gap: 6px; flex-wrap: wrap; }
        .tp-pill { font-size: var(--t-xs); font-weight: 600; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--chip-border); background: var(--chip); color: var(--muted); }
        .tp-pill.gold { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-border); }
        .tp-pill.green { color: var(--ok); background: rgba(var(--ok-rgb), .10); border-color: rgba(var(--ok-rgb), .3); }
        .tp-pill.red { color: var(--danger); background: rgba(var(--danger-rgb), .09); border-color: rgba(var(--danger-rgb), .3); }
        .tp-next { border: 1px solid var(--accent-border); background: var(--accent-soft); border-radius: 10px; padding: 10px 12px; font-size: var(--t-sm); display: grid; gap: 2px; color: var(--text); }
        .tp-next .w { font-size: var(--t-xs); color: var(--accent); font-weight: 600; }
        .tp-links { display: flex; gap: 6px; flex-wrap: wrap; }
        .tp-links span, .tp-links a, .tp-links button { font: inherit; font-size: var(--t-sm); font-weight: 500; color: var(--text); border: 1px solid var(--border2); border-radius: 999px; padding: 4px 11px; background: var(--panel); text-decoration: none; }
        /* A pill that goes somewhere (the record, or the list holding them). */
        .tp-links a, .tp-links button { cursor: pointer; }
        .tp-links a:hover, .tp-links button:hover { border-color: var(--accent-border); color: var(--accent); }
        .tp-links b { color: var(--dim); font-weight: 600; margin-left: 5px; }
        .tp-quiet { margin: 0; font-size: var(--t-sm); color: var(--dim); }
        .tp-hist > div { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 10px; font-size: var(--t-sm); padding: 6px 0; border-bottom: 1px solid var(--border); }
        .tp-hist > div:last-child { border-bottom: 0; }
        .tp-hist .t { color: var(--dim); }
        .tp-hist .x { color: var(--muted); }
        .tp-hist .by { color: var(--dim); font-size: var(--t-xs); }
        .tp-more { font-family: var(--font-ui); font-size: var(--t-xs); color: var(--dim); background: none; border: 0; padding: 6px 0 0; cursor: pointer; }
        .tp-more:hover { color: var(--accent); }
        .tp-savebar { border-top: 1px solid var(--border); padding: 12px 22px; display: flex; gap: 8px; align-items: center; background: var(--panel2); flex: none; }
        .tp-savebar[hidden] { display: none; }
        .tp-savebar .msg { font-size: var(--t-sm); color: var(--muted); margin-right: auto; }

        /* ─── List page parts ─────────────────────────────
           One look for every list page, taken from the Dashboard: the figures row,
           section heading, the gold "to do" line, filter pills, edge-coloured rows
           with pill buttons, and the page footer. Build new list pages from these
           rather than a page's own table or chip styles. */
        .ops-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--border2); }
        .ops-stats.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
        .ops-stat { padding: 18px 26px; border-right: 1px solid var(--border); min-width: 0; }
        .ops-stat:first-child { padding-left: 0; }
        .ops-stat:last-child { border-right: 0; }
        .ops-stat .lbl { font-family: var(--font-ui); font-size: var(--t-xs); color: var(--dim); }
        /* A figure always reads on one line: it never wraps, and opsFit shrinks it to its tile. */
        .ops-stat .big { font-family: var(--font-display); font-size: var(--t-2xl); font-weight: 600; line-height: 1.1; margin-top: 3px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; }
        .ops-stat .big .cur { font-size: var(--t-md); color: var(--muted); font-family: var(--font-ui); font-weight: 500; margin-right: 5px; }
        .ops-stat .big .mo { font-size: var(--t-sm); color: var(--muted); font-family: var(--font-ui); font-weight: 500; margin-left: 2px; }
        /* Two figures in one tile (one-off and monthly pipeline), one line each. */
        .ops-stat .big:has(> .ln) { display: grid; gap: 2px; font-size: var(--t-xl); }
        .ops-stat .big .ln { display: grid; grid-template-columns: 58px minmax(0, 1fr); align-items: baseline; gap: 6px; }
        .ops-stat .big .ln .k { font-family: var(--font-ui); font-size: var(--t-xs); font-weight: 500; color: var(--dim); }
        .ops-stat .big .ln .ops-fit { white-space: nowrap; overflow: hidden; }
        .ops-stat .sub { font-size: var(--t-sm); color: var(--muted); margin-top: 3px; }
        .ops-stat .sub b { font-weight: 600; color: var(--danger); }
        .ops-stat.warn .big { color: var(--accent); }
        .ops-stat.good .big { color: var(--ok); }
        .ops-stat.bad .big { color: var(--danger); }
        /* The page measures itself (2 Nov): chat and a ticket open together leave it ~900px,
           and four numbers across no longer fit. Two per row instead. */
        main.main { container: page / inline-size; }
        @container page (max-width: 1000px) {
            .ops-stats:not(.three) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
            .ops-stats:not(.three) .ops-stat:nth-child(2n) { border-right: 0; }
            .ops-stats:not(.three) .ops-stat:nth-child(2n+1) { padding-left: 0; }
            .ops-stats:not(.three) .ops-stat:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
        }

        .ops-billing { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; padding: 12px 16px; border-radius: 12px; background: var(--accent-soft); border: 1px solid var(--accent-border); font-size: var(--t-md); color: var(--text); }
        .ops-billing[hidden] { display: none; }
        .ops-billing .ic { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--panel); display: grid; place-items: center; font-size: var(--t-xs); font-weight: 700; flex: none; }
        .ops-billing b { font-weight: 600; }
        .ops-billing .pill-link, .ops-billing .ops-btn { margin-left: auto; }

        .ops-sec { margin-top: 42px; }
        .ops-sec-h { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-bottom: 9px; border-bottom: 1px solid var(--border2); }
        .ops-sec-h h3 { margin: 0; font-family: var(--font-display); font-size: var(--t-xl); font-weight: 600; }
        .ops-sec-h .n { font-family: var(--font-mono); font-size: var(--t-sm); color: var(--dim); font-variant-numeric: tabular-nums; }
        .ops-sec-h .say { margin-left: auto; font-size: var(--t-sm); color: var(--dim); }
        .ops-sec-h .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }

        /* The inbox (window.opsInbox): a pill at the top right of the page head, its list
           below it. Needs you first, then updates; a dot marks what is new. */
        /* The inbox took over the pending bar in the chat dock and on the assistant page,
           and the counts on the agents' orbs (2 Nov). */
        #adock-pend, #assistant-pend { display: none !important; }
        .ops-head-end { display: flex; align-items: center; gap: 10px; margin-left: auto; }
        .ops-inbox { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-ui); font-size: var(--t-sm); font-weight: 600; color: var(--muted); background: none; border: 1px solid var(--chip-border); border-radius: 999px; padding: 5px 12px; cursor: pointer; white-space: nowrap; }
        .ops-inbox:hover, .ops-inbox[aria-expanded="true"] { color: var(--text); border-color: var(--border2); background: var(--chip); }
        .ops-inbox:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
        .ops-inbox i[data-lucide], .ops-inbox svg { width: 15px; height: 15px; }
        .ops-inbox .c { font-family: var(--font-mono); font-size: var(--t-xs); color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums; }
        .ops-inbox .c:empty { display: none; }
        .ops-inbox.float { position: fixed; top: 18px; right: 24px; z-index: 45; background: var(--bg); }
        /* The open inbox (window.opsInbox). The box is drawn at its full size and only its
           outline (clip-path) grows out of the pill and back, so nothing inside is laid out
           again on each frame. Agents on the left with their live orb; the chosen one's
           Needs you as cards, then its Updates as a timeline. */
        .ops-ibx-scrim { position: fixed; inset: 0; z-index: 88; background: rgba(10,10,12,.18); opacity: 0; transition: opacity .4s cubic-bezier(.2,.8,.2,1); }
        :root[data-theme="dark"] .ops-ibx-scrim { background: rgba(0,0,0,.45); }
        .ops-ibx-scrim.on { opacity: 1; }
        .ops-ibx-shadow { position: fixed; z-index: 90; pointer-events: none; }
        .ops-ibx { position: relative; width: 100%; height: 100%; overflow: hidden; background: var(--panel); border: 1px solid var(--border2); border-radius: 18px; pointer-events: auto;
            display: grid; grid-template-columns: 244px minmax(0, 1fr); will-change: clip-path; transition: box-shadow .25s ease; }
        /* The shadow only once it stands open: a shadow on a moving outline repaints the whole box. */
        .ops-ibx.settled { box-shadow: var(--shadow); }
        .ops-ibx.moving { --orbs: paused; }
        .ops-ibx > .ops-inbox { position: absolute; top: 0; right: 0; z-index: 2; border-color: transparent; background: var(--panel); pointer-events: none; }
        .ops-ibx-who, .ops-ibx-feed { opacity: 0; }
        .ops-ibx-who { background: var(--sidebar); border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 2px; padding: 14px 10px; min-width: 0; overflow-y: auto; }
        .ops-ibx-who h3 { margin: 4px 8px 12px; font-family: var(--font-display); font-size: var(--t-xl); font-weight: 600; display: flex; align-items: baseline; gap: 8px; }
        .ops-ibx-who h3 .n { font-family: var(--font-mono); font-size: var(--t-sm); font-weight: 500; color: var(--dim); }
        .ops-ibx-ag { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 12px; border: 1px solid transparent; cursor: pointer; transition: background .15s, border-color .15s; }
        .ops-ibx-ag:hover { background: var(--chip); }
        .ops-ibx-ag.on { background: var(--panel); border-color: var(--border); box-shadow: var(--shadow-sm); }
        .ops-ibx-ag:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
        .ops-ibx-ag .siri-orb { width: 32px; height: 32px; --siri-blur: 3.5px; --siri-contrast: 1.7; }
        .ops-ibx-nm { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
        .ops-ibx-nm b { font-size: var(--t-sm); font-weight: 600; }
        .ops-ibx-nm span { font-size: var(--t-xs); color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .ops-ibx-ag .c { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: grid; place-items: center; font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-border); }
        .ops-ibx-feed { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
        .ops-ibx-fh { display: flex; align-items: center; gap: 14px; padding: 18px 22px 16px; border-bottom: 1px solid var(--border); }
        .ops-ibx-fh .siri-orb { width: 46px; height: 46px; --siri-blur: 5px; box-shadow: 0 6px 18px color-mix(in oklch, var(--agent) 28%, transparent); }
        .ops-ibx-fh .who { display: flex; flex-direction: column; min-width: 0; }
        .ops-ibx-fh .who b { font-family: var(--font-display); font-size: var(--t-xl); font-weight: 600; line-height: 1.2; }
        .ops-ibx-fh .who span { font-size: var(--t-xs); color: var(--dim); }
        .ops-ibx-fh .acts { margin-left: auto; display: flex; gap: 6px; align-items: center; }
        /* Talk to the agent: a pill in the agent's own colour, top right next to close. */
        .ops-ibx-talk { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 13px 0 11px; border-radius: 999px;
            font-family: var(--font-ui); font-size: var(--t-xs); font-weight: 600; letter-spacing: .01em; white-space: nowrap;
            color: color-mix(in oklch, var(--agent) 70%, var(--text)); background: color-mix(in oklch, var(--agent) 12%, transparent);
            border: 1px solid color-mix(in oklch, var(--agent) 30%, transparent); transition: background .15s, border-color .15s, transform .15s; }
        .ops-ibx-talk:hover { background: color-mix(in oklch, var(--agent) 20%, transparent); border-color: color-mix(in oklch, var(--agent) 45%, transparent); }
        .ops-ibx-talk:active { transform: scale(.97); }
        .ops-ibx-talk:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
        .ops-ibx-talk i[data-lucide], .ops-ibx-talk svg { width: 14px; height: 14px; }
        .ops-ibx-x { all: unset; cursor: pointer; color: var(--dim); width: 30px; height: 30px; display: grid; place-items: center; border-radius: 999px; font-size: 18px; }
        .ops-ibx-x:hover { background: var(--chip); color: var(--text); }
        .ops-ibx-x:focus-visible { outline: 2px solid var(--accent); }
        .ops-ibx-x i[data-lucide], .ops-ibx-x svg { width: 15px; height: 15px; }
        /* The inbox as its own page (/inbox): the same box, standing in the page. */
        .ops-ibx.ops-ibx-page { height: calc(100vh - 150px); min-height: 480px; grid-template-columns: 260px minmax(0, 1fr); box-shadow: var(--shadow-sm); }
        .ops-ibx-page .ops-ibx-who, .ops-ibx-page .ops-ibx-feed { opacity: 1; }
        .ops-ibx-page .ops-ibx-who h3 { display: none; }
        main:has([data-inbox-page]) .ops-inbox { display: none; }
        .ops-ibx-body { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 22px 22px; }
        .ops-ibx-sec { display: flex; align-items: baseline; gap: 8px; margin: 18px 0 10px; padding-bottom: 7px; border-bottom: 1px solid var(--border2); }
        .ops-ibx-sec h4 { margin: 0; font-size: var(--t-md); font-weight: 600; }
        .ops-ibx-sec .n { font-family: var(--font-mono); font-size: var(--t-xs); color: var(--dim); }
        .ops-ibx-cards { display: flex; flex-direction: column; gap: 10px; }
        .ops-ibx-card { background: var(--panel2); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 7px; }
        .ops-ibx-card .top { display: flex; align-items: center; gap: 8px; min-width: 0; }
        .ops-ibx-card .top .w { margin-left: auto; font-size: var(--t-xs); color: var(--dim); white-space: nowrap; }
        .ops-ibx-card .m { font-size: var(--t-md); line-height: 1.5; overflow-wrap: anywhere; }
        .ops-ibx-card .q { padding: 6px 0 6px 12px; border-left: 2px solid var(--accent-border); color: var(--muted); font-size: var(--t-sm); white-space: pre-line; }
        .ops-ibx-card .acts { display: flex; justify-content: flex-end; gap: 6px; }
        .ops-ibx-card .acts .ops-btn { padding: 4px 13px; font-size: var(--t-xs); }
        .ops-ibx-tag { font-size: 11px; font-weight: 600; padding: 1px 9px; border-radius: 20px; border: 1px solid var(--chip-border); background: var(--chip); color: var(--muted); white-space: nowrap; }
        .ops-ibx-tag.bad { background: none; border-color: var(--danger); color: var(--danger); }
        .ops-ibx-times { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px; padding-top: 8px; border-top: 1px solid var(--border); }
        .ops-ibx-times[hidden] { display: none; }
        .ops-ibx-times .ops-btn { padding: 4px 13px; font-size: var(--t-xs); }
        .ops-ibx-times input { font: inherit; font-size: var(--t-xs); padding: 3px 8px; border: 1px solid var(--border2); border-radius: 8px; background: var(--panel); color: var(--text); max-width: 100%; }
        .ops-ibx-tag.gold { background: var(--accent-soft); border-color: var(--accent-border); color: var(--accent); }
        /* The record a card is about (21 Oct): code, status, due date. It opens a short
           peek of the record in place; the peek slides open on grid rows, so nothing is
           measured in script. */
        .ops-rk { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; max-width: 100%; min-width: 0; padding: 4px 10px 4px 12px; border-radius: 999px;
            border: 1px solid var(--border2); background: var(--panel); font-size: var(--t-xs); color: var(--muted); transition: background .2s, border-color .2s, box-shadow .2s; }
        .ops-rk:hover { border-color: var(--accent-border); box-shadow: var(--shadow-sm); }
        .ops-rk:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
        .ops-rk b { color: var(--text); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
        .ops-rk .st { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
        .ops-rk .st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
        .ops-rk .st.blocked { color: var(--danger); } .ops-rk .st.progress { color: var(--accent); } .ops-rk .st.done { color: var(--ok); }
        .ops-rk .due { white-space: nowrap; color: var(--dim); font-variant-numeric: tabular-nums; }
        .ops-rk .due.late { color: var(--danger); }
        .ops-rk .sep { width: 1px; height: 12px; background: var(--border2); flex: none; }
        .ops-rk svg { width: 13px; height: 13px; color: var(--dim); flex: none; transition: transform .35s cubic-bezier(.2,.8,.2,1); }
        .peek-open > .top .ops-rk, .peek-open > .ops-rk, .peek-open > .t .ops-rk { background: var(--accent-soft); border-color: var(--accent-border); }
        .peek-open > .top .ops-rk svg, .peek-open > .ops-rk svg, .peek-open > .t .ops-rk svg { transform: rotate(180deg); }
        @media (max-width: 520px) { .ops-rk .due, .ops-rk .sep.s2 { display: none; } }
        .ops-peek { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .38s cubic-bezier(.2,.8,.2,1); }
        .ops-peek > div { overflow: hidden; min-height: 0; }
        .peek-open > .ops-peek { grid-template-rows: 1fr; }
        .ops-pk { margin-top: 2px; border: 1px solid var(--border); background: var(--panel); border-radius: 12px; padding: 12px 14px; display: grid; gap: 11px;
            opacity: 0; transform: translateY(-6px); transition: opacity .25s ease, transform .38s cubic-bezier(.2,.8,.2,1); }
        .peek-open > .ops-peek .ops-pk { opacity: 1; transform: none; transition-delay: .06s; }
        .ops-pk .h { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
        .ops-pk .h b { font-size: var(--t-md); font-weight: 700; line-height: 1.35; }
        .ops-pk .h .pill-link { flex: none; white-space: nowrap; }
        .ops-pk .meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
        .ops-pk .meta div { background: var(--panel2); padding: 7px 10px; min-width: 0; }
        .ops-pk .meta span { display: block; font-size: 10.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--dim); }
        .ops-pk .meta strong { display: block; font-size: var(--t-xs); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
        .ops-pk .meta strong.late { color: var(--danger); }
        @media (max-width: 560px) { .ops-pk .meta { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
        .ops-pk .tl { display: grid; gap: 5px; }
        .ops-pk .tl div { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 8px; font-size: var(--t-xs); color: var(--muted); }
        .ops-pk .tl span { color: var(--dim); font-variant-numeric: tabular-nums; }
        .ops-pk p { margin: 0; font-size: var(--t-xs); line-height: 1.55; color: var(--dim); }
        @media (prefers-reduced-motion: reduce) { .ops-peek, .ops-pk, .ops-rk svg { transition: none; } }
        .ops-ibx-srow { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--border); }
        .ops-ibx-srow:last-child { border-bottom: 0; }
        .ops-ibx-srow .d { font-size: var(--t-xs); font-weight: 700; color: var(--accent); line-height: 1.35; font-variant-numeric: tabular-nums; padding-top: 2px; }
        .ops-ibx-srow .d span { display: block; font-weight: 500; color: var(--dim); }
        .ops-ibx-srow .t { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; font-size: var(--t-sm); }
        .ops-ibx-srow > .ops-peek { grid-column: 1 / -1; }
        .ops-ibx-srow.peek-open { row-gap: 8px; }
        .ops-ibx-srow .a { display: flex; gap: 2px; align-items: center; }
        .ops-ibx-srow .a input { font: inherit; font-size: var(--t-xs); padding: 3px 6px; border: 1px solid var(--border2); border-radius: 8px; background: var(--panel); color: var(--text); }
        @media (max-width: 560px) { .ops-ibx-srow { grid-template-columns: 1fr; gap: 6px; } }
        .ops-ibx-done { font-size: var(--t-xs); color: var(--dim); }
        /* Share a ticket (window.opsShare): the Share pill grows into this box, like the
           inbox (20 Oct, option A). Fixed to the screen so the panel never clips it. */
        .tp-share { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border2); background: var(--panel); color: var(--muted); font: inherit; font-size: var(--t-xs); font-weight: 700; cursor: pointer; }
        .tp-share:hover, .tp-share[aria-expanded="true"] { color: var(--accent); border-color: var(--accent-border); background: var(--accent-soft); }
        .tp-share svg { width: 14px; height: 14px; }
        .tp-share .ct { font-family: var(--font-mono); font-size: 11px; }
        .tp-share .ct:empty { display: none; }
        .osh { position: fixed; z-index: 90; width: 340px; max-width: calc(100vw - 32px); background: var(--panel); border: 1px solid var(--border2); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
        .osh.lift { box-shadow: 0 18px 44px rgba(0,0,0,.22); }
        .osh > * { opacity: 0; transition: opacity .15s; }
        .osh.open > * { opacity: 1; transition: opacity .2s .12s; }
        .osh h4 { margin: 0; display: flex; align-items: center; gap: 8px; font-size: var(--t-sm); font-weight: 700; color: var(--text); }
        .osh .x { margin-left: auto; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--border2); background: none; color: var(--dim); display: grid; place-items: center; cursor: pointer; }
        .osh .x svg { width: 12px; height: 12px; }
        .osh .f { display: flex; flex-direction: column; gap: 5px; }
        .osh label { font-size: var(--t-xs); font-weight: 700; color: var(--dim); }
        .osh .inp { width: 100%; border: 1px solid var(--border2); background: var(--panel2, var(--bg)); color: var(--text); border-radius: 10px; padding: 8px 11px; font: inherit; font-size: var(--t-sm); }
        .osh .days { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
        .osh .step { display: flex; align-items: center; border: 1px solid var(--border2); border-radius: 10px; background: var(--panel2, var(--bg)); }
        .osh .step button { width: 28px; height: 32px; border: 0; background: none; color: var(--muted); font-weight: 800; cursor: pointer; }
        .osh .step input { width: 42px; border: 0; background: none; color: var(--text); text-align: center; font-family: var(--font-mono); font-size: var(--t-sm); -moz-appearance: textfield; }
        .osh .step input::-webkit-outer-spin-button, .osh .step input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
        .osh .chips { margin-left: auto; display: flex; gap: 4px; }
        .osh .chip-d { border: 1px solid var(--border2); background: none; color: var(--muted); border-radius: 999px; padding: 3px 9px; font: inherit; font-size: var(--t-xs); font-weight: 700; cursor: pointer; }
        .osh .chip-d.on { border-color: var(--accent-border); background: var(--accent-soft); color: var(--accent); }
        .osh .until { width: 100%; font-size: var(--t-xs); color: var(--dim); }
        .osh .go { border: 0; border-radius: 999px; padding: 8px 16px; font: inherit; font-size: var(--t-xs); font-weight: 800; background: var(--accent); color: var(--bg); cursor: pointer; }
        .osh .go:disabled { opacity: .6; cursor: default; }
        .osh .made { display: flex; align-items: center; gap: 8px; padding: 7px 7px 7px 11px; border: 1px solid var(--accent-border); background: var(--accent-soft); border-radius: 12px; }
        .osh .made code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--t-xs); color: var(--text); background: none; padding: 0; }
        .osh .made .go { padding: 6px 13px; }
        .osh .made small { flex-basis: 100%; font-size: var(--t-xs); color: var(--dim); }
        .osh .made { flex-wrap: wrap; }
        .osh .lks { display: flex; flex-direction: column; margin: 0 -14px -14px; padding: 2px 14px 6px; border-top: 1px solid var(--border); border-radius: 0 0 16px 16px; background: var(--bg); max-height: 220px; overflow-y: auto; }
        .osh .lks h5 { margin: 10px 0 2px; font-size: var(--t-xs); font-weight: 800; color: var(--dim); letter-spacing: .04em; }
        .osh .lk { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1px 10px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: var(--t-sm); }
        .osh .lk:last-child { border-bottom: 0; }
        .osh .lk b { font-weight: 700; color: var(--text); }
        .osh .lk small { grid-column: 1; color: var(--dim); font-size: var(--t-xs); }
        .osh .lk .act { grid-row: 1 / 3; grid-column: 2; align-self: center; display: flex; align-items: center; gap: 6px; font-size: var(--t-xs); color: var(--muted); }
        .osh .lk .act button { border: 0; background: none; font: inherit; font-weight: 800; color: var(--danger); cursor: pointer; padding: 3px 5px; }
        .osh .lk .act button.no { color: var(--dim); }
        .osh .lk.gone { opacity: .5; }
        .osh .err { font-size: var(--t-xs); color: var(--danger); }
        .osh [hidden] { display: none; }
        .comment-onl { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--border2); background: none; color: var(--dim); border-radius: 999px; padding: 2px 9px; font: inherit; font-size: var(--t-xs); font-weight: 700; cursor: pointer; }
        .comment-onl svg { width: 12px; height: 12px; }
        .comment-onl[aria-pressed="true"] { border-color: var(--accent-border); background: var(--accent-soft); color: var(--accent); }
        .ops-ibx-pg { margin-top: 10px; border-radius: 10px; padding: 6px 10px; }
        .ops-ibx .comment-body { margin-top: 0; font-size: inherit; }
        /* Updates (21 Oct): grouped by day, one row each: icon, two lines of text, the
           record chip and the time on the right. A long answer folds away behind "Show
           answer"; the same failure in a row is one line with a count. */
        .ops-ibx-day { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); margin: 14px 0 2px; }
        .ops-ibx-ups > .ops-ibx-day:first-child { margin-top: 4px; }
        .ops-ibx-ev { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; column-gap: 12px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: var(--t-sm); }
        .ops-ibx-ev:last-child, .ops-ibx-ev:has(+ .ops-ibx-day) { border-bottom: 0; }
        .ops-ibx-ev .ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); background: var(--chip); }
        .ops-ibx-ev .ic svg { width: 13px; height: 13px; }
        .ops-ibx-ev.bad .ic { color: var(--danger); background: rgba(var(--danger-rgb), .1); }
        .ops-ibx-ev .b { min-width: 0; padding-top: 3px; line-height: 1.45; }
        .ops-ibx-ev .tx { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
        .ops-ibx-ev .x { display: inline-block; margin-left: 6px; font-size: 11px; font-weight: 700; color: var(--danger); background: rgba(var(--danger-rgb), .1); border-radius: 999px; padding: 0 7px; vertical-align: 1px; }
        .ops-ibx-ev .r { display: flex; align-items: center; gap: 10px; padding-top: 1px; min-width: 0; }
        .ops-ibx-ev .r .ops-rk { padding: 3px 9px 3px 10px; font-size: 11.5px; max-width: 260px; }
        .ops-ibx-ev .when { font-size: var(--t-xs); color: var(--dim); white-space: nowrap; min-width: 40px; text-align: right; font-variant-numeric: tabular-nums; }
        .ops-ibx-ev.new .when::after { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-left: 6px; vertical-align: 1px; }
        .ops-ibx-ev .more-btn { all: unset; cursor: pointer; margin-top: 4px; display: inline-flex; align-items: center; gap: 4px; font-size: var(--t-xs); font-weight: 600; color: var(--accent); }
        .ops-ibx-ev .more-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
        .ops-ibx-ev .more-btn svg { width: 12px; height: 12px; transition: transform .35s cubic-bezier(.2,.8,.2,1); }
        .ops-ibx-ev.more-open .more-btn svg { transform: rotate(180deg); }
        .ops-ibx-ev > .ops-peek, .ops-ibx-ev > .more { grid-column: 2 / -1; }
        .ops-ibx-ev > .ops-peek .ops-pk { margin-top: 8px; }
        .ops-ibx-ev .more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .38s cubic-bezier(.2,.8,.2,1); }
        .ops-ibx-ev .more > div { overflow: hidden; min-height: 0; }
        .ops-ibx-ev.more-open .more { grid-template-rows: 1fr; }
        .ops-ibx-ev .more .in { margin-top: 8px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); padding: 10px 12px; font-size: var(--t-xs); color: var(--muted); display: grid; gap: 6px; }
        .peek-open > .r .ops-rk { background: var(--accent-soft); border-color: var(--accent-border); }
        .peek-open > .r .ops-rk svg { transform: rotate(180deg); }
        @media (max-width: 560px) { .ops-ibx-ev { grid-template-columns: 26px minmax(0, 1fr); } .ops-ibx-ev .r { grid-column: 2; padding-top: 6px; } }
        @media (prefers-reduced-motion: reduce) { .ops-ibx-ev .more, .ops-ibx-ev .more-btn svg { transition: none; } }
        .ops-ibx .ops-empty { margin-top: 18px; }
        @media (max-width: 760px) {
            .ops-ibx { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
            .ops-ibx-who { flex-direction: row; border-right: 0; border-bottom: 1px solid var(--border); overflow-x: auto; padding: 8px; }
            .ops-ibx-who h3 { display: none; }
            .ops-ibx-ag { flex: none; }
            .ops-ibx-nm span { display: none; }
            .ops-ibx-fh .siri-orb { width: 36px; height: 36px; }
        }

        /* The headings of the sections scrolled past, stacked at the top (window.opsStack).
           Desktop stacks them all; a phone keeps only the current one. */
        .ops-stack { position: fixed; top: 0; z-index: 40; display: none; flex-direction: column; background: var(--bg); }
        .ops-stack.on { display: flex; }
        .ops-stack button { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 12px; height: 46px; border-bottom: 1px solid var(--border2); cursor: pointer; min-width: 0; }
        .ops-stack button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
        .ops-stack h3 { margin: 0; font-family: var(--font-display); font-size: var(--t-lg); font-weight: 600; white-space: nowrap; }
        .ops-stack .n { font-family: var(--font-mono); font-size: var(--t-sm); color: var(--dim); font-variant-numeric: tabular-nums; }

        .ops-tool { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
        .ops-fchip { font-family: var(--font-ui); font-size: var(--t-xs); font-weight: 500; color: var(--muted); background: none; border: 1px solid transparent; border-radius: 999px; padding: 5px 11px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
        .ops-fchip:hover { background: var(--chip); color: var(--text); }
        .ops-fchip b { font-weight: 600; color: var(--dim); font-variant-numeric: tabular-nums; }
        .ops-fchip.on { color: var(--accent); border-color: var(--accent-border); background: var(--accent-soft); }
        .ops-fchip.on b { color: var(--accent); }
        .ops-fchip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
        .ops-search { margin-left: auto; width: 240px; max-width: 100%; font-family: var(--font-ui); font-size: var(--t-sm); color: var(--text); background: var(--panel); border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px; }
        .ops-search:focus { outline: 2px solid var(--accent-border); outline-offset: 0; }

        .ops-rows { margin-top: 12px; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
        .ops-row { display: grid; grid-template-columns: 3px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 18px 14px 0; border-bottom: 1px solid var(--border); }
        .ops-row.amt-col { grid-template-columns: 3px minmax(0, 1fr) auto auto; gap: 18px; }
        .ops-row.click { cursor: pointer; }
        .ops-row.click:hover { background: var(--panel2); }
        .ops-row .ops-edge { align-self: stretch; background: var(--border2); border-radius: 0 3px 3px 0; }
        .ops-row .ops-edge.warn { background: var(--warn); }
        .ops-row .ops-edge.red { background: var(--danger); }
        .ops-row .ops-edge.green { background: var(--ok); }
        .ops-row .ops-ttl { font-weight: 500; color: var(--text); font-size: var(--t-md); }
        .ops-row .ops-ttl .ops-who { font-weight: 400; color: var(--muted); font-size: var(--t-sm); margin-left: 6px; }
        .ops-row .ops-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: var(--t-xs); color: var(--muted); margin-top: 3px; }
        .ops-row .ops-meta .ops-mono { font-family: var(--font-mono); color: var(--dim); }
        .ops-row .ops-meta .ops-late { color: var(--danger); font-weight: 600; }
        .ops-row .ops-meta .ops-st { font-weight: 600; }
        .ops-row .ops-meta .ops-st.warn { color: var(--accent); }
        .ops-row .ops-meta .ops-st.red { color: var(--danger); }
        .ops-row .ops-meta .ops-st.green { color: var(--ok); }
        .ops-row .ops-meta .ops-st.dim { color: var(--dim); }
        .ops-row .ops-amt { text-align: right; font-weight: 600; font-size: var(--t-md); white-space: nowrap; font-variant-numeric: tabular-nums; }
        .ops-row .ops-amt .cur { font-size: var(--t-xs); color: var(--dim); font-weight: 500; margin-right: 4px; }
        .ops-row .ops-acts { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
        /* The one empty state (window.opsEmpty): a short sentence, an optional line
           under it, and a button. "Nothing matches" always offers Clear filters. */
        /* Nothing here: a rounded dashed box, centred, so an empty section still shows. */
        .ops-empty { margin: 0; padding: 22px 18px; border: 1.5px dashed var(--border2); border-radius: 12px; text-align: center; color: var(--dim); font-size: var(--t-sm); }
        .ops-empty.ops-empty-sm { padding: 12px 16px; }
        /* Space from a section's heading only; inside a list or a group it sits flush. */
        .ops-sec .ops-empty, .ops-sec-h ~ * > .ops-empty, .comment-list > .ops-empty { margin-top: 12px; }
        /* A list panel holding only the empty box drops its own frame: one box, flush. */
        .ops-rows .ops-empty { margin-top: 0; }
        .ops-rows:has(.ops-empty):not(:has(.ops-row)) { background: none; border: 0; }
        .ops-empty-t { margin: 0; color: var(--muted); font-size: var(--t-md); font-weight: 500; }
        .ops-empty-b { margin: 4px 0 0; color: var(--dim); font-size: var(--t-sm); }
        .ops-empty-acts { margin-top: 12px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
        .ops-empty-sm .ops-empty-t { font-size: var(--t-sm); font-weight: 400; color: var(--dim); }
        .ops-empty-sm .ops-empty-acts { margin-top: 8px; }
        .ops-empty[data-empty="error"] .ops-empty-t { color: var(--danger); }
        .ops-row.sel { background: var(--accent-soft); }
        .ops-row .ops-amt .ops-none { color: var(--dim); font-weight: 500; }
        .ops-row .ops-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 8px; vertical-align: 1px; }
        .ops-row .ops-meta .ops-link { color: var(--muted); text-decoration: underline; text-decoration-color: var(--border2); text-underline-offset: 3px; cursor: pointer; }
        .ops-row .ops-meta .ops-link:hover { color: var(--accent); }
        .ops-row .ops-prog { display: inline-flex; align-items: center; gap: 6px; }
        .ops-row .ops-prog i { width: 58px; height: 4px; border-radius: 4px; background: var(--chip); position: relative; overflow: hidden; display: inline-block; }
        .ops-row .ops-prog i b { position: absolute; inset: 0 auto 0 0; background: var(--accent); }
        .ops-grp { display: flex; align-items: center; gap: 8px; padding: 9px 18px; background: var(--panel2); border-bottom: 1px solid var(--border); font-size: var(--t-xs); font-weight: 600; color: var(--muted); }
        .ops-grp .c { color: var(--dim); font-weight: 500; }
        .ops-grp .v { margin-left: auto; font-variant-numeric: tabular-nums; }

        .ops-btn { font-family: var(--font-ui); font-size: var(--t-sm); font-weight: 500; border-radius: 999px; padding: 6px 14px; border: 1px solid var(--border2); background: var(--panel); color: var(--text); cursor: pointer; white-space: nowrap; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
        .ops-btn:hover { border-color: var(--accent-border); }
        .ops-btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
        .ops-btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
        .ops-btn.quiet { border-color: transparent; background: none; color: var(--muted); padding: 6px 9px; }
        .ops-btn.quiet:hover { color: var(--text); background: var(--chip); }
        .ops-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
        .ops-btn[disabled] { opacity: .5; cursor: default; }
        .ops-btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }

        .ops-pg { display: flex; align-items: center; gap: 10px; padding: 10px 18px; background: var(--panel2); flex-wrap: wrap; }
        .ops-pg[hidden] { display: none; }
        .ops-pg .info { font-size: var(--t-xs); color: var(--dim); }
        .ops-pg .ctl { margin-left: auto; display: flex; gap: 4px; }
        .ops-pg button { font-family: var(--font-mono); font-size: var(--t-xs); min-width: 30px; height: 30px; border-radius: 999px; border: 1px solid transparent; background: none; color: var(--muted); cursor: pointer; }
        .ops-pg button:hover:not([disabled]) { border-color: var(--border2); color: var(--text); }
        .ops-pg button.on { background: var(--accent); color: var(--on-accent); }
        .ops-pg button[disabled] { opacity: .35; cursor: default; }
        .ops-pg .gap { font-family: var(--font-mono); font-size: var(--t-xs); color: var(--dim); min-width: 18px; text-align: center; align-self: center; }

        @media (max-width: 860px) {
            .ops-stats, .ops-stats.three { grid-template-columns: minmax(0, 1fr); }
            .ops-stat { border-right: 0; border-bottom: 1px solid var(--border); padding-left: 0; }
            .ops-search { width: 100%; margin-left: 0; }
        }
        @media (max-width: 760px) {
            .ops-row, .ops-row.amt-col { grid-template-columns: 3px minmax(0, 1fr) auto; }
            .ops-row .ops-acts { grid-column: 2 / -1; justify-content: flex-start; }
        }

        /* ─── Cards ───────────────────────────────────── */

        .card {
            background: transparent;
            border: 1px solid var(--border);
            border-radius: 14px;
            padding: 20px;
            box-shadow: none;
            transition: border-color 0.18s ease;
        }
        .card:hover { border-color: var(--border2); }
        .card.bare {
            background: transparent;
            border: 0;
            box-shadow: none;
            padding: 0;
        }
        .card.solid {
            background: var(--panel);
            box-shadow: 0 1px 0 rgba(var(--ink-rgb),0.02) inset, 0 8px 28px rgba(0,0,0,0.18);
        }

        /* ─── Modal (shared composer/dialog component) ── */
        .modal-overlay {
            position: fixed;
            inset: 0;
            z-index: 200;
            display: flex;
            align-items: flex-start;
            justify-content: center;
            padding: 10vh 20px 20px;
            background: rgba(6,7,9,0.62);
            backdrop-filter: blur(3px);
            animation: modal-fade 0.16s ease;
        }
        .modal-overlay[hidden] { display: none; }
        @keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
        .modal-card {
            width: 100%;
            max-width: 560px;
            background: var(--panel);
            border: 1px solid var(--border2);
            border-radius: 18px;
            box-shadow: var(--shadow);
            overflow: hidden;
            animation: modal-rise 0.2s cubic-bezier(0.2,0.8,0.2,1);
        }
        @keyframes modal-rise {
            from { opacity: 0; transform: translateY(10px) scale(0.985); }
            to { opacity: 1; transform: none; }
        }
        .modal-head {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            padding: 20px 22px 14px;
        }
        .modal-kicker {
            display: block;
            font-family: var(--font-ui);
            font-size: var(--t-xs);
            color: var(--accent);
            margin-bottom: 5px;
        }
        .modal-head h2 {
            margin: 0;
            font-family: var(--font-display);
            font-optical-sizing: auto;
            font-weight: 600;
            font-size: var(--t-xl);
            letter-spacing: -0.01em;
            color: var(--text);
        }
        .modal-close {
            display: inline-flex; align-items: center; justify-content: center;
            width: 30px; height: 30px;
            border-radius: 8px;
            border: 1px solid var(--border);
            background: transparent;
            color: var(--muted);
            cursor: pointer;
            flex-shrink: 0;
            transition: color 0.14s ease, border-color 0.14s ease, background 0.14s ease;
        }
        .modal-close:hover { color: var(--text); border-color: var(--border2); background: rgba(var(--ink-rgb),0.04); }
        .modal-close i { width: 15px; height: 15px; }

        /* ─── Buttons ─────────────────────────────────── */

        .btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 7px;
            border-radius: 8px;
            padding: 8px 14px;
            font-weight: 600;
            text-decoration: none;
            cursor: pointer;
            border: 1px solid transparent;
            font-family: inherit;
            font-size: var(--t-sm);
            line-height: 1;
            letter-spacing: -0.005em;
            transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease, transform 0.06s ease;
            position: relative;
            white-space: nowrap;
            outline: none;
        }

        .btn i[data-lucide],
        .btn svg {
            width: 14px;
            height: 14px;
            flex-shrink: 0;
        }

        .btn:focus-visible {
            box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent-border);
        }
        .btn:active { transform: scale(0.985); }
        .btn:disabled { opacity: 0.5; cursor: not-allowed; }

        .btn.primary {
            background: var(--accent);
            /* OPS-40096: dark ink, not white. Champagne is a light accent, so white
               text on it fails contrast badly. Matches the avatar treatment. */
            color: var(--on-accent);
            box-shadow: 0 1px 0 rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.1);
        }
        .btn.primary:hover { background: var(--accent-hover); }
        .btn.primary:active { background: var(--accent-active); }

        .btn.ghost {
            background: transparent;
            color: var(--muted);
            border-color: var(--border);
        }
        .btn.ghost:hover {
            background: rgba(var(--ink-rgb),0.04);
            border-color: var(--border2);
            color: var(--text);
        }

        .btn.subtle {
            background: transparent;
            border-color: var(--border);
            color: var(--muted);
        }
        .btn.subtle:hover {
            background: rgba(var(--ink-rgb),0.04);
            border-color: var(--border2);
            color: var(--text);
        }

        .btn.text {
            background: transparent;
            border: 0;
            color: var(--muted);
            padding: 8px 8px;
        }
        .btn.text:hover { color: var(--text); background: rgba(var(--ink-rgb),0.03); }

        .btn.compact { padding: 6px 10px; font-size: var(--t-xs); gap: 5px; }
        .btn.compact i[data-lucide], .btn.compact svg { width: 13px; height: 13px; }

        .btn.danger {
            background: transparent;
            color: var(--danger);
            border-color: rgba(var(--danger-rgb),0.25);
        }
        .btn.danger:hover {
            background: rgba(var(--danger-rgb),0.1);
            border-color: rgba(var(--danger-rgb),0.4);
        }

        /* First field becomes the hero — spans full width with large typography */

        .form-actions {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
            align-items: center;
            justify-content: flex-end;
            padding-top: 16px;
            border-top: 1px solid var(--border);
            margin-top: 20px;
        }
        .form-actions .notice,
        .form-actions .form-error,
        .form-actions > span:not(.btn) {
            margin-right: auto;
            order: 0;
        }
        .form-actions .btn.ghost,
        .form-actions .btn.subtle,
        .form-actions .btn.text { order: 1; }
        .form-actions .btn.primary { order: 2; }

        .form-error {
            color: var(--accent);
            font-size: var(--t-xs);
        }

        /* ─── Pills ───────────────────────────────────── */

        .pill-select,
        .pill,
        .pill-input {
            border: 1px solid var(--border);
            background-color: rgba(var(--ink-rgb),0.05);
            border-radius: 10px;
            padding: 6px 10px;
            font-size: var(--t-sm);
            color: var(--text);
            font-family: inherit;
            transition: border-color 0.15s;
        }
        select.pill-select { padding-right: 28px; }

        /* ─── Tables (polished list) ──────────────────── */

        .table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 8px;
            font-size: var(--t-md);
        }

        .table th,
        .table td {
            text-align: left;
            padding: 14px 12px;
            border-bottom: 1px solid var(--border);
            vertical-align: middle;
        }
        .table th:first-child,
        .table td:first-child { padding-left: 4px; }
        .table th:last-child,
        .table td:last-child { padding-right: 4px; }

        .table th {
            color: var(--muted);
            font-size: var(--t-xs);
            font-weight: 700;
            padding-top: 10px;
            padding-bottom: 10px;
            background: transparent;
        }

        .table tbody tr {
            transition: background-color 0.12s ease;
            contain: layout style;
        }

        .table tbody tr:hover {
            background: rgba(var(--ink-rgb),0.025);
        }

        .table tbody td:first-child {
            font-weight: 600;
            color: var(--text);
            letter-spacing: -0.005em;
        }

        .table tbody td {
            color: var(--muted);
        }

        .table tbody tr:last-child td {
            border-bottom: 0;
        }

        /* ─── Chips ───────────────────────────────────── */

        .chip {
            padding: 2px 8px;
            border-radius: 8px;
            background: var(--chip);
            color: var(--muted);
            border: 1px solid var(--chip-border);
            font-size: var(--t-xs);
            display: inline-block;
            font-weight: 600;
        }

        .chip.subtasks,
        .chip.docs {
            background: var(--chip);
            border-color: var(--chip-border);
            color: var(--muted);
        }

        .chip.code {
            background: var(--accent-soft);
            color: var(--accent);
            border-color: var(--accent-border);
            font-weight: 700;
        }

        .chip.overdue {
            background: rgba(var(--danger-rgb),0.12);
            color: var(--danger);
            border-color: rgba(var(--danger-rgb),0.25);
        }

        .chip.blocked {
            background: rgba(var(--danger-rgb),0.12);
            color: var(--danger);
            border-color: rgba(var(--danger-rgb),0.25);
        }

        .chip.in-progress {
            background: var(--accent-soft);
            color: var(--accent);
            border-color: var(--accent-border);
        }

        /* OPS-2777B — execution badges (derived executionState, never human status).
           Shared so Planning cards and any chip-based surface render them alike. */
        .chip.exec-badge { font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
        .chip.exec-badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
        .chip.exec-running       { background: var(--accent-soft);            color: var(--accent); border-color: var(--accent-border); }
        .chip.exec-review        { background: rgba(var(--warn-rgb),0.14);  color: var(--warn); border-color: rgba(var(--warn-rgb),0.30); }
        .chip.exec-proposal      { background: var(--chip); color: var(--muted); border-color: var(--chip-border); }
        .chip.exec-investigating { background: var(--accent-soft);  color: var(--accent); border-color: var(--accent-border); }
        .chip.exec-failed        { background: rgba(var(--danger-rgb),0.14); color: var(--danger); border-color: rgba(var(--danger-rgb),0.30); }
        .chip.exec-ready         { background: rgba(var(--accent-rgb),0.10);        color: var(--accent); border-color: rgba(var(--accent-rgb),0.25); }

        /* ─── Status & Priority pills ─────────────────── */

        .status-pill {
            font-size: var(--t-xs);
            font-weight: 600;
            padding: 2px 8px;
            border-radius: 999px;
            background: var(--chip);
            color: var(--muted);
            border: 1px solid var(--chip-border);
        }

        .status-pill.overdue {
            background: rgba(var(--orange-rgb),0.12);
            color: var(--orange);
        }

        .status-pill.blocked {
            background: rgba(var(--danger-rgb),0.12);
            color: var(--danger);
        }

        .status-pill.inprogress {
            background: rgba(var(--ok-rgb),0.1);
            color: var(--ok);
        }

        /* ─── Task drawer (shared: today + planning) ──── */

        .drawer {
            position: fixed;
            top: 50%;
            left: 50%;
            width: 980px;
            max-width: 94vw;
            height: min(86vh, 800px);
            background: var(--panel);
            border: 1px solid var(--border);
            box-shadow: var(--shadow);
            border-radius: 18px;
            transform: translate(-50%, -50%) scale(0.98);
            transition: transform 0.2s ease, opacity 0.2s ease;
            display: flex;
            flex-direction: column;
            z-index: 20;
            opacity: 0;
            pointer-events: none;
            color: var(--text);
            overflow: hidden;
        }

        .drawer.open {
            transform: translate(-50%, -50%) scale(1);
            opacity: 1;
            pointer-events: auto;
        }

        #comment-input { margin-top: 12px; }

        .timeline {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .comment-list {
            display: flex;
            flex-direction: column;
            gap: 16px;
        }

        .comment-card {
            border: 0;
            border-bottom: 1px solid var(--border);
            border-radius: 0;
            padding: 14px 0;
            background: transparent;
            box-shadow: none;
        }
        .comment-card:last-child { border-bottom: 0; padding-bottom: 0; }

        .comment-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .comment-author {
            display: flex;
            align-items: center;
            gap: 10px;
            font-weight: 600;
        }

        .comment-actions {
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }

        .comment-delete {
            border: 1px solid rgba(var(--danger-rgb),0.2);
            background: rgba(var(--danger-rgb),0.1);
            color: var(--danger);
            border-radius: 999px;
            padding: 4px 10px;
            font-size: var(--t-xs);
            cursor: pointer;
        }

        .comment-avatar {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            background: var(--accent);
            color: var(--on-accent);
            display: grid;
            place-items: center;
            font-size: var(--t-xs);
            font-weight: 700;
        }

        .comment-body {
            margin-top: 8px;
            color: var(--text);
            line-height: 1.5;
            font-size: var(--t-sm);
        }

        /* Rendered markdown inside a comment. Kept tight so a comment still reads
           as a comment rather than a document. */
        .comment-body > *:first-child { margin-top: 0; }
        .comment-body > *:last-child { margin-bottom: 0; }
        .comment-body p { margin: 0 0 8px; }
        .comment-body ul,
        .comment-body ol { margin: 0 0 8px; padding-left: 20px; }
        .comment-body li { margin: 2px 0; }
        .comment-body h1,
        .comment-body h2,
        .comment-body h3,
        .comment-body h4 { margin: 12px 0 6px; font-size: var(--t-sm); font-weight: 700; line-height: 1.35; }
        .comment-body code {
            font-family: var(--font-mono);
            font-size: var(--t-xs); padding: 1px 5px; border-radius: 5px;
            background: var(--chip); border: 1px solid var(--chip-border);
        }
        .comment-body pre {
            margin: 0 0 8px; padding: 10px 12px; border-radius: 9px; overflow-x: auto;
            background: var(--panel2); border: 1px solid var(--border);
        }
        .comment-body pre code { padding: 0; background: none; border: none; }
        .comment-body blockquote {
            margin: 0 0 8px; padding: 2px 0 2px 11px;
            border-left: 2px solid var(--chip-border); color: var(--muted);
        }
        .comment-body a { color: var(--accent); }
        .comment-body hr { border: none; border-top: 1px solid var(--border); margin: 10px 0; }
        /* Tables scroll inside the comment instead of widening the drawer. */
        .comment-body table {
            display: block; width: max-content; max-width: 100%; overflow-x: auto;
            border-collapse: collapse; margin: 0 0 8px; font-size: var(--t-xs);
        }
        .comment-body th,
        .comment-body td {
            border: 1px solid var(--border); padding: 5px 9px; text-align: left; vertical-align: top;
        }
        .comment-body th { background: var(--panel2); font-weight: 700; }

        .comment-meta {
            font-size: var(--t-xs);
            color: var(--muted);
            margin-top: 8px;
        }

        /* Tags: "@Nora" in a comment wakes that agent; it answers in its own comment,
           tagging back (window.opsTags). */
        .ops-tag { color: var(--accent-deep); background: var(--accent-soft); border-radius: 5px; padding: 0 4px; font-weight: 700; }
        :root[data-theme="dark"] .ops-tag { color: var(--accent); }
        .comment-avatar.agent { background: var(--accent-soft); color: var(--accent-deep); border: 1px solid var(--accent-border); }
        :root[data-theme="dark"] .comment-avatar.agent { color: var(--accent); }
        /* Sized from the panel, never from its text: a long step is cut with "…" instead of
           widening the comment and pushing the panel. */
        .tag-status { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; min-width: 0; width: 100%; contain: inline-size; }
        /* What a tagged agent is doing (opsTags.status): one line, its current step
           shimmering while it works. */
        .tag-line { display: flex; align-items: center; gap: 7px; min-width: 0; height: 20px; font-size: var(--t-xs); color: var(--dim); }
        .tag-line .who { color: var(--muted); font-weight: 600; flex: none; }
        .tag-line .txt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .tag-line svg { width: 13px; height: 13px; margin-left: 1px; flex: none; color: var(--ok); }
        .tag-line .dot { position: relative; width: 7px; height: 7px; margin-left: 5px; border-radius: 50%; flex: none; background: var(--agent); }
        /* A soft ring breathing out of the dot, and a slow light across the step. The list
           only redraws when something changed, so neither restarts mid-way. */
        .tag-line.live .dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--agent); animation: tagRing 1.8s ease-out infinite; }
        @keyframes tagRing { from { transform: scale(1); opacity: .55; } to { transform: scale(2.2); opacity: 0; } }
        .tag-line.live .txt { background: linear-gradient(90deg, var(--muted) 0%, var(--text) 40%, var(--muted) 80%); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: tagIn .4s ease-out, tagLight 2.6s ease-in-out infinite; }
        @keyframes tagIn { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
        @keyframes tagLight { from { background-position: 100% 0; } to { background-position: -150% 0; } }
        .tag-line.bad { color: var(--danger); }
        @media (prefers-reduced-motion: reduce) { .tag-line.live .txt { animation: none; color: var(--text); } .tag-line.live .dot::after { animation: none; display: none; } }
        .tag-acts { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
        .tag-act { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border: 1px solid var(--accent-border); background: var(--panel); border-radius: 10px; padding: 8px 11px; }
        .tag-act .t { flex: 1; min-width: 160px; font-size: var(--t-sm); font-weight: 600; }
        .tag-pick { position: fixed; z-index: 2000; min-width: 220px; background: var(--panel); border: 1px solid var(--border2); border-radius: 10px; box-shadow: var(--shadow); padding: 4px; }
        .tag-pick button { display: flex; align-items: center; gap: 9px; width: 100%; border: 0; background: none; color: var(--text); font: inherit; font-size: var(--t-sm); padding: 6px 8px; border-radius: 7px; cursor: pointer; text-align: left; }
        .tag-pick button.on, .tag-pick button:hover { background: var(--accent-soft); }
        .tag-pick .comment-avatar { width: 22px; height: 22px; font-size: 10px; }
        .tag-pick em { margin-left: auto; font-style: normal; font-size: var(--t-xs); color: var(--dim); }

        .comment-edit {
            margin-top: 10px;
            display: none;
        }

        .comment-edit.open { display: block; }

        .comment-edit textarea {
            width: 100%;
            min-height: 90px;
            border: 1px solid var(--border);
            border-radius: 10px;
            padding: 10px;
            font-family: inherit;
            background: rgba(var(--ink-rgb),0.04);
            color: var(--text);
        }

        .activity-tab {
            border: none;
            background: transparent;
            color: var(--muted);
            font-size: var(--t-sm);
            font-weight: 600;
            padding: 8px 14px 10px;
            border-radius: 0;
            cursor: pointer;
            position: relative;
            transition: color 0.15s ease;
        }
        .activity-tab:hover { color: var(--text); }

        .activity-tab.active {
            background: transparent;
            color: var(--text);
        }
        .activity-tab.active::after {
            content: "";
            position: absolute;
            left: 14px; right: 14px;
            bottom: -1px;
            height: 2px;
            background: var(--accent);
            border-radius: 2px 2px 0 0;
        }

        .activity-panel.hidden { display: none; }

        .drawer .btn.ghost {
            background: rgba(var(--ink-rgb),0.05);
            color: var(--muted);
            border-color: var(--border);
        }

        #comment-input::placeholder { color: var(--dim); }

        .subtask-list {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .subtask-count {
            font-size: var(--t-xs);
            color: var(--muted);
        }

        .subtask-detail {
            border: 1px solid var(--border);
            border-radius: 14px;
            padding: 14px 16px;
            background: var(--panel2);
            display: flex;
            flex-direction: column;
            gap: 12px;
            min-height: 220px;
        }

        .subtask-detail label {
            font-size: var(--t-xs);
            color: var(--muted);
        }

	        .subtask-detail input,
	        .subtask-detail select,
	        .subtask-detail textarea {
	            border: 1px solid var(--border);
	            border-radius: 10px;
	            padding: 8px 10px;
	            font-family: inherit;
	            background-color: rgba(var(--ink-rgb),0.04);
	            color: var(--text);
	        }
	        .subtask-detail select { padding-right: 28px; }

        .subtask-detail textarea { min-height: 90px; }

	        .subtask-input {
	            flex: 1;
	            min-width: 180px;
	            border: 1px solid var(--border);
	            border-radius: 12px;
	            padding: 8px 10px;
	            font-family: inherit;
	            background: rgba(var(--ink-rgb),0.04);
	            color: var(--text);
	        }

        /* ─── Project strip & pills ───────────────────── */

        .project-tabs {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
        }

        /* ─── Quick add / Bulk actions ────────────────── */

        .bulk-actions {
            display: flex;
            align-items: center;
            gap: 12px;
            background: var(--panel);
            border: 1px solid var(--border);
            border-radius: 12px;
            padding: 10px 12px;
            margin-bottom: 14px;
        }

        .bulk-actions.hidden {
            display: none;
        }

        .bulk-actions .count {
            font-size: var(--t-xs);
            color: var(--muted);
        }

        .bulk-actions .actions {
            margin-left: auto;
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
        }

        /* ─── Empty state ─────────────────────────────── */

        .empty-state {
            color: var(--muted);
            font-size: var(--t-sm);
            padding: 20px 0 8px;
            text-align: center;
        }

        /* ─── Misc ────────────────────────────────────── */

        .notice {
            color: var(--muted);
            font-size: var(--t-sm);
            padding: 8px 0;
        }

        /* ─── Skeleton loader ─────────────────────────── */

        .skeleton {
            /* OPS-40096: dark shimmer. The old cream gradient was a light-theme
               leftover and flashed bright white while loading. */
            background: linear-gradient(90deg, var(--panel2) 25%, var(--skeleton-hi) 50%, var(--panel2) 75%);
            background-size: 200% 100%;
            animation: skeleton-shimmer 1.4s ease infinite;
            border-radius: 6px;
        }

        @keyframes skeleton-shimmer {
            0% { background-position: 200% 0; }
            100% { background-position: -200% 0; }
        }

        /* ─── Week view helpers ───────────────────────── */

        .week-nav {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        /* ─── Bottom nav (mobile only, hidden by default) ── */

        .bottom-nav {
            display: none;
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            z-index: 200;
            background: var(--panel);
            border-top: 1px solid var(--border);
            padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
            justify-content: space-around;
            align-items: center;
        }

        .bottom-nav-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 2px;
            padding: 4px 12px;
            color: var(--muted);
            text-decoration: none;
            font-size: var(--t-xs);
            font-weight: 600;
            letter-spacing: 0.02em;
            background: none;
            border: none;
            cursor: pointer;
            transition: color 0.15s;
            min-width: 52px;
        }

        .bottom-nav-item svg {
            width: 22px;
            height: 22px;
            stroke-width: 1.75;
        }

        .bottom-nav-item.active,
        .bottom-nav-item:hover {
            color: var(--accent);
        }

        /* ─── More menu ─────────────────────────────────── */

        .mobile-more-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.35);
            z-index: 300;
        }

        .mobile-more-overlay.open {
            display: block;
        }

        .mobile-more-menu {
            position: fixed;
            bottom: calc(64px + env(safe-area-inset-bottom));
            left: 12px;
            right: 12px;
            z-index: 310;
            background: var(--panel);
            border: 1px solid var(--border);
            border-radius: 16px;
            padding: 16px;
            box-shadow: 0 8px 32px rgba(0,0,0,0.14);
            transform: translateY(20px);
            opacity: 0;
            pointer-events: none;
            transition: transform 0.2s ease, opacity 0.2s ease;
        }

        .mobile-more-menu.open {
            transform: translateY(0);
            opacity: 1;
            pointer-events: auto;
        }

        .more-menu-title {
            font-size: var(--t-xs);
            font-weight: 700;
            color: var(--muted);
            margin-bottom: 12px;
        }

        .more-menu-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 8px;
        }

        .more-menu-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 6px;
            padding: 12px 6px;
            background: var(--bg);
            border-radius: 10px;
            color: var(--text);
            text-decoration: none;
            font-size: var(--t-xs);
            font-weight: 600;
            text-align: center;
            transition: background 0.15s, color 0.15s;
        }

        button.more-menu-item { border: 0; font-family: inherit; cursor: pointer; }

        .more-menu-item svg {
            width: 20px;
            height: 20px;
            stroke-width: 1.75;
        }

        .more-menu-item.active,
        .more-menu-item:hover {
            background: var(--accent-soft);
            color: var(--accent);
        }

        /* ─── Mobile breakpoints ─────────────────────────── */

        @media (max-width: 980px) {
            .app {
                grid-template-columns: 1fr;
            }

            .sidebar {
                display: none;
            }

            .sidebar-toggle {
                display: none;
            }

            .ops-grip {
                display: none;
            }

            .bottom-nav {
                display: flex;
            }

            .main {
                padding: 18px 16px calc(76px + env(safe-area-inset-bottom));
            }
        }

        @media (max-width: 700px) {

            /* Drawers → bottom sheets */
            .drawer {
                top: auto !important;
                right: 0 !important;
                bottom: 0 !important;
                left: 0 !important;
                width: 100% !important;
                max-width: 100% !important;
                height: 85vh !important;
                border-radius: 16px 16px 0 0 !important;
                transform: translateY(100%) !important;
            }

            .drawer.open {
                transform: translateY(0) !important;
            }

            .drawer::before {
                content: '';
                display: block;
                width: 36px;
                height: 4px;
                background: var(--border);
                border-radius: 2px;
                margin: 10px auto 4px;
            }

            /* The planning kanban scrolls sideways on a phone.
               OPS-41974: scoped to #board (the planning board's own id). It used to
               match any .board, which now includes the Work pipeline, and the
               .deal-board/.deal-column half went dead with the old deals page. */
            #board {
                flex-direction: row !important;
                overflow-x: auto;
                scroll-snap-type: x mandatory;
                -webkit-overflow-scrolling: touch;
                padding-bottom: 8px;
            }

        }

        /* ── Toasts ─────────────────────────────────────
           Shared UI, so it lives here per the CSS convention. Execution
           Control raises these from Operations; the rules were left behind
           when it moved off the dashboard. */
        .db-toast-container {
            position: fixed; right: 24px; bottom: 24px; z-index: 1000;
            display: flex; flex-direction: column; gap: 10px; pointer-events: none;
        }
        .db-toast {
            pointer-events: auto; position: relative;
            min-width: 260px; max-width: 380px;
            background: var(--panel2); border: 1px solid var(--border);
            border-left: 2px solid var(--muted); border-radius: 12px;
            padding: 12px 34px 12px 14px; box-shadow: var(--shadow);
            opacity: 0; transform: translateY(6px);
            transition: opacity .18s ease, transform .18s ease;
        }
        .db-toast.show { opacity: 1; transform: translateY(0); }
        .db-toast.success { border-left-color: var(--ok); }
        .db-toast.error   { border-left-color: var(--danger); }
        .db-toast.info    { border-left-color: var(--accent); }
        .db-toast-title { font-size: var(--t-sm); font-weight: 600; color: var(--text); }
        .db-toast-line  { font-size: var(--t-xs); color: var(--muted); margin-top: 3px; line-height: 1.45; }
        .db-toast-close {
            position: absolute; top: 8px; right: 9px;
            background: none; border: 0; color: var(--dim);
            font-size: var(--t-md); line-height: 1; cursor: pointer; padding: 2px 4px;
        }
        .db-toast-close:hover { color: var(--text); }

        /* ── Inline ask (OPS-42119) ─────────────────────────────────────────
           Replaces window.confirm and window.prompt. Those cannot be styled,
           carry the browser's chrome and the page's URL, and land in the middle
           of a considered layout looking like an error. This is the same panel,
           border, radius and buttons as the rest of the system.

           z-index 380: above a page's own dialog layer (350), below the command
           palette (400) and the toast rail (1000), both of which have to stay
           readable on top of anything. */
        .ops-ask {
            position: fixed; inset: 0; z-index: 380;
            display: grid; place-items: center; padding: 24px;
            background: rgba(5,6,8,.72);
            opacity: 0; transition: opacity .14s ease;
        }
        .ops-ask.in { opacity: 1; }

        .ops-ask-panel {
            width: min(440px, 100%);
            background: var(--panel);
            border: 1px solid var(--border2);
            border-radius: 14px;
            padding: 22px;
            box-shadow: 0 24px 60px rgba(0,0,0,.5);
            transform: translateY(4px) scale(.99);
            transition: transform .14s ease;
        }
        .ops-ask.in .ops-ask-panel { transform: none; }

        .ops-ask-title {
            font-size: var(--t-md); font-weight: 600; color: var(--text);
            line-height: 1.4; margin: 0 0 6px;
        }
        .ops-ask-body {
            font-size: var(--t-sm); color: var(--muted); line-height: 1.55; margin: 0;
        }
        .ops-ask-label {
            display: block; font-size: var(--t-xs); color: var(--dim); margin: 16px 0 6px;
        }
        .ops-ask-input {
            width: 100%; box-sizing: border-box;
            background: var(--panel2); color: var(--text);
            border: 1px solid var(--border); border-radius: 8px;
            padding: 9px 11px; font-size: var(--t-sm); font-family: inherit;
            resize: vertical;
        }
        .ops-ask-input:focus { outline: none; border-color: var(--accent); }
        .ops-ask-note { font-size: var(--t-xs); color: var(--danger); margin: 7px 0 0; min-height: 14px; }
        .ops-ask-helper { margin: 2px 0 10px; }
        .ops-ask-helped { margin: 8px 0 0; padding: 10px 12px; border-radius: 8px; background: var(--panel2); border: 1px solid var(--border); font-size: var(--t-xs); color: var(--muted); max-height: 160px; overflow-y: auto; white-space: pre-wrap; }
        .ops-ask-helped[hidden] { display: none; }

        .ops-ask-foot { display: flex; gap: 8px; margin-top: 18px; }
        .ops-ask-foot .sp { flex: 1; }
        .ops-ask-btn {
            padding: 9px 14px; border-radius: 8px; border: 1px solid transparent;
            font-size: var(--t-sm); font-weight: 600; line-height: 1;
            font-family: inherit; cursor: pointer;
        }
        .ops-ask-btn.ghost { background: transparent; color: var(--muted); border-color: var(--border); }
        .ops-ask-btn.ghost:hover { background: rgba(var(--ink-rgb),.04); color: var(--text); border-color: var(--border2); }
        .ops-ask-btn.go { background: var(--accent); color: var(--on-accent); }
        .ops-ask-btn.go:hover { filter: brightness(1.06); }
        .ops-ask-btn.danger { background: var(--danger); color: #fff; }
        .ops-ask-btn.danger:hover { filter: brightness(1.06); }
        .ops-ask-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

        @media (prefers-reduced-motion: reduce) {
            .ops-ask, .ops-ask-panel { transition: none; }
        }
        /* 2 Nov: no slide while the saved sidebar state is applied at load. */
        .app.no-anim, .app.no-anim * { transition: none !important; }
