    :root {
      /* Colorado Brand Design Tokens (Official Colorado PMS Specs) */
      --primary: #35647e;
      --primary-hover: #2b5267;
      --brand-teal-primary: #35647e;
      --brand-navy: #001970;
      --brand-red: #c3002f;
      --brand-yellow: #ffd100;
      --brand-green: #245d38;
      --text-main: #0F172A;
      --hour-decimal: #000000;

      --paper: #f4f4f5;
      --ink: #18181b;
      --muted: #5b636a;
      --line: #d4d4d8;
      --card: #ffffff;
      --teal: #35647e;
      --teal-deep: #35647e;
      --teal-soft: rgba(53, 100, 126, 0.12);
      --copper: #c3002f;
      --copper-soft: rgba(195, 0, 47, 0.1);
      --gold: #854d0e;
      --gold-soft: rgba(255, 209, 0, 0.16);
      --ok: #245d38;
      --ok-soft: rgba(36, 93, 56, 0.12);
      --purple: #8b5cf6;
      --purple-soft: #f5f3ff;
      --shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
      --menu-bg: #ffffff;
      --input-bg: #ffffff;
      --input-border: #d1d5db;
      --day-hover: #e5e7eb;
      --paid-border: #0F172A;
      --paid-text: #000000;
      --highlight-bg: rgba(53, 100, 126, 0.14);
      --highlight-border: #35647e;
      --closed-period-bg: rgba(148, 163, 184, 0.22);
      --closed-period-border: #64748b;
      --font-display: 'Trebuchet MS', 'Open Sans', sans-serif;
      --font-sans: 'Open Sans', system-ui, -apple-system, sans-serif;
    }

    [data-theme="dark"] {
      --paper: #0f1115;
      --ink: rgba(255, 255, 255, 0.92); 
      --muted: rgba(255, 255, 255, 0.65);
      --line: #2e3338;
      --card: #1c1f24; 
      --teal-deep: #2ad4c8;
      --teal-soft: #143432;
      --copper-soft: #3a2420;
      --gold-soft: #2c2820;
      --ok-soft: #132e23;
      --purple-soft: #271f3a;
      --shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
      --menu-bg: #23282c;
      --input-bg: #252a30;
      --input-border: #4a5056;
      --day-hover: #2a3036;
      --paid-border: #ffffff;
      --paid-text: #ffffff;
      --highlight-bg: rgba(42, 212, 200, 0.20);
      --highlight-border: #2ad4c8;
      --closed-period-bg: rgba(71, 85, 105, 0.35);
      --closed-period-border: #94a3b8;
    }

    /* Phase 16: High-Contrast Roll-Cart Theme (> 15:1 contrast for 4-6ft glanceability) */
    [data-theme="high-contrast"] {
      --paper: #000000;
      --ink: #ffffff;
      --muted: #e2e8f0;
      --line: #475569;
      --card: #080a0e;
      --teal-deep: #00e5ff;
      --teal: #00e5ff;
      --teal-soft: #002b33;
      --copper: #ff7043;
      --copper-soft: #38150c;
      --gold: #fbbf24;
      --gold-soft: #362803;
      --ok: #00e676;
      --ok-soft: #003319;
      --purple: #c084fc;
      --purple-soft: #28143d;
      --shadow: 0 16px 40px rgba(0, 0, 0, 0.85);
      --menu-bg: #0d1117;
      --input-bg: #0d1117;
      --input-border: #64748b;
      --day-hover: #1e293b;
      --paid-border: #00e5ff;
      --paid-text: #ffffff;
      --highlight-bg: rgba(0, 229, 255, 0.28);
      --highlight-border: #00e5ff;
      --closed-period-bg: rgba(71, 85, 105, 0.55);
      --closed-period-border: #94a3b8;
    }

    [data-theme="high-contrast"] .inbay-card {
      border: 2px solid #475569;
      background: #080a0e;
    }
    [data-theme="high-contrast"] #ppRunningFlaggedHrs,
    [data-theme="high-contrast"] #ppRunningSoldHrs,
    [data-theme="high-contrast"] #ppRunningNetVarHrs {
      font-size: 22px !important;
      font-weight: 900 !important;
    }

    * { box-sizing: border-box; }
    html, body, #appContainer, #app, #workspaceView {
      overflow-x: hidden !important;
      width: 100% !important;
      max-width: 100%;
    }
    html, body { margin: 0; min-height: 100vh; transition: background 0.3s ease, color 0.3s ease; }
    body { background: #f4f4f5; background-color: var(--paper, #f4f4f5); color: var(--ink); font-family: 'Open Sans', system-ui, -apple-system, sans-serif; padding-bottom: 20px; }
    [data-theme="dark"] body,
    [data-theme="high-contrast"] body {
      background: var(--paper) !important;
      background-color: var(--paper) !important;
    }
    body, input, select, textarea, button, table, th, td {
      font-family: 'Open Sans', system-ui, -apple-system, sans-serif;
    }
    h1, h2, h3, .hero-title, .h1, .h2, .h3 {
      font-family: 'Trebuchet MS', 'Open Sans', sans-serif;
    }

    /* High-contrast hour decimal numbers for shop floor glanceability */
    .math b,
    .math input,
    .num,
    .stat b,
    .hour-decimal,
    .hour-val,
    .entry-hours,
    [data-hours],
    .tabular-nums {
      color: var(--hour-decimal, #000000) !important;
      font-variant-numeric: tabular-nums;
      font-weight: 700;
    }
    [data-theme="dark"] .math b,
    [data-theme="dark"] .math input,
    [data-theme="dark"] .num,
    [data-theme="dark"] .stat b,
    [data-theme="dark"] .hour-decimal,
    [data-theme="dark"] .hour-val,
    [data-theme="dark"] .entry-hours,
    [data-theme="dark"] [data-hours],
    [data-theme="dark"] .tabular-nums,
    [data-theme="high-contrast"] .math b,
    [data-theme="high-contrast"] .math input,
    [data-theme="high-contrast"] .num,
    [data-theme="high-contrast"] .stat b,
    [data-theme="high-contrast"] .hour-decimal,
    [data-theme="high-contrast"] .hour-val,
    [data-theme="high-contrast"] .entry-hours,
    [data-theme="high-contrast"] [data-hours],
    [data-theme="high-contrast"] .tabular-nums {
      color: #ffffff !important;
    }

    /* Status Pills with Colorado Brand Design Tokens & 3D Dot Styling */
    .status-pill {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 3px 10px;
      border-radius: 999px;
      font-size: 11.5px;
      font-weight: 700;
      letter-spacing: 0.02em;
      text-transform: uppercase;
      line-height: 1.35;
      white-space: nowrap;
      box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    }
    .status-pill::before {
      content: "";
      display: inline-block;
      width: 8px;
      height: 8px;
      border-radius: 50%;
      flex-shrink: 0;
      box-shadow: inset 0 -1px 2px rgba(0, 0, 0, 0.35), 0 1px 2px rgba(0, 0, 0, 0.2);
    }

    .status-pill.unpaid,
    .badge.unpaid {
      background: rgba(195, 0, 47, 0.1) !important;
      color: var(--brand-red) !important;
      border: 1px solid rgba(195, 0, 47, 0.35) !important;
    }
    .status-pill.unpaid::before,
    .badge.unpaid::before {
      background: var(--brand-red);
      box-shadow: inset -1px -1px 2px rgba(0, 0, 0, 0.35), 0 0 4px rgba(195, 0, 47, 0.5);
    }

    .status-pill.short-paid,
    .status-pill.short,
    .badge.short-paid,
    .badge.short {
      background: rgba(255, 209, 0, 0.16) !important;
      color: #854d0e !important;
      border: 1px solid rgba(255, 209, 0, 0.6) !important;
    }
    .status-pill.short-paid::before,
    .status-pill.short::before,
    .badge.short-paid::before,
    .badge.short::before {
      background: var(--brand-yellow);
      box-shadow: inset -1px -1px 2px rgba(0, 0, 0, 0.3), 0 0 4px rgba(255, 209, 0, 0.6);
    }

    .status-pill.matched,
    .status-pill.balanced,
    .badge.matched,
    .badge.balanced {
      background: rgba(36, 93, 56, 0.12) !important;
      color: var(--brand-green) !important;
      border: 1px solid rgba(36, 93, 56, 0.35) !important;
    }
    .status-pill.matched::before,
    .status-pill.balanced::before,
    .badge.matched::before,
    .badge.balanced::before {
      background: var(--brand-green);
      box-shadow: inset -1px -1px 2px rgba(0, 0, 0, 0.35), 0 0 4px rgba(36, 93, 56, 0.5);
    }

    .status-pill.surplus,
    .badge.surplus {
      background: rgba(53, 100, 126, 0.12) !important;
      color: var(--primary) !important;
      border: 1px solid rgba(53, 100, 126, 0.35) !important;
    }
    .status-pill.surplus::before,
    .badge.surplus::before {
      background: var(--primary);
      box-shadow: inset -1px -1px 2px rgba(0, 0, 0, 0.35), 0 0 4px rgba(53, 100, 126, 0.5);
    }

    /* Primary Action Buttons (Colorado Mountain Teal) */
    .solid-deep,
    #addLine,
    #importCdkBtn,
    .btn-primary-action {
      background: var(--brand-teal-primary);
      border-color: var(--brand-teal-primary);
      color: #ffffff;
      font-weight: 700;
    }
    .solid-deep:hover,
    #addLine:hover,
    #importCdkBtn:hover,
    .btn-primary-action:hover {
      background: var(--primary-hover);
      border-color: var(--primary-hover);
    }
    
    .wrap { max-width: 1750px; width: 100%; margin: 0 auto !important; padding: 16px 24px; min-height: calc(100vh - 120px); box-sizing: border-box; }
    @media (min-width: 768px) {
      .wrap { padding-left: 32px; padding-right: 32px; }
    }
    
    /* TOP HEADER ARCHITECTURE (TIER 1 UTILITY BAR) */
    .top { 
      display: grid; 
      grid-template-columns: 1fr auto 1fr; 
      align-items: center; 
      margin-bottom: 12px; 
      position: relative; 
      z-index: 1000;
      gap: 16px; 
      width: 100%; 
      padding: 12px 16px; 
      background: rgba(255, 255, 255, 0.92);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      border-bottom: 1px solid rgba(226, 232, 240, 0.85); 
      border-radius: 12px;
      box-shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
    }
    [data-theme="dark"] .top,
    [data-theme="high-contrast"] .top {
      background: var(--card) !important;
      border-bottom: 1px solid var(--line) !important;
    }
    .top-left-nav {
      grid-column: 1;
      display: flex;
      align-items: center;
      justify-content: flex-start;
      min-height: 48px;
    }
    .top-center-nav {
      grid-column: 2;
      display: flex;
      justify-content: center;
      align-items: center;
      margin: 0 auto;
      text-align: center;
      position: relative;
    }
    .header-actions {
      grid-column: 3;
      display: flex;
      flex-direction: row;
      justify-content: flex-end;
      align-items: center;
      position: relative;
      gap: 12px;
    }
    .brand img,
    .logo-brand-img {
      aspect-ratio: 2172 / 724;
      height: 56px;
      max-height: 64px;
      width: auto !important;
      object-fit: contain !important;
      display: block;
      margin: 0;
    }
    .logo { height: 56px; width: auto; object-fit: contain; }
    .h-8 { height: 32px !important; }
    .h-11 { height: 44px !important; }
    .h-12 { height: 48px !important; }
    .h-13 { height: 52px !important; }
    .h-14 { height: 56px !important; }
    .max-h-16 { max-height: 64px !important; }
    .sm\:h-9 { height: 36px !important; }
    .sm\:h-12 { height: 48px !important; }
    .sm\:h-16 { height: 64px !important; }
    .md\:h-9 { height: 36px !important; }
    .md\:h-10 { height: 40px !important; }
    .md\:h-12 { height: 48px !important; }
    .md\:h-16 { height: 64px !important; }
    @media (min-width: 640px) {
      .top-left-nav { min-height: 56px; }
      .brand img,
      .logo-brand-img { height: 64px; }
      .sm\:h-16 { height: 64px !important; }
    }
    @media (min-width: 768px) {
      .top-left-nav { min-height: 56px; }
      .brand img,
      .logo-brand-img { height: 64px; }
      .md\:h-16 { height: 64px !important; }
    }
    @media (min-width: 1024px) {
      .top-left-nav { min-height: 56px; }
      .brand img,
      .logo-brand-img { height: 64px; }
    }
    .w-auto { width: auto !important; }
    .object-contain { object-fit: contain !important; }
    .select-none { user-select: none; }

    /* Marketing Page Layout: Hide global top header when #marketingView is active, and drop weather/clock on #loginView */
    body.marketing-active:has(#marketingView:not(.hidden)) header.top {
      display: none !important;
    }
    body.marketing-active .top-center-nav {
      display: none !important;
    }
    body.marketing-active .brand.top-left-nav {
      grid-column: 2;
      justify-self: center;
      margin: 0 auto;
    }
    body.marketing-active .header-actions {
      grid-column: 3;
      justify-self: end;
    }
    @media (max-width: 992px) {
      .top {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 12px;
      }
      .brand.top-left-nav {
        order: 1;
        justify-content: center;
        width: 100%;
        text-align: center;
      }
      .top-center-nav {
        order: 2;
        justify-content: center;
        width: 100%;
      }
      .header-actions {
        order: 3;
        justify-content: center;
        width: 100%;
      }
      body.marketing-active .top-center-nav {
        display: none !important;
      }
      body.marketing-active .brand.top-left-nav {
        order: 1;
        justify-content: center;
        width: 100%;
      }
      body.marketing-active .header-actions {
        order: 2;
        justify-content: center;
        width: 100%;
      }
    }

    /* VIEW SWITCHER SEGMENTED PILL (POWERED BY FOREMAN IQ) */
    .view-switcher-pill {
      display: inline-flex;
      align-items: center;
      background: var(--paper);
      border: 1px solid var(--line);
      border-radius: 999px;
      padding: 3px;
      gap: 4px;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    }
    .view-pill-btn {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 6px 14px;
      border-radius: 999px;
      border: none;
      font-size: 12.5px;
      font-weight: 700;
      color: var(--muted);
      background: transparent;
      cursor: pointer;
      transition: all 0.2s ease;
      font-family: inherit;
    }
    .view-pill-btn:hover {
      color: var(--ink);
    }
    .view-pill-btn.active {
      background: var(--brand-teal-primary) !important;
      color: #ffffff !important;
      box-shadow: 0 2px 6px rgba(53, 100, 126, 0.35);
    }
    .view-pill-btn .sub-badge-iq {
      font-size: 9.5px;
      font-weight: 800;
      padding: 2px 6px;
      border-radius: 999px;
      background: rgba(53, 100, 126, 0.15);
      color: var(--primary);
      text-transform: uppercase;
      letter-spacing: 0.03em;
    }
    .view-pill-btn.active .sub-badge-iq {
      background: rgba(255, 255, 255, 0.25) !important;
      color: #ffffff !important;
    }
    .beta-locked-btn,
    .opacity-60 { opacity: 0.6 !important; }
    .cursor-not-allowed { cursor: not-allowed !important; }
    .pointer-events-none { pointer-events: none !important; }
    .select-none { user-select: none !important; -webkit-user-select: none !important; }
    .weather-alert-companion {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 6px 12px;
      border-radius: 8px;
      font-size: 11.5px;
      line-height: 1.25;
      font-weight: 500;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
      max-width: 290px;
      text-align: left;
    }
    .weather-alert-companion.alert-rain {
      background: #f0f9ff;
      border: 1px solid #7dd3fc;
      color: #0c4a6e;
    }
    .weather-alert-companion.alert-snow {
      background: #eef2ff;
      border: 1px solid #a5b4fc;
      color: #312e81;
    }
    .weather-alert-companion.alert-storm {
      background: #fffbeb;
      border: 1px solid #fcd34d;
      color: #78350f;
    }
    [data-theme="dark"] .weather-alert-companion.alert-rain {
      background: rgba(12, 74, 110, 0.35);
      border: 1px solid #0284c7;
      color: #bae6fd;
    }
    [data-theme="dark"] .weather-alert-companion.alert-snow {
      background: rgba(49, 46, 129, 0.35);
      border: 1px solid #6366f1;
      color: #e0e7ff;
    }
    [data-theme="dark"] .weather-alert-companion.alert-storm {
      background: rgba(120, 53, 15, 0.35);
      border: 1px solid #f59e0b;
      color: #fef3c7;
    }
    .weather-alert-dismiss-btn {
      background: none;
      border: none;
      padding: 0 4px;
      margin-left: auto;
      cursor: pointer;
      font-size: 15px;
      font-weight: 700;
      line-height: 1;
      color: inherit;
      opacity: 0.7;
    }
    .weather-alert-dismiss-btn:hover {
      opacity: 1;
    }
    .header-actions { display: flex; flex-direction: column; justify-content: center; align-items: flex-end; position: relative; gap: 6px; }
    .top-right-switcher { display: flex; align-items: center; justify-content: flex-end; }
    .account { display: flex; justify-content: flex-end; position: relative; z-index: 1001; }
    
    @media (max-width: 992px) {
      .top { display: flex; flex-direction: column; gap: 12px; }
      .brand { order: 1; justify-content: center; }
      .top-center-nav, .top-left-nav { order: 2; width: 100%; justify-content: center; align-items: center; }
      .header-actions { order: 3; justify-content: center; align-items: center; width: 100%; }
      .top-right-switcher { justify-content: center; }
      .dropdown { right: auto; left: 50%; transform: translateX(-50%); }
    }

    /* REDESIGNED HEADER CONTROLS */
    .view-toggle-capsule {
      display: inline-flex;
      background: var(--input-bg);
      border: 1px solid var(--input-border);
      border-radius: 999px;
      padding: 3px;
      gap: 6px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.04);
      align-items: center;
      height: 38px;
    }
    .view-toggle-btn {
      padding: 4px 18px !important;
      font-size: 13px !important;
      font-weight: 600 !important;
      border-radius: 999px !important;
      border: 1px solid transparent !important;
      cursor: pointer;
      transition: all 0.2s ease;
      height: 30px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      white-space: nowrap;
    }
    .view-toggle-btn.solid-deep {
      background: var(--teal-deep) !important;
      color: #ffffff !important;
      border-color: var(--teal-deep) !important;
      box-shadow: 0 2px 8px rgba(13, 148, 136, 0.25);
    }
    .view-toggle-btn.ghost {
      background: transparent !important;
      color: var(--muted) !important;
    }
    .view-toggle-btn.ghost:hover {
      color: var(--ink) !important;
      background: var(--day-hover) !important;
    }

    .header-ctrl-btn {
      width: 44px;
      height: 44px;
      display: grid;
      place-items: center;
      border-radius: 12px;
      border: 1.5px solid var(--input-border);
      background: var(--input-bg);
      color: var(--ink);
      cursor: pointer;
      transition: all 0.18s ease;
      box-shadow: 0 2px 6px rgba(0,0,0,0.04);
      padding: 0;
    }
    .header-ctrl-btn:hover {
      border-color: var(--teal-deep);
      transform: translateY(-1px);
      box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    }
    .header-ctrl-btn span { font-size: 20px; line-height: 1; }

    .header-menu-btn {
      width: 46px;
      height: 44px;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      gap: 5px;
      border-radius: 12px;
      border: 1.5px solid var(--input-border);
      background: var(--input-bg);
      cursor: pointer;
      transition: all 0.18s ease;
      box-shadow: 0 2px 6px rgba(0,0,0,0.04);
      padding: 0;
    }
    .header-menu-btn:hover {
      border-color: var(--teal-deep);
      transform: translateY(-1px);
      box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    }
    .header-menu-btn .bar {
      width: 22px;
      height: 2.5px;
      background: var(--ink);
      border-radius: 999px;
      transition: background 0.2s ease;
      pointer-events: none;
    }
    .header-menu-btn:hover .bar {
      background: var(--teal-deep);
    }

    .ghost, .solid, .solid-deep, .warn {
      border-radius: 999px; padding: 10px 18px; border: 1px solid var(--line); background: transparent; transition: all 0.2s ease;
      cursor: pointer; font-family: var(--font-sans); font-size: 14px;
    }
    .solid { background: var(--teal); color: #10211f; border-color: var(--teal); font-weight: 600; }
    .solid-deep { background: var(--teal-deep); color: #ffffff; border-color: var(--teal-deep); font-weight: 600; }
    .warn { background: var(--copper); color: white; border-color: var(--copper); font-weight: 600; }
    .ghost:hover, .solid:hover, .solid-deep:hover, .warn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
    
    label.field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
    label.field span { text-transform: uppercase; letter-spacing: 0.06em; font-size: 11px; }

    input, select, textarea {
      width: 100%; height: 42px; border: 1px solid var(--input-border); border-radius: 8px; padding: 10px 12px;
      background: var(--input-bg) !important;
      color: var(--ink) !important;
      -webkit-text-fill-color: var(--ink);
      font-family: var(--font-sans);
      font-size: 14px;
    }
    
    .dropdown {
      position: absolute; top: 52px; right: 0; width: 310px; background: var(--menu-bg); border: 1px solid var(--line);
      border-radius: 14px; padding: 12px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; z-index: 50; color: var(--ink);
    }
    .dropdown button { text-align: left; border: none; border-radius: 8px; justify-content: flex-start; cursor: pointer; color: var(--ink); background: transparent; font-weight: 500; padding: 8px 12px; font-size: 14px; width: 100%; }
    .dropdown button:hover { background: var(--day-hover); }
    .dropdown hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; width: 100%; }
    [data-theme="dark"] .dropdown button { color: #ffffff !important; }

    .advisor-item {
      display: flex; justify-content: space-between; align-items: center; background: var(--input-bg);
      border: 1px solid var(--input-border); padding: 8px 12px; border-radius: 8px; font-size: 14px; color: var(--ink);
      gap: 8px;
    }
    .advisor-item button { background: transparent; border: none; color: var(--muted); padding: 4px; cursor: pointer; font-size: 18px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 6px; }
    .advisor-item button:hover { color: var(--copper); background: var(--day-hover); }

    .wci-c { background: #172a22; color: #3ddc97; border-color: #2e5944 !important; }
    .wci-w { background: #3a1e1e; color: #ff8d7a; border-color: #5c3030 !important; }
    .wci-i { background: #1a2a40; color: #6ba4ff; border-color: #2c4263 !important; }

    .not-panel { position: sticky; top: 0; width: 100%; margin-top: 0 !important; padding-top: 0 !important; }
    #notTrackedContainer { margin-top: 0 !important; padding-top: 0 !important; }
    /* #holdingBinCard spacing now handled by .not-panel flex gap (see below) */
    .layout > aside, .layout > main, .layout > .not-panel { margin-top: 0 !important; padding-top: 0 !important; }
    /* Workbench side columns (Col 1 + Col 3): uniform 16px card separation via flex gap.
       Per-card margins are zeroed so .panel + .panel / .top-card margins can't double up or collapse to flush. */
    .layout > aside, .layout > .not-panel { display: flex; flex-direction: column; gap: 16px; }
    .layout > aside > .panel, .layout > .not-panel > .panel { margin-top: 0 !important; margin-bottom: 0 !important; }
    .count { min-width: 22px; height: 22px; border-radius: 999px; background: var(--copper); color: white; font-size: 12px; display: grid; place-items: center; font-weight: 700; padding: 0 6px; }
    
    .letter { display: inline-grid; place-items: center; min-width: 22px; height: 22px; border-radius: 999px; font-weight: 700; margin-left: 6px; font-size: 12px;}
    /* Customer pay green (2026-11-08): #278548 keeps white letters readable (4.6:1) and stays apart from
       the warranty red for red-green color blindness (dataviz validate_palette, deutan dE 9.1). */
    :root { --cp-green: #278548; --w-red: #9c1b1b; --i-blue: #1d4f91; }
    .letter-c { background: var(--cp-green); color: #ffffff; }
    .letter-w { background: var(--w-red); color: #ffffff; }
    .letter-i { background: var(--i-blue); color: #ffffff; }
    
    input[type="number"]::-webkit-outer-spin-button,
    input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
    input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
    
    .line-tools { display: inline-flex; gap: 8px; margin-left: 10px; }
    
    .reconciled-line { background: var(--teal-soft); border-radius: 8px; border: 1px solid var(--teal-deep); }
    .reconciled-line b { color: var(--teal-deep); }
    .reconciled-line .mini { border: 1px solid var(--teal-deep); color: var(--teal-deep); }

    .short-line { background: var(--gold-soft); color: var(--gold); border-radius: 8px; border: 1px solid var(--gold); }
    .short-line b { color: var(--ink); }
    .short-line .mini { border: 1px solid var(--gold); color: var(--gold); }

    .unpaid-line { background: var(--copper-soft); color: var(--copper); border-radius: 8px; border: 1px solid var(--copper); }
    .unpaid-line b { color: var(--copper); }
    .unpaid-line .mini { border: 1px solid var(--copper); color: var(--copper); }
    
    .gold-line {
      background: var(--gold-soft) !important;
      color: var(--ink) !important;
      border-radius: 8px;
      border: 1px solid var(--gold) !important;
      box-shadow: 0 4px 14px rgba(215, 192, 138, 0.12);
    }
    .gold-line b { color: var(--ink) !important; }
    .gold-line .ro { color: var(--ink) !important; }
    .gold-line .ops { color: var(--muted) !important; }
    .gold-line .mini {
      background: var(--menu-bg) !important;
      border: 1px solid var(--gold) !important;
      color: #926d15 !important;
    }
    [data-theme="dark"] .gold-line {
      background: var(--gold-soft) !important;
      border-color: var(--gold) !important;
      color: var(--ink) !important;
    }
    [data-theme="dark"] .gold-line .mini {
      background: var(--card) !important;
      border-color: var(--gold) !important;
      color: var(--gold) !important;
    }

    .btn-gold {
      background: var(--gold-soft) !important;
      color: #926d15 !important;
      border: 1px solid var(--gold) !important;
      font-weight: 600;
    }
    [data-theme="dark"] .btn-gold {
      color: var(--gold) !important;
      border-color: var(--gold) !important;
    }

    .badge-recovered {
      background: rgba(42, 212, 200, 0.15);
      color: var(--teal-deep);
      border: 1px solid var(--teal-deep);
      font-size: 11px;
      font-weight: 700;
      padding: 2px 7px;
      border-radius: 999px;
      display: inline-flex;
      align-items: center;
      gap: 4px;
    }
    [data-theme="dark"] .badge-recovered {
      color: var(--teal);
      border-color: var(--teal);
    }

    .pending-line { background: var(--card); color: var(--muted); border-radius: 8px; border: 1px dashed var(--line); opacity: 0.7; }
    .pending-line b, .pending-line .ro, .pending-line .ops { color: var(--muted) !important; }
    
    .layout { display: grid; grid-template-columns: 290px minmax(0, 1fr) 360px; gap: 20px; align-items: start; width: 100%; max-width: 1750px; margin: 0 auto; box-sizing: border-box; }
    .layout > aside, .layout > main, .layout > .not-panel { min-width: 0; margin-left: 0; margin-right: 0; }
    @media (max-width: 1400px) { .layout { grid-template-columns: 1fr; } }
    
    .workspace-top-bar {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 20px;
      margin-bottom: 16px;
      padding-bottom: 12px;
      border-bottom: 1px solid var(--line);
      flex-wrap: wrap;
    }
    .header-clock-weather-widget {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }
    .header-clock-weather-widget .clock-pill,
    .header-clock-weather-widget .weather-pill {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 5px 12px;
      border-radius: 999px;
      background: var(--paper);
      border: 1px solid var(--line);
      font-size: 13px;
      font-weight: 700;
      color: var(--ink);
      white-space: nowrap;
      min-height: 30px;
      box-sizing: border-box;
      box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
      transition: border-color 0.15s ease, background-color 0.15s ease;
    }
    .header-clock-weather-widget .clock-pill {
      font-family: var(--font-display), monospace;
      letter-spacing: 0.03em;
    }
    .header-clock-weather-widget .weather-pill {
      color: var(--teal-deep);
    }
    .header-clock-weather-widget .clock-pill:hover,
    .header-clock-weather-widget .weather-pill:hover {
      border-color: var(--teal-deep);
    }
    @media (max-width: 992px) {
      .workspace-top-bar { flex-direction: column; text-align: center; gap: 14px; justify-content: center; }
      .workspace-top-bar.date-totals-bar {
        display: flex !important;
        flex-direction: column !important;
        text-align: center !important;
        gap: 14px !important;
        justify-content: center !important;
      }
      .workspace-top-bar.date-totals-bar .date-col,
      .workspace-top-bar.date-totals-bar .chips-col,
      .workspace-top-bar.date-totals-bar .top-bar-switcher-col {
        justify-self: center !important;
        justify-content: center !important;
        text-align: center !important;
        width: 100% !important;
      }
      .workspace-top-bar .date-chips-group { justify-content: center; }
      .workspace-top-bar .date-col { justify-content: center; text-align: center; }
      .workspace-top-bar .chips-col { justify-content: center; }
      .workspace-top-bar .top-bar-switcher-col { justify-content: center; width: 100%; }
      #weatherImminentAlertBlock {
        position: static !important;
        transform: none !important;
        margin-top: 8px !important;
      }
    }
    .workspace-top-bar.date-totals-bar {
      display: grid !important;
      grid-template-columns: 1fr auto 1fr !important;
      align-items: center !important;
      width: 100% !important;
    }
    .workspace-top-bar.date-totals-bar .date-col {
      grid-column: 1;
      justify-self: start;
      display: flex;
      justify-content: flex-start;
      align-items: center;
    }
    .workspace-top-bar.date-totals-bar .chips-col {
      grid-column: 2;
      justify-self: center;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      text-align: center;
      margin: 0 auto;
    }
    .workspace-top-bar.date-totals-bar .top-bar-switcher-col {
      grid-column: 3;
      justify-self: end;
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      justify-content: center;
    }
    .w-full { width: 100%; }
    .flex { display: flex; }
    .flex-1 { flex: 1 1 0%; min-width: 0; }
    .flex-none { flex: none; }
    .flex-col { flex-direction: column; }
    .items-center { align-items: center; }
    .items-end { align-items: flex-end; }
    .justify-between { justify-content: space-between; }
    .justify-start { justify-content: flex-start; }
    .justify-center { justify-content: center; }
    .justify-end { justify-content: flex-end; }
    .text-center { text-align: center; }
    .relative { position: relative; }
    .mx-auto { margin-left: auto; margin-right: auto; }
    .py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
    .px-4 { padding-left: 1rem; padding-right: 1rem; }
    .text-\[10px\] { font-size: 10px !important; }
    .font-bold { font-weight: 700 !important; }
    .tracking-wider { letter-spacing: 0.05em !important; }
    .text-slate-500 { color: #64748b !important; }
    .uppercase { text-transform: uppercase !important; }
    .mb-1 { margin-bottom: 0.25rem !important; }
    .date-col { display: flex; flex-direction: column; justify-content: center; }
    .date-col .kicker { margin: 0 0 2px; }
    .date-col h2 { font-family: var(--font-display); font-size: 30px; margin: 0; line-height: 1.1; font-weight: 600; }
    .chips-col { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; }
    .chips-col .chips-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 0; }
    .chips-col .chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

    .top-card {
      min-height: 290px !important;
      display: flex !important;
      flex-direction: column !important;
      margin-bottom: 16px;
    }
    .top-card-body {
      flex: 1;
      display: flex;
      flex-direction: column;
      overflow-y: auto;
      padding-right: 2px;
    }

    #dayEntry.top-card { 
      min-height: auto !important; 
      overflow: visible !important; 
      border-color: var(--teal-deep) !important;
    }
    #dayEntry .top-card-body {
      overflow: visible !important;
      overflow-y: visible !important;
      padding-right: 0 !important;
      justify-content: flex-start !important;
      gap: 10px;
    }

    .status-select-badge {
      background: var(--input-bg);
      border: 1px solid var(--input-border);
      border-radius: 999px;
      padding: 2px 8px;
      font-size: 11px;
      font-weight: 600;
      color: var(--ink);
      cursor: pointer;
      height: 26px;
      display: inline-flex;
      align-items: center;
      outline: none;
    }
    .status-select-badge:focus {
      border-color: var(--teal-deep);
    }

    .lock-banner {
      background: var(--closed-period-bg);
      border: 1px solid var(--closed-period-border);
      color: var(--ink);
      border-radius: 10px;
      padding: 8px 12px;
      font-size: 13px;
      font-weight: 500;
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 10px;
    }
    .form-locked {
      opacity: 0.55;
      pointer-events: none;
      filter: grayscale(0.5);
    }

    .panel, .card, .setup { background: var(--card, #ffffff); border: 1px solid rgba(226, 232, 240, 0.9); border-radius: 18px; box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.06), 0 1px 2px -1px rgba(15, 23, 42, 0.04); }
    [data-theme="dark"] .panel,
    [data-theme="dark"] .card,
    [data-theme="dark"] .setup,
    [data-theme="high-contrast"] .panel,
    [data-theme="high-contrast"] .card,
    [data-theme="high-contrast"] .setup {
      background: var(--card) !important;
      border-color: var(--line) !important;
    }
    .panel { padding: 16px; transition: all 0.2s ease; }
    .panel + .panel { margin-top: 14px; }
    
    .panel-header { display: flex; justify-content: space-between; align-items: center; cursor: pointer; color: var(--ink); background: transparent; border: none; width: 100%; text-align: left; padding: 0; font-size: inherit; }
    [data-theme="dark"] .panel-header { color: #ffffff !important; }
    .panel-body { margin-top: 12px; }
    .panel-body.collapsed { display: none; }
    .collapse-icon { font-weight: bold; transition: transform 0.2s; }
    .collapsed-icon { transform: rotate(-90deg); }

    .kicker { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; font-weight: 600;}
    .cal-head, .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
    
    .cal-head button, .icon-btn { width: 32px; height: 32px; border-radius: 10px; border: 1px solid var(--line); background: var(--menu-bg); color: var(--ink); cursor: pointer; }
    .month { font-family: var(--font-display); font-size: 19px; }
    .dow, .grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
    .dow { margin: 10px 0 6px; color: var(--muted); font-size: 11px; text-align: center; }
    /* Calendar Heatmap Palette (Colorado Brand Tokens) */
    .day {
      border: 1px solid transparent;
      background: transparent;
      border-radius: 8px;
      min-height: 36px;
      position: relative;
      color: var(--ink);
      cursor: pointer;
      font-weight: 500;
      transition: all 0.15s ease;
    }
    .day:hover:not(:disabled) {
      background: rgba(53, 100, 126, 0.08);
      border-color: rgba(53, 100, 126, 0.3);
    }
    /* Outside / Past Pay Periods: Muted slate gray text (#94A3B8) */
    .day.outside-period {
      color: #94A3B8 !important;
      opacity: 0.75;
    }
    /* Active Pay Period: Shaded with a light teal background tint (#F0F6F9 / border #35647E) */
    .day.in-period {
      background: #F0F6F9;
      border: 1px solid #35647E;
      color: var(--ink);
    }
    [data-theme="dark"] .day.in-period {
      background: rgba(53, 100, 126, 0.18);
      border-color: #35647E;
    }
    /* Closed / Archived Pay Period */
    .day.in-closed-period {
      background: var(--closed-period-bg);
      border: 1px solid var(--closed-period-border);
    }
    /* Today's Date: Solid Mountain Teal (#35647E, white text, bold) */
    .day.is-today {
      background: #35647E !important;
      color: #ffffff !important;
      font-weight: 800 !important;
      border: 1px solid #2b5267 !important;
      box-shadow: 0 1px 3px rgba(53, 100, 126, 0.35);
    }
    /* Selected Date: Darker focused teal border / ring highlight */
    .day.on {
      border: 2px solid #001970 !important;
      box-shadow: 0 0 0 2px rgba(53, 100, 126, 0.45) !important;
      font-weight: 700;
    }
    .day.is-today.on {
      background: #35647E !important;
      color: #ffffff !important;
      border: 2px solid #001970 !important;
      box-shadow: 0 0 0 2px #ffd100 !important;
    }
    /* Unreconciled Days: Red/Orange-Amber indicator (#D97706 / #C3002F dot) */
    .day.has-unreconciled::after,
    .day.has:not(.has-reconciled)::after {
      content: "";
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: #D97706; /* Red/Orange-Amber */
      position: absolute;
      bottom: 3px;
      left: 50%;
      transform: translateX(-50%);
      box-shadow: 0 0 2px #C3002F;
    }
    /* Reconciled Days: Evergreen badge/pill (#245D38 / emerald green) */
    .day.has-reconciled::after {
      content: "";
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: #245D38; /* Evergreen */
      position: absolute;
      bottom: 3px;
      left: 50%;
      transform: translateX(-50%);
      box-shadow: 0 0 2px #1e7a32;
    }
    .day.is-today.has-unreconciled::after {
      background: #ffd100;
      box-shadow: 0 0 2px #ffffff;
    }
    .day.is-today.has-reconciled::after {
      background: #4ade80;
      box-shadow: 0 0 2px #ffffff;
    }
    .day.sunday-disabled {
      opacity: 0.38;
      cursor: not-allowed;
      text-decoration: line-through;
    }

    /* Marketing Status Banners (Match Exact Marketing Asset Tokens) */
    .bg-\[\#FFF1F2\] { background-color: #FFF1F2 !important; }
    .border-\[\#FCA5A5\] { border-color: #FCA5A5 !important; }
    .text-\[\#9F1239\] { color: #9F1239 !important; }
    .bg-\[\#C3002F\] { background-color: #C3002F !important; }

    .bg-\[\#FFFBEB\] { background-color: #FFFBEB !important; }
    .border-\[\#FCD34D\] { border-color: #FCD34D !important; }
    .text-\[\#92400E\] { color: #92400E !important; }
    .bg-\[\#D97706\] { background-color: #D97706 !important; }

    .bg-\[\#F0FDF4\] { background-color: #F0FDF4 !important; }
    .border-\[\#86EFAC\] { border-color: #86EFAC !important; }
    .text-\[\#166534\] { color: #166534 !important; }
    .bg-\[\#245D38\] { background-color: #245D38 !important; }

    .bg-\[\#F8FAFC\] { background-color: #F8FAFC !important; }
    .border-slate-200 { border-color: #e2e8f0 !important; }
    .text-slate-700 { color: #334155 !important; }
    .bg-slate-400 { background-color: #94a3b8 !important; }

    .rounded-xl { border-radius: 0.75rem !important; }
    .rounded-md { border-radius: 0.375rem !important; }
    .rounded-full { border-radius: 9999px !important; }
    .shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important; }
    .shadow-xs { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important; }
    .shadow-2xs { box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.03) !important; }
    .relative { position: relative !important; }
    .absolute { position: absolute !important; }
    .left-0 { left: 0 !important; }
    .top-0 { top: 0 !important; }
    .bottom-0 { bottom: 0 !important; }
    .overflow-hidden { overflow: hidden !important; }
    .flex { display: flex !important; }
    .inline-flex { display: inline-flex !important; }
    .flex-row { flex-direction: row !important; }
    .flex-col { flex-direction: column !important; }
    .flex-wrap { flex-wrap: wrap !important; }
    .flex-1 { flex: 1 1 0% !important; }
    .flex-shrink-0 { flex-shrink: 0 !important; }
    .items-center { align-items: center !important; }
    .justify-center { justify-content: center !important; }
    .justify-between { justify-content: space-between !important; }
    .gap-1 { gap: 0.25rem !important; }
    .gap-1\.5 { gap: 0.375rem !important; }
    .gap-2 { gap: 0.5rem !important; }
    .gap-2\.5 { gap: 0.625rem !important; }
    .gap-3 { gap: 0.75rem !important; }
    .space-y-1 > * + * { margin-top: 0.25rem !important; }
    .space-y-3 > * + * { margin-top: 0.75rem !important; }
    .w-1\.5 { width: 0.375rem !important; }
    .w-2\.5 { width: 0.625rem !important; }
    .w-4 { width: 1rem !important; }
    .h-4 { height: 1rem !important; }
    .w-5 { width: 1.25rem !important; }
    .h-5 { height: 1.25rem !important; }
    .w-28 { width: 7rem !important; }
    .w-32 { width: 8rem !important; }
    .w-56 { width: 14rem !important; }
    .w-64 { width: 16rem !important; }
    .w-72 { width: 18rem !important; }
    .min-w-0 { min-width: 0 !important; }
    .min-w-max { min-width: max-content !important; }
    .gap-3 { gap: 0.75rem !important; }
    .gap-6 { gap: 1.5rem !important; }
    .gap-8 { gap: 2rem !important; }
    .px-2 { padding-left: 0.5rem !important; padding-right: 0.5rem !important; }
    .px-4 { padding-left: 1rem !important; padding-right: 1rem !important; }
    .pl-3 { padding-left: 0.75rem !important; }
    .pl-5 { padding-left: 1.25rem !important; }
    .pr-4 { padding-right: 1rem !important; }
    .ml-auto { margin-left: auto !important; }
    @media (min-width: 640px) {
      .sm\:w-64 { width: 16rem !important; }
      .sm\:w-72 { width: 18rem !important; }
      .sm\:gap-6 { gap: 1.5rem !important; }
      .sm\:px-4 { padding-left: 1rem !important; padding-right: 1rem !important; }
      .sm\:text-xs { font-size: 0.75rem !important; line-height: 1rem !important; }
    }
    @media (min-width: 768px) {
      .md\:gap-8 { gap: 2rem !important; }
    }
    .py-3\.5 { padding-top: 0.875rem !important; padding-bottom: 0.875rem !important; }
    .px-2\.5 { padding-left: 0.625rem !important; padding-right: 0.625rem !important; }
    .px-3 { padding-left: 0.75rem !important; padding-right: 0.75rem !important; }
    .py-1 { padding-top: 0.25rem !important; padding-bottom: 0.25rem !important; }
    .py-1\.5 { padding-top: 0.375rem !important; padding-bottom: 0.375rem !important; }
    .p-1 { padding: 0.25rem !important; }
    .p-3 { padding: 0.75rem !important; }
    .p-3\.5 { padding: 0.875rem !important; }
    .pb-2\.5 { padding-bottom: 0.625rem !important; }
    .pb-3 { padding-bottom: 0.75rem !important; }
    .pt-1 { padding-top: 0.25rem !important; }
    .mb-1 { margin-bottom: 0.25rem !important; }
    .mb-2 { margin-bottom: 0.5rem !important; }
    .mb-2\.5 { margin-bottom: 0.625rem !important; }
    .mb-4 { margin-bottom: 1rem !important; }
    .mr-1 { margin-right: 0.25rem !important; }
    .mr-2 { margin-right: 0.5rem !important; }
    .mr-3 { margin-right: 0.75rem !important; }
    .ml-1 { margin-left: 0.25rem !important; }
    .ml-2 { margin-left: 0.5rem !important; }
    .mt-2 { margin-top: 0.5rem !important; }
    .mt-2\.5 { margin-top: 0.625rem !important; }
    .mt-3\.5 { margin-top: 0.875rem !important; }
    .mx-4 { margin-left: 1rem !important; margin-right: 1rem !important; }
    .my-2\.5 { margin-top: 0.625rem !important; margin-bottom: 0.625rem !important; }
    .my-3 { margin-top: 0.75rem !important; margin-bottom: 0.75rem !important; }
    .hover\:bg-amber-100:hover { background-color: #fef3c7 !important; }
    .border { border-width: 1px !important; border-style: solid !important; }
    .border-t { border-top-width: 1px !important; border-top-style: solid !important; }
    .border-b { border-bottom-width: 1px !important; border-bottom-style: solid !important; }
    .border-slate-100 { border-color: #f1f5f9 !important; }
    .border-slate-200 { border-color: #e2e8f0 !important; }
    .border-slate-200\/80 { border-color: rgba(226, 232, 240, 0.8) !important; }
    .border-slate-200\/90 { border-color: rgba(226, 232, 240, 0.9) !important; }
    .border-zinc-200 { border-color: #e4e4e7 !important; }
    .border-zinc-200\/80 { border-color: rgba(228, 228, 231, 0.8) !important; }
    .border-zinc-200\/90 { border-color: rgba(228, 228, 231, 0.9) !important; }
    .border-\[\#35647e\],
    .border-teal-deep {
      border-color: var(--teal-deep, #35647e) !important;
    }
    .card.master-ro-card,
    .card.carry-in-ro-card,
    #dayEntry.top-card,
    .panel.top-card,
    #payPeriodCard,
    #payPeriodStatsCard,
    #payPeriodEarningsCard {
      border-color: var(--teal-deep, #35647e) !important;
    }
    .bg-\[\#f4f4f5\], .bg-zinc-100 { background-color: #f4f4f5 !important; }
    .text-zinc-900 { color: #18181b !important; }
    .px-6 { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }
    .p-6 { padding: 1.5rem !important; }
    .mx-auto { margin-left: auto !important; margin-right: auto !important; }
    .w-full { width: 100% !important; }
    .max-w-\[1750px\] { max-width: 1750px !important; }
    @media (min-width: 768px) {
      .md\:px-8 { padding-left: 2rem !important; padding-right: 2rem !important; }
    }
    .min-h-screen { min-height: 100vh !important; }
    .bg-slate-200\/80 { background-color: rgba(226, 232, 240, 0.8) !important; }
    .bg-slate-300 { background-color: #cbd5e1 !important; }
    .bg-white { background-color: var(--card, #ffffff) !important; }
    .bg-white\/80 { background-color: rgba(255, 255, 255, 0.8) !important; }
    .bg-white\/90 { background-color: rgba(255, 255, 255, 0.9) !important; }
    .backdrop-blur-md { backdrop-filter: blur(12px) !important; -webkit-backdrop-filter: blur(12px) !important; }
    .shadow-sm { box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.06), 0 1px 2px -1px rgba(15, 23, 42, 0.04) !important; }
    .text-white { color: #ffffff !important; }
    .text-xl { font-size: 1.25rem !important; line-height: 1.75rem !important; }
    .text-lg { font-size: 1.125rem !important; line-height: 1.75rem !important; }
    .font-black { font-weight: 900 !important; }
    .tracking-tight { letter-spacing: -0.025em !important; }
    .tracking-wide { letter-spacing: 0.025em !important; }
    .tracking-wider { letter-spacing: 0.05em !important; }
    .uppercase { text-transform: uppercase !important; }
    .italic { font-style: italic !important; }
    .truncate { overflow: hidden !important; text-overflow: ellipsis !important; white-space: nowrap !important; }
    .cursor-pointer { cursor: pointer !important; }
    .select-none { user-select: none !important; }
    .bg-rose-700 { background-color: #be123c !important; }
    .bg-rose-600 { background-color: #e11d48 !important; }
    .text-rose-600 { color: #e11d48 !important; }
    .bg-rose-50 { background-color: #fff1f2 !important; }
    .hover\:bg-rose-50:hover { background-color: #fff1f2 !important; }
    .hover\:bg-slate-50:hover { background-color: #f8fafc !important; }
    .hover\:text-slate-700:hover { color: #334155 !important; }
    .border-rose-200 { border-color: #fecdd3 !important; }
    .bg-amber-600 { background-color: #d97706 !important; }
    .bg-amber-500 { background-color: #f59e0b !important; }
    .bg-amber-50 { background-color: #fffbeb !important; }
    .border-amber-200 { border-color: #fde68a !important; }
    .text-amber-700 { color: #b45309 !important; }
    .bg-emerald-700 { background-color: #047857 !important; }
    .bg-emerald-500 { background-color: #10b981 !important; }
    .bg-emerald-600 { background-color: #059669 !important; }
    .bg-emerald-50 { background-color: #f0fdf4 !important; }
    .border-emerald-200 { border-color: #a7f3d0 !important; }
    .text-emerald-700 { color: #047857 !important; }
    .bg-blue-600 { background-color: #2563eb !important; }
    .bg-blue-50\/50 { background-color: rgba(239, 246, 255, 0.5) !important; }
    .bg-blue-50\/60 { background-color: rgba(239, 246, 255, 0.6) !important; }
    .border-blue-100 { border-color: #dbeafe !important; }
    .border-blue-200\/60 { border-color: rgba(191, 219, 254, 0.6) !important; }
    .text-blue-900 { color: #1e3a8a !important; }
    .text-slate-800 { color: #1e293b !important; }
    .border-slate-200\/80 { border-color: rgba(226, 232, 240, 0.8) !important; }
    .rotate-180 { transform: rotate(180deg) !important; }
    .transition-transform { transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important; }
    .duration-200 { transition-duration: 200ms !important; }

    .text-slate-950 { color: #020617 !important; }
    .text-slate-900 { color: #0f172a !important; }
    .text-slate-600 { color: #475569 !important; }
    .text-slate-500 { color: #64748b !important; }
    .text-slate-400 { color: #94a3b8 !important; }
    .text-slate-300 { color: #cbd5e1 !important; }
    .text-slate-200 { color: #e2e8f0 !important; }
    .text-slate-100 { color: #f1f5f9 !important; }
    .bg-slate-50 { background-color: #f8fafc !important; }
    .bg-slate-100 { background-color: #f1f5f9 !important; }
    .border-slate-300 { border-color: #cbd5e1 !important; }
    .font-extrabold { font-weight: 800 !important; }
    .font-medium { font-weight: 500 !important; }
    .text-base { font-size: 1rem !important; line-height: 1.5rem !important; }
    .text-sm { font-size: 0.875rem !important; line-height: 1.25rem !important; }
    .text-xs { font-size: 0.75rem !important; line-height: 1rem !important; }
    .text-\[11px\] { font-size: 11px !important; line-height: 1rem !important; }
    .p-2 { padding: 0.5rem !important; }
    .p-2\.5 { padding: 0.625rem !important; }
    .rounded-lg { border-radius: 0.5rem !important; }
    .mx-6 { margin-left: 1.5rem !important; margin-right: 1.5rem !important; }
    .mx-8 { margin-left: 2rem !important; margin-right: 2rem !important; }
    .my-4 { margin-top: 1rem !important; margin-bottom: 1rem !important; }
    .h-px { height: 1px !important; }
    .bg-gradient-to-r { background-image: linear-gradient(to right, transparent, #cbd5e1, transparent) !important; }
    .text-red-600 { color: #dc2626 !important; }
    .text-amber-600,
    .text-\[\#D97706\] { color: #d97706 !important; }

    /* Higher specificity overrides for .stat b elements in Pay Period & Earnings Card */
    .stat b.text-rose-700,
    .stat b.text-red-600,
    #shortHours.text-rose-700,
    #shortHours.text-red-600,
    #checkMissedPay.text-rose-700,
    #checkMissedPay.text-red-600 {
      color: #be123c !important;
    }
    .stat b.text-amber-600,
    .stat b.text-\[\#D97706\],
    #checkCarryIn.text-amber-600,
    #checkCarryIn.text-\[\#D97706\] {
      color: #d97706 !important;
    }
    .stat b.text-slate-900,
    #checkCarryIn.text-slate-900,
    #shortHours.text-slate-900,
    #checkMissedPay.text-slate-900 {
      color: #0f172a !important;
    }
    .text-rose-700 { color: #be123c !important; }
    .bg-amber-100 { background-color: #fef3c7 !important; }
    .text-amber-900 { color: #78350f !important; }
    .border-amber-300 { border-color: #fcd34d !important; }
    .font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important; }
    .font-bold { font-weight: 700 !important; }
    .font-semibold { font-weight: 600 !important; }
    .px-2 { padding-left: 0.5rem !important; padding-right: 0.5rem !important; }
    .py-0\.5 { padding-top: 0.125rem !important; padding-bottom: 0.125rem !important; }
    .rounded { border-radius: 0.25rem !important; }

    [data-theme="dark"] .bg-white { background-color: var(--card) !important; }
    [data-theme="dark"] .bg-\[\#f4f4f5\],
    [data-theme="dark"] .bg-zinc-100,
    [data-theme="high-contrast"] .bg-\[\#f4f4f5\],
    [data-theme="high-contrast"] .bg-zinc-100 { background-color: var(--paper) !important; }
    [data-theme="dark"] .text-zinc-900,
    [data-theme="high-contrast"] .text-zinc-900 { color: var(--ink) !important; }
    [data-theme="dark"] .border-zinc-200,
    [data-theme="dark"] .border-zinc-200\/80,
    [data-theme="dark"] .border-zinc-200\/90 { border-color: rgba(63, 63, 70, 0.85) !important; }
    [data-theme="high-contrast"] .border-zinc-200,
    [data-theme="high-contrast"] .border-zinc-200\/80,
    [data-theme="high-contrast"] .border-zinc-200\/90 { border-color: var(--line) !important; }
    [data-theme="dark"] .bg-white\/80 { background-color: rgba(15, 23, 42, 0.8) !important; }
    [data-theme="dark"] .bg-blue-50\/50,
    [data-theme="dark"] .bg-blue-50\/60 { background-color: rgba(30, 58, 138, 0.2) !important; }
    [data-theme="dark"] .border-blue-100 { border-color: rgba(30, 58, 138, 0.4) !important; }
    [data-theme="dark"] .border-blue-200\/60 { border-color: rgba(59, 130, 246, 0.3) !important; }
    [data-theme="dark"] .text-blue-900 { color: #93c5fd !important; }
    [data-theme="dark"] .text-slate-800 { color: #cbd5e1 !important; }
    [data-theme="dark"] .border-slate-100,
    [data-theme="dark"] .border-slate-200,
    [data-theme="dark"] .border-slate-200\/80,
    [data-theme="dark"] .border-slate-200\/90 { border-color: rgba(51, 65, 85, 0.8) !important; }
    [data-theme="dark"] .bg-slate-200\/80 { background-color: rgba(51, 65, 85, 0.85) !important; }
    [data-theme="dark"] .bg-slate-300 { background-color: #475569 !important; }
    [data-theme="dark"] .bg-rose-50 { background-color: rgba(136, 19, 55, 0.2) !important; }
    [data-theme="dark"] .border-rose-200 { border-color: rgba(225, 29, 72, 0.3) !important; }
    [data-theme="dark"] .bg-amber-50 { background-color: rgba(120, 53, 15, 0.2) !important; }
    [data-theme="dark"] .border-amber-200 { border-color: rgba(217, 119, 6, 0.3) !important; }
    [data-theme="dark"] .bg-emerald-50 { background-color: rgba(6, 78, 59, 0.2) !important; }
    [data-theme="dark"] .border-emerald-200 { border-color: rgba(5, 150, 105, 0.3) !important; }
    [data-theme="dark"] .text-emerald-700 { color: #34d399 !important; }
    [data-theme="dark"] .text-slate-950 { color: #f8fafc !important; }
    [data-theme="dark"] .text-slate-900 { color: #f8fafc !important; }
    [data-theme="dark"] .text-slate-700 { color: #cbd5e1 !important; }
    [data-theme="dark"] .text-slate-600 { color: #94a3b8 !important; }
    [data-theme="dark"] .text-slate-500 { color: #94a3b8 !important; }
    [data-theme="dark"] .text-slate-400 { color: #cbd5e1 !important; }
    [data-theme="dark"] .text-slate-300 { color: #e2e8f0 !important; }
    [data-theme="dark"] .bg-slate-50 { background-color: rgba(30, 41, 59, 0.5) !important; }
    [data-theme="dark"] .bg-slate-100 { background-color: rgba(30, 41, 59, 0.8) !important; }
    [data-theme="dark"] .border-slate-300 { border-color: rgba(71, 85, 105, 0.8) !important; }
    [data-theme="dark"] .bg-gradient-to-r { background-image: linear-gradient(to right, transparent, #334155, transparent) !important; }
    [data-theme="dark"] .text-rose-700 { color: #fda4af !important; }
    [data-theme="dark"] .text-red-600 { color: #f87171 !important; }
    [data-theme="dark"] .text-amber-600,
    [data-theme="dark"] .text-\[\#D97706\] { color: #fbbf24 !important; }
    [data-theme="dark"] .stat b.text-rose-700,
    [data-theme="dark"] .stat b.text-red-600,
    [data-theme="dark"] #shortHours.text-rose-700,
    [data-theme="dark"] #shortHours.text-red-600,
    [data-theme="dark"] #checkMissedPay.text-rose-700,
    [data-theme="dark"] #checkMissedPay.text-red-600 {
      color: #fda4af !important;
    }
    [data-theme="dark"] .stat b.text-amber-600,
    [data-theme="dark"] .stat b.text-\[\#D97706\],
    [data-theme="dark"] #checkCarryIn.text-amber-600,
    [data-theme="dark"] #checkCarryIn.text-\[\#D97706\] {
      color: #fbbf24 !important;
    }
    [data-theme="dark"] .stat b.text-slate-900,
    [data-theme="dark"] #checkCarryIn.text-slate-900,
    [data-theme="dark"] #shortHours.text-slate-900,
    [data-theme="dark"] #checkMissedPay.text-slate-900 {
      color: #f8fafc !important;
    }
    [data-theme="dark"] .bg-amber-100 { background-color: rgba(254, 243, 199, 0.15) !important; }
    [data-theme="dark"] .text-amber-900 { color: #fef3c7 !important; }
    [data-theme="dark"] .border-amber-300 { border-color: rgba(252, 211, 77, 0.4) !important; }

    .master-ro-card {
      transition: transform 0.15s ease, box-shadow 0.15s ease;
    }
    .master-ro-card:hover {
      box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    }

    .stat { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
    .stat b { font-variant-numeric: tabular-nums; }
    
    .chips { display: flex; gap: 8px; flex-wrap: wrap; }
    .chip { background: var(--menu-bg); border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px; font-size: 13px; color: var(--ink); }
    .chip.short { background: var(--gold-soft); border-color: var(--gold); color: var(--gold); }
    .chip.unpaid { background: var(--copper-soft); border-color: var(--copper); color: var(--copper); }
    .chip.carry { background: var(--gold-soft); border-color: #e6d7b4; color: var(--gold); }
    
    .line { padding: 16px 16px 14px; margin-bottom: 12px; }
    .line.head { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
    .ro { font-family: var(--font-display); font-size: 26px; margin: 0; }
    .badge { font-size: 12px; border-radius: 999px; padding: 3px 8px; background: var(--teal-soft); color: var(--teal-deep); border: 1px solid var(--teal-deep); font-weight: 600; }
    .badge.split { background: var(--gold-soft); color: var(--gold); }
    .badge.partial-pay { background: var(--gold-soft); color: var(--gold); border: 1px solid var(--gold); }
    .badge.bay-hold { background: var(--day-hover); color: var(--muted); border: 1px solid var(--line); }
    .badge.short { background: var(--gold-soft); color: var(--gold); border-color: var(--gold); }
    .badge.unpaid { background: var(--copper-soft); color: var(--copper); border-color: var(--copper); }
    .badge.leak { background: var(--copper-soft); color: var(--copper); border: 1px solid var(--copper); margin-left: 6px;}
    .ops { color: var(--muted); font-size: 13px; margin: 6px 0 12px; }
    
    .math { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
    .math label { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); display: block; }
    .math b, .math input { font-variant-numeric: tabular-nums; font-size: 18px; }
    .mini { border-radius: 999px; border: 1px solid var(--line); background: var(--menu-bg); padding: 6px 10px; font-size: 13px; color: var(--ink); cursor: pointer;}
    .empty { padding: 28px; color: var(--muted); }
    .two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
    .three { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
    .hidden { display: none !important; }
    .entry { padding: 14px; margin-bottom: 12px; }
    
    .gap-short { color: var(--gold) !important; font-weight: bold; }
    .gap-unpaid { color: var(--copper) !important; font-weight: bold; }
    .gap-zero { color: var(--paid-text) !important; }
    [data-theme="dark"] .gap-zero { color: #ffffff !important; }

    .landing-wrapper { width: 100%; min-height: 100vh; background-color: #f8fafc; color: #0f172a; margin: 0 auto; padding: 0; }
    .hero-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--teal-soft); color: var(--teal-deep); padding: 6px 14px; border-radius: 999px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 16px; border: 1px solid rgba(42,212,200,0.3); }
    .hero-title { font-family: var(--font-display); font-size: 46px; line-height: 1.15; font-weight: 700; margin: 0 0 16px; color: var(--ink); }
    .hero-sub { font-size: 18px; line-height: 1.6; color: var(--muted); max-width: 740px; margin: 0 auto 30px; }

    .roi-card {
      background: var(--card); border: 2px solid var(--teal-deep); border-radius: 20px;
      padding: 28px; margin: 20px auto 40px; max-width: 860px; box-shadow: var(--shadow); text-align: left;
    }
    .roi-slider {
      -webkit-appearance: none; width: 100%; height: 8px; border-radius: 5px;
      background: var(--line); outline: none; margin: 10px 0 16px; cursor: pointer; accent-color: var(--teal-deep);
    }
    .roi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 14px; }
    @media (max-width: 640px) { .roi-grid { grid-template-columns: 1fr; } }
    .roi-stat { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 14px; text-align: center; }
    .roi-stat-lbl { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 700; display: block; margin-bottom: 4px;}
    .roi-stat-val { font-family: var(--font-display); font-size: 26px; font-weight: 800; }

    .pillar-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 24px auto 44px; max-width: 1000px; text-align: left; }
    @media (max-width: 900px) { .pillar-grid { grid-template-columns: 1fr; } }
    .pillar-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px; position: relative; }
    .pillar-num { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; color: var(--teal-deep); text-transform: uppercase; margin-bottom: 6px; display: block; }
    .pillar-title { font-family: var(--font-display); font-size: 18px; font-weight: 600; margin: 0 0 8px; color: var(--ink); }
    .pillar-desc { font-size: 13.5px; color: var(--muted); line-height: 1.5; margin: 0; }

    .showcase-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 1000px; margin: 30px auto 44px; text-align: left; }
    @media (max-width: 860px) { .showcase-grid { grid-template-columns: 1fr; } }
    .showcase-card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 28px; box-shadow: var(--shadow); }
    .showcase-badge { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; padding: 4px 10px; border-radius: 999px; margin-bottom: 12px; }
    .badge-ai { background: rgba(42, 212, 200, 0.15); color: var(--teal-deep); border: 1px solid var(--teal-deep); }
    .badge-hub { background: rgba(224, 122, 98, 0.15); color: var(--copper); border: 1px solid var(--copper); }
    .showcase-title { font-family: var(--font-display); font-size: 24px; font-weight: 700; margin: 0 0 10px; }
    .showcase-p { font-size: 14px; color: var(--muted); line-height: 1.6; margin: 0 0 18px; }
    .feature-bullets { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 13.5px; }
    .feature-bullets li { display: flex; align-items: start; gap: 8px; line-height: 1.4; }

    .compare-container { max-width: 960px; margin: 40px auto; text-align: left; }
    .compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
    @media (max-width: 768px) { .compare-grid { grid-template-columns: 1fr; } }
    .compare-box { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 24px; }
    .terminal-sample { background: #0d1117; color: #58a6ff; font-family: monospace; font-size: 12px; line-height: 1.4; padding: 14px; border-radius: 8px; margin-top: 10px; border: 1px solid #30363d; }

    .pricing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 860px; margin: 30px auto; text-align: left; }
    @media (max-width: 768px) { .pricing-grid { grid-template-columns: 1fr; } }
    .plan-card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 28px; position: relative; }
    .plan-card.featured { border-color: var(--teal-deep); box-shadow: 0 12px 35px rgba(13, 148, 136, 0.15); }
    .plan-tag { position: absolute; top: -12px; right: 24px; background: var(--teal-deep); color: #ffffff; padding: 4px 12px; font-size: 11px; font-weight: 700; border-radius: 999px; text-transform: uppercase; }
    .plan-price { font-family: var(--font-display); font-size: 40px; font-weight: 700; margin: 14px 0 6px; }
    .plan-features { list-style: none; padding: 0; margin: 20px 0 28px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
    .plan-features li { display: flex; align-items: center; gap: 8px; }

    .faq-wrapper { max-width: 820px; margin: 50px auto 30px; text-align: left; }
    .faq-item { border-bottom: 1px solid var(--line); padding: 16px 0; }
    .faq-q { font-weight: 600; font-size: 16px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
    .faq-a { color: var(--muted); font-size: 14px; line-height: 1.6; margin-top: 8px; display: none; }
    .faq-item.active .faq-a { display: block; }
    
    .enterprise-banner {
      background: linear-gradient(135deg, rgba(20, 184, 166, 0.12), rgba(224, 122, 98, 0.12));
      border: 1px solid var(--teal-deep); border-radius: 20px; padding: 32px; max-width: 960px;
      margin: 40px auto; text-align: center;
    }

    .preset-btn {
      padding: 6px 12px; font-size: 12px; border-radius: 6px; border: 1px solid var(--line);
      background: var(--input-bg); color: var(--ink); cursor: pointer; transition: all 0.15s ease;
    }
    .preset-btn:hover { border-color: var(--teal-deep); color: var(--teal-deep); }

    /* Premium AI Glow Card */
    .ai-card-glow {
      background: var(--card, #ffffff) !important;
      border: 1.5px solid var(--teal-deep) !important;
      position: relative;
      overflow: hidden;
    }
    [data-theme="dark"] .ai-card-glow {
      background: linear-gradient(135deg, rgba(42, 212, 200, 0.15) 0%, rgba(224, 122, 98, 0.14) 100%) !important;
      border-color: var(--teal) !important;
    }
    .badge-ai-pill {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      font-size: 10.5px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      padding: 3px 10px;
      border-radius: 999px;
      background: var(--paper);
      color: var(--teal-deep);
      border: 1px solid var(--teal-deep);
      margin-bottom: 6px;
      box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    }
    [data-theme="dark"] .badge-ai-pill {
      background: var(--card);
      color: var(--teal);
      border-color: var(--teal);
    }

    .high-val-box {
      background: var(--copper-soft);
      border: 2px solid var(--copper);
      border-radius: 12px;
      padding: 10px 14px;
      margin-bottom: 12px;
      font-size: 13px;
      font-weight: 600;
      color: var(--copper);
      display: flex;
      align-items: center;
      gap: 8px;
    }

    footer { margin-top: 36px; padding: 20px 0 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; line-height: 1.6; }
    dialog {
      border: 0;
      border-radius: 18px;
      padding: 0;
      max-width: 650px;
      width: calc(100% - 28px);
      background: transparent;
      position: fixed !important;
      inset: 0 !important;
      margin: auto !important;
      z-index: 99999 !important;
    }
    dialog:not([open]) {
      display: none !important;
      visibility: hidden !important;
      pointer-events: none !important;
      opacity: 0 !important;
      height: 0 !important;
      min-height: 0 !important;
      max-height: 0 !important;
      overflow: hidden !important;
    }
    dialog[open] {
      display: flex !important;
      position: fixed !important;
      inset: 0 !important;
      margin: auto !important;
      align-items: center !important;
      justify-content: center !important;
      visibility: visible !important;
      pointer-events: auto !important;
      opacity: 1 !important;
      z-index: 99999 !important;
    }
    dialog::backdrop { background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(4px); z-index: 99998 !important; }
    .sheet { padding: 24px; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 18px; max-height: 90vh; overflow-y: auto;}

    .avionics-deck {
      display: flex;
      flex-direction: column;
      gap: 20px;
      margin-top: 10px;
    }
    .avionics-ribbon {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 16px;
    }
    @media (max-width: 1024px) { .avionics-ribbon { grid-template-columns: 1fr 1fr; } }
    @media (max-width: 600px) { .avionics-ribbon { grid-template-columns: 1fr; } }
    .ribbon-cell {
      background: var(--card);
      border: 1px solid var(--line);
      border-radius: 16px;
      padding: 18px;
      display: flex;
      flex-direction: column;
      gap: 4px;
      box-shadow: var(--shadow);
    }
    .ribbon-label { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--muted); letter-spacing: 0.08em; }
    .ribbon-val { font-family: var(--font-display); font-size: 28px; font-weight: 700; color: var(--ink); }

    .wrench-table { width: 100%; border-collapse: collapse; font-size: 13.5px; margin-top: 8px; }
    .wrench-table th { text-align: left; padding: 8px 10px; font-size: 11px; text-transform: uppercase; color: var(--muted); border-bottom: 2px solid var(--line); }
    .wrench-table td { padding: 10px; border-bottom: 1px solid var(--line); }
    .drag-active { background: var(--teal-soft) !important; border-color: var(--teal) !important; box-shadow: 0 0 0 3px rgba(42, 212, 200, 0.25); }

    /* Phase 6B: Print & PDF Audit Optimization Styles */
    @media print {
      html, body {
        background: #ffffff !important;
        color: #000000 !important;
        font-size: 10.5pt !important;
        line-height: 1.3 !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
      }

      /* Hide interactive controls: navbars, buttons, dropdowns, dropzones, filters, modals */
      header.top,
      footer,
      .top-left-nav,
      .top-center-nav,
      .header-actions,
      #mainMenu,
      .dropdown,
      .line-tools,
      .view-toggle-capsule,
      .ledger-filter-btn,
      #themeToggle,
      #menuToggle,
      #rthsUpload,
      #triggerUploadBtn,
      #cdkDropzone,
      #cdkDropzoneInline,
      #jobFormFieldsWrapper,
      #dayEntry,
      #unlockPeriodBtn,
      .del-btn,
      .recall-btn,
      .status-select-badge,
      button,
      input,
      select,
      dialog,
      .cal-head button,
      .preset-btn,
      .badge-ai-pill,
      #headerSwitcherSlot,
      #marketingSection,
      #setupFormSection,
      #diagnosticMenuSection,
      #diagnosticMenuSection hr {
        display: none !important;
      }

      /* Phase 9 Formal Service Management Dispute Packet Print Optimization */
      body.printing-packet dialog#disputePacketModal {
        display: block !important;
        position: static !important;
        max-width: 100% !important;
        width: 100% !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
      }
      body.printing-packet dialog#disputePacketModal .modal-actions-bar,
      body.printing-packet dialog#disputePacketModal button {
        display: none !important;
      }
      body.printing-packet > *:not(dialog#disputePacketModal) {
        display: none !important;
      }

      .wrap {
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
      }

      .layout {
        display: block !important;
      }

      aside, main {
        width: 100% !important;
        display: block !important;
      }

      /* High-contrast cards, tables, borders */
      .card, .panel {
        background: #ffffff !important;
        color: #000000 !important;
        border: 1px solid #333333 !important;
        box-shadow: none !important;
        border-radius: 4px !important;
        margin-bottom: 12pt !important;
        page-break-inside: avoid;
        break-inside: avoid;
      }

      table, .wrench-table, #entriesAuditTable {
        width: 100% !important;
        border-collapse: collapse !important;
        color: #000000 !important;
      }

      th, td {
        border: 1px solid #444444 !important;
        padding: 5pt 7pt !important;
        color: #000000 !important;
        page-break-inside: avoid;
        break-inside: avoid;
      }

      th {
        background: #f0f0f0 !important;
        font-weight: bold !important;
      }

      .line,
      .stat,
      .ribbon-cell,
      #historicalAnalyticsTrendsCard,
      #ledgerContestedSummaryChips,
      .audit-summary-block {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
      }

      b, strong, span, p, h1, h2, h3, h4 {
        color: #000000 !important;
      }
    }
    /* Phase 12 Mobile-First In-Bay Responsive Layout & Touch Controls */
    .mobile-ledger-card-deck {
      display: none;
      flex-direction: column;
      gap: 12px;
      margin-top: 10px;
      margin-bottom: 16px;
    }

    @media (max-width: 768px) {
      #ledgerAuditTableWrapper {
        display: none !important;
      }
      .mobile-ledger-card-deck {
        display: flex !important;
      }
    }

    .inbay-card {
      background: var(--card);
      border: 1px solid var(--line);
      border-radius: 12px;
      padding: 14px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.06);
      transition: border-color 0.15s ease, box-shadow 0.15s ease;
    }

    .inbay-card:active {
      border-color: var(--teal-deep);
    }

    /* Phase 16: Ergonomic 48px Touch Targets for In-Bay & Gloved Hands */
    .inbay-touch-btn {
      min-width: 48px;
      min-height: 48px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 10px 14px;
      border-radius: 10px;
      font-size: 13px;
      font-weight: 700;
      cursor: pointer;
      touch-action: manipulation;
      user-select: none;
      -webkit-tap-highlight-color: transparent;
    }

    #inBayScanBtn {
      min-height: 48px;
      padding: 10px 16px !important;
      font-size: 13px !important;
      font-weight: 700;
      border-radius: 10px;
    }

    /* Force Table or Cards override classes */
    body.layout-force-cards #ledgerAuditTableWrapper {
      display: none !important;
    }
    body.layout-force-cards .mobile-ledger-card-deck {
      display: flex !important;
    }
    body.layout-force-table #ledgerAuditTableWrapper {
      display: block !important;
    }
    body.layout-force-table .mobile-ledger-card-deck {
      display: none !important;
    }

    .inbay-touch-btn.touch-approve {
      background: var(--ok);
      color: #fff;
      border: 1px solid var(--ok);
    }

    .inbay-touch-btn.touch-flag {
      background: transparent;
      color: var(--copper);
      border: 1px solid var(--copper);
    }

    .inbay-touch-btn.touch-punch {
      background: var(--teal-soft);
      color: var(--teal-deep);
      border: 1px solid var(--teal-deep);
    }

    .inbay-touch-btn.touch-expand {
      background: var(--paper);
      color: var(--ink);
      border: 1px solid var(--line);
    }

    @media (max-width: 480px) {
      .inbay-card {
        padding: 11px;
        border-radius: 10px;
      }
      .inbay-touch-btn {
        padding: 8px 10px;
        font-size: 12px;
        flex: 1;
        text-align: center;
      }
    }
    /* Phase 13 In-Bay Camera Scanner Sweep Animation */
    @keyframes scannerSweep {
      0% { transform: translateY(-80px); opacity: 0.2; }
      50% { opacity: 1; }
      100% { transform: translateY(80px); opacity: 0.2; }
    }
  
    /* Foreman IQ Action Bubble Lights & Collapsible Audit Notices */
    @keyframes pulse-amber {
      0% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
      }
      70% {
        box-shadow: 0 0 0 7px rgba(245, 158, 11, 0);
      }
      100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
      }
    }
    .action-bubble-light {
      width: 20px;
      height: 20px;
      border-radius: 50%;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      font-size: 11px;
      font-weight: 800;
      line-height: 1;
      transition: transform 0.15s ease, box-shadow 0.15s ease;
      user-select: none;
      flex-shrink: 0;
      border: 2px solid transparent;
      box-sizing: border-box;
    }
    .action-bubble-light:hover {
      transform: scale(1.22);
    }
    .action-bubble-light.neutral {
      background: var(--paper, #1e293b);
      border-color: #64748b;
      color: #94a3b8;
    }
    .action-bubble-light.amber {
      background: #f59e0b;
      border-color: #d97706;
      color: #ffffff;
      animation: pulse-amber 1.8s infinite;
    }
    .action-bubble-light.red {
      background: #ef4444;
      border-color: #b91c1c;
      color: #ffffff;
      box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
    }
    .action-bubble-light.green {
      background: #10b981;
      border-color: #059669;
      color: #ffffff;
    }
    .audit-notice-wrapper {
      position: relative;
      display: inline-block;
    }
    .audit-notice-drawer {
      animation: fadeIn 0.15s ease;
    }

    /* Subtle, muted placeholders across entry form */
    #dayEntry input::placeholder,
    #dayEntry textarea::placeholder,
    #dayEntry select::placeholder,
    .placeholder-muted::placeholder {
      color: #94a3b8 !important;
      opacity: 0.5 !important;
    }

    /* Translucent Neon Glass Badges for Pay Types (W / C / I) */
    .pay-type-pill {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 28px;
      height: 20px;
      padding: 0 6px;
      border-radius: 9999px;
      font-family: inherit;
      font-size: 11px;
      font-weight: 800;
      line-height: 1;
      color: #ffffff;
      text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
      user-select: none;
      backdrop-filter: blur(4px);
      -webkit-backdrop-filter: blur(4px);
      transition: box-shadow 0.2s ease, transform 0.15s ease;
      flex-shrink: 0;
      box-sizing: border-box;
    }
    .pay-type-pill.badge-c {
      background: linear-gradient(180deg, rgba(34, 197, 94, 0.45) 0%, rgba(34, 197, 94, 0.25) 100%);
      border: 1px solid #22c55e;
      box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.6), 0 0 6px rgba(34, 197, 94, 0.45), 0 0 12px rgba(34, 197, 94, 0.2);
    }
    .pay-type-pill.badge-w {
      background: linear-gradient(180deg, rgba(239, 68, 68, 0.45) 0%, rgba(239, 68, 68, 0.25) 100%);
      border: 1px solid #ef4444;
      box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.6), 0 0 6px rgba(239, 68, 68, 0.45), 0 0 12px rgba(239, 68, 68, 0.2);
    }
    .pay-type-pill.badge-i {
      background: linear-gradient(180deg, rgba(59, 130, 246, 0.45) 0%, rgba(59, 130, 246, 0.25) 100%);
      border: 1px solid #3b82f6;
      box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.6), 0 0 6px rgba(59, 130, 246, 0.45), 0 0 12px rgba(59, 130, 246, 0.2);
    }

.gap-0\.5 { gap: 0.125rem !important; }
.leading-tight { line-height: 1.25 !important; }
.min-w-\[120px\] { min-width: 120px !important; }
.min-w-\[130px\] { min-width: 130px !important; }
.min-w-\[125px\] { min-width: 125px !important; }
.min-w-\[135px\] { min-width: 135px !important; }
.text-sky-800 { color: #075985 !important; }
.bg-slate-100\/80 { background-color: rgba(241, 245, 249, 0.8) !important; }
.rounded-2xl { border-radius: 1rem !important; }
.border-sky-900\/30 { border-color: rgba(12, 74, 110, 0.3) !important; }
.gap-4 { gap: 1rem !important; }
.max-w-2xl { max-width: 42rem !important; }
.max-w-3xl { max-width: 48rem !important; }
.flex-\[2\] { flex: 2 2 0% !important; }
.flex-\[1\.2\] { flex: 1.2 1.2 0% !important; }
.min-w-\[180px\] { min-width: 180px !important; }
.w-44 { width: 11rem !important; }
.whitespace-nowrap { white-space: nowrap !important; }
.pb-1 { padding-bottom: 0.25rem !important; }
.focus\:ring-1:focus { outline: none !important; box-shadow: 0 0 0 1px #075985 !important; }
.focus\:ring-sky-800:focus { border-color: #075985 !important; }

/* Marketing Hero: Playable Flagged vs. Sold Audit (#auditHero) */
.wrap:has(> #marketingView:not(.hidden)) { max-width: none; padding: 0 !important; }
#marketingView { --ah-ink: #0f172a; --ah-blue: #2563eb; --ah-mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace; --ah-paper: #fff; --ah-bar: #f1f5f9; --font-display: 'Inter', system-ui, sans-serif; --font-sans: 'Inter', system-ui, sans-serif; font-family: var(--font-sans); }
#marketingView .ah [hidden], #marketingView .ah-nav [hidden] { display: none !important; }

#marketingView .ah-nav { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); border-bottom: 1px solid #e2e8f0; }
#marketingView .ah-nav-inner { max-width: 1320px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
#marketingView .ah-nav-links { display: flex; gap: 28px; }
#marketingView .ah-nav-links a { color: #475569; font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }
#marketingView .ah-nav-links a:hover { color: var(--ah-ink); }
#marketingView .ah-nav-actions { display: flex; align-items: center; gap: 8px; }
#marketingView .ah-nav-ghost, #marketingView .ah-nav-solid { width: auto; min-height: 40px; padding: 8px 16px; border-radius: 10px; font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer; }
#marketingView .ah-nav-ghost { background: transparent; border: 1px solid transparent; color: #475569; }
#marketingView .ah-nav-ghost:hover { color: var(--ah-ink); border-color: #cbd5e1; }
#marketingView .ah-nav-solid { background: var(--ah-ink); border: 1px solid var(--ah-ink); color: #fff; }
#marketingView .ah-nav-solid:hover { background: #1e293b; }

#marketingView .ah { background: #fff; color: var(--ah-ink); border-bottom: 1px solid #e2e8f0; }
#marketingView .ah-inner { max-width: 1320px; margin: 0 auto; padding: 56px 24px 64px; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: start; }
#marketingView .ah-copy { text-align: left; }
#marketingView .ah-kicker { font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ah-blue); margin-bottom: 16px; }
#marketingView .ah-headline { margin: 0; font-family: var(--font-display); font-size: clamp(38px, 4.7vw, 66px); line-height: 1.04; font-weight: 800; letter-spacing: -0.03em; color: var(--ah-ink); text-align: left; }
#marketingView .ah-headline em { font-style: normal; color: var(--ah-blue); }
#marketingView .ah-intro { margin: 22px 0 0; font-size: 17px; line-height: 1.6; color: #475569; max-width: 34em; }

#marketingView .ah-controls { margin-top: 26px; display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap; }
#marketingView .ah-run { flex: 0 0 auto; width: auto; min-height: 54px; padding: 14px 30px; border: 0; border-radius: 12px; background: var(--ah-blue); color: #fff; font-size: 17px; font-weight: 700; cursor: pointer; box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28); transition: transform 0.12s ease, background-color 0.12s ease; }
#marketingView .ah-run:hover:not(:disabled) { background: #1d4ed8; transform: translateY(-1px); }
#marketingView .ah-run:disabled { opacity: 0.6; cursor: progress; box-shadow: none; }
#marketingView .ah.is-done .ah-run { background: #fff; color: var(--ah-ink); border: 1px solid #cbd5e1; min-height: 44px; padding: 10px 18px; font-size: 14px; font-weight: 600; box-shadow: none; }
#marketingView .ah.is-done .ah-run:hover:not(:disabled) { background: #f1f5f9; }
#marketingView .ah-run:focus-visible, #marketingView .ah-cta:focus-visible, #marketingView .ah-nav-solid:focus-visible, #marketingView .ah-nav-ghost:focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; }

/* Tenth Wall: one tile per flagged tenth */
#marketingView .ah-count { margin-top: 22px; padding: 16px 18px 18px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; }
#marketingView .ah-count-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #475569; }
#marketingView .ah-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 12px 0 0; padding: 0; font-size: 12px; color: #475569; }
#marketingView .ah-legend li { display: flex; align-items: center; gap: 6px; margin: 0; }
#marketingView .ah-legend li::before { content: ''; width: 10px; height: 10px; border-radius: 2px; }
#marketingView .ah-tally { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #e2e8f0; }
#marketingView .ah-tally span { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #475569; }
#marketingView .ah-tally b { display: block; margin-top: 2px; font-family: var(--ah-mono); font-size: 24px; font-weight: 600; color: var(--ah-ink); }
#marketingView .ah-tally .is-missing b { color: #b91c1c; }
#marketingView .ah-count-footer { margin-top: 14px; padding-top: 12px; border-top: 1px solid #e2e8f0; animation: ah-print 0.3s ease-out; }
#marketingView .ah-verdict { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.35; color: var(--ah-ink); }
#marketingView .ah-year { margin: 6px 0 14px; font-size: 13px; line-height: 1.45; color: #475569; }
#marketingView .ah-year b { color: var(--ah-ink); }
#marketingView .ah-cta { width: 100%; min-height: 48px; padding: 12px 16px; border: 0; border-radius: 10px; background: var(--ah-blue); color: #fff; font-size: 15px; font-weight: 700; cursor: pointer; }
#marketingView .ah-cta:hover { background: #1d4ed8; }

/* Tractor-feed printout on a black panel */
#marketingView .ah-stage { min-width: 0; padding: 28px 28px 22px; background: var(--ah-ink); border-radius: 20px; box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28); }
#marketingView .ah-paper { position: relative; padding: 18px 42px 20px; background-color: var(--ah-paper); background-image: radial-gradient(circle at 50% 50%, var(--ah-ink) 0 5px, transparent 5.5px), radial-gradient(circle at 50% 50%, var(--ah-ink) 0 5px, transparent 5.5px), linear-gradient(90deg, transparent 27px, rgba(15, 23, 42, 0.16) 27px 28px, transparent 28px), linear-gradient(270deg, transparent 27px, rgba(15, 23, 42, 0.16) 27px 28px, transparent 28px); background-size: 28px 26px, 28px 26px, 100% 100%, 100% 100%; background-position: 0 0, 100% 0, 0 0, 0 0; background-repeat: repeat-y, repeat-y, no-repeat, no-repeat; color: var(--ah-ink); font-family: var(--ah-mono); font-size: 13px; box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5); transform: rotate(0.5deg); transform-origin: 50% 0; }
#marketingView .ah-paper-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding-bottom: 12px; }
#marketingView .ah-paper-head b { display: block; font-size: 14px; font-weight: 600; letter-spacing: 0.04em; }
#marketingView .ah-paper-head div span { font-size: 11px; color: #475569; }
#marketingView .ah-sample-tag { flex: none; padding: 2px 8px; border: 1.5px solid #475569; border-radius: 3px; font-size: 11px; font-weight: 600; letter-spacing: 0.1em; color: #475569; }
#marketingView .ah-row { display: grid; grid-template-columns: 3.5ch 8.5ch 1.5ch 5.5ch minmax(0, 1fr) 5ch 5ch 6.5ch; gap: 1.2ch; align-items: center; min-height: 26px; padding: 0 8px; }
#marketingView .ah-row-head { min-height: 26px; border-bottom: 1.5px solid var(--ah-ink); font-size: 11px; font-weight: 600; letter-spacing: 0.05em; }
#marketingView .ah-row-total { border-top: 1.5px solid var(--ah-ink); font-weight: 600; }
#marketingView .ah-col-job { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#marketingView .ah-col-num { text-align: right; }
#marketingView .ah-sold { color: #94a3b8; }
#marketingView .ah-rows-wrap { position: relative; }
#marketingView #auditRows { position: relative; }
#marketingView #auditRows .ah-row:nth-child(even) { background: var(--ah-bar); }
#marketingView #auditRows .ah-row { transition: background-color 0.2s ease; }
#marketingView .ah-scan { position: absolute; left: -8px; right: -8px; top: 0; z-index: 2; pointer-events: none; background: rgba(37, 99, 235, 0.14); border-top: 2px solid #2563eb; border-bottom: 2px solid #2563eb; box-shadow: 0 0 22px rgba(37, 99, 235, 0.45); transition: transform 0.16s ease-out; }
#marketingView .ah-stamp { justify-self: end; font-size: 11px; font-weight: 600; letter-spacing: 0.03em; white-space: nowrap; }
#marketingView .is-checked .ah-sold { color: var(--ah-ink); }
#marketingView .is-ok .ah-stamp { color: #245d38; font-size: 14px; }
#marketingView .is-short .ah-stamp, #marketingView .is-drop .ah-stamp, #marketingView .is-over .ah-stamp, #marketingView .is-hold .ah-stamp { padding: 1px 5px; border: 1.5px solid currentColor; border-radius: 3px; transform: rotate(-4deg); animation: ah-stamp 0.2s cubic-bezier(0.2, 1.6, 0.4, 1); }
#marketingView .is-short .ah-stamp, #marketingView .is-drop .ah-stamp { color: #c3002f; }
#marketingView .is-over .ah-stamp { color: #1d4ed8; }
#marketingView .is-hold .ah-stamp { color: #92400e; }
#marketingView #auditRows .ah-row.is-short:nth-child(n), #marketingView #auditRows .ah-row.is-drop:nth-child(n) { background: #fde4e6; font-weight: 500; }
#marketingView #auditRows .ah-row.is-hold:nth-child(n) { background: #fbf0cf; }
#marketingView #auditRows .ah-row.is-over:nth-child(n) { background: #dbeafe; }
#marketingView .ah-caption { margin: 18px 0 0; min-height: 3em; font-family: var(--ah-mono); font-size: 14px; line-height: 1.5; color: #e2e8f0; }
#marketingView .ah-caption::before { content: '▸ '; color: #60a5fa; }
#marketingView .ah-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@keyframes ah-stamp { from { transform: rotate(-4deg) scale(1.9); opacity: 0; } to { transform: rotate(-4deg) scale(1); opacity: 1; } }
@keyframes ah-print { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  #marketingView .ah-stamp, #marketingView .ah-count-footer { animation: none !important; }
  #marketingView .ah-scan, #marketingView #auditRows .ah-row, #marketingView .ah-run { transition: none !important; }
}
@media (max-width: 1100px) {
  #marketingView .ah-nav-links { display: none; }
  /* Stacked: printout sits right under the button so a tap shows the audit, and the tenth wall builds below it */
  #marketingView .ah-inner { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 36px; }
  #marketingView .ah-copy { display: contents; }
  #marketingView .ah-kicker { order: 1; }
  #marketingView .ah-headline { order: 2; }
  #marketingView .ah-intro { order: 3; }
  #marketingView .ah-controls { order: 4; }
  #marketingView .ah-stage { order: 5; margin-top: 28px; scroll-margin-top: 76px; }
  #marketingView .ah-paper { transform: none; }
  #marketingView .ah-count { order: 6; scroll-margin-top: 76px; }
  #marketingView .ah-paper { transform: none; }
}
@media (max-width: 620px) {
  #marketingView .ah-nav-inner { padding: 10px 16px; }
  #marketingView .ah-nav-ghost { display: none; }
  #marketingView .ah-nav-inner { gap: 10px; }
  #marketingView .ah-nav-solid { flex: none; padding: 8px 10px; font-size: 11px; }
  #marketingView .ah-inner { padding: 28px 16px 40px; }
  #marketingView .ah-run { width: 100%; }
  #marketingView .ah-stage { padding: 12px 8px 14px; border-radius: 14px; }
  #marketingView .ah-caption { padding-inline: 6px; }
  #marketingView .ah-paper { padding: 14px 18px 14px; font-size: 10.5px; background-image: linear-gradient(90deg, transparent 13px, rgba(15, 23, 42, 0.16) 13px 14px, transparent 14px), linear-gradient(270deg, transparent 13px, rgba(15, 23, 42, 0.16) 13px 14px, transparent 14px); background-size: 100% 100%, 100% 100%; background-position: 0 0, 0 0; background-repeat: no-repeat, no-repeat; }
  #marketingView .ah-row { grid-template-columns: 8.5ch minmax(0, 1fr) 5ch 5ch 7ch; gap: 1ch; padding: 0 3px; min-height: 28px; }
  #marketingView .ah-col-adv { display: none; }
  #marketingView .is-short .ah-stamp, #marketingView .is-drop .ah-stamp, #marketingView .is-over .ah-stamp, #marketingView .is-hold .ah-stamp { padding: 1px 3px; }
  #marketingView .ah-stamp, #marketingView .ah-row-head { font-size: 9.5px; }
  #marketingView .ah-paper-head b { font-size: 12px; }
  #marketingView .ah-paper-head div span { font-size: 9.5px; }
  #marketingView .ah-row-total .ah-col-job { display: none; }
}

/* Marketing sections below the hero: this page ships no Tailwind runtime, so its layout utilities live here */
#marketingView > section:not(.ah) { box-sizing: border-box; margin-inline: auto; padding-inline: 24px; }
#marketingView > section:not(.ah) { padding-block: 40px; text-align: left; }
#marketingView > .max-w-7xl { max-width: 1320px; }
#marketingView > .max-w-5xl { max-width: 1024px; }
#marketingView > .max-w-3xl { max-width: 768px; }
#marketingView #pricing > .grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; align-items: stretch; }
#marketingView #pricing > .grid > div { position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 30px; background: #fff; border-radius: 16px; }
#marketingView #pricing > .text-center, #marketingView #faq > .text-center { margin-bottom: 36px; text-align: center; }
#marketingView #pricing ul { list-style: none; padding: 0; }
#marketingView #pricing li { display: flex; align-items: flex-start; gap: 10px; margin-top: 12px; font-size: 13.5px; line-height: 1.4; }
#marketingView #pricing > .grid .absolute { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); padding: 4px 12px; border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: 0.08em; white-space: nowrap; }
#marketingView #pricing > .grid .text-4xl { font-size: 36px; font-weight: 800; }
#marketingView #pricing > .grid button { width: 100%; margin-top: 28px; min-height: 48px; }
#marketingView .bg-\[\#1e3a5f\] { background-color: var(--ah-ink) !important; color: #fff !important; border: 0 !important; }
#marketingView .border-\[\#1e3a5f\] { border: 2px solid var(--ah-ink) !important; }
#marketingView #proPlanBtn { background-color: var(--ah-blue) !important; }
#marketingView #pricing h2 { margin: 12px 0 8px; font-family: var(--font-display); font-size: clamp(27px, 3.3vw, 42px); font-weight: 800; letter-spacing: -0.02em; color: var(--ah-ink); }
#marketingView #faq h2 { font-family: var(--font-display); font-size: clamp(24px, 2.6vw, 32px); font-weight: 800; letter-spacing: -0.02em; color: var(--ah-ink); }
#marketingView #faq details { padding: 18px 20px; margin-bottom: 12px; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; }
@media (max-width: 720px) {
  #marketingView #pricing > .grid { grid-template-columns: minmax(0, 1fr); }
  #marketingView > section:not(.ah) { padding-inline: 16px; }
}

/* Marketing Foreman IQ & Comparison Sections (flagged vs. sold hours) */
#marketingView .hv-head { max-width: 780px; margin: 0 auto 28px; text-align: center; color: #0f172a; }
#marketingView .hv-kicker { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ah-blue); }
#marketingView .hv-head h2 { text-wrap: balance; }
#marketingView .hv-head h2 em, #marketingView #pricing h2 em { font-style: normal; color: var(--ah-blue); }
#marketingView .hv-head h2 { margin: 8px 0 10px; font-family: var(--font-display); font-size: clamp(27px, 3.3vw, 42px); line-height: 1.12; font-weight: 800; letter-spacing: -0.01em; color: #0f172a; text-align: center; }
#marketingView .hv-head p { margin: 0; font-size: 16px; line-height: 1.55; color: #475569; }
#marketingView .hv-dash { overflow: hidden; background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 16px; box-shadow: 0 16px 40px rgba(15, 23, 42, 0.1); }
#marketingView .hv-dash-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 18px; background: var(--ah-ink); color: #fff; font-weight: 700; font-size: 14px; }
#marketingView .hv-sample { font-family: var(--ah-mono); font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #c3d0dc; }
#marketingView .hv-dash-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; padding: 14px; }
#marketingView .hv-panel { grid-column: span 6; min-width: 0; padding: 18px; background: #fff; border: 1px solid #dbe3ea; border-radius: 12px; color: #0f172a; text-align: left; }
#marketingView .hv-stat { grid-column: span 4; }
#marketingView .hv-radar { grid-column: span 8; }
#marketingView .hv-panel h3, #marketingView .hv-compare h3 { margin: 0 0 10px; font-family: var(--font-display); font-size: 17px; font-weight: 700; color: inherit; text-align: left; }
#marketingView .hv-stat-num { font-family: var(--ah-mono); font-size: 44px; line-height: 1.05; font-weight: 600; color: #0f172a; }
#marketingView .hv-stat p { margin: 2px 0 12px; font-size: 13.5px; color: #475569; }
#marketingView .hv-meter { height: 8px; background: #fde2e4; border-radius: 4px; overflow: hidden; }
#marketingView .hv-meter span { display: block; height: 100%; background: var(--ah-blue); border-radius: 4px 0 0 4px; border-right: 2px solid #fff; }
#marketingView .hv-stat dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 14px 0 0; }
#marketingView .hv-stat dt { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: #475569; }
#marketingView .hv-stat dd { margin: 1px 0 0; font-family: var(--ah-mono); font-size: 18px; font-weight: 600; color: #0f172a; }
#marketingView .hv-stat dd.is-short { color: #9f1239; }

#marketingView .hv-table-wrap { overflow-x: auto; }
#marketingView .hv-table { width: 100%; min-width: 0; border-collapse: collapse; background: transparent; font-size: 13.5px; color: #0f172a; }
#marketingView .hv-table th, #marketingView .hv-table td { padding: 10px 8px; border: 0; border-bottom: 1px solid #e2e8f0; background: transparent; color: #0f172a; text-align: left; white-space: nowrap; vertical-align: middle; }
#marketingView .hv-table thead th { position: static; padding-top: 2px; font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: #475569; }
#marketingView .hv-table tbody th, #marketingView .hv-table tfoot th { font-family: var(--ah-mono); font-weight: 600; }
#marketingView .hv-table small { display: block; margin-top: 1px; font-family: var(--font-sans); font-size: 12px; font-weight: 400; color: #475569; }
#marketingView .hv-table .hv-num { font-family: var(--ah-mono); text-align: right; }
#marketingView .hv-table tfoot th, #marketingView .hv-table tfoot td { border-top: 2px solid #0f172a; border-bottom: 0; font-weight: 600; }
#marketingView .hv-pill { display: inline-block; padding: 2px 9px; border: 1px solid; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
#marketingView .hv-pill.is-short { background: #fff1f2; border-color: #fca5a5; color: #9f1239; }
#marketingView .hv-pill.is-hold { background: #fffbeb; border-color: #fcd34d; color: #92400e; }
#marketingView .hv-pill.is-ok { background: #f0fdf4; border-color: #86efac; color: #166534; }

#marketingView .hv-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 12px; padding: 0; font-size: 12px; color: #475569; }
#marketingView .hv-legend li { display: flex; align-items: center; gap: 6px; margin: 0; }
#marketingView .hv-legend li::before { content: ''; flex: none; }
#marketingView .hv-legend .is-range::before { width: 18px; height: 8px; border-radius: 4px; background: #bfdbfe; }
#marketingView .hv-legend .is-avg::before { width: 3px; height: 14px; border-radius: 2px; background: var(--ah-ink); }
#marketingView .hv-legend .is-last::before { width: 10px; height: 10px; border-radius: 50%; background: var(--ah-blue); box-shadow: 0 0 0 2px #fff, 0 0 0 3px #1e40af; }
#marketingView .hv-spread { list-style: none; margin: 0; padding: 0; }
#marketingView .hv-spread li { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 2px 12px; align-items: center; margin: 0; padding: 7px 0; }
#marketingView .hv-spread-name { font-size: 13.5px; font-weight: 600; }
#marketingView .hv-track { position: relative; display: block; height: 18px; background: linear-gradient(#e2e8f0, #e2e8f0) 0 50% / 100% 1px no-repeat; }
#marketingView .hv-track i { position: absolute; display: block; }
#marketingView .hv-range { top: 5px; height: 8px; border-radius: 4px; background: #bfdbfe; }
#marketingView .hv-avg { top: 1px; width: 3px; height: 16px; margin-left: -1.5px; border-radius: 2px; background: var(--ah-ink); }
#marketingView .hv-last { top: 4px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--ah-blue); box-shadow: 0 0 0 2px #fff, 0 0 0 3px #1e40af; }
#marketingView .hv-spread-val { grid-column: 2; font-family: var(--ah-mono); font-size: 11.5px; color: #475569; }
#marketingView .hv-note { margin: 10px 0 0; font-size: 12px; line-height: 1.4; color: #475569; }
#marketingView .hv-queue { list-style: none; margin: 0; padding: 0; }
#marketingView .hv-queue li { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin: 0; padding: 11px 0; border-bottom: 1px solid #e2e8f0; }
#marketingView .hv-queue b { display: block; font-family: var(--ah-mono); font-size: 13px; font-weight: 600; }
#marketingView .hv-queue span { display: block; margin-top: 2px; font-size: 13px; line-height: 1.35; color: #475569; }
#marketingView .hv-queue strong { flex: none; font-family: var(--ah-mono); font-size: 18px; font-weight: 600; color: #0f172a; }

#marketingView .hv-compare { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 18px; align-items: stretch; }
#marketingView .hv-dms, #marketingView .hv-tht { min-width: 0; padding: 22px; border-radius: 14px; text-align: left; }
#marketingView .hv-dms { display: flex; flex-direction: column; background: var(--ah-ink); color: #e2e8f0; }
#marketingView .hv-dms p { margin: 0 0 16px; font-size: 14px; line-height: 1.45; color: #cbd5e1; }
#marketingView .hv-dms pre { margin: 0 0 18px; padding: 0; overflow-x: auto; background: transparent; border: 0; font-family: var(--ah-mono); font-size: 14px; line-height: 1.8; color: #e2e8f0; white-space: pre; }
#marketingView .hv-dms .hv-dms-miss { margin: auto 0 0; padding: 12px 14px; border: 1px dashed #ff7a93; border-radius: 8px; font-size: 14.5px; font-weight: 600; color: #ffd9df; }
#marketingView .hv-tht { background: #fff; border: 2px solid var(--ah-blue); color: #0f172a; box-shadow: 0 16px 40px rgba(15, 23, 42, 0.1); }
#marketingView .hv-tht p { margin: 0 0 12px; font-size: 14px; line-height: 1.45; color: #475569; }
#marketingView .hv-foot { margin: 12px 0 0; font-size: 12.5px; color: #475569; text-align: center; }
@media (max-width: 1000px) {
  #marketingView .hv-panel, #marketingView .hv-stat, #marketingView .hv-radar { grid-column: 1 / -1; }
  #marketingView .hv-compare { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 620px) {
  #marketingView .hv-dash-grid { padding: 8px; gap: 8px; }
  #marketingView .hv-panel { padding: 14px; }
  #marketingView .hv-dms, #marketingView .hv-tht { padding: 16px; }
  #marketingView .hv-dms pre { font-size: 10.5px; margin-bottom: 14px; }
  #marketingView .hv-hide-sm { display: none; }
  #marketingView .hv-table { font-size: 12px; }
  #marketingView .hv-table th, #marketingView .hv-table td { padding: 9px 5px; }
  #marketingView .hv-radar .hv-table th, #marketingView .hv-radar .hv-table td { padding-inline: 3px; }
  #marketingView .hv-pill { padding: 2px 6px; font-size: 11px; }
  #marketingView .hv-spread li { grid-template-columns: minmax(0, 1fr); }
  #marketingView .hv-spread-val { grid-column: 1; }
}

/* Request a Demo Modal: header stacks above the body, black and blue like the page */
#modalRequestDemo { --teal-deep: #2563eb; --ink: #0f172a; --muted: #475569; --font-display: 'Inter', system-ui, sans-serif; }
#modalRequestDemo[open] { flex-direction: column !important; align-items: stretch !important; justify-content: flex-start !important; height: fit-content; max-height: calc(100dvh - 24px); overflow-y: auto !important; }
#modalRequestDemo .demo-mail-link { display: inline-block; padding: 10px 24px; border-radius: 10px; background: #2563eb; color: #fff; font-size: 14px; font-weight: 700; text-decoration: none; }
#modalRequestDemo .demo-mail-link:hover { background: #1d4ed8; }
@media (max-width: 480px) {
  #demoPersonaStep > div, #demoMgmtLeadForm > div { grid-template-columns: minmax(0, 1fr) !important; }
}

/* Marketing Leaks Section: one bar, one figure per place the hours went */
#marketingView .lk-bar { display: flex; gap: 2px; margin-bottom: 14px; }
#marketingView .lk-bar span { flex-basis: 0; min-width: 0; padding: 10px 12px; background: var(--ah-blue); color: #fff; font-family: var(--ah-mono); font-size: 14px; font-weight: 600; white-space: nowrap; }
#marketingView .lk-bar span:first-child { border-radius: 8px 0 0 8px; }
#marketingView .lk-bar span:last-child { border-radius: 0 8px 8px 0; }
#marketingView .lk-bar b { margin-right: 6px; font-weight: 600; opacity: 0.75; }
#marketingView .lk-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
#marketingView .lk-card { padding: 20px; background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06); color: var(--ah-ink); text-align: left; }
#marketingView .lk-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
#marketingView .lk-num { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ah-ink); color: #fff; font-size: 13px; font-weight: 700; }
#marketingView .lk-top strong { font-family: var(--ah-mono); font-size: 26px; font-weight: 600; color: var(--ah-ink); }
#marketingView .lk-card h3 { margin: 0 0 6px; font-family: var(--font-display); font-size: 19px; font-weight: 700; color: var(--ah-ink); text-align: left; }
#marketingView .lk-card p { margin: 0 0 12px; font-size: 14.5px; line-height: 1.5; color: #475569; }
#marketingView .lk-card ul { list-style: none; margin: 0; padding: 10px 0 0; border-top: 1px solid #e2e8f0; }
#marketingView .lk-card li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; margin: 0; padding: 3px 0; font-size: 13px; color: #475569; }
#marketingView .lk-card li span:first-child { font-family: var(--ah-mono); font-weight: 600; color: var(--ah-ink); }
@media (max-width: 860px) {
  #marketingView .lk-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Marketing Run Your Own Lines: entry card beside a black results panel */
#marketingView .oa-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 18px; align-items: start; }
#marketingView .oa-entry { padding: 20px; background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06); text-align: left; }
#marketingView .oa-rows { list-style: none; margin: 0; padding: 0; }
#marketingView .oa-row { display: grid; grid-template-columns: minmax(0, 1.5fr) 84px 84px minmax(96px, 1fr) minmax(104px, auto) 32px; gap: 10px; align-items: end; margin: 0; padding: 12px 0; border-bottom: 1px solid #e2e8f0; }
#marketingView .oa-row label { display: block; margin: 0; min-width: 0; }
#marketingView .oa-row label > span { display: block; margin-bottom: 4px; font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: #475569; }
#marketingView .oa-row input[type="text"] { display: block; box-sizing: border-box; width: 100%; height: 42px; margin: 0; padding: 8px 10px; background: #fff; border: 1px solid #cbd5e1; border-radius: 8px; color: var(--ah-ink); font-family: var(--ah-mono); font-size: 15px; }
#marketingView .oa-row input[type="text"]:focus { outline: 2px solid var(--ah-blue); outline-offset: 0; border-color: var(--ah-blue); }
#marketingView .oa-row input[type="text"]::placeholder { color: #94a3b8 !important; opacity: 1; font-family: var(--font-sans); font-size: 13px; }
#marketingView .oa-row .oa-open { display: flex; align-items: center; gap: 6px; min-height: 42px; cursor: pointer; }
#marketingView .oa-row .oa-open input { flex: none; width: 16px; height: 16px; margin: 0; accent-color: var(--ah-blue); }
#marketingView .oa-row .oa-open span { margin: 0; font-size: 12.5px; font-weight: 600; letter-spacing: 0; text-transform: none; line-height: 1.2; }
#marketingView .oa-status { display: flex; align-items: center; min-height: 42px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
#marketingView .oa-status.is-short { color: #b91c1c; }
#marketingView .oa-status.is-over { color: #1d4ed8; }
#marketingView .oa-status.is-ok { color: #166534; }
#marketingView .oa-status.is-hold { color: #92400e; }
#marketingView .oa-remove { width: 32px; min-height: 42px; padding: 0; background: transparent; border: 0; color: #64748b; font-size: 20px; line-height: 1; cursor: pointer; }
#marketingView .oa-remove:hover { color: var(--ah-ink); }
#marketingView .oa-actions { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
#marketingView .oa-ghost { width: auto; min-height: 42px; padding: 8px 16px; background: #fff; border: 1px solid #cbd5e1; border-radius: 10px; color: var(--ah-ink); font-size: 14px; font-weight: 600; cursor: pointer; }
#marketingView .oa-ghost:hover { background: #f1f5f9; }
#marketingView .oa-text { width: auto; min-height: 42px; padding: 8px; background: transparent; border: 0; color: #475569; font-size: 14px; font-weight: 600; cursor: pointer; }
#marketingView .oa-hint { margin: 10px 0 0; font-size: 13px; line-height: 1.45; color: #475569; }
#marketingView .oa-result { position: sticky; top: 84px; padding: 24px; background: var(--ah-ink); border-radius: 14px; color: #e2e8f0; text-align: left; box-shadow: 0 20px 44px rgba(15, 23, 42, 0.24); }
#marketingView .oa-result h3 { margin: 0; font-family: var(--font-display); font-size: 28px; line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; color: #fff; text-align: left; }
#marketingView .oa-result h3 em { font-style: normal; color: #60a5fa; }
#marketingView .oa-tally { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, 0.18); }
#marketingView .oa-tally span { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #cbd5e1; }
#marketingView .oa-tally b { display: block; margin-top: 2px; font-family: var(--ah-mono); font-size: 22px; font-weight: 600; color: #fff; }
#marketingView .oa-hold { margin: 12px 0 0; font-size: 13px; line-height: 1.4; color: #cbd5e1; }
#marketingView .oa-shorts { list-style: none; margin: 14px 0 0; padding: 10px 0 0; border-top: 1px solid rgba(255, 255, 255, 0.18); }
#marketingView .oa-shorts li { display: flex; justify-content: space-between; gap: 12px; margin: 0; padding: 3px 0; font-family: var(--ah-mono); font-size: 13.5px; }
#marketingView .oa-shorts span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#marketingView .oa-shorts b { font-weight: 600; color: #fff; }
#marketingView .oa-copy, #marketingView .oa-next { display: block; width: 100%; min-height: 46px; margin-top: 12px; padding: 10px 14px; border-radius: 10px; font-size: 14.5px; font-weight: 700; cursor: pointer; }
#marketingView .oa-copy { background: transparent; border: 1px solid rgba(255, 255, 255, 0.4); color: #fff; }
#marketingView .oa-copy:hover { background: rgba(255, 255, 255, 0.1); }
#marketingView .oa-next { background: var(--ah-blue); border: 0; color: #fff; }
#marketingView .oa-next:hover { background: #1d4ed8; }
#marketingView .oa-result [hidden], #marketingView .oa-result[hidden] { display: none !important; }
#marketingView .oa-ghost:focus-visible, #marketingView .oa-text:focus-visible, #marketingView .oa-remove:focus-visible, #marketingView .oa-copy:focus-visible, #marketingView .oa-next:focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; }
#marketingView #ownAudit { scroll-margin-top: 66px; }
@media (max-width: 1000px) {
  #marketingView .oa-grid { grid-template-columns: minmax(0, 1fr); }
  #marketingView .oa-result { position: static; }
}
@media (max-width: 620px) {
  #marketingView .oa-entry { padding: 14px; }
  #marketingView .oa-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 32px; row-gap: 6px; }
  #marketingView .oa-row .oa-ro { grid-column: 1 / 3; grid-row: 1; }
  #marketingView .oa-remove { grid-column: 3; grid-row: 1; }
  #marketingView .oa-row .oa-sold { grid-column: 2 / 4; }
  #marketingView .oa-row .oa-open, #marketingView .oa-status { min-height: 28px; }
  #marketingView .oa-row .oa-open { grid-column: 1; }
  #marketingView .oa-status { grid-column: 2 / 4; justify-content: flex-end; }
  #marketingView .oa-row input[type="text"] { font-size: 16px; }
  #marketingView .oa-result { padding: 18px; }
}

/* Marketing Enterprise Section: the same conversation two ways, beside the shop offer */
#marketingView .st-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 18px; align-items: stretch; }
#marketingView .st-card { padding: 22px; background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06); text-align: left; }
#marketingView .st-tabs { display: inline-flex; gap: 2px; padding: 3px; margin-bottom: 18px; background: #f1f5f9; border-radius: 10px; }
#marketingView .st-tabs button { width: auto; min-height: 40px; padding: 8px 16px; background: transparent; border: 0; border-radius: 8px; color: #475569; font-size: 14px; font-weight: 600; cursor: pointer; }
#marketingView .st-tabs button[aria-pressed="true"] { background: var(--ah-ink); color: #fff; }
#marketingView .st-tabs button:focus-visible, #marketingView #enterpriseInquireBtn:focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; }
#marketingView .st-stack { display: grid; }
#marketingView .st-thread { grid-area: 1 / 1; display: flex; flex-direction: column; gap: 10px; visibility: hidden; }
#marketingView .st-thread.is-active { visibility: visible; }
#marketingView .st-msg { max-width: 82%; margin: 0; padding: 10px 14px; background: #f1f5f9; border-radius: 14px 14px 14px 4px; color: var(--ah-ink); font-size: 15px; line-height: 1.45; align-self: flex-start; }
#marketingView .st-msg.is-tech { background: var(--ah-blue); border-radius: 14px 14px 4px 14px; color: #fff; align-self: flex-end; }
#marketingView .st-msg b { display: block; margin-bottom: 1px; font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; opacity: 0.8; }
#marketingView .st-thread.is-active .st-msg, #marketingView .st-thread.is-active .st-outcome { animation: ah-print 0.28s ease-out backwards; }
#marketingView .st-thread.is-active > :nth-child(2) { animation-delay: 0.14s; }
#marketingView .st-thread.is-active > :nth-child(3) { animation-delay: 0.28s; }
#marketingView .st-thread.is-active > :nth-child(4) { animation-delay: 0.42s; }
#marketingView .st-thread.is-active > :nth-child(5) { animation-delay: 0.56s; }
#marketingView .st-outcome { margin: auto 0 0; padding-top: 12px; border-top: 1px solid #e2e8f0; color: var(--ah-ink); font-size: 14.5px; font-weight: 700; line-height: 1.4; }
#marketingView .st-note { margin: 12px 0 0; color: #475569; font-size: 12.5px; }
#marketingView .st-shop { display: flex; flex-direction: column; padding: 26px; background: var(--ah-ink); border-radius: 14px; color: #e2e8f0; text-align: left; box-shadow: 0 20px 44px rgba(15, 23, 42, 0.24); }
#marketingView .st-shop h3 { margin: 0 0 8px; font-family: var(--font-display); font-size: 26px; line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; color: #fff; text-align: left; }
#marketingView .st-shop > p { margin: 0 0 16px; font-size: 15px; line-height: 1.5; color: #cbd5e1; }
#marketingView .st-shop ul { list-style: none; margin: 0 0 20px; padding: 0; }
#marketingView .st-shop li { margin: 0; padding: 11px 0; border-top: 1px solid rgba(255, 255, 255, 0.18); font-size: 14px; line-height: 1.4; color: #cbd5e1; }
#marketingView .st-shop li b { display: block; font-weight: 700; color: #fff; }
#marketingView #enterpriseInquireBtn { width: 100%; min-height: 48px; margin-top: auto; padding: 12px 16px; background: var(--ah-blue); border: 0; border-radius: 10px; color: #fff; font-size: 15px; font-weight: 700; cursor: pointer; }
#marketingView #enterpriseInquireBtn:hover { background: #1d4ed8; }
@media (prefers-reduced-motion: reduce) {
  #marketingView .st-thread.is-active .st-msg, #marketingView .st-thread.is-active .st-outcome { animation: none !important; }
}
@media (max-width: 1000px) {
  #marketingView .st-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 620px) {
  #marketingView .st-card { padding: 14px; }
  #marketingView .st-tabs { display: flex; }
  #marketingView .st-tabs button { flex: 1; padding: 8px; }
  #marketingView .st-msg { max-width: 92%; font-size: 14.5px; }
  #marketingView .st-shop { padding: 18px; }
}

/* Marketing Who Sees Your Numbers: one answer per audience */
#marketingView .ws-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
#marketingView .ws-card { padding: 20px; background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06); color: var(--ah-ink); text-align: left; }
#marketingView .ws-card h3 { margin: 0 0 10px; font-family: var(--font-display); font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #475569; text-align: left; }
#marketingView .ws-card strong { display: block; margin-bottom: 10px; font-family: var(--font-display); font-size: 22px; line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; color: var(--ah-blue); }
#marketingView .ws-card p { margin: 0; font-size: 14.5px; line-height: 1.5; color: #475569; }
#marketingView .ws-card.is-you { background: var(--ah-ink); border-color: var(--ah-ink); }
#marketingView .ws-card.is-you h3 { color: #cbd5e1; }
#marketingView .ws-card.is-you strong { color: #fff; }
#marketingView .ws-card.is-you p { color: #cbd5e1; }
@media (max-width: 1100px) {
  #marketingView .ws-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  #marketingView .ws-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Audit breakdown: pops up inside the hero when the audit finishes */
#marketingView .lk-panel { max-width: 1320px; margin: 0 auto; padding: 0 24px 64px; scroll-margin-top: 76px; }
#marketingView .lk-panel:not([hidden]) .hv-head { animation: lk-pop 0.4s ease-out backwards; }
#marketingView .lk-panel:not([hidden]) .lk-bar { animation: lk-pop 0.4s ease-out 0.12s backwards; }
#marketingView .lk-panel:not([hidden]) .lk-card { animation: lk-pop 0.4s cubic-bezier(0.2, 1.3, 0.4, 1) backwards; }
#marketingView .lk-panel:not([hidden]) .lk-card:nth-child(1) { animation-delay: 0.22s; }
#marketingView .lk-panel:not([hidden]) .lk-card:nth-child(2) { animation-delay: 0.32s; }
#marketingView .lk-panel:not([hidden]) .lk-card:nth-child(3) { animation-delay: 0.42s; }
@keyframes lk-pop { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  #marketingView .lk-panel:not([hidden]) .hv-head, #marketingView .lk-panel:not([hidden]) .lk-bar, #marketingView .lk-panel:not([hidden]) .lk-card { animation: none !important; }
}
@media (max-width: 620px) {
  #marketingView .lk-panel { padding: 0 16px 40px; }
}

/* Marketing header logo: the PNG has wide empty margins, so crop them with negative margins */
#marketingView .ah-logo { display: block; flex: none; overflow: hidden; line-height: 0; }
#marketingView .ah-logo img { display: block; width: 280px; height: auto; margin: -22px 0 -16px -10px; }

/* Marketing Closing Section: black band that picks up what the visitor did */
#marketingView > #closing { max-width: none; margin: 40px 0 0; padding: 72px 24px; background: var(--ah-ink); color: #e2e8f0; text-align: center; }
#marketingView .cl-inner { max-width: 760px; margin: 0 auto; }
#marketingView .cl-inner h2 { margin: 0; font-family: var(--font-display); font-size: clamp(30px, 4vw, 52px); line-height: 1.08; font-weight: 800; letter-spacing: -0.02em; color: #fff; text-align: center; text-wrap: balance; }
#marketingView .cl-inner h2 em { font-style: normal; color: #60a5fa; }
#marketingView .cl-inner > p { margin: 16px auto 0; max-width: 34em; font-size: 17px; line-height: 1.55; color: #cbd5e1; }
#marketingView .cl-tally { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-width: 460px; margin: 24px auto 0; padding: 14px 0; border-top: 1px solid rgba(255, 255, 255, 0.2); border-bottom: 1px solid rgba(255, 255, 255, 0.2); }
#marketingView .cl-tally[hidden] { display: none; }
#marketingView .cl-tally span { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #cbd5e1; }
#marketingView .cl-tally b { display: block; margin-top: 2px; font-family: var(--ah-mono); font-size: 24px; font-weight: 600; color: #fff; }
#marketingView .cl-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }
#marketingView .cl-primary, #marketingView .cl-secondary { width: auto; min-height: 52px; padding: 12px 26px; border-radius: 12px; font-size: 16px; font-weight: 700; cursor: pointer; }
#marketingView .cl-primary { background: var(--ah-blue); border: 0; color: #fff; }
#marketingView .cl-primary:hover { background: #1d4ed8; }
#marketingView .cl-secondary { background: transparent; border: 1px solid rgba(255, 255, 255, 0.4); color: #fff; }
#marketingView .cl-secondary:hover { background: rgba(255, 255, 255, 0.1); }
#marketingView .cl-secondary[hidden] { display: none; }
#marketingView .cl-primary:focus-visible, #marketingView .cl-secondary:focus-visible, #marketingView .ah-logo:focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; }
@media (max-width: 1320px) {
  #marketingView .ah-logo img { width: 224px; margin: -18px 0 -13px -8px; }
  #marketingView .ah-nav-inner { gap: 14px; }
  #marketingView .ah-nav-links { gap: 14px; }
  #marketingView .ah-nav-links a { font-size: 12.5px; }
  #marketingView .ah-nav-ghost, #marketingView .ah-nav-solid { padding-inline: 12px; }
}
@media (max-width: 620px) {
  #marketingView .ah-logo img { width: 188px; margin: -15px 0 -11px -7px; }
  #marketingView > #closing { padding: 48px 16px; }
  #marketingView .cl-primary, #marketingView .cl-secondary { width: 100%; }
}

/* Marketing How It Works: three steps beside a phone illustration */
#marketingView .hw-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px; align-items: center; }
#marketingView .hw-steps { display: flex; flex-direction: column; gap: 10px; }
#marketingView .hw-steps button { display: flex; align-items: flex-start; gap: 14px; width: 100%; padding: 18px; background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; color: #475569; font-family: var(--font-sans); font-size: 15px; font-weight: 400; line-height: 1.45; text-align: left; cursor: pointer; transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease; }
#marketingView .hw-steps button:hover { border-color: #93c5fd; }
#marketingView .hw-steps button > b { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: #f1f5f9; color: var(--ah-ink); font-size: 15px; font-weight: 700; }
#marketingView .hw-steps strong { display: block; margin-bottom: 3px; color: var(--ah-ink); font-size: 18px; font-weight: 700; }
#marketingView .hw-steps i { display: block; margin-top: 5px; color: #475569; font-size: 12px; font-style: normal; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
#marketingView .hw-steps button[aria-pressed="true"] { background: var(--ah-ink); border-color: var(--ah-ink); color: #cbd5e1; }
#marketingView .hw-steps button[aria-pressed="true"] > b { background: var(--ah-blue); color: #fff; }
#marketingView .hw-steps button[aria-pressed="true"] strong { color: #fff; }
#marketingView .hw-steps button[aria-pressed="true"] i { color: #93c5fd; }
#marketingView .hw-steps button:focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; }
#marketingView .hw-stage { min-width: 0; text-align: center; }
#marketingView .hw-phone { width: min(100%, 300px); margin: 0 auto; padding: 12px; background: var(--ah-ink); border-radius: 36px; box-shadow: 0 24px 60px rgba(15, 23, 42, 0.3); }
#marketingView .hw-screens { display: grid; min-height: 460px; background: #fff; border-radius: 26px; overflow: hidden; text-align: left; }
#marketingView .hw-screen { grid-area: 1 / 1; padding: 22px 16px 18px; visibility: hidden; opacity: 0; transition: opacity 0.25s ease; color: var(--ah-ink); }
#marketingView .hw-screen.is-active { visibility: visible; opacity: 1; }
#marketingView .hw-bar { margin-bottom: 12px; font-size: 16px; font-weight: 800; letter-spacing: -0.01em; }
#marketingView .hw-bar.is-sub { margin: 16px 0 4px; font-size: 12px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: #475569; }
#marketingView .hw-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
#marketingView .hw-field { padding: 6px 10px; border: 1px solid #cbd5e1; border-radius: 8px; }
#marketingView .hw-field.hw-wide { grid-column: 1 / -1; }
#marketingView .hw-field.is-focus { border: 2px solid var(--ah-blue); padding: 5px 9px; }
#marketingView .hw-field span { display: block; font-size: 10px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: #475569; }
#marketingView .hw-field b { font-family: var(--ah-mono); font-size: 15px; font-weight: 600; }
#marketingView .hw-btn { margin-top: 12px; padding: 11px; background: var(--ah-blue); border-radius: 10px; color: #fff; font-size: 14px; font-weight: 700; text-align: center; }
#marketingView .hw-list { list-style: none; margin: 0; padding: 0; font-family: var(--ah-mono); font-size: 13px; }
#marketingView .hw-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; margin: 0; padding: 8px 0; border-bottom: 1px solid #e2e8f0; }
#marketingView .hw-screen[data-hw-screen="2"] .hw-list li { grid-template-columns: minmax(0, 1fr) 42px 42px; }
#marketingView .hw-list li > span:not(:first-child) { text-align: right; }
#marketingView .hw-list .hw-head { font-family: var(--font-sans); font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #475569; }
#marketingView .hw-list.is-short li > span:last-child { color: #b91c1c; font-weight: 600; }
#marketingView .hw-file { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; padding: 10px 12px; background: #eff6ff; border-radius: 10px; font-size: 13px; }
#marketingView .hw-file b { font-weight: 700; }
#marketingView .hw-file span { color: #475569; font-size: 12px; }
#marketingView .hw-total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; padding: 12px; background: var(--ah-ink); border-radius: 10px; color: #cbd5e1; font-size: 13px; }
#marketingView .hw-total b { font-family: var(--ah-mono); font-size: 20px; font-weight: 600; color: #fff; }
#marketingView .hw-note { margin: 14px 0 0; font-size: 12.5px; color: #475569; }
@media (prefers-reduced-motion: reduce) {
  #marketingView .hw-screen, #marketingView .hw-steps button { transition: none !important; }
}
@media (max-width: 900px) {
  #marketingView .hw-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  #marketingView .hw-steps button { padding: 12px 14px; align-items: center; }
  #marketingView .hw-steps button[aria-pressed="true"] { align-items: flex-start; }
  #marketingView .hw-steps button[aria-pressed="false"] .hw-desc { display: none; }
  #marketingView .hw-steps strong { margin-bottom: 0; }
  #marketingView .hw-steps button[aria-pressed="true"] strong { margin-bottom: 3px; }
}

/* Audit week chart: sold hours against the 8-hour day. 8 of the 10-hour scale puts the goal line at 80%. */
#marketingView .wk { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
#marketingView .wk-track { position: relative; display: flex; flex-direction: column-reverse; gap: 2px; height: 128px; background: #e2e8f0; border-radius: 4px 4px 0 0; overflow: hidden; }
#marketingView .wk-track::after { content: ''; position: absolute; left: 0; right: 0; bottom: 80%; height: 2px; background: var(--ah-ink); box-shadow: 0 0 0 1px #fff; }
#marketingView .wk-track i { display: block; width: 100%; flex: none; transition: height 0.25s ease; }
#marketingView .wk-track i[style$="height: 0%"] { display: none; }
#marketingView .wk-sold { background: var(--ah-blue); }
#marketingView .wk-lost { background: #dc2626; }
#marketingView .wk-day { min-width: 0; text-align: center; }
#marketingView .wk-day b { display: block; margin-top: 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; color: #475569; }
#marketingView .wk-val { display: block; font-family: var(--ah-mono); font-size: 15px; font-weight: 600; color: var(--ah-ink); }
#marketingView .wk-tag { display: block; min-height: 1.3em; font-size: 11px; font-weight: 700; color: #475569; white-space: nowrap; }
#marketingView .wk-day.is-miss .wk-tag { color: #b91c1c; }
#marketingView .wk-day.is-hit .wk-tag { color: #166534; }
#marketingView .ah-legend .is-sold::before { background: var(--ah-blue); }
#marketingView .ah-legend .is-miss::before { background: #dc2626; }
#marketingView .ah-legend .is-goal::before { height: 2px; width: 16px; border-radius: 0; background: var(--ah-ink); }
#marketingView .ah-col-day { color: #475569; font-size: 0.85em; font-weight: 600; }
#marketingView #auditRows .ah-row.is-newday { border-top: 1px solid #94a3b8; }
#marketingView .ah-total-label { white-space: nowrap; }
@media (prefers-reduced-motion: reduce) {
  #marketingView .wk-track i { transition: none !important; }
}
@media (max-width: 620px) {
  #marketingView .ah-col-day, #marketingView .ah-col-t { display: none; }
  #marketingView .ah-row-total .ah-total-label { grid-column: 1 / 3; }
  #marketingView .wk { gap: 5px; }
  #marketingView .wk-val { font-size: 13.5px; }
  #marketingView .wk-tag { font-size: 10px; }
}

/* Marketing Dealership Section: black band walking 42.60 flagged down to 40.80 sold */
#marketingView > #dealership { max-width: none; margin: 32px 0; padding: 72px 24px; background: var(--ah-ink); color: #cbd5e1; }
#marketingView .dl-inner { max-width: 1320px; margin: 0 auto; }
#marketingView #dealership .hv-head h2 { color: #fff; }
#marketingView #dealership .hv-head h2 em, #marketingView #dealership .hv-kicker { color: #60a5fa; }
#marketingView #dealership .hv-head p { color: #cbd5e1; }
#marketingView .dl-flow { position: relative; display: grid; grid-template-columns: 124px repeat(3, minmax(0, 1fr)) 124px; gap: 12px; align-items: stretch; }
#marketingView .dl-end { display: flex; flex-direction: column; justify-content: center; padding: 16px 10px; background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 12px; text-align: center; }
#marketingView .dl-end span { font-size: 12px; font-weight: 700; line-height: 1.3; color: #cbd5e1; }
#marketingView .dl-end b { margin-top: 6px; font-family: var(--ah-mono); font-size: 27px; font-weight: 600; color: #fff; }
#marketingView .dl-end.is-sold { background: var(--ah-blue); border-color: var(--ah-blue); }
#marketingView .dl-end.is-sold span { color: #fff; }
#marketingView .dl-leak { display: flex; flex-direction: column; min-width: 0; padding: 18px; background: #fff; border-radius: 12px; color: #475569; text-align: left; }
#marketingView .dl-amt { font-family: var(--ah-mono); font-size: 27px; font-weight: 600; line-height: 1.1; color: #b91c1c; }
#marketingView .dl-who { margin-top: 4px; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #475569; }
#marketingView .dl-leak h3 { margin: 10px 0 6px; font-family: var(--font-display); font-size: 17px; line-height: 1.25; font-weight: 700; color: var(--ah-ink); text-align: left; }
#marketingView .dl-leak p { margin: 0 0 10px; font-size: 14px; line-height: 1.5; color: #475569; }
#marketingView .dl-leak ul { list-style: none; margin: auto 0 0; padding: 8px 0 0; border-top: 1px solid #e2e8f0; }
#marketingView .dl-leak li { margin: 0; padding: 2px 0; font-family: var(--ah-mono); font-size: 12px; color: var(--ah-ink); }
#marketingView .dl-run { margin-top: 8px; font-family: var(--ah-mono); font-size: 13px; font-weight: 600; color: var(--ah-ink); }
#marketingView .dl-both { max-width: 780px; margin: 22px auto 0; font-size: 15.5px; line-height: 1.5; color: #cbd5e1; text-align: center; }
#marketingView .dl-both b { color: #fff; }
#marketingView .dl-foot { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; margin-top: 32px; align-items: stretch; }
#marketingView .dl-scale { padding: 26px; background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 14px; text-align: left; }
#marketingView .dl-scale h3 { margin: 0 0 16px; font-family: var(--font-display); font-size: 22px; line-height: 1.2; font-weight: 800; letter-spacing: -0.01em; color: #fff; text-align: left; }
#marketingView .dl-stepper { display: flex; align-items: center; gap: 10px; }
#marketingView .dl-stepper button { width: 44px; min-height: 44px; padding: 0; background: transparent; border: 1px solid rgba(255, 255, 255, 0.4); border-radius: 10px; color: #fff; font-size: 22px; font-weight: 600; line-height: 1; cursor: pointer; }
#marketingView .dl-stepper button:hover { background: rgba(255, 255, 255, 0.12); }
#marketingView .dl-stepper button:focus-visible, #marketingView #enterpriseInquireBtn:focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; }
#marketingView .dl-stepper output { min-width: 2.2ch; font-family: var(--ah-mono); font-size: 24px; font-weight: 600; color: #fff; text-align: center; }
#marketingView .dl-stepper span { font-size: 14px; color: #cbd5e1; }
#marketingView .dl-result { margin-top: 16px; font-size: 16px; color: #cbd5e1; }
#marketingView .dl-result b { display: block; font-family: var(--ah-mono); font-size: clamp(36px, 4vw, 52px); line-height: 1.1; font-weight: 600; color: #60a5fa; }
#marketingView .dl-scale p { margin: 12px 0 0; font-size: 13px; line-height: 1.45; color: #cbd5e1; }
#marketingView #dealership .st-shop { background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.2); box-shadow: none; }
#marketingView #enterprise .st-grid { display: block; max-width: 780px; margin: 0 auto; }
@media (max-width: 1100px) {
  #marketingView .dl-flow { grid-template-columns: minmax(0, 1fr); }
  #marketingView .dl-end { flex-direction: row; justify-content: space-between; align-items: center; text-align: left; padding: 12px 16px; }
  #marketingView .dl-end b { margin-top: 0; }
  #marketingView .dl-foot { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 620px) {
  #marketingView > #dealership { padding: 48px 16px; }
  #marketingView .dl-scale { padding: 18px; }
}

/* Marketing audience switch: tech or shop manager; see js/ui/audience.js */
#marketingView[data-audience="shop"] [data-for="tech"],
#marketingView[data-audience="tech"] [data-for="shop"],
#marketingView:not([data-audience]) [data-for="shop"] { display: none !important; }
#marketingView[data-audience="shop"] #ownAudit, #marketingView[data-audience="shop"] #pricing { display: none; }
#marketingView .ah-who { display: inline-flex; gap: 2px; margin-bottom: 20px; padding: 3px; background: #f1f5f9; border-radius: 12px; }
#marketingView .ah-who button { width: auto; min-height: 42px; padding: 8px 16px; background: transparent; border: 0; border-radius: 9px; color: #475569; font-family: var(--font-sans); font-size: 14px; font-weight: 700; white-space: nowrap; cursor: pointer; }
#marketingView .ah-who button:hover { color: var(--ah-ink); }
#marketingView .ah-who button[aria-pressed="true"] { background: var(--ah-ink); color: #fff; }
#marketingView .ah-who button:focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; }
@media (max-width: 1100px) {
  #marketingView .ah-who { order: 0; align-self: flex-start; justify-self: start; }
}
@media (max-width: 620px) {
  #marketingView .ah-who { display: flex; width: 100%; box-sizing: border-box; }
  #marketingView .ah-who button { flex: 1; padding: 8px; }
}

/* ==========================================================================
   Site lock (html.site-locked is set early in index.html on public hosts).
   Only the marketing page can show. The rules use !important so no script
   that sets inline styles can bring the app, sign-in, or setup views back.
   ========================================================================== */
.lock-label { display: none; }
html.site-locked .lock-cta .open-label { display: none; }
html.site-locked .lock-cta .lock-label { display: inline; }
html.site-locked .lock-cta {
  pointer-events: none;
  cursor: not-allowed;
  opacity: 0.7;
}
html.site-locked #marketingView { display: block !important; }
html.site-locked #loginView,
html.site-locked #authView,
html.site-locked #setupFormSection,
html.site-locked #app,
html.site-locked #mainMenu,
html.site-locked .wrap > header.top { display: none !important; }

/* ==========================================================================
   THT Analytics (js/ui/tht-analytics.js). Built from the tech's own lines.
   Light and dark both run through the --tha-* tokens below.
   ========================================================================== */
.tha {
  --tha-card: #ffffff;
  --tha-ink: #0f172a;
  --tha-muted: #5b6472;
  --tha-line: #e2e8f0;
  --tha-sold: #2563eb;
  --tha-range: #bfdbfe;
  --tha-out: #c3002f;
  --tha-out-soft: #fff1f2;
  --tha-clear: #245d38;
  --tha-hero: #0b1220;
  --tha-hero-ink: #f8fafc;
  --tha-hero-muted: #a5b4c8;
  --tha-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --tha-display: 'Outfit', 'Inter', system-ui, sans-serif;
  --tha-body: 'Inter', 'Open Sans', system-ui, sans-serif;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 8px 0 24px;
  font-family: var(--tha-body);
  color: var(--tha-ink);
}
[data-theme="dark"] .tha {
  --tha-card: #1c1f24;
  --tha-ink: rgba(255, 255, 255, 0.92);
  --tha-muted: rgba(255, 255, 255, 0.62);
  --tha-line: #2e3338;
  --tha-sold: #60a5fa;
  --tha-range: #1e3a5f;
  --tha-out: #fb7185;
  --tha-out-soft: #3a1d24;
  --tha-clear: #4ade80;
  --tha-hero: #060a12;
}

.tha-hero { background: var(--tha-hero); color: var(--tha-hero-ink); border-radius: 20px; overflow: hidden; }
.tha-hero-inner { padding: 28px 28px 24px; display: flex; flex-direction: column; gap: 10px; }
.tha-eyebrow { margin: 0; font: 600 12px/1.2 var(--tha-body); letter-spacing: 0.14em; text-transform: uppercase; color: #60a5fa; }
.tha-headline { margin: 0; font: 700 clamp(28px, 4.4vw, 46px)/1.05 var(--tha-display); letter-spacing: -0.02em; text-wrap: balance; color: var(--tha-hero-ink); }
.tha-headline em { font-style: normal; color: #60a5fa; }
.tha-lede { margin: 0; max-width: 62ch; font-size: 15px; line-height: 1.55; color: var(--tha-hero-muted); }
.tha-lede b { color: var(--tha-hero-ink); }
.tha-meter { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.tha-meter-bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: #1e293b; }
.tha-meter-sold { background: #3b82f6; }
.tha-meter-out { background: repeating-linear-gradient(135deg, #e11d48 0 6px, #9f1239 6px 12px); }
.tha-meter-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font: 500 12px/1.3 var(--tha-mono); color: var(--tha-hero-muted); font-variant-numeric: tabular-nums; }
.tha-meter-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.tha-meter-legend i.is-sold { background: #3b82f6; }
.tha-meter-legend i.is-out { background: #e11d48; }
.tha-meter-total { margin-left: auto; color: var(--tha-hero-ink); }

.tha-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tha-stat { background: var(--tha-card); border: 1px solid var(--tha-line); border-radius: 16px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tha-stat.is-alert { border-color: var(--tha-out); background: var(--tha-out-soft); }
.tha-stat-label { font: 600 11px/1.2 var(--tha-body); letter-spacing: 0.1em; text-transform: uppercase; color: var(--tha-muted); }
.tha-stat-val { font: 700 30px/1.1 var(--tha-display); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; color: var(--tha-ink); }
.tha-stat.is-alert .tha-stat-val { color: var(--tha-out); }
.tha-stat-sub { font-size: 12.5px; line-height: 1.4; color: var(--tha-muted); }

.tha-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.tha-card { background: var(--tha-card); border: 1px solid var(--tha-line); border-radius: 18px; padding: 22px 22px 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.tha-card-wide { grid-column: 1 / -1; }
.tha-card-head h3 { margin: 0 0 4px; font: 700 20px/1.2 var(--tha-display); color: var(--tha-ink); text-wrap: balance; }
.tha-card-head p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--tha-muted); max-width: 70ch; }

.tha-legend { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 13px; color: var(--tha-muted); }
.tha-legend span { display: inline-flex; align-items: center; gap: 8px; }
.tha-key-range { width: 22px; height: 8px; border-radius: 999px; background: var(--tha-range); }
.tha-key-avg { width: 3px; height: 14px; border-radius: 2px; background: var(--tha-ink); }
.tha-key-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--tha-sold); box-shadow: 0 0 0 2px var(--tha-card), 0 0 0 3px var(--tha-sold); }

.tha-spread { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tha-spread-row { display: grid; grid-template-columns: minmax(140px, 220px) minmax(0, 1fr); grid-template-areas: "name track" "name nums" "name verdict"; column-gap: 20px; row-gap: 2px; padding: 12px 0; border-top: 1px solid var(--tha-line); }
.tha-spread-row:first-child { border-top: 0; }
.tha-spread-name { grid-area: name; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tha-spread-name b { font: 700 15px/1.3 var(--tha-body); color: var(--tha-ink); overflow-wrap: anywhere; }
.tha-spread-name span { font-size: 12px; color: var(--tha-muted); }
.tha-spread-track { grid-area: track; position: relative; height: 22px; }
.tha-spread-track::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--tha-line); }
.tha-spread-range { position: absolute; top: 50%; height: 10px; transform: translateY(-50%); border-radius: 999px; background: var(--tha-range); }
.tha-spread-avg { position: absolute; top: 50%; width: 3px; height: 18px; transform: translate(-50%, -50%); border-radius: 2px; background: var(--tha-ink); }
.tha-spread-dot { position: absolute; top: 50%; width: 14px; height: 14px; transform: translate(-50%, -50%); border-radius: 50%; background: var(--tha-sold); box-shadow: 0 0 0 2px var(--tha-card), 0 0 0 3.5px var(--tha-sold); }
.tha-spread-dot.is-unsold { background: var(--tha-card); box-shadow: 0 0 0 2.5px var(--tha-out); }
.tha-spread-nums { grid-area: nums; font: 500 12.5px/1.4 var(--tha-mono); color: var(--tha-muted); font-variant-numeric: tabular-nums; }
.tha-verdict { grid-area: verdict; font-size: 12.5px; font-weight: 600; color: var(--tha-muted); }
.tha-verdict.is-short { color: var(--tha-out); }
.tha-verdict.is-over { color: var(--tha-clear); }
.tha-foot { margin: 0; font-size: 12.5px; color: var(--tha-muted); }

.tha-bars, .tha-types { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.tha-bar-top { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.tha-bar-top b { color: var(--tha-ink); min-width: 0; overflow-wrap: anywhere; }
.tha-bar-top span { font: 600 13px/1.4 var(--tha-mono); color: var(--tha-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tha-bar { height: 8px; margin-top: 6px; border-radius: 999px; background: var(--tha-line); overflow: hidden; }
.tha-bar span { display: block; height: 100%; border-radius: 999px; }
.tha-bar span.is-out { background: var(--tha-out); }
.tha-bar span.is-sold { background: var(--tha-sold); }
.tha-bar span.is-clear { background: var(--tha-clear); opacity: 0.75; }
.tha-bar-sub { margin-top: 5px; font: 500 12px/1.4 var(--tha-mono); color: var(--tha-muted); font-variant-numeric: tabular-nums; }
.tha-types li { display: flex; gap: 12px; align-items: flex-start; }
.tha-types li.is-empty { opacity: 0.55; }
.tha-type-body { flex: 1; min-width: 0; }
.tha-type-badge { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font: 700 11px/1 var(--tha-body); color: #fff; }
.tha-type-W { background: var(--w-red, #9c1b1b); }
.tha-type-C { background: var(--cp-green, #278548); }
.tha-type-I { background: var(--i-blue, #1d4f91); }

.tha-chase { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tha-chase li { display: grid; grid-template-columns: minmax(110px, 150px) minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 12px 0; border-top: 1px solid var(--tha-line); }
.tha-chase li:first-child { border-top: 0; }
.tha-chase-id { display: flex; align-items: center; gap: 8px; font: 600 13.5px/1.3 var(--tha-mono); color: var(--tha-ink); }
.tha-chase-job { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tha-chase-job b { font-size: 14.5px; color: var(--tha-ink); overflow-wrap: anywhere; }
.tha-chase-job span { font-size: 12.5px; color: var(--tha-muted); overflow-wrap: anywhere; }
.tha-chase-hrs { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.tha-chase-hrs b { font: 700 22px/1.1 var(--tha-display); color: var(--tha-out); font-variant-numeric: tabular-nums; }
.tha-chase-hrs span { font: 500 11.5px/1.3 var(--tha-mono); color: var(--tha-muted); white-space: nowrap; }

.tha-more { margin: 12px 0 -8px; font: 700 13px/1.2 var(--tha-body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--tha-muted); }

@media (max-width: 900px) {
  .tha-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tha-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .tha-hero-inner { padding: 22px 18px 20px; }
  .tha-card { padding: 18px 16px; }
  .tha-stat-val { font-size: 24px; }
  .tha-spread-row { grid-template-columns: minmax(0, 1fr); grid-template-areas: "name" "track" "nums" "verdict"; row-gap: 6px; }
  .tha-chase li { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "id hrs" "job hrs"; row-gap: 4px; }
  .tha-chase-id { grid-area: id; }
  .tha-chase-job { grid-area: job; }
  .tha-chase-hrs { grid-area: hrs; }
  .tha-meter-total { margin-left: 0; }
}

/* THT Analytics: paycheck forecast and counter note composer */
.tha-forecast { background: var(--tha-card); border: 1px solid var(--tha-line); border-radius: 18px; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.tha-forecast-head h3 { margin: 0 0 4px; font: 700 20px/1.2 var(--tha-display); color: var(--tha-ink); }
.tha-forecast-head p { margin: 0; font-size: 13.5px; color: var(--tha-muted); }
.tha-forecast-nums { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px; }
.tha-forecast-nums > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tha-forecast-nums span { font: 600 11px/1.3 var(--tha-body); letter-spacing: 0.1em; text-transform: uppercase; color: var(--tha-muted); }
.tha-forecast-nums b { font: 700 clamp(28px, 4vw, 40px)/1.05 var(--tha-display); color: var(--tha-ink); font-variant-numeric: tabular-nums; }
.tha-forecast-nums .is-potential b { color: var(--tha-sold); }
.tha-forecast-nums em { font: 500 12.5px/1.4 var(--tha-mono); font-style: normal; color: var(--tha-muted); }
.tha-forecast-arrow { font: 700 26px/1 var(--tha-display); color: var(--tha-muted); }
.tha-forecast-bar { height: 10px; border-radius: 999px; background: var(--tha-range); overflow: hidden; }
.tha-forecast-bar span { display: block; height: 100%; background: var(--tha-sold); border-radius: 999px; }
.tha-forecast-pace { margin: 0; font-size: 14px; line-height: 1.5; color: var(--tha-ink); }

.tha-note-btn { align-self: flex-start; margin-top: 8px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--tha-sold); background: transparent; color: var(--tha-sold); font: 600 12.5px/1 var(--tha-body); cursor: pointer; }
.tha-note-btn:hover { background: var(--tha-sold); color: #fff; }
.tha-note-btn:focus-visible, .tha-btn:focus-visible, .tha-composer-close:focus-visible { outline: 2px solid var(--tha-sold); outline-offset: 2px; }
.tha-chase li { grid-template-columns: minmax(110px, 150px) minmax(0, 1fr) auto auto; }
.tha-note-btn-line { margin-top: 0; white-space: nowrap; }

.tha-composer { background: var(--tha-card); border: 2px solid var(--tha-sold); border-radius: 18px; padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 18px 40px rgba(37, 99, 235, 0.14); }
.tha-composer[hidden] { display: none; }
.tha-composer-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.tha-composer-head h3 { margin: 0 0 4px; font: 700 19px/1.2 var(--tha-display); color: var(--tha-ink); }
.tha-composer-head p { margin: 0; font-size: 13px; color: var(--tha-muted); }
.tha-composer-close { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--tha-line); background: transparent; color: var(--tha-muted); font-size: 14px; cursor: pointer; }
.tha-composer textarea { width: 100%; box-sizing: border-box; min-height: 190px; padding: 14px; border-radius: 12px; border: 1px solid var(--tha-line); background: var(--tha-card); color: var(--tha-ink); font: 500 14px/1.55 var(--tha-mono); resize: vertical; }
.tha-composer-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.tha-btn { display: inline-flex; align-items: center; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--tha-line); background: transparent; color: var(--tha-ink); font: 600 14px/1 var(--tha-body); text-decoration: none; cursor: pointer; }
.tha-btn-solid { background: var(--tha-sold); border-color: var(--tha-sold); color: #fff; }
.tha-composer-status { font-size: 13px; color: var(--tha-clear); font-weight: 600; }
.tha-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 560px) {
  .tha-forecast { padding: 18px 16px; }
  .tha-forecast-nums { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .tha-forecast-arrow { display: none; }
  .tha-chase li { grid-template-areas: "id hrs" "job hrs" "btn btn"; }
  .tha-note-btn-line { grid-area: btn; justify-self: start; }
}

/* THT Analytics: shop value and pay period review */
#analyticsView.tha-retired { display: none !important; }
.tha-shop-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tha-shop-row > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tha-shop-row span { font: 600 11px/1.3 var(--tha-body); letter-spacing: 0.1em; text-transform: uppercase; color: var(--tha-muted); }
.tha-shop-row b { font: 700 clamp(22px, 3vw, 30px)/1.1 var(--tha-display); color: var(--tha-ink); font-variant-numeric: tabular-nums; }
.tha-shop-bar { height: 10px; border-radius: 999px; background: var(--tha-range); overflow: hidden; }
.tha-shop-bar span { display: block; height: 100%; background: var(--tha-sold); border-radius: 999px; }
.tha-shop-callout { border-left: 4px solid var(--tha-out); background: var(--tha-out-soft); border-radius: 10px; padding: 12px 14px; }
.tha-shop-callout b { display: block; font-size: 14.5px; color: var(--tha-ink); }
.tha-shop-callout p { margin: 4px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--tha-ink); }
.tha-check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--tha-ink); cursor: pointer; }
.tha-check input { width: 18px; height: 18px; accent-color: var(--tha-sold); }
.tha-review-doc { margin: 0; padding: 18px; border-radius: 12px; border: 1px solid var(--tha-line); background: var(--tha-card); color: var(--tha-ink); font: 500 13px/1.6 var(--tha-mono); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 460px; overflow: auto; }
@media (max-width: 560px) {
  .tha-shop-row { grid-template-columns: minmax(0, 1fr); }
}
#thaPrintSheet { display: none; }
@media print {
  html.tha-printing-review body > *:not(#thaPrintSheet) { display: none !important; }
  html.tha-printing-review #thaPrintSheet { display: block; margin: 0; color: #000; background: #fff; font: 10.5pt/1.55 'IBM Plex Mono', ui-monospace, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
}

/* THT Analytics: your next moves (inside the dark headline band) */
.tha-moves { margin-top: 14px; padding-top: 18px; border-top: 1px solid rgba(165, 180, 200, 0.22); display: flex; flex-direction: column; gap: 10px; }
.tha-moves h3 { margin: 0; font: 600 12px/1.2 var(--tha-body); letter-spacing: 0.14em; text-transform: uppercase; color: #60a5fa; }
.tha-moves p { margin: 0; color: var(--tha-hero-muted); font-size: 14.5px; }
.tha-moves ol { list-style: none; counter-reset: move; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tha-moves li { counter-increment: move; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; background: rgba(148, 163, 184, 0.09); border: 1px solid rgba(148, 163, 184, 0.16); }
.tha-moves li::before { content: counter(move); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #2563eb; color: #fff; font: 700 13px/1 var(--tha-display); }
.tha-moves li:first-child { background: rgba(37, 99, 235, 0.18); border-color: rgba(96, 165, 250, 0.5); }
.tha-move-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tha-move-text b { font: 600 15.5px/1.3 var(--tha-body); color: var(--tha-hero-ink); overflow-wrap: anywhere; }
.tha-move-text span { font-size: 13px; line-height: 1.45; color: var(--tha-hero-muted); }
.tha-move-btn { flex: none; padding: 9px 14px; border-radius: 10px; border: 1px solid #3b82f6; background: #2563eb; color: #fff; font: 600 13px/1 var(--tha-body); cursor: pointer; white-space: nowrap; }
.tha-move-btn.is-ghost { background: transparent; color: #93c5fd; border-color: rgba(147, 197, 253, 0.45); }
.tha-move-btn:hover { filter: brightness(1.12); }
.tha-move-btn:focus-visible { outline: 2px solid #93c5fd; outline-offset: 2px; }
@keyframes tha-flash { 0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.55); } 100% { box-shadow: 0 0 0 14px rgba(37, 99, 235, 0); } }
.tha-flash { animation: tha-flash 0.9s ease-out 1; }
@media (prefers-reduced-motion: reduce) { .tha-flash { animation: none; } }
@media (max-width: 560px) {
  .tha-moves li { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "num text" "btn btn"; row-gap: 10px; }
  .tha-moves li::before { grid-area: num; align-self: start; }
  .tha-move-text { grid-area: text; }
  .tha-move-btn { grid-area: btn; justify-self: stretch; text-align: center; padding: 11px 14px; }
}

/* THT Analytics: Foreman IQ, Enterprise gate, and the phone / desktop layouts */
.tha-fiq-mark { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; flex: none; margin-right: 8px; padding: 3px 9px 3px 7px; border-radius: 999px; background: linear-gradient(135deg, #2563eb, #0ea5e9); color: #fff; font: 700 11px/1.2 var(--tha-body, var(--font-body, system-ui, sans-serif)); letter-spacing: 0.08em; text-transform: uppercase; vertical-align: 1px; }
.tha-fiq-mark::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.28); }
.tha-moves h3 span { color: var(--tha-hero-muted); letter-spacing: 0.06em; text-transform: none; font-weight: 500; }

.tha-fiq { border: 1px solid transparent; background: linear-gradient(var(--tha-card), var(--tha-card)) padding-box, linear-gradient(135deg, #2563eb, #0ea5e9 60%, #22d3ee) border-box; }
.tha-fiq-eyebrow { margin: 0 0 8px; font: 600 12px/1.2 var(--tha-body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--tha-sold); }
.tha-fiq-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.tha-fiq-list li { padding: 12px 14px; border-radius: 12px; background: rgba(37, 99, 235, 0.07); border: 1px solid rgba(37, 99, 235, 0.18); }
.tha-fiq-top { display: flex; justify-content: space-between; gap: 10px; font: 600 13.5px/1.3 var(--tha-mono); color: var(--tha-ink); }
.tha-fiq-top span { color: var(--tha-sold); white-space: nowrap; }
.tha-fiq-job { margin-top: 2px; font-size: 14px; font-weight: 600; color: var(--tha-ink); }
.tha-fiq-list p { margin: 4px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--tha-muted); }

.tha-enterprise { margin: 0; padding: 14px 18px; border-radius: 14px; border: 1px dashed var(--tha-line); color: var(--tha-muted); font-size: 13.5px; text-align: center; }
.tha-enterprise b { color: var(--tha-ink); }

/* Layout: phone first, one column. The rail (stats, check, Foreman IQ) comes first. */
.tha-layout { display: flex; flex-direction: column; gap: 20px; }
.tha-rail, .tha-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.tha-jump { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: -6px -2px 0; padding: 10px 2px; background: color-mix(in srgb, var(--paper, #f4f4f5) 92%, transparent); backdrop-filter: blur(8px); }
.tha-jump::-webkit-scrollbar { display: none; }
.tha-jump a { flex: none; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--tha-line); background: var(--tha-card); color: var(--tha-ink); font: 600 13px/1 var(--tha-body); text-decoration: none; }
.tha-jump a:focus-visible { outline: 2px solid var(--tha-sold); outline-offset: 2px; }

/* Desktop: two columns, the detail on the left, the summary rail (stats, check, Foreman IQ) on the right. */
@media (min-width: 1100px) {
  .tha-jump { display: none; }
  .tha-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 400px); gap: 20px; align-items: start; }
  .tha-main { grid-column: 1; grid-row: 1; }
  .tha-rail { grid-column: 2; grid-row: 1; }
  .tha-rail .tha-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tha-rail .tha-stat-val { font-size: 26px; }
  .tha-rail .tha-forecast-nums { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .tha-rail .tha-forecast-arrow { display: none; }
  .tha-rail .tha-forecast-nums b { font-size: 32px; }
  .tha-main .tha-shop-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Foreman IQ Job Memory notice on the workbench Current Job form */
.fiq-jm { margin-top: 10px; padding: 12px 14px; border-radius: 12px; border: 1px solid transparent; background: linear-gradient(var(--card, #fff), var(--card, #fff)) padding-box, linear-gradient(135deg, #2563eb, #0ea5e9 60%, #22d3ee) border-box; color: var(--ink); font-size: 13px; line-height: 1.5; display: flex; flex-direction: column; gap: 8px; }
.fiq-jm[hidden] { display: none; }
.fiq-jm-head { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.fiq-jm-head .tha-fiq-mark { margin-right: 2px; }
.fiq-jm p { margin: 0; }
.fiq-jm-ops { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.fiq-jm-ops li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; background: var(--teal-soft, rgba(53, 100, 126, 0.1)); }
.fiq-jm-ops li.is-missing { background: rgba(37, 99, 235, 0.1); outline: 1px dashed rgba(37, 99, 235, 0.55); }
.fiq-jm-ops code { display: inline-block; padding: 2px 8px; border-radius: 6px; border: 1px solid var(--teal-deep, #35647e); background: var(--card, #fff); color: var(--teal-deep, #35647e); font: 700 13px/1.3 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace; letter-spacing: 0.02em; }
.fiq-jm-desc { min-width: 0; overflow-wrap: anywhere; color: var(--muted); }
.fiq-jm-ops b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.fiq-jm-have { font-size: 11px; color: var(--ok, #245d38); font-weight: 700; white-space: nowrap; }
.fiq-jm-add { padding: 5px 10px; border-radius: 8px; border: 1px solid #2563eb; background: #2563eb; color: #fff; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.fiq-jm-add:focus-visible { outline: 2px solid #93c5fd; outline-offset: 2px; }
.fiq-jm-note b { color: #1d4ed8; }
[data-theme="dark"] .fiq-jm-note b { color: #93c5fd; }
.fiq-jm-foot { font-size: 11.5px; color: var(--muted); }
.tha-fiq-sub h4 { margin: 0 0 8px; font: 700 12px/1.2 var(--tha-body); letter-spacing: 0.1em; text-transform: uppercase; color: var(--tha-muted); }
@media (max-width: 560px) {
  .fiq-jm-ops li { grid-template-columns: auto minmax(0, 1fr) auto; }
  .fiq-jm-add, .fiq-jm-have { grid-column: 1 / -1; justify-self: start; }
}

/* Foreman IQ Job Book: averages in the workbench notice, "show all" in the spread */
.fiq-jm-head .fiq-jm-hide { margin-left: auto; padding: 4px 10px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 12px; font-weight: 600; cursor: pointer; }
.fiq-jm-hide:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
.fiq-jm-avgs { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.fiq-jm-avgs > div { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; border-radius: 10px; background: rgba(37, 99, 235, 0.07); }
.fiq-jm-avgs span { font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.fiq-jm-avgs b { font-size: 18px; line-height: 1.2; color: var(--ink); font-variant-numeric: tabular-nums; }
.fiq-jm-avgs em { font-style: normal; font-size: 11px; color: var(--muted); }
.tha-more-jobs { border-top: 1px solid var(--tha-line); padding-top: 10px; }
.tha-more-jobs summary { cursor: pointer; font: 600 13.5px/1.3 var(--tha-body); color: var(--tha-sold); list-style: none; }
.tha-more-jobs summary::-webkit-details-marker { display: none; }
.tha-more-jobs summary::before { content: "+ "; }
.tha-more-jobs[open] summary::before { content: "− "; }
.tha-more-jobs summary:focus-visible { outline: 2px solid var(--tha-sold); outline-offset: 2px; border-radius: 4px; }

/* THT Analytics: Beat the Clock */
.tha-clock .tha-card-head h3 { font-size: 22px; }
.tha-gauge { display: flex; flex-direction: column; gap: 6px; }
.tha-gauge-top { display: flex; align-items: baseline; gap: 10px; }
.tha-gauge-top b { font: 700 40px/1 var(--tha-display); color: var(--tha-ink); font-variant-numeric: tabular-nums; }
.tha-gauge-top span { font-size: 13.5px; color: var(--tha-muted); }
.tha-gauge-bar { position: relative; height: 14px; border-radius: 999px; background: var(--tha-line); }
.tha-gauge-bar span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; }
.tha-gauge-bar span.is-ahead { background: linear-gradient(90deg, #2563eb, #16a34a); }
.tha-gauge-bar span.is-behind { background: linear-gradient(90deg, #2563eb, #e11d48); }
.tha-gauge-bar i { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--tha-ink); border-radius: 2px; }
.tha-gauge-scale { position: relative; height: 16px; font: 500 11.5px/16px var(--tha-mono); color: var(--tha-muted); }
.tha-gauge-scale span { position: absolute; top: 0; white-space: nowrap; }
.tha-gauge-scale span:first-child { left: 0; }
.tha-gauge-scale span:nth-child(2) { transform: translateX(-50%); }
.tha-gauge-scale span:last-child { right: 0; }
.tha-key-paid { width: 22px; height: 8px; border-radius: 999px; background: var(--tha-sold); }
.tha-key-clock { width: 22px; height: 8px; border-radius: 999px; background: repeating-linear-gradient(135deg, var(--tha-muted) 0 3px, transparent 3px 6px); border: 1px solid var(--tha-muted); box-sizing: border-box; }
.tha-clock-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tha-clock-list li { display: grid; grid-template-columns: minmax(150px, 240px) minmax(0, 1fr) minmax(120px, auto); gap: 16px; align-items: center; padding: 10px 0; border-top: 1px solid var(--tha-line); }
.tha-clock-list li:first-child { border-top: 0; }
.tha-clock-id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tha-clock-id b { font: 600 13.5px/1.3 var(--tha-mono); color: var(--tha-ink); }
.tha-clock-id span { font-size: 13px; color: var(--tha-muted); overflow-wrap: anywhere; }
.tha-clock-bars { display: flex; flex-direction: column; gap: 4px; }
.tha-clock-bars span { display: block; height: 8px; border-radius: 999px; }
.tha-clock-bars .is-paid { background: var(--tha-sold); }
.tha-clock-bars .is-clock { background: repeating-linear-gradient(135deg, var(--tha-muted) 0 3px, transparent 3px 6px); border: 1px solid var(--tha-muted); box-sizing: border-box; }
.tha-clock-num { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.tha-clock-num b { font: 700 18px/1.1 var(--tha-display); font-variant-numeric: tabular-nums; }
.tha-clock-num span { font: 500 11.5px/1.3 var(--tha-mono); color: var(--tha-muted); white-space: nowrap; }
.tha .is-ahead { color: var(--tha-clear); }
.tha .is-behind { color: var(--tha-out); }
.tha-clock-num.is-ahead b { color: var(--tha-clear); }
.tha-clock-num.is-behind b { color: var(--tha-out); }
.tha-clock-book { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; padding-top: 12px; border-top: 1px solid var(--tha-line); }
.tha-clock-book h4 { margin: 0 0 6px; font: 700 12px/1.2 var(--tha-body); letter-spacing: 0.1em; text-transform: uppercase; color: var(--tha-muted); }
.tha-clock-group { margin: 18px 0 2px; font: 700 12px/1.2 var(--tha-body); letter-spacing: 0.1em; text-transform: uppercase; color: var(--tha-muted); }
.tha-clock-book ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--tha-ink); }
.tha-clock-book span { color: var(--tha-muted); font-size: 12.5px; }
.tha-clock-book em { font-style: normal; font-weight: 700; white-space: nowrap; }
.tha-clock-remind { margin: 0; padding: 10px 12px; border-radius: 10px; background: rgba(217, 119, 6, 0.1); border-left: 4px solid #d97706; font-size: 13.5px; color: var(--tha-ink); }
@media (max-width: 560px) {
  .tha-clock-list li { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "id num" "bars bars"; row-gap: 8px; }
  .tha-clock-id { grid-area: id; }
  .tha-clock-num { grid-area: num; }
  .tha-clock-bars { grid-area: bars; }
  .tha-gauge-top b { font-size: 32px; }
  .tha-gauge-scale span:nth-child(2) { font-size: 10.5px; }
}

/* THT Analytics: Pay Period History */
.tha-key-outh { width: 22px; height: 8px; border-radius: 999px; background: repeating-linear-gradient(135deg, #e11d48 0 3px, #9f1239 3px 6px); }
.tha-hist { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px; align-items: end; }
.tha-hist li { min-width: 0; }
.tha-hist button { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px 8px; border-radius: 14px; border: 1px solid transparent; background: transparent; color: var(--tha-ink); cursor: pointer; font: inherit; }
.tha-hist button:hover { background: rgba(37, 99, 235, 0.06); }
.tha-hist button:focus-visible { outline: 2px solid var(--tha-sold); outline-offset: 2px; }
.tha-hist li.is-current button { border-color: rgba(37, 99, 235, 0.55); background: rgba(37, 99, 235, 0.08); }
.tha-hist-rate { font: 700 15px/1 var(--tha-display); font-variant-numeric: tabular-nums; }
.tha-hist li.is-current .tha-hist-rate { color: var(--tha-sold); }
.tha-hist-col { position: relative; width: 100%; max-width: 46px; height: 150px; display: flex; flex-direction: column; justify-content: flex-end; border-radius: 8px 8px 4px 4px; background: var(--tha-line); overflow: hidden; }
.tha-hist-sold { display: block; width: 100%; background: var(--tha-sold); }
.tha-hist-out { display: block; width: 100%; background: repeating-linear-gradient(135deg, #e11d48 0 4px, #9f1239 4px 8px); }
.tha-hist-hours { font: 500 11.5px/1.2 var(--tha-mono); color: var(--tha-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tha-hist-date { font: 600 12px/1.2 var(--tha-body); color: var(--tha-ink); white-space: nowrap; }
.tha-hist li.is-empty .tha-hist-col { opacity: 0.5; }
@media (max-width: 560px) {
  .tha-hist { gap: 4px; }
  .tha-hist-col { height: 110px; max-width: 34px; }
  .tha-hist-hours { display: none; }
  .tha-hist-date { font-size: 11px; }
  .tha-hist-rate { font-size: 13px; }
}

/* THT Analytics: Foreman IQ Growth (pay periods, weeks, months, years) */
.tha-growth-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.tha-growth-head > div:first-child { min-width: 0; flex: 1 1 320px; }
.tha-growth-tabs { display: inline-flex; padding: 4px; gap: 2px; border-radius: 12px; background: var(--tha-line); flex: none; }
.tha-growth-tabs button { padding: 7px 12px; border: 0; border-radius: 9px; background: transparent; color: var(--tha-muted); font: 600 13px/1 var(--tha-body); cursor: pointer; white-space: nowrap; }
.tha-growth-tabs button.is-on { background: var(--tha-card); color: var(--tha-ink); box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12); }
.tha-growth-tabs button:focus-visible { outline: 2px solid var(--tha-sold); outline-offset: 2px; }
.tha-key-ghost { width: 22px; height: 8px; border-radius: 999px; background: var(--tha-range); }
.tha-key-elr { width: 22px; height: 3px; border-radius: 2px; background: #d97706; }
.tha-growth .tha-hist { grid-template-columns: repeat(var(--cols, 6), minmax(0, 1fr)); grid-auto-flow: row; }
.tha-hist-cell { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 2px 8px; }
.tha-hist-ghost { position: absolute; left: 0; right: 0; bottom: 0; background: var(--tha-range); border-radius: 6px 6px 0 0; }
.tha-growth .tha-hist-col { position: relative; background: transparent; border-bottom: 1px solid var(--tha-line); border-radius: 0; }
.tha-growth .tha-hist-sold { position: relative; z-index: 1; border-radius: 6px 6px 0 0; }
.tha-growth .tha-hist-col .tha-hist-out { display: none; }
.tha-growth .tha-hist li.is-empty .tha-hist-col { opacity: 1; }
.tha-growth-chart { display: flex; flex-direction: column; gap: 0; }
.tha-elr { position: relative; height: 64px; margin: 2px 0 4px; color: #d97706; border-top: 1px dashed var(--tha-line); }
.tha-elr svg { position: absolute; inset: 6px 0 0 0; width: 100%; height: calc(100% - 6px); overflow: visible; }
.tha-elr-pt { position: absolute; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: #d97706; box-shadow: 0 0 0 2px var(--tha-card); }
.tha-elr-pt em { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); font: 600 11px/1 var(--tha-mono); font-style: normal; color: var(--tha-muted); white-space: nowrap; }
.tha-growth-why { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px solid var(--tha-line); }
.tha-growth-why h4 { margin: 0; font: 700 12px/1.3 var(--tha-body); letter-spacing: 0.1em; text-transform: uppercase; color: var(--tha-muted); }
.tha-growth-why h4 span { text-transform: none; letter-spacing: 0; font-weight: 500; }
.tha-growth-read { margin: 0; padding: 10px 12px; border-radius: 12px; background: rgba(37, 99, 235, 0.07); font-size: 14px; line-height: 1.5; color: var(--tha-ink); }
.tha-growth-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tha-growth-list li { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; align-items: baseline; }
.tha-growth-list em { font: 700 15px/1.3 var(--tha-display); font-style: normal; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tha-growth-list li.is-up em { color: var(--tha-clear); }
.tha-growth-list li.is-down em { color: var(--tha-out); }
.tha-growth-list p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--tha-ink); }
.tha-growth-jobs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; color: var(--tha-ink); }
.tha-growth-jobs span { color: var(--tha-muted); }
@media (max-width: 560px) {
  .tha-growth-tabs { width: 100%; }
  .tha-growth-tabs button { flex: 1; padding: 8px 4px; font-size: 12px; }
  .tha-elr-pt em { display: none; }
  .tha-growth-list li { grid-template-columns: 70px minmax(0, 1fr); gap: 8px; }
}

/* Foreman IQ Settle Up: workbench button, dialog, and THT Analytics card */
.settle-chip-btn { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 4px; border: 1px solid #93c5fd; background: transparent; color: #1d4ed8; cursor: pointer; }
.settle-chip-btn:hover { background: rgba(37, 99, 235, 0.08); }
.settle-chip-btn.is-settled { border-color: #a7f3d0; background: #f0fdf4; color: #047857; }
.settle-chip-btn:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
.settle-dialog { position: fixed; inset: 0; z-index: 100000; display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); background: rgba(15, 23, 42, 0.55); }
.settle-dialog[hidden] { display: none; }
.settle-card { width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--card, #fff); color: var(--ink); border-radius: 18px; padding: 22px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3); font-family: 'Inter', 'Open Sans', system-ui, sans-serif; }
.settle-eyebrow { margin: 0; font: 600 12px/1.2 'Inter', system-ui, sans-serif; letter-spacing: 0.12em; text-transform: uppercase; color: #2563eb; }
.settle-card h3 { margin: 0; font: 700 21px/1.2 'Outfit', 'Inter', system-ui, sans-serif; }
.settle-facts, .settle-help, .settle-reason { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.settle-facts b, .settle-reason b { color: var(--ink); }
.settle-reasons { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.settle-chip { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); cursor: pointer; font-size: 14px; }
.settle-chip:has(input:checked) { border-color: #2563eb; background: rgba(37, 99, 235, 0.08); }
.settle-chip input { width: 18px; height: 18px; accent-color: #2563eb; }
.settle-note-label { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.settle-card textarea { width: 100%; box-sizing: border-box; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--input-bg, #fff); color: var(--ink); font: 14px/1.5 'Inter', system-ui, sans-serif; resize: vertical; }
.settle-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.settle-btn { padding: 10px 16px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--ink); font: 600 14px/1 'Inter', system-ui, sans-serif; cursor: pointer; }
.settle-btn.is-solid { background: #2563eb; border-color: #2563eb; color: #fff; }
.settle-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.settle-btn:focus-visible { outline: 2px solid #93c5fd; outline-offset: 2px; }

.tha-chase-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.tha-chase li { grid-template-columns: minmax(110px, 150px) minmax(0, 1fr) auto auto; }
.tha-settle-bar { display: flex; height: 16px; border-radius: 999px; overflow: hidden; background: var(--tha-line); }
.tha-settle-bar span { display: block; height: 100%; }
.tha-settle-bar .is-paid, .tha-settle-legend i.is-paid { background: var(--tha-sold); }
.tha-settle-bar .is-settled, .tha-settle-legend i.is-settled { background: repeating-linear-gradient(135deg, #16a34a 0 4px, #15803d 4px 8px); }
.tha-settle-bar .is-out, .tha-settle-legend i.is-out { background: repeating-linear-gradient(135deg, #e11d48 0 4px, #9f1239 4px 8px); }
.tha-settle-legend i.is-carry { background: #d97706; }
.tha-settle-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.tha-settle-legend > div { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; }
.tha-settle-legend i { width: 12px; height: 12px; border-radius: 3px; grid-row: span 3; align-self: start; margin-top: 3px; }
.tha-settle-legend span { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--tha-muted); }
.tha-settle-legend b { font: 700 22px/1.2 var(--tha-display); color: var(--tha-ink); font-variant-numeric: tabular-nums; }
.tha-settle-legend em { font-style: normal; font-size: 12px; color: var(--tha-muted); }
.tha-settle-sub { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--tha-line); min-width: 0; }
.tha-settle-sub h4 { margin: 0; font: 700 12px/1.3 var(--tha-body); letter-spacing: 0.1em; text-transform: uppercase; color: var(--tha-muted); }
.tha-settle-sub h4 span { text-transform: none; letter-spacing: 0; font-weight: 500; }
.tha-settle-old { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tha-settle-old li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--tha-line); }
.tha-settle-old li:first-child { border-top: 0; }
.tha-settle-old b { font: 600 13.5px/1.3 var(--tha-mono); color: var(--tha-ink); }
.tha-settle-old span { font-size: 13px; color: var(--tha-muted); }
.tha-settle-old em { font-style: normal; font-weight: 700; color: var(--tha-out); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tha-settle-old .tha-note-btn { margin-top: 0; }
.tha-settle-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0 24px; }
.tha-settle-big { margin: 0; font-size: 14px; line-height: 1.5; color: var(--tha-ink); }
.tha-settle-big b { font: 700 20px/1.2 var(--tha-display); }
.tha-settle-adv, .tha-settle-reasons { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.tha-settle-adv li, .tha-settle-reasons li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; justify-content: space-between; }
.tha-settle-adv span, .tha-settle-reasons span { color: var(--tha-muted); }
.tha-settle-adv b, .tha-settle-reasons b { color: var(--tha-ink); }
.tha-settle-adv em { font-style: normal; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--tha-out); }
.tha-settle-tip { margin: 0; padding: 10px 12px; border-radius: 12px; background: rgba(37, 99, 235, 0.07); font-size: 13.5px; line-height: 1.5; color: var(--tha-ink); }
@media (max-width: 560px) {
  .tha-chase li { grid-template-areas: "id hrs" "job hrs" "btn btn"; }
  .tha-chase-actions { grid-area: btn; justify-content: flex-start; }
  .tha-settle-old li { grid-template-columns: minmax(0, 1fr) auto; }
  .tha-settle-old .tha-note-btn { grid-column: 1 / -1; justify-self: start; }
}

/* Workbench RO line row (render-workbench.js .ro-line-header): stop the three zones overlapping.
   Zone 1 relied on Tailwind's w-56/w-64, which this app doesn't load, so the job name pushed into the
   hours and the buttons slid off the card. Layout only: the card's look is unchanged. */
:is(.ro-line-header, .carry-line-item > div:first-child) { flex-wrap: wrap !important; row-gap: 8px !important; column-gap: 16px !important; }
:is(.ro-line-header, .carry-line-item > div:first-child) > div:nth-child(1) { flex: 1 1 220px !important; min-width: 0 !important; max-width: 340px; }
:is(.ro-line-header, .carry-line-item > div:first-child) > div:nth-child(2) { flex: 999 1 300px !important; justify-content: flex-start !important; padding-left: 0 !important; padding-right: 0 !important; }
:is(.ro-line-header, .carry-line-item > div:first-child) > div:nth-child(2) > div { flex-wrap: wrap; column-gap: 24px !important; row-gap: 4px !important; }
:is(.ro-line-header, .carry-line-item > div:first-child) > div:nth-child(3) { flex: 0 0 auto !important; margin-left: auto !important; flex-wrap: wrap; row-gap: 6px; }
@media (max-width: 640px) {
  :is(.ro-line-header, .carry-line-item > div:first-child) > div:nth-child(1) { flex-basis: 100% !important; max-width: none; }
  :is(.ro-line-header, .carry-line-item > div:first-child) > div:nth-child(2) { flex-basis: 100% !important; }
  :is(.ro-line-header, .carry-line-item > div:first-child) > div:nth-child(2) > div > div { min-width: 0 !important; flex: 1 1 130px; }
  :is(.ro-line-header, .carry-line-item > div:first-child) > div:nth-child(3) { flex-basis: 100% !important; justify-content: flex-start !important; padding-left: 0 !important; margin-left: 0 !important; }
}

/* Foreman IQ Flag Check (workbench notice) */
.fiq-fc { display: flex; flex-direction: column; gap: 6px; }
.fiq-fc h4 { margin: 0; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.fiq-fc h4 span { text-transform: none; letter-spacing: 0; font-weight: 500; }
.fiq-fc ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.fiq-fc li { padding: 8px 10px; border-radius: 10px; background: var(--teal-soft, rgba(53, 100, 126, 0.1)); display: flex; flex-direction: column; gap: 3px; }
.fiq-fc li.is-warn { background: rgba(217, 119, 6, 0.12); outline: 1px solid rgba(217, 119, 6, 0.45); }
.fiq-fc-top { display: flex; gap: 8px; align-items: baseline; min-width: 0; }
.fiq-fc-top code { display: inline-block; padding: 2px 8px; border-radius: 6px; border: 1px solid var(--teal-deep, #35647e); background: var(--card, #fff); color: var(--teal-deep, #35647e); font: 700 13px/1.3 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace; letter-spacing: 0.02em; }
.fiq-fc-top span { color: var(--muted); overflow-wrap: anywhere; }
.fiq-fc-facts { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 12.5px; }
.fiq-fc-settled { color: #047857; font-weight: 600; }
[data-theme="dark"] .fiq-fc-settled { color: #4ade80; }
.fiq-fc-verdict { margin: 0; font-size: 12.5px; font-weight: 600; color: var(--ink); }
.fiq-fc li.is-warn .fiq-fc-verdict { color: #b45309; }
[data-theme="dark"] .fiq-fc li.is-warn .fiq-fc-verdict { color: #fbbf24; }

/* Flag Check: clearer counts and hours */
.fiq-fc-facts { color: var(--ink); }
.fiq-fc-facts b { font-weight: 800; color: var(--ink); }
.fiq-fc-top { align-items: center; }
.fiq-fc-top span { color: var(--ink); font-weight: 600; }

/* Paid later (a later hour sheet paid it; carried into that period) */
.tha-settle-bar .is-late, .tha-settle-legend i.is-late { background: repeating-linear-gradient(135deg, #7c3aed 0 4px, #6d28d9 4px 8px); }

/* ==========================================================================
   Pay Period Ledger (js/ui/pay-period-ledger.js). Draws over the legacy ledger
   markup, which stays in the DOM (hidden) for the close-out buttons and tests.
   ========================================================================== */
#payPeriodLedgerView.ppl-on > :not(#pplStatement) { display: none !important; }
.ppl {
  --ppl-paid: #059669; --ppl-short: #d97706; --ppl-unpaid: #e11d48; --ppl-late: #7c3aed; --ppl-settled: #047857; --ppl-carry: #0284c7;
  display: flex; flex-direction: column; gap: 14px; margin: 4px 0 24px; color: var(--ink); font-family: 'Inter', 'Open Sans', system-ui, sans-serif;
}
.ppl-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px 20px; padding: 18px 20px; border-radius: 16px; background: var(--card, #fff); border: 1px solid var(--teal-deep, #35647e); }
.ppl-title { min-width: 0; flex: 1 1 320px; }
.ppl-eyebrow { margin: 0; font-size: 11.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--teal-deep, #35647e); }
.ppl-title h2 { margin: 2px 0 4px; font: 700 clamp(20px, 2.6vw, 26px)/1.2 'Outfit', 'Inter', system-ui, sans-serif; text-wrap: balance; }
.ppl-plan { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.ppl-plan b { color: var(--ink); }
.ppl-link { padding: 0; border: 0; background: none; color: var(--teal-deep, #35647e); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
.ppl-nav { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; flex: 0 1 520px; min-width: 0; }
.ppl-nav select { flex: 1 1 auto; }
.ppl-nav select { max-width: 100%; min-width: 0; height: 36px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--input-border, #d1d5db); background: var(--input-bg, #fff); color: var(--ink); font-size: 13.5px; }
.ppl-btn { height: 34px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line); background: var(--card, #fff); color: var(--ink); font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.ppl-btn:hover:not(:disabled) { border-color: var(--teal-deep, #35647e); }
.ppl-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.ppl-btn.is-blue { border-color: #93c5fd; color: #1d4ed8; }
.ppl-btn.is-green { border-color: #a7f3d0; color: var(--ppl-settled); }
.ppl-btn:focus-visible, .ppl-chip:focus-visible, .ppl-link:focus-visible, .ppl-ro summary:focus-visible { outline: 2px solid var(--teal-deep, #35647e); outline-offset: 2px; }
.ppl-history { margin: -4px 0 0; padding: 10px 14px; border-radius: 12px; background: var(--teal-soft, rgba(53, 100, 126, 0.1)); font-size: 13px; line-height: 1.5; }

.ppl-totals { display: flex; flex-direction: column; gap: 10px; padding: 14px 18px; border-radius: 16px; background: var(--card, #fff); border: 1px solid var(--line); }
.ppl-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--line); }
.ppl-bar span { display: block; height: 100%; }
.ppl-bar .is-paid { background: var(--ppl-paid); }
.ppl-bar .is-late { background: var(--ppl-late); }
.ppl-bar .is-settled { background: repeating-linear-gradient(135deg, #16a34a 0 4px, #15803d 4px 8px); }
.ppl-bar .is-out { background: repeating-linear-gradient(135deg, #e11d48 0 4px, #9f1239 4px 8px); }
.ppl-nums { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px 16px; }
.ppl-nums div { display: flex; flex-direction: column; gap: 1px; padding-left: 10px; border-left: 3px solid var(--line); }
.ppl-nums .is-paid { border-left-color: var(--ppl-paid); }
.ppl-nums .is-late { border-left-color: var(--ppl-late); }
.ppl-nums .is-settled { border-left-color: var(--ppl-settled); }
.ppl-nums .is-out { border-left-color: var(--ppl-unpaid); }
.ppl-nums .is-carry { border-left-color: var(--ppl-carry); }
.ppl-nums dt { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.ppl-nums dd { margin: 0; font: 700 20px/1.2 'Outfit', 'Inter', system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.ppl-locked { margin: 0; font-size: 13px; font-weight: 600; color: var(--muted); }

.ppl-tools { display: flex; flex-direction: column; gap: 10px; }
.ppl-search input { width: 100%; box-sizing: border-box; height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--input-border, #d1d5db); background: var(--input-bg, #fff); color: var(--ink); font-size: 15px; }
.ppl-search input:focus { outline: 2px solid var(--teal-deep, #35647e); outline-offset: 1px; }
.ppl-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ppl-chip { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card, #fff); color: var(--ink); font-size: 13px; font-weight: 600; cursor: pointer; }
.ppl-chip b { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 700; }
.ppl-chip::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.ppl-chip.is-all::before { display: none; }
.ppl-chip.is-paid::before { background: var(--ppl-paid); }
.ppl-chip.is-short::before { background: var(--ppl-short); }
.ppl-chip.is-unpaid::before { background: var(--ppl-unpaid); }
.ppl-chip.is-late::before { background: var(--ppl-late); }
.ppl-chip.is-settled::before { background: var(--ppl-settled); }
.ppl-chip.is-carry::before { background: var(--ppl-carry); }
.ppl-chip.is-on { background: var(--ink); color: var(--card, #fff); border-color: var(--ink); }
.ppl-chip.is-on b { color: inherit; }

.ppl-ros { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ppl-ro { border-radius: 14px; background: var(--card, #fff); border: 1px solid var(--line); border-left: 6px solid var(--line); overflow: hidden; }
.ppl-ro.is-paid { border-left-color: var(--ppl-paid); }
.ppl-ro.is-short { border-left-color: var(--ppl-short); }
.ppl-ro.is-unpaid { border-left-color: var(--ppl-unpaid); }
.ppl-ro.is-late { border-left-color: var(--ppl-late); }
.ppl-ro.is-settled { border-left-color: var(--ppl-settled); }
.ppl-ro.is-carry { border-left-color: var(--ppl-carry); }
.ppl-ro summary { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; gap: 14px; padding: 12px 16px; cursor: pointer; }
.ppl-ro summary::-webkit-details-marker { display: none; }
.ppl-ro summary::after { content: "▾"; color: var(--muted); transition: transform 0.15s; }
.ppl-ro details[open] summary::after { transform: rotate(180deg); }
.ppl-ro summary { grid-template-columns: minmax(0, 1fr) auto auto auto auto; }
.ppl-ro-id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ppl-ro-id b { font-size: 15px; }
.ppl-ro-id em { font-style: normal; font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.ppl-ro-count { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.ppl-ro-hrs { font-size: 13px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ppl-ro-hrs b { color: var(--ink); font-size: 14px; }
.ppl-pill { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; border: 1px solid currentColor; }
.ppl-pill.is-paid { color: var(--ppl-paid); }
.ppl-pill.is-short { color: var(--ppl-short); }
.ppl-pill.is-unpaid { color: var(--ppl-unpaid); }
.ppl-pill.is-late { color: var(--ppl-late); }
.ppl-pill.is-settled { color: var(--ppl-settled); }
.ppl-pill.is-carry { color: var(--ppl-carry); }
.ppl-lines { list-style: none; margin: 0; padding: 0 16px 10px; display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.ppl-line { display: grid; grid-template-columns: 92px minmax(0, 1fr) 64px 64px auto auto; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ppl-line:last-child { border-bottom: 0; }
.ppl-line-id { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; }
.ppl-wci { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; color: #fff; font: 700 11px/1 system-ui; font-style: normal; background: var(--cp-green, #278548); }
.ppl-wci-W { background: var(--w-red, #9c1b1b); }
.ppl-wci-I { background: var(--i-blue, #1d4f91); }
.ppl-line-job { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ppl-line-job b { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.ppl-line-job em { font-style: normal; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.ppl-line-hrs { display: flex; flex-direction: column; align-items: flex-end; font-variant-numeric: tabular-nums; }
.ppl-line-hrs b { font-size: 14px; }
.ppl-line-hrs em { font-style: normal; font-size: 11px; color: var(--muted); }
.ppl-line-act { display: flex; gap: 6px; justify-content: flex-end; }
.ppl-empty { padding: 24px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 14px; }
.ppl-close { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 4px; font-size: 13px; color: var(--muted); }

@media (max-width: 720px) {
  .ppl-head { padding: 16px; }
  .ppl-nav { width: 100%; flex-basis: 100%; flex-wrap: wrap; }
  .ppl-nav select { flex: 1 1 160px; }
  .ppl-ro summary { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "id pill" "hrs hrs"; row-gap: 6px; padding: 12px; }
  .ppl-ro summary::after { display: none; }
  .ppl-ro-id { grid-area: id; }
  .ppl-ro .ppl-pill { grid-area: pill; }
  .ppl-ro-count { display: none; }
  .ppl-ro-hrs { grid-area: hrs; }
  .ppl-lines { padding: 0 12px 8px; }
  .ppl-line { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "id id pill" "job job job" "f p act"; row-gap: 6px; }
  .ppl-line-id { grid-area: id; }
  .ppl-line-job { grid-area: job; }
  .ppl-line-hrs:nth-of-type(3) { grid-area: f; align-items: flex-start; }
  .ppl-line-hrs:nth-of-type(4) { grid-area: p; }
  .ppl-line .ppl-pill { grid-area: pill; justify-self: end; }
  .ppl-line-act { grid-area: act; }
}

/* ==========================================================================
   Bay Mode (phones, 640px and under): the workbench reorders around logging a
   line. Current Job and the day's lines come first, every form field is on
   screen and thumb-sized, and the date bar and view switcher fit. Layout only;
   tablet and desktop are unchanged.
   ========================================================================== */
/* Phones and upright tablets: Current Job and the day's lines first, then the calendar and pay period cards. */
@media (max-width: 900px) {
  #techWorkbenchView .layout > main { order: -1; }
}
/* Current Job's first row needs about 700px as six fixed columns. Let it fit at every width:
   two rows on tablets, and an Advisor box that shrinks to fit on desktop. */
@media (min-width: 641px) and (max-width: 1000px) {
  #jobFormFieldsWrapper > div:nth-child(1) { grid-template-columns: 110px minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) !important; }
  #jobFormFieldsWrapper > div:nth-child(1) > label:nth-child(2) { grid-column: span 3; }
  #jobFormFieldsWrapper > div:nth-child(1) > label:nth-child(3) { grid-column: 1; }
}
@media (min-width: 1001px) {
  #jobFormFieldsWrapper > div:nth-child(1) { grid-template-columns: 110px minmax(140px, 3.2fr) 65px 70px 105px minmax(0, 1.4fr) !important; }
}
#jobFormFieldsWrapper > div:nth-child(1) > label { min-width: 0; }
#jobFormFieldsWrapper > div:nth-child(1) select, #jobFormFieldsWrapper > div:nth-child(1) input { min-width: 0; max-width: 100%; }
#advisorPick { width: 100%; }

@media (max-width: 640px) {

  /* Date bar: date, then the day totals, then the three views in one row. */
  #dateTotalsSubHeaderBar { display: flex !important; flex-direction: column !important; align-items: stretch !important; gap: 10px !important; height: auto !important; }
  #dateTotalsSubHeaderBar > div { width: 100% !important; flex: 0 0 auto !important; min-width: 0 !important; align-items: flex-start !important; justify-content: flex-start !important; text-align: left !important; margin: 0 !important; position: static !important; transform: none !important; }
  #dateTotalsSubHeaderBar #currentDateDisplay { width: 100% !important; }
  #dateTotalsSubHeaderBar #dayTitle { font-size: 26px !important; line-height: 1.15 !important; white-space: nowrap; margin: 0 !important; }
  #dateTotalsSubHeaderBar .chips-col { align-items: flex-start !important; }
  #dateTotalsSubHeaderBar #dayChips { flex-wrap: wrap !important; justify-content: flex-start !important; gap: 6px !important; }
  #dateTotalsSubHeaderBar #segmentedViewSwitcher { width: 100% !important; display: flex !important; }
  #dateTotalsSubHeaderBar .view-pill-btn { flex: 1 1 0 !important; width: auto !important; min-width: 0 !important; padding: 10px 4px !important; font-size: 12.5px !important; line-height: 1.2 !important; white-space: normal !important; justify-content: center !important; text-align: center !important; }

  /* Current Job form: RO and Flagged first, then Job, Line, W/C/I, Advisor; vehicle two by two. */
  #jobFormFieldsWrapper > div:nth-child(1) { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; gap: 10px !important; }
  #jobFormFieldsWrapper > div:nth-child(1) > label { min-width: 0; margin: 0; }
  #jobFormFieldsWrapper > div:nth-child(1) > label:nth-child(1) { grid-column: span 3; order: 1; }
  #jobFormFieldsWrapper > div:nth-child(1) > label:nth-child(5) { grid-column: span 3; order: 2; }
  #jobFormFieldsWrapper > div:nth-child(1) > label:nth-child(2) { grid-column: span 6; order: 3; }
  #jobFormFieldsWrapper > div:nth-child(1) > label:nth-child(3) { grid-column: span 3; order: 4; }
  #jobFormFieldsWrapper > div:nth-child(1) > label:nth-child(4) { grid-column: span 3; order: 5; }
  #jobFormFieldsWrapper > div:nth-child(1) > label:nth-child(6) { grid-column: span 6; order: 6; }
  #jobFormFieldsWrapper > div:nth-child(2) { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
  #jobFormFieldsWrapper > div:nth-child(2) > label { min-width: 0; }
  #jobFormFieldsWrapper input, #jobFormFieldsWrapper select, #dayEntry textarea, #dayEntry input[name="note"] {
    width: 100% !important; min-width: 0 !important; min-height: 46px; font-size: 16px !important; box-sizing: border-box;
  }
  #flaggedInput { font-weight: 700; }

  /* Labor op rows: code and hours on one line, description under them. */
  #multiOpRowsContainer { max-height: none !important; }
  #multiOpRowsContainer .multi-op-row { grid-template-columns: minmax(0, 1fr) 92px 40px !important; gap: 6px !important; }
  #multiOpRowsContainer .multi-op-row .op-code-input { grid-column: 1; grid-row: 1; }
  #multiOpRowsContainer .multi-op-row .op-hours-input { grid-column: 2; grid-row: 1; }
  #multiOpRowsContainer .multi-op-row .op-remove-btn { grid-column: 3; grid-row: 1; height: 44px !important; width: 40px !important; }
  #multiOpRowsContainer .multi-op-row .op-desc-input { grid-column: 1 / -1; grid-row: 2; }
  #multiOpRowsContainer .multi-op-row input { min-height: 44px; font-size: 16px !important; height: auto !important; }
}

/* Pay Period Ledger: Period Timeline (one column per day) and day headers */
.ppl-timeline { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px 12px; border-radius: 16px; background: var(--card, #fff); border: 1px solid var(--line); }
.ppl-tl-head h3 { margin: 0; font: 700 16px/1.2 'Outfit', 'Inter', system-ui, sans-serif; }
.ppl-tl-head p { margin: 2px 0 0; font-size: 13px; color: var(--muted); line-height: 1.45; }
.ppl-tl-scroll { overflow-x: auto; margin: 0 -4px; padding: 0 4px; scrollbar-width: thin; }
.ppl-tl { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--days, 14), minmax(30px, 1fr)); gap: 4px; min-width: calc(var(--days, 14) * 30px); }
.ppl-tl button { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 0 4px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--ink); cursor: pointer; font: inherit; }
.ppl-tl button:hover:not(:disabled) { background: var(--teal-soft, rgba(53, 100, 126, 0.08)); }
.ppl-tl button:disabled { cursor: default; }
.ppl-tl button:focus-visible { outline: 2px solid var(--teal-deep, #35647e); outline-offset: 1px; }
.ppl-tl li.is-on button { border-color: var(--teal-deep, #35647e); background: var(--teal-soft, rgba(53, 100, 126, 0.12)); }
.ppl-tl-hrs { height: 14px; font: 700 11px/14px 'IBM Plex Mono', ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.ppl-tl-col { position: relative; width: 70%; max-width: 30px; height: 120px; display: flex; flex-direction: column; justify-content: flex-end; border-bottom: 2px solid var(--line); }
.ppl-tl-col::before { content: ""; position: absolute; left: -3px; right: -3px; bottom: var(--goal, 66%); border-top: 2px dashed var(--teal-deep, #35647e); opacity: 0.55; }
.ppl-tl-stack { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; border-radius: 5px 5px 0 0; overflow: hidden; }
.ppl-tl-stack i, .ppl-tl-key i { display: block; }
.ppl-tl-stack i { width: 100%; flex: none; }
.ppl-tl-stack .is-paid, .ppl-tl-key .is-paid { background: var(--ppl-paid); }
.ppl-tl-stack .is-short, .ppl-tl-key .is-short { background: var(--ppl-short); }
.ppl-tl-stack .is-unpaid, .ppl-tl-key .is-unpaid { background: repeating-linear-gradient(135deg, #e11d48 0 3px, #9f1239 3px 6px); }
.ppl-tl-stack .is-settled, .ppl-tl-key .is-settled { background: repeating-linear-gradient(135deg, #16a34a 0 3px, #15803d 3px 6px); }
.ppl-tl-stack .is-late, .ppl-tl-key .is-late { background: var(--ppl-late); }
.ppl-tl-day { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.ppl-tl-num { font: 700 13px/1 'Outfit', 'Inter', system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.ppl-tl li.is-weekend .ppl-tl-col { background: repeating-linear-gradient(0deg, transparent 0 6px, rgba(148, 163, 184, 0.12) 6px 7px); }
.ppl-tl li.is-off .ppl-tl-num, .ppl-tl li.is-off .ppl-tl-day { opacity: 0.45; }
.ppl-tl li.is-today .ppl-tl-num { color: var(--teal-deep, #35647e); text-decoration: underline; text-underline-offset: 3px; }
.ppl-tl-key { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--muted); }
.ppl-tl-key span { display: inline-flex; align-items: center; gap: 6px; }
.ppl-tl-key i { width: 12px; height: 10px; border-radius: 2px; }
.ppl-tl-key .is-goal { width: 16px; height: 0; border-top: 2px dashed var(--teal-deep, #35647e); border-radius: 0; }
.ppl-dayfilter { margin: -4px 0 0; font-size: 13.5px; color: var(--ink); }
.ppl-dayhead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 10px 4px 2px; }
.ppl-dayhead:first-child { padding-top: 0; }
.ppl-dayhead b { font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--teal-deep, #35647e); }
.ppl-dayhead span { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .ppl-timeline { padding: 14px 12px 10px; }
  .ppl-tl-col { height: 96px; width: 80%; }
  .ppl-tl-hrs { font-size: 10px; }
}

/* Pay Period Ledger as its own page: on the Ledger tab, hide the workbench's single-day date and
   "Selected Day Totals" (the tab buttons stay), and open with a pay-stub header band. */
/* (2026-11-08) The Ledger keeps the selected day's date and totals in the header, like every tab,
   so the tech always has their hours in view. Only the header search hides there: the Ledger has
   its own next to its period picker. */
/* (2026-11-08b) The header search shows on the Ledger too, same spot as Workbench and Analytics. */

.ppl-hero {
  display: flex; flex-direction: column; gap: 16px; padding: 22px 24px 20px; border-radius: 20px;
  background: linear-gradient(160deg, #0b1f33 0%, #12324d 60%, #1b4864 100%); color: #f1f5f9;
  box-shadow: 0 18px 40px rgba(11, 31, 51, 0.18);
}
.ppl-hero .ppl-head { padding: 0; border: 0; background: transparent; border-radius: 0; align-items: flex-start; }
.ppl-hero .ppl-eyebrow { color: #7dd3fc; }
.ppl-hero .ppl-title h2 { color: #fff; font-size: clamp(26px, 3.6vw, 38px); letter-spacing: -0.01em; margin-top: 4px; }
.ppl-sentence { margin: 6px 0 4px; max-width: 64ch; font-size: 15.5px; line-height: 1.55; color: #cbd5e1; }
.ppl-sentence b { color: #fff; }
.ppl-hero .ppl-plan { color: #94a3b8; }
.ppl-hero .ppl-plan b { color: #e2e8f0; }
.ppl-hero .ppl-link { color: #7dd3fc; }
.ppl-hero .ppl-btn { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.22); color: #f1f5f9; }
.ppl-hero .ppl-btn:hover:not(:disabled) { border-color: #7dd3fc; }
.ppl-hero .ppl-nav select { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.22); color: #f1f5f9; }
.ppl-hero .ppl-nav select option { color: #0f172a; }
.ppl-hero .ppl-history { background: rgba(125, 211, 252, 0.12); color: #e2e8f0; margin: 0; }
.ppl-hero .ppl-totals { padding: 0; border: 0; background: transparent; border-radius: 0; }
.ppl-hero .ppl-bar { height: 14px; background: rgba(255, 255, 255, 0.12); }
.ppl-hero .ppl-nums div { border-left-color: rgba(255, 255, 255, 0.25); }
.ppl-hero .ppl-nums dt { color: #94a3b8; }
.ppl-hero .ppl-nums dd { color: #fff; font-size: 24px; }
.ppl-hero .ppl-locked { color: #cbd5e1; }
.ppl-hero .ppl-timeline { margin-top: 2px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18); border-color: transparent; color: var(--ink); }
.ppl-hero .ppl-hero-foot { display: none; }
.ppl-hero .ppl-btn:focus-visible, .ppl-hero .ppl-link:focus-visible { outline-color: #7dd3fc; }
@media (max-width: 720px) {
  .ppl-hero { padding: 18px 16px 16px; border-radius: 16px; }
  .ppl-hero .ppl-nums dd { font-size: 20px; }
  .ppl-sentence { font-size: 14.5px; }
}


/* ===== Pay Period Ledger: Pay Period Rail (every period, oldest left) ===== */
.ppl-rail { display: flex; flex-direction: column; gap: 8px; }
.ppl-rail-title { margin: 0; font-size: 12.5px; color: #94a3b8; }
.ppl-rail-title b { color: #e2e8f0; }
.ppl-rail-scroll { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.25) transparent; padding-bottom: 4px; }
.ppl-rail-list { list-style: none; margin: 0; padding: 0; display: flex; align-items: stretch; gap: 4px; min-width: max-content; }
.ppl-rail-p { display: grid; grid-template-rows: 64px auto auto auto; justify-items: center; gap: 2px; width: 56px; padding: 8px 4px 6px; border-radius: 12px; border: 1px solid transparent; background: transparent; color: #cbd5e1; font: inherit; cursor: pointer; }
.ppl-rail-p:hover { background: rgba(255, 255, 255, 0.07); }
.ppl-rail-p:focus-visible { outline: 3px solid #7dd3fc; outline-offset: 1px; }
.ppl-rail-p.is-on { background: rgba(125, 211, 252, 0.16); border-color: #7dd3fc; color: #fff; }
.ppl-rail-col { width: 22px; height: 64px; display: flex; align-items: flex-end; border-bottom: 1px solid rgba(255, 255, 255, 0.2); }
.ppl-rail-stack { width: 100%; min-height: 2px; display: flex; flex-direction: column; border-radius: 4px 4px 0 0; overflow: hidden; }
.ppl-rail-stack > span { flex-basis: 0; min-height: 0; }
.ppl-rail-stack .is-paid { background: var(--ppl-paid); }
.ppl-rail-stack .is-late { background: var(--ppl-late); }
.ppl-rail-stack .is-settled { background: repeating-linear-gradient(135deg, var(--ppl-settled) 0 3px, #10b981 3px 6px); }
.ppl-rail-stack .is-out { background: repeating-linear-gradient(135deg, var(--ppl-unpaid) 0 4px, #be123c 4px 8px); }
.ppl-rail-h { font-size: 12px; font-weight: 700; color: inherit; font-variant-numeric: tabular-nums; }
.ppl-rail-d { font-size: 11px; color: #94a3b8; white-space: nowrap; }
.ppl-rail-p.is-on .ppl-rail-d { color: #e0f2fe; }
.ppl-rail-pct { font-size: 11px; font-weight: 700; color: #6ee7b7; }
.ppl-rail-pct.is-out { color: #fda4af; }
.ppl-rail-p.is-now .ppl-rail-pct { color: #7dd3fc; text-transform: uppercase; letter-spacing: 0.06em; }
.ppl-rail-p.is-bridge .ppl-rail-col { border-bottom-style: dashed; }
.ppl-rail-change { display: flex; align-items: center; padding: 0 6px; border-left: 2px dashed #fbbf24; margin: 4px 4px; }
.ppl-rail-change span { font-size: 10.5px; font-weight: 700; color: #fcd34d; line-height: 1.3; white-space: nowrap; }
@media (max-width: 640px) {
  .ppl-rail-p { width: 50px; }
}
.ppl-rail-pct.is-near { color: #a7f3d0; }
.ppl-rail-pct.is-short { color: #fcd34d; }

/* ===== Pay plan change dialog ===== */
dialog.ppd { padding: 0; border: 0; background: transparent; max-width: min(540px, calc(100% - 24px)); width: 100%; color: var(--ink); }
dialog.ppd::backdrop { background: rgba(15, 23, 42, 0.6); }
.ppd-card { width: 100%; box-sizing: border-box; }
.ppd-change { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; font-size: 14px; }
.ppd-change span { padding: 6px 10px; border-radius: 10px; background: rgba(148, 163, 184, 0.16); }
.ppd-change span:last-child { background: rgba(2, 132, 199, 0.14); font-weight: 700; }
.ppd-opt { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; padding: 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.ppd-opt:has(input[name=ppdMode]:checked) { border-color: #0284c7; background: rgba(2, 132, 199, 0.07); }
.ppd-opt > input { margin-top: 3px; width: 18px; height: 18px; }
.ppd-opt b { font-size: 14.5px; }
.ppd-opt em { display: block; margin-top: 4px; font-style: normal; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.ppd-opt input[type=date] { margin-left: 6px; padding: 5px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--input-bg, #fff); color: var(--ink); font: inherit; font-size: 14px; }
.ppd-opt input[type=date]:disabled { opacity: 0.45; }
.ppd-preview { margin: 0; padding: 10px 12px; border-radius: 10px; background: rgba(5, 150, 105, 0.1); font-size: 13.5px; }
.ppd-preview:empty { display: none; }
.ppl-history .ppl-link { margin-left: 4px; }
.ppl-rail-change span { white-space: nowrap; }


/* ===== Ledger: rows that fit, with ◀ ▶ when they don't ===== */
.ppl-scroller { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; }
.ppl-scroller.is-scrollable { grid-template-columns: 30px minmax(0, 1fr) 30px; column-gap: 6px; }
.ppl-scroll-area { overflow-x: auto; overscroll-behavior-x: contain; scroll-behavior: smooth; scrollbar-width: none; min-width: 0; }
.ppl-scroll-area::-webkit-scrollbar { display: none; }
.ppl-scroll-btn { display: none; width: 30px; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--card, #fff); color: var(--ink); font-size: 12px; cursor: pointer; padding: 0; }
.ppl-scroller.is-scrollable .ppl-scroll-btn { display: block; }
.ppl-scroll-btn:disabled { opacity: 0.3; cursor: default; }
.ppl-scroll-btn:hover:not(:disabled) { border-color: var(--teal-deep, #35647e); }
.ppl-hero .ppl-scroller.is-rail .ppl-scroll-btn { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.22); color: #f1f5f9; }
.ppl-hero .ppl-scroller.is-rail .ppl-scroll-btn:hover:not(:disabled) { border-color: #7dd3fc; }

/* Rail: a grid sized to fit 24 periods across a desktop, scrolling past that */
.ppl-rail-list { display: grid; gap: 3px; min-width: 0; width: 100%; }
.ppl-rail-list > li { min-width: 0; }
.ppl-rail-p { width: 100%; padding: 8px 2px 6px; }
.ppl-rail-col { width: min(22px, 60%); }
.ppl-rail-d { font-size: 10.5px; }
.ppl-rail-pct.is-none { color: #64748b; }
.ppl-rail-change { margin: 4px 2px; padding: 0 6px 0 7px; }
.ppl-rail-change span[aria-hidden] { display: block; font-size: 10px; font-weight: 700; color: #fcd34d; line-height: 1.35; white-space: nowrap; }
.ppl-rail-change b { display: block; font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase; color: #fbbf24; }

/* Day by day: every day fits on desktop; on a phone the row scrolls with ◀ ▶ */
.ppl-tl { grid-template-columns: repeat(var(--days, 14), minmax(26px, 1fr)); gap: 3px; min-width: calc(var(--days, 14) * 29px); }
.ppl-scroller.is-tl .ppl-scroll-btn { height: 56px; }
@media (max-width: 640px) {
  .ppl-tl { grid-template-columns: repeat(var(--days, 14), minmax(30px, 1fr)); min-width: calc(var(--days, 14) * 33px); }
  .ppl-scroller.is-scrollable { grid-template-columns: 26px minmax(0, 1fr) 26px; column-gap: 4px; }
  .ppl-scroll-btn { width: 26px; }
}
@media (max-width: 640px) {
  .ppl-hero { padding: 18px 12px 16px; border-radius: 16px; }
  .ppl-hero .ppl-timeline { padding: 12px 8px 10px; }
  .ppl-scroller.is-scrollable { grid-template-columns: 22px minmax(0, 1fr) 22px; column-gap: 3px; }
  .ppl-scroll-btn { width: 22px; font-size: 10px; border-radius: 8px; }
  .ppl-rail-p { padding: 6px 0 4px; }
  .ppl-rail-d { font-size: 10px; letter-spacing: -0.01em; }
  .ppl-tl { grid-template-columns: repeat(var(--days, 14), minmax(24px, 1fr)); gap: 2px; min-width: calc(var(--days, 14) * 26px); }
  .ppl-tl-hrs { font-size: 9px; letter-spacing: -0.03em; }
  .ppl-tl-num { font-size: 12px; }
  .ppl-tl-day { font-size: 10px; letter-spacing: 0; }
}
@media (max-width: 640px) { .ppl-rail-list { --rail-min: 36px; } }
.ppl-rail-list > li.ppl-rail-change { min-width: max-content; }
@media (max-width: 640px) {
  #payPeriodLedgerView.ppl-on { padding-left: 0 !important; padding-right: 0 !important; border-left: 0 !important; border-right: 0 !important; background: transparent !important; box-shadow: none !important; }
}


/* ===== Pay Period Ledger: RO cards that read like the work ===== */
.ppl-ro-jobs { font-size: 15px; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.ppl-ro-id .ppl-ro-jobs + b { font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: 0.02em; }
.ppl-ro-hrs { display: inline-flex; flex-wrap: wrap; align-items: baseline; justify-content: flex-end; column-gap: 4px; max-width: 220px; }
.ppl-ro-hrs em { font-style: normal; font-weight: 700; font-size: 12.5px; margin-left: 6px; }
.ppl-ro-hrs em.is-out { color: var(--ppl-unpaid); }
.ppl-ro-hrs em.is-over { color: var(--ppl-paid); }
.ppl-ro-meter { flex-basis: 100%; display: block; height: 5px; margin-top: 5px; border-radius: 999px; background: rgba(225, 29, 72, 0.22); overflow: hidden; }
.ppl-ro-meter span { display: block; height: 100%; background: var(--ppl-paid); border-radius: inherit; }
.ppl-ro.is-paid .ppl-ro-meter, .ppl-ro.is-settled .ppl-ro-meter { background: rgba(5, 150, 105, 0.2); }

@media (max-width: 640px) {
  .ppl-ro-hrs { justify-content: flex-start; max-width: none; }
}

/* ===== Pay Period Ledger: slim close-out row ===== */
.ppl-close { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-top: 14px; padding: 12px 16px; border-radius: 14px; background: var(--card, #fff); border: 1px solid var(--line); }
.ppl-close-status { margin: 0; font-size: 13.5px; color: var(--muted); }
.ppl-close-status b { color: var(--ink); }
.ppl-close-actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 640px) { .ppl-close-actions .ppl-btn { flex: 1 1 auto; } }

/* ===== THT Analytics: Got your check? (in Your Check) ===== */
.tha-checkcmp { display: flex; flex-direction: column; gap: 8px; margin: 2px 0 0; padding-top: 14px; border-top: 1px solid var(--tha-line); }
.tha-checkcmp label { font-size: 13.5px; color: var(--tha-muted); line-height: 1.45; }
.tha-checkcmp label b { color: var(--tha-ink); }
.tha-checkcmp-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tha-checkcmp-row input { flex: 1 1 140px; min-width: 0; max-width: 260px; height: 42px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--tha-line); background: var(--tha-card); color: var(--tha-ink); font: 700 18px/1 var(--tha-display); font-variant-numeric: tabular-nums; }
.tha-checkcmp-row input[aria-invalid=true] { border-color: #e11d48; }
.tha-checkcmp em { font-style: normal; font-size: 12px; color: var(--tha-muted); }
.tha-checkcmp-verdict { margin: 4px 0 0; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; align-items: start; padding: 12px 14px; border-radius: 12px; font-size: 14px; line-height: 1.5; color: var(--tha-ink); }
.tha-checkcmp-verdict b { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 14px; }
.tha-checkcmp-verdict.is-match { background: rgba(5, 150, 105, 0.12); }
.tha-checkcmp-verdict.is-match b { background: #059669; }
.tha-checkcmp-verdict.is-short { background: rgba(225, 29, 72, 0.1); }
.tha-checkcmp-verdict.is-short b { background: #e11d48; }
.tha-checkcmp-verdict.is-over { background: rgba(2, 132, 199, 0.1); }
.tha-checkcmp-verdict.is-over b { background: #0284c7; }


/* ===== Pay Period Ledger: Paid hours check card ===== */
.ppl-check { display: flex; flex-direction: column; gap: 12px; padding: 16px 18px; border-radius: 16px; background: var(--card, #fff); border: 1px solid var(--line); border-left: 6px solid var(--ppl-short); }
.ppl-check-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 16px; }
.ppl-check-head h3 { margin: 2px 0 4px; font: 700 17px/1.25 'Outfit', 'Inter', system-ui, sans-serif; color: var(--ink); }
.ppl-check-sub { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.45; max-width: 68ch; }
.ppl-check-block { display: flex; flex-direction: column; gap: 6px; padding-top: 8px; border-top: 1px solid var(--line); }
.ppl-check-label { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.45; }
.ppl-check-label b { color: var(--ink); }
.ppl-check-lines { padding: 0; border-top: 0; }
.ppl-check-line { grid-template-columns: 118px minmax(0, 1fr) 64px 72px auto auto; }
.ppl-check-ev-group { display: flex; flex-direction: column; gap: 4px; padding: 8px 12px; border-radius: 10px; background: rgba(217, 119, 6, 0.07); border: 1px solid rgba(217, 119, 6, 0.25); }
.ppl-check-ev-msg { margin: 0; font-size: 13px; color: var(--ink); line-height: 1.45; }
.ppl-check-ev-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.ppl-check-ev-list b { color: var(--ink); }
@media (max-width: 720px) {
  .ppl-check { padding: 14px 12px; }
  .ppl-check-line { grid-template-columns: minmax(0, 1fr) auto auto; }
}

/* ============================================================================
   Sign-in page (#loginView): two panels. Left, the hour sheet carried over from
   the marketing page; right, the sign-in card. Styled by id/class here because
   the markup no longer relies on utility classes the page doesn't load.
   ============================================================================ */
#loginView.lv {
  --lv-ink: #0f172a; --lv-blue: #2563eb; --lv-blue-dk: #1d4ed8; --lv-muted: #64748b; --lv-line: #e2e8f0;
  --lv-field: #f8fafc; --lv-card: #ffffff; --lv-page: #f1f5f9; --lv-short: #dc2626;
  --lv-mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  flex-direction: column; align-items: stretch; justify-content: flex-start;
  min-height: 100vh; margin: 0; padding: 0; background: var(--lv-page); color: var(--lv-ink);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
body:has(#loginView[style*="display: flex"]) header.top { display: none !important; }

#loginView .lv-shell { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); width: 100%; min-height: calc(100vh - 32px); background: var(--lv-card); border-radius: 24px; overflow: hidden; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06); }

/* Left panel */
#loginView .lv-stage { display: flex; flex-direction: column; gap: 22px; padding: 36px clamp(28px, 5vw, 72px) 44px; background: var(--lv-ink); color: #cbd5e1; }
#loginView .lv-logo { align-self: flex-start; display: block; padding: 6px 14px 4px; background: #fff; border-radius: 12px; line-height: 0; }
#loginView .lv-logo img { display: block; width: 170px; height: auto; margin: -10px -4px -8px; }
#loginView .lv-kicker { margin: 18px 0 -8px; font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #93c5fd; }
#loginView .lv-head { margin: 0; font-size: clamp(30px, 3.4vw, 46px); line-height: 1.06; font-weight: 800; letter-spacing: -0.03em; color: #fff; }
#loginView .lv-head em { font-style: normal; color: #60a5fa; }
#loginView .lv-only-create { display: none; }
#loginView[data-auth-mode="create"] .lv-only-signin { display: none; }
#loginView[data-auth-mode="create"] .lv-only-create { display: block; }

#loginView .lv-ticket { max-width: 440px; padding: 16px 20px 14px; background: #fff; color: var(--lv-ink); font-family: var(--lv-mono); font-size: 13px; border-radius: 4px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45); transform: rotate(-0.8deg); }
#loginView .lv-ticket-top { display: flex; justify-content: space-between; align-items: center; padding-bottom: 8px; border-bottom: 1.5px solid var(--lv-ink); font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
#loginView .lv-ticket-top i { font-style: normal; padding: 1px 6px; border: 1px solid var(--lv-ink); border-radius: 3px; font-size: 10px; }
#loginView .lv-ticket-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px 0; border-bottom: 1px dashed #94a3b8; }
#loginView .lv-ticket-nums span { display: block; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--lv-muted); }
#loginView .lv-ticket-nums b { display: block; margin-top: 2px; font-size: 22px; font-weight: 600; }
#loginView .lv-ticket-nums .is-short b { color: var(--lv-short); }
#loginView .lv-ticket-lines { list-style: none; margin: 0; padding: 8px 0 0; }
#loginView .lv-ticket-lines li { display: flex; justify-content: space-between; padding: 3px 0; }
#loginView .lv-ticket-lines b { font-weight: 600; color: var(--lv-short); }
#loginView .lv-ticket-lines b::before { content: "−"; }
#loginView .lv-ticket-foot { margin: 10px 0 0; padding-top: 8px; border-top: 1px dashed #94a3b8; font-size: 11.5px; color: var(--lv-muted); }

#loginView .lv-points { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 12px; max-width: 460px; font-size: 15px; line-height: 1.45; }
#loginView .lv-points li { position: relative; padding-left: 28px; }
#loginView .lv-points li::before { content: ""; position: absolute; left: 0; top: 3px; width: 17px; height: 17px; border-radius: 50%; background: #1e3a8a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%2393c5fd' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 13px no-repeat; }
#loginView .lv-points b { color: #fff; font-weight: 700; }

/* Right panel */
#loginView .lv-panel { display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
#loginView .lv-card { width: 100%; max-width: 400px; }
#loginView #authCardTitle { margin: 0; font-size: 30px; line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; color: var(--lv-ink); text-align: left; }
#loginView #authCardSubtitle { margin: 8px 0 26px; font-size: 15px; line-height: 1.45; color: var(--lv-muted); text-align: left; }

#loginView .lv-alert { margin: 0 0 16px; padding: 10px 14px; border-radius: 10px; font-size: 13.5px; font-weight: 600; line-height: 1.4; }
#loginView .lv-alert.hidden { display: none; }
#loginView .lv-alert-err { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
#loginView .lv-alert-ok { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }

#loginView .lv-google { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 50px; padding: 12px 16px; background: var(--lv-card); color: var(--lv-ink); border: 1px solid #cbd5e1; border-radius: 12px; font: inherit; font-size: 15.5px; font-weight: 600; cursor: pointer; transition: border-color 0.12s ease, box-shadow 0.12s ease; }
#loginView .lv-google:hover { border-color: #94a3b8; box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08); }

#loginView .lv-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0; color: var(--lv-muted); font-size: 12.5px; }
#loginView .lv-divider::before, #loginView .lv-divider::after { content: ""; flex: 1; height: 1px; background: var(--lv-line); }

#loginView .lv-form { display: flex; flex-direction: column; text-align: left; }
#loginView .lv-label { display: block; margin: 0 0 6px; font-size: 13.5px; font-weight: 600; color: #334155; }
#loginView .lv-label-row { display: flex; align-items: baseline; justify-content: space-between; margin-top: 16px; }
#loginView #authConfirmPassGroup { margin-top: 16px; }
#loginView .lv-input { display: block; width: 100%; box-sizing: border-box; min-height: 50px; padding: 12px 14px; background: var(--lv-field); color: var(--lv-ink); border: 1px solid #cbd5e1; border-radius: 12px; font: inherit; font-size: 16px; outline: none; transition: border-color 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease; }
#loginView input.lv-input::placeholder { color: #94a3b8 !important; opacity: 1; }
#loginView .lv-input:focus { background: var(--lv-card); border-color: var(--lv-blue); box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15); }
#loginView .lv-pass { position: relative; }
#loginView .lv-pass .lv-input { padding-right: 68px; }
#loginView .lv-peek { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); min-width: 52px; min-height: 36px; padding: 0 10px; background: transparent; color: var(--lv-blue); border: 0; border-radius: 8px; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
#loginView .lv-peek:hover { background: rgba(37, 99, 235, 0.08); }
#loginView .lv-link-sm, #loginView .lv-switch a, #loginView .lv-back { color: var(--lv-blue); font-weight: 600; text-decoration: none; }
#loginView .lv-link-sm { font-size: 13px; }
#loginView .lv-link-sm:hover, #loginView .lv-switch a:hover, #loginView .lv-back:hover { text-decoration: underline; }

#loginView .lv-submit { width: 100%; min-height: 52px; margin-top: 22px; padding: 12px 16px; background: var(--lv-blue); color: #fff; border: 0; border-radius: 12px; font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; box-shadow: 0 10px 24px rgba(37, 99, 235, 0.25); transition: background-color 0.12s ease, transform 0.12s ease; }
#loginView .lv-submit:hover { background: var(--lv-blue-dk); }
#loginView .lv-submit:active { transform: translateY(1px); }
#loginView .lv-back { display: inline-block; margin-top: 18px; font-size: 14px; }

#loginView .lv-switch { margin-top: 18px; font-size: 14.5px; color: #475569; text-align: center; }
#loginView .lv-guest { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--lv-line); text-align: center; }
#loginView .lv-guest-btn { padding: 6px 8px; background: none; border: 0; color: #334155; font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer; }
#loginView .lv-guest-btn:hover { color: var(--lv-blue); }
#loginView .lv-guest p { margin: 4px 0 0; font-size: 12.5px; color: var(--lv-muted); }

#loginView .lv-legal { margin-top: 28px; text-align: center; font-size: 12.5px; color: var(--lv-muted); line-height: 1.5; }
#loginView .lv-legal p { margin: 0 0 6px; }
#loginView .lv-legal nav { display: flex; justify-content: center; gap: 8px; }
#loginView .lv-legal a { color: var(--lv-muted); }

#loginView button:focus-visible, #loginView a:focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; }

/* Dark theme */
[data-theme="dark"] #loginView.lv { --lv-ink: #e2e8f0; --lv-muted: #94a3b8; --lv-line: #334155; --lv-field: #0f172a; --lv-card: #1e293b; --lv-page: #111827; }
[data-theme="dark"] #loginView .lv-stage { background: #020617; }
[data-theme="dark"] #loginView .lv-ticket { --lv-ink: #0f172a; --lv-muted: #64748b; }
[data-theme="dark"] #loginView .lv-label, [data-theme="dark"] #loginView .lv-guest-btn { color: #cbd5e1; }
[data-theme="dark"] #loginView .lv-switch { color: #94a3b8; }
[data-theme="dark"] #loginView .lv-input, [data-theme="dark"] #loginView .lv-google { border-color: #475569; }

/* Phone and narrow tablets: the hour sheet becomes a slim strip above the form */
@media (max-width: 860px) {
  #loginView .lv-shell { grid-template-columns: minmax(0, 1fr); min-height: 0; border-radius: 18px; }
  #loginView .lv-stage { gap: 14px; padding: 16px 16px 22px; }
  #loginView .lv-logo img { width: 140px; }
  #loginView .lv-kicker, #loginView .lv-points, #loginView .lv-ticket-lines, #loginView .lv-ticket-foot { display: none; }
  #loginView .lv-head { font-size: 26px; }
  #loginView .lv-ticket { max-width: none; padding: 10px 14px; transform: none; }
  #loginView .lv-ticket-top { padding-bottom: 6px; }
  #loginView .lv-ticket-nums { padding: 8px 0 2px; border-bottom: 0; }
  #loginView .lv-ticket-nums b { font-size: 19px; }
  #loginView .lv-panel { align-items: flex-start; padding: 26px 16px 36px; }
  #loginView #authCardTitle { font-size: 26px; }
  #loginView #authCardSubtitle { margin-bottom: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  #loginView .lv-ticket { transform: none; }
}

/* ============================================================================
   Early access (public site only; js/ui/early-access.js). The locked buttons stay
   locked and are hidden here; .ea-only buttons take their place and open #eaSheet,
   which only builds an email. Nothing here can reach the app.
   ============================================================================ */
.ea-only { display: none !important; }
html.site-locked .ea-only { display: inline-flex !important; }
html.site-locked #btnNavDemo,
html.site-locked #freePlanBtn,
html.site-locked #proPlanBtn { display: none !important; }

#marketingView #eaNavBtn { align-items: center; background: #2563eb; border-color: #2563eb; }
#marketingView #eaNavBtn:hover { background: #1d4ed8; }

#marketingView .ea-plan { flex-direction: column; align-items: center; gap: 2px; width: 100%; margin-top: 32px; padding: 12px 16px; border-radius: 12px; border: 1px solid #cbd5e1; background: #fff; color: #0f172a; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; transition: border-color 0.12s ease, background-color 0.12s ease; }
#marketingView .ea-plan span { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #64748b; }
#marketingView .ea-plan:hover { border-color: #2563eb; }
#marketingView .ea-plan-pro { background: #2563eb; border-color: #2563eb; color: #fff; box-shadow: 0 10px 24px rgba(37, 99, 235, 0.25); }
#marketingView .ea-plan-pro span { color: #dbeafe; }
#marketingView .ea-plan-pro:hover { background: #1d4ed8; border-color: #1d4ed8; }

#eaSheet[open] { display: block !important; }
#eaSheet { --ea-ink: #0f172a; --ea-blue: #2563eb; --ea-muted: #64748b; --ea-line: #e2e8f0;
  width: min(480px, calc(100vw - 32px)); max-width: none; max-height: calc(100vh - 32px); margin: auto; padding: 0; border: 0; border-radius: 20px; background: #fff; color: var(--ea-ink); box-shadow: 0 30px 80px rgba(15, 23, 42, 0.35); font-family: 'Inter', system-ui, sans-serif; overflow: auto; }
#eaSheet::backdrop { background: rgba(15, 23, 42, 0.55); backdrop-filter: blur(2px); }
#eaSheet .ea-card { position: relative; padding: 28px 28px 24px; }
#eaSheet .ea-x { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--ea-muted); font-size: 26px; line-height: 1; cursor: pointer; }
#eaSheet .ea-x:hover { background: #f1f5f9; color: var(--ea-ink); }
#eaSheet .ea-kicker { margin: 0 0 6px; font-size: 12.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ea-blue); }
#eaSheet h2 { margin: 0; font-size: 28px; line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; color: var(--ea-ink); text-align: left; }
#eaSheet .ea-sub { margin: 8px 0 20px; font-size: 15px; line-height: 1.5; color: #475569; }
#eaSheet .ea-roles { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; margin-bottom: 16px; background: #f1f5f9; border-radius: 12px; }
#eaSheet .ea-roles button { min-height: 44px; border: 0; border-radius: 9px; background: transparent; color: #475569; font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer; }
#eaSheet .ea-roles button[aria-pressed="true"] { background: var(--ea-ink); color: #fff; box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2); }
#eaSheet .ea-fields { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; }
#eaSheet .ea-field { display: flex; flex-direction: column; gap: 6px; margin: 0; font-size: 13px; font-weight: 600; color: #334155; }
#eaSheet .ea-field input, #eaSheet .ea-field select { width: 100%; box-sizing: border-box; min-height: 46px; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 10px; background: #f8fafc; color: var(--ea-ink); font: inherit; font-size: 16px; font-weight: 400; outline: none; }
#eaSheet .ea-field input::placeholder { color: #94a3b8 !important; opacity: 1; }
#eaSheet .ea-field input:focus, #eaSheet .ea-field select:focus { background: #fff; border-color: var(--ea-blue); box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15); }
#eaSheet .ea-lines { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 0; padding: 12px; border: 1px solid #bfdbfe; border-radius: 10px; background: #eff6ff; font-size: 13.5px; line-height: 1.45; color: #1e3a8a; cursor: pointer; }
#eaSheet .ea-lines[hidden] { display: none; }
#eaSheet .ea-lines input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--ea-blue); }
#eaSheet .ea-send { display: flex; align-items: center; justify-content: center; width: 100%; box-sizing: border-box; min-height: 52px; margin-top: 18px; padding: 12px 16px; border-radius: 12px; background: var(--ea-blue); color: #fff; font-size: 16px; font-weight: 700; text-decoration: none; box-shadow: 0 10px 24px rgba(37, 99, 235, 0.25); }
#eaSheet .ea-send:hover { background: #1d4ed8; }
#eaSheet .ea-copy { display: block; width: 100%; min-height: 44px; margin-top: 8px; border: 0; border-radius: 10px; background: transparent; color: var(--ea-blue); font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer; }
#eaSheet .ea-copy:hover { background: #eff6ff; }
#eaSheet .ea-fine { margin: 10px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--ea-muted); text-align: center; }
#eaSheet .ea-done { padding: 12px 0 0; text-align: center; }
#eaSheet .ea-done[hidden], #eaSheet .ea-form[hidden] { display: none; }
#eaSheet .ea-done h2 { text-align: center; }
#eaSheet .ea-done p { margin: 10px auto 12px; max-width: 360px; font-size: 15px; line-height: 1.5; color: #475569; }
#eaSheet .ea-done-mark { width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 50%; background: #dcfce7; color: #15803d; font-size: 26px; font-weight: 800; line-height: 52px; }
#eaSheet button:focus-visible, #eaSheet a:focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; }

@media (max-width: 600px) {
  #eaSheet, #eaSheet[open] { width: 100vw; max-height: 92vh; margin: auto 0 0 !important; inset: auto 0 0 0 !important; border-radius: 20px 20px 0 0; }
  #eaSheet .ea-card { padding: 22px 16px calc(18px + env(safe-area-inset-bottom)); }
  #eaSheet h2 { font-size: 24px; }
  #eaSheet .ea-fields { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: no-preference) {
  #eaSheet[open] { animation: ea-in 0.18s ease-out; }
  @keyframes ea-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
}

/* Sign-in feedback (js/auth/auth-feedback.js): next step under an error, the field at fault, busy state */
#loginView .lv-alert-action { display: inline; margin: 0; padding: 0; background: none; border: 0; color: inherit; font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
#loginView .lv-alert-action:hover { text-decoration-thickness: 2px; }
#loginView .lv-input[aria-invalid="true"] { border-color: #dc2626; background: #fff; box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12); }
#loginView .lv-hint { margin: 6px 0 0; font-size: 12.5px; color: var(--lv-muted); }
#loginView .lv-hint[hidden] { display: none; }
#loginView .lv-card[aria-busy="true"] .lv-input { opacity: 0.7; }
#loginView .lv-card button:disabled { cursor: progress; }
#loginView .lv-submit.is-busy, #loginView .lv-google.is-busy { display: flex; align-items: center; justify-content: center; gap: 10px; opacity: 0.92; }
#loginView .lv-spin { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: lv-spin 0.7s linear infinite; }
@keyframes lv-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { #loginView .lv-spin { animation-duration: 2s; } }
[data-theme="dark"] #loginView .lv-input[aria-invalid="true"] { background: #1e293b; }

/* Sign-in: two doors at the top of the card (Sign in / Create account) */
#loginView .lv-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 0 0 24px; background: #f1f5f9; border-radius: 12px; }
#loginView .lv-tabs button { min-height: 44px; padding: 8px 12px; border: 0; border-radius: 9px; background: transparent; color: #475569; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; transition: background-color 0.12s ease, color 0.12s ease; }
#loginView .lv-tabs button:hover { color: var(--lv-ink); }
#loginView .lv-tabs button[aria-selected="true"] { background: var(--lv-card); color: var(--lv-ink); box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(15, 23, 42, 0.04); }
#loginView[data-auth-mode="forgot"] .lv-tabs { display: none; }
/* The tabs replace the "New here? / Already have an account?" line; it stays for the reset screen. */
#loginView:not([data-auth-mode="forgot"]) #authSwitchBox { display: none; }
[data-theme="dark"] #loginView .lv-tabs { background: #0f172a; }
[data-theme="dark"] #loginView .lv-tabs button { color: #94a3b8; }
[data-theme="dark"] #loginView .lv-tabs button[aria-selected="true"] { background: #334155; color: #f8fafc; }
@media (max-width: 860px) { #loginView .lv-tabs { margin-bottom: 18px; } }

/* ===== Account & Billing dialog (js/ui/account-dialog.js) ===== */
dialog.acct { padding: 0; border: 0; background: transparent; width: min(560px, calc(100% - 24px)); max-height: calc(100vh - 32px); color: var(--ink); }
dialog.acct::backdrop { background: rgba(15, 23, 42, 0.6); }
.acct-card { background: var(--card, #fff); color: var(--ink); border-radius: 18px; padding: 22px 24px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3); max-height: calc(100vh - 32px); overflow: auto; font-family: 'Inter', 'Open Sans', system-ui, sans-serif; }
.acct-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.acct-eyebrow { margin: 0; font-size: 11.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--teal-deep, #35647e); }
.acct-head h2 { margin: 2px 0 0; font: 700 22px/1.2 'Outfit', 'Inter', system-ui, sans-serif; }
.acct-x { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--ink); font-size: 15px; cursor: pointer; }
.acct-facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.acct-facts div { padding: 10px 12px; border-radius: 12px; background: rgba(148, 163, 184, 0.12); min-width: 0; }
.acct-facts dt { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.acct-facts dd { margin: 2px 0 0; font-weight: 700; overflow-wrap: anywhere; }
.acct-sec { display: flex; flex-direction: column; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.acct-sec h3 { margin: 0; font-size: 15.5px; }
.acct-sec p, .acct-sec li, .acct-note { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.acct-sec ul { margin: 0; padding-left: 20px; }
.acct-sec label { font-size: 13.5px; color: var(--ink); }
.acct-btn { align-self: flex-start; min-height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--card, #fff); color: var(--ink); font: 600 14px/1 'Inter', system-ui, sans-serif; cursor: pointer; }
.acct-btn.is-solid { background: #0b1f33; border-color: #0b1f33; color: #fff; }
.acct-btn.is-danger { background: #be123c; border-color: #be123c; color: #fff; }
.acct-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.acct-btn:focus-visible, .acct-x:focus-visible { outline: 3px solid var(--teal-deep, #35647e); outline-offset: 2px; }
.acct-danger { border-top-color: rgba(225, 29, 72, 0.35); }
.acct-file { display: inline-flex; align-items: center; }
.acct-restore { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 12px; background: rgba(148, 163, 184, 0.12); }
.acct-restore ul { margin: 0; padding-left: 18px; }
.acct-restore h4 { margin: 4px 0 0; font-size: 13px; font-weight: 800; color: var(--ink); }
.acct-restore-head { display: flex; flex-direction: column; gap: 2px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.acct-restore-head b { font-size: 14px; color: var(--ink); overflow-wrap: anywhere; }
.acct-restore-head span { font-size: 12.5px; color: var(--muted); }
.acct-restore-list li { font-size: 13.5px; line-height: 1.45; color: var(--ink); margin: 2px 0; }
.acct-opt { display: flex !important; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card, #fff); cursor: pointer; }
.acct-opt:has(input:checked) { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14); }
.acct-opt input { width: 18px !important; height: 18px !important; min-height: 0 !important; margin: 2px 0 0 !important; padding: 0 !important; flex: none; accent-color: #2563eb; }
.acct-opt span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.acct-opt b { font-size: 13.5px; color: var(--ink); }
.acct-opt small { font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.acct-danger h3 { color: #be123c; }
.acct-row { display: flex; gap: 8px; flex-wrap: wrap; }
.acct-row input { flex: 1 1 140px; min-width: 0; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--input-bg, #fff); color: var(--ink); font: 700 15px/1 'Inter', system-ui, sans-serif; letter-spacing: 0.06em; }
.acct-status { min-height: 0; font-weight: 600; color: var(--ink) !important; }
.acct-status:empty { display: none; }
.acct-link { border: 0; background: none; padding: 0; color: var(--teal-deep, #35647e); font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
.acct-done { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 100001; display: flex; align-items: center; gap: 12px; max-width: calc(100% - 32px); padding: 12px 16px; border-radius: 12px; background: #0b1f33; color: #fff; font-size: 14px; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3); }
.acct-done button { border: 0; background: transparent; color: #fff; font-size: 15px; cursor: pointer; }
[data-theme="dark"] .acct-btn.is-solid { background: #7dd3fc; border-color: #7dd3fc; color: #0b1f33; }
@media (max-width: 640px) { .acct-card { padding: 18px 16px; } .acct-btn { align-self: stretch; } }
.acct-preview { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: #fef3c7; color: #92400e; font-size: 11px; font-weight: 700; vertical-align: middle; }

/* ===== In-app notices (js/ui/toast.js) ===== */
.tht-toasts { position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 100002; display: flex; flex-direction: column; gap: 8px; width: min(520px, calc(100% - 24px)); pointer-events: none; }
/* Taps pass through a notice to the control underneath (it can sit over Add Line near the bottom of a
   phone screen); only its dismiss button takes taps. */
.tht-toast { pointer-events: none; display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px 12px 16px; border-radius: 12px; background: #0b1f33; color: #f1f5f9; font: 500 14px/1.45 'Inter', system-ui, sans-serif; box-shadow: 0 14px 34px rgba(0, 0, 0, 0.3); border-left: 5px solid #7dd3fc; animation: thtToastIn 0.2s ease-out; }
.tht-toast span { flex: 1; }
.tht-toast button { pointer-events: auto; flex: none; border: 0; background: transparent; color: inherit; font-size: 14px; cursor: pointer; opacity: 0.8; padding: 0 2px; }
.tht-toast button:focus-visible { outline: 2px solid #7dd3fc; border-radius: 4px; }
.tht-toast.is-ok { border-left-color: #34d399; }
.tht-toast.is-warn { border-left-color: #fbbf24; }
.tht-toast.is-error { border-left-color: #fb7185; }
.tht-toast.is-leaving { opacity: 0; transform: translateY(6px); transition: opacity 0.2s, transform 0.2s; }
@keyframes thtToastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .tht-toast { animation: none; } .tht-toast.is-leaving { transition: none; } }

/* ===== Scan a Printed Hour Sheet (js/services/hour-sheet-photo.js) ===== */
.hs-scan-note { margin: 6px 2px 0; font-size: 11.5px; line-height: 1.45; color: var(--muted); text-align: center; }

/* ===== CDK import review: what changed since the last import ===== */
.cdk-chg { display: inline-block; margin-top: 3px; padding: 1px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.02em; white-space: nowrap; }
.cdk-chg.is-new { background: rgba(2, 132, 199, 0.12); color: #0369a1; }
.cdk-chg.is-changed { background: rgba(217, 119, 6, 0.14); color: #b45309; }
.cdk-chg.is-same { background: rgba(148, 163, 184, 0.2); color: var(--muted); }
.cdk-change-summary { margin: 0 0 8px; padding: 8px 12px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); font-size: 13px; color: var(--ink); }
[data-theme="dark"] .cdk-chg.is-new { color: #7dd3fc; }
[data-theme="dark"] .cdk-chg.is-changed { color: #fcd34d; }

/* ===== Holding Bin: Untracked from your hour sheet ===== */
.ub-head { display: flex; flex-direction: column; gap: 2px; margin: 12px 0 8px; padding: 10px 12px; border-radius: 10px; background: var(--paper); border: 1px dashed var(--teal-deep, #35647e); font-size: 12.5px; color: var(--muted); }
.ub-head b { color: var(--ink); font-size: 13.5px; }
.ub-head .ub-warncount { color: #b45309; font-size: inherit; }
.holding-bin-item-card.is-untracked { border-left: 4px solid #94a3b8 !important; }
.ub-extra { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.ub-checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
.ub-checks li.is-warn { padding: 6px 8px; border-radius: 8px; background: #fffbeb; color: #78350f; border: 1px solid #fde68a; }
.ub-checks li.is-muted { color: var(--muted); }
[data-theme="dark"] .ub-checks li.is-warn { background: rgba(251, 191, 36, 0.12); color: #fcd34d; border-color: rgba(251, 191, 36, 0.35); }
.ub-actions { display: flex; gap: 6px; }
.ub-actions .mini { flex: 1; font-size: 11.5px; padding: 5px 8px; cursor: pointer; justify-content: center; }

/* ===== DMS Payroll Auditor: one front door (js/ui/import-front-door.js) ===== */
.fd-legacy { display: none !important; }
.fd-main { width: 100%; justify-content: center; cursor: pointer; padding: 12px 14px; font-weight: 700; font-size: 15px; }
.fd-sub { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.fd-link { border: 0; background: none; padding: 2px 0; color: var(--teal-deep, #35647e); font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.fd-link:focus-visible { outline: 2px solid var(--teal-deep, #35647e); border-radius: 4px; }
.fd-quota-hint { font-weight: 500; opacity: 0.8; }
/* Step 1: the tabs and paste/drop panels and the empty review stay hidden until needed */
#cdkReconcileModal:not(.fd-paste-open) #cdkTabRow,
#cdkReconcileModal:not(.fd-paste-open) #cdkTabPastePanel,
#cdkReconcileModal #cdkTabDropPanel { display: none !important; }
#cdkReconcileModal.fd-has-draft #cdkTabRow,
#cdkReconcileModal.fd-has-draft #cdkTabPastePanel { display: none !important; }
#cdkReconcileModal:not(.fd-has-draft) #cdkReviewSection { display: none !important; }
.fd-door { margin-bottom: 14px; }
.fd-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 30px 20px; border: 2px dashed var(--teal-deep, #35647e); border-radius: 16px; background: var(--paper); text-align: center; cursor: pointer; transition: background 0.15s, border-color 0.15s; }
.fd-drop:hover, .fd-drop.is-over { background: rgba(53, 100, 126, 0.07); }
.fd-drop.is-over { border-style: solid; }
.fd-drop:focus-visible { outline: 3px solid var(--teal-deep, #35647e); outline-offset: 2px; }
.fd-drop .fd-icon { font-size: 34px; line-height: 1; }
.fd-drop b { font: 700 18px/1.2 var(--font-display, 'Outfit', system-ui, sans-serif); color: var(--ink); }
.fd-drop p { margin: 0; max-width: 46ch; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.fd-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 8px 0 4px; }
.fd-actions button { padding: 9px 16px; font-size: 14px; font-weight: 600; cursor: pointer; }
.fd-loaded { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; padding: 10px 14px; border-radius: 12px; background: rgba(5, 150, 105, 0.08); border: 1px solid rgba(5, 150, 105, 0.3); font-size: 13.5px; font-weight: 600; color: var(--ink); }
#cdkCommitApprovedBtn:disabled { opacity: 0.5; cursor: not-allowed; }
@media (max-width: 640px) { .fd-drop { padding: 22px 14px; } .fd-actions button { flex: 1 1 100%; } }
.fd-drop[hidden], .fd-loaded[hidden] { display: none !important; }

/* DMS Payroll Auditor verdict (js/ui/auditor-verdict.js) */
.av { margin: 2px 0 12px; text-align: left; }
.av-empty { background: var(--teal-soft, #eef6f8); border: 1px dashed var(--teal-deep, #35647e); border-radius: 10px; padding: 12px 14px; text-align: center; }
.av-q { font-weight: 800; color: var(--ink); font-size: 14.5px; line-height: 1.3; }
.av-a { color: var(--muted); font-size: 12.5px; margin-top: 4px; line-height: 1.4; }
.av-head { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.av-head b { color: var(--ink); }
.av-stale { color: var(--copper, #b45309); font-weight: 700; }
.av-big { border-radius: 10px; padding: 10px 12px; font-weight: 700; font-size: 14px; display: flex; align-items: baseline; gap: 8px; }
.av-num { font-family: var(--font-display); font-size: 26px; font-weight: 900; line-height: 1; }
.av-big.is-ok { background: #ecfdf3; color: #166534; border: 1px solid #a7e3bd; }
.av-big.is-short { background: #fff4e8; color: #9a3412; border: 1px solid #f5c08b; }
.av-list { list-style: none; margin: 8px 0 0; padding: 0; font-size: 12.5px; }
.av-list li { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; padding: 5px 2px; border-bottom: 1px solid var(--line, #e5e7eb); }
.av-list span { color: var(--muted); }
.av-list em { font-style: normal; font-weight: 800; color: #9a3412; min-width: 44px; text-align: right; }
.av-more, .av-tip { font-size: 12px; color: var(--muted); margin-top: 6px; }
.av-facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; font-size: 11.5px; }
.av-facts > * { background: var(--paper, #f4f5f7); border-radius: 999px; padding: 3px 9px; color: var(--muted); border: 0; }
.av-link { cursor: pointer; color: var(--teal-deep) !important; font-weight: 700; text-decoration: underline; font: inherit; }
.av-nudge { margin-top: 8px; font-size: 12px; color: var(--copper, #b45309); font-weight: 600; }
.av-quota { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 11.5px; color: var(--muted); }
.av-quota #sidebarAiQuotaBadge { font-size: 11px !important; padding: 1px 7px !important; }

/* Foreman IQ mark used as the brand everywhere (same look as THT Analytics) */
.fiq-brand { margin-right: 0; }
.panel > div > .fiq-brand, .panel > .fiq-brand { margin-bottom: 6px; }

/* Bring in your hour sheet: high-tech skin (dark hero like the Pay Period Ledger) */
#cdkReconcileModal.dms-x .sheet { padding-top: 0; overflow-x: hidden; }
.dms-hero { position: relative; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin: 0 -24px 14px; padding: 20px 24px 18px; color: #f1f5f9;
  background: radial-gradient(120% 140% at 100% 0%, rgba(14,165,233,.28) 0%, transparent 55%), linear-gradient(160deg, #0b1f33 0%, #12324d 60%, #1b4864 100%); }
.dms-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background-image: linear-gradient(rgba(125,211,252,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(125,211,252,.12) 1px, transparent 1px); background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 70%); mask-image: linear-gradient(90deg, transparent, #000 70%); }
.dms-hero > * { position: relative; z-index: 1; }
.dms-hero-chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dms-hero-eyebrow { font: 600 11px/1 var(--font-body, system-ui); letter-spacing: .14em; text-transform: uppercase; color: #7dd3fc; }
.dms-hero #dmsDetectedFormatBadge { background: rgba(255,255,255,.08) !important; color: #e2e8f0 !important; border: 1px solid rgba(125,211,252,.45) !important; border-radius: 999px; padding: 3px 10px; font-size: 11px; letter-spacing: .04em; }
.dms-hero #dmsImportModalTitle { font-family: var(--font-display); font-size: clamp(24px, 3.4vw, 32px); margin: 10px 0 4px; color: #fff; letter-spacing: -.01em; }
.dms-hero-sub { margin: 0; color: #a5b4c8; font-size: 13.5px; line-height: 1.5; }
.dms-hero-sub strong { color: #e2e8f0; }
.dms-hero #closeCdkModalX { background: rgba(255,255,255,.08); color: #f1f5f9; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; width: 38px; height: 38px; }
.dms-x .dms-quota { background: transparent !important; border: 0 !important; border-bottom: 1px dashed var(--line) !important; border-radius: 0 !important; padding: 0 2px 10px !important; color: var(--muted) !important; font-weight: 600 !important; }
.dms-x .dms-quota #modalAiQuotaCount { color: var(--teal-deep); font-family: 'IBM Plex Mono', ui-monospace, monospace; }

.dms-x .fd-drop { position: relative; overflow: hidden; border: 1px solid rgba(37,99,235,.35); background: radial-gradient(90% 120% at 50% 0%, rgba(14,165,233,.10), transparent 60%), var(--paper); padding: 36px 20px 30px; }
.dms-x .fd-drop::before { content: ""; position: absolute; inset: 10px; border-radius: 12px; pointer-events: none;
  background: linear-gradient(#0ea5e9,#0ea5e9) top left / 22px 2px, linear-gradient(#0ea5e9,#0ea5e9) top left / 2px 22px, linear-gradient(#0ea5e9,#0ea5e9) top right / 22px 2px, linear-gradient(#0ea5e9,#0ea5e9) top right / 2px 22px,
    linear-gradient(#0ea5e9,#0ea5e9) bottom left / 22px 2px, linear-gradient(#0ea5e9,#0ea5e9) bottom left / 2px 22px, linear-gradient(#0ea5e9,#0ea5e9) bottom right / 22px 2px, linear-gradient(#0ea5e9,#0ea5e9) bottom right / 2px 22px; background-repeat: no-repeat; }
.dms-x .fd-drop:hover, .dms-x .fd-drop.is-over { border-color: #0ea5e9; background-color: rgba(14,165,233,.06); }
.dms-glyph { width: 46px; height: 46px; color: #2563eb; }
.dms-scan-line { position: absolute; left: 10%; right: 10%; top: 12%; height: 2px; border-radius: 2px; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, transparent, #22d3ee, transparent); box-shadow: 0 0 12px #22d3ee; }
.dms-x .fd-drop:hover .dms-scan-line, .dms-x .fd-drop.is-over .dms-scan-line, .dms-x .fd-drop:focus-visible .dms-scan-line { animation: dmsScan 1.6s ease-in-out infinite; }
@keyframes dmsScan { 0% { top: 12%; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { top: 86%; opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .dms-x .fd-drop .dms-scan-line { animation: none !important; } }
.dms-x .fd-actions .solid { background: linear-gradient(135deg, #2563eb, #0ea5e9); border-color: transparent; color: #fff; }

.dms-x .dms-stats > div { position: relative; background: linear-gradient(160deg, #0b1f33, #12324d) !important; border: 1px solid rgba(125,211,252,.18) !important; border-radius: 14px !important; padding: 12px 14px !important; }
.dms-x .dms-stats > div > span { color: #7dd3fc !important; letter-spacing: .12em; font-size: 10.5px !important; }
.dms-x .dms-stats > div > b { color: #f8fafc !important; font-family: 'IBM Plex Mono', ui-monospace, monospace !important; font-size: 24px !important; font-variant-numeric: tabular-nums; }
.dms-x .dms-stats #cdkRecNetVariance { color: #4ade80 !important; }
.dms-x .dms-stats #cdkRecLaborSales, .dms-x .dms-stats #cdkRecOverallElr { color: #7dd3fc !important; }
.dms-x .cdk-filter-btn { border-radius: 999px; }
@media (max-width: 640px) { .dms-hero { padding: 16px 24px; } }
.dms-x .dms-stats { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important; }

/* Auditor card: last upload line + Foreman IQ reminder */
.av-upload { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.av-upload b { color: var(--ink); }
.av-upload .av-ago { margin-left: auto; font-weight: 700; }
.av-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.18); }
.av-upload.is-aging .av-dot { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,.2); }
.av-upload.is-stale .av-dot { background: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.2); animation: avPulse 1.8s ease-in-out infinite; }
.av-upload.is-stale .av-ago { color: #b91c1c; }
@keyframes avPulse { 50% { box-shadow: 0 0 0 6px rgba(239,68,68,.05); } }
.av-remind { margin: 0 0 10px; padding: 12px 14px; border-radius: 12px; color: #e2e8f0; text-align: left;
  background: radial-gradient(120% 140% at 100% 0%, rgba(14,165,233,.28), transparent 55%), linear-gradient(160deg, #0b1f33, #12324d); }
.av-remind p { margin: 8px 0 10px; font-size: 13px; line-height: 1.45; }
.av-remind b { color: #fff; }
.av-remind-btn { font: inherit; font-size: 12.5px; font-weight: 700; color: #fff; border: 0; border-radius: 999px; padding: 7px 14px; cursor: pointer; background: linear-gradient(135deg, #2563eb, #0ea5e9); }
@media (prefers-reduced-motion: reduce) { .av-upload.is-stale .av-dot { animation: none; } }

/* Shared Foreman IQ hero background (import window header) on the THT Analytics and Pay Period Ledger dark sections */
.tha-hero, .ppl-hero { position: relative; isolation: isolate;
  background: radial-gradient(120% 140% at 100% 0%, rgba(14,165,233,.28) 0%, transparent 55%), linear-gradient(160deg, #0b1f33 0%, #12324d 60%, #1b4864 100%); }
.tha-hero::after, .ppl-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .35; border-radius: inherit;
  background-image: linear-gradient(rgba(125,211,252,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(125,211,252,.12) 1px, transparent 1px); background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 70%); mask-image: linear-gradient(90deg, transparent, #000 70%); }

/* Workbench day hero: the date + day totals strip in the Foreman IQ hero style (all data unchanged) */
#dateTotalsSubHeaderBar[data-hero] { position: relative; isolation: isolate; margin: 8px 0 18px; padding: 18px 22px !important; border-radius: 20px; border: 0 !important; color: #f1f5f9;
  background: radial-gradient(120% 140% at 100% 0%, rgba(14,165,233,.28) 0%, transparent 55%), linear-gradient(160deg, #0b1f33 0%, #12324d 60%, #1b4864 100%);
  box-shadow: 0 18px 40px rgba(11,31,51,.18); }
#dateTotalsSubHeaderBar[data-hero]::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .35; border-radius: inherit;
  background-image: linear-gradient(rgba(125,211,252,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(125,211,252,.12) 1px, transparent 1px); background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 70%); mask-image: linear-gradient(90deg, transparent, #000 70%); }
#dateTotalsSubHeaderBar[data-hero] #weekday { color: #7dd3fc !important; letter-spacing: .14em; }
#dateTotalsSubHeaderBar[data-hero] #dayTitle { color: #fff !important; font-size: clamp(26px, 3.4vw, 36px); letter-spacing: -.01em; }
#dateTotalsSubHeaderBar[data-hero] .chips-title { color: #7dd3fc !important; letter-spacing: .14em; margin-bottom: 6px !important; }
#dateTotalsSubHeaderBar[data-hero] #dayChips { gap: 8px; }
#dateTotalsSubHeaderBar[data-hero] #dayChips .chip { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 14px !important; border-radius: 12px !important;
  background: rgba(255,255,255,.06) !important; border: 1px solid rgba(125,211,252,.25) !important; color: #a5b4c8 !important; font-size: 10.5px !important; letter-spacing: .1em; text-transform: uppercase; }
#dateTotalsSubHeaderBar[data-hero] #dayChips .chip b { margin-left: 0 !important; color: #f8fafc !important; font: 700 20px/1.1 'IBM Plex Mono', ui-monospace, monospace; letter-spacing: 0; text-transform: none; font-variant-numeric: tabular-nums; }
#dateTotalsSubHeaderBar[data-hero] #dayChips .chip.short b { color: #fb7185 !important; }
#dateTotalsSubHeaderBar[data-hero] #dayChips .chip.surplus b { color: #4ade80 !important; }
#dateTotalsSubHeaderBar[data-hero] #dayChips .chip.short { border-color: rgba(251,113,133,.45) !important; }
#dateTotalsSubHeaderBar[data-hero] #dayChips .chip::before { display: none !important; }
#dateTotalsSubHeaderBar[data-hero] .wb-hero-mark { margin-bottom: 6px; }
#dateTotalsSubHeaderBar[data-hero] .view-switcher-pill { background: rgba(255,255,255,.07) !important; border: 1px solid rgba(255,255,255,.18) !important; box-shadow: none !important; }
#dateTotalsSubHeaderBar[data-hero] .view-pill-btn { color: #cbd5e1 !important; background: transparent !important; }
#dateTotalsSubHeaderBar[data-hero] .view-pill-btn:hover { color: #fff !important; }
#dateTotalsSubHeaderBar[data-hero] .view-pill-btn.active { background: linear-gradient(135deg, #2563eb, #0ea5e9) !important; color: #fff !important; }
@media (max-width: 640px) {
  #dateTotalsSubHeaderBar[data-hero] { padding: 16px !important; }
  #dateTotalsSubHeaderBar[data-hero] #dayChips { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
  #dateTotalsSubHeaderBar[data-hero] #dayChips .chip { padding: 8px 10px !important; min-width: 0; }
  #dateTotalsSubHeaderBar[data-hero] #dayChips .chip b { font-size: 17px; }
}

/* Three columns on laptop screens too (1260-1399px): slimmer side columns so Current Job keeps room. */
@media (min-width: 1260px) and (max-width: 1399px) {
  #techWorkbenchView .layout { grid-template-columns: 272px minmax(0, 1fr) 300px !important; gap: 16px; }
}
@media (min-width: 641px) and (max-width: 1100px) {
  #dateTotalsSubHeaderBar[data-hero] { display: grid !important; grid-template-columns: auto minmax(0, 1fr) !important; gap: 12px 18px !important; align-items: center; }
  #dateTotalsSubHeaderBar[data-hero] .chips-col { align-items: flex-end !important; margin: 0 !important; }
  #dateTotalsSubHeaderBar[data-hero] .top-bar-switcher-col { grid-column: 1 / -1; align-items: stretch !important; }
  #dateTotalsSubHeaderBar[data-hero] #segmentedViewSwitcher { width: 100%; display: flex; }
  #dateTotalsSubHeaderBar[data-hero] #segmentedViewSwitcher .view-pill-btn { flex: 1 1 0; }
}

/* RO cards: Foreman IQ header strip + paid meter per line (render-workbench.js) */
.master-ro-card .ro-card-header, .carry-in-ro-card .ro-card-header { position: relative; isolation: isolate; color: #e2e8f0;
  background: radial-gradient(120% 160% at 100% 0%, rgba(14,165,233,.25) 0%, transparent 55%), linear-gradient(160deg, #0b1f33 0%, #12324d 70%, #1b4864 100%) !important; border-bottom: 0 !important; }
.master-ro-card .ro-card-header::after, .carry-in-ro-card .ro-card-header::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .3;
  background-image: linear-gradient(rgba(125,211,252,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(125,211,252,.12) 1px, transparent 1px); background-size: 18px 18px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 75%); mask-image: linear-gradient(90deg, transparent, #000 75%); }
.ro-card-header span[style*="font-display"] { color: #fff !important; letter-spacing: -.01em; }
.ro-card-header span[style*="color: #475569"], .ro-card-header span[style*="color: #334155"] { color: #cbd5e1 !important; }
.ro-card-header span[style*="color: #64748b"] { color: #7dd3fc !important; letter-spacing: .1em; font-size: 10.5px !important; }
.ro-card-header span[style*="monospace"] { color: #f8fafc !important; font-family: 'IBM Plex Mono', ui-monospace, monospace !important; font-size: 18px !important; }
.wb-meter { display: flex; align-items: center; gap: 12px; margin: 2px 0 8px; }
.wb-meter-track { flex: 1; height: 6px; border-radius: 999px; background: rgba(100,116,139,.18); overflow: hidden; }
.wb-meter-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2563eb, #0ea5e9); transition: width .4s ease; }
.wb-meter-text { display: flex; gap: 8px; align-items: baseline; font-size: 11.5px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.wb-meter-text b { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.wb-meter.is-paid .wb-meter-track span { background: linear-gradient(90deg, #16a34a, #22c55e); } .wb-meter.is-paid b { color: #15803d; }
.wb-meter.is-part b { color: #b45309; } .wb-meter.is-part .wb-meter-track span { background: linear-gradient(90deg, #d97706, #f59e0b); }
.wb-meter.is-none b { color: #be123c; } .wb-meter.is-none .wb-meter-track { background: repeating-linear-gradient(135deg, rgba(225,29,72,.16) 0 6px, rgba(225,29,72,.06) 6px 12px); }
.wb-meter.is-settled b { color: #2563eb; }
.master-ro-card .ro-card-header, .carry-in-ro-card .ro-card-header { width: auto !important; margin-right: -16px !important; }

/* Pay Period & Earnings: Foreman IQ gauge (render-workbench.js renderPeriodGauge) */
.pp-gauge { position: relative; isolation: isolate; display: flex; align-items: center; gap: 14px; margin: 0 0 12px; padding: 14px; border-radius: 14px; color: #e2e8f0;
  background: radial-gradient(120% 160% at 100% 0%, rgba(14,165,233,.28) 0%, transparent 55%), linear-gradient(160deg, #0b1f33 0%, #12324d 60%, #1b4864 100%); }
.pp-gauge::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .3; border-radius: inherit;
  background-image: linear-gradient(rgba(125,211,252,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(125,211,252,.12) 1px, transparent 1px); background-size: 18px 18px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 75%); mask-image: linear-gradient(90deg, transparent, #000 75%); }
.pp-gauge:empty { display: none; }
.pp-ring { width: 84px; height: 84px; flex: none; }
.pp-ring-track { fill: none; stroke: rgba(255,255,255,.1); stroke-width: 9; }
.pp-ring-fill { fill: none; stroke: #f43f5e; stroke-width: 9; stroke-linecap: round; transition: stroke-dasharray .6s ease; }
.pp-gauge.is-close .pp-ring-fill { stroke: #f59e0b; } .pp-gauge.is-paid .pp-ring-fill { stroke: #22c55e; } .pp-gauge.is-empty .pp-ring-fill { stroke: transparent; }
.pp-ring-pct { fill: #fff; font: 800 19px 'IBM Plex Mono', ui-monospace, monospace; }
.pp-ring-sub { fill: #7dd3fc; font: 700 9px system-ui, sans-serif; letter-spacing: .14em; text-transform: uppercase; }
.pp-gauge-text { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.pp-gauge-text b { color: #fff; font: 800 17px/1.2 var(--font-display, system-ui); }
.pp-gauge.is-short .pp-gauge-text b { color: #fda4af; }
.pp-gauge-text > span:last-child { font-size: 12px; color: #a5b4c8; }
@media (prefers-reduced-motion: reduce) { .pp-ring-fill { transition: none; } }

/* Header: shop status capsule (clock, date, weather, forecast) + profile chip */
#headerClockWeatherWidget { position: relative; isolation: isolate; flex-direction: row !important; align-items: center !important; gap: 14px !important; padding: 8px 16px; border-radius: 18px; color: #e2e8f0;
  background: radial-gradient(120% 160% at 100% 0%, rgba(14,165,233,.3) 0%, transparent 55%), linear-gradient(160deg, #0b1f33 0%, #12324d 60%, #1b4864 100%); box-shadow: 0 10px 24px rgba(11,31,51,.18); }
#headerClockWeatherWidget::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .3; border-radius: inherit;
  background-image: linear-gradient(rgba(125,211,252,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(125,211,252,.12) 1px, transparent 1px); background-size: 16px 16px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 75%); mask-image: linear-gradient(90deg, transparent, #000 75%); }
#headerClockWeatherWidget > div:first-child { gap: 14px !important; }
#shopDigitalClock { display: flex !important; flex-direction: column; align-items: flex-start; color: #fff !important; font-family: 'IBM Plex Mono', ui-monospace, monospace !important; font-size: 24px !important; letter-spacing: -.02em; }
.hc-date { font: 700 10.5px/1.2 var(--font-body, system-ui); letter-spacing: .14em; text-transform: uppercase; color: #7dd3fc; margin-top: 2px; }
.hc-date:empty { display: none; }
#shopWeatherBadge { color: #fff !important; padding-left: 14px; border-left: 1px solid rgba(125,211,252,.25); font-size: 24px !important; }
#weatherForecastRow { gap: 6px !important; padding-left: 14px; border-left: 1px solid rgba(125,211,252,.25); color: #a5b4c8 !important; }
.hc-fc { display: inline-flex; flex-direction: column; align-items: center; gap: 1px; min-width: 38px; padding: 4px 6px; border-radius: 10px; background: rgba(255,255,255,.06); border: 1px solid rgba(125,211,252,.18); font-size: 11px; }
.hc-fc b { font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: #7dd3fc; }
.hc-fc i { font-style: normal; font-size: 14px; line-height: 1.1; }
.hc-fc span { color: #f1f5f9; font-weight: 700; font-family: 'IBM Plex Mono', ui-monospace, monospace; }
#weatherImminentAlertBlock { left: calc(100% + 12px) !important; }

.hp-account { gap: 10px !important; }
.hp-avatar { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex: none; border-radius: 50%; color: #fff; font: 800 14px/1 var(--font-display, system-ui); letter-spacing: .02em;
  background: linear-gradient(135deg, #2563eb, #0ea5e9); box-shadow: 0 0 0 3px rgba(14,165,233,.18); }
.hp-who { align-items: flex-start !important; gap: 3px !important; margin-right: 4px; }
.hp-who #techUserName { font-size: 14px !important; }
.hp-who > div:last-child { gap: 0 !important; }
#unifiedTierBadgeSlot { margin: 0 !important; }
@media (max-width: 900px) {
  #headerClockWeatherWidget { flex-wrap: wrap; justify-content: center !important; }
  #weatherForecastRow { border-left: 0; padding-left: 0; }
}
@media (max-width: 640px) {
  #headerClockWeatherWidget { width: 100%; box-sizing: border-box; }
  #weatherForecastRow { width: 100%; justify-content: center !important; }
  #shopDigitalClock { font-size: 22px !important; }
}

/* Pay Period Stats: instrument tiles (same ids and numbers) */
#statsBody.ps-x { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#statsBody.ps-x > .stat:nth-child(-n+4) { display: flex; flex-direction: column-reverse; align-items: flex-start; gap: 2px; margin: 0 !important; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
#statsBody.ps-x > .stat:nth-child(-n+4) span { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
#statsBody.ps-x > .stat:nth-child(-n+4) b { font: 700 22px/1.1 'IBM Plex Mono', ui-monospace, monospace; color: var(--ink); font-variant-numeric: tabular-nums; }
#statsBody.ps-x > .stat:nth-child(5) { grid-column: 1 / -1; position: relative; isolation: isolate; display: flex; align-items: center; justify-content: space-between; margin: 2px 0 0 !important; padding: 12px 14px !important; border: 0 !important; border-radius: 12px;
  background: radial-gradient(120% 160% at 100% 0%, rgba(14,165,233,.28) 0%, transparent 55%), linear-gradient(160deg, #0b1f33 0%, #12324d 60%, #1b4864 100%); }
#statsBody.ps-x > .stat:nth-child(5) span { color: #7dd3fc !important; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700 !important; }
#statsBody.ps-x > .stat:nth-child(5) b { color: #fff !important; font: 800 28px/1 'IBM Plex Mono', ui-monospace, monospace !important; }
#statsBody.ps-x > :nth-child(n+6) { grid-column: 1 / -1; }
#statsBody.ps-x #barC, #statsBody.ps-x #barW, #statsBody.ps-x #barI { border-radius: 999px; }
#statsBody.ps-x div:has(> #barC) { height: 12px !important; gap: 3px; background: transparent !important; }
#statsBody.ps-x div:has(> #barC) > div:not([style*="width: 0%"]) { min-width: 6px; }
#statsBody.ps-x div:has(> #barC)::after { content: ""; flex: 1; border-radius: 999px; background: var(--line); }
#statsBody.ps-x.collapsed { display: none !important; }

/* Current Job: Foreman IQ header strip with a live ticket (js/ui/job-ticket.js) */
#dayEntry .jc-head { position: relative; isolation: isolate; margin: -14px -14px 14px; padding: 12px 14px !important; border: 0 !important; border-radius: 17px 17px 0 0; color: #e2e8f0;
  background: radial-gradient(120% 160% at 100% 0%, rgba(14,165,233,.28) 0%, transparent 55%), linear-gradient(160deg, #0b1f33 0%, #12324d 60%, #1b4864 100%); }
#dayEntry .jc-head::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .3; border-radius: inherit;
  background-image: linear-gradient(rgba(125,211,252,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(125,211,252,.12) 1px, transparent 1px); background-size: 18px 18px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 75%); mask-image: linear-gradient(90deg, transparent, #000 75%); }
#dayEntry .jc-head .kicker { color: #7dd3fc !important; }
.jc-title { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.jc-ticket { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-height: 24px; font-size: 12.5px; }
.jc-hint { color: #a5b4c8; }
.jc-ro { font: 800 17px/1.1 'IBM Plex Mono', ui-monospace, monospace; color: #fff; }
.jc-hrs { font: 800 17px/1.1 'IBM Plex Mono', ui-monospace, monospace; color: #7dd3fc; }
.jc-type { padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; color: #fff; background: #15803d; }
.jc-type.t-W { background: #991b1b; } .jc-type.t-I { background: #1e40af; }
.jc-job { color: #e2e8f0; max-width: 28ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jc-day { color: #a5b4c8; font-size: 12px; }
.jc-ticket.is-live .jc-ro { animation: jcPop .25s ease; }
@keyframes jcPop { from { opacity: .4; transform: translateY(2px); } }
#dayEntry #addLine { background: linear-gradient(135deg, #2563eb, #0ea5e9) !important; border-color: transparent !important; color: #fff !important; font-weight: 800; letter-spacing: .02em; box-shadow: 0 8px 18px rgba(37,99,235,.25); }
#dayEntry input:focus, #dayEntry select:focus, #dayEntry textarea:focus { outline: none; border-color: #0ea5e9 !important; box-shadow: 0 0 0 3px rgba(14,165,233,.2) !important; }
#dayEntry #inBayScanBtn { background: rgba(255,255,255,.08) !important; border: 1px solid rgba(255,255,255,.25) !important; color: #f1f5f9 !important; }
@media (prefers-reduced-motion: reduce) { .jc-ticket.is-live .jc-ro { animation: none; } }

/* ==========================================================================
   Dark mode, Sleeper-inspired: deep navy-charcoal canvas, raised cards with
   hairline borders (no bright outlines), white type, cyan only as an accent.
   ========================================================================== */
[data-theme="dark"] {
  --paper: #10131b;
  --card: #1a1e2a;
  --ink: #f4f6fb;
  --muted: #8f98ad;
  --line: #2a3142;
  --teal-deep: #1ed8c8;
  --teal: #1ed8c8;
  --teal-soft: rgba(30, 216, 200, 0.12);
  --menu-bg: #1a1e2a;
  --input-bg: #131722;
  --input-border: #2e3548;
  --day-hover: #242a39;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --fiq-hero: radial-gradient(120% 160% at 100% 0%, rgba(30,216,200,.16) 0%, transparent 55%), linear-gradient(160deg, #161b2c 0%, #1c2238 60%, #222a45 100%);
}
[data-theme="dark"] body { background: #10131b; }

/* Cards: raised surface, hairline border, soft shadow */
[data-theme="dark"] .panel, [data-theme="dark"] .card, [data-theme="dark"] #dayEntry.top-card,
[data-theme="dark"] .master-ro-card, [data-theme="dark"] .carry-in-ro-card, [data-theme="dark"] header.top {
  background: var(--card) !important; border-color: rgba(255,255,255,.07) !important; box-shadow: 0 8px 24px rgba(0,0,0,.35) !important;
}
[data-theme="dark"] .panel.top-card, [data-theme="dark"] #payPeriodCard, [data-theme="dark"] #payPeriodStatsCard, [data-theme="dark"] #dayEntry.top-card,
[data-theme="dark"] .card.master-ro-card, [data-theme="dark"] .card.carry-in-ro-card { border-color: rgba(255,255,255,.07) !important; }

/* Foreman IQ heroes: indigo-navy instead of teal-blue, so they sit with the cards */
[data-theme="dark"] .dms-hero, [data-theme="dark"] .tha-hero, [data-theme="dark"] .ppl-hero, [data-theme="dark"] #dateTotalsSubHeaderBar[data-hero],
[data-theme="dark"] #headerClockWeatherWidget, [data-theme="dark"] .pp-gauge, [data-theme="dark"] #dayEntry .jc-head,
[data-theme="dark"] .master-ro-card .ro-card-header, [data-theme="dark"] .carry-in-ro-card .ro-card-header,
[data-theme="dark"] .av-remind, [data-theme="dark"] #statsBody.ps-x > .stat:nth-child(5), [data-theme="dark"] .dms-x .dms-stats > div {
  background: var(--fiq-hero) !important; box-shadow: none;
}
[data-theme="dark"] #headerClockWeatherWidget, [data-theme="dark"] #dateTotalsSubHeaderBar[data-hero] { border: 1px solid rgba(255,255,255,.06) !important; }

/* Inputs */
[data-theme="dark"] input, [data-theme="dark"] select, [data-theme="dark"] textarea { background: var(--input-bg) !important; border-color: var(--input-border) !important; color: var(--ink) !important; }
[data-theme="dark"] input::placeholder, [data-theme="dark"] textarea::placeholder { color: #5f687d !important; }

/* Primary buttons: Sleeper-style bright pill on dark */
[data-theme="dark"] .solid-deep, [data-theme="dark"] .fd-main { background: var(--teal-deep) !important; border-color: var(--teal-deep) !important; color: #0b1a1f !important; font-weight: 800; }
[data-theme="dark"] .ghost, [data-theme="dark"] .mini, [data-theme="dark"] .header-ctrl-btn { background: #222838 !important; border-color: rgba(255,255,255,.1) !important; color: var(--ink) !important; }

/* Rows and tiles inside cards */
[data-theme="dark"] .stat { border-color: var(--line) !important; }
[data-theme="dark"] #statsBody.ps-x > .stat:nth-child(-n+4), [data-theme="dark"] .av-empty, [data-theme="dark"] .av-facts > * { background: #141824 !important; border-color: rgba(255,255,255,.06) !important; }
[data-theme="dark"] #potentialMoneyEarnedBox { background: #141824 !important; border-color: rgba(30,216,200,.25) !important; }
[data-theme="dark"] #potentialMoneyEarnedBox * { color: var(--ink) !important; }
[data-theme="dark"] #potentialMoneyEarnedBox span[class*="text-"], [data-theme="dark"] #potentialMoneyEarnedBox small { color: var(--muted) !important; }
[data-theme="dark"] .recall-carry-btn { background: rgba(245,158,11,.12) !important; color: #fbbf24 !important; border-color: rgba(245,158,11,.35) !important; }
[data-theme="dark"] .wb-meter-track { background: rgba(255,255,255,.07); }

/* Calendar */
[data-theme="dark"] .day.in-period { background: #222838 !important; border-color: rgba(255,255,255,.08) !important; }
[data-theme="dark"] .day.is-today { background: var(--teal-deep) !important; color: #0b1a1f !important; border-color: var(--teal-deep) !important; }

/* Logo reads on dark */
[data-theme="dark"] #headerBrandSlot img { content: url("../assets/Tech%20Hour%20Tracking%20Mountain%20Light.png?v=2"); }

/* Holding Bin action buttons */
[data-theme="dark"] #holdingBinCard button:not(.solid-deep) { background: #222838 !important; color: var(--ink) !important; border-color: rgba(255,255,255,.1) !important; }

/* ==========================================================================
   High contrast, Linear-inspired: true black, near-black cards with hairline
   borders, white type, grey secondary, white pill buttons, no gradients or
   glow. Status colors stay vivid for glanceability from the roll cart.
   ========================================================================== */
[data-theme="high-contrast"] {
  --paper: #000000; --card: #0d0e10; --ink: #ffffff; --muted: #a1a6b0; --line: #26282d;
  --teal-deep: #ffffff; --teal: #ffffff; --teal-soft: rgba(255,255,255,.08);
  --input-bg: #000000; --input-border: #3a3d44; --menu-bg: #0d0e10; --day-hover: #1a1b1f;
  --hc-surface: #0d0e10; --hc-raised: #16171a; --hc-border: #26282d;
}
[data-theme="high-contrast"] body { background: #000 !important; color: #fff; }

/* Cards and every Foreman IQ hero become flat near-black panels with a hairline border */
[data-theme="high-contrast"] .panel, [data-theme="high-contrast"] .card, [data-theme="high-contrast"] #dayEntry.top-card,
[data-theme="high-contrast"] header.top, [data-theme="high-contrast"] .master-ro-card, [data-theme="high-contrast"] .carry-in-ro-card {
  background: var(--hc-surface) !important; color: #fff !important; border: 1px solid var(--hc-border) !important; box-shadow: none !important;
}
[data-theme="high-contrast"] .dms-hero, [data-theme="high-contrast"] .tha-hero, [data-theme="high-contrast"] .ppl-hero, [data-theme="high-contrast"] #dateTotalsSubHeaderBar[data-hero],
[data-theme="high-contrast"] #headerClockWeatherWidget, [data-theme="high-contrast"] .pp-gauge, [data-theme="high-contrast"] #dayEntry .jc-head,
[data-theme="high-contrast"] .master-ro-card .ro-card-header, [data-theme="high-contrast"] .carry-in-ro-card .ro-card-header, [data-theme="high-contrast"] .av-remind,
[data-theme="high-contrast"] #statsBody.ps-x > .stat:nth-child(5), [data-theme="high-contrast"] .dms-x .dms-stats > div {
  background: var(--hc-raised) !important; border: 1px solid var(--hc-border) !important; box-shadow: none !important;
}
[data-theme="high-contrast"] .dms-hero::after, [data-theme="high-contrast"] .tha-hero::after, [data-theme="high-contrast"] .ppl-hero::after, [data-theme="high-contrast"] #dateTotalsSubHeaderBar[data-hero]::after,
[data-theme="high-contrast"] #headerClockWeatherWidget::after, [data-theme="high-contrast"] .pp-gauge::after, [data-theme="high-contrast"] #dayEntry .jc-head::after,
[data-theme="high-contrast"] .ro-card-header::after, [data-theme="high-contrast"] .av-remind::after { display: none !important; }
[data-theme="high-contrast"] .master-ro-card .ro-card-header, [data-theme="high-contrast"] .carry-in-ro-card .ro-card-header, [data-theme="high-contrast"] #dayEntry .jc-head { border-width: 0 0 1px !important; }

/* Type: white primary, grey secondary; labels lose the cyan */
[data-theme="high-contrast"] .kicker, [data-theme="high-contrast"] .chips-title, [data-theme="high-contrast"] #weekday, [data-theme="high-contrast"] .hc-date,
[data-theme="high-contrast"] .dms-hero-eyebrow, [data-theme="high-contrast"] .tha-fiq-eyebrow, [data-theme="high-contrast"] .ppl-eyebrow,
[data-theme="high-contrast"] .ro-card-header span[style*="color: #64748b"], [data-theme="high-contrast"] .pp-ring-sub, [data-theme="high-contrast"] #dayChips .chip,
[data-theme="high-contrast"] #statsBody.ps-x > .stat span, [data-theme="high-contrast"] .hc-fc b { color: #a1a6b0 !important; fill: #a1a6b0; }
[data-theme="high-contrast"] .ro-line-item, [data-theme="high-contrast"] .ro-line-item span:not([class*="bg-"]):not(.status-pill),
[data-theme="high-contrast"] .carry-line-item, [data-theme="high-contrast"] .carry-line-item span:not([class*="bg-"]):not(.status-pill),
[data-theme="high-contrast"] #periodRangeSubtitle, [data-theme="high-contrast"] #statsPeriodTitle, [data-theme="high-contrast"] .jc-hrs { color: #fff !important; }
[data-theme="high-contrast"] .ro-line-item span[style*="#64748b"], [data-theme="high-contrast"] .carry-line-item span[style*="#64748b"] { color: #a1a6b0 !important; }
[data-theme="high-contrast"] .ro-line-item span[style*="brand-red"], [data-theme="high-contrast"] .ro-line-item span[style*="#be123c"], [data-theme="high-contrast"] .ro-line-item span[style*="#dc2626"] { color: #ff5c5c !important; }

/* Buttons: white pill primary, outlined secondary */
[data-theme="high-contrast"] .solid-deep, [data-theme="high-contrast"] .solid, [data-theme="high-contrast"] .fd-main, [data-theme="high-contrast"] #dayEntry #addLine,
[data-theme="high-contrast"] .view-pill-btn.active, [data-theme="high-contrast"] .dms-x .fd-actions .solid, [data-theme="high-contrast"] .av-remind-btn {
  background: #fff !important; color: #000 !important; border: 1px solid #fff !important; box-shadow: none !important; border-radius: 999px; font-weight: 700;
}
[data-theme="high-contrast"] .ghost, [data-theme="high-contrast"] .mini, [data-theme="high-contrast"] .header-ctrl-btn, [data-theme="high-contrast"] #holdingBinCard button:not(.solid-deep),
[data-theme="high-contrast"] .view-switcher-pill, [data-theme="high-contrast"] .recall-carry-btn {
  background: transparent !important; color: #fff !important; border: 1px solid #3a3d44 !important; box-shadow: none !important;
}
[data-theme="high-contrast"] .tha-fiq-mark { background: #fff !important; color: #000 !important; }
[data-theme="high-contrast"] .tha-fiq-mark::before { background: #000; box-shadow: none; }
[data-theme="high-contrast"] .hp-avatar { background: #fff; color: #000; box-shadow: none; }

/* Tiles and rows */
[data-theme="high-contrast"] #statsBody.ps-x > .stat:nth-child(-n+4), [data-theme="high-contrast"] .av-empty, [data-theme="high-contrast"] .av-facts > *, [data-theme="high-contrast"] .hc-fc,
[data-theme="high-contrast"] #dayChips .chip, [data-theme="high-contrast"] #potentialMoneyEarnedBox { background: #000 !important; border: 1px solid var(--hc-border) !important; }
[data-theme="high-contrast"] #potentialMoneyEarnedBox * { color: #fff !important; }
[data-theme="high-contrast"] input, [data-theme="high-contrast"] select, [data-theme="high-contrast"] textarea { background: #000 !important; color: #fff !important; border: 1px solid #3a3d44 !important; }
[data-theme="high-contrast"] input:focus, [data-theme="high-contrast"] select:focus, [data-theme="high-contrast"] textarea:focus { border-color: #fff !important; box-shadow: 0 0 0 2px rgba(255,255,255,.25) !important; }

/* Calendar: outlined period days, solid white today */
[data-theme="high-contrast"] .day.in-period { background: transparent !important; color: #fff !important; border: 1px solid #3a3d44 !important; }
[data-theme="high-contrast"] .day.is-today { background: #fff !important; color: #000 !important; border-color: #fff !important; }
[data-theme="high-contrast"] .day.on { border: 2px solid #fff !important; box-shadow: none !important; }

/* Status stays vivid */
[data-theme="high-contrast"] .wb-meter-track { background: #1f2024; }
[data-theme="high-contrast"] .pp-ring-track { stroke: #1f2024; }
[data-theme="high-contrast"] #headerBrandSlot img { content: url("../assets/Tech%20Hour%20Tracking%20Mountain%20Light.png?v=2"); }
html[data-theme="high-contrast"] #dateTotalsSubHeaderBar[data-hero] #weekday, html[data-theme="high-contrast"] #dateTotalsSubHeaderBar[data-hero] .chips-title,
html[data-theme="high-contrast"] #dayEntry .jc-head .kicker, html[data-theme="high-contrast"] #shopDigitalClock .hc-date,
html[data-theme="high-contrast"] .ro-card-header span[style*="color: #64748b"], html[data-theme="high-contrast"] #dmsAuditorCard .kicker,
html[data-theme="high-contrast"] .hc-fc b { color: #a1a6b0 !important; }
html[data-theme="high-contrast"] #dateTotalsSubHeaderBar[data-hero] .view-pill-btn.active { background: #fff !important; color: #000 !important; }
html[data-theme="high-contrast"] #dateTotalsSubHeaderBar[data-hero] .view-switcher-pill { background: transparent !important; border: 1px solid #3a3d44 !important; }
html[data-theme="high-contrast"] #payPeriodCard, html[data-theme="high-contrast"] #payPeriodStatsCard, html[data-theme="high-contrast"] .panel.top-card { border-color: var(--hc-border) !important; }
html[data-theme="high-contrast"] #dateTotalsSubHeaderBar[data-hero] #dayChips .chip.short { border-color: #ff5c5c !important; }

/* ==========================================================================
   Calendar in the Foreman IQ palette (light). Dark and high contrast keep their own blocks.
   ========================================================================== */
.top-card-body:has(> .cal-head.cal-x) { overflow: visible; }
.cal-head.cal-x { position: relative; isolation: isolate; margin: -16px -18px 10px -16px; padding: 12px 16px; border-radius: 17px 17px 0 0; color: #fff;
  background: radial-gradient(120% 160% at 100% 0%, rgba(14,165,233,.28) 0%, transparent 55%), linear-gradient(160deg, #0b1f33 0%, #12324d 60%, #1b4864 100%); }
.cal-head.cal-x::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .3; border-radius: inherit;
  background-image: linear-gradient(rgba(125,211,252,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(125,211,252,.12) 1px, transparent 1px); background-size: 18px 18px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 75%); mask-image: linear-gradient(90deg, transparent, #000 75%); }
.cal-head.cal-x .month { color: #fff !important; font-family: var(--font-display); font-weight: 800; letter-spacing: -.01em; }
.cal-head.cal-x button { background: rgba(255,255,255,.08) !important; border: 1px solid rgba(255,255,255,.22) !important; color: #fff !important; border-radius: 999px !important; }
.cal-head.cal-x button:hover { border-color: #7dd3fc !important; }
.dow span { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; color: #2563eb; }

html:not([data-theme="dark"]):not([data-theme="high-contrast"]) #calendar .day { border-radius: 10px; }
html:not([data-theme="dark"]):not([data-theme="high-contrast"]) #calendar .day.in-period { background: rgba(37,99,235,.07) !important; border: 1px solid rgba(37,99,235,.16) !important; color: #0f172a !important; }
html:not([data-theme="dark"]):not([data-theme="high-contrast"]) #calendar .day.in-period:hover { background: rgba(37,99,235,.14) !important; border-color: rgba(37,99,235,.35) !important; }
html:not([data-theme="dark"]):not([data-theme="high-contrast"]) #calendar .day.outside-period { color: #94a3b8 !important; opacity: 1; }
html:not([data-theme="dark"]):not([data-theme="high-contrast"]) #calendar .day.is-today { background: #fff !important; color: #0f172a !important; border: 2px solid #0ea5e9 !important; box-shadow: 0 0 0 3px rgba(14,165,233,.18) !important; font-weight: 800 !important; }
html:not([data-theme="dark"]):not([data-theme="high-contrast"]) #calendar .day.on, html:not([data-theme="dark"]):not([data-theme="high-contrast"]) #calendar .day.is-today.on {
  background: linear-gradient(135deg, #2563eb, #0ea5e9) !important; color: #fff !important; border: 1px solid transparent !important; box-shadow: 0 6px 14px rgba(37,99,235,.3) !important; font-weight: 800 !important; }
html:not([data-theme="dark"]):not([data-theme="high-contrast"]) #calendar .day.is-today.on { box-shadow: 0 0 0 3px rgba(14,165,233,.3), 0 6px 14px rgba(37,99,235,.3) !important; }
#calendar .day.has-unreconciled::after, #calendar .day.has:not(.has-reconciled)::after { background: #f59e0b !important; box-shadow: none !important; }
#calendar .day.has-reconciled::after { background: #22c55e !important; box-shadow: none !important; }
#calendar .day.on::after { box-shadow: 0 0 0 1.5px #fff !important; }

.cal-legend .cl-sw { display: inline-block; flex: none; }
.cal-legend .cl-period { width: 12px; height: 12px; border-radius: 4px; background: rgba(37,99,235,.1); border: 1px solid rgba(37,99,235,.3); }
.cal-legend .cl-paid, .cal-legend .cl-open { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; }
.cal-legend .cl-open { background: #f59e0b; }
html:not([data-theme="dark"]):not([data-theme="high-contrast"]) #returnTodayBtn { border-radius: 999px !important; border: 1px solid rgba(37,99,235,.35) !important; color: #1d4ed8 !important; background: #fff !important; }

[data-theme="dark"] .cal-head.cal-x { background: var(--fiq-hero) !important; }
[data-theme="dark"] .dow span { color: #1ed8c8; }
[data-theme="dark"] #calendar .day.on { background: linear-gradient(135deg, #2563eb, #0ea5e9) !important; color: #fff !important; border-color: transparent !important; }
[data-theme="high-contrast"] .cal-head.cal-x { background: var(--hc-raised) !important; border-bottom: 1px solid var(--hc-border); }
[data-theme="high-contrast"] .cal-head.cal-x::after { display: none; }
[data-theme="high-contrast"] .dow span { color: #a1a6b0; }
[data-theme="high-contrast"] .cal-head.cal-x button { border-color: #3a3d44 !important; background: transparent !important; }

/* Calendar collapse chevron (js/ui/calendar-collapse.js) */
.cal-mid { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.cal-head.cal-x .cal-collapse { width: 26px !important; height: 20px !important; padding: 0; display: inline-flex; align-items: center; justify-content: center; background: transparent !important; border: 0 !important; color: #7dd3fc !important; cursor: pointer; transition: transform .2s ease; }
.cal-head.cal-x .cal-collapse:hover { color: #fff !important; }
.cal-head.cal-x .cal-collapse:focus-visible { outline: 2px solid #7dd3fc; outline-offset: 2px; border-radius: 6px; }
.cal-collapsed .cal-collapse { transform: rotate(-90deg); }
.cal-collapsed .dow, .cal-collapsed #calendar, .cal-collapsed .cal-legend { display: none !important; }
.cal-collapsed .cal-head.cal-x { margin-bottom: -16px; border-radius: 17px; }
[data-theme="high-contrast"] .cal-head.cal-x .cal-collapse { color: #a1a6b0 !important; }
@media (prefers-reduced-motion: reduce) { .cal-head.cal-x .cal-collapse { transition: none; } }
.panel.cal-collapsed, .panel.cal-collapsed .top-card-body { min-height: 0 !important; height: auto !important; flex: none !important; }

/* Bring in my hour sheet: same Foreman IQ blue gradient as Add Line (light and dark) */
html:not([data-theme="high-contrast"]) #fdOpenImportBtn, html:not([data-theme="high-contrast"]) #avRemindBtn {
  background: linear-gradient(135deg, #2563eb, #0ea5e9) !important; border-color: transparent !important; color: #fff !important;
  font-weight: 800; letter-spacing: .01em; box-shadow: 0 8px 18px rgba(37,99,235,.25) !important; border-radius: 999px !important;
}
html:not([data-theme="high-contrast"]) #fdOpenImportBtn:hover { filter: brightness(1.06); }

/* Weather alert companion: matches the clock capsule; sits below it on narrow screens */
#weatherImminentAlertBlock.weather-alert-companion { border-radius: 14px; padding: 8px 12px; color: #e2e8f0 !important; border: 1px solid rgba(125,211,252,.25) !important; border-left-width: 4px !important;
  background: linear-gradient(160deg, #0b1f33 0%, #12324d 100%) !important; box-shadow: 0 10px 24px rgba(11,31,51,.2) !important; }
#weatherImminentAlertBlock.alert-rain { border-left-color: #38bdf8 !important; }
#weatherImminentAlertBlock.alert-snow { border-left-color: #a5b4fc !important; }
#weatherImminentAlertBlock.alert-storm { border-left-color: #fbbf24 !important; }
#weatherImminentAlertBlock .weather-alert-dismiss-btn { background: transparent; border: 0; color: #a5b4c8; font-size: 16px; cursor: pointer; margin-left: 4px; }
[data-theme="dark"] #weatherImminentAlertBlock.weather-alert-companion { background: var(--fiq-hero) !important; }
[data-theme="high-contrast"] #weatherImminentAlertBlock.weather-alert-companion { background: var(--hc-raised) !important; border-color: var(--hc-border) !important; }
@media (max-width: 1100px) {
  #headerClockWeatherNav { flex-direction: column; gap: 8px; }
  #weatherImminentAlertBlock { position: static !important; transform: none !important; left: auto !important; white-space: normal !important; }
}
@media (min-width: 1101px) {
  #headerClockWeatherNav { gap: 10px; }
  #weatherImminentAlertBlock { position: static !important; transform: none !important; left: auto !important; max-width: 250px; white-space: normal !important; }
  #weatherImminentAlertBlock .weather-alert-content div { white-space: normal !important; }
}

/* Logo: about 20% larger */
#headerBrandSlot img { height: 76px !important; max-height: 76px !important; }
@media (max-width: 640px) { #headerBrandSlot img { height: 68px !important; max-height: 68px !important; } }

/* ==========================================================================
   Marketing page: same layout and copy, new Foreman IQ palette.
   Flat navy panels become the Foreman IQ gradient with the faint grid;
   flat blue buttons become the blue gradient pill used in the app.
   ========================================================================== */
#marketingView { --fiq-grad: radial-gradient(120% 140% at 100% 0%, rgba(14,165,233,.28) 0%, transparent 55%), linear-gradient(160deg, #0b1f33 0%, #12324d 60%, #1b4864 100%);
  --fiq-grid: linear-gradient(rgba(125,211,252,.09) 1px, transparent 1px), linear-gradient(90deg, rgba(125,211,252,.09) 1px, transparent 1px);
  --fiq-pill: linear-gradient(135deg, #2563eb, #0ea5e9); }
#marketingView .ah-stage, #marketingView .oa-result, #marketingView .hv-dash-bar, #marketingView .hv-dms, #marketingView #dealership,
#marketingView .ws-card.is-you, #marketingView #closing, #marketingView .hw-phone, #marketingView .hw-total {
  background: var(--fiq-grid), var(--fiq-grad) !important; background-size: 24px 24px, 24px 24px, auto, auto !important;
}
#marketingView #dealership, #marketingView #closing { background-size: 32px 32px, 32px 32px, auto, auto !important; }
#marketingView .hv-dash-bar { background-size: 18px 18px, 18px 18px, auto, auto !important; }
#marketingView .ah-stage { box-shadow: 0 24px 60px rgba(11,31,51,.3); }

/* Active toggles and the active "How it works" step */
#marketingView [data-audience-pick][aria-pressed="true"], #marketingView [data-ea-role][aria-pressed="true"], #marketingView .st-tabs button[aria-pressed="true"],
#marketingView .hw-steps button[aria-pressed="true"] { background: var(--fiq-grad) !important; color: #fff !important; border-color: transparent !important; }
#marketingView .hw-steps button[aria-pressed="true"] b { background: var(--fiq-pill) !important; color: #fff !important; }

/* Primary buttons: blue gradient pill */
#marketingView .ah-nav-solid, #marketingView .ah-run, #marketingView .ah-cta, #marketingView .oa-next, #marketingView #enterpriseInquireBtn,
#marketingView #proPlanBtn, #marketingView .cl-primary, #marketingView .ea-send, #marketingView .hw-btn, #marketingView .ea-plan-pro {
  background: var(--fiq-pill) !important; border-color: transparent !important; color: #fff !important; border-radius: 999px !important;
  box-shadow: 0 10px 22px rgba(37,99,235,.26) !important;
}
#marketingView .ah-nav-solid:hover, #marketingView .ah-run:hover, #marketingView .cl-primary:hover, #marketingView #proPlanBtn:hover { filter: brightness(1.06); }
#marketingView .ah.is-done .ah-run { background: #fff !important; color: var(--ah-ink) !important; border: 1px solid #cbd5e1 !important; box-shadow: none !important; }
#marketingView .absolute.-top-3\.5 { background: var(--fiq-grad) !important; }

/* Pro card and the "sold" pill accent */
#marketingView .dl-end.is-sold { background: var(--fiq-pill) !important; }
#marketingView .st-msg.is-tech { background: var(--fiq-pill) !important; }

/* Marketing: each audience sees only its own sections */
#marketingView[data-audience="tech"] #dealership, #marketingView[data-audience="tech"] #enterprise { display: none !important; }
#marketingView[data-audience="shop"] #whoSees, #marketingView[data-audience="shop"] #ownAudit, #marketingView[data-audience="shop"] #pricing { display: none !important; }
#marketingView .ah-nav-switch { color: #2563eb !important; font-weight: 700; }

/* First-run setup wizard (js/ui/setup-wizard.js): the Settings window, one step at a time */
#wzHead, #wzFoot { display: none; }
#settingsModal.wz-on #wzHead { display: block; position: relative; isolation: isolate; margin: -24px -24px 18px; padding: 20px 24px 18px; color: #e2e8f0; border-radius: 18px 18px 0 0;
  background: radial-gradient(120% 160% at 100% 0%, rgba(14,165,233,.28) 0%, transparent 55%), linear-gradient(160deg, #0b1f33 0%, #12324d 60%, #1b4864 100%); }
#settingsModal.wz-on #wzHead::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .3; border-radius: inherit;
  background-image: linear-gradient(rgba(125,211,252,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(125,211,252,.12) 1px, transparent 1px); background-size: 20px 20px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 75%); mask-image: linear-gradient(90deg, transparent, #000 75%); }
.wz-top { display: flex; justify-content: space-between; align-items: center; }
.wz-count { font: 700 11px/1 var(--font-body, system-ui); letter-spacing: .14em; text-transform: uppercase; color: #7dd3fc; }
#wzTitle { margin: 12px 0 4px; color: #fff; font: 800 clamp(22px, 3vw, 28px)/1.15 var(--font-display, system-ui); letter-spacing: -.01em; }
#wzSub { margin: 0; color: #a5b4c8; font-size: 13.5px; line-height: 1.5; }
.wz-bar { height: 4px; margin-top: 14px; border-radius: 999px; background: rgba(255,255,255,.12); overflow: hidden; }
.wz-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2563eb, #0ea5e9); transition: width .3s ease; }
#settingsModal.wz-on #wzFoot { display: block; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.wz-note { min-height: 18px; margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.wz-note.is-warn { color: #b45309; font-weight: 600; }
.wz-btns { display: flex; align-items: center; gap: 10px; }
.wz-gap { flex: 1; }
.wz-skip { background: none; border: 0; color: var(--muted); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; padding: 6px 2px; }
.wz-next { padding: 10px 22px; border: 0; border-radius: 999px; color: #fff; font-weight: 800; cursor: pointer; background: linear-gradient(135deg, #2563eb, #0ea5e9); box-shadow: 0 8px 18px rgba(37,99,235,.25); }
.wz-next:disabled { opacity: .6; cursor: default; }
#settingsModal.wz-on #settingsForm [data-wz-steps="none"] { display: none !important; }
#settingsForm[data-wz="1"] [data-wz-steps]:not([data-wz-steps~="1"]),
#settingsForm[data-wz="2"] [data-wz-steps]:not([data-wz-steps~="2"]),
#settingsForm[data-wz="3"] [data-wz-steps]:not([data-wz-steps~="3"]),
#settingsForm[data-wz="4"] [data-wz-steps]:not([data-wz-steps~="4"]),
#settingsForm[data-wz="5"] [data-wz-steps]:not([data-wz-steps~="5"]) { display: none !important; }
#settingsModal.wz-on .sheet > :not(#wzHead):not(#wzFoot):not(form):not(#settingsForm) { display: none !important; }
[data-theme="dark"] #settingsModal.wz-on #wzHead { background: var(--fiq-hero) !important; }
[data-theme="high-contrast"] #settingsModal.wz-on #wzHead { background: var(--hc-raised) !important; border-bottom: 1px solid var(--hc-border); }
[data-theme="high-contrast"] #settingsModal.wz-on #wzHead::after { display: none; }
[data-theme="high-contrast"] .wz-next { background: #fff !important; color: #000 !important; box-shadow: none; }

/* Rates row: line up all four inputs (the wage's "Stays on this device" note hangs below instead of pushing its box up) */
#settingsForm div:has(> label > input[name="rateCP"]) { align-items: start !important; }
#settingsForm div:has(> label > input[name="rateCP"]) > label > span:first-child { min-height: 2.25rem; white-space: normal !important; }
.wz-why { margin: 10px 0 0; font-size: 12.5px; line-height: 1.45; color: #cbd5e1; }
.wz-why b { color: #7dd3fc; }
[data-theme="high-contrast"] .wz-why b { color: #fff; }

/* "Meet your foreman" intro (js/ui/foreman-intro.js) */
.fiq-intro { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(6,12,24,.62); backdrop-filter: blur(3px); animation: fiqFade .2s ease; }
.fiq-intro-card { width: 100%; max-width: 620px; max-height: calc(100vh - 32px); overflow-y: auto; border-radius: 22px; background: var(--card, #fff); color: var(--ink); box-shadow: 0 30px 80px rgba(0,0,0,.4); animation: fiqRise .28s ease; }
.fiq-intro-hero { position: relative; isolation: isolate; padding: 24px 26px 22px; color: #e2e8f0;
  background: radial-gradient(120% 160% at 100% 0%, rgba(14,165,233,.3) 0%, transparent 55%), linear-gradient(160deg, #0b1f33 0%, #12324d 60%, #1b4864 100%); }
.fiq-intro-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .3;
  background-image: linear-gradient(rgba(125,211,252,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(125,211,252,.12) 1px, transparent 1px); background-size: 20px 20px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 75%); mask-image: linear-gradient(90deg, transparent, #000 75%); }
.fiq-intro-top { display: flex; justify-content: space-between; align-items: center; }
.fiq-intro-plan { padding: 3px 10px; border-radius: 999px; background: #fde68a; color: #713f12; font: 800 11px/1.2 var(--font-body, system-ui); letter-spacing: .08em; text-transform: uppercase; }
.fiq-intro-avatar { width: 56px; height: 56px; margin: 18px 0 10px; border-radius: 16px; display: flex; align-items: center; justify-content: center; color: #fff; font: 900 20px/1 'IBM Plex Mono', ui-monospace, monospace;
  background: linear-gradient(135deg, #2563eb, #0ea5e9); box-shadow: 0 0 0 4px rgba(14,165,233,.2), 0 12px 24px rgba(37,99,235,.35); }
.fiq-intro-hero h2 { margin: 0 0 8px; color: #fff; font: 800 clamp(24px, 3.6vw, 30px)/1.15 var(--font-display, system-ui); letter-spacing: -.01em; }
.fiq-intro-hero p { margin: 0; color: #cbd5e1; font-size: 14.5px; line-height: 1.55; }
.fiq-intro-body { padding: 20px 26px 6px; }
.fiq-intro-body h3 { margin: 0 0 6px; font: 800 17px/1.3 var(--font-display, system-ui); color: var(--ink); }
.fiq-intro-lede, .fiq-intro-profile { margin: 0 0 12px; font-size: 13.5px; line-height: 1.55; color: var(--muted); }
.fiq-intro-fields, .fiq-intro-pro { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.fiq-intro-fields li, .fiq-intro-pro li { display: grid; grid-template-columns: minmax(130px, 34%) 1fr; gap: 10px; padding: 9px 12px; border-radius: 12px; background: var(--paper, #f4f5f7); border: 1px solid var(--line); font-size: 13px; line-height: 1.45; }
.fiq-intro-fields b, .fiq-intro-pro b { color: var(--ink); }
.fiq-intro-fields span, .fiq-intro-pro span { color: var(--muted); }
.fiq-intro-pro li { border-left: 3px solid #0ea5e9; }
.fiq-intro-up { margin: 0 0 14px; padding: 12px 14px; border-radius: 12px; border: 1px dashed rgba(37,99,235,.4); background: rgba(37,99,235,.05); font-size: 13.5px; line-height: 1.5; color: var(--ink); }
.fiq-intro-foot { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 10px; padding: 14px 26px 20px; background: var(--card, #fff); border-top: 1px solid var(--line); }
.fiq-intro-go, .fiq-intro-ghost { padding: 11px 22px; border-radius: 999px; font: 800 14px/1 var(--font-body, system-ui); cursor: pointer; }
.fiq-intro-go { border: 0; color: #fff; background: linear-gradient(135deg, #2563eb, #0ea5e9); box-shadow: 0 8px 18px rgba(37,99,235,.28); }
.fiq-intro-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
@keyframes fiqFade { from { opacity: 0; } } @keyframes fiqRise { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@media (prefers-reduced-motion: reduce) { .fiq-intro, .fiq-intro-card { animation: none; } }
@media (max-width: 520px) { .fiq-intro-fields li, .fiq-intro-pro li { grid-template-columns: 1fr; gap: 2px; } .fiq-intro-foot { flex-direction: column-reverse; } .fiq-intro-go, .fiq-intro-ghost { width: 100%; } }
[data-theme="dark"] .fiq-intro-hero { background: var(--fiq-hero) !important; }
[data-theme="high-contrast"] .fiq-intro-hero { background: var(--hc-raised) !important; } [data-theme="high-contrast"] .fiq-intro-hero::after { display: none; }
[data-theme="high-contrast"] .fiq-intro-go { background: #fff; color: #000; box-shadow: none; }

/* Free accounts: paid hours typed from the DMS report (render-workbench.js manualPaidHtml) */
.wb-paid-in { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin: 0 0 8px; font-size: 12px; color: var(--muted); }
.wb-paid-in span { font-weight: 700; letter-spacing: .04em; text-transform: uppercase; font-size: 10.5px; }
.wb-paid-in input { width: 84px; padding: 6px 8px; border: 1px solid var(--input-border, #d1d5db); border-radius: 8px; background: var(--input-bg, #fff); color: var(--ink); font: 700 14px/1 'IBM Plex Mono', ui-monospace, monospace; text-align: right; }
.wb-paid-in input:focus { outline: none; border-color: #0ea5e9; box-shadow: 0 0 0 3px rgba(14,165,233,.2); }
.wb-paid-in em { font-style: normal; font-weight: 700; color: var(--ink); }

/* Meet your foreman: simplified recap */
.fiq-intro-hero h2 { margin-top: 16px; }
.fiq-intro-list { list-style: none; margin: 4px 0 16px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; }
.fiq-intro-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 600; color: var(--ink); }
.fiq-intro-check { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; flex: none; border-radius: 50%; background: linear-gradient(135deg, #2563eb, #0ea5e9); color: #fff; font-size: 11px; font-weight: 900; }
.fiq-intro-note { margin: 0 0 12px; padding: 12px 14px; border-radius: 12px; background: var(--paper, #f4f5f7); border: 1px solid var(--line); font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.fiq-intro-note b { color: var(--ink); }
.fiq-intro-up { margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.fiq-intro-card { max-width: 560px; }
@media (max-width: 520px) { .fiq-intro-list { grid-template-columns: 1fr; } }
[data-theme="high-contrast"] .fiq-intro-check { background: #fff; color: #000; }

/* Pay Period & Earnings rows: the zero/positive/negative text classes, readable on dark and high contrast */
[data-theme="high-contrast"] #periodBody .text-slate-900, [data-theme="high-contrast"] #periodBody .text-slate-700 { color: #ffffff !important; }
[data-theme="high-contrast"] #periodBody .text-rose-700 { color: #ff5c5c !important; }
[data-theme="high-contrast"] #periodBody .text-amber-600 { color: #fbbf24 !important; }
[data-theme="dark"] #periodBody .text-slate-900, [data-theme="dark"] #periodBody .text-slate-700 { color: var(--ink) !important; }
[data-theme="dark"] #periodBody .text-rose-700 { color: #fb7185 !important; }
[data-theme="dark"] #periodBody .text-amber-600 { color: #fbbf24 !important; }

/* Potential Money Earned: keep the label beside the figure, never under it */
#potentialMoneyEarnedBox { display: flex !important; align-items: center; justify-content: space-between; gap: 12px; }
#potentialMoneyEarnedBox > :first-child { flex: 1 1 auto; min-width: 0; }
#potentialMoneyEarnedBox #checkGross { flex: none; white-space: nowrap; }

/* 30-day free trial (js/ui/trial-offer.js) */
.trial-fine { flex-basis: 100%; margin: 10px 0 0; font-size: 11.5px; line-height: 1.45; color: var(--muted); text-align: center; }
.trial-badge { display: inline-flex; align-items: center; margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: linear-gradient(135deg, #2563eb, #0ea5e9); color: #fff; font: 800 10.5px/1.3 var(--font-body, system-ui); letter-spacing: .04em; white-space: nowrap; }
[data-theme="high-contrast"] .trial-badge { background: #fff; color: #000; }

.fiq-intro-trial { margin: 0 0 16px; padding: 12px 14px; border-radius: 12px; border-left: 4px solid #0ea5e9; background: rgba(14,165,233,.08); font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.fiq-intro-trial b { color: var(--ink); }

/* Short-pay report (js/ui/short-pay-report.js) */
.spr-bar { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.spr { color: var(--ink); }
.spr-hero { position: relative; isolation: isolate; padding: 20px 22px; border-radius: 16px; color: #e2e8f0;
  background: radial-gradient(120% 160% at 100% 0%, rgba(14,165,233,.28) 0%, transparent 55%), linear-gradient(160deg, #0b1f33 0%, #12324d 60%, #1b4864 100%); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.spr-top { display: flex; justify-content: space-between; align-items: center; }
.spr-kind { font: 700 11px/1 var(--font-body, system-ui); letter-spacing: .14em; text-transform: uppercase; color: #7dd3fc; }
.spr-hero h2 { margin: 12px 0 14px; color: #fff; font: 800 24px/1.2 var(--font-display, system-ui); }
.spr-hero h2 span { color: #a5b4c8; font-weight: 600; }
.spr-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 16px; }
.spr-meta span { display: block; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: #7dd3fc; }
.spr-meta b { display: block; margin-top: 2px; color: #fff; font-size: 13.5px; }
.spr-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.spr-tiles > div { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper, #f4f5f7); }
.spr-tiles span { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.spr-tiles b { display: block; margin-top: 4px; font: 800 22px/1.1 'IBM Plex Mono', ui-monospace, monospace; color: var(--ink); }
.spr-tiles .is-out { border-color: rgba(225,29,72,.35); background: rgba(225,29,72,.06); }
.spr-tiles .is-out b { color: #be123c; }
.spr-clear { margin: 6px 0 14px; padding: 12px 14px; border-radius: 12px; background: rgba(34,197,94,.08); border: 1px solid rgba(34,197,94,.3); color: #166534; font-weight: 600; }
.spr-sec { margin: 0 0 16px; }
.spr-sec-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.spr-sec-head h3 { margin: 0; font: 800 16px/1.2 var(--font-display, system-ui); }
.spr-sec-head h3.is-unpaid { color: #be123c; } .spr-sec-head h3.is-short { color: #b45309; }
.spr-sec-head span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.spr-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.spr-table th { text-align: left; padding: 8px 10px; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); border-bottom: 1.5px solid var(--line); }
.spr-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.spr-table .n { text-align: right; font-family: 'IBM Plex Mono', ui-monospace, monospace; white-space: nowrap; }
.spr-table .spr-out { font-weight: 800; color: #be123c; }
.spr-sub { display: block; margin-top: 2px; font-size: 11.5px; color: var(--muted); font-family: var(--font-body, system-ui); font-weight: 400; }
.spr-note { font-style: italic; }
.spr-type { display: inline-flex; width: 22px; height: 22px; align-items: center; justify-content: center; border-radius: 50%; color: #fff; font-size: 11px; font-weight: 800; background: #15803d; }
.spr-type.t-W { background: #991b1b; } .spr-type.t-I { background: #1e40af; }
.spr-foot { margin-top: 8px; font-size: 11.5px; color: var(--muted); }
.spr-actions { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.spr-actions-left { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.spr-to { margin: 0; font-size: 12.5px; color: var(--muted); }
.spr-to b { color: var(--ink); }
.spr-notes { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; cursor: pointer; }
.spr-link { background: none; border: 0; padding: 0; color: #2563eb; font: inherit; text-decoration: underline; cursor: pointer; }
.spr-actions-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.spr-status { margin: 10px 0 0; padding: 9px 12px; border-radius: 10px; font-size: 13px; background: var(--card, #f8fafc); color: var(--ink); border: 1px solid var(--line); }
.spr-status.is-ok { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.spr-status.is-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.spr-status .spr-link { color: inherit; font-weight: 700; }
.spr-email { padding: 10px 20px; border: 0; border-radius: 999px; color: #fff; font-weight: 800; cursor: pointer; background: linear-gradient(135deg, #2563eb, #0ea5e9); box-shadow: 0 8px 18px rgba(37,99,235,.25); }
@media (max-width: 640px) { .spr-meta, .spr-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .spr-table thead { display: none; } .spr-table tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 8px 0; border-bottom: 1px solid var(--line); } .spr-table td { border: 0; padding: 2px 0; } .spr-table td:nth-child(3), .spr-table td:nth-child(4) { display: none; } .spr-actions-btns { width: 100%; } .spr-email { flex: 1; } }
@media print { .spr-tiles > div { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
[data-theme="dark"] .spr-hero { background: var(--fiq-hero) !important; }
[data-theme="high-contrast"] .spr-hero { background: var(--hc-raised) !important; border: 1px solid var(--hc-border); }
[data-theme="high-contrast"] .spr-email { background: #fff; color: #000; box-shadow: none; }
.spr-notes input[type="checkbox"] { width: 16px !important; height: 16px !important; min-height: 0 !important; padding: 0 !important; margin: 0 !important; flex: none; }
.spr-notes { flex-direction: row !important; white-space: nowrap; }

/* Short-pay tables: same column widths in both sections so every column lines up */
.spr-table { table-layout: fixed; }
.spr-table col.c-ro { width: 15%; } .spr-table col.c-job { width: 29%; } .spr-table col.c-adv { width: 18%; }
.spr-table col.c-type { width: 8%; } .spr-table col.c-n { width: 10%; }
.spr-table td, .spr-table th { overflow-wrap: anywhere; }

/* Sign-in & security (js/ui/session-security.js) */
#settingsForm:not([data-wz]) .wz-only { display: none !important; }
.sec-group { margin: 0 0 14px; padding: 0; border: 0; }
.sec-group legend { margin-bottom: 8px; font: 800 15px/1.3 var(--font-display, system-ui); color: var(--ink); }
.sec-opt { display: flex; align-items: flex-start; gap: 12px; padding: 11px 13px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--card, #fff); cursor: pointer; }
.sec-opt:has(input:checked) { border-color: #0ea5e9; box-shadow: 0 0 0 3px rgba(14,165,233,.15); }
.sec-opt input { width: 18px !important; height: 18px !important; min-height: 0 !important; margin: 2px 0 0 !important; padding: 0 !important; flex: none; accent-color: #2563eb; }
.sec-opt span { display: flex; flex-direction: column; gap: 2px; }
.sec-opt b { color: var(--ink); font-size: 14px; }
.sec-opt small { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.sec-note { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.sec-shared { margin-top: 4px; }
.sec-everywhere { margin-top: 14px; padding: 13px; border-radius: 12px; border: 1px dashed var(--line); }
.sec-everywhere p { margin: 4px 0 10px; font-size: 13px; color: var(--muted); }
.sec-btn, .sec-btn-ghost { padding: 9px 18px; border-radius: 999px; font: 800 13.5px/1 var(--font-body, system-ui); cursor: pointer; }
.sec-btn { border: 0; color: #fff; background: linear-gradient(135deg, #2563eb, #0ea5e9); }
.sec-btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.sec-warn { position: fixed; inset: 0; z-index: 100002; display: flex; align-items: center; justify-content: center; background: rgba(6,12,24,.55); padding: 16px; }
.sec-warn-card { max-width: 360px; width: 100%; padding: 20px; border-radius: 18px; background: var(--card, #fff); color: var(--ink); box-shadow: 0 24px 60px rgba(0,0,0,.4); }
.sec-warn-card b { font: 800 18px/1.2 var(--font-display, system-ui); }
.sec-warn-card p { margin: 8px 0 16px; color: var(--muted); font-size: 14px; }
.sec-warn-card div { display: flex; justify-content: flex-end; gap: 10px; }
.lv-shared { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 14px; font-size: 13px; cursor: pointer; text-align: left; }
.lv-shared input { width: 18px !important; height: 18px !important; min-height: 0 !important; margin: 2px 0 0 !important; padding: 0 !important; flex: none; accent-color: #2563eb; }
.lv-shared b { display: block; color: var(--lv-ink, var(--ink)); }
.lv-shared small { display: block; color: var(--lv-muted, var(--muted)); font-size: 12px; line-height: 1.4; }
/* Sign-in: Personal device / Shared or shop computer (required, R2) */
.lv-device { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; text-align: left; }
.lv-device legend { padding: 0; margin: 0 0 8px; font-weight: 800; font-size: 13.5px; color: var(--lv-ink, var(--ink)); }
.lv-device .lv-shared { margin: 0 0 8px; padding: 10px 12px; border: 1px solid var(--lv-line, var(--line)); border-radius: 10px; }
.lv-device .lv-shared:has(input:checked) { border-color: var(--lv-blue, #2563eb); box-shadow: 0 0 0 3px rgba(37,99,235,.14); }
.lv-device.lv-device-missing .lv-shared { border-color: #dc2626; }
.lv-device-need { margin: 2px 0 0; color: #b91c1c; font-size: 12.5px; font-weight: 700; }
.lv-action-need { margin: 8px 0 4px; text-align: center; }
/* Phone width: the marketing nav keeps a visible Technician Sign In (the ghost style is hidden there).
   Logo on the first row; the two actions share a full-width second row so neither is cut off at 320 px.
   Unlocked sites only: the public (locked) site's header is unchanged. */
@media (max-width: 620px) {
  html:not(.site-locked) #marketingView .ah-nav-inner { flex-wrap: wrap; row-gap: 8px; }
  html:not(.site-locked) #marketingView .ah-nav-actions { flex: 1 1 100%; }
  html:not(.site-locked) #marketingView .ah-nav-actions > button { flex: 1 1 0; min-width: 0; justify-content: center; }
  html:not(.site-locked) #marketingView #btnNavSignIn { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 10px; font-size: 12.5px; color: var(--ah-ink, #0f172a); border: 1px solid #cbd5e1; background: #fff; }
  html:not(.site-locked) #marketingView .ah-nav-actions .ah-nav-solid { display: inline-flex; align-items: center; font-size: 12.5px; }
}
}
[data-theme="high-contrast"] .sec-btn { background: #fff; color: #000; }

dialog.sec-warn { border: 0; padding: 16px; max-width: none; max-height: none; width: 100%; height: 100%; margin: 0; background: transparent; }
dialog.sec-warn::backdrop { background: rgba(6,12,24,.55); }
dialog.sec-warn[open] { display: flex; }

dialog.fiq-intro { border: 0; max-width: none; max-height: none; width: 100%; height: 100%; margin: 0; background: rgba(6,12,24,.62); }
dialog.fiq-intro[open] { display: flex; }
dialog.fiq-intro::backdrop { background: transparent; }

/* THT Analytics: step between pay periods from the hero (next stops at today's period). */
.tha-hero.has-pp-nav { position: relative; }
.tha-hero.has-pp-nav .tha-hero-inner { padding-left: 64px; padding-right: 64px; }
.tha-pp-step { position: absolute; top: 18px; z-index: 2;
  width: 44px; height: 44px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--tha-hero-ink) 35%, transparent);
  background: color-mix(in srgb, var(--tha-hero-ink) 10%, transparent); color: var(--tha-hero-ink);
  font-size: 28px; line-height: 1; display: grid; place-items: center; cursor: pointer; padding: 0 0 3px; }
.tha-pp-step.is-prev { left: 12px; }
.tha-pp-step.is-next { right: 12px; }
.tha-pp-step:hover:not([disabled]) { background: color-mix(in srgb, var(--tha-hero-ink) 20%, transparent); }
.tha-pp-step:focus-visible { outline: 3px solid var(--tha-hero-ink); outline-offset: 2px; }
.tha-pp-step[disabled] { opacity: .3; cursor: default; }
@media (max-width: 640px) {
  .tha-hero.has-pp-nav .tha-hero-inner { padding-left: 18px; padding-right: 18px; }
  .tha-hero.has-pp-nav .tha-eyebrow { padding: 0 34px; min-height: 44px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; text-align: center; gap: 4px 8px; }
  .tha-pp-step { width: 36px; height: 44px; font-size: 26px; top: 14px; }
  .tha-pp-step.is-prev { left: 6px; }
  .tha-pp-step.is-next { right: 6px; }
}
.tha-pp-dates { white-space: nowrap; }

/* Hour sheet page tray (collect one photo per page, then read them together). */
.hs-tray { width: min(520px, calc(100% - 32px)); max-height: calc(100dvh - 32px); overflow: auto; border: 1px solid var(--line); border-radius: 16px; padding: 20px; background: var(--paper); color: var(--ink); box-sizing: border-box; }
.hs-tray::backdrop { background: rgba(10, 14, 22, .55); }
.hs-tray h2 { margin: 0 0 4px; font-size: 19px; }
.hs-tray-help { margin: 0 0 14px; color: var(--muted); font-size: 14px; line-height: 1.45; }
.hs-tray-pages { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.hs-tray-pages li { display: grid; grid-template-columns: 56px 1fr 44px; align-items: center; gap: 12px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; }
.hs-tray-pages img, .hs-tray-doc { width: 56px; height: 72px; object-fit: cover; border-radius: 8px; background: color-mix(in srgb, var(--ink) 8%, transparent); display: grid; place-items: center; font-size: 26px; }
.hs-tray-label { font-weight: 700; font-size: 15px; display: flex; flex-direction: column; min-width: 0; }
.hs-tray-label small { font-weight: 400; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hs-tray-remove { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--ink); font-size: 22px; cursor: pointer; }
.hs-tray-full { margin: 0 0 12px; font-size: 13.5px; color: var(--muted); }
.hs-tray-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hs-tray-btn { min-height: 48px; border-radius: 12px; border: 1px solid var(--teal-deep); background: transparent; color: var(--teal-deep); font-weight: 700; font-size: 15px; cursor: pointer; }
.hs-tray-btn.is-solid { background: var(--teal-deep); color: var(--paper); }
.hs-tray-btn:disabled { opacity: .45; cursor: default; }
.hs-tray-cancel { display: block; margin: 12px auto 0; min-height: 44px; padding: 0 16px; border: 0; background: transparent; color: var(--muted); font-size: 14px; cursor: pointer; }
.hs-tray[open] { display: block !important; position: fixed; inset: 0; margin: auto; height: fit-content; }
.hs-tray > * { width: auto; }
.hs-tray .hs-tray-actions, .hs-tray .hs-tray-pages { width: 100%; }

.veh-gen-hint { margin-left: 8px; text-transform: none; letter-spacing: 0; font-size: 11.5px; font-weight: 700; color: var(--teal-deep); white-space: nowrap; }

/* Fill from VIN (fold-out under the vehicle row) */
.vin-row { margin-top: 8px; border: 1px dashed var(--line); border-radius: 10px; padding: 0 10px; }
.vin-row > summary { cursor: pointer; min-height: 36px; display: flex; align-items: center; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--teal-deep); list-style: none; }
.vin-row > summary::-webkit-details-marker { display: none; }
.vin-row > summary::before { content: "▸"; margin-right: 6px; transition: transform .15s; }
.vin-row[open] > summary::before { transform: rotate(90deg); }
.vin-body { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; padding-bottom: 8px; }
.vin-field { margin: 0; }
.vin-field input { text-transform: uppercase; font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .04em; }
.vin-go { min-height: 38px; padding: 0 16px; cursor: pointer; }
.vin-status { margin: 0 0 8px; font-size: 12.5px; color: var(--muted); }
.vin-status:empty { display: none; }
.vin-status[data-tone="ok"] { color: var(--teal-deep); }
.vin-status[data-tone="warn"] { color: var(--copper, #b45309); }
/* Clear pill on the Current Job card */
.jc-clear { min-height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 11.5px; font-weight: 700; cursor: pointer; }
.jc-clear:hover { color: var(--ink); border-color: var(--muted); }
.jc-clear { min-height: 36px; } @media (max-width: 640px) { .jc-clear { min-height: 40px; padding: 0 14px; } .vin-body { grid-template-columns: 1fr; } .vin-go { min-height: 44px; } }
.vin-field input::placeholder { text-transform: none; letter-spacing: 0; font-family: inherit; }
#dayEntry .jc-head .jc-clear { color: #e2e8f0; border-color: rgba(255,255,255,.35); background: rgba(255,255,255,.06); }
#dayEntry .jc-head .jc-clear:hover { background: rgba(255,255,255,.14); color: #fff; }
.fiq-jm-other { margin: 6px 0 0; font-size: 13.5px; line-height: 1.45; }
.tha-type-elr { font-weight: 700; color: var(--ink); } .tha-type-elr em { font-style: normal; font-weight: 500; color: var(--muted); }

/* Pay period wrap-up reminders (period-close.js) */
.period-reminder { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 0 0 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font-size: 14px; line-height: 1.45; }
.period-reminder.is-ending { border-color: #f59e0b; background: color-mix(in srgb, #f59e0b 10%, var(--paper)); }
.period-reminder.is-sheetDue { border-color: var(--teal-deep); background: color-mix(in srgb, var(--teal-deep) 8%, var(--paper)); }
.period-reminder .pr-text { flex: 1 1 320px; min-width: 0; }
.period-reminder .pr-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.period-reminder .pr-btn { min-height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--ink); font-weight: 700; font-size: 13.5px; cursor: pointer; }
.period-reminder .pr-btn.is-solid { background: var(--teal-deep); border-color: var(--teal-deep); color: var(--paper); }
@media (max-width: 640px) { .period-reminder .pr-btn { min-height: 44px; flex: 1 1 auto; } }
.recap-opt { display: inline-flex !important; align-items: center; gap: 8px; width: auto !important; font-size: 14px; margin: 0; cursor: pointer; } .recap-opt input { width: 20px !important; height: 20px !important; flex: none; margin: 0; }
.recap-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px; width: 100%; margin-top: 14px; } .recap-row > span { font-size: 12px; font-weight: 600; color: #334155; }
.set-block { display: flex; flex-direction: column; gap: 6px; width: 100%; margin-top: 18px; }
.set-block-title { font-size: 12px; font-weight: 600; color: #334155; letter-spacing: .02em; }
.set-block-help { font-size: 12px; line-height: 1.45; color: #64748b; }
.set-block-checks { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }

/* "Read it with Foreman IQ": its own row under the import status message */
.fd-ai-offer { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: -6px 0 14px; padding: 12px 14px; border: 1px solid color-mix(in srgb, #2563eb 35%, var(--line)); border-radius: 12px; background: color-mix(in srgb, #2563eb 6%, var(--paper)); }
.fd-ai-mark { color: #2563eb; font-size: 12px; }
.fd-ai-text { flex: 1 1 260px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fd-ai-text b { font-size: 14px; color: var(--ink); }
.fd-ai-text small { font-size: 12.5px; color: var(--muted); }
.fd-ai-btn { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 0; background: #2563eb; color: #fff; font-weight: 700; font-size: 13.5px; cursor: pointer; white-space: nowrap; }
.fd-ai-btn:hover { background: #1d4ed8; }
@media (max-width: 640px) { .fd-ai-btn { min-height: 44px; width: 100%; } }
.fd-ai-save { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink); font-weight: 600; font-size: 13px; cursor: pointer; } @media (max-width: 640px) { .fd-ai-save { min-height: 44px; width: 100%; } }

/* "Editing RO … Line …" badge on the dark Current Job header: readable amber pill */
#dayEntry .jc-head #editingBadge { background: #fbbf24 !important; color: #1f2937 !important; border: 1px solid #f59e0b !important; font-weight: 800; font-size: 11.5px !important; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }

/* Customer pay vs warranty card (Analytics) */
.tha-split { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.tha-split li { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.6fr) auto; gap: 10px 16px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.tha-split li.is-under { border-color: #f59e0b; background: color-mix(in srgb, #f59e0b 8%, transparent); }
.tha-split li.is-over { border-color: color-mix(in srgb, #2563eb 40%, var(--line)); }
.tha-split-name { display: flex; flex-direction: column; min-width: 0; }
.tha-split-name b { font-size: 14.5px; }
.tha-split-name span { font-size: 12.5px; color: var(--muted); }
.tha-split-nums { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13.5px; align-items: center; }
.tha-split-nums em { font-style: normal; color: var(--muted); font-size: 12px; }
.tha-split-nums i { font-style: normal; margin-right: 4px; }
.tha-split-target { color: var(--muted); }
.tha-split-verdict { font-weight: 700; font-size: 13px; white-space: nowrap; }
.tha-split li.is-under .tha-split-verdict { color: #b45309; }
@media (max-width: 640px) { .tha-split li { grid-template-columns: 1fr; } .tha-split-verdict { white-space: normal; } }

/* RTHS + RTH pairing */
.cdk-chg.is-differ { background: rgba(220, 38, 38, 0.12); color: #b91c1c; white-space: normal; max-width: 100%; }
[data-theme="dark"] .cdk-chg.is-differ { color: #fca5a5; }
.sheet-diff-mark { color: #b45309; cursor: help; margin-left: 2px; }
.sheet-diff-note { color: #b45309; font-weight: 600; }

/* VIN read on the device: model choices when the VIN narrows it to a few */
.vin-picks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.vin-pick { border: 1px solid var(--line); background: var(--paper, #fff); color: var(--ink); border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 600; cursor: pointer; min-height: 32px; }
.vin-pick:hover, .vin-pick:focus-visible { border-color: var(--teal-deep, #0f766e); outline: none; }

/* Tool Box (js/ui/tool-box.js): Foreman IQ hero + RO-card style panels, full width of the day hero */
#toolBoxView .tbx { width: 100%; max-width: none; margin: 0; padding: 0 0 24px; color: var(--ink); font-family: var(--font-sans); }
.tbx-hero { position: relative; isolation: isolate; display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap;
  margin: 0 0 16px; padding: 22px 24px; border-radius: 20px; color: #f1f5f9; box-shadow: 0 18px 40px rgba(11,31,51,.18);
  background: radial-gradient(120% 140% at 100% 0%, rgba(14,165,233,.28) 0%, transparent 55%), linear-gradient(160deg, #0b1f33 0%, #12324d 60%, #1b4864 100%); }
.tbx-hero::after, .tbx-panel-head::after, .tbx-card-head::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .35; border-radius: inherit;
  background-image: linear-gradient(rgba(125,211,252,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(125,211,252,.12) 1px, transparent 1px); background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 70%); mask-image: linear-gradient(90deg, transparent, #000 70%); }
.tbx-hero-text { flex: 1 1 380px; min-width: 0; }
.tbx-eyebrow, .tbx-panel-kicker { margin: 0; font: 600 11px/1 var(--font-sans); letter-spacing: .14em; text-transform: uppercase; color: #7dd3fc; }
.tbx-title { margin: 8px 0 6px; font-family: var(--font-display); font-size: clamp(24px, 3.2vw, 34px); color: #fff; letter-spacing: -.01em; }
.tbx-sub { margin: 0; max-width: 640px; color: #a5b4c8; font-size: 13.5px; line-height: 1.5; }
.tbx-stats { display: flex; gap: 8px; flex-wrap: wrap; }
.tbx-stat { display: flex; flex-direction: column; gap: 2px; min-width: 120px; padding: 9px 14px; border-radius: 12px; background: rgba(255,255,255,.06); border: 1px solid rgba(125,211,252,.25); }
.tbx-stat span { color: #7dd3fc; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; }
.tbx-stat b { color: #f8fafc; font: 700 22px/1.1 'IBM Plex Mono', ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.tbx-stat small { color: #a5b4c8; font-size: 11px; }
.tbx-stat.is-owed b { color: #fb7185; }
.tbx-stat.is-owed { border-color: rgba(251,113,133,.45); }

.tbx-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.tbx-panel { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.tbx-panel-head { position: relative; isolation: isolate; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; color: #e2e8f0;
  background: radial-gradient(120% 160% at 100% 0%, rgba(14,165,233,.25) 0%, transparent 55%), linear-gradient(160deg, #0b1f33 0%, #12324d 70%, #1b4864 100%); }
.tbx-panel-head h3 { margin: 4px 0 0; font-family: var(--font-display); font-size: 17px; color: #fff; }
.tbx-panel-figure { font: 700 20px/1 'IBM Plex Mono', ui-monospace, monospace; color: #fb7185; font-variant-numeric: tabular-nums; }
.tbx-panel-figure small { font-size: 12px; color: #a5b4c8; font-weight: 500; }
.tbx-panel-body { padding: 16px 18px; flex: 1; display: flex; flex-direction: column; }
.tbx-deduct-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tbx-field > span { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 5px; }
.tbx-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.tbx-money { position: relative; }
.tbx-money em { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--muted); font-size: 14px; }
.tbx-money input { width: 100%; box-sizing: border-box; padding: 9px 10px 9px 24px; border: 1px solid var(--input-border); border-radius: 10px; background: var(--input-bg); color: var(--ink);
  font: 700 15px 'IBM Plex Mono', ui-monospace, monospace; }
.tbx-money input:focus, .tbx-search-box input:focus { outline: 2px solid #0ea5e9; outline-offset: 1px; border-color: transparent; }
.tbx-panel-foot { margin-top: auto; padding-top: 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.tbx-note { font-size: 12px; color: var(--muted); }
.tbx-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-size: 13px; font-weight: 700; color: #fff; text-decoration: none;
  border: 0; border-radius: 999px; padding: 8px 16px; cursor: pointer; background: linear-gradient(135deg, #2563eb, #0ea5e9); }
.tbx-btn:hover { filter: brightness(1.08); }
.tbx-btn-go { background: linear-gradient(135deg, #16a34a, #22c55e); }
.tbx-btn-ghost { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.tbx-btn-wide { flex: 1; }
.tbx-empty-small { margin: auto 0; text-align: center; padding: 20px 12px; color: var(--muted); font-size: 13px; border: 1px dashed var(--line); border-radius: 12px; }
.tbx-wish-list { display: flex; flex-direction: column; gap: 8px; max-height: 210px; overflow-y: auto; }
.tbx-wish { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.tbx-wish-text { flex: 1; min-width: 0; }
.tbx-wish-name { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.tbx-icon-btn { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); color: var(--muted); text-decoration: none; cursor: pointer; font-size: 14px; }

.tbx-search { position: sticky; top: 0; z-index: 5; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; margin-bottom: 16px; box-shadow: var(--shadow); }
.tbx-search-box { position: relative; display: flex; align-items: center; }
.tbx-search-box > span { position: absolute; left: 14px; font-size: 16px; }
.tbx-search-box input { width: 100%; box-sizing: border-box; padding: 13px 40px 13px 44px; font-size: 16px; border: 1px solid var(--input-border); border-radius: 12px; background: var(--input-bg); color: var(--ink); }
.tbx-search-box button { position: absolute; right: 10px; border: 0; background: transparent; color: var(--muted); font-size: 16px; cursor: pointer; padding: 6px; }
.tbx-filter-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.tbx-pill { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 12.5px; font-weight: 700; padding: 7px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--card); color: var(--ink); }
.tbx-pill.active { background: linear-gradient(135deg, #2563eb, #0ea5e9); border-color: transparent; color: #fff; }
.tbx-pill.active .tbx-dot { box-shadow: 0 0 0 2px #fff; }
.tbx-count { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }

.tbx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.tbx-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 2px 10px rgba(11,31,51,.06); transition: transform .15s ease, box-shadow .15s ease; }
.tbx-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(11,31,51,.12); }
.tbx-card-head { position: relative; isolation: isolate; display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  background: radial-gradient(120% 160% at 100% 0%, rgba(14,165,233,.25) 0%, transparent 55%), linear-gradient(160deg, #0b1f33 0%, #12324d 70%, #1b4864 100%); }
.tbx-card-head::after { background-size: 16px 16px; opacity: .3; }
.tbx-brand { flex: none; font-size: 10.5px; font-weight: 800; padding: 2px 7px; border-radius: 5px; color: #fff; letter-spacing: .02em; }
.tbx-sku { font: 700 15px 'IBM Plex Mono', ui-monospace, monospace; letter-spacing: .02em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbx-card-head .tbx-sku { color: #f8fafc; }
.tbx-page { margin-left: auto; flex: none; color: #7dd3fc; font-size: 11px; font-weight: 600; letter-spacing: .06em; }
.tbx-card-body { display: flex; gap: 12px; align-items: flex-start; padding: 12px; flex: 1; }
.tbx-thumb { flex: 0 0 56px; height: 56px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 28px;
  background: radial-gradient(90% 90% at 30% 20%, rgba(14,165,233,.14), transparent 70%), var(--paper); border: 1px solid var(--line); }
.tbx-thumb-sm { flex-basis: 36px; height: 36px; font-size: 18px; border-radius: 9px; }
.tbx-name { margin: 0; font-size: 13.5px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tbx-name.is-missing, .tbx-wish-name.is-missing { color: var(--muted); font-style: italic; }
.tbx-card-foot { display: flex; gap: 8px; padding: 10px 12px 12px; border-top: 1px solid var(--line); }
.tbx-star { flex: none; width: 40px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--muted); font-size: 17px; cursor: pointer; }
.tbx-star.on { background: var(--gold-soft); border-color: #ca8a04; color: #ca8a04; }
.tbx-empty { text-align: center; padding: 40px 16px; background: var(--card); border: 1px dashed var(--line); border-radius: 16px; color: var(--muted); }
.tbx-empty p { margin: 4px 0; }
.tbx-empty b { color: var(--ink); font-size: 16px; }
.tbx-more { text-align: center; margin: 20px 0 8px; }

@media (max-width: 900px) { .tbx-panels { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .tbx-hero { padding: 18px 16px; border-radius: 16px; }
  .tbx-stats { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tbx-stat { min-width: 0; padding: 8px 10px; }
  .tbx-stat b { font-size: 17px; }
  .tbx-grid { grid-template-columns: 1fr; }
  .tbx-count { width: 100%; margin-left: 0; }
  .tbx-search { top: 0; padding: 12px; }
}
@media (prefers-reduced-motion: reduce) { .tbx-card, .tbx-card:hover { transition: none; transform: none; } }
html[data-theme="high-contrast"] .tbx-hero, html[data-theme="high-contrast"] .tbx-panel-head, html[data-theme="high-contrast"] .tbx-card-head { background: #000 !important; border-bottom: 1px solid #3a3d44; }

/* Tool Box categories + find-online buttons */
.tbx-cat-row, .tbx-sec-row { display: flex; gap: 6px; overflow-x: auto; padding: 10px 2px 2px; margin-top: 10px; border-top: 1px dashed var(--line); scrollbar-width: thin; }
.tbx-sec-row { border-top: 0; margin-top: 0; padding-top: 8px; align-items: center; }
.tbx-sec-label { flex: none; font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--teal-deep); margin-right: 4px; }
.tbx-chip { flex: none; display: inline-flex; align-items: center; gap: 5px; font: inherit; font-size: 12.5px; font-weight: 700; padding: 7px 12px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink); white-space: nowrap; }
.tbx-chip small { font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.tbx-chip.active { background: linear-gradient(160deg, #0b1f33, #1b4864); border-color: transparent; color: #fff; }
.tbx-chip.active small { color: #7dd3fc; }
.tbx-chip-sm { font-size: 11.5px; padding: 5px 10px; border-radius: 999px; background: var(--card); }
.tbx-card-cat { padding: 7px 12px 0; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--teal-deep); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbx-card-cat span { color: var(--muted); font-weight: 600; letter-spacing: .04em; text-transform: none; }
.tbx-card-foot .tbx-icon-btn { width: 38px; height: auto; align-self: stretch; }
.tbx-hint { margin: 8px 2px 0; font-size: 12px; color: var(--muted); }
.tbx-name-col { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.tbx-web-links { display: flex; gap: 12px; flex-wrap: wrap; margin-top: auto; }
.tbx-web-links a { font-size: 12px; font-weight: 700; color: var(--teal-deep); text-decoration: none; white-space: nowrap; }
.tbx-web-links a:hover { text-decoration: underline; }
.tbx-card-foot .tbx-btn { white-space: nowrap; }

/* Tool Box: chips wrap onto rows (no sideways scrolling) */
.tbx-cat-row, .tbx-sec-row { flex-wrap: wrap; overflow-x: visible; }
.tbx-more-subs { margin: 6px 2px 0; }

/* Tool Box: order list, three panels on wide screens */
@media (min-width: 1200px) { .tbx-panels { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 1fr); } }
.tbx-btn-dark { background: rgba(255,255,255,.1); border: 1px solid rgba(125,211,252,.4); }
.tbx-link { font: inherit; font-size: 12px; font-weight: 700; color: var(--teal-deep); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.tbx-order .tbx-panel-body { gap: 12px; }
.tbx-order-group { border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: var(--paper); display: flex; flex-direction: column; gap: 8px; }
.tbx-order-brand { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tbx-order-driver { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.tbx-order-clear { margin-left: auto; color: var(--muted); }
.tbx-order-line { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); }
.tbx-order-text { flex: 1; min-width: 0; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbx-order-text .tbx-sku { font-size: 13px; margin-right: 4px; }
.tbx-order-text .is-missing { color: var(--muted); font-style: italic; }
.tbx-qty { flex: none; display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.tbx-qty button { width: 30px; height: 28px; border: 0; background: var(--paper); color: var(--ink); font-size: 16px; font-weight: 700; cursor: pointer; }
.tbx-qty b { min-width: 26px; text-align: center; font: 700 13px 'IBM Plex Mono', ui-monospace, monospace; }
.tbx-send { align-self: stretch; }
.tbx-in-order { background: linear-gradient(135deg, #16a34a, #22c55e); }

/* Drivers & texting window */
.tbx-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(11,31,51,.55); backdrop-filter: blur(2px); }
.tbx-modal-card { width: min(640px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; background: var(--card); color: var(--ink); border-radius: 18px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.tbx-modal-head { position: relative; isolation: isolate; display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; color: #fff;
  background: radial-gradient(120% 160% at 100% 0%, rgba(14,165,233,.25) 0%, transparent 55%), linear-gradient(160deg, #0b1f33 0%, #12324d 70%, #1b4864 100%); }
.tbx-modal-head h3 { margin: 6px 0 0; font-family: var(--font-display); font-size: 20px; color: #fff; }
.tbx-modal-x { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.25); }
.tbx-tabs { display: flex; gap: 4px; padding: 10px 14px 0; border-bottom: 1px solid var(--line); }
.tbx-tab { font: inherit; font-size: 13px; font-weight: 700; padding: 9px 14px; border: 0; border-bottom: 3px solid transparent; background: none; color: var(--muted); cursor: pointer; }
.tbx-tab.active { color: var(--ink); border-bottom-color: #0ea5e9; }
.tbx-modal-body { padding: 16px 20px; overflow-y: auto; }
.tbx-tabpanel[hidden] { display: none; }
.tbx-tabpanel > .tbx-note { margin: 0 0 12px; display: block; }
.tbx-driver { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px 12px; margin: 0 0 10px; display: grid; grid-template-columns: 1fr 1fr 130px; gap: 10px; }
.tbx-driver legend { padding: 0 4px; }
.tbx-driver label, .tbx-msg-label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.tbx-driver input, .tbx-driver select, .tbx-modal textarea { font: inherit; font-size: 15px; padding: 9px 10px; border: 1px solid var(--input-border); border-radius: 10px; background: var(--input-bg); color: var(--ink); min-width: 0; }
.tbx-modal textarea { width: 100%; box-sizing: border-box; resize: vertical; line-height: 1.45; margin-top: 6px; }
.tbx-radio { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; cursor: pointer; }
.tbx-radio input { margin-top: 3px; width: 18px; height: 18px; }
.tbx-radio span { display: flex; flex-direction: column; gap: 2px; }
.tbx-radio small { color: var(--muted); font-size: 12.5px; }
.tbx-radio:has(input:checked) { border-color: #0ea5e9; background: rgba(14,165,233,.06); }
.tbx-fields { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0 14px; }
.tbx-preview { margin: 6px 0 0; padding: 12px 14px; border-radius: 14px 14px 14px 4px; background: #e9f2ff; color: #0f172a; font: 13.5px/1.45 var(--font-sans); white-space: pre-wrap; border: 1px solid #c7dcf7; }
.tbx-modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--line); }
@media (max-width: 640px) {
  .tbx-driver { grid-template-columns: 1fr 1fr; }
  .tbx-driver label:last-child { grid-column: 1 / -1; }
  .tbx-modal { padding: 0; align-items: flex-end; }
  .tbx-modal-card { border-radius: 18px 18px 0 0; max-height: 92vh; }
}
.tbx-modal textarea { min-height: 150px !important; height: auto !important; }
.tbx-driver input::placeholder, .tbx-modal textarea::placeholder { color: var(--muted); opacity: .6; font-weight: 400; }
.tbx-driver input, .tbx-driver select { font-weight: 600; }
.tbx-radio input { flex: none; }
@media (max-width: 640px) { .tbx-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Phones: first 10 category chips (All + 9), the rest behind "More categories". Desktop shows all. */
.tbx-more-cats { display: none; margin: 6px 2px 0; }
@media (max-width: 640px) {
  .tbx-more-cats { display: inline-block; }
  .tbx-cat-row:not(.is-open) > .tbx-chip:nth-child(n+11):not(.active) { display: none; }
}

/* Tool Box: Pro lock, callback number, in-app texting being set up */
.tbx-locked { align-items: flex-start; }
.tbx-lock-list { margin: 14px 0 18px; padding: 0; list-style: none; display: grid; gap: 8px; color: #e2e8f0; font-size: 14px; }
.tbx-lock-btn { font-size: 15px; padding: 11px 22px; }
.tbx-callback { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.tbx-callback small { font-weight: 500; }
.tbx-callback input { font: inherit; font-size: 15px; font-weight: 600; padding: 9px 10px; border: 1px solid var(--input-border); border-radius: 10px; background: var(--input-bg); color: var(--ink); max-width: 260px; }
.tbx-radio.is-off { opacity: .6; cursor: not-allowed; }
.tbx-soon { font-style: normal; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #92400e; background: #fef3c7; border-radius: 999px; padding: 2px 8px; margin-left: 6px; }
.tbx-send[disabled] { opacity: .55; cursor: not-allowed; }
/* Holding Bin sorted by Foreman IQ (holding-bin.js, holding-sort.js) */
.hb-head { display: grid; gap: 8px; margin-bottom: 10px; }
.hb-head .hb-sort { justify-self: start; }
.hb-card { padding: 12px; margin-bottom: 8px; }
.hb-card.is-needs { border-left: 4px solid #f59e0b; }
.hb-card.is-carry { border-left: 4px solid #d97706; }
.hb-card.is-place { border-left: 4px solid var(--teal-deep, #0f766e); }
.hb-top { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.hb-ro { color: var(--ink); }
.hb-wci { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 999px; color: #fff; font-size: 11px; font-weight: 700; background: var(--cp-green, #278548); }
.hb-wci-W { background: var(--w-red, #9c1b1b); } .hb-wci-I { background: var(--i-blue, #1d4f91); }
.hb-linked { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 4px; background: #eff6ff; color: #1e3a8a; border: 1px solid #bfdbfe; }
.hb-rec { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; margin-left: auto; }
.hb-rec-place { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.hb-rec-carry { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.hb-rec-needs { background: #fff7ed; color: #9a3412; border: 1px solid #fdba74; }
.hb-job { font-size: 13px; font-weight: 600; color: var(--ink); margin-top: 4px; }
.hb-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.hb-why { font-size: 12.5px; margin: 6px 0 0; color: var(--ink); line-height: 1.4; }
.hb-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.hb-actions .mini { font-size: 12px; padding: 6px 10px; min-height: 32px; }
.hb-carry-rec { background: #fef3c7 !important; color: #78350f !important; border: 2px solid #f59e0b !important; }
.hb-preview, .hb-summary, .hb-ask { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--paper, #fff); font-size: 13px; }
.hb-preview ul, .hb-summary ul { margin: 6px 0; padding-left: 18px; }
.hb-preview-note, .hb-ask-note { color: var(--muted); font-size: 12px; margin: 6px 0 0; }
.hb-summary { border-color: color-mix(in srgb, var(--teal-deep, #0f766e) 45%, var(--line)); }
.hb-summary summary, .hb-ask summary { cursor: pointer; }
.hb-summary-open { color: var(--teal-deep, #0f766e); font-weight: 700; text-decoration: underline; }
.hb-summary li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 3px 0; list-style: disc; }
.hb-ask { margin-top: 10px; border-style: dashed; }
.hb-ask-list, .hb-wait-list { list-style: none; padding: 0; margin: 6px 0; display: grid; gap: 4px; }
.hb-ask-list label { display: flex; gap: 6px; align-items: baseline; cursor: pointer; }
.hb-ask-list span { color: var(--muted); font-size: 12px; }
.hb-wait-list li { font-size: 12px; color: var(--muted); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ppl-fiq-tag { color: var(--teal-deep, #0f766e); font-weight: 700; }
.cdk-ro-question { margin: 8px 0; padding: 10px 12px; border: 1px solid #fcd34d; background: #fffbeb; border-radius: 10px; font-size: 13.5px; }
.cdk-ro-q-actions { display: inline-flex; gap: 6px; margin-left: 6px; flex-wrap: wrap; }
.hb-ask-list input[type="checkbox"] { width: 18px !important; height: 18px !important; min-width: 18px; flex: 0 0 18px; margin: 2px 0 0 !important; padding: 0 !important; accent-color: var(--teal-deep, #0f766e); }
.hb-ask-list label { font-size: 13px; line-height: 1.35; }
.hb-wait-txt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-rec-manual { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }

/* Pay Period Stats: W / C / I labor mix, sold hours and lines */
.wci-mix { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 8px; }
.wci-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; gap: 8px; }
.wci-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.wci-total { font-size: 11px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.wci-bar-row { display: grid; grid-template-columns: 58px 1fr; align-items: center; gap: 8px; margin-bottom: 6px; }
.wci-bar-label { font-size: 10.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.wci-bar { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: var(--line); }
.wci-bar > div { transition: width 0.3s ease; }
.wci-cols, .wci-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 4px 8px; }
.wci-cols { margin-top: 6px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.wci-cols span { text-align: right; }
.wci-row { padding: 5px 0; border-bottom: 1px solid var(--line); }
.wci-row-last { border-bottom: none; }
.wci-name { display: flex; align-items: center; gap: 5px; font-size: 12.5px; min-width: 0; white-space: nowrap; }
.wci-name span:last-child { overflow: hidden; text-overflow: ellipsis; }
.wci-vals { display: contents; }
.wci-val { text-align: right; font-size: 12.5px; white-space: nowrap; }
.wci-val b { font-weight: 700; }
.wci-val i { font-style: normal; color: var(--muted); font-size: 11px; margin-left: 2px; }
.wci-note { margin: 6px 0 0; font-size: 11.5px; color: var(--muted); }
.ppl-backout { color: #b45309; font-weight: 700; }

/* Search every RO (line-search.js): the pill on the workbench and the Ledger */
.ls-pill { position: relative; width: min(100%, 520px); z-index: 40; }
.ls-box { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 10px 0 6px; border-radius: 10px; background: var(--input-bg, #fff); border: 1px solid var(--input-border, #d1d5db); }
.ls-box:focus-within { border-color: var(--teal-deep, #35647e); box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal-deep, #35647e) 22%, transparent); }
.ls-icon { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 0; background: transparent; color: #94a3b8; border-radius: 8px; cursor: help; padding: 0; }
.ls-icon:hover, .ls-icon:focus-visible { color: var(--teal-deep, #35647e); background: color-mix(in srgb, var(--teal-deep, #35647e) 10%, transparent); outline: none; }
.ls-input { flex: 1; min-width: 0; height: 100% !important; border: 0 !important; outline: none; background: transparent !important; font-size: 14px; color: var(--ink); padding: 0 !important; box-shadow: none !important; }
.ls-input::placeholder { color: #94a3b8; opacity: 1; }
.ls-help-wrap { position: relative; display: inline-flex; }
.ls-help { position: absolute; left: 0; top: calc(100% + 10px); z-index: 50; width: 300px; display: none; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 12px; background: #0f172a; color: #e2e8f0; font-size: 12.5px; line-height: 1.45; box-shadow: 0 14px 34px rgba(15, 23, 42, 0.35); text-align: left; white-space: normal; }
.ls-help b { color: #fff; font-size: 13px; }
.ls-help i { font-style: normal; font-family: ui-monospace, Menlo, monospace; font-size: 11.5px; background: rgba(148, 163, 184, 0.18); color: #f8fafc; padding: 0 4px; border-radius: 4px; }
.ls-help-key { color: #94a3b8; margin-top: 2px; }
.ls-help kbd { font: 600 11px/1 ui-monospace, Menlo, monospace; border: 1px solid #475569; border-radius: 4px; padding: 1px 5px; color: #f8fafc; }
.ls-help-wrap:hover .ls-help, .ls-icon:focus-visible + .ls-help { display: flex; }
.ls-input::-webkit-search-cancel-button { cursor: pointer; }
.ls-kbd { font: 600 11px/1 ui-monospace, Menlo, monospace; color: #94a3b8; border: 1px solid var(--line); border-radius: 6px; padding: 3px 6px; }
.ls-drop { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: var(--card, #fff); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18); overflow: hidden; }
.ls-list { list-style: none; margin: 0; padding: 4px; max-height: min(60vh, 520px); overflow-y: auto; }
.ls-item { padding: 9px 10px; border-radius: 10px; cursor: pointer; display: grid; gap: 3px; }
.ls-item.is-active, .ls-item:hover { background: color-mix(in srgb, var(--teal-deep, #35647e) 10%, transparent); }
.ls-row1 { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: 13px; color: var(--muted); }
.ls-row1 b { color: var(--ink); font-size: 14px; }
.ls-row2 { font-size: 13px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ls-row2 mark { background: #fef08a; color: inherit; border-radius: 3px; padding: 0 1px; }
.ls-row3 { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; font-size: 11.5px; }
.ls-line { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; color: #fff; font-weight: 700; font-size: 10.5px; background: var(--cp-green, #278548); }
.ls-line.ls-W { background: var(--w-red, #9c1b1b); } .ls-line.ls-I { background: var(--i-blue, #1d4f91); }
.ls-hrs { color: var(--muted); margin-left: 2px; }
.ls-st { font-weight: 700; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line); }
.ls-st-paid { color: #047857; border-color: #a7f3d0; background: #ecfdf5; }
.ls-st-short { color: #b45309; border-color: #fcd34d; background: #fffbeb; }
.ls-st-unpaid { color: #be123c; border-color: #fecdd3; background: #fff1f2; }
.ls-st-bin { color: #475569; border-color: #cbd5e1; background: #f8fafc; }
.ls-st-settled { color: #047857; border-color: #a7f3d0; }
.ls-st-backout { color: #b45309; border-color: #fdba74; }
.ls-st-carry { color: #92400e; border-color: #fcd34d; background: #fef3c7; }
.ls-empty { padding: 14px 12px; font-size: 13px; color: var(--muted); }
.ls-foot { margin: 0; padding: 7px 12px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--muted); background: color-mix(in srgb, var(--line) 25%, transparent); }
.ls-tip { white-space: nowrap; }
.ls-flash { animation: ls-flash 2s ease-out; }
@keyframes ls-flash { 0%, 30% { box-shadow: 0 0 0 4px #facc15, 0 0 18px rgba(250, 204, 21, 0.6); } 100% { box-shadow: 0 0 0 0 rgba(250, 204, 21, 0); } }
.ppl-globalsearch { flex: 1 1 100%; display: flex; justify-content: flex-end; }
.ppl-globalsearch .ls-pill { width: min(100%, 520px); }
/* Workbench header: the search sits above the tabs, rounded like the tab pill */
.wb-header-search-row { display: flex; align-items: center; justify-content: flex-end; gap: 10px; width: 100%; margin-bottom: 8px; }
.wb-header-search-row .wb-hero-mark { margin: 0; flex: none; }
.wb-header-search { display: flex; justify-content: flex-end; min-width: 0; flex: 0 1 460px; }
.wb-header-search .ls-pill { width: 100%; }
.wb-header-search .ls-box { border-radius: 999px; padding-left: 8px; height: 38px; border-color: rgba(255, 255, 255, 0.35); }
.wb-header-search .ls-drop, .wb-header-search .ls-help { text-align: left; }
.wb-header-search .ls-drop { min-width: min(560px, 92vw); left: auto; right: 0; }
@media (max-width: 640px) { .ls-kbd { display: none; } .ls-tip { display: none; } .wb-header-search-row { justify-content: stretch; } .wb-header-search { flex: 1 1 auto; } .wb-header-search .ls-drop { min-width: 0; left: 0; } }
@media (prefers-reduced-motion: reduce) { .ls-flash { animation: none; outline: 3px solid #facc15; } }
/* The header (with the search) sits above the page so its dropdown and help aren't covered */
#dateTotalsSubHeaderBar { position: relative; z-index: 60; overflow: visible !important; }

/* Closed pay period lock in the Current Job header (next to "Editing Saved Line" and Clear) */
.jc-actions { flex-wrap: wrap; justify-content: flex-end; row-gap: 6px; }
.jc-lock { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 4px 0 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.35); color: #fff; font-size: 12px; font-weight: 700; white-space: nowrap; }
.jc-lock.hidden { display: none; }
.jc-lock-btn { height: 24px; padding: 0 10px; border-radius: 999px; border: 0; background: #fff; color: #0b2a42; font-size: 11.5px; font-weight: 800; cursor: pointer; }
.jc-lock-btn:hover, .jc-lock-btn:focus-visible { background: #fef3c7; outline: none; }
.jc-lock.is-unlocked { background: #fef3c7; border-color: #f59e0b; color: #78350f; }
.jc-lock.is-unlocked .jc-lock-btn { background: #78350f; color: #fff; }
@media (max-width: 640px) { .jc-lock { height: 36px; } .jc-lock-btn { height: 28px; } }
@media (max-width: 640px) { #dayEntry .jc-head { flex-wrap: wrap; gap: 8px; } #dayEntry .jc-actions { width: 100%; justify-content: flex-start; } }

/* Pay Period Stats: labor mix bars (2026-11-08). Colors checked for color blindness
   (dataviz validate_palette): light C #2f9b55 / W #9c1b1b / I #1d4f91; dark C #21783a / W #e46565 /
   I #5a8de8 (red-green in the 6-8 floor band, so every segment also prints its letter and share). */
.wci-mix { --wci-c: var(--cp-green, #278548); --wci-w: var(--w-red, #9c1b1b); --wci-i: var(--i-blue, #1d4f91); }
[data-theme="dark"] .wci-mix { --wci-c: #21783a; --wci-w: #e46565; --wci-i: #5a8de8; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .wci-mix { --wci-c: #21783a; --wci-w: #e46565; --wci-i: #5a8de8; } }
.wci-bar-block { margin-bottom: 10px; }
.wci-bar-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 5px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.wci-bar-head b { font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--ink); font-variant-numeric: tabular-nums; }
.wci-mix .wci-bar { display: flex; gap: 2px; height: 22px; border-radius: 7px; overflow: hidden; background: transparent; }
.wci-seg { flex: 1 1 0; min-width: 6px; display: flex; align-items: center; justify-content: center; gap: 4px; color: #fff; font-size: 11px; font-weight: 800; border-radius: 4px; cursor: default; transition: flex-grow 0.35s ease, filter 0.15s ease; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.18); }
.wci-seg:hover { filter: brightness(1.08); }
.wci-seg i, .wci-seg em { font-style: normal; display: none; white-space: nowrap; }
.wci-seg.has-letter i, .wci-seg.has-label i, .wci-seg.has-label em { display: inline; }
.wci-seg i { opacity: 0.85; }
.wci-seg-C { background: var(--wci-c); } .wci-seg-W { background: var(--wci-w); } .wci-seg-I { background: var(--wci-i); }
.wci-mix .wci-bar.is-empty { border: 1.5px dashed var(--line); border-radius: 7px; justify-content: center; align-items: center; }
.wci-empty { font-size: 11px; color: var(--muted); }
.wci-mix .letter-c { background: var(--wci-c) !important; } .wci-mix .letter-w { background: var(--wci-w) !important; } .wci-mix .letter-i { background: var(--wci-i) !important; }
.wci-val b { color: var(--ink); }
.eff-note { margin: 4px 2px 0; font-size: 11.5px; line-height: 1.4; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .wci-seg { transition: none; } }

/* Pay Period & Earnings hero (2026-11-08): the header and the Foreman IQ gauge are one dark band
   that runs to the card's edges, like the Current Job header. Inline light-theme colors on the
   title, date and chevron are overridden for the dark band. */
#ppHero.pp-hero { position: relative; isolation: isolate; margin: -16px -16px 12px !important; padding: 14px 16px 16px !important; border: 0 !important; border-radius: 17px 17px 0 0; color: #e2e8f0;
  background: radial-gradient(120% 160% at 100% 0%, rgba(14,165,233,.28) 0%, transparent 55%), linear-gradient(160deg, #0b1f33 0%, #12324d 60%, #1b4864 100%); }
#ppHero.pp-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .3; border-radius: inherit;
  background-image: linear-gradient(rgba(125,211,252,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(125,211,252,.12) 1px, transparent 1px); background-size: 18px 18px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 75%); mask-image: linear-gradient(90deg, transparent, #000 75%); }
#ppHero #currentPeriodTitle { color: #7dd3fc !important; }
#ppHero #periodRangeSubtitle { color: #e2e8f0 !important; }
#ppHero #periodIcon, #ppHero #periodIcon svg { color: #cbd5e1 !important; }
#ppHero #periodIcon:hover svg { color: #fff !important; }
#ppHero #togglePayPrivacyBtn { background: rgba(255,255,255,.12) !important; color: #fff !important; border: 1px solid rgba(255,255,255,.4) !important; border-radius: 999px !important; padding: 4px 10px !important; }
#ppHero #togglePayPrivacyBtn.is-hidden { background: transparent !important; color: #a5b4c8 !important; border-color: rgba(165,180,200,.35) !important; }
#ppHero #togglePayPrivacyBtn:hover { background: rgba(255,255,255,.2) !important; }
#ppHero .pp-gauge, [data-theme] #ppHero .pp-gauge { background: transparent !important; box-shadow: none !important; margin: 12px 0 0; padding: 12px 0 0; border-radius: 0; border: 0 !important; border-top: 1px solid rgba(125,211,252,.18) !important; }
#payPeriodCard > #ppHero.pp-hero { margin-bottom: 0 !important; }
#payPeriodCard > #periodBody { margin-top: 0 !important; }
#ppHero .pp-gauge::after { display: none; }
/* High contrast: a raised black band, white type, grey labels */
[data-theme="high-contrast"] #ppHero.pp-hero { background: var(--hc-raised) !important; border-bottom: 1px solid var(--hc-border) !important; }
[data-theme="high-contrast"] #ppHero.pp-hero::after { display: none; }
[data-theme="high-contrast"] #ppHero #currentPeriodTitle { color: #a1a6b0 !important; }
[data-theme="high-contrast"] #ppHero #periodRangeSubtitle { color: #fff !important; }
[data-theme="high-contrast"] #ppHero .pp-gauge { background: transparent !important; border: 0 !important; border-top: 1px solid var(--hc-border) !important; }
[data-theme="high-contrast"] #ppHero #togglePayPrivacyBtn { background: transparent !important; border-color: #3a3d44 !important; }
.letter-c-bg { background-color: var(--cp-green, #278548) !important; }

.letter-w-bg { background-color: var(--w-red, #9c1b1b) !important; }
.letter-i-bg { background-color: var(--i-blue, #1d4f91) !important; }
/* Pay Period & Earnings collapsed: the hero band fills the whole card, like the collapsed calendar */
#payPeriodCard:has(#periodBody.collapsed) > #ppHero.pp-hero { margin-bottom: -16px !important; border-radius: 17px; }
#payPeriodCard:has(#periodBody.collapsed) { gap: 0 !important; }

/* 2026-11-08: Lines to Chase count badge + fold, and the Analytics Dollars switch */
.tha-card:has(> .tha-card-head > .tha-count-badge) { position: relative; }
.tha-card-head:has(.tha-count-badge) { padding-right: 52px; }
.tha-count-badge { position: absolute; top: 16px; right: 16px; min-width: 32px; height: 32px; padding: 0 9px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; background: #b91c1c; color: #fff; font: 700 15px/1 var(--tha-mono); box-shadow: 0 1px 2px rgba(0,0,0,.15); }
.tha-chase-more { border-top: 1px solid var(--tha-line); }
.tha-chase-more > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 0; font-weight: 600; font-size: 14px; color: var(--teal-deep, #1d4ed8); }
.tha-chase-more > summary::-webkit-details-marker { display: none; }
.tha-chase-more .tha-chev { transition: transform .2s; }
.tha-chase-more[open] .tha-chev { transform: rotate(180deg); }
.tha-chase-more[open] > summary span { font-size: 0; }
.tha-chase-more[open] > summary span::after { content: "Show fewer"; font-size: 14px; }
.tha-chase-more > .tha-chase li:first-child { border-top: 1px solid var(--tha-line); }
.tha-dollars-chip { margin-left: 8px; padding: 2px 10px; border-radius: 999px; border: 1px solid currentColor; background: transparent; color: inherit; font: 600 11px/1.6 inherit; letter-spacing: .02em; text-transform: none; cursor: pointer; }
.tha-dollars-chip.is-hidden { opacity: .85; border-style: dashed; }
.tha-card-head .tha-btn[data-dollars-toggle], .tha-forecast-head .tha-btn[data-dollars-toggle] { margin-top: 10px; }

/* 2026-11-08b: Lines to Chase sections; Ledger arrows match Analytics */
.tha-chase-sec { margin: 14px 0 2px; font: 700 12px/1.3 var(--tha-sans, inherit); letter-spacing: .08em; text-transform: uppercase; color: var(--tha-muted); }
.tha-chase-sec span { text-transform: none; letter-spacing: 0; font-weight: 500; }
.tha-chase-sec.is-old { margin-top: 22px; padding-top: 14px; border-top: 2px solid var(--tha-line); }
.tha-settle-pointer { margin: 4px 0 0; }
.ppl-hero.has-pp-nav { position: relative; --tha-hero-ink: #f8fafc; padding-left: 76px; padding-right: 76px; }
.ppl-hero .tha-pp-step { top: 20px; }
@media (max-width: 640px) { .ppl-hero.has-pp-nav { padding-left: 48px; padding-right: 48px; } }
.tha-stats > .tha-stat:nth-child(3):last-child { grid-column: 1 / -1; }
.tha-chase-job .tha-chase-read { color: var(--tha-ink); opacity: .8; }
/* Ledger: the period's line count sits next to its dates, in the eyebrow blue (dropdown removed) */
.ppl-title-meta { margin-left: 14px; font-size: clamp(15px, 1.6vw, 18px); font-weight: 600; line-height: 1; letter-spacing: 0; color: #7dd3fc; white-space: nowrap; vertical-align: middle; }
.ppl-hero .ppl-nav { justify-content: flex-end; flex: 0 0 auto; }
/* Ledger: corrections waiting in other pay periods */
.ppl-fixnote { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 12px 0; padding: 10px 14px; border-radius: 12px; border: 1px solid #f59e0b; border-left-width: 5px; background: #fffbeb; color: #78350f; font-size: 13.5px; }
.ppl-fixnote-icon { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 999px; background: #d97706; color: #fff; font-weight: 800; font-size: 13px; }
.ppl-fixnote-go { border: 1px solid #d97706; background: #fff; color: #92400e; border-radius: 999px; padding: 3px 12px; font-weight: 600; font-size: 13px; cursor: pointer; }
.ppl-fixnote-go:hover { background: #fef3c7; }
/* Ledger check cards: side by side, fold with a persistent count */
.ppl-check-pair { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.ppl-check-pair > .ppl-check { margin: 0; }
@media (max-width: 900px) { .ppl-check-pair { grid-template-columns: 1fr; } }
.ppl-fold { position: relative; }
.ppl-fold .ppl-check-head { padding-right: 48px; }
.ppl-count-badge { position: absolute; top: 14px; right: 14px; min-width: 30px; height: 30px; padding: 0 8px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; background: #d97706; color: #fff; font-weight: 800; font-size: 14px; z-index: 1; }
.ppl-fold-body { max-height: 190px; overflow: hidden; }
.ppl-fold.is-open .ppl-fold-body { max-height: none; }
.ppl-fold:not(.is-open) .ppl-fold-body:has(+ .ppl-fold-btn:not([hidden])) { -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.ppl-fold-btn { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; margin-top: 6px; padding: 8px 0 2px; border: 0; background: transparent; color: #92400e; font-weight: 600; font-size: 13.5px; cursor: pointer; }
.ppl-fold-btn[hidden] { display: none; }
.ppl-fold.is-open .ppl-fold-btn svg { transform: rotate(180deg); }
#wbFixNote .ppl-fixnote { margin: 0 0 12px; }

/* ===== 2026-11-08 Ledger layout: one set of columns for RO cards and their lines ===== */
.ppl-ro { --ppl-cols: minmax(0, 1fr) 64px 82px 82px 92px 140px 92px 12px; }
.ppl-num { display: flex; flex-direction: column; align-items: flex-end; font-variant-numeric: tabular-nums; line-height: 1.15; }
.ppl-num b { font-size: 15px; font-weight: 700; color: var(--ink); }
.ppl-num em { font-style: normal; font-size: 11px; color: var(--muted); margin-top: 2px; }
.ppl-c-d.is-over b { color: var(--ppl-paid); }
.ppl-c-d.is-out b { color: var(--ppl-unpaid); }
.ppl-c-d.is-settled b { color: var(--ppl-settled); }
.ppl-c-d.is-even b { color: var(--muted); font-weight: 600; }
.ppl-c-meter .ppl-ro-meter { margin: 0; height: 6px; }
.ppl-ro-count { text-align: right; }
.ppl-ro summary.ppl-row::after { justify-self: center; }
@media (min-width: 721px) {
  .ppl-ro summary.ppl-row { grid-template-columns: var(--ppl-cols); column-gap: 18px; padding: 14px 14px 14px 22px; }
  .ppl-ro summary.ppl-row .ppl-pill { justify-self: start; }
  .ppl-ro .ppl-lines { padding: 0 14px 6px 22px; }
  .ppl-line.ppl-row { grid-template-columns: var(--ppl-cols); column-gap: 18px; padding: 12px 0; }
  .ppl-line-main { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; align-items: center; min-width: 0; }
  /* line: main | (count) | flagged | paid | diff | buttons | status | (chevron) */
  .ppl-line.ppl-row .ppl-pill { grid-column: 7; grid-row: 1; justify-self: start; }
  .ppl-line.ppl-row .ppl-line-act { grid-column: 6; grid-row: 1; justify-content: flex-end; }
  .ppl-line.ppl-row .ppl-c-f { grid-column: 3; } .ppl-line.ppl-row .ppl-c-p { grid-column: 4; } .ppl-line.ppl-row .ppl-c-d { grid-column: 5; }
}
@media (min-width: 721px) and (max-width: 1100px) {
  /* no lines count or meter here: id | flagged | paid | diff | status + buttons | chevron */
  .ppl-ro { --ppl-cols: minmax(0, 1fr) 72px 72px 84px 190px 12px; }
  .ppl-ro-count, .ppl-c-meter, .ppl-c-count { display: none !important; }
  .ppl-ro summary.ppl-row, .ppl-line.ppl-row { column-gap: 14px; }
  .ppl-line.ppl-row .ppl-c-f { grid-column: 2; } .ppl-line.ppl-row .ppl-c-p { grid-column: 3; } .ppl-line.ppl-row .ppl-c-d { grid-column: 4; }
  .ppl-line.ppl-row .ppl-pill { grid-column: 5; grid-row: 1; justify-self: start; }
  .ppl-line.ppl-row .ppl-line-act { grid-column: 5; grid-row: 1; justify-self: end; }
}

@media (max-width: 720px) {
  .ppl-ro summary.ppl-row { grid-template-columns: repeat(3, minmax(0, 1fr)) auto; grid-template-areas: "id id id pill" "f p d d"; }
  .ppl-ro summary.ppl-row .ppl-ro-id { grid-area: id; }
  .ppl-ro summary.ppl-row .ppl-pill { grid-area: pill; }
  .ppl-row .ppl-c-f { grid-area: f; align-items: flex-start; } .ppl-row .ppl-c-p { grid-area: p; align-items: flex-start; } .ppl-row .ppl-c-d { grid-area: d; align-items: flex-start; }
  .ppl-c-meter, .ppl-c-count { display: none; }
  .ppl-line.ppl-row { grid-template-columns: repeat(3, minmax(0, 1fr)) auto; grid-template-areas: "main main main pill" "f p d act"; }
  .ppl-line.ppl-row .ppl-line-main { grid-area: main; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
  .ppl-line.ppl-row .ppl-pill { grid-area: pill; justify-self: end; }
  .ppl-line.ppl-row .ppl-line-act { grid-area: act; }
}

/* PROTOTYPE F2 (test branch): recovery review dialog */
.rr-dialog { max-width: 640px; width: calc(100% - 32px); border: 1px solid var(--line, #cbd5e1); border-radius: 14px; padding: 0; color: var(--ink, #0f172a); background: var(--card, #fff); }
.rr-dialog::backdrop { background: rgba(15, 23, 42, 0.45); }
.rr-body { padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; }
.rr-body h2 { margin: 0; font-size: 19px; }
.rr-label { margin: 0; padding: 10px 12px; border-radius: 10px; background: #fffbeb; border: 1px solid #f59e0b; color: #78350f; font-size: 14px; }
.rr-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 50vh; overflow: auto; }
.rr-row label { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; row-gap: 2px; padding: 10px 12px; border: 1px solid var(--line, #e2e8f0); border-radius: 10px; cursor: pointer; }
.rr-row input { grid-row: span 3; margin-top: 3px; width: 18px; height: 18px; }
.rr-what { font-size: 14px; }
.rr-copy { font-size: 12px; color: var(--muted, #64748b); }
.rr-note { margin: 0; font-size: 13px; color: #b45309; }
.rr-detail, .rr-now { font-size: 13px; color: var(--muted, #475569); }
.rr-now { display: block; }
.rr-ok { font-size: 12.5px; font-weight: 700; color: #047857; }
.rr-warn { font-size: 12.5px; font-weight: 700; color: #b45309; }
.rr-result { margin: 0; font-size: 14px; font-weight: 600; min-height: 1.2em; }
.rr-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.rr-btn { min-height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line, #cbd5e1); background: var(--card, #fff); font-weight: 600; cursor: pointer; }
.rr-primary { background: #35647e; border-color: #35647e; color: #fff; }

/* PROTOTYPE F2 (test branch): paused editing on a shared computer */
.tht-edit-pause { position: sticky; top: 0; z-index: 60; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 12px 18px; background: #fff7ed; border-bottom: 2px solid #ea580c; color: #7c2d12; font-size: 14.5px; }
.tht-edit-pause .tep-text { margin: 0; flex: 1 1 360px; }
.tht-edit-pause .tep-result { margin: 0; flex-basis: 100%; font-size: 13.5px; font-weight: 600; }
.tht-edit-pause .tep-result:empty { display: none; }
.tht-edit-pause .tep-retry { min-height: 40px; padding: 0 18px; border-radius: 10px; border: 0; background: #c2410c; color: #fff; font-weight: 700; cursor: pointer; }
html.tht-edit-paused #dayEntry { opacity: 0.55; }

/* PROTOTYPE F2: "Needs your decision" (conflicts saved by recovery) */
.cr-intro { margin: 0; font-size: 14px; color: var(--muted, #475569); }
.cr-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow: auto; }
.cr-row { padding: 12px; border: 1px solid var(--line, #e2e8f0); border-radius: 10px; display: flex; flex-direction: column; gap: 8px; }
.cr-row p { margin: 0; }
.cr-what { font-size: 14px; }
.cr-why { font-size: 13px; color: #b45309; font-weight: 600; }
.cr-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cr-ver { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 8px; background: var(--soft, #f8fafc); border: 1px solid var(--line, #e2e8f0); font-size: 13.5px; }
.cr-gone b { color: #b91c1c; }
.cr-h { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted, #64748b); }
.cr-sub { color: var(--muted, #475569); font-size: 12.5px; }
.cr-msg { font-size: 13.5px; font-weight: 600; min-height: 1em; }
.cr-acts { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.cr-resolved { opacity: .8; border-color: #10b981; }
.cr-changed { border-color: #f59e0b; }
@media (max-width: 480px) { .cr-cols { grid-template-columns: 1fr; } }

/* P0 startup hydration: covers the app until this technician's saved lines are loaded. */
.tht-hydrating {
  position: fixed; inset: 0; z-index: 2147483000;
  display: flex; align-items: center; justify-content: center;
  padding: 24px; text-align: center;
  background: var(--bg, #f7f7f5); color: var(--text, #1c1c1c);
  font: 600 1.05rem/1.4 Inter, system-ui, sans-serif;
}
.tht-hyd-box { max-width: 34rem; }
.tht-hyd-text { margin: 0 0 16px; }
.tht-hyd-acts { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.tht-hyd-btn { font: inherit; font-weight: 600; padding: 10px 16px; border-radius: 8px; border: 1px solid currentColor; background: transparent; color: inherit; cursor: pointer; }
.tht-hyd-btn.is-primary { background: var(--accent, #1c1c1c); color: var(--bg, #fff); border-color: transparent; }
/* Beta terms acknowledgment (app.js showBetaTerms). The global input rule (width 100%, height 42px,
   padding) stretched each checkbox across its label and squeezed the text into narrow columns. */
.tht-beta-ack { margin: 0 0 16px; text-align: left; }
.tht-beta-ack label { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 12px; line-height: 1.45; cursor: pointer; }
.tht-beta-ack input[type="checkbox"] { flex: 0 0 auto; width: 20px; height: 20px; min-width: 20px; margin: 2px 0 0; padding: 0; border-radius: 4px; accent-color: var(--teal, #0f766e); cursor: pointer; }
.tht-beta-ack label > span { flex: 1 1 auto; min-width: 0; }   /* one text block beside the box */
.tht-beta-ack a { color: inherit; text-decoration: underline; }
#betaAckNote { margin: 4px 0 0; min-height: 1.4em; font-weight: 600; }
.cr-state { margin: 8px 0 16px; }
.tht-beta-ack { text-align: left; font-weight: 500; font-size: 0.95rem; margin: 0 0 16px; }
.tht-beta-ack label { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 10px; }
.tht-beta-ack input { margin-top: 4px; }
#betaAckNote { min-height: 1.2em; margin: 4px 0 0; }
