/* ═══════════════════════════════════════════════════════════════
   TC Manager — Design System
   ─────────────────────────────────────────────────────────────
   All colours are CSS variables. No hard-coded hex values outside
   of the :root / [data-theme] blocks.
═══════════════════════════════════════════════════════════════ */

/* ── Light (default) ────────────────────────────────────────── */
:root {
  /* Backgrounds */
  --bg:          #f4f6fb;
  --bg-top:      #f8faff;
  --panel:       #ffffff;
  --panel-alt:   #f7f9fc;
  --panel-soft:  #f0f4ff;

  /* Text */
  --text:        #111827;
  --muted:       #6b7a96;
  --subtle:      #9aabbd;

  /* Borders */
  --border:      #e1e6f0;
  --border-soft: #eef1f8;
  --border-focus: #349a9d;

  /* Accent — TestForge teal, matching the workspace navigation */
  --accent:      #096b70;
  --accent-soft: #e8f4f3;
  --accent-mid:  #b8dedb;
  --nav-active:  #096b70;

  /* Semantic colours */
  --green:       #16a34a;
  --green-soft:  rgba(22, 163, 74,  .12);
  --red:         #dc2626;
  --red-soft:    rgba(220, 38, 38,  .12);
  --amber:       #d97706;
  --amber-soft:  rgba(217, 119, 6,  .13);
  --blue:        #2563eb;
  --blue-soft:   rgba(37, 99, 235,  .12);
  --purple:      #7c3aed;
  --purple-soft: rgba(124, 58, 237, .12);

  /* Sidebar */
  --sidebar-start:            #0f2340;
  --sidebar-end:              #162d4a;
  --sidebar-text:             rgba(255,255,255,.92);
  --sidebar-text-muted:       rgba(255,255,255,.62);
  --sidebar-text-soft:        rgba(255,255,255,.42);
  --sidebar-button:           rgba(255,255,255,.75);
  --sidebar-hover:            rgba(255,255,255,.07);
  --sidebar-hover-text:       #ffffff;
  --sidebar-icon-bg:          rgba(255,255,255,.08);
  --sidebar-border:           rgba(255,255,255,.09);
  --sidebar-signout-border:   rgba(255,255,255,.13);
  --sidebar-signout-hover:    rgba(255,255,255,.07);
  --sidebar-signout-text:     rgba(255,255,255,.58);
  --sidebar-signout-hover-text: rgba(255,255,255,.9);
  --sidebar-active-bg:        rgba(9, 107, 112, .22);
  --sidebar-active-ring:      rgba(119, 209, 207, .32);

  /* Component tokens */
  --shadow:       0 4px 6px -1px rgba(15,23,42,.06), 0 10px 24px rgba(15,23,42,.07);
  --shadow-lg:    0 8px 16px -2px rgba(15,23,42,.08), 0 20px 44px rgba(15,23,42,.09);
  --shadow-inset: inset 0 1px 2px rgba(15,23,42,.04);
  --radius:       18px;
  --radius-sm:    12px;
  --radius-xs:    8px;
  --radius-pill:  999px;

  /* Table */
  --table-line:       #eaeff7;
  --table-head-bg:    var(--panel-alt);
  --table-row-hover:  #f1f8f7;
  --table-row-active: #e8f4f3;

  /* Section rows in test-case table */
  --section-row-bg:   #eef2f8;
  --section-row-top:  #dde3ef;

  /* Form / step backgrounds */
  --step-bg:     #f8faff;
  --code-bg:     #0f172a;
  --code-text:   #dbeafe;

  /* Icon button */
  --icon-btn-bg:    var(--panel-alt);
  --icon-btn-hover: var(--border);
  --icon-btn-color: var(--muted);

  /* Priority badge tokens */
  --pri-low-bg:      var(--panel-alt);
  --pri-low-color:   var(--muted);
  --pri-medium-bg:   var(--blue-soft);
  --pri-medium-color:var(--blue);
  --pri-high-bg:     var(--amber-soft);
  --pri-high-color:  var(--amber);
  --pri-critical-bg: var(--red-soft);
  --pri-critical-color: var(--red);

  /* Breadcrumb */
  --crumb:         #6d7d92;
  --crumb-sep:     #9aa8ba;
  --crumb-current: #1f3f5b;

  /* Surfaces */
  --surface-soft:   rgba(255,255,255,.88);
  --surface-strong: rgba(255,255,255,.93);

  /* Badge text */
  --badge-text: #ffffff;

  /* Nav */
  --nav:      #101828;
  --nav-soft: #1f2937;
}

/* ── Dark ───────────────────────────────────────────────────── */
body[data-theme="dark"] {
  --bg:          #080f1e;
  --bg-top:      #0d1528;
  --panel:       #0f1a30;
  --panel-alt:   #162038;
  --panel-soft:  #1a2540;

  --text:        #e2eaf8;
  --muted:       #8fa5c5;
  --subtle:      #6882a4;

  --border:      #1e2f4a;
  --border-soft: #182845;
  --border-focus: rgba(124, 156, 255, .50);

  --accent:      #7c9cff;
  --accent-soft: rgba(124,156,255,.14);
  --accent-mid:  rgba(124,156,255,.24);
  --nav-active:  #60a5fa;

  --green:       #22c55e;
  --green-soft:  rgba(34, 197, 94,  .15);
  --red:         #f87171;
  --red-soft:    rgba(248, 113, 113,.15);
  --amber:       #fbbf24;
  --amber-soft:  rgba(251,191, 36,  .15);
  --blue:        #60a5fa;
  --blue-soft:   rgba(96, 165, 250, .15);
  --purple:      #a78bfa;
  --purple-soft: rgba(167,139,250,  .15);

  --sidebar-start: #06101e;
  --sidebar-end:   #0c1a2e;
  --sidebar-text:           #dde8f8;
  --sidebar-text-muted:     #8fa5c5;
  --sidebar-text-soft:      #6882a4;
  --sidebar-button:         #c0cfec;
  --sidebar-hover:          rgba(124,156,255,.10);
  --sidebar-hover-text:     #f6f9ff;
  --sidebar-icon-bg:        rgba(124,156,255,.10);
  --sidebar-border:         rgba(156,176,207,.12);
  --sidebar-signout-border: rgba(156,176,207,.16);
  --sidebar-signout-hover:  rgba(124,156,255,.10);
  --sidebar-signout-text:   #a8bed9;
  --sidebar-signout-hover-text: #f0f6ff;
  --sidebar-active-bg:  rgba(124,156,255,.16);
  --sidebar-active-ring:rgba(124,156,255,.28);

  --shadow:    0 4px 6px -1px rgba(2,6,23,.20), 0 10px 24px rgba(2,6,23,.28);
  --shadow-lg: 0 8px 16px -2px rgba(2,6,23,.25), 0 20px 44px rgba(2,6,23,.35);

  --table-line:       #1b2c44;
  --table-head-bg:    var(--panel-alt);
  --table-row-hover:  rgba(124,156,255,.05);
  --table-row-active: rgba(124,156,255,.10);

  --section-row-bg:  #192438;
  --section-row-top: #1e2f48;

  --step-bg:   #111f38;
  --code-bg:   #060e1c;
  --code-text: #dbe7ff;

  --icon-btn-bg:    var(--panel-alt);
  --icon-btn-hover: var(--border);
  --icon-btn-color: var(--muted);

  --pri-low-bg:      var(--panel-alt);
  --pri-low-color:   var(--muted);
  --pri-medium-bg:   var(--blue-soft);
  --pri-medium-color:var(--blue);
  --pri-high-bg:     var(--amber-soft);
  --pri-high-color:  var(--amber);
  --pri-critical-bg: var(--red-soft);
  --pri-critical-color: var(--red);

  --crumb:         #8ea2c3;
  --crumb-sep:     #6f84a7;
  --crumb-current: #dbe7ff;

  --surface-soft:   rgba(15,26,48,.92);
  --surface-strong: rgba(22,34,58,.95);
  --badge-text:     #060e1c;

  --nav:      #050c1a;
  --nav-soft: #0d1528;
}

/* ── Ocean ──────────────────────────────────────────────────── */
body[data-theme="ocean"] {
  --bg:          #eaf6fb;
  --bg-top:      #f0faff;
  --panel:       #ffffff;
  --panel-alt:   #f0faff;
  --panel-soft:  #e6f6fd;
  --text:        #0d2d42;
  --muted:       #4f7187;
  --subtle:      #80a4b8;
  --border:      #c8e6f2;
  --border-soft: #dff2f9;
  --border-focus: rgba(14,116,144,.45);
  --accent:      #0e7490;
  --accent-soft: rgba(14,116,144,.10);
  --accent-mid:  rgba(14,116,144,.20);
  --nav-active:  #0891b2;
  --green:       #059669;
  --green-soft:  rgba(5,150,105,.12);
  --red:         #dc2626;
  --red-soft:    rgba(220,38,38,.12);
  --amber:       #d97706;
  --amber-soft:  rgba(217,119,6,.13);
  --blue:        #0284c7;
  --blue-soft:   rgba(2,132,199,.12);
  --sidebar-start: #0c2d3f;
  --sidebar-end:   #103d55;
  --sidebar-active-bg:  rgba(14,116,144,.22);
  --sidebar-active-ring:rgba(8,145,178,.32);
  --shadow:    0 4px 6px -1px rgba(13,44,63,.07), 0 10px 24px rgba(13,44,63,.09);
  --shadow-lg: 0 8px 16px -2px rgba(13,44,63,.09), 0 20px 44px rgba(13,44,63,.10);
  --table-head-bg:    var(--panel-alt);
  --table-row-hover:  rgba(14,116,144,.04);
  --table-row-active: rgba(14,116,144,.09);
  --section-row-bg:  #dff2f9;
  --section-row-top: #c8e6f2;
  --step-bg:    #f0faff;
  --crumb:      #4f7187;
  --crumb-sep:  #80a4b8;
  --crumb-current: #0d2d42;
  --pri-medium-color: var(--blue);
  --pri-medium-bg:    var(--blue-soft);
}

/* ── Sunset ─────────────────────────────────────────────────── */
body[data-theme="sunset"] {
  --bg:          #fff5ef;
  --bg-top:      #fffaf6;
  --panel:       #fffdfb;
  --panel-alt:   #fff7f1;
  --panel-soft:  #ffede0;
  --text:        #3d1f18;
  --muted:       #8b5e52;
  --subtle:      #b08478;
  --border:      #efd8ce;
  --border-soft: #f7e8e0;
  --border-focus: rgba(234,88,12,.40);
  --accent:      #c2410c;
  --accent-soft: rgba(194,65,12,.10);
  --accent-mid:  rgba(194,65,12,.20);
  --nav-active:  #ea580c;
  --green:       #16a34a;
  --green-soft:  rgba(22,163,74,.12);
  --red:         #dc2626;
  --red-soft:    rgba(220,38,38,.12);
  --amber:       #d97706;
  --amber-soft:  rgba(217,119,6,.13);
  --blue:        #2563eb;
  --blue-soft:   rgba(37,99,235,.12);
  --sidebar-start: #3a1c18;
  --sidebar-end:   #501f18;
  --sidebar-active-bg:  rgba(194,65,12,.20);
  --sidebar-active-ring:rgba(234,88,12,.30);
  --shadow:    0 4px 6px -1px rgba(97,45,22,.07), 0 10px 24px rgba(97,45,22,.09);
  --shadow-lg: 0 8px 16px -2px rgba(97,45,22,.09), 0 20px 44px rgba(97,45,22,.10);
  --table-head-bg:    var(--panel-alt);
  --table-row-hover:  rgba(194,65,12,.04);
  --table-row-active: rgba(194,65,12,.09);
  --section-row-bg:  #fff0e6;
  --section-row-top: #efd8ce;
  --step-bg:    #fffaf6;
  --crumb:      #8b5e52;
  --crumb-sep:  #b08478;
  --crumb-current: #3d1f18;
}

/* ── Forest ─────────────────────────────────────────────────── */
body[data-theme="forest"] {
  --bg:          #f2f7f2;
  --bg-top:      #f7fbf7;
  --panel:       #ffffff;
  --panel-alt:   #f4fbf4;
  --panel-soft:  #e8f5e8;
  --text:        #16301f;
  --muted:       #527558;
  --subtle:      #839c87;
  --border:      #d4e8d4;
  --border-soft: #e6f3e6;
  --border-focus: rgba(22,163,74,.40);
  --accent:      #15803d;
  --accent-soft: rgba(21,128,61,.10);
  --accent-mid:  rgba(21,128,61,.20);
  --nav-active:  #16a34a;
  --green:       #15803d;
  --green-soft:  rgba(21,128,61,.12);
  --red:         #dc2626;
  --red-soft:    rgba(220,38,38,.12);
  --amber:       #ca8a04;
  --amber-soft:  rgba(202,138,4,.13);
  --blue:        #2563eb;
  --blue-soft:   rgba(37,99,235,.12);
  --sidebar-start: #0f2618;
  --sidebar-end:   #163523;
  --sidebar-active-bg:  rgba(21,128,61,.22);
  --sidebar-active-ring:rgba(22,163,74,.32);
  --shadow:    0 4px 6px -1px rgba(24,48,36,.07), 0 10px 24px rgba(24,48,36,.09);
  --shadow-lg: 0 8px 16px -2px rgba(24,48,36,.09), 0 20px 44px rgba(24,48,36,.10);
  --table-head-bg:    var(--panel-alt);
  --table-row-hover:  rgba(21,128,61,.04);
  --table-row-active: rgba(21,128,61,.09);
  --section-row-bg:  #e8f5e8;
  --section-row-top: #d4e8d4;
  --step-bg:    #f4fbf4;
  --crumb:      #527558;
  --crumb-sep:  #839c87;
  --crumb-current: #16301f;
}

/* ── Midnight ───────────────────────────────────────────────── */
body[data-theme="midnight"] {
  --bg:          #040814;
  --bg-top:      #09101f;
  --panel:       #0b1326;
  --panel-alt:   #111a31;
  --panel-soft:  #15203a;
  --text:        #e8eefc;
  --muted:       #8ea1c1;
  --subtle:      #6b7fa1;
  --border:      #1a2947;
  --border-soft: #13213c;
  --border-focus: rgba(56,189,248,.42);
  --accent:      #38bdf8;
  --accent-soft: rgba(56,189,248,.12);
  --accent-mid:  rgba(56,189,248,.22);
  --nav-active:  #38bdf8;
  --green:       #34d399;
  --green-soft:  rgba(52,211,153,.14);
  --red:         #fb7185;
  --red-soft:    rgba(251,113,133,.14);
  --amber:       #fbbf24;
  --amber-soft:  rgba(251,191,36,.15);
  --blue:        #60a5fa;
  --blue-soft:   rgba(96,165,250,.15);
  --purple:      #8b5cf6;
  --purple-soft: rgba(139,92,246,.15);
  --sidebar-start: #030611;
  --sidebar-end:   #081225;
  --sidebar-active-bg:  rgba(56,189,248,.18);
  --sidebar-active-ring:rgba(56,189,248,.28);
  --shadow:    0 4px 6px -1px rgba(2,6,23,.24), 0 10px 24px rgba(2,6,23,.34);
  --shadow-lg: 0 8px 16px -2px rgba(2,6,23,.28), 0 20px 44px rgba(2,6,23,.42);
  --table-head-bg:    var(--panel-alt);
  --table-row-hover:  rgba(56,189,248,.05);
  --table-row-active: rgba(56,189,248,.10);
  --section-row-bg:  #13203a;
  --section-row-top: #1a2947;
  --step-bg:    #101b33;
  --code-bg:    #030813;
  --code-text:  #d9f2ff;
  --crumb:      #8ea1c1;
  --crumb-sep:  #64748b;
  --crumb-current: #e8eefc;
  --surface-soft:   rgba(11,19,38,.92);
  --surface-strong: rgba(17,26,49,.95);
  --badge-text: #04101f;
  --nav:      #040814;
  --nav-soft: #09101f;
}

/* ── Graphite ───────────────────────────────────────────────── */
body[data-theme="graphite"] {
  --bg:          #111317;
  --bg-top:      #171a20;
  --panel:       #1a1d24;
  --panel-alt:   #22262f;
  --panel-soft:  #2a2f39;
  --text:        #eef2f7;
  --muted:       #9ca7b8;
  --subtle:      #727d90;
  --border:      #313743;
  --border-soft: #272d38;
  --border-focus: rgba(148,163,184,.40);
  --accent:      #93c5fd;
  --accent-soft: rgba(147,197,253,.12);
  --accent-mid:  rgba(147,197,253,.22);
  --nav-active:  #93c5fd;
  --green:       #4ade80;
  --green-soft:  rgba(74,222,128,.14);
  --red:         #f87171;
  --red-soft:    rgba(248,113,113,.14);
  --amber:       #fbbf24;
  --amber-soft:  rgba(251,191,36,.14);
  --blue:        #93c5fd;
  --blue-soft:   rgba(147,197,253,.14);
  --purple:      #c084fc;
  --purple-soft: rgba(192,132,252,.14);
  --sidebar-start: #0f1115;
  --sidebar-end:   #181b21;
  --sidebar-active-bg:  rgba(147,197,253,.16);
  --sidebar-active-ring:rgba(147,197,253,.24);
  --shadow:    0 4px 6px -1px rgba(0,0,0,.24), 0 10px 24px rgba(0,0,0,.28);
  --shadow-lg: 0 8px 16px -2px rgba(0,0,0,.28), 0 20px 44px rgba(0,0,0,.34);
  --table-head-bg:    var(--panel-alt);
  --table-row-hover:  rgba(147,197,253,.04);
  --table-row-active: rgba(147,197,253,.08);
  --section-row-bg:  #232833;
  --section-row-top: #313743;
  --step-bg:    #20242c;
  --code-bg:    #0d0f13;
  --code-text:  #dbeafe;
  --crumb:      #9ca7b8;
  --crumb-sep:  #727d90;
  --crumb-current: #eef2f7;
  --surface-soft:   rgba(26,29,36,.92);
  --surface-strong: rgba(34,38,47,.95);
  --badge-text: #0f1115;
  --nav:      #0f1115;
  --nav-soft: #181b21;
}

/* ── Nord ───────────────────────────────────────────────────── */
body[data-theme="nord"] {
  --bg:          #2b313c;
  --bg-top:      #313946;
  --panel:       #3b4252;
  --panel-alt:   #434c5e;
  --panel-soft:  #4c566a;
  --text:        #eceff4;
  --muted:       #c0c7d6;
  --subtle:      #a7b1c2;
  --border:      #566173;
  --border-soft: #4c566a;
  --border-focus: rgba(136,192,208,.42);
  --accent:      #88c0d0;
  --accent-soft: rgba(136,192,208,.12);
  --accent-mid:  rgba(136,192,208,.24);
  --nav-active:  #88c0d0;
  --green:       #a3be8c;
  --green-soft:  rgba(163,190,140,.14);
  --red:         #bf616a;
  --red-soft:    rgba(191,97,106,.14);
  --amber:       #ebcb8b;
  --amber-soft:  rgba(235,203,139,.14);
  --blue:        #81a1c1;
  --blue-soft:   rgba(129,161,193,.14);
  --purple:      #b48ead;
  --purple-soft: rgba(180,142,173,.14);
  --sidebar-start: #242933;
  --sidebar-end:   #2e3440;
  --sidebar-active-bg:  rgba(136,192,208,.16);
  --sidebar-active-ring:rgba(136,192,208,.26);
  --shadow:    0 4px 6px -1px rgba(17,24,39,.18), 0 10px 24px rgba(17,24,39,.22);
  --shadow-lg: 0 8px 16px -2px rgba(17,24,39,.22), 0 20px 44px rgba(17,24,39,.28);
  --table-head-bg:    var(--panel-alt);
  --table-row-hover:  rgba(136,192,208,.05);
  --table-row-active: rgba(136,192,208,.09);
  --section-row-bg:  #434c5e;
  --section-row-top: #566173;
  --step-bg:    #3f4758;
  --code-bg:    #242933;
  --code-text:  #e5e9f0;
  --crumb:      #c0c7d6;
  --crumb-sep:  #a7b1c2;
  --crumb-current: #eceff4;
  --surface-soft:   rgba(59,66,82,.92);
  --surface-strong: rgba(67,76,94,.95);
  --badge-text: #2b313c;
  --nav:      #242933;
  --nav-soft: #2e3440;
}

/* ── OLED ───────────────────────────────────────────────────── */
body[data-theme="oled"] {
  --bg:          #020202;
  --bg-top:      #060606;
  --panel:       #0a0a0a;
  --panel-alt:   #121212;
  --panel-soft:  #171717;
  --text:        #f5f5f5;
  --muted:       #a3a3a3;
  --subtle:      #737373;
  --border:      #242424;
  --border-soft: #171717;
  --border-focus: rgba(56,189,248,.34);
  --accent:      #22d3ee;
  --accent-soft: rgba(34,211,238,.12);
  --accent-mid:  rgba(34,211,238,.22);
  --nav-active:  #22d3ee;
  --green:       #4ade80;
  --green-soft:  rgba(74,222,128,.14);
  --red:         #fb7185;
  --red-soft:    rgba(251,113,133,.14);
  --amber:       #fbbf24;
  --amber-soft:  rgba(251,191,36,.14);
  --blue:        #38bdf8;
  --blue-soft:   rgba(56,189,248,.14);
  --purple:      #a78bfa;
  --purple-soft: rgba(167,139,250,.14);
  --sidebar-start: #010101;
  --sidebar-end:   #080808;
  --sidebar-active-bg:  rgba(34,211,238,.14);
  --sidebar-active-ring:rgba(34,211,238,.24);
  --shadow:    0 4px 6px -1px rgba(0,0,0,.38), 0 12px 28px rgba(0,0,0,.48);
  --shadow-lg: 0 8px 18px -2px rgba(0,0,0,.44), 0 24px 52px rgba(0,0,0,.58);
  --table-head-bg:    var(--panel-alt);
  --table-row-hover:  rgba(34,211,238,.04);
  --table-row-active: rgba(34,211,238,.08);
  --section-row-bg:  #111111;
  --section-row-top: #1d1d1d;
  --step-bg:    #101010;
  --code-bg:    #000000;
  --code-text:  #e0fbff;
  --crumb:      #a3a3a3;
  --crumb-sep:  #737373;
  --crumb-current: #f5f5f5;
  --surface-soft:   rgba(10,10,10,.92);
  --surface-strong: rgba(18,18,18,.96);
  --badge-text: #020202;
  --nav:      #020202;
  --nav-soft: #080808;
}

/* ── Night Ops ─────────────────────────────────────────────── */
body[data-theme="nightops"] {
  --bg:          #041018;
  --bg-top:      #071720;
  --panel:       #0a1823;
  --panel-alt:   #102231;
  --panel-soft:  #143043;
  --text:        #e6f4ff;
  --muted:       #8fb6c9;
  --subtle:      #64879a;
  --border:      #1a3446;
  --border-soft: #102636;
  --border-focus: rgba(56,189,248,.44);
  --accent:      #38bdf8;
  --accent-soft: rgba(56,189,248,.14);
  --accent-mid:  rgba(56,189,248,.24);
  --nav-active:  #38bdf8;
  --green:       #34d399;
  --green-soft:  rgba(52,211,153,.14);
  --red:         #fb7185;
  --red-soft:    rgba(251,113,133,.14);
  --amber:       #fbbf24;
  --amber-soft:  rgba(251,191,36,.15);
  --blue:        #38bdf8;
  --blue-soft:   rgba(56,189,248,.16);
  --purple:      #8b5cf6;
  --purple-soft: rgba(139,92,246,.15);
  --sidebar-start: #030b11;
  --sidebar-end:   #0a1a25;
  --sidebar-active-bg:  rgba(56,189,248,.18);
  --sidebar-active-ring:rgba(56,189,248,.28);
  --shadow:    0 4px 6px -1px rgba(1,10,18,.24), 0 10px 24px rgba(1,10,18,.34);
  --shadow-lg: 0 8px 16px -2px rgba(1,10,18,.28), 0 20px 44px rgba(1,10,18,.42);
  --table-head-bg:    var(--panel-alt);
  --table-row-hover:  rgba(56,189,248,.05);
  --table-row-active: rgba(56,189,248,.10);
  --section-row-bg:  #112738;
  --section-row-top: #1a3446;
  --step-bg:    #102231;
  --code-bg:    #020b12;
  --code-text:  #d9f6ff;
  --crumb:      #8fb6c9;
  --crumb-sep:  #64879a;
  --crumb-current: #e6f4ff;
  --surface-soft:   rgba(10,24,35,.92);
  --surface-strong: rgba(16,34,49,.95);
  --badge-text: #041018;
  --nav:      #041018;
  --nav-soft: #071720;
}

/* ═══════════════════════════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }
html, body, #root { height: 100%; }
html { overflow-x: hidden; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background:
    radial-gradient(ellipse at 80% 0%, var(--accent-soft), transparent 32%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg) 100%);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, textarea, select { font: inherit; }
img, video { max-width: 100%; height: auto; }

/* ═══════════════════════════════════════════════════════════════
   APP SHELL
═══════════════════════════════════════════════════════════════ */
.app-shell {
  min-height: 100%;
  display: grid;
  grid-template-columns: 272px 1fr;
}
/* Grid items default to min-width:auto — a wide child (nav strip, table)
   would otherwise blow the track past the viewport on small screens */
.app-shell > * { min-width: 0; }
.nav-list { min-width: 0; }

/* ═══════════════════════════════════════════════════════════════
   SIDEBAR
═══════════════════════════════════════════════════════════════ */
.sidebar {
  background: linear-gradient(180deg, var(--sidebar-start) 0%, var(--sidebar-end) 100%);
  color: var(--sidebar-text);
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}
.brand {
  padding: 6px 10px 14px;
  border-bottom: 1px solid var(--sidebar-border);
}
.brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--nav-active), var(--accent));
  color: var(--badge-text);
  font-weight: 800;
  font-size: .84rem;
  margin-bottom: 11px;
}
.brand h1 { margin: 0; font-size: 1.05rem; font-weight: 700; }
.brand p  { margin: 5px 0 0; color: var(--sidebar-text-muted); font-size: .88rem; }
.brand-logo-image {
  width: 44px; height: 44px; border-radius: 10px; object-fit: contain;
  background: rgba(255,255,255,.92); padding: 5px;
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
}
.brand-button {
  width: 100%; border: 0; background: transparent; text-align: left;
  cursor: pointer; color: var(--sidebar-text);
  transition: opacity .15s;
}
.brand-button:hover { opacity: .92; }

.nav-list { display: flex; flex-direction: column; gap: 4px; }
.nav-btn {
  width: 100%; border: 0; background: transparent; color: var(--sidebar-button);
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 12px; cursor: pointer;
  text-align: left; font-size: .9rem; font-weight: 500;
  transition: background .14s ease, color .14s ease;
}
.nav-btn:hover {
  background: var(--sidebar-hover);
  color: var(--sidebar-hover-text);
}
.nav-btn.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-hover-text);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--sidebar-active-ring);
}
.nav-btn:focus-visible {
  outline: 2px solid var(--sidebar-active-ring);
  outline-offset: 2px;
}
.nav-icon {
  width: 26px; height: 26px; border-radius: 8px;
  background: var(--sidebar-icon-bg);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  flex-shrink: 0;
}

.sidebar-footer {
  margin-top: auto;
  padding: 12px 10px 14px;
  border-top: 1px solid var(--sidebar-border);
}
.sidebar-user {
  display: flex; align-items: center; gap: 9px; padding: 3px 0 10px;
}
.sidebar-avatar {
  width: 32px; height: 32px; border-radius: 9px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--nav-active), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-size: .73rem; font-weight: 800; color: var(--badge-text); letter-spacing: .04em;
}
.sidebar-user-info { min-width: 0; }
.sidebar-username {
  font-weight: 700; font-size: .86rem; color: var(--sidebar-text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sidebar-role { font-size: .74rem; color: var(--sidebar-text-soft); margin-top: 1px; }
.sidebar-signout {
  width: 100%; border: 1px solid var(--sidebar-signout-border);
  background: transparent; color: var(--sidebar-signout-text);
  border-radius: 9px; padding: 7px 12px;
  cursor: pointer; font-size: .82rem; text-align: left;
  transition: background .14s ease, color .14s ease;
}
.sidebar-signout:hover {
  background: var(--sidebar-signout-hover);
  color: var(--sidebar-signout-hover-text);
}

/* ═══════════════════════════════════════════════════════════════
   MAIN CONTENT
═══════════════════════════════════════════════════════════════ */
.app-loading { min-height: 100vh; background: var(--bg); }
.main { padding: 26px 28px; min-width: 0; }

/* ── Top Bar ─────────────────────────────────────────────────── */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-bottom: 22px;
}
.page-title h2 { margin: 0; font-size: 1.65rem; font-weight: 800; letter-spacing: -.02em; }
.page-title p  { margin: 5px 0 0; color: var(--muted); font-size: .93rem; }
.top-actions { display: flex; gap: 10px; align-items: center; flex-wrap: nowrap; }
.clean-actions { justify-content: flex-end; }
.clean-actions > * { flex: 0 0 auto; }

/* ── Header Dropdowns ───────────────────────────────────────── */
.header-dropdown { position: relative; }
.header-dropdown-trigger {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 9px; min-height: 36px; height: 36px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: 11px;
  background: var(--surface-soft); box-shadow: var(--shadow);
  cursor: pointer; color: var(--text); font-size: .88rem; font-weight: 500;
  transition: border-color .15s ease, transform .15s ease;
}
.header-dropdown-trigger:hover {
  border-color: var(--accent-mid);
  transform: translateY(-1px);
}
.header-dropdown-trigger:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}
.header-dropdown-chevron { color: var(--muted); font-size: .76rem; }
.theme-dropdown-trigger { width: 36px; padding: 0; }
.project-dropdown-trigger { min-width: 210px; justify-content: space-between; }
.project-switcher-shell { position: relative; }
.project-dropdown-label {
  max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.theme-switcher-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; color: var(--muted); font-size: .88rem; font-weight: 700;
}
.header-dropdown-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 176px; padding: 7px; display: grid; gap: 4px;
  border: 1px solid var(--border); border-radius: 14px;
  background: var(--panel); box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(-6px) scale(.97);
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
  will-change: transform, opacity;
  z-index: 20;
}
.header-dropdown.open .header-dropdown-menu {
  opacity: 1; transform: translateY(0) scale(1); pointer-events: auto;
}
.header-dropdown-option {
  border: 0; background: transparent; color: var(--text);
  text-align: left; padding: 8px 10px; border-radius: 9px; cursor: pointer;
  font-size: .88rem; transition: background .13s ease;
}
.header-dropdown-option:hover,
.header-dropdown-option.active { background: var(--accent-soft); }

/* ═══════════════════════════════════════════════════════════════
   FORM CONTROLS
═══════════════════════════════════════════════════════════════ */
.select, .input, .textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  border-radius: 13px;
  padding: 10px 13px;
  outline: none;
  box-shadow: var(--shadow-inset);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.textarea {
  min-height: 200px; resize: vertical;
  font-family: ui-monospace, SFMono-Regular, monospace; font-size: .9rem;
}
.textarea.compact { min-height: 130px; }
.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.input::placeholder,
.textarea::placeholder { color: var(--subtle); }

/* Fix browser autofill overriding dark theme background */
.input:-webkit-autofill,
.input:-webkit-autofill:hover,
.input:-webkit-autofill:focus,
.input:-webkit-autofill:active,
.select:-webkit-autofill,
.select:-webkit-autofill:hover,
.select:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--panel) inset !important;
  -webkit-text-fill-color: var(--text) !important;
  caret-color: var(--text);
  border-color: var(--border) !important;
}

/* ═══════════════════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════════════════ */
.btn {
  border: 0; background: var(--panel); color: var(--text);
  border-radius: 13px; padding: 10px 16px; cursor: pointer;
  font-weight: 600; font-size: .88rem;
  box-shadow: var(--shadow);
  transition: transform .14s cubic-bezier(.2,.8,.4,1), box-shadow .14s ease, background-color .14s ease, border-color .14s ease, opacity .14s ease;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.btn:hover { box-shadow: var(--shadow); opacity: .98; }
.btn:active { opacity: .92; }
.btn:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; }
.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--purple));
  color: #fff; box-shadow: 0 4px 14px var(--accent-mid);
}
.btn.primary:hover { box-shadow: 0 4px 14px var(--accent-mid); }
.btn.secondary { box-shadow: inset 0 0 0 1.5px var(--border); background: var(--panel); }
.btn.danger {
  background: var(--red-soft); color: var(--red);
  box-shadow: inset 0 0 0 1px rgba(220,38,38,.22);
}
.btn.small {
  padding: 6px 11px; border-radius: 10px;
  font-size: .83rem; box-shadow: none;
}
.btn.small:hover { box-shadow: var(--shadow); }

.btn.free-generate-btn {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  font-weight: 600;
  border: none;
  transition: all .2s ease;
}
.btn.free-generate-btn:hover:not(:disabled) {
  box-shadow: 0 4px 14px rgba(16,185,129,.4);
  transform: translateY(-1px);
}
.btn.free-generate-btn:disabled {
  opacity: .6;
  cursor: wait;
}
.btn.ai-generate-btn {
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  color: #fff;
  font-weight: 600;
  border: none;
  transition: all .2s ease;
}
.btn.ai-generate-btn:hover:not(:disabled) {
  box-shadow: 0 4px 14px rgba(99,102,241,.4);
  transform: translateY(-1px);
}
.btn.ai-generate-btn:disabled {
  opacity: .6;
  cursor: wait;
}

/* ═══════════════════════════════════════════════════════════════
   LAYOUT PRIMITIVES
═══════════════════════════════════════════════════════════════ */
.grid { display: grid; gap: 18px; }
.grid.metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar.wrap { flex-wrap: wrap; }
.compact-toolbar { gap: 6px; margin-bottom: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 15px; }
.form-grid .full { grid-column: 1 / -1; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.empty { color: var(--muted); text-align: center; padding: 28px 14px; }
.meta { color: var(--muted); font-size: .88rem; }
.small-muted { color: var(--muted); font-size: .84rem; }
.prose-lite { white-space: pre-wrap; line-height: 1.6; color: var(--text); overflow-wrap: anywhere; word-break: break-word; }

/* ═══════════════════════════════════════════════════════════════
   CARDS
═══════════════════════════════════════════════════════════════ */
.card {
  background: linear-gradient(160deg, var(--panel) 0%, var(--panel-alt) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  min-width: 0;
}
.card-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 10px; flex-wrap: wrap;
}
.card h3 { margin: 0; font-size: 1rem; font-weight: 700; }
.card-subtitle { color: var(--muted); font-size: .9rem; }
.clickable-card {
  cursor: pointer;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.clickable-card:hover {
  transform: translateY(-1px);
  border-color: var(--accent-mid);
  box-shadow: var(--shadow);
}

/* ═══════════════════════════════════════════════════════════════
   METRICS / KPIs
═══════════════════════════════════════════════════════════════ */
.metric-value { font-size: 1.9rem; font-weight: 800; margin-top: 8px; letter-spacing: -.03em; }
.metric-label { color: var(--muted); font-size: .88rem; font-weight: 500; }
.progress-row { margin-top: 14px; }
.progress-track { height: 9px; background: var(--panel-alt); border-radius: var(--radius-pill); overflow: hidden; }
.progress-fill  { height: 100%; border-radius: var(--radius-pill); }
.fill-green  { background: linear-gradient(90deg, #22c55e, #16a34a); }
.fill-red    { background: linear-gradient(90deg, #fb7185, #dc2626); }
.fill-blue   { background: linear-gradient(90deg, #60a5fa, #2563eb); }
.fill-purple { background: linear-gradient(90deg, #a78bfa, #7c3aed); }

/* ═══════════════════════════════════════════════════════════════
   TABLES (generic)
═══════════════════════════════════════════════════════════════ */
.table-wrap { overflow: auto; border-radius: var(--radius-sm); }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 11px 10px; border-bottom: 1px solid var(--table-line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: .84rem; background: var(--table-head-bg); }
tr:hover td { background: var(--table-row-hover); }

/* ═══════════════════════════════════════════════════════════════
   BADGES & CHIPS
═══════════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: var(--radius-pill);
  font-size: .8rem; font-weight: 600;
}
.badge.pass    { background: var(--green-soft);  color: var(--green); }
.badge.fail    { background: var(--red-soft);    color: var(--red); }
.badge.skip    { background: var(--amber-soft);  color: var(--amber); }
.badge.neutral { background: var(--panel-alt);   color: var(--muted); }

.chip {
  display: inline-flex; padding: 7px 12px; border-radius: var(--radius-pill);
  background: var(--accent-soft); color: var(--accent);
  font-weight: 700; font-size: .8rem;
}
.chip.success { background: var(--green-soft); color: var(--green); }

.user-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 13px; border-radius: var(--radius-pill);
  background: var(--accent-soft); color: var(--accent); font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════════
   WELCOME BANNER
═══════════════════════════════════════════════════════════════ */
.welcome {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  background: linear-gradient(135deg, rgba(79,70,229,.92), rgba(124,58,237,.92));
  color: #fff;
}
.welcome p  { color: rgba(255,255,255,.80); margin-bottom: 0; }
.welcome h3 { font-size: 1.4rem; font-weight: 800; }
.welcome .chip { background: rgba(255,255,255,.16); color: #fff; }

/* ═══════════════════════════════════════════════════════════════
   OVERVIEW BAR BUTTON
═══════════════════════════════════════════════════════════════ */
.overview-bar-button {
  border: 0; background: transparent; color: inherit;
  padding: 9px 11px; margin: -9px -11px 0;
  border-radius: 13px; cursor: pointer; text-align: left;
  transition: background .15s ease;
}
.overview-bar-button:hover { background: var(--accent-soft); }

/* ═══════════════════════════════════════════════════════════════
   LISTS
═══════════════════════════════════════════════════════════════ */
.list { display: flex; flex-direction: column; gap: 6px; }
.list-item {
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
  padding: 11px 0; border-bottom: 1px solid var(--border-soft);
}
.list-item:last-child { border-bottom: 0; }


/* Dashboard */
.overview-latest-runs { display: flex; flex-direction: column; gap: 10px; }
.kpi-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; align-items: start; }

/* Dashboard section label */
.overview-section-label {
  font-size: .78rem; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .06em;
  padding-bottom: 8px; margin-bottom: 4px;
  border-bottom: 2px solid var(--border);
}

/* Dashboard links */
.dashboard-run-link {
  width: 100%; text-align: left; cursor: pointer;
  border: 1px solid var(--border); border-radius: 11px; padding: 11px 12px;
  background: var(--panel-alt); color: inherit;
  transition: background .14s ease, border-color .14s ease, box-shadow .14s ease;
}
.dashboard-run-link:hover { background: color-mix(in srgb, var(--panel-alt) 60%, var(--accent-soft) 40%); border-color: var(--accent-mid); box-shadow: var(--shadow); }
.dashboard-run-content { width: 100%; display: grid; gap: 8px; }
.dashboard-run-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.dashboard-run-progress { height: 11px; }
/* Remove list-item chrome from dashboard card items */
.list-item.dashboard-run-link,
.list-item.dashboard-activity-link {
  padding: 11px 12px; border-bottom: 1px solid var(--border);
}
.dashboard-activity-link {
  width: 100%; text-align: left; cursor: pointer;
  border: 1px solid var(--border); border-radius: 11px; padding: 11px 12px;
  background: var(--panel-alt); color: inherit;
  transition: background .14s ease, border-color .14s ease, box-shadow .14s ease;
}
.dashboard-activity-link:hover { background: color-mix(in srgb, var(--panel-alt) 60%, var(--accent-soft) 40%); border-color: var(--accent-mid); box-shadow: var(--shadow); }
.dashboard-activity-content { width: 100%; display: grid; gap: 5px; }
.dashboard-activity-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; }

/* ═══════════════════════════════════════════════════════════════
   CODE
═══════════════════════════════════════════════════════════════ */
pre.output, .codebox {
  background: var(--code-bg); color: var(--code-text);
  border-radius: 14px; padding: 15px; overflow: auto; font-size: .88rem;
}

/* ═══════════════════════════════════════════════════════════════
   ADMIN BUTTONS
═══════════════════════════════════════════════════════════════ */
.generated-password-box {
  border: 1px solid var(--border); border-radius: 13px;
  background: var(--panel-alt); padding: 14px;
}
.generated-password-value {
  margin: 8px 0 0; padding: 11px 13px; border-radius: 11px;
  background: var(--code-bg); color: var(--code-text); overflow: auto; font-size: .9rem;
}
.admin-action-btn { box-shadow: none; border: 1px solid transparent; font-weight: 600; }
.admin-reveal-btn  { background: var(--blue-soft);   color: var(--blue);   border-color: rgba(37,99,235,.22); }
.admin-reset-btn   { background: var(--purple-soft);  color: var(--purple); border-color: rgba(124,58,237,.22); }
.admin-revoke-btn  { background: var(--red-soft);    color: var(--red);    border-color: rgba(220,38,38,.22); }
.admin-restore-btn { background: var(--green-soft);  color: var(--green);  border-color: rgba(22,163,74,.22); }

/* ═══════════════════════════════════════════════════════════════
   VIEW TOGGLE
═══════════════════════════════════════════════════════════════ */
.view-toggle {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px;
  border: 1px solid var(--border); border-radius: var(--radius-pill);
  background: var(--panel-alt);
}
.view-toggle-btn {
  border: 0; background: transparent; color: var(--muted);
  border-radius: var(--radius-pill); padding: 7px 13px; cursor: pointer; font-weight: 700;
  transition: background .14s ease, color .14s ease, box-shadow .14s ease;
}
.view-toggle-btn.active {
  background: var(--panel); color: var(--text); box-shadow: var(--shadow);
}

/* ═══════════════════════════════════════════════════════════════
   PROJECTS
═══════════════════════════════════════════════════════════════ */
.projects-header-actions {
  display: flex; gap: 10px; align-items: center; justify-content: flex-end; flex-wrap: wrap;
}
/* auto-fill (not auto-fit) — with a single project, auto-fit collapses the
   empty tracks and stretches one card across the whole container. auto-fill
   keeps the phantom tracks so a lone card stays card-sized. */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(265px, 1fr)); gap: 10px; }
.project-grid-overview { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.project-grid-overview .project-card { max-width: 520px; }
.project-card {
  border: 1px solid var(--border); border-radius: 15px; padding: 13px 15px;
  background: color-mix(in srgb, var(--panel) 86%, var(--panel-alt) 14%);
  box-shadow: 0 6px 18px rgba(15,23,42,.04);
  transition: border-color .15s ease, background .15s ease;
}
.project-openable { cursor: pointer; }
.project-card:hover {
  border-color: color-mix(in srgb, var(--border) 55%, var(--accent) 45%);
  background: color-mix(in srgb, var(--panel) 76%, var(--accent-soft) 24%);
}
.project-card.active {
  border-color: color-mix(in srgb, var(--accent) 52%, var(--border) 48%);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent 82%), 0 10px 24px rgba(15,23,42,.07);
  background: color-mix(in srgb, var(--panel) 68%, var(--accent-soft) 32%);
}
.project-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.project-card-title { display: flex; align-items: center; gap: 9px; margin-bottom: 4px; }
.project-pass-chip {
  padding: 4px 9px; border-radius: var(--radius-pill);
  background: var(--green-soft); border: 1px solid color-mix(in srgb, var(--green) 25%, transparent 75%);
  color: var(--green); font-weight: 700; font-size: .78rem; white-space: nowrap;
}
.project-stats-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.project-stat-pill {
  display: inline-flex; align-items: center; padding: 4px 8px;
  border-radius: var(--radius-pill); background: var(--panel-alt);
  border: 1px solid var(--border); color: var(--muted);
  font-size: .78rem; font-weight: 700;
}
.project-progress-row { margin-bottom: 10px; }
.project-progress-label { font-weight: 700; margin-bottom: 6px; font-size: .82rem; color: var(--muted); }
.project-progress-inline { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; }
.project-progress-percent { font-weight: 700; color: var(--text); font-size: .82rem; }
.project-list { display: grid; gap: 10px; }
.project-list-row {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(240px, .8fr) auto;
  gap: 18px; align-items: center; border: 1px solid var(--border);
  border-radius: 15px; padding: 13px 15px;
  background: color-mix(in srgb, var(--panel) 86%, var(--panel-alt) 14%);
  box-shadow: 0 6px 18px rgba(15,23,42,.04);
  transition: border-color .15s ease, background .15s ease;
}
.project-list-row:hover {
  border-color: color-mix(in srgb, var(--border) 55%, var(--accent) 45%);
  background: color-mix(in srgb, var(--panel) 76%, var(--accent-soft) 24%);
}
.project-list-row.active { border-color: color-mix(in srgb, var(--accent) 52%, var(--border) 48%); }
.project-list-main { min-width: 0; display: grid; gap: 8px; }
.project-list-title { display: flex; align-items: center; gap: 10px; }
.project-list-progress { display: grid; gap: 9px; }
.project-row-actions { justify-content: flex-end; }
.project-row-actions .btn,
.project-card .toolbar .btn { min-width: 76px; }
.project-open-btn { background: var(--blue-soft); color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue-soft); }
.project-edit-btn { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent-soft); }
.project-open-btn:hover, .project-edit-btn:hover { opacity: .96; }
.project-latest-runs { margin-bottom: 10px; }
.compact-list { gap: 8px; }
.compact-item { align-items: flex-start; padding: 9px 0; }

/* ═══════════════════════════════════════════════════════════════
   AUTH
═══════════════════════════════════════════════════════════════ */
.auth-shell {
  min-height: 100vh; display: grid; place-items: center; padding: 32px;
  background: linear-gradient(135deg, var(--panel) 0%, var(--panel-alt) 50%, var(--accent-soft) 100%);
}
.auth-split {
  display: grid; grid-template-columns: 1fr 1fr;
  max-width: 920px; width: 100%;
  border-radius: 26px; overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,0.12);
  border: 1px solid var(--border);
}
.auth-hero-panel {
  background: linear-gradient(160deg, #4f46e5 0%, #7c3aed 50%, #6366f1 100%);
  padding: 40px 32px; display: flex; align-items: center;
  position: relative; overflow: hidden;
}
.auth-hero-panel::before {
  content: ''; position: absolute; top: -40%; right: -30%;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.auth-hero-panel::after {
  content: ''; position: absolute; bottom: -30%; left: -20%;
  width: 250px; height: 250px;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.auth-hero-content { position: relative; z-index: 1; }
.auth-hero-badge {
  width: 48px; height: 48px; border-radius: 14px;
  background: rgba(255,255,255,0.2); backdrop-filter: blur(8px);
  color: #fff; font-weight: 900; font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.auth-hero-title { margin: 0 0 8px; font-size: 1.6rem; font-weight: 800; color: #fff; }
.auth-hero-tagline { margin: 0 0 28px; color: rgba(255,255,255,0.8); font-size: .88rem; line-height: 1.55; }
.auth-hero-features { display: flex; flex-direction: column; gap: 12px; }
.auth-hero-feat {
  display: flex; align-items: center; gap: 10px;
  color: rgba(255,255,255,0.9); font-size: .82rem; font-weight: 500;
}
.auth-hero-feat-icon { font-size: 1.1rem; flex-shrink: 0; }
.auth-card {
  width: 100%;
  background: var(--surface-strong);
  border: none; border-radius: 0;
  box-shadow: none; padding: 36px 30px;
}
.auth-brand { margin-bottom: 18px; text-align: center; }
.auth-brand h1 { margin: 0 0 7px; font-size: 1.35rem; font-weight: 800; }
.auth-brand p  { margin: 0; color: var(--muted); font-size: .88rem; }
.auth-logo-image { margin: 0 auto 8px; width: 60px; height: 60px; }
@media (max-width: 768px) {
  .auth-split { grid-template-columns: 1fr; max-width: 440px; }
  .auth-hero-panel { padding: 28px 24px; }
  .auth-hero-features { display: none; }
  .auth-hero-title { font-size: 1.2rem; }
  .auth-hero-tagline { margin-bottom: 0; font-size: .82rem; }
  .auth-card { border-radius: 0 0 26px 26px; }
}
.auth-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  background: var(--panel-alt); padding: 5px; border-radius: 14px; margin-bottom: 16px;
}
.auth-tab {
  border: 0; border-radius: 11px; background: transparent;
  padding: 10px 13px; cursor: pointer; color: var(--muted); font-weight: 700;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.auth-tab.active { background: var(--panel); color: var(--text); box-shadow: var(--shadow); }
.auth-form  { grid-template-columns: 1fr; }
.auth-toolbar { justify-content: flex-end; }
.auth-card .btn.primary { min-width: 130px; }
.remember-row {
  display: inline-flex; align-items: center; gap: 9px;
  color: var(--muted); font-size: .93rem; margin-top: -2px;
}
.remember-row input { width: 15px; height: 15px; accent-color: var(--accent); }
.auth-card > .small-muted:last-child { text-align: center; }

/* ═══════════════════════════════════════════════════════════════
   ONBOARDING OVERLAY
═══════════════════════════════════════════════════════════════ */
.ob-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.55); backdrop-filter: blur(4px);
  z-index: 9999; display: flex; align-items: center; justify-content: center;
  animation: ob-fade-in .25s ease;
}
@keyframes ob-fade-in { from { opacity: 0; } to { opacity: 1; } }
.ob-card {
  background: var(--panel); border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.25); max-width: 540px; width: 92%;
  overflow: hidden; position: relative;
  animation: ob-slide-up .3s ease;
}
@keyframes ob-slide-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }

/* Welcome screen */
.ob-welcome { padding: 0; }
.ob-glow {
  position: absolute; top: -60px; right: -60px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  opacity: .12; pointer-events: none;
}
.ob-brand { padding: 32px 32px 0; text-align: center; position: relative; }
.ob-logo { width: 56px; height: 56px; border-radius: 14px; object-fit: contain; margin-bottom: 14px; }
.ob-logo-fallback {
  width: 56px; height: 56px; border-radius: 14px; margin: 0 auto 14px;
  background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%);
  color: #fff; font-weight: 900; font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
}
.ob-title { margin: 0 0 6px; font-size: 1.5rem; font-weight: 800; color: var(--text); }
.ob-subtitle { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.5; }

/* Feature grid */
.ob-features {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: var(--border-soft); margin-top: 24px;
  border-top: 1px solid var(--border-soft);
}
.ob-feature {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 14px 18px; background: var(--panel);
}
.ob-feature-icon { font-size: 1.3rem; flex-shrink: 0; margin-top: 1px; }
.ob-feature-title { font-size: .82rem; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.ob-feature-desc { font-size: .72rem; color: var(--muted); line-height: 1.4; }

.ob-footer {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 20px 32px; border-top: 1px solid var(--border-soft);
  background: var(--panel-alt);
}
.ob-cta {
  padding: 10px 28px !important; font-size: .92rem !important; font-weight: 700 !important;
  border-radius: var(--radius-pill) !important;
}

/* Steps screen */
.ob-steps-card { padding: 0; }
.ob-steps-header { padding: 28px 28px 0; }
.ob-steps-title { margin: 0 0 4px; font-size: 1.2rem; font-weight: 800; color: var(--text); }
.ob-steps-subtitle { margin: 0; color: var(--muted); font-size: .85rem; }
.ob-progress { padding: 16px 28px; }
.ob-progress-track {
  height: 6px; border-radius: 3px; background: var(--border-soft); overflow: hidden;
}
.ob-progress-fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--accent) 0%, #8b5cf6 100%);
  transition: width .4s ease;
}
.ob-progress-label { display: block; font-size: .72rem; color: var(--muted); margin-top: 6px; }

.ob-step-list { display: flex; flex-direction: column; }
.ob-step-row {
  display: flex; align-items: center; gap: 14px; padding: 14px 28px;
  border-top: 1px solid var(--border-soft);
  transition: background .12s;
}
.ob-step-row:hover { background: var(--panel-alt); }
.ob-step-num {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%);
  color: #fff; font-weight: 800; font-size: .78rem;
  display: flex; align-items: center; justify-content: center;
}
.ob-step-info { flex: 1; min-width: 0; }
.ob-step-label { font-size: .88rem; font-weight: 700; color: var(--text); }
.ob-step-desc { font-size: .76rem; color: var(--muted); margin-top: 1px; }

@media (max-width: 540px) {
  .ob-features { grid-template-columns: 1fr; }
  .ob-card { width: 96%; border-radius: 16px; }
  .ob-brand { padding: 24px 20px 0; }
  .ob-footer { padding: 16px 20px; }
  .ob-step-row { padding: 12px 20px; }
}

/* ═══════════════════════════════════════════════════════════════
   SETTINGS
═══════════════════════════════════════════════════════════════ */
.settings-tabs {
  display: flex; flex-wrap: wrap; gap: 8px; padding: 9px;
  border: 1px solid var(--border); border-radius: 18px;
  background: var(--surface-soft); box-shadow: var(--shadow);
}
.settings-tab {
  border: 0; border-radius: var(--radius-pill);
  background: var(--panel-alt); color: var(--muted);
  padding: 9px 15px; cursor: pointer; font-weight: 700;
  transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}
.settings-tab:hover { background: var(--border); color: var(--text); }
.settings-tab.active {
  background: linear-gradient(135deg, var(--accent), var(--purple));
  color: #fff; box-shadow: 0 8px 18px var(--accent-soft);
}
.settings-admin-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; }

/* ═══════════════════════════════════════════════════════════════
   PROJECT SWITCHER POPOVER
═══════════════════════════════════════════════════════════════ */
.project-switcher-popover { position: absolute; top: calc(100% + 8px); right: 0; width: min(420px, 92vw); z-index: 25; }
.project-switcher-modal {
  width: 100%; border: 1px solid var(--border); border-radius: 17px;
  background: var(--panel); box-shadow: var(--shadow-lg); padding: 20px;
}

/* ═══════════════════════════════════════════════════════════════
   CASES MANAGER (TR-*)
═══════════════════════════════════════════════════════════════ */
.cases-manager { display: grid; gap: 18px; position: relative; }
.cases-toolbar {
  display: flex; justify-content: space-between; gap: 14px; align-items: center;
  padding: 16px 18px;
  background: var(--surface-soft);
  border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow);
}
.search-input { width: 220px; }

/* File manager (legacy) */
.file-manager { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 18px; align-items: start; }
.folder-pane, .file-list-pane { min-height: 70vh; }
.pane-title, .pane-title-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 13px; }
.pane-title { font-weight: 800; }
.folder-list, .file-list { display: flex; flex-direction: column; gap: 8px; }
.folder-row, .file-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px; border: 1px solid transparent; border-radius: 14px; cursor: pointer;
  transition: background .14s ease, border-color .14s ease;
}
.folder-row:hover, .file-row:hover { background: var(--panel-alt); border-color: var(--border); }
.folder-row.active, .file-row.active { background: var(--accent-soft); border-color: var(--accent-mid); }
.folder-name, .file-title { font-weight: 700; }
.file-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.file-icon {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent);
  font-size: .78rem; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
}

/* Icon button */
.icon-btn {
  border: 0; background: var(--icon-btn-bg); color: var(--icon-btn-color);
  width: 32px; height: 32px; border-radius: 9px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .13s ease, color .13s ease;
  font-size: .9rem;
}
.icon-btn:hover { background: var(--icon-btn-hover); color: var(--text); }
.icon-btn:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; }

/* ── TR Layout ────────────────────────────────────────────── */
.tr-wrap { display: flex; flex-direction: column; gap: 12px; }
.tr-top-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tr-top-left { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.tr-top-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tr-top-right .btn.secondary {
  background: color-mix(in srgb, var(--panel) 80%, var(--accent-soft) 20%);
  color: var(--text);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--border) 68%, var(--accent) 32%);
}
.tr-top-right .btn.secondary:hover {
  background: color-mix(in srgb, var(--panel) 65%, var(--accent-soft) 35%);
  color: var(--accent);
}
.tr-search { max-width: 280px; }

.tr-body {
  display: grid; grid-template-columns: minmax(300px, 400px) 1fr;
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); background: var(--panel);
  overflow: hidden; min-height: calc(100vh - 170px);
}

/* Sidebar */
.tr-sidebar { border-right: 1px solid var(--border); background: var(--panel-alt); display: flex; flex-direction: column; overflow: hidden; }
.tr-sidebar-tree { flex: 1; overflow-y: auto; overflow-x: hidden; }
.tr-sidebar-head {
  padding: 13px 13px 7px; font-size: .7rem; font-weight: 800;
  color: var(--muted); text-transform: uppercase; letter-spacing: .07em;
  display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap;
}
.tr-section-link {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 8px 13px; cursor: pointer; font-size: .86rem; color: var(--text);
  border-left: 3px solid transparent;
  transition: background .11s ease, border-color .11s ease, color .11s ease;
  min-width: 0;
}
.tr-section-link:hover { background: var(--table-row-hover); }
.tr-section-link.active {
  background: var(--table-row-active); border-left-color: transparent;
  color: var(--accent); font-weight: 700;
}
.tr-folder-link { border-left-width: 2px; }
.tr-folder-main { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; }
.tr-sec-name {
  white-space: normal; overflow: visible; text-overflow: clip;
  word-break: break-word; line-height: 1.3; flex: 1;
}
.tr-sec-count {
  flex: 0 0 auto; align-self: flex-start;
  font-size: .7rem; font-weight: 700; color: var(--muted);
  background: var(--border); border-radius: var(--radius-pill); padding: 2px 7px;
}
.tr-folder-toggle,
.tr-folder-toggle-placeholder {
  width: 15px; flex: 0 0 15px;
  display: inline-flex; align-items: center; justify-content: center;
}
.tr-folder-toggle {
  border: 0; padding: 0; background: transparent;
  color: var(--muted); cursor: pointer;
}
.tr-folder-icon { display: flex; align-items: center; flex-shrink: 0; }
.tr-section-link.active .picker-sec-folder {
  background: linear-gradient(180deg, var(--accent-mid) 0%, var(--accent) 100%);
}
.tr-section-link.active .picker-sec-folder::before {
  background: linear-gradient(180deg, var(--accent-mid) 0%, var(--accent) 100%);
}
.tr-sidebar-empty { padding: 13px; color: var(--muted); font-size: .86rem; }
.tr-sidebar-actions { padding: 9px 11px; margin-top: auto; border-top: 1px solid var(--border); }

/* Main table area */
.tr-main { overflow: auto; flex: 1; }
.tr-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.tr-table thead th {
  background: var(--table-head-bg);
  padding: 9px 12px; text-align: left;
  font-size: .7rem; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .05em;
  border-bottom: 2px solid var(--border); white-space: nowrap;
  position: sticky; top: 0; z-index: 2;
}
.tr-sort-button {
  border: 0; padding: 0; background: transparent;
  color: inherit; font: inherit; text-transform: inherit;
  letter-spacing: inherit; cursor: pointer;
  transition: color .13s ease;
}
.tr-sort-button:hover { color: var(--text); }
.tr-col-cb       { width: 36px; text-align: center; padding: 0 6px; }
.tr-col-cb input[type=checkbox] { cursor: pointer; }
.tr-case-row.checked { background: var(--hover-bg, rgba(99,102,241,.06)); }
.tr-bulk-bar {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  background: var(--primary-light, #ede9fe); border: 1px solid var(--primary, #6366f1);
  border-radius: 6px; margin-bottom: 8px; flex-wrap: wrap;
}
.tr-bulk-count { font-weight: 600; font-size: 13px; margin-right: 4px; }
.tr-bulk-run-wrap { display: flex; align-items: center; gap: 6px; }
.tr-bulk-run-select { height: 28px; font-size: 12px; padding: 0 6px; }
.tr-col-id       { width: 68px; }
.tr-col-title    { min-width: 220px; }
.tr-col-priority { width: 96px; }
.tr-col-type     { width: 108px; }
.tr-col-auto     { width: 108px; }
.tr-col-steps    { width: 62px; text-align: center; }
.tr-col-actions  { width: 88px; }

/* Section header row */
.tr-section-row td {
  background: var(--section-row-bg); padding: 0;
  border-bottom: 1px solid var(--border);
  border-top: 2px solid var(--section-row-top);
}
.tr-section-label {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; user-select: none;
}
.tr-chevron { font-size: .7rem; color: var(--muted); cursor: pointer; width: 14px; flex-shrink: 0; }
.tr-sec-title { font-weight: 700; font-size: .88rem; cursor: pointer; flex: 1; }
.tr-sec-pill {
  font-size: .72rem; color: var(--muted); background: var(--border);
  border-radius: var(--radius-pill); padding: 2px 8px; font-weight: 600;
}
.tr-sec-row-actions {
  display: flex; gap: 4px; margin-left: auto;
  opacity: 0; transition: opacity .14s ease;
}
.tr-section-row:hover .tr-sec-row-actions { opacity: 1; }

/* Case rows */
.tr-case-row td {
  padding: 8px 12px; border-bottom: 1px solid var(--table-line);
  vertical-align: middle;
}
.tr-case-row:hover td { background: var(--table-row-hover); cursor: pointer; }
.tr-case-row.active td { background: var(--table-row-active); }
.tr-case-id {
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: .78rem; font-weight: 700; color: var(--muted);
}
.tr-case-title { font-weight: 500; }
.tr-jira-ref {
  display: inline-block; margin-left: 8px; font-size: .72rem;
  color: var(--accent); background: var(--accent-soft);
  border-radius: 6px; padding: 1px 6px; font-weight: 600; text-decoration: none;
}
.tr-jira-ref:hover { text-decoration: underline; }
.tr-type-label, .tr-auto-label { font-size: .8rem; color: var(--muted); }
.tr-row-actions {
  display: flex; gap: 4px;
  opacity: 0; transition: opacity .14s ease;
}
.tr-case-row:hover .tr-row-actions { opacity: 1; }

/* Empty rows */
.tr-empty-row td {
  padding: 9px 12px 9px 36px; color: var(--muted);
  font-style: italic; font-size: .84rem;
  border-bottom: 1px solid var(--table-line);
}
.tr-inline-link {
  border: 0; background: none; color: var(--accent); font-size: .84rem;
  cursor: pointer; padding: 0; font-style: normal; font-weight: 600;
}
.tr-inline-link:hover { text-decoration: underline; }

/* Empty state */
.tr-empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 300px; gap: 12px; color: var(--muted); padding: 40px;
}
.tr-empty-icon {
  width: 52px; height: 52px; border-radius: 16px;
  background: var(--accent-soft); color: var(--accent);
  font-weight: 800; font-size: 1.05rem;
  display: flex; align-items: center; justify-content: center;
}

/* Priority badges */
.priority-badge {
  display: inline-flex; align-items: center;
  padding: 3px 9px; border-radius: var(--radius-pill);
  font-size: .74rem; font-weight: 700;
}
.priority-low      { background: var(--pri-low-bg);      color: var(--pri-low-color); }
.priority-medium   { background: var(--pri-medium-bg);   color: var(--pri-medium-color); }
.priority-high     { background: var(--pri-high-bg);     color: var(--pri-high-color); }
.priority-critical { background: var(--pri-critical-bg); color: var(--pri-critical-color); }

/* ═══════════════════════════════════════════════════════════════
   SIDE DRAWER
═══════════════════════════════════════════════════════════════ */
.drawer-backdrop {
  position: fixed; inset: 0; background: rgba(15,23,42,.22); z-index: 30;
}
body:has(.drawer-backdrop), body:has(.media-lightbox) { overflow: hidden; }

/* ── How To help guide ───────────────────────────────────── */
.howto-wrap { max-width: 920px; display: flex; flex-direction: column; gap: 16px; }
.howto-hero { background: linear-gradient(135deg, var(--accent-soft), var(--purple-soft)); border: 1px solid var(--border); border-radius: 16px; padding: 22px 24px; }
.howto-hero h2 { margin: 8px 0 6px; font-size: 22px; color: var(--text); }
.howto-hero p { margin: 0; color: var(--muted); line-height: 1.6; }
.howto-hero-badge { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); background: var(--panel); border: 1px solid var(--accent-mid); border-radius: 999px; padding: 3px 10px; }
.howto-toc { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; }
.howto-toc-title { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px; }
.howto-toc-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.howto-toc-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--panel-alt); color: var(--text); border: 1px solid var(--border); border-radius: 999px; padding: 6px 12px; font-size: 13px; cursor: pointer; }
.howto-toc-chip:hover { border-color: var(--accent-mid); background: var(--accent-soft); }
.howto-toc-ico, .howto-card-ico { display: inline-flex; align-items: center; justify-content: center; color: var(--accent); }
.howto-card { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; scroll-margin-top: 16px; }
.howto-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.howto-card-head h3 { margin: 0; font-size: 17px; color: var(--text); }
.howto-card-ico { width: 30px; height: 30px; border-radius: 9px; background: var(--accent-soft); font-size: 15px; flex: 0 0 auto; }
.howto-where { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.howto-lead { margin: 6px 0 8px; color: var(--text); line-height: 1.6; }
.howto-steps, .howto-featlist { margin: 6px 0 4px; padding-left: 22px; color: var(--text); line-height: 1.65; }
.howto-steps li, .howto-featlist li { margin: 4px 0; }
.howto-btn-ref { display: inline-block; font-size: .92em; font-weight: 600; background: var(--panel-alt); border: 1px solid var(--border); border-radius: 6px; padding: 0 6px; white-space: nowrap; }
.howto-tip { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--amber-soft); color: var(--text); font-size: 13px; line-height: 1.55; }
.howto-backtop { margin-top: 10px; background: none; border: none; color: var(--accent); font-size: 12px; cursor: pointer; padding: 0; }
@media (max-width: 900px) {
  .howto-hero, .howto-card { padding: 14px; }
  .howto-hero h2 { font-size: 19px; }
  .howto-btn-ref { white-space: normal; }
}
.side-drawer {
  position: fixed; top: 0; right: 0;
  width: min(max(50vw, 760px), calc(100vw - 20px));
  height: 100vh;
  background: var(--panel);
  box-shadow: -18px 0 36px rgba(15,23,42,.14);
  z-index: 31;
  transform: translate3d(100%, 0, 0);
  transition: transform .22s cubic-bezier(.32,.78,.4,1);
  will-change: transform;
  display: flex; flex-direction: column;
}
.side-drawer.open { transform: translate3d(0, 0, 0); }
.side-drawer.fullscreen {
  top: 12px; right: 12px;
  width: calc(100vw - 24px); height: calc(100vh - 24px); max-width: none;
  border-radius: 22px; box-shadow: 0 24px 70px rgba(15,23,42,.22);
  transform: translate3d(100%, 0, 0);
}
.side-drawer.fullscreen.open { transform: translate3d(0, 0, 0); }
.side-drawer.wide {
  top: 5vh; right: 5vw; width: 90vw; height: 90vh; max-width: 1400px;
  border-radius: 24px; box-shadow: 0 24px 70px rgba(15,23,42,.20);
  opacity: 0; transform: translateY(22px) scale(.986);
  transition: opacity .22s ease, transform .22s ease;
  will-change: transform, opacity;
  pointer-events: none;
}
.side-drawer.wide.open { right: 5vw; opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.side-drawer.wide.fullscreen {
  top: 12px; right: 12px;
  width: calc(100vw - 24px); height: calc(100vh - 24px); max-width: none;
  border-radius: 22px; opacity: 0; transform: translateY(22px) scale(.986);
}
.side-drawer.wide.fullscreen.open { right: 12px; opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.drawer-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 22px; border-bottom: 1px solid var(--border);
}
.drawer-body { padding: 20px 22px 26px; overflow: auto; flex: 1; min-height: 0; }
.close-btn { font-size: 15px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 15px; }
.small-muted, .prose-lite {
  overflow-wrap: anywhere; word-break: break-word;
}
.drawer-section-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px;
}

/* ═══════════════════════════════════════════════════════════════
   STEPS EDITOR
═══════════════════════════════════════════════════════════════ */
.steps-editor, .steps-list { display: flex; flex-direction: column; gap: 10px; }
.step-editor-row {
  display: grid; grid-template-columns: 40px minmax(0,1fr) minmax(0,1fr) auto; gap: 12px;
  align-items: start; padding: 15px;
  border: 1px solid var(--border); border-radius: 16px;
  background: var(--step-bg);
}
.step-item {
  display: grid; grid-template-columns: 34px minmax(0,1fr); gap: 11px;
  align-items: start; padding: 11px;
  border: 1px solid var(--border); border-radius: 13px;
  background: var(--step-bg);
}
.step-number {
  width: 30px; height: 30px; border-radius: var(--radius-pill);
  background: var(--accent-soft); color: var(--accent);
  font-weight: 800; display: inline-flex; align-items: center; justify-content: center; font-size: 11px;
}
.step-title { font-weight: 700; margin-bottom: 3px; }

/* ═══════════════════════════════════════════════════════════════
   ATTACHMENTS
═══════════════════════════════════════════════════════════════ */
.attachment-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 11px; }
.attachment-card {
  border: 1px solid var(--border); border-radius: 14px;
  background: var(--panel); padding: 9px; text-align: left; cursor: pointer;
  transition: border-color .14s ease, box-shadow .14s ease;
}
.attachment-card:hover { border-color: var(--accent-mid); box-shadow: var(--shadow); }
.attachment-card-static { cursor: default; }
.attachment-card-static:hover { border-color: var(--border); box-shadow: none; }
.attachment-thumb, .attachment-preview-large {
  width: 100%; border-radius: 10px; object-fit: cover; background: var(--panel-alt);
}
.attachment-thumb { height: 128px; }
.attachment-preview-large { max-height: 70vh; }
.attachment-preview-video { width: min(1200px, 100%); max-height: 78vh; background: #000; }
.video-thumb {
  height: 128px; border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--blue-soft), var(--purple-soft));
  color: var(--accent); font-weight: 800; letter-spacing: .08em; gap: 4px;
}
.video-play-icon { font-size: 1.9rem; line-height: 1; }
.attachment-name {
  margin-top: 7px; font-weight: 700; font-size: 12px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text);
}

/* ═══════════════════════════════════════════════════════════════
   CASE DETAIL VIEW
═══════════════════════════════════════════════════════════════ */

.cdv-id-chip {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 3px 10px; border-radius: var(--radius-pill);
  background: var(--accent); color: #fff;
  font-size: .72rem; font-weight: 800; letter-spacing: .04em;
}

/* Meta grid */

.cdv-meta-label {
  font-size: .67rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: var(--subtle); margin-bottom: 4px;
}

/* Sections */


/* Preconditions */


/* Steps */


/* Expected result overall */


/* Empty state */


/* Custom fields */


/* Actions bar (now at the top, under the hero) */


/* Two-column detail layout: content left, details panel right */


/* Priority badges */
.badge.priority-Low      { background: var(--pri-low-bg);      color: var(--pri-low-color); }
.badge.priority-Medium   { background: var(--pri-medium-bg);   color: var(--pri-medium-color); }
.badge.priority-High     { background: var(--pri-high-bg);     color: var(--pri-high-color); }
.badge.priority-Critical { background: var(--pri-critical-bg); color: var(--pri-critical-color); }

/* ═══════════════════════════════════════════════════════════════
   RUN CARDS
═══════════════════════════════════════════════════════════════ */
.run-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }

.run-card {
  border: 1px solid var(--border);
  border-radius: 17px;
  padding: 17px;
  background:
    radial-gradient(circle at top right, var(--accent-soft), transparent 34%),
    radial-gradient(circle at bottom left, var(--green-soft), transparent 30%),
    linear-gradient(180deg, var(--panel) 0%, var(--panel-alt) 100%);
  box-shadow: 0 8px 24px rgba(15,23,42,.05);
  transition: box-shadow .15s ease, border-color .15s ease;
}
.run-card:hover { border-color: var(--accent-mid); box-shadow: var(--shadow-lg); box-shadow: 0 12px 32px rgba(15,23,42,.1); }
.run-card.selected {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--border) 58%);
  box-shadow: 0 10px 28px var(--accent-soft);
}
.run-card-s-completed { opacity: .85; }

.run-card-title {
  font-size: .94rem; font-weight: 700; color: var(--text); line-height: 1.3; margin-bottom: 4px;
}
.run-card-subtitle {
  font-size: .77rem; color: var(--muted);
}
.run-card-no-results { font-size: .77rem; color: var(--subtle); font-style: italic; }

/* Status badge */
.run-badge {
  flex-shrink: 0; padding: 7px 11px; border-radius: var(--radius-pill);
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap;
}
.run-badge-active    { background: linear-gradient(135deg, var(--green-soft), var(--blue-soft)); color: var(--green); }
.run-badge-completed { background: var(--panel-alt); color: var(--muted); border: 1px solid var(--border); }
.run-badge-draft     { background: linear-gradient(135deg, var(--amber-soft), var(--panel-alt)); color: var(--amber); }

/* Progress bar */
.run-progress-track {
  height: 6px; border-radius: var(--radius-pill);
  background: var(--border); overflow: hidden; display: flex; flex: 1;
}
.run-progress-pass { background: var(--green); transition: width .4s ease; }
.run-progress-fail { background: var(--red);   transition: width .4s ease; }

/* Stat pills */
.run-stat {
  display: inline-flex; align-items: center; padding: 5px 9px;
  border-radius: var(--radius-pill); border: 1px solid var(--border);
  font-size: .8rem; font-weight: 700;
}
.run-stat.pass    { background: var(--green-soft);  color: var(--green); border-color: var(--green-soft); }
.run-stat.fail    { background: var(--red-soft);    color: var(--red);   border-color: var(--red-soft); }
.run-stat.neutral { background: var(--panel-alt);   color: var(--muted); }

.run-card .toolbar .btn { min-width: 76px; }

/* Run form modal */
.run-form-modal { width: min(520px, 96vw); resize: both; min-width: 320px; min-height: 200px; overflow: hidden; }

/* ═══════════════════════════════════════════════════════════════
   MILESTONE ENHANCEMENTS
═══════════════════════════════════════════════════════════════ */

.ms-chip {
  display: inline-flex; padding: 2px 9px; border-radius: var(--radius-pill);
  background: var(--panel-alt); border: 1px solid var(--border);
  font-size: .71rem; font-weight: 700; color: var(--muted);
}
.ms-chip.ms-chip-closed {
  background: var(--panel-alt); color: var(--subtle);
}
.ms-chip.ms-chip-active {
  background: var(--green-soft); border-color: transparent; color: var(--green);
}

/* ═══════════════════════════════════════════════════════════════
   MEDIA LIGHTBOX & MODALS
═══════════════════════════════════════════════════════════════ */
.media-lightbox {
  position: fixed; inset: 0; background: rgba(15,23,42,.62);
  z-index: 50; display: grid; place-items: center; padding: 24px;
}
.media-lightbox-inner {
  width: min(880px, 100%); background: var(--panel);
  border-radius: 22px; padding: 18px;
  box-shadow: 0 24px 72px rgba(15,23,42,.32);
  border: 1px solid var(--border);
  resize: both; overflow: hidden;
  min-width: 300px; min-height: 100px;
}
.milestone-popup-modal {
  width: min(92vw, 1400px);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px;
  resize: none;
}
.ms-popup-section {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.ms-popup-section-label {
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin-bottom: 10px;
}
.ms-popup-run-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.ms-popup-run-list {
  max-height: 220px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.import-wizard-modal {
  width: min(600px, 100%);
  max-height: 90vh;
  overflow: auto;
  resize: both;
  min-width: 340px; min-height: 200px;
}
.run-popup-modal {
  width: min(860px, 96vw);
  max-height: 90vh; overflow: hidden;
  display: flex; flex-direction: column;
  background: var(--panel);
  resize: both;
  min-width: 400px; min-height: 300px;
}

/* Run detail page — "Add cases" picker modal */
/* Full-page case picker */
.fullpage-picker {
  display: flex; flex-direction: column; height: calc(100vh - 80px); min-height: 400px;
}
.fullpage-picker-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 0; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.fullpage-picker-body {
  flex: 1; min-height: 0; display: flex; flex-direction: row;
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; background: var(--panel); margin-top: 12px;
}
@media (max-width: 700px) {
  .fullpage-picker-body { flex-direction: column; }
  .fullpage-picker-body .picker-sec-sidebar { width: 100%; max-height: 180px; border-right: none; border-bottom: 1px solid var(--border); }
}

.run-picker-modal {
  width: min(1000px, 96vw);
  height: min(85vh, 860px);
  padding: 0;
  display: flex; flex-direction: column;
  overflow: hidden;
  resize: both;
  min-width: 500px; min-height: 400px;
}
.picker-modal-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.picker-modal-header h3 {
  margin: 0; font-size: 1rem; font-weight: 700; color: var(--text);
}
.picker-modal-header-actions {
  display: flex; align-items: center; gap: 8px;
}
.picker-modal-body {
  flex: 1; min-height: 0; display: flex; flex-direction: row;
  overflow: hidden;
}

/* Left section sidebar */
.picker-sec-sidebar {
  width: 210px; min-width: 140px; flex-shrink: 0;
  border-right: none;
  overflow-y: auto;
  padding: 8px 0;
  background: var(--panel-alt);
}
.picker-splitter {
  width: 6px; flex-shrink: 0; cursor: col-resize;
  background: var(--border);
  transition: background .15s;
  position: relative;
}
.picker-splitter:hover, .picker-splitter.dragging {
  background: var(--accent);
}
.picker-splitter::after {
  content: ''; position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 2px; height: 28px; border-radius: 2px;
  background: var(--muted); opacity: .4;
}
.picker-splitter:hover::after, .picker-splitter.dragging::after {
  background: #fff; opacity: .8;
}
.picker-sec-sidebar-item {
  display: flex; align-items: center;
  gap: 4px; padding: 7px 8px 7px 6px;
  cursor: pointer; font-size: .8rem; color: var(--text);
  border-left: 3px solid transparent;
  user-select: none;
  transition: background .1s;
}
.picker-sec-sidebar-item:hover { background: var(--accent-soft); }
.picker-sec-sidebar-item.active {
  background: var(--accent-soft);
  border-left-color: transparent;
  color: var(--accent);
  font-weight: 600;
}
.picker-sb-toggle {
  border: none; background: none; cursor: pointer; padding: 0; margin: 0;
  width: 14px; flex-shrink: 0; font-size: .6rem; color: var(--muted); line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: color .12s;
}
.picker-sb-toggle:hover { color: var(--accent); }
.picker-sec-sidebar-item.active .picker-sb-toggle { color: var(--accent); }
.picker-sb-toggle-spacer { width: 14px; flex-shrink: 0; }
.picker-sec-sidebar-name { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; overflow-wrap: anywhere; word-break: break-word; }
.picker-sec-folder {
  flex-shrink: 0; width: 18px; height: 15px; position: relative;
  background: linear-gradient(180deg, #b0b8c8 0%, #9aa4b8 100%);
  border-radius: 0 3px 3px 3px;
}
.picker-sec-folder::before {
  content: ''; position: absolute; top: -4px; left: 0;
  width: 9px; height: 4px;
  background: linear-gradient(180deg, #b8c0d0 0%, #b0b8c8 100%);
  border-radius: 2px 2px 0 0;
}
.picker-sec-sidebar-item.active .picker-sec-folder {
  background: linear-gradient(180deg, var(--accent-mid) 0%, var(--accent) 100%);
}
.picker-sec-sidebar-item.active .picker-sec-folder::before {
  background: linear-gradient(180deg, var(--accent-mid) 0%, var(--accent) 100%);
}
.picker-sec-sidebar-count {
  flex-shrink: 0; font-size: .72rem; color: var(--muted);
  background: var(--border); border-radius: 10px; padding: 1px 6px;
  min-width: 20px; text-align: center;
}
.picker-sec-sidebar-item.active .picker-sec-sidebar-count {
  background: var(--accent-mid); color: var(--accent);
}

/* Right case panel */
.picker-case-panel {
  flex: 1; min-width: 0; display: flex; flex-direction: column;
  overflow: hidden;
}
.picker-case-toolbar {
  display: flex; align-items: center; gap: 6px; flex-shrink: 0;
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}
.picker-case-list {
  flex: 1; min-height: 0; overflow-y: auto;
}

.picker-case-group-header {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 14px 5px;
  font-size: .72rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--muted);
  background: var(--panel-alt);
  border-bottom: 1px solid var(--border-soft);
  border-top: 1px solid var(--border-soft);
  position: sticky; top: 0; z-index: 1;
}
.picker-sec-checkbox {
  width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; flex-shrink: 0;
}

/* Remove old tree class (now replaced by picker-case-list) */
.picker-modal-tree {
  flex: 1; min-height: 0; overflow-y: auto;
  padding-bottom: 14px;
}

/* Run popup header */
.run-popup-header {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  padding-bottom: 14px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.popup-cases-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 0 8px; flex-shrink: 0;
}
.popup-cases-count { font-weight: 700; font-size: .88rem; color: var(--text); }

/* Popup body — two-panel layout */
.popup-body {
  flex: 1; min-height: 0; overflow: hidden;
  display: flex; gap: 16px;
}
.popup-in-run-panel { flex: 1; overflow-y: auto; min-width: 0; }
.popup-picker-panel {
  flex: 1; min-width: 0; min-height: 0;
  border-left: 1px solid var(--border); padding-left: 16px;
  display: flex; flex-direction: column; gap: 6px; overflow: hidden;
}
.popup-picker-search { flex-shrink: 0; }
.popup-picker-list { flex: 1; min-height: 0; overflow-y: auto; }

/* Section folders */
.popup-section-group { margin-bottom: 14px; }
.popup-section-row {
  display: flex; align-items: center; gap: 7px;
  padding: 5px 10px;
  background: linear-gradient(90deg, var(--panel-soft), var(--panel-alt));
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-soft);
  margin-bottom: 6px;
  position: sticky; top: 0; z-index: 1;
}
.popup-folder-icon { font-size: .68rem; color: var(--accent); }
.popup-section-label {
  font-size: .72rem; font-weight: 800; color: var(--muted);
  text-transform: uppercase; letter-spacing: .07em;
}

/* ── Case cards (in-run panel) ── */
.popup-case-card {
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--panel);
  margin-bottom: 6px;
  overflow: hidden;
  transition: box-shadow .14s ease;
}
.popup-case-card:last-child { margin-bottom: 0; }
.popup-case-card:hover { box-shadow: 0 4px 12px rgba(15,23,42,.07); }

.popup-case-s-passed   { border-left-color: var(--green); }
.popup-case-s-failed   { border-left-color: var(--red); }
.popup-case-s-skipped  { border-left-color: var(--amber); }
.popup-case-s-untested { border-left-color: var(--border); }

.popup-case-main { padding: 10px 14px 8px 12px; }
.popup-case-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 10px; margin-bottom: 7px;
}
.popup-case-title-wrap {
  display: flex; align-items: baseline; gap: 8px; min-width: 0; flex: 1;
}
.popup-case-idpill {
  flex-shrink: 0; font-size: .7rem; font-weight: 800; letter-spacing: .04em;
  color: var(--accent); background: var(--accent-soft);
  padding: 1px 7px; border-radius: var(--radius-pill);
}
.popup-case-name {
  font-size: .92rem; font-weight: 700; color: var(--text); line-height: 1.35;
  overflow: hidden; text-overflow: ellipsis;
}
.popup-cur-status {
  flex-shrink: 0; font-size: .68rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .06em;
  padding: 2px 9px; border-radius: var(--radius-pill);
}
.popup-cur-passed   { background: var(--green-soft);  color: var(--green); }
.popup-cur-failed   { background: var(--red-soft);    color: var(--red); }
.popup-cur-skipped  { background: var(--amber-soft);  color: var(--amber); }
.popup-cur-untested { background: var(--panel-alt);   color: var(--subtle); }

.popup-case-meta { display: flex; gap: 5px; flex-wrap: wrap; }
.popup-meta-chip {
  font-size: .7rem; font-weight: 600; color: var(--muted);
  background: var(--panel-alt); border: 1px solid var(--border-soft);
  padding: 1px 8px; border-radius: var(--radius-pill);
}

.popup-case-footer {
  display: flex; align-items: center; gap: 5px;
  padding: 7px 12px;
  border-top: 1px solid var(--border-soft);
  background: var(--bg-top);
}

/* Labeled status buttons */
.popup-status-btns { display: flex; gap: 4px; flex: 1; }
.popup-status-btn {
  padding: 4px 11px; border-radius: var(--radius-pill);
  border: 1px solid var(--border); background: transparent;
  color: var(--muted); font-size: .75rem; font-weight: 600; cursor: pointer;
  white-space: nowrap;
  transition: background .12s, border-color .12s, color .12s;
}
.popup-status-btn:hover { background: var(--panel-alt); color: var(--text); }
.popup-status-btn.active { border-color: transparent; font-weight: 700; }
.popup-sbtn-passed.active,  .popup-sbtn-passed:hover  { background: var(--green-soft);  color: var(--green);  border-color: transparent; }
.popup-sbtn-failed.active,  .popup-sbtn-failed:hover  { background: var(--red-soft);    color: var(--red);    border-color: transparent; }
.popup-sbtn-skipped.active, .popup-sbtn-skipped:hover { background: var(--amber-soft);  color: var(--amber);  border-color: transparent; }

.popup-remove-btn {
  margin-left: auto; flex-shrink: 0;
  padding: 3px 10px; border-radius: var(--radius-pill);
  border: 1px solid transparent; background: transparent;
  color: var(--subtle); font-size: .74rem; font-weight: 600; cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
}
.popup-remove-btn:hover { background: var(--red-soft); color: var(--red); }

/* ── Picker search bar (search + filter dropdowns, single row) ── */
.picker-search-bar {
  display: flex; align-items: center; gap: 6px; flex-shrink: 0;
  padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.picker-search-input { flex: 1; min-width: 0; }
.picker-filter-select {
  flex-shrink: 0; padding: 7px 6px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: var(--panel); color: var(--text);
  font-size: .76rem; cursor: pointer; max-width: 120px;
  transition: border-color .12s;
}
.picker-filter-select:focus { border-color: var(--accent); outline: none; }
.picker-clear-btn {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
  border: 1.5px solid var(--border); background: transparent;
  color: var(--muted); cursor: pointer; font-size: 1rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: background-color .12s ease, color .12s ease, border-color .12s ease;
}
.picker-clear-btn:hover { background: var(--red-soft); color: var(--red); border-color: var(--red); }

/* ── Picker multi-select toolbar ── */
.picker-multi-toolbar {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
  padding: 6px 10px; border-radius: var(--radius-sm);
  background: var(--accent-soft); border: 1px solid var(--accent-mid);
}
.picker-multi-count { font-size: .75rem; color: var(--muted); flex: 1; }
.picker-multi-btn {
  padding: 3px 10px; border-radius: var(--radius-pill);
  font-size: .75rem; font-weight: 600; cursor: pointer;
  background: var(--panel); border: 1.5px solid var(--border);
  color: var(--text); transition: border-color .12s ease, color .12s ease, background-color .12s ease, opacity .12s ease;
}
.picker-multi-btn:hover { border-color: var(--accent); color: var(--accent); }
.picker-multi-btn.primary {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
.picker-multi-btn.primary:hover { opacity: .88; }

/* ── Picker tree checkboxes ── */
.picker-tree-checkbox {
  flex-shrink: 0; width: 15px; height: 15px; cursor: pointer;
  accent-color: var(--accent);
}
.picker-tree-checkbox:disabled { cursor: default; opacity: .5; }
.picker-tree-case-label {
  display: flex; align-items: center; gap: 8px; flex: 1;
  cursor: pointer; overflow: hidden;
}

/* ── Picker tree (section tree + case rows) ── */
.picker-tree-view { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; }
.picker-detail-view { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow-y: auto; gap: 10px; }
.picker-scroll-area { flex: 1; min-height: 0; overflow-y: auto; }

.picker-sec-block { border-bottom: 1px solid var(--border-soft); }
.picker-tree-section {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 10px 7px 0;
  background: var(--panel-alt);
  cursor: default;
  user-select: none;
}
.picker-tree-section:hover { background: var(--table-row-hover); }
.picker-tree-toggle {
  flex-shrink: 0; font-size: .65rem; color: var(--muted);
  cursor: pointer; width: 12px; text-align: center;
  transition: transform .12s;
}
.picker-tree-secname {
  font-size: .82rem; font-weight: 700; color: var(--text); flex: 1;
  cursor: pointer;
}
.picker-tree-secname:hover { color: var(--accent); }
.picker-tree-count {
  font-size: .7rem; font-weight: 700;
  background: var(--panel-alt); color: var(--muted);
  padding: 1px 7px; border-radius: var(--radius-pill);
}

.picker-tree-case {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 0;
  border-bottom: 1px solid var(--border-soft);
  transition: background .1s ease;
}
.picker-tree-case:hover { background: var(--table-row-hover); }
.picker-tree-case.selected { background: var(--accent-soft); }
.picker-tree-case.in-run { background: var(--green-soft); }
.picker-tree-case.in-run:hover { background: color-mix(in srgb, var(--green-soft) 85%, #000 15%); }
.picker-tree-case-label {
  display: flex; align-items: center; gap: 7px; flex: 1;
  cursor: pointer; overflow: hidden;
  min-width: 0;
}
.picker-tree-case-id {
  flex-shrink: 0; font-size: .68rem; font-weight: 800; letter-spacing: .03em;
  color: var(--accent); background: var(--accent-soft);
  padding: 1px 6px; border-radius: var(--radius-pill);
}
.picker-tree-case-title {
  font-size: .84rem; color: var(--text); flex: 1;
  overflow-wrap: anywhere; word-break: break-word;
}
.picker-case-pri {
  flex-shrink: 0; font-size: .64rem; font-weight: 700;
  padding: 1px 6px; border-radius: var(--radius-pill);
  letter-spacing: .02em;
}
.picker-case-pri-low      { background: var(--pri-low-bg);      color: var(--pri-low-color); }
.picker-case-pri-medium   { background: var(--pri-medium-bg);   color: var(--pri-medium-color); }
.picker-case-pri-high     { background: var(--pri-high-bg);     color: var(--pri-high-color); }
.picker-case-pri-critical { background: var(--pri-critical-bg); color: var(--pri-critical-color); }
.picker-tree-in-run {
  flex-shrink: 0; font-size: .7rem; font-weight: 800;
  color: var(--green);
}

/* ── Case detail in picker ── */
.picker-detail-nav {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding-bottom: 12px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.picker-case-detail { overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 12px; }
.picker-detail-badges { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.picker-detail-title { font-size: 1rem; font-weight: 800; color: var(--text); margin: 0; line-height: 1.35; }
.picker-detail-section { font-size: .78rem; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.picker-detail-block { display: flex; flex-direction: column; gap: 5px; }
.picker-detail-label {
  font-size: .69rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em;
  color: var(--subtle);
}
.picker-detail-text {
  font-size: .85rem; color: var(--text); line-height: 1.5;
  white-space: pre-wrap; word-break: break-word;
}
.picker-detail-steps { display: flex; flex-direction: column; gap: 6px; }
.picker-step-row {
  display: grid; grid-template-columns: 28px 1fr; gap: 8px; align-items: start;
  padding: 7px 10px; border-radius: var(--radius-xs);
  background: var(--step-bg); border: 1px solid var(--border-soft);
}
.picker-step-text { font-size: .84rem; color: var(--text); line-height: 1.45; }

/* Import modal UI */
.import-info-box {
  background: var(--blue-soft);
  border: 1px solid color-mix(in srgb, var(--blue) 25%, transparent 75%);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: .88rem;
  color: var(--blue);
  margin-bottom: 14px;
}
.import-file-label {
  display: block;
  font-weight: 600;
  font-size: .88rem;
  margin-bottom: 7px;
  color: var(--text);
}
.import-file-input {
  display: block;
  width: 100%;
  padding: 7px 10px;
  font-size: .88rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  box-sizing: border-box;
  cursor: pointer;
  transition: border-color .14s ease;
}
.import-file-input:focus { border-color: var(--border-focus); outline: none; }
.import-file-preview {
  margin-top: 8px;
  font-size: .86rem;
  color: var(--muted);
}
.import-file-preview-icon { color: var(--accent); }

/* Removed wizard-specific classes (kept for layout if still referenced) */
.import-detected-card {
  border: 1px solid var(--border); border-radius: 16px; padding: 16px;
  background: color-mix(in srgb, var(--panel) 86%, var(--panel-soft) 14%);
  margin-bottom: 16px;
}
.import-detected-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px;
  border-radius: var(--radius-pill); background: var(--blue-soft); color: var(--blue);
  font-size: .8rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase;
}
.import-detected-copy { margin-top: 11px; color: var(--text); font-size: .94rem; }
.import-detected-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 11px; color: var(--muted); font-size: .88rem; }
.import-mapper-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 13px; margin-bottom: 16px; }
.import-extra-fields { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px 13px; }
.import-extra-option {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 11px; border: 1px solid var(--border); border-radius: 13px;
  background: var(--panel-alt);
}
.import-extra-option input { width: 15px; height: 15px; }

/* Run result badges (case execution history) */
.rt-status-badge {
  flex-shrink: 0; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  padding: 2px 8px; border-radius: var(--radius-pill);
}
.rt-badge-passed  { background: var(--green-soft); color: var(--green); }
.rt-badge-failed  { background: var(--red-soft);   color: var(--red); }
.rt-badge-skipped { background: var(--amber-soft);  color: var(--amber); }
.rt-badge-untested{ background: color-mix(in srgb, var(--panel-alt) 84%, var(--border)); color: var(--text); border: 1px solid var(--border); }

/* AI risk badges (phase 2) */
.ai-risk-badge.ai-risk-high { background: #fee2e2; color: #b91c1c; border: 1px solid rgba(220,38,38,.3); }
.ai-risk-badge.ai-risk-med, .ai-risk-badge.ai-risk-medium { background: #fef3c7; color: #92400e; border: 1px solid rgba(234,179,8,.3); }
.ai-risk-badge.ai-risk-low { background: #dcfce7; color: #166534; border: 1px solid rgba(22,163,74,.3); }

/* Approval-workflow status pills */
.approval-badge.approval-draft    { background: #f3f4f6; color: #374151; border: 1px solid #d1d5db; }
.approval-badge.approval-pending  { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.approval-badge.approval-approved { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.approval-badge.approval-rejected { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }

/* ── Legacy (keep for any remaining references) ── */
.run-detail-header {
  display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap;
}
.meta-stack { display: grid; gap: 6px; }
.result-filters, .status-chicklets { display: flex; gap: 8px; flex-wrap: wrap; }
.status-pill {
  border: 1px solid var(--border); background: transparent;
  color: var(--text); border-radius: var(--radius-pill);
  padding: 7px 12px; font-size: .83rem; cursor: pointer;
  font-weight: 500;
  transition: transform .14s ease, border-color .14s ease, background-color .14s ease, color .14s ease;
}
.status-pill:hover { transform: translateY(-1px); }
.status-pill.active { border-color: var(--accent-mid); box-shadow: 0 0 0 1px var(--accent-soft) inset; }
.status-pill.pass.active,  .status-pill.pass:hover  { background: var(--green-soft); }
.status-pill.fail.active,  .status-pill.fail:hover  { background: var(--red-soft); }
.status-pill.skip.active,  .status-pill.skip:hover  { background: var(--blue-soft); }
.status-pill.neutral.active,.status-pill.neutral:hover { background: var(--purple-soft); }
.run-summary-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.details-block {
  border: 1px solid var(--border); border-radius: 14px;
  background: var(--panel-alt); padding: 13px 15px;
}
.details-block summary { cursor: pointer; font-weight: 700; color: var(--text); }
.details-block[open] summary { margin-bottom: 11px; }

/* ═══════════════════════════════════════════════════════════════
   BREADCRUMBS
═══════════════════════════════════════════════════════════════ */
.crumbs {
  display: flex; align-items: center; gap: 7px; margin-bottom: 5px;
  font-size: .7rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  color: var(--crumb);
}
.crumb-link {
  border: 0; background: transparent; padding: 0; color: inherit;
  font: inherit; font-weight: inherit; letter-spacing: inherit; text-transform: inherit;
  cursor: pointer; transition: color .13s ease;
}
.crumb-link:hover { color: var(--accent); }
.crumb-sep { color: var(--crumb-sep); }
.crumb-current { color: var(--crumb-current); }
.crumb-logo-image {
  width: 19px; height: 19px; object-fit: contain; border-radius: 5px;
  background: var(--panel); padding: 2px; margin-right: 7px; vertical-align: middle;
}
.auth-logo-image { margin: 0 auto 8px; width: 60px; height: 60px; }

/* ═══════════════════════════════════════════════════════════════
   BRAND LOGO IN SIDEBAR
═══════════════════════════════════════════════════════════════ */
.brand-logo-image {
  width: 42px; height: 42px; border-radius: 10px; object-fit: contain;
  background: rgba(255,255,255,.92); padding: 5px;
  box-shadow: 0 5px 16px rgba(0,0,0,.16);
}

/* ═══════════════════════════════════════════════════════════════
   LOGO UPLOADER (settings)
═══════════════════════════════════════════════════════════════ */
.logo-uploader {
  border: 1.5px dashed var(--border); border-radius: 13px;
  padding: 15px; background: var(--panel-alt);
}
.logo-preview-box { display: flex; align-items: center; gap: 13px; }
.logo-preview-image {
  width: 68px; height: 68px; object-fit: contain;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 13px; padding: 7px;
}
.verification-error {
  margin-top: 8px;
  color: var(--amber);
}

.logo-empty {
  min-height: 68px; display: flex; align-items: center; justify-content: center;
  color: var(--muted); background: var(--panel); border: 1px solid var(--border);
  border-radius: 13px; font-size: .9rem;
}

/* ═══════════════════════════════════════════════════════════════
   MISC UTILITIES
═══════════════════════════════════════════════════════════════ */
.list-item-clickable.selected {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border) 55%);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 20%, transparent 80%) inset;
}
.ghost-btn {
  background: transparent; box-shadow: none;
  color: var(--muted); padding-inline: 10px;
}
.ghost-btn:hover { background: var(--panel-alt); color: var(--text); }
.clean-topbar { padding: 0 0 8px; border-bottom: 1px solid var(--border-soft); align-items: flex-end; }
.clean-actions { gap: 10px; }
.project-dropdown-trigger { min-width: 260px; max-width: 320px; }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════════ */
@media (max-width: 1180px) {
  .grid.metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-grid, .two-col, .form-grid { grid-template-columns: 1fr; }
  .project-list-row { grid-template-columns: 1fr; }
  .project-row-actions { justify-content: flex-start; }
}
@media (max-width: 1100px) {
  .file-manager { grid-template-columns: 1fr; }
  .folder-pane, .file-list-pane { min-height: auto; }
}
@media (max-width: 980px) {
  .settings-admin-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  /* One-column grid + min-height:100% stretches BOTH auto rows to fill the
     viewport, inflating the sidebar band to half the screen on short pages.
     Pin the sidebar row to its content height; the main row takes the rest. */
  .app-shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; align-content: start; }
  .sidebar {
    position: sticky; top: 0; z-index: 20;
    height: auto;
    overflow: visible;
    gap: 0;
    padding: 0;
    flex-direction: row;
    align-items: center;
  }
  .brand {
    padding: 10px 14px;
    border-bottom: none;
    flex-shrink: 0;
    width: auto;
  }
  .brand-badge { width: 30px; height: 30px; font-size: .7rem; border-radius: 8px; }
  .brand-name { font-size: .9rem; }
  .brand-sub { display: none; }
  .nav-list {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 2px;
    overflow-x: auto;
    padding: 8px 10px;
    scrollbar-width: none;
    flex: 1;
  }
  .nav-list::-webkit-scrollbar { display: none; }
  .nav-btn {
    width: auto;
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 8px 12px;
    border-radius: 10px;
    gap: 6px;
  }
  .nav-icon { width: 24px; height: 24px; font-size: .68rem; }
  .nav-label { font-size: .78rem; }
  .sidebar-footer {
    margin-top: 0;
    padding: 8px 12px;
    flex-shrink: 0;
    gap: 6px;
  }
  .sidebar-footer .header-dropdown { order: -1; }
  .main { padding: 16px; }
  .topbar { flex-direction: column; align-items: flex-start; gap: 10px; }
  .page-title,
  .top-actions { width: 100%; }
  .page-title h2 { font-size: 1.35rem; }
  .page-title p { font-size: .85rem; }
  .top-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  .clean-actions { width: 100%; justify-content: flex-start; }
  .header-dropdown,
  .project-switcher-shell { max-width: 100%; }
  .project-dropdown-trigger {
    min-width: 140px;
    max-width: none;
  }
  .project-switcher-shell {
    flex: 1 1 200px;
    min-width: 0;
  }
  .project-switcher-popover {
    left: 0;
    right: auto;
    width: min(420px, calc(100vw - 32px));
  }
  .header-dropdown-menu {
    right: auto;
    left: 0;
    max-width: min(320px, calc(100vw - 32px));
  }
  .tr-body { grid-template-columns: 1fr; }
  .tr-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border);
    max-height: min(42vh, 320px);
  }
  .run-summary-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { border-radius: 14px; }
  /* Drawers take over the whole screen — the floating 90vw modal leaves the
     sticky sidebar strip and avatar visible behind it on foldables/tablets */
  .side-drawer,
  .side-drawer.wide,
  .side-drawer.fullscreen,
  .side-drawer.wide.fullscreen {
    top: 0; right: 0; left: 0; bottom: 0;
    width: 100vw; max-width: none;
    height: 100dvh;
    border-radius: 0;
  }
  .side-drawer.wide {
    opacity: 1;
    transform: translate3d(100%, 0, 0);
    transition: transform .22s cubic-bezier(.32,.78,.4,1);
  }
  .side-drawer.wide.open { transform: translate3d(0, 0, 0); }
}
@media (max-width: 760px) {
  .main { padding: 14px 12px 20px; }
  .card { padding: 16px; }
  /* 16px inputs prevent iOS auto-zoom; 44px is the touch target minimum */
  .input, .select, .textarea { font-size: 16px; min-height: 44px; }
  .page-title h2 { font-size: 1.3rem; }
  .page-title p { font-size: .88rem; }
  .clean-topbar {
    align-items: flex-start;
    gap: 10px;
  }
  .top-actions > * { max-width: 100%; }
  .project-switcher-shell,
  .project-dropdown-trigger { width: 100%; }
  .settings-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 8px;
    scrollbar-width: none;
  }
  .settings-tabs::-webkit-scrollbar { display: none; }
  .settings-tab {
    flex: 0 0 auto;
    white-space: nowrap;
  }
  .cases-toolbar { flex-direction: column; align-items: stretch; }
  .search-input,
  .tr-search { width: 100%; max-width: none; }
  .table-wrap,
  .tr-main { -webkit-overflow-scrolling: touch; }
  .project-card-head,
  .project-list-title,
  .dashboard-run-head,
  .dashboard-activity-head,
  .list-item {
    flex-direction: column;
    align-items: flex-start;
  }
  .project-list-row {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px;
  }
  .project-row-actions,
  .project-card .toolbar,
  .milestone-row-actions,
  .run-hero-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .project-row-actions .btn,
  .project-card .toolbar .btn,
  .milestone-row-actions .btn {
    flex: 1 1 calc(50% - 8px);
    justify-content: center;
    min-width: 132px;
  }
  .dashboard-run-link,
  .dashboard-activity-link {
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .detail-grid { grid-template-columns: 1fr; }
  .side-drawer,
  .side-drawer.fullscreen,
  .side-drawer.wide,
  .side-drawer.wide.fullscreen {
    top: 0;
    right: 0;
    width: 100vw;
    height: 100dvh;
    max-width: none;
    border-radius: 0;
  }
  .drawer-header {
    padding: 16px 14px;
    align-items: flex-start;
    gap: 10px;
  }
  .drawer-body { padding: 16px 14px 20px; }
  .media-lightbox { padding: 12px; }
  .media-lightbox-inner,
  .import-wizard-modal,
  .run-popup-modal,
  .run-picker-modal {
    width: 100%;
    max-width: none;
    min-width: 0;
    min-height: 0;
    max-height: calc(100dvh - 24px);
    resize: none;
    border-radius: 18px;
  }
  .run-popup-modal,
  .run-picker-modal { height: calc(100dvh - 24px); }
  .picker-modal-header,
  .picker-case-toolbar,
  .run-popup-header,
  .popup-cases-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .picker-modal-header-actions {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }
  .picker-modal-body,
  .popup-body {
    flex-direction: column;
    overflow: auto;
  }
  .picker-sec-sidebar,
  .popup-in-run-panel,
  .popup-picker-panel {
    width: 100%;
    max-width: none;
  }
  .picker-sec-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border);
    max-height: 28vh;
  }
  .popup-in-run-panel { max-height: 38vh; }
  .popup-picker-panel {
    border-left: none;
    border-top: 1px solid var(--border);
    padding-left: 0;
    padding-top: 14px;
  }
  .step-editor-row { grid-template-columns: 30px 1fr; }
  .step-editor-row .btn { grid-column: 2 / -1; }
  .attachment-grid { grid-template-columns: 1fr; }
  .import-mapper-grid { grid-template-columns: 1fr; }
  .import-extra-fields { grid-template-columns: 1fr; }
  /* Hide less important table columns on tablet */
  .tr-col-type { display: none; }
}
@media (max-width: 640px) {
  .settings-admin-grid { grid-template-columns: 1fr; }
  .grid.metrics,
  .run-summary-metrics { grid-template-columns: 1fr; }
  .project-progress-inline { grid-template-columns: 1fr; }
  .project-row-actions .btn,
  .project-card .toolbar .btn,
  .milestone-row-actions .btn { flex-basis: 100%; }
  .auth-shell { padding: 16px; }
  .auth-card { padding: 22px 18px; border-radius: 20px; }
}
@media (max-width: 480px) {
  .main { padding: 10px 8px 16px; }
  .card { padding: 14px 12px; border-radius: 12px; }
  .page-title h2 { font-size: 1.15rem; }
  .page-title p { font-size: .82rem; margin-top: 2px; }
  .btn { padding: 10px 14px; font-size: .84rem; min-height: 40px; border-radius: 10px; }
  .btn.small { padding: 8px 12px; min-height: 34px; }
  .btn.primary { font-weight: 700; }
  .auth-card { padding: 20px 16px; }
  .auth-split { border-radius: 18px; }
  .auth-hero-panel { padding: 20px 18px; }
  .modal-overlay { padding: 8px; }

  /* Sidebar: icon-only compact nav bar */
  .sidebar { padding: 0; }
  .brand { display: none; }
  .sidebar-footer { display: none; }
  .nav-list { gap: 0; padding: 6px 8px; }
  .nav-btn {
    padding: 8px 10px; font-size: .75rem; border-radius: 10px;
    flex-direction: column; gap: 2px;
  }
  .nav-icon { width: 24px; height: 24px; font-size: .68rem; border-radius: 8px; }
  .nav-label { font-size: .62rem; }

  /* Topbar compact */
  .topbar { gap: 8px; }
  .top-actions { gap: 6px; flex-wrap: wrap; }
  .top-actions .btn { font-size: .8rem; flex: 1 1 auto; justify-content: center; }

  /* Cards tighter */
  .card-title { font-size: .95rem; }
  .card-subtitle { font-size: .78rem; }
  .card-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .card-head .toolbar { width: 100%; }

  /* Form inputs touch-friendly — 16px prevents iOS zoom */
  .input, .select, .textarea { font-size: 16px; padding: 11px 13px; min-height: 44px; border-radius: 10px; }
  .textarea { min-height: 80px; }
  .form-grid { gap: 14px; grid-template-columns: 1fr; }
  .form-grid .full { grid-column: 1; }

  /* Table: hide less important columns */
  .tr-col-type, .tr-col-auto { display: none; }
  .tr-table th, .tr-table td { padding: 10px 8px; font-size: .8rem; }
  .tr-col-id { width: 46px; }
  .tr-case-row { cursor: pointer; }

  /* List items */
  .list { gap: 8px; }
  .list-item { padding: 10px 0; gap: 8px; }
  .dashboard-run-link, .dashboard-activity-link { padding: 12px; border-radius: 12px; }

  /* Detail grid single column */
  .detail-grid { grid-template-columns: 1fr; gap: 10px; }
  .kpi-grid { grid-template-columns: 1fr; gap: 14px; }

  /* Toolbars: full width buttons */
  .toolbar { gap: 8px; flex-wrap: wrap; }
  .toolbar .btn { flex: 1 1 auto; justify-content: center; text-align: center; }

  /* Progress bars */
  .progress-track { height: 8px; border-radius: 4px; }
  .dashboard-run-progress { height: 8px; }

  /* Drawer adjustments */
  .drawer-header { padding: 14px 12px; }
  .drawer-body { padding: 14px 12px 20px; }

  /* Case detail hero */

  .cdv-id-chip { font-size: .68rem; padding: 2px 8px; }

  /* Steps compact but touch-friendly */


  /* Modals full width */
  .media-lightbox { padding: 4px; }
  .media-lightbox-inner { border-radius: 16px; max-height: calc(100dvh - 8px); }

  /* Milestone popup */
  .milestone-popup-modal { max-width: 100%; border-radius: 16px; }
  .run-form-modal { max-width: 100%; min-width: 0; }

  /* Overview bars */
  .overview-latest-runs { gap: 8px; }
  .overview-section-label { font-size: .72rem; }

  /* Two-col + project grid → single */
  .two-col { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: 1fr; }

  /* View toggle compact */
  .view-toggle { border-radius: 10px; }
  .view-toggle-btn { padding: 7px 12px; font-size: .8rem; }

  /* Metrics single column */
  .grid.metrics, .run-summary-metrics { grid-template-columns: 1fr; }

  /* Settings tabs scrollable */
  .settings-tabs { gap: 2px; padding: 6px; }
  .settings-tab { font-size: .78rem; padding: 8px 12px; }

  /* Badges smaller */
  .badge { font-size: .68rem; padding: 3px 8px; }
  .chip { font-size: .68rem; }

  /* Search full width */
  .search-input, .tr-search { width: 100%; }
}

/* ── Extra small phones (320-400px) ── */
@media (max-width: 380px) {
  .main { padding: 8px 6px 12px; }
  .card { padding: 10px 8px; }
  .sidebar { padding: 8px 6px; }
  .nav-btn { padding: 5px 8px; }
  .nav-label { display: none; }
  .nav-icon { width: 28px; height: 28px; font-size: .72rem; }
  .page-title h2 { font-size: 1rem; }
  .btn { font-size: .78rem; padding: 7px 10px; }
  .landing-pricing-grid { gap: 16px; }
  .landing-footer-inner { grid-template-columns: 1fr; gap: 24px; }
}

/* ── Touch-friendly: ensure minimum tap targets ── */
@media (pointer: coarse) {
  .btn, .icon-btn, .nav-btn, .landing-nav-link { min-height: 36px; }
  .icon-btn { min-width: 36px; min-height: 36px; }
  .list-item { min-height: 44px; }
  .tr-table td, .tr-table th { min-height: 40px; }
  .settings-tab { min-height: 38px; }
  .lm-sidebar-item { min-height: 32px; }
}

/* ── Safe area insets for notched phones ── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .sidebar { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  .landing-footer { padding-bottom: env(safe-area-inset-bottom); }
  .drawer-body { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  .media-lightbox { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
}
.status-pill {
  transition: transform .14s ease, border-color .14s ease, background-color .14s ease, color .14s ease;
}

/* ═══════════════════════════════════════════════════════════════
   SMOOTH ANIMATIONS — GPU-composited only (transform + opacity)
═══════════════════════════════════════════════════════════════ */

/* ── Keyframes ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(.94) translateY(8px); }
  to   { opacity: 1; transform: scale(1)   translateY(0); }
}
@keyframes popIn {
  0%   { opacity: 0; transform: scale(.82); }
  65%  { transform: scale(1.04); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes shimmer {
  from { background-position: -200% center; }
  to   { background-position:  200% center; }
}

/* ── Easing tokens ── */
:root {
  --ease-spring: cubic-bezier(.2, .8, .4, 1);
  --ease-out:    cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.4, 0, .2, 1);
}

/* ── Page / view entrance ── */
.stack > .card,
.stack > section.card {
  animation: fadeInUp .35s var(--ease-out) both;
}
.stack > .card:nth-child(2) { animation-delay: 40ms; }
.stack > .card:nth-child(3) { animation-delay: 80ms; }
.stack > .card:nth-child(4) { animation-delay: 120ms; }
.stack > .card:nth-child(n+5) { animation-delay: 160ms; }

/* ── Grid card entrances (runs, projects, metrics) ── */
.run-grid .run-card {
  animation: fadeInUp .32s var(--ease-out) both;
  will-change: transform, opacity;
}
.run-grid .run-card:nth-child(2) { animation-delay: 50ms; }
.run-grid .run-card:nth-child(3) { animation-delay: 100ms; }
.run-grid .run-card:nth-child(4) { animation-delay: 150ms; }
.run-grid .run-card:nth-child(n+5) { animation-delay: 180ms; }

.project-grid .project-card {
  animation: fadeInUp .32s var(--ease-out) both;
  will-change: transform, opacity;
}
.project-grid .project-card:nth-child(2) { animation-delay: 50ms; }
.project-grid .project-card:nth-child(3) { animation-delay: 100ms; }
.project-grid .project-card:nth-child(4) { animation-delay: 150ms; }
.project-grid .project-card:nth-child(n+5) { animation-delay: 180ms; }

/* ── List item entrances ── */
.list .list-item,
.list .milestone-list-item,
.ms-list .ms-list-row {
  animation: fadeInUp .28s var(--ease-out) both;
}
.list .list-item:nth-child(2),
.list .milestone-list-item:nth-child(2),
.ms-list .ms-list-row:nth-child(2) { animation-delay: 35ms; }
.list .list-item:nth-child(3),
.list .milestone-list-item:nth-child(3),
.ms-list .ms-list-row:nth-child(3) { animation-delay: 70ms; }
.list .list-item:nth-child(n+4),
.list .milestone-list-item:nth-child(n+4),
.ms-list .ms-list-row:nth-child(n+4) { animation-delay: 100ms; }

/* ── Metric cards pop ── */
.metric-grid .card {
  animation: popIn .38s var(--ease-spring) both;
  will-change: transform, opacity;
}
.metric-grid .card:nth-child(2) { animation-delay: 50ms; }
.metric-grid .card:nth-child(3) { animation-delay: 100ms; }
.metric-grid .card:nth-child(4) { animation-delay: 150ms; }

/* ── Modal / popup entrances ── */
.media-lightbox-inner {
  animation: scaleIn .22s var(--ease-spring) both;
  will-change: transform, opacity;
}
.media-lightbox {
  animation: fadeIn .18s ease both;
}

/* ── Side drawer ── */
.side-drawer {
  will-change: transform;
}

/* ── Button interactions ── */
.btn {
  will-change: transform;
  transition: transform .14s var(--ease-spring), box-shadow .14s ease,
              background-color .14s ease, border-color .14s ease, opacity .14s ease;
}
.btn:hover  { transform: translateY(-2px); }
.btn:active { transform: scale(.95) translateY(0); transition-duration: .08s; }
.btn.primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px var(--accent-mid); }
.btn.primary:active { transform: scale(.95); }

/* ── Icon buttons ── */
.icon-btn {
  transition: transform .14s var(--ease-spring), background .14s ease, color .14s ease;
  will-change: transform;
}
.icon-btn:hover  { transform: scale(1.12); }
.icon-btn:active { transform: scale(.9);  transition-duration: .07s; }

/* ── Card hover lift ── */
.run-card,
.project-card {
  will-change: transform, box-shadow;
  transition: transform .22s var(--ease-spring), box-shadow .22s ease,
              border-color .18s ease, background .18s ease;
}
.run-card:hover    { transform: translateY(-3px) scale(1.005); }
.project-card:hover { transform: translateY(-3px) scale(1.005); }

/* ── Dashboard run/activity cards ── */
.dashboard-run-link,
.dashboard-activity-link {
  will-change: transform, box-shadow;
  transition: transform .18s var(--ease-spring), background .14s ease,
              border-color .14s ease, box-shadow .18s ease;
}
.dashboard-run-link:hover,
.dashboard-activity-link:hover {
  transform: translateY(-2px) scale(1.005);
}
.dashboard-run-link:active,
.dashboard-activity-link:active {
  transform: scale(.98); transition-duration: .08s;
}


/* ── Progress bars ── */
.progress-fill,
.run-progress-pass,
.run-progress-fail {
  transition: width .6s var(--ease-out);
  will-change: width;
}

/* ── Chips / badges ── */
.run-badge,
.ms-chip,
.chip,
.project-pass-chip {
  animation: popIn .3s var(--ease-spring) both;
}

/* ── Nav items ── */
.nav-item {
  transition: background .16s var(--ease-out), color .16s ease,
              transform .16s var(--ease-spring);
}
.nav-item:hover  { transform: translateX(3px); }
.nav-item.active { transform: translateX(4px); }

/* ── Tooltip appearance ── */
[data-tooltip]::after {
  transition: opacity .15s ease, transform .15s var(--ease-spring);
  transform: translateX(-50%) translateY(4px);
}
[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Focus rings ── */
:focus-visible {
  transition: outline-offset .12s ease;
}

/* ── View toggle buttons ── */
.view-toggle-btn {
  transition: background .16s ease, color .16s ease, transform .14s var(--ease-spring);
}
.view-toggle-btn:active { transform: scale(.93); }

/* ── App dialog (replaces browser alert/confirm) ── */
.app-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn .15s ease;
}
@keyframes fadeIn { from { opacity:0 } to { opacity:1 } }
.app-dialog-box {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 28px 22px;
  min-width: 300px;
  max-width: 420px;
  width: calc(100vw - 48px);
  box-shadow: 0 24px 60px rgba(0,0,0,.25);
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: scaleIn .18s var(--ease-spring);
}
.app-dialog-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  flex-shrink: 0;
  align-self: flex-start;
}
.app-dialog-icon-info    { background: color-mix(in srgb,var(--accent) 18%,transparent); color: var(--accent); }
.app-dialog-icon-success { background: color-mix(in srgb,#22c55e 18%,transparent); color: #22c55e; }
.app-dialog-icon-error   { background: color-mix(in srgb,#ef4444 18%,transparent); color: #ef4444; }
.app-dialog-icon-warning { background: color-mix(in srgb,#f59e0b 18%,transparent); color: #f59e0b; }
.app-dialog-msg {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
}
.app-dialog-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 4px;
}

/* ── Respect reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
}

/* ═══════════════════════════════════════════════════════════════
   LANDING PAGE
═══════════════════════════════════════════════════════════════ */
.landing-page {
  font-family: Inter, system-ui, -apple-system, sans-serif;
  color: #1e293b; background: #fff;
  min-height: 100vh; overflow-x: hidden;
}
.landing-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid #e2e8f0; padding: 0 24px;
}
.landing-nav-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  height: 64px;
}
.landing-logo {
  font-size: 1.25rem; font-weight: 800; color: #4f46e5;
  letter-spacing: -.02em;
}

/* Nav links */
.landing-nav-links { display: flex; gap: 4px; }
.landing-nav-link {
  background: none; border: none; color: #475569; font-size: .88rem;
  font-weight: 500; cursor: pointer; padding: 6px 12px; border-radius: 8px;
  transition: color .15s, background .15s;
}
.landing-nav-link:hover { color: #4f46e5; background: #f1f5f9; }

/* Hero */
.landing-hero {
  padding: 80px 24px 40px; text-align: center;
  background: linear-gradient(170deg, #f8faff 0%, #eef2ff 40%, #e0e7ff 100%);
  overflow: hidden;
}
.landing-hero-inner { max-width: 860px; margin: 0 auto; }
.landing-hero-badge {
  display: inline-block; background: #e0e7ff; color: #4338ca;
  font-size: .78rem; font-weight: 700; padding: 6px 16px;
  border-radius: 999px; margin-bottom: 24px; letter-spacing: .02em;
}
.landing-h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 900;
  line-height: 1.12; margin: 0 0 22px; color: #0f172a;
  letter-spacing: -.03em;
}
.landing-h1-accent {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.landing-subtitle {
  font-size: 1.12rem; color: #475569; line-height: 1.65;
  margin: 0 0 32px; max-width: 600px; margin-left: auto; margin-right: auto;
}
.landing-hero-btn { padding: 13px 32px; font-size: 1rem; }
.landing-hero-mockup {
  margin-top: 48px; max-width: 780px; margin-left: auto; margin-right: auto;
}

/* Stats bar */
.landing-stats-bar {
  background: #0f172a; padding: 32px 24px;
}
.landing-stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  max-width: 800px; margin: 0 auto; text-align: center;
}
.landing-stat-value { font-size: 1.6rem; font-weight: 900; color: #fff; }
.landing-stat-label { font-size: .8rem; color: #94a3b8; margin-top: 4px; }

/* Sections */
.landing-section { padding: 72px 24px; }
.landing-section-alt { background: #f8fafc; }
.landing-section-inner { max-width: 1100px; margin: 0 auto; }
.landing-section-label {
  text-align: center; font-size: .72rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .12em; color: #4f46e5;
  margin-bottom: 10px;
}
.landing-h2 {
  font-size: 2rem; font-weight: 800; text-align: center;
  margin: 0 0 14px; color: #0f172a; letter-spacing: -.02em;
}
.landing-section-desc {
  text-align: center; color: #64748b; font-size: 1.05rem;
  margin: 0 0 48px; max-width: 560px; margin-left: auto; margin-right: auto;
  line-height: 1.6;
}

/* Features grid */
.landing-features-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.landing-feature-card {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 16px;
  padding: 26px 22px; transition: box-shadow .2s, transform .2s;
}
.landing-feature-card:hover {
  box-shadow: 0 8px 30px rgba(79,70,229,.1); transform: translateY(-3px);
  border-color: #c7d2fe;
}
.landing-feature-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: .82rem; font-weight: 800; color: #fff;
  margin-bottom: 14px; letter-spacing: .03em;
}
.landing-feature-card h3 {
  font-size: .95rem; font-weight: 700; margin: 0 0 8px; color: #0f172a;
}
.landing-feature-card p {
  font-size: .82rem; color: #64748b; line-height: 1.55; margin: 0 0 12px;
}
.landing-feature-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 4px;
}
.landing-feature-list li {
  font-size: .78rem; color: #475569; padding-left: 16px;
  position: relative; line-height: 1.5;
}
.landing-feature-list li::before {
  content: '\2022'; position: absolute; left: 0; color: #4f46e5; font-weight: 700;
}

/* Showcase sections */
.landing-showcase {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
}
.landing-showcase-reverse { direction: rtl; }
.landing-showcase-reverse > * { direction: ltr; }
.landing-showcase-text { }
.landing-showcase-checks {
  list-style: none; padding: 0; margin: 16px 0 0;
  display: flex; flex-direction: column; gap: 8px;
}
.landing-showcase-checks li {
  font-size: .88rem; color: #334155; font-weight: 500; line-height: 1.4;
}
.landing-showcase-visual { }

/* Steps row */
.landing-steps-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px;
  text-align: center;
}
.landing-step-num {
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #7c3aed); color: #fff;
  font-weight: 800; font-size: 1.3rem;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px; box-shadow: 0 4px 14px rgba(79,70,229,.25);
}
.landing-step h3 { font-size: .95rem; font-weight: 700; margin: 0 0 8px; color: #0f172a; }
.landing-step p { font-size: .84rem; color: #64748b; margin: 0; line-height: 1.55; }

/* Pricing grid */
.landing-pricing-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  max-width: 960px; margin: 0 auto;
}
.landing-pricing-card {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 20px;
  padding: 36px 28px 28px; text-align: center; position: relative;
  transition: box-shadow .2s, transform .2s;
  display: flex; flex-direction: column;
}
.landing-pricing-card:hover {
  box-shadow: 0 12px 40px rgba(79,70,229,.12); transform: translateY(-3px);
}
.landing-pricing-highlight {
  border-color: #4f46e5; box-shadow: 0 0 0 2px #4f46e5;
  background: linear-gradient(180deg, #faf5ff 0%, #fff 40%);
}
.landing-pricing-badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, #4f46e5, #7c3aed); color: #fff;
  font-size: .72rem; font-weight: 700;
  padding: 5px 16px; border-radius: 999px; letter-spacing: .03em;
  white-space: nowrap;
}
.landing-pricing-card h3 { font-size: 1.1rem; font-weight: 700; margin: 0 0 14px; color: #0f172a; }
.landing-price { margin-bottom: 14px; }
.landing-price-amount { font-size: 2.6rem; font-weight: 900; color: #0f172a; letter-spacing: -.02em; }
.landing-price-period { font-size: .85rem; color: #64748b; margin-left: 2px; }
.landing-pricing-desc { font-size: .88rem; color: #64748b; margin: 0 0 16px; }
.landing-pricing-includes {
  list-style: none; padding: 0; margin: 0 0 20px;
  text-align: left; display: flex; flex-direction: column; gap: 8px;
  border-top: 1px solid #f1f5f9; padding-top: 16px;
}
.landing-pricing-includes li {
  font-size: .84rem; color: #334155; line-height: 1.4;
}

/* FAQ */
.landing-faq-list { display: flex; flex-direction: column; gap: 8px; }
.landing-faq-item {
  border: 1px solid #e2e8f0; border-radius: 12px; overflow: hidden;
  transition: box-shadow .15s;
}
.landing-faq-item[open] { box-shadow: 0 4px 16px rgba(79,70,229,.06); border-color: #c7d2fe; }
.landing-faq-q {
  padding: 16px 20px; font-weight: 600; font-size: .95rem; color: #0f172a;
  cursor: pointer; list-style: none; display: flex; justify-content: space-between;
  align-items: center;
}
.landing-faq-q::-webkit-details-marker { display: none; }
.landing-faq-q::after { content: '+'; font-size: 1.3rem; color: #94a3b8; font-weight: 300; }
.landing-faq-item[open] .landing-faq-q::after { content: '\u2212'; }
.landing-faq-a {
  padding: 0 20px 18px; font-size: .9rem; color: #475569; line-height: 1.65;
}

/* CTA section */
.landing-cta-section {
  background: linear-gradient(135deg, #4f46e5 0%, #6d28d9 50%, #7c3aed 100%);
  padding: 72px 24px;
}

/* Footer */
.landing-footer {
  background: #0f172a; padding: 48px 24px 0; color: #94a3b8;
}
.landing-footer .landing-logo { color: #fff; }
.landing-footer-inner {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
  padding-bottom: 32px;
}
.landing-footer-text { font-size: .85rem; line-height: 1.6; color: #94a3b8; margin: 0; }
.landing-footer-heading { font-size: .78rem; font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 12px; }
.landing-footer-col { display: flex; flex-direction: column; gap: 6px; }
.landing-footer-link {
  color: #94a3b8; text-decoration: none; font-size: .85rem;
  background: none; border: none; text-align: left; cursor: pointer;
  padding: 0; transition: color .15s;
}
.landing-footer-link:hover { color: #e2e8f0; }
.landing-footer-bottom {
  border-top: 1px solid #1e293b; padding: 16px 0; text-align: center;
  font-size: .78rem; color: #64748b; max-width: 1100px; margin: 0 auto;
}

/* ── Mockup illustrations ── */
.lm-frame {
  background: #fff; border: 1px solid #d1d5db; border-radius: 14px;
  box-shadow: 0 25px 60px rgba(15,23,42,.14), 0 2px 6px rgba(15,23,42,.06);
  overflow: hidden; font-family: Inter, system-ui, sans-serif;
}
.lm-titlebar {
  background: #f1f5f9; border-bottom: 1px solid #e2e8f0;
  padding: 10px 14px; display: flex; align-items: center; gap: 10px;
}
.lm-dots { display: flex; gap: 6px; }
.lm-dot { width: 10px; height: 10px; border-radius: 50%; }
.lm-dot-r { background: #ef4444; }
.lm-dot-y { background: #f59e0b; }
.lm-dot-g { background: #22c55e; }
.lm-titlebar-text { font-size: .7rem; color: #94a3b8; font-weight: 500; }
.lm-window { display: grid; grid-template-columns: 56px 1fr; min-height: 260px; }
.lm-sidebar {
  background: #1e293b; padding: 12px 6px;
  display: flex; flex-direction: column; gap: 4px;
}
.lm-sidebar-item {
  width: 44px; height: 36px; border-radius: 8px; background: #334155;
  display: flex; align-items: center; justify-content: center;
}
.lm-sidebar-label { font-size: .58rem; font-weight: 700; color: #94a3b8; letter-spacing: .03em; }
.lm-sidebar-item.lm-active { background: #4f46e5; }
.lm-sidebar-item.lm-active .lm-sidebar-label { color: #fff; }
.lm-body { padding: 14px 16px; background: #fafbfc; }
.lm-topbar {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px;
}
.lm-bar-title-text { font-size: .82rem; font-weight: 700; color: #1e293b; }
.lm-bar-actions {
  font-size: .65rem; font-weight: 700; color: #fff; background: #4f46e5;
  padding: 5px 12px; border-radius: 8px;
}
.lm-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.lm-metric {
  padding: 10px 12px; border-radius: 10px; background: #fff;
  border: 1px solid #e2e8f0;
}
.lm-metric-val { font-size: .9rem; font-weight: 800; color: #1e293b; }
.lm-metric-label { font-size: .58rem; color: #94a3b8; font-weight: 500; margin-top: 2px; }
.lm-m1 { border-left: 3px solid #4f46e5; }
.lm-m2 { border-left: 3px solid #10b981; }
.lm-m3 { border-left: 3px solid #f59e0b; }
.lm-m4 { border-left: 3px solid #ef4444; }
.lm-cards { display: grid; grid-template-columns: 1.2fr .8fr; gap: 10px; }
.lm-card { padding: 10px 12px; border-radius: 10px; background: #fff; border: 1px solid #e2e8f0; }
.lm-card-title { font-size: .65rem; font-weight: 700; color: #64748b; margin-bottom: 8px; text-transform: uppercase; letter-spacing: .04em; }
.lm-mini-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: .7rem; color: #334155; padding: 4px 0;
  border-bottom: 1px solid #f1f5f9;
}
.lm-mini-row:last-child { border-bottom: none; }
.lm-mini-sm { font-size: .65rem; color: #64748b; display: block; }
.lm-badge {
  font-size: .58rem; font-weight: 700; padding: 2px 8px; border-radius: 999px;
}
.lm-badge-green { background: #d1fae5; color: #059669; }
.lm-badge-blue { background: #dbeafe; color: #2563eb; }
.lm-table { display: flex; flex-direction: column; }
.lm-table-header {
  display: grid; grid-template-columns: 50px 1fr 70px 60px;
  padding: 6px 10px; background: #f1f5f9; border-radius: 6px 6px 0 0;
  font-size: .6rem; font-weight: 700; color: #64748b; text-transform: uppercase;
  letter-spacing: .04em;
}
.lm-table-row {
  display: grid; grid-template-columns: 50px 1fr 70px 60px; align-items: center;
  padding: 8px 10px; background: #fff; border-bottom: 1px solid #f1f5f9;
  font-size: .68rem; color: #334155;
}
.lm-row-alt { background: #fafbfc; }
.lm-cell-id { font-weight: 700; color: #4f46e5; font-size: .64rem; }
.lm-cell-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lm-cell-pri { font-weight: 700; font-size: .62rem; }
.lm-cell-status { width: 10px; height: 10px; border-radius: 50%; }
.lm-status-passed { background: #10b981; }
.lm-status-failed { background: #ef4444; }
.lm-status-untested { background: #d1d5db; }
.lm-progress-section { margin-bottom: 14px; }
.lm-prog-label { font-size: .7rem; color: #64748b; font-weight: 600; margin-bottom: 8px; }
.lm-prog-bar { height: 10px; background: #e2e8f0; border-radius: 6px; overflow: hidden; margin-bottom: 10px; }
.lm-prog-fill { height: 100%; background: linear-gradient(90deg, #10b981, #34d399); border-radius: 6px; }
.lm-prog-stats { display: flex; gap: 8px; }
.lm-stat {
  flex: 1; border-radius: 8px; padding: 6px 10px;
  font-size: .62rem; font-weight: 700; text-align: center;
}
.lm-s-pass { background: #d1fae5; color: #059669; }
.lm-s-fail { background: #fecaca; color: #dc2626; }
.lm-s-skip { background: #f1f5f9; color: #64748b; }
.lm-case-list { display: flex; flex-direction: column; gap: 5px; }
.lm-case-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 12px; border-radius: 8px; background: #fff;
  border: 1px solid #e2e8f0; border-left: 3px solid #d1d5db;
  font-size: .7rem; color: #334155;
}
.lm-ci-pass { border-left-color: #10b981; }
.lm-ci-fail { border-left-color: #ef4444; }
.lm-case-badge {
  font-size: .55rem; font-weight: 800; letter-spacing: .04em; color: #94a3b8;
}

/* ── Case Tags ─────────────────────────────────────────────────── */


/* ── Case Comments ─────────────────────────────────────────────── */

.comment-entry {
  border: 1px solid var(--border, #e2e8f0); border-radius: 8px;
  padding: 10px 12px; background: var(--surface, #fff);
}
.comment-meta {
  display: flex; gap: 10px; align-items: center; margin-bottom: 6px; font-size: .72rem; color: var(--text-muted, #64748b);
}
.comment-time { flex: 1; }
.comment-delete { background: none; border: none; cursor: pointer; color: var(--text-muted, #64748b); font-size: .9rem; }
.comment-delete:hover { color: var(--danger, #ef4444); }

/* ── Run due date & notes preview ──────────────────────────────── */
.run-due-date { font-size: .75rem; color: var(--text-muted, #64748b); padding: 4px 0 2px; }
.run-due-date.overdue { color: var(--danger, #ef4444); font-weight: 600; }
.run-notes-preview { font-size: .75rem; color: var(--text-muted, #64748b); padding: 2px 0 4px; font-style: italic; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 320px; }

/* ── Global search modal results ───────────────────────────────── */
.global-search-results { display: flex; flex-direction: column; gap: 6px; max-height: 420px; overflow-y: auto; }
.global-search-result-row {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  border: 1px solid var(--border, #e2e8f0); border-radius: 8px;
  cursor: pointer; transition: background .1s;
}
.global-search-result-row:hover { background: var(--hover, #f8fafc); }
.global-search-result-title { flex: 1; font-size: .83rem; font-weight: 500; color: var(--text, #1e293b); }

/* ── API Tokens table ──────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.data-table th { text-align: left; padding: 8px 12px; font-weight: 600; color: var(--text-muted, #64748b); border-bottom: 2px solid var(--border, #e2e8f0); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; }
.data-table td { padding: 8px 12px; border-bottom: 1px solid var(--border, #e2e8f0); color: var(--text, #1e293b); }
.data-table tr:last-child td { border-bottom: none; }
.data-table code { font-family: monospace; background: var(--surface-alt, #f8fafc); padding: 2px 6px; border-radius: 4px; font-size: .78rem; }

/* ── Activity Feed ─────────────────────────────────────────────── */
.activity-feed { display: flex; flex-direction: column; gap: 8px; }
.activity-entry { padding: 10px 14px; border-radius: 8px; border: 1px solid var(--border, #e2e8f0); background: var(--surface, #fff); }
.activity-meta { display: flex; gap: 12px; align-items: center; margin-bottom: 4px; font-size: .72rem; }
.activity-user { font-weight: 700; color: var(--text, #1e293b); }
.activity-time { color: var(--text-muted, #64748b); }
.activity-action { font-size: .82rem; color: var(--text, #1e293b); }

/* Responsive */
@media (max-width: 1024px) {
  .landing-features-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .landing-features-grid, .landing-steps-row, .landing-pricing-grid,
  .landing-showcase, .landing-showcase-reverse,
  .landing-stats-grid { grid-template-columns: 1fr; }
  .landing-footer-inner { grid-template-columns: 1fr 1fr; }
  .landing-hero { padding: 48px 20px 32px; }
  .landing-section { padding: 48px 20px; }
  .landing-nav-links { display: none; }
  .lm-frame { min-height: 200px; }
  .lm-metrics { grid-template-columns: repeat(2, 1fr); }
}

/* ── Case Assign Chip ──────────────────────────────────────────── */
.assign-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px;
  border-radius: 20px; background: var(--surface-alt, #f1f5f9); color: var(--text, #1e293b);
  font-size: .75rem; font-weight: 600; border: 1px solid var(--border, #e2e8f0);
}

/* ── Run Notes Panel ───────────────────────────────────────────── */
.run-notes-panel {
  margin: 0 0 14px; padding: 14px 18px; border-radius: 10px;
  border: 1px solid var(--border, #e2e8f0); background: var(--surface, #fff);
}
.run-notes-header { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }

/* ── Bulk Result Panel ─────────────────────────────────────────── */
.bulk-result-panel {
  margin: 0 0 14px; padding: 14px 18px; border-radius: 10px;
  border: 2px solid var(--warning-border, #fde68a); background: var(--warning-bg, #fffbeb);
}


/* ── Section Stats Chip ────────────────────────────────────────── */
.sec-stats-chip { position: relative; display: inline-block; }
.sec-stats-btn { background: none; border: none; cursor: pointer; font-size: 1rem; opacity: .55; padding: 0 4px; line-height: 1; vertical-align: middle; }
.sec-stats-btn:hover { opacity: 1; }
.sec-stats-popover {
  /* right-anchored: the trigger lives at the far-right of the section header
     row, so a left-anchored popover would extend past the viewport edge and
     get clipped. Opening leftward keeps it fully on-screen. */
  position: absolute; top: 100%; right: 0; left: auto; z-index: 120; min-width: 180px;
  background: var(--surface, #fff); border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: 12px 14px;
}
.sec-stats-row { display: flex; justify-content: space-between; gap: 16px; padding: 3px 0; font-size: .78rem; }
.sec-stats-close { position: absolute; top: 6px; right: 8px; background: none; border: none; cursor: pointer; font-size: .9rem; color: var(--text-muted, #64748b); }
.sec-stats-close:hover { color: var(--danger, #ef4444); }

/* ── Jira Bug Modal ─────────────────────────────────────────────── */
.jira-bug-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 9998;
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.jira-bug-panel {
  background: var(--card-bg, #fff); border-radius: 12px; width: 540px; max-width: 100%;
  max-height: calc(100vh - 64px); display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,.2); overflow: hidden;
}
.jira-bug-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border, #e2e8f0);
}
.jira-bug-close {
  background: none; border: none; font-size: 20px; cursor: pointer;
  color: var(--text-muted, #64748b); line-height: 1; padding: 2px 6px;
}
.jira-bug-close:hover { color: var(--danger, #ef4444); }
.jira-bug-body { padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.jira-bug-footer {
  padding: 14px 20px; border-top: 1px solid var(--border, #e2e8f0);
  display: flex; gap: 8px; justify-content: flex-end;
}
.jira-bug-note { color: var(--amber, #b7791f); margin-top: 6px; }

/* Jira people-picker (Settings → "Your Jira account", Bug Bash Reporter) */
.jira-identity-results { margin-top: 6px; display: flex; flex-direction: column; gap: 4px; }
.jira-identity-results:empty { margin-top: 0; }
.jira-identity-hint { font-size: 12px; color: var(--muted); padding: 4px 2px; }
.jira-identity-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 7px 10px; text-align: left; cursor: pointer;
  background: var(--panel, #fff); color: inherit;
  border: 1px solid var(--border, #e2e8f0); border-radius: 6px; font: inherit;
}
.jira-identity-item:hover { border-color: var(--accent); background: var(--accent-soft, #eef2ff); }
.jira-identity-av { width: 24px; height: 24px; border-radius: 50%; flex: 0 0 auto; object-fit: cover; }
.jira-identity-av-blank { display: inline-block; background: var(--border, #e2e8f0); }
.jira-identity-meta { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.jira-identity-name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jira-identity-email { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jira-identity-picked {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; margin-bottom: 6px;
  background: var(--accent-soft, #eef2ff); border: 1px solid var(--accent, #6366f1); border-radius: 6px;
}
.jira-identity-clear {
  flex: 0 0 auto; border: none; background: transparent; cursor: pointer;
  font-size: 18px; line-height: 1; color: var(--muted); padding: 0 4px;
}
.jira-identity-clear:hover { color: var(--text, #111); }

/* ── Cmd+K Quick Search ─────────────────────────────────────────── */
.cmdk-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 9999;
  display: flex; align-items: flex-start; justify-content: center; padding-top: 80px;
}
.cmdk-panel {
  background: var(--card-bg, #fff); border-radius: 12px; width: 540px; max-width: calc(100vw - 32px);
  box-shadow: 0 24px 80px rgba(0,0,0,.25); overflow: hidden;
}
.cmdk-input {
  width: 100%; padding: 16px 18px; font-size: 16px; border: none; outline: none;
  border-bottom: 1px solid var(--border, #e2e8f0); background: transparent; color: var(--text, #1e293b);
  box-sizing: border-box;
}
.cmdk-results { max-height: 360px; overflow-y: auto; }
.cmdk-empty { padding: 20px 18px; color: var(--text-muted, #64748b); font-size: 13px; }
.cmdk-item {
  display: flex; align-items: center; gap: 10px; padding: 11px 18px;
  cursor: pointer; border-bottom: 1px solid var(--border, #e2e8f0);
}
.cmdk-item:last-child { border-bottom: none; }
.cmdk-item:hover { background: var(--hover-bg, #f8fafc); }
.cmdk-item-id { font-size: 11px; font-weight: 700; color: var(--primary, #6366f1); min-width: 44px; }
.cmdk-item-title { flex: 1; font-size: 13px; color: var(--text, #1e293b); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmdk-item-sec { font-size: 11px; color: var(--text-muted, #64748b); white-space: nowrap; }

/* All multi-line text fields are resizable */
textarea, .textarea { resize: vertical; }

/* ═══ Modern polish pass ═══ */
html { scroll-behavior: smooth; }
::selection { background: rgba(99, 102, 241, .22); }
.btn { transition: background .15s, border-color .15s, transform .12s, box-shadow .15s; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.primary:hover { box-shadow: 0 6px 16px rgba(99, 102, 241, .35); }
.card { transition: box-shadow .18s; }
.input:focus, .textarea:focus, select:focus { box-shadow: 0 0 0 3px rgba(99, 102, 241, .16); }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: rgba(100, 110, 140, .35); border-radius: 6px; border: 2px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background-color: rgba(100, 110, 140, .55); }
*::-webkit-scrollbar-track { background: transparent; }

/* ── Blocked / Retest statuses ─────────────────── */
.status-pill.block, .rt-badge-blocked { background: var(--st-blocked-soft); color: var(--st-blocked); border-color: transparent; }
.status-pill.retest, .rt-badge-retest { background: var(--st-retest-soft); color: var(--st-retest); border-color: transparent; }

/* ── Run configurations ────────────────────────── */
.run-config-chip { font-size: .76rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: rgba(56, 189, 248, .14); color: #0284c7; white-space: nowrap; }
a.run-config-chip { text-decoration: none; }

/* ── Automation runs: brand, automated marker, outcome, devices ── */
.run-brand-badge { margin-left: 6px; vertical-align: middle; }
.run-automated-badge { margin-left: 6px; vertical-align: middle; }
.run-outcome-badge { flex-shrink: 0; padding: 3px 10px; border-radius: var(--radius-pill); font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.run-outcome-passed  { background: var(--green-soft); color: var(--green); }
.run-outcome-failed  { background: var(--red-soft); color: var(--red); }
.run-outcome-pending { background: var(--panel-alt); color: var(--muted); border: 1px solid var(--border); }

/* ── Execution history / versions panels ───────── */
.exec-history-row, .version-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border, rgba(148,163,184,.15)); font-size: .85rem; flex-wrap: wrap; }
.exec-history-row:last-child, .version-row:last-child { border-bottom: none; }
.exec-history-run { font-weight: 600; text-decoration: none; }
.exec-history-comment { cursor: help; }
.version-title { color: var(--text-muted, #94a3b8); font-size: .8rem; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.version-row .btn { margin-left: auto; }

/* ── Shared steps / bulk edit ──────────────────── */
.shared-step-select { max-width: 190px; min-height: 32px; padding: 4px 8px; font-size: .82rem; }
.shared-step-row { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--border, rgba(148,163,184,.15)); }
.shared-step-row:last-child { border-bottom: none; }
.shared-step-row .btn { margin-left: auto; }
.shared-step-row .small-muted { white-space: nowrap; }

/* ── Automation modal ──────────────────────────── */
.automation-token-box { border: 1px dashed var(--border, rgba(148,163,184,.3)); border-radius: 10px; padding: 12px 14px; }
.automation-token { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; word-break: break-all; padding: 4px 8px; border-radius: 6px; background: rgba(148, 163, 184, .12); }
.automation-snippet { font-size: .76rem; padding: 12px; border-radius: 10px; background: rgba(15, 23, 42, .65); color: #e2e8f0; overflow-x: auto; white-space: pre; margin: 0; }

/* ── Mentions ──────────────────────────────────── */
.mention { color: var(--accent, #3b82f6); background: rgba(59, 130, 246, .12); border-radius: 3px; padding: 0 3px; font-weight: 700; }

/* Contain long unbroken strings in case detail panels */

.cdv-meta-val, .cdv-ref-link, .comment-body, .exec-history-row, .version-title, .cdv-section .small-muted { overflow-wrap: anywhere; word-break: break-word; }
.rt-case-title, .flaky-title, .coverage-title { overflow-wrap: anywhere; }
.rt-result-detail { overflow-wrap: anywhere; }

/* Direct-child empty-state messages inside .cdv-section had no padding
   and rendered flush with the card edge — inconsistent with every other
   block in the card. Give them the same 14px 16px the section body uses. */


/* ── SprintDeck shortcut ───────────────────────── */
.sd-shortcut { text-decoration: none; background: linear-gradient(135deg, #0d9488, #0f766e) !important; color: #fff !important; border: none !important; font-weight: 700; }
.sd-shortcut:hover { filter: brightness(1.1); }

/* ── Issue tracker toggle ──────────────────────── */
.tracker-toggle-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.tracker-tile { position: relative; text-align: left; padding: 16px 18px; border: 2px solid var(--border, rgba(148,163,184,.25)); border-radius: 12px; background: transparent; cursor: pointer; display: flex; flex-direction: column; gap: 6px; font-family: inherit; color: inherit; }
.tracker-tile strong { font-size: 1rem; }
.tracker-tile.active { border-color: var(--accent, #6366f1); background: rgba(99, 102, 241, .07); box-shadow: 0 4px 16px rgba(99, 102, 241, .12); }
.tracker-tile-check { position: absolute; top: 10px; right: 12px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent, #6366f1); color: #fff; font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; opacity: 0; }
.tracker-tile.active .tracker-tile-check { opacity: 1; }

/* Suite activity chips */
.suite-chip { display: inline-flex; align-items: center; justify-content: center; font-size: 9.5px; font-weight: 800; letter-spacing: .4px; color: #fff; border-radius: 4px; padding: 2px 7px; margin-right: 6px; flex-shrink: 0; }
.dashboard-activity-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* Plan scope options */
.scope-options { display: flex; flex-direction: column; gap: 8px; }
.scope-option { display: flex; align-items: flex-start; gap: 10px; padding: 11px 14px; border: 2px solid var(--border, rgba(148,163,184,.25)); border-radius: 12px; cursor: pointer; }
.scope-option.active { border-color: var(--accent, #6366f1); background: rgba(99, 102, 241, .06); }
.scope-option input { margin-top: 3px; accent-color: var(--accent, #6366f1); }
.scope-option .chip { font-size: .72rem; font-weight: 800; padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.scope-suite.active { border-color: #8b5cf6; background: linear-gradient(135deg, rgba(139, 92, 246, .08), rgba(99, 102, 241, .04)); }

.app-shortcut { text-decoration: none; font-weight: 700; }
.app-shortcut-pf { background: linear-gradient(135deg, #2563eb, #1d4ed8) !important; color: #fff !important; border: none !important; }
.app-shortcut-nf { background: linear-gradient(135deg, #d97706, #b45309) !important; color: #fff !important; border: none !important; }
@media (max-width: 900px) { .sd-shortcut, .app-shortcut { display: none; } }

.pro-badge { display: inline-flex; align-items: center; font-size: 9px; font-weight: 800; letter-spacing: .5px; background: linear-gradient(135deg, #8b5cf6, #6366f1); color: #fff; border-radius: 4px; padding: 1px 5px; margin-left: 6px; vertical-align: 1px; }

/* Landing real screenshots */
.landing-real-frame { border-radius: 14px; overflow: hidden; border: 1px solid rgba(148,163,184,.35); box-shadow: 0 30px 70px -25px rgba(30,27,75,.45); background: #fff; }
.landing-frame-bar { display: flex; gap: 6px; padding: 10px 14px; background: #eef1f7; border-bottom: 1px solid rgba(148,163,184,.3); }
.landing-frame-bar span { width: 10px; height: 10px; border-radius: 50%; background: #cbd5e1; }
.landing-frame-bar span:first-child { background: #fca5a5; }
.landing-frame-bar span:nth-child(2) { background: #fcd34d; }
.landing-frame-bar span:nth-child(3) { background: #86efac; }
.landing-real-img { width: 100%; display: block; }

/* ══════════════════════════════════════════════════════════════
   Focus Mode — manual test runner overlay (ported from off-the-rails)
   ══════════════════════════════════════════════════════════════ */
.focus-overlay {
  position: fixed; inset: 0; z-index: 4000;
  background: var(--main-bg, #f8fafc);
  display: flex; flex-direction: column;
  animation: focusFadeIn 0.15s ease;
}
@keyframes focusFadeIn { from { opacity: 0; } to { opacity: 1; } }

.focus-topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 20px;
  background: var(--card-bg, #fff);
  border-bottom: 1px solid var(--border-color, #e2e8f0);
  flex-shrink: 0;
}
.focus-topbar-left { display: flex; flex-direction: column; gap: 2px; min-width: 180px; }
.focus-run-name { font-weight: 700; font-size: 15px; color: var(--text-primary); }
.focus-progress-text { font-size: 12px; color: var(--text-muted); }
.focus-progress-track {
  flex: 1; height: 8px; border-radius: 6px;
  background: var(--main-bg, #eef2ff); overflow: hidden;
  border: 1px solid var(--border-color, #e2e8f0);
}
.focus-progress-fill {
  height: 100%; border-radius: 6px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  transition: width 0.3s ease;
}

.focus-body {
  flex: 1; overflow-y: auto;
  display: flex; flex-direction: column; align-items: center;
  padding: 32px 20px;
}
.focus-card {
  width: 100%; max-width: 720px;
  background: var(--card-bg, #fff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 16px;
  padding: 28px 32px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}
.focus-card-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 10px;
}
.focus-pos {
  font-size: 12px; font-weight: 700;
  color: var(--accent, #6366f1);
  background: var(--accent-light, #eef2ff);
  padding: 3px 10px; border-radius: 12px;
}
.focus-breadcrumb { font-size: 12px; color: var(--text-muted); }
.focus-refs {
  font-size: 11px; font-family: monospace;
  background: #64748b; color: #fff; padding: 2px 8px; border-radius: 10px;
}
.focus-current-result {
  margin-left: auto; font-size: 12px; font-weight: 700;
  padding: 3px 12px; border-radius: 12px; color: #fff;
}
.focus-res-passed  { background: #22c55e; }
.focus-res-failed  { background: #ef4444; }
.focus-res-blocked { background: #f59e0b; }
.focus-res-skipped { background: #94a3b8; }
.focus-res-retest  { background: #8b5cf6; }

.focus-title { font-size: 22px; font-weight: 700; color: var(--text-primary); line-height: 1.3; margin-bottom: 12px; }
.focus-pre {
  font-size: 14px; color: var(--text-primary);
  background: var(--main-bg, #f8fafc); border-radius: 8px;
  padding: 10px 12px; margin-bottom: 16px;
}
.focus-section-label {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px;
  color: var(--text-muted); margin: 18px 0 8px;
}
.focus-steps { display: flex; flex-direction: column; gap: 6px; }
.focus-step {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; border-radius: 8px; cursor: pointer;
  background: var(--main-bg, #f8fafc);
  border: 1px solid transparent; transition: all 0.12s ease;
}
.focus-step:hover { border-color: var(--border-color, #e2e8f0); }
.focus-step input:checked ~ .focus-step-body .focus-step-action { text-decoration: line-through; color: var(--text-muted); }
.focus-step-cb { width: 18px; height: 18px; margin-top: 1px; flex-shrink: 0; cursor: pointer; }
.focus-step-num {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent-light, #eef2ff); color: var(--accent, #6366f1);
  font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.focus-step-body { display: flex; flex-direction: column; gap: 3px; }
.focus-step-action { font-size: 14px; color: var(--text-primary); }
.focus-step-expected { font-size: 13px; color: var(--text-muted); }
.focus-expected-final {
  font-size: 14px; color: var(--text-primary);
  background: rgba(34,197,94,0.08); border-radius: 8px; padding: 10px 12px;
}
.focus-note {
  width: 100%; min-height: 70px; resize: vertical;
  border: 1px solid var(--input-border, #e2e8f0); border-radius: 8px;
  padding: 10px 12px; font-size: 14px; font-family: inherit;
  background: var(--input-bg, #f8fafc); color: var(--text-primary);
}
.focus-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.focus-btn {
  flex: 1; min-width: 110px;
  padding: 14px 16px; border-radius: 10px; border: 2px solid transparent;
  font-size: 15px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: all 0.12s ease; background: var(--card-bg, #fff);
}
.focus-btn kbd {
  font-size: 10px; padding: 1px 5px; border-radius: 4px;
  background: rgba(0,0,0,0.12); border: none; font-family: monospace;
}
.focus-btn-pass    { color: #16a34a; border-color: #86efac; }
.focus-btn-pass:hover, .focus-btn-pass.active    { background: #22c55e; color: #fff; border-color: #22c55e; }
.focus-btn-fail    { color: #dc2626; border-color: #fca5a5; }
.focus-btn-fail:hover, .focus-btn-fail.active    { background: #ef4444; color: #fff; border-color: #ef4444; }
.focus-btn-blocked { color: #d97706; border-color: #fcd34d; }
.focus-btn-blocked:hover, .focus-btn-blocked.active { background: #f59e0b; color: #fff; border-color: #f59e0b; }
.focus-btn-skip    { color: #64748b; border-color: #cbd5e1; }
.focus-btn-skip:hover, .focus-btn-skip.active    { background: #94a3b8; color: #fff; border-color: #94a3b8; }

.focus-nav {
  width: 100%; max-width: 720px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 20px;
}
.focus-nav-hint { font-size: 12px; color: var(--text-muted); }

/* ═══════════════════════════════════════════════════════════════
   TCX REDESIGN — Test Cases list / Add-Edit form / Case detail
   (namespaced under .tcx-* roots; appended so it wins the cascade)
═══════════════════════════════════════════════════════════════ */
.tcx-cases, .tcx-form, .tcx-detail, .tcx-page {
  --tcx-ink: #201c48;
  --tcx-body: #4a4568;
  --tcx-muted: #a29fbe;
  --tcx-muted-2: #8f89bd;
  --tcx-card: #ffffff;
  --tcx-card-alt: #faf9fe;
  --tcx-rail: #fbfbfe;
  --tcx-group: #f6f5fc;
  --tcx-line: #f0eef9;
  --tcx-border: #ece9f8;
  --tcx-chip: #f1eff9;
  --tcx-accent: #6f6bf5;
  --tcx-accent-deep: #514dd6;
  --tcx-accent-ink: #6d28d9;
  --tcx-accent-strong: #4338ca;
  --tcx-accent-soft: #eef2ff;
  --tcx-accent-soft-2: #ede9ff;
  --tcx-grad: linear-gradient(180deg, #6f6bf5, #514dd6);
  --tcx-grad-green: linear-gradient(180deg, #10b981, #0d9668);
  --tcx-grad-purple: linear-gradient(180deg, #8b5cf6, #7c3aed);
  --tcx-hero-grad: linear-gradient(135deg, #eef2ff 0%, #f3f0ff 50%, #fdf1f8 100%);
  --tcx-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}
body[data-theme="dark"] .tcx-cases,
body[data-theme="dark"] .tcx-form,
body[data-theme="dark"] .tcx-detail,
body[data-theme="dark"] .tcx-page {
  --tcx-ink: var(--text);
  --tcx-body: var(--text);
  --tcx-muted: var(--muted);
  --tcx-muted-2: var(--muted);
  --tcx-card: var(--panel);
  --tcx-card-alt: var(--panel-alt);
  --tcx-rail: var(--panel-alt);
  --tcx-group: var(--panel-alt);
  --tcx-line: var(--border);
  --tcx-border: var(--border);
  --tcx-chip: var(--panel-alt);
  --tcx-accent-ink: var(--accent);
  --tcx-accent-strong: var(--accent);
  --tcx-accent-soft: rgba(124, 156, 255, .14);
  --tcx-accent-soft-2: rgba(124, 156, 255, .18);
  --tcx-hero-grad: linear-gradient(135deg, var(--panel-alt) 0%, var(--panel) 100%);
}

/* ── Shared button looks ─────────────────────────────────────── */
.tcx-cases .tr-top-right .btn.secondary,
.tcx-cases .tr-top-right .btn.secondary.small,
.tcx-cases .tcx-risk-btn,
.tcx-page .tcx-back-btn {
  background: var(--tcx-card);
  border: 1px solid var(--tcx-border);
  box-shadow: 0 1px 3px rgba(30, 27, 58, .05);
  color: var(--tcx-body);
  border-radius: 10px;
  font-weight: 700;
  font-size: 12px;
}
.tcx-cases .tr-top-right .btn.secondary:hover,
.tcx-cases .tcx-risk-btn:hover,
.tcx-page .tcx-back-btn:hover {
  background: var(--tcx-card-alt);
  color: var(--tcx-body);
}
.tcx-cases .tcx-risk-btn { color: #b45309; }
.tcx-cases .tcx-risk-btn:hover { background: #fffbeb; color: #b45309; }
body[data-theme="dark"] .tcx-cases .tcx-risk-btn { color: #fbbf24; }
body[data-theme="dark"] .tcx-cases .tcx-risk-btn:hover { background: var(--panel-alt); }
.tcx-cases .tr-top-right .btn.primary.small,
.tcx-form .tcx-form-actions .btn.primary {
  background: var(--tcx-grad);
  border: none;
  color: #fff;
  border-radius: 10px;
  font-weight: 700;
  box-shadow: 0 6px 14px -6px rgba(99, 102, 241, .65);
}
.tcx-cases .tr-top-right .btn.primary.small:hover,
.tcx-form .tcx-form-actions .btn.primary:hover { filter: brightness(1.05); }
.tcx-cases .btn.free-generate-btn, .tcx-form .btn.free-generate-btn {
  background: var(--tcx-grad-green); border: none; color: #fff;
  border-radius: 10px; font-weight: 700;
  box-shadow: 0 5px 12px -5px rgba(16, 185, 129, .6);
}
.tcx-cases .btn.ai-generate-btn, .tcx-form .btn.ai-generate-btn {
  background: var(--tcx-grad-purple); border: none; color: #fff;
  border-radius: 10px; font-weight: 700;
  box-shadow: 0 5px 12px -5px rgba(139, 92, 246, .6);
}
.tcx-cases .btn.free-generate-btn:hover:not(:disabled),
.tcx-cases .btn.ai-generate-btn:hover:not(:disabled),
.tcx-form .btn.free-generate-btn:hover:not(:disabled),
.tcx-form .btn.ai-generate-btn:hover:not(:disabled) { filter: brightness(1.05); }

/* ── LIST VIEW ────────────────────────────────────────────────── */
.tcx-search {
  display: flex; align-items: center; gap: 9px;
  flex: 1; min-width: 220px; max-width: 360px;
  padding: 0 14px;
  background: var(--tcx-card);
  border: 1px solid var(--tcx-border);
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(30, 27, 58, .05);
}
.tcx-search-ic { color: #b4afce; font-size: 14px; line-height: 1; }
.tcx-search .tr-search,
.tcx-search .tr-search:focus {
  flex: 1; max-width: none; border: none; background: none;
  box-shadow: none; outline: none; padding: 10px 0;
  font-weight: 600; font-size: 13.5px; color: var(--tcx-ink);
}
.tcx-search .tr-search::placeholder { color: #b4afce; font-weight: 500; }
.tcx-search:focus-within {
  border-color: var(--tcx-accent);
  box-shadow: 0 0 0 3px rgba(111, 107, 245, .15);
}

.tcx-cases .tr-body {
  border: none;
  border-radius: 20px;
  background: var(--tcx-card);
  box-shadow: 0 24px 60px -30px rgba(79, 70, 229, .3), 0 2px 10px rgba(15, 23, 42, .05);
  grid-template-columns: var(--tc-w, minmax(268px, 300px)) 1fr;
}

/* Sections rail */
.tcx-cases .tr-sidebar { background: var(--tcx-rail); border-right: 1px solid var(--tcx-line); }
/* Movable divider between the sections rail and the case list */
.tr-sidebar { position: relative; }
.tc-resizer {
  position: absolute; top: 0; right: 0; bottom: 0; width: 6px;
  cursor: col-resize; z-index: 2; background: transparent;
}
.tc-resizer::before {
  content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 2px;
  background: transparent; transition: background .15s;
}
.tc-resizer:hover::before, .tc-resizer.dragging::before { background: var(--tcx-accent, var(--accent)); }
/* Multi-selected folders: selection bar + drag-and-drop hints */
.tc-sidebar-selection {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 0 10px 8px; padding: 7px 10px; border-radius: 10px;
  background: var(--tcx-chip, var(--accent-soft)); font-size: 12px; font-weight: 600;
}
.tc-sidebar-selection span { flex: 1; min-width: 0; }
.tc-sidebar-selection .tc-sidebar-move { width: auto; min-width: 0; max-width: 150px; height: 28px; padding: 2px 6px; font-size: 12px; }
.tr-folder-link.sec-dragging { opacity: .45; }
.tr-section-link.sec-drop-inside { outline: 2px dashed var(--tcx-accent, var(--accent)); outline-offset: -2px; }
.tr-section-link.sec-drop-before { box-shadow: inset 0 2px 0 var(--tcx-accent, var(--accent)); }
.tr-section-link.sec-drop-after { box-shadow: inset 0 -2px 0 var(--tcx-accent, var(--accent)); }
/* Move / Copy cases modal */
.tc-movecopy-modes { display: flex; flex-direction: column; gap: 8px; }
.tc-movecopy-mode { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; font-size: 13px; line-height: 1.4; }
.tc-movecopy-mode input { margin-top: 3px; }
/* Token Usage monthly trend (Settings → AI) */
.ai-usage-month.active { background: var(--accent-soft, rgba(99, 102, 241, .1)); }
.ai-usage-bar { flex: 1; min-width: 40px; max-width: 160px; height: 6px; border-radius: 99px; background: var(--border, #e5e7eb); overflow: hidden; }
.ai-usage-bar-fill { display: block; height: 100%; border-radius: 99px; background: var(--accent, #6366f1); }
.tcx-cases .tr-sidebar-head {
  padding: 16px 18px 12px;
  font-size: 11px; font-weight: 800; letter-spacing: .07em;
  color: var(--tcx-muted);
}
.tcx-cases .tr-sidebar-head .btn.secondary.small {
  padding: 5px 9px; font-size: 11px; color: #6d6a86; border-radius: 8px;
}
.tcx-cases .tr-sidebar-tree { padding: 0 10px 16px; }
.tcx-cases .tr-section-link {
  border-left: none;
  border-radius: 10px;
  margin-bottom: 2px;
  padding: 9px 11px;
  font-weight: 600; font-size: 13px; color: var(--tcx-body);
}
.tcx-cases .tr-section-link:hover { background: var(--tcx-chip); }
.tcx-cases .tr-section-link.active {
  background: var(--tcx-accent-soft);
  box-shadow: none;
  color: var(--tcx-accent-strong);
  font-weight: 800;
}
.tcx-cases .tr-sec-count {
  background: var(--tcx-chip); color: var(--tcx-muted-2);
  font-weight: 700; font-size: 11px; padding: 2px 9px;
}
.tcx-cases .tr-section-link.active .tr-sec-count { background: #ddd6fe; color: #5b21b6; }
body[data-theme="dark"] .tcx-cases .tr-section-link.active .tr-sec-count {
  background: var(--tcx-accent-soft-2); color: var(--accent);
}
.tcx-cases .tr-sidebar-actions { border-top: 1px solid var(--tcx-line); }

/* Table */
.tcx-cases .tr-table thead th {
  background: var(--tcx-card-alt);
  border-bottom: 1px solid var(--tcx-line);
  color: var(--tcx-muted);
  font-size: 10.5px; font-weight: 800; letter-spacing: .06em;
  padding: 13px 12px;
}
.tcx-cases .tr-col-cb input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--tcx-accent); }
.tcx-cases .tr-section-row td {
  background: var(--tcx-group);
  border-top: none;
  border-bottom: 1px solid var(--tcx-line);
}
.tcx-cases .tr-section-label { padding: 11px 12px; }
.tcx-cases .tr-chevron { color: #8b84c0; font-size: 11px; }
.tcx-cases .tr-sec-title { font-weight: 800; font-size: 13.5px; color: var(--tcx-ink); }
.tcx-cases .tr-sec-pill {
  background: none; padding: 2px 0;
  color: var(--tcx-muted); font-weight: 700; font-size: 11.5px;
}
.tcx-minibars {
  display: inline-flex; align-items: flex-end; gap: 2px; height: 14px;
}
.tcx-minibars span { width: 3px; border-radius: 1px; background: #cdc7ea; }
.tcx-minibars span:nth-child(1) { height: 6px; }
.tcx-minibars span:nth-child(2) { height: 12px; background: #a78bfa; }
.tcx-minibars span:nth-child(3) { height: 9px; }
.tcx-cases .tr-case-row td {
  padding: 12px;
  border-bottom: 1px solid var(--tcx-line);
}
.tcx-cases .tr-case-row:hover td { background: var(--tcx-card-alt); }
.tcx-cases .tr-case-id {
  font-family: var(--tcx-mono);
  font-weight: 600; font-size: 12.5px; color: var(--tcx-accent-ink);
}
.tcx-cases .tr-case-title { font-weight: 700; font-size: 13.5px; color: var(--tcx-ink); }
.tcx-cases .tr-case-row:hover .tr-case-title { color: #4f46e5; }
body[data-theme="dark"] .tcx-cases .tr-case-row:hover .tr-case-title { color: var(--accent); }
.tcx-cases .tr-jira-ref {
  background: var(--tcx-accent-soft); color: var(--tcx-accent-strong);
  font-family: var(--tcx-mono); font-weight: 600; font-size: 10.5px;
  padding: 2px 7px; border-radius: 6px;
}
.tcx-cases .tr-type-label { font-weight: 600; font-size: 12.5px; color: var(--tcx-body); }
.tcx-cases .tr-auto-label { font-weight: 600; font-size: 12.5px; color: #7c76a8; }
body[data-theme="dark"] .tcx-cases .tr-auto-label { color: var(--muted); }
.tcx-cases .tcx-auto-yes,
.tcx-cases .tr-auto-label.tcx-auto-yes {
  display: inline-flex; align-items: center;
  padding: 4px 10px; border-radius: 999px;
  background: #dcfce7; color: #0f9d6b;
  font-weight: 700; font-size: 11.5px;
}
body[data-theme="dark"] .tcx-cases .tr-auto-label.tcx-auto-yes {
  background: rgba(16, 185, 129, .16); color: #34d399;
}

/* Priority chips (list) */
.tcx-cases .priority-badge {
  padding: 4px 11px; border-radius: 999px;
  font-weight: 700; font-size: 11.5px;
}
.tcx-cases .priority-badge.priority-low { background: transparent; color: #94a3b8; padding: 4px 2px; }
.tcx-cases .priority-badge.priority-medium { background: #e0edff; color: #2563eb; }
.tcx-cases .priority-badge.priority-high { background: #ffedd8; color: #c2410c; }
.tcx-cases .priority-badge.priority-critical { background: #ffe4e8; color: #e11d48; }
body[data-theme="dark"] .tcx-cases .priority-badge.priority-medium { background: rgba(37, 99, 235, .2); color: #93c5fd; }
body[data-theme="dark"] .tcx-cases .priority-badge.priority-high { background: rgba(194, 65, 12, .22); color: #fdba74; }
body[data-theme="dark"] .tcx-cases .priority-badge.priority-critical { background: rgba(225, 29, 72, .22); color: #fda4af; }

/* Bulk bar */
.tcx-cases .tr-bulk-bar {
  background: linear-gradient(90deg, var(--tcx-accent-soft), #f3f0ff);
  border: 1px solid #e6e1f7;
  border-radius: 12px;
  padding: 11px 16px;
}
body[data-theme="dark"] .tcx-cases .tr-bulk-bar {
  background: var(--panel-alt); border-color: var(--border);
}
.tcx-cases .tr-bulk-count { font-weight: 800; font-size: 13px; color: var(--tcx-accent-strong); }
.tcx-cases .tr-bulk-bar .btn.secondary.small {
  background: var(--tcx-card); border: 1px solid #d8d2f0; color: var(--tcx-body);
  border-radius: 9px; font-weight: 700; font-size: 12px;
}
body[data-theme="dark"] .tcx-cases .tr-bulk-bar .btn.secondary.small { border-color: var(--border); }

/* Footer */
.tcx-list-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px;
  background: var(--tcx-card-alt);
  border-top: 1px solid var(--tcx-line);
  font-weight: 600; font-size: 12.5px; color: #7c76a8;
}
body[data-theme="dark"] .tcx-list-footer { color: var(--muted); }

/* ── ADD / EDIT FORM ─────────────────────────────────────────── */

.tcx-form .form-grid { gap: 16px; }
.tcx-form .form-grid label > .small-muted {
  font-size: 11px; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; color: var(--tcx-muted);
  margin-bottom: 8px;
}
.tcx-form .input, .tcx-form .select, .tcx-form .textarea {
  background: var(--tcx-card-alt);
  border: 1.5px solid var(--tcx-border);
  border-radius: 11px;
  padding: 11px 14px;
  font-weight: 600; font-size: 13.5px; color: var(--tcx-ink);
}
.tcx-form .textarea { border-radius: 13px; line-height: 1.5; }
.tcx-form .input:focus, .tcx-form .select:focus, .tcx-form .textarea:focus {
  border-color: var(--tcx-accent);
  box-shadow: 0 0 0 3px rgba(111, 107, 245, .15);
  background: var(--tcx-card);
  outline: none;
}
.tcx-form .input::placeholder, .tcx-form .textarea::placeholder { color: #b4afce; font-weight: 500; }
.tcx-form .drawer-section-header {
  border-top: 1px solid var(--tcx-border);
  padding-top: 16px;
  flex-wrap: wrap;
}
.tcx-form .tcx-addstep-btn {
  background: var(--tcx-card-alt);
  border: 1.5px dashed #ddd8f0;
  color: var(--tcx-accent-ink);
  border-radius: 11px; font-weight: 700; box-shadow: none;
}
.tcx-form .tcx-addstep-btn:hover { background: var(--tcx-chip); color: var(--tcx-accent-ink); }
body[data-theme="dark"] .tcx-form .tcx-addstep-btn { border-color: var(--border); }

/* Step cards */

.tcx-form .tcx-step-card .step-textarea { width: 100%; min-height: 74px; font-size: 13px; }

/* ── CASE DETAIL PANEL ───────────────────────────────────────── */
.tcx-detail.drawer-body { background: #f7f7fb; }
body[data-theme="dark"] .tcx-detail.drawer-body { background: var(--bg); }
.tcx-detail .cdv-hero {
  background: var(--tcx-hero-grad);
  border: none;
  border-radius: 18px;
  padding: 22px 24px;
}
.tcx-detail .cdv-hero::after { display: none; }
.tcx-detail .cdv-id-chip {
  padding: 6px 11px;
  background: var(--tcx-grad); color: #fff;
  border-radius: 9px;
  font-family: var(--tcx-mono);
  font-weight: 600; font-size: 12.5px;
  box-shadow: 0 6px 16px -5px rgba(99, 102, 241, .6);
}
.tcx-detail .cdv-title {
  font-weight: 800; font-size: 24px; line-height: 1.15;
  letter-spacing: -.02em; color: var(--tcx-ink);
}
.tcx-detail .cdv-hero .badge, .tcx-detail .tcx-type-chip, .tcx-detail .cdv-auto-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 13px; border-radius: 999px;
  font-weight: 700; font-size: 12px;
}
.tcx-detail .cdv-path { color: #7c76a8; font-weight: 600; }
body[data-theme="dark"] .tcx-detail .cdv-path { color: var(--muted); }

/* Action row */
.tcx-detail .cdv-actions .btn {
  background: var(--tcx-card); border: none; color: var(--tcx-body);
  border-radius: 11px; font-weight: 700; font-size: 13px;
  padding: 10px 16px;
  box-shadow: 0 2px 6px rgba(30, 27, 58, .06);
}
.tcx-detail .cdv-actions .btn:hover { box-shadow: 0 4px 12px rgba(30, 27, 58, .12); }
.tcx-detail .cdv-actions .btn.primary {
  background: var(--tcx-grad); color: #fff;
  box-shadow: 0 8px 18px -6px rgba(99, 102, 241, .6);
}
.tcx-detail .cdv-actions .btn.primary:hover { filter: brightness(1.05); }
.tcx-detail .cdv-actions .btn.danger {
  margin-left: auto; color: #e11d48; background: var(--tcx-card);
  box-shadow: 0 2px 6px rgba(225, 29, 72, .1);
}
.tcx-detail .cdv-actions .btn.danger:hover { background: #fff1f3; }
body[data-theme="dark"] .tcx-detail .cdv-actions .btn.danger { color: #fda4af; }
body[data-theme="dark"] .tcx-detail .cdv-actions .btn.danger:hover { background: rgba(225, 29, 72, .15); }

/* Cards */
.tcx-detail .cdv-section {
  border: none;
  border-radius: 18px;
  background: var(--tcx-card);
  box-shadow: 0 2px 10px rgba(30, 27, 58, .05);
}
.tcx-detail .cdv-section-header {
  background: none;
  border-bottom: none;
  padding: 16px 20px 4px;
  gap: 9px;
}
.tcx-detail .cdv-section-title { font-weight: 700; font-size: 14.5px; color: var(--tcx-ink); }
.tcx-detail .cdv-precond-body,
.tcx-detail .cdv-expected-body { background: none; padding: 10px 20px 18px; font-weight: 600; font-size: 13.5px; }
.tcx-detail .cdv-step-count {
  background: var(--tcx-accent-soft-2); color: var(--tcx-accent-ink);
  font-weight: 700; font-size: 11.5px; padding: 4px 11px;
}

/* Steps timeline */
.tcx-detail .cdv-steps {
  position: relative;
  gap: 12px;
  padding: 12px 20px 18px;
}
.tcx-detail .cdv-steps::before {
  content: '';
  position: absolute; left: 37px; top: 30px; bottom: 30px;
  width: 2px; background: var(--tcx-border);
}
.tcx-detail .cdv-step {
  position: relative;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 15px; padding: 0;
  border: none; background: transparent;
}
.tcx-detail .cdv-step:hover { background: transparent; box-shadow: none; }
.tcx-detail .cdv-step-num {
  width: 36px; height: 36px; border-radius: 12px;
  background: var(--tcx-grad);
  font-size: 14px; font-weight: 800;
  box-shadow: 0 6px 14px -4px rgba(99, 102, 241, .5);
}
.tcx-detail .cdv-step-action {
  background: #f8f7fd; border-radius: 13px;
  padding: 13px 15px;
  font-weight: 600; font-size: 13.5px; line-height: 1.45; color: #2c2851;
}
body[data-theme="dark"] .tcx-detail .cdv-step-action { background: var(--panel-alt); color: var(--text); }
.tcx-detail .cdv-step-expected {
  background: var(--tcx-card); border: 1.5px dashed #e3def4;
  border-radius: 11px; box-shadow: none;
  font-weight: 600; font-size: 13px;
}
body[data-theme="dark"] .tcx-detail .cdv-step-expected { border-color: var(--border); }
.tcx-detail .cdv-exp-label { color: var(--tcx-accent-ink); }
.tcx-detail .cdv-empty { padding: 18px 20px 22px; }

/* Expected-result card (green) */
.tcx-detail .tcx-expected-card { background: linear-gradient(135deg, #ecfdf3, #f0fdf9); }
.tcx-detail .tcx-expected-card .cdv-section-title { color: #065f46; }
.tcx-detail .tcx-expected-card .cdv-expected-body { color: #0f7a53; line-height: 1.55; }
body[data-theme="dark"] .tcx-detail .tcx-expected-card { background: rgba(16, 185, 129, .1); }
body[data-theme="dark"] .tcx-detail .tcx-expected-card .cdv-section-title,
body[data-theme="dark"] .tcx-detail .tcx-expected-card .cdv-expected-body { color: #34d399; }

/* Sidebar cards */
.tcx-detail .cdv-meta-grid {
  background: var(--tcx-card);
  border-radius: 18px;
  box-shadow: 0 2px 10px rgba(30, 27, 58, .05);
  padding: 8px 8px;
}
.tcx-detail .cdv-side .cdv-meta-grid { border: none; }
.tcx-detail .cdv-meta-label {
  font-weight: 700; font-size: 10px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--tcx-muted);
}
.tcx-detail .cdv-meta-val { font-weight: 700; font-size: 13.5px; color: var(--tcx-ink); }
.tcx-detail .cdv-pri-high { color: #c2410c; }
.tcx-detail .cdv-pri-critical { color: #e11d48; }
.tcx-detail .cdv-ref-link {
  background: var(--tcx-accent-soft-2); color: var(--tcx-accent-ink);
  font-family: var(--tcx-mono); font-weight: 600; font-size: 12px;
  border-radius: 8px; padding: 4px 10px;
}
.tcx-detail .cdv-side .cdv-section-header { padding: 14px 18px 2px; }
.tcx-detail .cdv-side .cdv-section-title {
  font-weight: 700; font-size: 11px; letter-spacing: .05em;
  text-transform: uppercase; color: var(--tcx-muted);
}
.tcx-detail .cdv-side .input, .tcx-detail .cdv-side .select {
  background: var(--tcx-card-alt);
  border: 1.5px solid var(--tcx-border);
  border-radius: 10px; font-weight: 600; color: var(--tcx-body);
}
.tcx-detail .case-tag {
  background: var(--tcx-accent-soft-2); color: var(--tcx-accent-ink);
  border-radius: 999px; font-weight: 700; font-size: 12px;
  padding: 5px 10px; border: none;
}
.tcx-detail .case-tag-remove { color: #a78bfa; }
.tcx-detail .cdv-side .btn.small.secondary {
  background: var(--tcx-chip); border: none; color: #5b5570;
  border-radius: 10px; font-weight: 700;
}
body[data-theme="dark"] .tcx-detail .cdv-side .btn.small.secondary { color: var(--text); }
.tcx-detail .comment-body {
  background: var(--tcx-group); border-radius: 4px 13px 13px 13px;
  padding: 10px 13px; font-weight: 600; font-size: 13.5px; color: #3a3560;
}
body[data-theme="dark"] .tcx-detail .comment-body { color: var(--text); }
.tcx-detail .comment-author { font-weight: 700; font-size: 13px; color: var(--tcx-ink); }
.tcx-detail .comments-list { padding: 4px 20px 18px; }
.tcx-detail .comment-compose .btn.primary {
  background: var(--tcx-grad); border: none; border-radius: 12px;
  font-weight: 700; box-shadow: 0 6px 14px -5px rgba(99, 102, 241, .55);
}

.tcx-detail .cdv-custom-fields { background: none; gap: 10px; }
.tcx-detail .cdv-custom-field { background: var(--tcx-card-alt); border-radius: 10px; }

/* Every non-header direct child of a detail card gets uniform inner
   padding — previously card bodies were edge-to-edge with padded headers,
   which looks broken on floating rounded cards. */
.tcx-detail .cdv-section > div:not(.cdv-section-header) {
  padding: 10px 20px 18px;
}
.tcx-detail .cdv-side .cdv-section > div:not(.cdv-section-header) {
  padding: 8px 18px 16px;
}

/* Full-page shell */


/* ══════════════════════════════════════════════════════════════
   Password show/hide toggle — sign-in + create-account forms
   ══════════════════════════════════════════════════════════════ */
.pw-field { position: relative; display: block; }
.pw-field .input { width: 100%; padding-right: 44px; }
.pw-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  border: none; background: transparent; cursor: pointer;
  font-size: 18px; line-height: 1;
  width: 34px; height: 34px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-muted, #64748b);
  transition: background .12s;
}
.pw-toggle:hover { background: rgba(0,0,0,.06); }

/* ═══════════════════════════════════════════════════════════════
   MOBILE / TABLET FIXES
   Appended last on purpose: several rules below restate earlier
   media-query rules that lose the cascade to the higher-specificity
   .tcx-* redesign selectors defined above. Desktop is untouched —
   everything here is behind a media query except .grid-2col, which
   reproduces an inline style moved out of app.js.
═══════════════════════════════════════════════════════════════ */

/* Two-column card grids (reports view) — was an inline style, now a
   class so it can collapse on phones */
.grid-2col { grid-template-columns: repeat(2, minmax(0,1fr)); }

/* ── Tablet & below ─────────────────────────────────────────── */
@media (max-width: 900px) {
  /* .tcx-cases .tr-body re-declares the grid columns with higher
     specificity than the 900px `.tr-body { grid-template-columns: 1fr }`
     rule — restate it so the Test Cases page actually stacks */
  .tcx-cases .tr-body { grid-template-columns: 1fr; }
  .tc-resizer { display: none; }
  .tcx-cases .tr-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--tcx-line);
  }

  /* The horizontal top-bar sidebar: the brand renders an <h1> + <p>
     (there is no .brand-name/.brand-sub in the DOM) — compact it */
  .brand { display: flex; align-items: center; gap: 9px; }
  .brand p { display: none; }
  .brand h1 { font-size: .92rem; white-space: nowrap; }
  .brand-badge, .brand-logo-image { margin-bottom: 0; }
  .brand-logo-image { width: 30px; height: 30px; padding: 3px; }
}

/* ── Phones ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Bare tables (billing history, API keys, element catalogs) sit
     outside .table-wrap; the global `table { min-width: 760px }` blew
     the viewport. Let them scroll within their card instead. */
  .resp-table {
    display: block;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .grid-2col { grid-template-columns: 1fr; }

  /* Run case-detail modal: min-width 560px overflowed phones.
     Full-screen it and stack the sidebar over the main column. */
  .run-case-detail-modal {
    width: 100%;
    min-width: 0; min-height: 0;
    height: calc(100dvh - 24px);
    max-height: calc(100dvh - 24px);
    resize: none;
  }
  .rcd-body { flex-direction: column; overflow-y: auto; }
  .rcd-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
    overflow-y: visible;
    flex-shrink: 0;
  }
  .rcd-main { overflow-y: visible; padding: 16px 14px 22px; }
  .rcd-hero { padding: 14px 16px 12px; }
  .rcd-title { font-size: 1.05rem; }

  /* Steps table: three columns don't fit — stack Expected under Action */
  .rcd-steps-header { grid-template-columns: 32px 1fr; }
  .rcd-steps-col-expected { display: none; }
  .rcd-step { grid-template-columns: 32px 1fr; }
  .rcd-step-expected-cell {
    grid-column: 2;
    border-left: none;
    border-top: 1px dashed var(--border-soft);
  }

  .milestone-popup-modal {
    width: 100%;
    max-height: calc(100dvh - 24px);
    padding: 16px 14px;
  }
  .cmdk-overlay { padding-top: 32px; }

  /* Test Cases toolbar: search gets its own full-width row */
  .tcx-cases .tr-top-left { flex: 1 1 100%; }
  .tcx-search { max-width: none; width: 100%; }

  /* Add/Edit case form card */


  /* Focus-mode runner */
  .focus-topbar { flex-wrap: wrap; gap: 10px; padding: 10px 12px; }
  .focus-topbar-left { min-width: 0; flex: 1 1 160px; }
  .focus-progress-track { flex-basis: 100%; order: 3; }
  .focus-body { padding: 16px 10px; }
  .focus-card { padding: 18px 14px; }
  .focus-title { font-size: 18px; }
}

/* ── Small phones ───────────────────────────────────────────── */
@media (max-width: 480px) {
  /* tcx paddings/typography beat the generic .tr-table 480px rules on
     specificity — restate them with the .tcx-cases prefix */
  .tcx-cases .tr-table thead th { padding: 10px 8px; }
  .tcx-cases .tr-case-row td { padding: 10px 8px; }
  .tcx-cases .tr-body { grid-template-columns: 1fr; }
  .tcx-detail .cdv-title { font-size: 19px; }

  .run-hero-title { font-size: 1.1rem; }
  .run-hero-card { padding: 14px 14px 12px; }
  .app-dialog-box { padding: 20px 16px 16px; }
  .jira-bug-body { padding: 14px; }
}
.pw-toggle:focus-visible { outline: 2px solid var(--accent, #4f46e5); outline-offset: 2px; }

/* ═══════════════════════════════════════════════════════════════
   MOBILE NAV, FAB & ACTION SHEET
   New elements are always in the DOM but hidden on desktop; every
   rule below is scoped to a new class and/or a max-width query, so
   ≥1025px rendering is untouched.
═══════════════════════════════════════════════════════════════ */
/* Hidden everywhere by default — media queries below opt them in */
.mobile-topbar,
.mobile-bottomnav,
.mobile-more-backdrop,
.mobile-more-panel,
.mob-fab,
.mob-more-btn,
.mob-sheet-backdrop,
.mob-sheet { display: none; }

/* ── ≤900px: bottom navigation replaces the sidebar ── */
@media (max-width: 900px) {
  body { overflow-x: clip; }

  .sidebar { display: none; }

  /* Slim top bar: brand + org name + avatar only */
  .mobile-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    position: sticky;
    top: 0;
    z-index: 60;
    padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 10px;
    background: linear-gradient(180deg, var(--sidebar-start, #312e81) 0%, var(--sidebar-end, #1e1b4b) 100%);
    color: var(--sidebar-text, #eef2ff);
  }
  .mobile-topbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    border: 0;
    background: transparent;
    color: inherit;
    padding: 4px 2px;
    cursor: pointer;
    text-align: left;
  }
  .mobile-topbar-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--nav-active, #6366f1), var(--accent, #4f46e5));
    color: var(--badge-text, #fff);
    font-weight: 800;
    font-size: .72rem;
  }
  .mobile-topbar-logo {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 9px;
    object-fit: contain;
    background: rgba(255, 255, 255, .92);
    padding: 3px;
  }
  .mobile-topbar-name {
    font-size: .95rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .mobile-topbar-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--nav-active, #6366f1), var(--accent, #4f46e5));
    color: var(--badge-text, #fff);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .04em;
  }

  /* Fixed bottom navigation — 4 primary destinations + More */
  .mobile-bottomnav {
    display: flex;
    align-items: stretch;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    background: var(--panel, #fff);
    border-top: 1px solid var(--border, #e1e6f0);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -6px 24px rgba(15, 23, 42, .08);
  }
  .mbn-item {
    flex: 1;
    min-width: 0;
    min-height: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border: 0;
    background: transparent;
    color: var(--muted, #6b7a96);
    font-weight: 700;
    cursor: pointer;
    padding: 2px 0;
    -webkit-tap-highlight-color: transparent;
  }
  .mbn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 28px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    transition: background .18s ease, color .18s ease;
  }
  .mbn-label {
    font-size: 10.5px;
    letter-spacing: .01em;
    white-space: nowrap;
    overflow: hidden;
    max-width: 100%;
    text-overflow: ellipsis;
  }
  .mbn-item.active { color: var(--accent, #4f46e5); }
  .mbn-item.active .mbn-icon {
    background: var(--accent-soft, rgba(79, 70, 229, .10));
    color: var(--accent, #4f46e5);
  }

  /* Slide-up "More" panel with the remaining nav items */
  .mobile-more-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 95;
    background: rgba(15, 23, 42, .45);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
  }
  .mobile-more-backdrop.open { opacity: 1; pointer-events: auto; }
  .mobile-more-panel {
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 96;
    max-height: 78dvh;
    overflow-y: auto;
    background: var(--panel, #fff);
    border-radius: 20px 20px 0 0;
    box-shadow: var(--shadow-lg, 0 -20px 60px rgba(15, 23, 42, .25));
    padding: 8px 14px calc(16px + env(safe-area-inset-bottom, 0px));
    transform: translateY(105%);
    transition: transform .3s cubic-bezier(.32, .72, .24, 1);
  }
  .mobile-more-panel.open { transform: translateY(0); }
  .mobile-sheet-handle {
    width: 38px;
    height: 4px;
    flex-shrink: 0;
    border-radius: 2px;
    background: var(--border, #e1e6f0);
    margin: 6px auto 12px;
  }
  .mobile-more-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 10px 12px;
    border-bottom: 1px solid var(--border-soft, #eef1f8);
    margin-bottom: 8px;
  }
  .mobile-more-user-info { min-width: 0; }
  .mobile-more-username {
    font-weight: 700;
    font-size: .9rem;
    color: var(--text, #111827);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mobile-more-role { font-size: .74rem; color: var(--muted, #6b7a96); margin-top: 1px; }
  .mobile-more-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 48px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--text, #111827);
    font-size: .92rem;
    font-weight: 600;
    text-align: left;
    padding: 10px 10px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .mobile-more-item:active { background: var(--panel-alt, #f7f9fc); }
  .mobile-more-item.active {
    background: var(--accent-soft, rgba(79, 70, 229, .10));
    color: var(--accent, #4f46e5);
  }
  .mobile-more-item .nav-icon {
    background: var(--panel-alt, #f7f9fc);
    color: var(--muted, #6b7a96);
  }
  .mobile-more-item.active .nav-icon {
    background: var(--accent, #4f46e5);
    color: #fff;
  }
  .mobile-more-divider {
    height: 1px;
    flex-shrink: 0;
    background: var(--border-soft, #eef1f8);
    margin: 6px 10px;
  }
  .mobile-more-signout { color: #b91c1c; }

  /* Keep content clear of the fixed bottom nav */
  .main { padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }
}

/* ── ≤768px: FAB + bottom action sheet replace toolbar button walls ── */
@media (max-width: 768px) {
  /* iOS zoom guard + touch targets */
  input, select, textarea { font-size: 16px; }
  input[type="checkbox"], input[type="radio"] { font-size: inherit; }
  .btn, .btn.small { min-height: 44px; }
  .icon-btn { min-width: 40px; min-height: 40px; }

  /* Hide the action wall, keep the search; show the "⋯" trigger */
  .mob-hide { display: none; }
  .mob-more-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; font-size: 1.15rem; }
  .tcx-cases .tr-top-right .btn { display: none; }
  .tcx-cases .tr-top-right .mob-more-btn { display: inline-flex; }

  /* Floating action button — sits above the bottom nav */
  .mob-fab {
    display: grid;
    place-items: center;
    position: fixed;
    right: 16px;
    bottom: calc(78px + env(safe-area-inset-bottom, 0px));
    z-index: 80;
    width: 56px;
    height: 56px;
    border: 0;
    border-radius: 17px;
    background: linear-gradient(135deg, var(--accent, #4f46e5), #8b5cf6);
    color: #fff;
    font-size: 27px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 10px 26px rgba(79, 70, 229, .38);
    -webkit-tap-highlight-color: transparent;
    transition: transform .12s ease;
  }
  .mob-fab:active { transform: scale(.93); }

  /* Bottom action sheet */
  .mob-sheet-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 95;
    background: rgba(15, 23, 42, .45);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
  }
  .mob-sheet-backdrop.open { opacity: 1; pointer-events: auto; }
  .mob-sheet {
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 96;
    max-height: 78dvh;
    overflow-y: auto;
    background: var(--panel, #fff);
    border-radius: 20px 20px 0 0;
    box-shadow: var(--shadow-lg, 0 -20px 60px rgba(15, 23, 42, .25));
    padding: 8px 14px calc(16px + env(safe-area-inset-bottom, 0px));
    transform: translateY(105%);
    transition: transform .3s cubic-bezier(.32, .72, .24, 1);
  }
  .mob-sheet.open { transform: translateY(0); }
  .mob-sheet-title {
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted, #6b7a96);
    padding: 0 10px 8px;
  }
  .mob-sheet-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 48px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--text, #111827);
    font-size: .92rem;
    font-weight: 600;
    text-align: left;
    padding: 10px 10px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .mob-sheet-item:active { background: var(--panel-alt, #f7f9fc); }
  .mob-sheet-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 9px;
    background: var(--panel-alt, #f7f9fc);
    border: 1px solid var(--border-soft, #eef1f8);
    font-size: .85rem;
  }
  .mob-sheet-label { flex: 1; min-width: 0; }

  /* ── Case table → tap-friendly card rows ── */
  .tcx-cases .tr-table { display: block; min-width: 0; width: 100%; }
  .tcx-cases .tr-table thead { display: none; }
  .tcx-cases .tr-table tbody { display: block; width: 100%; }
  .tcx-cases .tr-table tr.tr-section-row,
  .tcx-cases .tr-table tr.tr-empty-row { display: block; width: 100%; }
  .tcx-cases .tr-table tr.tr-section-row > td,
  .tcx-cases .tr-table tr.tr-empty-row > td { display: block; width: 100%; }
  .tcx-cases .tr-section-label { flex-wrap: wrap; row-gap: 6px; }
  .tcx-cases .tr-sec-row-actions, .tcx-cases .tr-row-actions { opacity: 1; }
  .tcx-cases .tr-case-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 12px;
    margin: 8px 0;
    border: 1px solid var(--border-soft, #eef1f8);
    border-radius: 12px;
    background: var(--panel, #fff);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  }
  .tcx-cases .tr-case-row > td {
    display: block;
    width: auto;
    padding: 0;
    border: 0;
    background: transparent;
  }
  .tcx-cases .tr-case-row:hover td,
  .tcx-cases .tr-case-row.active td { background: transparent; }
  .tcx-cases .tr-case-row.active { border-color: var(--accent, #4f46e5); }
  .tcx-cases .tr-case-row.checked { background: var(--accent-soft, rgba(79, 70, 229, .06)); }
  .tcx-cases .tr-col-cb { order: 0; width: auto; }
  .tcx-cases .tr-col-cb input[type="checkbox"] { width: 20px; height: 20px; display: block; }
  .tcx-cases .tr-col-id { order: 1; width: auto; }
  /* Oversized flex-basis forces the pill cells onto their own second line */
  .tcx-cases .tr-col-title {
    order: 2;
    flex: 1 1 calc(100% - 110px);
    min-width: 0;
  }
  .tcx-cases .tr-case-title { white-space: normal; overflow-wrap: anywhere; }
  .tcx-cases .tr-col-priority { order: 3; margin-left: 28px; }
  /* display: block restores the pills hidden by earlier column-pruning rules */
  .tcx-cases .tr-col-type { order: 4; display: block; }
  .tcx-cases .tr-col-auto { order: 5; display: block; }
  .tcx-cases .tr-col-actions { order: 6; width: auto; margin-left: auto; }

  /* Run cards: full-width tap-friendly action buttons */
  .run-card .toolbar .btn { flex: 1 1 auto; justify-content: center; }
}

/* ═══════════════════════════════════════════════════════════════
   BUG BASH (ported from off-the-rails)
   ═══════════════════════════════════════════════════════════════ */

.bb-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .75rem; font-weight: 600; text-transform: capitalize; border: 1px solid var(--border); }
.bb-pill-passed  { background: rgba(22,163,74,.12);  color: var(--green, #16a34a); border-color: rgba(22,163,74,.3); }
.bb-pill-failed  { background: rgba(239,68,68,.12);  color: #dc2626; border-color: rgba(239,68,68,.3); }
.bb-pill-blocked { background: rgba(245,158,11,.14); color: #b45309; border-color: rgba(245,158,11,.35); }
.bb-pill-retest  { background: rgba(59,130,246,.12); color: #2563eb; border-color: rgba(59,130,246,.3); }
.bb-pill-skipped { background: rgba(107,114,128,.12); color: #6b7280; }
.bb-pill-untested { color: var(--text-muted); }


/* ═══════════════════════════════════════════════════════════════
   SIGN-IN / SIGN-UP PAGE (full page, not a floating card)
═══════════════════════════════════════════════════════════════ */
.auth-page {
  min-height: 100vh; display: grid;
  grid-template-columns: minmax(360px, 44%) minmax(0, 1fr);
  background: var(--panel);
}
.auth-page-aside {
  background: linear-gradient(160deg, #4f46e5 0%, #7c3aed 55%, #6366f1 100%);
  color: #fff; padding: 56px clamp(32px, 5vw, 72px);
  display: flex; align-items: center; position: relative; overflow: hidden;
}
.auth-page-aside::before {
  content: ''; position: absolute; top: -20%; right: -25%; width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(255,255,255,.14) 0%, transparent 70%); pointer-events: none;
}
.auth-page-aside .auth-hero-content { max-width: 440px; }
.auth-page-aside .auth-hero-title { font-size: 2rem; }
.auth-page-aside .auth-hero-tagline { font-size: 1.02rem; line-height: 1.6; }
.auth-page-main {
  display: flex; flex-direction: column; min-width: 0;
  padding: 24px clamp(20px, 5vw, 64px);
}
.auth-page-top {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 48px;
}
.auth-page-logo {
  font-weight: 800; font-size: 1.15rem; letter-spacing: -.01em;
  color: var(--accent); text-decoration: none;
}
.auth-page-top-switch { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .92rem; }
.auth-page-form {
  width: 100%; max-width: 400px; margin: auto; padding: 40px 0;
}
.auth-page-form .auth-brand { text-align: left; margin-bottom: 24px; }
.auth-page-form .auth-brand h1 { font-size: 1.75rem; letter-spacing: -.02em; margin-bottom: 8px; }
.auth-page-form .auth-brand p { font-size: .95rem; }
.auth-page-form .input { min-height: 44px; }
.auth-submit { width: 100%; min-height: 46px; font-size: 1rem; margin-top: 6px; }
.auth-page-switch { margin: 22px 0 0; color: var(--muted); font-size: .93rem; text-align: center; }
.auth-link {
  background: none; border: 0; padding: 4px 2px; font: inherit; font-weight: 600;
  color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}
.auth-link:hover { text-decoration-thickness: 2px; }
.auth-page-foot {
  display: flex; flex-wrap: wrap; gap: 18px; justify-content: center;
  color: var(--subtle); font-size: .82rem; padding-top: 12px;
}
.auth-page-foot a { color: var(--muted); text-decoration: none; }
.auth-page-foot a:hover { color: var(--text); }
@media (max-width: 860px) {
  /* Rows must not share the 100vh, or the brand bar stretches to half the screen. */
  .auth-page { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .auth-page-aside { padding: 12px 20px; min-height: 0; }
  .auth-page-aside::before { display: none; }
  .auth-page-aside .auth-hero-content { display: flex; align-items: center; gap: 10px; }
  .auth-page-aside .auth-hero-badge { margin: 0; flex: none; width: 36px; height: 36px; border-radius: 10px; font-size: .95rem; }
  .auth-page-aside .auth-hero-title { font-size: 1.15rem; margin: 0; }
  .auth-page-aside .auth-hero-tagline, .auth-page-aside .auth-hero-features { display: none; }
  .auth-page-top { display: none; }
  .auth-page-form { padding: 16px 0 32px; margin-top: 8px; }
}
.auth-hero-home { color: inherit; text-decoration: none; display: block; }
@media (max-width: 860px) { .auth-hero-home { display: flex; align-items: center; gap: 10px; } }

/* ═══════════════════════════════════════════════════════════════
   PHONE POLISH (≤768px)
═══════════════════════════════════════════════════════════════ */
.settings-tab-select { display: none; }
@media (max-width: 900px) {
  .mbn-icon svg { width: 21px; height: 21px; }
  .mobile-more-item .nav-icon { display: inline-flex; align-items: center; justify-content: center; }
  .mobile-more-item .nav-icon svg { width: 19px; height: 19px; }
}
@media (max-width: 768px) {
  /* Room for the floating + button so it never covers the last rows */
  .main { padding-bottom: calc(160px + env(safe-area-inset-bottom, 0px)); }

  /* Header: the top bar already names the org, so drop the breadcrumb */
  .topbar .crumbs { display: none; }
  .topbar.clean-topbar { gap: 10px; margin-bottom: 12px; }
  .topbar .page-title h2 { margin: 0; font-size: 1.35rem; }

  /* Dashboard welcome card: counts go under the text, not in a squeezed column */
  .card.welcome { flex-direction: column; align-items: flex-start; gap: 10px; }
  .card.welcome .welcome-meta { white-space: nowrap; }


  /* Cases toolbar: search and ⋯ share one row */
  .tr-top-bar { flex-wrap: nowrap; gap: 8px; }
  .tr-top-left { flex: 1 1 auto; }
  .tr-top-right { flex: none; flex-wrap: nowrap; }

  /* Section header: keep title, count and actions; drop the decorative charts */
  .tr-section-label .tcx-minibars, .tr-section-label .sec-stats-chip { display: none; }
  .tr-section-label { gap: 8px; }
  .tr-sec-row-actions { margin-left: auto; }

  /* Settings: a dropdown instead of a 15-tab strip that runs off the edge */
  .settings-tabs { display: none; }
  .settings-tab-select { display: flex; flex-direction: column; gap: 6px; }
  .settings-tab-select-label { font-size: .8rem; font-weight: 600; color: var(--muted); }
  .settings-tab-select select { min-height: 46px; font-weight: 600; }

  .bb-pill { white-space: nowrap; }
}

/* TestForge workspace refresh — v1.1.0. Scoped to the authenticated shell. */
@media(min-width:901px){
 .app-shell{grid-template-columns:286px minmax(0,1fr)}
 .qa-sidebar{--sidebar-text:var(--text);--sidebar-text-muted:var(--muted);--sidebar-text-soft:var(--subtle);background:var(--panel);color:var(--text);border-right:1px solid var(--border);padding:24px 16px 16px 72px;gap:18px;height:100dvh;overflow-y:auto}
 .qa-rail{position:absolute;left:0;top:0;bottom:0;width:52px;border-right:1px solid var(--border);background:var(--panel-alt);display:flex;align-items:center;flex-direction:column;gap:12px;padding:22px 6px 18px}
 .qa-rail-mark{font-size:23px;font-weight:900;letter-spacing:-3px;margin-bottom:20px;color:var(--text)}.qa-rail-mark span{color:var(--accent)}
 .qa-rail-button{display:grid;place-items:center;flex-shrink:0;width:36px;height:36px;border:0;border-radius:8px;color:var(--muted);background:transparent;cursor:pointer}.qa-rail-button:hover,.qa-rail-button.active{background:var(--accent-soft);color:var(--accent)}
 .qa-rail-end{margin-top:auto;background:var(--panel-soft);color:var(--text);width:30px;height:30px;display:grid;place-items:center;font-size:10px;font-weight:700;border:1px solid var(--border);border-radius:50%}
 .qa-sidebar .brand{padding:0;text-align:left;min-height:42px}.qa-sidebar .brand-badge{display:none}.qa-sidebar .brand-logo-image{width:28px;height:28px;margin-bottom:8px}.qa-sidebar .brand h1{font-size:14px;line-height:1.5;letter-spacing:-.3px}.qa-sidebar .brand p{font-size:10px;letter-spacing:.04em;margin-top:2px}
 .qa-project-context{padding:12px 0 16px;border-bottom:1px solid var(--border)}.qa-context-label{font:9px ui-monospace,monospace;color:var(--muted);letter-spacing:.1em}.qa-project-context button{display:flex;align-items:center;gap:8px;border:0;background:transparent;color:var(--text);font-size:12px;font-weight:650;padding:10px 0 0;width:100%;cursor:pointer;text-align:left}.qa-project-context button span:nth-child(2){overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}.qa-project-dot{width:7px;height:7px;background:var(--accent);flex-shrink:0}
 .qa-sidebar .nav-list{gap:20px;flex:1}.qa-nav-group{display:flex;flex-direction:column;gap:3px}.qa-nav-heading{font-size:10px;font-weight:600;color:var(--subtle);padding:0 8px 7px;letter-spacing:.03em}
 .qa-sidebar .nav-btn{position:relative;min-height:35px;padding:8px;border-radius:5px;color:var(--muted);font-size:12px;gap:10px;background:transparent;border:0;box-shadow:none;transform:none}.qa-sidebar .nav-btn:hover{background:var(--panel-alt);color:var(--text)}.qa-sidebar .nav-btn.active{background:var(--accent-soft);color:var(--accent);font-weight:700;box-shadow:none}.qa-sidebar .nav-icon{width:17px;height:17px;border-radius:0;background:transparent;color:inherit}.qa-sidebar .nav-icon svg{width:17px;height:17px;stroke-width:1.6}.qa-active-dot{margin-left:auto;width:5px;height:5px;background:currentColor;border-radius:50%}
 .qa-sidebar .sidebar-footer{margin-top:12px;padding-top:16px;border-top:1px solid var(--border)}.qa-sidebar .sidebar-avatar{display:none}.qa-sidebar .sidebar-user{margin-bottom:12px}.qa-sidebar .sidebar-username{font-size:12px}.qa-sidebar .sidebar-role{font-size:10px}.qa-sidebar .sidebar-signout{border:0;border-radius:4px;color:var(--muted);padding:6px 0;font-size:11px;background:transparent}.qa-sidebar .sidebar-signout:hover{color:var(--accent);background:transparent}
 .app-shell>.main{padding:28px 32px;background:var(--bg)}.app-shell .clean-topbar{padding-bottom:22px;border-bottom:1px solid var(--border);margin-bottom:26px}.app-shell .page-title h2{font-size:25px;font-weight:650;letter-spacing:-.8px}.app-shell .welcome-banner{background:var(--panel);color:var(--text);border:1px solid var(--border);box-shadow:none}.app-shell .card{box-shadow:none;border-radius:10px}
 .qa-sidebar button:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
}
@media(max-width:900px){.qa-rail{display:none}}

/* TestForge 1.2 — cohesive testing workspace, account flows and overlays. */
:root,body[data-theme="light"]{
 --bg:#f5f7f8;--bg-top:#f5f7f8;--panel:#fff;--panel-alt:#f8fafb;--panel-soft:#eef5f4;
 --text:#182b37;--muted:#596c78;--subtle:#71828c;--border:#dce4e8;--border-soft:#edf1f3;
 --accent:#096b70;--accent-soft:#e8f4f3;--accent-mid:#b8dedb;--nav-active:#096b70;
 --border-focus:#349a9d;--table-line:#e5eaed;--table-head-bg:#f4f7f9;--table-row-hover:#f1f8f7;--table-row-active:#e8f4f3;
 --shadow:0 2px 7px rgba(19,45,54,.04);--shadow-lg:0 12px 40px rgba(19,45,54,.14);
 --radius:10px;--radius-sm:7px;--radius-xs:5px;--crumb:#657781;--crumb-current:#182b37;
}
body[data-theme="dark"]{--accent:#77d1cf;--accent-soft:#17393b;--accent-mid:#29595b;--nav-active:#77d1cf;--border-focus:#77d1cf}
body{background:var(--bg);font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
.app-shell{background:var(--bg)}
.app-shell :is(h2,h3,h4){letter-spacing:-.025em}
.app-shell .main{min-width:0}
.app-shell .clean-topbar{align-items:center;border-bottom:1px solid var(--border);padding-bottom:20px}
.app-shell .page-title h2{font-size:28px;font-weight:700;letter-spacing:-.8px}
.page-context{color:var(--muted);font-size:13px;margin:6px 0 0;max-width:620px}
.app-shell .crumbs{font-size:12px;margin-bottom:9px}
.app-shell .card{border:1px solid var(--border);border-radius:8px;box-shadow:none;background:var(--panel);padding:20px}
.app-shell .card-header{padding-bottom:16px;margin-bottom:16px;border-bottom:1px solid var(--border-soft);align-items:flex-start;gap:16px;flex-wrap:wrap}
.app-shell .card-subtitle{font-size:12px;margin-top:5px;line-height:1.5}
.app-shell .card h3{font-size:15px;font-weight:650}
:is(.app-shell,.auth-page,.auth-shell,.media-lightbox,.app-dialog-overlay,.tf-sheet-layer) .btn{border-radius:6px;font-size:13px;font-weight:600;min-height:36px;padding:8px 14px;box-shadow:none;transition:background .15s,border-color .15s}
:is(.app-shell,.auth-page,.auth-shell,.media-lightbox,.app-dialog-overlay,.tf-sheet-layer) .btn.primary{background:var(--accent);color:var(--panel);border:1px solid var(--accent);box-shadow:none}
:is(.app-shell,.auth-page,.media-lightbox,.tf-sheet-layer) .btn.secondary{background:var(--panel);color:var(--text);border:1px solid var(--border);box-shadow:none}
:is(.app-shell,.auth-page,.media-lightbox,.tf-sheet-layer) .btn:hover{box-shadow:none;filter:brightness(.96);transform:none}
:is(.app-shell,.auth-page,.media-lightbox,.tf-sheet-layer) .btn:disabled{opacity:.5;filter:none;cursor:not-allowed}
:is(.app-shell,.auth-page,.media-lightbox,.tf-sheet-layer) :is(.input,.select,.textarea){background:var(--panel);color:var(--text);border:1px solid var(--border);border-radius:6px;box-shadow:none;min-height:38px;font-size:13px;line-height:1.5;padding:9px 11px}
:is(.app-shell,.auth-page,.media-lightbox,.tf-sheet-layer) :is(.input,.select,.textarea):focus{border-color:var(--accent);outline:2px solid var(--accent-soft);outline-offset:1px}
.app-shell .toolbar{gap:10px;align-items:center;flex-wrap:wrap}
.app-shell .form-grid{gap:18px}
.app-shell .table-wrap{border:1px solid var(--border);border-radius:6px;max-width:100%;background:var(--panel)}
.app-shell table{border-collapse:collapse;font-size:13px}
.app-shell th{background:var(--table-head-bg);color:var(--muted);font-size:11px;font-weight:600;letter-spacing:.025em;padding:12px;text-transform:none;white-space:nowrap}
.app-shell td{padding:13px 12px;border-color:var(--table-line);vertical-align:middle}
.app-shell tbody tr:hover{background:var(--table-row-hover)}
.app-shell :is(.badge,.chip){border-radius:5px;font-size:11px;padding:4px 7px;font-weight:600;box-shadow:none}
.app-shell .empty{background:var(--panel-alt);border:1px dashed var(--border);border-radius:7px;padding:28px 20px;color:var(--muted);line-height:1.65}
.app-shell :is(.progress-track,.progress-bar){border-radius:3px;box-shadow:none}
/* Overview: useful figures and lists instead of large decorative cards. */
.app-shell .welcome{background:var(--panel);border:1px solid var(--border);border-left:3px solid var(--accent);color:var(--text);box-shadow:none;border-radius:7px;padding:20px 24px}
.app-shell .welcome :is(p,.welcome-meta){color:var(--muted)!important}
.app-shell .welcome h3{font-size:20px;font-weight:650}
.app-shell .grid.metrics{gap:0;border:1px solid var(--border);border-radius:8px;overflow:hidden;background:var(--panel)}
.app-shell .grid.metrics>.card{border:0;border-right:1px solid var(--border);border-radius:0;padding:22px;box-shadow:none}
.app-shell .grid.metrics>.card:last-child{border-right:0}
.app-shell .metric-value{font-size:32px;font-weight:600;font-variant-numeric:tabular-nums;letter-spacing:-1px}
.app-shell .metric-label{font-size:12px;color:var(--muted)}
.app-shell .dashboard-run-link{border:1px solid var(--border);border-radius:6px;background:var(--panel);box-shadow:none;padding:14px}
.app-shell .dashboard-run-link:hover{border-color:var(--accent-mid);background:var(--panel-alt);box-shadow:none;transform:none}
/* Projects, plans and release milestones. */
.app-shell :is(.project-card,.project-overview-card,.project-list-row,.milestone-list-item,.list-item){border-radius:7px;box-shadow:none;border-color:var(--border)}
.app-shell :is(.project-card,.project-overview-card){background:var(--panel);padding:20px}
.app-shell :is(.project-list-row.active,.milestone-list-item.selected){background:var(--accent-soft);border-color:var(--accent-mid)}
.app-shell :is(.project-open-btn,.project-edit-btn){border-radius:5px}
.app-shell .view-toggle{padding:3px;background:var(--panel-alt);border:1px solid var(--border);border-radius:6px}
.app-shell .view-toggle-btn{font-size:12px;border-radius:4px}
.app-shell .view-toggle-btn.active{color:var(--accent);background:var(--panel);box-shadow:var(--shadow)}
/* Case library and execution use the same section tree and data surface. */
.app-shell :is(.tr-sidebar,.tc-sidebar,.picker-sec-sidebar){background:var(--panel);border:1px solid var(--border);border-radius:6px;box-shadow:none}
.app-shell :is(.tr-sidebar-head,.tc-sidebar-head){padding:14px;border-bottom:1px solid var(--border);color:var(--text)}
.app-shell :is(.tr-search,.tc-search){background:var(--panel);border-radius:6px}
.app-shell :is(.tr-section-row,.tc-section-row,.picker-sec-sidebar-item){border-radius:4px}
.app-shell :is(.tr-section-row.active,.tc-section-row.active,.picker-sec-sidebar-item.active){background:var(--accent-soft);color:var(--accent);box-shadow:none}
.cdv-meta-label{font-size:10px;letter-spacing:.05em;color:var(--muted)}
/* Bug bash, report lists and configuration surfaces share the visual language. */
.app-shell :is(.bb-session-card,.bb-case-bug,.bb-board,.bb-team-member){border-radius:6px;box-shadow:none}
.app-shell .bb-board th{background:var(--panel-alt)}
.app-shell .bb-row-done{opacity:.8}
.app-shell .bb-open-case-link{border-radius:4px;background:var(--accent-soft);color:var(--accent);border-color:var(--accent-mid)}
.settings-workspace{display:grid;grid-template-columns:170px minmax(0,1fr);gap:24px;align-items:start}
.settings-workspace>.settings-tabs{display:flex;flex-direction:column;gap:3px;padding:4px 12px 12px 0;margin:0;border:0;border-right:1px solid var(--border);background:none;position:sticky;top:18px}
.settings-workspace .settings-tab{text-align:left;white-space:normal;border:0;border-radius:5px;background:transparent;color:var(--muted);padding:9px 10px;font-size:12px;box-shadow:none}
.settings-workspace .settings-tab.active{background:var(--accent-soft);color:var(--accent);box-shadow:none}
.settings-content{min-width:0}.settings-content>.card{margin-bottom:18px}
/* Full-screen account routes and help use quiet, readable surfaces. */
.auth-page{background:var(--bg)}
.auth-page-aside{background:var(--accent);color:var(--panel)}
.auth-page-aside::before{opacity:.08}
.auth-page-main{background:var(--panel)}
.auth-page-form{max-width:430px;width:100%}
.auth-page-form .auth-brand h1{letter-spacing:-.7px}
.auth-page .auth-page-logo{border-radius:6px}
.app-shell details{border:1px solid var(--border);border-radius:6px;background:var(--panel);padding:14px 16px}
.app-shell summary{font-weight:600;line-height:1.5}
/* Existing modal behavior remains intact; only the surfaces change. */
:is(.media-lightbox-inner,.app-dialog-box,.project-switcher-modal){background:var(--panel);color:var(--text);border:1px solid var(--border);border-radius:10px;box-shadow:var(--shadow-lg);max-width:calc(100vw - 32px)}
:is(.run-picker-modal,.run-popup-modal,.run-form-modal,.milestone-popup-modal,.import-wizard-modal) :is(.card,.table-wrap){box-shadow:none;border-radius:6px}
.picker-modal-header{background:var(--panel);border-bottom:1px solid var(--border);padding:18px 22px}
:is(.header-dropdown-menu,.project-switcher-popover){border-radius:7px;box-shadow:var(--shadow-lg)}
@media(min-width:901px){
 .qa-sidebar{padding-top:25px}.qa-rail{background:#073f46;border-color:#15535a;color:#d9efef}.qa-rail-mark,.qa-rail-mark span{color:#fff}.qa-rail-button{color:#b8d7da}.qa-rail-button.active,.qa-rail-button:hover{background:#1d5960;color:#fff}.qa-rail-end{background:#2a6167;color:#fff;border:0}
 .qa-sidebar .nav-btn{min-height:39px;font-size:13px}.qa-sidebar .nav-btn.active{box-shadow:none}.qa-sidebar .qa-nav-heading{font-size:10px;text-transform:uppercase;letter-spacing:.07em}
}
@media(max-width:1100px){.settings-workspace{grid-template-columns:145px minmax(0,1fr);gap:16px}.app-shell .main{padding:22px 18px}.page-context{max-width:400px}}
@media(max-width:900px){
 .settings-workspace{display:block}.settings-workspace>.settings-tabs{display:none}.settings-workspace>.settings-tab-select{display:flex;margin-bottom:18px;gap:10px;align-items:center}.settings-workspace .settings-tab-select select{flex:1;min-width:0}
 .app-shell .main{padding:18px 14px}.app-shell .page-title h2{font-size:24px}.page-context{font-size:12px;max-width:100%}
 .app-shell .clean-topbar{gap:12px;flex-wrap:wrap}.app-shell .card{padding:16px}.app-shell .grid.metrics>.card{padding:16px}.app-shell .metric-value{font-size:27px}
 .app-shell :is(.input,.select,.textarea),.auth-page :is(.input,.select,.textarea){font-size:16px}.app-shell .toolbar{gap:8px}
}
@media(max-width:540px){
 .app-shell .grid.metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.app-shell .grid.metrics>.card{border-bottom:1px solid var(--border)}
 .app-shell .grid.metrics>.card:nth-child(2n){border-right:0}.app-shell .grid.metrics>.card:nth-last-child(-n+2){border-bottom:0}
 .app-shell .card-header{gap:12px}.app-shell .card-header>div{min-width:0}.app-shell .card-header .toolbar{width:100%}
 .app-shell .welcome{padding:16px}.app-shell .welcome h3{font-size:18px}.app-shell .welcome-meta{display:none}
 .app-shell .btn{min-height:40px}.app-shell .table-wrap{overscroll-behavior-x:contain}.app-shell .top-actions{flex-wrap:wrap}
}
@media(prefers-reduced-motion:reduce){.app-shell *,.auth-page *{transition:none!important;animation:none!important}}
/* Retain room for the existing phone navigation and floating controls. */
@media(max-width:900px){.app-shell .main{padding-bottom:calc(160px + env(safe-area-inset-bottom,0px))}}

/* ═══════════════════════════════════════════════════════════════
   TestForge 1.3 — shared foundation
   One visual language for every workspace screen, matching the teal
   navigation. Screens compose these pieces instead of inventing their
   own gradients, shadows and colours. See docs/design-system.md.
═══════════════════════════════════════════════════════════════ */
:root{
 /* Semantic */
 --success:#12805c;--success-soft:#e6f4ee;--danger:#c42b2b;--danger-soft:#fbeaea;
 --warning:#a66300;--warning-soft:#fdf3e1;--info:#2f62a8;--info-soft:#e8f0fa;
 /* Execution results (TestRail-style meanings) */
 --st-passed:#12805c;--st-passed-soft:#e6f4ee;
 --st-failed:#c42b2b;--st-failed-soft:#fbeaea;
 --st-blocked:#4f5d68;--st-blocked-soft:#e9edf0;
 --st-retest:#a66300;--st-retest-soft:#fdf3e1;
 --st-skipped:#2f62a8;--st-skipped-soft:#e8f0fa;
 --st-untested:#6b7b86;--st-untested-soft:#f1f4f5;
 /* Priority */
 --pri-critical:#c42b2b;--pri-critical-soft:#fbeaea;
 --pri-high:#b4530a;--pri-high-soft:#fdf0e3;
 --pri-medium:#2f62a8;--pri-medium-soft:#e8f0fa;
 --pri-low:#5d6d78;--pri-low-soft:#f1f4f5;
 /* Shape & type */
 --tf-radius:8px;--tf-radius-sm:6px;--tf-radius-xs:4px;
 --tf-font-mono:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,monospace;
 --tf-focus:0 0 0 3px color-mix(in srgb,var(--accent) 28%,transparent);
 --tf-control-h:36px;--tf-control-h-sm:30px;
}
body:is([data-theme="dark"],[data-theme="midnight"],[data-theme="graphite"],[data-theme="nord"],[data-theme="oled"],[data-theme="nightops"]){
 --success:#4cc38a;--danger:#f07a7a;--warning:#e7a74a;--info:#7fa8e8;
 --st-passed:#4cc38a;--st-failed:#f07a7a;--st-blocked:#a9b6c0;--st-retest:#e7a74a;--st-skipped:#7fa8e8;--st-untested:#93a3ad;
 --pri-critical:#f07a7a;--pri-high:#f0a35e;--pri-medium:#7fa8e8;--pri-low:#a3b1ba;
}
body:is([data-theme="dark"],[data-theme="midnight"],[data-theme="graphite"],[data-theme="nord"],[data-theme="oled"],[data-theme="nightops"]){
 --success-soft:color-mix(in srgb,var(--success) 16%,transparent);--danger-soft:color-mix(in srgb,var(--danger) 16%,transparent);
 --warning-soft:color-mix(in srgb,var(--warning) 16%,transparent);--info-soft:color-mix(in srgb,var(--info) 16%,transparent);
 --st-passed-soft:color-mix(in srgb,var(--st-passed) 16%,transparent);--st-failed-soft:color-mix(in srgb,var(--st-failed) 16%,transparent);
 --st-blocked-soft:color-mix(in srgb,var(--st-blocked) 16%,transparent);--st-retest-soft:color-mix(in srgb,var(--st-retest) 16%,transparent);
 --st-skipped-soft:color-mix(in srgb,var(--st-skipped) 16%,transparent);--st-untested-soft:color-mix(in srgb,var(--st-untested) 14%,transparent);
 --pri-critical-soft:color-mix(in srgb,var(--pri-critical) 16%,transparent);--pri-high-soft:color-mix(in srgb,var(--pri-high) 16%,transparent);
 --pri-medium-soft:color-mix(in srgb,var(--pri-medium) 16%,transparent);--pri-low-soft:color-mix(in srgb,var(--pri-low) 14%,transparent);
}
/* Legacy aliases now resolve to the shared tokens. */
:root,body[data-theme]{
 --green:var(--success);--green-soft:var(--success-soft);--red:var(--danger);--red-soft:var(--danger-soft);
 --amber:var(--warning);--amber-soft:var(--warning-soft);--blue:var(--info);--blue-soft:var(--info-soft);
 --pri-low-bg:var(--pri-low-soft);--pri-low-color:var(--pri-low);--pri-medium-bg:var(--pri-medium-soft);--pri-medium-color:var(--pri-medium);
 --pri-high-bg:var(--pri-high-soft);--pri-high-color:var(--pri-high);--pri-critical-bg:var(--pri-critical-soft);--pri-critical-color:var(--pri-critical);
 --primary:var(--accent);--primary-light:var(--accent-soft);--accent-light:var(--accent-soft);
}

/* ── Buttons ─────────────────────────────────────────────────
   .btn + one of: primary | secondary | ghost | danger | danger-solid | ai
   sizes: (default 36px) | small (30px) | icon (square)            */
:is(.app-shell,.auth-page,.auth-shell,.media-lightbox,.app-dialog-overlay,.tf-menu) .btn{
 display:inline-flex;align-items:center;justify-content:center;gap:6px;white-space:nowrap;
 min-height:var(--tf-control-h);padding:0 14px;border-radius:var(--tf-radius-sm);
 font:600 13px/1 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;letter-spacing:0;
 background:var(--panel);color:var(--text);border:1px solid var(--border);box-shadow:none;transform:none;
 background-image:none;text-shadow:none;cursor:pointer;transition:background-color .15s,border-color .15s,color .15s}
:is(.app-shell,.auth-page,.auth-shell,.media-lightbox,.app-dialog-overlay,.tf-sheet-layer) .btn:hover:not(:disabled){background-color:var(--panel-alt);border-color:color-mix(in srgb,var(--text) 22%,var(--border));filter:none;transform:none;box-shadow:none}
:is(.app-shell,.auth-page,.auth-shell,.media-lightbox,.app-dialog-overlay,.tf-sheet-layer) .btn:focus-visible{outline:none;box-shadow:var(--tf-focus);border-color:var(--accent)}
:is(.app-shell,.auth-page,.auth-shell,.media-lightbox,.app-dialog-overlay,.tf-sheet-layer) .btn.primary{background:var(--accent);border-color:var(--accent);color:var(--panel)}
:is(.app-shell,.auth-page,.auth-shell,.media-lightbox,.app-dialog-overlay,.tf-sheet-layer) .btn.primary:hover:not(:disabled){background:color-mix(in srgb,var(--accent) 86%,var(--text));border-color:color-mix(in srgb,var(--accent) 86%,var(--text))}
:is(.app-shell,.auth-page,.auth-shell,.media-lightbox,.app-dialog-overlay,.tf-sheet-layer) .btn.ghost{background:transparent;border-color:transparent;color:var(--muted)}
:is(.app-shell,.auth-page,.auth-shell,.media-lightbox,.app-dialog-overlay,.tf-sheet-layer) .btn.ghost:hover:not(:disabled){background:var(--panel-alt);border-color:transparent;color:var(--text)}
:is(.app-shell,.auth-page,.auth-shell,.media-lightbox,.app-dialog-overlay,.tf-sheet-layer) .btn.danger{background:var(--panel);color:var(--danger);border-color:color-mix(in srgb,var(--danger) 35%,var(--border))}
:is(.app-shell,.auth-page,.auth-shell,.media-lightbox,.app-dialog-overlay,.tf-sheet-layer) .btn.danger:hover:not(:disabled){background:var(--danger-soft);border-color:var(--danger);color:var(--danger)}
:is(.app-shell,.auth-page,.auth-shell,.media-lightbox,.app-dialog-overlay,.tf-sheet-layer) .btn.danger-solid{background:var(--danger);border-color:var(--danger);color:#fff}
:is(.app-shell,.auth-page,.auth-shell,.media-lightbox,.app-dialog-overlay,.tf-sheet-layer) .btn.ai{color:var(--accent)}
:is(.app-shell,.auth-page,.auth-shell,.media-lightbox,.app-dialog-overlay,.tf-sheet-layer) .btn.ai .tf-ai-mark{font-size:12px;line-height:1}
:is(.app-shell,.auth-page,.auth-shell,.media-lightbox,.app-dialog-overlay,.tf-sheet-layer) .btn.small{min-height:var(--tf-control-h-sm);padding:0 10px;font-size:12px}
:is(.app-shell,.auth-page,.auth-shell,.media-lightbox,.app-dialog-overlay,.tf-sheet-layer) .btn.icon{width:var(--tf-control-h);padding:0}
:is(.app-shell,.auth-page,.auth-shell,.media-lightbox,.app-dialog-overlay,.tf-sheet-layer) .btn.icon.small{width:var(--tf-control-h-sm)}
:is(.app-shell,.auth-page,.auth-shell,.media-lightbox,.app-dialog-overlay,.tf-sheet-layer) .btn:disabled{opacity:.5;cursor:not-allowed}
.tf-btn-caret{font-size:10px;opacity:.7;margin-left:2px}

/* ── Toolbar: groups separated by space, primary action last ── */
.tf-toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-width:0}
.tf-toolbar-group{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-width:0}
.tf-toolbar-spacer{flex:1 1 auto}
.tf-toolbar-divider{width:1px;align-self:stretch;background:var(--border);margin:4px 2px}
.tf-search{position:relative;display:flex;align-items:center;min-width:0;flex:1 1 240px;max-width:420px}
.tf-search-icon{position:absolute;left:11px;color:var(--subtle);pointer-events:none;display:grid;place-items:center}
.app-shell .tf-search .input{width:100%;padding-left:34px}

/* ── Action menu (ActionMenu component) ─────────────────────── */
.tf-menu{position:relative;display:inline-flex}
.tf-menu-list{position:absolute;z-index:10000;top:calc(100% + 6px);left:0;min-width:200px;max-width:min(320px,calc(100vw - 32px));
 background:var(--panel);color:var(--text);border:1px solid var(--border);border-radius:var(--tf-radius);box-shadow:var(--shadow-lg);padding:6px;display:flex;flex-direction:column;gap:1px}
.tf-menu.align-right .tf-menu-list{left:auto;right:0}
.tf-menu-item{display:flex;align-items:center;gap:10px;width:100%;text-align:left;border:0;background:transparent;color:var(--text);
 font:500 13px/1.3 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;padding:8px 10px;border-radius:var(--tf-radius-xs);cursor:pointer;min-height:34px}
.tf-menu-item:hover:not(:disabled),.tf-menu-item:focus-visible{background:var(--panel-alt);outline:none}
.tf-menu-item:disabled{opacity:.5;cursor:not-allowed}
.tf-menu-item.danger{color:var(--danger)}
.tf-menu-item.danger:hover:not(:disabled){background:var(--danger-soft)}
.tf-menu-item-icon{width:16px;display:grid;place-items:center;color:var(--muted);flex-shrink:0}
.tf-menu-item-text{display:flex;flex-direction:column;gap:2px;min-width:0}
.tf-menu-item-hint{font-size:11px;color:var(--muted);font-weight:400}
.tf-menu-sep{height:1px;background:var(--border-soft);margin:5px 4px}
.tf-menu-heading{font-size:10px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--subtle);padding:8px 10px 4px}
@media(max-width:540px){.tf-menu-list{position:fixed;left:12px!important;right:12px!important;top:auto;bottom:calc(76px + env(safe-area-inset-bottom,0px));max-width:none;max-height:60vh;overflow:auto}}

/* ── Badges ─────────────────────────────────────────────────
   .tf-badge + is-passed|is-failed|is-blocked|is-retest|is-skipped|is-untested
   priority: pri-critical|pri-high|pri-medium|pri-low ; tone: accent|neutral */
.tf-badge{display:inline-flex;align-items:center;gap:5px;height:22px;padding:0 8px;border-radius:var(--tf-radius-xs);
 font:600 11px/1 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;white-space:nowrap;background:var(--st-untested-soft);color:var(--st-untested);border:0;text-transform:none;letter-spacing:0}
.tf-badge::before{content:none}
.tf-badge.dot::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}
.tf-badge.is-passed{background:var(--st-passed-soft);color:var(--st-passed)}
.tf-badge.is-failed{background:var(--st-failed-soft);color:var(--st-failed)}
.tf-badge.is-blocked{background:var(--st-blocked-soft);color:var(--st-blocked)}
.tf-badge.is-retest{background:var(--st-retest-soft);color:var(--st-retest)}
.tf-badge.is-skipped{background:var(--st-skipped-soft);color:var(--st-skipped)}
.tf-badge.is-untested{background:var(--st-untested-soft);color:var(--st-untested)}
.tf-badge.pri-critical{background:var(--pri-critical-soft);color:var(--pri-critical)}
.tf-badge.pri-high{background:var(--pri-high-soft);color:var(--pri-high)}
.tf-badge.pri-medium{background:var(--pri-medium-soft);color:var(--pri-medium)}
.tf-badge.pri-low{background:var(--pri-low-soft);color:var(--pri-low)}
.tf-badge.accent{background:var(--accent-soft);color:var(--accent)}
.tf-badge.neutral{background:var(--panel-alt);color:var(--muted);box-shadow:inset 0 0 0 1px var(--border)}
.tf-badge.outline{background:transparent;color:var(--muted);box-shadow:inset 0 0 0 1px var(--border)}
.tf-id{font:600 12px/1 var(--tf-font-mono);color:var(--accent);letter-spacing:0;white-space:nowrap}
.tf-ref{display:inline-flex;align-items:center;height:20px;padding:0 6px;border-radius:var(--tf-radius-xs);font:500 11px/1 var(--tf-font-mono);color:var(--muted);background:var(--panel-alt);box-shadow:inset 0 0 0 1px var(--border);white-space:nowrap}
/* Legacy status/priority badges adopt the same palette. */
.app-shell .badge.pass{background:var(--st-passed-soft);color:var(--st-passed)}
.app-shell .badge.fail{background:var(--st-failed-soft);color:var(--st-failed)}
.app-shell .badge.skip{background:var(--st-skipped-soft);color:var(--st-skipped)}
.app-shell .badge.block{background:var(--st-blocked-soft);color:var(--st-blocked)}
.app-shell .badge.retest{background:var(--st-retest-soft);color:var(--st-retest)}
.app-shell .badge.neutral{background:var(--st-untested-soft);color:var(--st-untested)}

/* ── Panels: one bordered surface, flat header, no nested cards ── */
.tf-panel{background:var(--panel);border:1px solid var(--border);border-radius:var(--tf-radius);min-width:0}
.tf-panel+.tf-panel{margin-top:16px}
.tf-panel-head{display:flex;align-items:center;gap:10px;min-height:48px;padding:10px 16px;border-bottom:1px solid var(--border-soft)}
.tf-panel-title{margin:0;font-size:13px;font-weight:650;color:var(--text);letter-spacing:-.01em;display:flex;align-items:center;gap:8px;min-width:0}
.tf-panel-count{font:600 11px/1 Inter,sans-serif;color:var(--muted);background:var(--panel-alt);border:1px solid var(--border);border-radius:10px;padding:3px 7px}
.tf-panel-actions{margin-left:auto;display:flex;align-items:center;gap:6px}
.tf-panel-body{padding:16px}
.tf-panel-body.flush{padding:0}
.tf-panel.muted{background:var(--panel-alt)}

/* ── Key/value metadata ── */
.tf-meta{display:grid;grid-template-columns:minmax(96px,max-content) minmax(0,1fr);gap:0;margin:0}
.tf-meta>dt,.tf-meta-label{font-size:12px;color:var(--muted);padding:9px 12px 9px 0;border-bottom:1px solid var(--border-soft);margin:0}
.tf-meta>dd,.tf-meta-value{font-size:13px;color:var(--text);padding:9px 0;border-bottom:1px solid var(--border-soft);margin:0;min-width:0;overflow-wrap:anywhere}
.tf-meta>dt:last-of-type,.tf-meta>dd:last-of-type{border-bottom:0}

/* ── Empty / loading states ── */
.tf-empty{display:flex;flex-direction:column;align-items:center;text-align:center;gap:8px;padding:40px 20px;color:var(--muted);font-size:13px;line-height:1.55}
.tf-empty-title{font-size:15px;font-weight:650;color:var(--text)}
.tf-empty-icon{width:40px;height:40px;border-radius:10px;display:grid;place-items:center;background:var(--accent-soft);color:var(--accent);margin-bottom:4px}
.tf-empty .btn{margin-top:6px}

/* ── Segmented control & tabs ── */
.tf-seg{display:inline-flex;padding:3px;gap:2px;background:var(--panel-alt);border:1px solid var(--border);border-radius:var(--tf-radius-sm)}
.tf-seg>button{border:0;background:transparent;color:var(--muted);font:600 12px/1 Inter,sans-serif;padding:0 10px;min-height:28px;border-radius:var(--tf-radius-xs);cursor:pointer}
.tf-seg>button.active,.tf-seg>button[aria-pressed="true"]{background:var(--panel);color:var(--text);box-shadow:0 1px 2px rgba(16,40,48,.08),inset 0 0 0 1px var(--border)}
.tf-tabs{display:flex;gap:2px;border-bottom:1px solid var(--border);overflow-x:auto;scrollbar-width:none}
.tf-tabs::-webkit-scrollbar{display:none}
.tf-tab{border:0;background:transparent;color:var(--muted);font:600 13px/1 Inter,sans-serif;padding:11px 12px;border-bottom:2px solid transparent;margin-bottom:-1px;cursor:pointer;white-space:nowrap}
.tf-tab:hover{color:var(--text)}
.tf-tab.active,.tf-tab[aria-selected="true"]{color:var(--text);background:var(--panel-soft);border-bottom-color:transparent}

/* ── Stat strip (compact figures, not decorative tiles) ── */
.tf-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));border:1px solid var(--border);border-radius:var(--tf-radius);background:var(--panel);overflow:hidden}
.tf-stat{padding:14px 16px;border-right:1px solid var(--border-soft);min-width:0}
.tf-stat:last-child{border-right:0}
.tf-stat-label{font-size:12px;color:var(--muted)}
.tf-stat-value{font-size:22px;font-weight:650;letter-spacing:-.02em;font-variant-numeric:tabular-nums;color:var(--text);margin-top:4px}

/* ── Result distribution bar ── */
.tf-resultbar{display:flex;height:6px;border-radius:3px;overflow:hidden;background:var(--st-untested-soft)}
.tf-resultbar>span{display:block;height:100%}
.tf-resultbar .is-passed{background:var(--st-passed)}.tf-resultbar .is-failed{background:var(--st-failed)}
.tf-resultbar .is-blocked{background:var(--st-blocked)}.tf-resultbar .is-retest{background:var(--st-retest)}
.tf-resultbar .is-skipped{background:var(--st-skipped)}
/* Results a feature set aside (TF.hooks.runCounts, e.g. quarantined failures). */
.tf-resultbar .is-aside{background:repeating-linear-gradient(135deg,color-mix(in srgb,var(--st-failed) 40%,transparent) 0 3px,transparent 3px 6px)}

/* ── Utility ── */
.tf-icon{flex-shrink:0;vertical-align:middle;display:inline-block}
.tf-muted{color:var(--muted)}.tf-mono{font-family:var(--tf-font-mono)}
.tf-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.tf-sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
:is(.app-shell,.media-lightbox) :focus-visible{outline-color:var(--accent)}

/* ── Foundation 1.3.1 — fixes requested by the screen builds ── */
/* The legacy global `table{min-width:760px}` forces tables wider than the
   panes they live in; new surfaces size tables to their container. */
:is(.tf-workbench,.tf-panel,.tf-pane) table{min-width:0}
/* Wrap-safe stat strip: hairline dividers come from the grid gap, so rows
   that wrap keep clean separators. */
.tf-stats{gap:1px;background:var(--border)}
.tf-stat{background:var(--panel);border-right:0}
/* Toasts (tfToast) */
.tf-toasts{position:fixed;left:50%;bottom:calc(24px + env(safe-area-inset-bottom,0px));transform:translateX(-50%);z-index:10001;display:flex;flex-direction:column;align-items:center;gap:8px;pointer-events:none}
.tf-toast{background:var(--text);color:var(--panel);font:600 13px/1.35 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;padding:9px 14px 9px 12px;border-radius:8px;box-shadow:var(--shadow-lg);display:flex;align-items:center;gap:8px;max-width:min(440px,calc(100vw - 32px));animation:tfToastIn .18s ease-out}
.tf-toast::before{content:"";width:8px;height:8px;border-radius:50%;background:var(--success);flex:none}
.tf-toast.is-error::before{background:var(--danger)}.tf-toast.is-info::before{background:var(--info)}
.tf-toast.leaving{opacity:0;transform:translateY(6px);transition:opacity .2s,transform .2s}
@keyframes tfToastIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
@media(max-width:900px){.tf-toasts{bottom:calc(84px + env(safe-area-inset-bottom,0px))}body:not(.tf-m-detail):has(.tf-fab) .tf-toasts{bottom:calc(152px + env(safe-area-inset-bottom,0px))}}

/* ── Workspace frame ─────────────────────────────────────────
   Global bar (52px) + page header band (title, meta, actions, tabs) on
   white chrome; screen content below on the canvas. On desktop the content
   area is the scroll container so the chrome stays put; explorers render a
   .tf-workbench that fills it edge to edge with independently scrolling
   panes. Phones keep normal document scrolling. */
.app-shell>.main.tf-frame{padding:0;background:var(--bg);display:flex;flex-direction:column;min-width:0}
.tf-topbar{flex:none;display:flex;align-items:center;gap:12px;height:52px;padding:0 16px 0 24px;background:var(--panel);border-bottom:1px solid var(--border);min-width:0;position:relative;z-index:40}
.tf-crumbs{display:flex;align-items:center;gap:2px;min-width:0;flex:0 1 auto;overflow:hidden}
.tf-crumbs .crumb-logo-image{width:20px;height:20px;border-radius:5px;object-fit:cover;margin-right:6px}
.tf-crumb{border:0;background:none;padding:5px 7px;border-radius:var(--tf-radius-xs);color:var(--muted);font:500 13px/1.2 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:220px;min-width:0}
button.tf-crumb:hover{background:var(--panel-alt);color:var(--text)}
button.tf-crumb:focus-visible{outline:none;box-shadow:var(--tf-focus)}
.tf-crumb-current{color:var(--text);font-weight:600;cursor:default}
.tf-crumb-sep{color:var(--subtle);opacity:.6;font-size:14px;padding:0 1px}
.tf-search-trigger{margin-left:auto;display:flex;align-items:center;gap:8px;height:34px;width:clamp(180px,26vw,340px);padding:0 6px 0 11px;border:1px solid var(--border);border-radius:var(--tf-radius-sm);background:var(--panel-alt);color:var(--subtle);font:400 13px/1 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;cursor:pointer;flex:0 1 auto;min-width:0}
.tf-search-trigger:hover{border-color:color-mix(in srgb,var(--text) 22%,var(--border));color:var(--muted)}
.tf-search-trigger:focus-visible{outline:none;box-shadow:var(--tf-focus);border-color:var(--accent)}
.tf-search-trigger-text{flex:1;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tf-search-trigger kbd{font:500 11px/1 var(--tf-font-mono);color:var(--muted);background:var(--panel);border:1px solid var(--border);border-radius:4px;padding:4px 6px;white-space:nowrap}
.tf-topbar-actions{display:flex;align-items:center;gap:6px;flex:none}
.tf-pagehead{flex:none;background:var(--panel);border-bottom:1px solid var(--border);padding:0 28px;min-width:0}
.tf-pagehead-row{display:flex;align-items:center;gap:12px 16px;min-height:68px;padding:14px 0;flex-wrap:wrap}
.tf-pagehead-main{display:flex;align-items:center;gap:8px 14px;min-width:0;flex:1 1 auto;flex-wrap:wrap}
.tf-pagehead-title{margin:0;font-size:21px;font-weight:650;letter-spacing:-.025em;line-height:1.25;color:var(--text);white-space:nowrap}
.tf-pagehead-meta{display:flex;align-items:center;gap:6px 12px;font-size:13px;color:var(--muted);min-width:0;flex-wrap:wrap}
.tf-pagehead-meta:empty,.tf-pagehead-actions:empty,.tf-pagehead-tabs:empty{display:none}
.tf-pagehead-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end;margin-left:auto;min-width:0}
.tf-pagehead-tabs{margin-top:-6px}
.tf-pagehead-tabs .tf-tabs{border-bottom:0;margin-bottom:-1px}
.tf-content{min-width:0;padding:24px 28px 48px}
.tf-saving{position:fixed;left:50%;bottom:20px;transform:translateX(-50%);z-index:80;background:var(--text);color:var(--panel);font-size:12px;font-weight:600;padding:8px 14px;border-radius:999px;box-shadow:var(--shadow-lg);pointer-events:none}
@media(min-width:901px){
 .app-shell{height:100dvh;overflow:hidden}
 .app-shell>.main.tf-frame{height:100dvh;overflow:hidden}
 .tf-content{flex:1 1 auto;min-height:0;overflow:auto}
 .tf-content:has(>.tf-workbench){padding:0;overflow:hidden;display:flex;flex-direction:column}
}
/* Workbench panes: side (tree/filters) · grow (list) · inspector (detail) */
.tf-workbench{flex:1 1 auto;min-height:0;min-width:0;display:flex;background:var(--panel)}
.tf-pane{display:flex;flex-direction:column;min-width:0;min-height:0;background:var(--panel)}
.tf-pane.grow{flex:1 1 auto}
.tf-pane.side{flex:0 0 auto;width:var(--tf-pane-w,272px);background:var(--panel-alt);border-right:1px solid var(--border)}
.tf-pane.inspector{flex:0 0 auto;width:var(--tf-inspector-w,min(580px,44%));border-left:1px solid var(--border)}
.tf-pane-head{flex:none;display:flex;align-items:center;gap:8px;min-height:48px;padding:8px 16px;border-bottom:1px solid var(--border);background:inherit}
.tf-pane-title{font-size:11px;font-weight:600;color:var(--muted);text-transform:uppercase;letter-spacing:.07em;margin:0}
.tf-pane-body{flex:1 1 auto;min-height:0;overflow:auto}
.tf-pane-foot{flex:none;display:flex;align-items:center;gap:8px;border-top:1px solid var(--border);padding:8px 16px;font-size:12px;color:var(--muted);min-height:40px}
.tf-splitter{flex:0 0 5px;margin:0 -3px;cursor:col-resize;z-index:2;position:relative}
.tf-splitter:hover,.tf-splitter.dragging{background:color-mix(in srgb,var(--accent) 35%,transparent)}
@media(max-width:900px){
 .tf-topbar{height:auto;min-height:48px;padding:6px 14px;flex-wrap:wrap}
 .tf-crumbs{display:none}
 .tf-search-trigger{margin-left:0;flex:1 1 auto;width:auto}
 .tf-search-trigger kbd{display:none}
 .tf-pagehead{padding:0 14px}
 .tf-pagehead-row{min-height:56px;padding:12px 0}
 .tf-pagehead-title{font-size:19px}
 .tf-content{padding:16px 14px calc(104px + env(safe-area-inset-bottom,0px))}
 .tf-workbench{flex-direction:column}
 .tf-pane.side,.tf-pane.inspector{width:auto;border-right:0;border-left:0;border-bottom:1px solid var(--border)}
 .tf-pane-body{overflow:visible}
 .tf-splitter{display:none}
}

/* ── Mobile primitives (≤900px) ─────────────────────────────
   Phones get app-style structure: large title, full-bleed two-line rows,
   chip filters, bottom sheets, a FAB for the create action and a sticky
   action bar on detail pages. Body copy is 15px on phones. See "Mobile" in
   docs/design-system.md. Desktop-only / phone-only helpers: .tf-d-only,
   .tf-m-only. */
.tf-m-only{display:none!important}
.tf-fab{display:none}
@media(max-width:900px){
 .tf-m-only{display:revert!important}
 .tf-d-only{display:none!important}
 :root{--tf-phone-bar-height:64px;--tf-phone-nav-height:72px;--tf-phone-text:clamp(1rem,3.2vw,1.125rem);--tf-phone-meta:clamp(.875rem,2.6vw,.9375rem);--tf-control-h:44px;--tf-control-h-sm:44px}
 html{scroll-behavior:auto;scroll-padding-top:calc(var(--tf-phone-bar-height) + env(safe-area-inset-top,0px) + 12px)}
 .app-shell,.tf-sheet-layer{font-size:var(--tf-phone-text);line-height:1.5}
 .tf-content{padding-left:calc(14px + env(safe-area-inset-left,0px));padding-right:calc(14px + env(safe-area-inset-right,0px))}
 .tf-content:has(.tf-fab){padding-bottom:calc(var(--tf-phone-nav-height) + 96px + env(safe-area-inset-bottom,0px))}
 /* Large title on the canvas instead of a white band */
 .tf-pagehead{background:transparent;border-bottom:0;padding:0 calc(16px + env(safe-area-inset-right,0px)) 0 calc(16px + env(safe-area-inset-left,0px))}
 .tf-pagehead-row{min-height:0;padding:18px 0 10px;align-items:flex-end}
 .tf-pagehead-title{font-size:clamp(1.875rem,5.5vw,2.125rem);font-weight:700;letter-spacing:-.03em;white-space:normal;overflow-wrap:anywhere}
 .tf-pagehead-meta{font-size:var(--tf-phone-meta);width:100%;order:3}
 .tf-pagehead-actions .btn{min-height:40px}
 .tf-pagehead-tabs{margin:0 -16px;padding:0 16px;border-bottom:1px solid var(--border)}
 /* Lists */
 .tf-m-list{background:var(--panel);border-top:1px solid var(--border);border-bottom:1px solid var(--border);margin:0 -14px}
 .tf-m-row{display:flex;align-items:center;gap:12px;min-height:64px;padding:10px 16px;border-bottom:1px solid var(--border-soft);background:var(--panel);color:var(--text);text-align:left;width:100%;border-left:0;border-right:0;border-top:0;font:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent}
 .tf-m-row:last-child{border-bottom:0}
 .tf-m-row:active{background:var(--panel-alt)}
 .tf-m-row.selected{background:var(--accent-soft)}
 .tf-m-row-lead{flex:none;display:grid;place-items:center}
 .tf-m-row-main{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:4px}
 .tf-m-row-title{font-size:var(--tf-phone-text);font-weight:600;line-height:1.4;color:var(--text);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
 .tf-m-row-meta{display:flex;align-items:center;gap:6px 10px;flex-wrap:wrap;font-size:var(--tf-phone-meta);color:var(--muted);min-width:0}
 .tf-m-row-trail{flex:none;display:flex;align-items:center;gap:8px;color:var(--subtle)}
 .tf-m-section{position:sticky;top:0;z-index:5;display:flex;align-items:center;gap:8px;min-height:36px;padding:6px 16px;background:var(--panel-alt);border-bottom:1px solid var(--border);font-size:12px;font-weight:650;color:var(--muted);text-transform:uppercase;letter-spacing:.05em}
 .tf-m-section .count{margin-left:auto;font-weight:600;text-transform:none;letter-spacing:0}
 /* Chip filters: one horizontally scrolling row */
 .tf-m-chips{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;padding:2px 16px 12px;margin:0 -14px}
 .tf-m-chips::-webkit-scrollbar{display:none}
 .tf-m-chip{flex:none;display:inline-flex;align-items:center;gap:6px;min-height:2.75rem;padding:.5rem .875rem;border-radius:24px;border:1px solid var(--border);background:var(--panel);color:var(--text);font:600 .9375rem/1.3 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;white-space:nowrap;cursor:pointer}
 .tf-m-chip.active,.tf-m-chip[aria-pressed="true"]{background:var(--accent-soft);border-color:var(--accent-mid);color:var(--accent)}
 .tf-m-chip .tf-badge{height:18px;padding:0 6px}
 /* Search field on phones */
 .tf-m-search{position:relative;margin:0 0 12px}
 .tf-m-search .input{width:100%;height:44px;border-radius:10px;padding-left:40px;font-size:16px;background:var(--panel)}
 .tf-m-search .tf-icon{position:absolute;left:13px;top:50%;transform:translateY(-50%);color:var(--subtle)}
 /* Floating action button above the bottom tab bar */
 .tf-fab{display:inline-flex;align-items:center;justify-content:center;gap:8px;position:fixed;right:calc(16px + env(safe-area-inset-right,0px));bottom:calc(var(--tf-phone-nav-height) + 16px + env(safe-area-inset-bottom,0px));z-index:70;min-height:56px;min-width:56px;padding:16px;border-radius:16px;border:0;background:var(--accent);color:var(--panel);font:650 1rem/1.3 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;box-shadow:0 6px 18px rgba(7,63,70,.28),0 2px 4px rgba(7,63,70,.18);cursor:pointer}
 .tf-fab.extended{padding:0 20px 0 16px}
 .tf-fab:active{transform:scale(.97)}
 body.tf-m-detail .tf-fab{display:none}
 /* Detail pages: back bar + sticky bottom action bar; tab bar hidden */
 body.tf-m-detail .mobile-bottomnav{display:none!important}
 body.tf-m-detail .tf-content{padding-bottom:calc(96px + env(safe-area-inset-bottom,0px))}
 .tf-m-backbar{display:flex;align-items:center;gap:8px;min-height:48px;margin:-4px 0 8px}
 .tf-m-backbar .btn{min-height:40px;padding:0 10px 0 6px}
 .tf-m-actionbar{position:fixed;left:0;right:0;bottom:0;z-index:70;display:flex;align-items:center;gap:10px;padding:10px 16px calc(10px + env(safe-area-inset-bottom,0px));background:var(--panel);border-top:1px solid var(--border);box-shadow:0 -4px 16px rgba(16,40,48,.06)}
 .tf-m-actionbar .btn{min-height:46px;flex:1 1 0;font-size:15px;border-radius:10px}
 .tf-m-actionbar .btn.icon{flex:0 0 46px;width:46px}
 /* Touch targets and readable controls */
 .app-shell .btn,.app-shell .btn.small,.tf-sheet-layer .btn,.tf-sheet-layer .btn.small{min-height:2.75rem;font-size:.9375rem}
 .app-shell :is(input[type="checkbox"],input[type="radio"]){width:20px;height:20px}
}
/* Bottom sheets (MobileSheet) — also usable on desktop as a centred dialog */
.tf-sheet-layer{position:fixed;inset:0;z-index:9500;display:flex;align-items:flex-end;justify-content:center}
.tf-sheet-backdrop{position:absolute;inset:0;background:rgba(10,24,30,.45);animation:tfFade .18s ease-out}
.tf-sheet{position:relative;width:100%;max-width:640px;max-height:85dvh;display:flex;flex-direction:column;background:var(--panel);color:var(--text);border-radius:16px 16px 0 0;box-shadow:0 -10px 40px rgba(10,24,30,.25);padding-bottom:env(safe-area-inset-bottom,0px);animation:tfSheetUp .22s cubic-bezier(.2,.8,.2,1);outline:none}
.tf-sheet.full{height:92dvh;max-height:92dvh}
.tf-sheet-handle{width:36px;height:4px;border-radius:2px;background:var(--border);margin:8px auto 2px;flex:none}
.tf-sheet-head{display:flex;align-items:center;gap:8px;padding:6px 8px 8px 20px;flex:none}
.tf-sheet-title{margin:0;font-size:17px;font-weight:650;letter-spacing:-.01em;flex:1;min-width:0}
.tf-sheet-body{flex:1 1 auto;min-height:0;overflow:auto;padding:4px 20px 16px;-webkit-overflow-scrolling:touch}
.tf-sheet-foot{flex:none;display:flex;gap:10px;padding:12px 20px calc(12px + env(safe-area-inset-bottom,0px));border-top:1px solid var(--border)}
.tf-sheet-foot .btn{flex:1;min-height:46px}
body.tf-sheet-open{overflow:hidden}
@media(min-width:901px){.tf-sheet-layer{align-items:center}.tf-sheet{border-radius:12px;max-height:80vh}.tf-sheet-handle{display:none}}
@keyframes tfSheetUp{from{transform:translateY(24px);opacity:.6}to{transform:none;opacity:1}}
@keyframes tfFade{from{opacity:0}to{opacity:1}}
@media(prefers-reduced-motion:reduce){.tf-sheet,.tf-sheet-backdrop{animation:none}}

/* ═══ Screen regions ════════════════════════════════════════════
   Each screen keeps its overrides inside its own region below, so
   changes stay local and reviewable. Keep the markers.
════════════════════════════════════════════════════════════════ */

/* @region shell — app frame, header, mobile nav, dialogs, auth, help */
/* Sidebar: ≥1280 rail (4 shortcuts) + full sidebar. 901–1279 the sidebar
   collapses to the rail, which lists every destination plus an expand button
   that opens the full sidebar as an overlay (Escape / backdrop / navigating
   closes it). */
.qa-rail-all,.qa-rail-sep,.qa-rail-expand{display:none}
/* The rail is pinned to the window: the sidebar scrolls on short screens and
   used to carry the rail up with it. */
@media(min-width:901px){.qa-rail{position:fixed;top:0;bottom:0;left:0;height:100dvh;z-index:1}}
.qa-nav-backdrop{display:none}
@media(min-width:901px) and (max-width:1279px){
 .app-shell{grid-template-columns:52px minmax(0,1fr)}
 .app-shell>.main{grid-column:2}
 .qa-sidebar{position:relative;width:52px;min-width:52px;padding:0;overflow:visible;border-right:0;z-index:60}
 .qa-sidebar>:not(.qa-rail){display:none}
 .qa-rail{gap:4px;padding:16px 6px 14px;overflow-y:auto;overflow-x:hidden;scrollbar-width:none}
 .qa-rail::-webkit-scrollbar{display:none}
 .qa-rail-mark{margin-bottom:6px}
 .qa-rail-short{display:none}
 .qa-rail-expand{display:grid;margin-bottom:6px}
 .qa-rail-all{display:grid}
 .qa-rail-sep{display:block;width:24px;height:1px;flex:none;margin:6px 0;background:rgba(255,255,255,.16)}
 .qa-rail-end{flex:none}
 .qa-sidebar.expanded{position:fixed;left:0;top:0;bottom:0;width:300px;padding:25px 16px 16px 72px;overflow-y:auto;background:var(--panel);border-right:1px solid var(--border);box-shadow:var(--shadow-lg);z-index:210}
 .qa-sidebar.expanded>:not(.qa-rail){display:revert}
 .qa-sidebar.expanded>.nav-list{display:flex}
 .qa-sidebar.expanded>.sidebar-footer{display:block}
 .qa-nav-backdrop{display:block;position:fixed;inset:0;z-index:205;background:rgba(10,24,30,.38);animation:tfFade .16s ease-out}
}


/* Global bar controls: compact project switcher and theme icon menu */
.tf-topbar .project-switcher-shell{position:static;min-width:0}
.btn.tf-project-trigger{max-width:210px;gap:6px;padding:0 8px;color:var(--text);font-weight:600}
.tf-project-trigger .tf-icon{flex:none;color:var(--muted)}
.tf-project-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tf-theme-trigger{color:var(--muted)}
.tf-theme-trigger:hover{color:var(--text)}
.tf-menu-icon-blank{display:inline-block;width:15px;height:15px}
.tf-dialog-form{grid-template-columns:1fr;gap:14px}
.tf-sheet-layer :is(.input,.select,.textarea){font-family:inherit}
.tf-sheet-layer .textarea{line-height:1.5;resize:vertical}
@media(min-width:901px){.tf-dialog-sheet{max-width:480px}}
@media(min-width:901px) and (max-width:1279px){.tf-project-trigger{max-width:160px}.tf-apps-label{display:none}}

/* Alert / confirm dialogs: flat panel, line icon tinted by tone */
.app-dialog-overlay{background:rgba(10,24,30,.45);backdrop-filter:none}
.app-dialog-box{width:420px;max-width:calc(100vw - 32px);padding:22px 22px 18px;border-radius:var(--tf-radius);text-align:left;display:grid;grid-template-columns:auto 1fr;gap:4px 14px;align-items:start}
.app-dialog-icon{grid-row:1/span 1;width:36px;height:36px;border-radius:50%;display:grid;place-items:center;font-size:0;margin:0}
.app-dialog-icon .tf-icon{width:19px;height:19px}
.app-dialog-icon-info{background:var(--accent-soft);color:var(--accent)}
.app-dialog-icon-success{background:var(--success-soft,var(--accent-soft));color:var(--success,var(--accent))}
.app-dialog-icon-error{background:var(--danger-soft);color:var(--danger)}
.app-dialog-icon-warning{background:var(--warning-soft);color:var(--warning)}
.app-dialog-msg{grid-column:2;margin:7px 0 0;font-size:14px;line-height:1.55;color:var(--text);text-align:left;white-space:pre-line;overflow-wrap:anywhere}
.app-dialog-actions{grid-column:1/-1;display:flex;justify-content:flex-end;gap:8px;margin-top:18px}
@media(max-width:540px){.app-dialog-actions .btn{flex:1;min-height:44px}}
/* What's new */
.tf-new-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--accent);margin-left:8px;vertical-align:middle}
.tf-changelog{display:flex;flex-direction:column}
.tf-changelog-entry{padding:14px 0;border-bottom:1px solid var(--border-soft)}
.tf-changelog-entry:first-child{padding-top:4px}
.tf-changelog-entry:last-child{border-bottom:0}
.tf-changelog-date{font:500 12px/1.3 var(--tf-font-mono);color:var(--subtle)}
.tf-changelog-title{margin:4px 0 8px;font-size:15px;font-weight:650;color:var(--text);letter-spacing:-.01em}
.tf-changelog-items{margin:0;padding-left:18px;font-size:13px;line-height:1.55;color:var(--muted)}
.tf-changelog-items li{margin:3px 0}
.tf-changelog-items+.tf-changelog-section{margin-top:10px}
.tf-changelog-section+.tf-changelog-section{margin-top:10px}
.tf-changelog-subtitle{margin:0 0 4px;font-size:13px;font-weight:600;color:var(--text)}
@media(min-width:901px){.tf-changelog-sheet{max-width:560px}}

/* ⌘K case search */
.cmdk-overlay{position:fixed;inset:0;z-index:9600;background:rgba(10,24,30,.42);display:flex;justify-content:center;align-items:flex-start;padding:12vh 16px 16px}
.cmdk-panel{width:640px;max-width:100%;background:var(--panel);color:var(--text);border:1px solid var(--border);border-radius:var(--tf-radius);box-shadow:var(--shadow-lg);overflow:hidden;display:flex;flex-direction:column;max-height:70vh;animation:tfFade .14s ease-out}
.cmdk-field{display:flex;align-items:center;gap:10px;padding:0 10px 0 16px;border-bottom:1px solid var(--border);color:var(--subtle)}
.cmdk-input{flex:1;min-width:0;height:52px;border:0;outline:0;background:transparent;color:var(--text);font:400 15px/1.2 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
.cmdk-input::-webkit-search-cancel-button{display:none}
.cmdk-close{font:500 11px/1 var(--tf-font-mono);color:var(--muted)}
.cmdk-results{flex:1 1 auto;min-height:0;max-height:none;overflow-y:auto;padding:6px}
.cmdk-empty{padding:22px 12px;color:var(--muted);font-size:13px;text-align:center}
.cmdk-item{display:flex;align-items:center;gap:12px;width:100%;min-height:40px;padding:8px 10px;border:0;border-radius:var(--tf-radius-sm);background:transparent;color:var(--text);text-align:left;font:inherit;cursor:pointer}
.cmdk-item.active{background:var(--accent-soft)}
.cmdk-item-id{flex:none;min-width:44px;font:600 12px/1 var(--tf-font-mono);color:var(--accent)}
.cmdk-item-title{flex:1;min-width:0;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cmdk-item-sec{flex:none;max-width:34%;font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cmdk-foot{display:flex;gap:16px;padding:8px 14px;border-top:1px solid var(--border);font-size:12px;color:var(--muted);background:var(--panel-alt)}
.cmdk-foot kbd{font:500 11px/1 var(--tf-font-mono);border:1px solid var(--border);border-radius:4px;padding:2px 5px;margin-right:4px;background:var(--panel);color:var(--muted)}
@media(max-width:900px){
 .cmdk-overlay{padding:0;align-items:stretch}
 .cmdk-panel{width:100%;max-height:none;height:100dvh;border:0;border-radius:0;padding-top:env(safe-area-inset-top,0px)}
 .cmdk-input{height:56px;font-size:16px}
 .cmdk-item{min-height:52px;font-size:15px}
 .cmdk-item-title{font-size:15px;white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
 .cmdk-item-sec{display:none}
 .cmdk-foot{display:none}
}

/* Auth: full-page sign-in/sign-up (solid accent brand panel, line icons) and
   the small account screens (verify email, change password) on flat tokens. */
.auth-page .auth-page-aside{background:var(--accent-soft);color:var(--text);border-right:1px solid var(--border)}
.auth-page .auth-page-aside::before{display:none}
.auth-page .auth-page-aside :is(.auth-hero-title,.auth-hero-tagline,.auth-hero-feat){color:var(--text)}
.auth-page .auth-page-aside .auth-hero-tagline{color:var(--muted)}
.auth-page .auth-page-aside .auth-hero-badge{background:var(--accent);color:var(--panel);box-shadow:none;border:0}
.auth-hero-feat-icon{display:inline-grid;place-items:center;width:28px;height:28px;border-radius:7px;background:var(--panel);color:var(--accent);border:1px solid var(--accent-mid);flex:none}
.auth-hero-feat-icon .tf-icon{width:16px;height:16px}
.pw-toggle{display:grid;place-items:center;color:var(--muted)}
.pw-toggle:hover{color:var(--text)}
.auth-shell{background:var(--bg);min-height:100dvh;display:grid;place-items:center;padding:24px 16px}
.auth-shell .auth-card{width:440px;max-width:100%;background:var(--panel);border:1px solid var(--border);border-radius:var(--tf-radius);box-shadow:none;padding:28px}
.auth-shell .auth-brand{text-align:left}
.auth-shell .auth-brand h1{font-size:22px;letter-spacing:-.02em}
.auth-shell .generated-password-box{background:var(--panel-alt);border:1px solid var(--border-soft);border-radius:var(--tf-radius-sm);padding:14px}
.auth-shell .auth-toolbar .btn{width:100%}

/* How To — workbench: topics · article. Phones: topic list → article page. */
.howto-topics{--tf-pane-w:272px}
.howto-topic-list{display:flex;flex-direction:column;gap:2px;padding:8px}
.howto-topic{display:flex;align-items:center;gap:10px;width:100%;min-height:38px;padding:7px 10px;border:0;border-radius:var(--tf-radius-sm);background:transparent;color:var(--muted);font:500 13px/1.3 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;text-align:left;cursor:pointer}
.howto-topic:hover{background:var(--panel);color:var(--text)}
.howto-topic.active{background:var(--accent-soft);color:var(--accent);font-weight:650}
.howto-topic:focus-visible{outline:none;box-shadow:var(--tf-focus)}
.howto-topic-ico{display:inline-grid;place-items:center;flex:none;color:inherit}
.howto-topic-ico svg{width:17px;height:17px}
.howto-topic-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.howto-main{background:var(--bg)}
.howto-article-wrap{max-width:760px;padding:28px 32px 48px}
.howto-article{background:var(--panel);border:1px solid var(--border);border-radius:var(--tf-radius);padding:24px 28px}
.howto-article-head{display:flex;align-items:center;gap:12px;margin-bottom:14px}
.howto-article-ico{display:grid;place-items:center;width:38px;height:38px;flex:none;border-radius:var(--tf-radius-sm);background:var(--accent-soft);color:var(--accent)}
.howto-article-title{margin:0;font-size:19px;font-weight:650;letter-spacing:-.02em;color:var(--text)}
.howto-article .howto-lead{font-size:14px;line-height:1.65;color:var(--text);margin:0 0 14px}
.howto-article .howto-where{display:flex;align-items:flex-start;gap:8px;padding:10px 12px;margin:0 0 14px;border-radius:var(--tf-radius-sm);background:var(--panel-alt);border:1px solid var(--border-soft);font-size:13px;color:var(--muted);line-height:1.5}
.howto-article .howto-where .tf-icon{flex:none;margin-top:2px;color:var(--accent)}
.howto-article :is(.howto-steps,.howto-featlist){margin:0 0 14px;padding-left:22px;font-size:14px;line-height:1.65;color:var(--text)}
.howto-article :is(.howto-steps,.howto-featlist) li{margin:6px 0;padding-left:2px}
.howto-article .howto-tip{display:flex;gap:10px;align-items:flex-start;padding:12px 14px;margin:4px 0 0;border-radius:var(--tf-radius-sm);background:var(--accent-soft);border:1px solid var(--accent-mid);color:var(--text);font-size:13px;line-height:1.55}
.howto-article .howto-tip .tf-icon{flex:none;margin-top:2px;color:var(--accent)}
.howto-article code{font:500 12px/1 var(--tf-font-mono);background:var(--panel-alt);border:1px solid var(--border-soft);border-radius:4px;padding:2px 5px}
.howto-pager{display:flex;justify-content:space-between;gap:12px;margin-top:22px;padding-top:16px;border-top:1px solid var(--border-soft)}
.howto-pager .btn{max-width:48%;min-width:0}
.howto-pager .btn span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:900px){
 .howto-m .tf-m-list{margin:0 -14px}
 .howto-topic-ico{width:36px;height:36px;border-radius:10px;background:var(--accent-soft);color:var(--accent)}
 .howto-m .howto-article{border:0;border-radius:0;background:transparent;padding:0}
 .howto-m .howto-article-title{font-size:22px}
 .howto-m .howto-article .howto-lead,.howto-m .howto-article :is(.howto-steps,.howto-featlist){font-size:15px}
 .howto-pager .btn{min-height:46px}
}
/* Onboarding: flat panel, line icons, accent only */
.ob-overlay{background:rgba(10,24,30,.45);backdrop-filter:none}
.ob-card{border-radius:var(--tf-radius);border:1px solid var(--border);box-shadow:var(--shadow-lg)}
.ob-logo-fallback,.ob-step-num,.ob-progress-fill{background:var(--accent);color:var(--panel)}
.ob-feature-icon{display:grid;place-items:center;width:32px;height:32px;border-radius:var(--tf-radius-sm);background:var(--accent-soft);color:var(--accent);font-size:0}
.ob-cta{border-radius:var(--tf-radius-sm)!important}
@media(max-width:540px){.ob-features{grid-template-columns:1fr}.ob-footer{flex-direction:column-reverse;align-items:stretch}}

/* Phone frame (≤900px): one teal app bar · bottom tabs · More/Account sheets.
   The bar uses the rail's dark teal (same in every theme, like the desktop
   rail) so it reads as the app's chrome. */
.tf-m-appbar{display:none}
@media(max-width:900px){
 .mobile-topbar,.mobile-more-panel,.mobile-more-backdrop{display:none!important}
 .tf-frame>.tf-topbar{display:none}
 .tf-m-appbar{--tf-chrome:#073f46;--tf-chrome-hi:#1d5960;display:flex;align-items:center;gap:8px;position:sticky;top:0;z-index:80;min-height:calc(var(--tf-phone-bar-height) + env(safe-area-inset-top,0px));padding:calc(8px + env(safe-area-inset-top,0px)) calc(12px + env(safe-area-inset-right,0px)) 8px calc(8px + env(safe-area-inset-left,0px));background:var(--tf-chrome);color:#fff}
 .tf-m-appbar-spacer{display:none}
 .tf-m-appbar-btn{display:inline-flex;align-items:center;gap:8px;min-height:48px;min-width:48px;padding:0 10px;border:0;border-radius:10px;background:transparent;color:#fff;font:650 1.0625rem/1.3 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;cursor:pointer;-webkit-tap-highlight-color:transparent}
 .tf-m-appbar-btn.icon{justify-content:center;padding:0;flex:none}
 .tf-m-appbar-btn:active,.tf-m-appbar-btn[aria-expanded="true"]{background:var(--tf-chrome-hi)}
 .tf-m-appbar-btn:focus-visible,.tf-m-appbar-avatar:focus-visible{outline:2px solid #fff;outline-offset:2px}
 .tf-m-appbar-project{min-width:0;flex:1 1 0}
 .tf-m-appbar-project .tf-menu{min-width:0;width:100%}
 .tf-m-appbar-projectbtn{width:100%;max-width:100%;justify-content:flex-start}
 .tf-m-appbar-projectbtn .tf-icon{flex:none;opacity:.85}
 .tf-m-appbar-projectbtn .tf-project-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .tf-m-appbar-projectbtn .tf-btn-caret{opacity:.8;font-size:12px}
 .tf-m-appbar-avatar{display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;margin:0;border-radius:50%;border:0;background:var(--tf-chrome-hi);color:#fff;font:700 .875rem/1 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;letter-spacing:.02em;cursor:pointer}
 .tf-m-appbar-avatar.large{width:44px;height:44px;margin:0;font-size:14px;background:var(--accent);color:var(--panel)}
 /* Bottom tabs */
 .tf-m-tabs{min-height:calc(var(--tf-phone-nav-height) + env(safe-area-inset-bottom,0px));padding:8px calc(4px + env(safe-area-inset-right,0px)) calc(8px + env(safe-area-inset-bottom,0px)) calc(4px + env(safe-area-inset-left,0px));background:var(--panel);border-top:1px solid var(--border);box-shadow:none}
 .tf-m-tabs .mbn-item{min-height:56px;gap:4px;color:var(--muted)}
 .tf-m-tabs .mbn-icon{width:56px;height:30px}
 .tf-m-tabs .mbn-icon svg{width:22px;height:22px}
 .tf-m-tabs .mbn-item.active{color:var(--accent)}
 .tf-m-tabs .mbn-item.active .mbn-icon{background:var(--accent-soft);color:var(--accent)}
 .tf-m-tabs .mbn-label{max-width:100%;padding:0 2px;font-size:.75rem;line-height:1.3;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 /* Sheets */
 .tf-m-nav-sheet .tf-sheet-body{padding:0 0 12px}
 .tf-m-sheet-list{display:flex;flex-direction:column}
 .tf-m-sheet-gap{margin-top:8px;border-top:1px solid var(--border-soft)}
 .tf-m-navrow{min-height:56px;border-bottom:1px solid var(--border-soft)}
 .tf-m-navrow-ico{width:36px;height:36px;border-radius:10px;background:var(--panel-alt);color:var(--muted)}
 .tf-m-navrow-ico svg{width:19px;height:19px}
 .tf-m-navrow.selected .tf-m-navrow-ico{background:var(--accent-soft);color:var(--accent)}
 .tf-m-navrow.selected .tf-m-row-title{color:var(--accent)}
 .tf-m-navrow.danger .tf-m-row-title,.tf-m-navrow.danger .tf-m-navrow-ico{color:var(--danger)}
 .tf-m-sheet-heading{padding:14px 20px 8px;font-size:12px;font-weight:650;color:var(--muted);text-transform:uppercase;letter-spacing:.05em}
 .tf-m-account-head{display:flex;align-items:center;gap:12px;padding:4px 20px 12px;border-bottom:1px solid var(--border-soft)}
 .tf-m-account-name{font-size:16px;font-weight:650;color:var(--text)}
 .tf-m-account-role{font-size:13px;color:var(--muted);margin-top:2px}
 .tf-m-theme-grid{display:flex;flex-wrap:wrap;gap:8px;padding:0 20px 8px}
 .tf-m-theme-grid .tf-m-chip{height:38px}
}

/* Phone header: icon-only actions (⋯) sit on the title row, top-right. */
@media(max-width:900px){
 .tf-pagehead-row:not(:has(.tf-pagehead-actions .btn:not(.icon))){flex-wrap:nowrap;align-items:flex-start}
 .tf-pagehead-row:not(:has(.tf-pagehead-actions .btn:not(.icon))) .tf-pagehead-main{flex:1 1 auto;min-width:0}
 .tf-pagehead-row:not(:has(.tf-pagehead-actions .btn:not(.icon))) .tf-pagehead-actions{flex:none;margin-top:2px}
 .tf-pagehead-actions .btn.icon{min-width:44px;min-height:44px}
}
/* Phone detail pages carry their own back bar + title. */
@media(max-width:900px){body.tf-m-detail .tf-pagehead{display:none}body.tf-m-detail .tf-content{padding-top:8px}}

/* Nav count pills (Bugs: "needs my action"), rail dot, phone tab badge, toast action */
.qa-sidebar .nav-btn .qa-nav-count{margin-left:auto;min-width:20px;height:18px;padding:0 6px;border-radius:9px;display:inline-grid;place-items:center;background:var(--danger);color:#fff;font:700 10px/1 Inter,sans-serif}
.qa-sidebar .nav-btn .qa-nav-count+.qa-active-dot{margin-left:6px}
.qa-rail-button{position:relative}
.qa-rail-dot{position:absolute;top:6px;right:6px;width:6px;height:6px;border-radius:50%;background:var(--danger)}
.mbn-icon{position:relative}
.mbn-badge{position:absolute;top:-4px;left:calc(100% - 8px);min-width:16px;height:16px;padding:0 4px;border-radius:8px;display:inline-grid;place-items:center;background:var(--danger);color:#fff;font:700 10px/1 Inter,sans-serif}
.tf-toast-action{pointer-events:auto;margin-left:6px;border:0;background:transparent;color:inherit;font:700 13px/1 Inter,sans-serif;text-decoration:underline;cursor:pointer;padding:4px 6px;border-radius:4px}
.tf-toast-action:focus-visible{outline:2px solid currentColor;outline-offset:1px}
/* @endregion shell */



/* @region cases-list — case library: toolbar, section tree, table, bulk actions, import/export */
/* Case library workbench: .tf-workbench.tcl = tree (side) · list (grow) ·
   inspector. The list adapts to its own width with container queries, so
   it reads the same whether the app sidebar, the tree or the inspector are
   open. Tokens only; every theme inherits. */
.tcl{position:relative;--tcl-row-h:44px;--tcl-head-h:34px;--tcl-group-h:36px;
 /* Scrims: tinted by the ink colour on light themes, plain black on dark ones. */
 --tcl-scrim:color-mix(in srgb,var(--text) 22%,transparent);--tcl-scrim-strong:color-mix(in srgb,var(--text) 42%,transparent)}
body:is([data-theme="dark"],[data-theme="midnight"],[data-theme="graphite"],[data-theme="nord"],[data-theme="oled"],[data-theme="nightops"]) .tcl{--tcl-scrim:color-mix(in srgb,black 45%,transparent);--tcl-scrim-strong:color-mix(in srgb,black 62%,transparent)}
.tcl.density-compact{--tcl-row-h:36px}
.tcl kbd{font:500 10.5px/1 var(--tf-font-mono);color:var(--muted);background:var(--panel);border:1px solid var(--border);border-bottom-width:2px;border-radius:4px;padding:2px 5px;margin:0 2px}
.tcl .tf-icon{flex-shrink:0}
.tcl-blank{display:block;width:14px;height:14px}
/* Native checkboxes, selects and scrollbars follow dark themes. */
body:is([data-theme="dark"],[data-theme="midnight"],[data-theme="graphite"],[data-theme="nord"],[data-theme="oled"],[data-theme="nightops"]) :is(.tcl,.tcl-modal-overlay,.tcl-pop){color-scheme:dark}

/* Header band (meta + actions, rendered through PageSlot) */
.tcl-meta{display:inline-flex;align-items:center;flex-wrap:wrap;gap:4px 8px;font-size:13px;color:var(--muted)}
.tcl-meta strong{color:var(--text);font-weight:600;font-variant-numeric:tabular-nums}
.tcl-meta-dot{color:var(--subtle)}
.tcl-meta-extra{display:inline-flex;align-items:center;gap:8px}
/* Compact desktop (e.g. a folded phone opened): keep the band to one row. */
@media (min-width:901px) and (max-width:1279px){.tcl-meta-extra{display:none}}
.tcl-head-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.tcl-head-actions .tcl-narrow{display:none}
.tcl-head-actions .btn .tf-icon{opacity:.85}
.tcl-head-actions .btn.primary .tf-icon{opacity:1}

/* ── Section tree (side pane) ── */
.tcl .tcl-tree{min-width:0}
.tcl-treehead{padding:8px 8px 8px 16px;gap:2px}
.tcl-treehead .btn.icon{color:var(--muted)}
.tcl-treebody{padding:8px 8px 16px;outline:none}
.tcl-node{display:flex;align-items:center;gap:6px;height:32px;padding:0 6px 0 calc(6px + var(--lvl,0) * 16px);margin:1px 0;border-radius:var(--tf-radius-sm);
 color:var(--text);font-size:13px;line-height:1;cursor:pointer;user-select:none;-webkit-user-select:none;position:relative}
.tcl-node:hover{background:color-mix(in srgb,var(--text) 5%,transparent)}
.tcl-node:focus{outline:none}
.tcl-node:focus-visible{box-shadow:var(--tf-focus)}
.tcl-node.is-selected{background:var(--accent-soft);color:color-mix(in srgb,var(--accent) 50%,var(--text));font-weight:600;box-shadow:none}
.tcl-node.is-selected:focus-visible{box-shadow:var(--tf-focus)}
.tcl-node-chev{flex:none;width:18px;height:18px;display:grid;place-items:center;border-radius:4px;color:var(--muted)}
.tcl-node-chev:not(.is-leaf):hover{background:color-mix(in srgb,var(--text) 10%,transparent);color:var(--text)}
.tcl-node-icon{flex:none;display:grid;place-items:center;color:var(--subtle)}
.tcl-node.is-selected .tcl-node-icon,.tcl-node.is-selected .tcl-node-chev{color:var(--accent)}
.tcl-node.is-special .tcl-node-name{color:var(--muted)}
.tcl-node:not(.is-special)+.tcl-node.is-special{margin-top:13px}
.tcl-node:not(.is-special)+.tcl-node.is-special::before{content:"";position:absolute;left:6px;right:6px;top:-7px;height:1px;background:var(--border)}
.tcl-node-name{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.3}
.tcl-node-count{flex:none;min-width:22px;text-align:right;font:500 11.5px/18px Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--muted);font-variant-numeric:tabular-nums}
.tcl-node.is-selected .tcl-node-count{color:inherit}
.tcl-node-menu{flex:none;display:none;place-items:center;width:24px;height:24px;margin-right:-2px;border:0;border-radius:4px;background:transparent;color:var(--muted);cursor:pointer;padding:0}
.tcl-node-menu:hover{background:color-mix(in srgb,var(--text) 10%,transparent);color:var(--text)}
.tcl-node:hover .tcl-node-menu,.tcl-node:focus-visible .tcl-node-menu{display:grid}
.tcl-node:hover .tcl-node-count,.tcl-node:focus-visible .tcl-node-count{display:none}
.tcl-node-all{margin-bottom:6px}
.tcl-node-all::after{content:"";position:absolute;left:6px;right:6px;bottom:-4px;height:1px;background:var(--border)}
.tcl-node.sec-dragging{opacity:.45}
.tcl-node.sec-drop-before{box-shadow:inset 0 2px 0 var(--accent)}
.tcl-node.sec-drop-after{box-shadow:inset 0 -2px 0 var(--accent)}
.tcl-node.sec-drop-inside{background:var(--accent-soft);outline:1px dashed var(--accent);outline-offset:-1px}
.tcl-tree-empty{margin:8px;font-size:12.5px;line-height:1.5;color:var(--muted)}
.tcl-treesel{flex:none;display:flex;align-items:center;gap:6px;padding:8px 8px 8px 16px;border-bottom:1px solid var(--border);background:var(--accent-soft);font-size:12px}
.tcl-treesel-n{font-weight:600;color:var(--accent);white-space:nowrap}
.app-shell .tcl-treesel .select{min-height:30px;height:30px;padding:0 8px;font-size:12px;flex:1 1 auto;min-width:0}
.tcl-treefoot{padding:8px}
.tcl-treefoot-btn{width:100%;justify-content:flex-start}
.tcl .tcl-splitter{touch-action:none}
.tcl .tcl-splitter:focus-visible{outline:none;background:color-mix(in srgb,var(--accent) 45%,transparent)}

/* ── List pane: toolbar, selection bar, chips ── */
.tcl-list{container:tcl-list / inline-size;min-width:0}
.tcl-listhead{flex-wrap:wrap;gap:8px;padding:8px 12px;min-height:52px}
.tcl-tree-toggle{color:var(--muted)}
.tcl-search{flex:1 1 220px;max-width:440px}
.app-shell .tcl-search .input{min-height:32px;height:32px;padding:0 10px 0 33px;font-size:13px;background:var(--panel)}
.tcl-search .input::-webkit-search-cancel-button{cursor:pointer}
.tcl-section-select{display:none;position:relative;align-items:center;flex:1 1 100%;min-width:0}
.tcl-section-select-icon{position:absolute;left:11px;color:var(--muted);display:grid;pointer-events:none}
.app-shell .tcl-section-select .select{width:100%;padding-left:34px;font-weight:500}
.tcl-view-menu .btn,.tcl-filter-btn{color:var(--muted)}
.tcl-filter-btn.is-active{color:var(--accent);border-color:color-mix(in srgb,var(--accent) 40%,var(--border));background:var(--accent-soft)}
.tcl-filter-count{display:inline-grid;place-items:center;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:var(--accent);color:var(--panel);font-size:10.5px;font-weight:700}
.tcl-selbar{background:color-mix(in srgb,var(--accent) 7%,var(--panel));gap:6px 8px}
.tcl-selcount{font-size:13px;font-weight:650;color:var(--accent);white-space:nowrap;font-variant-numeric:tabular-nums}
.tcl-selbar .tf-toolbar-divider{margin:6px 2px}
.tcl-chips{flex:none;display:flex;align-items:center;flex-wrap:wrap;gap:6px;padding:6px 12px;border-bottom:1px solid var(--border-soft);background:var(--panel)}
.tcl-chip{display:inline-flex;align-items:center;gap:5px;height:24px;padding:0 3px 0 9px;border:1px solid var(--border);border-radius:12px;background:var(--panel-alt);font-size:12px;max-width:100%;min-width:0}
.tcl-chip-k{color:var(--muted)}
.tcl-chip-v{font-weight:600;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.tcl-chip-x{display:grid;place-items:center;width:18px;height:18px;border:0;border-radius:9px;background:transparent;color:var(--muted);cursor:pointer;padding:0}
.tcl-chip-x:hover{background:color-mix(in srgb,var(--text) 12%,transparent);color:var(--text)}
.tcl-chip-x:focus-visible{outline:none;box-shadow:var(--tf-focus)}

/* Filter popover */
.tcl-filter{position:relative;display:inline-flex}
.tcl-filter-panel{position:absolute;z-index:60;top:calc(100% + 6px);right:0;width:min(470px,calc(100vw - 32px));max-height:min(72vh,560px);overflow:auto;
 background:var(--panel);color:var(--text);border:1px solid var(--border);border-radius:var(--tf-radius);box-shadow:var(--shadow-lg)}
.tcl-filter-head{position:sticky;top:0;z-index:1;display:flex;align-items:center;gap:6px;padding:8px 8px 8px 14px;border-bottom:1px solid var(--border-soft);background:var(--panel)}
.tcl-filter-title{flex:1;font-size:13px;font-weight:650}
.tcl-filter-groups{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 16px;padding:10px 14px 6px}
.tcl-filter-group{border:0;margin:0;padding:0 0 8px;min-width:0}
.tcl-filter-group legend{padding:4px 0 6px;font-size:10.5px;font-weight:600;letter-spacing:.07em;text-transform:uppercase;color:var(--muted)}
.tcl-filter-opt{display:flex;align-items:center;gap:9px;min-height:30px;padding:3px 6px;margin:0 -6px;border-radius:var(--tf-radius-xs);font-size:13px;cursor:pointer}
.tcl-filter-opt:hover{background:var(--panel-alt)}
.tcl-filter-opt input{width:16px;height:16px;margin:0;accent-color:var(--accent);flex:none;cursor:pointer}
.tcl-filter-opt-label{flex:1;min-width:0;line-height:1.35}
.tcl-filter-n{font-size:11.5px;color:var(--muted);font-variant-numeric:tabular-nums}
.tcl-filter-opt.is-zero{opacity:.55}
.tcl-filter-scope{padding:8px 14px 10px;border-top:1px solid var(--border-soft)}

/* ── Case grid ── */
.tcl-listbody{position:relative;background:var(--panel)}
.tcl-grid{min-width:0;outline:none;padding-bottom:8px}
.tcl-grid:focus-visible{box-shadow:inset 0 0 0 2px color-mix(in srgb,var(--accent) 40%,transparent)}
.tcl-row{display:flex;align-items:center;min-width:0}
.tcl-c{flex:0 0 auto;min-width:0;padding:0 8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}
.tcl-c-check{width:42px;padding:0 0 0 10px;display:flex;align-items:center;align-self:stretch}
.tcl-c-id{width:76px}
.tcl-c-title{flex:1 1 auto;display:flex;align-items:center;gap:8px;min-width:120px}
.tcl-c-pri{width:96px}
.tcl-c-type{width:108px;color:var(--muted)}
.tcl-c-auto{width:112px;color:var(--muted)}
.tcl-c-result{width:112px}
.tcl-c-more{width:46px;padding:0 8px 0 4px;display:flex;justify-content:flex-end;overflow:visible}
.tcl-check{display:grid;place-items:center;width:30px;height:30px;margin-left:-6px;border-radius:var(--tf-radius-xs);cursor:pointer}
.tcl-check:hover{background:color-mix(in srgb,var(--text) 7%,transparent)}
.tcl-check input{width:16px;height:16px;margin:0;accent-color:var(--accent);cursor:pointer}
.tcl-check input:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.tcl-headrow{position:sticky;top:0;z-index:4;height:var(--tcl-head-h);background:var(--panel-alt);border-bottom:1px solid var(--border)}
.tcl-headrow .tcl-c{font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.tcl-sort{display:inline-flex;align-items:center;gap:4px;max-width:100%;height:24px;margin-left:-6px;padding:0 6px;border:0;border-radius:var(--tf-radius-xs);background:transparent;color:inherit;font:inherit;letter-spacing:inherit;text-transform:inherit;cursor:pointer;white-space:nowrap}
.tcl-sort:hover{background:color-mix(in srgb,var(--text) 7%,transparent);color:var(--text)}
.tcl-sort:focus-visible{outline:none;box-shadow:var(--tf-focus)}
.tcl-sort.is-active{color:var(--text)}
.tcl-sort-ic{display:inline-grid;width:12px}

.tcl-group{position:sticky;top:var(--tcl-head-h);z-index:3;height:var(--tcl-group-h);background:color-mix(in srgb,var(--panel-alt) 72%,var(--panel));border-bottom:1px solid var(--border);cursor:pointer;user-select:none;-webkit-user-select:none}
.tcl-group+.tcl-group{border-top:0}
.tcl-group:hover{background:var(--panel-alt)}
.tcl-group-cell{display:flex;align-items:center;gap:8px;width:100%;min-width:0;height:100%;padding:0 8px 0 calc(10px + var(--lvl,0) * 20px)}
.tcl-group-chev{flex:none;display:grid;place-items:center;width:24px;height:24px;border:0;border-radius:var(--tf-radius-xs);background:transparent;color:var(--muted);cursor:pointer;padding:0}
.tcl-group-chev:hover{background:color-mix(in srgb,var(--text) 9%,transparent);color:var(--text)}
.tcl-group-chev:focus-visible{outline:none;box-shadow:var(--tf-focus)}
.tcl-group-icon{flex:none;display:grid;color:var(--subtle)}
.tcl-group-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:650;color:var(--text)}
.tcl-group-count{flex:none;font:600 11px/16px Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--muted);background:var(--panel);border:1px solid var(--border);border-radius:10px;padding:0 7px;font-variant-numeric:tabular-nums}
.tcl-group-bar{flex:none;display:block;width:72px}
.tcl-group-bar .tf-resultbar{height:5px}
.tcl-group-actions{margin-left:auto;display:flex;align-items:center;gap:2px;opacity:0;transition:opacity .12s}
.tcl-group:hover .tcl-group-actions,.tcl-group:focus-within .tcl-group-actions{opacity:1}
.tcl-group-actions .btn{color:var(--muted)}

.tcl-case{height:var(--tcl-row-h);border-bottom:1px solid var(--border-soft);background:var(--panel);cursor:pointer;scroll-margin-top:calc(var(--tcl-head-h) + var(--tcl-group-h) + 4px)}
.tcl-case:hover{background:color-mix(in srgb,var(--panel-alt) 70%,var(--panel))}
.tcl-case.is-checked{background:color-mix(in srgb,var(--accent) 6%,var(--panel))}
.tcl-case.is-selected{background:var(--accent-soft);box-shadow:none}
.tcl-case.is-trashed .tcl-title{color:var(--muted)}
.tcl-title{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500;color:var(--text)}
.tcl-case.is-selected .tcl-title{font-weight:600}
.tcl-case.is-selected .tf-id{color:color-mix(in srgb,var(--accent) 50%,var(--text))}
.tcl-ref{flex:none;text-decoration:none}
a.tcl-ref:hover{color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent)}
.tcl-risk{flex:none;height:20px;font-size:10.5px}
.tcl-risk-high,.tcl-risk-critical{color:var(--danger);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--danger) 40%,var(--border))}
.tcl-risk-medium{color:var(--warning);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--warning) 40%,var(--border))}
.tcl-trash-badge{flex:none;height:20px}
.tcl-auto.is-on{color:var(--text)}
.tcl-auto.is-on::before{content:"";display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--accent);margin-right:6px;vertical-align:1px}
.tcl-rowmenu{opacity:0;color:var(--muted)}
.tcl-case:hover .tcl-rowmenu,.tcl-case.is-selected .tcl-rowmenu,.tcl-rowmenu:focus-visible,.tcl-rowmenu[aria-expanded="true"]{opacity:1}
@media (hover:none){.tcl-rowmenu,.tcl-group-actions{opacity:1}}
.tcl-more-row{display:flex;justify-content:center;padding:14px 12px 6px}
.tcl-more-row>div{display:flex;align-items:center;gap:12px}
.tcl-more-note{font-size:12px;color:var(--muted)}

/* Footer */
.tcl-listfoot{gap:6px 10px;flex-wrap:wrap;background:var(--panel)}
.tcl-listfoot strong{color:var(--text);font-weight:600;font-variant-numeric:tabular-nums}
.tcl-foot-sub{color:var(--muted)}
.tcl-kbd-hint{display:inline-flex;align-items:center;gap:2px;color:var(--muted);white-space:nowrap}
.tcl-kbd-hint kbd:not(:first-child){margin-left:8px}
.tcl-kbd-hint kbd+kbd{margin-left:2px}
.tcl-plan{display:inline-flex;align-items:center;gap:8px;color:var(--muted)}
.tcl-plan.is-near{color:var(--warning);font-weight:600}
.tcl-link{border:0;background:none;padding:0;color:var(--accent);font:inherit;font-weight:600;cursor:pointer}
.tcl-link:hover{text-decoration:underline}
.tcl-busy{display:inline-flex;align-items:center;gap:6px;color:var(--accent);font-weight:600}
.tcl-spinner{width:12px;height:12px;border-radius:50%;border:2px solid color-mix(in srgb,var(--accent) 25%,transparent);border-top-color:var(--accent);animation:tcl-spin .8s linear infinite}
@keyframes tcl-spin{to{transform:rotate(360deg)}}

/* Empty / loading */
.tcl-empty{padding:64px 24px;max-width:460px;margin:0 auto}
.tcl-empty p{margin:0}
.tcl-empty-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin-top:8px}
.tcl-empty-actions .btn{margin-top:0}
.tcl-skeleton{padding:4px 0}
.tcl-skel-row{display:flex;align-items:center;gap:16px;height:44px;padding:0 16px;border-bottom:1px solid var(--border-soft)}
.tcl-skel-row span{display:block;height:10px;border-radius:5px;background:var(--panel-alt);animation:tcl-pulse 1.2s ease-in-out infinite}
.tcl-skel-row span:nth-child(1){width:48px}.tcl-skel-row span:nth-child(2){flex:1;max-width:420px}.tcl-skel-row span:nth-child(3){width:64px;margin-left:auto}
@keyframes tcl-pulse{50%{opacity:.45}}

/* Narrow list: drop low-value columns, then two-line rows */
@container tcl-list (max-width: 920px){.tcl-c-auto{display:none}}
@container tcl-list (max-width: 800px){.tcl-c-type{display:none}}
@container tcl-list (max-width: 660px){
 .tcl-c-id{width:66px}.tcl-c-pri{width:88px}.tcl-c-result{width:100px}
 .tcl-view-label,.tcl-selbar .tcl-btn-label,.tcl-filter-btn .tcl-btn-label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
 .tcl-kbd-hint{display:none}
}
@container tcl-list (max-width: 560px){
 .tcl-grid{--tcl-head-h:0px}
 .tcl-headrow{display:none}
 .tcl-case{display:grid;grid-template-columns:42px auto auto minmax(0,1fr) 44px;grid-template-areas:"chk id pri res more" "chk title title title more";
  height:auto;min-height:64px;padding:9px 0;row-gap:6px;align-items:center}
 .tcl-case .tcl-c{padding:0 4px}
 .tcl-case .tcl-c-check{grid-area:chk;width:auto;padding-left:10px;align-self:stretch}
 .tcl-case .tcl-c-id{grid-area:id;width:auto;padding-left:2px}
 .tcl-case .tcl-c-pri{grid-area:pri;width:auto}
 .tcl-case .tcl-c-result{grid-area:res;width:auto;justify-self:start}
 .tcl-case .tcl-c-title{grid-area:title;min-width:0;padding-left:2px;align-items:flex-start;white-space:normal}
 .tcl-case .tcl-title{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;white-space:normal;line-height:1.4}
 .tcl-case .tcl-c-more{grid-area:more;width:auto;align-self:center}
 .tcl-case .tcl-c-type,.tcl-case .tcl-c-auto{display:none}
 .tcl-case .tcl-rowmenu{opacity:1}
 .tcl-group-actions{opacity:1}
 .tcl-group-bar{width:48px}
 .tcl-selbar .tcl-selall,.tcl-selbar .tf-toolbar-divider,.tcl-selbar .tf-btn-caret{display:none}
 .tcl-selbar{gap:4px;flex-wrap:nowrap}
 .app-shell .tcl-selbar .btn.small{padding:0 9px}
}

@container tcl-list (max-width: 360px){.tcl-group-bar{display:none}}

/* ── Inspector ── */
.tcl .tcl-inspector{min-width:0;outline:none}
.tcl-insp-head{gap:4px;padding:6px 8px 6px 10px;min-height:48px}
.tcl-insp-nav{display:flex;align-items:center;gap:2px;min-width:0}
.tcl-insp-pos{margin-left:6px;font-size:12px;color:var(--muted);white-space:nowrap;font-variant-numeric:tabular-nums}
.tcl-insp-head .btn.icon{color:var(--muted)}
.tcl-insp-head .btn.icon:hover:not(:disabled){color:var(--text)}
.tcl-insp-body{overscroll-behavior:contain}
/* The pane head already carries Open full page / Close for the inspector. */
.tcl-inspector .tcd-head-tools{display:none}
.tcl .tcl-inspector.is-overlay{position:absolute;top:0;right:0;bottom:0;z-index:31;max-width:calc(100% - 24px);box-shadow:var(--shadow-lg);animation:tcl-sheet-in .18s ease-out}
.tcl-insp-backdrop{position:absolute;inset:0;z-index:30;background:var(--tcl-scrim);animation:tcl-fade-in .18s ease-out}
@keyframes tcl-sheet-in{from{transform:translateX(24px);opacity:.4}}
@keyframes tcl-fade-in{from{opacity:0}}

/* Row / tree command menu (portal) */
.tf-menu-list.tcl-pop{position:fixed;z-index:130;max-height:min(70vh,420px);overflow:auto}

/* ── Dialogs ── */
.media-lightbox.tcl-modal-overlay{z-index:120;padding:24px;background:var(--tcl-scrim-strong)}
.tcl-modal{width:min(520px,100%);max-height:calc(100dvh - 48px);display:flex;flex-direction:column;background:var(--panel);color:var(--text);
 border:1px solid var(--border);border-radius:calc(var(--tf-radius) + 2px);box-shadow:var(--shadow-lg);overflow:hidden;font-size:13px;margin:0;animation:tcl-pop-in .16s ease-out}
.tcl-modal.is-sm{width:min(440px,100%)}
.tcl-modal.is-md{width:min(580px,100%)}
.tcl-modal.is-lg{width:min(700px,100%)}
@keyframes tcl-pop-in{from{transform:translateY(6px);opacity:.5}}
.tcl-modal-head{flex:none;display:flex;align-items:flex-start;gap:12px;padding:16px 14px 14px 20px;border-bottom:1px solid var(--border-soft)}
.tcl-modal-titles{flex:1;min-width:0}
.tcl-modal-title{margin:0;display:flex;align-items:center;gap:8px;font-size:16px;font-weight:650;letter-spacing:-.01em;line-height:1.3;color:var(--text)}
.tcl-modal-title .tf-icon{color:var(--accent)}
.tcl-modal-sub{margin:4px 0 0;font-size:13px;line-height:1.5;color:var(--muted)}
.tcl-modal-head .btn.icon{margin-top:-2px;color:var(--muted)}
.tcl-modal-body{flex:1 1 auto;min-height:0;overflow:auto;padding:16px 20px 18px;display:flex;flex-direction:column;gap:14px;overscroll-behavior:contain}
.tcl-modal-foot{flex:none;display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:12px 20px;border-top:1px solid var(--border-soft);background:var(--panel-alt)}
.tcl-modal-section{display:flex;flex-direction:column;gap:12px}
.tcl-modal-section+.tcl-modal-section{border-top:1px solid var(--border-soft);padding-top:16px}
.tcl-modal-section-title{margin:0;display:flex;align-items:baseline;gap:8px;font-size:11px;font-weight:600;letter-spacing:.07em;text-transform:uppercase;color:var(--muted)}
.tcl-optional{font-size:11px;font-weight:500;letter-spacing:0;text-transform:none;color:var(--muted)}
.tcl-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 14px}
.tcl-form-grid>.full{grid-column:1/-1}
.tcl-field{display:flex;flex-direction:column;gap:6px;min-width:0}
.tcl-field-label{font-size:12.5px;font-weight:600;color:var(--text)}
.tcl-req{color:var(--danger)}
.tcl-field-hint{margin:0;font-size:12px;line-height:1.45;color:var(--muted)}
.tcl-field-error{margin:0;font-size:12px;font-weight:500;color:var(--danger)}
.app-shell .tcl-modal :is(.input,.select,.textarea),.tcl-modal :is(.input,.select,.textarea){width:100%;min-width:0}
.tcl-modal .input[aria-invalid="true"]{border-color:var(--danger)}
.tcl-modal .textarea{resize:vertical;min-height:64px;font-family:inherit}
.tcl-upper{text-transform:uppercase}
.tcl-upper::placeholder{text-transform:none}
.tcl-inline-row{display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px}
.tcl-status-text{font-size:12px;color:var(--muted);min-width:0;overflow-wrap:anywhere}
.tcl-note{display:flex;align-items:flex-start;gap:8px;margin:0;padding:9px 12px;border-radius:var(--tf-radius-sm);background:var(--panel-alt);border:1px solid var(--border-soft);font-size:12.5px;line-height:1.45;color:var(--muted)}
.tcl-note .tf-icon{margin-top:1px;color:var(--accent)}
.tcl-note.is-error{color:var(--danger);background:var(--danger-soft);border-color:color-mix(in srgb,var(--danger) 30%,var(--border))}
.tcl-note.is-error .tf-icon{color:var(--danger)}
.tcl-note-body{display:flex;flex-direction:column;gap:8px;min-width:0;overflow-wrap:anywhere}
/* TestForge free AI: allowance meter (AI dialog, Settings → AI) and the
   actions under a limit message. */
.tcl-free-ai{gap:8px}
.tf-ai-meter{display:flex;align-items:center;gap:10px;min-width:0;font-size:12.5px;line-height:1.4;color:var(--text)}
.tf-ai-meter-bar{flex:0 0 88px;height:6px;overflow:hidden;border-radius:3px;background:var(--panel-alt);box-shadow:inset 0 0 0 1px var(--border-soft)}
.tf-ai-meter-bar>span{display:block;height:100%;border-radius:3px;background:var(--accent)}
.tf-ai-meter.is-low .tf-ai-meter-bar>span{background:var(--st-retest)}
.tf-ai-meter.is-empty .tf-ai-meter-text{color:var(--danger)}
.tf-ai-meter-text{min-width:0;overflow-wrap:anywhere}
.tf-ai-limit-actions{display:flex;flex-wrap:wrap;gap:8px}
.tcl-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.tcl-choice{display:flex;align-items:flex-start;gap:10px;padding:12px;border:1px solid var(--border);border-radius:var(--tf-radius);cursor:pointer;background:var(--panel)}
.tcl-choice:hover{border-color:color-mix(in srgb,var(--text) 25%,var(--border))}
.tcl-choice.is-on{border-color:var(--accent);background:var(--accent-soft);box-shadow:inset 0 0 0 1px var(--accent)}
.tcl-choice input{margin:2px 0 0;accent-color:var(--accent);flex:none}
.tcl-choice-text{display:flex;flex-direction:column;gap:4px;font-size:12.5px;line-height:1.45;color:var(--muted)}
.tcl-choice-text strong{font-size:13px;color:var(--text)}
.tcl-drop{display:flex;flex-direction:column;align-items:center;gap:6px;padding:26px 16px;border:1.5px dashed var(--border);border-radius:var(--tf-radius);background:var(--panel-alt);text-align:center;cursor:pointer;transition:border-color .15s,background-color .15s}
.tcl-drop:hover,.tcl-drop.is-over{border-color:var(--accent);background:var(--accent-soft)}
.tcl-drop:focus-within{border-color:var(--accent);box-shadow:var(--tf-focus)}
.tcl-drop.has-file{border-style:solid;border-color:color-mix(in srgb,var(--accent) 50%,var(--border));background:var(--accent-soft)}
.tcl-drop-icon{display:grid;place-items:center;width:40px;height:40px;border-radius:10px;background:var(--panel);color:var(--accent);border:1px solid var(--border)}
.tcl-drop-title{font-size:13.5px;font-weight:600;color:var(--text);overflow-wrap:anywhere}
.tcl-drop-sub{font-size:12px;color:var(--muted)}
.tcl-formats{font-size:12.5px;color:var(--muted);line-height:1.5}
.tcl-formats-title{font-size:11px;font-weight:600;letter-spacing:.07em;text-transform:uppercase;color:var(--muted);margin-bottom:4px}
.tcl-formats ul{margin:0;padding-left:18px}
.tcl-formats strong{color:var(--text);font-weight:600}
.tcl-template-btn{align-self:flex-start}
.tcl-shots{display:flex;flex-wrap:wrap;gap:8px}
.tcl-shot{position:relative;width:88px;height:62px;border-radius:var(--tf-radius-sm);border:1px solid var(--border);overflow:hidden;background:var(--panel-alt)}
.tcl-shot img{width:100%;height:100%;object-fit:cover;display:block}
.tcl-shot-x{position:absolute;top:3px;right:3px;display:grid;place-items:center;width:20px;height:20px;border:0;border-radius:10px;background:color-mix(in srgb,var(--text) 70%,transparent);color:var(--panel);cursor:pointer;padding:0}
.tcl-shot-add{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;width:88px;height:62px;border:1.5px dashed var(--border);border-radius:var(--tf-radius-sm);color:var(--muted);font-size:12px;cursor:pointer}
.tcl-shot-add:hover,.tcl-shot-add:focus-within{border-color:var(--accent);color:var(--accent)}
.tcl-scenarios{max-height:240px;overflow:auto;border:1px solid var(--border);border-radius:var(--tf-radius-sm)}
.tcl-scenario{display:flex;align-items:center;gap:10px;padding:8px 12px;border-bottom:1px solid var(--border-soft);cursor:pointer;font-size:13px}
.tcl-scenario:last-child{border-bottom:0}
.tcl-scenario:hover{background:var(--panel-alt)}
.tcl-scenario input{accent-color:var(--accent);margin:0;flex:none}
.tcl-scenario .tf-badge{flex:none}
.tcl-scenario-title{min-width:0;line-height:1.4}
.tcl-scenario:not(.is-on) .tcl-scenario-title{color:var(--muted)}

/* ── Phones (≤900): list only, sections as a select, full-screen inspector ── */
@media (max-width:900px){
 .tcl-head-actions .tcl-wide{display:none}
 .tcl-head-actions .tcl-narrow{display:inline-flex}
 .tcl.tf-workbench{background:transparent}
 .tcl-list{border:1px solid var(--border);border-radius:var(--tf-radius);background:var(--panel)}
 .tcl-list>.tf-pane-head{border-radius:var(--tf-radius) var(--tf-radius) 0 0}
 .tcl-list>.tf-pane-foot{border-radius:0 0 var(--tf-radius) var(--tf-radius)}
 .tcl-listbody{background:transparent}
 .tcl-listhead{padding:10px}
 .tcl-section-select{display:flex}
 .tcl-listhead .tcl-tree-toggle{display:none}
 .tcl-search{flex:1 1 160px;max-width:none}
 .app-shell .tcl-search .input{height:40px;min-height:40px;font-size:16px}
 .tcl-group{position:static}
 .tcl-headrow{position:static}
 .tcl-case{scroll-margin-top:120px}
 .tcl-check{width:40px;height:40px}
 .tcl-check input{width:18px;height:18px}
 .tcl-listfoot{padding:10px 12px}
 .tcl .tf-pane.tcl-inspector.is-overlay{position:fixed;inset:0;z-index:95;width:auto;max-width:none;border:0;box-shadow:none;animation:tcl-sheet-up .2s ease-out}
 .tcl .tcl-inspector .tf-pane-body{overflow:auto;padding-bottom:env(safe-area-inset-bottom,0px)}
 .tcl-insp-head{padding-top:calc(6px + env(safe-area-inset-top,0px));min-height:56px}
 .tcl-insp-head .btn.icon.small{width:40px;min-height:40px}
 .tcl-insp-backdrop{display:none}
 body:has(.tcl .tcl-inspector){overflow:hidden}
}
@keyframes tcl-sheet-up{from{transform:translateY(24px);opacity:.4}}
@media (max-width:540px){
 .media-lightbox.tcl-modal-overlay{padding:0;align-items:end;place-items:end stretch}
 .tcl-modal,.tcl-modal.is-sm,.tcl-modal.is-md,.tcl-modal.is-lg{width:100%;max-height:calc(100dvh - 16px);border-radius:14px 14px 0 0;border-bottom:0}
 .tcl-modal-foot{padding-bottom:calc(12px + env(safe-area-inset-bottom,0px));flex-wrap:wrap}
 .tcl-modal-foot .btn{flex:1 1 auto}
 .tcl-modal-foot .tf-toolbar-spacer{display:none}
 .tcl-form-grid,.tcl-choices{grid-template-columns:1fr}
 .tcl-filter-panel{position:fixed;left:12px;right:12px;top:auto;bottom:calc(76px + env(safe-area-inset-bottom,0px));width:auto;max-height:70vh}
 .tcl-filter-groups{grid-template-columns:1fr}
}
@media (prefers-reduced-motion:reduce){
 .tcl .tcl-inspector,.tcl-insp-backdrop,.tcl-modal,.tcl-skel-row span,.tcl-spinner{animation:none}
}
/* Phones: search · chips · sticky groups · two-line rows · FAB / selection bar */
@media(max-width:900px){
 .tcl-m{display:flex;flex-direction:column}
 .tcl-m-group{top:calc(var(--tf-phone-bar-height,56px) + env(safe-area-inset-top,0px));margin:0 -14px}
 .tcl-m-list{border-top:0}
 .tcl-m-row{min-height:76px;align-items:center}
 .tcl-m-top{gap:6px}
 .tcl-m-top .tf-ref{max-width:40%}
 .tcl-m-check{width:24px;height:24px;border-radius:6px;border:2px solid var(--border);background:var(--panel);color:var(--panel)}
 .tcl-m-check.is-on{background:var(--accent);border-color:var(--accent)}
 .tcl-m-more{margin:14px auto 0;min-height:44px}
 .tcl-m-empty{margin-top:8px}
 .tcl-m.is-selecting .tf-content{padding-bottom:96px}
 .tcl-m-selbar{gap:8px}
 .tcl-m-selbar .tcl-m-selcount{flex:1 1 auto;font-weight:650;font-size:15px;color:var(--text)}
 .tcl-m-selbar .btn{flex:0 0 auto;padding:0 14px}
 .tcl-m-selbar .tf-menu .btn{width:46px}
 .tcl-m-selbar .tcl-m-move .btn{width:auto}
 /* Filter sheets */
 .tcl-m-options{display:flex;flex-direction:column}
 .tcl-m-option{display:flex;align-items:center;gap:12px;min-height:52px;border-bottom:1px solid var(--border-soft);cursor:pointer}
 .tcl-m-option:last-child{border-bottom:0}
 .tcl-m-option-label{flex:1;font-size:15px;color:var(--text)}
 .tcl-m-option .tf-badge{margin-right:auto}
 .tcl-m-option-count{margin-left:auto;font-size:13px;color:var(--muted);font-variant-numeric:tabular-nums}
 .tcl-m-tree{display:flex;flex-direction:column;margin:0 -20px}
 .tcl-m-treerow{display:flex;align-items:center;gap:10px;min-height:52px;padding:0 20px 0 16px;border:0;border-bottom:1px solid var(--border-soft);background:transparent;color:var(--text);font:500 15px/1.3 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;text-align:left;cursor:pointer}
 .tcl-m-treerow .tf-icon{color:var(--muted);flex:none}
 .tcl-m-treerow.is-on{background:var(--accent-soft);color:var(--accent);font-weight:650}
 .tcl-m-treerow.is-on .tf-icon{color:var(--accent)}
 .tcl-m-treename{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
}

.tcl-c-title .bt-ind-wrap{margin-left:6px}
/* @endregion cases-list */



/* @region case-detail — case view, editor and case sub-panels */
/* Case detail (.tcd) renders in the Test Cases inspector (variant
   "inspector") and as a full page (cases?case=<id>, variant "page"). The
   editor (.tce) is the full-page form at cases?action=new|edit. Layout
   adapts to the space the workspace gives it (container queries), so it
   works with the sidebar expanded, collapsed to the rail, or on phones. */
.tcd{container:tcd/inline-size;position:relative;min-width:0;color:var(--text);font-size:13px;line-height:1.55}
.tcd-grid{display:grid;grid-template-columns:minmax(0,1fr);grid-template-areas:"head" "aside" "main";align-items:start}
.tcd-area-head{grid-area:head;min-width:0}
.tcd-aside{grid-area:aside;min-width:0}
.tcd-area-main{grid-area:main;min-width:0}
.tcd--page{min-height:100%;display:flex;flex-direction:column}
.tcd--page>.tcd-grid{flex:1 0 auto;grid-template-rows:auto auto 1fr}
.tcd--page .tcd-area-head{padding:24px 32px 0}
.tcd--page .tcd-aside{padding:0 32px 8px}
.tcd--page .tcd-area-main{padding:0 32px 48px}
.tcd--inspector .tcd-area-head{padding:16px 20px 0}
.tcd--inspector .tcd-aside{padding:0 20px 4px}
.tcd--inspector .tcd-area-main{padding:0 20px 32px}
@container tcd (min-width: 880px){
 .tcd--page .tcd-grid{grid-template-columns:minmax(0,1fr) 320px;grid-template-rows:auto 1fr;grid-template-areas:"head aside" "main aside"}
 .tcd--page .tcd-aside{grid-row:1 / span 2;align-self:stretch;padding:0;border-left:1px solid var(--border);background:var(--panel-alt)}
 .tcd--page .tcd-aside-inner{position:sticky;top:0;padding:20px 20px 32px}
 .tcd--page .tcd-area-head{padding:28px 32px 0}
 .tcd--page .tcd-details{border:0;border-radius:0;padding:0 0 12px;margin:0}
 .tcd.tcd--page .tcd-details .tcd-meta>dt,.tcd.tcd--page .tcd-details .tcd-meta>dd{border-bottom:1px solid var(--border-soft);min-height:40px;padding-top:4px;padding-bottom:4px}
 .tcd.tcd--page .tcd-meta{grid-template-columns:minmax(88px,max-content) minmax(0,1fr)}
 .tcd--page .tcd-relations--aside{display:block}
 .tcd--page .tcd-relations--content{display:none}
}
@container tcd (min-width: 1240px){
 .tcd--page .tcd-grid{grid-template-columns:minmax(0,1fr) 360px}
 .tcd--page .tcd-area-head,.tcd--page .tcd-area-main{padding-left:40px;padding-right:40px}
}

/* Header: ID + section path, title, badges, actions */
.tcd-head{display:flex;flex-direction:column;gap:10px;padding-bottom:16px}
.tcd-head-top{display:flex;align-items:center;gap:10px;min-width:0;min-height:30px}
.tcd .tcd-id{font-size:13px}
.tcd-path{display:inline-flex;align-items:center;gap:6px;min-width:0;color:var(--muted);font-size:12px}
.tcd-path .tf-icon{color:var(--subtle)}
.tcd-path-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.tcd-path-sep{margin:0 6px;color:var(--subtle)}
.tcd-head-tools{margin-left:auto;display:flex;gap:2px;flex:none}
.tcd-head-row{display:flex;flex-wrap:wrap;align-items:flex-start;gap:12px 24px}
.tcd-head-main{flex:1 1 360px;min-width:0;display:flex;flex-direction:column;gap:10px}
.tcd .tcd-title{margin:0;font-size:21px;line-height:1.3;font-weight:650;letter-spacing:-.02em;color:var(--text);overflow-wrap:anywhere}
.tcd--inspector .tcd-title{font-size:18px}
.tcd-badges{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.tcd-review-badge.is-approved{color:var(--success)}
.tcd-review-badge.is-rejected{color:var(--danger)}
.tcd-review-badge.is-in_review{color:var(--warning)}
.tcd-actions{display:flex;align-items:center;gap:8px;flex:0 0 auto;flex-wrap:wrap}
.tcd--inspector .tcd-actions{flex-basis:100%}
.tcd-notice{display:flex;align-items:center;flex-wrap:wrap;gap:8px 10px;padding:10px 12px;border:1px solid color-mix(in srgb,var(--warning) 35%,var(--border));background:var(--warning-soft);color:var(--text);border-radius:var(--tf-radius-sm);font-size:13px}
.tcd-notice>.tf-icon{color:var(--warning)}
.tcd-notice>span{flex:1 1 220px;min-width:0}

/* Details (properties) */
.tcd-details{padding:0 0 12px}
.tcd .tcd-side-title{margin:0 0 4px;font-size:11px;font-weight:600;letter-spacing:.07em;text-transform:uppercase;color:var(--muted);display:flex;align-items:center;gap:6px;line-height:1.4}
.tcd-collapse{border:0;background:none;padding:8px 0;cursor:pointer;width:100%;text-align:left;font-family:inherit;border-radius:var(--tf-radius-xs)}
.tcd-collapse:hover{color:var(--text)}
.tcd-collapse:focus-visible{outline:none;box-shadow:var(--tf-focus)}
.tcd-details{border:1px solid var(--border);border-radius:var(--tf-radius);padding:2px 14px 6px;margin-bottom:8px}
.tcd-details.is-collapsed{padding-bottom:2px}
.tcd .tcd-details .tcd-meta>dt,.tcd .tcd-details .tcd-meta>dd{border-bottom:0;min-height:36px;padding-top:2px;padding-bottom:2px}
.tcd--page .tcd-details>.tcd-side-title{padding-top:10px}
.tcd-relations--aside{display:none}
.tcd .tcd-meta{grid-template-columns:minmax(88px,max-content) minmax(0,1fr)}
.tcd .tcd-meta>dt,.tcd .tcd-meta>dd{display:flex;align-items:center;min-height:40px;padding-top:4px;padding-bottom:4px}
.tcd .tcd-meta>dt label{cursor:pointer}
.tcd-meta-result{display:inline-flex;align-items:center;gap:8px;min-width:0;max-width:100%}
.tcd-meta-link{color:var(--text);font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;text-decoration:none}
.tcd-meta-link:hover{color:var(--accent);text-decoration:underline}
.tcd-refs{display:flex;flex-wrap:wrap;gap:4px}
.tcd-ref{display:inline-flex;align-items:center;gap:4px;min-width:0}
.tcd-ref-status{font-size:11px}
a.tf-ref{text-decoration:none}
a.tf-ref:hover{color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent-mid,var(--accent))}
.tcd-break{overflow-wrap:anywhere;white-space:pre-wrap}
@container tcd (min-width: 500px){
 .tcd .tcd-meta{grid-template-columns:max-content minmax(0,1fr) max-content minmax(0,1fr);column-gap:14px}
 .tcd .tcd-meta>dd.is-wide{grid-column:2 / -1}
}
.tcd-links-group{display:flex;flex-direction:column;align-items:flex-start;gap:8px;min-width:0;width:100%}
.tcd-links-group>.tcd-links+.tcd-links{margin-top:0}

/* Inline property select (CasePropSelect) */
.tcd-prop{position:relative;display:inline-flex;align-items:center;max-width:100%;min-width:0;color:var(--muted)}
.tcd-prop-select{-webkit-appearance:none;appearance:none;border:1px solid transparent;background:transparent;color:var(--text);font:500 13px/1.2 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;height:30px;padding:0 26px 0 8px;margin-left:-9px;border-radius:var(--tf-radius-sm);cursor:pointer;max-width:calc(100% + 9px);min-width:0;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}
.tcd-prop-select:hover{background:var(--panel);border-color:var(--border)}
.tcd-prop-select:focus-visible{outline:none;border-color:var(--accent);box-shadow:var(--tf-focus)}
.tcd-prop-select option,.tcd-prop-select optgroup{background:var(--panel);color:var(--text)}
.tcd-prop-caret{position:absolute;right:6px;top:50%;transform:translateY(-50%);color:var(--subtle);pointer-events:none;display:grid}
.tcd-prop.is-empty .tcd-prop-select{color:var(--muted)}
.tcd-prop-dot{position:absolute;left:1px;top:50%;width:8px;height:8px;margin-top:-4px;border-radius:50%;background:currentColor;pointer-events:none}
.tcd-prop:has(.tcd-prop-dot) .tcd-prop-select{padding-left:22px}
.tcd-pri.is-critical{color:var(--pri-critical)}.tcd-pri.is-high{color:var(--pri-high)}.tcd-pri.is-medium{color:var(--pri-medium)}.tcd-pri.is-low{color:var(--pri-low)}
.tcd-review.is-draft{color:var(--st-untested)}.tcd-review.is-in_review{color:var(--warning)}.tcd-review.is-approved{color:var(--success)}.tcd-review.is-rejected{color:var(--danger)}

/* Tags, dependencies, links */
.tcd-rel{padding:14px 0 16px;border-top:1px solid var(--border-soft)}
.tcd-rel .tcd-side-title{margin-bottom:10px}
.tcd--inspector .tcd-relations{margin-top:4px}
.tcd-chips{display:flex;flex-wrap:wrap;align-items:center;gap:6px;min-width:0}
.tcd-chip{display:inline-flex;align-items:center;gap:6px;max-width:100%;min-width:0;height:26px;padding:0 3px 0 8px;border:1px solid var(--border);border-radius:var(--tf-radius-xs);background:var(--panel);font-size:12px;color:var(--text)}
.tcd-chip>.tf-icon{color:var(--muted)}
.tcd-chip .tf-id{font-size:11px;text-decoration:none}
.tcd-chip a.tf-id:hover{text-decoration:underline}
.tcd-chip .tf-ref{height:18px;box-shadow:none;background:var(--panel-alt)}
.tcd-chip-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;max-width:240px;color:var(--text);text-decoration:none}
a.tcd-chip-text:hover{color:var(--accent);text-decoration:underline}
.tcd-chip-x{flex:none;border:0;background:none;color:var(--subtle);width:20px;height:20px;border-radius:3px;display:grid;place-items:center;cursor:pointer;padding:0}
.tcd-chip-x:hover{background:var(--danger-soft);color:var(--danger)}
.tcd-chip-x:focus-visible{outline:none;box-shadow:var(--tf-focus)}
.tcd-chip-input{border:1px dashed var(--border);background:transparent;color:var(--text);height:26px;border-radius:var(--tf-radius-xs);padding:0 8px;font:400 12px/1 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;width:120px;min-width:0}
.tcd-chip-input::placeholder{color:var(--subtle)}
.tcd-chip-input:focus{outline:none;border-style:solid;border-color:var(--accent);box-shadow:var(--tf-focus)}
.tcd-deps{display:flex;flex-direction:column;gap:10px}
.tcd-deps-row{display:flex;align-items:flex-start;gap:8px;min-width:0}
.tcd-deps-row>.tcd-chips{min-height:26px}
.tcd-deps-label{flex:none;width:72px;padding-top:4px;font-size:12px;color:var(--muted)}
.tcd-inline-form{display:flex;flex-wrap:wrap;align-items:center;gap:6px;min-width:0;width:100%}
.tcd .tcd-input-sm,.tce .tcd-input-sm{flex:1 1 160px;min-width:0;width:auto;height:30px;min-height:30px;padding:0 8px;font-size:13px;border-radius:var(--tf-radius-sm)}
.tcd .tcd-inline-error,.tce .tcd-inline-error,.tcd-modal .tcd-inline-error{display:flex;align-items:center;gap:6px;color:var(--danger);font-size:12px;line-height:1.4;margin-top:4px}
.tcd-links{display:flex;flex-direction:column;align-items:flex-start;gap:8px;min-width:0}
.tcd-links+.tcd-links{margin-top:10px}
.tcd-links>.btn.ghost,.tcd-attach>.btn.ghost{margin-left:-10px}

/* Tabs and content sections */
.tcd-tabs{margin:0;background:var(--panel)}
.tcd-tab-count{display:inline-block;margin-left:6px;min-width:18px;padding:2px 6px;border-radius:9px;background:var(--panel-alt);box-shadow:inset 0 0 0 1px var(--border);color:var(--muted);font:600 11px/1.2 Inter,sans-serif;text-align:center}
.tf-tab.active .tcd-tab-count{background:var(--accent-soft);color:var(--accent);box-shadow:none}
.tcd-tabpanel{padding-top:4px}
.tcd-sec{padding:18px 0;border-bottom:1px solid var(--border-soft)}
.tcd-sec:last-child{border-bottom:0}
.tcd-sec-head{display:flex;align-items:center;gap:8px;margin-bottom:10px;min-height:24px}
.tcd .tcd-sec-title{margin:0;display:flex;align-items:center;gap:8px;font-size:13px;font-weight:650;color:var(--text);letter-spacing:-.005em}
.tcd-sec-title>.tf-icon{color:var(--muted)}
.tcd-sec-actions{margin-left:auto;display:flex;gap:6px}
.tcd-prose{white-space:pre-wrap;overflow-wrap:anywhere;color:var(--text);line-height:1.6}
.tcd-prose a,.tcd-step a{color:var(--accent)}
.tcd .tcd-empty-line{color:var(--muted);font-size:13px;line-height:1.5;padding:2px 0}
.tcd-muted{color:var(--muted)}
.tcd-linkbtn{border:0;background:none;padding:0;color:var(--accent);font:inherit;font-weight:600;cursor:pointer;text-decoration:underline;text-underline-offset:2px}
.tcd-linkbtn:focus-visible{outline:none;box-shadow:var(--tf-focus);border-radius:2px}

/* Steps: stacked in narrow spaces, a two-column table when there is room */
.tcd-steps-wrap{container:tcdsteps/inline-size;border:1px solid var(--border);border-radius:var(--tf-radius);overflow:hidden;background:var(--panel)}
.tcd-steps-head{display:none}
.tcd-steps{list-style:none;margin:0;padding:0}
.tcd-step{display:grid;grid-template-columns:24px minmax(0,1fr);column-gap:12px;row-gap:8px;padding:12px 14px;border-top:1px solid var(--border-soft)}
.tcd-step:first-child{border-top:0}
.tcd-step-n{grid-row:1 / span 2;align-self:start;display:inline-grid;place-items:center;width:24px;height:24px;border-radius:6px;background:var(--panel-alt);box-shadow:inset 0 0 0 1px var(--border);color:var(--text);font:600 12px/1 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-variant-numeric:tabular-nums}
.tcd-step-action{grid-column:2;white-space:pre-wrap;overflow-wrap:anywhere;padding-top:2px;color:var(--text)}
.tcd-step-exp{grid-column:2;display:flex;flex-direction:column;gap:2px;white-space:pre-wrap;overflow-wrap:anywhere;color:var(--text);padding:7px 10px;background:var(--panel-alt);border-radius:var(--tf-radius-sm)}
.tcd-step-exp.is-empty{display:none}
.tcd-step-exp-label{font-size:10.5px;font-weight:600;color:var(--muted);text-transform:uppercase;letter-spacing:.06em;line-height:1.4}
@container tcdsteps (min-width: 600px){
 .tcd-steps-head{display:grid;grid-template-columns:24px minmax(0,1.1fr) minmax(0,1fr);column-gap:16px;padding:8px 14px;background:var(--panel-alt);border-bottom:1px solid var(--border);font-size:11px;font-weight:600;color:var(--muted);text-transform:uppercase;letter-spacing:.06em}
 .tcd-step{grid-template-columns:24px minmax(0,1.1fr) minmax(0,1fr);column-gap:16px}
 .tcd-step-n{grid-row:auto}
 .tcd-step-exp{grid-column:3;grid-row:1;background:none;padding:2px 0 0;border-radius:0}
 .tcd-step-exp.is-empty{display:flex}
 .tcd-step-exp-label{display:none}
}

/* Attachments, Figma import, automation script */
.tcd-attach{display:flex;flex-direction:column;align-items:flex-start;gap:12px;border-radius:var(--tf-radius)}
.tcd-attach.is-over{outline:2px dashed var(--accent);outline-offset:6px;background:var(--accent-soft)}
.tcd-attach-grid{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:10px;width:100%}
.tcd-attach-item{position:relative;border:1px solid var(--border);border-radius:var(--tf-radius);background:var(--panel);padding:6px;min-width:0}
.tcd-attach-item:hover{border-color:color-mix(in srgb,var(--text) 22%,var(--border))}
.tcd-attach-item:focus-within{border-color:var(--accent)}
.tcd-attach-open{display:flex;flex-direction:column;gap:6px;width:100%;border:0;background:none;padding:0;cursor:pointer;text-align:left;min-width:0;color:var(--text);font:inherit}
.tcd-attach-open:focus-visible{outline:none;box-shadow:var(--tf-focus);border-radius:4px}
.tcd .tcd-attach-item .btn.tcd-attach-del{position:absolute;top:10px;right:10px;background:var(--panel);border-color:var(--border);color:var(--muted);opacity:0}
.tcd .tcd-attach-item .btn.tcd-attach-del:hover:not(:disabled){color:var(--danger);background:var(--danger-soft);border-color:var(--danger)}
.tcd .tcd-attach-item:hover .btn.tcd-attach-del,.tcd .tcd-attach-item .btn.tcd-attach-del:focus-visible{opacity:1}
@media(hover:none){.tcd .tcd-attach-item .btn.tcd-attach-del{opacity:1}}
.tcd-upload:focus-within{box-shadow:var(--tf-focus)}
.tcd-upload.is-busy{cursor:progress;opacity:.75}
.tcd-attach-thumb{display:grid;place-items:center;aspect-ratio:16/10;border-radius:4px;background:var(--panel-alt);overflow:hidden;color:var(--muted)}
.tcd-attach-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.tcd-attach-name{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0 2px 2px}
.tcd-figma{width:100%;display:flex;flex-direction:column;gap:8px;padding:12px;border:1px solid var(--border);border-radius:var(--tf-radius);background:var(--panel-alt)}
.tcd-field-label{font-size:12px;font-weight:600;color:var(--text)}
.tcd-figma-frames{display:flex;flex-direction:column;align-items:flex-start;gap:6px;max-height:260px;overflow:auto;padding:8px 10px;border:1px solid var(--border);border-radius:var(--tf-radius-sm);background:var(--panel)}
.tcd-check{display:flex;align-items:center;gap:8px;font-size:13px;min-width:0;max-width:100%;cursor:pointer}
.tcd-script{display:flex;flex-direction:column;gap:10px}
.tcd .tcd-script .tcd-input-sm{flex:0 1 280px}
.tcd-code{border:1px solid var(--border);border-radius:var(--tf-radius);overflow:hidden;min-width:0}
.tcd-code-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:3px 4px 3px 12px;background:var(--panel-alt);border-bottom:1px solid var(--border);font-size:12px;color:var(--muted)}
.tcd-code pre{margin:0;padding:12px 14px;max-height:420px;overflow:auto;font:12px/1.55 var(--tf-font-mono);color:var(--text);background:var(--panel);white-space:pre;tab-size:2}
.tcd-code pre:focus-visible{outline:none;box-shadow:inset var(--tf-focus)}

/* History lists (runs, versions) and comments */
.tcd-list{list-style:none;margin:0;padding:0}
.tcd-list-row{display:flex;align-items:flex-start;gap:12px;padding:10px 0;border-top:1px solid var(--border-soft);min-width:0}
.tcd-list-row:first-child{border-top:0;padding-top:2px}
.tcd-list-row>.tf-badge{flex:none;margin-top:1px;min-width:76px}
.tcd-list-main{flex:1 1 auto;min-width:0}
.tcd-list-title{display:block;font-weight:600;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration:none}
a.tcd-list-title:hover{color:var(--accent);text-decoration:underline}
.tcd .tcd-list-meta,.tcd-modal .tcd-list-meta{font-size:12px;color:var(--muted);margin-top:2px;line-height:1.4}
.tcd-list-note{font-size:12px;color:var(--text);margin-top:6px;padding-left:8px;border-left:2px solid var(--border);overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;white-space:pre-wrap}
.tcd-thumbs{display:flex;gap:4px;margin-top:6px;flex-wrap:wrap}
.tcd-thumbs img{width:48px;height:32px;object-fit:cover;border-radius:4px;border:1px solid var(--border);display:block}
.tcd-list-row>.tf-ref{flex:none;margin-top:1px}
.tcd-list-row>.btn{flex:none;margin-top:-4px}
.tcd-version-n{flex:none;min-width:30px;font:600 12px/22px var(--tf-font-mono);color:var(--muted)}
.tcd-more{margin-top:8px}
.tcd-comments{display:flex;flex-direction:column;gap:14px}
.tcd-comment-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:16px}
.tcd-comment{display:flex;gap:10px;min-width:0}
.tcd-avatar{flex:none;width:28px;height:28px;border-radius:50%;background:var(--accent-soft);color:var(--accent);font:600 11px/28px Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;text-align:center}
.tcd-comment-main{flex:1;min-width:0}
.tcd-comment-head{display:flex;align-items:center;gap:8px;min-height:28px}
.tcd-comment-head .tcd-list-meta{margin-top:0}
.tcd-comment-author{font-weight:600}
.tcd-comment-del{margin-left:auto;color:var(--subtle)}
.tcd-comment-body{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.55}
.tcd-comment-body .mention{color:var(--accent);font-weight:600}
.tcd-compose{display:flex;flex-direction:column;gap:6px}
.tcd .tcd-textarea{min-height:76px;font-family:inherit;font-size:13px;line-height:1.5;resize:vertical}
.tcd-compose-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:12px}

/* Review workflow (Activity tab) */
.tcd-review-flow{display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px;min-width:0}
.tcd-review-by{flex:1 1 200px;min-width:0;color:var(--muted);font-size:12px}
.tcd-review-actions{display:flex;gap:6px;flex-wrap:wrap}
.tcd .tcd-review-reject:hover:not(:disabled){color:var(--danger);border-color:color-mix(in srgb,var(--danger) 45%,var(--border));background:var(--danger-soft)}

/* Full page header-band pieces */
.tcd-back{margin-left:-6px}
.tcd-crumb-now{display:inline-flex;align-items:center;gap:5px;font-size:13px;color:var(--muted);white-space:nowrap}
.tcd-pager{display:flex;align-items:center;gap:6px}
.tcd-pager-pos{font-size:12px;color:var(--muted);white-space:nowrap;max-width:260px;overflow:hidden;text-overflow:ellipsis;margin-right:4px}
.tcd-missing{min-width:0}

/* Dialogs: attachment preview, shared steps library */
.media-lightbox-inner.tcd-modal{position:relative;width:min(520px,100%);max-width:100%;padding:0;border-radius:var(--tf-radius);resize:none;display:flex;flex-direction:column;max-height:calc(100dvh - 48px);overflow:hidden;box-shadow:var(--shadow-lg);min-height:0;min-width:0;background:var(--panel);color:var(--text)}
.tcd-modal-head{flex:none;display:flex;align-items:center;gap:8px;padding:10px 10px 10px 18px;border-bottom:1px solid var(--border);min-height:52px}
.tcd-modal .tcd-modal-title{margin:0;font-size:15px;font-weight:650;flex:1 1 auto;min-width:0;display:flex;align-items:center;gap:8px;color:var(--text);letter-spacing:-.01em}
.tcd-modal-title>.tf-icon{color:var(--muted)}
.tcd-modal-body{flex:1 1 auto;min-height:0;padding:16px 18px;overflow:auto;display:flex;flex-direction:column;gap:12px}
.tcd-modal-body p{margin:0}
.tcd-modal-foot{flex:none;display:flex;justify-content:flex-end;gap:8px;padding:12px 18px;border-top:1px solid var(--border)}
.media-lightbox-inner.tcd-preview{width:min(1120px,100%)}
.tcd-preview-body{flex:1 1 auto;min-height:200px;background:var(--panel-alt);display:grid;place-items:center;overflow:auto;padding:12px}
.tcd-preview-body img,.tcd-preview-body video{display:block;max-width:100%;max-height:calc(100dvh - 140px);object-fit:contain;border-radius:4px}

/* Jira bug dialog (DOM-built by tcmCreateJiraBug, also used from runs) */
.media-lightbox.jira-bug-overlay{z-index:9998;display:flex;align-items:center;justify-content:center;padding:16px}
.jira-bug-overlay .jira-bug-panel{position:relative;background:var(--panel);color:var(--text);border:1px solid var(--border);border-radius:var(--tf-radius);width:min(640px,100%);max-height:calc(100dvh - 32px);box-shadow:var(--shadow-lg);display:flex;flex-direction:column;overflow:hidden}
.jira-bug-overlay .jira-bug-header{flex:none;display:flex;align-items:center;gap:10px;padding:10px 10px 10px 18px;border-bottom:1px solid var(--border);min-height:52px}
.jira-bug-overlay .jira-bug-title{margin:0;display:flex;align-items:center;gap:8px;font-size:15px;font-weight:650;color:var(--text)}
.jira-bug-overlay .jira-bug-title .tf-icon{color:var(--muted)}
.jira-bug-overlay .jira-bug-close{margin-left:auto;font-size:inherit;color:var(--muted)}
.jira-bug-overlay .jira-bug-body{flex:1 1 auto;min-height:0;padding:16px 18px;overflow-y:auto;display:flex;flex-direction:column;gap:14px}
.jira-bug-overlay .jira-bug-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.jira-bug-overlay .form-group{display:flex;flex-direction:column;gap:6px;margin:0;min-width:0}
.jira-bug-overlay .form-label{margin:0;font-size:12px;font-weight:600;color:var(--text);text-transform:none;letter-spacing:0}
.jira-bug-overlay .jira-bug-optional{font-weight:400;color:var(--muted)}
.jira-bug-overlay .jira-bug-label-row{display:flex;align-items:center;justify-content:space-between;gap:8px}
.jira-bug-overlay select.input,.jira-bug-overlay input.input{height:36px;min-height:36px;padding:0 10px}
.jira-bug-overlay textarea.input{min-height:150px;font:12px/1.55 var(--tf-font-mono);resize:vertical}
.jira-bug-overlay .jira-bug-status{min-height:18px;font-size:13px;color:var(--muted)}
.jira-bug-overlay .jira-bug-status.is-error{color:var(--danger)}
.jira-bug-overlay .jira-bug-status.is-success{color:var(--success);font-weight:600}
.jira-bug-overlay .jira-bug-status a{color:var(--accent)}
.jira-bug-overlay .jira-bug-note{margin-top:6px;color:var(--warning);font-weight:400}
.jira-bug-overlay .jira-bug-footer{flex:none;display:flex;justify-content:flex-end;gap:8px;padding:12px 18px;border-top:1px solid var(--border)}
@media(max-width:600px){.jira-bug-overlay .jira-bug-row{grid-template-columns:minmax(0,1fr)}}

/* Remove-case dialog (App.deleteCase) */
.app-dialog-box.tcd-del{max-width:480px;width:calc(100vw - 32px);padding:0;gap:0;border-radius:var(--tf-radius);box-shadow:var(--shadow-lg);animation:none;color:var(--text);max-height:calc(100dvh - 32px);overflow:auto}
.tcd-del-head{display:flex;align-items:center;gap:8px;padding:10px 10px 0 20px;min-height:48px}
.tcd-del .tcd-del-title{margin:0;flex:1;font-size:16px;font-weight:650;letter-spacing:-.01em;color:var(--text);display:flex;align-items:center;gap:8px}
.tcd-del-title .tf-id{font-size:14px}
.tcd-del-x{color:var(--muted)}
.tcd-del .tcd-del-name{margin:2px 20px 14px;color:var(--muted);font-size:13px;line-height:1.5;overflow-wrap:anywhere}
.tcd-del-options{border:0;margin:0;padding:0 20px;display:flex;flex-direction:column;gap:8px}
.tcd-del-option{display:flex;align-items:flex-start;gap:10px;padding:10px 12px;border:1px solid var(--border);border-radius:var(--tf-radius-sm);cursor:pointer;font-size:13px;line-height:1.4;color:var(--text)}
.tcd-del-option:hover{border-color:color-mix(in srgb,var(--text) 22%,var(--border))}
.tcd-del-option:has(input:checked){border-color:var(--accent);background:var(--accent-soft)}
.tcd-del-option.is-danger:has(input:checked){border-color:var(--danger);background:var(--danger-soft)}
.tcd-del-option input{margin:2px 0 0;accent-color:var(--accent);flex:none}
.tcd-del-option.is-danger input{accent-color:var(--danger)}
.tcd-del-option>span{display:flex;flex-direction:column;gap:2px;min-width:0}
.tcd-del-option strong{font-weight:600}
.tcd-del-hint{color:var(--muted);font-size:12px}
.tcd-del-foot{display:flex;justify-content:flex-end;gap:8px;padding:16px 20px;margin-top:8px;border-top:1px solid var(--border-soft)}
@media(max-width:540px){.tcd-del-foot .btn{flex:1 1 auto}}

/* ── Case editor (.tce) ──────────────────────────────────────── */
.tce{container:tce/inline-size;position:relative;flex:1 1 auto;min-width:0;min-height:0;display:flex;flex-direction:column;background:var(--panel);color:var(--text);font-size:13px}
.tce-scroll{flex:1 1 auto;min-height:0;overflow:auto}
.tce-grid{display:grid;grid-template-columns:minmax(0,1fr);grid-template-areas:"title" "props" "main" "files";min-height:100%;align-content:start}
.tce-area-title{grid-area:title;min-width:0;padding:24px 32px 12px;display:flex;flex-direction:column;gap:6px}
.tce-area-props,.tce-props-inner{display:contents}
.tce-props-fields{grid-area:props;min-width:0;padding:4px 32px 8px}
.tce-props-files{grid-area:files;min-width:0;padding:0 32px 32px}
.tce-area-main{grid-area:main;min-width:0;padding:12px 32px 28px;display:flex;flex-direction:column;gap:22px}
@container tce (min-width: 900px){
 .tce-grid{grid-template-columns:minmax(0,1fr) 340px;grid-template-rows:auto 1fr;grid-template-areas:"title props" "main props";align-content:stretch}
 .tce-area-props{display:block;grid-area:props;grid-row:1 / span 2;align-self:stretch;min-width:0;border-left:1px solid var(--border);background:var(--panel-alt)}
 .tce-props-inner{display:block;position:sticky;top:0;padding:24px 20px 32px}
 .tce-props-fields,.tce-props-files{padding:0}
 .tce-area-title{padding-top:28px}
 .tce-area-main{padding-bottom:40px}
}
@container tce (min-width: 1240px){
 .tce-grid{grid-template-columns:minmax(0,1fr) 380px}
 .tce-area-title,.tce-area-main{padding-left:40px;padding-right:40px}
}
.tce .tcd-side-title{margin:0 0 12px;font-size:11px;font-weight:600;letter-spacing:.07em;text-transform:uppercase;color:var(--muted);display:flex;align-items:center;gap:6px}
.tce-field{display:flex;flex-direction:column;gap:6px;min-width:0}
.tce .tce-label,.tcd-modal .tce-label{margin:0;font-size:12px;font-weight:600;color:var(--text);display:flex;align-items:center;gap:8px;letter-spacing:0}
.tce-req{color:var(--danger)}
.tce .tce-hint,.tcd-modal .tce-hint{font-size:12px;color:var(--muted);line-height:1.45;font-weight:400}
.tce .tce-control,.tcd-modal .tce-control{height:36px;min-height:36px;padding:0 10px;font-size:13px;border-radius:var(--tf-radius-sm)}
.tce .tce-title-input{height:44px;min-height:44px;padding:0 12px;font-size:16px;font-weight:600;border-radius:var(--tf-radius-sm)}
.tce .tce-title-input[aria-invalid="true"],.tcd-modal .tce-control[aria-invalid="true"],.tcd .tcd-input-sm[aria-invalid="true"]{border-color:var(--danger)}
.tce .tce-textarea{min-height:40px;padding:8px 10px;font-family:inherit;font-size:13px;line-height:1.5;resize:vertical;border-radius:var(--tf-radius-sm)}
.tce-props-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:14px 16px}
.tce-props-group{margin-top:24px;display:flex;flex-direction:column}
.tce-props-group>.tcd-side-title .tf-panel-count{letter-spacing:0}
.tce-custom-head{display:flex;align-items:center;justify-content:space-between;gap:6px;min-width:0;min-height:20px}
.tce-custom-head .btn.icon.small{width:24px;min-height:24px;margin:-4px -4px -4px 0;color:var(--subtle)}
.tce-custom .tce-props-grid+.tce-custom-add{margin-top:14px}
/* Phones: content first, then properties two to a row */
@container tce (max-width: 599px){
 .tce-grid{grid-template-areas:"title" "main" "props" "files"}
 .tce-props-fields{border-top:1px solid var(--border-soft);padding-top:20px}
 .tce-props-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 .tce-props-grid>.tce-field.is-wide{grid-column:1 / -1}
}

/* Steps editor */
.tce-steps{display:flex;flex-direction:column;gap:10px;min-width:0}
.tce-steps-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-height:30px}
.tce .tce-steps-title{font-size:12px}
.tce-steps-tools{margin-left:auto;display:flex;gap:6px;flex-wrap:wrap}
.tce-steps-box{container:tcesteps/inline-size;border:1px solid var(--border);border-radius:var(--tf-radius);background:var(--panel)}
.tce-steps-cols{display:none}
.tce-step-list{list-style:none;margin:0;padding:0}
.tce-step{position:relative;display:grid;grid-template-columns:26px minmax(0,1fr) 30px;grid-template-areas:"num action menu" "num expected menu";gap:8px 10px;padding:10px 8px 12px 12px;border-top:1px solid var(--border-soft);background:var(--panel)}
.tce-step:first-child{border-top:0}
.tce-step:last-child{border-radius:0 0 var(--tf-radius) var(--tf-radius)}
.tce-step.is-dragging{opacity:.45}
.tce-step.drop-before{box-shadow:inset 0 2px 0 var(--accent)}
.tce-step.drop-after{box-shadow:inset 0 -2px 0 var(--accent)}
.tce-step-num{grid-area:num;display:flex;flex-direction:column;align-items:center;gap:6px;padding-top:2px}
.tce-step-action{grid-area:action}
.tce-step-expected{grid-area:expected}
.tce-step-menu{grid-area:menu;padding-top:2px}
.tce-grip{display:grid;place-items:center;width:22px;height:24px;border-radius:4px;color:var(--subtle);cursor:grab}
.tce-grip:hover{background:var(--panel-alt);color:var(--muted)}
.tce .tce-step-del:hover:not(:disabled),.tcd-modal .tce-step-del:hover:not(:disabled){color:var(--danger);background:var(--danger-soft)}
.tce-step-field{display:flex;flex-direction:column;gap:4px;min-width:0}
.tce .tce-sublabel{font-size:11px;font-weight:600;color:var(--muted);text-transform:uppercase;letter-spacing:.05em}
@container tcesteps (min-width: 560px){
 .tce-steps-cols{display:grid;grid-template-columns:26px minmax(0,1fr) minmax(0,1fr) 30px;gap:10px;padding:8px 8px 8px 12px;background:var(--panel-alt);border-bottom:1px solid var(--border);border-radius:var(--tf-radius) var(--tf-radius) 0 0;font-size:11px;font-weight:600;color:var(--muted);text-transform:uppercase;letter-spacing:.06em}
 .tce-steps-cols>span:first-child{text-align:center}
 .tce-step{grid-template-columns:26px minmax(0,1fr) minmax(0,1fr) 30px;grid-template-areas:"num action expected menu"}
 .tce-step .tce-sublabel{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
}
.tce-add-step{align-self:flex-start}

/* Attachments in the editor */
.tce-drop{display:flex;align-items:center;gap:12px;padding:12px 14px;border:1px dashed color-mix(in srgb,var(--text) 22%,var(--border));border-radius:var(--tf-radius);background:var(--panel);color:var(--muted);cursor:pointer;line-height:1.4}
.tce-drop strong{display:block;color:var(--text);font-weight:600;font-size:13px}
.tce-drop:hover,.tce-drop.is-over{border-color:var(--accent);color:var(--accent);background:var(--accent-soft)}
.tce-drop:focus-within{border-color:var(--accent);box-shadow:var(--tf-focus)}
.tce-drop.is-busy{cursor:progress;border-style:solid;color:var(--text)}
.tce-files{list-style:none;margin:8px 0 0;padding:0;display:flex;flex-direction:column;gap:6px}
.tce-file{display:flex;align-items:center;gap:10px;padding:5px 5px 5px 6px;border:1px solid var(--border);border-radius:var(--tf-radius-sm);background:var(--panel);min-width:0}
.tce-file-thumb{flex:none;width:48px;height:36px;border-radius:4px;border:0;padding:0;overflow:hidden;background:var(--panel-alt);display:grid;place-items:center;cursor:pointer;color:var(--muted)}
.tce-file-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.tce-file-thumb:focus-visible{outline:none;box-shadow:var(--tf-focus)}
.tce-file-main{flex:1;min-width:0;display:flex;flex-direction:column}
.tce-file-name{font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* Footer: Cancel / Save stay in view */
.tce-foot{flex:none;display:flex;align-items:center;gap:12px;padding:10px 32px;border-top:1px solid var(--border);background:var(--panel);min-height:56px}
.tce-foot-hint{font-size:12px;color:var(--muted);white-space:nowrap}
.tce-foot-hint kbd{font:500 11px/1 var(--tf-font-mono);color:var(--muted);background:var(--panel-alt);border:1px solid var(--border);border-radius:4px;padding:2px 5px}
.tce-foot-actions{margin-left:auto;display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}

/* Phones: document scrolling, sticky save bar above the bottom navigation */
@media(max-width:900px){
 .tf-content>.tcd-page,.tf-content>.tce-page{margin:-16px -14px 0}
 /* The page surface runs down to the bottom navigation (no strip of canvas
    under the case or below the editor's save bar). */
 .tf-content:has(>.tcd-page),.tf-content:has(>.tce-page){padding-bottom:calc(64px + env(safe-area-inset-bottom,0px))}
 .tf-content>.tcd-page,.tf-content>.tce-page{background:var(--panel)}
 .tcd--page .tcd-area-head{padding:16px 16px 0}
 .tcd--page .tcd-aside{padding:0 16px 8px}
 .tcd--page .tcd-area-main{padding:0 16px 16px}
 .tcd--inspector .tcd-area-head{padding:14px 16px 0}
 .tcd--inspector .tcd-aside{padding:0 16px 4px}
 .tcd--inspector .tcd-area-main{padding:0 16px 24px}
 .tcd .tcd-title{font-size:19px}
 .tcd--page .tcd-actions{flex-basis:100%}
 .tce-scroll{overflow:visible}
 .tce-area-title{padding:16px 16px 8px}
 .tce-props-fields{padding:4px 16px 8px}
 .tce-props-files{padding:0 16px 24px}
 .tce-area-main{padding:12px 16px 20px}
 .tce-foot{position:sticky;bottom:calc(64px + env(safe-area-inset-bottom,0px));z-index:30;padding:10px 16px}
 .tce-foot-hint{display:none}
 .tce-foot-actions{width:100%}
 .tce-foot-actions .btn{flex:1 1 auto}
 .tcd-pager-pos{display:none}
 .tce .tce-control,.tce .tce-title-input,.tce .tce-textarea,.tcd .tcd-input-sm,.tcd .tcd-textarea,.tcd-modal .tce-control{font-size:16px}
 .tcd-prop-select{font-size:14px}
}
@media(min-width:901px){
 .tcd-tabs{position:sticky;top:0;z-index:4}
}
@media(max-width:540px){
 .tcd-deps-row{flex-direction:column;gap:6px}
 .tcd-deps-label{width:auto;padding-top:0}
 .tcd-back-long{display:none}
}
/* Phones: pushed case page — back bar, header, segmented tabs, content,
   details list; Edit · File bug · ⋯ in a sticky bottom bar. */
@media(max-width:900px){
 .tcd-m .tf-m-backbar{justify-content:space-between}
 .tcd-m-pager{display:flex;align-items:center;gap:2px}
 .tcd-m-pos{font-size:13px;color:var(--muted);margin-right:4px;font-variant-numeric:tabular-nums}
 .tcd-m .tcd{padding:0}
 .tcd-m .tcd-grid{display:flex;flex-direction:column;gap:14px}
 .tcd-m .tcd-area-head{order:0}
 .tcd-m .tcd-area-main{order:1;min-width:0}
 .tcd-m .tcd-aside{order:2;position:static;width:auto}
 .tcd-m .tcd-title{font-size:22px;line-height:1.3}
 .tcd-m .tcd-head-row{display:block}
 .tcd-m .tcd-actions{position:fixed;left:0;right:0;bottom:0;z-index:70;display:flex;gap:10px;margin:0;padding:10px 16px calc(10px + env(safe-area-inset-bottom,0px));background:var(--panel);border-top:1px solid var(--border);box-shadow:0 -4px 16px rgba(16,40,48,.06)}
 .tcd-m .tcd-actions>.btn{flex:1 1 0;min-height:46px;font-size:15px;border-radius:10px}
 .tcd-m .tcd-actions .tf-menu .btn{width:46px;min-height:46px;border-radius:10px}
 .tcd-m .tcd-tabs{display:flex;padding:3px;border:1px solid var(--border);border-radius:10px;background:var(--panel-alt);gap:2px}
 .tcd-m .tcd-tabs .tf-tab{flex:1;justify-content:center;min-height:38px;border-radius:7px;border-bottom:0;margin:0}
 .tcd-m .tcd-tabs .tf-tab.active{background:var(--panel);box-shadow:0 1px 2px rgba(16,40,48,.08)}
 .tcd-m .tcd-tabpanel{padding-top:12px}
 .tcd-m :is(.tcd-step,.tcd-steps>li){border-radius:10px}
 .tcd-m .tcd-aside-inner{margin:0;width:auto;max-width:none}
 /* Case editor: pushed page, stacked fields, Cancel · Save pinned at the bottom */
 .tce-m .tf-m-backbar{gap:4px}
 .tce-m-title{margin-left:auto;font-size:15px;font-weight:650;color:var(--text)}
 .tce-m .tce,.tce-m .tce-scroll{display:block;height:auto;overflow:visible;padding:0}
 .tce-m .tce-grid{display:flex;flex-direction:column;gap:16px;padding:0}
 .tce-m .tce .tce-grid>.tce-area-title{order:0}.tce-m .tce .tce-grid>.tce-area-main{order:1}.tce-m .tce .tce-grid>.tce-area-props{order:2;display:block;position:static;width:auto;border:0;padding:0}
 .tce-m :is(.input,.select,.textarea){font-size:16px}
 .tce-m .tce-steps-cols{display:none}
 .tce-m .tce-foot{position:fixed;left:0;right:0;bottom:0;z-index:70;display:flex;margin:0;padding:10px 16px calc(10px + env(safe-area-inset-bottom,0px));background:var(--panel);border-top:1px solid var(--border);box-shadow:0 -4px 16px rgba(16,40,48,.06)}
 .tce-m .tce-foot-hint{display:none}
 .tce-m .tce-foot-actions{display:flex;gap:10px;width:100%}
 .tce-m .tce-foot-actions .btn{flex:1 1 0;min-height:46px;font-size:15px;border-radius:10px}
 .tce-m .tce-foot-actions .tce-another{display:none}
}

.tcd .bt-casebugs .tcd-sec-head{margin-bottom:10px}
.tcd .bt-casebugs .bt-sec-actions{margin-left:auto}
.tcd-badges .bt-casebadge{height:22px}
/* @endregion case-detail */



/* @region runs — runs list, run creation, compare, automation runs list */
/* Header band: run count, active-run progress, tab counts */
.runs-head-meta{display:inline-flex;align-items:center;flex-wrap:wrap;gap:4px 8px;font-size:13px;color:var(--muted)}
.runs-head-progress,.runs-head-fail{display:inline-flex;align-items:center;gap:8px}
.runs-head-sep{color:var(--subtle)}
.runs-head-bar{display:inline-block;width:56px;height:6px;border-radius:3px;background:var(--st-untested-soft);overflow:hidden;box-shadow:inset 0 0 0 1px var(--border-soft)}
.runs-head-bar>span{display:block;height:100%;background:var(--accent);border-radius:3px}
.runs-head-fail{color:var(--st-failed);font-weight:600}
.runs-tabs .tf-tab{display:inline-flex;align-items:center;gap:8px}
.runs-tabs .tf-tab:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--accent);border-radius:var(--tf-radius-xs) var(--tf-radius-xs) 0 0}
.runs-tab-count{min-width:20px;height:18px;padding:0 6px;border-radius:9px;display:inline-grid;place-items:center;font:600 11px/1 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-variant-numeric:tabular-nums;color:var(--muted);background:var(--panel-alt);box-shadow:inset 0 0 0 1px var(--border)}
.runs-tabs .tf-tab.active .runs-tab-count{color:var(--accent);background:var(--accent-soft);box-shadow:inset 0 0 0 1px var(--accent-mid)}

/* Workbench: one list pane that sizes its columns to its own width */
.runs-pane{container:runs/inline-size;min-width:0}
.runs-toolbar{flex-wrap:wrap;gap:8px;padding:10px 16px;min-height:56px;background:var(--panel)}
.runs-toolbar .runs-search{flex:1 1 220px;max-width:360px}
.app-shell .runs-toolbar .input,.app-shell .runs-toolbar .select{min-height:var(--tf-control-h);height:var(--tf-control-h);font-size:13px}
.runs-select{position:relative;display:inline-flex;align-items:center;flex:0 1 190px;min-width:140px;color:var(--muted)}
.runs-select>.tf-icon{position:absolute;left:11px;pointer-events:none;z-index:1}
.app-shell .runs-select .select{width:100%;padding-left:32px;padding-right:28px;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}
.app-shell .runs-select.is-set .select{border-color:var(--accent-mid);background-color:var(--accent-soft);color:var(--text)}
.runs-select.is-set>.tf-icon{color:var(--accent)}
.runs-sort{display:none}
.runs-body{background:var(--panel)}

/* Table (div grid with table roles so rows can restack on narrow widths) */
.runs-table{--runs-cols:minmax(260px,1fr) 116px minmax(150px,220px) 84px minmax(110px,150px) 120px 36px;min-width:0}
.runs-row{display:grid;grid-template-columns:var(--runs-cols);align-items:center;column-gap:16px;padding:0 12px 0 16px;min-height:58px;border-bottom:1px solid var(--border-soft);position:relative}
.runs-row:not(.runs-headrow){cursor:pointer;transition:background-color .12s}
.runs-row:not(.runs-headrow):hover{background:var(--panel-alt)}
.runs-row:not(.runs-headrow):focus-visible{outline:none;background:var(--accent-soft);box-shadow:inset 0 0 0 2px var(--accent)}
.runs-headrow{position:sticky;top:0;z-index:3;min-height:38px;background:var(--panel-alt);border-bottom:1px solid var(--border)}
.runs-row.runs-headrow .runs-c{font:600 11px/1 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.runs-sortbtn{display:inline-flex;align-items:center;gap:4px;border:0;background:none;padding:6px 4px;margin-left:-4px;border-radius:var(--tf-radius-xs);font:inherit;letter-spacing:inherit;text-transform:inherit;color:inherit;cursor:pointer;white-space:nowrap}
.runs-sortbtn:hover,.runs-sortbtn.is-on{color:var(--text)}
.runs-sortbtn:focus-visible{outline:none;box-shadow:var(--tf-focus)}
.runs-sorticon{display:inline-grid;opacity:0;transition:opacity .12s,transform .12s}
.runs-sortbtn.is-on .runs-sorticon{opacity:1}
.runs-sortbtn:not(.is-on):hover .runs-sorticon,.runs-sortbtn:not(.is-on):focus-visible .runs-sorticon{opacity:.45}
.runs-sorticon.is-asc{transform:rotate(180deg)}
.runs-c{min-width:0}
.runs-row .c-menu{justify-self:end;display:flex}

/* Name cell: kind tile + name + meta line */
.runs-row .c-name{display:flex;align-items:center;gap:12px}
.runs-kind{flex:none;width:30px;height:30px;border-radius:var(--tf-radius-sm);display:grid;place-items:center;color:var(--muted);background:var(--panel-alt);box-shadow:inset 0 0 0 1px var(--border)}
.runs-row.is-active .runs-kind{color:var(--accent);background:var(--accent-soft);box-shadow:inset 0 0 0 1px var(--accent-mid)}
.runs-row.is-auto .runs-kind{color:var(--info);background:var(--info-soft);box-shadow:none}
.runs-name-wrap{min-width:0;flex:1 1 auto;padding:9px 0}
.runs-title-line{display:flex;align-items:center;gap:8px;min-width:0}
.runs-title-line>.runs-name{min-width:0}
.runs-inline-status{flex:none;display:none}
.runs-name{display:block;font-size:13.5px;font-weight:600;line-height:1.3;color:var(--text);text-decoration:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.runs-row:hover .runs-name{color:var(--accent)}
.runs-name:focus-visible{outline:none;text-decoration:underline}
.runs-sub{display:flex;align-items:center;gap:4px 12px;margin-top:4px;font-size:12px;line-height:1.3;color:var(--muted);white-space:nowrap;overflow:hidden;min-width:0}
.runs-sub .tf-id{font-size:11.5px;flex:none}
.runs-sub-item{display:inline-flex;align-items:center;gap:4px;min-width:0;max-width:220px;flex:0 1 auto}
.runs-sub-item>.tf-icon{color:var(--subtle)}
.runs-sub-item.is-overdue,.runs-sub-item.is-overdue>.tf-icon{color:var(--danger)}
.runs-sub-who,.runs-sub-date{display:none}

/* Results: distribution bar + compact counts */
.runs-row .c-results{display:flex;flex-direction:column;gap:7px;padding:2px 0}
.runs-bar{height:6px}
.runs-counts{display:flex;flex-wrap:wrap;gap:2px 8px;font-size:12px;line-height:1.2;font-variant-numeric:tabular-nums;color:var(--text)}
.runs-count{display:inline-flex;align-items:center;gap:5px;font-weight:600}
.runs-count>i{width:7px;height:7px;border-radius:2px;background:currentColor;flex:none}
.runs-count.is-passed>i{background:var(--st-passed)}.runs-count.is-failed>i{background:var(--st-failed)}
.runs-count.is-blocked>i{background:var(--st-blocked)}.runs-count.is-retest>i{background:var(--st-retest)}
.runs-count.is-skipped>i{background:var(--st-skipped)}
.runs-count.is-failed{color:var(--st-failed)}
.runs-count.is-untested,.runs-count.is-empty{color:var(--muted);font-weight:500}
.runs-count-label{display:none;font-weight:500;color:var(--muted)}
.runs-count.is-untested>i{background:var(--st-untested-soft);box-shadow:inset 0 0 0 1px var(--st-untested)}

/* Progress, assignee, date */
.runs-row .c-progress{display:flex;flex-direction:column;gap:3px;font-variant-numeric:tabular-nums;white-space:nowrap}
.runs-pct{font-size:13.5px;font-weight:650;color:var(--text)}
.runs-frac{font-size:11.5px;color:var(--muted)}
.runs-row .c-assignee{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--text)}
.runs-avatar{flex:none;width:24px;height:24px;border-radius:50%;display:grid;place-items:center;font:700 10px/1 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;letter-spacing:.02em;color:var(--accent);background:var(--accent-soft);box-shadow:inset 0 0 0 1px var(--accent-mid)}
.runs-avatar.is-bot{color:var(--info);background:var(--info-soft);box-shadow:none}
.runs-none{font-size:12.5px;color:var(--muted)}
.runs-row .c-date{font-size:12.5px;color:var(--muted);white-space:nowrap;font-variant-numeric:tabular-nums}

/* Row menu: opens upward near the bottom of the list */
.runs-row .c-menu .btn.icon.small{color:var(--muted);border-color:transparent}
.runs-row:hover .c-menu .btn.icon.small{color:var(--text)}
.runs-row .c-menu .tf-menu.open .btn{background:var(--panel-alt);color:var(--text)}
.runs-row .c-menu .tf-menu-list{min-width:224px}
@media(min-width:541px){.runs-row .c-menu.opens-up .tf-menu-list{top:auto;bottom:calc(100% + 6px)}}

/* Footer and empty states */
.runs-foot{flex-wrap:wrap;gap:4px 8px;padding:8px 16px;background:var(--panel);font-variant-numeric:tabular-nums}
.runs-foot-agg{display:inline-flex;flex-wrap:wrap;align-items:center;gap:4px 8px}
.runs-foot-sep{color:var(--subtle)}
.runs-foot-pass{color:var(--st-passed);font-weight:600}
.runs-foot-fail{color:var(--st-failed);font-weight:600}
.runs-empty{padding:64px 24px;max-width:460px;margin:0 auto}
.runs-empty p{margin:0}

/* Narrower panes drop low-value columns into the meta line */
@container runs (max-width:1100px){
 .runs-table{--runs-cols:minmax(240px,1fr) 112px minmax(150px,200px) 80px minmax(110px,150px) 36px}
 .runs-row .c-date{display:none}
 .runs-sub-date{display:inline-flex}
 .runs-sub{flex-wrap:wrap;row-gap:3px}
}
@container runs (max-width:880px){
 .runs-table{--runs-cols:minmax(200px,1fr) minmax(140px,200px) 72px 36px}
 .runs-row .c-assignee,.runs-row .c-status{display:none}
 .runs-inline-status{display:inline-flex}
 .runs-sub-who{display:inline-flex}
 .runs-sub{flex-wrap:wrap;row-gap:3px}
}
/* Phone-width pane: each run becomes a stacked block */
@container runs (max-width:640px){
 .runs-toolbar{padding:10px 12px}
 .runs-toolbar .runs-search{flex:1 1 100%;max-width:none}
 .runs-select{flex:1 1 140px}
 .runs-sort{display:inline-flex}
 .runs-toolbar .tf-toolbar-spacer{display:none}
 .runs-headrow{display:none}
 .runs-row{grid-template-columns:minmax(0,1fr) auto 32px;grid-template-areas:"name status menu" "res res prog";gap:8px 10px;padding:12px 10px 12px 14px;align-items:start}
 .runs-row .c-name{grid-area:name;align-items:flex-start}
 .runs-name-wrap{padding:0}
 .runs-name{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
 .runs-sub{flex-wrap:wrap;white-space:normal;overflow:visible}
 .runs-row .c-status{grid-area:status;padding-top:2px;display:block}
 .runs-inline-status{display:none}
 .runs-row .c-menu{grid-area:menu;margin-top:-2px}
 .runs-row .c-results{grid-area:res;padding-left:42px}
 .runs-row .c-progress{grid-area:prog;align-items:flex-end;padding-top:0}
 .runs-count-label{display:inline}
 .runs-foot .runs-foot-agg{display:none}
}

/* Run dialogs (create/edit, compare) */
.media-lightbox.runs-dialog-backdrop{z-index:120;padding:24px;overscroll-behavior:contain}
.media-lightbox-inner.runs-dialog{width:min(640px,100%);max-width:100%;max-height:calc(100dvh - 48px);min-width:0;min-height:0;padding:0;resize:none;overflow:hidden;display:flex;flex-direction:column;border-radius:var(--tf-radius);border:1px solid var(--border);background:var(--panel);color:var(--text);box-shadow:var(--shadow-lg);animation:none}
.media-lightbox-inner.runs-dialog.runs-compare-modal{width:min(920px,100%)}
.runs-dialog-head{flex:none;display:flex;align-items:flex-start;gap:12px;padding:16px 16px 14px 20px;border-bottom:1px solid var(--border)}
.runs-dialog-titles{flex:1;min-width:0}
.runs-dialog-title{margin:0;font-size:16px;font-weight:650;letter-spacing:-.01em;line-height:1.3;color:var(--text)}
.runs-dialog-sub{margin:3px 0 0;font-size:12.5px;color:var(--muted);line-height:1.4}
.runs-dialog-form{display:flex;flex-direction:column;min-height:0;flex:1 1 auto}
.runs-dialog-body{flex:1 1 auto;min-height:0;overflow:auto;padding:18px 20px 20px;display:flex;flex-direction:column;gap:16px}
.runs-dialog-foot{flex:none;display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:12px 16px 12px 20px;border-top:1px solid var(--border);background:var(--panel-alt)}
.runs-dialog-foot-note{margin-right:auto;font-size:12px;color:var(--muted);min-width:0}

/* Form fields */
.runs-field{display:flex;flex-direction:column;gap:6px;min-width:0;margin:0;padding:0;border:0}
.runs-field-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.runs-label{font-size:12.5px;font-weight:600;color:var(--text);padding:0}
.runs-req{color:var(--danger)}
.runs-hint{margin:0;font-size:12px;line-height:1.45;color:var(--muted)}
.runs-dialog .runs-field :is(.input,.select,.textarea){width:100%;font-size:13px}
.runs-dialog .runs-field .textarea{min-height:76px;resize:vertical;font-family:inherit;line-height:1.5}
.runs-dialog .input.is-invalid{border-color:var(--danger)}
.runs-dialog .input.is-invalid:focus{outline-color:var(--danger-soft)}
.runs-field-error{margin:0;font-size:12px;font-weight:500;color:var(--danger)}
.runs-form-error{display:flex;align-items:flex-start;gap:8px;padding:10px 12px;border-radius:var(--tf-radius-sm);background:var(--danger-soft);color:var(--danger);font-size:13px;line-height:1.4}
.runs-status-seg{align-self:flex-start}
.runs-status-seg>button{min-height:30px;padding:0 14px}
.runs-status-seg>button:focus-visible{outline:none;box-shadow:var(--tf-focus)}
.runs-cases{gap:8px}
.runs-cases>legend{margin-bottom:8px}
.runs-choice{display:flex;align-items:flex-start;gap:10px;padding:11px 12px;border:1px solid var(--border);border-radius:var(--tf-radius-sm);cursor:pointer;background:var(--panel);transition:border-color .12s,background-color .12s}
.runs-choice:hover{border-color:color-mix(in srgb,var(--text) 22%,var(--border))}
.runs-choice.is-on{border-color:var(--accent);background:var(--accent-soft)}
.runs-choice.is-disabled{opacity:.55;cursor:not-allowed}
.runs-choice input{margin:2px 0 0;accent-color:var(--accent);width:15px;height:15px;flex:none}
.runs-choice:has(input:focus-visible){box-shadow:var(--tf-focus)}
.runs-choice-text{display:flex;flex-direction:column;gap:2px;min-width:0}
.runs-choice-title{display:inline-flex;align-items:center;gap:8px;font-size:13px;font-weight:600;color:var(--text)}
.runs-choice-count{font:600 11px/1 Inter,sans-serif;font-variant-numeric:tabular-nums;color:var(--muted);background:var(--panel-alt);box-shadow:inset 0 0 0 1px var(--border);border-radius:9px;padding:3px 7px}
.runs-choice-hint{font-size:12px;color:var(--muted);line-height:1.4}
.runs-note{display:flex;align-items:center;flex-wrap:wrap;gap:6px;padding:10px 12px;border-radius:var(--tf-radius-sm);background:var(--panel-alt);font-size:13px;color:var(--muted)}
.runs-note>.tf-icon{color:var(--info)}
.runs-linkbtn{border:0;background:none;padding:0;font:600 12.5px/1.3 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--accent);cursor:pointer;text-decoration:none}
.runs-linkbtn:hover{text-decoration:underline}
.runs-linkbtn:focus-visible{outline:none;box-shadow:var(--tf-focus);border-radius:3px}

/* Compare */
.runs-cmp-pickers{flex:none;display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:12px;align-items:start;padding:16px 20px;border-bottom:1px solid var(--border);background:var(--panel-alt)}
.runs-cmp-col{display:flex;flex-direction:column;gap:8px;min-width:0}
.runs-cmp-pick{display:flex;flex-direction:column;gap:6px;min-width:0}
.runs-cmp-pick .select{width:100%;font-size:13px}
.runs-cmp-swap{margin-top:24px}
.runs-cmp-summary{display:flex;flex-direction:column;gap:6px;min-width:0}
.runs-cmp-summary.is-empty{font-size:12px;color:var(--muted);min-height:32px}
.runs-cmp-summary-text{display:flex;flex-wrap:wrap;align-items:center;gap:2px 10px;font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}
.runs-cmp-summary-text strong{color:var(--text)}
.runs-cmp-summary-text .runs-linkbtn{margin-left:auto;font-size:12px}
.runs-cmp-body{gap:14px;padding-top:16px}
.runs-cmp-filters{display:flex;flex-wrap:wrap;gap:1px;background:var(--border-soft);border:1px solid var(--border);border-radius:var(--tf-radius);overflow:hidden;flex:none}
.runs-cmp-filter{flex:1 1 0;display:flex;flex-direction:column;align-items:flex-start;gap:4px;padding:10px 14px;border:0;background:var(--panel);color:var(--muted);cursor:pointer;text-align:left;min-width:0;font:inherit;box-shadow:inset 0 -2px 0 transparent}
.runs-cmp-filter:hover{background:var(--panel-alt)}
.runs-cmp-filter:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--accent)}
.runs-cmp-filter.active{background:var(--accent-soft);box-shadow:none;color:var(--text)}
.runs-cmp-filter-value{font-size:20px;font-weight:650;letter-spacing:-.02em;line-height:1;font-variant-numeric:tabular-nums;color:var(--text)}
.runs-cmp-filter.is-danger .runs-cmp-filter-value{color:var(--st-failed)}
.runs-cmp-filter.is-success .runs-cmp-filter-value{color:var(--st-passed)}
.runs-cmp-filter-label{font-size:12px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.runs-cmp-tools{display:flex;align-items:center;gap:10px;flex-wrap:wrap;flex:none}
.runs-cmp-tools .tf-search{max-width:340px}
.runs-cmp-count{margin-left:auto;font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}
.runs-cmp-table{border:1px solid var(--border);border-radius:var(--tf-radius);flex:none}
.runs-cmp-row{display:grid;grid-template-columns:minmax(0,1fr) 112px 132px 104px;gap:12px;align-items:center;min-height:42px;padding:0 14px;border-bottom:1px solid var(--border-soft);font-size:13px}
.runs-cmp-row:last-child{border-bottom:0}
.runs-cmp-headrow{min-height:34px;background:var(--panel-alt);border-bottom:1px solid var(--border);font:600 11px/1 Inter,sans-serif;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);position:sticky;top:-16px;z-index:1;border-radius:var(--tf-radius) var(--tf-radius) 0 0}
.runs-cmp-row.is-regression{box-shadow:inset 3px 0 0 var(--st-failed)}
.runs-cmp-row.is-fix{box-shadow:inset 3px 0 0 var(--st-passed)}
.runs-cmp-case{display:flex;align-items:center;gap:10px;min-width:0}
.runs-cmp-b{display:flex;align-items:center;gap:6px}
.runs-cmp-arrow{color:var(--subtle);display:inline-grid;margin-left:-20px;width:14px}
.runs-cmp-kind{justify-self:start}
.runs-cmp-more{display:flex;justify-content:center;padding:10px;border-top:1px solid var(--border-soft)}
.runs-cmp-none{padding:32px 20px}

@media(max-width:900px){
 .runs-wb{border:1px solid var(--border);border-radius:var(--tf-radius);background:var(--panel)}
 .runs-wb>.runs-pane{border-radius:var(--tf-radius)}
 .runs-toolbar{border-radius:var(--tf-radius) var(--tf-radius) 0 0}
 .runs-foot{border-radius:0 0 var(--tf-radius) var(--tf-radius)}
 .runs-headrow{position:static}
 .runs-row:last-child{border-bottom:0}
 .tf-pagehead-actions .btn{min-height:36px}
}
@media(max-width:640px){
 .media-lightbox.runs-dialog-backdrop{padding:0;align-items:end}
 .media-lightbox-inner.runs-dialog,.media-lightbox-inner.runs-dialog.runs-compare-modal{width:100%;max-height:100dvh;height:100dvh;border-radius:0;border:0}
 .runs-dialog-head{padding:calc(12px + env(safe-area-inset-top,0px)) 12px 12px 16px}
 .runs-dialog-body{padding:16px}
 .runs-dialog-foot{padding:10px 16px calc(10px + env(safe-area-inset-bottom,0px))}
 .runs-dialog-foot-note{display:none}
 .runs-dialog-foot .btn{flex:1 1 0}
 .runs-field-grid{grid-template-columns:minmax(0,1fr)}
 .runs-cmp-pickers{grid-template-columns:minmax(0,1fr);padding:12px 16px;gap:10px}
 .runs-cmp-swap{margin:0;justify-self:center;transform:rotate(90deg)}
 .runs-cmp-filter{flex:1 1 30%;padding:8px 10px}
 .runs-cmp-filter-value{font-size:17px}
 .runs-cmp-headrow{display:none}
 .runs-cmp-row{grid-template-columns:auto auto 1fr;grid-template-areas:"case case case" "a b kind";gap:8px;padding:10px 12px}
 .runs-cmp-case{grid-area:case}
 .runs-cmp-a{grid-area:a}.runs-cmp-b{grid-area:b}
 .runs-cmp-arrow{margin-left:0}
 .runs-cmp-kind{grid-area:kind;justify-self:end}
 .runs-cmp-tools .tf-search{max-width:none;flex:1 1 100%}
 .runs-cmp-count{margin-left:0}
}
@media(max-width:480px){
 .runs-tabs .tf-tab{padding:11px 8px;gap:6px}
}
@media(prefers-reduced-motion:reduce){.runs-row,.runs-sorticon,.runs-choice{transition:none}}
/* Phones: segmented tabs, search + chips, two-line rows, FAB */
@media(max-width:900px){
 .runs-m{display:flex;flex-direction:column}
 .runs-m-seg{display:flex;width:100%;margin:2px 0 12px}
 .runs-m-seg>button{flex:1 1 0;justify-content:center;min-height:40px;gap:6px}
 .runs-m-list{list-style:none;padding:0}
 .runs-m-item{position:relative;border-bottom:1px solid var(--border-soft)}
 .runs-m-item:last-child{border-bottom:0}
 .runs-m-row{border-bottom:0;padding-right:60px;min-height:84px}
 .runs-m-row .tf-m-row-trail{display:none}
 .runs-m-sub{display:inline-flex;align-items:center;gap:4px;min-width:0;max-width:46%}
 .runs-m-bar{margin-top:4px;width:100%}
 .runs-m-figs{font-size:13px;color:var(--muted)}
 .runs-m-figs strong{color:var(--text);font-size:15px}
 .runs-m-failed{color:var(--danger);font-weight:600}
 .runs-m-menu{position:absolute;right:10px;top:50%;transform:translateY(-50%)}
 .runs-m-menu .btn{min-width:44px;min-height:44px}
}

/* @endregion runs */



/* @region run-execution — run detail, execution tree, result entry, case picker, in-run case modal */
/* Run execution is a workbench: sections (side) · case rows (grow) ·
   execution panel (inspector). Panes are placed from the workbench's own
   width (layout classes below); full-screen sheet on phones.
   Prefix: rx- (rxp- = picker). */
.rx-muted{color:var(--muted)}
p.rx-muted{margin:0;font-size:12.5px;line-height:1.5}
.app-shell :is(.rx-wb,.rx-dialog) .textarea{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
.rx-wb{position:relative}
.rx-wb :is(.rx-node-main,.rx-node-toggle,.rx-chip,.rx-mini,.rx-rbtn,.rx-group-toggle,.rx-details-toggle,.rx-keyhint,.rx-linkbtn,.rx-row-title):focus-visible,
.rx-dialog :is(.rx-node-main,.rx-node-toggle,.rx-chip,.rx-mini,.rx-group-toggle,.rx-linkbtn):focus-visible{outline:none;box-shadow:var(--tf-focus)}
.rx-check{display:grid;place-items:center;align-self:stretch;cursor:pointer;min-height:28px}
.rx-check input{width:15px;height:15px;margin:0;accent-color:var(--accent);cursor:pointer}
.rx-check input:disabled{cursor:not-allowed}
.rx-dot{display:inline-block;width:8px;height:8px;border-radius:50%;flex:none;background:var(--st-untested)}
.rx-dot.is-passed{background:var(--st-passed)}.rx-dot.is-failed{background:var(--st-failed)}.rx-dot.is-blocked{background:var(--st-blocked)}
.rx-dot.is-retest{background:var(--st-retest)}.rx-dot.is-skipped{background:var(--st-skipped)}
.rx-count{font:600 11px/1 Inter,sans-serif;color:var(--muted);background:var(--panel-alt);border:1px solid var(--border);border-radius:10px;padding:2px 6px;text-transform:none;letter-spacing:0}

/* Native controls (checkboxes, selects, scrollbars) follow dark themes. */
body:is([data-theme="dark"],[data-theme="midnight"],[data-theme="graphite"],[data-theme="nord"],[data-theme="oled"],[data-theme="nightops"]) :is(.rx-wb,.rx-dialog){color-scheme:dark}

/* ── Header band (page meta + actions) ── */
/* The run header keeps its actions on the title row when they fit: the meta
   block shrinks (name ellipsis, facts wrap) instead of pushing them down. */
@media(min-width:901px){
 .tf-pagehead-row:has(.rx-head) .tf-pagehead-main{flex:1 1 0;min-width:min(100%,380px);flex-wrap:nowrap}
 .tf-pagehead-row:has(.rx-head) .tf-pagehead-meta{flex:1 1 auto;min-width:0}
}
.rx-head{display:flex;flex-direction:column;gap:5px;min-width:0;flex:1 1 auto}
/* name + status keep priority; the progress wraps below when space runs out */
.rx-head-line{display:flex;align-items:center;flex-wrap:wrap;gap:4px 18px;min-width:0}
.rx-head-title{display:flex;align-items:center;gap:8px;min-width:0;flex:0 1 auto}
.rx-head-sep{color:var(--subtle);font-size:20px;font-weight:300;line-height:1}
.rx-head-name{font-size:17px;font-weight:650;letter-spacing:-.015em;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:min(46vw,560px);min-width:0}
.rx-head-ctx{font-size:13px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;max-width:40vw}
.rx-head-facts{display:flex;align-items:center;flex-wrap:wrap;gap:4px 14px;padding-left:20px;font-size:12px;color:var(--muted);min-width:0}
.rx-fact{display:inline-flex;align-items:center;gap:5px;white-space:nowrap;max-width:240px;overflow:hidden;text-overflow:ellipsis;color:var(--muted)}
a.rx-fact{color:var(--accent);text-decoration:none}
a.rx-fact:hover{text-decoration:underline}
.rx-head-progress{display:inline-flex;align-items:center;gap:8px;white-space:nowrap;font-size:12px;color:var(--muted)}
.rx-head-bar{width:120px}
.rx-head-pct{font-weight:650;color:var(--text);font-variant-numeric:tabular-nums}

/* ── Side: section tree with per-section progress, run details ── */
.rx-wb .rx-side{--tf-pane-w:268px}
.rx-pane-count{font:600 11px/1 Inter,sans-serif;color:var(--muted)}
.rx-tree{display:flex;flex-direction:column;gap:1px;padding:8px}
.rx-node{display:flex;align-items:stretch;gap:2px;padding-left:calc(var(--rx-depth,0) * 14px);min-width:0}
.rx-node-toggle{flex:none;width:22px;display:grid;place-items:center;padding:0;border:0;border-radius:var(--tf-radius-xs);background:none;color:var(--subtle);cursor:pointer}
.rx-node-toggle:hover{color:var(--text);background:var(--panel)}
.rx-node-toggle.is-leaf{cursor:default;background:none}
.rx-node-main{flex:1 1 auto;min-width:0;display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;column-gap:8px;padding:7px 8px;border:0;border-radius:var(--tf-radius-sm);background:transparent;color:var(--text);text-align:left;cursor:pointer;font:500 13px/1.3 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
.rx-node-main.has-bar{row-gap:5px;padding:8px}
.rx-node-main:hover{background:color-mix(in srgb,var(--text) 5%,transparent)}
.rx-node.is-current .rx-node-main{background:var(--accent-soft);color:var(--accent);font-weight:600}
.rx-node-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rx-node-count{font:500 11px/1 Inter,sans-serif;color:var(--muted);font-variant-numeric:tabular-nums}
.rx-node.is-current .rx-node-count{color:var(--accent)}
.rx-node-done{color:var(--success);display:grid}
.rx-node-bar{grid-column:1 / -1;height:3px}
.rx-details{margin:4px 8px 16px;border-top:1px solid var(--border);padding-top:6px}
.rx-details-toggle{display:flex;align-items:center;gap:6px;width:100%;border:0;background:none;padding:8px 4px;border-radius:var(--tf-radius-xs);cursor:pointer;font:600 11px/1 Inter,sans-serif;color:var(--muted);text-transform:uppercase;letter-spacing:.07em}
.rx-details-toggle:hover{color:var(--text)}
.rx-details-meta{grid-template-columns:minmax(78px,max-content) minmax(0,1fr);padding:0 4px}
.rx-details-meta>dt,.rx-details-meta>dd{font-size:12px;padding:7px 0}
.rx-details-meta>dt{padding-right:10px}
.rx-details-meta .rx-prose{font-size:12px}
.rx-details-edit{margin-top:6px;margin-left:-8px}

/* ── Grow: toolbar, result chips, case rows ── */
.rx-grow{position:relative}
.rx-toolbar{flex-wrap:wrap;gap:8px;padding:8px 12px;min-height:52px;background:var(--panel)}
.rx-toolbar .tf-search{flex:1 1 200px;max-width:380px}
.app-shell .rx-toolbar :is(.input,.select){min-height:32px;height:32px;padding-top:4px;padding-bottom:4px;font-size:13px}
.app-shell .rx-toolbar .rx-select{width:auto;max-width:190px;padding-right:28px}
.rx-tree-toggle{max-width:240px;min-width:0}
.rx-tree-toggle .tf-truncate{max-width:180px}
.rx-toggle-label{display:inline-flex;align-items:center;gap:7px;font-size:12.5px;color:var(--muted);white-space:nowrap;cursor:pointer}
.rx-toggle-label input{accent-color:var(--accent);width:15px;height:15px;margin:0}
.rx-tabs{margin-left:auto}
.rx-selbar{background:var(--accent-soft);border-bottom-color:var(--accent-mid)}
.rx-sel-count{font-size:13px;color:var(--text);margin-right:4px;white-space:nowrap}
.app-shell .btn.rx-danger-text{color:var(--danger)}
.app-shell .btn.rx-danger-text:hover:not(:disabled){background:var(--danger-soft);color:var(--danger)}
.rx-filterbar{flex:none;display:flex;align-items:center;flex-wrap:wrap;gap:6px 5px;padding:8px 12px;border-bottom:1px solid var(--border);background:var(--panel)}
.rx-chip{flex:none;display:inline-flex;align-items:center;gap:5px;height:28px;padding:0 8px;border:1px solid var(--border);border-radius:999px;background:var(--panel);color:var(--muted);font:500 12px/1 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;white-space:nowrap;cursor:pointer}
.rx-chip:hover{color:var(--text);border-color:color-mix(in srgb,var(--text) 22%,var(--border))}
.rx-chip.is-on{background:var(--accent-soft);border-color:var(--accent-mid);color:var(--accent);font-weight:600}
.rx-chip.is-zero:not(.is-on){color:var(--muted)}
.rx-chip.is-zero:not(.is-on) .rx-dot{opacity:.45}
.rx-chip-count{font-weight:600;font-variant-numeric:tabular-nums;color:inherit}
.rx-chip.is-filter{max-width:min(280px,100%);min-width:0;color:var(--text);background:var(--panel-alt)}
.rx-chip.is-filter .tf-icon{color:var(--muted)}
.rx-banner{flex:none;display:flex;align-items:center;gap:8px;padding:6px 12px 6px 14px;background:var(--info-soft);border-bottom:1px solid var(--border);font-size:12.5px;color:var(--text)}
.rx-banner>.tf-icon{color:var(--info)}
.rx-banner>span{flex:1;min-width:0}
.rx-listbody{container:rxlist / inline-size;background:var(--panel)}
.rx-list{min-width:0}
.rx-row,.rx-colhead{display:grid;grid-template-columns:36px 64px minmax(0,1fr) 148px 84px 92px 156px;align-items:center;column-gap:8px;padding:0 12px 0 6px}
.rx-colhead{position:sticky;top:0;z-index:3;height:34px;background:var(--panel-alt);border-bottom:1px solid var(--border);font:600 11px/1 Inter,sans-serif;color:var(--muted);text-transform:uppercase;letter-spacing:.05em}
.rx-quick-head{text-align:right}
.rx-group-head{position:sticky;top:34px;z-index:2;display:grid;grid-template-columns:36px 22px minmax(0,1fr) auto 96px 38px;align-items:center;column-gap:8px;height:36px;padding:0 12px 0 6px;background:var(--panel-alt);border-bottom:1px solid var(--border-soft);border-top:1px solid var(--border-soft);margin-top:-1px}
.rx-group-toggle{width:22px;height:22px;display:grid;place-items:center;padding:0;border:0;border-radius:var(--tf-radius-xs);background:none;color:var(--muted);cursor:pointer}
.rx-group-toggle:hover{background:var(--panel);color:var(--text)}
.rx-group-name{font-size:12.5px;font-weight:650;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rx-group-count{font:500 11px/1 Inter,sans-serif;color:var(--muted);white-space:nowrap;font-variant-numeric:tabular-nums}
.rx-group-bar{height:4px}
.rx-group-pct{font:600 11px/1 Inter,sans-serif;color:var(--muted);text-align:right;font-variant-numeric:tabular-nums}
.rx-row{min-height:44px;border-bottom:1px solid var(--border-soft);background:var(--panel);cursor:pointer;position:relative}
.rx-row:hover{background:var(--table-row-hover,var(--panel-alt))}
.rx-row.is-checked{background:color-mix(in srgb,var(--accent) 6%,var(--panel))}
.rx-row.is-active{background:var(--accent-soft);box-shadow:none}
.rx-row.is-missing .rx-row-title{color:var(--muted);font-style:italic}
.rx-row-main{display:flex;align-items:center;gap:6px;min-width:0}
.rx-row-title{flex:0 1 auto;min-width:0;padding:4px 0;border:0;background:none;text-align:left;cursor:pointer;color:var(--text);font:500 13px/1.35 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-radius:2px}
.rx-row.is-open .rx-row-title{font-weight:600}
.rx-flag{flex:none;display:inline-flex;align-items:center;gap:3px;color:var(--subtle)}
.rx-flag.is-bug{color:var(--danger)}
.rx-devdots .rx-dot{width:7px;height:7px}
.rx-col-assignee{display:flex;align-items:center;gap:7px;min-width:0;font-size:12px;color:var(--muted)}
.rx-colhead .rx-col-assignee{display:block}
.rx-avatar{flex:none;width:22px;height:22px;border-radius:50%;background:var(--accent-soft);color:var(--accent);font:600 10px/22px Inter,sans-serif;text-align:center;letter-spacing:0}
.rx-col-result{display:flex;align-items:center}
.rx-quick{display:flex;justify-content:flex-end;gap:2px}
.rx-mini{flex:none;width:28px;height:28px;display:grid;place-items:center;padding:0;border:1px solid transparent;border-radius:var(--tf-radius-xs);background:transparent;color:var(--subtle);cursor:pointer}
@media(hover:hover){.rx-mini:hover:not(:disabled){background:var(--panel);border-color:var(--border);color:var(--text)}}
.rx-mini:disabled{opacity:.5;cursor:progress}
.rx-mini.is-passed:hover{color:var(--st-passed)}.rx-mini.is-failed:hover{color:var(--st-failed)}.rx-mini.is-blocked:hover{color:var(--st-blocked)}
.rx-mini.is-retest:hover{color:var(--st-retest)}.rx-mini.is-skipped:hover{color:var(--st-skipped)}
.rx-mini.is-on.is-passed{background:var(--st-passed);border-color:var(--st-passed);color:var(--panel)}
.rx-mini.is-on.is-failed{background:var(--st-failed);border-color:var(--st-failed);color:var(--panel)}
.rx-mini.is-on.is-blocked{background:var(--st-blocked);border-color:var(--st-blocked);color:var(--panel)}
.rx-mini.is-on.is-retest{background:var(--st-retest);border-color:var(--st-retest);color:var(--panel)}
.rx-mini.is-on.is-skipped{background:var(--st-skipped);border-color:var(--st-skipped);color:var(--panel)}
@container rxlist (max-width:980px){
 .rx-row,.rx-colhead{grid-template-columns:36px 64px minmax(0,1fr) 132px 92px 156px}
 .rx-col-pri{display:none}
}
@container rxlist (max-width:800px){
 .rx-row,.rx-colhead{grid-template-columns:36px 60px minmax(0,1fr) 28px 88px 156px}
 .rx-col-assignee .tf-truncate{display:none}
 .rx-colhead .rx-col-assignee{visibility:hidden}
}
@container rxlist (max-width:640px){
 .rx-row,.rx-colhead{grid-template-columns:36px 60px minmax(0,1fr) 28px 88px}
 .rx-quick,.rx-quick-head{display:none}
}
@container rxlist (max-width:600px){
 .rx-row,.rx-colhead{grid-template-columns:32px 56px minmax(0,1fr) 88px;column-gap:6px;padding-right:10px}
 .rx-col-assignee{display:none}
 .rx-colhead .rx-col-assignee{display:none}
 .rx-group-head{grid-template-columns:32px 22px minmax(0,1fr) auto 38px;column-gap:6px}
 .rx-group-bar{display:none}
 .rx-row{min-height:48px;padding-top:4px;padding-bottom:4px}
 .rx-row-title{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;line-height:1.35}
}
.rx-listfoot{gap:10px;background:var(--panel)}
.rx-keyhint{display:inline-flex;align-items:center;gap:3px;border:0;background:none;padding:2px 4px;border-radius:var(--tf-radius-xs);color:var(--muted);font:400 11px/1 Inter,sans-serif;cursor:pointer;white-space:nowrap}
.rx-keyhint:hover{color:var(--text)}
.rx-keyhint kbd,.rx-keys kbd{font:500 10.5px/1 var(--tf-font-mono);color:var(--muted);background:var(--panel);border:1px solid var(--border);border-bottom-width:2px;border-radius:4px;padding:2px 5px;min-width:18px;text-align:center}
.rx-table-wrap{overflow:auto;max-width:100%}
.rx-table{width:100%;border-collapse:collapse;font-size:13px}
.rx-table th{position:sticky;top:0;z-index:1;height:34px;padding:0 12px;vertical-align:middle;background:var(--panel-alt);border-bottom:1px solid var(--border);text-align:left;font:600 11px/1 Inter,sans-serif;color:var(--muted);text-transform:uppercase;letter-spacing:.05em;white-space:nowrap}
.rx-table td{height:42px;padding:6px 12px;border-bottom:1px solid var(--border-soft);vertical-align:middle;white-space:nowrap}
.rx-table .is-num{text-align:right;font-variant-numeric:tabular-nums}
.rx-td-test{max-width:380px}
.rx-td-name{overflow:hidden;text-overflow:ellipsis}
.rx-td-sub{display:none;margin-top:3px;font-size:12px;color:var(--muted);overflow:hidden;text-overflow:ellipsis}
@container rxlist (max-width:640px){
 .rx-table :is(.rx-col-device,.rx-col-time),.rx-td-cls,.rx-link-label{display:none}
 .rx-td-sub{display:block}
 .rx-table td,.rx-table th{padding-left:8px;padding-right:8px}
 .rx-td-test{max-width:42vw}
}
.rx-td-links{display:flex;gap:4px;justify-content:flex-end}
.rx-linkbtn{border:0;background:none;padding:2px;cursor:pointer;border-radius:3px}
.rx-linkbtn:hover{text-decoration:underline}

/* ── Inspector: execute the selected case ── */
.rx-wb .rx-inspector{width:var(--tf-inspector-w,min(560px,44%));container:rxinsp / inline-size;background:var(--panel)}
.rx-insp-head{gap:4px;padding:8px 8px 8px 16px}
.rx-insp-pos{font-size:12px;color:var(--muted);margin-left:6px;white-space:nowrap;font-variant-numeric:tabular-nums}
.rx-insp-body{background:var(--panel)}
.rx-insp-inner{display:flex;flex-direction:column;gap:22px;padding:18px 20px 28px;max-width:900px;margin:0 auto}
.rx-insp-title{margin:0 0 10px;font-size:17px;font-weight:650;line-height:1.35;letter-spacing:-.012em;color:var(--text);overflow-wrap:anywhere}
.rx-insp-badges{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.rx-insp-badges a.tf-ref{text-decoration:none;color:var(--accent)}
.rx-insp-path,.rx-insp-last{display:flex;align-items:center;gap:6px;margin-top:8px;font-size:12px;color:var(--muted);min-width:0}
.rx-insp-last{margin-top:4px}
.rx-insp-path .tf-icon,.rx-insp-last .tf-icon{color:var(--subtle)}
.rx-sec{display:flex;flex-direction:column;gap:8px;min-width:0}
.rx-sec-head{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:24px}
.rx-sec-label{margin:0;display:flex;align-items:center;gap:6px;font:600 11px/1.2 Inter,sans-serif;color:var(--muted);text-transform:uppercase;letter-spacing:.06em}
.rx-sec-meta{font-size:12px;color:var(--muted);text-align:right}
.rx-prose{font-size:13px;line-height:1.55;color:var(--text);white-space:pre-wrap;overflow-wrap:anywhere}
.rx-expected{padding:10px 12px;background:var(--panel-alt);border:1px solid var(--border-soft);border-radius:var(--tf-radius-sm)}
.rx-steps{list-style:none;margin:0;padding:0;border:1px solid var(--border);border-radius:var(--tf-radius);overflow:hidden}
.rx-step{display:grid;grid-template-columns:26px minmax(0,1fr) auto;column-gap:10px;row-gap:8px;align-items:start;padding:12px 10px 12px 12px;border-bottom:1px solid var(--border-soft);background:var(--panel)}
.rx-step:last-child{border-bottom:0}
.rx-step.is-failed{background:color-mix(in srgb,var(--st-failed) 5%,var(--panel))}
.rx-step.is-blocked{background:color-mix(in srgb,var(--st-blocked) 6%,var(--panel))}
.rx-step-num{width:24px;height:24px;display:grid;place-items:center;border-radius:50%;background:var(--panel-alt);border:1px solid var(--border);color:var(--text);font:600 12px/1 Inter,sans-serif;font-variant-numeric:tabular-nums}
.rx-step.is-passed .rx-step-num{background:var(--st-passed-soft);border-color:color-mix(in srgb,var(--st-passed) 40%,transparent);color:var(--st-passed)}
.rx-step.is-failed .rx-step-num{background:var(--st-failed-soft);border-color:color-mix(in srgb,var(--st-failed) 40%,transparent);color:var(--st-failed)}
.rx-step.is-blocked .rx-step-num{background:var(--st-blocked-soft);border-color:color-mix(in srgb,var(--st-blocked) 40%,transparent);color:var(--st-blocked)}
.rx-step-main{min-width:0;display:flex;flex-direction:column;gap:6px}
.rx-step-action{font-size:13px;line-height:1.5;color:var(--text);overflow-wrap:anywhere;padding-top:2px;white-space:pre-wrap}
.rx-step-expected{display:flex;gap:8px;font-size:12.5px;line-height:1.5;color:var(--muted);overflow-wrap:anywhere;white-space:pre-wrap}
.rx-step-exp-label{flex:none;font:600 10.5px/1.9 Inter,sans-serif;text-transform:uppercase;letter-spacing:.05em;color:var(--muted)}
.rx-step-tools{display:flex;align-items:center;gap:2px}
.rx-step-tools .rx-mini{width:26px;height:26px;color:var(--muted)}
.rx-step-sep{width:1px;height:16px;background:var(--border);margin:0 3px}
.rx-step-comments{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px}
.rx-step-comments li{display:flex;flex-wrap:wrap;gap:2px 8px;align-items:baseline;padding:6px 8px;background:var(--panel-alt);border-radius:var(--tf-radius-xs);font-size:12.5px}
.rx-step-comment-text{color:var(--text);overflow-wrap:anywhere}
.rx-step-comment-meta{font-size:11px;color:var(--muted)}
.rx-step-note{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.app-shell .rx-step-note .input{flex:1 1 180px;min-height:30px;height:30px;padding:4px 8px}
.rx-evidence-chips{display:flex;flex-wrap:wrap;gap:4px}
.rx-file-chip{display:inline-flex;align-items:center;gap:4px;max-width:220px;height:22px;padding:0 7px;border-radius:var(--tf-radius-xs);background:var(--panel-alt);box-shadow:inset 0 0 0 1px var(--border);font-size:11.5px;color:var(--text);text-decoration:none}
.rx-file-chip span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rx-file-chip:hover{color:var(--accent)}
.rx-result-form .textarea{min-height:76px;resize:vertical}
.rx-result-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.rx-defects{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.rx-defects a.tf-ref{text-decoration:none;color:var(--accent);gap:4px}
.rx-dropzone{border-radius:var(--tf-radius-sm);outline:2px dashed transparent;outline-offset:6px;transition:outline-color .12s,background-color .12s}
.rx-dropzone.is-over{outline-color:var(--accent);background:var(--accent-soft)}
.rx-evidence{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:8px}
.rx-evidence-item{display:flex;align-items:center;gap:2px;min-width:0;padding:4px 4px 4px 4px;border:1px solid var(--border);border-radius:var(--tf-radius-sm);background:var(--panel)}
.rx-evidence-link{flex:1;min-width:0;display:flex;align-items:center;gap:8px;color:var(--text);text-decoration:none;font-size:12px;border-radius:var(--tf-radius-xs)}
.rx-evidence-link:hover .rx-evidence-name{color:var(--accent);text-decoration:underline}
.rx-evidence-link img,.rx-evidence-icon{flex:none;width:36px;height:36px;border-radius:4px;object-fit:cover;background:var(--panel-alt)}
.rx-evidence-icon{display:grid;place-items:center;color:var(--muted)}
.rx-evidence-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rx-devices{list-style:none;margin:0;padding:0;border:1px solid var(--border);border-radius:var(--tf-radius-sm)}
.rx-devices li{display:flex;align-items:center;gap:8px;padding:6px 8px 6px 12px;border-bottom:1px solid var(--border-soft);font-size:12.5px;flex-wrap:wrap}
.rx-devices li:last-child{border-bottom:0}
.rx-device-name{flex:1;min-width:0;font-weight:500}
.rx-script{border:1px solid var(--border);border-radius:var(--tf-radius-sm);overflow:hidden}
.rx-script-head{display:flex;align-items:center;gap:8px;padding:6px 8px;background:var(--panel-alt);border-bottom:1px solid var(--border-soft);font-size:12px}
.rx-script-file{flex:1;font-family:var(--tf-font-mono);color:var(--muted)}
.rx-script .rx-code{border:0;border-radius:0}
.rx-code{margin:0;padding:12px;max-height:280px;overflow:auto;white-space:pre;font:12px/1.55 var(--tf-font-mono);color:var(--text);background:var(--panel-alt);border:1px solid var(--border);border-radius:var(--tf-radius-sm)}
.rx-insp-foot{gap:6px;padding:10px 12px;background:var(--panel);justify-content:center}
.rx-rbtn{flex:1 1 0;min-width:0;max-width:200px;height:38px;display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:0 8px;border:1px solid var(--border);border-radius:var(--tf-radius-sm);background:var(--panel);color:var(--text);font:600 13px/1 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;cursor:pointer;white-space:nowrap}
.rx-rbtn-label{overflow:hidden;text-overflow:ellipsis}
.rx-rbtn.is-passed .tf-icon{color:var(--st-passed)}.rx-rbtn.is-failed .tf-icon{color:var(--st-failed)}.rx-rbtn.is-blocked .tf-icon{color:var(--st-blocked)}
.rx-rbtn.is-retest .tf-icon{color:var(--st-retest)}.rx-rbtn.is-skipped .tf-icon{color:var(--st-skipped)}
@media(hover:hover){
 .rx-rbtn.is-passed:hover{border-color:var(--st-passed);background:var(--st-passed-soft)}
 .rx-rbtn.is-failed:hover{border-color:var(--st-failed);background:var(--st-failed-soft)}
 .rx-rbtn.is-blocked:hover{border-color:var(--st-blocked);background:var(--st-blocked-soft)}
 .rx-rbtn.is-retest:hover{border-color:var(--st-retest);background:var(--st-retest-soft)}
 .rx-rbtn.is-skipped:hover{border-color:var(--st-skipped);background:var(--st-skipped-soft)}
}
.rx-rbtn.is-on.is-passed{background:var(--st-passed);border-color:var(--st-passed)}
.rx-rbtn.is-on.is-failed{background:var(--st-failed);border-color:var(--st-failed)}
.rx-rbtn.is-on.is-blocked{background:var(--st-blocked);border-color:var(--st-blocked)}
.rx-rbtn.is-on.is-retest{background:var(--st-retest);border-color:var(--st-retest)}
.rx-rbtn.is-on.is-skipped{background:var(--st-skipped);border-color:var(--st-skipped)}
.rx-rbtn.is-on,.rx-rbtn.is-on .tf-icon{color:var(--panel)}
.rx-kbd{font:500 10px/1 var(--tf-font-mono);color:var(--muted);border:1px solid var(--border);border-radius:3px;padding:2px 4px}
.rx-rbtn.is-on .rx-kbd{color:inherit;border-color:currentColor;opacity:.75}
@container rxinsp (max-width:620px){.rx-kbd{display:none}}
@container rxinsp (max-width:540px){
 .rx-result-grid{grid-template-columns:1fr 1fr}
 .rx-result-grid>:last-child{grid-column:1 / -1}
 .rx-step{grid-template-columns:26px minmax(0,1fr)}
 .rx-step-tools{grid-column:2}
 .rx-insp-inner{padding:16px 16px 24px}
}
@container rxinsp (max-width:480px){
 .rx-rbtn{flex-direction:column;height:48px;gap:4px;font-size:11px;padding:0 2px}
 .rx-insp-foot{gap:4px;padding:8px}
}

/* Responsive placement of the panes. The layout class comes from the
   workbench's measured width (rxLayoutOf): is-phone · is-compact (sections
   become a drawer) · is-mid (inspector overlays the list) · is-dock
   (inspector docked; sections hide while inspecting) · is-full. */
.rx-backdrop{position:absolute;inset:0;z-index:19;background:rgba(9,22,28,.32)}
.rx-backdrop.for-drawer{z-index:21}
.rx-side.is-drawer{position:absolute;top:0;left:0;bottom:0;z-index:22;width:min(300px,calc(100% - 48px));box-shadow:var(--shadow-lg)}
.rxp-wb{position:relative}
@media(min-width:901px){
 .rx-wb.is-mid .rx-side:not(.is-drawer){--tf-pane-w:240px}
 .rx-wb.is-overlay.is-inspecting:not(.is-expanded) .rx-inspector{position:absolute;top:0;right:0;bottom:0;z-index:20;width:min(var(--tf-inspector-w,560px),calc(100% - 48px));box-shadow:var(--shadow-lg)}
 .rx-wb.is-expanded :is(.rx-side,.rx-grow,.rx-splitter,.rx-backdrop){display:none}
 .rx-wb.is-docked .rx-inspector{max-width:calc(100% - 400px)}
 .rx-wb.is-expanded .rx-inspector{position:static;flex:1 1 auto;width:auto;max-width:none;border-left:0;box-shadow:none}
}
@media(max-width:900px){
 .rx-wb .rx-hide-phone{display:none}
 .rx-side.is-drawer{position:static;width:auto;box-shadow:none;border:1px solid var(--border);border-radius:var(--tf-radius);margin-bottom:12px}
 .rx-wb .rx-grow{border:1px solid var(--border);border-radius:var(--tf-radius);overflow:clip}
 .rx-wb .rx-inspector{position:fixed;inset:0;z-index:95;width:auto;border:0;display:flex;flex-direction:column;background:var(--panel)}
 .rx-wb .rx-inspector .tf-pane-body{overflow:auto;flex:1 1 auto;min-height:0;overscroll-behavior:contain}
 .rx-wb .rx-insp-head{padding-top:calc(8px + env(safe-area-inset-top,0px))}
 .rx-wb .rx-insp-foot{padding-bottom:calc(10px + env(safe-area-inset-bottom,0px))}
 .rx-step-tools .rx-mini{width:34px;height:34px}
 .rx-colhead,.rx-group-head{position:static}
 .rx-listfoot .rx-keyhint{display:none}
 .rx-toolbar .tf-search{flex-basis:100%;max-width:none;order:3}
 .rx-head-facts{padding-left:0}
 .rx-head-name{max-width:none}
 .rx-head-bar{width:110px}
}
@media(max-width:540px){.rx-hide-sm{display:none}}
body.rx-resizing{cursor:col-resize;user-select:none}
.rx-missing{max-width:560px;margin:48px auto}

/* ── Case picker (runs/<id>/picker and the Add cases dialog) ── */
.rxp-wb .rx-side{--tf-pane-w:256px}
.rxp-colhead{display:flex;align-items:center;gap:8px;height:36px;padding:0 12px 0 6px;background:var(--panel-alt);border-bottom:1px solid var(--border);flex:none}
.rxp-colhead .rx-check{width:36px}
.rx-colhead-label{font-size:12px;color:var(--muted);flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rxp-wb .rx-group-head{top:0;grid-template-columns:36px 22px minmax(0,1fr) auto}
.rxp-row{display:grid;grid-template-columns:36px 64px minmax(0,1fr) 104px 84px 76px;align-items:center;column-gap:8px;min-height:42px;padding:0 12px 0 6px;border-bottom:1px solid var(--border-soft);background:var(--panel);cursor:pointer}
.rxp-row:hover{background:var(--table-row-hover,var(--panel-alt))}
.rxp-row.is-checked{background:var(--accent-soft)}
.rxp-row.is-inrun{cursor:default;background:var(--panel)}
.rxp-row.is-inrun :is(.rxp-title,.tf-id){color:var(--muted)}
.rxp-title{font-size:13px;font-weight:500;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.rxp-col-type{font-size:12px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rxp-col-state{display:flex;justify-content:flex-end}
.rxp-col-state .tf-badge{gap:4px}
@container rxlist (max-width:700px){
 .rxp-row{grid-template-columns:36px 60px minmax(0,1fr) 80px 72px}
 .rxp-col-type{display:none}
}
@container rxlist (max-width:480px){
 .rxp-row{grid-template-columns:32px 54px minmax(0,1fr) 64px;column-gap:6px;min-height:48px;padding-top:4px;padding-bottom:4px}
 .rxp-col-pri{display:none}
 .rxp-title{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;line-height:1.35}
}
.rx-pickfoot{gap:8px;min-height:56px;padding:8px 12px;background:var(--panel);flex-wrap:wrap}
.rx-pick-count{font-size:13px;color:var(--muted)}
.rx-pick-count strong{color:var(--text);font-variant-numeric:tabular-nums}
.rxp-dialog .rx-dialog-body{display:flex}
.rxp-dialog .rxp-wb{flex:1 1 auto;display:flex;min-height:0;min-width:0}
.rxp-dialog .tf-pane{min-height:0}
.rxp-dialog .rx-side{border-right:1px solid var(--border)}
@media(max-width:900px){
 .rxp-wb{flex-direction:column}
 .rxp-dialog .rxp-wb .rx-side.is-drawer{max-height:40%;overflow:auto;margin:8px;border-radius:var(--tf-radius)}
 .rxp-dialog .rxp-wb .rx-grow{flex:1 1 auto;border:0;border-radius:0}
 .rxp-dialog .rx-listbody{overflow:auto}
 .rx-wb.rxp-wb .rx-pickfoot{position:sticky;bottom:calc(64px + env(safe-area-inset-bottom,0px));z-index:5;border-top:1px solid var(--border)}
}

/* ── Dialogs ── */
.rx-dialog-backdrop{position:fixed;inset:0;z-index:100;display:flex;align-items:center;justify-content:center;padding:24px;background:rgba(9,22,28,.5)}
.rx-dialog{display:flex;flex-direction:column;width:min(560px,100%);max-height:min(88dvh,900px);background:var(--panel);color:var(--text);border:1px solid var(--border);border-radius:var(--tf-radius);box-shadow:var(--shadow-lg);outline:none;min-height:0}
.rx-dialog-sm{width:min(460px,100%)}
.rx-dialog-lg{width:min(780px,100%)}
.rx-dialog-xl{width:min(1180px,100%);height:min(86dvh,880px)}
.rx-dialog-head{flex:none;display:flex;align-items:flex-start;gap:6px;padding:14px 12px 12px 20px;border-bottom:1px solid var(--border)}
.rx-dialog-titles{flex:1;min-width:0;padding-top:3px}
.rx-dialog-title{margin:0;font-size:16px;font-weight:650;letter-spacing:-.01em;color:var(--text)}
.rx-dialog-sub{margin:3px 0 0;font-size:12px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rx-dialog-body{flex:1 1 auto;min-height:0;overflow:auto;display:flex;flex-direction:column;gap:16px;padding:18px 20px}
.rx-dialog-body.flush{padding:0;gap:0;overflow:hidden}
.rx-dialog-foot{flex:none;display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px;padding:12px 20px;border-top:1px solid var(--border)}
.rx-foot-hint{margin-right:auto;font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}
.rx-foot-hint.is-over{color:var(--danger);font-weight:600}
.rx-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.rx-form .full,.rx-field.full{grid-column:1 / -1}
.rx-field{display:flex;flex-direction:column;gap:6px;min-width:0}
.rx-field-label{font-size:12px;font-weight:600;color:var(--muted);padding:0}
.rx-field-hint{font-size:11.5px;color:var(--muted)}
.rx-req{color:var(--danger)}
.rx-form-error{display:flex;align-items:center;gap:6px;font-size:12.5px;color:var(--danger)}
.rx-choice-group{border:0;margin:0;padding:0;min-width:0;display:flex;flex-direction:column;gap:8px}
.rx-choice-row{display:flex;flex-wrap:wrap;gap:6px}
.rx-choice-chip{display:inline-flex;align-items:center;gap:6px;padding:4px 8px 4px 7px;border:1px solid var(--border);border-radius:var(--tf-radius-sm);cursor:pointer;background:var(--panel)}
.rx-choice-chip.is-on{border-color:var(--accent);box-shadow:var(--tf-focus)}
.rx-choice-chip input,.rx-choice-line input{margin:0;accent-color:var(--accent)}
.rx-choice-line{display:flex;align-items:center;gap:10px;padding:9px 12px;border:1px solid var(--border);border-radius:var(--tf-radius-sm);cursor:pointer;font-size:13px}
.rx-choice-line:has(input:checked){border-color:var(--accent);background:var(--accent-soft)}
.rx-choice-line.is-disabled{opacity:.55;cursor:not-allowed}
.rx-choice-text{flex:1}
.rx-choice-count{font-weight:600;font-variant-numeric:tabular-nums;color:var(--muted)}
.rx-token{display:flex;flex-direction:column;align-items:flex-start;gap:8px}
.rx-token-row{align-self:stretch}
.rx-token-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.rx-token-value{flex:1 1 260px;min-width:0;padding:7px 10px;font:12px/1.4 var(--tf-font-mono);background:var(--panel-alt);border:1px solid var(--border);border-radius:var(--tf-radius-xs);overflow-wrap:anywhere;color:var(--text)}
.rx-snippet{display:flex;flex-direction:column;gap:6px}
.rx-snippet-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.rx-keys{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:8px 16px;margin:0;align-items:center}
.rx-keys dt{display:flex;gap:4px}
.rx-keys dd{margin:0;font-size:13px;color:var(--text)}
@media(max-width:540px){
 .rx-dialog-backdrop{padding:0;align-items:flex-end}
 .rx-dialog,.rx-dialog-sm,.rx-dialog-lg{width:100%;max-height:94dvh;border-radius:12px 12px 0 0;border-bottom:0}
 .rx-dialog-xl{width:100%;height:94dvh;border-radius:12px 12px 0 0}
 .rx-dialog-foot{padding-bottom:calc(12px + env(safe-area-inset-bottom,0px))}
 .rx-form{grid-template-columns:1fr}
}

/* Phones: run page (header card, chips, grouped rows, Continue bar) and
   the execute page with big Pass / Fail / Blocked that advance. */
@media(max-width:900px){
 .rx-m{display:flex;flex-direction:column}
 .rx-m .tf-m-backbar{justify-content:space-between}
 .rx-m-card{display:flex;flex-direction:column;gap:8px;margin:0 0 14px;padding:16px;border:1px solid var(--border);border-radius:12px;background:var(--panel)}
 .rx-m-card-top{display:flex;align-items:center;gap:8px;min-width:0;font-size:12px;color:var(--muted)}
 .rx-m-fact{display:inline-flex;align-items:center;gap:4px;min-width:0}
 .rx-m-title{margin:0;font-size:21px;font-weight:700;letter-spacing:-.02em;line-height:1.25;color:var(--text)}
 .rx-m-bar{height:8px;border-radius:4px}
 .rx-m-figs{display:flex;align-items:baseline;gap:8px;font-size:13px;color:var(--muted)}
 .rx-m-pct{font-size:22px;font-weight:700;color:var(--text)}
 .rx-m-counts{display:flex;flex-wrap:wrap;gap:4px 14px;font-size:13px;color:var(--muted)}
 .rx-m-count{display:inline-flex;align-items:center;gap:6px}
 .rx-m .tf-m-chips .tf-m-chip{gap:6px}
 .rx-m-group{top:calc(56px + env(safe-area-inset-top,0px));margin:0}
 .rx-m-list{border-top:0}
 .rx-m-row{min-height:68px}
 .rx-m-row .tf-m-row-lead .rx-dot{width:10px;height:10px}
 .rx-m .tf-m-actionbar .btn{min-height:48px;font-size:16px}
 .rx-m .rx-banner{margin:0 0 12px}
 /* Execute page: the inspector fills the screen; its own head is the back bar */
 .rx-m-exec .rx-inspector{position:fixed;inset:0;z-index:90;width:auto;max-width:none;border:0;display:flex;flex-direction:column;background:var(--panel);padding-top:env(safe-area-inset-top,0px);container:rxinsp / inline-size}
 .rx-m-exec .rx-insp-head{min-height:56px;padding:6px 8px 6px 14px}
 .rx-m-exec .rx-insp-head .btn{min-width:44px;min-height:44px}
 .rx-m-exec .rx-insp-body{flex:1 1 auto;overflow:auto;-webkit-overflow-scrolling:touch}
 .rx-m-exec .rx-insp-title{font-size:20px}
 .rx-m-exec :is(.input,.select,.textarea){font-size:16px;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
 .rx-m-exec .rx-hide-phone{display:none}
 .rx-m-resultbar{flex:none;display:flex;gap:8px;padding:10px 12px calc(10px + env(safe-area-inset-bottom,0px));border-top:1px solid var(--border);background:var(--panel)}
 .rx-m-rbtn{flex:1 1 0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-height:60px;border-radius:12px;border:1px solid var(--border);background:var(--panel);color:var(--text);font:650 14px/1 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;cursor:pointer;-webkit-tap-highlight-color:transparent}
 .rx-m-rbtn.is-passed{color:var(--st-passed);border-color:color-mix(in srgb,var(--st-passed) 45%,var(--border))}
 .rx-m-rbtn.is-failed{color:var(--st-failed);border-color:color-mix(in srgb,var(--st-failed) 45%,var(--border))}
 .rx-m-rbtn.is-blocked{color:var(--st-blocked);border-color:color-mix(in srgb,var(--st-blocked) 45%,var(--border))}
 .rx-m-rbtn.is-on.is-passed{background:var(--st-passed);border-color:var(--st-passed);color:#fff}
 .rx-m-rbtn.is-on.is-failed{background:var(--st-failed);border-color:var(--st-failed);color:#fff}
 .rx-m-rbtn.is-on.is-blocked{background:var(--st-blocked);border-color:var(--st-blocked);color:#fff}
 .rx-m-rbtn:active{transform:scale(.98)}
 .rx-m-resultbar .tf-menu .rx-m-rmore{width:56px;min-height:60px;border-radius:12px}
}

.rx-insp-badges .bt-rxchips{margin-left:2px}
.rx-flag.is-retest{color:var(--st-retest)}
.rx-inspector .bt-banner{margin-bottom:4px}
/* @endregion run-execution */



/* @region dashboard-projects — dashboard and projects */
/* Header band: project · last activity; link-buttons */
.dp-headmeta{display:inline-flex;align-items:center;flex-wrap:wrap;gap:4px 8px;font-size:13px;color:var(--muted);min-width:0}
.dp-headmeta-project{display:inline-flex;align-items:center;gap:6px;min-width:0;max-width:300px;color:var(--text);font-weight:600}
.dp-headmeta-project>.tf-icon{color:var(--muted)}
.dp-headmeta-sep{color:var(--muted);opacity:.7}
a.btn.dp-linkbtn,.dash a.btn{text-decoration:none}

/* Shared: result bar, count legend, avatar */
.dp-bar{height:6px}
.dp-counts{display:flex;flex-wrap:wrap;gap:2px 10px;font-size:12px;line-height:1.25;font-variant-numeric:tabular-nums;color:var(--text);min-width:0}
.dp-count{display:inline-flex;align-items:center;gap:5px;font-weight:600;white-space:nowrap}
.dp-count>i{width:7px;height:7px;border-radius:2px;flex:none;background:currentColor}
.dp-count.is-passed>i{background:var(--st-passed)}.dp-count.is-failed>i{background:var(--st-failed)}
.dp-count.is-blocked>i{background:var(--st-blocked)}.dp-count.is-retest>i{background:var(--st-retest)}
.dp-count.is-skipped>i{background:var(--st-skipped)}
.dp-count.is-failed{color:var(--st-failed)}
.dp-count.is-untested{color:var(--muted);font-weight:500}
.dp-count.is-untested>i{background:var(--st-untested-soft);box-shadow:inset 0 0 0 1px var(--st-untested)}
.dp-avatar{flex:none;width:24px;height:24px;border-radius:50%;display:grid;place-items:center;font:700 10px/1 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;letter-spacing:.02em;color:var(--accent);background:var(--accent-soft);box-shadow:inset 0 0 0 1px var(--accent-mid)}
.dash-spinner{flex:none;display:inline-block;width:12px;height:12px;border-radius:50%;border:2px solid var(--border);border-top-color:var(--accent);animation:dpSpin .8s linear infinite}
@keyframes dpSpin{to{transform:rotate(360deg)}}

/* ── Dashboard: stat strip + 12-column grid of panels ── */
.dash{container:dash/inline-size;display:flex;flex-direction:column;gap:16px;min-width:0;max-width:1680px;margin:0 auto}
.dash-stats{grid-template-columns:repeat(5,minmax(0,1fr))}
.dash-stat{display:flex;flex-direction:column;align-items:stretch;min-width:0;width:100%;margin:0;padding:14px 16px 15px;border:0;border-radius:0;text-align:left;font:inherit;color:inherit;text-decoration:none;cursor:pointer;transition:background-color .12s}
.dash-stat:hover{background:var(--panel-alt)}
.dash-stat:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--accent);position:relative;z-index:1}
.dash-stat .tf-stat-label{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dash-stat .tf-stat-value{font-size:24px;line-height:1.15;margin-top:6px}
.dash-stat.is-danger .tf-stat-value{color:var(--st-failed)}
.dash-stat-sub{display:block;margin-top:3px;font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dash-stat-meter{display:block;height:4px;margin-top:10px;border-radius:2px;overflow:hidden;background:var(--panel-alt);box-shadow:inset 0 0 0 1px var(--border-soft)}
.dash-stat-meter>span{display:block;height:100%;border-radius:2px;background:var(--accent)}
.dash-grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:16px}
.dash-grid>.tf-panel{grid-column:1/-1;margin-top:0;min-width:0}
@container dash (min-width:900px){
 .dash-grid>.dash-span-8{grid-column:span 8}
 .dash-grid>.dash-span-4{grid-column:span 4}
}
@container dash (max-width:899px){
 .dash-stats{grid-template-columns:repeat(6,minmax(0,1fr))}
 .dash-stats>.dash-stat{grid-column:span 2}
 .dash-stats>.dash-stat:nth-child(n+4){grid-column:span 3}
}
@container dash (max-width:599px){
 .dash-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
 .dash-stats>.dash-stat,.dash-stats>.dash-stat:nth-child(n+4){grid-column:auto}
 .dash-stats>.dash-stat:last-child{grid-column:1/-1}
}
.dash-panel{container-type:inline-size;display:flex;flex-direction:column;overflow:hidden}
.dash-panel>.tf-panel-body{flex:1 1 auto;display:flex;flex-direction:column;min-height:0}
.dash-panel .tf-panel-title>.tf-icon{color:var(--muted)}
.dash-panel .tf-panel-head{min-height:48px;padding:8px 12px 8px 16px}
.dash-panel-note{font-size:12px;color:var(--muted);white-space:nowrap}
.dash-viewall{gap:2px;padding-right:6px}
.dash .tf-empty.dash-empty,.dash-cov-card .dash-empty,.dash-trend-card .dash-empty{padding:28px 20px;margin:auto 0}

/* Div tables (role=table) that drop columns as their panel narrows */
.dash-table{min-width:0}
.dash-tr{display:grid;grid-template-columns:var(--dash-cols);align-items:center;column-gap:16px;padding:0 16px;min-height:52px;border-bottom:1px solid var(--border-soft)}
.dash-thead{min-height:34px;background:var(--panel-alt);border-bottom:1px solid var(--border)}
.dash-th{font:600 11px/1 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dash-tr:not(.dash-thead){transition:background-color .12s}
.dash-tr:not(.dash-thead):hover{background:var(--panel-alt)}
.dash-runs-table .dash-tr:not(.dash-thead),.dash-fails-table .dash-tr:not(.dash-thead){cursor:pointer}
.dash-td{min-width:0}
.dash-name{display:block;min-width:0;font-size:13px;font-weight:600;line-height:1.35;color:var(--text);text-decoration:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
a.dash-name:hover,.dash-table .dash-tr:hover .dash-name{color:var(--accent)}
.dash a:focus-visible{outline:none;box-shadow:var(--tf-focus);border-radius:3px}
.dash-sub{display:flex;align-items:center;gap:3px 12px;margin-top:3px;min-width:0;font-size:12px;line-height:1.3;color:var(--muted);white-space:nowrap;overflow:hidden}
.dash-sub .tf-id{font-size:11.5px;flex:none}
.dash-sub .tf-badge{height:18px;padding:0 6px;font-size:10.5px;flex:none}
.dash-sub-item{display:inline-flex;align-items:center;gap:4px;min-width:0;max-width:220px;flex:0 1 auto}
.dash-sub-item>.tf-icon{color:var(--muted);opacity:.8;flex:none}
a.dash-sub-link{color:var(--muted);text-decoration:none}
a.dash-sub-link:hover{color:var(--accent)}
.dash-sub-who{display:none}
.dash-tfoot{flex:none;padding:10px 16px;border-top:1px solid var(--border-soft);font-size:12px;color:var(--muted)}
.dash-tfoot a{color:var(--accent);font-weight:600;text-decoration:none}
.dash-tfoot a:hover{text-decoration:underline}
.dash-table .dash-tr:last-child{border-bottom:0}
.dash-table>.dash-tfoot{border-top:1px solid var(--border-soft)}

/* Active runs */
.dash-runs-table{--dash-cols:minmax(200px,1.7fr) minmax(170px,1.3fr) 76px minmax(110px,.8fr) 76px}
.dash-runs-table .dash-td.c-run{padding:9px 0}
.dash-runs-table .dash-td.c-results{display:flex;flex-direction:column;gap:6px;padding:4px 0}
.dash-runs-table .dash-td.c-progress{display:flex;flex-direction:column;gap:2px;white-space:nowrap;font-variant-numeric:tabular-nums}
.dash-pct{font-size:13px;font-weight:650;color:var(--text)}
.dash-frac{font-size:11.5px;color:var(--muted)}
.dash-runs-table .dash-td.c-assignee{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--text)}
.dash-runs-table .dash-td.c-created{font-size:12.5px;color:var(--muted);white-space:nowrap;font-variant-numeric:tabular-nums}
@container (max-width:780px){
 .dash-runs-table{--dash-cols:minmax(180px,1.6fr) minmax(160px,1.25fr) 76px minmax(100px,.8fr)}
 .dash-runs-table :is(.dash-td,.dash-th).c-created{display:none}
}
@container (max-width:640px){
 .dash-runs-table{--dash-cols:minmax(0,1.5fr) minmax(140px,1fr) 76px}
 .dash-runs-table :is(.dash-td,.dash-th).c-assignee,.dash-runs-table .dash-sub-config{display:none}
 .dash-runs-table .dash-sub-who{display:inline-flex}
}
@container (max-width:420px){
 .dash-runs-table .dash-thead{display:none}
 .dash-runs-table .dash-tr{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"run progress" "results results";row-gap:2px;padding:10px 16px}
 .dash-runs-table .dash-td.c-run{grid-area:run;padding:0}
 .dash-runs-table .dash-td.c-progress{grid-area:progress;align-items:flex-end}
 .dash-runs-table .dash-td.c-results{grid-area:results;padding:6px 0 2px}
 .dash-runs-table .dash-sub{flex-wrap:wrap}
 .dash-runs-table .dash-sub-config{display:inline-flex}
}

/* Milestones due */
.dash-ms-list{list-style:none;margin:0;padding:0}
.dash-ms-item{display:flex;flex-direction:column;gap:7px;padding:12px 16px;border-bottom:1px solid var(--border-soft)}
.dash-ms-item:last-child{border-bottom:0}
.dash-ms-top{display:flex;align-items:center;gap:8px;min-width:0}
.dash-ms-top>.dash-name{flex:1 1 auto}
.dash-ms-top>.tf-badge{flex:none}
.dash-ms-item .dash-sub{margin-top:0;flex-wrap:wrap}
.dash-ms-item.is-closed{gap:4px;padding-top:10px;padding-bottom:10px}
.dash-ms-item.is-closed .dash-name{font-weight:500;color:var(--muted)}
.dash-ms-closed{margin-top:auto;border-top:1px solid var(--border-soft);background:var(--panel-alt)}
.dash-ms-closed .dash-ms-item{border-bottom-color:var(--border)}
.dash-ms-heading{padding:10px 16px 0;font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}

/* Recent failures */
.dash-fails{outline:none}
.dash-fails:focus-visible{box-shadow:var(--tf-focus)}
.dash-fails-table{--dash-cols:56px minmax(0,1fr) 78px 112px}
.dash-fails-table.has-defects{--dash-cols:56px minmax(0,1fr) 78px 112px 92px}
.dash-fails-table .c-case{padding:8px 0}
.dash-fails-table .c-id .tf-id{text-decoration:none}
.dash-fails-table .c-history{display:flex;align-items:center;gap:8px;white-space:nowrap}
.dash-history{display:inline-flex;align-items:center;gap:3px}
.dash-history>i{display:block;width:8px;height:16px;border-radius:2px;background:var(--st-untested-soft);box-shadow:inset 0 0 0 1px var(--border)}
.dash-history>i.is-passed{background:var(--st-passed);box-shadow:none}.dash-history>i.is-failed{background:var(--st-failed);box-shadow:none}
.dash-history>i.is-blocked{background:var(--st-blocked);box-shadow:none}.dash-history>i.is-retest{background:var(--st-retest);box-shadow:none}
.dash-history>i.is-skipped{background:var(--st-skipped);box-shadow:none}
.dash-history-text{font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}
.dash-fails-table .c-defect .tf-ref{max-width:100%;overflow:hidden;text-overflow:ellipsis}
a.tf-ref{text-decoration:none}
a.tf-ref:hover{color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent-mid)}
@container (max-width:560px){
 .dash-fails-table,.dash-fails-table.has-defects{--dash-cols:52px minmax(0,1fr) 74px}
 .dash-fails-table .c-history,.dash-fails-table .c-defect{display:none}
}
@container (max-width:380px){
 .dash-fails-table,.dash-fails-table.has-defects{--dash-cols:48px minmax(0,1fr)}
 .dash-fails-table .c-priority{display:none}
}

/* Activity timeline */
.dash-act .tf-panel-body{min-height:0}
.dash-activity{flex:1 1 auto;display:flex;flex-direction:column;min-width:0}
.dash-timeline{list-style:none;margin:0;padding:8px 16px 4px}
.dash-tl-item{position:relative;display:flex;gap:12px;padding:7px 0}
.dash-tl-item::before{content:"";position:absolute;left:13px;top:37px;bottom:-7px;width:1px;background:var(--border)}
.dash-tl-item:last-child::before{display:none}
.dash-tl-icon{position:relative;z-index:1;flex:none;width:28px;height:28px;border-radius:50%;display:grid;place-items:center;color:var(--muted);background:var(--panel);box-shadow:inset 0 0 0 1px var(--border)}
.dash-tl-item.is-success .dash-tl-icon{color:var(--success);background:var(--success-soft);box-shadow:none}
.dash-tl-item.is-danger .dash-tl-icon{color:var(--danger);background:var(--danger-soft);box-shadow:none}
.dash-tl-body{flex:1 1 auto;min-width:0;padding-top:1px}
.dash-tl-title{display:block;font-size:13px;font-weight:600;line-height:1.35;color:var(--text);text-decoration:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
a.dash-tl-title:hover{color:var(--accent)}
.dash-tl-meta{display:flex;align-items:center;gap:6px;margin-top:2px;min-width:0;font-size:12px;line-height:1.3;color:var(--muted)}
.dash-tl-line{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dash-tl-time{flex:none;white-space:nowrap}
.dash-tl-time::before{content:"·";margin-right:6px}
.dash-tl-source{flex:none;height:18px;padding:0 6px;font-size:10.5px}
.dash-more{align-self:flex-start;margin:0 0 8px 56px}
.dash-tl-note{display:flex;align-items:center;gap:8px;margin-top:auto;padding:8px 12px 8px 16px;min-height:44px;border-top:1px solid var(--border-soft);background:var(--panel-alt);font-size:12px;color:var(--muted)}
.dash-tl-note>.tf-icon{flex:none;color:var(--muted)}
.dash-tl-note-text{flex:1 1 auto;min-width:0}
.dash-tl-note .btn{flex:none;margin-left:auto}

/* Trends: summary + chart */
.dash-trends-body{display:grid;grid-template-columns:184px minmax(0,1fr);gap:24px;padding:16px 20px 18px;min-width:0}
.dash-kpi-label{font-size:12px;color:var(--muted)}
.dash-kpi-value{margin-top:4px;font-size:32px;font-weight:650;line-height:1.1;letter-spacing:-.03em;font-variant-numeric:tabular-nums;color:var(--text)}
.dash-kpi-value.is-good{color:var(--st-passed)}.dash-kpi-value.is-bad{color:var(--st-failed)}
.dash-kpi-delta{margin-top:4px;font-size:12px;font-weight:650;color:var(--muted);font-variant-numeric:tabular-nums}
.dash-kpi-delta.is-up{color:var(--success)}.dash-kpi-delta.is-down{color:var(--danger)}
.dash-kpi-delta>span{font-weight:400;color:var(--muted)}
.dash-legend{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px 12px;margin:16px 0 0;font-size:12px}
.dash-legend dt{display:flex;align-items:center;gap:8px;margin:0;color:var(--muted)}
.dash-legend dt>i{width:8px;height:8px;border-radius:2px;flex:none}
.dash-legend dt.is-passed>i{background:var(--st-passed)}.dash-legend dt.is-failed>i{background:var(--st-failed)}
.dash-legend dt.is-blocked>i{background:var(--st-blocked)}.dash-legend dt.is-retest>i{background:var(--st-retest)}
.dash-legend dt.is-skipped>i{background:var(--st-skipped)}
.dash-legend dt.is-untested>i{background:var(--st-untested-soft);box-shadow:inset 0 0 0 1px var(--st-untested)}
.dash-legend dd{margin:0;text-align:right;font-weight:600;color:var(--text);font-variant-numeric:tabular-nums}
.dash-trends-chart{min-width:0;display:flex;flex-direction:column}
.dash-trends .tf-seg>button:focus-visible{outline:none;box-shadow:var(--tf-focus)}
@container (max-width:560px){
 .dash-trends-body{grid-template-columns:minmax(0,1fr);gap:16px;padding:14px 16px 16px}
 .dash-legend{grid-template-columns:repeat(3,auto minmax(0,1fr));gap:6px 8px}
 .dash-legend dd{text-align:left}
}
/* Chart: y axis + grid lines + one column per run (or per day) */
.dash-chart{--dash-plot:216px;--dash-xh:38px;position:relative;padding-left:38px;min-width:0}
.dash-chart.is-days{--dash-xh:22px}
.dash-chart-axis{position:absolute;left:0;top:0;width:32px;height:calc(var(--dash-plot) - var(--dash-xh));font-size:10.5px;color:var(--muted);font-variant-numeric:tabular-nums;text-align:right}
.dash-chart-axis>span{position:absolute;right:0;line-height:1}
.dash-chart-axis>span:nth-child(1){top:0}
.dash-chart-axis>span:nth-child(2){top:50%;transform:translateY(-50%)}
.dash-chart-axis>span:nth-child(3){bottom:0}
.dash-chart-plot{position:relative;height:var(--dash-plot);min-width:0}
.dash-chart-grid{position:absolute;left:0;right:0;top:0;height:calc(var(--dash-plot) - var(--dash-xh));pointer-events:none}
.dash-chart-grid>span{position:absolute;left:0;right:0;border-top:1px dashed var(--border)}
.dash-chart-grid>span:nth-child(1){top:0}.dash-chart-grid>span:nth-child(2){top:50%}.dash-chart-grid>span:nth-child(3){bottom:0;border-top-style:solid}
.dash-chart-cols{position:relative;display:flex;align-items:stretch;gap:8px;height:100%;margin:0;padding:0;list-style:none}
.dash-col-item{flex:1 1 0;min-width:0;display:flex;flex-direction:column;align-items:center}
.dash-col{display:flex;flex-direction:column;align-items:center;width:100%;height:100%;color:inherit;text-decoration:none;border-radius:4px}
.dash-col-bar{display:flex;flex-direction:column-reverse;width:min(30px,80%);overflow:hidden;border-radius:3px 3px 0 0;background:var(--st-untested-soft)}
.dash-chart.is-runs .dash-col-bar{flex:0 0 calc(var(--dash-plot) - var(--dash-xh))}
.dash-col-bar>span{display:block;flex:none;width:100%}
.dash-col-bar>.is-passed{background:var(--st-passed)}.dash-col-bar>.is-failed{background:var(--st-failed)}
.dash-col-bar>.is-blocked{background:var(--st-blocked)}.dash-col-bar>.is-retest{background:var(--st-retest)}
.dash-col-bar>.is-skipped{background:var(--st-skipped)}.dash-col-bar>.is-untested{background:var(--st-untested-soft)}
.dash-col:hover .dash-col-bar{box-shadow:0 0 0 2px var(--accent-mid)}
.dash .dash-col:focus-visible,.dash-trend-card .dash-col:focus-visible{outline:none;box-shadow:none}
.dash-col:focus-visible .dash-col-bar{box-shadow:0 0 0 2px var(--accent)}
.dash-col-pct{margin-top:6px;font-size:11.5px;font-weight:650;line-height:1.2;color:var(--text);font-variant-numeric:tabular-nums}
.dash-col-pct.is-low{color:var(--st-failed)}
.dash-col-label{max-width:100%;margin-top:2px;font:500 10.5px/1.2 var(--tf-font-mono);color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dash-chart.is-days .dash-chart-cols{gap:3px;height:calc(var(--dash-plot) - var(--dash-xh))}
.dash-chart.is-days .dash-col-item{justify-content:flex-end}
.dash-chart.is-days .dash-col-bar{width:100%;max-width:16px;min-height:2px;border-radius:2px 2px 0 0;background:var(--border)}
.dash-chart-xaxis{display:flex;justify-content:space-between;margin-top:6px;font-size:10.5px;color:var(--muted)}
.dash-chart-empty{display:flex;align-items:center;justify-content:center;gap:8px;min-height:140px;height:100%;padding:16px;border:1px dashed var(--border);border-radius:var(--tf-radius-sm);font-size:13px;color:var(--muted);text-align:center}
@container (max-width:520px){
 .dash-chart-cols{gap:4px}
 .dash-col-label{display:none}
 .dash-chart.is-runs{--dash-xh:24px}
}

/* Linked issues */
.dash-ref-list{list-style:none;margin:0;padding:2px 0}
.dash-ref-item{display:flex;align-items:center;gap:10px;min-width:0;padding:9px 16px}
.dash-ref-item+.dash-ref-item{border-top:1px solid var(--border-soft)}
.dash-ref-item>.tf-ref,.dash-ref-item>.tf-badge{flex:none}
.dash-ref-target{display:flex;align-items:center;gap:8px;flex:1 1 auto;min-width:0;font-size:13px;color:var(--text);text-decoration:none}
.dash-ref-target:hover{color:var(--accent)}
.dash-ref-target .tf-id{font-size:11.5px}

/* Reports cards built from the same pieces */
.dash-trend-card,.dash-cov-card{container-type:inline-size}
.dash-trend-card .tf-panel-title>.tf-icon,.dash-cov-card .tf-panel-title>.tf-icon{color:var(--muted)}
.dash-trend-card .tf-panel-count:empty{display:none}
.dash-inline-error{display:flex;align-items:center;gap:8px;padding:8px 12px;margin-bottom:12px;border-radius:var(--tf-radius-sm);background:var(--danger-soft);color:var(--danger);font-size:12.5px;text-align:left}
.dash-cov-card .tf-empty .dash-inline-error{margin:4px 0 0}
.dash-cov-summary{display:flex;align-items:flex-start;gap:20px;flex-wrap:wrap}
.dash-cov-text{flex:1 1 240px;min-width:0;display:flex;flex-direction:column;gap:6px;font-size:13px;color:var(--text)}
.dash-cov-text .dash-stat-meter{margin-top:2px}
.dash-cov-text .tf-muted{font-size:12px}
.dash-cov-list{margin-top:16px;border-top:1px solid var(--border-soft);padding-top:12px}
.dash-cov-heading{font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);margin-bottom:6px}
.dash-cov-list ul{list-style:none;margin:0;padding:0}
.dash-cov-row{display:flex;align-items:center;gap:10px;min-width:0;padding:6px 0;font-size:13px}
.dash-cov-row+.dash-cov-row{border-top:1px solid var(--border-soft)}
.dash-cov-row>.tf-ref{flex:none}
.dash-cov-more{margin-top:8px;font-size:12px}
.dash-cov-done{display:flex;align-items:center;gap:8px;margin-top:14px;font-size:13px;color:var(--success)}

/* ── Projects: toolbar + sortable table or card grid ── */
.pj{container:pj/inline-size;display:flex;flex-direction:column;gap:12px;min-width:0;max-width:1680px;margin:0 auto}
.pj-stats{grid-template-columns:repeat(5,minmax(0,1fr))}
.pj-stats .tf-stat-value{font-size:22px}
@container pj (max-width:899px){.pj-stats{grid-template-columns:repeat(6,minmax(0,1fr))}.pj-stats>.tf-stat{grid-column:span 2}.pj-stats>.tf-stat:nth-child(n+4){grid-column:span 3}}
@container pj (max-width:599px){.pj-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.pj-stats>.tf-stat,.pj-stats>.tf-stat:nth-child(n+4){grid-column:auto}.pj-stats>.tf-stat:last-child{grid-column:1/-1}}
.pj-toolbar{gap:8px;margin-top:4px}
.pj-search{flex:1 1 220px;max-width:360px}
.app-shell .pj-search .input{min-height:var(--tf-control-h);height:var(--tf-control-h);font-size:13px}
.pj-sort{display:inline-flex;align-items:center;gap:8px;font-size:12px;color:var(--muted)}
.app-shell .pj-sort .select{width:auto;min-height:var(--tf-control-h);height:var(--tf-control-h);padding:0 30px 0 10px;font-size:13px}
.pj-toolbar .tf-seg>button{display:inline-flex;align-items:center;gap:6px;min-height:28px}
.pj-toolbar .tf-seg>button:focus-visible{outline:none;box-shadow:var(--tf-focus)}
.pj-table-panel{overflow:hidden}
.pj-table{--pj-cols:minmax(220px,2.4fr) 64px 68px 104px minmax(140px,1.1fr) minmax(130px,1fr) 112px 32px;min-width:0}
.pj-tr{position:relative;display:grid;grid-template-columns:var(--pj-cols);align-items:center;column-gap:16px;min-height:64px;padding:0 12px 0 16px;border-bottom:1px solid var(--border-soft)}
.pj-thead{min-height:38px;background:var(--panel-alt);border-bottom:1px solid var(--border)}
.pj-th{min-width:0;font:600 11px/1 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);white-space:nowrap}
.pj-sortbtn{display:inline-flex;align-items:center;gap:4px;margin-left:-4px;padding:6px 4px;border:0;border-radius:var(--tf-radius-xs);background:none;font:inherit;letter-spacing:inherit;text-transform:inherit;color:inherit;cursor:pointer;white-space:nowrap}
.pj-sortbtn:hover,.pj-sortbtn.is-on{color:var(--text)}
.pj-sortbtn:focus-visible{outline:none;box-shadow:var(--tf-focus)}
.pj-sorticon{display:inline-grid;opacity:0;transition:opacity .12s,transform .12s}
.pj-sortbtn.is-on .pj-sorticon{opacity:1}
.pj-sortbtn:not(.is-on):hover .pj-sorticon{opacity:.45}
.pj-sorticon.is-asc{transform:rotate(180deg)}
.pj-tr:not(.pj-thead){cursor:pointer;transition:background-color .12s}
.pj-tr:not(.pj-thead):hover{background:var(--panel-alt)}
.pj-tr:not(.pj-thead):focus-visible{outline:none;background:var(--accent-soft);box-shadow:inset 0 0 0 1px var(--accent-mid)}
.pj-tr.is-current{background:var(--panel-soft)}
.pj-td{min-width:0}
.pj-td.c-name{display:flex;align-items:center;gap:12px;padding:11px 0}
.pj-avatar{flex:none;width:34px;height:34px;border-radius:var(--tf-radius-sm);display:grid;place-items:center;font:700 12px/1 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;letter-spacing:.03em;color:var(--accent);background:var(--accent-soft);box-shadow:inset 0 0 0 1px var(--accent-mid)}
.pj-name-wrap{flex:1 1 auto;min-width:0}
.pj-name-line{display:flex;align-items:center;gap:8px;min-width:0}
.pj-name{min-width:0;font-size:13.5px;font-weight:600;line-height:1.35;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pj-name-line>.tf-badge{flex:none;height:20px}
.pj-tr:not(.pj-thead):hover .pj-name{color:var(--accent)}
.pj-desc{margin:2px 0 0;font-size:12px;line-height:1.45;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pj-inline-stats{display:none;margin-top:4px;font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pj-num{font-size:13px;color:var(--text);font-variant-numeric:tabular-nums}
.pj-td.c-exec{display:flex;flex-direction:column;gap:6px}
.pj-exec-text{font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pj-td.c-exec>.tf-muted,.pj-card-exec>.tf-muted{font-size:12.5px}
.pj-td.c-activity{font-size:12.5px;color:var(--muted);white-space:nowrap}
.pj-ms{display:flex;flex-direction:column;gap:3px;min-width:0}
.pj-ms-name{display:flex;align-items:center;gap:5px;min-width:0;font-size:12.5px;font-weight:500;color:var(--text)}
.pj-ms-name>.tf-icon{flex:none;color:var(--muted)}
.pj-ms-due{font-size:12px;color:var(--muted);white-space:nowrap}
.pj-ms-due.is-overdue{color:var(--danger);font-weight:600}
.pj-td.c-ms>.tf-muted{font-size:12.5px}
.pj-td.c-menu{justify-self:end;display:flex}
.pj-menu{display:flex}
.pj-menu .btn.icon.small{color:var(--muted)}
.pj-tr:hover .pj-menu .btn.icon.small,.pj-card:hover .pj-menu .btn.icon.small{color:var(--text)}
.pj-menu .tf-menu-list{min-width:236px}
.pj-foot{padding:10px 16px;font-size:12px;color:var(--muted);background:var(--panel)}
@container pj (max-width:1120px){
 .pj-table{--pj-cols:minmax(220px,2.2fr) 64px 68px 104px minmax(140px,1.2fr) 112px 32px}
 .pj-table .c-ms{display:none}
}
@container pj (max-width:880px){
 .pj-table{--pj-cols:minmax(200px,2fr) 64px 104px minmax(130px,1.2fr) 32px}
 .pj-table .c-sections,.pj-table .c-activity{display:none}
}
@container pj (max-width:620px){
 .pj-thead{display:none}
 .pj-tr{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"name menu" "exec exec";row-gap:8px;padding:12px 8px 12px 16px}
 .pj-td.c-name{grid-area:name;padding:0;align-items:flex-start}
 .pj-td.c-menu{grid-area:menu;align-self:start}
 .pj-td.c-exec{grid-area:exec;padding-left:46px}
 .pj-table .c-cases,.pj-table .c-runs{display:none}
 .pj-inline-stats{display:block}
 .pj-toolbar .tf-seg>button>span{display:none}
 .pj-search{flex-basis:100%;max-width:none}
 .pj-toolbar .tf-toolbar-spacer{display:none}
}
.pj-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,300px),1fr));gap:16px}
.pj-card{display:flex;flex-direction:column;min-width:0;background:var(--panel);border:1px solid var(--border);border-radius:var(--tf-radius);cursor:pointer;position:relative;overflow:hidden;transition:border-color .12s}
.pj-card:hover{border-color:color-mix(in srgb,var(--text) 24%,var(--border))}
.pj-card:focus-visible{outline:none;border-color:var(--accent);box-shadow:var(--tf-focus)}
.pj-card.is-current{border-color:var(--accent-mid)}
.pj-card.is-current{background:var(--panel-soft)}
.pj-card-head{display:flex;align-items:flex-start;gap:12px;padding:16px 10px 14px 16px}
.pj-card-titles{flex:1 1 auto;min-width:0}
.pj-card .pj-name{font-size:14px}
.pj-card:hover .pj-name{color:var(--accent)}
.pj-card .pj-desc{margin-top:4px;white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;min-height:2.9em}
.pj-card-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin:0;border-top:1px solid var(--border-soft);border-bottom:1px solid var(--border-soft)}
.pj-card-stats>div{padding:10px 16px;min-width:0}
.pj-card-stats>div+div{border-left:1px solid var(--border-soft)}
.pj-card-stats dt{margin:0;font-size:11px;color:var(--muted);white-space:nowrap}
.pj-card-stats dd{margin:2px 0 0;font-size:18px;font-weight:650;letter-spacing:-.02em;color:var(--text);font-variant-numeric:tabular-nums}
.pj-card-exec{display:flex;flex-direction:column;justify-content:center;gap:6px;min-height:56px;padding:12px 16px}
.pj-card-latest{display:flex;align-items:center;gap:8px;min-width:0;padding:0 16px 12px;margin-top:-4px;font-size:12px;color:var(--muted)}
.pj-card-latest-label{flex:none}
.pj-card-latest>a{display:flex;min-width:0;flex:0 1 auto;color:var(--text);font-weight:500;text-decoration:none}
.pj-card-latest>a:hover{color:var(--accent);text-decoration:underline}
.pj-card-latest>a:focus-visible{outline:none;box-shadow:var(--tf-focus);border-radius:3px}
.pj-card-latest-date{flex:none;margin-left:auto;white-space:nowrap}
.pj-card-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:auto;padding:10px 16px;border-top:1px solid var(--border-soft);background:var(--panel-alt);font-size:12px;color:var(--muted)}
.pj-activity{display:inline-flex;align-items:center;gap:6px;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pj-open{display:inline-flex;align-items:center;gap:2px;flex:none;font-weight:600;color:var(--accent)}

/* Project dialog */
.media-lightbox.pj-dialog-backdrop{z-index:120;padding:24px;overscroll-behavior:contain}
.media-lightbox-inner.pj-dialog{width:min(520px,100%);max-width:100%;max-height:calc(100dvh - 48px);min-width:0;min-height:0;padding:0;resize:none;overflow:hidden;display:flex;flex-direction:column;border-radius:var(--tf-radius);border:1px solid var(--border);background:var(--panel);color:var(--text);box-shadow:var(--shadow-lg);animation:none}
.pj-dialog-head{flex:none;display:flex;align-items:flex-start;gap:12px;padding:16px 16px 14px 20px;border-bottom:1px solid var(--border)}
.pj-dialog-titles{flex:1 1 auto;min-width:0}
.pj-dialog-title{margin:0;font-size:16px;font-weight:650;line-height:1.3;letter-spacing:-.01em;color:var(--text)}
.pj-dialog-sub{margin:3px 0 0;font-size:12.5px;line-height:1.4;color:var(--muted)}
.pj-dialog-form{display:flex;flex-direction:column;flex:1 1 auto;min-height:0}
.pj-dialog-body{flex:1 1 auto;min-height:0;overflow:auto;display:flex;flex-direction:column;gap:16px;padding:18px 20px 20px}
.pj-field{display:flex;flex-direction:column;gap:6px;min-width:0}
.pj-label{font-size:12.5px;font-weight:600;color:var(--text)}
.pj-req{color:var(--danger)}
.pj-dialog .pj-field :is(.input,.textarea){width:100%;font-size:13px}
.pj-dialog .pj-field .textarea{min-height:76px;resize:vertical;font-family:inherit;line-height:1.5}
.pj-dialog .input.is-invalid{border-color:var(--danger)}
.pj-dialog .input.is-invalid:focus{outline-color:var(--danger-soft)}
.pj-error{display:flex;align-items:center;gap:6px;margin:0;font-size:12px;color:var(--danger)}
.pj-hint{margin:0;font-size:12px;color:var(--muted)}
.pj-dialog-foot{flex:none;display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:12px 16px 12px 20px;border-top:1px solid var(--border);background:var(--panel-alt)}
@media(max-width:540px){
 .media-lightbox.pj-dialog-backdrop{padding:0;align-items:end}
 .media-lightbox-inner.pj-dialog{width:100%;max-height:100dvh;border-radius:var(--tf-radius) var(--tf-radius) 0 0;border-width:1px 0 0}
 .pj-dialog-foot{padding:10px 16px calc(10px + env(safe-area-inset-bottom,0px))}
 .pj-dialog-foot .btn{flex:1 1 0}
}
@media(prefers-reduced-motion:reduce){.dash-spinner{animation-duration:2.4s}}
/* Phone dashboard (dm-*): greeting · 2×2 tiles · swipeable active runs ·
   needs attention · milestones · trends · activity · linked issues. */
@media(max-width:900px){
 .tf-content:has(>.dm){padding:12px calc(16px + env(safe-area-inset-right,0px)) calc(var(--tf-phone-nav-height) + 28px + env(safe-area-inset-bottom,0px)) calc(16px + env(safe-area-inset-left,0px))}
 .dm{display:flex;flex-direction:column;gap:24px;min-width:0}
 .dm-greet{display:flex;flex-direction:column;gap:4px;min-width:0}
 .dm-greet-hello{font-size:var(--tf-phone-text);font-weight:600;color:var(--text)}
 .dm-greet-sub{display:flex;flex-wrap:wrap;gap:4px;font-size:var(--tf-phone-meta);color:var(--muted);min-width:0}
 .dm-overview{display:flex;flex-direction:column;gap:12px}
 .dm-tiles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 .dm-tile{display:flex;flex-direction:column;gap:4px;min-width:0;min-height:7.5rem;padding:14px;border:1px solid var(--border);border-radius:14px;background:var(--panel);color:var(--text);text-decoration:none;text-align:left;font:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent}
 .dm-tile:active{background:var(--panel-alt)}
 .dm-tile:focus-visible{outline:none;box-shadow:var(--tf-focus)}
 .dm-tile-label{font-size:clamp(.9375rem,2.8vw,1rem);font-weight:500;line-height:1.4;color:var(--muted);overflow-wrap:anywhere}
 .dm-tile-value{font-size:clamp(2rem,6.4vw,2.375rem);font-weight:700;letter-spacing:-.025em;line-height:1.1;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
 .dm-tile.is-danger .dm-tile-value{color:var(--danger)}
 .dm-tile-sub{margin-top:auto;font-size:clamp(.8125rem,2.5vw,.9375rem);line-height:1.4;color:var(--muted);overflow-wrap:anywhere}
 .dm-meter{display:block;height:5px;border-radius:3px;background:var(--border-soft);overflow:hidden}
 .dm-meter>span{display:block;height:100%;background:var(--accent);border-radius:2px}
 .dm-bug-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));border:1px solid var(--border);border-radius:14px;background:var(--panel);overflow:hidden}
 .dm-bug-link{display:flex;align-items:center;gap:10px;min-width:0;min-height:4.25rem;padding:12px 14px;color:var(--text);text-decoration:none}
 .dm-bug-link+.dm-bug-link{border-left:1px solid var(--border-soft)}
 .dm-bug-link:active{background:var(--panel-alt)}
 .dm-bug-link:focus-visible{outline:2px solid var(--accent);outline-offset:-3px}
 .dm-bug-value{flex:none;font-size:1.5rem;line-height:1.2;font-weight:700;font-variant-numeric:tabular-nums}
 .dm-bug-copy{display:flex;flex-direction:column;gap:2px;min-width:0;font-size:var(--tf-phone-meta);line-height:1.4;overflow-wrap:anywhere}
 .dm-bug-note{font-size:.8125rem}
 .dm-sect{display:flex;flex-direction:column;gap:12px;min-width:0;scroll-margin-top:calc(var(--tf-phone-bar-height) + env(safe-area-inset-top,0px) + 12px)}
 .dm-sect:focus{outline:none}
 .dm-head{display:flex;flex-wrap:wrap;align-items:center;gap:8px;min-height:36px}
 .dm-title{margin:0;display:flex;flex-wrap:wrap;align-items:center;gap:8px;min-width:0;max-width:100%;font-size:clamp(1.125rem,4.4vw,1.25rem);font-weight:700;line-height:1.4;letter-spacing:-.02em;color:var(--text);overflow-wrap:anywhere}
 .dm-count{flex:none;font-size:.8125rem;font-weight:600;color:var(--muted);background:var(--panel-alt);border:1px solid var(--border);border-radius:12px;padding:1px 8px;letter-spacing:0}
 .dm-link{margin-left:auto;display:inline-flex;align-items:center;gap:2px;flex:none;min-height:2.75rem;font-size:.9375rem;font-weight:600;color:var(--accent);text-decoration:none}
 .dm-card{padding:16px;border:1px solid var(--border);border-radius:14px;background:var(--panel)}
 .dm-head>.tf-seg{margin-left:auto}
 .dm .tf-seg>button{min-height:2.75rem;padding:.5rem .75rem;font-size:.875rem}
 .app-shell .dm-create{width:100%;min-height:3rem;border-radius:12px;font-size:1rem}
 /* Active runs: one card per run, swipe sideways, the next card peeks in */
 .dm-runs{list-style:none;display:flex;gap:12px;min-width:0;margin:0 -16px;padding:2px 16px 6px;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x proximity;scroll-padding:0 16px;scrollbar-width:none;-webkit-overflow-scrolling:touch}
 .dm-runs::-webkit-scrollbar{display:none}
 .dm-run{flex:0 0 88%;min-width:0;max-width:28rem;scroll-snap-align:start}
 .dm-runs>.dm-run:only-child{flex-basis:100%;max-width:none}
 .dm-run-link{display:flex;flex-direction:column;gap:10px;height:100%;box-sizing:border-box;padding:16px;border:1px solid var(--border);border-radius:14px;background:var(--panel);color:var(--text);text-decoration:none}
 .dm-run-link:active{background:var(--panel-alt)}
 .dm-run-top{display:flex;align-items:center;gap:8px;min-width:0;font-size:var(--tf-phone-meta);color:var(--muted)}
 .dm-run-top .tf-id,.dm-row .tf-id{font-size:var(--tf-phone-meta)}
 .dm-run-ms{display:inline-flex;align-items:center;gap:4px;min-width:0}
 .dm-run-name{font-size:1.125rem;font-weight:650;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
 .dm-run-foot{display:flex;align-items:baseline;flex-wrap:wrap;gap:6px 10px;font-size:var(--tf-phone-meta);color:var(--muted)}
 .dm-run-pct{font-size:1.25rem;font-weight:700;color:var(--text)}
 .dm-run-pct>span{font-size:var(--tf-phone-meta);font-weight:500;color:var(--muted)}
 .dm-run-failed{margin-left:auto;font-weight:600;color:var(--danger)}
 .dm-run-clean{margin-left:auto;color:var(--success)}
 .dm-run-who{display:flex;align-items:center;gap:6px;min-width:0;font-size:var(--tf-phone-meta);color:var(--muted)}
 .dm-run.is-more .dm-run-link{align-items:center;justify-content:center;gap:8px;color:var(--accent);font-weight:600;text-align:center}
 /* Lists */
 .dm-note{margin:-4px 0 0;font-size:var(--tf-phone-meta);color:var(--muted)}
 .dm-note-after{margin:4px 0 0}
 .dm-list{list-style:none;padding:0;margin:0;border:1px solid var(--border);border-radius:14px;overflow:hidden}
 .dm-list>li+li{border-top:1px solid var(--border-soft)}
 .dm-list>li:last-child>.tf-m-row{border-bottom:0}
 .dm-row{text-decoration:none}
 .dm-lead{width:32px;height:32px;border-radius:50%;background:var(--panel-alt);color:var(--muted)}
 .dm-lead.is-failed{background:var(--danger-soft);color:var(--danger)}
 .dm-lead.is-done{background:var(--success-soft);color:var(--success)}
 .dm-meta-run{display:inline-flex;align-items:center;gap:4px;min-width:0;max-width:100%}
 .dm-history{display:inline-flex;gap:2px}
 .dm-row-bar{margin-top:6px}
 .dm-row.is-closed .tf-m-row-title{color:var(--muted)}
 .dm-more{display:flex;align-items:center;justify-content:space-between;min-height:44px;font-size:14px;font-weight:600;color:var(--accent);text-decoration:none}
 .dm-ref{position:relative}
 .dm-ref>.tf-m-row{padding-right:60px}
 .dm-ref-open{position:absolute;right:10px;top:50%;transform:translateY(-50%)}
 /* Trends */
 .dm-trends-kpi{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 10px;margin-bottom:12px}
 .dm-trends-value{font-size:2rem;font-weight:700;letter-spacing:-.02em;color:var(--text)}
 .dm-trends-label{font-size:var(--tf-phone-meta);color:var(--muted)}
 .dm-trends-delta{width:100%;font-size:var(--tf-phone-meta);color:var(--muted)}
 .dm-trends-delta.is-up{color:var(--success)}
 .dm-trends-delta.is-down{color:var(--danger)}
 /* Empty states */
 .dm-empty{display:flex;align-items:center;flex-wrap:wrap;gap:12px;padding:16px;border:1px solid var(--border);border-radius:14px;background:var(--panel)}
 .dm-empty-icon{display:grid;place-items:center;flex:none;width:40px;height:40px;border-radius:10px;background:var(--panel-alt);color:var(--muted)}
 .dm-empty-text{display:flex;flex-direction:column;gap:4px;flex:1;min-width:0;font-size:var(--tf-phone-meta);color:var(--muted)}
 .dm-empty-text strong{font-size:var(--tf-phone-text);color:var(--text)}
}

/* Phone projects list */
@media(max-width:900px){
 .pj-m{display:flex;flex-direction:column;gap:4px}
 .pj-m-tools{display:flex;gap:8px;align-items:flex-start}
 .pj-m-search{flex:1 1 auto;min-width:0}
 .pj-m-sort .select{height:44px;min-height:44px;border-radius:10px;font-size:15px;max-width:150px}
 .pj-m-list{list-style:none;padding:0}
 .pj-m-item{position:relative;border-bottom:1px solid var(--border-soft)}
 .pj-m-item:last-child{border-bottom:0}
 .pj-m-item.is-current{box-shadow:none}
 .pj-m-row{border-bottom:0;padding-right:60px;min-height:76px}
 .pj-m-name{display:flex;align-items:center;gap:8px;min-width:0}
 .pj-m-name .tf-m-row-title{min-width:0}
 .pj-m-bar{margin-top:4px}
 .pj-m-menu{position:absolute;right:10px;top:50%;transform:translateY(-50%)}
 .pj-m-menu .btn{min-width:44px;min-height:44px}
}

.dash-stat-danger{color:var(--danger);font-weight:600}
@media(min-width:1280px){.dash-stats.has-bugs{grid-template-columns:repeat(7,minmax(0,1fr))}}
/* 7 tiles on 6 columns: rows of 3, 2 and 2, each filling the row */
@media(min-width:901px) and (max-width:1279px){.dash-stats.has-bugs{grid-template-columns:repeat(6,minmax(0,1fr))}.dash-stats.has-bugs>.dash-stat{grid-column:span 2}.dash-stats.has-bugs>.dash-stat:nth-child(n+4){grid-column:span 3}}
/* @endregion dashboard-projects */



/* @region plans-milestones — test plans and milestones */
/* List + detail workbench shared by Milestones and Test Plans (pm-*).
   Side pane: filter + grouped list. Grow pane: a plain header band and a
   scrolling stack of panels on the canvas. The detail pane carries a
   width bucket (pm-w-xs|sm|md|lg) set by a ResizeObserver, so it adapts
   to its own width whatever the sidebar and list are doing. */
.pm-wb{--tf-pane-w:296px}
@media(max-width:1279px){.pm-wb{--tf-pane-w:264px}}

/* ActionMenu opens upward with an inline `bottom`, but the foundation's
   `top:calc(100% + 6px)` still applies to the fixed list and pushes it off
   screen; clear it for menus in this area (foundation fix requested). */
.pm-wb .tf-menu-list[style*="bottom"]{top:auto}

/* ── Side list ── */
.pm-side-head{flex:none;display:flex;flex-direction:column;gap:10px;padding:12px;border-bottom:1px solid var(--border)}
.pm-side-row{display:flex;align-items:center;gap:6px;min-width:0}
.pm-search{max-width:none;flex:1 1 auto}
.pm-search .tf-search-icon{left:10px}
.app-shell .pm-search .input{min-height:var(--tf-control-h-sm);height:var(--tf-control-h-sm);padding:0 10px 0 32px;font-size:13px;background:var(--panel)}
.app-shell .btn.ghost.pm-group-toggle{width:var(--tf-control-h-sm);min-height:var(--tf-control-h-sm);flex:none;border:1px solid var(--border);background:var(--panel);color:var(--muted)}
.app-shell .btn.ghost.pm-group-toggle[aria-pressed="true"]{color:var(--accent);background:var(--accent-soft);border-color:var(--accent-mid)}
.pm-seg{display:flex;width:100%;box-sizing:border-box}
.pm-seg>button{flex:1 1 0;display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:0;white-space:nowrap}
.pm-seg>button:focus-visible{outline:none;box-shadow:var(--tf-focus)}
.pm-seg-count{font:600 11px/1 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--muted);font-variant-numeric:tabular-nums}
.pm-seg>button[aria-pressed="true"] .pm-seg-count{color:var(--accent)}
.pm-side-body{padding:4px 8px 12px}
.pm-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px}
.pm-more{display:flex;justify-content:center;padding:10px 8px 14px}
.pm-group{display:flex;align-items:center;gap:8px;padding:14px 8px 6px;min-width:0;font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.pm-group:first-child{padding-top:8px}
.pm-group-name{display:flex;align-items:center;gap:6px;min-width:0;flex:0 1 auto}
.pm-group-name .tf-icon{flex:none;color:var(--subtle)}
.pm-group-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pm-group-due{margin-left:auto;flex:none;font-weight:500;letter-spacing:0;text-transform:none;color:var(--muted);white-space:nowrap}
.pm-group-due.is-overdue{color:var(--danger)}
.pm-group-count{margin-left:auto;flex:none;font:600 11px/1 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;letter-spacing:0;color:var(--muted);background:var(--panel);border:1px solid var(--border);border-radius:10px;padding:3px 7px;font-variant-numeric:tabular-nums}
.pm-group-due+.pm-group-count{margin-left:0}
.app-shell .pm-item{display:flex;flex-direction:column;gap:7px;width:100%;min-width:0;padding:10px 12px;border:1px solid transparent;border-radius:var(--tf-radius-sm);background:transparent;color:var(--text);text-align:left;font:inherit;cursor:pointer;transition:background-color .12s,border-color .12s}
.app-shell .pm-item:hover{background:var(--panel);border-color:var(--border-soft)}
.app-shell .pm-item[aria-current="true"]{background:var(--accent-soft);border-color:var(--accent-mid)}
.app-shell .pm-item:focus-visible{outline:none;box-shadow:var(--tf-focus);border-color:var(--accent)}
.pm-item-top{display:flex;align-items:center;gap:8px;min-width:0}
.pm-item-name{flex:1 1 auto;min-width:0;font-size:13px;font-weight:600;line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pm-item-top .tf-badge{flex:none;height:20px;padding:0 7px;font-size:11px}
.pm-item-meta{display:flex;align-items:center;gap:6px;min-width:0;font-size:12px;line-height:1.3;color:var(--muted)}
.pm-item-meta .tf-icon{color:var(--muted);flex:none}
.pm-item-meta.is-overdue,.pm-item-meta.is-overdue .tf-icon{color:var(--danger)}
.pm-item-count{margin-left:auto;flex:none;color:var(--muted);padding-left:6px}
.pm-side-empty{display:flex;flex-direction:column;align-items:center;gap:8px;padding:28px 12px;text-align:center;font-size:13px;color:var(--muted)}

/* ── Progress (shared) ── */
.pm-progress{display:flex;align-items:center;gap:8px;width:100%;min-width:0}
.pm-progress .pm-bar{flex:1 1 auto;min-width:40px;height:4px;border-radius:2px}
.pm-progress-pct{flex:none;min-width:30px;text-align:right;font:600 11px/1 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-variant-numeric:tabular-nums;color:var(--muted)}
.pm-bar.pm-bar-lg{height:10px;border-radius:5px}
.pm-bar.pm-bar-lg>span+span{box-shadow:inset 1px 0 0 var(--panel)}

/* ── Detail pane ── */
.pm-main{background:var(--bg)}
.pm-detail{flex:1 1 auto;min-height:0;display:flex;flex-direction:column}
.pm-detail-head{flex:none;display:flex;flex-wrap:wrap;align-items:flex-start;gap:12px 16px;padding:16px 24px;background:var(--panel);border-bottom:1px solid var(--border)}
.app-shell .pm-back{display:none}
.pm-detail-titles{flex:1 1 320px;min-width:0;display:flex;flex-direction:column;gap:6px}
.pm-detail-kicker{display:flex;align-items:center;gap:6px;font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.pm-detail-kicker .tf-id{font-size:11px;letter-spacing:0;margin-left:2px}
.pm-detail-titlerow{display:flex;align-items:center;flex-wrap:wrap;gap:6px 10px;min-width:0}
.pm-detail-title{margin:0;min-width:0;font-size:19px;font-weight:650;letter-spacing:-.02em;line-height:1.3;color:var(--text);overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.pm-detail-sub{display:flex;flex-wrap:wrap;align-items:center;gap:4px 16px;font-size:12px;color:var(--muted);min-width:0}
.pm-detail-sub>span{display:inline-flex;align-items:center;gap:6px;min-width:0;max-width:100%}
.pm-detail-sub .tf-icon{color:var(--muted)}
.pm-detail-sub .is-overdue,.pm-detail-sub .is-overdue .tf-icon{color:var(--danger);font-weight:600}
.pm-detail-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:8px;flex:0 1 auto;max-width:100%}
.pm-detail-body{display:flex;flex-direction:column;gap:16px;padding:20px 24px 40px;max-width:1120px;box-sizing:border-box}
.pm-detail-body>.tf-panel,.pm-detail-body>.tf-panel+.tf-panel{margin:0}
.app-shell .pm-link{border:0;background:none;padding:0;min-height:0;font:inherit;font-weight:600;color:var(--accent);cursor:pointer;text-align:left}
.app-shell .pm-link:hover{text-decoration:underline}
.app-shell .pm-link:focus-visible{outline:none;box-shadow:var(--tf-focus);border-radius:3px}
.pm-main-empty{margin:auto;max-width:440px;padding:48px 24px}
.pm-panel-note{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:500;color:var(--muted);white-space:nowrap}

/* Stats strip */
.pm-stats{grid-template-columns:repeat(5,minmax(0,1fr))}
.pm-stats.pm-stats-sm{grid-template-columns:repeat(3,minmax(0,1fr))}
.pm-stats .tf-stat{padding:12px 16px}
.pm-stats .tf-stat-value{font-size:20px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pm-stats .tf-stat-value.is-danger{color:var(--danger)}
.pm-stats .tf-stat-value.is-warning{color:var(--warning)}
.pm-stat-sub{margin-top:3px;font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* Narrower panes: five stats as 3 + 2 (sm) or 2 + 2 + 1 (xs). Dividers
   come from the foundation's 1px grid gap, so no cell may be left empty. */
.pm-w-sm .pm-stats:not(.pm-stats-sm){grid-template-columns:repeat(6,minmax(0,1fr))}
.pm-w-sm .pm-stats:not(.pm-stats-sm) .tf-stat{grid-column:span 2}
.pm-w-sm .pm-stats:not(.pm-stats-sm) .tf-stat:nth-child(n+4){grid-column:span 3}
.pm-w-xs .pm-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
.pm-w-xs .pm-stats .tf-stat:last-child:nth-child(odd){grid-column:1/-1}

/* Result legend */
.pm-legend{list-style:none;margin:14px 0 0;padding:0;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px 16px}
.pm-legend li{display:grid;grid-template-columns:8px minmax(0,1fr);column-gap:8px;row-gap:3px;align-items:center;min-width:0}
.pm-legend li.is-passed{color:var(--st-passed)}.pm-legend li.is-failed{color:var(--st-failed)}.pm-legend li.is-blocked{color:var(--st-blocked)}
.pm-legend li.is-retest{color:var(--st-retest)}.pm-legend li.is-skipped{color:var(--st-skipped)}.pm-legend li.is-untested{color:var(--st-untested)}
.pm-legend-dot{width:8px;height:8px;border-radius:2px;background:currentColor}
.pm-legend li.is-untested .pm-legend-dot{background:var(--st-untested-soft);box-shadow:inset 0 0 0 1px var(--st-untested)}
.pm-legend-label{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pm-legend-value{grid-column:2;display:flex;align-items:baseline;gap:6px;min-width:0}
.pm-legend-value strong{font-size:15px;font-weight:650;color:var(--text);font-variant-numeric:tabular-nums}
.pm-legend-pct{font-size:11px;color:var(--muted);font-variant-numeric:tabular-nums}
:is(.pm-w-xs,.pm-w-sm) .pm-legend{grid-template-columns:repeat(3,minmax(0,1fr))}

/* Tables (plans of a milestone, sections of a plan) */
.pm-table{width:100%;min-width:0;border-collapse:separate;border-spacing:0;table-layout:fixed;font-size:13px}
.pm-table th{height:36px;padding:0 12px;text-align:left;font-size:12px;font-weight:600;color:var(--muted);background:var(--panel-alt);border-bottom:1px solid var(--border);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pm-table td{height:52px;padding:6px 12px;border-bottom:1px solid var(--border-soft);vertical-align:middle;color:var(--text)}
.pm-table :is(th,td):first-child{padding-left:16px}
.pm-table tbody tr:last-child td{border-bottom:0}
.pm-table tbody tr:hover td{background:color-mix(in srgb,var(--panel-alt) 70%,transparent)}
.pm-table tbody tr:last-child td:first-child{border-bottom-left-radius:var(--tf-radius)}
.pm-table tbody tr:last-child td:last-child{border-bottom-right-radius:var(--tf-radius)}
.pm-sections-table td{height:44px}
.pm-table .c-status{width:124px}
.pm-table .c-progress{width:200px}
.pm-table .c-date{width:124px;color:var(--muted);white-space:nowrap}
.pm-table .c-menu{width:56px;text-align:right;padding-right:10px}
.pm-table .c-num{width:88px;text-align:right;font-variant-numeric:tabular-nums}
.pm-table th.c-num{text-align:right}
.pm-table td.c-failed{color:var(--muted)}
.pm-table td.c-failed.is-failed{color:var(--danger);font-weight:600}
.app-shell .pm-cell-title{display:block;max-width:100%;min-height:0;border:0;background:none;padding:0;font:600 13px/1.35 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--text);text-align:left;cursor:pointer;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.app-shell .pm-cell-title:hover{color:var(--accent);text-decoration:underline}
.app-shell .pm-cell-title:focus-visible{outline:none;box-shadow:var(--tf-focus);border-radius:3px}
.pm-cell-sub{margin-top:3px;font-size:12px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pm-cell-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pm-w-sm .pm-plans-table .c-date{display:none}
.pm-w-sm .pm-table .c-progress{width:160px}
.pm-w-xs .pm-table .c-progress{width:132px}
.pm-w-xs .pm-table .c-num{width:64px}
.pm-w-xs .pm-sections-table .c-failed{display:none}
/* Narrow: each plan becomes a two-line row (name · status · menu / progress). */
.pm-w-xs .pm-plans-table thead{display:none}
.pm-w-xs .pm-plans-table,.pm-w-xs .pm-plans-table tbody{display:block}
.pm-w-xs .pm-plans-table tr{display:grid;grid-template-columns:minmax(0,1fr) auto auto;grid-template-areas:"name status menu" "prog prog prog";align-items:center;gap:8px;padding:12px 8px 12px 16px;border-bottom:1px solid var(--border-soft)}
.pm-w-xs .pm-plans-table tbody tr:last-child{border-bottom:0}
.pm-w-xs .pm-plans-table td{display:block;width:auto;height:auto;padding:0;border:0;background:none}
.pm-w-xs .pm-plans-table .c-name{grid-area:name;min-width:0}
.pm-w-xs .pm-plans-table .c-status{grid-area:status}
.pm-w-xs .pm-plans-table .c-progress{grid-area:prog;width:auto}
.pm-w-xs .pm-plans-table .c-menu{grid-area:menu}
.pm-w-xs .pm-plans-table .c-date{display:none}
.pm-empty-inline{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px 16px;padding:20px 16px}
.pm-empty-inline>div{display:flex;flex-direction:column;gap:3px;min-width:0;font-size:13px;color:var(--muted)}
.pm-empty-inline strong{color:var(--text);font-weight:600}

/* Details */
.pm-desc{margin:0 0 14px;font-size:13px;line-height:1.6;color:var(--text);white-space:pre-wrap;overflow-wrap:anywhere}
.pm-desc.is-empty{color:var(--muted)}
.pm-desc.pm-progress-empty{margin:0}
.pm-facts{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:14px 24px;margin:0;padding-top:14px;border-top:1px solid var(--border-soft)}
.pm-fact{min-width:0}
.pm-fact dt{margin:0 0 4px;font-size:12px;color:var(--muted)}
.pm-fact dd{margin:0;font-size:13px;color:var(--text);overflow-wrap:anywhere}

/* Header-band counts */
.pm-headmeta{display:inline-flex;flex-wrap:wrap;align-items:center;row-gap:4px;font-size:13px;color:var(--muted)}
.pm-headmeta>span+span::before{content:"·";margin:0 8px;color:var(--muted);font-weight:400}
.pm-headmeta .is-overdue{color:var(--danger);font-weight:600}

/* Status badges */
.tf-badge.pm-state.is-active,.tf-badge.pm-run.is-active{background:var(--accent-soft);color:var(--accent)}
.tf-badge.pm-state.is-planned{background:var(--info-soft);color:var(--info)}
.tf-badge.pm-state.is-overdue{background:var(--danger-soft);color:var(--danger)}
.tf-badge.pm-state.is-closed,.tf-badge.pm-run.is-completed{background:var(--panel-alt);color:var(--muted);box-shadow:inset 0 0 0 1px var(--border)}
.tf-badge.pm-run.is-draft{background:transparent;color:var(--muted);box-shadow:inset 0 0 0 1px var(--border)}

/* Inline messages */
.pm-msg{display:flex;align-items:flex-start;gap:10px;padding:10px 12px;border:1px solid var(--border);border-radius:var(--tf-radius-sm);background:var(--panel-alt);font-size:13px;line-height:1.5;color:var(--text)}
.pm-msg>.tf-icon{margin-top:2px;color:var(--info)}
.pm-msg-text{flex:1 1 auto;min-width:0}
.pm-msg>.btn{flex:none;align-self:center}
.pm-msg.is-info{background:var(--info-soft);border-color:color-mix(in srgb,var(--info) 28%,var(--border))}
.pm-msg.is-danger{background:var(--danger-soft);border-color:color-mix(in srgb,var(--danger) 32%,var(--border))}
.pm-msg.is-danger>.tf-icon{color:var(--danger)}
.pm-msg.is-success{background:var(--success-soft);border-color:color-mix(in srgb,var(--success) 30%,var(--border))}
.pm-msg.is-success>.tf-icon{color:var(--success)}

/* Jira release */
.pm-jira-lead{margin:0 0 14px;font-size:13px;line-height:1.55;color:var(--muted)}
.pm-jira-lead+.pm-msg{margin-bottom:14px}
.pm-jira-form+.pm-msg,.pm-jira .pm-msg+.pm-msg{margin-top:12px}
.pm-jira-form{display:flex;flex-wrap:wrap;align-items:flex-end;gap:10px 12px}
.pm-jira-fv{flex:1 1 360px}
.pm-jira-inputs{display:flex;flex-wrap:wrap;gap:8px}
.app-shell .pm-jira-inputs .input{flex:1 1 160px;width:auto;min-width:0}
.app-shell .pm-jira-inputs .select{flex:1 1 200px;width:auto;min-width:0}
.pm-jira-actions{display:flex;flex-wrap:wrap;gap:8px}
.pm-coverage{display:flex;flex-direction:column;gap:12px;margin-top:16px}
.pm-coverage-gaps{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:0;font-size:12px;color:var(--muted)}
.pm-case-list{list-style:none;margin:0;padding:0;max-height:320px;overflow:auto;border:1px solid var(--border);border-radius:var(--tf-radius-sm)}
.pm-case-list li{display:flex;align-items:center;gap:10px;min-height:40px;padding:6px 12px;border-bottom:1px solid var(--border-soft)}
.pm-case-list li:last-child{border-bottom:0}
.pm-case-title{flex:1 1 auto;min-width:0;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pm-case-ref{max-width:150px;overflow:hidden;text-overflow:ellipsis}
.pm-w-xs .pm-case-ref{display:none}

/* ── Dialogs ── */
.pm-dialog-backdrop{position:fixed;inset:0;z-index:200;display:flex;align-items:center;justify-content:center;padding:24px;background:color-mix(in srgb,var(--sidebar-start) 58%,transparent)}
.pm-dialog{width:min(560px,100%);max-height:calc(100dvh - 48px);margin:0;display:flex;flex-direction:column;background:var(--panel);color:var(--text);border:1px solid var(--border);border-radius:var(--tf-radius);box-shadow:var(--shadow-lg)}
.pm-dialog-head{flex:none;display:flex;align-items:center;gap:12px;padding:12px 12px 12px 20px;border-bottom:1px solid var(--border)}
.pm-dialog-title{flex:1 1 auto;margin:0;font-size:16px;font-weight:650;letter-spacing:-.01em;color:var(--text)}
.pm-dialog-body{flex:1 1 auto;min-height:0;overflow:auto;display:flex;flex-direction:column;gap:16px;padding:18px 20px 20px}
.pm-dialog-foot{flex:none;display:flex;justify-content:flex-end;gap:8px;padding:12px 20px;border-top:1px solid var(--border);background:var(--panel-alt);border-radius:0 0 var(--tf-radius) var(--tf-radius)}
.pm-dialog-note{display:flex;align-items:center;gap:8px;margin:0;font-size:12px;color:var(--muted)}
.pm-field{display:flex;flex-direction:column;gap:6px;min-width:0}
.pm-field-label{font-size:12px;font-weight:600;color:var(--text)}
.pm-field-req{color:var(--danger)}
.pm-field-opt{font-weight:400;color:var(--muted)}
.pm-field-hint{font-size:12px;color:var(--muted)}
.pm-field-error{display:flex;align-items:center;gap:6px;font-size:12px;font-weight:500;color:var(--danger)}
.app-shell .pm-field .input[aria-invalid="true"]{border-color:var(--danger)}
.pm-field-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.app-shell :is(.pm-dialog,.pm-jira) :is(.input,.select){height:var(--tf-control-h);min-height:var(--tf-control-h);padding-block:0;line-height:normal}
.app-shell .pm-dialog .textarea{min-height:88px;font-family:inherit;line-height:1.5;resize:vertical}


/* ── Phones: list, then the selected item's detail with a back button ── */
@media(max-width:900px){
 .pm-wb{background:transparent;gap:12px}
 .pm-wb:not(.show-detail) .pm-main{display:none}
 .pm-wb.show-detail .pm-side{display:none}
 /* Nothing to list yet: show the explanatory empty state instead. */
 .pm-wb.is-empty .pm-side{display:none}
 .pm-wb.is-empty .pm-main{display:flex;background:var(--panel);border:1px solid var(--border);border-radius:var(--tf-radius)}
 .tf-pane.pm-side{background:var(--panel);border:1px solid var(--border);border-radius:var(--tf-radius)}
 /* Nothing is open yet on a phone, so the default pick is not highlighted. */
 .app-shell .pm-wb.is-auto .pm-item[aria-current="true"]:not(:hover){background:transparent;border-color:transparent}
 .pm-side .tf-pane-foot{border-radius:0 0 var(--tf-radius) var(--tf-radius)}
 .pm-main{background:transparent}
 .pm-detail-head{padding:12px 14px 14px;border:1px solid var(--border);border-radius:var(--tf-radius)}
 .app-shell .btn.pm-back{display:inline-flex;flex:0 0 100%;justify-content:flex-start;width:auto;margin:-2px 0 -4px -8px;padding:0 8px;color:var(--accent)}
 .pm-detail-actions{justify-content:flex-start}
 .pm-detail-body{padding:12px 0 0;gap:12px}
 /* 16px text so iOS does not zoom into the filter; 36px touch height. */
 .app-shell .pm-search .input{height:var(--tf-control-h);min-height:var(--tf-control-h);font-size:16px}
 .app-shell .btn.ghost.pm-group-toggle{width:var(--tf-control-h);min-height:var(--tf-control-h)}
}
@media(max-width:540px){
 .pm-dialog-backdrop{align-items:flex-end;padding:0}
 .pm-dialog{width:100%;max-height:calc(100dvh - 16px);border-radius:var(--tf-radius) var(--tf-radius) 0 0;border-bottom:0}
 .pm-dialog-foot{border-radius:0;padding-bottom:calc(12px + env(safe-area-inset-bottom,0px))}
 .pm-dialog-foot .btn{flex:1 1 0}
 .pm-field-row{grid-template-columns:minmax(0,1fr)}
 .pm-detail-actions{gap:6px}
 .app-shell .pm-detail-actions .btn{min-height:var(--tf-control-h-sm);padding:0 10px;font-size:12px;gap:5px}
 .app-shell .pm-detail-actions .btn.icon{width:var(--tf-control-h-sm);padding:0}
 .pm-hide-phone{display:none}
}
/* Smallest phones: Edit drops to its icon so the plan actions stay on one row. */
@media(max-width:400px){
 .app-shell .pm-detail-actions .btn.pm-icon-xs{width:var(--tf-control-h-sm);padding:0;gap:0}
 .pm-icon-xs .pm-btn-label{display:none}
}
.pm-plan-runs{min-width:0;border:1px solid var(--border);border-radius:var(--tf-radius);padding:12px;margin:0}
.pm-plan-run-picker{max-height:220px;overflow:auto;margin-top:8px}
.pm-plan-run-choice{display:flex;align-items:center;gap:10px;min-height:44px;padding:6px 0;cursor:pointer;overflow-wrap:anywhere}
.pm-plan-run-choice input{flex:0 0 auto;width:18px;height:18px;accent-color:var(--accent)}
.pm-plan-linked-runs{list-style:none;padding:0;margin:12px 0}
.pm-plan-linked-runs li{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px;padding:12px 0;border-bottom:1px solid var(--border-soft)}
.pm-plan-linked-runs .pm-link{text-align:left;white-space:normal;overflow-wrap:anywhere;min-height:44px}
.pm-plan-linked-runs .pm-progress{grid-column:1/-1}
/* @endregion plans-milestones */



/* @region bugbash — bug bash sessions */
/* Workbench: sessions (side) · board (grow) · case inspector. The board is a
   cases × testers grid with a sticky header row and case column that scrolls
   inside its own wrapper at every width. */
.bb-workbench{position:relative}
.bb-count{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:18px;padding:0 6px;margin-left:6px;border-radius:9px;background:var(--panel-alt);box-shadow:inset 0 0 0 1px var(--border);color:var(--muted);font:600 11px/1 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-variant-numeric:tabular-nums;letter-spacing:0;text-transform:none}
.btn .bb-count{margin-left:2px}
.tf-tab.active .bb-count{background:var(--accent-soft);color:var(--accent);box-shadow:none}
.bb-muted{margin:0;font-size:13px;color:var(--muted)}
.bb-label{display:inline-flex;align-items:center;gap:2px;margin-bottom:6px;font-size:12px;font-weight:600;color:var(--text)}
.bb-hint{display:flex;align-items:center;gap:6px;margin:8px 0 0;font-size:12px;line-height:1.5;color:var(--muted)}
.bb-hint .tf-icon{flex:none}
.bb-hint.is-warning{color:var(--warning)}

/* ── Sessions pane ── */
.bb-sessions{--tf-pane-w:272px}
.bb-sessions .tf-pane-head{gap:4px;padding-right:8px}
.bb-sessions .tf-pane-head .bb-count{margin-left:4px}
.bb-pane-toggle{margin-left:auto}
.bb-group{padding:8px 8px 2px}
.bb-group-label{display:flex;align-items:center;margin:6px 8px;font-size:11px;font-weight:600;letter-spacing:.07em;text-transform:uppercase;color:var(--muted)}
.bb-group-count{margin-left:6px;color:var(--muted);letter-spacing:0}
.bb-group-empty{margin:0 8px 10px;font-size:12px;color:var(--muted)}
.bb-session-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px}
.bb-session{display:flex;flex-direction:column;gap:7px;width:100%;min-width:0;padding:10px 12px;border:1px solid transparent;border-radius:var(--tf-radius-sm);background:transparent;color:var(--text);font:inherit;text-align:left;cursor:pointer}
.bb-session:hover{background:var(--panel);border-color:var(--border)}
.bb-session:focus-visible{outline:none;border-color:var(--accent);box-shadow:var(--tf-focus)}
.bb-session.is-current{background:var(--panel);border-color:var(--accent-mid);box-shadow:none}
.bb-session.is-current:focus-visible{box-shadow:var(--tf-focus)}
.bb-session-top{display:flex;align-items:center;gap:8px;min-width:0}
.bb-session-name{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:600;line-height:1.3}
.bb-session-meta{display:flex;align-items:center;gap:12px;min-width:0;font-size:12px;color:var(--muted)}
.bb-session-meta>span{display:inline-flex;align-items:center;gap:5px;min-width:0}
.bb-session-meta .tf-icon{flex:none;color:var(--subtle)}
.bb-session-ms{flex:0 1 auto}
.bb-session-build{flex:0 1 auto;font-variant-numeric:tabular-nums}
.bb-session-progress{display:flex;align-items:center;gap:8px}
.bb-session-progress .tf-resultbar{flex:1 1 auto}
.bb-session-pct{min-width:32px;text-align:right;font:600 11px/1 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-variant-numeric:tabular-nums;color:var(--muted)}
.bb-session-foot{display:flex;align-items:center;gap:14px;font-size:11px;color:var(--muted);font-variant-numeric:tabular-nums}
.bb-session-foot>span{display:inline-flex;align-items:center;gap:4px}
.bb-session-foot .has-open{color:var(--danger)}
.bb-pane-state{display:flex;flex-direction:column;align-items:center;gap:8px;padding:28px 20px;text-align:center;font-size:13px;line-height:1.5;color:var(--muted)}
.bb-pane-state p{margin:0}
.bb-pane-state-title{font-weight:600;color:var(--text)}
.bb-pane-state-lg{padding:64px 24px}

/* ── Overview (no session open) ── */
.bb-intro-pane .tf-pane-body{display:flex;justify-content:center;padding:56px 32px}
.bb-intro{display:flex;flex-direction:column;align-items:flex-start;gap:12px;width:100%;max-width:560px}
.bb-intro .tf-empty-icon{margin:0}
.bb-intro-title{margin:4px 0 0;font-size:18px;font-weight:650;letter-spacing:-.015em;color:var(--text)}
.bb-intro-text{margin:0;font-size:13px;line-height:1.6;color:var(--muted)}
.bb-intro-steps{list-style:none;margin:8px 0;padding:0;width:100%;border:1px solid var(--border);border-radius:var(--tf-radius)}
.bb-intro-steps li{display:flex;gap:12px;padding:12px 14px;border-top:1px solid var(--border-soft)}
.bb-intro-steps li:first-child{border-top:0}
.bb-intro-num{flex:none;display:grid;place-items:center;width:22px;height:22px;border-radius:50%;background:var(--accent-soft);color:var(--accent);font:600 12px/1 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
.bb-intro-steps li>span:last-child{display:flex;flex-direction:column;gap:2px;font-size:12px;line-height:1.5;color:var(--muted)}
.bb-intro-steps strong{font-size:13px;font-weight:600;color:var(--text)}

/* ── Board header ── */
.bb-main{min-width:0}
.bb-board-head{flex:none;display:flex;flex-direction:column;gap:10px;padding:14px 20px 12px;min-width:0}
.bb-board-titlebar{display:flex;align-items:center;flex-wrap:wrap;gap:8px 10px;min-width:0}
.bb-board-titles{display:flex;align-items:center;gap:10px;flex:1 1 220px;min-width:0}
.bb-board-title{margin:0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:17px;font-weight:650;letter-spacing:-.015em;line-height:1.3;color:var(--text)}
.bb-board-titles .tf-badge{flex:none}
.bb-board-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-left:auto}
.bb-back{margin-left:-8px}
.bb-presence{display:flex;align-items:center;gap:8px}
.bb-avatars{display:inline-flex}
.bb-avatar{flex:none;display:inline-grid;place-items:center;width:24px;height:24px;border-radius:50%;background:var(--panel-alt);box-shadow:inset 0 0 0 1px var(--border);color:var(--text);font:600 10px/1 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;letter-spacing:0}
.bb-avatars{gap:3px}
.bb-avatar.is-me{background:var(--accent-soft);color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent-mid)}
.bb-avatar.is-more{background:var(--panel);color:var(--muted)}
.bb-presence-label{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--muted);white-space:nowrap}
.bb-live-dot{width:7px;height:7px;border-radius:50%;background:var(--success);box-shadow:0 0 0 3px var(--success-soft)}
.bb-board-meta{display:flex;align-items:center;flex-wrap:wrap;gap:6px 18px;min-width:0;font-size:12px;color:var(--muted)}
.bb-meta-item{display:inline-flex;align-items:center;gap:6px;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bb-meta-item .tf-icon{color:var(--subtle)}
.bb-meta-btn{margin:-4px -6px;padding:4px 6px;border:0;border-radius:var(--tf-radius-xs);background:none;color:inherit;font:inherit;cursor:pointer}
.bb-meta-btn:hover{background:var(--panel-alt);color:var(--text)}
.bb-meta-btn:hover .tf-icon{color:var(--accent)}
.bb-meta-btn:focus-visible{outline:none;box-shadow:var(--tf-focus)}
.bb-build-edit{display:inline-flex;align-items:center;gap:6px;margin:-4px 0}
.app-shell .bb-build-edit .input{width:180px;min-height:30px;height:30px;padding:0 8px;font-size:12px;border-radius:var(--tf-radius-sm)}
.bb-stats{display:flex;align-items:stretch;min-width:0;border:1px solid var(--border);border-radius:var(--tf-radius);background:var(--panel);overflow:hidden}
.bb-stat{display:flex;flex-direction:column;justify-content:center;gap:4px;min-width:0;padding:8px 16px;border-left:1px solid var(--border-soft)}
.bb-stat:first-child{border-left:0}
.bb-stat-progress{flex:1 1 220px}
.bb-stat-label{display:inline-flex;align-items:center;gap:6px;font-size:11px;color:var(--muted);white-space:nowrap}
.bb-stat-value{display:flex;align-items:baseline;gap:6px;font-size:16px;font-weight:650;line-height:1.2;letter-spacing:-.01em;font-variant-numeric:tabular-nums;color:var(--text);white-space:nowrap}
.bb-stat-sub{font-size:12px;font-weight:500;letter-spacing:0;color:var(--muted)}
.bb-stat-dot{width:8px;height:8px;border-radius:2px;background:var(--st-untested)}
.bb-stat.is-passed .bb-stat-dot{background:var(--st-passed)}
.bb-stat.is-failed .bb-stat-dot{background:var(--st-failed)}
.bb-stat.is-blocked .bb-stat-dot{background:var(--st-blocked)}
.bb-progress{display:block;margin-top:2px}
.bb-progress .tf-resultbar{display:flex}
.bb-closed-note{flex:none;display:flex;align-items:center;gap:10px;margin:0 20px 12px;padding:8px 8px 8px 12px;border:1px solid var(--border);border-radius:var(--tf-radius-sm);background:var(--panel-alt);font-size:12px;line-height:1.5;color:var(--muted)}
.bb-closed-note>.tf-icon{color:var(--info)}
.bb-closed-note .btn{margin-left:auto;flex:none}
.bb-tabbar{flex:none;display:flex;align-items:center;gap:12px;min-width:0;padding:0 20px;border-bottom:1px solid var(--border)}
.bb-tabs{flex:0 1 auto;min-width:0;align-self:stretch;border-bottom:0}
.bb-tabs .tf-tab{display:inline-flex;align-items:center}
.bb-tabbar .bb-presence{flex:none;margin-left:auto}
.bb-tabpanel{flex:1 1 auto;display:flex;flex-direction:column;min-height:0;min-width:0}

/* ── Toolbar / selection bar ── */
.bb-toolbar{flex:none;display:flex;align-items:center;flex-wrap:wrap;gap:8px;min-width:0;min-height:52px;padding:10px 20px;border-bottom:1px solid var(--border)}
.bb-search{flex:1 1 220px;max-width:340px}
.app-shell .bb-toolbar :is(.input,.select){height:32px;min-height:32px;padding-top:0;padding-bottom:0;font-size:13px;border-radius:var(--tf-radius-sm)}
.app-shell .bb-toolbar .bb-search .input{padding-left:34px}
.app-shell .bb-select{width:auto;max-width:210px;padding-right:28px}
.app-shell .bb-select.is-set{border-color:var(--accent-mid);color:var(--accent);font-weight:600}
.bb-selbar{background:color-mix(in srgb,var(--accent) 6%,var(--panel))}
.bb-selbar-count{font-size:13px;color:var(--text);margin-right:4px}
.bb-toolbar-note{font-size:12px;color:var(--muted)}

/* ── Board grid ── */
.bb-board-wrap{flex:1 1 auto;min-height:0;min-width:0;overflow:auto;background:var(--panel);overscroll-behavior:contain}
.bb-grid{width:100%;border-collapse:separate;border-spacing:0;table-layout:fixed;font-size:13px;color:var(--text)}
/* Wide enough that the case column keeps ~240px; tester columns add 40px each. */
.bb-grid.bb-cases{min-width:calc(700px + var(--bb-testers,0) * 40px)}
.bb-grid .bb-w-result{width:104px}.bb-grid .bb-w-call{width:116px}.bb-grid .bb-w-tester{width:40px}
.bb-grid .bb-w-assignee{width:148px}.bb-grid .bb-w-bugs{width:60px}
.bb-grid :is(th,td).bb-c-call{padding:0 8px}
.bb-grid td.bb-c-bugs{padding:0 8px}
.bb-grid td:is(.bb-c-call,.bb-c-tester,.bb-c-bugs,.bb-c-result){text-overflow:clip}
.bb-grid th{position:sticky;top:0;z-index:2;height:36px;padding:0 12px;vertical-align:middle;border-bottom:1px solid var(--border);background:var(--panel-alt);text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.bb-grid td{height:44px;padding:0 12px;border-bottom:1px solid var(--border-soft);background:var(--panel);vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bb-grid .bb-c-case{position:sticky;left:0;z-index:1;box-shadow:inset -1px 0 0 var(--border)}
.bb-grid th.bb-c-case{z-index:3}
.bb-grid th.bb-c-case .bb-case-cell{gap:12px}
.bb-grid :is(th,td).bb-c-tester{padding:0;text-align:center}
.bb-grid th.bb-c-tester .bb-avatar{vertical-align:middle}
.bb-grid tr.bb-row:hover>td{background:color-mix(in srgb,var(--text) 3%,var(--panel))}
.bb-grid tr.bb-row.is-selected>td{background:color-mix(in srgb,var(--accent) 6%,var(--panel))}
.bb-grid tr.bb-row.is-active>td{background:color-mix(in srgb,var(--accent) 11%,var(--panel))}
.bb-grid tr.bb-row.is-active>td.bb-c-case{box-shadow:inset -1px 0 0 var(--border)}
.bb-grid tr.bb-group-row>td{height:30px;overflow:visible;background:var(--panel-alt);border-bottom:1px solid var(--border);font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.bb-group-row-label{position:sticky;left:12px;display:inline-flex;align-items:center}
.bb-grid tr.bb-empty-row>td{height:auto;white-space:normal;overflow:visible}
.bb-case-cell{display:flex;align-items:center;gap:10px;min-width:0}
.bb-check{flex:none;width:16px;height:16px;margin:0;accent-color:var(--accent);cursor:pointer}
.bb-case-open{flex:1 1 auto;display:flex;align-items:center;gap:10px;min-width:0;margin:-4px -6px;padding:4px 6px;border:0;border-radius:var(--tf-radius-xs);background:none;color:var(--text);font:inherit;text-align:left;cursor:pointer}
.bb-case-open:hover .bb-case-title{color:var(--accent);text-decoration:underline;text-underline-offset:2px}
.bb-case-open:focus-visible{outline:none;box-shadow:var(--tf-focus)}
.bb-case-open .tf-id{flex:none;min-width:42px}
.bb-case-text{display:flex;flex-direction:column;gap:3px;min-width:0}
.bb-case-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:500;line-height:1.3}
.bb-case-sub{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;line-height:1.3;color:var(--muted)}
.bb-note-mark{flex:none;display:inline-grid;place-items:center;color:var(--accent)}
.bb-call{display:inline-flex;border:1px solid var(--border);border-radius:var(--tf-radius-sm);background:var(--panel);overflow:hidden;vertical-align:middle}
.bb-call-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;width:32px;height:28px;padding:0;border:0;border-left:1px solid var(--border);background:transparent;color:var(--muted);font:600 12px/1 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;cursor:pointer;transition:background-color .12s,color .12s}
.bb-call-btn:first-child{border-left:0}
.bb-call-btn:hover:not(:disabled){background:var(--panel-alt)}
.bb-call-btn.is-passed:hover:not(:disabled){color:var(--st-passed)}
.bb-call-btn.is-failed:hover:not(:disabled){color:var(--st-failed)}
.bb-call-btn.is-blocked:hover:not(:disabled){color:var(--st-blocked)}
.bb-call-btn[aria-pressed="true"].is-passed{background:var(--st-passed-soft);color:var(--st-passed);box-shadow:inset 0 0 0 1px var(--st-passed)}
.bb-call-btn[aria-pressed="true"].is-failed{background:var(--st-failed-soft);color:var(--st-failed);box-shadow:inset 0 0 0 1px var(--st-failed)}
.bb-call-btn[aria-pressed="true"].is-blocked{background:var(--st-blocked-soft);color:var(--st-blocked);box-shadow:inset 0 0 0 1px var(--st-blocked)}
.bb-call-btn:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--accent)}
.bb-call-btn:disabled{cursor:not-allowed;opacity:.55}
.bb-call-lg{display:flex;width:100%}
.bb-call-lg .bb-call-btn{flex:1 1 0;width:auto;height:36px;padding:0 12px;font-size:13px}
.bb-mark{display:inline-grid;place-items:center;width:24px;height:24px;border-radius:var(--tf-radius-xs);vertical-align:middle}
.bb-mark.is-passed{background:var(--st-passed-soft);color:var(--st-passed)}
.bb-mark.is-failed{background:var(--st-failed-soft);color:var(--st-failed)}
.bb-mark.is-blocked{background:var(--st-blocked-soft);color:var(--st-blocked)}
.bb-mark.is-retest{background:var(--st-retest-soft);color:var(--st-retest)}
.bb-mark.is-skipped{background:var(--st-skipped-soft);color:var(--st-skipped)}
.bb-mark.is-none::before{content:"";width:8px;height:2px;border-radius:1px;background:var(--border)}
.app-shell .bb-grid select.bb-assignee{width:100%;height:30px;min-height:30px;padding:0 4px 0 8px;border-color:transparent;border-radius:var(--tf-radius-sm);background-color:transparent;box-shadow:none;color:var(--muted);font-size:12px;text-overflow:ellipsis;cursor:pointer}
.app-shell .bb-grid select.bb-assignee:hover:not(:disabled){border-color:var(--border);background-color:var(--panel)}
.app-shell .bb-grid select.bb-assignee:focus{border-color:var(--accent);background-color:var(--panel);outline:none;box-shadow:var(--tf-focus)}
.app-shell .bb-grid select.bb-assignee.is-set{color:var(--text);font-weight:500}
.app-shell .bb-grid select.bb-assignee:disabled{cursor:not-allowed}
.bb-bug-btn{display:inline-flex;align-items:center;gap:4px;height:28px;padding:0 8px;border:1px solid transparent;border-radius:var(--tf-radius-sm);background:transparent;color:var(--muted);font:600 12px/1 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-variant-numeric:tabular-nums;cursor:pointer}
.bb-bug-btn:hover:not(:disabled){border-color:var(--border);background:var(--panel);color:var(--text)}
.bb-bug-btn.has-bugs{color:var(--danger)}
.bb-bug-btn:focus-visible{outline:none;box-shadow:var(--tf-focus)}
.bb-bug-btn:disabled{opacity:.5;cursor:not-allowed}
.bb-foot{background:var(--panel)}
.bb-foot-legend::before{content:"·";margin-right:8px;color:var(--muted)}
.bb-foot-hint{color:var(--muted)}

/* ── Bugs tab ── */
.bb-grid.bb-bugs{min-width:720px}
.bb-bugs .bb-w-sev{width:104px}.bb-bugs .bb-w-case{width:88px}.bb-bugs .bb-w-jira{width:124px}
.bb-bugs .bb-w-status{width:108px}.bb-bugs .bb-w-actions{width:132px}
.bb-bug-text{display:flex;flex-direction:column;gap:3px;min-width:0}
.bb-bug-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500}
.bb-bug-shots{display:flex;flex-wrap:wrap;gap:4px;margin-top:3px}
.bb-bug-shots a{display:block;width:40px;height:30px;border:1px solid var(--border);border-radius:var(--tf-radius-xs);overflow:hidden;background:var(--panel-alt)}
.bb-bug-shots a:focus-visible{box-shadow:var(--tf-focus)}
.bb-bug-shots img,.bb-bug-shots video{display:block;width:100%;height:100%;object-fit:cover}
.bb-bugs tr.is-resolved .bb-bug-title{color:var(--muted);text-decoration:line-through}
.bb-grid td.bb-c-actions{padding-right:8px}
.bb-row-actions{display:flex;align-items:center;justify-content:flex-end;gap:4px}
.bb-link{margin:-3px -5px;padding:3px 5px;border:0;border-radius:var(--tf-radius-xs);background:none;cursor:pointer}
.bb-link:hover{text-decoration:underline;text-underline-offset:2px}
.bb-link:focus-visible{outline:none;box-shadow:var(--tf-focus)}
a.bb-jira-link{gap:4px;color:var(--accent);text-decoration:none}
a.bb-jira-link:hover{text-decoration:underline}

/* ── Sessions overview (landing, desktop) ── */
.bb-grid.bb-overview{min-width:820px}
.bb-overview .bb-w-status{width:104px}.bb-overview .bb-w-progress{width:200px}.bb-overview .bb-w-results{width:176px}
.bb-overview .bb-w-num{width:84px}.bb-overview .bb-w-date{width:96px}
.bb-row-link{cursor:pointer}
.bb-strong{font-weight:600}
.bb-progress-cell{display:flex;align-items:center;gap:10px}
.bb-progress-cell .tf-resultbar{flex:1 1 auto}
.bb-progress-num{min-width:34px;text-align:right;font-size:12px;font-weight:600;font-variant-numeric:tabular-nums;color:var(--muted)}
.bb-nums{display:flex;align-items:center;gap:14px}
.bb-num,.bb-num-plain{display:inline-flex;align-items:center;gap:5px;font-variant-numeric:tabular-nums;color:var(--text)}
.bb-num.is-passed .bb-stat-dot{background:var(--st-passed)}
.bb-num.is-failed .bb-stat-dot{background:var(--st-failed)}
.bb-num.is-blocked .bb-stat-dot{background:var(--st-blocked)}
.bb-num-plain .tf-icon{color:var(--subtle)}
.bb-num-strong{font-weight:600;color:var(--danger)}
.bb-num-muted{color:var(--muted)}

/* ── Case inspector ── */
.bb-workbench .bb-inspector{--tf-inspector-w:min(420px,38%);background:var(--panel)}
/* Docked inspector: the board gives up width from its fixed columns first. */
.bb-workbench.has-inspector.vp-xl .bb-grid .bb-w-assignee{width:140px}
.bb-insp-head{gap:4px;padding:8px 8px 8px 16px}
.bb-insp-pos{margin-left:6px;font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}
.bb-insp-body{padding:18px 20px 28px}
.bb-insp-title{margin:0;font-size:16px;font-weight:650;line-height:1.4;letter-spacing:-.01em;color:var(--text);overflow-wrap:anywhere}
.bb-insp-badges{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
.bb-insp-path{display:flex;align-items:center;gap:6px;margin-top:10px;font-size:12px;color:var(--muted)}
.bb-insp-sec{margin-top:18px;padding-top:16px;border-top:1px solid var(--border-soft)}
.bb-insp-sec-title{display:flex;align-items:center;margin:0 0 10px;font-size:11px;font-weight:600;letter-spacing:.07em;text-transform:uppercase;color:var(--muted)}
.bb-insp-text{margin:0;font-size:13px;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere;color:var(--text)}
.bb-insp-body .select,.bb-insp-body .textarea{width:100%}
.app-shell .bb-insp-body .textarea{min-height:96px;font-family:inherit;font-size:13px;line-height:1.5;resize:vertical}
.bb-steps{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:12px}
.bb-steps li{display:flex;gap:10px;min-width:0}
.bb-step-n{flex:none;display:grid;place-items:center;width:22px;height:22px;border-radius:50%;background:var(--panel-alt);box-shadow:inset 0 0 0 1px var(--border);color:var(--text);font:600 11px/1 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
.bb-step-body{flex:1 1 auto;display:flex;flex-direction:column;gap:6px;min-width:0;padding-top:2px;font-size:13px;line-height:1.55}
.bb-step-action{white-space:pre-wrap;overflow-wrap:anywhere}
.bb-step-exp{padding:8px 10px;border-radius:var(--tf-radius-sm);background:var(--panel-alt);box-shadow:inset 2px 0 0 var(--st-passed);white-space:pre-wrap;overflow-wrap:anywhere}
.bb-step-exp>span{display:block;margin-bottom:2px;font-size:11px;font-weight:600;color:var(--muted)}
.bb-testers{list-style:none;margin:12px 0 0;padding:0;border:1px solid var(--border-soft);border-radius:var(--tf-radius-sm)}
.bb-testers li{display:flex;align-items:center;gap:10px;padding:8px 10px;border-top:1px solid var(--border-soft);font-size:13px}
.bb-testers li:first-child{border-top:0}
.bb-testers-name{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bb-testers-time{font-size:11px;color:var(--muted);white-space:nowrap}
.bb-note-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:8px}
.bb-note-foot .bb-hint{margin:0}
.bb-insp-bugs{list-style:none;margin:0 0 10px;padding:0;display:flex;flex-direction:column;gap:6px}
.bb-insp-bugs li{display:flex;align-items:center;gap:8px;min-width:0;padding:6px 6px 6px 10px;border:1px solid var(--border);border-radius:var(--tf-radius-sm)}
.bb-insp-bug-title{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}
.bb-insp-bugs li.is-resolved .bb-insp-bug-title{color:var(--muted);text-decoration:line-through}
.bb-link-bug{margin-top:14px}
.bb-link-bug-row{display:flex;align-items:center;gap:8px}
.bb-link-bug-row .select{flex:1 1 auto;min-width:0}
.app-shell .bb-insp-body :is(.select,.input){min-height:34px}
.bb-insp-danger{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:20px;padding:12px 14px;border:1px solid color-mix(in srgb,var(--danger) 30%,var(--border));border-radius:var(--tf-radius-sm)}
.bb-insp-danger-title{font-size:13px;font-weight:600;color:var(--text)}
.bb-insp-danger .bb-hint{margin-top:2px}
.bb-insp-danger .btn{flex:none}
.bb-inspector.is-overlay{position:absolute;top:0;right:0;bottom:0;z-index:30;width:min(520px,calc(100% - 48px));box-shadow:var(--shadow-lg)}
.bb-insp-backdrop{position:absolute;inset:0;z-index:29;background:color-mix(in srgb,var(--text) 22%,transparent)}

/* ── Dialogs ── */
.media-lightbox.bb-dialog-layer{z-index:130}
.media-lightbox-inner.bb-dialog{display:flex;flex-direction:column;width:min(520px,100%);min-width:0;min-height:0;max-height:calc(100dvh - 48px);padding:0;overflow:hidden;resize:none;border-radius:var(--tf-radius);box-shadow:var(--shadow-lg)}
.media-lightbox-inner.bb-dialog.is-wide{width:min(600px,100%)}
.bb-dialog-form{display:flex;flex-direction:column;flex:1 1 auto;min-height:0}
.bb-dialog-head{flex:none;display:flex;align-items:flex-start;gap:12px;padding:16px 12px 14px 20px;border-bottom:1px solid var(--border-soft)}
.bb-dialog-titles{flex:1 1 auto;min-width:0}
.bb-dialog-title{margin:0;font-size:16px;font-weight:650;line-height:1.3;letter-spacing:-.01em;color:var(--text)}
.bb-dialog-sub{margin:4px 0 0;font-size:12px;line-height:1.5;color:var(--muted)}
.bb-dialog-body{flex:1 1 auto;display:flex;flex-direction:column;gap:16px;min-height:0;padding:18px 20px;overflow:auto}
.bb-dialog-body .tf-empty{padding:16px 8px}
.bb-dialog-foot{flex:none;display:flex;justify-content:flex-end;gap:8px;padding:12px 20px;border-top:1px solid var(--border-soft);background:var(--panel-alt)}
.bb-field{display:flex;flex-direction:column;min-width:0}
.bb-field .bb-hint{margin-top:6px}
.app-shell .bb-dialog :is(.input,.select,.textarea),.bb-dialog :is(.input,.select,.textarea){width:100%;min-height:36px;border-radius:var(--tf-radius-sm);font-size:13px}
.bb-dialog .textarea{min-height:96px;font-family:inherit;line-height:1.5}
.bb-dialog :is(.input,.select)[aria-invalid="true"]{border-color:var(--danger)}
.bb-field-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.bb-req{color:var(--danger)}
.bb-optional{margin-left:4px;font-size:11px;font-weight:400;color:var(--muted)}
.bb-field-error{margin:6px 0 0;font-size:12px;color:var(--danger)}
.bb-shots{display:flex;flex-direction:column;gap:8px;min-width:0}
.bb-shots-list{display:flex;flex-wrap:wrap;gap:8px;margin:0;padding:0;list-style:none}
.bb-shot{position:relative;width:72px;height:56px;border:1px solid var(--border);border-radius:var(--tf-radius-sm);background:var(--panel-alt);overflow:hidden}
.bb-shot a{display:block;width:100%;height:100%}
.bb-shot img{display:block;width:100%;height:100%;object-fit:cover}
.bb-shot .btn.bb-shot-x{position:absolute;top:3px;right:3px;width:24px;height:24px;min-height:0;padding:0;background:var(--panel);border:1px solid var(--border);color:var(--text)}
.bb-shot .btn.bb-shot-x:hover{background:var(--panel-alt)}
.bb-shots-bar{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.bb-shot-add.is-busy{cursor:progress;opacity:.75}
.bb-shot-add:focus-within{box-shadow:var(--tf-focus)}
.bb-shots-tip{font-size:12px}
.bb-sev-seg{display:flex}
.bb-sev-seg>button{flex:1 1 0;display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:30px}
.bb-sev-seg>button:focus-visible{outline:none;box-shadow:var(--tf-focus)}
.bb-sev-dot{width:8px;height:8px;border-radius:50%;background:var(--pri-low)}
.bb-sev-seg .is-critical .bb-sev-dot{background:var(--pri-critical)}
.bb-sev-seg .is-high .bb-sev-dot{background:var(--pri-high)}
.bb-sev-seg .is-medium .bb-sev-dot{background:var(--pri-medium)}
.bb-team-bar{display:flex;align-items:center;gap:4px;margin-bottom:8px}
.bb-team-bar .bb-label{margin:0}
.bb-team-search{max-width:none;margin-bottom:8px}
.bb-team-list{max-height:min(320px,38vh);overflow:auto;border:1px solid var(--border);border-radius:var(--tf-radius-sm)}
.app-shell .bb-team-list .bb-team-member,.bb-team-list .bb-team-member{display:flex;align-items:center;gap:10px;padding:8px 12px;border-top:1px solid var(--border-soft);border-radius:0;font-size:13px;cursor:pointer}
.bb-team-list .bb-team-member:first-child{border-top:0}
.bb-team-list .bb-team-member:hover{background:var(--panel-alt)}
.bb-team-member input{flex:none;width:16px;height:16px;margin:0;accent-color:var(--accent)}
.bb-team-who{display:flex;flex-direction:column;gap:1px;min-width:0}
.bb-team-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500;color:var(--text)}
.bb-team-handle{font-size:11px;color:var(--muted)}
.bb-team-none{padding:16px}
.bb-dialog .form-group{display:flex;flex-direction:column;gap:6px}
.bb-dialog .form-label{font-size:12px;font-weight:600;color:var(--text)}

/* Compact desktop: the inspector overlays, the toolbar tightens. */
@media(max-width:1439px){
 .bb-sessions{--tf-pane-w:256px}
 .bb-grid .bb-w-assignee{width:140px}
}
@media(max-width:1279px){
 .bb-board-head{padding:12px 16px 10px}
 .bb-tabbar{padding:0 16px}
 .bb-toolbar{padding:10px 16px}
 .bb-closed-note{margin:0 16px 10px}
 .bb-stat{padding:8px 12px}
 .bb-foot-hint{display:none}
 .bb-grid.bb-overview{min-width:600px}
 .bb-overview .bb-o-wide{display:none}
 .bb-overview .bb-w-progress{width:150px}.bb-overview .bb-w-results{width:150px}
}
/* Phones: panes stack, the board keeps its own scroll box (sticky header and
   case column still work), the inspector and dialogs cover the bottom nav. */
@media(max-width:900px){
 .bb-workbench{margin:-16px -14px 0;border-bottom:1px solid var(--border)}
 .bb-intro-pane .tf-pane-body{padding:28px 16px}
 .bb-board-head{padding:12px 14px 10px;gap:8px}
 .bb-board-titlebar{gap:6px 8px}
 .bb-board-titles{flex-basis:100%;order:2}
 .bb-board-actions{order:1;margin-left:auto}
 .bb-back{order:0}
 .bb-board-meta{gap:6px 14px}
 .bb-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}
 .bb-stat{border-top:1px solid var(--border-soft);padding:8px 10px}
 .bb-stat-progress{grid-column:1/-1;border-top:0}
 .bb-stat:nth-child(2){border-left:0}
 .bb-stat.is-untested{display:none}
 .bb-tabbar{padding:0 14px}
 .bb-toolbar{padding:10px 14px}
 .bb-search{flex-basis:100%;max-width:none}
 .app-shell .bb-toolbar .bb-select{flex:1 1 140px;min-width:0;max-width:none}
 .bb-closed-note{margin:0 14px 10px;flex-wrap:wrap}
 .bb-board-wrap{flex:none;height:min(70dvh,calc(100dvh - 210px));min-height:300px}
 .bb-grid .bb-w-assignee{width:140px}.bb-grid .bb-w-call{width:128px}
 .bb-grid :is(th,td){padding:0 10px}
 /* Larger touch targets for the inline calls and row checkboxes. */
 .bb-cases .bb-call-btn{width:36px;height:32px}
 .bb-cases .bb-check{width:18px;height:18px}
 /* The sticky case column keeps ~230px; the rest scrolls sideways. */
 .bb-grid.bb-cases{min-width:calc(660px + var(--bb-testers,0) * 40px)}
 /* ID moves under the title so the title gets the column's full width. */
 .bb-cases .bb-case-open{display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-areas:"title title" "id sub";column-gap:6px;row-gap:3px;align-items:baseline}
 .bb-cases .bb-case-text{display:contents}
 .bb-cases .bb-case-title{grid-area:title}
 .bb-cases .bb-case-sub{grid-area:sub}
 .bb-cases .bb-case-open .tf-id{grid-area:id;min-width:0;font-size:11px}
 .bb-foot{flex-wrap:wrap}
 .bb-foot-legend{display:none}
 .app-shell .bb-grid select.bb-assignee,.app-shell .bb-toolbar :is(.input,.select){font-size:16px}
 .bb-inspector.is-overlay{position:fixed;inset:0;z-index:120;width:auto;border:0;box-shadow:none}
 .bb-workbench .bb-inspector .tf-pane-body{overflow:auto;overscroll-behavior:contain}
 .bb-insp-body{padding-bottom:calc(28px + env(safe-area-inset-bottom,0px))}
 .bb-insp-head{padding-top:calc(8px + env(safe-area-inset-top,0px))}
 .app-shell .bb-insp-body :is(.select,.input,.textarea){font-size:16px}
}
/* Phones: bugs read as stacked rows instead of a sideways-scrolling table. */
@media(max-width:600px){
 .bb-grid.bb-bugs{display:block;min-width:0}
 .bb-bugs :is(colgroup,thead){display:none}
 .bb-bugs tbody{display:block}
 .bb-bugs tr.bb-row{display:grid;grid-template-columns:auto auto minmax(0,1fr) auto;grid-template-areas:"bug bug bug status" "sev case jira actions";align-items:center;gap:8px 10px;padding:12px 14px;border-bottom:1px solid var(--border-soft);background:var(--panel)}
 .bb-grid.bb-bugs td{display:block;height:auto;min-width:0;padding:0;border:0;background:none;overflow:visible}
 .bb-bugs td.bb-c-bug{grid-area:bug}
 .bb-bugs td.bb-c-sev{grid-area:sev}
 .bb-bugs td.bb-c-bcase{grid-area:case}
 .bb-bugs td.bb-c-jira{grid-area:jira;min-width:0;overflow:hidden}
 .bb-bugs td.bb-c-bstatus{grid-area:status;align-self:start}
 .bb-bugs td.bb-c-actions{grid-area:actions;padding:0}
 .bb-bugs .bb-bug-title{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
}
@media(max-width:540px){
 .bb-meta-low{display:none}
 .media-lightbox.bb-dialog-layer{padding:8px;place-items:end center}
 .media-lightbox-inner.bb-dialog{max-height:calc(100dvh - 16px)}
 .bb-field-row{grid-template-columns:1fr}
 .bb-stat-label .tf-icon{display:none}
 .bb-dialog-body{padding:16px}
 .bb-dialog-foot{padding:12px 16px calc(12px + env(safe-area-inset-bottom,0px))}
 .bb-dialog-foot .btn{flex:1 1 0}
 .bb-sev-seg>button{padding:0 6px}
 .app-shell .bb-dialog :is(.input,.select,.textarea){font-size:16px}
}
/* Phones: one card per case — your call as big buttons, other testers'
   calls, assignee and bugs. Start bug bash is the FAB. */
@media(max-width:900px){
 .bb-m-panel{display:flex;flex-direction:column;gap:0;padding:12px 14px 0}
 .bb-m-filters{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:0 0 12px}
 .bb-m-filters .select{min-height:44px;font-size:15px;border-radius:10px}
 .bb-m-group{top:calc(56px + env(safe-area-inset-top,0px));margin:0 -14px}
 .bb-m-list{list-style:none;margin:10px 0 16px;padding:0;display:flex;flex-direction:column;gap:10px}
 .bb-m-card{display:flex;flex-direction:column;gap:10px;padding:14px;border:1px solid var(--border);border-radius:12px;background:var(--panel)}
 .bb-m-card.has-call{border-color:var(--border)}
 .bb-m-open{display:flex;flex-direction:column;gap:6px;padding:0;border:0;background:none;color:var(--text);text-align:left;font:inherit;cursor:pointer}
 .bb-m-top{display:flex;align-items:center;gap:8px;min-width:0;font-size:12px;color:var(--muted)}
 .bb-m-top .tf-badge{margin-left:auto;flex:none}
 .bb-m-title{font-size:15px;font-weight:600;line-height:1.35}
 .bb-m-call{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
 .bb-m-callbtn{display:flex;align-items:center;justify-content:center;gap:6px;min-height:46px;border-radius:10px;border:1px solid var(--border);background:var(--panel);color:var(--text);font:600 14px/1 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;cursor:pointer}
 .bb-m-callbtn.is-passed{color:var(--st-passed)}.bb-m-callbtn.is-failed{color:var(--st-failed)}.bb-m-callbtn.is-blocked{color:var(--st-blocked)}
 .bb-m-callbtn.is-on.is-passed{background:var(--st-passed);border-color:var(--st-passed);color:#fff}
 .bb-m-callbtn.is-on.is-failed{background:var(--st-failed);border-color:var(--st-failed);color:#fff}
 .bb-m-callbtn.is-on.is-blocked{background:var(--st-blocked);border-color:var(--st-blocked);color:#fff}
 .bb-m-callbtn:disabled{opacity:.5}
 .bb-m-others{display:flex;flex-wrap:wrap;gap:6px}
 .bb-m-other{display:inline-flex;align-items:center;gap:4px;padding:2px 8px 2px 2px;border:1px solid var(--border-soft);border-radius:999px;background:var(--panel-alt)}
 .bb-m-foot{display:flex;align-items:center;gap:8px}
 .bb-m-assignee{flex:1 1 auto;display:flex;align-items:center;gap:6px;min-width:0;color:var(--muted)}
 .bb-m-assignee .select{flex:1;min-width:0;min-height:40px;font-size:15px}
 .bb-m-bug{flex:none;min-height:40px}
}

.bb-bug-title .bb-bug-key{margin-right:8px}
.bb-c-bstatus .bt-status{max-width:100%}
/* @endregion bugbash */

/* @region bugs — built-in bug tracker: list, detail, form, pickers, and the bug surfaces on cases, runs and Test Together */
/* Layer host for dialogs, peeks and forms mounted outside a screen. */
.bt-layer-host{display:contents}
.bt-muted{color:var(--muted)}
.bt-hint{margin:4px 0 0;font-size:12px;color:var(--muted)}
.bt-empty-line{margin:0;font-size:13px;color:var(--muted);display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.bt-empty .bt-empty-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:center}
.bt-row-actions{display:flex;gap:6px;justify-content:flex-end;margin-top:6px}

/* Atoms: status, severity, priority, keys, chips, avatars */
.bt-status{display:inline-flex;align-items:center;gap:5px;height:22px;padding:0 8px 0 6px;border-radius:var(--tf-radius-xs);font:600 11px/1 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;white-space:nowrap;color:var(--muted);background:var(--panel-alt);box-shadow:inset 0 0 0 1px var(--border-soft)}
.bt-status.is-subtle{color:var(--subtle)}
.bt-status.is-muted{color:var(--muted)}
.bt-status.is-info{color:var(--info);background:var(--info-soft);box-shadow:none}
.bt-status.is-retest{color:var(--st-retest);background:var(--st-retest-soft);box-shadow:none}
.bt-status.is-passed{color:var(--st-passed);background:var(--st-passed-soft);box-shadow:none}
.bt-status .bt-glyph{flex:none}
.bt-sev{text-transform:none}
.bt-pri{display:inline-flex;align-items:center;gap:4px;font:600 12px/1 var(--tf-font-mono);color:var(--muted);white-space:nowrap}
.bt-pri .tf-icon{color:var(--muted)}
.bt-pri.is-p1 .tf-icon{color:var(--danger)}
.bt-key{text-decoration:none}
.bt-key:hover{text-decoration:underline}
.bt-sev-dot{width:7px;height:7px;border-radius:50%;background:var(--pri-medium);flex:none}
.is-critical>.bt-sev-dot,.bt-chip.is-critical .bt-sev-dot,.bt-sev-seg .is-critical .bt-sev-dot{background:var(--pri-critical)}
.bt-chip.is-high .bt-sev-dot,.bt-sev-seg .is-high .bt-sev-dot{background:var(--pri-high)}
.bt-chip.is-medium .bt-sev-dot,.bt-sev-seg .is-medium .bt-sev-dot{background:var(--pri-medium)}
.bt-chip.is-low .bt-sev-dot,.bt-sev-seg .is-low .bt-sev-dot{background:var(--pri-low)}
.bt-chip{display:inline-flex;align-items:center;height:26px;border-radius:13px;border:1px solid var(--border);background:var(--panel);color:var(--text);font:600 12px/1 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;max-width:100%;overflow:hidden}
.bt-chip-main{display:inline-flex;align-items:center;gap:6px;height:100%;padding:0 9px;border:0;background:transparent;color:inherit;font:inherit;cursor:pointer;min-width:0}
.bt-chip-main:hover{background:var(--panel-alt)}
.bt-chip-key{font-family:var(--tf-font-mono);color:var(--accent)}
.bt-chip-sev,.bt-chip-st{color:var(--muted);font-weight:500;white-space:nowrap}
.bt-chip .bt-glyph{color:var(--st-retest)}
.bt-chip.is-closed{opacity:.7}
.bt-chip-x{display:grid;place-items:center;width:24px;height:100%;border:0;border-left:1px solid var(--border-soft);background:transparent;color:var(--muted);cursor:pointer}
.bt-chip-x:hover{color:var(--danger);background:var(--danger-soft)}
.bt-chip.is-big{height:44px;border-radius:22px}
.bt-chip.is-big .bt-chip-x{width:40px}
:is(.app-shell,.bt-layer-host) .btn.bt-chip-more,.bt-chip-more{height:26px;min-height:26px;padding:0 9px;border-radius:13px;font:600 12px/1 Inter,sans-serif;color:var(--muted)}
.bt-avatar{display:inline-grid;place-items:center;width:24px;height:24px;border-radius:50%;background:var(--accent-soft);color:var(--accent);font:650 10px/1 Inter,sans-serif;flex:none;letter-spacing:.02em}
.bt-avatar.is-sm{width:20px;height:20px;font-size:9px}
:is(.bt-chip-main,.bt-chip-x,.bt-inline,.bt-viewbtn,.bt-headlink,.bt-th-btn,.bt-more-toggle,.bt-ind,.bt-tile-open,.bt-picker-opt,.bt-fchip-x,.bt-ctx-x):focus-visible{outline:none;box-shadow:var(--tf-focus)}

/* Fields shared by the form and the dialogs */
.bt-field{display:flex;flex-direction:column;gap:6px;min-width:0}
.bt-label{font-size:12px;font-weight:600;color:var(--text)}
.bt-label-row{display:flex;align-items:center;justify-content:space-between;gap:8px}
.bt-req{color:var(--danger)}
.bt-optional{color:var(--muted);font-weight:500}
.bt-field-error{margin:0;font-size:12px;color:var(--danger)}
.bt-check{display:inline-flex;align-items:center;gap:8px;font-size:13px;color:var(--text);cursor:pointer}
.bt-check input{accent-color:var(--accent);width:16px;height:16px;margin:0;flex:none;cursor:pointer}
.bt-cp-row input[type=checkbox],.bt-ev-check input,.bt-m-check input{accent-color:var(--accent)}
.bt-form-stack{display:flex;flex-direction:column;gap:14px}
.bt-radios{border:0;margin:0;padding:0;display:flex;flex-direction:column;gap:4px}
.bt-radios legend{margin-bottom:6px}
.bt-radio{display:flex;align-items:center;gap:10px;min-height:34px;padding:0 10px;border-radius:var(--tf-radius-sm);cursor:pointer;font-size:13px}
.bt-radio:hover{background:var(--panel-alt)}
.bt-radio.is-on{background:var(--accent-soft);color:var(--accent)}
.bt-dupe-btn{justify-content:flex-start;max-width:100%}
.bt-dupe-btn .tf-truncate{max-width:260px}
.bt-mf-runs{border:0;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.bt-sev-seg{flex-wrap:wrap}
.bt-sev-seg>button{display:inline-flex;align-items:center;gap:6px}
.bt-foot-note{font-size:12px;color:var(--muted)}
.bt-sheet-sub{margin:0 0 12px;font-size:13px;color:var(--muted)}

/* Popover + pickers */
.bt-popover{z-index:10001;display:flex;flex-direction:column;background:var(--panel);color:var(--text);border:1px solid var(--border);border-radius:var(--tf-radius);box-shadow:var(--shadow-lg);overflow:hidden}
.bt-picker-search{flex:none;max-width:none;padding:10px 10px 8px;border-bottom:1px solid var(--border-soft)}
.bt-picker-search .tf-search-icon{left:21px}
.bt-picker-search .input{padding-left:34px}
.bt-sec-actions .btn.is-disabled{opacity:.5;cursor:not-allowed}
.bt-picker-list{flex:1 1 auto;min-height:0;max-height:340px;overflow:auto;padding:4px 6px 8px}
.bt-picker-sheet .bt-picker-list{max-height:none}
.bt-picker-head{padding:10px 8px 4px;font-size:10px;font-weight:650;color:var(--subtle);text-transform:uppercase;letter-spacing:.07em}
.bt-picker-opt{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:8px;min-height:36px;padding:4px 8px;border-radius:var(--tf-radius-xs);cursor:pointer;font-size:13px}
.bt-picker-opt.is-active{background:var(--accent-soft)}
.bt-picker-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bt-picker-none{margin:0;padding:18px 10px;text-align:center;color:var(--muted);font-size:13px}
.bt-casepicker .rx-dialog-body{padding:0;gap:0}
.bt-casepicker-body{display:flex;flex-direction:column;min-height:0;height:100%}
.bt-casepicker-search{max-width:none;flex:none;padding:12px 16px;border-bottom:1px solid var(--border-soft)}
.bt-casepicker-search .tf-search-icon{left:27px}
.bt-casepicker-list{flex:1 1 auto;min-height:220px;max-height:min(56vh,520px);overflow:auto;padding:4px 8px 10px}
.bt-cp-row{display:grid;grid-template-columns:auto auto minmax(0,1fr) auto;align-items:center;gap:10px;min-height:44px;padding:4px 8px;border-radius:var(--tf-radius-xs);cursor:pointer}
.bt-cp-row.is-active{background:var(--panel-alt)}
.bt-cp-row.is-linked{cursor:default;opacity:.65}
.bt-cp-title{display:flex;flex-direction:column;min-width:0}
.bt-cp-t{font-size:13px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bt-cp-sec{font-size:12px;color:var(--muted)}
.bt-keys+.bt-keys{margin-top:14px}
.bt-keys-title{margin:0 0 6px;font-size:11px;font-weight:650;color:var(--muted);text-transform:uppercase;letter-spacing:.06em}
.bt-keys-list{display:grid;grid-template-columns:max-content 1fr;gap:6px 14px;margin:0;font-size:13px}
.bt-keys-list dd{margin:0}
.bt-keys-list kbd{font:600 11px/1 var(--tf-font-mono);padding:3px 6px;border-radius:4px;border:1px solid var(--border);background:var(--panel-alt);color:var(--text)}

/* Lightbox */
.bt-lightbox{position:fixed;inset:0;z-index:10050;display:flex;align-items:center;justify-content:center;padding:24px;background:color-mix(in srgb,var(--text) 72%,transparent)}
.bt-lightbox-box{display:flex;flex-direction:column;max-width:min(1100px,100%);max-height:100%;background:var(--panel);border:1px solid var(--border);border-radius:var(--tf-radius);outline:none;overflow:hidden}
.bt-lightbox-head{display:flex;align-items:center;gap:10px;padding:8px 10px 8px 16px;border-bottom:1px solid var(--border)}
.bt-lightbox-name{flex:1;min-width:0;font-size:13px;font-weight:600}
.bt-lightbox-pos{font-size:12px;color:var(--muted)}
.bt-lightbox-stage{display:flex;align-items:center;gap:8px;padding:12px;min-height:0;background:var(--panel-alt)}
.bt-lightbox-stage img{max-width:min(960px,calc(100vw - 160px));max-height:calc(100dvh - 160px);object-fit:contain;border-radius:4px}

/* ── Form ── */
.bt-form{display:flex;flex-direction:column;gap:16px;min-width:0;container-type:inline-size}
.bt-form.is-over{outline:2px dashed var(--accent-mid);outline-offset:4px;border-radius:var(--tf-radius-sm)}
.bt-form-dialog.rx-dialog{width:min(760px,100%)}
@media(min-width:901px) and (max-width:1279px){.bt-form-dialog.rx-dialog{width:min(92vw,760px)}}
.bt-form-dialog.is-compact.rx-dialog{width:min(520px,100%)}
.bt-form-row{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr) minmax(0,1fr);gap:14px;align-items:start}
.bt-ea{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px}
@container (max-width:639px){.bt-ea{grid-template-columns:1fr}.bt-form-row{grid-template-columns:1fr 1fr}.bt-form-row>:first-child{grid-column:1/-1}}
.bt-field.is-actual .textarea{border-left:3px solid var(--st-failed)}
.bt-env{border:0;margin:0;padding:0;min-width:0}
.bt-env legend{margin-bottom:8px}
.bt-env-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
@container (max-width:639px){.bt-env-grid{grid-template-columns:1fr 1fr}}
.bt-env-f .bt-label{font-weight:500;color:var(--muted)}
.bt-env-f .input{width:100%;min-width:0}
.bt-this-browser{border:0;background:transparent;padding:0;font:600 11px/1.2 Inter,sans-serif;color:var(--accent);cursor:pointer;white-space:nowrap}
.bt-this-browser:hover{text-decoration:underline}
.bt-ctx{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:10px 12px;border:1px solid var(--border-soft);border-radius:var(--tf-radius-sm);background:var(--panel-alt)}
.bt-ctx-chip{display:inline-flex;align-items:center;gap:6px;max-width:100%;height:26px;padding:0 4px 0 9px;border-radius:13px;background:var(--panel);border:1px solid var(--border);font-size:12px;min-width:0}
.bt-ctx-chip .tf-truncate{max-width:220px}
.bt-ctx-x{display:grid;place-items:center;width:20px;height:20px;border:0;border-radius:50%;background:transparent;color:var(--muted);cursor:pointer}
.bt-ctx-x:hover{background:var(--panel-alt);color:var(--text)}
.bt-similar{display:flex;flex-direction:column;gap:6px;padding:10px 12px;border:1px solid var(--border-soft);border-left:3px solid var(--st-retest);border-radius:var(--tf-radius-sm)}
.bt-similar-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.bt-similar-list li{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:8px;font-size:13px}
.bt-similar-meta{font-size:12px;color:var(--muted);white-space:nowrap}
.bt-ev{display:flex;flex-direction:column;gap:8px}
.bt-ev-list{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:8px}
.bt-ev-tile{position:relative;width:72px;display:flex;flex-direction:column;gap:3px}
.bt-ev-tile img,.bt-ev-file{width:72px;height:72px;border-radius:var(--tf-radius-sm);border:1px solid var(--border);object-fit:cover;background:var(--panel-alt);display:grid;place-items:center;color:var(--muted)}
.bt-ev-tile.is-off img{opacity:.4}
.bt-ev-name{font-size:11px;color:var(--muted)}
.bt-ev-check{position:absolute;top:4px;left:4px;display:grid;place-items:center;width:22px;height:22px;border-radius:4px;background:var(--panel)}
.bt-ev-x{position:absolute;top:3px;right:3px;width:22px;height:22px;display:grid;place-items:center;border-radius:50%;border:1px solid var(--border);background:var(--panel);color:var(--muted);cursor:pointer}
.bt-ev-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.bt-ev-tile .bt-ev-video{width:72px;height:72px;border-radius:var(--tf-radius-sm);border:1px solid var(--border);object-fit:cover;background:#000}
/* Screen recorder (BugScreenRecorder): inline on the bug form and the bug's Attachments */
.bt-rec{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.bt-rec.is-live{padding:6px 10px;border:1px solid var(--border);border-radius:var(--tf-radius-sm);background:var(--panel-alt);align-self:flex-start}
.bt-rec-dot{width:10px;height:10px;border-radius:50%;background:var(--danger);animation:bt-rec-pulse 1.2s ease-in-out infinite}
@keyframes bt-rec-pulse{50%{opacity:.35}}
@media (prefers-reduced-motion:reduce){.bt-rec-dot{animation:none}}
.bt-rec-label{font-size:13px;font-weight:600}
.bt-rec-time{font-size:13px;font-variant-numeric:tabular-nums;color:var(--muted)}
.bt-rec-square{display:inline-block;width:9px;height:9px;border-radius:2px;background:currentColor}
.bt-rec.is-preview{flex-direction:column;align-items:flex-start;gap:6px;max-width:100%}
.bt-rec-video{display:block;width:360px;max-width:100%;max-height:240px;border-radius:var(--tf-radius-sm);border:1px solid var(--border);background:#000}
.bt-rec-meta{display:flex;gap:8px;flex-wrap:wrap;font-size:12px;min-width:0;overflow-wrap:anywhere}
.bt-rec-actions{display:flex;gap:8px;flex-wrap:wrap}
.bt-rec-note{margin:0;font-size:12px;color:var(--muted)}
.bt-rec-note.is-error{color:var(--danger)}
.bt-draft-note{display:flex;align-items:center;gap:8px;padding:6px 6px 6px 10px;border-radius:var(--tf-radius-sm);background:var(--info-soft);color:var(--info);font-size:12px;font-weight:600}
.bt-draft-note .btn{margin-left:auto}
.bt-compact-sub{margin:-6px 0 0}
.bt-more{display:flex;flex-direction:column;gap:12px}
.bt-more-toggle{display:inline-flex;align-items:center;gap:6px;align-self:flex-start;border:0;background:transparent;padding:4px 2px;font:600 12px/1 Inter,sans-serif;color:var(--muted);cursor:pointer;border-radius:4px}
.bt-more-toggle:hover{color:var(--text)}
.bt-more-body{display:flex;flex-direction:column;gap:14px}
.bt-another{margin-right:auto}
.bt-form-page{max-width:880px;margin:0 auto;display:flex;flex-direction:column;gap:16px}
.bt-form-page-inner{background:var(--panel);border:1px solid var(--border);border-radius:var(--tf-radius);padding:20px}
.bt-form-page-foot{display:flex;align-items:center;gap:8px;position:sticky;bottom:0;padding:12px 0;background:var(--bg)}
.bt-crumb-now{font-size:13px;font-weight:600;color:var(--text);margin-left:6px}
.bt-form-sheet .tf-sheet-foot{align-items:center;flex-wrap:wrap}
.bt-form-sheet .tf-sheet-foot .bt-another{flex:1 0 100%;margin-right:0}
.bt-form-sheet .tf-sheet-foot .btn{white-space:nowrap}

/* ── List screen ── */
.bt-workbench{position:relative}
.bt-headmeta{display:inline-flex;align-items:center;flex-wrap:wrap;gap:2px;font-size:13px;color:var(--muted)}
.bt-headlink{border:0;background:transparent;padding:2px 2px;font:inherit;color:var(--muted);cursor:pointer;border-radius:4px}
.bt-headlink:hover{color:var(--accent);text-decoration:underline}
.bt-views{width:260px}
.bt-viewlist{display:flex;flex-direction:column;gap:2px;padding:10px 8px}
.bt-viewbtn{display:flex;align-items:center;gap:8px;min-height:34px;padding:0 10px;border:0;border-radius:var(--tf-radius-sm);background:transparent;color:var(--text);font:500 13px/1.2 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;text-align:left;cursor:pointer}
.bt-viewbtn:hover{background:var(--panel)}
.bt-viewbtn.is-current{background:var(--accent-soft);color:var(--accent);font-weight:650;box-shadow:inset 0 0 0 1px var(--accent-mid)}
.bt-viewbtn-label{flex:1;min-width:0}
.bt-viewbtn-n{font:600 12px/1 var(--tf-font-mono);color:var(--muted)}
.bt-viewbtn.is-current .bt-viewbtn-n{color:var(--accent)}
.bt-onlymine{margin:6px 18px 12px;font-size:12px}
.bt-main{min-width:0}
.bt-toolbar-wrap{flex:none;border-bottom:1px solid var(--border)}
.bt-toolbar{border-bottom:0;flex-wrap:wrap}
.bt-search{flex:1 1 260px;max-width:440px}
.bt-filter-panel{width:min(560px,calc(100vw - 32px))}
.bt-filter-groups{grid-template-columns:repeat(2,minmax(0,1fr))}
.bt-filter-groups .select,.bt-filter-groups .input{width:100%}
.bt-filter-chosen{display:flex;align-items:center;gap:8px}
.bt-filter-sugg{list-style:none;margin:6px 0 0;padding:0;display:flex;flex-direction:column;gap:2px;max-height:160px;overflow:auto}
.bt-filter-sugg button{width:100%;text-align:left;border:0;background:transparent;padding:6px 8px;border-radius:4px;font-size:12px;color:var(--text);cursor:pointer;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bt-filter-sugg button:hover{background:var(--panel-alt)}
.bt-fchips{display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:0 16px 10px}
.bt-fchip{display:inline-flex;align-items:center;gap:4px;height:26px;padding:0 4px 0 10px;border-radius:13px;background:var(--accent-soft);color:var(--accent);font-size:12px;font-weight:600}
.bt-fchip-x{display:grid;place-items:center;width:20px;height:20px;border:0;border-radius:50%;background:transparent;color:inherit;cursor:pointer}
.bt-fchip-x:hover{background:var(--accent-mid)}
.bt-listbody{display:flex;flex-direction:column}
.bt-table-wrap{min-width:0;overflow-x:auto}
.bt-table{width:100%;border-collapse:collapse;table-layout:fixed;font-size:13px}
.bt-table th{position:sticky;top:0;z-index:2;height:36px;padding:0 10px;text-align:left;font-size:11px;font-weight:600;color:var(--muted);text-transform:uppercase;letter-spacing:.06em;background:var(--panel-alt);border-bottom:1px solid var(--border);white-space:nowrap}
.bt-th-btn{display:inline-flex;align-items:center;gap:4px;border:0;background:transparent;padding:0;font:inherit;color:inherit;text-transform:inherit;letter-spacing:inherit;cursor:pointer}
.bt-th-btn:hover{color:var(--text)}
.bt-table td{padding:0 10px;height:44px;border-bottom:1px solid var(--table-line);vertical-align:middle;min-width:0}
.bt-row{cursor:pointer;outline:none}
.bt-row.has-meta td{height:52px}
.bt-row:hover td{background:var(--panel-alt)}
.bt-row.is-selected td{background:var(--accent-soft);border-bottom-color:var(--accent-mid)}
.bt-row:focus-visible td{box-shadow:inset 0 2px 0 var(--accent),inset 0 -2px 0 var(--accent)}
.bt-row.is-critical td:first-child{box-shadow:inset 2px 0 0 var(--pri-critical)}
.bt-row.is-closed .bt-row-title{color:var(--muted)}
.bt-c-id{width:72px}
.bt-c-sev{width:96px}
.bt-c-pri{width:84px}
.bt-c-status{width:164px}
.bt-c-asg{width:96px}
.bt-c-upd{width:96px;color:var(--muted)}
.bt-table.is-compact .bt-c-id{width:64px}
.bt-table.is-compact .bt-c-status{width:124px}
.bt-table.is-compact .bt-c-sev{width:84px}
.bt-table.is-compact .bt-c-asg{width:92px}
.bt-c-bug{min-width:0}
.bt-row-title{display:block;font-weight:600;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bt-row-meta{display:block;margin-top:3px;font:500 11px/1.2 var(--tf-font-mono);color:var(--muted)}
.bt-asg{display:inline-flex;align-items:center;gap:6px}
.bt-paging{display:flex;align-items:center;justify-content:center;gap:4px;padding:12px;font-size:12px;color:var(--muted)}
.bt-skel-list{padding:8px 16px}
.bt-skel-row{height:44px;display:flex;align-items:center;border-bottom:1px solid var(--border-soft)}
.bt-skel-bar{display:block;height:10px;border-radius:5px;background:var(--panel-alt);animation:btPulse 1.4s ease-in-out infinite}
.bt-skel{display:flex;flex-direction:column;gap:14px;padding:24px}
@keyframes btPulse{0%,100%{opacity:1}50%{opacity:.45}}
@media(prefers-reduced-motion:reduce){.bt-skel-bar{animation:none}}
.bt-inspector{width:560px;flex:0 0 560px}
.bt-inspector>.bt-detail{display:flex;flex-direction:column;height:100%;min-height:0}
.bt-inspector.is-overlay{position:absolute;top:0;right:0;bottom:0;z-index:30;width:min(560px,calc(100% - 48px));box-shadow:var(--shadow-lg);animation:btSlide .18s ease-out}
.bt-insp-backdrop{position:absolute;inset:0;z-index:29;background:color-mix(in srgb,var(--text) 22%,transparent)}
@keyframes btSlide{from{transform:translateX(24px);opacity:.6}to{transform:none;opacity:1}}
@media(prefers-reduced-motion:reduce){.bt-inspector.is-overlay,.bt-peek{animation:none}}

/* ── Detail ── */
.bt-detail{min-width:0}
.bt-detail-state{display:flex;flex-direction:column;justify-content:center;min-height:240px}
.bt-pagehead{display:inline-flex;align-items:center;gap:10px}
.bt-insp-head{gap:6px}
.bt-statusmenu{display:inline-flex}
.bt-status-btn{padding:0 6px!important}
.bt-insp-body{padding:16px 20px 24px}
.bt-insp-foot{justify-content:flex-end;position:sticky;bottom:0;background:var(--panel)}
.bt-titleblock{display:flex;flex-direction:column;gap:8px;padding-bottom:12px;min-width:0}
.bt-title{margin:0;font-size:20px;font-weight:700;letter-spacing:-.015em;color:var(--text);line-height:1.3;overflow-wrap:anywhere}
.bt-detail-inspector .bt-title,.bt-detail-peek .bt-title{font-size:17px}
.bt-badges{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.bt-reporter{margin:0;font-size:12px;color:var(--muted)}
.bt-inline{position:relative;border-radius:var(--tf-radius-xs);padding:2px 26px 2px 4px;margin:-2px -4px;cursor:text}
.bt-inline:hover{background:var(--panel-alt)}
.bt-inline-pen{position:absolute;top:4px;right:4px;color:var(--subtle);opacity:0}
.bt-inline:hover .bt-inline-pen,.bt-inline:focus-visible .bt-inline-pen{opacity:1}
.bt-inline-edit{display:flex;flex-direction:column;gap:4px}
.bt-title-input{font-size:17px!important;font-weight:650}
.bt-prose{white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;line-height:1.6;color:var(--text)}
.bt-sec{padding:16px 0;border-top:1px solid var(--border-soft);min-width:0}
:is(.bt-detail-inspector,.bt-detail-peek) .bt-sec{padding:12px 0}
:is(.bt-detail-inspector,.bt-detail-peek) .bt-sec-head{margin-bottom:6px}
.bt-sec-head{display:flex;align-items:center;gap:8px;margin-bottom:10px;min-height:28px;flex-wrap:wrap}
.bt-sec-title{margin:0;display:flex;align-items:center;gap:8px;font-size:11px;font-weight:650;color:var(--muted);text-transform:uppercase;letter-spacing:.07em}
.bt-sec-actions{margin-left:auto;display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.bt-steps{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px;font-size:13px}
.bt-steps li{display:grid;grid-template-columns:24px minmax(0,1fr);gap:6px;line-height:1.5;overflow-wrap:anywhere}
.bt-steps li>span{min-width:0}
.bt-step-n{font:600 11px/20px var(--tf-font-mono);color:var(--subtle);text-align:right}
.bt-steps li.is-failed{color:var(--st-failed);font-weight:600}
.bt-dea{display:grid;grid-template-columns:minmax(0,1fr);gap:0}
.bt-dea.is-side{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px}
.bt-actual{border-left:3px solid var(--st-failed);padding-left:10px}
.bt-attach{display:flex;flex-direction:column;gap:8px;border-radius:var(--tf-radius-sm)}
.bt-attach.is-over{outline:2px dashed var(--accent-mid);outline-offset:4px}
.bt-tiles{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:10px}
.bt-attach.is-phone .bt-tiles{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;padding-bottom:4px}
.bt-tile{position:relative;width:96px;flex:none;display:flex;flex-direction:column;gap:4px}
.bt-tile-open{display:grid;place-items:center;width:96px;height:96px;padding:0;border:1px solid var(--border);border-radius:var(--tf-radius-sm);background:var(--panel-alt);color:var(--muted);cursor:pointer;overflow:hidden;text-decoration:none}
.bt-tile-open img{width:100%;height:100%;object-fit:cover}
.bt-tile-open.is-file{display:flex;flex-direction:column;gap:6px}
.bt-tile.is-video{width:min(320px,100%)}
.bt-tile-video{display:block;width:100%;aspect-ratio:16/10;border:1px solid var(--border);border-radius:var(--tf-radius-sm);background:#000}
.bt-tile-size{font-size:11px}
.bt-tile-name{font-size:11px;color:var(--muted)}
.bt-tile .tf-menu{position:absolute;top:4px;right:4px}
.bt-tile-menu{background:var(--panel)!important;min-height:26px!important;width:26px!important}
.bt-linked{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
.bt-linked-row{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(110px,auto) auto;gap:6px 14px;align-items:center;padding:10px 0;border-bottom:1px solid var(--border-soft)}
.bt-linked-row:last-child{border-bottom:0}
.bt-linked-row.is-missing{opacity:.65}
.bt-linked-main{min-width:0;display:flex;flex-direction:column;gap:3px}
.bt-linked-top{display:flex;align-items:center;gap:8px;min-width:0}
.bt-linked-top a.tf-id{text-decoration:none}
.bt-linked-title{font-weight:600;font-size:13px}
.bt-linked-path{font-size:12px;color:var(--muted)}
.bt-linked-trail{font-size:12px;color:var(--muted)}
.bt-linked-trail a{color:var(--muted)}
.bt-linked-trail a:hover{color:var(--accent)}
.bt-linked-result{display:flex;align-items:center;gap:6px;white-space:nowrap}
.bt-linked-result a.tf-id{text-decoration:none}
.bt-retest{display:inline-flex;align-items:center;gap:5px;font-size:12px;font-weight:600;color:var(--muted);white-space:nowrap}
.bt-retest.is-pending{color:var(--st-retest)}
.bt-retest.is-passed{color:var(--st-passed)}
.bt-retest.is-failed{color:var(--st-failed)}
.bt-detail-inspector .bt-linked-row,.bt-detail-peek .bt-linked-row{grid-template-columns:minmax(0,1fr) auto auto;grid-template-areas:"main menu menu" "result retest retest"}
.bt-detail-inspector .bt-linked-main,.bt-detail-peek .bt-linked-main{grid-area:main}
.bt-detail-inspector .bt-linked-menu,.bt-detail-peek .bt-linked-menu{grid-area:menu;justify-self:end}
.bt-detail-inspector .bt-linked-result,.bt-detail-peek .bt-linked-result{grid-area:result}
.bt-detail-inspector .bt-linked-retest,.bt-detail-peek .bt-linked-retest{grid-area:retest;justify-self:end}
.bt-ext{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.bt-ext li{display:flex;align-items:center;gap:10px;font-size:13px}
.bt-ext li .btn{margin-left:auto}
.bt-ext-mono{display:inline-grid;place-items:center;min-width:24px;height:24px;padding:0 4px;border-radius:5px;background:var(--panel-alt);border:1px solid var(--border);font:700 10px/1 var(--tf-font-mono);color:var(--muted)}
.bt-activity{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px}
.bt-act-row{display:grid;grid-template-columns:24px minmax(0,1fr) auto;gap:10px;align-items:start;padding:6px 0;font-size:13px}
.bt-act-row .bt-avatar.is-sm{margin:2px}
.bt-act-text{color:var(--muted);line-height:1.5;overflow-wrap:anywhere}
.bt-act-time{font-size:12px;color:var(--subtle);white-space:nowrap}
.bt-act-row.is-comment{grid-template-columns:24px minmax(0,1fr);padding:10px 0}
.bt-comment{display:flex;flex-direction:column;gap:4px;min-width:0;padding:8px 10px;border:1px solid var(--border-soft);border-radius:var(--tf-radius-sm);background:var(--panel)}
.bt-comment-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--muted)}
.bt-comment-meta strong{color:var(--text);font-weight:650}
.bt-comment-meta .tf-menu{margin-left:auto}
.bt-comment-body{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.55;color:var(--text)}
.bt-older{align-self:flex-start;margin-bottom:6px}
.bt-composer{display:flex;flex-direction:column;gap:6px;margin-top:12px}
.bt-composer-foot{display:flex;align-items:center;justify-content:space-between;gap:8px}
.bt-remote{display:flex;align-items:center;gap:8px;margin:0 0 12px;padding:6px 8px 6px 12px;border-radius:var(--tf-radius-sm);background:var(--info-soft);color:var(--info);font-size:12px;font-weight:600}
.bt-remote .btn{margin-left:auto}
.bt-propstrip{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:4px 0 12px}
.bt-propstrip .select{width:auto;min-width:140px}
.bt-insp-meta{padding-bottom:8px}
.bt-meta-2{grid-template-columns:repeat(2,minmax(80px,max-content) minmax(0,1fr));column-gap:12px}
.bt-meta .select,.bt-meta .input{width:100%;min-height:30px;padding:4px 8px;font-size:13px}
/* Every row is as tall as its control, and plain-text values sit on the
   label's centre line (Found in, Created, Reporter…), not at the top. */
.bt-meta>dd{padding:5px 0;display:flex;align-items:center;min-height:41px}
.bt-meta>dt{padding-top:5px;padding-bottom:5px;display:flex;align-items:center;min-height:41px}
.bt-meta-sep{margin-top:12px}
.bt-side-title{margin:14px 0 6px;font-size:11px;font-weight:650;color:var(--muted);text-transform:uppercase;letter-spacing:.07em}
.bt-side-title:first-child{margin-top:0}
.bt-env-input{border-color:transparent!important;background:transparent!important}
.bt-env-input:hover,.bt-env-input:focus{border-color:var(--border)!important;background:var(--panel)!important}
.bt-detail-page{padding:20px 28px 40px;max-width:1360px}
.bt-page-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:28px}
.bt-detail-page.is-wide .bt-page-grid{grid-template-columns:minmax(0,1fr) 320px}
.bt-page-side{position:sticky;top:0;align-self:start;padding:14px 16px;border:1px solid var(--border);border-radius:var(--tf-radius);background:var(--panel)}
.bt-details-inline{padding:12px 16px;margin:8px 0;border:1px solid var(--border);border-radius:var(--tf-radius)}
.tf-content>.bt-detail-page{margin:-24px -28px 0;background:var(--panel);min-height:100%}
.bt-back{padding-left:6px!important}
/* Peek */
.bt-peek-layer{position:fixed;inset:0;z-index:95}
.bt-peek-backdrop{position:absolute;inset:0;background:color-mix(in srgb,var(--text) 22%,transparent)}
.bt-peek{position:absolute;top:0;right:0;bottom:0;width:min(560px,100%);display:flex;flex-direction:column;box-shadow:var(--shadow-lg);border-left:1px solid var(--border);animation:btSlide .18s ease-out}
.bt-peek>.bt-detail{display:flex;flex-direction:column;height:100%;min-height:0}

/* ── Phone (≤900) ── */
@media(max-width:900px){
 .bt-phone .tf-m-search{margin-top:2px}
 .bt-m-list{margin:0 -14px}
 .bt-m-row{align-items:stretch;padding-left:0;gap:12px}
 .bt-m-row .bt-sev-rule{width:3px;border-radius:0 2px 2px 0;background:var(--pri-medium);align-self:stretch}
 .bt-m-row.is-critical .bt-sev-rule{background:var(--pri-critical)}
 .bt-m-row.is-high .bt-sev-rule{background:var(--pri-high)}
 .bt-m-row.is-low .bt-sev-rule{background:var(--pri-low)}
 .bt-m-row .tf-m-row-trail{align-self:center}
 .bt-m-keyline{font:600 12px/1.2 var(--tf-font-mono);color:var(--muted)}
 .bt-m-row.is-closed .bt-m-title{color:var(--muted)}
 .bt-m-more{width:100%;margin-top:12px}
 .bt-detail-phone{display:flex;flex-direction:column;gap:12px}
 .bt-m-head{display:flex;flex-direction:column;gap:8px}
 .bt-m-keyline{display:flex;align-items:center;gap:8px}
 .bt-title.is-phone{font-size:20px}
 .bt-m-card{border-radius:12px;border:1px solid var(--border);margin:0;overflow:hidden}
 .bt-m-prop{min-height:48px}
 .bt-m-prop-label{flex:0 0 110px;font-size:14px;color:var(--muted)}
 .bt-m-prop-value{flex:1 1 auto;font-size:15px;font-weight:600;text-align:right;min-width:0}
 .bt-m-body .bt-sec{padding:14px 0}
 .bt-m-body .bt-dea{grid-template-columns:1fr}
 .bt-m-linkbar{display:flex;gap:10px;padding:4px 0 8px}
 .bt-m-linkbar .btn{flex:1 1 0;min-height:44px}
 .bt-linked.tf-m-list{margin:0 -14px}
 .bt-linked-row{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"main menu" "result retest";padding:10px 16px;background:var(--panel)}
 .bt-linked-main{grid-area:main}
 .bt-linked-menu{grid-area:menu}
 .bt-linked-menu .btn{min-width:44px;min-height:44px}
 .bt-linked-result{grid-area:result}
 .bt-linked-retest{grid-area:retest;justify-self:end}
 .bt-m-composer{font-size:16px!important}
 .bt-m-actionbar .tf-toolbar-spacer{display:none}
 .bt-m-backtitle{font-size:16px;font-weight:650}
 .bt-form-page{gap:12px}
 .bt-form-page-inner{border:0;padding:0;background:transparent}
 .bt-form :is(.input,.select,.textarea){font-size:16px}
 .bt-form-row{grid-template-columns:1fr}
 .bt-env-grid{grid-template-columns:1fr}
 .bt-ea{grid-template-columns:1fr}
 .bt-m-radio,.bt-m-check{min-height:48px}
 .bt-m-check input{margin:0 4px}
 .bt-sheet-actions{display:flex;flex-direction:column;gap:10px;margin-top:16px}
 .bt-sheet-btn{width:100%;min-height:46px}
 .bt-retest-q{margin:0 0 6px;font-size:16px;font-weight:650;color:var(--text)}
 .bt-meta-phone .input{font-size:16px}
}

/* ── Case ↔ bug surfaces ── */
.bt-casebugs .tcd-sec-head,.bt-casebugs .bt-sec-head{flex-wrap:wrap}
.bt-cb-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;border:1px solid var(--border-soft);border-radius:var(--tf-radius-sm)}
.bt-casebugs{container-type:inline-size}
.bt-cb-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;grid-template-areas:"main meta menu";align-items:center;gap:6px 8px;padding:8px 8px 8px 12px;border-bottom:1px solid var(--border-soft);cursor:pointer}
.bt-cb-main{grid-area:main}
.bt-cb-meta{grid-area:meta;display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.bt-cb-menu{grid-area:menu}
@container (max-width:560px){.bt-cb-row{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"main menu" "meta meta"}}
.bt-cb-row:last-child{border-bottom:0}
.bt-cb-row:hover{background:var(--panel-alt)}
.bt-cb-row.is-closed .bt-cb-title{color:var(--muted)}
.bt-cb-main{min-width:0;display:flex;flex-direction:column;gap:2px}
.bt-cb-top{display:flex;align-items:center;gap:8px;min-width:0}
.bt-cb-title{font-size:13px;font-weight:600}
.bt-cb-sub{font-size:12px;color:var(--muted)}
.bt-cb-closed{margin-top:8px}
.bt-cb-closed .bt-cb-list{margin-top:6px}
.bt-cb-empty{gap:6px 12px}
.bt-cb-empty-actions{display:inline-flex;gap:4px}
.bt-cb-mlist{margin:0 -14px}
.bt-cb-mrow{align-items:center;padding-right:4px}
.bt-cb-mmain{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:4px;border:0;background:transparent;padding:0;text-align:left;font:inherit;color:inherit;cursor:pointer}
.bt-cb-mmenu .btn{min-width:44px;min-height:44px}
.bt-casebadge{border:0;cursor:pointer;color:var(--muted);background:var(--panel-alt);box-shadow:inset 0 0 0 1px var(--border)}
.bt-casebadge.is-high{color:var(--danger);background:var(--danger-soft);box-shadow:none}
.bt-ind-wrap{display:inline-flex;flex:none}
.bt-ind{display:inline-flex;align-items:center;gap:3px;height:20px;padding:0 6px;border:0;border-radius:10px;background:var(--panel-alt);color:var(--muted);font:600 11px/1 Inter,sans-serif;cursor:pointer}
.bt-ind.is-high{color:var(--danger);background:var(--danger-soft)}
.bt-ind-retest{display:inline-flex;color:var(--st-retest);margin-left:2px}
.bt-ind-list{list-style:none;margin:0;padding:6px;display:flex;flex-direction:column;gap:2px}
.bt-ind-list button{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:8px;width:100%;min-height:34px;padding:4px 8px;border:0;border-radius:4px;background:transparent;color:var(--text);font:500 13px/1.2 Inter,sans-serif;text-align:left;cursor:pointer}
.bt-ind-list button:hover{background:var(--panel-alt)}

/* ── Run executor surfaces ── */
.bt-rxchips{display:inline-flex;align-items:center;gap:6px;flex-wrap:wrap}
.bt-rxchips .tf-menu{display:inline-flex}
.bt-banner{display:flex;flex-direction:column;gap:8px;margin:0 0 4px;padding:10px 12px;border:1px solid color-mix(in srgb,var(--st-retest) 35%,var(--border));border-left:3px solid var(--st-retest);border-radius:var(--tf-radius-sm);background:var(--panel)}
.bt-banner-head{display:flex;align-items:center;gap:6px;color:var(--st-retest);font-size:12px;text-transform:uppercase;letter-spacing:.05em}
.bt-banner-row{display:flex;align-items:flex-start;gap:10px}
.bt-banner-text{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px;font-size:13px;line-height:1.45}
.bt-banner-note{font-style:italic;color:var(--muted)}
.bt-rxfield{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:8px 12px;margin-top:12px}
.bt-rxfield-label{margin:0}
.bt-rxfield-body{display:flex;align-items:center;gap:6px;flex-wrap:wrap;min-width:0}
.bt-rxfield.is-phone{grid-template-columns:1fr}
.bt-rxfield.is-phone .btn{min-height:44px}
.bt-extrefs{margin-top:10px;grid-template-columns:1fr!important}
.bt-prompt-wrap{flex:none;padding:0 16px 12px;background:var(--panel)}
.bt-prompt{display:flex;flex-direction:column;gap:8px;padding:10px 12px;border:1px solid var(--border);border-left:3px solid var(--accent);border-radius:var(--tf-radius-sm);background:var(--panel)}
.bt-prompt.is-quiet{flex-direction:row;align-items:center;flex-wrap:wrap;border-left-color:var(--border);padding:6px 10px;color:var(--muted)}
.bt-prompt-text{font-size:13px;font-weight:600;color:var(--text)}
.bt-prompt.is-quiet .bt-prompt-text{color:var(--muted);font-weight:500}
.bt-prompt-rows{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.bt-prompt-rows li{display:flex;align-items:center;gap:8px;font-size:13px;min-width:0}
.bt-prompt-rows .btn{margin-left:auto}
.bt-prompt-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.bt-prompt.is-quiet .bt-prompt-actions{gap:2px}
.bt-banner.is-phone{margin:0 0 8px}
.app-shell :is(.bt-form,.bt-detail,.bt-dialog,.bt-sheet) .textarea,:is(.bt-form,.bt-detail,.bt-dialog,.bt-sheet) .textarea{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
.bt-detail-phone .tf-m-backbar .tf-menu{margin-left:auto}
/* @endregion bugs */



/* @region reports — reports */
/* Reports workbench (rp-*): filter pane (docked ≥1280, overlay sheet
   901–1279, full-screen sheet on phones) + report canvas on the --bg
   canvas. The canvas is a size container ("rp") so panels, tables and the
   stat strip adapt to the width they actually get. */
.rp-wb{--tf-pane-w:288px;position:relative}
.rp-canvas{background:var(--bg);container:rp/inline-size;position:relative}
/* Scroll containers anchor their absolutely positioned descendants
   (screen-reader-only labels, tooltips) so nothing leaks past the pane. */
.rp-wb .tf-pane-body{position:relative}
.rp-canvas.is-sub{background:var(--bg)}

/* ── Header band ── */
.rp-head-meta{display:inline-flex;align-items:center;flex-wrap:wrap;gap:4px 8px;font-size:13px;color:var(--muted)}
.rp-head-meta strong{color:var(--text);font-weight:600;font-variant-numeric:tabular-nums}
.rp-head-meta .tf-badge{height:20px;gap:4px}
.rp-head-sep{color:var(--muted)}
.rp-head-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end;min-width:0}
.rp-head-actions .tf-menu-list{min-width:248px}
.rp-tabs .tf-tab{display:inline-flex;align-items:center;gap:8px}
.rp-tabs .tf-tab:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--accent);border-radius:var(--tf-radius-xs) var(--tf-radius-xs) 0 0}
.rp-tab-count{min-width:20px;height:18px;padding:0 6px;border-radius:9px;display:inline-grid;place-items:center;font:600 11px/1 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-variant-numeric:tabular-nums;color:var(--muted);background:var(--panel-alt);box-shadow:inset 0 0 0 1px var(--border)}
.rp-tabs .tf-tab.active .rp-tab-count{color:var(--accent);background:var(--accent-soft);box-shadow:inset 0 0 0 1px var(--accent-mid)}

/* ── Filter pane ── */
.rp-filters-head{gap:6px;padding-right:10px}
.rp-filters-body{padding:0 0 12px}
.rp-fgroup{display:flex;flex-direction:column;gap:12px;padding:14px 16px 16px;border-bottom:1px solid var(--border-soft);min-width:0}
.rp-fgroup:last-child{border-bottom:0}
.rp-fgroup-head{display:flex;align-items:center;gap:8px;min-height:20px}
.rp-fgroup-title{margin:0;font-size:11px;font-weight:600;letter-spacing:.07em;text-transform:uppercase;color:var(--muted)}
.rp-fgroup-extra{margin-left:auto;display:inline-flex;align-items:center;gap:10px;font-size:12px;color:var(--muted)}
.rp-fgroup-count{font-variant-numeric:tabular-nums}
.app-shell .rp-linkbtn{border:0;background:none;padding:2px 0;min-height:0;font:600 12px/1.2 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--accent);cursor:pointer;border-radius:3px}
.app-shell .rp-linkbtn:hover:not(:disabled){text-decoration:underline}
.app-shell .rp-linkbtn:disabled{color:var(--subtle);cursor:default}
.app-shell .rp-linkbtn:focus-visible{outline:none;box-shadow:var(--tf-focus)}
.rp-presets{display:flex;flex-direction:column;gap:2px;margin:0 -8px}
.app-shell .rp-preset{display:flex;align-items:center;gap:10px;width:100%;min-height:34px;padding:0 8px 0 10px;border:1px solid transparent;border-radius:var(--tf-radius-sm);background:transparent;color:var(--text);font:500 13px/1.2 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;text-align:left;cursor:pointer;transition:background-color .12s,border-color .12s}
.rp-preset .tf-icon{color:var(--muted)}
.app-shell .rp-preset:hover{background:var(--panel)}
.app-shell .rp-preset:focus-visible{outline:none;box-shadow:var(--tf-focus);border-color:var(--accent)}
.app-shell .rp-preset.is-on{background:var(--accent-soft);border-color:var(--accent-mid);color:var(--text);font-weight:600}
.rp-preset.is-on .tf-icon{color:var(--accent)}
.rp-preset-label{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rp-preset-count{flex:none;min-width:22px;text-align:center;font:600 11px/1 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-variant-numeric:tabular-nums;color:var(--muted);background:var(--panel);border:1px solid var(--border);border-radius:10px;padding:3px 7px}
.rp-preset.is-on .rp-preset-count{color:var(--accent);border-color:var(--accent-mid)}
.rp-runlist{list-style:none;margin:-4px -8px 0;padding:0;display:flex;flex-direction:column;gap:2px}
.rp-runitem{display:flex;align-items:flex-start;gap:10px;padding:8px 10px;border:1px solid transparent;border-radius:var(--tf-radius-sm);cursor:pointer;min-width:0}
.rp-runitem:hover{background:var(--panel)}
.rp-runitem:has(input:focus-visible){box-shadow:var(--tf-focus);border-color:var(--accent)}
.rp-runitem input{flex:none;width:15px;height:15px;margin:2px 0 0;accent-color:var(--accent);cursor:pointer}
.rp-runitem input:focus-visible{outline:none}
.rp-runitem-main{display:flex;flex-direction:column;gap:5px;min-width:0;flex:1 1 auto}
.rp-runitem-name{font-size:13px;font-weight:600;line-height:1.3;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rp-runitem:not(.is-on) .rp-runitem-name{color:var(--muted);font-weight:500}
.rp-runitem-meta{display:flex;align-items:center;gap:8px;font-size:11.5px;line-height:1.2;color:var(--muted);white-space:nowrap;overflow:hidden}
.rp-runitem-meta .tf-id{font-size:11px}
.rp-runitem-pct{margin-left:auto;font-weight:600;font-variant-numeric:tabular-nums}
.rp-runitem-bar.tf-resultbar{height:4px}
.rp-runitem:not(.is-on) .rp-runitem-bar{opacity:.45}
.rp-pri-chips{display:flex;flex-wrap:wrap;gap:6px}
.app-shell .rp-pri-chip{display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 11px;border:1px solid var(--border);border-radius:15px;background:var(--panel);color:var(--text);font:500 12px/1 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;cursor:pointer}
.app-shell .rp-pri-chip:hover{border-color:color-mix(in srgb,var(--text) 22%,var(--border))}
.app-shell .rp-pri-chip:focus-visible{outline:none;box-shadow:var(--tf-focus);border-color:var(--accent)}
.app-shell .rp-pri-chip.is-on{border-color:var(--accent-mid);background:var(--accent-soft);color:var(--text);font-weight:600}
.rp-pri-dot{width:8px;height:8px;border-radius:50%;flex:none}
.rp-pri-dot.pri-critical{background:var(--pri-critical)}.rp-pri-dot.pri-high{background:var(--pri-high)}
.rp-pri-dot.pri-medium{background:var(--pri-medium)}.rp-pri-dot.pri-low{background:var(--pri-low)}
.rp-filters-foot{justify-content:space-between;gap:8px;background:var(--panel-alt)}
.rp-filters-foot strong{color:var(--text);font-variant-numeric:tabular-nums}
.app-shell .rp-filters-done{display:none}
.rp-filters-backdrop{display:none}

/* ── Fields (filter pane + dialogs) ── */
.rp-field{display:flex;flex-direction:column;gap:6px;min-width:0}
.rp-field-label{font-size:12px;font-weight:600;color:var(--text);line-height:1.3}
.rp-field-hint{font-size:12px;color:var(--muted);line-height:1.4}
.rp-field-error{display:flex;align-items:flex-start;gap:6px;font-size:12px;line-height:1.4;font-weight:500;color:var(--danger)}
.rp-field-error .tf-icon{margin-top:1px}
.rp-field-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:12px}
.app-shell .rp-wb :is(.input,.select,.textarea){width:100%;min-height:var(--tf-control-h);font-size:13px}
.app-shell .rp-wb .select{text-overflow:ellipsis;cursor:pointer}
.app-shell .rp-wb .textarea{min-height:76px;resize:vertical;font-family:inherit;line-height:1.5}
.app-shell .rp-wb .select.is-set{border-color:var(--accent-mid);background-color:var(--accent-soft)}
.app-shell .rp-wb :is(.input,.select).is-invalid{border-color:var(--danger)}
.app-shell .rp-wb :is(.input,.select).is-invalid:focus{outline-color:var(--danger-soft)}
.rp-filters .rp-field-row.rp-dates{grid-template-columns:repeat(2,minmax(0,1fr))}
.rp-seg{display:flex;width:100%;box-sizing:border-box}
.rp-seg>button{flex:1 1 0;display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:0;white-space:nowrap}
.rp-seg>button:focus-visible{outline:none;box-shadow:var(--tf-focus)}
.rp-seg-count{font:600 11px/1 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--muted);font-variant-numeric:tabular-nums}
.rp-seg>button[aria-pressed="true"] .rp-seg-count{color:var(--accent)}

/* ── Scope bar (canvas head) ── */
.rp-scopebar{flex-wrap:wrap;gap:8px 10px;padding:8px 16px;min-height:52px;background:var(--panel)}
.app-shell .rp-filter-toggle.is-on{background:var(--accent-soft);border-color:var(--accent-mid);color:color-mix(in srgb,var(--accent) 78%,var(--text))}
.rp-filter-count{min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:var(--accent);color:var(--panel);font:600 11px/18px Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;text-align:center}
.rp-chips{display:flex;flex-wrap:wrap;align-items:center;gap:6px;flex:1 1 220px;min-width:0}
.rp-chip{display:inline-flex;align-items:center;gap:6px;height:28px;max-width:100%;min-width:0;padding:0 3px 0 10px;border:1px solid var(--border);border-radius:14px;background:var(--panel-alt);font-size:12px;line-height:1}
.rp-chip-k{flex:none;color:var(--muted)}
.rp-chip-v{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text);font-weight:600}
.app-shell .rp-chip-x{flex:none;width:22px;height:22px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--muted);display:grid;place-items:center;cursor:pointer}
.app-shell .rp-chip-x:hover{background:var(--panel);color:var(--text)}
.app-shell .rp-chip-x:focus-visible{outline:none;box-shadow:var(--tf-focus)}
.rp-scope-all{font-size:13px;color:var(--muted);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* ── Canvas ── */
.rp-canvas-body{display:flex;flex-direction:column;gap:16px;padding:20px 24px 40px}
.rp-canvas-body>*{flex:none;width:100%;max-width:1360px;margin-left:auto;margin-right:auto;box-sizing:border-box}
.rp-canvas-body .tf-panel,.rp-canvas-body .tf-panel+.tf-panel{margin:0}
.rp-row{display:grid;grid-template-columns:minmax(0,7fr) minmax(0,5fr);gap:16px;align-items:stretch}
.rp-row.rp-row-even{grid-template-columns:repeat(2,minmax(0,1fr))}
.rp-row>.tf-panel{display:flex;flex-direction:column}
.rp-row>.tf-panel>.tf-panel-body{flex:1 1 auto}
.rp-panel .tf-panel-title .tf-icon{color:var(--muted)}
.rp-panel-figure{display:inline-flex;align-items:center;gap:8px;font-size:12px;color:var(--muted);white-space:nowrap}
.rp-panel-figure strong{color:var(--text);font-weight:650;font-variant-numeric:tabular-nums}
.rp-delta{font-weight:600;font-variant-numeric:tabular-nums;color:var(--muted)}
.rp-delta.is-up{color:var(--success)}.rp-delta.is-down{color:var(--danger)}
.rp-panel-more{display:flex;justify-content:center;padding:6px;border-top:1px solid var(--border-soft)}
.rp-panel-note{display:flex;align-items:center;gap:6px;font-size:13px;color:var(--muted);line-height:1.5}
.rp-panel-note .tf-icon{color:var(--success)}
.rp-empty{padding:32px 20px}
.rp-empty .tf-empty-icon .tf-icon{display:block}
.rp-empty-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:8px}
.rp-loading{padding:40px 16px;text-align:center;font-size:13px;color:var(--muted)}
.rp-muted{color:var(--muted)}
.rp-print-head{display:none}
:is(.rp-runs,.rp-sections,.rp-flaky,.rp-req,.rp-lib,.rp-table-panel){overflow:hidden}

/* Stat strip */
.rp-stats{grid-template-columns:repeat(6,minmax(0,1fr))}
.rp-stats .tf-stat{padding:12px 16px;min-width:0}
.rp-stats .tf-stat-value{font-size:22px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rp-stats .tf-stat-value.is-danger{color:var(--danger)}
.rp-stats .tf-stat-value.is-warning{color:var(--warning)}
.rp-stat-sub{margin-top:3px;font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* Result bars: segments separated by a 2px surface gap */
.tf-resultbar.rp-resultbar{gap:2px;background:transparent}
.tf-resultbar.rp-resultbar:empty{background:var(--st-untested-soft)}
.rp-resultbar>span{min-width:2px}
.tf-resultbar.rp-resultbar>.is-untested{background:color-mix(in srgb,var(--st-untested) 34%,transparent)}
.rp-bigbar .tf-resultbar{height:12px;border-radius:6px}
.rp-legend{list-style:none;margin:16px 0 0;padding:0;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px 16px}
.rp-legend li{display:grid;grid-template-columns:8px minmax(0,1fr);column-gap:8px;row-gap:4px;align-items:center;min-width:0}
.rp-legend-dot{width:8px;height:8px;border-radius:2px}
.rp-legend .is-passed .rp-legend-dot{background:var(--st-passed)}.rp-legend .is-failed .rp-legend-dot{background:var(--st-failed)}
.rp-legend .is-blocked .rp-legend-dot{background:var(--st-blocked)}.rp-legend .is-retest .rp-legend-dot{background:var(--st-retest)}
.rp-legend .is-skipped .rp-legend-dot{background:var(--st-skipped)}
.rp-legend .is-untested .rp-legend-dot{background:color-mix(in srgb,var(--st-untested) 34%,transparent)}
.rp-legend-label{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rp-legend-value{grid-column:2;display:flex;align-items:baseline;gap:6px;min-width:0}
.rp-legend-value strong{font-size:16px;font-weight:650;color:var(--text);font-variant-numeric:tabular-nums}
.rp-legend-pct{font-size:11px;color:var(--muted);font-variant-numeric:tabular-nums}
.rp-subblock{display:flex;flex-direction:column;gap:10px;margin-top:18px;padding-top:16px;border-top:1px solid var(--border-soft)}
.rp-subblock-head{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:4px 12px}
.rp-subblock-title{margin:0;font-size:12px;font-weight:600;color:var(--text)}
.rp-subblock .tf-resultbar{height:8px;border-radius:4px}
.rp-subblock .rp-counts{margin-top:0;gap:4px 14px}
.rp-count-label{font-weight:500;color:var(--muted)}
.rp-counts{display:flex;flex-wrap:wrap;gap:2px 8px;margin-top:6px;font-size:12px;line-height:1.2;font-variant-numeric:tabular-nums}
.rp-count{display:inline-flex;align-items:center;gap:4px;font-weight:600;color:var(--text)}
.rp-count>i{width:7px;height:7px;border-radius:2px;flex:none;background:var(--st-untested)}
.rp-count.is-passed>i{background:var(--st-passed)}.rp-count.is-failed>i{background:var(--st-failed)}
.rp-count.is-blocked>i{background:var(--st-blocked)}.rp-count.is-retest>i{background:var(--st-retest)}
.rp-count.is-skipped>i{background:var(--st-skipped)}

/* Pass-rate trend: columns of stacked executed results */
.rp-trend .tf-panel-body{display:flex;flex-direction:column;gap:12px}
.rp-trend-plot{display:flex;gap:8px;height:208px;min-width:0}
.rp-trend-axis{flex:none;width:36px;display:flex;flex-direction:column;justify-content:space-between;padding:12px 0 16px;font-size:11px;line-height:1;color:var(--muted);text-align:right;font-variant-numeric:tabular-nums}
.rp-trend-cols{position:relative;flex:1 1 auto;min-width:0;display:flex;justify-content:space-around;gap:4px;margin:0;padding:0;list-style:none}
.rp-trend-cols::before{content:"";position:absolute;left:0;right:0;top:18px;bottom:22px;border-top:1px solid var(--border-soft);border-bottom:1px solid var(--border);pointer-events:none}
.rp-trend-cols::after{content:"";position:absolute;left:0;right:0;top:calc(18px + (100% - 40px) / 2);border-top:1px solid var(--border-soft);pointer-events:none}
.rp-trend-col{position:relative;flex:1 1 0;min-width:0;max-width:72px;display:flex}
.rp-trend-hit{position:relative;z-index:1;flex:1 1 auto;min-width:0;display:flex;flex-direction:column;align-items:center;color:inherit;text-decoration:none;border-radius:var(--tf-radius-xs)}
.rp-trend-hit:focus-visible{outline:none;box-shadow:var(--tf-focus)}
.rp-trend-val{height:18px;font:600 11px/18px Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--text);font-variant-numeric:tabular-nums;white-space:nowrap}
.rp-trend-stack{flex:1 1 auto;min-height:0;width:min(24px,72%);display:flex;flex-direction:column-reverse;gap:2px}
.rp-trend-stack>span{display:block;width:100%;min-height:2px}
.rp-trend-stack>span:last-child{border-radius:4px 4px 0 0}
.rp-trend-stack .is-passed{background:var(--st-passed)}.rp-trend-stack .is-failed{background:var(--st-failed)}
.rp-trend-stack .is-blocked{background:var(--st-blocked)}.rp-trend-stack .is-retest{background:var(--st-retest)}
.rp-trend-stack .is-skipped{background:var(--st-skipped)}
.rp-trend-hit:hover .rp-trend-stack,.rp-trend-hit:focus-visible .rp-trend-stack{filter:saturate(1.15) brightness(1.06)}
.rp-trend-hit:hover .rp-trend-x{color:var(--accent)}
.rp-trend-x{height:22px;line-height:24px;max-width:100%;font-size:11px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rp-trend-tip{display:none;position:absolute;z-index:5;top:22px;left:50%;transform:translateX(-50%);width:max-content;max-width:210px;padding:8px 10px;flex-direction:column;gap:2px;border-radius:6px;background:var(--text);color:var(--panel);font-size:12px;line-height:1.4;text-align:left;white-space:normal;box-shadow:var(--shadow-lg);pointer-events:none}
.rp-trend-tip strong{font-weight:650}
.rp-trend-col:nth-child(-n+2) .rp-trend-tip{left:0;transform:none}
.rp-trend-col:nth-last-child(-n+2) .rp-trend-tip{left:auto;right:0;transform:none}
.rp-trend-hit:hover .rp-trend-tip,.rp-trend-hit:focus-visible .rp-trend-tip{display:flex}
.rp-trend-legend{list-style:none;margin:0;padding:0 0 0 44px;display:flex;flex-wrap:wrap;gap:4px 14px;font-size:12px;color:var(--muted)}
.rp-trend-legend li{display:inline-flex;align-items:center;gap:6px}
.rp-trend-legend i{width:8px;height:8px;border-radius:2px;display:inline-block}
.rp-trend-legend .is-passed i{background:var(--st-passed)}.rp-trend-legend .is-failed i{background:var(--st-failed)}
.rp-trend-legend .is-blocked i{background:var(--st-blocked)}.rp-trend-legend .is-retest i{background:var(--st-retest)}
.rp-trend-legend .is-skipped i{background:var(--st-skipped)}

/* Horizontal bars (case mix) */
.rp-bars{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:12px}
.rp-bar-row{display:grid;grid-template-columns:minmax(72px,34%) minmax(0,1fr) 76px;align-items:center;gap:12px;font-size:13px}
.rp-bar-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text)}
.rp-bar-track{height:8px;border-radius:4px;background:var(--panel-alt);box-shadow:inset 0 0 0 1px var(--border-soft);overflow:hidden}
.rp-bar-fill{display:block;height:100%;border-radius:0 4px 4px 0;background:var(--accent)}
.rp-bar-fill.pri-critical{background:var(--pri-critical)}.rp-bar-fill.pri-high{background:var(--pri-high)}
.rp-bar-fill.pri-medium{background:var(--pri-medium)}.rp-bar-fill.pri-low{background:var(--pri-low)}
.rp-bar-fill.is-passed{background:var(--st-passed)}.rp-bar-fill.is-skipped{background:var(--st-skipped)}
.rp-bar-fill.is-retest{background:var(--st-retest)}.rp-bar-fill.is-blocked{background:var(--st-blocked)}
.rp-bar-fill.is-untested{background:var(--st-untested)}.rp-bar-fill.rp-tone-accent{background:var(--accent)}
.rp-bar-value{display:flex;justify-content:flex-end;align-items:baseline;gap:6px;font-weight:650;font-variant-numeric:tabular-nums;color:var(--text)}
.rp-bar-pct{min-width:32px;text-align:right;font-size:11px;font-weight:500;color:var(--muted)}

/* ── Tables ── */
.rp-table-wrap{overflow-x:auto;min-width:0}
.rp-table{width:100%;min-width:0;border-collapse:separate;border-spacing:0;table-layout:fixed;font-size:13px}
.rp-table th{height:36px;padding:0 12px;text-align:left;vertical-align:middle;font:600 11px/1 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);background:var(--panel-alt);border-bottom:1px solid var(--border);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rp-table td{height:44px;padding:6px 12px;border-bottom:1px solid var(--border-soft);vertical-align:middle;color:var(--text);overflow:hidden}
.rp-table :is(th,td):first-child{padding-left:16px}
.rp-table :is(th,td):last-child{padding-right:16px}
.rp-table tbody tr:last-child td{border-bottom:0}
.rp-table tbody tr:hover td{background:color-mix(in srgb,var(--panel-alt) 70%,transparent)}
.rp-table tr.is-link{cursor:pointer}
.rp-table tr.is-paused td{color:var(--muted)}
.rp-table .c-num{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
.app-shell .rp-sortbtn{display:inline-flex;align-items:center;vertical-align:middle;gap:4px;border:0;background:none;padding:4px;margin:-4px;min-height:0;border-radius:var(--tf-radius-xs);font:inherit;letter-spacing:inherit;text-transform:inherit;color:inherit;cursor:pointer;white-space:nowrap}
.app-shell .rp-sortbtn:hover,.app-shell .rp-sortbtn.is-on{color:var(--text)}
.app-shell .rp-sortbtn:focus-visible{outline:none;box-shadow:var(--tf-focus)}
.rp-sorticon{display:inline-grid;opacity:0;transition:opacity .12s,transform .12s}
.rp-sortbtn.is-on .rp-sorticon{opacity:1}
.rp-sortbtn:not(.is-on):hover .rp-sorticon,.rp-sortbtn:not(.is-on):focus-visible .rp-sorticon{opacity:.45}
.rp-sorticon.is-asc{transform:rotate(180deg)}
.rp-table th.c-num .rp-sortbtn{flex-direction:row-reverse}
.app-shell .rp-cell-link{display:block;max-width:100%;font-weight:600;line-height:1.35;color:var(--text);text-decoration:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.app-shell .rp-cell-link:hover{color:var(--accent);text-decoration:underline}
.app-shell .rp-cell-link:focus-visible{outline:none;box-shadow:var(--tf-focus);border-radius:3px}
.rp-table tr.is-link:hover .rp-cell-link{color:var(--accent)}
.rp-cell-sub{display:flex;align-items:center;gap:4px 12px;margin-top:3px;font-size:12px;line-height:1.3;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.rp-cell-sub.is-danger{color:var(--danger)}
.rp-cell-sub.is-warning{color:var(--warning)}
.rp-cell-sub .tf-id{font-size:11.5px;flex:none}
.rp-sub-item{display:inline-flex;align-items:center;gap:4px;min-width:0;max-width:200px;overflow:hidden;text-overflow:ellipsis}
.rp-sub-item .tf-icon{color:var(--subtle)}
.rp-sub-date,.rp-when-inline,.rp-details-inline,.rp-section-inline,.rp-cap,.rp-src-date{display:none}
.rp-cell-title{font-weight:600;line-height:1.35;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rp-cell-text{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rp-cell-icon{display:inline-flex;align-items:center;gap:8px;min-width:0;max-width:100%;white-space:nowrap}
.rp-cell-icon .tf-icon{color:var(--subtle)}
.rp-cell-date{font-variant-numeric:tabular-nums;white-space:nowrap}
.rp-num{font-weight:650;font-variant-numeric:tabular-nums}
.rp-frac{display:block;margin-top:2px;font-size:11.5px;color:var(--muted)}
.rp-row-actions{display:flex;align-items:center;justify-content:flex-end;gap:4px}
.rp-table .c-results .tf-resultbar{height:6px}

/* Column widths */
.rp-runs-table .c-status{width:120px}.rp-runs-table .c-results{width:26%}
.rp-runs-table .c-pass{width:112px}.rp-runs-table .c-progress{width:116px}.rp-runs-table .c-date{width:108px;color:var(--muted);white-space:nowrap}
.rp-sections-table .c-total{width:88px}.rp-sections-table .c-auto{width:124px}.rp-sections-table .c-exec{width:116px}
.rp-sections-table .c-results{width:22%}.rp-sections-table .c-pass{width:112px}
.rp-flaky-table .c-id{width:76px}.rp-flaky-table .c-section{width:24%}.rp-flaky-table .c-outcomes{width:150px}
.rp-flaky-table .c-latest{width:108px}.rp-flaky-table .c-rate{width:136px}
.rp-req-table .c-key{width:132px}.rp-req-table .c-type{width:96px;color:var(--muted)}
.rp-history-table .c-source{width:112px}.rp-history-table .c-details{width:32%}.rp-history-table .c-by{width:130px}
.rp-history-table .c-date{width:176px;color:var(--muted)}.rp-history-table .c-actions{width:100px;text-align:right}
.rp-sched-table .c-when{width:180px}.rp-sched-table .c-to{width:22%}.rp-sched-table .c-last{width:200px}
.rp-sched-table .c-status{width:104px}.rp-sched-table .c-actions{width:136px}
.rp-history-table .c-actions .btn{gap:5px}

/* Flaky + requirement detail */
.rp-outcomes{display:flex;align-items:center;gap:10px;font-size:12px;white-space:nowrap}
.rp-of{color:var(--muted)}
.rp-meter{display:flex;align-items:center;gap:8px}
.rp-meter-track{flex:1 1 auto;min-width:36px;height:6px;border-radius:3px;background:var(--panel-alt);box-shadow:inset 0 0 0 1px var(--border-soft);overflow:hidden}
.rp-meter-fill{display:block;height:100%;max-width:100%;border-radius:0 3px 3px 0;background:var(--warning)}
.rp-meter-val{min-width:34px;text-align:right;font:600 12px/1 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-variant-numeric:tabular-nums;color:var(--text)}
.rp-req-intro{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px 20px}
.rp-req-intro p{margin:0;max-width:560px;font-size:13px;line-height:1.5;color:var(--muted)}
.rp-req-summary{display:flex;flex-direction:column;gap:10px;padding:14px 16px;border-bottom:1px solid var(--border-soft);font-size:13px;color:var(--muted)}
.rp-req-summary strong{color:var(--text)}
.rp-req-bar{display:block;height:8px;border-radius:4px;background:var(--panel-alt);box-shadow:inset 0 0 0 1px var(--border-soft);overflow:hidden}
.rp-req-bar>span{display:block;height:100%;background:var(--accent)}
.rp-req .rp-panel-note{padding:14px 16px}

/* ── Exports: report library ── */
.rp-lib-intro{display:flex;align-items:flex-end;justify-content:space-between;flex-wrap:wrap;gap:12px 16px}
.rp-lib-intro-text{min-width:0;flex:1 1 320px}
.rp-lib-intro-title{margin:0;font-size:15px;font-weight:650;letter-spacing:-.01em;color:var(--text)}
.rp-lib-intro p{margin:4px 0 0;font-size:13px;line-height:1.5;color:var(--muted)}
.rp-lib{display:flex;flex-direction:column}
.rp-lib-row{display:grid;grid-template-columns:36px minmax(0,1fr) auto auto;grid-template-areas:"icon main figs actions";align-items:center;gap:10px 18px;padding:14px 16px;border-bottom:1px solid var(--border-soft)}
.rp-lib-row:last-child{border-bottom:0}
.rp-lib-icon{grid-area:icon;width:36px;height:36px;border-radius:var(--tf-radius-sm);display:grid;place-items:center;color:var(--accent);background:var(--accent-soft);box-shadow:inset 0 0 0 1px var(--accent-mid)}
.rp-lib-main{grid-area:main;min-width:0}
.rp-lib-title{display:flex;align-items:center;flex-wrap:wrap;gap:6px 8px;font-size:13.5px;font-weight:600;color:var(--text)}
.rp-lib-title .tf-badge{height:20px;font-size:10.5px;letter-spacing:.03em}
.rp-lib-desc{margin:3px 0 0;font-size:12.5px;line-height:1.45;color:var(--muted)}
.rp-lib-figs{grid-area:figs;display:flex;gap:20px;margin:0}
.rp-lib-fig{min-width:56px}
.rp-lib-fig dt{font-size:11px;color:var(--muted);white-space:nowrap}
.rp-lib-fig dd{margin:2px 0 0;font-size:15px;font-weight:650;color:var(--text);font-variant-numeric:tabular-nums;white-space:nowrap}
.rp-lib-actions{grid-area:actions;display:flex;align-items:center;justify-content:flex-end;gap:4px}
.rp-lib-spacer{width:var(--tf-control-h-sm);flex:none}
.rp-lib-custom .rp-lib-row{grid-template-columns:36px minmax(0,1fr) auto;grid-template-areas:"icon main actions"}

/* ── Schedules / History pages ── */
.rp-subpage{flex:1 1 auto;min-height:0;display:flex;flex-direction:column}
.rp-subhead{flex-wrap:wrap;gap:8px 16px;padding:10px 24px;min-height:56px;background:var(--panel)}
.rp-subhead-title{margin:0;display:flex;align-items:center;gap:8px;font-size:14px;font-weight:650;color:var(--text)}
.rp-subhead .rp-seg{width:auto}
.rp-subhead .rp-seg>button{flex:0 0 auto}
.rp-subhead-note{margin-left:auto;font-size:12.5px;color:var(--muted)}
.rp-subpage-body{padding:20px 24px 40px}
.rp-subpage-body>.tf-panel{max-width:1360px;margin:0 auto}

/* ── Dialogs ── */
.media-lightbox.rp-dialog-backdrop{z-index:120;padding:24px;overscroll-behavior:contain}
.media-lightbox-inner.rp-dialog{width:min(520px,100%);max-width:100%;max-height:calc(100dvh - 48px);min-width:0;min-height:0;padding:0;resize:none;overflow:hidden;display:flex;flex-direction:column;border-radius:var(--tf-radius);border:1px solid var(--border);background:var(--panel);color:var(--text);box-shadow:var(--shadow-lg);animation:none}
.media-lightbox-inner.rp-dialog.is-wide{width:min(780px,100%)}
.rp-dialog-head{flex:none;display:flex;align-items:flex-start;gap:12px;padding:16px 16px 14px 20px;border-bottom:1px solid var(--border)}
.rp-dialog-titles{flex:1 1 auto;min-width:0}
.rp-dialog-title{margin:0;font-size:16px;font-weight:650;letter-spacing:-.01em;line-height:1.3;color:var(--text)}
.rp-dialog-sub{margin:3px 0 0;font-size:12.5px;line-height:1.4;color:var(--muted);overflow-wrap:anywhere}
.rp-dialog-form{flex:1 1 auto;min-height:0;display:flex;flex-direction:column}
.rp-dialog-body{flex:1 1 auto;min-height:0;overflow:auto;padding:18px 20px 20px;display:flex;flex-direction:column;gap:16px}
.rp-dialog-foot{flex:none;display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:12px 16px 12px 20px;border-top:1px solid var(--border);background:var(--panel-alt)}
.rp-dialog-foot-note{margin-right:auto;min-width:0;font-size:12px;color:var(--muted)}
.rp-alert{display:flex;align-items:flex-start;gap:8px;padding:10px 12px;border-radius:var(--tf-radius-sm);font-size:13px;line-height:1.45}
.rp-alert .tf-icon{margin-top:1px}
.rp-alert.is-error{background:var(--danger-soft);color:var(--danger);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--danger) 30%,transparent)}
.rp-alert.is-warning{background:var(--warning-soft);color:var(--text);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--warning) 35%,transparent)}
.rp-alert.is-warning .tf-icon{color:var(--warning)}
.rp-sched-alert{margin:12px 16px 0}
.rp-builder{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px 24px}
.rp-builder-col{display:flex;flex-direction:column;gap:18px;min-width:0}
.rp-fieldset{border:0;margin:0;padding:0;min-width:0;display:flex;flex-direction:column;gap:6px}
.rp-fieldset>legend{display:flex;align-items:center;width:100%;padding:0;margin:0 0 6px}
.rp-legend-actions{margin-left:auto;display:inline-flex;gap:12px}
.rp-checkgrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 12px}
.rp-check{display:flex;align-items:center;gap:8px;min-height:32px;min-width:0;font-size:13px;color:var(--text);cursor:pointer}
.rp-check input{flex:none;width:15px;height:15px;margin:0;accent-color:var(--accent);cursor:pointer}
.rp-check:has(input:focus-visible){box-shadow:var(--tf-focus);border-radius:4px}
.rp-check input:focus-visible{outline:none}
.rp-checklist{display:flex;flex-direction:column;max-height:300px;overflow:auto;padding:2px 10px;border:1px solid var(--border);border-radius:var(--tf-radius-sm);background:var(--panel)}
.rp-check-text{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rp-check-count{flex:none;font-size:11px;color:var(--muted);font-variant-numeric:tabular-nums}
.rp-fieldset.has-error .rp-checklist{border-color:var(--danger)}

/* ── Container: the canvas' own width decides density ── */
@container rp (max-width:1100px){
 .rp-stats{grid-template-columns:repeat(3,minmax(0,1fr))}
 .rp-history-table .c-by{display:none}
 .rp-sched-table .c-to{display:none}
}
@container rp (max-width:680px){
 .rp-row.rp-row-even{grid-template-columns:minmax(0,1fr)}
}
@container rp (max-width:900px){
 .rp-row{grid-template-columns:minmax(0,1fr)}
 .rp-runs-table .c-status{display:none}
 .rp-flaky-table .c-section{display:none}
 .rp-section-inline{display:block}
 .rp-lib-row{grid-template-columns:36px minmax(0,1fr) auto;grid-template-areas:"icon main actions" ". figs figs"}
 .rp-lib-icon,.rp-lib-actions{align-self:start}
 .rp-subhead-note{display:none}
}
@container rp (max-width:760px){
 .rp-canvas-body{padding:16px 16px 32px}
 .rp-subpage-body{padding:16px 16px 32px}
 .rp-subhead{padding:10px 16px}
 .rp-legend{grid-template-columns:repeat(3,minmax(0,1fr))}
 .rp-runs-table .c-date{display:none}
 .rp-sub-date{display:inline-flex}
 .rp-sub-config{display:none}
 .rp-sections-table :is(.c-auto,.c-exec){display:none}
 .rp-history-table .c-details{display:none}
 .rp-details-inline{display:block}
 .rp-history-table .c-date{width:150px}
 .rp-sched-table :is(.c-when,.c-last){display:none}
 .rp-when-inline{display:inline}
}
@container rp (max-width:600px){
 .rp-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
 /* Phone-width tables become stacked rows (grid areas per table). */
 .rp-table.rp-stack thead{display:none}
 .rp-table.rp-stack,.rp-table.rp-stack tbody{display:block}
 .rp-table.rp-stack tr{display:grid;gap:8px 12px;align-items:center;padding:12px 16px;border-bottom:1px solid var(--border-soft)}
 .rp-table.rp-stack tbody tr:last-child{border-bottom:0}
 :where(.rp-table.rp-stack) td{display:block;width:auto!important;height:auto!important;padding:0!important;border:0!important;min-width:0}
 .rp-table.rp-stack tbody tr:hover td{background:none}
 .rp-table.rp-stack tbody tr:hover{background:color-mix(in srgb,var(--panel-alt) 70%,transparent)}
 .rp-runs-table tr{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"name pass" "res res"}
 .rp-runs-table .c-name{grid-area:name}
 .rp-runs-table .c-pass{grid-area:pass;align-self:start}
 .rp-runs-table .c-results{grid-area:res}
 .rp-runs-table :is(.c-status,.c-progress,.c-date){display:none}
 .rp-runs-table .rp-cell-sub{flex-wrap:wrap;white-space:normal;row-gap:2px}
 .rp-runs-table .rp-sub-config{display:inline-flex}
 .rp-cap{display:block;font-size:11px;color:var(--muted);margin-top:2px}
 .rp-flaky-table tr{grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:"id title rate" ". out out"}
 .rp-flaky-table .c-id{grid-area:id;align-self:start;padding-top:2px!important}
 .rp-flaky-table .c-title{grid-area:title}
 .rp-flaky-table .c-rate{grid-area:rate;align-self:start}
 .rp-flaky-table .c-outcomes{grid-area:out}
 .rp-flaky-table :is(.c-section,.c-latest){display:none}
 .rp-flaky-table .rp-meter-track{display:none}
 .rp-sections-table .c-results{display:none}
 .rp-history-table tr{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"report actions" "meta meta"}
 .rp-history-table .c-report{grid-area:report}
 .rp-history-table .c-actions{grid-area:actions}
 .rp-history-table .c-source{grid-area:meta;display:flex;align-items:center;gap:10px}
 .rp-history-table .c-date{display:none}
 .rp-history-table .rp-src-date{display:inline}
 .rp-sched-table tr{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"report actions" "status status"}
 .rp-sched-table .c-report{grid-area:report}
 .rp-sched-table .c-actions{grid-area:actions}
 .rp-sched-table .c-status{grid-area:status}
 .rp-sched-table .rp-cell-sub{flex-wrap:wrap;white-space:normal}
 .rp-req-table .c-type{display:none}
 .rp-bar-row{grid-template-columns:minmax(64px,32%) minmax(0,1fr) 68px;gap:10px}
 .rp-lib-row,.rp-lib-custom .rp-lib-row{grid-template-columns:36px minmax(0,1fr);grid-template-areas:"icon main" ". figs" ". actions"}
 .rp-lib-actions{justify-content:flex-start}
 .rp-trend-plot{height:184px}
 .rp-trend-legend{padding-left:0}
}
@container rp (max-width:420px){
 .rp-legend{grid-template-columns:repeat(2,minmax(0,1fr))}
 .rp-stats .tf-stat{padding:10px 12px}
 .rp-stats .tf-stat-value{font-size:19px}
 .rp-trend-axis{display:none}
 .rp-runs-table .c-pass{width:72px}
}

/* ── Filter pane placement by viewport ── */
@media(min-width:1280px){
 .rp-wb:not(.is-pinned)>.rp-filters{display:none}
}
@media(min-width:901px) and (max-width:1279px){
 .rp-wb>.rp-filters{position:absolute;top:0;bottom:0;left:0;z-index:30;width:min(320px,88%);display:none;box-shadow:var(--shadow-lg)}
 .rp-wb.is-open>.rp-filters{display:flex}
 .rp-wb.is-open>.rp-filters-backdrop{display:block;position:absolute;inset:0;z-index:25;background:color-mix(in srgb,var(--sidebar-end) 42%,transparent)}
 .app-shell .rp-filters-done{display:inline-flex}
}
@media(max-width:900px){
 .rp-wb{background:transparent}
 .rp-wb>.rp-filters{position:fixed;inset:0;z-index:120;width:auto;display:none;border:0;background:var(--panel-alt)}
 .rp-wb.is-open>.rp-filters{display:flex}
 .rp-wb>.rp-filters .tf-pane-body{overflow:auto;overscroll-behavior:contain}
 .rp-filters-head{padding-top:calc(8px + env(safe-area-inset-top,0px))}
 .rp-filters-foot{padding-bottom:calc(8px + env(safe-area-inset-bottom,0px))}
 .app-shell .rp-filters-done{display:inline-flex}
 body:has(.rp-wb.is-open) {overflow:hidden}
 .rp-canvas,.rp-canvas.is-sub{background:transparent;border:0}
 .rp-scopebar,.rp-subhead{padding:0 0 12px;min-height:0;background:transparent;border-bottom:0}
 .rp-canvas-body,.rp-subpage-body{padding:0}
 .rp-subhead-title{font-size:13px}
 .media-lightbox.rp-dialog-backdrop{padding:0;align-items:end}
}
@media(max-width:600px){
 .media-lightbox-inner.rp-dialog,.media-lightbox-inner.rp-dialog.is-wide{width:100%;max-height:100dvh;height:100dvh;border-radius:0;border:0}
 .rp-dialog-head{padding:calc(12px + env(safe-area-inset-top,0px)) 12px 12px 16px}
 .rp-dialog-body{padding:16px}
 .rp-dialog-foot{padding:10px 16px calc(10px + env(safe-area-inset-bottom,0px))}
 .rp-dialog-foot .btn{flex:1 1 0}
 .rp-dialog-foot-note{display:none}
 .rp-builder{grid-template-columns:minmax(0,1fr)}
}
@media(max-width:540px){
 .app-shell .rp-print-btn{display:none}
 .rp-tabs .tf-tab{padding-left:9px;padding-right:9px;gap:6px}
}
@media(max-width:420px){
 .rp-tab-count{display:none}
 .rp-subhead .rp-seg{width:100%}
 .rp-subhead .rp-seg>button{flex:1 1 0;padding:0 6px}
 .rp-checkgrid{grid-template-columns:minmax(0,1fr)}
}

/* ── Print / Save as PDF: the canvas only, on white ── */
@media print{
 body:has(.rp-wb){--bg:#fff;--panel:#fff;--panel-alt:#f4f7f8;--text:#17262b;--muted:#4f5f67;--subtle:#6b7b86;--border:#d5dde0;--border-soft:#e6ecee;background:#fff!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
 body:has(.rp-wb) :is(.sidebar,.mobile-topbar,.mobile-bottomnav,.mobile-more-panel,.mobile-more-backdrop,.tf-topbar,.tf-pagehead,.rp-filters,.rp-filters-backdrop,.rp-scopebar,.rp-panel-more,.tf-toasts,.rp-dialog-backdrop,.tf-panel-actions .btn,.tf-saving){display:none!important}
 html:has(.rp-wb),body:has(.rp-wb),body:has(.rp-wb) #root{height:auto!important;min-height:0!important;overflow:visible!important}
 body:has(.rp-wb) :is(.app-shell,.app-shell>.main.tf-frame,.tf-content,.rp-wb,.rp-canvas,.rp-canvas-body){display:block!important;height:auto!important;max-height:none!important;min-height:0!important;overflow:visible!important;position:static!important;background:#fff!important;padding:0!important;margin:0!important;box-shadow:none!important;border:0!important}
 .rp-print-head{display:block;margin:0 0 16px;padding-bottom:10px;border-bottom:2px solid var(--accent)}
 .rp-print-title{font-size:20px;font-weight:650;letter-spacing:-.02em;color:var(--text)}
 .rp-print-sub{margin-top:3px;font-size:12px;color:var(--muted)}
 .rp-canvas-body>*{margin:0 0 14px!important;max-width:none}
 .rp-canvas-body .tf-panel,.rp-table tr,.rp-stats{break-inside:avoid}
 .rp-table-wrap{overflow:visible}
 .rp-trend-tip{display:none!important}
 .rp-req:has(.rp-req-intro),.rp-req:has(.tf-empty){display:none!important}
}
/* @endregion reports */



/* @region settings — settings tabs, billing, API */
/* Settings workbench (st-*): a grouped navigation pane on the left and the
   selected section on the canvas as stacked panels, max 880px wide. A
   ResizeObserver puts .is-compact on the workbench when it is too narrow for
   the nav (the nav turns into a select) and st-w-xs|sm|lg from the content
   pane's own width, so the layout follows the pane rather than the viewport. */
.st-wb{--tf-pane-w:248px}
@media(max-width:1279px){.st-wb{--tf-pane-w:224px}}

/* ── Navigation pane ── */
.st-nav-head{flex:none;padding:12px 12px 6px}
.st-nav-search{max-width:none;flex:none}
.st-nav-search .tf-search-icon{left:10px}
.app-shell .st-nav-search .input{min-height:var(--tf-control-h-sm);height:var(--tf-control-h-sm);padding:0 10px 0 32px;background:var(--panel)}
.st-nav-body{padding:4px 8px 20px}
.st-nav-group+.st-nav-group{margin-top:12px}
.st-nav-heading{padding:8px 10px 5px;font-size:10px;font-weight:600;letter-spacing:.07em;text-transform:uppercase;color:var(--muted)}
.app-shell .st-nav-item{position:relative;display:flex;align-items:center;gap:10px;min-height:34px;padding:0 10px;border-radius:5px;color:var(--muted);font-size:13px;font-weight:500;line-height:1.2;text-decoration:none;transition:background-color .12s,color .12s}
.app-shell .st-nav-item:hover{background:var(--panel);color:var(--text);text-decoration:none}
.app-shell .st-nav-item:focus-visible{outline:none;box-shadow:var(--tf-focus)}
.app-shell .st-nav-item.is-active{background:var(--accent-soft);color:var(--accent);font-weight:650;box-shadow:none}
.app-shell .st-nav-item.is-active:focus-visible{box-shadow:var(--tf-focus)}
.st-nav-icon{display:grid;place-items:center;width:18px;flex:none}
.st-nav-label{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.st-nav-badge{flex:none;max-width:84px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;font-weight:500;color:var(--muted);font-variant-numeric:tabular-nums}
.st-nav-item.is-active .st-nav-badge{color:var(--accent)}
.st-nav-empty{display:flex;flex-direction:column;align-items:flex-start;gap:6px;padding:14px 10px;font-size:13px;color:var(--muted)}

/* ── Content pane ── */
.st-main{background:var(--bg)}
.st-page{max-width:880px;margin:0 auto;padding:28px 32px 72px;box-sizing:border-box;display:flex;flex-direction:column;gap:20px;min-width:0}
.st-w-sm .st-page,.st-w-xs .st-page{padding:22px 20px 56px}
.st-page-head{display:flex;flex-direction:column;gap:4px;min-width:0}
.st-kicker{font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.st-page-title{margin:0;font-size:20px;font-weight:650;letter-spacing:-.02em;line-height:1.3;color:var(--text)}
.st-page-desc{margin:0;font-size:13px;line-height:1.5;color:var(--muted)}
.st-stack{display:flex;flex-direction:column;gap:16px;min-width:0}
.st-free-ai-note{margin:0;font-size:12.5px;line-height:1.45;color:var(--muted);overflow-wrap:anywhere}
.st-stack>.tf-panel+.tf-panel{margin-top:0}
.st-headmeta{display:inline-flex;align-items:center;gap:6px;min-width:0;max-width:280px;font-weight:500;color:var(--muted)}
.st-headmeta .tf-icon{flex:none}
/* ActionMenu opens upward with an inline `bottom`; the list's default
   `top` must not also apply or it collapses to a sliver. */
.st-wb .tf-menu-list[style*="bottom"]{top:auto}

/* Section picker: replaces the nav pane when it doesn't fit (phones, or a
   narrow main column on tablets and folded phones). */
.st-picker{display:none;position:relative;align-items:center;min-width:0}
.app-shell .st-picker .select{width:100%;min-height:44px;padding:0 38px 0 40px;font-weight:600;color:var(--text);appearance:none;-webkit-appearance:none;background:var(--panel)}
.st-picker-icon{position:absolute;left:13px;display:grid;color:var(--accent);pointer-events:none}
.st-picker-caret{position:absolute;right:12px;display:grid;color:var(--muted);pointer-events:none}
.st-wb.is-compact .st-nav{display:none}
.st-wb.is-compact .st-picker{display:flex}

/* ── Panels ── */
.st-panel-head{display:flex;align-items:flex-start;gap:12px;padding:16px 20px;border-bottom:1px solid var(--border-soft);min-width:0}
.st-panel-titles{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:4px}
.st-panel-title{margin:0;display:flex;align-items:center;flex-wrap:wrap;gap:6px 8px;font-size:14px;font-weight:650;line-height:1.35;letter-spacing:-.01em;color:var(--text)}
.st-panel-desc{margin:0;font-size:13px;line-height:1.5;color:var(--muted)}
.st-panel-actions{flex:none;display:flex;align-items:center;flex-wrap:wrap;justify-content:flex-end;gap:8px}
.st-panel-body{display:flex;flex-direction:column;gap:16px;padding:20px;min-width:0}
.st-panel-body.is-flush{padding:0;gap:0}
.st-panel-body.is-flush:last-child{border-radius:0 0 var(--tf-radius) var(--tf-radius);overflow:hidden}
.st-panel-foot{display:flex;align-items:center;flex-wrap:wrap;gap:10px 12px;padding:12px 20px;border-top:1px solid var(--border-soft);background:var(--panel-alt);border-radius:0 0 var(--tf-radius) var(--tf-radius)}
.st-foot-note{flex:1 1 220px;min-width:0;display:flex;align-items:center;flex-wrap:wrap;gap:6px;font-size:12px;line-height:1.45;color:var(--muted)}
.st-foot-note.is-dirty{color:var(--warning);font-weight:600}
.st-foot-note.is-dirty::before{content:"";width:7px;height:7px;border-radius:50%;background:currentColor}
.st-foot-note a,.st-help a,.st-provider-desc a{display:inline-flex;align-items:center;gap:3px;color:var(--accent);font-weight:600}
.st-foot-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px;margin-left:auto}
.tf-panel.st-panel.is-danger{border-color:color-mix(in srgb,var(--danger) 38%,var(--border))}
.st-panel.is-danger .st-panel-title{color:var(--danger)}
.st-panel-head .tf-panel-count{font-variant-numeric:tabular-nums}

/* ── Fields ── */
.st-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 20px;min-width:0}
.st-grid.is-dimmed .st-field{opacity:.62}
.st-w-xs .st-grid{grid-template-columns:minmax(0,1fr)}
.st-field{display:flex;flex-direction:column;gap:6px;min-width:0}
.st-field.is-full{grid-column:1/-1}
.st-label{display:flex;align-items:center;gap:8px;margin:0;padding:0;font-size:13px;font-weight:600;line-height:1.3;color:var(--text)}
.st-optional{font-size:11px;font-weight:500;color:var(--muted)}
.st-help{font-size:12px;line-height:1.45;color:var(--muted);overflow-wrap:anywhere}
.st-error{display:flex;align-items:flex-start;gap:6px;font-size:12px;font-weight:500;line-height:1.45;color:var(--danger)}
.st-error .tf-icon{margin-top:1px}
:is(.st-page,.st-dialog) :is(.input,.select){min-height:var(--tf-control-h);padding-top:7px;padding-bottom:7px}
:is(.st-page,.st-dialog) .textarea{min-height:96px;font-family:inherit;line-height:1.5}
:is(.st-page,.st-dialog) .st-field.has-error :is(.input,.select,.textarea){border-color:var(--danger)}
:is(.st-page,.st-dialog) :is(.input,.select,.textarea):disabled{background:var(--panel-alt);color:var(--muted);cursor:not-allowed}
:is(.st-page,.st-dialog) :is(.input,.textarea)[readonly]{background:var(--panel-alt)}
:is(.st-page,.st-dialog) .st-mono,.st-mono{font-family:var(--tf-font-mono)}
.st-mono{font-size:12.5px}
:is(.st-page,.st-dialog) .textarea.st-mono{font-family:var(--tf-font-mono);font-size:12px;line-height:1.6}
.st-prompt{min-height:260px;white-space:pre-wrap}
.st-json{min-height:320px}
.st-notes{min-height:104px}
.st-code-input{max-width:220px;letter-spacing:.24em}
.app-shell .st-select-auto,.st-dialog .st-select-auto{width:auto;min-width:132px;flex:none}
:is(.st-page,.st-dialog) .st-select-auto.is-small{min-height:var(--tf-control-h-sm);padding:4px 8px;font-size:12px}
.st-fieldset{display:flex;flex-direction:column;gap:8px;min-width:0;margin:0;padding:0;border:0}
.st-fieldset>legend{margin-bottom:8px}
.st-check{display:flex;align-items:flex-start;gap:10px;padding:10px 12px;border:1px solid var(--border);border-radius:var(--tf-radius-sm);background:var(--panel);cursor:pointer}
.st-check:hover{border-color:color-mix(in srgb,var(--text) 22%,var(--border))}
.st-check:focus-within{border-color:var(--accent);box-shadow:var(--tf-focus)}
.st-check input{flex:none;width:16px;height:16px;margin:2px 0 0;accent-color:var(--accent)}
.st-check-title{display:block;font-size:13px;font-weight:600;color:var(--text)}
.st-check-desc{display:block;margin-top:2px;font-size:12px;line-height:1.45;color:var(--muted)}
.st-fieldset.has-error .st-check{border-color:color-mix(in srgb,var(--danger) 45%,var(--border))}
.st-inline-code{font:500 11.5px/1.4 var(--tf-font-mono);padding:1px 5px;margin:0 1px;border-radius:var(--tf-radius-xs);background:var(--panel-alt);box-shadow:inset 0 0 0 1px var(--border);color:var(--text);overflow-wrap:anywhere}

/* Masked secret: one bordered group holding the input and its icon buttons */
.st-secret{flex:1 1 auto;display:flex;align-items:center;gap:2px;min-width:0;padding-right:3px;background:var(--panel);border:1px solid var(--border);border-radius:var(--tf-radius-sm)}
.st-secret:focus-within{border-color:var(--accent);box-shadow:var(--tf-focus)}
.st-secret:has(input[readonly]),.st-secret:has(input:disabled){background:var(--panel-alt)}
:is(.st-page,.st-dialog) .st-secret .input{flex:1 1 auto;min-width:0;border:0;outline:none;background:transparent;box-shadow:none}
:is(.st-page,.st-dialog) .st-secret .input:focus{outline:none;box-shadow:none}
.st-field.has-error .st-secret,.st-provider .st-secret:has(input[aria-invalid="true"]){border-color:var(--danger)}
:is(.app-shell,.media-lightbox) .st-secret .btn.icon.small{width:28px;min-height:28px;flex:none}
.st-copyfield{display:flex;gap:8px;min-width:0}
.st-copyfield .input{flex:1 1 auto;min-width:0}
.st-copyfield .btn{flex:none}
.st-inline{display:flex;align-items:flex-start;gap:8px;min-width:0}
.st-inline>.input{flex:1 1 auto;min-width:0}
.st-inline>.btn{flex:none}
.st-token-row{flex-wrap:wrap}
.st-token-row>.input,.st-token-row>.st-copyfield{flex:1 1 220px;min-width:0}
.st-token-hint{color:var(--muted)}
.st-inline-form{display:flex;align-items:flex-start;flex-wrap:wrap;gap:12px 16px;min-width:0}
.st-inline-form>.st-field{flex:1 1 220px}
.st-inline-form>.btn{margin-top:25px}
/* API keys: name grows, the two pickers stay compact; scope/expiry under the name */
.st-key-form>.st-field.st-key-select{flex:0 1 160px}
.st-key-form .select{width:100%}
.st-key-meta{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:4px;min-width:0}
.st-key-meta:empty{display:none}
.st-key-expiry{font-size:12px;color:var(--muted)}

/* ── Rows, choices, switches ── */
.st-rows{display:flex;flex-direction:column;min-width:0}
.st-rows>.st-row{padding:14px 0;border-bottom:1px solid var(--border-soft)}
.st-rows>.st-row:first-child{padding-top:0}
.st-rows>.st-row:last-child{padding-bottom:0;border-bottom:0}
.st-row{display:flex;align-items:center;gap:12px 20px;min-width:0}
.st-row-main{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:3px}
.st-row-title{font-size:13px;font-weight:600;line-height:1.35;color:var(--text);overflow-wrap:anywhere}
.st-row-desc{font-size:12px;line-height:1.45;color:var(--muted)}
.st-row-control{flex:none;display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px}
.st-value{font-size:13px;font-weight:600;white-space:nowrap;color:var(--text)}
.st-w-xs .st-row{flex-wrap:wrap}
.st-w-xs .st-row-control{justify-content:flex-start}
.st-choices{display:flex;flex-direction:column;gap:8px;min-width:0}
.st-choices.is-two{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.st-w-xs .st-choices.is-two{grid-template-columns:minmax(0,1fr)}
.st-choice{display:flex;align-items:flex-start;gap:10px;min-width:0;padding:12px 14px;border:1px solid var(--border);border-radius:var(--tf-radius);background:var(--panel);cursor:pointer;transition:border-color .15s,background-color .15s}
.st-choice.is-large{padding:16px}
.st-choice:hover{border-color:color-mix(in srgb,var(--text) 22%,var(--border))}
.st-choice.is-selected{border-color:var(--accent);background:var(--accent-soft);box-shadow:inset 0 0 0 1px var(--accent)}
.st-choice:focus-within{box-shadow:var(--tf-focus)}
.st-choice.is-selected:focus-within{box-shadow:inset 0 0 0 1px var(--accent),var(--tf-focus)}
.st-choice-radio{flex:none;width:16px;height:16px;margin:2px 0 0;accent-color:var(--accent)}
.st-choice-text{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:3px}
.st-choice-title{font-size:13px;font-weight:650;color:var(--text)}
.st-choice-desc{font-size:12px;line-height:1.45;color:var(--muted)}
.st-choice>.tf-badge{flex:none;align-self:center}
.st-switch{position:relative;flex:none;width:36px;height:20px;padding:0;border:0;border-radius:10px;background:color-mix(in srgb,var(--muted) 55%,var(--border));cursor:pointer;transition:background-color .15s}
.st-switch-knob{position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;background:var(--panel);transition:transform .15s}
.st-switch.is-on{background:var(--accent)}
.st-switch.is-on .st-switch-knob{transform:translateX(16px)}
.st-switch:focus-visible{outline:none;box-shadow:var(--tf-focus)}
.st-switch:disabled{opacity:.5;cursor:not-allowed}
.tf-seg.st-seg-wide{display:flex;width:100%;box-sizing:border-box}
.tf-seg.st-seg-wide>button{flex:1 1 0;min-width:0}
.tf-seg>button:focus-visible{outline:none;box-shadow:var(--tf-focus)}

/* ── Notices ── */
.st-notice{display:flex;align-items:flex-start;flex-wrap:wrap;gap:8px 10px;min-width:0;padding:12px 14px;border:1px solid var(--border);border-radius:var(--tf-radius-sm);background:var(--panel-alt);font-size:13px;line-height:1.5;color:var(--text)}
.st-notice-icon{flex:none;display:grid;margin-top:1px}
.st-notice-body{flex:1 1 220px;min-width:0;display:flex;flex-direction:column;gap:2px}
.st-notice-title{font-weight:650;color:var(--text)}
.st-notice-text{color:var(--text);overflow-wrap:anywhere}
.st-notice-actions{flex:none;display:flex;align-items:center;gap:6px;margin-left:auto}
.st-notice-stack{display:flex;flex-direction:column;gap:10px;margin-top:4px}
.st-notice.is-info{background:var(--info-soft);border-color:color-mix(in srgb,var(--info) 30%,transparent)}
.st-notice.is-info .st-notice-icon{color:var(--info)}
.st-notice.is-success{background:var(--success-soft);border-color:color-mix(in srgb,var(--success) 30%,transparent)}
.st-notice.is-success .st-notice-icon{color:var(--success)}
.st-notice.is-warning{background:var(--warning-soft);border-color:color-mix(in srgb,var(--warning) 32%,transparent)}
.st-notice.is-warning .st-notice-icon{color:var(--warning)}
.st-notice.is-danger{background:var(--danger-soft);border-color:color-mix(in srgb,var(--danger) 32%,transparent)}
.st-notice.is-danger .st-notice-icon{color:var(--danger)}
.st-notice .st-copyfield .input{background:var(--panel)}

/* ── Tables ── */
.st-table-wrap{min-width:0;overflow-x:auto}
.st-table-wrap.is-scroll{max-height:480px;overflow:auto}
.st-scroll-box .st-table-wrap{max-height:300px;overflow:auto}
.tf-panel .st-table{width:100%;min-width:0;table-layout:fixed;border-collapse:separate;border-spacing:0;font-size:13px}
.st-table th{height:36px;padding:0 12px;text-align:left;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px;font-weight:600;color:var(--muted);background:var(--panel-alt);border-bottom:1px solid var(--border)}
.st-table td{height:46px;padding:8px 12px;vertical-align:middle;color:var(--text);border-bottom:1px solid var(--border-soft);min-width:0}
.st-table :is(th,td):first-child{padding-left:20px}
.st-table :is(th,td):last-child{padding-right:14px}
.st-table tbody tr:last-child td{border-bottom:0}
.st-table tbody tr:hover td{background:color-mix(in srgb,var(--panel-alt) 65%,transparent)}
.st-table tbody tr.is-selected td{background:var(--accent-soft)}
.st-table tbody tr.is-muted td{color:var(--muted)}
.st-table tbody tr.is-muted .st-strong{color:var(--muted)}
.st-table.is-compact td{height:38px;padding:6px 12px}
.st-table.is-sticky thead th{position:sticky;top:0;z-index:1}
.st-table .st-num{width:96px;text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.st-table .st-col-date{width:132px;white-space:nowrap;color:var(--muted)}
.st-table th.st-col-date{color:var(--muted)}
.st-table .st-col-act{width:56px;text-align:right}
.st-table .st-col-act-wide{width:100px;text-align:right}
.st-table .st-col-switch{width:76px}
.st-table .st-col-role{width:104px}
.st-table .st-col-status{width:112px}
.st-table .st-col-type{width:176px}
.st-table .st-col-badge{width:120px}
.st-table .st-col-delivery{width:164px}
.st-table .st-col-seen{width:150px}
.st-table .st-col-inout{width:160px}
.st-table .st-col-events{width:180px}
.st-cell-text{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.st-cell-sub{display:flex;align-items:center;gap:4px;min-width:0;margin-top:2px;font-size:12px;color:var(--muted)}
.st-cell-sub.tf-truncate{display:block}
.st-cell-sub.st-cell-warn{display:block;color:var(--warning);white-space:normal}
.st-strong{font-weight:600;color:var(--text)}
.st-badges{display:flex;flex-wrap:wrap;gap:4px}
.st-table-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding:12px 20px;border-bottom:1px solid var(--border-soft)}
.st-table-toolbar .tf-search{flex:1 1 220px;max-width:none}
.st-toolbar-count{margin-left:auto;white-space:nowrap;font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}
.st-table-foot{padding:10px 20px;border-top:1px solid var(--border-soft);font-size:12px;color:var(--muted)}
.st-w-xs .st-col-hide-sm{display:none}
/* Invoices on a phone: let the date column shrink and the invoice number wrap */
.st-w-xs .st-invoices .st-col-date{width:auto}
.st-w-xs .st-invoices td .st-cell-text{white-space:normal;overflow-wrap:anywhere}
.st-empty-inline{display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding:20px;font-size:13px;color:var(--muted)}
.st-panel-body:not(.is-flush)>.st-empty-inline{padding:2px 0}
.st-loading{padding:2px 0;font-size:13px;color:var(--muted)}
.st-panel-body.is-flush>.st-loading{padding:20px}
.tf-empty.st-empty{padding:28px 16px}
.app-shell .st-link,.st-dialog .st-link{padding:0;border:0;background:none;font:inherit;font-weight:600;color:var(--accent);cursor:pointer;text-align:left;max-width:100%}
.app-shell .st-link:hover{text-decoration:underline}
.app-shell .st-link:focus-visible{outline:none;box-shadow:var(--tf-focus);border-radius:3px}
.st-link.tf-truncate{display:block}
:is(.app-shell,.media-lightbox) .btn.ghost.st-danger-text{color:var(--danger)}
:is(.app-shell,.media-lightbox) .btn.ghost.st-danger-text:hover:not(:disabled){background:var(--danger-soft);color:var(--danger)}
.st-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}
.st-actions.is-start{justify-content:flex-start}
.st-text{margin:0;font-size:13px;line-height:1.55;color:var(--text)}
.st-pre{white-space:pre-wrap}
.st-break{overflow-wrap:anywhere}

/* ── Code ── */
.st-code{margin:0;padding:12px 14px;max-height:420px;overflow:auto;background:var(--panel-alt);border:1px solid var(--border);border-radius:var(--tf-radius-sm);font:12px/1.6 var(--tf-font-mono);color:var(--text);white-space:pre-wrap;overflow-wrap:anywhere}
.st-code.is-compact{margin-top:8px;padding:8px 10px;font-size:11.5px}
.st-code.is-output{max-height:520px}
/* Settings → API keys → Connect your tests */
.st-ct-tabs{flex-wrap:wrap;max-width:100%;align-self:flex-start;margin-bottom:12px}
@media (max-width: 540px) {
  .st-ct-tabs{display:flex;align-self:stretch}
  .st-ct-tabs>button{flex:1 1 0;min-height:44px}
  .st-connect-tests .st-actions .btn{min-height:44px}
}
.st-code:focus-visible{outline:none;box-shadow:var(--tf-focus)}
.st-endpoints{list-style:none;margin:0;padding:0}
.st-endpoint{display:flex;align-items:flex-start;gap:12px;padding:12px 14px 12px 20px;border-bottom:1px solid var(--border-soft)}
.st-endpoint:last-child{border-bottom:0}
.tf-badge.st-method{min-width:58px;justify-content:center;flex:none;font-family:var(--tf-font-mono);letter-spacing:.02em}
.st-endpoint-main{flex:1 1 auto;min-width:0}
.st-endpoint-path{font-size:12.5px;font-weight:600;color:var(--text);overflow-wrap:anywhere}
.st-endpoint-desc{margin-top:3px;font-size:12px;line-height:1.45;color:var(--muted)}

/* ── Stats, summaries, subsections ── */
.st-stats{grid-template-columns:repeat(4,minmax(0,1fr))}
.st-stats.is-5{grid-template-columns:repeat(5,minmax(0,1fr))}
:is(.st-w-sm,.st-w-xs) .st-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
:is(.st-w-sm,.st-w-xs) .st-stats>.tf-stat:last-child:nth-child(odd){grid-column:1/-1}
.st-stats .tf-stat{padding:12px 16px}
.st-stats .tf-stat-value{font-size:20px;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.st-stats .tf-stat-value.is-text{font-size:15px;line-height:1.6}
.st-stats .tf-stat-value.is-danger{color:var(--danger)}
.st-stat-sub{margin-top:2px;font-size:12px;color:var(--muted)}
.st-stat-sub.is-warning{color:var(--warning)}
.st-stat-sub.is-danger{color:var(--danger)}
.st-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1px;margin:0;overflow:hidden;background:var(--border-soft);border:1px solid var(--border-soft);border-radius:var(--tf-radius-sm)}
.st-summary>div{min-width:0;padding:12px 14px;background:var(--panel)}
.st-summary dt{margin:0 0 4px;font-size:12px;color:var(--muted)}
.st-summary dd{margin:0;display:flex;flex-direction:column;align-items:flex-start;gap:2px;font-size:15px;font-weight:650;color:var(--text)}
.st-summary-sub{font-size:12px;font-weight:400;color:var(--muted)}
:is(.st-w-sm,.st-w-xs) .st-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
.st-subsection{display:flex;flex-direction:column;gap:8px;min-width:0}
.st-subhead{margin:0;display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 10px;font-size:13px;font-weight:650;color:var(--text)}
.st-subhead-note{font-size:12px;font-weight:400;color:var(--muted)}
.st-subhead-row{display:flex;align-items:center;justify-content:space-between;gap:8px}
/* Two-way Jira sync (Settings → Connections → Jira) */
.st-jira-sync-meta{row-gap:4px;column-gap:16px}
.st-jira-sync-meta dt{color:var(--muted);font-size:12.5px}
.st-jira-sync-meta dd{margin:0;font-size:13px;color:var(--text)}
.st-jira-sync-steps{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:4px;font-size:12.5px;color:var(--muted)}
.st-jira-map{display:flex;flex-direction:column;gap:8px;min-width:0}
.st-jira-map-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 32px;gap:8px;align-items:center;min-width:0}
.st-jira-map-row>.input,.st-jira-map-row>.select{min-width:0;width:100%}
.st-jira-map-row.is-head{font-size:12px;font-weight:600;color:var(--muted)}
@media (max-width:560px){.st-jira-map-row{grid-template-columns:minmax(0,1fr) 32px}.st-jira-map-row>.select{grid-column:1/2}.st-jira-map-row>.btn{grid-row:1;grid-column:2}.st-jira-map-row.is-head>span:nth-child(2){display:none}}
.st-subsection .st-table-wrap{border:1px solid var(--border-soft);border-radius:var(--tf-radius-sm)}
.st-subsection .st-table :is(th,td):first-child{padding-left:12px}
.st-split{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;min-width:0}
:is(.st-w-sm,.st-w-xs) .st-split{grid-template-columns:minmax(0,1fr)}
.st-trend{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:1px}
.st-trend-row{display:grid;grid-template-columns:84px minmax(60px,1fr) 120px 150px;align-items:center;gap:12px;width:100%;padding:6px 8px;border:0;border-radius:var(--tf-radius-xs);background:transparent;color:var(--text);font:inherit;font-size:12px;text-align:left;cursor:pointer}
.st-trend-row:hover{background:var(--panel-alt)}
.st-trend-row.is-active{background:var(--accent-soft)}
.st-trend-row:focus-visible{outline:none;box-shadow:var(--tf-focus)}
.st-trend-label{font-weight:600;white-space:nowrap}
.st-trend-bar{height:6px;overflow:hidden;border-radius:3px;background:var(--panel-alt);box-shadow:inset 0 0 0 1px var(--border-soft)}
.st-trend-bar>span{display:block;height:100%;border-radius:3px;background:var(--accent)}
.st-trend-value{text-align:right;font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap}
.st-trend-meta{text-align:right;color:var(--muted);white-space:nowrap}
.st-w-xs .st-trend-row{grid-template-columns:70px minmax(40px,1fr) auto}
.st-w-xs .st-trend-meta{display:none}

/* ── Organization: logo, themes ── */
.st-logo{display:flex;align-items:center;flex-wrap:wrap;gap:12px 14px;min-width:0;padding:12px;border:1px dashed var(--border);border-radius:var(--tf-radius)}
.st-logo-preview{flex:none;width:56px;height:56px;display:grid;place-items:center;overflow:hidden;border:1px solid var(--border);border-radius:var(--tf-radius);background:var(--panel)}
.st-logo-preview img{width:100%;height:100%;object-fit:contain}
.st-logo-preview.is-empty{border-color:transparent;background:var(--accent-soft);color:var(--accent);font-size:18px;font-weight:700}
.st-logo-text{flex:1 1 180px;min-width:0;display:flex;flex-direction:column;gap:3px}
.st-logo-actions{flex:none;display:flex;gap:8px}
.st-file-btn{cursor:pointer}
.app-shell .st-file-btn:focus-within{border-color:var(--accent);box-shadow:var(--tf-focus)}
.st-themes{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}
.st-w-sm .st-themes{grid-template-columns:repeat(3,minmax(0,1fr))}
.st-w-xs .st-themes{grid-template-columns:repeat(2,minmax(0,1fr))}
.app-shell .st-theme{display:flex;align-items:center;justify-content:space-between;gap:6px;min-width:0;min-height:var(--tf-control-h);padding:0 12px;border:1px solid var(--border);border-radius:var(--tf-radius-sm);background:var(--panel);color:var(--text);font:500 13px/1.2 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;text-align:left;cursor:pointer}
.app-shell .st-theme:hover{border-color:color-mix(in srgb,var(--text) 22%,var(--border))}
.app-shell .st-theme.is-selected{border-color:var(--accent);background:var(--accent-soft);color:var(--accent);font-weight:650}
.app-shell .st-theme:focus-visible{outline:none;box-shadow:var(--tf-focus)}
.st-theme-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* ── Members ── */
.st-member{display:flex;align-items:center;gap:10px;min-width:0}
.st-avatar{flex:none;width:30px;height:30px;display:grid;place-items:center;border-radius:50%;background:var(--accent-soft);color:var(--accent);font-size:11px;font-weight:700;letter-spacing:.02em}
.st-member-text{flex:1 1 auto;min-width:0}
.st-member-text .st-strong{display:block}
.st-you{margin-left:6px;padding:1px 6px;border-radius:var(--tf-radius-xs);box-shadow:inset 0 0 0 1px var(--border);font-size:11px;font-weight:600;color:var(--muted)}
.st-members td{height:54px}

/* ── Security ── */
.st-2fa{display:flex;flex-direction:column;gap:18px}
.st-steps{list-style:none;counter-reset:st-step;margin:0;padding:0;display:flex;flex-direction:column;gap:18px}
.st-steps>li{position:relative;counter-increment:st-step;display:flex;flex-direction:column;gap:8px;min-width:0;padding-left:36px}
.st-steps>li::before{content:counter(st-step);position:absolute;left:0;top:-2px;width:24px;height:24px;display:grid;place-items:center;border-radius:50%;background:var(--accent-soft);color:var(--accent);font-size:12px;font-weight:700}
.st-step-title{font-size:13px;font-weight:650;color:var(--text)}
/* QR codes need a light quiet zone to scan, whatever the theme. */
.st-qr{width:176px;height:176px;padding:8px;box-sizing:border-box;border:1px solid var(--border);border-radius:var(--tf-radius);background:#fff}
.st-qr svg{display:block;width:100%;height:100%}
.st-codes{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px}
.st-codes li{padding:8px 4px;text-align:center;font:600 12px/1 var(--tf-font-mono);color:var(--text);background:var(--panel);border:1px solid var(--border);border-radius:var(--tf-radius-xs)}
:is(.st-w-sm,.st-w-xs) .st-codes{grid-template-columns:repeat(2,minmax(0,1fr))}
.st-confirm-box{display:flex;flex-direction:column;gap:12px;padding:14px;border:1px solid color-mix(in srgb,var(--danger) 32%,var(--border));border-radius:var(--tf-radius-sm);background:var(--danger-soft)}
.st-confirm-box .input{background:var(--panel)}
.st-checklist{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}
.st-checklist li{display:flex;align-items:flex-start;gap:10px;font-size:13px;line-height:1.5;color:var(--text)}
.st-checklist .tf-icon{margin-top:2px;color:var(--success)}
.st-jira-linked{padding:10px 12px;border:1px solid var(--border);border-radius:var(--tf-radius-sm)}

/* ── Integrations ── */
.st-providers{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
.st-provider{display:flex;flex-direction:column;gap:8px;padding:16px 0;border-bottom:1px solid var(--border-soft)}
.st-provider:first-child{padding-top:0}
.st-provider:last-child{padding-bottom:0;border-bottom:0}
.st-provider-head{display:flex;align-items:center;flex-wrap:wrap;gap:8px 10px}
.st-provider-name{font-size:13px;font-weight:650;color:var(--text)}
.st-provider-desc{font-size:12px;line-height:1.45;color:var(--muted)}

/* ── Billing ── */
.st-plans{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
:is(.st-w-sm,.st-w-xs) .st-plans{grid-template-columns:minmax(0,1fr)}
.st-plan{display:flex;flex-direction:column;gap:8px;min-width:0;padding:16px;border:1px solid var(--border);border-radius:var(--tf-radius);background:var(--panel)}
.st-plan.is-recommended{border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent)}
.st-plan-head{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:22px}
.st-plan-name{font-size:13px;font-weight:650;color:var(--text)}
.st-plan-price{font-size:22px;font-weight:650;letter-spacing:-.02em;line-height:1.2;color:var(--text);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.st-plan-period{margin-left:2px;font-size:13px;font-weight:500;letter-spacing:0;color:var(--muted)}
.st-plan-meta{flex:1 1 auto;font-size:12px;line-height:1.45;color:var(--muted)}
.app-shell .st-plan .btn{width:100%}
.st-plan-current{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:var(--tf-control-h);border:1px dashed color-mix(in srgb,var(--success) 45%,var(--border));border-radius:var(--tf-radius-sm);font-size:13px;font-weight:600;color:var(--success)}
.st-plan-current.is-muted{border-color:var(--border);color:var(--muted)}
.st-card-on-file{display:flex;align-items:center;gap:12px;min-width:0;padding:12px 14px;border:1px solid var(--border);border-radius:var(--tf-radius-sm)}
.st-card-icon{flex:none;width:40px;height:28px;display:grid;place-items:center;border:1px solid var(--border);border-radius:4px;background:var(--panel-alt);color:var(--muted)}
.st-card-text{flex:1 1 auto;min-width:0}
.st-card-number{font:600 13px/1.3 var(--tf-font-mono);color:var(--text)}
.st-card-form{display:flex;flex-direction:column;gap:8px}
.st-card-element{min-height:42px;padding:11px 12px;box-sizing:border-box;border:1px solid var(--border);border-radius:var(--tf-radius-sm);background:var(--panel)}

/* ── Dialog (portal) ── */
.media-lightbox.st-dialog-backdrop{z-index:1200;padding:24px}
.st-dialog{display:flex;flex-direction:column;width:min(520px,100%);max-height:calc(100dvh - 48px);overflow:hidden;text-align:left;background:var(--panel);color:var(--text);border:1px solid var(--border);border-radius:var(--tf-radius);box-shadow:var(--shadow-lg);font:400 13px/1.45 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
.st-dialog.is-wide{width:min(720px,100%)}
.st-dialog-head{flex:none;display:flex;align-items:flex-start;gap:12px;padding:16px 16px 14px 20px;border-bottom:1px solid var(--border-soft)}
.st-dialog-titles{flex:1 1 auto;min-width:0}
.st-dialog-title{margin:0;font-size:16px;font-weight:650;letter-spacing:-.01em;line-height:1.35;color:var(--text)}
.st-dialog-desc{margin:4px 0 0;font-size:13px;line-height:1.5;color:var(--muted)}
.st-dialog-form{flex:1 1 auto;min-height:0;display:flex;flex-direction:column}
.st-dialog-body{flex:1 1 auto;min-height:0;overflow:auto;display:flex;flex-direction:column;gap:16px;padding:20px}
.st-dialog-foot{flex:none;display:flex;justify-content:flex-end;flex-wrap:wrap;gap:8px;padding:12px 20px;border-top:1px solid var(--border-soft);background:var(--panel-alt)}

/* ── Connections gallery (Settings → Connections) ──
   Search + category chips over grouped card grids. Cards are links that open
   the connector's panel: a right-docked side sheet (.st-dialog.is-sheet) on
   desktop, a pushed page on phones. */
.st-conn{display:flex;flex-direction:column;gap:16px;min-width:0}
.st-conn-summary{font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}
.st-conn-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;min-width:0}
.st-conn-toolbar .tf-search{flex:1 1 240px;max-width:none;min-width:0}
.st-conn-cats{display:flex;flex-wrap:wrap;gap:6px;min-width:0;margin-top:-4px}
.st-conn-cat{display:inline-flex;align-items:center;gap:6px;min-height:var(--tf-control-h-sm);padding:0 10px;border:1px solid var(--border);border-radius:var(--radius-pill);background:var(--panel);color:var(--muted);font:inherit;font-size:12px;font-weight:600;cursor:pointer;white-space:nowrap}
.st-conn-cat:hover{color:var(--text);border-color:color-mix(in srgb,var(--text) 22%,var(--border))}
.st-conn-cat[aria-pressed="true"]{background:var(--accent-soft);border-color:var(--accent);color:var(--accent)}
.st-conn-cat:focus-visible{outline:none;box-shadow:var(--tf-focus)}
.st-conn-cat-count{font-variant-numeric:tabular-nums;color:inherit;opacity:.8}
.st-conn-group{display:flex;flex-direction:column;gap:10px;min-width:0}
.st-conn-group-head{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 10px}
.st-conn-group-title{margin:0;font-size:13px;font-weight:650;color:var(--text)}
.st-conn-group-desc{font-size:12px;color:var(--muted)}
.st-conn-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(232px,1fr));gap:12px;min-width:0}
.st-w-xs .st-conn-grid{grid-template-columns:minmax(0,1fr);gap:8px}
.app-shell .st-conn-card,.st-conn-card{position:relative;display:flex;flex-direction:column;gap:10px;min-width:0;padding:14px;border:1px solid var(--border);border-radius:var(--tf-radius);background:var(--panel);color:var(--text);text-decoration:none;transition:border-color .15s,box-shadow .15s}
.app-shell .st-conn-card:hover{border-color:color-mix(in srgb,var(--text) 22%,var(--border));text-decoration:none}
.app-shell .st-conn-card:focus-visible{outline:none;box-shadow:var(--tf-focus)}
.st-conn-card.is-attention{border-color:color-mix(in srgb,var(--warning) 50%,var(--border))}
.st-conn-head{display:flex;align-items:center;gap:10px;min-width:0}
.st-conn-titles{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:4px}
.st-conn-name{margin:0;max-width:100%;font-size:13px;font-weight:650;line-height:1.3;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.st-conn-titles>.tf-badge{max-width:100%}
.st-conn-desc{margin:0;font-size:12px;line-height:1.45;color:var(--muted);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:2.9em}
.st-conn-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:auto;min-width:0}
.st-conn-activity{min-width:0;font-size:11.5px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.st-conn-card .btn{flex:none;pointer-events:none}
.st-conn-card:hover .btn.secondary{border-color:color-mix(in srgb,var(--text) 30%,var(--border))}
.st-conn-card:hover .btn.ghost{background:var(--panel-alt)}
.st-w-xs .st-conn-desc{-webkit-line-clamp:1;min-height:0}
/* Brand tile: a neutral token tile; the glyph is currentColor. The brand
   colour (--st-brand-c) applies only where data-tl / data-td says it clears
   3:1 on that theme family; purple and indigo marks never tint. */
.st-brand{--st-brand-c:currentColor;flex:none;display:grid;place-items:center;width:36px;height:36px;box-sizing:border-box;border:1px solid var(--border-soft);border-radius:var(--tf-radius-sm);background:var(--panel-alt);color:var(--text)}
.st-brand svg{display:block;width:20px;height:20px}
.st-brand.is-lg{width:48px;height:48px;border-radius:var(--tf-radius)}
.st-brand.is-lg svg{width:26px;height:26px}
.st-brand.is-sm{width:24px;height:24px;border-radius:var(--tf-radius-xs)}
.st-brand.is-sm svg{width:14px;height:14px}
.st-brand-mono{font-size:13px;font-weight:700;letter-spacing:-.02em;line-height:1;color:var(--muted)}
.st-brand.is-lg .st-brand-mono{font-size:17px}
.st-brand.is-sm .st-brand-mono{font-size:10px}
.st-brand[data-tl="1"]{color:var(--st-brand-c)}
body:is([data-theme="dark"],[data-theme="midnight"],[data-theme="graphite"],[data-theme="nord"],[data-theme="oled"],[data-theme="nightops"]) .st-brand[data-tl="1"]{color:var(--text)}
body:is([data-theme="dark"],[data-theme="midnight"],[data-theme="graphite"],[data-theme="nord"],[data-theme="oled"],[data-theme="nightops"]) .st-brand[data-td="1"]{color:var(--st-brand-c)}
/* Connector panel: side sheet on desktop */
.media-lightbox.st-dialog-backdrop.is-sheet{padding:0;place-items:stretch end}
.st-dialog.is-sheet{width:min(640px,100%);height:100dvh;max-height:none;border-width:0 0 0 1px;border-radius:0;animation:st-sheet-in .2s ease both}
.st-dialog.is-sheet:focus{outline:none}
.st-dialog.is-sheet .st-dialog-body{background:var(--bg)}
.st-dialog.is-sheet .st-dialog-head{align-items:center}
.st-dialog.is-sheet .st-dialog-title{display:flex;align-items:center;flex-wrap:wrap;gap:4px 10px}
.st-dialog-icon{flex:none}
@keyframes st-sheet-in{from{opacity:0;transform:translateX(24px)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){.st-dialog.is-sheet{animation:none}}
.st-conn-meta>dd .tf-badge{vertical-align:middle}
.st-conn-checks{display:flex;flex-direction:column;gap:8px;min-width:0}
.st-conn-check{display:flex;align-items:flex-start;gap:10px;min-width:0;font-size:13px;color:var(--text);cursor:pointer}
.st-conn-check.is-sub{padding-left:26px}
.st-conn-check input{flex:none;width:16px;height:16px;margin:2px 0 0;accent-color:var(--accent)}
.st-conn-check input:focus-visible{outline:none;box-shadow:var(--tf-focus)}
.st-conn-check-text{display:flex;flex-direction:column;gap:2px;min-width:0}
.st-conn-check-title{font-weight:600}
.st-conn-check-desc{font-size:12px;color:var(--muted)}
.st-conn-hero{display:flex;align-items:flex-start;gap:14px;min-width:0}
.st-conn-hero-main{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:4px}
.st-conn-hero-title{margin:0;display:flex;align-items:center;flex-wrap:wrap;gap:6px 10px;font-size:20px;font-weight:650;letter-spacing:-.02em;color:var(--text)}
.st-steps{list-style:none;margin:0;padding:0;counter-reset:st-step;display:flex;flex-direction:column;gap:18px}
.st-step{position:relative;padding-left:34px;min-width:0;counter-increment:st-step}
.st-step::before{content:counter(st-step);position:absolute;left:0;top:-1px;width:22px;height:22px;display:grid;place-items:center;border-radius:50%;background:var(--accent-soft);color:var(--accent);font-size:12px;font-weight:700}
.st-step.is-done::before{content:"";background:var(--success-soft);box-shadow:inset 0 0 0 1px var(--success)}
.st-step-title{font-size:13px;font-weight:650;line-height:1.5;color:var(--text)}
.st-step-body{margin-top:6px;display:flex;flex-direction:column;gap:10px;min-width:0;font-size:12.5px;line-height:1.5;color:var(--muted)}
.st-step-body>.st-help{margin:0}
.st-step-body .tf-panel{border-color:var(--border-soft)}
.st-snippet-tabs{display:flex;flex-wrap:wrap;gap:6px}
/* YAML and shell must keep their line structure: scroll, never wrap. */
.st-code.st-conn-snippet{white-space:pre;overflow-wrap:normal;max-width:100%}
.st-conn-page{display:flex;flex-direction:column;gap:16px;min-width:0}
@media(max-width:900px){
 .st-conn-cats{flex-wrap:nowrap;overflow-x:auto;margin:-4px -14px 0;padding:0 14px 2px;scrollbar-width:none}
 .st-conn-cats::-webkit-scrollbar{display:none}
 .st-conn-cat{flex:none;min-height:36px}
 .st-conn-toolbar .tf-m-search{flex:1 1 auto;min-width:0;margin:0}
 .st-conn .st-m-group{margin-bottom:0}
 .st-conn-mrow .tf-m-row-meta{flex-wrap:nowrap}
 .st-conn-mrow .tf-m-row-meta .tf-badge{flex:none}
 .st-conn-mrow .st-conn-activity{flex:1 1 auto;min-width:0;font-size:12.5px}
 .st-conn-page .st-conn-hero{margin:0 0 4px}
 .st-conn-page .st-conn-hero-title{font-size:22px}
 .st-conn-page .tf-panel{margin-left:-14px;margin-right:-14px;border-left:0;border-right:0;border-radius:0}
 .st-conn-page .st-step-body .tf-panel{margin-left:0;margin-right:0;border:1px solid var(--border-soft);border-radius:var(--tf-radius)}
 .st-conn-page :is(.input,.select,.textarea){font-size:16px;min-height:44px}
 .st-conn-page .btn{min-height:44px}
 .st-conn-page pre{max-width:100%;overflow-x:auto}
}

/* ── Phones and the compact frame ── */
@media(max-width:900px){
 .st-wb{background:transparent}
 .st-wb .st-nav{display:none}
 .st-wb .st-picker{display:flex}
 .st-main{background:transparent}
 .st-page,.st-w-sm .st-page,.st-w-xs .st-page{padding:0 0 8px;gap:16px}
 .st-page-title{font-size:18px}
 .st-panel-head,.st-panel-body,.st-panel-foot{padding-left:16px;padding-right:16px}
 .st-panel-body.is-flush{padding:0}
 .st-table :is(th,td):first-child{padding-left:16px}
 .st-table-toolbar{padding:12px 16px}
 .st-endpoint{padding-left:16px}
}
@media(max-width:640px){
 .media-lightbox.st-dialog-backdrop{padding:0;place-items:stretch}
 .st-dialog,.st-dialog.is-wide{width:100%;max-height:none;height:100dvh;border:0;border-radius:0}
 .st-dialog :is(.input,.select,.textarea){font-size:16px}
 .st-dialog-foot{padding-bottom:calc(12px + env(safe-area-inset-bottom,0px))}
 .st-dialog-foot .btn{flex:1 1 0}
 .st-foot-actions{width:100%}
 .st-foot-actions .btn{flex:1 1 auto}
 .st-inline-form>.btn{margin-top:0;width:100%}
 .st-copyfield .btn{padding:0 10px}
}

/* Phones: grouped list → section page */
@media(max-width:900px){
 .st-m-group{margin-bottom:16px}
 .st-m-group .tf-m-section{position:static;margin:0 -14px;background:transparent;border-bottom:0;padding:8px 16px 6px}
 .st-m-row{min-height:64px}
 .st-m-ico{width:36px;height:36px;border-radius:10px;background:var(--accent-soft);color:var(--accent)}
 .st-m-desc{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}
 .st-m-row .tf-m-row-trail .tf-badge{max-width:96px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .st-m-head{margin:0 0 16px}
 .st-m-head .st-page-title{font-size:24px;margin:2px 0 4px}
 .st-m-headaction{margin-top:12px;width:100%;min-height:44px}
 .st-m-page .st-stack{gap:14px}
 .st-m-page .tf-panel{margin-left:-14px;margin-right:-14px;border-left:0;border-right:0;border-radius:0}
 .st-m-page :is(.input,.select,.textarea){font-size:16px;min-height:44px}
 .st-m-page .btn{min-height:44px}
 .st-m-page :is(pre,code){font-size:12px}
 .st-m-page :is(.st-table-wrap,pre){max-width:100%;overflow-x:auto}
 /* Members: rows, not a table */
 .st-m-page .st-table-wrap:has(.st-members){overflow:visible}
 .st-m-page .st-members{display:block;min-width:0;width:100%}
 .st-m-page .st-members thead{display:none}
 .st-m-page .st-members tbody{display:block}
 .st-m-page .st-members tr{display:grid;grid-template-columns:auto auto minmax(0,1fr) auto;grid-template-areas:"m m m act" "r s . act";gap:8px 8px;align-items:center;padding:12px 16px;border-bottom:1px solid var(--border-soft)}
 .st-m-page .st-members td{display:block;padding:0;border:0;min-width:0}
 .st-m-page .st-members td:first-child{grid-area:m}
 .st-m-page .st-members td.st-col-role{grid-area:r;padding-left:44px}
 .st-m-page .st-members td.st-col-status{grid-area:s}
 .st-m-page .st-members td.st-col-seen{display:none}
 .st-m-page .st-members td.st-col-act{grid-area:act}
 .st-m-page .st-members .st-strong{font-size:15px}
 .st-m-page .st-table-toolbar{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:12px 16px}
 .st-m-page .st-table-toolbar .tf-search{grid-column:1/-1}
 .st-m-page .st-table-toolbar .st-toolbar-count{grid-column:1/-1}
}

/* @endregion settings */

/* @region feature-host — chrome the extension host draws around feature
   slot items (docs/extension-system.md). Feature styles live in
   features/<name>.css, one region each. */
.tf-ext-error{display:flex;align-items:center;gap:8px;padding:10px 12px;border:1px dashed var(--border);border-radius:var(--tf-radius-sm);color:var(--muted);font-size:13px;background:var(--panel)}
.tf-ext-error .tf-icon{flex:none;color:var(--warning)}
.tf-ext-btn{white-space:nowrap}
@media (max-width:1100px){.tf-ext-btn-label{display:none}}
.tf-ext-layers{position:relative;z-index:1}
.dash-ext{min-width:0}
.dash-ext-body{min-width:0}
@container dash (min-width:900px){
 .dash-grid>.dash-span-6{grid-column:span 6}
 .dash-grid>.dash-span-12{grid-column:1/-1}
}
.qa-nav-count{margin-left:auto;min-width:18px;height:18px;padding:0 6px;border-radius:var(--radius-pill);background:var(--accent-soft);color:var(--accent);font-size:11px;font-weight:700;line-height:18px;text-align:center}
.qa-nav-count+.qa-active-dot{margin-left:6px}
.tcl-col-ext{flex:none;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--muted)}
.tcl-col-ext.is-xs{width:72px}
.tcl-col-ext.is-sm{width:108px}
.tcl-col-ext.is-md{width:160px}
@container tcl-list (max-width: 560px){.tcl-case .tcl-col-ext{display:none}}
.tcl-m-ext{color:var(--muted)}
.tce-ext{display:grid;gap:12px}
.rx-fact-ext{min-width:0}
.pm-ext,.rp-ext{min-width:0}
.bb-ext-panel{margin:0 0 12px}
.bb-ext-tab{min-width:0}
.runs-choice-ext .runs-linkbtn{margin-top:4px;align-self:flex-start}
/* @endregion feature-host */

/* Keyboard shortcuts help (? anywhere) */
.tf-keys-help { display: grid; gap: 16px; }
.tf-keys-group { display: grid; gap: 6px; }
.tf-keys-title { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); }
.tf-keys-list { margin: 0; display: grid; gap: 4px; }
.tf-keys-row { display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: center; }
.tf-keys-row dt { display: flex; gap: 4px; flex-wrap: wrap; }
.tf-keys-row dd { margin: 0; color: var(--text); }
.tf-keys-row kbd { min-width: 22px; padding: 1px 6px; border: 1px solid var(--border); border-radius: 4px; background: var(--panel); color: var(--text); font: 12px/18px ui-monospace, SFMono-Regular, Menlo, monospace; text-align: center; }
@media (max-width: 900px) { .tf-keys-row { grid-template-columns: 1fr; gap: 2px; } }

/* ═══════════════════════════════════════════════════════════════
   PUBLIC PAGES — landing (.tfp-landing) and sign-in / sign-up (.tfp-auth).
   Everything is scoped under .tfp, with its own palette, so the signed-in
   workspace and its themes are unaffected. Light by default; follows a dark
   device preference.
═══════════════════════════════════════════════════════════════ */
.tfp {
  --tfp-bg: #f5faf7; --tfp-tint: #e8f3ee; --tfp-tint-2: #d8ebe3; --tfp-surface: #ffffff;
  --tfp-ink: #0c2627; --tfp-ink-2: #2c4644; --tfp-muted: #557069; --tfp-line: #d5e5de; --tfp-line-soft: #e6f0eb;
  --tfp-brand: #0b6b66; --tfp-brand-strong: #075450; --tfp-brand-soft: #dcefe8; --tfp-on-brand: #ffffff;
  --tfp-emerald: #107451; --tfp-deep: #0a3634; --tfp-focus: #0f7f78;
  --tfp-pass: #137536; --tfp-pass-bg: #e3f4e8; --tfp-fail: #b42318; --tfp-fail-bg: #fbe9e7;
  --tfp-block: #a15c07; --tfp-block-bg: #fdf1dc; --tfp-none: #5b6b74; --tfp-none-bg: #edf1f2;
  --tfp-shadow: 0 1px 2px rgba(12,38,39,.05), 0 12px 32px -12px rgba(12,38,39,.18);
  --tfp-radius: 16px;
  color-scheme: light;
  min-height: 100vh; min-height: 100dvh;
  background: var(--tfp-bg); color: var(--tfp-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: clip;
}
@media (prefers-color-scheme: dark) {
  .tfp {
    --tfp-bg: #0a1918; --tfp-tint: #0f2423; --tfp-tint-2: #15302e; --tfp-surface: #102322;
    --tfp-ink: #e7f3ef; --tfp-ink-2: #c4d9d3; --tfp-muted: #9bb7b0; --tfp-line: #234240; --tfp-line-soft: #1a3533;
    --tfp-brand: #34c39c; --tfp-brand-strong: #5ad4b1; --tfp-brand-soft: #143a35; --tfp-on-brand: #04201c;
    --tfp-emerald: #4fd1a5; --tfp-deep: #0d2c2a; --tfp-focus: #6fe0c0;
    --tfp-pass: #5fd08a; --tfp-pass-bg: #123222; --tfp-fail: #ff8f80; --tfp-fail-bg: #3a1714;
    --tfp-block: #f2b55a; --tfp-block-bg: #352610; --tfp-none: #a6b6bd; --tfp-none-bg: #1b2c2f;
    --tfp-shadow: 0 1px 2px rgba(0,0,0,.3), 0 16px 40px -16px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
.tfp *, .tfp *::before, .tfp *::after { box-sizing: border-box; }
.tfp :where(h1,h2,h3,p,ul,ol,figure) { margin: 0; }
.tfp :where(ul,ol) { padding: 0; list-style: none; }
.tfp a { color: var(--tfp-brand); }
.tfp :is(a,button,input,summary,[tabindex]):focus-visible { outline: 3px solid var(--tfp-focus); outline-offset: 2px; border-radius: 8px; }
.tfp .tf-icon { flex: none; }
.tfp-wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }
@media (min-width: 720px) { .tfp-wrap { padding: 0 32px; } }

/* Brand */
.tfp-brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--tfp-ink) !important; text-decoration: none; font-weight: 750; font-size: 1.12rem; letter-spacing: -.015em; }
.tfp-mark { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; flex: none;
  background: linear-gradient(145deg, #0e7d75 0%, #0a5a56 100%); color: #fff; font-size: .82rem; font-weight: 800; letter-spacing: .02em;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14), 0 2px 6px -2px rgba(8,84,80,.5); }
.tfp-mark-sm { width: 30px; height: 30px; border-radius: 8px; font-size: .72rem; }

/* Type */
.tfp-eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--tfp-emerald); margin-bottom: 12px; }
.tfp-h1 { font-size: clamp(2.35rem, 8.4vw, 4.1rem); line-height: 1.04; font-weight: 780; letter-spacing: -.035em; color: var(--tfp-ink); text-wrap: balance; }
.tfp-h1 span { color: var(--tfp-brand); }
.tfp-h2 { font-size: clamp(1.6rem, 4.6vw, 2.35rem); line-height: 1.12; font-weight: 760; letter-spacing: -.028em; color: var(--tfp-ink); text-wrap: balance; }
.tfp-lede { font-size: clamp(1.03rem, 2.6vw, 1.18rem); line-height: 1.6; color: var(--tfp-ink-2); max-width: 36em; margin-top: 20px; }
.tfp-body { color: var(--tfp-muted); font-size: 1rem; line-height: 1.65; margin-top: 14px; }
.tfp-fineprint { margin-top: 14px; font-size: .88rem; color: var(--tfp-muted); }

/* Buttons */
.tfp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 10px 18px;
  border-radius: 11px; border: 1px solid transparent; font: inherit; font-size: .95rem; font-weight: 650; line-height: 1.2; cursor: pointer;
  text-decoration: none; white-space: nowrap; transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s; }
.tfp-btn-lg { min-height: 52px; padding: 13px 24px; font-size: 1rem; border-radius: 12px; }
.tfp-btn-sm { padding: 9px 15px; }
.tfp-btn-primary { background: var(--tfp-brand); color: var(--tfp-on-brand); box-shadow: 0 1px 0 rgba(255,255,255,.12) inset, 0 6px 16px -8px rgba(8,84,80,.7); }
.tfp-btn-primary:hover { background: var(--tfp-brand-strong); }
.tfp-btn-outline { background: var(--tfp-surface); color: var(--tfp-ink); border-color: var(--tfp-line); }
.tfp-btn-outline:hover { border-color: var(--tfp-brand); color: var(--tfp-brand); }
.tfp-btn-quiet { background: transparent; color: var(--tfp-ink); }
.tfp-btn-quiet:hover { background: var(--tfp-tint); }
.tfp-btn-light { background: #fff; color: #08403d; }
.tfp-btn-light:hover { background: #e8f6f0; }
.tfp-btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.tfp-btn-ghost-light:hover { background: rgba(255,255,255,.1); }
.tfp-btn:disabled { opacity: .55; cursor: not-allowed; }
.tfp-cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.tfp-link { color: var(--tfp-brand) !important; font-weight: 650; min-height: 44px; padding: 10px 4px !important; }
.tfp-skip { position: absolute; left: 12px; top: 12px; z-index: 50; padding: 10px 14px; background: var(--tfp-surface); border-radius: 8px; transform: translateY(-160%); opacity: 0; }
.tfp-skip:focus { transform: none; opacity: 1; box-shadow: var(--tfp-shadow); }

/* Product preview (sample data) */
.tfp-preview { background: var(--tfp-surface); border: 1px solid var(--tfp-line); border-radius: 18px; box-shadow: var(--tfp-shadow); padding: 18px; font-size: .9rem; }
.tfp-pv-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.tfp-pv-kicker { font-size: .76rem; color: var(--tfp-muted); font-weight: 600; }
.tfp-pv-title { font-weight: 720; font-size: 1.05rem; letter-spacing: -.01em; color: var(--tfp-ink); }
.tfp-pv-sample { flex: none; font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--tfp-muted); border: 1px dashed var(--tfp-line); border-radius: 999px; padding: 3px 9px; }
.tfp-pv-bar { display: flex; gap: 3px; height: 10px; margin: 16px 0 10px; border-radius: 999px; overflow: hidden; }
.tfp-pv-seg { display: block; flex-basis: 0; }
.tfp-pv-seg.tfp-s-passed { background: var(--tfp-pass); } .tfp-pv-seg.tfp-s-failed { background: var(--tfp-fail); }
.tfp-pv-seg.tfp-s-blocked { background: var(--tfp-block); } .tfp-pv-seg.tfp-s-untested { background: var(--tfp-tint-2); }
.tfp-pv-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--tfp-muted); font-size: .8rem; }
.tfp-pv-legend li { display: inline-flex; align-items: center; gap: 6px; }
.tfp-pv-legend b { color: var(--tfp-ink); font-variant-numeric: tabular-nums; }
.tfp-dot { width: 8px; height: 8px; border-radius: 3px; display: inline-block; }
.tfp-dot.tfp-s-passed { background: var(--tfp-pass); } .tfp-dot.tfp-s-failed { background: var(--tfp-fail); }
.tfp-dot.tfp-s-blocked { background: var(--tfp-block); } .tfp-dot.tfp-s-untested { background: var(--tfp-tint-2); box-shadow: inset 0 0 0 1px var(--tfp-line); }
.tfp-pv-rows { margin-top: 14px; border-top: 1px solid var(--tfp-line-soft); }
.tfp-pv-row { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--tfp-line-soft); }
.tfp-pv-id { font: 600 .74rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--tfp-muted); background: var(--tfp-tint); padding: 4px 6px; border-radius: 6px; }
.tfp-pv-case { color: var(--tfp-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tfp-pill { display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; font-weight: 700; padding: 3px 8px 3px 6px; border-radius: 999px; }
.tfp-pill.tfp-s-passed { color: var(--tfp-pass); background: var(--tfp-pass-bg); } .tfp-pill.tfp-s-failed { color: var(--tfp-fail); background: var(--tfp-fail-bg); }
.tfp-pill.tfp-s-blocked { color: var(--tfp-block); background: var(--tfp-block-bg); } .tfp-pill.tfp-s-untested { color: var(--tfp-none); background: var(--tfp-none-bg); }
.tfp-pv-foot { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; padding: 12px; border-radius: 12px; background: var(--tfp-tint); color: var(--tfp-ink-2); font-size: .84rem; line-height: 1.45; }
.tfp-pv-foot b { color: var(--tfp-ink); }
.tfp-pv-foot-icon { color: var(--tfp-emerald); margin-top: 1px; }
.tfp-preview-compact { padding: 14px; font-size: .84rem; }
.tfp-preview-compact .tfp-pv-bar { margin-top: 12px; }

/* ── Landing ── */
.tfp-nav { position: relative; z-index: 5; border-bottom: 1px solid var(--tfp-line-soft); background: color-mix(in srgb, var(--tfp-bg) 92%, transparent); }
.tfp-nav-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; min-height: 64px; padding-top: 8px; padding-bottom: 8px; }
.tfp-nav-links { display: flex; gap: 2px; order: 3; width: 100%; margin: 0 -10px; }
.tfp-nav-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; color: var(--tfp-ink-2); text-decoration: none; font-size: .93rem; font-weight: 560; border-radius: 8px; }
.tfp-nav-links a:hover { color: var(--tfp-brand); background: var(--tfp-tint); }
.tfp-nav-actions { display: flex; align-items: center; gap: 4px; }
@media (max-width: 479px) {
  .tfp-nav .tfp-brand { font-size: 1.02rem; gap: 8px; }
  .tfp-nav .tfp-mark { width: 32px; height: 32px; border-radius: 9px; font-size: .75rem; }
  .tfp-nav-actions .tfp-btn-primary { display: none; }
  .tfp-nav-actions .tfp-btn { padding: 8px 11px; font-size: .9rem; }
}
@media (min-width: 760px) {
  .tfp-nav { position: sticky; top: 0; backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); }
  .tfp-nav-links { order: 0; width: auto; margin: 0 auto 0 28px; gap: 4px; }
  .tfp-nav-actions { gap: 8px; }
}
.tfp-landing main { outline: none; }
.tfp-hero { padding: 40px 0 56px; background:
  radial-gradient(120% 70% at 85% 0%, color-mix(in srgb, var(--tfp-brand-soft) 90%, transparent) 0%, transparent 60%),
  linear-gradient(180deg, var(--tfp-bg) 0%, var(--tfp-tint) 100%); border-bottom: 1px solid var(--tfp-line-soft); }
.tfp-hero-grid { display: grid; gap: 40px; align-items: center; }
.tfp-hero-copy { max-width: 620px; }
.tfp-hero-visual { position: relative; max-width: 560px; width: 100%; }
@media (max-width: 479px) { .tfp-cta-row .tfp-btn-lg { flex: 1 1 100%; } }
@media (min-width: 960px) {
  .tfp-hero { padding: 88px 0 96px; }
  .tfp-hero-grid { grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 56px; }
  .tfp-hero-visual { justify-self: end; }
  .tfp-hero-visual::before { content: ''; position: absolute; inset: 22px -18px -18px 22px; border-radius: 22px; background: var(--tfp-tint-2); opacity: .7; z-index: -1; }
  .tfp-hero-visual .tfp-preview { position: relative; }
}
.tfp-section { padding: 64px 0; outline: none; }
@media (min-width: 760px) { .tfp-section { scroll-margin-top: 72px; } }
.tfp-section-tint { background: var(--tfp-tint); border-top: 1px solid var(--tfp-line-soft); border-bottom: 1px solid var(--tfp-line-soft); }
@media (min-width: 960px) { .tfp-section { padding: 96px 0; } }
.tfp-caps { display: grid; gap: 14px; margin-top: 32px; }
.tfp-cap { background: var(--tfp-surface); border: 1px solid var(--tfp-line); border-radius: var(--tfp-radius); padding: 22px; }
.tfp-cap h3 { font-size: 1.12rem; font-weight: 720; letter-spacing: -.012em; margin: 14px 0 6px; color: var(--tfp-ink); }
.tfp-cap p { color: var(--tfp-muted); font-size: .95rem; line-height: 1.6; }
.tfp-cap-icon { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--tfp-brand-soft); color: var(--tfp-brand); }
@media (min-width: 820px) { .tfp-caps { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px; margin-top: 44px; } .tfp-cap { padding: 28px; } }
.tfp-flow { display: grid; gap: 32px; }
@media (min-width: 900px) { .tfp-flow { grid-template-columns: minmax(0,.85fr) minmax(0,1.15fr); gap: 64px; align-items: start; } .tfp-flow-intro { position: sticky; top: 104px; } }
.tfp-steps { display: grid; gap: 0; counter-reset: none; }
.tfp-step { display: grid; grid-template-columns: 52px minmax(0,1fr); gap: 4px; padding: 20px 0; border-top: 1px solid var(--tfp-line); }
.tfp-step:last-child { border-bottom: 1px solid var(--tfp-line); }
.tfp-step-n { font: 700 .95rem/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--tfp-emerald); }
.tfp-step h3 { font-size: 1.08rem; font-weight: 720; letter-spacing: -.01em; color: var(--tfp-ink); }
.tfp-step p { color: var(--tfp-muted); font-size: .95rem; margin-top: 4px; }
.tfp-faq-wrap > * { max-width: 800px; }
.tfp-faq { margin-top: 28px; border-top: 1px solid var(--tfp-line); }
.tfp-faq-item { border-bottom: 1px solid var(--tfp-line); }
.tfp-faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; padding: 14px 0; cursor: pointer; list-style: none; font-weight: 650; font-size: 1.02rem; color: var(--tfp-ink); }
.tfp-faq-item summary::-webkit-details-marker { display: none; }
.tfp-faq-item summary::after { content: '+'; flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--tfp-tint); color: var(--tfp-brand); font-size: 1.15rem; font-weight: 600; }
.tfp-faq-item[open] summary::after { content: '\2212'; }
.tfp-faq-item p { color: var(--tfp-muted); padding: 0 40px 20px 0; line-height: 1.65; }
.tfp-closing { background: linear-gradient(135deg, #0a3a37 0%, #0b5550 100%); color: #e6f4ef; padding: 56px 0; }
.tfp-closing .tfp-h2 { color: #fff; }
.tfp-closing .tfp-body { color: #bfded5; }
.tfp-closing-inner { display: grid; gap: 8px; align-items: center; }
@media (min-width: 900px) { .tfp-closing { padding: 72px 0; } .tfp-closing-inner { grid-template-columns: minmax(0,1fr) auto; gap: 40px; } .tfp-closing .tfp-cta-row { margin-top: 0; } }
.tfp-footer { padding: 36px 0 calc(36px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--tfp-line-soft); }
.tfp-footer-inner { display: grid; gap: 18px; }
.tfp-footer-brand p { color: var(--tfp-muted); font-size: .9rem; margin-top: 4px; }
.tfp-footer-links { display: flex; flex-wrap: wrap; gap: 0 6px; margin-left: -10px; }
.tfp-footer-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; color: var(--tfp-ink-2); text-decoration: none; font-size: .92rem; }
.tfp-footer-links a:hover { color: var(--tfp-brand); }
.tfp-footer-copy { color: var(--tfp-muted); font-size: .85rem; }
@media (min-width: 820px) { .tfp-footer-inner { grid-template-columns: 1fr auto auto; align-items: center; gap: 32px; } .tfp-footer-links { margin-left: 0; } }

/* ── Sign in / sign up ── */
.tfp-auth { display: flex; flex-direction: column; }
.tfp-auth-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 20px; background: var(--tfp-tint); }
.tfp-auth-bar-switch { display: flex; align-items: center; gap: 6px; color: var(--tfp-muted); font-size: .92rem; }
.tfp-auth-layout { flex: 1; display: flex; flex-direction: column; }
.tfp-auth-story { padding: 6px 20px 52px; background: linear-gradient(180deg, var(--tfp-tint) 0%, color-mix(in srgb, var(--tfp-tint) 55%, var(--tfp-bg)) 100%); border-bottom: 1px solid var(--tfp-line-soft); }
.tfp-auth-story .tfp-eyebrow { margin-bottom: 6px; font-size: .72rem; }
.tfp-auth-headline { font-size: 1.5rem; line-height: 1.15; font-weight: 770; letter-spacing: -.028em; color: var(--tfp-ink); text-wrap: balance; }
.tfp-auth-lede { color: var(--tfp-ink-2); font-size: .95rem; line-height: 1.5; margin-top: 8px; max-width: 34em; }
.tfp-auth-points { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tfp-auth-points li { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px 4px 4px; border-radius: 999px; background: var(--tfp-surface); border: 1px solid var(--tfp-line); color: var(--tfp-ink-2); font-size: .77rem; font-weight: 600; }
.tfp-auth-point-icon { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: var(--tfp-brand-soft); color: var(--tfp-brand); }
.tfp-auth-point-icon .tf-icon { width: 13px; height: 13px; }
.tfp-auth-preview { display: none; }
.tfp-auth-main { padding: 0 16px 28px; margin-top: -36px; }
.tfp-form { width: 100%; max-width: 460px; margin: 0 auto; background: var(--tfp-surface); border: 1px solid var(--tfp-line); border-radius: 18px; box-shadow: var(--tfp-shadow); padding: 24px 20px; display: flex; flex-direction: column; gap: 18px; }
.tfp-form-head h1 { font-size: 1.5rem; line-height: 1.2; font-weight: 760; letter-spacing: -.022em; color: var(--tfp-ink); }
.tfp-form-head p { color: var(--tfp-muted); font-size: .94rem; margin-top: 4px; }
.tfp-form-head .auth-logo-image { margin: 0 0 10px; width: 48px; height: 48px; }
.tfp-invite { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 12px; background: var(--tfp-brand-soft); border: 1px solid var(--tfp-line); }
.tfp-invite-label { font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--tfp-brand); }
.tfp-invite strong { color: var(--tfp-ink); }
.tfp-fields { display: grid; gap: 14px; }
.tfp-fields-pw { padding-top: 18px; border-top: 1px solid var(--tfp-line-soft); }
.tfp-field { display: grid; gap: 6px; min-width: 0; }
.tfp-label { font-size: .88rem; font-weight: 650; color: var(--tfp-ink-2); }
.tfp-optional { font-weight: 500; color: var(--tfp-muted); font-size: .8rem; margin-left: 4px; padding: 1px 7px; border-radius: 999px; background: var(--tfp-tint); }
.tfp .tfp-input { width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 11px; border: 1px solid var(--tfp-line); background: var(--tfp-surface); color: var(--tfp-ink);
  font: inherit; font-size: 16px; line-height: 1.4; box-shadow: inset 0 1px 2px rgba(12,38,39,.04); transition: border-color .15s, box-shadow .15s; }
.tfp .tfp-input::placeholder { color: color-mix(in srgb, var(--tfp-muted) 75%, transparent); opacity: 1; }
.tfp .tfp-input:hover { border-color: color-mix(in srgb, var(--tfp-brand) 35%, var(--tfp-line)); }
.tfp .tfp-input:focus { outline: none; border-color: var(--tfp-brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--tfp-brand) 22%, transparent); }
.tfp .tfp-input:focus-visible { outline: none; }
.tfp .tfp-input[aria-invalid="true"] { border-color: var(--tfp-fail); }
.tfp .tfp-input[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px color-mix(in srgb, var(--tfp-fail) 20%, transparent); }
.tfp .tfp-input:-webkit-autofill { -webkit-text-fill-color: var(--tfp-ink); -webkit-box-shadow: 0 0 0 40px var(--tfp-brand-soft) inset; caret-color: var(--tfp-ink); }
.tfp .pw-field { position: relative; display: block; }
.tfp .pw-field .tfp-input { padding-right: 52px; }
.tfp .tfp-reveal { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 9px; border: 0; background: transparent; color: var(--tfp-muted); display: grid; place-items: center; cursor: pointer; }
.tfp .tfp-reveal:hover { color: var(--tfp-brand); background: var(--tfp-tint); }
.tfp-hint { font-size: .82rem; color: var(--tfp-muted); line-height: 1.4; }
.tfp-hint-error { color: var(--tfp-fail); font-weight: 600; }
.tfp-remember { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; margin: -6px 0 -6px; color: var(--tfp-ink-2); font-size: .93rem; cursor: pointer; }
.tfp-remember input { width: 20px; height: 20px; margin: 0; accent-color: var(--tfp-brand); }
.tfp-notice { padding: 12px 14px; border-radius: 12px; background: var(--tfp-tint); border: 1px solid var(--tfp-line); color: var(--tfp-ink-2); font-size: .9rem; }
.tfp-notice-actions { display: flex; }
.tfp-form .auth-submit { width: 100%; margin-top: 2px; }
.tfp-switch { text-align: center; color: var(--tfp-muted); font-size: .93rem; margin-top: -6px; }
.tfp-auth-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 18px; padding: 8px 20px calc(18px + env(safe-area-inset-bottom, 0px)); color: var(--tfp-muted); font-size: .84rem; }
.tfp-auth-foot a { display: inline-flex; align-items: center; min-height: 44px; color: var(--tfp-muted); text-decoration: none; }
.tfp-auth-foot a:hover { color: var(--tfp-brand); }
.tfp-auth-foot span { display: inline-flex; align-items: center; min-height: 44px; }
@media (max-width: 479px) { .tfp-hide-sm { display: none; } .tfp-pv-case { white-space: normal; line-height: 1.35; } }
@media (max-width: 559px) {
  .tfp-auth-points { display: none; }
  .tfp-auth-story { padding-bottom: 52px; }
}
@media (min-width: 560px) {
  .tfp-auth-bar { padding: 12px 32px; }
  .tfp-auth-story { padding: 18px 32px 64px; text-align: center; }
  .tfp-auth-lede { margin-left: auto; margin-right: auto; }
  .tfp-auth-points { justify-content: center; }
  .tfp-auth-headline { font-size: 1.8rem; }
  .tfp-form { padding: 32px; }
}
@media (min-width: 960px) {
  .tfp-auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(480px, 44%); grid-template-rows: auto 1fr auto; min-height: 100vh; }
  /* The bar overlays both columns: brand over the story, switch over the form. */
  .tfp-auth-bar { grid-column: 1 / -1; grid-row: 1; padding: 16px 48px; background: transparent; position: relative; z-index: 1; }
  .tfp-auth-layout { display: contents; }
  .tfp-auth-story { grid-column: 1; grid-row: 1 / 4; padding: 120px clamp(40px, 5vw, 80px) 64px; text-align: left; border-bottom: 0; border-right: 1px solid var(--tfp-line-soft);
    display: flex; flex-direction: column; justify-content: center;
    background: radial-gradient(90% 60% at 0% 0%, var(--tfp-brand-soft) 0%, transparent 70%), var(--tfp-tint); }
  .tfp-auth-story > * { max-width: 540px; }
  .tfp-auth-story .tfp-eyebrow { font-size: .78rem; margin-bottom: 12px; }
  .tfp-auth-headline { font-size: clamp(2.2rem, 3.4vw, 3rem); line-height: 1.06; }
  .tfp-auth-lede { margin: 16px 0 0; font-size: 1.08rem; line-height: 1.6; }
  .tfp-auth-points { justify-content: flex-start; flex-direction: column; gap: 10px; margin-top: 24px; }
  .tfp-auth-points li { background: transparent; border: 0; padding: 0; font-size: .95rem; gap: 10px; }
  .tfp-auth-point-icon { width: 28px; height: 28px; border-radius: 8px; }
  .tfp-auth-point-icon .tf-icon { width: 15px; height: 15px; }
  .tfp-auth-preview { display: block; margin-top: 36px; }
  .tfp-auth-main { grid-column: 2; grid-row: 2; margin: 0; padding: 48px clamp(32px, 4vw, 64px); display: flex; align-items: center; justify-content: center; }
  .tfp-form { box-shadow: none; border: 0; padding: 0; background: transparent; max-width: 420px; }
  .tfp-form-head h1 { font-size: 1.85rem; }
  .tfp-auth-foot { grid-column: 2; grid-row: 3; }
}
@media (prefers-reduced-motion: reduce) {
  .tfp *, .tfp *::before, .tfp *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .tfp-pv-seg, .tfp-dot { forced-color-adjust: none; }
  .tfp-btn { border: 1px solid ButtonText; }
}

/* Small account screens (verify email, change password) share the public palette. */
body:not([data-theme="dark"]) .auth-shell { background: linear-gradient(180deg, #e8f3ee 0%, #f5faf7 60%); }
.auth-shell .auth-card { border-radius: 18px; box-shadow: 0 1px 2px rgba(12,38,39,.05), 0 12px 32px -12px rgba(12,38,39,.18); }
.auth-shell .brand-badge { background: linear-gradient(145deg, #0e7d75 0%, #0a5a56 100%); color: #fff; }
.auth-shell .input { min-height: 48px; font-size: 16px; border-radius: 11px; }
.auth-shell .btn.primary { min-height: 48px; border-radius: 11px; }

/* Public product story: editorial sections with compact illustrative records. */
.tfp-story-section { border-top: 1px solid var(--tfp-line-soft); }
.tfp-story-section:nth-child(even) { background: var(--tfp-tint); }
.tfp-story-grid { display: grid; gap: 28px; align-items: center; }
.tfp-story-copy .tfp-body { margin-top: 18px; }
.tfp-story-list { display: grid; gap: 12px; margin-top: 24px; color: var(--tfp-ink-2); }
.tfp-story-list li { display: flex; align-items: flex-start; gap: 10px; line-height: 1.5; }
.tfp-story-list .tf-icon { flex-shrink: 0; margin-top: 3px; color: var(--tfp-brand); }
.tfp-story-preview { margin: 0; min-width: 0; background: var(--tfp-surface); border: 1px solid var(--tfp-line); border-radius: 18px; overflow: hidden; box-shadow: var(--tfp-shadow); }
.tfp-story-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px; border-bottom: 1px solid var(--tfp-line); color: var(--tfp-ink); }
.tfp-story-preview-head > strong { font-size: 1.05rem; }
.tfp-story-preview-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 14px; padding: 17px 20px; border-bottom: 1px solid var(--tfp-line-soft); font-size: .9rem; line-height: 1.45; }
.tfp-story-preview-row > span { color: var(--tfp-muted); }
.tfp-story-preview-row > strong { color: var(--tfp-ink); font-weight: 600; overflow-wrap: anywhere; }
.tfp-story-preview figcaption { padding: 16px 20px; color: var(--tfp-muted); font-size: .8rem; line-height: 1.6; background: var(--tfp-tint); }
@media (min-width: 820px) {
  .tfp-story-grid { grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 72px; }
  .tfp-story-section:nth-child(even) .tfp-story-copy { order: 2; }
}

/* Account appearance preferences: palettes and independent library layouts. */
body[data-theme="warm"]{--bg:#f3eee5;--bg-top:#faf7f0;--panel:#fffdf8;--panel-alt:#f5efe4;--panel-soft:#eee5d5;--text:#302b23;--muted:#706252;--subtle:#796c5d;--border:#ddd2bf;--border-soft:#eae1d2;--accent:#865022;--accent-hover:#693b17;--accent-soft:#f3e5d4;--sidebar-bg:#302b23;--sidebar-top:#3e3529;--table-row-hover:#f5ebdc;--table-line:#e9dfcf;--tf-accent:#865022}
body[data-theme="studio"]{--bg:#f0f0fa;--bg-top:#f8f7ff;--panel:#fff;--panel-alt:#f4f3fc;--panel-soft:#eeebfc;--text:#24213f;--muted:#655f82;--subtle:#726b8e;--border:#dcd7ef;--border-soft:#ece8f7;--accent:#6540b5;--accent-hover:#4e2d94;--accent-soft:#eee8fc;--sidebar-bg:#27203f;--sidebar-top:#32284e;--table-row-hover:#f3eefc;--table-line:#e7e1f4;--tf-accent:#6540b5}
.tf-appearance-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin-top:24px}.tf-appearance-field{display:flex;flex-direction:column;gap:9px}.tf-appearance-field select{width:100%;min-height:42px;background:var(--panel);color:var(--text);border:1px solid var(--border);border-radius:8px;padding:8px}.tf-appearance-preview{margin-top:20px;border:1px solid var(--border);border-radius:12px;padding:18px;background:var(--panel-alt);overflow:hidden}.tf-preview-cases{display:flex;flex-direction:column;margin:12px 0;gap:5px}.tf-preview-cases>div{padding:9px;background:var(--panel);border:1px solid var(--border);display:flex;gap:16px}.tf-preview-detail{background:var(--accent-soft);padding:14px;border:1px solid var(--border)}.tf-appearance-preview.layout-gallery .tf-preview-cases{display:grid;grid-template-columns:repeat(3,1fr)}.tf-appearance-preview.layout-gallery .tf-preview-cases>div{flex-direction:column;min-height:75px}.tf-appearance-preview.layout-paper .tf-preview-cases>div{padding:18px}.tf-appearance-preview.layout-notebook .tf-preview-cases>div{font-family:Georgia,serif;border-width:0 0 1px}.tf-appearance-preview.layout-focus small{display:none}.tf-appearance-preview.opening-split .tf-preview-cases{width:55%;float:left}.tf-appearance-preview.opening-split .tf-preview-detail{margin:12px 0 0 58%;min-height:120px}.tf-appearance-preview.opening-dialog .tf-preview-detail{width:70%;margin:auto;box-shadow:var(--shadow-lg)}.tf-appearance-preview.opening-tabs .tf-preview-detail:before{content:'Library  |  C1  ×  |  C2  ×';display:block;margin-bottom:12px}.tf-appearance-preview.opening-drawer .tf-preview-detail{margin-left:35%}
.tf-inline-case{grid-column:1/-1;padding:20px;border-bottom:1px solid var(--border);background:var(--panel);min-width:0}.tf-inline-case>.tcd{max-width:100%}.tcl.opening-inline.has-overlay .tcl-list{pointer-events:auto}.tcl.opening-split .tcl-list{min-width:300px}.tcl.opening-split .tcl-inspector{max-width:calc(100% - 306px);flex-shrink:0}.tcl .tf-centered-case{position:fixed!important;inset:50% auto auto 50%!important;transform:translate(-50%,-50%);width:min(880px,90vw)!important;height:85vh!important;max-height:85vh;z-index:1010;border:1px solid var(--border);border-radius:16px;box-shadow:var(--shadow-lg)}.tcl.opening-dialog .tcl-insp-backdrop{position:fixed;inset:0;z-index:1009;background:rgba(0,0,0,.4)}.tf-case-tabs{display:flex;flex-direction:column;min-width:0}.tf-case-tabbar{display:flex;align-items:center;gap:8px;padding:10px;overflow-x:auto;border-bottom:1px solid var(--border);flex-shrink:0}.tf-case-tab{display:flex;align-items:center;white-space:nowrap}.tf-case-tab [aria-pressed=true]{background:var(--panel-soft);color:var(--text);font-weight:650}.tf-case-tabs>.tcl-list{flex:1;min-height:0}.tcl.layout-paper .tcl-listbody{padding:22px;background:var(--bg)}.tcl.layout-paper .tcl-grid{max-width:1120px;margin:auto;background:var(--panel);box-shadow:var(--shadow);border:1px solid var(--border)}.tcl.layout-paper .tcl-case{min-height:68px}.tcl.layout-notebook .tcl-case{min-height:58px;border-bottom:1px solid var(--border);background:linear-gradient(90deg,transparent 81px,var(--border) 82px,transparent 83px)}.tcl.layout-notebook .tcl-title{font-family:Georgia,serif;font-size:16px}.tcl.layout-focus .tcl-listbody{padding:16px max(16px,4%)}.tcl.layout-focus .tcl-case{min-height:64px}.tcl.layout-focus .tcl-c:not(.tcl-c-check):not(.tcl-c-id):not(.tcl-c-title):not(.tcl-c-more){display:none}.tcl.layout-focus .tcl-title{font-size:16px}.tcl.layout-gallery .tcl-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:14px;padding:16px}.tcl.layout-gallery .tcl-headrow,.tcl.layout-gallery .tcl-group{grid-column:1/-1;position:static}.tcl.layout-gallery .tcl-case{display:flex;flex-wrap:wrap;height:auto;min-height:180px;align-content:flex-start;padding:12px;border:1px solid var(--border);border-radius:12px;background:var(--panel);box-shadow:var(--shadow-inset)}.tcl.layout-gallery .tcl-c{height:auto;min-height:28px;padding:4px}.tcl.layout-gallery .tcl-case .tcl-c-title{order:-1;flex:0 0 100%;min-height:62px}.tcl.layout-gallery .tcl-title{white-space:normal;font-size:15px;line-height:1.45}.tcl.layout-gallery .tcl-case.is-selected{border-color:var(--accent);background:var(--accent-soft)}
@media(max-width:900px){.tf-appearance-controls{grid-template-columns:1fr}.tf-appearance-preview.layout-gallery .tf-preview-cases{grid-template-columns:1fr}.tf-appearance-preview.layout-gallery .tf-preview-cases>div{min-height:0}.tf-appearance-preview.opening-split .tf-preview-cases{float:none;width:auto}.tf-appearance-preview.opening-split .tf-preview-detail{margin:0;min-height:0}}
/* Centered dialogs must not inherit the inspector's slide-in transform. */
.tcl .tf-centered-case{animation:none!important;transform:translate(-50%,-50%)!important;opacity:1!important}.tcl.opening-dialog .tcl-insp-backdrop{animation:none!important;opacity:1!important}
.tcl .tcl-inspector.tf-centered-case{z-index:110}.tcl.opening-dialog .tcl-insp-backdrop{z-index:109}
.tfp-demo-knock{display:inline-flex;align-items:center;justify-content:center;background:none;border:0;padding:0;color:inherit;cursor:pointer;border-radius:10px}.tfp-demo-knock:focus-visible{outline:3px solid var(--tfp-brand);outline-offset:4px}.tfp-brand>a{color:inherit;text-decoration:none}.tfp-demo-entry{margin-top:18px;padding:18px;border:1px solid var(--tfp-line);border-radius:12px;background:var(--tfp-soft)}.tfp-demo-entry p{font-size:13px;line-height:1.5;margin:8px 0 12px}.tf-demo-banner{position:fixed;top:0;left:0;right:0;z-index:80;min-height:36px;padding:4px 14px;display:flex;gap:14px;align-items:center;justify-content:center;background:var(--accent);color:white;font-size:12px}.tf-demo-banner .btn{color:white;border:1px solid currentColor}.tf-demo-shell{padding-top:40px}.tf-demo-shell .tf-mobile-topbar{top:40px}@media(max-width:600px){.tf-demo-banner{justify-content:space-between}.tf-demo-banner>span{display:none}}
.tf-demo-banner button.btn{color:#fff!important;opacity:1;border:1px solid rgba(255,255,255,.7);min-height:28px;padding:3px 10px}.tf-demo-banner button.btn:hover{background:rgba(255,255,255,.15)}
@media(min-width:901px){.tf-demo-shell .qa-rail{top:40px;height:calc(100dvh - 40px)}.tf-demo-shell>.main.tf-frame{height:calc(100dvh - 40px)}}
.tf-demo-shell .tf-m-appbar{top:40px}

/* Inline navigation groups share the same structure on desktop and phones. */
.qa-nav-group > summary.qa-nav-heading{display:flex;align-items:center;gap:8px;cursor:pointer;list-style:none;margin:0;padding:10px 8px;color:var(--muted);font:600 11px/1.4 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;letter-spacing:.025em;text-transform:none;border-radius:5px}
.qa-nav-group > summary::-webkit-details-marker{display:none}
.qa-nav-group > summary:hover{background:var(--panel-alt);color:var(--text)}
.qa-nav-group > summary:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.qa-nav-group > summary > svg{flex:none;transform:rotate(-90deg);transition:transform .12s}
.qa-nav-group[open] > summary > svg{transform:none}
.qa-nav-group-count{margin-left:auto;color:var(--subtle);font-size:10px;font-variant-numeric:tabular-nums}
.qa-nav-group-items{display:flex;flex-direction:column;gap:2px}
.qa-sidebar .qa-nav-group{margin-bottom:4px}
.qa-sidebar .nav-btn.active{background:var(--panel-soft);color:var(--text);box-shadow:none}
.qa-mobile-groups .qa-nav-group > summary.qa-nav-heading{min-height:48px;padding:12px 16px;font-size:13px}
.qa-mobile-groups .qa-nav-group-items{gap:0}
.qa-mobile-groups .tf-m-navrow{padding-left:24px}
.qa-mobile-groups .tf-m-navrow.selected{background:var(--panel-soft);color:var(--text)}

.bb-share-session{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:10px 16px;border-top:1px solid var(--border-soft);font-size:12px;color:var(--muted)}
.bb-share-session .btn{flex:none}
@media(min-width:901px){.qa-sidebar .nav-list{gap:3px}}

.app-shell details.qa-nav-group,.qa-mobile-groups details.qa-nav-group{display:block;border:0;border-radius:0;background:transparent;padding:0;margin:0 0 4px}

.qa-mobile-groups .tf-m-navrow.selected .tf-m-row-title{color:var(--text)}
.qa-mobile-groups .tf-m-navrow.selected .tf-m-navrow-ico{background:var(--panel-alt);color:var(--text)}

.qa-sidebar .nav-btn,.qa-mobile-groups .tf-m-navrow{scroll-margin-block:8px}

/* Connection details stay within Settings, with no overlay or slide-over. */
.st-conn-detail{display:flex;flex-direction:column;gap:24px;min-width:0;width:100%}
.st-conn-detail>.btn{align-self:flex-start}
.st-conn-detail .st-conn-hero{padding-block:4px 8px}
.st-ai-providers{min-width:0}
.st-ai-providers textarea{width:100%;resize:vertical;min-height:120px}
.st-ai-provider-actions{margin-top:20px;flex-wrap:wrap}
@media(max-width:700px){.st-ai-providers .st-grid{grid-template-columns:minmax(0,1fr)}.st-ai-provider-actions>.btn{flex:1 1 160px}.st-conn-detail{gap:18px}}

.st-ai-capabilities{margin-top:18px;border-top:1px solid var(--border);padding-top:14px;min-width:0}
.st-ai-capabilities summary{cursor:pointer;font-weight:600;color:var(--text);padding:4px 0}
.st-ai-capabilities .st-help{margin:10px 0}
.st-ai-capability{display:flex;align-items:flex-start;gap:10px;padding:7px 0;overflow-wrap:anywhere}
.st-ai-capability input{flex:0 0 auto;margin-top:3px;accent-color:var(--accent)}
@media(max-width:700px){.st-conn-detail .st-grid{grid-template-columns:minmax(0,1fr)}}
.tf-start{margin:20px 28px;padding:24px;border:1px solid var(--border,#d6e2e6);border-radius:14px;background:var(--surface,#fff);color:var(--text,#193038)}
.tf-start-head{display:flex;justify-content:space-between;align-items:start;gap:16px}.tf-start h2{font-size:22px;margin:4px 0 8px}.tf-start p{line-height:1.55;margin:0;color:var(--muted,#5a6e7b)}.tf-start-kicker{font-size:12px;text-transform:uppercase;letter-spacing:.08em;font-weight:700}.tf-start-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;list-style:none;padding:24px 0;margin:0}.tf-start-steps li{display:flex;flex-direction:column;align-items:flex-start;gap:12px}.tf-start-steps h3{font-size:16px;margin:0}.tf-start-steps p{font-size:14px;flex:1}.tf-start-number{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:var(--accent-soft,#e7f4f3);color:var(--text,#193038);font-weight:700}.tf-start .tf-start-note{font-size:13px;border-top:1px solid var(--border,#d6e2e6);padding-top:16px}
@media(max-width:700px){.tf-start{margin:12px;padding:18px}.tf-start-head{flex-direction:column}.tf-start-steps{grid-template-columns:minmax(0,1fr);gap:24px}}
.tfp-plans-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(280px,100%),1fr));gap:20px;margin-top:28px}.tfp-plan{border:1px solid #cddfdd;border-radius:16px;background:white;padding:28px;color:#193237}.tfp-plan h3{font-size:22px;margin:0 0 16px}.tfp-plan p{line-height:1.6}.tfp-plan .tfp-plan-price{font-size:25px;font-weight:750;letter-spacing:-.02em}.tfp-plan .tfp-btn{margin-top:12px}.tfp-plan-note{font-size:14px;line-height:1.6;color:#52686c;max-width:75ch;margin:20px 0 0}
