    * { box-sizing: border-box; margin: 0; padding: 0; }

    :root {
      --bg-primary: #faf9f5;
      --bg-secondary: #ebe9e2;
      --bg-card: #ffffff;
      --text-primary: #141413;
      --text-secondary: #4a4a47;
      --text-muted: #63625d;
      --accent: #D97757;
      --accent-hover: #c4684a;
      --client-ink: #1f56b0; --client-badge: #dbe8fb; /* "the client sees this": used for nothing else */
      --border: #dddbd3;
      --border-light: #eeeee9;
      --shadow: rgba(20, 20, 19, 0.04);
      --shadow-hover: rgba(20, 20, 19, 0.08);
    }

    /* Dark theme: chosen with the header button, or following the Mac's setting in Auto */
    :root[data-theme="dark"] {
      --bg-primary: #1b1b1a;
      --bg-secondary: #252523;
      --bg-card: #30302d;
      --text-primary: #ecebe6;
      --text-secondary: #c4c3bc;
      --text-muted: #a3a29c;
      --accent: #e3876a;
      --accent-hover: #ec9a7f;
      --client-ink: #9cc2f7; --client-badge: #2a3d59;
      --border: #3f3f3b;
      --border-light: #353532;
      --shadow: rgba(0, 0, 0, 0.3);
      --shadow-hover: rgba(0, 0, 0, 0.5);
      color-scheme: dark;
    }
    @media (prefers-color-scheme: dark) {
      :root:not([data-theme="light"]):not([data-theme="dark"]) {
        --bg-primary: #1b1b1a;
        --bg-secondary: #252523;
        --bg-card: #30302d;
        --text-primary: #ecebe6;
        --text-secondary: #c4c3bc;
        --text-muted: #a3a29c;
        --accent: #e3876a;
        --accent-hover: #ec9a7f;
        --client-ink: #9cc2f7; --client-badge: #2a3d59;
        --border: #3f3f3b;
        --border-light: #353532;
        --shadow: rgba(0, 0, 0, 0.3);
        --shadow-hover: rgba(0, 0, 0, 0.5);
        color-scheme: dark;
      }
    }
    .theme-btn { padding: 8px 12px; font-size: 15px; line-height: 1; }

    body {
      font-family: 'Figtree', -apple-system, BlinkMacSystemFont, sans-serif;
      background: var(--bg-primary);
      color: var(--text-primary);
      height: 100vh;
      padding: 20px 24px;
      line-height: 1.5;
      overflow: hidden;
      display: flex;
      flex-direction: column;
    }

    header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 16px;
      padding-bottom: 16px;
      border-bottom: 1px solid var(--border);
      flex-shrink: 0;
    }

    h1 {
      font-size: 1.5rem;
      letter-spacing: -0.01em;
    }

    /* Headings: Mona Sans SemiBold Wide */
    h1, h2, h3, .column-title, .timer-display, .timer-heading, .alarm-box h2, .gh-dialog h3, .alarm-time {
      font-family: 'Mona Sans', 'Figtree', sans-serif;
      font-weight: 600;
      font-stretch: 125%;
    }

    h2 { font-size: 1.1rem; font-weight: 600; margin-bottom: 12px; color: var(--text-secondary); }

    .header-left {
      display: flex;
      align-items: center;
      gap: 0;
    }

    .view-toggle {
      display: flex;
      gap: 4px;
      background: var(--bg-secondary);
      padding: 4px;
      border-radius: 999px;
      margin-left: 16px;
    }

    .view-toggle button {
      background: transparent;
      border: none;
      padding: 6px 14px;
      font-size: 13px;
      color: var(--text-muted);
      border-radius: 999px;
    }

    .view-toggle button:hover {
      color: var(--text-primary);
      background: transparent;
    }

    .view-toggle button.active {
      background: var(--bg-card);
      color: var(--text-primary);
      box-shadow: 0 1px 3px var(--shadow);
    }

    .buttons { display: flex; gap: 12px; align-items: center; }

    /* Header controls share one height so everything lines up on a single center line */
    header .buttons > button { height: 44px; display: inline-flex; align-items: center; justify-content: center; }
    header .view-toggle { height: 44px; align-items: center; }
    header .view-toggle button { height: 36px; display: inline-flex; align-items: center; }
    header .theme-btn { width: 44px; padding: 0; font-size: 18px; }
    header h1 { line-height: 1.2; }

    button {
      background: var(--bg-card);
      color: var(--text-primary);
      border: 1px solid var(--border);
      padding: 10px 18px;
      border-radius: 999px;
      cursor: pointer;
      font-size: 14px;
      font-weight: 600;
      font-family: inherit;
      transition: all 0.15s ease;
    }

    button:hover {
      background: var(--bg-secondary);
      border-color: var(--text-muted);
    }

    button.primary {
      background: var(--accent);
      color: white;
      border-color: var(--accent);
    }

    button.primary:hover {
      background: var(--accent-hover);
      border-color: var(--accent-hover);
    }

    button:disabled {
      opacity: 0.4;
      cursor: not-allowed;
    }

    /* ===== TASKS STYLES ===== */

    .board {
      display: flex;
      gap: 24px;
      overflow-x: auto;
      overflow-y: hidden;
      padding-bottom: 24px;
      flex: 1;
      min-height: 0;
    }

    /* A slim + column for adding sections; it widens while you type the name */
    /* A plain button, not a dashed box: dashes read as somewhere to drop */
    .board > .add-section-col { min-width: 40px; max-width: 40px; height: 40px; min-height: 0; flex: none; align-self: flex-start; margin-top: 10px; background: var(--bg-secondary); border: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-muted); font-size: 22px; line-height: 1; }
    .board > .add-section-col:hover, .board > .add-section-col:focus-visible { background: var(--bg-card); color: var(--accent); }
    .board > .add-section-col.adding { min-width: 280px; max-width: 280px; height: auto; margin-top: 0; border: 2px solid var(--accent); border-radius: 16px; background: var(--bg-secondary); cursor: default; padding: 12px; }
    .board > .add-section-col.adding input { width: 100% !important; }
    /* Focus mode: everything but the focused card (and its client's card) is blurred */
    body.focus-on #tasksPanel .task-card:not(.focused), body.focus-on #tasksPanel .client-card:not(.focus-client),
    body.focus-on #tasksPanel .done-fold, body.focus-on #tasksPanel .client-list-empty,
    body.focus-on #tasksPanel .column-header, body.focus-on #tasksPanel .add-card,
    body.focus-on #tasksPanel .column.collapsed, body.focus-on #tasksPanel .add-section-col,
    body.focus-on #tasksPanel .today, body.focus-on #boardTools {
      filter: blur(4px); opacity: 0.3; pointer-events: none; transition: filter 0.25s ease, opacity 0.25s ease;
    }
    body.focus-on #tasksPanel .column:not(.has-focus) { background: transparent; }
    /* Selected without a timer: a coral 2px outline; with a timer running on it, its timer ring instead (design/active-look/HANDOFF.md) */
    body.focus-on .client-card.focus-client { z-index: 5; }
    body.focus-on .task-card.focused { position: relative; z-index: 5; box-shadow: 0 12px 40px var(--shadow-hover); }
    body.focus-on .task-card.focused:not(.timer-running, .timer-paused, .wx-running, .harvest-running),
    body.focus-on .client-card.focus-client:not(.timer-running, .timer-paused, .wx-running, .harvest-running),
    .client-card.cc-selected:not(.timer-running, .timer-paused, .wx-running, .harvest-running) { outline: 2px solid var(--accent); outline-offset: -1px; }
    body.focus-on .task-card.focused:is(.timer-running, .wx-running) { box-shadow: 0 0 0 3px color-mix(in srgb, var(--wx-timer) 22%, transparent), 0 12px 40px var(--shadow-hover); }
    body.focus-on .task-card.focused.harvest-running:not(.timer-running, .timer-paused, .wx-running) { box-shadow: 0 0 0 3px rgba(250, 93, 0, 0.22), 0 12px 40px var(--shadow-hover); }
    .focus-bar { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 1200; display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 16px; border-radius: 999px; background: var(--bg-card); border: 1px solid var(--border); box-shadow: 0 10px 30px var(--shadow-hover); font-size: 14px; max-width: calc(100vw - 32px); }
    .focus-bar[hidden] { display: none; }
    .focus-bar span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; color: var(--text-secondary); }
    .focus-bar b { color: var(--text-primary); }
    .focus-bar button { flex: none; padding: 6px 12px; font-size: 13px; }
    .focus-bar kbd { font: inherit; font-size: 11px; color: var(--text-muted); border: 1px solid var(--border); border-radius: 5px; padding: 0 4px; margin-left: 4px; }
    .gh-dialog .check-row { flex-direction: row; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--text-primary); line-height: 1.4; }
    .gh-dialog .check-row input { width: 18px; height: 18px; margin-top: 1px; flex: none; accent-color: var(--accent); }
    @media (prefers-reduced-motion: reduce) { body.focus-on #tasksPanel * { transition: none !important; } }
    /* Resizable columns */
    @media (min-width: 761px) { .board > .column:not(.collapsed):not(.add-section-col) { min-width: var(--col-w, 340px); max-width: var(--col-w, 340px); } }
    .board > .column { position: relative; }
    .col-resize { position: absolute; top: 16px; bottom: 16px; right: -15px; width: 14px; cursor: col-resize; z-index: 3; touch-action: none; }
    .col-resize::after { content: ''; position: absolute; left: 6px; top: 0; bottom: 0; width: 2px; border-radius: 2px; background: transparent; transition: background 0.15s ease; }
    .column:hover > .col-resize::after, .stack:hover > .col-resize::after { background: var(--border); }
    .col-resize:hover::after, .column.resizing > .col-resize::after, .stack.resizing > .col-resize::after { background: var(--accent); }
    .column.collapsed > .col-resize { display: none; }
    .column.resizing { user-select: none; }
    /* Today panel beside the board */
    #tasksPanel.active { flex-direction: row; gap: 20px; }
    #tasksPanel > .board, #tasksPanel > .list-view { flex: 1; min-width: 0; }
    .today { flex: 0 0 var(--today-w, 290px); position: relative; display: flex; flex-direction: column; min-height: 0; margin-bottom: 24px; }
    .today-resize { position: absolute; top: 16px; bottom: 16px; left: -13px; width: 14px; cursor: col-resize; z-index: 3; touch-action: none; }
    .today-resize::after { content: ''; position: absolute; left: 6px; top: 0; bottom: 0; width: 2px; border-radius: 2px; background: transparent; transition: background .15s; }
    .today:hover > .today-resize::after { background: var(--border); }
    .today-resize:hover::after, .today.resizing > .today-resize::after { background: var(--accent); }
    .today.closed > .today-resize { display: none; }
    .today[hidden] { display: none; }
    .today-inner { flex: 1; min-height: 0; overflow-y: auto; background: var(--bg-secondary); border-radius: 20px; padding: 18px 16px; display: flex; flex-direction: column; gap: 18px; }
    .today-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
    .today-head h3 { font-family: 'Mona Sans', 'Figtree', sans-serif; font-stretch: 125%; font-size: 18px; margin: 0; }
    .today-head small { color: var(--text-muted); font-size: 13px; }
    .today-close { width: 32px; height: 32px; padding: 0; display: grid; place-items: center; border: none; background: none; color: var(--text-muted); border-radius: 8px; }
    .today-close:hover { background: var(--bg-card); color: var(--text-primary); }
    .today-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
    .today-sec { display: flex; flex-direction: column; gap: 6px; }
    #todaySchedule, #todayDue, #todayDone { display: flex; flex-direction: column; gap: 6px; }
    .today-sec h4 { margin: 0 0 2px; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
    #todayDoneSec h4 { display: flex; align-items: center; gap: 6px; }
    .today-clear { margin-left: auto; padding: 2px 8px; border: none; border-radius: 999px; background: transparent; box-shadow: none; font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--text-muted); }
    .today-clear:hover { background: var(--bg-secondary); color: var(--text-primary); }
    .today-done-row { display: flex; align-items: stretch; gap: 6px; }
    .today-done-row .today-item { flex: 1; min-width: 0; }
    .today-reopen { flex: none; width: 34px; padding: 0; border-radius: 12px; font-size: 16px; color: var(--text-muted); }
    .today-reopen:hover { color: var(--accent); border-color: var(--accent); }
    .today-item { display: flex; gap: 10px; align-items: flex-start; text-align: left; width: 100%; padding: 9px 10px; border-radius: 12px; border: 1px solid var(--border-light); background: var(--bg-card); font-weight: 500; }
    .today-item:hover { border-color: var(--accent); background: var(--bg-card); }
    .today-item i { width: 4px; align-self: stretch; border-radius: 3px; flex: none; }
    .ti-main { display: flex; flex-direction: column; min-width: 0; }
    .ti-main b { font-size: 13.5px; font-weight: 600; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
    .ti-main small { font-size: 12px; color: var(--text-muted); }
    .today-item.past { opacity: 0.55; }
    .today-item.now { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent); }
    .today-item.late small { color: #e05652; font-weight: 600; }
    .today-hours { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 12px; border-radius: 12px; background: var(--bg-card); }
    .today-hours span { font-size: 13px; color: var(--text-secondary); }
    .today-hours b { font-size: 18px; color: #fa5d00; font-variant-numeric: tabular-nums; }
    .today-run { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 12px; border: 2px solid #fa5d00; background: color-mix(in srgb, #fa5d00 10%, var(--bg-card)); }
    .today-pop { margin-left: auto; flex: none; padding: 4px 10px; font-size: 12px; border-radius: 8px; }
    /* Same as the card on the board (design/task-card/HANDOFF.md §5): Dojo running is moss, Dojo paused is dashed moss */
    .today-run.dj-on { border-color: var(--wx-timer); box-shadow: 0 0 0 3px color-mix(in srgb, var(--wx-timer) 22%, transparent); background: color-mix(in srgb, var(--wx-timer) 10%, var(--bg-card)); }
    .today-run.dj-paused { border-color: var(--wx-timer); border-style: dashed; background: color-mix(in srgb, var(--wx-timer) 6%, var(--bg-card)); }
    .today-run .dot { width: 8px; height: 8px; border-radius: 50%; background: #fa5d00; flex: none; }
    .today-empty { margin: 0; font-size: 13px; color: var(--text-muted); }
    .today-item.done b { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--text-primary) 40%, transparent); }
    #todayDoneCount { font-weight: 500; opacity: .7; }
    #todayDoneSec[hidden], #todayHarvest[hidden], .cp-sec[hidden], #clientsBox[hidden] { display: none; }
    .today-link { border: none; background: none; padding: 0; color: var(--accent); font-weight: 600; font-size: 13px; text-decoration: underline; }
    .today-link:hover { background: none; }
    .today-tab { display: none; }
    .today.closed { flex: 0 0 44px; }
    .today.closed .today-inner { display: none; }
    .today.closed .today-tab { display: flex; flex: 1; align-items: flex-start; justify-content: center; padding: 16px 0; border-radius: 20px; border: none; background: var(--bg-secondary); color: var(--text-muted); font-weight: 700; font-size: 14px; }
    .today.closed .today-tab span { writing-mode: vertical-rl; letter-spacing: 0.04em; }
    .today.closed .today-tab:hover { color: var(--text-primary); }
    @media (max-width: 1100px) { .today { display: none !important; } }
    .column {
      background: var(--bg-secondary);
      border-radius: 20px;
      min-width: 340px;
      max-width: 340px;
      display: flex;
      flex-direction: column;
      height: 100%;
      max-height: 100%;
    }

    .column-header {
      padding: 18px 18px 14px;
      font-weight: 600;
      font-size: 15px;
      color: var(--text-primary);
      display: flex;
      justify-content: space-between;
      align-items: center;
      cursor: grab;
    }

    .column-header:active {
      cursor: grabbing;
    }

    .column.dragging-column {
      opacity: 0.5;
    }

    /* Stacked columns: one board column holding several, one above another */
    /* Each section is as tall as its cards (none cut off); the stack scrolls as a whole when they don't all fit */
    /* A scroller clips what sticks out, so the edge handle lives in a 15px strip of padding (the margin gives it back) */
    .board > .stack { display: flex; flex-direction: column; gap: 12px; min-width: calc(var(--col-w, 340px) + 15px); max-width: calc(var(--col-w, 340px) + 15px); padding-right: 15px; margin-right: -15px; height: 100%; min-height: 0; position: relative; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
    .board > .stack > .col-resize { right: 0; }
    .board:has(.dragging-column) .col-resize { pointer-events: none; } /* a column dropped on an edge goes beside it */
    .stack > .column { min-width: 0; max-width: none; width: 100%; height: auto; max-height: none; flex: 0 0 auto; min-height: 0; }
    .stack > .column > .cards { flex: none; overflow: visible; min-height: 56px; }
    .stack > .column.collapsed { flex: none; min-width: 0; max-width: none; height: auto; }
    .stack > .column.collapsed .column-header { flex-direction: row; justify-content: flex-start; gap: 10px; padding: 12px 16px; height: auto; }
    .stack > .column.collapsed .column-title { writing-mode: horizontal-tb; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
    .stack > .column.collapsed .collapse-btn { order: -1; transform: rotate(-90deg); }
    .stack > .column:not(.collapsed) .collapse-btn { transform: rotate(90deg); } /* open and stacked: points up, like other open sections */
    .stack > .column > .col-resize { display: none; }
    /* Where a dragged column will land: a line beside a column, or the half of a column it will stack into */
    .column-drop-indicator {
      position: fixed;
      z-index: 950;
      pointer-events: none;
      width: 3px;
      background: var(--accent);
      border-radius: 2px;
    }
    .column-drop-indicator.into {
      box-sizing: border-box;
      background: color-mix(in srgb, var(--accent) 18%, transparent);
      border: 2px solid var(--accent);
      border-radius: 14px;
    }

    #openTaskBtn[hidden], #saveBtn[hidden] { display: none !important; }
    .task-search {
      display: none; width: 200px; height: 28px; padding: 0 12px; box-sizing: border-box;
      border: 1px solid var(--border); border-radius: 999px;
      background: var(--bg-card); color: var(--text-primary); font: inherit; font-size: 13px;
    }
    .task-search:focus { outline: none; border-color: var(--accent); }
    .board-search.open .task-search, .task-search.has-query { display: inline-flex; }
    .card-meta { display: flex; gap: 8px; margin: 6px 0 0 30px; flex-wrap: wrap; align-items: center; }
    .time-badge {
      display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-secondary);
      background: color-mix(in srgb, var(--text-primary) 8%, transparent); border-radius: 10px; padding: 2px 8px; cursor: pointer;
    }
    .time-badge input { width: 52px; font: inherit; font-size: 12px; border: 1px solid var(--accent); border-radius: 6px; padding: 1px 4px; }

    /* Hover buttons: one aligned row in the top-right corner (a task card's sits on its top edge, below) */
    .task-card .card-actions, .client-card .card-actions {
      position: absolute; top: 6px; right: 6px;
      display: flex; align-items: center; gap: 2px; padding: 2px;
      border-radius: 999px; background: var(--bg-card);
      box-shadow: 0 1px 4px var(--shadow-hover);
      opacity: 0; pointer-events: none; transition: opacity 0.12s ease;
    }
    .task-card:hover .card-actions, .client-card:hover .card-actions, .client-card:focus-within .card-actions { opacity: 1; pointer-events: auto; }
    /* The hover buttons sit above the card's logo, so a short card's logo never covers them */
    .task-card .card-actions, .client-card .card-actions { z-index: 3; }
    /* Out of the way while typing in the card */
    .task-card:has(input:focus, textarea:focus) .card-actions { opacity: 0; pointer-events: none; }
    .card-actions > * {
      width: 26px; height: 26px; flex: 0 0 26px;
      display: flex; align-items: center; justify-content: center;
      padding: 0; margin: 0; border: none; border-radius: 50%;
      background: transparent; color: var(--text-muted); cursor: pointer;
      font-size: 14px; line-height: 1;
    }
    .card-actions > button:hover { background: var(--bg-secondary); color: var(--text-primary); }
    .card-actions .color-btn::before, .card-actions [data-cc="style"]::before {
      content: ''; width: 15px; height: 15px; border-radius: 50%;
      border: 1px solid var(--border);
      background: conic-gradient(#fdf7a6, #f7c9a8, #ffb3c1, #c8f2b0, #b9d6fb, #e0cdfa, #fdf7a6);
    }
    .card-actions .delete-btn:hover { color: var(--accent); }
    /* Harvest's own Start timer window is 500px wide, centered with a -250px margin: on a narrower screen its left side
       (and its project list) went off the edge. There, it fills the screen less a small margin. */
    @media (max-width: 516px) {
      dialog.harvest-dialog[open] { left: 8px; right: 8px; margin: 0; width: auto; max-width: calc(100vw - 16px); }
    }
    .card-actions .harvest-slot .harvest-timer {
      margin: 0; width: 26px; height: 26px; border-radius: 50%; cursor: pointer;
      display: flex; align-items: center; justify-content: center;
    }
    .card-actions .harvest-slot .harvest-timer:hover { background: rgba(250, 93, 0, 0.14); }
    .card-actions .harvest-slot .harvest-timer.running { background: #fa5d00; }
    .card-actions .harvest-slot .harvest-timer.running g { fill: #fff; }
    /* Harvest opens its popup right after the button, inside this row; keep it clickable and visible */
    .card-actions dialog { pointer-events: auto; opacity: 1; cursor: auto; }

    /* A task card's bar straddles its top border, so it never covers the title (design/task-card/HANDOFF.md);
       a client card's is the same pill in the same place (design/client-card/HANDOFF.md) */
    .task-card .card-actions, .client-card .card-actions {
      top: -21px; right: 10px; gap: 2px; padding: 3px; /* -21px, not the handoff's -17px: at -17px the 38px pill covered the title's top line */
      background: var(--bg-primary); border: 1px solid var(--border);
      box-shadow: 0 6px 16px var(--shadow-hover); z-index: 5;
    }
    .task-card .card-actions > *, .client-card .card-actions > * { width: 30px; height: 30px; flex: 0 0 30px; }
    /* Harvest's own button stays in the bar, out of sight: Start clicks it, and Harvest's window opens beside it */
    .task-card .card-actions > .harvest-slot, .client-card .card-actions > .harvest-slot { width: 0; flex: 0 0 0; overflow: visible; margin-left: -2px; }
    .task-card .card-actions .harvest-slot .harvest-timer, .client-card .card-actions .harvest-slot .harvest-timer { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; clip-path: inset(50%); }
    /* Start: a moss pill (Dojo) with ▾ for Dojo + time / Dojo only / Time only */
    .task-card .card-actions > .start-split, .client-card .card-actions > .start-split { width: auto; flex: none; display: inline-flex; align-items: stretch; height: 30px; border-radius: 999px; background: var(--wx-timer); color: var(--on-wx-timer); overflow: hidden; }
    .start-split button { border: 0; background: transparent; color: inherit; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; }
    .start-split .start-btn { gap: 5px; padding: 0 8px 0 11px; }
    .start-split .start-btn .ico { width: 13px; height: 13px; }
    .start-split .start-more { padding: 0 9px 0 6px; border-left: 1px solid color-mix(in srgb, var(--on-wx-timer) 25%, transparent); font-size: 11px; }
    .start-split button:hover { background: color-mix(in srgb, var(--on-wx-timer) 14%, transparent); }
    .start-split button:focus-visible { outline: 2px solid var(--on-wx-timer) !important; outline-offset: -3px; }
    /* Time starts too: Harvest's orange dot, or a dot in the label colour for WaxOn's own timer */
    .start-dot { width: 8px; height: 8px; border-radius: 50%; background: #fa5d00; box-shadow: 0 0 0 2px var(--wx-timer); margin-left: 1px; }
    .start-dot.waxon { background: var(--on-wx-timer); }
    .start-dot.tracker { background: #e57cd8; } /* Toggl / Clockify */
    .start-menu .menu-ico { font-weight: 700; color: var(--wx-timer); }
    .start-menu .start-pop { display: flex; align-items: center; gap: 8px; padding: 8px 12px; font-size: 13.5px; color: var(--text-primary); cursor: pointer; }
    .start-menu .start-pop input { width: 16px; height: 16px; accent-color: var(--wx-timer); margin: 0; }
    .card-menu .menu-count { margin-left: auto; padding-left: 16px; color: var(--text-muted); font-size: 12px; font-variant-numeric: tabular-nums; }

    /* Card colors: a light tint of the color with a softer border */
    :root { --card-tint: var(--tint-light, 30%); }
    :root[data-theme="dark"] { --card-tint: var(--tint-dark, 17%); }
    @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --card-tint: var(--tint-dark, 17%); } }
    .task-card.colored, .client-card.colored {
      background: color-mix(in srgb, var(--card-color) var(--card-tint), var(--bg-card));
      border-color: color-mix(in srgb, var(--card-color) 45%, transparent);
    }
    .task-card.colored.gradient, .client-card.colored.gradient {
      background: linear-gradient(135deg, color-mix(in srgb, var(--card-color) var(--card-tint), var(--bg-card)), color-mix(in srgb, var(--card-color2) var(--card-tint), var(--bg-card)));
      border-color: color-mix(in srgb, color-mix(in srgb, var(--card-color), var(--card-color2)) 45%, transparent);
    }
    .client-card.colored:hover, .client-card.colored:focus-visible { border-color: color-mix(in srgb, var(--card-color) 90%, transparent); }
    .task-card.colored:hover { border-color: color-mix(in srgb, var(--card-color) 75%, transparent); }

    /* Running cards, one rule: Dojo (and WaxOn's own timer) moss, Harvest orange, both moss; paused is dashed.
       A 2px border and a 3px ring, no outer glow */
    .task-card.timer-running, .task-card.wx-running, .client-card.timer-running, .client-card.wx-running {
      border: 2px solid var(--wx-timer) !important;
      box-shadow: 0 0 0 3px color-mix(in srgb, var(--wx-timer) 22%, transparent);
    }
    .task-card.timer-paused, .client-card.timer-paused { border: 2px dashed var(--wx-timer) !important; }
    .ftimer-live {
      display: inline-flex; align-items: center; gap: 5px;
      background: var(--wx-timer); color: var(--on-wx-timer); border-radius: 12px; padding: 3px 10px;
      font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer;
    }
    .ftimer-live .ftimer-tail { font-weight: 500; margin-left: -1px; }
    .timer-paused .ftimer-live { background: color-mix(in srgb, var(--text-primary) 10%, transparent); color: var(--text-secondary); }

    .task-card.card-flash, .plan-block.card-flash { animation: cardFlash 0.65s ease-in-out 4 alternate; }
    @keyframes cardFlash { to { box-shadow: 0 0 0 4px var(--accent); } }

    /* Harvest timer running on a card (Dojo's moss wins when both run) */
    .task-card.harvest-running:not(.timer-running):not(.timer-paused):not(.wx-running), .client-card.harvest-running {
      border: 2px solid #fa5d00 !important;
      box-shadow: 0 0 0 3px rgba(250, 93, 0, 0.22);
    }
    .card-meta .harvest-live:not(.wx-live) { color: #141413; gap: 5px; }
    .card-meta .harvest-live:not(.wx-live) .harvest-dot { background: #141413; }
    /* "● 0:07:48"; on hover "● ■ Stop" */
    .card-meta .harvest-live:not(.wx-live) .live-label { display: none; }
    .card-meta .harvest-live:not(.wx-live):hover .live-label { display: inline-grid; }
    .card-meta .harvest-live:not(.wx-live):hover .harvest-elapsed { display: none; }
    .harvest-live {
      display: inline-flex; align-items: center; gap: 6px;
      background: #fa5d00; color: #fff; border-radius: 12px; padding: 3px 10px;
      font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer;
    }
    .live-label { display: inline-grid; align-items: center; justify-items: start; }
    .live-label > span, .live-label::after { grid-area: 1 / 1; }
    .live-label::after { content: attr(data-hover); visibility: hidden; }
    .harvest-live:hover .live-label > span, .ftimer-live:hover .live-label > span { visibility: hidden; }
    .harvest-live:hover .live-label::after, .ftimer-live:hover .live-label::after { visibility: visible; }
    .harvest-live > *, .ftimer-live > * { pointer-events: none; }
    .harvest-live:hover, .ftimer-live:hover { filter: brightness(1.08); }
    .harvest-continue {
      display: inline-flex; align-items: center; gap: 5px;
      border: 1.5px solid #fa5d00; color: #fa5d00; background: transparent;
      border-radius: 12px; padding: 2px 10px; font-size: 12px; font-weight: 600;
      font-variant-numeric: tabular-nums; cursor: pointer; opacity: 0.85;
    }
    .harvest-continue:hover { opacity: 1; background: rgba(250, 93, 0, 0.1); }
    .harvest-dot {
      width: 8px; height: 8px; border-radius: 50%; background: #fff;
      animation: harvestPulse 1.2s ease-in-out infinite;
    }
    @keyframes harvestPulse { 50% { opacity: 0.25; } }
    .chip-pop { flex: none; width: 22px; height: 22px; margin: -4px -4px -4px 2px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,0.18); }
    .chip-pop .ico { width: 13px; height: 13px; }
    .timer-chip .chip-pop { background: color-mix(in srgb, currentColor 14%, transparent); margin-left: 6px; }
    .chip-pop:hover, .chip-pop:focus-visible { background: rgba(255,255,255,0.35); outline: none; }
    /* Harvest's and WaxOn's timer chips match the Dojo chip: control on the left, time, task. Orange is Harvest, green is WaxOn's timers */
    .hc-go, .hc-stop { flex: none; width: 24px; height: 24px; margin: -4px 0 -4px -6px; border-radius: 50%; display: grid; place-items: center; color: #fa5d00; background: color-mix(in srgb, currentColor 16%, transparent); }
    .hc-go svg { width: 14px; height: 14px; fill: currentColor; }
    .hc-stop::before { content: ''; width: 9px; height: 9px; border-radius: 2px; background: currentColor; }
    .wx-chip .hc-stop { color: var(--wx-timer); }
    .hc-go:hover, .hc-go:focus-visible, .hc-stop:hover, .hc-stop:focus-visible { background: color-mix(in srgb, currentColor 30%, transparent); outline: none; }
    .hc-x { display: none; flex: none; width: 20px; height: 20px; margin: -4px -6px -4px 0; border-radius: 50%; place-items: center; color: var(--text-muted); font-size: 15px; line-height: 1; }
    .hc-x:hover, .hc-x:focus-visible { background: var(--bg-card); color: var(--text-primary); outline: none; }
    .harvest-chip .chip-pop { background: color-mix(in srgb, currentColor 14%, transparent); margin-left: 6px; }
    .harvest-chip .chip-pop:hover, .harvest-chip .chip-pop:focus-visible { background: color-mix(in srgb, currentColor 26%, transparent); }
    .harvest-chip .hc-time { flex: none; font-family: 'Mona Sans', 'Figtree', sans-serif; font-stretch: 125%; font-variant-numeric: tabular-nums; }
    .harvest-chip {
      padding: 8px 14px; font-weight: 600; font-variant-numeric: tabular-nums;
      background: transparent; color: var(--text-primary); border: 2px solid #fa5d00; box-shadow: 0 0 0 3px rgba(250, 93, 0, 0.22); gap: 8px; align-items: center;
      max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex-shrink: 1; min-width: 0;
    }
    .harvest-chip:hover { background: var(--bg-secondary); }
    .harvest-chip.paused { background: var(--bg-secondary); border: 1px solid var(--border); box-shadow: none; }
    .harvest-chip.paused .hc-time { color: var(--text-muted); }
    .harvest-chip.paused .chip-pop { display: none; }
    .harvest-chip.paused .hc-x { display: grid; }
    /* WaxOn's own timer and Dojo: moss green from the bonsai, so it's never mistaken for Harvest's orange */
    :root { --wx-timer: #4f6a1f; --on-wx-timer: #fff; }
    :root[data-theme="dark"] { --wx-timer: #a3b864; --on-wx-timer: #141413; }
    @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]):not([data-theme="dark"]) { --wx-timer: #a3b864; --on-wx-timer: #141413; } }
    .harvest-live.wx-live { background: var(--wx-timer); border-color: var(--wx-timer); color: var(--on-wx-timer); }
    .harvest-chip.wx-chip { display: inline-flex; border-color: var(--wx-timer); box-shadow: 0 0 0 3px color-mix(in srgb, var(--wx-timer) 22%, transparent); }
    .harvest-chip .hc-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: 500; color: var(--text-secondary); }

    .search-empty { color: var(--text-muted); font-size: 13px; padding: 8px 4px; }

    .column-header .collapse-btn {
      margin-left: auto;
      margin-right: 8px;
      padding: 2px 8px;
      font-size: 14px;
      line-height: 1;
      background: transparent;
      border: none;
      color: var(--text-muted);
      opacity: 0;
      transition: opacity 0.15s ease;
    }
    .column:hover .collapse-btn { opacity: 1; }
    .column-header .collapse-btn:hover { background: var(--bg-card); color: var(--accent); }

    /* Collapsed column: narrow vertical strip like KanbanFlow */
    .column.collapsed {
      min-width: 48px;
      max-width: 48px;
      cursor: pointer;
    }
    .column.collapsed .column-header {
      flex-direction: column-reverse;
      justify-content: flex-end;
      gap: 14px;
      padding: 14px 0;
      height: 100%;
    }
    .column.collapsed .column-title {
      writing-mode: vertical-rl;
      white-space: nowrap;
    }
    .column.collapsed .collapse-btn { margin: 0; opacity: 1; transform: rotate(180deg); }
    .column.collapsed .cards,
    .column.collapsed .add-card { display: none; }
    .column.collapsed .cards.drag-over { display: none; }
    .column.collapsed:hover { background: var(--border-light); }

    .col-display { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border: none; border-radius: 7px; background: none; color: var(--text-muted); cursor: pointer; }
    .col-display:hover, .col-display:focus-visible { background: var(--bg-hover, rgba(127,127,127,.12)); color: var(--text-primary); }
    .col-display .ico { width: 15px; height: 15px; flex: 0 0 15px; }
    .col-display.changed { color: var(--accent); }
    .col-display.changed::after { content: ''; position: absolute; top: 4px; right: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
    .client-display button small { margin-left: auto; padding-left: 12px; color: var(--text-muted); font-size: 12px; }
    .client-display button.on { font-weight: 600; }
    .client-display .cd-dir { margin-left: 6px; color: var(--accent); }
    .client-display .cd-reset { color: var(--accent); }
    .column-header .count {
      background: var(--bg-card);
      padding: 3px 10px;
      border-radius: 12px;
      font-size: 12px;
      font-weight: 500;
      color: var(--text-muted);
    }

    .cards {
      flex: 1;
      overflow-y: auto;
      padding: 24px 14px 18px; /* room above the first card for its hover bar, and below the last for its + Subtask pill */
      min-height: 100px;
    }

    .cards.drag-over {
      background: rgba(217, 119, 87, 0.05);
      border-radius: 8px;
    }

    .task-card {
      background: var(--bg-card);
      border: 1px solid var(--border-light);
      border-radius: 14px;
      padding: 14px 16px;
      margin-bottom: 10px;
      cursor: grab;
      transition: all 0.15s ease;
      box-shadow: 0 1px 3px var(--shadow);
      position: relative;
    }

    .task-card:hover {
      box-shadow: 0 4px 12px var(--shadow-hover);
      border-color: var(--border);
    }

    /* A grip at the left edge on hover says the card can be dragged (the whole card still drags) */
    .drag-grip { position: absolute; left: 3px; top: 50%; transform: translateY(-50%); width: 8px; height: 14px; color: var(--text-muted); opacity: 0; pointer-events: none; transition: opacity .15s ease; }
    .drag-grip svg { display: block; width: 8px; height: 14px; fill: currentColor; }
    @media (hover: hover) { .task-card:hover > .drag-grip { opacity: .7; } }
    .task-card .note-slot { display: none !important; }
    .task-card .add-on-hover {
      display: none;
    }

    .task-card:hover .add-on-hover {
      display: block;
    }
    .task-card:hover:has(> .add-pill) > .add-on-hover { display: none; }
    .add-pill {
      position: absolute; bottom: -15px; left: 44px; z-index: 5;
      display: flex; gap: 2px; padding: 3px; border-radius: 999px;
      background: var(--bg-primary); border: 1px solid var(--border); box-shadow: 0 6px 16px var(--shadow-hover);
      opacity: 0; pointer-events: none; transition: opacity 0.12s ease;
    }
    /* A card whose last row is chips (labels, due, time) gets the pill on the right, so it doesn't sit on the chips */
    .task-card:has(> .card-meta) > .add-pill { left: auto; right: 14px; }
    .add-pill button { height: 24px; padding: 0 10px; border: 0; border-radius: 999px; background: transparent; color: var(--text-muted); font: inherit; font-size: 12.5px; cursor: pointer; }
    .add-pill button:hover { background: var(--bg-secondary); color: var(--text-primary); }
    .task-card:hover > .add-pill, .task-card:focus-within > .add-pill { opacity: 1; pointer-events: auto; }
    .task-card:has(input:focus, textarea:focus) > .add-pill, .task-card.adding-sub > .add-pill { opacity: 0; pointer-events: none; }
    /* Touch: no hover, so a subtask "+" is always on open cards ("+ Subtask" under a card without any, "+ Add subtask" as
       the last row of one with some); labels stay in ⋯ */
    @media (hover: none) {
      .add-pill { position: static; display: flex; opacity: 1; pointer-events: auto; margin: 4px 0 -4px 22px; padding: 0; background: none; border: 0; box-shadow: none; }
      .add-pill button { height: 32px; padding: 0 8px; }
      .task-card .card-subtasks > .subtask.add-on-hover { display: flex; min-height: 32px; align-items: center; }
      .task-card .add-on-hover .add-label, .add-pill [data-action="add-label"] { display: none; }
      .task-card:has(> div:first-of-type > .checkbox.checked) > .add-pill,
      .task-card:has(> div:first-of-type > .checkbox.checked) .card-subtasks > .subtask.add-on-hover { display: none; }
    }


    .color-menu {
      position: fixed;
      z-index: 1600; /* above dialogs, so the Labels window can open color and icon menus */
      display: grid;
      grid-template-columns: repeat(6, 24px);
      gap: 6px;
      padding: 10px;
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 10px;
      box-shadow: 0 6px 20px var(--shadow-hover);
    }

    .color-swatch {
      width: 24px;
      height: 24px;
      padding: 0;
      border-radius: 6px;
      cursor: pointer;
    }

    .custom-swatch {
      border: 1px solid var(--border);
      background: conic-gradient(#ff5f5f, #ffd25f, #7be37b, #5fd3ff, #7b7bff, #ff5fe0, #ff5f5f);
      position: relative;
    }
    .custom-swatch::after {
      content: '+';
      position: absolute; inset: 0;
      display: flex; align-items: center; justify-content: center;
      font-size: 16px; font-weight: 700; color: #fff; text-shadow: 0 0 3px rgba(0,0,0,0.6);
    }

    .color-menu-head { grid-column: 1 / -1; margin-top: 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); }
    .color-menu .style-head { margin-top: 0; }
    .color-menu .style-only { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 8px; padding: 2px 0 6px; margin-bottom: 2px; border-bottom: 1px solid var(--border-light); font-size: 13px; font-weight: 600; color: var(--text-primary); cursor: pointer; }
    .color-menu .style-only input { margin: 0; accent-color: var(--accent); }
    .color-menu .style-only small { grid-column: 2; font-size: 11.5px; font-weight: 400; color: var(--text-muted); }
    .color-menu .hex-row { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-secondary); }
    .color-menu .hex-row input { flex: 1; min-width: 0; font: inherit; font-size: 13px; font-family: ui-monospace, Menlo, monospace; padding: 4px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg-primary); color: var(--text-primary); }
    .color-menu .hex-row.bad input, .color-menu .hex-row input.bad { border-color: #d63539; }
    .color-menu .grad-hex { gap: 4px; }
    .color-menu .grad-hex span { margin-right: 4px; }
    .color-menu .grad-hex input { padding: 4px 4px; font-size: 12px; text-align: center; }
    .color-menu .grad-hex i { font-style: normal; color: var(--text-muted); font-size: 11px; }
    .color-menu .style-row { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
    .color-menu .style-btn { padding: 5px 10px; font-size: 12.5px; font-weight: 600; }
    .color-menu .style-clear { grid-column: 1 / -1; margin-top: 8px; padding: 7px 10px; font-size: 13px; font-weight: 600; border-radius: 10px; }
    .color-menu .style-clear:hover { color: var(--accent); border-color: var(--accent); }
    .grad-custom { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-secondary); border-radius: 8px; padding: 2px 0; }
    .grad-custom span { flex: 1; }
    .grad-custom i { width: 34px; height: 10px; border-radius: 5px; }
    .grad-custom input { width: 26px; height: 24px; padding: 0; border: 1px solid var(--border); border-radius: 6px; background: none; cursor: pointer; }
    /* In use on this card: a ring on the preview, like a selected swatch */
    .grad-custom.selected i { outline: 2px solid var(--accent); outline-offset: 2px; }
    .color-swatch.selected {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }



    .task-card.dragging {
      opacity: 0.5;
      transform: rotate(2deg);
    }

    .card-title {
      font-size: 14px;
      font-weight: 500;
      line-height: 1.5;
      color: var(--text-primary);
    }

    .card-note {
      font-size: 13px;
      color: var(--text-muted);
      margin-top: 6px;
      line-height: 1.4;
      overflow-wrap: break-word;
      word-break: break-word;
    }

    .card-subtasks {
      margin-top: 10px;
      padding-top: 10px;
      border-top: 1px solid var(--border-light);
      font-size: 13px;
      color: var(--text-secondary);
    }

    .worklist-note.private { background: color-mix(in srgb, var(--text-muted) 14%, transparent); color: var(--text-muted); }
    .worklist-note { display: inline-flex; width: fit-content; align-items: center; gap: 5px; margin: 2px 0 4px 30px; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: color-mix(in srgb, #2f6fdf 14%, transparent); color: #2f6fdf; }
    @media (prefers-color-scheme: dark) { .worklist-note { color: #7fa8ff; } }
    .subtask {
      padding: 3px 0;
      display: flex;
      align-items: flex-start;
      gap: 8px;
    }
    .subtask.sub, .list-item-subtask.sub { margin-left: 24px; }
    .add-label { margin-left: 14px; color: var(--text-muted); }
    .add-label:hover, [data-action="add-subtask"] > span:first-child:hover { color: var(--accent); }
    .subtask > .checkbox.checked + span { text-decoration: line-through; color: var(--text-muted); }
    /* Completed cards: a fold at the bottom of the column */
    /* Client cards: the Clients column of a client board */
    .client-card { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 10px; background: var(--bg-card); border: 1px solid var(--border-light); border-radius: 12px; box-shadow: 0 1px 2px var(--shadow); cursor: pointer; }
    .client-card:hover, .client-card:focus-visible { border-color: var(--accent); outline: none; }
    .client-card .client-avatar { flex: 0 0 calc(38px * var(--logo-scale, 1)); width: calc(38px * var(--logo-scale, 1)); height: calc(38px * var(--logo-scale, 1)); border-radius: calc(10px * var(--logo-scale, 1)); font-size: calc(14px * var(--logo-scale, 1)); margin: 0; }
    .client-card .client-avatar:hover { box-shadow: none; }
    .cc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
    .cc-name { font-weight: 600; font-size: 14.5px; color: var(--text-primary); overflow-wrap: anywhere; }
    .cc-facts { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 12.5px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
    .cc-hv { display: inline-flex; align-items: center; gap: 5px; }
    .cc-hv::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #fa5d00; }
    .cc-hv.off::before { background: none; box-shadow: inset 0 0 0 1.5px var(--text-muted); }
    /* A task of this client's running: "▶ task · time" in the ring's colour; it jumps to the task card */
    .cc-run { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; min-width: 0; padding: 0; border: 0; background: none; font: inherit; font-weight: 600; color: var(--wx-timer); cursor: pointer; text-align: left; }
    .cc-run:disabled { cursor: inherit; }
    .cc-run:not(:disabled):hover .cc-run-ti { text-decoration: underline; }
    .cc-run-mark { font-size: 10px; }
    .cc-run-ti { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .client-card.timer-paused .cc-run { color: var(--text-secondary); }
    .client-card.harvest-running .cc-run { color: #c24800; }
    :root[data-theme="dark"] .client-card.harvest-running .cc-run { color: #fa5d00; }
    @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .client-card.harvest-running .cc-run { color: #fa5d00; } }
    .client-card.harvest-running .cc-run-mark { font-size: 9px; }
    .client-card.dragging { opacity: .4; }
    /* Look section in the client panel's Settings: the client's colour as a swatch */
    .cp-swatch { width: 14px; height: 14px; border-radius: 50%; margin-right: 7px; vertical-align: -2px; display: inline-block; border: 1px solid var(--border); background: var(--sw, conic-gradient(#fdf7a6, #f7c9a8, #ffb3c1, #c8f2b0, #b9d6fb, #e0cdfa, #fdf7a6)); }
    .client-card.archived { opacity: .7; }
    .client-drop { height: 3px; margin: -6px 0 7px; background: var(--accent); border-radius: 2px; }
    .client-archive .done-fold-body { padding-top: 2px; }
    .client-card.flash, .task-card.flash { animation: ccFlash 1.2s ease-out; }
    .cp-newtask { margin-left: 10px; padding: 3px 10px; font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--accent); background: none; }
    .qc-scrim { position: fixed; inset: 0; z-index: 1450; background: rgba(10, 10, 9, 0.3); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: cpFade .15s ease-out; }
    .qc-gap { flex: none; margin-bottom: 10px; }
    .qc.task-card { position: fixed; z-index: 1451; margin: 0; cursor: default; display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35); border-color: var(--accent); }
    .qc-head { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--text-muted); }
    .qc-head .client-avatar { width: 28px; height: 28px; flex: 0 0 28px; border-radius: 8px; font-size: 11px; margin: 0; }
    .qc-where b { color: var(--text-primary); font-weight: 600; }
    .qc.task-card input { width: 100%; min-width: 0; font: inherit; color: var(--text-primary); background: transparent; border: none; border-radius: 0; box-shadow: none; outline: none; padding: 2px 0; }
    .qc-title { font-size: 15px; font-weight: 600; }
    .qc-subs { display: flex; flex-direction: column; gap: 6px; }
    .qc-subs:empty { display: none; }
    .qc-sub { display: flex; align-items: center; gap: 8px; margin-left: 4px; font-size: 13.5px; }
    .qc-sub.deeper { margin-left: 28px; }
    .qc-sub .checkbox { width: 16px; height: 16px; min-width: 16px; min-height: 16px; cursor: default; }
    .qc-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
    .qc-hint { flex: 1 1 100%; font-size: 11.5px; color: var(--text-muted); }
    .qc-foot button { padding: 6px 14px; font-size: 13px; }
    @media (hover: none) { .qc-hint { display: none; } }
    @keyframes ccFlash { 0%, 30% { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); } }
    /* The client card, opened over the board */
    .cp-scrim { position: fixed; inset: 0; z-index: 1400; background: rgba(10, 10, 9, 0.35); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: cpFade .18s ease-out; }
    @keyframes cpFade { from { opacity: 0; } }
    .cp { position: fixed; z-index: 1401; top: 0; right: 0; bottom: 0; width: min(600px, 100%); display: flex; flex-direction: column; background: var(--bg-primary); box-shadow: -12px 0 40px rgba(0, 0, 0, 0.25); padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); animation: cpIn .18s ease-out; }
    @keyframes cpIn { from { transform: translateX(24px); opacity: 0; } }
    .cp:not(.cp-enter), .cp-scrim:not(.cp-enter) { animation: none; } /* only the first draw fades in, not each redraw */
    /* Beside the clicked card: a panel of the board's height, growing out of the card */
    .cp.cp-docked { border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35); z-index: 1402; }
    .cp.cp-docked.cp-enter { animation: cpGrow .2s cubic-bezier(.2, .8, .2, 1); }
    .cp.cp-right { transform-origin: left center; } .cp.cp-left { transform-origin: right center; }
    @keyframes cpGrow { from { opacity: 0; transform: scale(.96); } }
    .cp-notch { position: absolute; width: 14px; height: 14px; background: var(--bg-primary); border: 1px solid var(--border); transform: translateY(-50%) rotate(45deg); }
    .cp-right .cp-notch { left: -8px; border-top: none; border-right: none; }
    .cp-left .cp-notch { right: -8px; border-bottom: none; border-left: none; }
    .cp-ghost { position: fixed; z-index: 1401; cursor: pointer; }
    .cp-ghost > * { margin: 0 !important; box-shadow: 0 0 0 2px var(--accent), 0 10px 30px rgba(0, 0, 0, 0.3) !important; pointer-events: none; }
    .cp-ghost .card-actions { display: none; }
    @media (prefers-reduced-motion: reduce) { .cp, .cp-scrim { animation: none; } }
    .cp-head { display: flex; align-items: center; gap: 14px; padding: 18px 20px 14px; border-bottom: 1px solid var(--border-light); }
    /* Opened from a client's changelog page: the way back there, above the client's name */
    .cp-back, .settings-back { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; min-height: 36px; padding: 0 12px; font-size: 13.5px; font-weight: 600; color: var(--accent); text-decoration: none; border-radius: 9px; }
    .cp-back { margin: 8px 8px -6px; }
    .cp-back:hover, .settings-back:hover { background: var(--bg-secondary); }
    .settings-back { margin: -4px 0 8px; }
    .cp-srow-end > a.cp-link-btn { display: inline-flex; align-items: center; gap: 5px; text-decoration: none; }
    .cp-head .client-avatar { flex: 0 0 52px; width: 52px; height: 52px; border-radius: 13px; font-size: 18px; margin: 0; cursor: default; }
    .cp-head .client-avatar:hover { box-shadow: none; }
    .cp-head-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
    .cp-head h2 { margin: 0; font-family: 'Mona Sans', 'Figtree', sans-serif; font-stretch: 125%; font-weight: 600; font-size: 21px; overflow-wrap: anywhere; }
    .cp-site { font-size: 13px; color: var(--text-muted); text-decoration: none; }
    a.cp-site:hover { color: var(--accent); }
    .cp-close { flex: none; align-self: flex-start; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: none; background: none; border-radius: 10px; font-size: 24px; line-height: 1; color: var(--text-muted); }
    .cp-close:hover { background: var(--bg-secondary); color: var(--text-primary); }
    .cp-body { flex: 1; overflow-y: auto; padding: 4px 20px 28px; }
    .cp-sec { display: flex; flex-direction: column; gap: 10px; padding: 16px 0; border-bottom: 1px solid var(--border-light); }
    .cp-sec:last-child { border-bottom: none; }
    .cp-sec h3 { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--text-muted); }
    .cp-aside { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 12.5px; }
    .cp-muted { font-size: 12.5px; color: var(--text-muted); margin: 0; }
    /* Sharing → Also let in: addresses the owner approved for the client link */
    .cp-viewer { display: inline-flex; align-items: center; gap: 2px; padding: 1px 2px 1px 8px; border-radius: 999px; border: 1px solid var(--border); font-size: 12.5px; margin: 2px 2px 0 0; }
    .cp-viewer-x { width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--text-muted); font-size: 14px; line-height: 1; cursor: pointer; }
    .cp-viewer-x:hover { background: var(--bg-secondary); color: var(--text-primary); }
    .cp-task { display: flex; align-items: center; gap: 10px; padding: 2px 0; }
    .cp-task .checkbox { width: 18px; height: 18px; min-width: 18px; min-height: 18px; padding: 0; background: none; }
    .cp-task-title { flex: 1; min-width: 0; overflow-wrap: anywhere; }
    .cp-col { font-size: 11.5px; color: var(--text-muted); white-space: nowrap; }
    .cp-add { display: flex; gap: 8px; }
    .cp-add input, .cp-today textarea, .cp-field input, .cp-field select { font: inherit; font-size: 14px; color: var(--text-primary); background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; }
    /* Our own arrow, with room on the right (the browser's sits against the edge) */
    .cp-field select { -webkit-appearance: none; appearance: none; padding-right: 36px; cursor: pointer;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a8a85' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
      background-repeat: no-repeat; background-position: right 14px center; background-size: 12px; }
    .cp-add input { flex: 1; min-width: 0; }
    .cp-today { display: flex; flex-direction: column; gap: 8px; }
    .cp-today textarea { resize: vertical; min-height: 120px; max-height: 50vh; line-height: 1.45; }
    .cp-filter { align-self: flex-start; padding: 4px 10px; font-size: 12.5px; font-weight: 600; color: var(--accent); background: none; border: 1px solid var(--border); }
    .cp-subs { display: flex; flex-direction: column; gap: 4px; margin: -2px 0 4px 28px; }
    .cp-sub { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-secondary); cursor: pointer; }
    .cp-sub.deeper { margin-left: 22px; }
    .cp-sub.done span { text-decoration: line-through; color: var(--text-muted); }
    .cp-sub .checkbox { width: 15px; height: 15px; min-width: 15px; min-height: 15px; padding: 0; background: none; }
    .cp-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
    .cp-today .cp-row button { margin-left: auto; }
    .cp-log { display: flex; flex-direction: column; gap: 8px; }
    .cp-day { display: flex; flex-direction: column; gap: 6px; }
    .cp-date { display: flex; align-items: baseline; gap: 10px; font-size: 12.5px; font-weight: 700; color: var(--text-secondary); }
    .cp-day-fold { gap: 0; }
    .cp-day-fold > summary { cursor: pointer; list-style: none; min-width: 0; padding: 2px 0; }
    .cp-day-fold > summary::-webkit-details-marker { display: none; }
    .cp-day-fold > summary::before { content: '\203A'; font-size: 15px; line-height: 1; color: var(--text-muted); transition: transform .15s; }
    .cp-day-fold[open] > summary::before { transform: rotate(-90deg); }
    .cp-day-fold[open] > summary { margin-bottom: 6px; }
    .cp-day-fold[open] > .cp-entry + .cp-entry { margin-top: 6px; }
    .cp-day-fold > summary { white-space: nowrap; }
    .cp-peek { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 400; color: var(--text-muted); }
    .cp-day-fold[open] .cp-peek { visibility: hidden; }
    .cp-hrs { margin-left: auto; font-weight: 500; color: var(--text-muted); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
    .cp-entry { font-size: 13.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--bg-card); border: 1px solid var(--border-light); border-radius: 10px; padding: 8px 10px; }
    .cp-entry:not(.work) { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; line-clamp: 5; overflow: hidden; }
    .cp-entry.expanded { display: block; -webkit-line-clamp: unset; line-clamp: none; overflow: visible; }
    /* Client card, "Today first": a compact header, Today | Settings tabs, raised cards on Today, flat sections in
       Settings, and a footer bar on Today */
    .cp-head { gap: 12px; padding: 14px 12px 12px 18px; border-bottom: none; }
    .cp-head .client-avatar { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 10px; font-size: 14px; }
    .cp-head h2 { font-size: 17px; font-stretch: 100%; letter-spacing: -0.01em; }
    .cp-subline { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 7px; font-size: 12.5px; color: var(--text-muted); min-width: 0; }
    .cp-subline .cp-site { font-size: 12.5px; }
    .cp-subline b { color: var(--text-primary); font-weight: 600; font-variant-numeric: tabular-nums; }
    .cp-hv-dot { width: 6px; height: 6px; border-radius: 3px; background: var(--accent); }
    .cp-icon { flex: none; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; padding: 0; border: none; border-radius: 10px; background: none; color: var(--text-secondary); cursor: pointer; }
    .cp-icon:hover { background: var(--bg-secondary); color: var(--text-primary); }
    .cp-icon svg { width: 18px; height: 18px; }
    .cp-head .cp-close { align-self: center; }
    .cp-tabs { display: flex; gap: 4px; padding: 0 18px; border-bottom: 1px solid var(--border-light); }
    .cp-tabs [role="tab"] { height: 44px; padding: 0 10px; margin-bottom: -1px; border: none; border-bottom: 2px solid transparent; border-radius: 0; background: none; color: var(--text-muted); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
    .cp-tabs [role="tab"][aria-selected="true"] { color: var(--text-primary); font-weight: 600; border-bottom-color: var(--accent); }
    .cp-tabs [role="tab"]:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
    .cp-body { padding: 16px 18px 20px; }
    .cp-pane { display: flex; flex-direction: column; gap: 14px; }
    .cp-pane[hidden], .cp-foot[hidden] { display: none; }
    .cp-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; }
    .cp-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
    .cp-card-title { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; color: var(--text-primary); }
    .cp-card-title-sm { font-size: 15px; font-weight: 600; }
    .cp-card-muted { margin-left: 6px; font-size: 13px; font-weight: 500; color: var(--text-muted); }
    .cp-card-aside { font-size: 13px; color: var(--text-secondary); font-variant-numeric: tabular-nums; white-space: nowrap; }
    .cp-card-aside b { color: var(--text-primary); }
    .cp-today-card .cp-today textarea { min-height: 128px; background: var(--bg-primary); padding: 12px 14px; font-size: 14.5px; line-height: 1.5; }
    .cp-today-items { display: flex; flex-direction: column; gap: 4px; padding-top: 8px; border-top: 1px solid var(--border); }
    .cp-ti { display: flex; align-items: center; gap: 10px; min-height: 36px; font-size: 14px; }
    .cp-ti > svg { flex: none; width: 16px; height: 16px; }
    .cp-ti .cp-ok { color: #3f9d5c; }
    .cp-ti-title { flex: 1; min-width: 0; overflow-wrap: anywhere; }
    .cp-tag { margin-left: 4px; font-size: 11.5px; color: var(--text-muted); }
    .cp-ti-gap { font-size: 12.5px; color: var(--text-muted); }
    .cp-ti .cp-hrs { margin-left: 0; }
    .cp-link-btn { border: none; background: none; padding: 4px 2px; color: var(--accent); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
    .cp-link-btn.cp-quiet { color: var(--text-muted); font-weight: 500; }
    .cp-link-btn.cp-quiet:hover { color: var(--text-primary); }
    .cp-card .cp-add input { height: 42px; box-sizing: border-box; background: var(--bg-primary); }
    .cp-add-btn { flex: none; display: inline-flex; align-items: center; gap: 4px; height: 42px; padding: 0 16px 0 12px; border: 1px solid var(--accent); border-radius: 10px; background: var(--accent); color: #fff; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
    .cp-add-btn .ico { stroke-width: 2.6; }
    .cp-earlier { display: flex; flex-direction: column; padding-top: 6px; }
    .cp-earlier-head { display: flex; justify-content: space-between; align-items: baseline; padding: 0 2px 6px; }
    .cp-earlier-head h3 { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
    .cp-earlier-head a, .cp-older { font-size: 12.5px; color: var(--accent); text-decoration: none; }
    .cp-older { margin-top: 10px; }
    .cp-earlier .cp-log { gap: 0; }
    .cp-earlier .cp-day-fold { border-top: 1px solid var(--border-light); }
    .cp-earlier .cp-day-fold:last-child { border-bottom: 1px solid var(--border-light); }
    .cp-earlier .cp-day-fold[open] { padding-bottom: 10px; }
    .cp-day-fold > summary.cp-erow { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 40px; padding: 0 2px; font-size: 13.5px; font-weight: 400; color: var(--text-secondary); }
    .cp-day-fold > summary.cp-erow::before { display: none; }
    .cp-edate { font-size: 12.5px; color: var(--text-muted); white-space: nowrap; }
    .cp-erow .cp-peek { color: var(--text-secondary); }
    .cp-erow .cp-peek.only { color: var(--text-muted); }
    .cp-erow .cp-hrs { margin-left: 0; }
    .cp-pane-settings { gap: 0; }
    .cp-pane-settings .cp-sec { padding: 16px 0; border-bottom: 1px solid var(--border-light); }
    .cp-pane-settings .cp-sec h3 { font-size: 12px; font-weight: 600; letter-spacing: .06em; }
    .cp-pane-settings .cp-box { padding: 0; background: none; border: none; border-radius: 0; }
    .cp-pane-settings label.cp-field { display: grid; grid-template-columns: 110px minmax(0, 1fr); align-items: center; gap: 10px; font-size: 13.5px; color: var(--text-secondary); }
    .cp-pane-settings .cp-field input, .cp-pane-settings .cp-field select { height: 40px; box-sizing: border-box; }
    .cp-all-settings { margin-top: 16px; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px; font-size: 13.5px; font-weight: 500; color: var(--accent); text-decoration: none; text-align: center; }
    button.cp-all-settings { width: 100%; background: none; font-family: inherit; cursor: pointer; }
    button.cp-all-settings:hover { border-color: var(--accent); }
    .cp-foot { display: flex; align-items: center; gap: 4px; padding: 8px 10px 8px 18px; border-top: 1px solid var(--border-light); background: var(--bg-secondary); }
    .cp.cp-docked .cp-foot { border-radius: 0 0 16px 16px; }
    .cp-foot-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--accent); text-decoration: none; }
    .cp-foot-btn { flex: none; min-width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0 10px; border: none; border-radius: 10px; background: none; color: var(--text-secondary); font: inherit; font-size: 12.5px; font-weight: 500; cursor: pointer; }
    .cp-foot-btn:hover { background: var(--bg-card); color: var(--text-primary); }
    .cp-foot-btn svg { width: 18px; height: 18px; }
    .cp-pane-settings a { color: var(--accent); }
    .cp-rep-row select, .cp-csv select { height: 40px; box-sizing: border-box; font: inherit; font-size: 14px; color: var(--text-primary); background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 0 10px; }
    .cp-rep-row select { flex: 1; min-width: 0; }
    @media (max-width: 520px) { .cp-rep-row select { flex: 1 1 100%; } }
    @media (max-width: 520px) { .cp-pane-settings label.cp-field { grid-template-columns: 1fr; gap: 4px; } }
    .cp-card-head { align-items: center; }
    .cp-card-head h3 { flex: 1; min-width: 0; }
    .cp-grip { flex: none; width: 22px; height: 32px; margin: -6px -4px -6px -8px; display: flex; align-items: center; justify-content: center; padding: 0; border: none; border-radius: 6px; background: none; color: var(--text-muted); cursor: grab; opacity: .55; }
    .cp-grip svg { width: 8px; height: 14px; fill: currentColor; }
    .cp-grip:hover, .cp-grip:focus-visible { opacity: 1; background: var(--bg-secondary); }
    .cp-grip:active { cursor: grabbing; }
    @media (hover: none), (pointer: coarse) { .cp-grip { width: 44px; height: 44px; margin: -12px -8px -12px -14px; opacity: 0.8; touch-action: none; } }
    /* D-5: Settings as groups of rows, and Billing. A group is one rounded list; each setting is a row of at least 46px. */
    .cp-pane-settings, .cp-pane-billing { gap: 22px; }
    .cp-chips { position: sticky; top: -16px; z-index: 2; display: flex; gap: 6px; margin: -16px 0 -8px; padding: 12px 0 10px; background: var(--bg-primary); overflow-x: auto; scrollbar-width: none; }
    .cp-chips::-webkit-scrollbar { display: none; }
    @media (max-width: 560px) { .cp-chips { top: -4px; margin-top: -4px; } } /* the panel's top padding is 4px on phones */
    .cp-chips button { flex: none; height: 32px; padding: 0 13px; border: 1px solid var(--border); border-radius: 999px; background: none; color: var(--text-secondary); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; }
    .cp-chips button:hover { color: var(--text-primary); background: var(--bg-secondary); }
    .cp-chips button[aria-current="true"] { background: var(--text-primary); border-color: var(--text-primary); color: var(--bg-primary); }
    .cp-grp { display: flex; flex-direction: column; gap: 8px; scroll-margin-top: 56px; }
    .cp-grp > h3 { margin: 0 2px; font-family: 'Mona Sans', 'Figtree', sans-serif; font-stretch: 125%; font-size: 15px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--text-primary); }
    .cp-list { display: flex; flex-direction: column; background: var(--bg-secondary); border-radius: 12px; overflow: hidden; }
    .cp-list > * + * { border-top: 1px solid var(--border-light); }
    .cp-list > [hidden] { display: none; }
    .cp-srow { display: flex; align-items: center; gap: 12px; min-height: 46px; box-sizing: border-box; padding: 8px 14px; font-size: 14px; color: var(--text-primary); }
    .cp-srow-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
    .cp-srow-label { font-weight: 500; overflow-wrap: anywhere; }
    .cp-srow-label label { cursor: pointer; }
    .cp-srow-help { font-size: 12.5px; line-height: 1.4; color: var(--text-muted); overflow-wrap: anywhere; }
    .cp-srow-help code { font-size: 12px; color: var(--text-secondary); }
    .cp-srow-end { flex: none; display: flex; align-items: center; gap: 6px; max-width: 60%; }
    .cp-srow-end > button, .cp-srow-end > a.cp-link-btn { height: 34px; padding: 0 12px; font-size: 13px; white-space: nowrap; }
    .cp-srow-end > button.tc-switch { height: 20px; padding: 0; margin: 0 2px; }
    .cp-srow-input, .cp-srow-select { width: 220px; max-width: 100%; height: 36px; box-sizing: border-box; font: inherit; font-size: 14px; color: var(--text-primary); background: var(--bg-card); border: 1px solid var(--border); border-radius: 9px; padding: 0 10px; }
    .cp-srow-select, .cp-inline-pick select, .cp-month-pick select { -webkit-appearance: none; appearance: none; padding-right: 30px; cursor: pointer;
      background: var(--bg-card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a8a85' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 11px center / 11px; }
    .cp-srow-value { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; height: 34px; padding: 0 4px 0 10px; border: none; background: none; color: var(--text-secondary); font: inherit; font-size: 13px; cursor: pointer; }
    .cp-srow-value:hover { color: var(--text-primary); background: var(--bg-card); }
    .cp-srow-value > span:not(.cp-swatch):not(.cp-chev) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .cp-srow-value .cp-swatch { margin-right: 0; flex: none; }
    .cp-chev { flex: none; font-size: 18px; line-height: 1; color: var(--text-muted); transition: transform .15s; }
    .cp-fold > summary { cursor: pointer; list-style: none; }
    .cp-fold > summary::-webkit-details-marker { display: none; }
    .cp-fold > summary:hover { background: color-mix(in srgb, var(--bg-card) 45%, transparent); }
    .cp-fold[open] > summary .cp-chev { transform: rotate(90deg); }
    .cp-fold-body { display: flex; flex-direction: column; gap: 10px; padding: 2px 14px 14px; }
    .cp-fold-body .cp-field input, .cp-fold-body .cp-field select { background: var(--bg-card); }
    .cp-srow-wide { flex-direction: column; align-items: stretch; gap: 8px; padding: 12px 14px; }
    .cp-srow-lead .cp-srow-label { font-weight: 600; }
    .cp-srow.cp-danger .cp-srow-label { color: #c4402f; }
    .cp-srow.cp-danger .cp-del { height: 34px; padding: 0 12px; border: 1px solid color-mix(in srgb, #c4402f 45%, transparent); border-radius: 9px; color: #c4402f; }
    .cp-srow-wide.cp-danger .cp-row button:first-child { background: #c4402f; border-color: #c4402f; color: #fff; }
    .cp-switch { width: 20px; height: 20px; margin: 0 4px; accent-color: var(--accent); cursor: pointer; }
    .cp-inline-pick { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; }
    .cp-inline-pick select { height: 30px; font: inherit; font-size: 12.5px; color: var(--text-primary); border: 1px solid var(--border); border-radius: 8px; padding-left: 8px; }
    .cp-in-row .cp-srow-help code { word-break: break-all; }
    .cp-srow .cp-qlinks { justify-content: flex-end; }
    .cp-srow-wide .cp-hours { padding: 2px 0; }
    .cp-bill-top { gap: 14px; }
    .cp-bill-top .cp-hours { align-items: baseline; }
    .cp-bill-top .cp-big { font-size: 30px; }
    .cp-month-pick { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-muted); }
    .cp-month-pick select { flex: 1; min-width: 0; height: 40px; font: inherit; font-size: 14px; font-weight: 600; color: var(--text-primary); border: 1px solid var(--border); border-radius: 10px; padding-left: 12px; }
    .cp-pane-billing .cp-inv-list { gap: 4px; }
    .cp-list-solo { margin-top: 0; }
    .cp-pane-settings .cp-all-settings { margin-top: 0; }
    @media (max-width: 520px) {
      .cp-srow:not(.cp-srow-wide):has(.cp-srow-input, .cp-srow-select) { flex-direction: column; align-items: stretch; gap: 6px; }
      .cp-srow:has(.cp-srow-input, .cp-srow-select) .cp-srow-end { max-width: none; }
      .cp-srow-input, .cp-srow-select { width: 100%; }
    }
    .cp-card.cp-dragging { opacity: .45; }
    .cp-card.cp-drop-before { box-shadow: 0 -3px 0 var(--accent); }
    .cp-card.cp-drop-after { box-shadow: 0 3px 0 var(--accent); }
    .cp-today-items .cp-entry:not(.work):not(.expanded) { -webkit-line-clamp: 3; line-clamp: 3; }
    .cp-pane-settings .hv-btn { background: none; color: var(--accent); border: 1px solid var(--accent); box-shadow: none; }
    .cp-work-items { list-style: none; margin: 2px 0 6px 26px; padding: 0; display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--text-secondary); }
    .cp-work-items li { position: relative; padding-left: 18px; overflow-wrap: anywhere; }
    .cp-work-items li::before { content: '✓'; position: absolute; left: 0; color: var(--text-muted); }
    .cp-work-items li.sub { margin-left: 18px; }
    .cp-day-fold .cp-work-items { margin-left: 12px; }
    .cp-day-actions { display: flex; align-items: center; gap: 18px; margin-top: 6px; }
    .cp-day-actions .cp-more { align-self: auto; }
    .cp-edit-day { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--accent); text-decoration: none; }
    .cp-edit-day:hover { text-decoration: underline; }
    .cp-del-day { color: var(--text-secondary); }
    .cp-del-day.confirm { color: #d14343; }
    .cp-work-head { display: flex; gap: 8px; align-items: baseline; }
    .cp-work-head::before { content: '\2713'; color: #2f9e6e; font-weight: 700; }
    .cp-work-head .cp-hrs { margin-left: auto; }
    .cp-entry.work .cp-work-items { margin: 6px 0 0 22px; }
    .cp-earlier .cp-entry:not(.work) { display: block; -webkit-line-clamp: unset; line-clamp: none; overflow: visible; }
    .cp-day-fold > summary.cp-erow { grid-template-columns: 76px minmax(0, 1fr) auto 12px; }
    .cp-chev { color: var(--text-muted); font-size: 15px; line-height: 1; transition: transform .15s; justify-self: end; }
    .cp-day-fold[open] .cp-chev { transform: rotate(-90deg); }
    .cp-edit-box { display: flex; flex-direction: column; gap: 8px; }
    .cp-edit-box textarea { font: inherit; font-size: 14px; line-height: 1.5; color: var(--text-primary); background: var(--bg-primary); border: 1px solid var(--accent); border-radius: 10px; padding: 10px 12px; resize: vertical; min-height: 120px; }
    .cp-edit-box .cp-row .cp-muted { flex: 1; }
    .cp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .cp-by { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 18px; padding: 0 5px; margin-left: 6px; border-radius: 9px; background: var(--bg-secondary); color: var(--text-secondary); font-size: 10.5px; font-weight: 700; letter-spacing: .02em; vertical-align: middle; }
    .space-chip { display: inline-block; margin-right: 8px; padding: 2px 8px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 600; vertical-align: middle; }
    .team-body { display: flex; flex-direction: column; gap: 12px; }
    .team-body h4 { margin: 8px 0 0; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
    .team-list, .team-members, .team-invites { display: flex; flex-direction: column; gap: 6px; }
    .team-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; font-size: 14px; }
    .team-row > span:not(.team-av):not(.team-role):not(.team-here) { flex: 1; min-width: 0; overflow-wrap: anywhere; }
    .team-row small { color: var(--text-muted); font-size: 12.5px; }
    .team-invites .team-row { border-color: var(--accent); }
    .team-av { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-secondary); font-size: 12px; font-weight: 700; color: var(--text-secondary); }
    .team-here, .team-role { font-size: 12.5px; color: var(--text-muted); }
    .team-invited { opacity: .8; }
    .team-invite, .team-new { display: flex; gap: 8px; flex-wrap: wrap; }
    .team-invite input, .team-new input { flex: 1 1 200px; min-width: 0; }
    .team-invite select, .team-row select { font: inherit; font-size: 13.5px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-card); color: var(--text-primary); }
    .cp-more { align-self: flex-start; border: 0; background: none; padding: 0 2px; color: var(--accent); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
    .cp-entry.work { white-space: normal; } /* the ✓ is on .cp-work-head, the steps sit under it */
    .cp-links { display: flex; gap: 16px; font-size: 13px; }
    .cp-links a, .cp-qlinks a { color: var(--accent); text-decoration: none; }
    .cp-links a:hover, .cp-qlinks a:hover { text-decoration: underline; }
    .cp-box { display: flex; flex-direction: column; gap: 10px; background: var(--bg-card); border: 1px solid var(--border-light); border-radius: 12px; padding: 12px; }
    .cp-field { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--text-muted); }
    .cp-check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-primary); }
    .cp-hours { flex-wrap: wrap; }
    .cp-hv-run { align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, #fa5d00 12%, transparent); }
    .cp-hv-run > span:nth-child(2) { flex: 1; min-width: 0; }
    .cp-hv-run b { white-space: nowrap; }
    .cp-hv-run .harvest-dot { flex: none; background: #fa5d00; }
    .cp-range { margin-left: auto; display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
    .cp-range button { border: none; border-radius: 0; background: none; padding: 4px 9px; font: inherit; font-size: 12px; color: var(--text-muted); cursor: pointer; }
    .cp-range button + button { border-left: 1px solid var(--border); }
    .cp-range button[aria-pressed="true"] { background: var(--accent); color: #fff; }
    .cp-tasklist { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
    .cp-big { font-family: 'Mona Sans', 'Figtree', sans-serif; font-stretch: 125%; font-weight: 600; font-size: 24px; font-variant-numeric: tabular-nums; }
    .hv-btn { background: #fa5d00; border-color: #fa5d00; color: #fff; }
    .cp-share { display: flex; gap: 8px; align-items: center; }
    .cp-share code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: var(--bg-card); border: 1px solid var(--border-light); border-radius: 10px; padding: 8px 10px; font-size: 12.5px; }
    .cp-opts, .cp-details { display: flex; flex-direction: column; }
    .cp-opts summary, .cp-details summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--text-muted); }
    .cp-details summary { font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
    .cp-opts summary::-webkit-details-marker, .cp-details summary::-webkit-details-marker { display: none; }
    .cp-opts summary::before, .cp-details summary::before { content: '\203A'; font-size: 16px; line-height: 1; transition: transform .15s; }
    .cp-opts[open] summary::before, .cp-details[open] summary::before { transform: rotate(-90deg); }
    .cp-opts[open] > :not(summary), .cp-details[open] > :not(summary) { margin-top: 10px; }
    .cp-qlinks { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13.5px; }
    .cp-danger { font-size: 13px; }
    .cp-del { border: none; background: none; padding-left: 0; color: #c4402f; }
    @media (max-width: 560px) { .cp-head { padding: 14px 16px 12px; } .cp-body { padding: 4px 16px 24px; } }
    .client-list-empty { margin: 4px 2px 10px; font-size: 13px; line-height: 1.5; color: var(--text-muted); }
    .done-fold { margin-top: 4px; }
    /* A finished card: title only until opened */
    .task-card.compact .card-subtasks, .task-card.compact .card-note { display: none; }
    /* A card collapsed to its checkbox and title, with the arrow to open it */
    .card-fold { flex: none; align-self: flex-start; width: 22px; height: 22px; margin-left: auto; padding: 0; display: grid; place-items: center; border: none; border-radius: 6px; background: transparent; box-shadow: none; color: var(--text-muted); font-size: 16px; line-height: 1; opacity: 0; transform: rotate(-90deg); transition: opacity 0.15s ease; }
    .task-card:hover .card-fold, .card-fold:focus-visible { opacity: 0.8; }
    .card-fold:hover { opacity: 1; background: var(--bg-secondary); color: var(--text-primary); }
    .task-card.folded .card-fold { opacity: 0.7; transform: rotate(90deg); } /* down: opens; up (below): collapses */
    @media (hover: none) { .card-fold { opacity: 0.6; } }
    /* + beside the title: a new subtask at the top of the list, however long the card */
    .title-add { flex: none; align-self: flex-start; width: 24px; height: 24px; margin-left: auto; padding: 0; display: grid; place-items: center; border: none; border-radius: 6px; background: transparent; box-shadow: none; color: var(--text-muted); font-size: 18px; font-weight: 500; line-height: 1; opacity: 0; transition: opacity 0.15s ease; }
    .title-add + .card-fold { margin-left: 0; }
    .task-card:hover .title-add, .title-add:focus-visible { opacity: 0.8; }
    .title-add:hover { opacity: 1; background: var(--bg-secondary); color: var(--accent); }
    @media (hover: none) { .title-add { opacity: 0.75; width: 32px; height: 32px; font-size: 22px; margin-top: -4px; } }
    .task-card.folded .title-add { opacity: 0; }
    .task-card.folded:hover .title-add { opacity: 0.8; }
    @media (hover: none) { .task-card.folded .title-add { display: none; } } /* a folded card on a phone stays just its title */
    .task-card.folded > :not(:first-of-type):not(.drag-grip), .task-card.folded > div:first-of-type > .client-avatar { display: none; }
    /* …and its logo sits low, clear of the hover buttons */
    .task-card.compact > div:first-of-type > .client-avatar { top: auto; bottom: 8px; transform: none; width: calc(30px * var(--logo-scale, 1)); height: calc(30px * var(--logo-scale, 1)); border-radius: 9px; }
    .done-more { display: inline-flex; align-items: center; gap: 5px; margin: 4px 0 0 30px; padding: 2px 8px 2px 6px; border: none; border-radius: 999px; background: none; color: var(--text-muted); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
    .done-more span { display: inline-block; font-size: 14px; line-height: 1; transition: transform .15s; }
    .done-more[aria-expanded="true"] span { transform: rotate(-90deg); }
    .done-more:hover { color: var(--text-primary); background: var(--bg-secondary); }
    /* Ticked subtasks of an open card wait in "✓ n done" */
    .subtask.st-tucked { display: none; }
    .st-done-line { display: inline-flex; align-items: center; gap: 5px; margin: 2px 0; padding: 2px 8px 2px 4px; border: none; border-radius: 999px; background: none; color: var(--text-muted); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
    .st-done-line span { display: inline-block; font-size: 14px; line-height: 1; transition: transform .15s; }
    .st-done-line[aria-expanded="true"] span { transform: rotate(-90deg); }
    .st-done-line:hover { color: var(--text-primary); background: var(--bg-secondary); }
    /* ✎ next to a column's name: rename it */
    .col-rename { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; padding: 0; border: none; background: none; border-radius: 6px; color: var(--text-muted); opacity: 0.5; cursor: pointer; }
    .col-rename:hover, .col-rename:focus-visible { opacity: 1; color: var(--text-primary); background: var(--bg-secondary); }
    .column.collapsed .col-rename { display: none; }
    .col-delete { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; padding: 0; border: none; background: none; border-radius: 6px; color: var(--text-muted); opacity: 0; cursor: pointer; }
    .column:hover .col-delete { opacity: 0.5; }
    .col-delete:hover, .col-delete:focus-visible, .column:hover .col-delete:hover { opacity: 1; color: var(--danger, #e5484d); background: var(--bg-secondary); }
    .column.collapsed .col-delete { display: none; }
    @media (hover: none) { .col-delete { opacity: 0.5; } }
    .col-minimize { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; padding: 0; border: none; background: none; border-radius: 6px; color: var(--text-muted); opacity: 0; cursor: pointer; }
    .column:hover .col-minimize { opacity: 0.5; }
    .col-minimize.on, .column:hover .col-minimize.on { opacity: 1; color: var(--accent); }
    .col-minimize:hover, .col-minimize:focus-visible, .column:hover .col-minimize:hover { opacity: 1; color: var(--text-primary); background: var(--bg-secondary); }
    .column.collapsed .col-minimize { display: none; }
    @media (hover: none) { .col-minimize { opacity: 0.5; } }
    .done-fold-head { display: flex; align-items: center; gap: 8px; padding: 4px 2px 8px; }
    .done-fold-toggle { display: inline-flex; align-items: center; gap: 6px; border: none; background: none; padding: 4px 6px; margin-left: -6px; border-radius: 6px; color: var(--text-muted); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
    .done-fold-toggle:hover { color: var(--text-primary); background: var(--bg-hover, rgba(127,127,127,0.12)); }
    .done-fold-arrow { display: inline-flex; transition: transform 0.15s ease; }
    .done-fold.open .done-fold-arrow { transform: rotate(90deg); }
    .done-fold-count { font-weight: 500; opacity: 0.8; }
    .done-fold-clear { margin-left: auto; border: none; background: none; padding: 4px 6px; border-radius: 6px; color: var(--text-muted); font: inherit; font-size: 12px; cursor: pointer; opacity: 0; }
    .done-fold.open .done-fold-clear, .done-fold-head:hover .done-fold-clear, .done-fold-clear:focus { opacity: 1; }
    .done-fold-clear:hover { color: var(--danger, #d9534f); background: var(--bg-hover, rgba(127,127,127,0.12)); }
    @media (hover: none) { .done-fold-clear { opacity: 1; } }
    .done-fold:not(.open) .done-fold-body { display: none; }
    .done-fold-body .task-card { opacity: 0.75; }
    .task-card.folding { opacity: 0; transform: translateY(6px); transition: opacity 0.25s ease, transform 0.25s ease; }
    .confetti { position: fixed; inset: 0; pointer-events: none; z-index: 10000; overflow: hidden; }
    .confetti i { position: absolute; width: 7px; height: 4px; border-radius: 1px; }
    /* Wax shine: a layer over the ticked card with the polish trail, the hand, a gleam and a sparkle */
    .wax-layer { position: fixed; pointer-events: none; z-index: 10000; overflow: hidden; }
    .wax-trail { position: absolute; inset: 0; overflow: visible; }
    .wax-trail path { fill: none; stroke: rgba(250,93,0,0.16); stroke-linecap: round; filter: blur(3px); }
    [data-theme="dark"] .wax-trail path { stroke: rgba(255,255,255,0.10); }
    .wax-hand { position: absolute; left: 0; top: 0; width: 58px; height: 70px; offset-rotate: 0deg; offset-anchor: 50% 48%; opacity: 0; filter: drop-shadow(0 3px 4px rgba(0,0,0,0.28)); }
    .wax-hand svg { width: 100%; height: 100%; display: block; overflow: visible; transform-origin: 50% 70%; }
    .wax-gleam { position: absolute; top: -20%; bottom: -20%; left: 0; width: 45%; transform: translateX(-120%) skewX(-18deg); background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent); }
    [data-theme="dark"] .wax-gleam { background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent); }
    @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .wax-trail path { stroke: rgba(255,255,255,0.10); }
      :root:not([data-theme="light"]) .wax-gleam { background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent); } }
    .wax-spark { position: absolute; right: 18px; top: 12px; width: 14px; height: 14px; opacity: 0; color: #fa5d00; }
    .wax-leaf { position: fixed; pointer-events: none; z-index: 10000; opacity: 0; }
    .wax-leaf svg { width: 100%; height: 100%; display: block; }
    /* "+" adds a sub-item; shown while hovering the item */
    .sub-add { margin-left: auto; flex: none; width: 26px; height: 26px; line-height: 24px; text-align: center; border-radius: 5px; color: var(--text-muted); font-size: 15px; cursor: pointer; opacity: 0; }
    .subtask:hover > .sub-add, .list-item-subtask:hover > .sub-add, .sub-add:focus { opacity: 1; }
    .sub-add:hover { color: var(--accent); background: var(--bg-hover, rgba(127,127,127,0.12)); }
    @media (hover: hover) { .task-card .subtask > .sub-add { margin-left: 4px; } } /* next to the text, where the pointer is */
    @media (hover: none) { .sub-add { opacity: 1; width: 34px; height: 30px; line-height: 28px; font-size: 18px; } }
    /* Centered on the first line of the subtask (19.5px tall); the row keeps its height */
    .subtask > .sub-add { line-height: 26px; margin-top: -3px; margin-bottom: 3px; }
    @media (hover: none) { .subtask > .sub-add { line-height: 30px; margin-top: -5px; margin-bottom: 5px; } }
    /* New subtask box: × inside its right edge */
    .st-new { position: relative; flex: none; }
    .st-new > input { width: 100%; padding-right: 30px !important; }
    .st-new-close { position: absolute; right: 3px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; padding: 0; border: none; border-radius: 5px; background: transparent; color: var(--text-muted); font-size: 17px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
    .st-new-close:hover { color: var(--text-primary); background: var(--bg-hover, rgba(127,127,127,0.12)); }
    @media (hover: none) { .st-new-close { width: 32px; height: 32px; right: 0; } .st-new > input { padding-right: 36px !important; } }
    /* Dragging a subtask: it fades, and a line shows where (and at which level) it will land */
    .card-subtasks, .list-item-subtasks { position: relative; }
    [data-row] { -webkit-touch-callout: none; }
    .st-dragging { opacity: 0.35; }
    /* Dragged off its card: where the new task card goes */
    .st-new-task { height: 3px; background: var(--accent); border-radius: 2px; margin: 5px 0; }
    /* A grip on the hovered subtask row says it drags (up/down, and right/left to indent) */
    @media (hover: hover) {
      .task-card .subtask[data-row] { position: relative; }
      .task-card .subtask[data-row]::before {
        content: ''; position: absolute; left: -13px; top: 5px; width: 6px; height: 12px; opacity: 0; pointer-events: none;
        background: radial-gradient(circle, var(--text-muted) 1.1px, transparent 1.4px) 0 0 / 3px 4px; transition: opacity .15s ease;
      }
      .task-card .subtask[data-row]:hover::before { opacity: .7; }
    }
    .st-drop-line { position: absolute; right: 0; height: 2px; border-radius: 2px; background: var(--accent); pointer-events: none; }
    /* The card a subtask is being dragged onto */
    .task-card.st-drop-card, .list-item.st-drop-card { outline: 2px solid var(--accent); outline-offset: 2px; }
    body.st-drag-on, body.st-drag-on * { cursor: grabbing !important; user-select: none; -webkit-user-select: none; }

    /* A miss of a few pixels still ticks it (mouse; touch has a bigger area below) */
    @media (hover: hover) {
      .task-card .checkbox { position: relative; }
      .task-card .checkbox::before { content: ''; position: absolute; inset: -8px; border-radius: 50%; }
      .task-card .subtask > .checkbox::before { inset: -6px; }
    }
    /* Round checkboxes (so they never look like the square client logos) */
    .checkbox {
      width: 20px;
      height: 20px;
      min-width: 20px;
      min-height: 20px;
      flex-shrink: 0;
      border: 1.75px solid color-mix(in srgb, var(--text-primary) 35%, transparent);
      border-radius: 50%;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      vertical-align: middle;
      cursor: pointer;
      transition: all 0.15s ease;
      background: transparent;
    }

    .checkbox:hover {
      border-color: var(--accent);
    }
    /* Hover shows a faint check so it's clear what a click does */
    .checkbox:not(.checked):hover::after {
      content: ''; width: 5px; height: 9px; border: solid var(--accent); border-width: 0 2px 2px 0;
      transform: rotate(45deg); margin-bottom: 2px; opacity: 0.6;
    }

    .checkbox.checked {
      background: var(--accent);
      border-color: var(--accent);
    }

    .checkbox.checked::after {
      content: '';
      width: 5px;
      height: 9px;
      border: solid white;
      border-width: 0 2px 2px 0;
      transform: rotate(45deg);
      margin-bottom: 2px;
    }

    .empty-state {
      text-align: center;
      padding: 80px 40px;
      color: var(--text-muted);
    }

    .empty-state button {
      font-size: 16px;
      padding: 14px 28px;
      background: var(--accent);
      border: none;
      color: white;
    }

    .welcome { max-width: 620px; margin: 0 auto; padding: 64px 16px; display: flex; flex-direction: column; gap: 12px; color: var(--text-primary); }
    .welcome h1 { font-size: clamp(28px, 5vw, 40px); line-height: 1.15; margin: 0; text-wrap: balance; }
    .welcome-sub { color: var(--text-muted); margin: 0 0 12px; }
    .welcome-choices { display: flex; flex-direction: column; gap: 14px; }
    .welcome-choice { display: flex; align-items: center; gap: 20px; width: 100%; text-align: left; padding: 22px 24px; border: 1px solid var(--border); border-radius: 16px; background: var(--bg-card); color: var(--text-primary); cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
    .welcome-choice:hover:not(:disabled) { border-color: var(--accent); box-shadow: 0 6px 20px var(--shadow-hover); transform: translateY(-1px); }
    .welcome-choice:disabled { opacity: .6; cursor: default; }
    .welcome-choice > span:last-child { flex: 1; min-width: 0; }
    @media (max-width: 520px) { .welcome { padding-top: 40px; } .welcome-choice { gap: 14px; padding: 18px; } .welcome-ico { width: 48px; height: 48px; } }
    .welcome-choice b { display: block; font-size: 20px; margin-bottom: 4px; }
    .welcome-choice small { display: block; font-size: 15px; color: var(--text-muted); line-height: 1.4; }
    .welcome-ico { flex: none; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 16px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }

    .empty-state button:hover {
      background: var(--accent-hover);
    }

    /* Undo: a pill at the top, under the header, so it isn't mistaken for a card */
    /* Undo: a small note in the bottom-left corner, clear of the header, the board's controls and the bottom-centre bars */
    .undo-toast { position: fixed; left: max(12px, env(safe-area-inset-left, 0px)); bottom: max(12px, env(safe-area-inset-bottom, 0px)); z-index: 1300; display: flex; align-items: center; gap: 6px; max-width: min(340px, calc(100vw - 96px)); padding: 2px 3px 2px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text-secondary, var(--text-primary)); font-size: 12.5px; font-weight: 500; box-shadow: 0 4px 14px var(--shadow-hover); opacity: 0; pointer-events: none; transform: translateY(6px); transition: opacity .15s ease, transform .15s ease; }
    .undo-toast.visible { opacity: 1; pointer-events: auto; transform: none; }
    /* A finished card just moved to Completed: said where everyone looks, so it isn't a mystery */
    .undo-toast.notice { left: 50%; bottom: max(24px, env(safe-area-inset-bottom, 0px)); gap: 10px; max-width: min(460px, calc(100vw - 32px)); padding: 6px 6px 6px 16px; border-radius: 12px; border-color: var(--accent); color: var(--text-primary); font-size: 14px; box-shadow: 0 8px 28px var(--shadow-hover); transform: translate(-50%, 10px); }
    .undo-toast.notice.visible { transform: translate(-50%, 0); }
    .undo-toast.notice button { padding: 6px 12px; }
    .undo-toast span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
    .undo-toast button { flex: none; border: none; border-radius: 6px; padding: 2px 8px; background: transparent; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; }
    .undo-toast button:hover, .undo-toast button:focus-visible { background: var(--bg-secondary); }
    @media (prefers-reduced-motion: reduce) { .undo-toast { transition: none; } }
    /* Unsaved changes kept across a reload, and "WaxOn was updated, reload" */
    .unsaved-bar { position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 1300; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; width: max-content; max-width: calc(100vw - 32px); padding: 10px 10px 10px 16px; border-radius: 14px; border: 1.5px solid var(--accent); background: var(--bg-card); color: var(--text-primary); font-size: 13.5px; box-shadow: 0 10px 30px var(--shadow-hover); }
    .unsaved-bar span { flex: 1 1 260px; min-width: 0; }
    .unsaved-bar button { flex: none; border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px; background: transparent; color: inherit; font: inherit; font-weight: 600; cursor: pointer; }
    .unsaved-bar button.primary { border-color: var(--accent); background: var(--accent); color: #fff; }
    .unsaved-bar button:disabled { opacity: .45; cursor: default; }
    .unsaved-bar[data-kind="update"] { bottom: auto; top: max(76px, calc(env(safe-area-inset-top, 0px) + 64px)); }
    .status-bar {
      position: fixed;
      bottom: 24px;
      left: 50%;
      transform: translateX(-50%);
      background: var(--text-primary);
      color: var(--bg-primary);
      padding: 12px 24px;
      border-radius: 10px;
      font-size: 13px;
      font-weight: 500;
      opacity: 0;
      transition: opacity 0.2s ease;
      box-shadow: 0 4px 20px rgba(20, 20, 19, 0.15);
      z-index: 200;
    }

    .status-bar.visible { opacity: 1; }
    .status-bar, .undo-toast { z-index: 1700; } /* notices show above the client card and its blurred backdrop */
    /* Desktop: Undo and confirmations show at the top right, under the header's buttons, where they're seen;
       phones keep them at the bottom, in thumb reach */
    @media (min-width: 761px) and (hover: hover) {
      .undo-toast, .undo-toast.notice { left: auto; right: max(24px, env(safe-area-inset-right, 0px)); top: 84px; bottom: auto; transform: translateY(-6px);
        padding: 6px 6px 6px 14px; gap: 10px; border-color: var(--accent); font-size: 13.5px; max-width: min(460px, calc(100vw - 48px)); box-shadow: 0 8px 28px var(--shadow-hover); }
      .undo-toast button { padding: 5px 10px; }
      .undo-toast.visible, .undo-toast.notice.visible { transform: none; }
      .status-bar { left: auto; right: max(24px, env(safe-area-inset-right, 0px)); top: 84px; bottom: auto; transform: none; max-width: min(420px, calc(100vw - 48px)); }
      body:has(.undo-toast.visible) .status-bar { top: 140px; }
      /* Beside the docked Dojo panel, not over its header */
      body.dojo-docked .status-bar, body.dojo-docked .undo-toast, body.dojo-docked .undo-toast.notice { right: 384px; }
    }
    .status-bar { pointer-events: none; } /* a notice never catches a click, even while it fades */

    .add-card {
      padding: 12px;
    }

    .add-card button {
      width: 100%;
      background: transparent;
      border: 2px dashed var(--border);
      color: var(--text-muted);
      font-weight: 500;
    }

    .add-card button:hover {
      border-color: var(--accent);
      color: var(--accent);
      background: transparent;
    }

    .new-task-input {
      width: 100%;
      background: var(--bg-card);
      border: 2px solid var(--accent);
      border-radius: 8px;
      padding: 12px;
      color: var(--text-primary);
      font-size: 14px;
      font-family: inherit;
      resize: none;
    }

    .new-task-input:focus {
      outline: none;
    }

    /* The box with its × to stop adding (the × is the subtask box's, set in the top corner) */
    .new-task-box { position: relative; flex: none; }
    .new-task-box > .new-task-input { display: block; padding-right: 34px; }
    .new-task-box > .st-new-close { top: 6px; right: 6px; transform: none; }

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

    /* Scrollbar styling */
    .cards::-webkit-scrollbar,
    .list-view::-webkit-scrollbar {
      width: 6px;
    }

    .cards::-webkit-scrollbar-track,
    .list-view::-webkit-scrollbar-track {
      background: transparent;
    }

    .cards::-webkit-scrollbar-thumb,
    .list-view::-webkit-scrollbar-thumb {
      background: var(--border);
      border-radius: 3px;
    }

    .cards::-webkit-scrollbar-thumb:hover,
    .list-view::-webkit-scrollbar-thumb:hover {
      background: var(--text-muted);
    }

    /* List View Styles */
    .list-view {
      max-width: 800px;
      margin: 0 auto;
      flex: 1;
      overflow-y: auto;
      overflow-x: hidden;
      min-height: 0;
    }

    .list-section {
      margin-bottom: 28px;
    }

    .list-section.drag-over {
      background: rgba(217, 119, 87, 0.05);
      border-radius: 8px;
      margin: 0 -12px 32px;
      padding: 0 12px;
    }

    .list-section-header {
      font-size: 13px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: var(--text-secondary);
      padding: 4px 0;
      margin-bottom: 6px;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .list-section-header .section-title {
      cursor: pointer;
    }

    .list-section-header .section-title:hover {
      color: var(--text-primary);
    }

    .list-section-header .count {
      font-size: 12px;
      color: var(--text-muted);
      font-weight: 500;
    }

    .list-item {
      display: flex;
      align-items: flex-start;
      gap: 12px;
      padding: 12px 14px;
      margin-bottom: 6px;
      background: var(--bg-card);
      border: 1px solid var(--border-light);
      cursor: grab;
      position: relative;
      border-radius: 10px;
      transition: all 0.15s ease;
      box-shadow: 0 1px 3px var(--shadow);
    }

    .list-item:active {
      cursor: grabbing;
    }

    .list-item:hover {
      box-shadow: 0 4px 12px var(--shadow-hover);
      border-color: var(--border);
    }

    .list-item.dragging {
      opacity: 0.5;
      background: var(--bg-secondary);
    }

    .list-item .checkbox {
      margin-top: 2px;
      flex-shrink: 0;
    }

    .list-item-content {
      flex: 1;
      min-width: 0;
    }

    .list-item-title {
      font-size: 15px;
      color: var(--text-primary);
      line-height: 1.4;
    }

    .list-item-title.checked {
      color: var(--text-muted);
      text-decoration: line-through;
    }

    .list-item-note {
      font-size: 13px;
      color: var(--text-muted);
      margin-top: 4px;
      cursor: pointer;
    }

    .list-item-note:hover {
      color: var(--text-secondary);
    }

    .list-item-note.add-note {
      font-style: italic;
      display: none;
    }

    .list-item:hover .list-item-note.add-note {
      display: block;
    }

    .list-item-subtasks {
      margin-top: 8px;
      padding-left: 2px;
    }

    .list-item-subtask {
      display: flex;
      align-items: flex-start;
      gap: 8px;
      padding: 3px 0;
      font-size: 13px;
      color: var(--text-secondary);
    }

    .list-item-subtask .checkbox {
      width: 16px;
      height: 16px;
      min-width: 16px;
      min-height: 16px;
      margin-top: 1px;
    }

    .list-item-subtask span {
      cursor: pointer;
    }

    .list-item-subtask span:hover {
      color: var(--text-primary);
    }

    .list-item-add-subtask {
      font-size: 13px;
      color: var(--text-muted);
      font-style: italic;
      cursor: pointer;
      padding: 3px 0;
      padding-left: 24px;
      display: none;
    }

    .list-item:hover .list-item-add-subtask {
      display: block;
    }

    .list-item-add-subtask:hover {
      color: var(--accent);
    }

    .list-item-section {
      font-size: 11px;
      color: var(--text-muted);
      background: var(--bg-secondary);
      padding: 2px 8px;
      border-radius: 4px;
      white-space: nowrap;
    }

    .list-item-actions {
      display: none;
      position: absolute;
      top: 8px;
      right: 8px;
    }

    .list-item:hover .list-item-actions {
      display: flex;
      gap: 4px;
    }

    .list-item-actions button {
      background: transparent;
      border: none;
      color: var(--text-muted);
      cursor: pointer;
      padding: 4px 6px;
      font-size: 14px;
      line-height: 1;
      border-radius: 4px;
    }

    .list-item-actions button:hover {
      background: var(--bg-card);
      color: var(--accent);
    }

    .list-drop-indicator {
      height: 3px;
      background: var(--accent);
      border-radius: 2px;
      margin: 2px -12px;
    }

    .list-add-section {
      margin-top: 16px;
      padding: 16px;
      border: 2px dashed var(--border);
      border-radius: 8px;
      text-align: center;
      cursor: pointer;
      color: var(--text-muted);
      font-size: 14px;
      font-weight: 500;
      transition: all 0.15s ease;
    }

    .list-add-section:hover {
      border-color: var(--accent);
      color: var(--accent);
    }

    .quick-add {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 12px 0;
    }

    .quick-add-input {
      flex: 1;
      background: transparent;
      border: none;
      font-size: 15px;
      color: var(--text-primary);
      font-family: inherit;
      outline: none;
    }

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

    .quick-add-section {
      font-size: 12px;
      color: var(--text-muted);
      background: var(--bg-secondary);
      padding: 4px 10px;
      border-radius: 6px;
      cursor: pointer;
      border: 1px solid var(--border);
    }

    .quick-add-section:hover {
      border-color: var(--accent);
    }

    .section-picker {
      position: absolute;
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 8px;
      box-shadow: 0 4px 20px var(--shadow-hover);
      padding: 4px;
      z-index: 100;
    }

    .section-picker button {
      display: block;
      width: 100%;
      text-align: left;
      padding: 8px 12px;
      font-size: 13px;
      background: transparent;
      border: none;
      border-radius: 6px;
    }

    .section-picker button:hover {
      background: var(--bg-secondary);
    }

    /* ===== MEMORY STYLES ===== */

    .memory-tabs {
      display: flex;
      gap: 4px;
      margin-bottom: 12px;
      flex-wrap: wrap;
      background: var(--bg-secondary);
      padding: 4px;
      border-radius: 8px;
      flex-shrink: 0;
    }

    .memory-tab {
      background: transparent;
      color: var(--text-muted);
      padding: 8px 16px;
      border: none;
      border-radius: 6px;
      cursor: pointer;
      font-size: 13px;
      font-weight: 500;
      transition: all 0.15s ease;
      text-transform: capitalize;
    }

    .memory-tab:hover { color: var(--text-primary); }

    .memory-tab.active {
      color: var(--text-primary);
      background: var(--bg-card);
      box-shadow: 0 1px 3px var(--shadow);
    }

    .memory-tab .count {
      background: var(--bg-secondary);
      padding: 2px 8px;
      border-radius: 10px;
      font-size: 11px;
      margin-left: 6px;
      color: var(--text-muted);
    }

    .memory-tab.active .count {
      background: var(--border-light);
    }

    .memory-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
      gap: 16px;
    }

    .memory-flat-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 13px;
    }

    .memory-flat-table th {
      text-align: left;
      padding: 10px 16px;
      font-weight: 500;
      color: var(--text-muted);
      border-bottom: 1px solid var(--border);
      font-size: 12px;
      text-transform: uppercase;
      letter-spacing: 0.03em;
    }

    .memory-flat-table td {
      padding: 9px 16px;
      border-bottom: 1px solid var(--border-light);
      color: var(--text-primary);
      line-height: 1.4;
    }

    .memory-flat-table td:first-child {
      color: var(--text-muted);
      font-weight: 500;
      white-space: nowrap;
      width: 120px;
    }

    .memory-flat-table tr:last-child td {
      border-bottom: none;
    }

    .memory-flat-table tr:hover td {
      background: var(--bg-secondary);
    }

    .memory-card {
      background: var(--bg-card);
      border: 1px solid var(--border-light);
      border-radius: 10px;
      padding: 16px;
      cursor: pointer;
      transition: all 0.15s ease;
      box-shadow: 0 1px 3px var(--shadow);
    }

    .memory-card:hover {
      border-color: var(--accent);
      box-shadow: 0 4px 12px var(--shadow-hover);
    }

    .memory-card-title {
      font-size: 15px;
      font-weight: 600;
      margin-bottom: 8px;
      display: flex;
      align-items: center;
      gap: 8px;
      color: var(--text-primary);
    }

    .memory-card-meta {
      font-size: 13px;
      color: var(--text-muted);
      margin-bottom: 8px;
    }

    .memory-card-preview {
      font-size: 13px;
      color: var(--text-secondary);
      line-height: 1.5;
      overflow: hidden;
      display: -webkit-box;
      -webkit-line-clamp: 4;
      -webkit-box-orient: vertical;
    }

    .memory-card-fields {
      margin-top: 10px;
      font-size: 12px;
    }

    .memory-card-field {
      display: flex;
      gap: 8px;
      margin-bottom: 4px;
    }

    .memory-card-field-label {
      color: var(--text-muted);
      min-width: 80px;
    }

    .memory-card-field-value {
      color: var(--text-secondary);
    }

    .file-card {
      background: var(--bg-card);
      border: 1px solid var(--border-light);
      border-radius: 10px;
      margin-bottom: 16px;
      box-shadow: 0 1px 3px var(--shadow);
    }

    .file-card-header {
      padding: 16px;
      border-bottom: 1px solid var(--border-light);
      display: flex;
      justify-content: space-between;
      align-items: center;
      cursor: pointer;
    }

    .file-card-header:hover {
      background: var(--bg-secondary);
    }

    .file-card-title {
      font-size: 14px;
      font-weight: 600;
      color: var(--text-primary);
    }

    .file-card-content {
      padding: 16px;
      font-size: 13px;
      line-height: 1.6;
      white-space: pre-wrap;
      font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
      overflow-y: auto;
      display: none;
      color: var(--text-secondary);
    }

    .file-card-content.expanded {
      display: block;
    }

    .stats {
      display: flex;
      gap: 16px;
      margin-bottom: 24px;
      flex-wrap: wrap;
    }

    .stat {
      background: var(--bg-card);
      border: 1px solid var(--border-light);
      border-radius: 10px;
      padding: 16px 24px;
      min-width: 100px;
      box-shadow: 0 1px 3px var(--shadow);
    }

    .stat-value {
      font-size: 28px;
      font-weight: 600;
      color: var(--accent);
    }

    .stat-label {
      font-size: 12px;
      color: var(--text-muted);
      text-transform: capitalize;
      margin-top: 4px;
    }

    .search-box {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 10px 16px;
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 20px;
    }

    .search-box input {
      flex: 1;
      background: transparent;
      border: none;
      color: var(--text-primary);
      font-size: 14px;
      font-family: inherit;
      outline: none;
    }

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

    .add-btn {
      background: transparent;
      border: 2px dashed var(--border);
      color: var(--text-muted);
      padding: 40px;
      border-radius: 10px;
      cursor: pointer;
      transition: all 0.15s ease;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 14px;
      font-weight: 500;
    }

    .add-btn:hover {
      border-color: var(--accent);
      color: var(--accent);
    }

    .markdown-content {
      line-height: 1.6;
      color: var(--text-secondary);
    }

    .markdown-content h1 { font-size: 1.4em; margin: 16px 0 8px; color: var(--text-primary); }
    .markdown-content h2 { font-size: 1.2em; margin: 14px 0 6px; color: var(--text-primary); }
    .markdown-content h3 { font-size: 1.1em; margin: 12px 0 4px; color: var(--text-secondary); }
    .markdown-content p { margin: 8px 0; }
    .markdown-content ul, .markdown-content ol { margin: 8px 0 8px 20px; }
    .markdown-content li { margin: 4px 0; }
    .markdown-content code {
      background: var(--bg-secondary);
      padding: 2px 6px;
      border-radius: 4px;
      font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
      color: var(--text-primary);
    }
    .markdown-content pre {
      background: var(--bg-secondary);
      padding: 12px;
      border-radius: 8px;
      overflow-x: auto;
      margin: 8px 0;
      border: 1px solid var(--border-light);
    }
    .markdown-content table {
      width: 100%;
      border-collapse: collapse;
      margin: 8px 0;
      font-size: 13px;
    }
    .markdown-content th, .markdown-content td {
      padding: 12px 16px;
      text-align: left;
      border-bottom: 1px solid var(--border-light);
    }
    .markdown-content th {
      background: var(--bg-secondary);
      font-weight: 600;
      font-size: 12px;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: var(--text-secondary);
    }

    /* Modal */
    .gh-overlay {
      position: fixed; inset: 0; z-index: 1500;
      display: flex; flex-direction: column; align-items: center; gap: 16px;
      background: rgba(10, 10, 9, 0.55); padding: 24px 16px; overflow-y: auto;
      -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    }
    .gh-overlay > :first-child, .gh-overlay > .overlay-close + * { margin-top: auto; }
    .gh-overlay > :last-child { margin-bottom: auto; }
    .setup-qr { display: flex; flex-direction: column; align-items: center; gap: 8px; }
    .setup-qr[hidden], #setupManualWrap[hidden] { display: none; }
    #setupQrImg img { width: 240px; height: 240px; image-rendering: pixelated; background: #fff; padding: 10px; border-radius: 12px; }
    .gh-status { margin: 0; font-size: 13px; color: var(--text-secondary); }
    /* Clients list: the Save button itself says whether there's anything left to save */
    .gh-status.failed { padding: 4px 10px; border-radius: 999px; font-weight: 600; background: color-mix(in srgb, #d14343 14%, transparent); color: #d14343; }
    #clientsSave:disabled { opacity: .55; cursor: default; }
    #clientsSave.saved, #clientsSave.saved:disabled { opacity: 1; background: #1b8049; border-color: #1b8049; color: #fff; animation: savedPop .35s ease-out; }
    @keyframes savedPop { from { transform: scale(.94); } to { transform: none; } }
    /* With a long list, Save and its status stay in view at the bottom of the window */
    #clientsBox > .gh-actions { position: sticky; bottom: 0; margin: 0 -56px -32px -32px; padding: 14px 56px 18px 32px; background: var(--bg-card); border-top: 1px solid var(--border); z-index: 1; }
    @media (max-width: 760px) { #clientsBox > .gh-actions { margin: 0 -18px -28px; padding: 12px 18px 16px; } }
    .gh-overlay[hidden] { display: none; }
    .settings-shell > .overlay-close { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; font-size: 24px; background: transparent; border: none; box-shadow: none; color: var(--text-muted); }
    .settings-shell > .overlay-close:hover { background: var(--bg-secondary); color: var(--text-primary); }
    .settings-shell { position: relative; width: min(880px, 100%); height: min(680px, calc(100vh - 48px)); flex: none; display: grid; grid-template-columns: 200px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); background: var(--bg-card); border-radius: 16px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35); overflow: hidden; margin: auto 0 !important; }
    .settings-nav { background: var(--bg-secondary); padding: 20px 10px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; min-height: 0; }
    .settings-nav > * { flex: none; }
    .settings-nav h2 { font-family: 'Mona Sans', 'Figtree', sans-serif; font-stretch: 125%; font-size: 18px; padding: 0 12px 12px; }
    .settings-nav button { text-align: left; border: none; background: none; border-radius: 9px; padding: 9px 12px; font-size: 14px; font-weight: 500; color: var(--text-secondary); }
    .settings-nav button:hover { background: var(--bg-card); color: var(--text-primary); }
    html:not([data-time="harvest"]) #hvForm #hvDisconnect, html:not([data-time="harvest"]) #hvForm button[type="submit"] { display: none; }
    .currency-row { display: flex !important; flex-direction: row !important; align-items: center; gap: 10px; margin-top: 12px; font-size: 14px; }
    .currency-row select { width: auto; }
    .time-modes { display: flex; flex-direction: column; gap: 8px; }
    .time-mode { display: flex !important; flex-direction: row !important; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; }
    .time-mode:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
    .time-mode input { margin-top: 3px; accent-color: var(--accent); flex: none; }
    .time-mode span { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
    .time-mode small { color: var(--text-muted); font-size: 12.5px; line-height: 1.4; }
    .settings-nav button.on { background: var(--bg-card); color: var(--text-primary); font-weight: 600; box-shadow: 0 1px 3px var(--shadow); }
    .settings-body { overflow-y: auto; min-height: 0; }
    .settings-body > .gh-dialog { max-width: none; box-shadow: none; background: transparent; border-radius: 0; padding: 28px 56px 32px 32px; } /* right: room for the close button */
    .settings-body > .gh-dialog.is-off { display: none !important; }
    .settings-body .clients-list { max-height: none; overflow: visible; }
    @media (max-width: 760px) {
      .settings-shell { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); height: calc(100vh - 48px); }
      .settings-shell { grid-template-columns: minmax(0, 1fr) 48px; }
      .settings-body { grid-column: 1 / -1; }
      .settings-shell > .overlay-close { position: static; grid-row: 1; grid-column: 2; width: 48px; height: 100%; border-radius: 0; background: var(--bg-secondary); }
      .settings-nav { flex-direction: row; overflow-x: auto; padding: 10px; gap: 4px; scrollbar-width: none; }
      .settings-nav h2 { display: none; }
      .settings-back { margin: 0; flex: none; white-space: nowrap; }
      .settings-nav button { white-space: nowrap; flex: none; padding: 8px 12px; }
      .settings-body > .gh-dialog { padding: 20px 18px 28px; }
    }
    .gh-dialog {
      background: var(--bg-card); border-radius: 14px; padding: 24px; width: 100%; max-width: 440px;
      box-shadow: 0 12px 40px rgba(0,0,0,0.2); display: flex; flex-direction: column; gap: 12px;
    }
    .gh-dialog h3 { margin: 0; font-size: 18px; }
    .gh-dialog label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text-secondary); flex: 1; min-width: 0; }
    .gh-dialog input {
      padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px;
      background: var(--bg-card); color: var(--text-primary); font: inherit; font-size: 14px;
    }
    .gh-row { display: flex; gap: 10px; }
    /* Fields share the row and shrink to fit it, however wide they'd like to be */
    #bizBox .gh-row > label { flex: 1 1 0; min-width: 0; }
    #bizBox .gh-row > label > .gh-row > input { flex: 1 1 0; min-width: 0; width: auto; }
    /* Settings → Business: who invoices come from */
    .gh-dialog textarea, .gh-dialog select { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-card); color: var(--text-primary); font: inherit; font-size: 14px; }
    .gh-dialog textarea { resize: vertical; line-height: 1.45; }
    #bizBox label small { font-size: 12px; color: var(--text-muted); }
    .biz-logo { display: flex; gap: 14px; align-items: center; }
    .biz-logo-img { width: 150px; height: 64px; flex: none; border: 1px dashed var(--border); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--text-muted); overflow: hidden; background: var(--bg-secondary); }
    .biz-logo-img.has { border-style: solid; background: #fff; }
    .biz-logo-img img { max-width: 100%; max-height: 100%; object-fit: contain; padding: 6px; }
    .biz-logo-btns { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; min-width: 0; }
    .biz-logo-btns small { flex-basis: 100%; font-size: 12px; color: var(--text-muted); }
    .gh-dialog .biz-file { flex: none; display: inline-flex; padding: 6px 12px; border: 1px solid var(--border); border-radius: 8px; color: var(--text-primary); font-size: 13px; cursor: pointer; }
    .biz-file input { position: absolute; width: 1px; height: 1px; opacity: 0; }
    .biz-file:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
    .biz-preview-wrap { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
    .biz-preview-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
    .biz-preview { background: #fff; color: #1d1c1a; border: 1px solid var(--border); border-radius: 10px; padding: 18px; display: flex; justify-content: space-between; gap: 16px; font-size: 12.5px; line-height: 1.45; }
    .biz-preview .bp-from { min-width: 0; }
    .biz-preview .bp-from img { max-width: 140px; max-height: 48px; display: block; margin-bottom: 8px; }
    .biz-preview .bp-name { font-weight: 700; font-size: 14px; }
    .biz-preview .bp-muted { color: #6b6760; white-space: pre-line; overflow-wrap: anywhere; }
    .biz-preview .bp-inv { text-align: right; flex: none; }
    .biz-preview .bp-inv b { display: block; font-size: 18px; letter-spacing: 0.04em; margin-bottom: 4px; }
    .biz-logo { flex-wrap: wrap; }
    .biz-accent { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
    .biz-accent small { flex-basis: 100%; font-size: 12px; color: var(--text-muted); }
    .biz-swatch { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--border); background: #1a1a18; flex: none; }
    .biz-preview { border-top: 6px solid var(--biz-accent, #1a1a18); }
    /* Monthly report: the review window and the "ready to send" bar */
    .report-win { width: 100%; max-width: 720px; background: var(--bg-card); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 12px 40px rgba(0,0,0,0.3); }
    .rep-head { display: flex; align-items: flex-start; gap: 12px; }
    .rep-head > div { flex: 1; min-width: 0; }
    .rep-head h3 { margin: 0; font-size: 18px; }
    .rep-head small { color: var(--text-muted); font-size: 13px; }
    .rep-intro { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text-secondary); }
    .rep-intro textarea { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-card); color: var(--text-primary); font: inherit; font-size: 14px; resize: vertical; }
    .rep-frame { width: 100%; height: min(62vh, 640px); border: 1px solid var(--border); border-radius: 12px; background: #f3f1ee; }
    .rep-actions { flex-wrap: wrap; }
    .report-bar { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 900; display: flex; align-items: center; gap: 12px;
      max-width: calc(100vw - 32px); padding: 10px 10px 10px 18px; border-radius: 999px; background: #1d1c1a; color: #fff; font-size: 14px; box-shadow: 0 8px 28px rgba(0,0,0,0.3); }
    /* Out of Undo's way while it shows (both live at the bottom) */
    .report-bar { transition: bottom .15s ease; }
    @media not ((min-width: 761px) and (hover: hover)) { body:has(.undo-toast.visible) .report-bar { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); } }
    .report-bar span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .report-bar button { flex: none; border: 0; border-radius: 999px; padding: 7px 14px; background: #fa5d00; color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
    .cp-rep-row { flex-wrap: wrap; gap: 8px; }
    /* Invoices: the client card's section, the editor window and Settings → Invoices */
    .cp-inv-list { display: flex; flex-direction: column; border-top: 1px solid var(--border); }
    .cp-inv-row { display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; align-items: center; padding: 8px 2px; border: 0; border-bottom: 1px solid var(--border); background: none; color: var(--text-primary); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; }
    .cp-inv-row:hover { background: var(--bg-secondary); }
    .cp-inv-row .cp-muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .inv-chip { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--bg-secondary); color: var(--text-secondary); white-space: nowrap; }
    .inv-chip.sent { background: color-mix(in srgb, #2f63c4 14%, transparent); color: #2f63c4; }
    .inv-chip.overdue { background: color-mix(in srgb, #e0581a 16%, transparent); color: #c24a12; }
    .inv-chip.paid { background: color-mix(in srgb, #2f8a5f 15%, transparent); color: #2f8a5f; }
    .inv-chip.void { text-decoration: line-through; }
    .inv-chip.pending { background: color-mix(in srgb, #2f8a5f 10%, transparent); color: #2f8a5f; }
    /* Settings → Payments */
    .pay-status { display: flex; align-items: center; gap: 8px; font-size: 14px; }
    .pay-status .dot { width: 8px; height: 8px; border-radius: 50%; background: #2f8a5f; flex: none; }
    .pay-status .dot.off { background: var(--text-muted); }
    .pay-mode { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, #c98a00 22%, transparent); color: var(--text-primary); }
    .pay-mode.live { background: color-mix(in srgb, #2f8a5f 22%, transparent); }
    #payBox label small { font-size: 12px; color: var(--text-muted); }
    .cp-inv-new { flex-wrap: wrap; gap: 8px; }
    .cp-inv-new[hidden] { display: none; }
    .cp-field textarea { font: inherit; font-size: 14px; color: var(--text-primary); background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; resize: vertical; line-height: 1.45; }
    .cp-inv-new input[type="date"] { padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-card); color: var(--text-primary); font: inherit; font-size: 13px; }
    .inv-win { max-width: 1180px; }
    .inv-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
    .inv-edit { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
    .inv-edit label, .inv-period label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text-secondary); }
    .inv-edit input, .inv-edit textarea { padding: 7px 9px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-card); color: var(--text-primary); font: inherit; font-size: 14px; min-width: 0; }
    .inv-edit textarea { resize: vertical; line-height: 1.45; }
    .inv-period { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
    .inv-lines { display: flex; flex-direction: column; gap: 8px; }
    .inv-line { display: grid; grid-template-columns: minmax(0, 1fr) 72px 84px 96px 28px; gap: 6px; align-items: start; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
    .inv-line .inv-desc { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
    .inv-line .inv-desc input + input { font-size: 12.5px; color: var(--text-secondary); }
    .inv-line input.num { text-align: right; }
    .inv-line input:disabled { background: var(--bg-secondary); color: var(--text-primary); opacity: 1; }
    .inv-line-head { display: grid; grid-template-columns: minmax(0, 1fr) 72px 84px 96px 28px; gap: 6px; font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); }
    .inv-line-head span:not(:first-child) { text-align: right; }
    .inv-del { border: 0; background: none; color: var(--text-muted); font-size: 18px; line-height: 1; padding: 6px 4px; cursor: pointer; border-radius: 6px; }
    .inv-del:hover { color: var(--text-primary); background: var(--bg-secondary); }
    .inv-totals { display: flex; flex-direction: column; gap: 2px; align-self: flex-end; min-width: 220px; font-size: 14px; }
    .inv-totals div { display: flex; justify-content: space-between; gap: 18px; }
    .inv-totals .grand { font-weight: 700; font-size: 16px; padding-top: 4px; border-top: 1px solid var(--border); }
    .inv-warn { font-size: 13px; color: #c24a12; }
    .inv-info { display: flex; flex-direction: column; gap: 12px; min-width: 0; font-size: 14px; }
    .inv-info .cp-share code { overflow-wrap: anywhere; }
    .inv-info .cp-row { flex-wrap: wrap; gap: 8px; align-items: center; }
    .inv-info input[type="date"] { padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-card); color: var(--text-primary); font: inherit; font-size: 13px; }
    .inv-frame { height: min(74vh, 900px); }
    @media (max-width: 900px) { .inv-grid { grid-template-columns: 1fr; } .inv-frame { height: 70vh; } }
    @media (max-width: 520px) { .inv-line, .inv-line-head { grid-template-columns: minmax(0, 1fr) 60px 70px 28px; } .inv-line .inv-rate, .inv-line-head .inv-rate { display: none; } }
    .inv-sum { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; font-size: 14px; }
    .inv-sum b { font-size: 18px; display: block; }
    .inv-filter { display: flex; gap: 6px; flex-wrap: wrap; }
    .inv-filter button { border: 1px solid var(--border); background: none; color: var(--text-secondary); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 13px; cursor: pointer; }
    .inv-filter button[aria-pressed="true"] { background: var(--text-primary); color: var(--bg-card); border-color: var(--text-primary); }
    .inv-table { display: flex; flex-direction: column; }
    .inv-trow { display: grid; grid-template-columns: 70px minmax(0, 1.3fr) minmax(0, 1fr) 100px 84px; gap: 10px; align-items: center; padding: 9px 4px; border: 0; border-bottom: 1px solid var(--border); background: none; color: var(--text-primary); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
    .inv-trow:hover { background: var(--bg-secondary); }
    .inv-trow > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .inv-trow .amt { text-align: right; font-variant-numeric: tabular-nums; }
    @media (max-width: 600px) { .inv-trow { grid-template-columns: 56px minmax(0, 1fr) 84px 70px; } .inv-trow .per { display: none; } }
    .cp-in-row { gap: 8px; }
    #cpInLocal { flex: 1; min-width: 0; font: inherit; font-size: 13px; color: var(--text-primary); background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; }
    .cp-in-row .cp-muted { flex: none; }
    .cp-inbox { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; padding: 10px 12px; border: 1px solid var(--accent); border-radius: 12px; background: color-mix(in srgb, var(--accent) 7%, transparent); }
    .cp-inbox-head { font-size: 13px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
    .cp-in-item { display: flex; flex-direction: column; gap: 6px; padding-top: 8px; border-top: 1px solid var(--border); }
    .cp-in-item:first-of-type { border-top: 0; padding-top: 0; }
    .cp-in-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 14px; }
    .cp-in-text b { overflow-wrap: anywhere; }
    .cp-in-item .cp-row { gap: 8px; flex-wrap: wrap; align-items: center; }
    .cp-in-item a { font-size: 13px; color: var(--text-secondary); }
    .cp-in-sum { color: var(--text-primary); line-height: 1.4; }
    .cp-in-hint { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--accent); }
    .cp-in-hint .ico { width: 13px; height: 13px; }
    .cp-in-mail summary { display: inline-flex; align-items: center; gap: 5px; list-style: none; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text-secondary); }
    .cp-in-mail summary::-webkit-details-marker { display: none; }
    .cp-in-mail .cp-in-hide, .cp-in-mail[open] .cp-in-show { display: none; }
    .cp-in-mail[open] .cp-in-hide { display: inline; }
    .cp-in-arrow { display: inline-block; font-size: 15px; line-height: 1; transform: rotate(90deg); transition: transform .15s; }
    .cp-in-mail[open] .cp-in-arrow { transform: rotate(-90deg); }
    .cp-in-html { margin-top: 6px; padding: 8px 10px; border-radius: 8px; background: var(--bg-secondary); font-size: 13px; max-height: 260px; overflow: auto; overflow-wrap: anywhere; }
    .cp-in-html h3 { font-size: 14px; margin: 0 0 4px; }
    .cp-in-html p, .cp-in-html ul { margin: 0 0 6px; }
    .cp-in-html img { max-width: 100%; }
    .cc-mail { display: inline-flex; align-items: center; padding: 0 7px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 600; line-height: 18px; }
    .cp-in-addr { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 6px 10px; border-radius: 8px; background: var(--bg-secondary); font-size: 13px; user-select: all; }
    /* Settings → Care plan: one row per item (name, how often, remove), with the client line under it */
.tr-fields { display: flex; flex-direction: column; gap: 10px; }
    .tr-fields[hidden], .tr-connect[hidden], .tr-connected[hidden] { display: none; }
    .tr-connect { display: flex; gap: 8px; align-items: flex-end; }
    .tr-connect label { flex: 1; }
    .tr-connected { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 14px; color: var(--text-primary); }
        .plan-items { display: flex; flex-direction: column; gap: 10px; }
    .plan-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px 8px; padding: 10px; border: 1px solid var(--border); border-radius: 10px; }
    .plan-row .plan-note { grid-column: 1 / -1; font-size: 13px; }
    .plan-row .plan-title { font-weight: 600; }
    .plan-del { width: 32px; border: 0; background: none; color: var(--text-muted); font-size: 20px; cursor: pointer; border-radius: 8px; }
    .plan-del:hover { color: #c0392b; background: var(--bg-secondary); }
    #planBox .gh-actions { flex-wrap: wrap; }
    @media (max-width: 520px) { .plan-row { grid-template-columns: minmax(0, 1fr) auto; } .plan-row .plan-every { grid-column: 1; grid-row: 2; } .plan-row .plan-note { grid-row: 3; } }
    @media (max-width: 520px) { #bizBox .gh-row { flex-direction: column; align-items: stretch; } .biz-preview { flex-direction: column; } .biz-preview .bp-inv { text-align: left; } }
    .gh-help { margin: 0; font-size: 13px; color: var(--text-muted); line-height: 1.5; }
    .gh-error { margin: 0; min-height: 1em; font-size: 13px; color: #c0392b; }
    .gh-actions { display: flex; gap: 8px; align-items: center; }
    /* New board: name and type */
    .board-type { border: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
    .board-type legend { font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; padding: 0; }
    .gh-dialog .type-choice { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; row-gap: 2px; align-items: center; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; flex: none; }
    .gh-dialog .type-choice:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
    .type-choice input { grid-row: 1 / 3; accent-color: var(--accent); width: 16px; height: 16px; margin: 0; }
    .type-name { font-weight: 600; color: var(--text-primary); font-size: 14px; }
    .type-help { grid-column: 2; color: var(--text-muted); font-size: 12.5px; line-height: 1.4; }
    /* ===== Signed-out homepage (design/homepage, D-6) ===== */
    /* Website-only tokens: light coral is 3:1 on cream, so labels and links use --accent-ink and buttons --accent-fill */
    .landing { --accent-ink: #b0532f; --accent-fill: #b85a3a; --on-accent-fill: #fff; --hp-sh: rgba(20, 20, 19, .09); --hp-remind: #a8520b; --hp-danger: #c2302f; }
    :root[data-theme="dark"] .landing { --accent-ink: #e3876a; --accent-fill: #e3876a; --on-accent-fill: #1b1b1a; --hp-sh: rgba(0, 0, 0, .5); --hp-remind: #f0a35a; --hp-danger: #f28482; }
    @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .landing { --accent-ink: #e3876a; --accent-fill: #e3876a; --on-accent-fill: #1b1b1a; --hp-sh: rgba(0, 0, 0, .5); --hp-remind: #f0a35a; --hp-danger: #f28482; } }
    body.signed-out { height: auto; min-height: 100vh; overflow: auto; padding: 0; display: block; }
    body.signed-out #mainTabToggle, body.signed-out #taskViewToggle, body.signed-out #boardTools,
    body.signed-out .tab-panel, body.signed-out #fabAdd, body.signed-out header .buttons > :not(#themeBtn),
    body.signed-out #dojoPeek, body.signed-out #dojoPanel, body.signed-out #dojoScrim { display: none !important; }
    body.signed-out header { max-width: 1120px; margin: 0 auto; padding: 18px 32px; border: 0; box-sizing: border-box; }
    body.signed-out .header-left > img.logo-full { display: block; height: 52px !important; margin: 0; }
    body.signed-out .header-left > img.logo-mark { display: none; }
    body.signed-out #themeBtn { width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-card); }
    .landing[hidden] { display: none; }
    .landing { font-size: 16px; line-height: 1.5; }
    .landing h1, .landing h2, .landing h3 { color: var(--text-primary); }
    .hp-wrap { max-width: 1120px; margin: 0 auto; padding-left: 32px; padding-right: 32px; box-sizing: border-box; }
    .hp-disp { font-family: 'Mona Sans', 'Figtree', sans-serif; font-stretch: 125%; font-weight: 600; letter-spacing: -0.01em; text-wrap: balance; margin: 0; }
    .hp-kick { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-ink); }
    .landing a { color: var(--accent-ink); }
    .landing a:hover { color: var(--text-primary); }
    .hp-hero { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 64px; align-items: center; padding-top: 40px; padding-bottom: 80px; }
    .hp-h1 { font-size: 54px; line-height: 1.05; margin: 14px 0 20px; }
    .hp-lede { font-size: 18.5px; line-height: 1.55; color: var(--text-secondary); max-width: 31em; margin: 0; }

    /* Sign-in panel: email step, then the code step (mail tile, the address in bold, a big code field) */
    .hp-signin { background: var(--bg-card); border: 1px solid var(--border); border-radius: 20px; padding: 28px; box-shadow: 0 16px 48px var(--hp-sh); display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 24px; }
    .hp-signin-t { font-size: 22px; }
    .signin-sub { margin: -6px 0 0; color: var(--text-muted); font-size: 14.5px; }
    .hp-mail { display: none; width: 44px; height: 44px; border-radius: 14px; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent-ink); place-items: center; }
    .hp-mail svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
    .hp-signin.code-step .hp-mail { display: grid; }
    .hp-signin.code-step .google-btn, .hp-signin.code-step .signin-or, .hp-signin.code-step .signin-sub { display: none; }
    .google-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 48px; background: #fff; color: #1f1f1f; border: 1px solid #747775; border-radius: 999px; font: 600 15px/1 'Figtree', sans-serif; }
    .google-btn:hover { background: #f2f2f2; border-color: #747775; }
    .google-btn svg { width: 18px; height: 18px; }
    .signin-or { display: flex; align-items: center; gap: 12px; color: var(--text-muted); font-size: 13px; }
    .signin-or::before, .signin-or::after { content: ''; flex: 1; height: 1px; background: var(--border); }
    .signin-email { display: flex; flex-direction: column; gap: 14px; }
    .hp-field { display: flex; flex-direction: column; gap: 8px; }
    .hp-field label { font-size: 13px; font-weight: 500; color: var(--text-secondary); }
    .signin-email input { min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-primary); color: var(--text-primary); font: 15px 'Figtree', sans-serif; box-sizing: border-box; width: 100%; }
    .signin-email input::placeholder { color: var(--text-muted); }
    .signin-email input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
    .signin-email input.code { min-height: 60px; font-family: 'Mona Sans', 'Figtree', sans-serif; font-stretch: 125%; font-size: 26px; font-weight: 600; letter-spacing: .42em; text-align: center; padding-left: calc(14px + .42em); font-variant-numeric: tabular-nums; border: 2px solid var(--accent); }
    .signin-email input.code:focus { outline-color: var(--accent-ink); }
    .signin-email button[type="submit"] { min-height: 48px; padding: 0 22px; border-radius: 999px; font: 600 15px/1 'Figtree', sans-serif; border: 1px solid var(--border); background: var(--bg-card); color: var(--text-primary); }
    .signin-email button[type="submit"].primary { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--on-accent-fill); }
    .signin-note { margin: 0; font-size: 14.5px; color: var(--text-secondary); line-height: 1.5; }
    .signin-note b { color: var(--text-primary); font-weight: 600; word-break: break-all; }
    .signin-link { align-self: center; background: none; border: 0; padding: 12px 4px; min-height: 44px; color: var(--text-muted); font: 500 13px 'Figtree', sans-serif; text-decoration: underline; text-underline-offset: 2px; }
    .signin-link:hover { background: none; color: var(--text-primary); }
    .signin-fine { margin: 2px 0 0; font-size: 12.5px; color: var(--text-muted); text-align: center; }
    .landing .signin-fine a { color: inherit; }
    .signin-email .gh-error:empty { display: none; }

    /* Features: their own band under the hero */
    .hp-feats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 36px 48px; padding: 56px 0 80px; border-top: 1px solid var(--border); margin: 0; list-style: none; }
    .hp-feats li { display: flex; gap: 14px; align-items: flex-start; }
    .hp-ficon { flex: none; width: 40px; height: 40px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent-ink); display: grid; place-items: center; }
    .hp-ficon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
    .hp-feats h3 { font-size: 16px; font-weight: 600; line-height: 1.3; margin: 0 0 4px; }
    .hp-feats p { margin: 0; font-size: 14.5px; color: var(--text-muted); line-height: 1.5; }

    /* Scenes: mocks in shadow roots (scripts/build-homepage-scenes.mjs), played by landing.js */
    .hp-scene { display: block; }
    .hp-scene[hidden] { display: none; }
    .hp-scene[data-w] { width: 100%; max-width: 560px; overflow: hidden; border-radius: 20px; }
    .hp-screen { width: 100%; max-width: 560px; margin-left: auto; }
    .hp-pills { display: flex; gap: 6px; justify-content: center; margin-top: 14px; max-width: 560px; margin-left: auto; }
    .hp-pills button { min-height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text-secondary); font: 600 12.5px/1 'Figtree', sans-serif; }
    .hp-pills button[aria-pressed="true"] { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--on-accent-fill); }
    .hp-show { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center; padding-top: 104px; padding-bottom: 104px; }
    .hp-h2 { font-size: 38px; line-height: 1.1; margin: 10px 0 18px; }
    .hp-copy p.hp-p { margin: 0 0 14px; color: var(--text-secondary); font-size: 17px; max-width: 31em; }

    /* Plan + Timer pair */
    .hp-pair { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; padding-bottom: 104px; }
    .hp-panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: 20px; padding: 30px; display: flex; flex-direction: column; gap: 24px; min-width: 0; }
    .hp-panel .hp-h2 { font-size: 28px; margin: 8px 0 12px; }
    .hp-panel .hp-copy p.hp-p { font-size: 16px; margin: 0; }
    .hp-ptb { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
    .hp-pbtn { height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-card); font-size: 13px; font-weight: 600; color: var(--text-primary); display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; }
    .hp-pnav { width: 34px; padding: 0; }
    .hp-prange { font-family: 'Mona Sans', 'Figtree', sans-serif; font-stretch: 125%; font-weight: 600; font-size: 16px; margin-left: 4px; }
    .hp-seg { margin-left: auto; display: inline-flex; background: var(--bg-secondary); border-radius: 999px; padding: 3px; }
    .hp-seg span { padding: 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--text-muted); }
    .hp-seg .on { background: var(--bg-card); color: var(--text-primary); box-shadow: 0 1px 2px var(--hp-sh); }
    .hp-cal { background: var(--bg-secondary); border-radius: 16px; overflow: hidden; }
    .hp-chead { display: grid; grid-template-columns: 44px repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--border); }
    .hp-chead div { padding: 9px 2px; text-align: center; font-size: 11.5px; font-weight: 600; color: var(--text-secondary); white-space: nowrap; }
    .hp-chead .td { color: var(--accent-ink); background: color-mix(in srgb, var(--accent) 8%, transparent); }
    .hp-cgrid { display: grid; grid-template-columns: 44px repeat(7, minmax(0, 1fr)); height: 286px; }
    .hp-hrs { position: relative; }
    .hp-hrs div { position: absolute; right: 6px; font-size: 10.5px; color: var(--text-muted); transform: translateY(-50%); white-space: nowrap; }
    .hp-day { position: relative; border-left: 1px solid var(--border-light); background-image: repeating-linear-gradient(to bottom, var(--border-light) 0, var(--border-light) 1px, transparent 1px, transparent 44px); background-position: 0 22px; }
    .hp-day.hp-today { background-color: color-mix(in srgb, var(--accent) 8%, transparent); }
    .hp-blk { position: absolute; left: 3px; right: 3px; border-radius: 8px; padding: 4px 6px; font-size: 11px; line-height: 1.25; overflow: hidden; background: color-mix(in srgb, var(--cc) 28%, var(--bg-card)); border: 1px solid color-mix(in srgb, var(--cc) 55%, transparent); border-left: 3px solid var(--cc); box-sizing: border-box; color: var(--text-primary); }
    .hp-bt { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .hp-bm { color: var(--text-secondary); font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .hp-now { position: absolute; left: 0; right: 0; height: 2px; background: #e05652; z-index: 2; }
    .hp-now::before { content: ''; position: absolute; left: -4px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #e05652; }
    .hp-dv { display: none; }
    .hp-dgrid { display: grid; grid-template-columns: 52px minmax(0, 1fr); height: 286px; }
    .hp-dgrid .hp-blk { left: 6px; right: 8px; font-size: 12.5px; padding: 6px 10px; }
    .hp-dgrid .hp-bm { font-size: 11.5px; }
    .hp-tcard { background: var(--bg-primary); border: 1px solid var(--border); border-radius: 14px; padding: 22px 18px; display: flex; flex-direction: column; }
    .hp-modes { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
    .hp-mode { padding: 6px 12px; border-radius: 999px; background: var(--bg-secondary); color: var(--text-secondary); font-size: 12.5px; font-weight: 600; }
    .hp-mode.on { background: var(--accent-fill); color: var(--on-accent-fill); }
    .hp-tdisp { font-family: 'Mona Sans', 'Figtree', sans-serif; font-stretch: 125%; font-weight: 600; font-size: 64px; line-height: 1; text-align: center; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; margin: 22px 0 18px; }
    .hp-prog { height: 6px; background: var(--bg-secondary); border-radius: 3px; overflow: hidden; }
    .hp-prog div { height: 100%; width: 8%; background: var(--accent); border-radius: 3px; }
    .hp-sess { text-align: center; color: var(--text-muted); font-size: 13px; margin-top: 10px; }
    .hp-trow { display: flex; align-items: center; gap: 10px; margin-top: 18px; font-size: 13px; color: var(--text-secondary); }
    .hp-sel { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-card); color: var(--text-primary); }
    .hp-sel span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .hp-sel svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
    .hp-tctl { display: flex; justify-content: center; gap: 10px; margin-top: 20px; }
    .hp-tctl .hp-pbtn { height: 38px; padding: 0 18px; }
    .hp-tctl .hp-pbtn-p { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--on-accent-fill); padding: 0 28px; }

    /* Founder, CTA (the round app icon as a rising sun), footer */
    .hp-founder { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr); gap: 64px; padding-top: 72px; padding-bottom: 96px; border-top: 1px solid var(--border); }
    .hp-founder .hp-h2 { font-size: 32px; margin: 10px 0 0; }
    .hp-fcopy { display: flex; flex-direction: column; gap: 16px; }
    .hp-fcopy p { margin: 0; color: var(--text-secondary); font-size: 17px; line-height: 1.6; }
    .hp-fcopy p.lp-founder-key { color: var(--text-primary); font-family: 'Mona Sans', 'Figtree', sans-serif; font-stretch: 125%; font-weight: 600; font-size: 19px; line-height: 1.4; letter-spacing: -0.005em; }
    .hp-cta { position: relative; overflow: hidden; border-radius: 24px; border: 1px solid var(--border); background: var(--bg-card); padding: 56px; min-height: 340px; display: flex; align-items: center; box-sizing: border-box; }
    .hp-cta-t { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; max-width: 500px; }
    .hp-cta .hp-h2 { margin: 10px 0 14px; }
    .hp-cta .hp-p { margin: 0 0 26px; color: var(--text-secondary); font-size: 17px; }
    .landing a.hp-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 30px; border-radius: 999px; font: 600 16px/1 'Figtree', sans-serif; background: var(--accent-fill); color: var(--on-accent-fill); text-decoration: none; }
    .landing a.hp-btn:hover { color: var(--on-accent-fill); filter: brightness(1.06); }
    .hp-small { margin: 16px 0 0; font-size: 13px; color: var(--text-muted); }
    .hp-sun { position: absolute; right: -40px; bottom: -170px; width: 460px; height: 460px; border-radius: 50%; overflow: hidden; background: #0b0b0b; box-shadow: 0 0 120px rgba(214, 64, 47, .42); }
    .hp-sun img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.32); display: block; }
    .hp-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 32px; padding-bottom: 40px; color: var(--text-muted); font-size: 13px; }
    .landing .hp-foot a { color: var(--text-muted); }

    @media (max-width: 960px) {
      .hp-hero { grid-template-columns: minmax(0, 1fr); gap: 32px; }
      .hp-signin { max-width: 440px; width: 100%; box-sizing: border-box; }
      .hp-show, .hp-pair, .hp-founder { grid-template-columns: minmax(0, 1fr); }
      .hp-show { gap: 36px; }
      .hp-founder { gap: 16px; }
      .hp-screen, .hp-pills { margin-left: 0; }
    }
    @media (max-width: 640px) {
      body.signed-out header { padding: 12px 16px; }
      body.signed-out .header-left > img.logo-full { height: 44px !important; }
      .hp-wrap { padding-left: 16px; padding-right: 16px; }
      .hp-hero { padding-top: 16px; padding-bottom: 48px; gap: 28px; }
      .hp-h1 { font-size: 34px; line-height: 1.08; margin: 12px 0 14px; }
      .hp-lede { font-size: 16.5px; }
      .hp-signin { padding: 22px 18px; }
      .hp-feats { gap: 26px; padding-top: 40px; padding-bottom: 48px; }
      .hp-show { padding-top: 72px; padding-bottom: 72px; gap: 28px; }
      .hp-h2 { font-size: 28px; }
      .hp-copy p.hp-p { font-size: 16px; }
      .hp-pair { gap: 16px; padding-bottom: 72px; }
      .hp-panel { padding: 22px 16px; gap: 20px; border-radius: 18px; }
      .hp-panel .hp-h2 { font-size: 24px; }
      .hp-prange { font-size: 14px; }
      .hp-wk { display: none; }
      .hp-dv { display: block; }
      .hp-tdisp { font-size: 54px; }
      .hp-founder { padding-top: 56px; padding-bottom: 64px; }
      .hp-founder .hp-h2 { font-size: 26px; }
      .hp-fcopy p { font-size: 16px; }
      .hp-fcopy p.lp-founder-key { font-size: 17px; }
      .hp-cta { padding: 30px 22px 220px; min-height: 0; align-items: flex-start; border-radius: 20px; }
      .hp-cta .hp-h2 { font-size: 28px; }
      .hp-cta .hp-p { font-size: 16px; }
      .hp-sun { width: 320px; height: 320px; right: 50%; margin-right: -160px; bottom: -130px; }
      .hp-foot { padding-top: 24px; padding-bottom: 32px; }
    }

    .email-signin { margin: 28px auto 0; max-width: 360px; display: flex; flex-direction: column; gap: 8px; text-align: center; }
    .email-row { display: flex; gap: 8px; }
    .email-row input { flex: 1; min-width: 0; min-height: 42px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-secondary, transparent); color: var(--text-primary); font: inherit; }
    .email-signin .link-btn { background: none; border: none; color: var(--text-muted); text-decoration: underline; font-size: 13px; cursor: pointer; padding: 4px; min-height: 0; }
    .share-list { display: flex; flex-direction: column; gap: 6px; }
    .share-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); }
    .share-who { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 14px; color: var(--text-primary); }
    .share-who small { font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; }
    .share-row .del { min-width: 32px; min-height: 32px; }
    .share-owner { display: flex; flex-direction: column; gap: 8px; }
    .share-owner[hidden] { display: none; }
    .share-add { display: flex; gap: 8px; align-items: flex-end; }

    .modal-overlay {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(20, 20, 19, 0.5);
      z-index: 100;
      align-items: center;
      justify-content: center;
    }

    .modal-overlay.visible {
      display: flex;
    }

    .modal {
      background: var(--bg-card);
      border-radius: 12px;
      width: 90%;
      max-width: 800px;
      max-height: 85vh;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      box-shadow: 0 20px 60px rgba(20, 20, 19, 0.2);
    }

    .modal-header {
      padding: 20px;
      border-bottom: 1px solid var(--border);
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .modal-header h3 {
      font-size: 18px;
      font-weight: 600;
      color: var(--text-primary);
    }

    .modal-close {
      background: transparent;
      border: none;
      color: var(--text-muted);
      font-size: 24px;
      cursor: pointer;
      padding: 0;
      line-height: 1;
    }

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

    .modal-body {
      padding: 20px;
      overflow-y: auto;
      flex: 1;
    }

    .modal-footer {
      padding: 16px 20px;
      border-top: 1px solid var(--border);
      display: flex;
      justify-content: flex-end;
      gap: 10px;
    }

    .form-group {
      margin-bottom: 16px;
    }

    .form-group label {
      display: block;
      font-size: 12px;
      font-weight: 600;
      color: var(--text-secondary);
      text-transform: uppercase;
      letter-spacing: 0.05em;
      margin-bottom: 6px;
    }

    .form-group textarea {
      width: 100%;
      background: var(--bg-secondary);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 12px;
      color: var(--text-primary);
      font-size: 13px;
      font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
      line-height: 1.5;
      min-height: 300px;
      resize: vertical;
    }

    .form-group textarea:focus {
      outline: none;
      border-color: var(--accent);
    }

    /* Timer tab */
    .timer-layout {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
      gap: 24px;
      padding: 24px 0;
      align-items: start;
    }
    @media (max-width: 900px) { .timer-layout { grid-template-columns: 1fr; } }
    /* The page itself never scrolls (the header stays put), so the Timer page scrolls inside */
    #timerPanel { overflow-y: auto; }
    .timer-card {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 24px;
      box-shadow: 0 1px 3px var(--shadow);
    }
    .timer-modes { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
    .timer-modes button { padding: 6px 14px; font-size: 13px; background: var(--bg-secondary); border-color: transparent; color: var(--text-secondary); }
    .timer-modes button.active { background: var(--accent); color: #fff; }
    .timer-display {
      font-size: 88px; font-weight: 600; text-align: center; margin: 20px 0 12px;
      font-variant-numeric: tabular-nums; letter-spacing: -0.02em; color: var(--text-primary);
    }
    .timer-progress { height: 6px; background: var(--bg-secondary); border-radius: 3px; overflow: hidden; }
    .timer-progress div { height: 100%; width: 0; background: var(--accent); transition: width 0.3s linear; }
    .timer-session { text-align: center; color: var(--text-muted); font-size: 13px; margin-top: 10px; }
    .timer-task-row { display: flex; align-items: center; gap: 10px; margin-top: 18px; font-size: 13px; color: var(--text-secondary); }
    .timer-task-row select, .alarm-form input[type="text"], .alarm-form input[type="time"], .timer-settings input[type="number"], .timer-settings select {
      flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px;
      background-color: var(--bg-card); color: var(--text-primary); font: inherit; font-size: 14px;
    }
    .timer-controls { display: flex; justify-content: center; gap: 10px; margin-top: 20px; }
    .timer-start { min-width: 120px; justify-content: center; }
    .timer-settings { margin-top: 20px; font-size: 13px; color: var(--text-secondary); }
    .timer-sub { margin-top: 28px !important; margin-bottom: 12px !important; }
    .timer-settings-link { display: block; margin: 18px auto 0; border: 0; background: none; padding: 4px 8px; font-size: 13px; color: var(--text-muted); text-decoration: underline; text-underline-offset: 3px; }
    .timer-settings-link:hover { color: var(--text-primary); }
    .timer-settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin-top: 12px; }
    .timer-settings-grid label { display: flex; flex-direction: column; gap: 4px; }
    fieldset.timer-settings-grid { border: 0; padding: 0; margin-inline: 0; min-width: 0; }
    fieldset.timer-settings-grid:disabled { opacity: .5; }
    .timer-settings-grid small, .timer-uses small { font-size: 12px; color: var(--text-muted); }
    .timer-sub-first { margin-top: 0 !important; }
    .timer-hint-top { margin: -6px 0 0; }
    .timer-uses { display: flex; flex-direction: column; gap: 8px; }
    /* Settings → Dojo (design/dojo-panel/picked/settings-dojo) */
    .use-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
    .use-tile { display: flex !important; flex-direction: row !important; align-items: flex-start; gap: 12px !important; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-card); cursor: pointer; }
    .use-tile.on { border-color: var(--wx-timer); }
    .use-tile[hidden] { display: none !important; }
    .use-tile input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--wx-timer); }
    .use-tile b { display: block; font-size: 15px; font-weight: 600; color: var(--text-primary); }
    .use-tile small { display: block; font-size: 13px; color: var(--text-muted); }
    .use-says { display: flex; align-items: center; gap: 14px; margin-top: 10px; padding: 12px 14px; border-radius: 12px; background: var(--bg-secondary); font-size: 13px; color: var(--text-secondary); }
    .use-pv { flex: none; width: 46px; height: 42px; padding: 7px 6px; border-radius: 6px; background: var(--bg-card); box-shadow: 0 1px 2px var(--shadow); display: flex; flex-direction: column; gap: 4px; }
    .use-pv i { height: 4px; border-radius: 2px; background: var(--border); }
    .use-pv i:first-child { width: 60%; }
    .use-pv[data-lead="both"] i:nth-child(2) { background: var(--wx-timer); opacity: .6; }
    .use-pv[data-lead="both"] i:nth-child(3) { background: #fa5d00; opacity: .7; }
    .use-pv[data-lead="trk"] i:nth-child(2) { height: 8px; background: #fa5d00; opacity: .7; }
    .use-pv[data-lead="cd"] i:nth-child(2) { height: 8px; background: var(--wx-timer); opacity: .6; }
    .seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--bg-secondary); }
    .seg label { display: block !important; cursor: pointer; }
    .seg input { position: absolute; opacity: 0; pointer-events: none; }
    .seg span { display: block; white-space: nowrap; padding: 6px 14px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--text-secondary); }
    .seg input:checked + span { background: var(--bg-card); color: var(--text-primary); font-weight: 600; box-shadow: 0 1px 2px var(--shadow); }
    .seg input:focus-visible + span { outline: 2px solid var(--accent); }
    .countdown-off { margin: 0; padding: 14px 16px; border: 1px dashed var(--border); border-radius: 12px; font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
    .countdown-off[hidden], #countdownOn[hidden] { display: none; }
    .unit { position: relative; display: block; }
    .unit input { width: 100%; padding-right: 9em !important; }
    .unit i { position: absolute; left: 3.2em; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--text-muted); pointer-events: none; }
    @media (max-width: 760px) { .use-tiles { grid-template-columns: 1fr; } .timer-chip .tc-n { display: none; } }
    .timer-uses [hidden] { display: none !important; }
    .timer-uses input:disabled { opacity: .6; }
    .timer-check { display: flex !important; flex-direction: row !important; align-items: center; gap: 6px; font-size: 13px; color: var(--text-secondary); }
    .timer-heading { font-size: 16px; font-weight: 600; margin: 0 0 14px; }
    .timer-task-row .info-tip { display: inline-grid; place-items: center; width: 20px; height: 20px; color: var(--text-muted); cursor: help; position: relative; }
    .timer-task-row .info-tip svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
    .info-tip:hover::after, .info-tip:focus::after { content: attr(data-tip); position: absolute; left: 0; bottom: calc(100% + 8px); z-index: 50; width: max-content; max-width: min(280px, calc(100vw - 32px)); padding: 6px 10px; border-radius: 8px; background: #2b2b29; color: #f4f3ee; font: 500 12px/1.35 inherit; text-align: left; white-space: normal; box-shadow: 0 6px 18px rgba(0,0,0,.3); pointer-events: none; }
    .alarm-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
    .alarm-form input[type="time"] { flex: 0 0 130px; }
    .alarm-form input[type="text"] { flex: 1 1 160px; }
    .alarm-list { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
    .alarm-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border-light); border-radius: 10px; background: var(--bg-primary); }
    .alarm-item.off { opacity: 0.5; }
    .alarm-time { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
    .alarm-meta { flex: 1; min-width: 0; font-size: 13px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .alarm-item button { padding: 4px 10px; font-size: 12px; }
    .alarm-empty, .timer-hint { font-size: 13px; color: var(--text-muted); }
    .timer-hint { margin-top: 16px; }
    .timer-hint a { color: var(--accent); }
    /* Header chips (design/dojo-panel/picked/header-chip): a quiet pill with the timer's coloured dot, its time and the task */
    .timer-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; max-width: 300px; font-weight: 600; white-space: nowrap; background: var(--bg-secondary); color: var(--text-primary); border-color: var(--border); }
    .timer-chip .tc-go { flex: none; width: 24px; height: 24px; margin: -4px 0 -4px -6px; border-radius: 50%; display: grid; place-items: center; color: var(--wx-timer); background: color-mix(in srgb, currentColor 16%, transparent); }
    .timer-chip .tc-go svg { width: 14px; height: 14px; fill: currentColor; }
    .timer-chip .tc-go:hover, .timer-chip .tc-go:focus-visible { background: color-mix(in srgb, currentColor 30%, transparent); outline: none; }
    .timer-chip .tc-t { font-family: 'Mona Sans', 'Figtree', sans-serif; font-stretch: 125%; font-variant-numeric: tabular-nums; }
    .timer-chip .tc-t:empty { display: none; }
    .timer-chip .tc-n { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: 500; color: var(--text-secondary); }
    .timer-chip.paused .tc-t { color: var(--text-muted); }
    .timer-chip.over .tc-t { color: #c62f22; }
    :root[data-theme="dark"] .timer-chip.over .tc-t { color: #ff6b5e; }
    .timer-chip:hover { background: var(--bg-card); }
    /* While the docked panel is open. Green is kept for running, below */
    .timer-chip.dojo-open { box-shadow: 0 0 0 2px var(--border); }
    .timer-chip:not(.paused) { background: transparent; border: 2px solid var(--wx-timer); box-shadow: 0 0 0 3px color-mix(in srgb, var(--wx-timer) 22%, transparent); }
    /* Dojo where there's no pop-out: docked on the right below the header, pushing the board (design/dojo-panel/picked/panel-desktop) */
    .dojo-panel { position: fixed; z-index: 900; right: 0; bottom: 0; width: 360px; display: flex; flex-direction: column; background: var(--bg-card); border-left: 1px solid var(--border); }
    .dojo-panel[hidden] { display: none; }
    .dojo-panel-head { flex: none; display: flex; align-items: center; gap: 4px; height: 52px; padding: 0 10px 0 18px; border-bottom: 1px solid var(--border); }
    .dojo-panel-head b { flex: 1; font-size: 15px; font-weight: 600; }
    .dojo-grab { display: none; }
    .dojo-panel-btn { width: 36px; height: 36px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--text-muted); }
    .dojo-panel-btn:hover { background: var(--bg-secondary); color: var(--text-primary); }
    .dojo-panel-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
    .dojo-panel iframe { flex: 1; min-height: 0; width: 100%; border: 0; display: block; background: var(--bg-card); }
    body.dojo-docked > .tab-panel { margin-right: 336px; }
    body.dojo-docked #todayPanel { display: none; }
    /* Phones: the same view as a sheet from the bottom over a dimmed page (design/dojo-panel/picked/panel-phone) */
    .dojo-panel.sheet { top: 10vh; left: 0; width: auto; border-left: 0; border-radius: 20px 20px 0 0; box-shadow: 0 -12px 40px var(--shadow-hover); overflow: hidden; z-index: 1300; transition: transform .2s ease; touch-action: none; }
    .dojo-panel.sheet .dojo-panel-head { height: 36px; border-bottom: 0; position: relative; justify-content: flex-end; }
    .dojo-panel.sheet .dojo-panel-head b, .dojo-panel.sheet #dojoPanelGear { display: none; }
    .dojo-panel.sheet .dojo-grab { display: block; position: absolute; left: 50%; top: 10px; width: 40px; height: 5px; margin-left: -20px; border-radius: 3px; background: var(--border); }
    .dojo-scrim { position: fixed; inset: 0; z-index: 1299; background: rgba(0, 0, 0, .35); }
    .dojo-scrim[hidden] { display: none; }
    /* The peek bar above the page while a timer runs and the sheet is folded away (design/dojo-panel/picked/panel-phone-peek) */
    .dojo-peek { position: fixed; z-index: 1200; left: 10px; right: 10px; bottom: max(10px, env(safe-area-inset-bottom, 0px)); display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 12px; border: 1px solid var(--border); border-radius: 18px; background: var(--bg-card); box-shadow: 0 8px 28px var(--shadow-hover); cursor: pointer; }
    .dojo-peek[hidden] { display: none; }
    .pk-go { position: relative; flex: none; width: 44px; height: 44px; display: grid; place-items: center; }
    .pk-ring { position: absolute; inset: 0; transform: rotate(-90deg); }
    .pk-ring circle { fill: none; stroke-width: 4; }
    .pk-ring .track { stroke: var(--border); }
    .pk-ring .fill { stroke: var(--wx-timer); stroke-linecap: round; stroke-dasharray: 119.38; }
    #pkGo { position: relative; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; background: var(--text-primary); }
    #pkGo svg { width: 12px; height: 12px; fill: var(--bg-card); }
    .pk-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
    .pk-txt b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .pk-txt small { font-size: 13px; color: var(--text-muted); white-space: nowrap; }
    #pkLeft { font-family: 'Mona Sans', 'Figtree', sans-serif; font-stretch: 125%; font-weight: 600; color: var(--text-primary); font-variant-numeric: tabular-nums; }
    #pkHv { color: #b84300; }
    :root[data-theme="dark"] #pkHv { color: #fa5d00; }
    #pkHv::before { content: ''; display: inline-block; width: 8px; height: 8px; margin: 0 5px 0 8px; border-radius: 50%; background: #fa5d00; }
    #pkLeft:empty + #pkHv::before { margin-left: 0; }
    .pk-done { flex: none; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 12px; display: grid; place-items: center; background: var(--wx-timer); color: var(--on-wx-timer); }
    .pk-done svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
    .pk-done[hidden], #pkGo[hidden] { display: none; }
    .stopwatch-display { font-size: 64px; margin: 8px 0 4px; }
    .lap-list { margin: 16px 0 0; padding: 0; list-style: none; max-height: 220px; overflow-y: auto; font-variant-numeric: tabular-nums; }
    .lap-list li { display: flex; justify-content: space-between; padding: 6px 4px; border-bottom: 1px solid var(--border-light); font-size: 14px; color: var(--text-secondary); }
    .lap-list li span:last-child { color: var(--text-primary); font-weight: 500; }
    .pip-btn { width: 100%; justify-content: center; margin-bottom: 20px; }
    /* Time's up: a card in the top corner, not a screen-wide dim, so the page stays usable */
    .alarm-overlay { position: fixed; top: 88px; right: 16px; z-index: 2000; width: min(380px, calc(100vw - 32px)); }
    .alarm-box {
      background: var(--bg-card); border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: 14px; padding: 14px 16px;
      box-shadow: 0 12px 32px var(--shadow-hover, rgba(0,0,0,0.25)); animation: alarmIn 0.2s ease-out;
    }
    @keyframes alarmIn { from { opacity: 0; transform: translateY(-8px); } }
    .alarm-box h2 { margin: 0 0 2px; font-size: 16px; }
    .alarm-box p { margin: 0 0 12px; color: var(--text-secondary); font-size: 13.5px; }
    .alarm-box .alarm-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
    .alarm-snooze { display: inline-flex; }
    .alarm-snooze button { border-top-right-radius: 0; border-bottom-right-radius: 0; }
    .alarm-snooze select { -webkit-appearance: none; appearance: none; width: 38px; padding: 0; border: 1px solid var(--border); border-left: none; border-radius: 0 999px 999px 0; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%238a8a85' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / 12px 8px; color: transparent; cursor: pointer; }
    .alarm-snooze select option { color: var(--text-primary); background: var(--bg-card); }

    /* Tab panel containers */
    .tab-panel {
      display: none;
      flex: 1;
      min-height: 0;
      flex-direction: column;
    }

    .tab-panel.active {
      display: flex;
    }

    /* Memory panel scrollable area */
    .memory-content-area {
      flex: 1;
      overflow-y: auto;
      min-height: 0;
    }

    .memory-content-area::-webkit-scrollbar {
      width: 6px;
    }

    .memory-content-area::-webkit-scrollbar-track {
      background: transparent;
    }

    .memory-content-area::-webkit-scrollbar-thumb {
      background: var(--border);
      border-radius: 3px;
    }

    .memory-content-area::-webkit-scrollbar-thumb:hover {
      background: var(--text-muted);
    }

    .file-card-content::-webkit-scrollbar,
    .modal-body::-webkit-scrollbar {
      width: 6px;
    }

    .file-card-content::-webkit-scrollbar-track,
    .modal-body::-webkit-scrollbar-track {
      background: transparent;
    }

    .file-card-content::-webkit-scrollbar-thumb,
    .modal-body::-webkit-scrollbar-thumb {
      background: var(--border);
      border-radius: 3px;
    }

    .file-card-content::-webkit-scrollbar-thumb:hover,
    .modal-body::-webkit-scrollbar-thumb:hover {
      background: var(--text-muted);
    }

    /* File path display */
    /* The connected file is shown in the Settings button's tooltip instead */
    .file-path { display: none; }

    .move-menu { display: flex; flex-direction: column; gap: 2px; min-width: 160px; padding: 6px; }
    .move-option { display: flex; align-items: center; gap: 10px; text-align: left; border: none; border-radius: 8px; padding: 8px 12px; font-size: 14px; background: transparent; justify-content: flex-start; }
    .move-option:hover { background: var(--bg-secondary); }
    .move-option.current { opacity: 0.45; cursor: default; }

    /* ---------- Phones and narrow windows ---------- */
    @media (max-width: 760px) {
      body { padding: 12px; height: 100dvh; }
      header { flex-wrap: wrap; gap: 8px 6px; margin-bottom: 8px; padding-bottom: 8px; }
      .header-left { display: contents; }
      .header-left > img { order: 1; width: 34px; height: 34px; margin-right: 0 !important; }
      .header-left > div:not(.view-toggle) { order: 2; }
      header h1 { font-size: 1.25rem; }
      header .buttons { order: 3; margin-left: auto; gap: 0; }
      /* One header row on phones: Timer is an icon, and the board is the only view */
      #mainTabToggle, #taskViewToggle { display: none !important; }
      header .buttons > button.timer-icon-btn { display: inline-flex; }
      header .timer-icon-btn.active { color: var(--accent); }
      header .buttons > button { height: 36px; }
      header .view-toggle { height: 34px; padding: 3px; }
      header .view-toggle button { height: 28px; padding: 0 12px; font-size: 13px; }
      /* Icon buttons: no circles on phones */
      header .theme-btn { width: 36px; background: transparent; border: none; box-shadow: none; font-size: 19px; color: var(--text-secondary); }
      header .theme-btn:active { background: var(--bg-secondary); }
        .column-header { padding: 12px 14px 6px; }
      .add-card { display: none; }
      .fab-add.show { display: flex; }
      .harvest-chip, .timer-chip { max-width: 112px; padding: 0 12px; justify-content: flex-start; }
      .harvest-chip { max-width: 172px; }
      .harvest-chip .hc-title { display: none; }
      .gh-row { flex-direction: column; }

      .board { gap: 12px; scroll-snap-type: x mandatory; padding-bottom: 8px; }
      .col-resize { display: none; }
      .column { min-width: calc(100vw - 40px); max-width: calc(100vw - 40px); scroll-snap-align: start; border-radius: 16px; }
      .column.collapsed { min-width: 48px; max-width: 48px; }
      .board > .stack { min-width: calc(100vw - 40px); max-width: calc(100vw - 40px); scroll-snap-align: start; }
      .stack > .column, .stack > .column.collapsed { min-width: 0; max-width: none; }
      .cards { padding: 8px 10px 84px; }
      @media (hover: hover) { .cards { padding-top: 24px; } } /* a narrow window with a mouse still shows the hover bar */

      .timer-layout { padding: 12px 0; gap: 12px; }
      .timer-card { padding: 18px; }
      .timer-display { font-size: 60px; }
      .stopwatch-display { font-size: 46px; }
      .timer-settings-grid { grid-template-columns: 1fr; }
    }

    /* Touch screens: compact cards; everything lives in the ⋯ menu */
    .card-menu-btn { display: none; }
    header .buttons > .timer-icon-btn { display: none; }
    /* The Timer tab is gone: the ⏱ icon opens Dojo on every screen */
    header .buttons > #timerIconBtn { display: inline-flex; }
    #timerTabBtn { display: none !important; }
    header #timerIconBtn.active { color: var(--wx-timer); }
    /* Board is the only view */
    #taskViewToggle { display: none !important; }
    .fab-add {
      display: none; position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom));
      width: 58px; height: 58px; border-radius: 50%; z-index: 900;
      align-items: center; justify-content: center; padding: 0;
      background: var(--accent); color: #fff; border: none;
      font-size: 32px; font-weight: 400; line-height: 1;
      box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    }
    .fab-add:active { transform: scale(0.94); }
    /* The mic: in the header, or above + where + shows (narrow screens) */
    .fab-voice { display: none; position: fixed; right: 25px; bottom: calc(88px + env(safe-area-inset-bottom)); width: 44px; height: 44px; border-radius: 50%; z-index: 900; align-items: center; justify-content: center; padding: 0; background: var(--bg-card); color: var(--text-primary); border: 1px solid var(--border); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25); }
    .fab-voice:active { transform: scale(0.94); }
    #voiceBtn[hidden] { display: none; }
    @media (max-width: 760px) {
      .cards { padding-bottom: 150px; } /* the last card can scroll clear of the mic and + */
      .fab-voice:not([hidden]) { display: flex; }
      header #voiceBtn { display: none; }
    }
    .voice-sheet { position: fixed; z-index: 1000; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(440px, calc(100vw - 32px)); padding: 14px 16px 12px; border: 1px solid var(--border); border-radius: 16px; background: var(--bg-card); color: var(--text-primary); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35); }
    .voice-sheet p { margin: 0; }
    .voice-head { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-secondary); }
    .voice-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); animation: voicePulse 1.2s ease-in-out infinite; }
    .voice-sheet.failed .voice-dot { display: none; }
    .voice-sheet.failed .voice-head { color: var(--text-primary); }
    @keyframes voicePulse { 50% { opacity: 0.35; transform: scale(0.8); } }
    @media (prefers-reduced-motion: reduce) { .voice-dot { animation: none; } }
    .voice-said { min-height: 24px; margin-top: 8px !important; font-size: 17px; line-height: 1.4; overflow-wrap: anywhere; }
    .voice-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
    .voice-foot button { min-height: 44px; padding: 0 14px; border-radius: 10px; font-size: 14px; }
    .voice-done { background: var(--accent); border-color: var(--accent); color: #fff; }
    @media (hover: none) {
      .task-card { padding: 12px 44px 12px 14px; margin-bottom: 8px; }
      /* Keep the hover row in the page (Harvest opens its window from it) but never show it */
      .task-card .card-actions, .task-card:hover .card-actions, .client-card .card-actions, .client-card:hover .card-actions, .client-card:focus-within .card-actions { opacity: 0; pointer-events: none; }
      .task-card .add-on-hover, .task-card:hover .add-on-hover { display: none; }
      .card-menu-btn {
        display: flex; align-items: center; justify-content: center;
        position: absolute; top: 6px; right: 4px; width: 38px; height: 38px;
        padding: 0; border: none; border-radius: 50%; background: transparent;
        color: var(--text-muted); font-size: 20px; line-height: 1;
      }
      .card-menu-btn:active { background: var(--bg-secondary); }
      /* The client's logo: a faded mark on the right, beside ⋯, as on desktop (design/task-card/PHONE-LOGO.md) */
      body .task-card:has(> div:first-of-type > .client-avatar) { padding-right: calc(32px * var(--logo-scale, 1) + 58px); min-height: max(58px, calc(32px * var(--logo-scale, 1) + 20px)); }
      body .task-card > div:first-of-type > .client-avatar { right: 50px; width: calc(32px * var(--logo-scale, 1)); height: calc(32px * var(--logo-scale, 1)); border-radius: calc(9px * var(--logo-scale, 1)); }
      .card-meta { margin-top: 4px; }
    }
    .card-menu { display: flex; flex-direction: column; gap: 2px; min-width: 220px; padding: 6px; }
    .color-menu { max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); overflow-y: auto; overscroll-behavior: contain; }
    /* Swiping a card on a phone: it follows the finger and says what letting go will do */
    .task-card.swiping, .client-card.swiping { transition: none; touch-action: none; z-index: 3; }
    .task-card.swipe-r, .client-card.swipe-r { box-shadow: inset 0 0 0 999px color-mix(in srgb, #2f9e6e calc(var(--swipe, 0) * 22%), transparent); }
    .task-card.swipe-l, .client-card.swipe-l { box-shadow: inset 0 0 0 999px color-mix(in srgb, var(--text-primary) calc(var(--swipe, 0) * 10%), transparent); }
    .swipe-hint { position: absolute; top: 50%; transform: translateY(-50%); z-index: 4; padding: 5px 11px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; pointer-events: none; background: var(--bg-secondary); color: var(--text-secondary); opacity: .75; transition: opacity .1s, background .1s; }
    .swipe-hint[data-dir="r"] { left: 10px; } .swipe-hint[data-dir="l"] { right: 10px; }
    .swipe-go .swipe-hint { opacity: 1; color: #fff; }
    .swipe-go .swipe-hint[data-dir="r"] { background: #2f9e6e; } .swipe-go .swipe-hint[data-dir="l"] { background: var(--text-primary); color: var(--bg-primary); }
    .cc-open { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; margin: -2px 0 -2px -8px; border: none; border-radius: 999px; background: none; font: inherit; color: inherit; }
    .cc-open span { display: inline-block; font-size: 15px; line-height: 1; transition: transform .15s; }
    .cc-open[aria-expanded="true"] span { transform: rotate(-90deg); }
    .cc-tasks { margin: -4px 0 12px 12px; padding-left: 10px; border-left: 2px solid var(--border); display: flex; flex-direction: column; }
    .cc-tasks .task-card { margin-bottom: 8px; }
    .cc-add { align-self: flex-start; padding: 6px 12px; font-size: 13.5px; color: var(--accent); background: none; }
    .card-actions .wx-btn, .client-card .card-actions .wx-btn { font-size: 11px; color: var(--wx-timer); }
    .card-actions .wx-btn:hover { background: color-mix(in srgb, var(--wx-timer) 14%, transparent); color: var(--wx-timer); }
    .card-actions .wx-btn.running { background: var(--wx-timer); color: var(--on-wx-timer); }
    .wx-chip[hidden] { display: none !important; }
    .wx-bill { flex: none; width: 28px; height: 28px; padding: 0; border: 1px solid color-mix(in srgb, var(--wx-timer) 45%, transparent); border-radius: 8px; background: color-mix(in srgb, var(--wx-timer) 16%, transparent); color: var(--wx-timer); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
    @media (prefers-color-scheme: dark) { .wx-bill { color: #a99cff; } }
    .wx-bill.off { color: var(--text-muted); text-decoration: line-through; background: transparent; border: 1px dashed var(--border); }
    .price-note { display: inline-flex; align-items: center; margin: 2px 0 4px 30px; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: color-mix(in srgb, var(--wx-timer) 13%, transparent); color: var(--wx-timer); font-variant-numeric: tabular-nums; }
    .cp-money-parts { display: block; color: var(--text-muted); font-size: 12.5px; margin-top: 2px; }
    .cp-csv { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; font-size: 13px; }
    .cp-csv select { padding: 5px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-card); color: var(--text-primary); font: inherit; font-size: 13px; }
    .cp-money { font-size: 13.5px; color: var(--text-secondary); }
    .cp-money b { color: var(--text-primary); font-variant-numeric: tabular-nums; }
    .cp-price-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    @media (max-width: 480px) { .cp-price-grid { grid-template-columns: 1fr 1fr; } }
    .today-run.wx-today .dot { background: var(--wx-timer); }
    /* WaxOn's own timer is moss on the board, so here too (design/active-look/HANDOFF.md) */
    .today-run.wx-today { border-color: var(--wx-timer); box-shadow: 0 0 0 3px color-mix(in srgb, var(--wx-timer) 22%, transparent); background: color-mix(in srgb, var(--wx-timer) 10%, var(--bg-card)); }
    /* The running task's client: its logo before the title */
    .today-run .today-logo { flex: 0 0 26px; width: 26px; height: 26px; border-radius: 7px; margin: 0; cursor: default; }
    .today-run .today-logo:hover { box-shadow: none; }
    #hvTimerCard[hidden] { display: none; }
    .wx-start { background: var(--wx-timer); border-color: var(--wx-timer); color: var(--on-wx-timer); }
    .wx-start:hover { background: var(--wx-timer); border-color: var(--wx-timer); filter: brightness(1.1); }
    .wx-live { cursor: pointer; }
    .hv-log-row .wx-note { flex: 1; min-width: 0; padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-card); color: var(--text-primary); font: inherit; font-size: 13px; }
    .hv-log-row .wx-note.wx-label { color: var(--text-muted); }
    .wx-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
    .wx-add input { padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-card); color: var(--text-primary); font: inherit; font-size: 13px; }
    .wx-add .hv-hours-in { width: 64px; }
    .wx-add .wx-note { flex: 1; min-width: 120px; }
    .wx-add button { padding: 6px 14px; font-size: 13px; }
    .menu-scrim { position: fixed; inset: 0; z-index: 1599; background: rgba(10, 10, 9, 0.35); animation: cpFade .15s ease-out; }
    .menu-close { display: none; }
    @media (hover: none) and (max-width: 760px) {
      body > .color-menu { left: 8px !important; right: 8px !important; top: auto !important; bottom: calc(8px + env(safe-area-inset-bottom, 0px)) !important;
        max-height: 72vh; max-height: 72dvh; border-radius: 16px; justify-content: center; -webkit-overflow-scrolling: touch; animation: menuUp .18s ease-out; }
      body > .color-menu.card-menu { justify-content: flex-start; }
      body > .color-menu.card-menu button { min-height: 44px; font-size: 15px; flex: none; }
      .menu-close { display: block; grid-column: 1 / -1; margin-top: 6px; min-height: 44px; border-radius: 12px; font-weight: 600; }
    }
    @keyframes menuUp { from { transform: translateY(16px); opacity: 0; } }
    .card-menu button {
      display: flex; align-items: center; gap: 10px; text-align: left; justify-content: flex-start;
      border: none; border-radius: 8px; padding: 11px 12px; font-size: 15px; font-weight: 500; background: transparent;
    }
    .card-menu button:active, .card-menu button:hover { background: var(--bg-secondary); }
    .move-option .menu-ico { width: 20px; height: 20px; flex: 0 0 20px; display: inline-flex; align-items: center; justify-content: center; color: var(--text-secondary); }
    .card-menu .menu-ico { width: 20px; height: 20px; flex: 0 0 20px; display: inline-flex; align-items: center; justify-content: center; color: var(--text-secondary); }
    .card-menu .danger .menu-ico { color: inherit; }
    .card-menu .danger { color: #d9534f; }
    .card-menu .menu-sep { height: 1px; background: var(--border); margin: 4px 6px; }
    .card-menu .menu-sub { padding-left: 30px; font-size: 14px; }

    /* Touch dragging */
    .touch-ghost {
      position: fixed; left: 0; top: 0; z-index: 3000; pointer-events: none; margin: 0;
      opacity: 0.92; box-shadow: 0 12px 30px rgba(0,0,0,0.35);
    }
    .board.touch-dragging { scroll-snap-type: none !important; }
    .column.touch-over { outline: 2px dashed var(--accent); outline-offset: -2px; }
    @media (hover: none) {
      .task-card, .client-card { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
      /* Touch: a row of controls along the card's bottom, so nothing depends on hover. Its empty middle opens the card */
      .card-touchbar { display: flex; align-items: center; gap: 2px; margin: 8px -8px -8px; padding-top: 2px; border-top: 1px solid var(--border-light); color: var(--text-secondary); }
      .card-touchbar button { height: 40px; min-width: 44px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; border: 0; border-radius: 10px; background: transparent; box-shadow: none; color: inherit; font: inherit; font-size: 13px; font-variant-numeric: tabular-nums; opacity: 1; }
      .card-touchbar button:active { background: var(--bg-secondary); }
      .card-touchbar .tb-grip { touch-action: none; }
      .card-touchbar .card-fold { margin-left: auto; width: auto; height: 40px; align-self: auto; font-size: 20px; opacity: 1; }
      .task-card.folded .card-touchbar .card-fold { opacity: 1; }
      .card-touchbar:not(:has(.card-fold)) .card-menu-btn { margin-left: auto; } /* no arrow on a title-only card: ⋯ stays at the end */
      .card-touchbar .card-menu-btn { display: inline-flex; position: static; width: auto; height: 40px; border-radius: 10px; font-size: 20px; }
      .client-card .card-touchbar .card-menu-btn { margin-left: auto; }
      .client-card:has(> .card-touchbar) { flex-wrap: wrap; }
      .client-card > .card-touchbar { flex: 0 0 calc(100% + 16px); margin-top: 0; }
      .cards:not([data-reorder]) > .client-card .tb-grip, .cc-tasks .tb-grip { visibility: hidden; }
      .task-card.has-touchbar { padding-right: 14px; }
      span.tb-subs { display: inline-flex; align-items: center; gap: 5px; padding: 0 8px; font-size: 13px; font-variant-numeric: tabular-nums; }
      .card-touchbar .tb-subs.on { color: var(--accent); }
      .task-card.has-touchbar .card-subtasks > .subtask.add-on-hover { display: none; } /* + in the row adds one */
      /* Its logo sits top right, now that the row holds ⋯ */
      body .task-card.has-touchbar:has(> div:first-of-type > .client-avatar) { padding-right: 14px; }
      body .task-card.has-touchbar > div:first-of-type > .client-avatar { right: 12px; top: 12px; bottom: auto; transform: none; }
      body .task-card.has-touchbar:not(.folded) > div:first-of-type:has(> .client-avatar) { padding-right: calc(32px * var(--logo-scale, 1) + 8px); min-height: calc(32px * var(--logo-scale, 1) + 6px); } /* the note starts below the logo */
      /* Collapsed: still one line, with the chevron and ⋯ at the end of it */
      .task-card.has-touchbar.folded { padding-right: 104px; }
      body .task-card.has-touchbar.folded:has(> div:first-of-type > .client-avatar) { padding-right: 104px; min-height: 0; }
      .task-card.has-touchbar.folded > .card-touchbar { display: flex; position: absolute; top: 2px; right: 4px; margin: 0; padding: 0; border: 0; }
      .task-card.has-touchbar.folded > .card-touchbar .tb-grip, .task-card.has-touchbar.folded > .card-touchbar .tb-add, .task-card.has-touchbar.folded > .card-touchbar .time-badge { display: none; }
      /* …and how many subtasks it holds */
      .task-card.has-touchbar.folded:has(.tb-subs), body .task-card.has-touchbar.folded:has(.tb-subs):has(> div:first-of-type > .client-avatar) { padding-right: 160px; }
      .task-card.has-touchbar.folded > .card-touchbar .tb-subs { padding: 0 6px; min-width: 0; }
      /* The time, in the bottom row */
      .card-touchbar .time-badge { display: inline-flex; white-space: nowrap; align-items: center; gap: 4px; height: 32px; padding: 0 8px; margin: 0; border-radius: 8px; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--text-secondary); background: transparent; }
      /* A subtask moves by its grip, to the left of its circle */
      .task-card .subtask[data-row] { position: relative; }
      .st-grip { position: absolute; left: -30px; top: 50%; width: 28px; height: 34px; transform: translateY(-50%); display: grid; place-items: center; color: var(--text-muted); opacity: .6; touch-action: none; }
      .subtask:has(> .st-grip) > .checkbox::before { left: 0; } /* its tap area stops short of the grip */
      /* A column moves by the grip in its header */
      .col-grip { flex: none; width: 34px; height: 34px; margin: -8px 2px -8px -10px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; box-shadow: none; color: var(--text-muted); touch-action: none; }
      .column.collapsed .col-grip { display: none; }
      .col-ghost { position: fixed; left: 0; top: 0; z-index: 10000; pointer-events: none; background: var(--bg-column, var(--bg-secondary)); border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.35); opacity: .95; }
    }

    /* Close buttons and the Harvest time window */
    .dialog-close {
      position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; padding: 0;
      display: flex; align-items: center; justify-content: center;
      border: none; border-radius: 50%; background: transparent; color: var(--text-muted);
      font-size: 24px; line-height: 1; z-index: 2;
    }
    .dialog-close:hover { background: var(--bg-secondary); color: var(--text-primary); }
    .gh-dialog { position: relative; }
    .overlay-close {
      position: fixed; top: 14px; right: 14px; width: 44px; height: 44px; font-size: 28px;
      background: var(--bg-card); border: 1px solid var(--border);
      box-shadow: 0 4px 16px rgba(0,0,0,0.4); color: var(--text-primary);
    }
    .hv-log-list { display: flex; flex-direction: column; gap: 6px; max-height: 40vh; overflow-y: auto; }
    .hv-log-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--bg-secondary); font-size: 14px; }
    .hv-log-row input[type="date"] { padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-card); color: var(--text-primary); font: inherit; font-size: 14px; }
    .hv-log-row .hv-hours-in { width: 64px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-card); color: var(--text-primary); font: inherit; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
    .cp .hv-log-list { display: flex; flex-direction: column; gap: 6px; }
    .cp .hv-log-row { padding: 6px 8px; gap: 8px; font-size: 13px; }
    .cp .hv-log-row input[type="date"] { width: 132px; padding: 4px 6px; font-size: 13px; }
    .cp .hv-log-row .hv-hours-in { width: 56px; padding: 4px 6px; font-size: 13px; }
    .hv-log-row .hv-hours-in[readonly] { border-color: transparent; background: none; }
    .hv-log-row .hv-del { flex: none; width: 28px; height: 28px; padding: 0; border: none; border-radius: 50%; background: none; color: var(--text-muted); font-size: 18px; line-height: 1; }
    .hv-log-row .hv-del:hover { color: #d63539; background: var(--bg-card); }
    .hv-log-row .hv-proj { flex: 1; min-width: 0; color: var(--text-secondary); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .hv-log-row .hv-state { font-size: 12px; color: var(--text-muted); }
    .hv-log-add { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--border); padding-top: 12px; }
    .hv-log-add h4 { margin: 0; font-size: 14px; }
    .hv-log-add select { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background-color: var(--bg-card); color: var(--text-primary); font: inherit; font-size: 14px; }
    .ico { display: block; }
    header .theme-btn .ico { width: 20px; height: 20px; }

    /* Board switcher */
    .title-wrap { display: flex; align-items: center; gap: 10px; }
    .board-btn {
      height: 34px; padding: 0 12px 0 14px; gap: 6px; display: inline-flex; align-items: center;
      background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 999px;
      font-size: 14px; font-weight: 600; color: var(--text-primary);
    }
    .board-btn[hidden] { display: none; }
    .board-btn .caret { opacity: 0.6; font-size: 11px; }
    .board-menu .menu-heading { font-size: 12px; color: var(--text-muted); padding: 8px 12px 2px; text-transform: none; }
    .board-menu .check { width: 20px; flex: 0 0 20px; text-align: center; color: var(--accent); }
    @media (max-width: 760px) {
      /* On phones the board name takes the title's place */
      .title-wrap h1 { display: none; }
      .title-wrap:has(.board-btn[hidden]) h1 { display: block; }
      .board-btn { background: transparent; border: none; padding: 0 6px; height: 36px;
        font-family: 'Mona Sans', 'Figtree', sans-serif; font-stretch: 125%; font-size: 1.2rem; }
    }

    /* Add-task + in each column header (like KanbanFlow); the bottom button is no longer shown */
    .add-card { display: none !important; }
    .col-add-btn {
      width: 28px; height: 28px; padding: 0; margin-left: 8px; border-radius: 50%;
      display: inline-flex; align-items: center; justify-content: center;
      background: transparent; border: none; color: var(--accent);
      font-size: 22px; font-weight: 500; line-height: 1;
    }
    .col-add-btn:hover { background: var(--bg-card); }
    .column.collapsed .col-add-btn { display: none; }
    @media (max-width: 760px) { .col-add-btn { display: none; } }
    .cards .new-task-box { margin-bottom: 10px; }

    /* Due dates */
    .due-badge {
      display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600;
      padding: 2px 8px; border-radius: 10px; cursor: pointer;
      background: color-mix(in srgb, var(--text-primary) 8%, transparent); color: var(--text-secondary);
    }
    .plan-badge {
      display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600;
      padding: 2px 8px; border-radius: 10px; cursor: pointer;
      background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent);
    }
    .plan-badge .ico { width: 12px; height: 12px; }
    .plan-badge.past { background: color-mix(in srgb, var(--text-primary) 8%, transparent); color: var(--text-muted); }
    .due-badge.soon { background: rgba(250, 160, 0, 0.18); color: #e08a00; }
    .due-badge.overdue { background: rgba(217, 83, 79, 0.18); color: #e05652; }
    .due-badge .ico { width: 12px; height: 12px; }
    #dueEveryWrap[hidden] { display: none; }
    #dueForm select { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background-color: var(--bg-card); color: var(--text-primary); font: inherit; font-size: 14px; }

    /* ---------- Plan (time blocking) ---------- */
    #planPanel { min-height: 0; }
    .plan-wrap { display: flex; gap: 16px; flex: 1; min-height: 0; }
    .plan-tray { width: 250px; flex: 0 0 250px; display: flex; flex-direction: column; min-height: 0; background: var(--bg-secondary); border-radius: 16px; padding: 12px; }
    .plan-tray-head { font-family: 'Mona Sans', 'Figtree', sans-serif; font-stretch: 125%; font-weight: 600; font-size: 15px; display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 6px; }
    .plan-tray-head .plan-add { display: inline-flex !important; }
    .plan-tray.drop-target { outline: 2px dashed var(--accent); outline-offset: -2px; }
    .plan-new-input { width: 100%; padding: 8px 10px; border: 2px solid var(--accent); border-radius: 10px; background: var(--bg-card); color: var(--text-primary); font: inherit; font-size: 13px; }
    .plan-slot-input { position: absolute; left: 2px; right: 2px; z-index: 4; padding: 4px 8px; border: 2px solid var(--accent); border-radius: 8px; background: var(--bg-card); color: var(--text-primary); font: inherit; font-size: 12px; }
    .plan-tray-head .count { background: var(--bg-card); padding: 2px 9px; border-radius: 10px; font-size: 12px; color: var(--text-muted); font-family: inherit; }
    .plan-tray-hint { font-size: 12px; color: var(--text-muted); margin: 0 4px 8px; }
    .plan-tray-list { overflow-y: auto; display: flex; flex-direction: column; gap: 6px; min-height: 0; }
    .plan-item { padding: 9px 11px; border-radius: 10px; background: var(--bg-card); border: 1px solid var(--border-light); font-size: 13px; cursor: grab; user-select: none; }
    .plan-item.colored { background: color-mix(in srgb, var(--card-color) var(--card-tint), var(--bg-card)); border-color: color-mix(in srgb, var(--card-color) 45%, transparent); }
    .plan-item.selected { outline: 2px solid var(--accent); }
    .plan-item.colored.gradient { background: linear-gradient(135deg, color-mix(in srgb, var(--card-color) var(--card-tint), var(--bg-card)), color-mix(in srgb, var(--card-color2) var(--card-tint), var(--bg-card))); }
    .plan-block.gradient { background: linear-gradient(135deg, color-mix(in srgb, var(--card-color) 28%, var(--bg-card)), color-mix(in srgb, var(--card-color2) 28%, var(--bg-card))); }
    .pi-labels { margin-left: auto; display: flex; gap: 3px; flex: none; padding-left: 6px; }
    .pi-labels .label-chip { padding: 0; width: 18px; height: 18px; justify-content: center; border-radius: 50%; gap: 0; cursor: default; }
    .pi-labels .label-chip .ico { width: 11px; height: 11px; }
    .plan-cal { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; }
    .plan-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
    .plan-toolbar button { height: 34px; padding: 0 14px; font-size: 13px; display: inline-flex; align-items: center; }
    .plan-toolbar .plan-nav { width: 34px; padding: 0; justify-content: center; font-size: 20px; }
    .plan-range { font-family: 'Mona Sans', 'Figtree', sans-serif; font-stretch: 125%; font-weight: 600; font-size: 16px; margin-left: 6px; }
    .plan-view-toggle { margin-left: 0; }
    .plan-scroll { flex: 1; overflow: auto; border-radius: 16px; background: var(--bg-secondary); position: relative; }
    .plan-head { display: grid; position: sticky; top: 0; z-index: 3; background: var(--bg-secondary); border-bottom: 1px solid var(--border); }
    .plan-head div { padding: 10px 6px; text-align: center; font-size: 12px; color: var(--text-secondary); font-weight: 600; }
    .plan-head .today { color: var(--accent); }
    .plan-body { display: grid; position: relative; }
    .plan-hours { position: relative; }
    .plan-hours div { position: absolute; right: 8px; font-size: 11px; color: var(--text-muted); transform: translateY(-50%); }
    .plan-col-resize { position: absolute; top: 0; bottom: 0; right: -5px; width: 10px; cursor: col-resize; z-index: 3; }
    .plan-col-resize::after { content: ''; position: absolute; top: 0; bottom: 0; left: 4px; width: 2px; background: var(--border); transition: background .15s; }
    .plan-col-resize:hover::after, body.col-resizing .plan-col-resize::after { background: var(--accent); }
    body.col-resizing { cursor: col-resize; user-select: none; }
    .plan-day { position: relative; border-left: 1px solid var(--border-light);
      background-image: repeating-linear-gradient(to bottom, var(--border-light) 0, var(--border-light) 1px, transparent 1px, transparent var(--hour-px)); }
    .plan-day.today { background-color: color-mix(in srgb, var(--accent) 5%, transparent); }
    .plan-day.drop-target { background-color: color-mix(in srgb, var(--accent) 12%, transparent); }
    .plan-now { position: absolute; left: 0; right: 0; height: 2px; background: #e05652; z-index: 2; pointer-events: none; }
    .plan-now::before { content: ''; position: absolute; left: -4px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #e05652; }
    .plan-block {
      position: absolute; border-radius: 8px; padding: 4px 7px; font-size: 12px; line-height: 1.25; overflow: hidden; cursor: pointer;
      background: color-mix(in srgb, var(--card-color, var(--accent)) 28%, var(--bg-card));
      border: 1px solid color-mix(in srgb, var(--card-color, var(--accent)) 55%, transparent);
      border-left: 3px solid var(--card-color, var(--accent)); z-index: 1; user-select: none;
    }
    .plan-block .pb-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .plan-block .pb-time { color: var(--text-secondary); font-size: 11px; }
    .plan-block.done { opacity: 0.5; }
    .plan-block.filtered-out { opacity: 0.18; }
    .plan-block.done .pb-title { text-decoration: line-through; }
    .plan-block.dragging { opacity: 0.85; box-shadow: 0 8px 20px rgba(0,0,0,0.35); z-index: 5; }
    .plan-block.short { display: flex; align-items: center; gap: 6px; padding-top: 2px; padding-bottom: 2px; }
    .plan-block.short .pb-title { flex: 0 0 auto; max-width: 100%; }
    .plan-block.short .pb-time { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .plan-block .pb-resize { position: absolute; left: 0; right: 0; bottom: 0; height: 8px; cursor: ns-resize; }
    /* Calendar events (read-only, from iCal feeds) */
    .plan-event {
      position: absolute; border-radius: 8px; padding: 3px 7px; font-size: 12px; line-height: 1.25; overflow: hidden; cursor: pointer; user-select: none; z-index: 1;
      background: color-mix(in srgb, var(--ev-color) 13%, var(--bg-secondary));
      border: 1px dashed color-mix(in srgb, var(--ev-color) 70%, transparent);
    }
    .plan-event:hover, .plan-event:focus-visible { background: color-mix(in srgb, var(--ev-color) 22%, var(--bg-secondary)); outline: none; }
    .plan-event .pe-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: color-mix(in srgb, var(--ev-color) 45%, var(--text-primary)); }
    .plan-event .pe-time { color: var(--text-secondary); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .plan-event.short { display: flex; align-items: center; gap: 6px; padding-top: 1px; padding-bottom: 1px; }
    .plan-event.short .pe-title { flex: 0 1 auto; }
    .plan-event.short .pe-time { flex: 0 1 auto; min-width: 0; }
    .plan-event.free { opacity: 0.7; }
    .plan-event.past, .plan-ad-ev.past { opacity: 0.6; }
    .plan-head .plan-ad { padding: 0 3px 6px; display: flex; flex-direction: column; gap: 3px; text-align: left; min-width: 0; }
    .plan-head .plan-ad-label { padding: 2px 6px 6px 0; text-align: right; font-size: 10.5px; font-weight: 500; color: var(--text-muted); }
    .plan-ad-ev { display: block; width: 100%; min-width: 0; padding: 2px 6px; border-radius: 6px; font-size: 11.5px; font-weight: 600; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
      border: 1px dashed color-mix(in srgb, var(--ev-color) 70%, transparent); background: color-mix(in srgb, var(--ev-color) 13%, var(--bg-secondary)); color: color-mix(in srgb, var(--ev-color) 45%, var(--text-primary)); }
    .plan-ad-ev:hover { background: color-mix(in srgb, var(--ev-color) 22%, var(--bg-secondary)); border-color: var(--ev-color); }
    .plan-ad-ev .t { font-weight: 500; color: var(--text-secondary); margin-right: 4px; }
    .today-item.cal-ev { border-style: dashed; }
    .today-item.cal-ev small .cal-name { color: var(--text-muted); }
    .cal-ev-dialog { max-width: 400px; }
    .cal-ev-dialog h3 { padding-right: 36px; }
    .cal-ev-dialog p { margin: 0; font-size: 14px; color: var(--text-secondary); white-space: pre-line; }
    .cal-ev-dialog p:empty { display: none; }
    .cal-ev-from { display: flex; align-items: center; gap: 8px; font-size: 13px !important; color: var(--text-muted) !important; }
    .cal-ev-from i { width: 10px; height: 10px; border-radius: 3px; background: var(--ev-color); flex: none; }
    .btn-link { display: inline-flex; align-items: center; height: 38px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text-primary); font-size: 14px; font-weight: 500; text-decoration: none; }
    .btn-link:hover { border-color: var(--accent); }
    .btn-link.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
    .btn-link[hidden] { display: none; }
    .cal-list { display: flex; flex-direction: column; gap: 8px; }
    .adm { display: flex; flex-direction: column; gap: 12px; }
    .adm h4 { margin: 10px 0 0; font-size: 14px; }
    .adm-sum { display: flex; flex-direction: column; gap: 14px; padding: 16px; border-radius: 12px; background: var(--bg-secondary); }
    .adm-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .adm-stats div { display: flex; flex-direction: column; }
    .adm-stats b { font-size: 24px; font-variant-numeric: tabular-nums; }
    .adm-stats span, .adm-meter small, .adm-who small, .adm-split, .adm-invites small { font-size: 12px; color: var(--text-muted); }
    .adm-meter { display: flex; flex-direction: column; gap: 5px; --meter: var(--accent); }
    .adm-meter.warm { --meter: #d49a1f; }
    .adm-meter.hot { --meter: #c0392b; }
    .adm-meter-top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13px; }
    .adm-meter-top span { color: var(--text-secondary); font-variant-numeric: tabular-nums; }
    .adm-bar { height: 8px; border-radius: 99px; background: var(--border); overflow: hidden; }
    .adm-bar i { display: block; height: 100%; border-radius: inherit; background: var(--meter, var(--accent)); }
    .adm-people { display: flex; flex-direction: column; gap: 8px; }
    .adm-person { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 6px 14px; padding: 12px 14px; border-radius: 12px; background: var(--bg-secondary); }
    .adm-who { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
    .adm-who b { font-size: 14px; }
    .adm-who span { font-size: 13px; color: var(--text-secondary); overflow-wrap: anywhere; }
    .adm-size { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
    .adm-size b { font-size: 16px; font-variant-numeric: tabular-nums; }
    .adm-size .adm-bar { width: 100%; height: 6px; }
    .adm-facts { grid-column: 1 / -1; margin: 2px 0 0; display: flex; flex-wrap: wrap; gap: 4px; }
    .adm-facts span { font-size: 12px; padding: 2px 8px; border-radius: 99px; background: var(--bg-card); color: var(--text-secondary); }
    .adm-split { grid-column: 1 / -1; margin: 0; font-variant-numeric: tabular-nums; }
    .adm-plan { grid-column: 1 / -1; margin: 2px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; }
    .adm-plan-name { padding: 2px 8px; border-radius: 99px; background: var(--bg-card); color: var(--text-secondary); font-weight: 600; }
    .adm-plan-name.pro, .adm-plan-name.team, .adm-plan-name.agency { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--text); }
    .adm-plan .adm-founder { display: inline-flex; flex-direction: row; align-items: center; gap: 5px; flex: none; margin: 0; width: auto; color: var(--text-muted); font-size: 12px; white-space: nowrap; cursor: pointer; }
    .adm-plan .adm-founder input { width: auto; margin: 0; }
    .adm-plan select { flex: none; margin-left: auto; width: 180px; max-width: 100%; font-size: 12px; }
    .adm-invites { display: flex; flex-direction: column; gap: 6px; }
    .adm-invites div { display: flex; flex-direction: column; padding: 8px 12px; border-radius: 10px; background: var(--bg-secondary); font-size: 13px; }
    .adm-idle { display: flex; flex-direction: column; gap: 6px; }
    .adm-idle-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; background: var(--bg-secondary); font-size: 13px; }
    .adm-idle-row > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
    .adm-idle-row small { display: block; font-size: 12px; color: var(--text-muted); }
    .adm-idle-row.kept { opacity: .75; }
    .adm-idle-row button { color: #c0392b; }
    @media (max-width: 560px) {
      .adm-person { grid-template-columns: minmax(0, 1fr) 84px; padding: 12px; }
      .adm-sum { padding: 14px; }
    }
    .cal-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; padding: 8px 8px 8px 10px; border-radius: 10px; background: var(--bg-secondary); }
    .cal-row .cal-swatch { width: 22px; height: 22px; border-radius: 6px; border: none; padding: 0; background: var(--ev-color); }
    .cal-row input { min-width: 0; padding: 6px 8px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--text-primary); font: inherit; font-size: 14px; font-weight: 600; }
    .cal-row input:hover, .cal-row input:focus { border-color: var(--border); background: var(--bg-card); }
    .cal-row small { grid-column: 2 / 4; padding: 0 8px; font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .cal-row small.err { color: #c0392b; white-space: normal; }
    .cal-row .del { border: none; background: transparent; color: var(--text-muted); font-size: 18px; padding: 0 6px; }
    .cal-row .del:hover { color: #e05652; }
    .cal-add { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 12px; border: 1px dashed var(--border); }
    .cal-add .gh-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
    .cal-colors { display: flex; gap: 6px; padding-bottom: 8px; }
    .cal-colors button { width: 24px; height: 24px; border-radius: 50%; padding: 0; border: 2px solid transparent; background: var(--ev-color); box-shadow: inset 0 0 0 2px var(--bg-card); }
    .cal-colors button[aria-checked="true"] { border-color: var(--ev-color); }
    /* The grip across the top of a floating menu (menuGrip): drag to move it */
    .menu-grip { grid-column: 1 / -1; display: flex; justify-content: center; align-items: center; height: 14px; margin: -6px -10px 2px; cursor: grab; touch-action: none; color: var(--text-secondary); opacity: 0.7; border-radius: 6px; }
    .menu-grip:hover { opacity: 1; background: color-mix(in srgb, var(--text-secondary) 12%, transparent); }
    .menu-grip svg { width: 20px; height: 10px; fill: currentColor; }
    .color-menu.is-dragging, .color-menu.is-dragging .menu-grip { cursor: grabbing; user-select: none; }
    @media (hover: none) and (max-width: 760px) { .menu-grip { display: none; } }
    .cal-how summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--accent); }
    .cal-how ol { margin: 8px 0; padding-left: 20px; font-size: 13px; color: var(--text-secondary); line-height: 1.6; }
    /* Settings → Email to tasks */
    #mailBox .mail-on { margin: 4px 0 10px; font-weight: 600; }
    .mail-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 8px 0; font-size: 13px; }
    .mail-k { color: var(--text-secondary); min-width: 92px; }
    .mail-row code { flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; font-size: 12.5px; line-height: 1.45; }
    .mail-gmail { margin: 10px 0; padding: 10px 12px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); background: color-mix(in srgb, var(--accent) 9%, transparent); font-size: 13px; line-height: 1.5; }
    .mail-gmail b.code { font-size: 18px; letter-spacing: 0.06em; font-variant-numeric: tabular-nums; }
    .mail-gmail .gh-actions { margin-top: 6px; }
    .mail-log-h { margin: 18px 0 6px; font-size: 13px; }
    .mail-log { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
    .mail-log:empty { display: none; }
    .mail-item { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 8px 12px; border-top: 1px solid var(--border); font-size: 13px; }
    .mail-item:first-child { border-top: 0; }
    .mail-item .mail-subj { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .mail-item .mail-meta { grid-column: 1; color: var(--text-secondary); font-size: 12px; }
    .mail-item .mail-acts { grid-column: 2; grid-row: 1 / span 2; display: flex; gap: 6px; align-items: center; }
    .mail-item .mail-acts a, .mail-item .mail-acts button { font-size: 12px; }
    .mail-out { font-weight: 600; }
    .mail-out.is-task { color: var(--accent); }
    .mail-empty { padding: 10px 12px; color: var(--text-secondary); font-size: 13px; }
    .plan-ghost { position: fixed; z-index: 3000; pointer-events: none; padding: 8px 10px; border-radius: 10px; background: var(--bg-card); box-shadow: 0 8px 24px rgba(0,0,0,0.35); font-size: 13px; }
    #blockForm select { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background-color: var(--bg-card); color: var(--text-primary); font: inherit; font-size: 14px; }
    @media (max-width: 760px) {
      .plan-wrap { flex-direction: column; gap: 8px; }
      .plan-tray { width: auto; flex: 0 0 auto; max-height: 132px; padding: 8px 10px; }
      .plan-tray-list { flex-direction: row; overflow-x: auto; overflow-y: hidden; }
      .plan-item { flex: 0 0 auto; max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
      .plan-toolbar button { height: 32px; padding: 0 10px; }
      .plan-range { font-size: 14px; }
      header .buttons > button.plan-icon-btn { display: inline-flex; }
      header .buttons > button.plan-icon-btn.active { color: var(--accent); }
    }

    /* Dropdowns: our own chevron with room on the right; form rows line up their boxes */
    .gh-dialog select, .timer-card select, #timerTask {
      -webkit-appearance: none; appearance: none;
      padding-right: 40px !important;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%238a8984' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
      background-repeat: no-repeat; background-position: right 14px center; background-size: 12px 8px;
      cursor: pointer;
    }
    .gh-row { align-items: flex-end; }
    .gh-dialog input[type="date"], .gh-dialog input[type="time"] { min-height: 42px; }

    /* Clients */
    .client-avatar {
      position: relative; flex: 0 0 24px; width: 24px; height: 24px; border-radius: 7px; overflow: hidden; cursor: pointer;
      display: inline-flex; align-items: center; justify-content: center; margin-top: 1px;
      font-size: 10px; font-weight: 700; color: #fff; letter-spacing: -0.02em; background: var(--avatar-bg, #777);
    }
    .client-avatar img {
      position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
      /* The backing behind a logo: your color and strength (Style menu → Look · all cards), white by default */
      background: color-mix(in srgb, var(--logo-bg, #fff) var(--logo-bg-alpha, 100%), transparent); padding: 2px; border-radius: inherit;
      box-shadow: inset 0 0 0 1px color-mix(in srgb, rgba(0, 0, 0, 0.08) var(--logo-bg-alpha, 100%), transparent);
    }
    .client-avatar:hover { box-shadow: 0 0 0 2px var(--accent); }
    /* On cards, the client's logo sits large and soft on the right; the title lines up with the checkbox */
    .task-card:has(> div:first-of-type > .client-avatar) { padding-right: calc(40px * var(--logo-scale, 1) + 26px); min-height: max(60px, calc(40px * var(--logo-scale, 1) + 20px)); display: flex; flex-direction: column; justify-content: center; }
    .task-card > div:first-of-type > .client-avatar {
      position: absolute; top: 50%; transform: translateY(-50%); right: 12px; width: calc(40px * var(--logo-scale, 1)); height: calc(40px * var(--logo-scale, 1)); flex: none; margin: 0;
      border-radius: calc(12px * var(--logo-scale, 1)); font-size: calc(15px * var(--logo-scale, 1)); opacity: var(--logo-opacity, 0.55); transition: opacity 0.15s ease, box-shadow 0.15s ease;
    }
    .task-card > div:first-of-type > .client-avatar img { padding: 4px; }
    .client-avatar .client-emoji { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: var(--bg-card); border-radius: inherit; font-size: 1.35em; line-height: 1; letter-spacing: 0; }
    .client-avatar.card-icon.emoji { background: transparent; font-size: calc(17px * var(--logo-scale, 1)); letter-spacing: 0; }
    /* Client shortcut cards: no checkbox, a button into the client's workspace */
    .shortcut-actions { margin-top: 8px; }
    .workspace-btn { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-secondary); color: var(--text-primary); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
    .workspace-btn:hover { border-color: var(--accent); color: var(--accent); }
    .workspace-btn .icon, .workspace-btn svg { width: 14px; height: 14px; }
    .list-workspace { flex: none; padding: 3px 10px; font-size: 12px; }
    .client-shortcut .card-note, .client-shortcut .card-subtasks { margin-left: 0 !important; }
    .task-card > div:first-of-type > .client-avatar.card-icon.emoji { font-size: 28px; }
    .lcm-grid.cim-grid { grid-template-columns: repeat(6, 36px); }
    .card-menu .cim-emoji { width: 36px; height: 34px; padding: 0; border: none; border-radius: 9px; background: transparent; font-size: 22px; line-height: 1; display: grid; place-items: center; }
    .card-menu .cim-emoji:hover { background: var(--bg-secondary); }
    .card-menu .cim-emoji.selected { background: color-mix(in srgb, var(--accent) 25%, transparent); box-shadow: inset 0 0 0 2px var(--accent); }
    .cim-own { margin: 0 10px 6px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-card); color: var(--text-primary); font: inherit; font-size: 13px; }
    .color-menu .menu-slider { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr; gap: 2px; font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
    .color-menu .menu-slider span { display: flex; justify-content: space-between; }
    .color-menu .menu-slider input { width: 100%; accent-color: var(--accent); margin: 0; }
    .color-menu .menu-slider b { font-weight: 600; font-variant-numeric: tabular-nums; }
    .color-menu .menu-slider .logo-bg-pick { width: 22px; height: 18px; padding: 0; margin: 0 6px 0 auto; border: 1px solid var(--border); border-radius: 5px; background: none; cursor: pointer; }
    #logsPanel { overflow-y: auto; }
    .logs-wrap { max-width: 980px; margin: 0 auto; padding: 8px 4px 40px; display: flex; flex-direction: column; gap: 16px; }
    .logs-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
    .logs-head h2 { font-family: 'Mona Sans', 'Figtree', sans-serif; font-stretch: 125%; font-size: 26px; }
    .logs-search { height: 38px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text-primary); padding: 0 12px; font: inherit; font-size: 14px; min-width: 220px; }
    .logs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
    .log-card { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; background: var(--bg-card); border: 1px solid var(--border-light); color: var(--text-primary); text-decoration: none; box-shadow: 0 1px 3px var(--shadow); }
    .log-card:hover { border-color: var(--accent); }
    .log-card .client-avatar, .log-start .client-avatar { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 11px; font-size: 14px; cursor: inherit; }
    .log-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
    .log-main b { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .log-main small { font-size: 12.5px; color: var(--text-muted); }
    .log-hours { font-size: 13px; font-weight: 600; color: #fa5d00; font-variant-numeric: tabular-nums; white-space: nowrap; }
    .logs-sub { font-size: 14px; color: var(--text-muted); font-weight: 600; margin-top: 8px; }
    .logs-start { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; }
    .log-start { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; border: 1px dashed var(--border); background: transparent; text-align: left; font-weight: 500; }
    .log-start .client-avatar { width: 28px; height: 28px; flex: 0 0 28px; border-radius: 8px; font-size: 11px; }
    .log-start span:not(.client-avatar) { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .log-start em { font-style: normal; font-size: 12px; color: var(--accent); font-weight: 600; }
    @media (max-width: 760px) { .logs-search { min-width: 0; width: 100%; } }
    .gh-dialog .logo-strength { flex-direction: row; align-items: center; gap: 10px; font-size: 13px; }
    .gh-dialog .logo-strength input { flex: 1; min-width: 0; accent-color: var(--accent); padding: 0; border: none; background: none; }
    .gh-dialog .logo-strength span { min-width: 3.2em; text-align: right; font-variant-numeric: tabular-nums; color: var(--text-secondary); }
    .task-card > div:first-of-type > .client-avatar:hover { opacity: 1; }
    .task-card > div:first-of-type { align-items: flex-start; }
    .clients-list { display: flex; flex-direction: column; gap: 8px; max-height: 46vh; overflow-y: auto; }
    .client-row { display: grid; grid-template-columns: 22px 1fr 1fr auto; gap: 6px; align-items: center; padding: 8px; border-radius: 10px; background: var(--bg-secondary); }
    .client-row input { min-width: 0; padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-card); color: var(--text-primary); font: inherit; font-size: 13px; }
    .client-row .wide { grid-column: 2 / 4; }
    .client-row .log-btn { padding: 5px 10px; font-size: 12px; white-space: nowrap; }
    .client-row .del { border: none; background: transparent; color: var(--text-muted); font-size: 18px; padding: 0 6px; }
    .client-row .del:hover { color: #e05652; }
    .client-menu .menu-head { padding: 8px 12px 4px; font-weight: 600; font-size: 14px; }
    .client-picker input { margin: 4px 6px 6px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-card); color: var(--text-primary); font: inherit; font-size: 14px; }
    .client-picker .picker-list { max-height: 50vh; overflow-y: auto; display: flex; flex-direction: column; gap: 1px; }

    /* Labels */
    .label-chip {
      display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600;
      padding: 2px 8px 2px 7px; border-radius: 10px; cursor: pointer; line-height: 1.4;
      color: var(--label-color); background: color-mix(in srgb, var(--label-color) 16%, transparent);
    }
    .label-chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--label-color); }
    /* The row above the columns: label filters, then search on the right */
    .board-tools { display: flex; align-items: flex-start; margin: -5px -4px 0; flex-shrink: 0; }
    .board-tools:has(> .label-bar[hidden]):has(> .board-search[hidden]) { display: none; }
    .board-search { display: flex; align-items: center; gap: 4px; flex: none; margin-left: auto; padding: 5px 6px 10px; }
    .board-search[hidden] { display: none; }
    /* Search sits right after the label bar's ⋯ (Rod, Nov 18), not at the far right: the bar takes only the room its chips need. Phones keep it at the right end */
    @media (min-width: 761px) {
      .board-tools > .label-bar:not([hidden]) { flex: 0 1 auto; }
      .board-tools > .label-bar:not([hidden]) + .board-search { margin-left: 0; padding-left: 0; }
    }
    .search-btn { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 28px; height: 28px; padding: 0; border: none; border-radius: 50%; background: transparent; box-shadow: none; color: var(--text-secondary); }
    .search-btn:hover { background: var(--bg-secondary); color: var(--text-primary); }
    @media (max-width: 760px) {
      .board-tools { flex-wrap: wrap; }
      .search-btn { width: 36px; height: 36px; }
      .board-search { padding-top: 1px; padding-bottom: 6px; }
      .board-search.open, .board-search:has(.task-search.has-query) { order: -1; flex: 1 1 100%; }
      .board-search .task-search { flex: 1; width: auto; min-width: 0; height: 36px; }
    }
    .label-bar { display: flex; flex: 1; min-width: 0; gap: 6px; align-items: center; overflow-x: auto; padding: 5px 6px 10px; scrollbar-width: none; }
    .label-bar[hidden] { display: none; }
    .label-bar::-webkit-scrollbar { display: none; }
    .label-bar .label-chip { border: none; font-family: inherit; height: auto; font-size: 12.5px; padding: 5px 12px 5px 10px; border-radius: 999px; flex-shrink: 0; border: 1px solid transparent; }
    .label-bar .label-chip.active { color: #fff; background: var(--label-color); }
    .label-bar .label-chip.active::before { background: #fff; }
    .label-bar .count { opacity: 0.7; font-weight: 500; }
    .label-bar .client-filter-chip { flex-shrink: 0; display: inline-flex; align-items: center; gap: 4px; font: inherit; font-size: 12.5px; padding: 5px 10px 5px 12px; border-radius: 999px; border: none; background: var(--accent); color: #fff; cursor: pointer; }
    .label-bar .client-filter-chip span { font-size: 14px; line-height: 1; opacity: .85; }
    .label-bar .clear-filter { font-size: 12.5px; color: var(--text-muted); background: transparent; border: none; padding: 5px 8px; cursor: pointer; flex-shrink: 0; }
    .label-picker .lp-row { display: flex; align-items: center; gap: 10px; }
    .label-picker .lp-check { width: 18px; height: 18px; border-radius: 5px; border: 1.75px solid var(--label-color); display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; flex: 0 0 18px; }
    .label-picker .on .lp-check { background: var(--label-color); }
    /* Delete × on each picker row: shows on hover or keyboard focus (always on touch) */
    .label-picker .lp-item { display: flex; align-items: center; position: relative; }
    .label-picker .lp-item > .lp-row { flex: 1; min-width: 0; padding-right: 40px; }
    .label-picker .lp-del { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; padding: 0; border: none; border-radius: 6px; background: transparent; color: var(--text-muted); font-size: 18px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0; transition: opacity .12s, background-color .12s, color .12s; }
    .label-picker .lp-item:hover > .lp-del, .label-picker .lp-del:focus-visible { opacity: 1; }
    .label-picker .lp-del:hover { color: var(--over); background: color-mix(in srgb, var(--over) 12%, transparent); }
    .label-picker .lp-del:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
    @media (hover: none) { .label-picker .lp-del { opacity: 1; } }
    .label-picker input { margin: 6px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-card); color: var(--text-primary); font: inherit; font-size: 14px; }

    /* Header: logo only (the name stays for screen readers) */
    header h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .title-wrap { gap: 0; }
    .header-left > img { width: 44px !important; height: 44px !important; }
    @media (max-width: 760px) { .header-left > img { width: 36px !important; height: 36px !important; } }

    /* Full WaxOn logo on desktop; the round mark on phones */
    .header-left > img.logo-full { width: auto !important; height: 56px !important; margin: -6px 14px -6px 0; flex-shrink: 0; }
    .header-left > img.logo-mark { display: none; }
    @media (max-width: 760px) {
      .header-left > img.logo-full { display: none; }
      .header-left > img.logo-mark { display: block; order: 1; width: 36px !important; height: 36px !important; margin-right: 0 !important; }
    }

    /* ---------- Header consistency: one height, one pill style, one icon style ---------- */
    @media (min-width: 761px) {
      header .board-btn {
        height: 44px; padding: 0 16px 0 18px; gap: 8px; border: none;
        background: var(--bg-secondary); font-size: 14px; margin-left: 4px;
      }
      header .board-btn:hover { background: color-mix(in srgb, var(--text-primary) 10%, var(--bg-secondary)); }
      header .view-toggle { height: 44px; margin-left: 12px; }
      header .view-toggle button { font-size: 14px; height: 36px; padding: 0 16px; }
      header .buttons { gap: 6px; }
      /* All header icons: same size, no circle until hovered */
      header .buttons > button.theme-btn, header .buttons > #githubBtn.theme-btn {
        width: 44px; height: 44px; padding: 0; border: none; background: transparent; box-shadow: none;
        color: var(--text-secondary); border-radius: 50%;
      }
      header .buttons > button.theme-btn:hover, header .buttons > #githubBtn.theme-btn:hover {
        background: var(--bg-secondary); color: var(--text-primary);
      }
      header .buttons > button .ico, header .buttons > button svg { width: 20px; height: 20px; }
    }
    .board-btn .caret { display: inline-flex; opacity: 0.6; }

    /* ================= Accessibility & consistency pass ================= */
    /* Readable chip text: the label colour mixed toward the page text colour (passes 4.5:1 in both themes) */
    .label-chip { color: color-mix(in srgb, var(--label-color) 38%, var(--text-primary)); }
    .label-bar .label-chip.active { color: #fff; }
    .due-badge.soon { color: color-mix(in srgb, #e08a00 40%, var(--text-primary)); }
    .due-badge.overdue { color: color-mix(in srgb, #e05652 28%, var(--text-primary)); }
    .plan-badge.past { color: var(--text-secondary); }
    .plan-badge { color: color-mix(in srgb, var(--accent) 40%, var(--text-primary)); }
    /* One chip shape for every badge on a card */
    .card-meta > span { min-height: 20px; border-radius: 10px; font-size: 11.5px; line-height: 1.3; }

    /* Visible keyboard focus everywhere */
    :focus { outline: none; }
    :focus-visible { outline: 2px solid var(--accent) !important; outline-offset: 2px; }
    /* Keyboard focus shows the bar too (not on touch screens, where tapping ⋯ opens the menu instead) */
    @media (hover: hover) { .task-card:focus-within .card-actions { opacity: 1; pointer-events: auto; } }

    /* Finished cards read as finished */
    .task-card:has(> div:first-of-type > .checkbox.checked) .card-title { text-decoration: line-through; color: var(--text-muted); }

    /* Client logos: white tile only once the image has loaded (no blank squares) */
    .client-avatar img { opacity: 0; }
    .client-avatar img.loaded { opacity: 1; }

    /* Bigger touch areas on phones without changing the look */
    @media (hover: none) {
      .checkbox, .client-avatar, .card-meta > span { position: relative; }
      .checkbox::before, .client-avatar::before { content: ''; position: absolute; inset: -12px; }
      /* ...except a card's logo, which stays pinned on the right; its tap area stops short of ⋯, so a tap between them does nothing */
      .task-card > div:first-of-type > .client-avatar { position: absolute; }
      .task-card > div:first-of-type > .client-avatar::before { inset: -10px -4px -10px -10px; }
      .card-menu-btn { width: 44px; height: 44px; top: 3px; right: 1px; }
    }
    .plan-item { display: flex; align-items: center; gap: 8px; }
    .plan-item .client-avatar { flex: 0 0 20px; width: 20px; height: 20px; border-radius: 6px; font-size: 9px; }

    /* Label icons replace the coloured dot */
    .label-chip::before { display: none; }
    .label-chip .ico { flex: 0 0 auto; width: 12px; height: 12px; stroke-width: 2.4; color: var(--label-color); }
    .label-bar .label-chip .ico { width: 14px; height: 14px; }
    .label-bar .label-chip.active .ico { color: #fff; }
    .label-chip { gap: 5px; padding-left: 7px; }
    .label-picker .lp-ico { display: inline-flex; }

    /* Solid label chips */
    .label-chip, .label-bar .label-chip, .label-bar .label-chip.active { background: color-mix(in srgb, var(--label-color) var(--label-fill, 100%), transparent); color: var(--label-ink, #fff); }
    /* Label strength turned down: a tint of the color with colored text */
    body.labels-soft .label-chip, body.labels-soft .label-bar .label-chip { color: color-mix(in srgb, var(--label-color) 55%, var(--text-primary)); border: 1px solid color-mix(in srgb, var(--label-color) 45%, transparent); }
    body.labels-soft .label-bar .label-chip.active { background: var(--label-color); color: var(--label-ink, #fff); }
    .label-chip .ico, .label-bar .label-chip.active .ico { color: currentColor; }
    .label-chip .count { color: inherit; opacity: .75; }
    .label-bar.filtering .label-chip:not(.active) { opacity: .4; }
    .label-bar .label-chip.active { box-shadow: 0 0 0 2px var(--bg-primary, #111), 0 0 0 4px var(--label-color); }

    /* Label menus, collapsed bar, compact card labels */
    .card-menu .menu-head { padding: 6px 10px 4px; font-size: 12px; font-weight: 600; color: var(--text-muted); }
    .card-menu .menu-hint { margin: 2px 10px 6px; font-size: 11.5px; color: var(--text-muted); max-width: 220px; line-height: 1.4; }
    .card-menu button.danger { color: #e05652; }
    .card-menu .menu-check { margin-left: auto; padding-left: 12px; color: var(--accent); font-weight: 700; }
    .lcm-grid { display: grid; grid-template-columns: repeat(7, 26px); gap: 6px; padding: 4px 10px 8px; }
    .lcm-grid .color-swatch { width: 26px; height: 26px; border: none; border-radius: 50%; padding: 0; }
    .lcm-custom { width: 26px; height: 26px; padding: 0; border: 1px solid var(--border); border-radius: 50%; background: conic-gradient(#ff5f5f, #ffd25f, #7be37b, #5fd3ff, #7b7bff, #ff5fe0, #ff5f5f); cursor: pointer; overflow: hidden; }
    .lcm-custom::-webkit-color-swatch-wrapper { padding: 0; opacity: 0; }
    .labels-list { display: flex; flex-direction: column; gap: 4px; margin: 0 -6px; padding: 0 6px; }
    .lm-row { display: flex; align-items: center; gap: 10px; padding: 6px 4px 6px 8px; border-radius: 10px; }
    .lm-row:hover { background: var(--bg-secondary); }
    .lm-row small { flex: 1; font-size: 12px; color: var(--text-muted); }
    .lm-row.deleted .label-chip { opacity: .45; }
    .lm-actions { display: flex; gap: 2px; }
    .lm-btn { width: 32px; height: 32px; padding: 0; border: none; border-radius: 8px; background: transparent; color: var(--text-secondary); display: grid; place-items: center; }
    .lm-btn:hover { background: var(--bg-card); color: var(--text-primary); }
    .lm-btn.danger:hover { color: #e05652; }
    .lm-restore { height: 30px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
    .label-new { display: flex; gap: 8px; }
    .label-new input { flex: 1; min-width: 0; padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-card); color: var(--text-primary); font: inherit; font-size: 14px; }
    .lim-grid { grid-template-columns: repeat(5, 34px); }
    .lim-icon { width: 34px; height: 34px; padding: 0; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--label-color); display: grid; place-items: center; }
    .lim-icon .ico { width: 20px; height: 20px; }
    .lim-icon:hover { background: var(--bg-secondary); }
    .lim-icon.selected { background: var(--label-color); color: #fff; }
    .lb-toggle { flex-shrink: 0; border: 1px solid var(--border); background: transparent; color: var(--text-secondary); border-radius: 999px; height: 28px; padding: 0 12px; font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
    .lb-toggle .count { opacity: .7; }
    .lb-add { border-style: dashed; color: var(--text-muted); }
    .lb-more { width: 30px; padding: 0; justify-content: center; font-size: 16px; border-color: transparent; }
    .lb-toggle:hover { background: var(--bg-secondary); color: var(--text-primary); }
    .label-bar .label-chip.lb-hide { display: none; }
    body.labels-compact .task-card .label-chip { padding: 0; width: 20px; height: 20px; justify-content: center; border-radius: 50%; gap: 0; }
    body.labels-compact .task-card .label-chip .lc-name { display: none; }
    .tag-suggest { position: fixed; z-index: 3000; min-width: 200px; max-height: 260px; overflow-y: auto; }
    .tag-suggest .lp-row.sel { background: var(--bg-hover, color-mix(in srgb, var(--text-primary) 10%, transparent)); }

    /* Phones: the + button and notices sit above Dojo's peek bar */
    body:has(#dojoPeek:not([hidden])) #fabAdd { bottom: calc(max(10px, env(safe-area-inset-bottom, 0px)) + 76px); }
    @media (max-width: 760px) { body:has(#dojoPeek:not([hidden])) .status-bar, body:has(#dojoPeek:not([hidden])) .undo-toast { bottom: 96px; } }

    /* Task comments: the count on a card, and the panel */
    .card-comments-row { margin: 6px 0 0 30px; }
    .card-comments { display: inline-flex; align-items: center; gap: 5px; min-height: 24px; padding: 2px 8px; border: 0; border-radius: 999px; background: transparent; color: var(--text-muted); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
    .card-comments:hover { background: var(--bg-secondary); color: var(--text-primary); }
    .card-comments svg { flex: none; }
    .card-files-row { margin-top: 2px; }
    .task-card.file-over { outline: 2px solid var(--accent); outline-offset: -1px; }
    .files-menu { width: 300px; max-width: calc(100vw - 24px); padding: 6px; }
    .files-empty { margin: 6px 8px; font-size: 13px; color: var(--text-muted); }
    .file-row { display: flex; align-items: center; gap: 2px; border-radius: 8px; }
    .file-row:hover { background: var(--bg-secondary); }
    .file-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 6px 8px; color: var(--text-primary); text-decoration: none; }
    .file-open img, .file-ico { flex: none; width: 34px; height: 34px; border-radius: 6px; object-fit: cover; background: var(--bg-secondary); }
    .file-ico { display: grid; place-items: center; color: var(--text-muted); }
    .file-text { min-width: 0; display: flex; flex-direction: column; }
    .file-text b { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .file-text small { font-size: 12px; color: var(--text-muted); }
    .file-act { flex: none; width: 28px; height: 28px; padding: 0; display: grid; place-items: center; border: none; border-radius: 6px; background: transparent; box-shadow: none; color: var(--text-muted); font-size: 16px; line-height: 1; text-decoration: none; cursor: pointer; }
    .file-act:hover { background: var(--bg-card); color: var(--text-primary); }
    .files-menu .file-add { width: 100%; display: flex; align-items: center; gap: 8px; margin-top: 4px; padding: 8px; border-top: 1px solid var(--border-light); border-radius: 0 0 8px 8px; font-size: 13px; }
    .file-add small { margin-left: auto; font-size: 12px; color: var(--text-muted); font-weight: 400; }
    .card-comment-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
    .tc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .tc-scrim { position: fixed; inset: 0; z-index: 1400; background: rgba(10, 10, 9, 0.35); }
    .tc { position: fixed; z-index: 1401; top: 0; right: 0; bottom: 0; width: min(480px, 100%); display: flex; flex-direction: column; background: var(--bg-primary); color: var(--text-primary); border-left: 1px solid var(--border); box-shadow: -12px 0 40px rgba(0, 0, 0, 0.2); padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
    @media (min-width: 1024px) {
      .tc-scrim { display: none; }
      body.tc-docked > .tab-panel { margin-right: 480px; }
      body.tc-docked #todayPanel { display: none; }
    }
    .tc-head { display: block; position: relative; flex: none; padding: 16px 56px 14px 20px; border-bottom: 1px solid var(--border); }
    .tc-status { margin: 0 0 4px; font-size: 13px; color: var(--text-muted); }
    .tc-head h2 { margin: 0; color: var(--text-primary); font-size: 18px; line-height: 1.3; font-weight: 600; overflow-wrap: anywhere; }
    .tc-note { margin: 6px 0 0; font-size: 14px; line-height: 1.5; color: var(--text-secondary); overflow-wrap: anywhere; white-space: pre-wrap; max-height: 7.5em; overflow-y: auto; }
    .tc-close { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border: 0; border-radius: 10px; background: transparent; color: var(--text-muted); font-size: 22px; line-height: 1; cursor: pointer; }
    .tc-close:hover { background: var(--bg-secondary); color: var(--text-primary); }
    .tc-people { display: flex; gap: 4px; margin-top: 10px; flex-wrap: wrap; }
    .tc-people:empty { display: none; }
    .tc-avatar { flex: none; display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: var(--avatar-bg, var(--bg-secondary)); color: #fff; font-size: 12px; font-weight: 600; }
    .tc-avatar.reply { width: 26px; height: 26px; font-size: 11px; }
    .tc-avatar.small { width: 24px; height: 24px; font-size: 10px; }
    .tc-avatar.tiny { width: 24px; height: 24px; font-size: 10px; }
    .tc-avatar-gap { flex: none; width: 32px; }
    .tc-avatar-gap.reply { width: 26px; }
    .tc-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 20px; }
    .tc-heading { margin: 0 0 12px; font-size: 14px; font-weight: 600; }
    .tc-heading span { color: var(--text-muted); font-weight: 500; }
    .tc-empty { margin: 0; color: var(--text-muted); font-size: 14px; }
    .tc-list, .tc-replies { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
    .tc-replies { margin: 10px 0 0 15px; padding-left: 16px; border-left: 2px solid var(--border); }
    .tc-c { display: flex; gap: 10px; border-radius: 10px; }
    .tc-c.pending { opacity: .6; }
    .tc-c.tc-new { animation: tcNew 1.6s ease-out; }
    @keyframes tcNew { from { background: color-mix(in srgb, var(--accent) 22%, transparent); } }
    .tc-main { flex: 1; min-width: 0; }
    .tc-who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; font-size: 14px; }
    .tc-who time, .tc-edited { font-size: 12px; color: var(--text-muted); }
    .tc-client-tag { display: inline-flex; padding: 1px 8px; border-radius: 999px; background: var(--client-badge); color: var(--client-ink); font-size: 12px; font-weight: 500; }
    .tc-body { margin-top: 2px; font-size: 14px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
    .file-preview { position: fixed; z-index: 10050; pointer-events: none; padding: 6px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 18px 50px rgba(0, 0, 0, .35); }
    .file-preview img { display: block; max-width: 100%; max-height: calc(min(480px, 100vh - 32px) - 12px); width: auto; height: auto; border-radius: 8px; }
    .tc-shots { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
    .tc-shots a { display: block; }
    .tc-shots img { display: block; max-width: 100%; max-height: 220px; border-radius: 8px; border: 1px solid var(--border); }
    .tc-shots a:only-child img { width: 100%; max-height: none; }
    .tc-body a { color: inherit; text-decoration: underline; }
    .tc-mention { font-weight: 600; }
    .tc-deleted { margin: 0; font-size: 14px; font-style: italic; color: var(--text-muted); }
    .tc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0 2px; margin: 0 0 -8px -10px; }
    .tc-act { min-height: 44px; padding: 0 10px; border: 0; background: transparent; color: var(--text-muted); font: inherit; font-size: 13px; cursor: pointer; border-radius: 8px; }
    .tc-act:hover { color: var(--text-primary); text-decoration: underline; }
    .tc-act.danger { color: #c0392b; font-weight: 600; }
    :root[data-theme="dark"] .tc-act.danger { color: #ff8a7a; }
    .tc-confirm-q, .tc-failed { margin-left: 10px; font-size: 13px; color: var(--text-primary); }
    .tc-failed { font-weight: 600; }
    .tc-edit-text, .tc-field textarea { display: block; width: 100%; box-sizing: border-box; padding: 9px 11px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-secondary); color: var(--text-primary); font: inherit; font-size: 14px; line-height: 1.5; resize: vertical; }
    .tc-edit-acts { display: flex; gap: 8px; margin-top: 8px; }
    .tc-edit-acts button { min-height: 44px; }
    .tc-earlier { display: block; min-height: 44px; margin: 0 auto 10px; padding: 0 12px; border: 0; background: transparent; color: var(--text-muted); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
    .tc-composer { flex: none; padding: 12px 20px 14px; border-top: 1px solid var(--border); background: var(--bg-primary); }
    .tc-composer[hidden] { display: none; }
    .tc-replying { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; font-size: 13px; color: var(--text-muted); }
    .tc-replying[hidden] { display: none; }
    .tc-field { position: relative; }
    .tc-mentions { position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); z-index: 2; padding: 4px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18); }
    .tc-mentions[hidden] { display: none; }
    .tc-mention-opt { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 8px; border-radius: 7px; font-size: 14px; cursor: pointer; }
    .tc-mention-opt.on { background: var(--bg-secondary); }
    .tc-client-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; }
    .tc-client-row[hidden] { display: none; }
    .tc-switch { position: relative; flex: none; width: 36px; height: 20px; margin: 12px 0; padding: 0; border: 0; border-radius: 999px; background: var(--border); cursor: pointer; }
    .tc-switch::after { content: ''; position: absolute; inset: -12px -4px; }
    .tc-switch i { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
    .tc-switch[aria-checked="true"] { background: var(--client-ink); }
    .tc-switch[aria-checked="true"] i { left: 18px; }
    .tc-foot { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
    .tc-help { flex: 1; margin: 0; font-size: 12px; line-height: 1.4; color: var(--text-muted); }
    .tc-foot button { flex: none; min-height: 44px; }
    .tc-foot button:disabled { opacity: .5; cursor: default; }
    .tc-busy::before { content: ''; display: inline-block; width: 12px; height: 12px; margin-right: 6px; vertical-align: -2px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: tcSpin .7s linear infinite; }
    @keyframes tcSpin { to { transform: rotate(360deg); } }
    @media (max-width: 767px) {
      .tc { width: 100%; border-left: 0; height: 100dvh; bottom: auto; }
      .tc-replies { margin-left: 6px; padding-left: 12px; }
      .tc-scroll, .tc-composer { padding-left: 14px; padding-right: 14px; }
      .tc-field textarea { font-size: 16px; } /* keeps iOS from zooming in */
    }
    @media (prefers-reduced-motion: reduce) { .tc-c.tc-new, .tc-busy::before { animation: none; } }
/* Settings → Clients */
.cs-row { padding: 0; gap: 0; }
.cs-row .cs-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; border-radius: 10px; }
.cs-row .cs-open:hover { background: var(--bg-secondary); }
.cs-row > button[data-cs-restore] { margin-right: 8px; }
.cs-row[hidden] { display: none; }
.cs-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.cs-head h4 { margin: 0; white-space: nowrap; } /* the count stays on the heading's line; the search box gives way */
.gh-dialog .cs-search { position: relative; flex: 0 1 240px; min-width: 0; display: flex; flex-direction: row; align-items: center; gap: 0; color: var(--text-muted); } /* not a form field label */
.cs-search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.gh-dialog .cs-search input { width: 100%; min-width: 0; height: 36px; padding: 0 10px 0 32px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-card); color: var(--text-primary); font: inherit; font-size: 14px; }
.cs-search input:focus { outline: none; border-color: var(--accent); }
.cs-search input::placeholder { color: var(--text-muted); }
@media (hover: none) { .cs-search input { height: 40px; font-size: 16px; } } /* 16px keeps a phone from zooming in */
.cs-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cs-av.client-avatar { flex: 0 0 30px; width: 30px; height: 30px; border-radius: 8px; font-size: 11.5px; margin: 0; }
.cs-go { color: var(--text-muted); font-size: 18px; line-height: 1; }
.cs-archived .cs-name { opacity: .7; }

/* ===== Task card footer band (design/card-footer/card-footer-handoff.md) =====
   Every hover control lives in a band along the card's bottom, inside the card. Mouse and trackpad only: phones keep
   their bottom bar. The band opens with the grid-rows trick so the column doesn't jump. */
:root { --card-footer: #f5f4f0; --card-footer-shade: rgba(70, 55, 20, 0.05); --card-hover-border: var(--border); }
:root[data-theme="dark"] { --card-footer: #282826; --card-footer-shade: rgba(0, 0, 0, 0.17); --card-hover-border: #4a4a45; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]):not([data-theme="dark"]) { --card-footer: #282826; --card-footer-shade: rgba(0, 0, 0, 0.17); --card-hover-border: #4a4a45; } }
.task-card:hover { border-color: var(--card-hover-border); }
/* The band spans the card edge to edge: the card's padding is 14px 16px, or wider on the right beside a logo */
:is(.task-card, .client-card) > .card-foot {
  --pr: 16px;
  display: grid; grid-template-rows: 0fr; transition: grid-template-rows 140ms ease-out;
  margin: 14px calc(-1 * var(--pr)) -14px -16px;
  border-radius: 0 0 13px 13px; background: var(--card-footer);
  cursor: auto; container: cardfoot / inline-size;
}
.task-card:has(> div:first-of-type > .client-avatar) > .card-foot { --pr: calc(40px * var(--logo-scale, 1) + 26px); }
:is(.task-card, .client-card).colored > .card-foot, :is(.task-card, .client-card).gradient > .card-foot { background: var(--card-footer-shade); }
:is(.task-card, .client-card) > .card-foot > .cf-clip { min-height: 0; overflow: hidden; }
/* While it's closed, nothing in it can be tabbed to or clicked */
:is(.task-card, .client-card) > .card-foot > .cf-clip { visibility: hidden; transition: visibility 0s linear 140ms; }
@media (hover: hover) {
  :is(.task-card, .client-card):hover > .card-foot, :is(.task-card, .client-card):focus-within > .card-foot,
  :is(.task-card, .client-card):is(.wx-running, .harvest-running, .timer-running, .timer-paused, .foot-hold) > .card-foot { grid-template-rows: 1fr; }
  :is(.task-card, .client-card):hover > .card-foot > .cf-clip, :is(.task-card, .client-card):focus-within > .card-foot > .cf-clip,
  :is(.task-card, .client-card):is(.wx-running, .harvest-running, .timer-running, .timer-paused, .foot-hold) > .card-foot > .cf-clip { visibility: visible; transition-delay: 0s; }
}
/* Typing in the card (a subtask, the title) keeps it closed, as the old bar hid */
:is(.task-card, .client-card):has(input:focus, textarea:focus) > .card-foot { grid-template-rows: 0fr; }
:is(.task-card, .client-card):has(input:focus, textarea:focus) > .card-foot > .cf-clip { visibility: hidden; }
@media (prefers-reduced-motion: reduce) { :is(.task-card, .client-card) > .card-foot, :is(.task-card, .client-card) > .card-foot > .cf-clip { transition: none; } }
@media (hover: none) { :is(.task-card, .client-card) > .card-foot { display: none; } }
/* A collapsed card opens the band on hover too, so ⋯ and Start stay one hover away (the old bar did the same) */
@media (hover: hover) {
  .task-card.folded > div.card-foot.card-foot { display: grid; } /* outranks the collapsed card's hide-everything rule */
  .task-card.folded:has(> div:first-of-type > .client-avatar) > .card-foot { --pr: 48px; margin-top: 10px; margin-bottom: -10px; }
}

/* The row: icon buttons on the left, Start on the right. It replaces the old floating bar, so undo that bar's look */
:is(.task-card, .client-card) > .card-foot .card-actions {
  position: static; inset: auto; z-index: auto;
  display: flex; align-items: center; gap: 0; padding: 6px 8px;
  border: 0; border-radius: 0; background: none; box-shadow: none;
  opacity: 1; pointer-events: auto; transition: none;
  flex-wrap: nowrap;
}
:is(.task-card, .client-card) > .card-foot .card-actions > .cf-btn {
  position: relative; width: 32px; height: 32px; padding: 0; margin: 0;
  display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent;
  color: var(--text-muted); font-size: 16px; line-height: 1; cursor: pointer;
}
/* A 40px hit area for each 32px button */
:is(.task-card, .client-card) > .card-foot .card-actions > .cf-btn::after { content: ''; position: absolute; inset: -4px; }
:is(.task-card, .client-card) > .card-foot .card-actions > .cf-btn .ico { width: 16px; height: 16px; stroke-width: 1.5; }
:is(.task-card, .client-card) > .card-foot .card-actions > .cf-btn:hover { background: color-mix(in srgb, var(--text-primary) 6%, transparent); color: var(--text-primary); }
:is(.task-card, .client-card) > .card-foot .card-actions > .cf-btn:focus-visible, :is(.task-card, .client-card) > .card-foot .start-split button:focus-visible { outline: 2px solid var(--accent) !important; outline-offset: 2px; }
:is(.task-card, .client-card) > .card-foot .card-actions > .color-btn::before { content: ''; width: 15px; height: 15px; border-radius: 50%; border: 1px solid var(--border); background: conic-gradient(#fdf7a6, #f7c9a8, #ffb3c1, #c8f2b0, #b9d6fb, #e0cdfa, #fdf7a6); }
:is(.task-card, .client-card) > .card-foot .cf-gap { flex: 1; min-width: 6px; }
.task-card > .card-foot .card-actions > .cf-btn.cf-delete:hover, .task-card > .card-foot .card-actions > .cf-btn.cf-delete:focus-visible { color: var(--danger, #e5484d); }

/* Start: outlined in moss (the timer); the dot by the caret says which timer it runs (orange = Harvest) */
:is(.task-card, .client-card) > .card-foot .card-actions > .start-split {
  width: auto; flex: none; height: 30px; display: inline-flex; align-items: stretch; overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--wx-timer) 45%, transparent); border-radius: 8px;
  background: transparent; color: var(--wx-timer);
}
:is(.task-card, .client-card) > .card-foot .start-split button { color: var(--wx-timer); font-family: inherit; font-size: 13px; font-weight: 600; border-radius: 0; height: auto; width: auto; }
:is(.task-card, .client-card) > .card-foot .start-split .start-btn { gap: 6px; padding: 0 10px 0 10px; }
:is(.task-card, .client-card) > .card-foot .start-split .start-more { gap: 5px; padding: 0 8px 0 7px; border-left: 1px solid color-mix(in srgb, var(--wx-timer) 45%, transparent); }
:is(.task-card, .client-card) > .card-foot .start-split button:hover { background: color-mix(in srgb, var(--wx-timer) 12%, transparent); }
:is(.task-card, .client-card) > .card-foot .start-split .start-dot { width: 7px; height: 7px; margin: 0; box-shadow: none; }
:is(.task-card, .client-card) > .card-foot .start-split .start-dot.harvest { background: var(--hv, #fa5d00); }
:is(.task-card, .client-card) > .card-foot .start-split .start-dot.waxon { background: var(--wx-timer); }

/* Narrow column: no wrapping. When the row runs out of room, Card color shrinks away first (it's in More → Style
   too), then the other buttons tighten a little */
:is(.task-card, .client-card) > .card-foot .card-actions > .cf-btn { flex: 0 1 32px; min-width: 26px; }
:is(.task-card, .client-card) > .card-foot .card-actions > .cf-btn.cf-color { flex: 0 1000 32px; min-width: 0; overflow: hidden; }
:is(.task-card, .client-card) > .card-foot .card-actions > .start-split { flex-shrink: 0; }
/* Very narrow: Start keeps its ▶ (its tooltip and label still say Start) */
@container cardfoot (max-width: 225px) { :is(.task-card, .client-card) > .card-foot .start-split .start-word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); } }
@container cardfoot (max-width: 260px) { :is(.task-card, .client-card) > .card-foot .card-actions { padding: 6px 4px; } :is(.task-card, .client-card) > .card-foot .start-split .start-btn { padding: 0 7px; } :is(.task-card, .client-card) > .card-foot .start-split .start-more { padding: 0 6px; } }

/* Harvest's own button, outside the band now: still out of sight, and its window still opens */
:is(.task-card, .client-card) > .harvest-slot { position: absolute; width: 0; height: 0; overflow: visible; }
:is(.task-card, .client-card) > .harvest-slot .harvest-timer { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; clip-path: inset(50%); }
:is(.task-card, .client-card) > .harvest-slot dialog { pointer-events: auto; opacity: 1; cursor: auto; }
.task-card.folded > span.harvest-slot.harvest-slot { display: block; } /* outranks the collapsed card's hide-everything rule */

/* A card without subtasks doesn't open its "+ Add subtask" row on hover: the band has Add subtask (the row opens
   when it's used, as it did from the pill) */
.task-card:hover > .card-subtasks.add-on-hover { display: none; }
/* The logo sits at the top right of an open card, beside the title, as it does on a collapsed one (it used to be
   centred on the card, so on a long card it floated down the middle). It doesn't move when the band opens */
.task-card > div:first-of-type > .client-avatar,
.task-card.compact > div:first-of-type > .client-avatar { top: 10px; bottom: auto; transform: none; }

/* A card with only a title is shorter than its logo once the band opens: while it's open, the title row is tall enough
   that the band starts below the logo instead of under it (10px down + the logo + 6px, less the row's 14px either side) */
@media (hover: hover) {
  .task-card:not(.folded):has(> div:first-of-type > .client-avatar):not(:has(> .card-note:not(.note-slot), > .card-subtasks:not(.add-on-hover), > .card-meta)):is(:hover, :focus-within, .wx-running, .harvest-running, .timer-running, .timer-paused, .foot-hold) > div:first-of-type { min-height: calc(40px * var(--logo-scale, 1) - 12px); }
}

/* Collapsed card: the client's logo, 28px at full strength, just before the chevron (same tile as an open card) */
@media (hover: hover) {
  .task-card.folded:has(> div:first-of-type > .client-avatar) { padding: 10px 48px 10px 16px; min-height: 0; }
  .task-card.folded > div:first-of-type > .client-avatar {
    display: flex; position: absolute; top: 50%; right: 12px; transform: translateY(-50%);
    width: 28px; height: 28px; border-radius: 6px; font-size: 11px; opacity: 1;
  }
  .task-card.folded > div:first-of-type > .client-avatar img { padding: 2px; }
  /* When the band opens the card gets taller: the logo stays beside the title instead of sliding down onto the band */
  .task-card.folded:is(:hover, :focus-within, .wx-running, .harvest-running, .timer-running, .timer-paused, .foot-hold) > div:first-of-type > .client-avatar { top: 10px; transform: none; }
}

/* ===== Client cards get the same band (design/client-card-footer/client-card-footer-handoff.md) =====
   A client card is one row (logo | name and facts); the band wraps onto a full-width second row. Its padding is
   12px 14px and its radius 12px, so the band's edges and corners follow those */
.client-card { flex-wrap: wrap; row-gap: 0; }
.client-card > .card-foot { --pr: 14px; flex: 0 0 calc(100% + 28px); margin: 12px -14px -12px -14px; border-radius: 0 0 11px 11px; }
.client-card > .card-foot .cf-btn.cf-filter.on { color: var(--accent); }
/* Website | WordPress admin, after a thin divider */
.client-card > .card-foot .cf-div { position: relative; flex: 0 10000 9px; height: 18px; min-width: 0; overflow: hidden; }
.client-card > .card-foot .cf-div::before { content: ''; position: absolute; left: 4px; top: 0; bottom: 0; width: 1px; background: var(--border); }
/* Narrow: WordPress admin steps aside first, then Website (and the divider), then Changelog (it moves to the top of ⋯).
   Add task, Filter, Style, More and Start never move. Whole steps, never a half-squeezed icon: the widths are the full
   row (4 fixed buttons, Start, padding) plus each item; a card without Start has 104px more room */
.client-card > .card-foot .card-actions > .cf-btn { flex: none; width: 32px; min-width: 32px; }
.client-card > .card-foot .cf-div { flex: none; width: 9px; }
@container cardfoot (max-width: 360px) { .client-card > .card-foot .card-actions:has(.start-split) > .cf-wp { display: none; } }
@container cardfoot (max-width: 328px) { .client-card > .card-foot .card-actions:has(.start-split) > :is(.cf-web, .cf-div) { display: none; } }
@container cardfoot (max-width: 287px) { .client-card > .card-foot .card-actions:has(.start-split) > .cf-write { display: none; } }
@container cardfoot (max-width: 256px) { .client-card > .card-foot .card-actions:not(:has(.start-split)) > .cf-wp { display: none; } }
@container cardfoot (max-width: 224px) { .client-card > .card-foot .card-actions:not(:has(.start-split)) > :is(.cf-web, .cf-div) { display: none; } }
@container cardfoot (max-width: 183px) { .client-card > .card-foot .card-actions:not(:has(.start-split)) > .cf-write { display: none; } }
/* The band's buttons animate only their colors, so they show the moment the band opens (a page-wide "transition: all"
   also animated their visibility, and a quick Tab could skip them) */
:is(.task-card, .client-card) > .card-foot :is(.cf-btn, .start-split button) { transition: background-color 0.12s ease, color 0.12s ease; }

/* ===== Client card info line (design/client-card-info-line) =====
   logo | name + info line | hours. The info line only says what there's something to say about */
:root { --hv-ink: #b84300; --over: #c62f22; }
:root[data-theme="dark"] { --hv-ink: #ff9a52; --over: #ff6b5e; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]):not([data-theme="dark"]) { --hv-ink: #ff9a52; --over: #ff6b5e; } }
.client-card .cc-name { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; }
.client-card .cc-facts { font-size: 13px; color: var(--text-muted); gap: 2px 6px; align-items: center; }
.client-card .cc-sep { color: var(--text-muted); }
.cc-site { color: var(--over); font-weight: 600; text-decoration: none; }
.cc-site:hover { text-decoration: underline; }
.cc-src { display: inline-flex; align-items: center; gap: 5px; font-weight: 500; }
.cc-src::before { content: ''; width: 7px; height: 7px; border-radius: 50%; }
.cc-src.harvest { color: var(--hv-ink); }
.cc-src.harvest::before { background: #fa5d00; }
.cc-src.tracker { color: var(--text-secondary); }
.cc-src.tracker::before { background: #e57cd8; }
.cc-open-n { color: var(--text-primary); font-weight: 600; }
.cc-open-n.zero { color: var(--text-muted); font-weight: 400; }
/* Forwarded emails: muted, like "0 open" (it was a coral pill) */
.client-card .cc-mail { display: inline; padding: 0; border-radius: 0; background: none; color: var(--text-muted); font-size: inherit; font-weight: 400; line-height: inherit; }
.cc-hours { flex: none; align-self: center; font-family: 'Mona Sans', 'Figtree', sans-serif; font-stretch: 125%; font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; color: var(--text-primary); white-space: nowrap; }
/* Header: "Hours in November" on its own line under the title, at every width (it never jumps as columns resize) */
.column-header.has-hours-label { flex-wrap: wrap; row-gap: 2px; }
.column-header.has-hours-label .col-hours-label { order: 99; flex-basis: 100%; font-size: 13px; font-weight: 400; color: var(--text-muted); white-space: nowrap; }

/* Settings → Account: file storage */
.storage-use { margin: 14px 0 4px; }
.storage-use .su-head { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--text-primary); }
.storage-use .su-head span { color: var(--text-muted); }
.storage-use .su-bar { height: 6px; margin: 8px 0; border-radius: 999px; background: var(--border); overflow: hidden; }
.storage-use .su-bar i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.storage-use .su-bar.near i { background: var(--over); }
.storage-use .gh-help { margin: 0; }

    /* Business button: a count when Site Watch has found a problem */
    #businessBtn { position: relative; }
    #businessBtn[hidden] { display: none !important; }
    /* Narrow phones (a Galaxy S25 is 360 wide): six icons have to fit on the top bar's one row */
    @media (max-width: 389px) { header .buttons:has(#businessBtn:not([hidden])) > button.theme-btn { width: 32px; } }
    @media (max-width: 369px) { header:has(#businessBtn:not([hidden])) .title-wrap, header:has(#businessBtn:not([hidden])) .board-btn { max-width: 84px; } }
    #businessBtn .biz-badge { position: absolute; top: 3px; right: 3px; min-width: 16px; height: 16px; padding: 0 4px; box-sizing: border-box; border-radius: 8px; background: var(--danger, #d9534f); color: #fff; font-size: 11px; font-weight: 700; line-height: 16px; text-align: center; }

    /* The board card: the screenshot strip, cropped around the pin, and the row under it (design/feedback-view) */
    .task-card { --fb-strip-line: var(--border); }
    :root[data-theme="dark"] .task-card { --fb-strip-line: #3f3f3b; }
    @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .task-card { --fb-strip-line: #3f3f3b; } }
    .fb-strip-wrap { margin: 10px 0 0 32px; }
    .fb-strip { display: block; width: 100%; height: 88px; padding: 0; border: 1px solid var(--fb-strip-line); border-radius: 8px; overflow: hidden; background: #141413; cursor: pointer; }
    .fb-strip img { display: block; width: 100%; height: 100%; object-fit: cover; }
    .fb-strip:hover { border-color: color-mix(in srgb, var(--accent) 60%, var(--fb-strip-line)); }
    .fb-strip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
    .fb-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin: 8px 0 0 32px; font-size: 12px; color: var(--text-muted); }
    .fb-status { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; border: 1px solid transparent; }
    .fb-status.fb-new { background: var(--accent); color: #fff; }
    .fb-status.fb-replied { border-color: var(--accent); color: var(--accent); }
    .fb-status.fb-plain { padding: 0; height: auto; font-weight: 500; color: var(--text-secondary); }
    .fb-meta .fb-from { border: 0; background: none; padding: 0; font: inherit; color: var(--text-secondary); cursor: pointer; }
    .fb-meta .fb-from:hover { color: var(--text-primary); text-decoration: underline; }
    .fb-meta > :not(.fb-status) + *::before { content: '·'; display: inline-block; margin-right: 8px; color: var(--text-muted); }
    .task-card.fb-card .card-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
    .task-card.folded.fb-card > div.fb-meta.fb-meta { display: flex; margin-top: 6px; } /* a collapsed feedback card keeps its row (not the strip); outranks the hide-everything rule */
    /* The Feedback view: the side panel for a note from the Feedback button */
    .fbv-top { flex: none; display: flex; align-items: center; gap: 10px; padding: 12px 8px 12px 20px; border-bottom: 1px solid var(--border); }
    .fbv-top .client-avatar.fbv-logo { position: relative; overflow: hidden; cursor: default; flex: none; width: 32px; height: 32px; border-radius: 7px; font-size: 12px; opacity: 1; transform: none; display: flex; }
    .fbv-who { flex: 1; min-width: 0; }
    .fbv-who p { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .fbv-line1 { font-size: 14px; font-weight: 600; color: var(--text-primary); }
    .fbv-line2 { font-size: 12.5px; color: var(--text-muted); margin-top: 2px !important; }
    .fbv-more, .fbv-top .tc-close { position: static; flex: none; width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--text-muted); font-size: 20px; line-height: 1; cursor: pointer; }
    .fbv-more:hover { background: var(--bg-secondary); color: var(--text-primary); }
    .fbv-scroll { padding-top: 18px; }
    .fbv-title { margin: 0 0 14px; font-size: 20px; line-height: 1.35; font-weight: 600; overflow-wrap: anywhere; white-space: pre-wrap; }
    .fbv-title:focus { outline: none; }
    .fbv-title:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
    .fbv .tc-note { margin: -6px 0 14px; }
    .fbv-shot { margin: 0; }
    .fbv-shot-btn { position: relative; display: flex; justify-content: center; align-items: center; width: 100%; padding: 12px; border: 1px solid #3f3f3b; border-radius: 12px; background: #141413; cursor: zoom-in; }
    .fbv-shot-btn img { display: block; max-width: 100%; max-height: 520px; width: auto; height: auto; border-radius: 4px; }
    .fbv-expand { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: rgba(20, 20, 19, .75); color: #fff; }
    .fbv-shot-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
    .fbv-shot figcaption { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; font-size: 13px; }
    .fbv-cap-page { min-width: 0; display: flex; flex-direction: column; }
    .fbv-cap-title { color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .fbv a { color: var(--accent); }
    .fbv-view { flex: none; display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border: 1px solid var(--border); border-radius: 999px; color: var(--text-primary) !important; text-decoration: none; font-weight: 500; }
    .fbv-view:hover { background: var(--bg-secondary); }
    .fbv-links { display: flex; align-items: center; gap: 14px; margin: 0; font-size: 13px; }
    .fbv .tc-shots { margin-top: 10px; }
    .fbv-details { display: grid; grid-template-columns: 92px 1fr; gap: 8px 12px; margin: 16px 0 0; font-size: 13px; line-height: 1.45; }
    .fbv-details dt { color: var(--text-muted); }
    .fbv-details dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
    .fbv-errors { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border-radius: 8px; background: var(--bg-secondary); border: 1px solid var(--border); }
    .fbv-errors code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; overflow-wrap: anywhere; }
    .fbv-chips { display: flex; flex-wrap: wrap; gap: 6px; }
    .fbv-chip { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; background: var(--bg-secondary); border: 1px solid var(--border); font-size: 12px; color: var(--text-secondary); }
    .fbv-div { border: 0; border-top: 1px solid var(--border); margin: 20px 0 16px; }
    .fbv-empty { margin: 0; padding: 14px; border: 1px dashed var(--border); border-radius: 10px; color: var(--text-muted); font-size: 13.5px; text-align: center; }
    .fbv-label { display: block; margin: 0 0 6px; font-size: 13px; font-weight: 600; }
    .fbv-hint { display: flex; align-items: center; gap: 5px; }
    .fbv-foot { flex: none; display: flex; align-items: center; gap: 12px; padding: 12px 20px 14px; border-top: 1px solid var(--border); }
    .fbv-foot p { flex: 1; margin: 0; font-size: 12px; line-height: 1.4; color: var(--text-muted); }
    .fbv-done { flex: none; min-height: 40px; padding: 0 16px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg-card); color: var(--text-primary); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
    .fbv-done:hover { border-color: var(--accent); }
    .fbv-lightbox { position: fixed; inset: 0; z-index: 10060; display: grid; place-items: center; padding: 32px; background: rgba(10, 10, 9, .82); cursor: zoom-out; }
    .fbv-lightbox img { max-width: 100%; max-height: 100%; border-radius: 6px; box-shadow: 0 18px 60px rgba(0, 0, 0, .5); cursor: default; }
    .fbv-lb-close { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .12); color: #fff; font-size: 24px; cursor: pointer; }
    @media (max-width: 767px) {
      .fbv-top { padding-left: 14px; }
      .fbv-shot-btn img { max-height: 60vh; }
      .fbv-foot { padding-left: 14px; padding-right: 14px; }
    }
    /* WaxOn's own Feedback button sits bottom left, over the Clients column: room for it there */
    body.has-fb-button .column:first-child .add-card { margin-bottom: 64px; }

/* Client card → Feedback button → Button position: computer and phone side by side */
.cp-fb-pos { display: flex; gap: 10px; flex-wrap: wrap; }
.cp-fb-pos label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-secondary); }

/* ===== Class boards (Education mode, public/course.js; design/education-mode/HANDOFF.md) =====
   Wax On tokens only: coral --accent (due soon, This week, primary), --over (past due), moss --wx-timer (turned in).
   Type chips are neutral: the word tells the type, not a colour. */
.crs-new, .crs-beta { display: inline-block; vertical-align: middle; font-size: 11px; font-weight: 700; line-height: 1; padding: 4px 7px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); letter-spacing: .02em; margin-left: 6px; }
.crs-beta { background: var(--bg-secondary); color: var(--text-secondary); border: 1px solid var(--border); margin-left: 0; }
.crs-chip { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; background: var(--bg-secondary); color: var(--text-secondary); font-size: 12px; font-weight: 600; white-space: nowrap; }
.crs-chip.mine { background: transparent; border: 1px dashed var(--border); }
.crs-muted { color: var(--text-muted); font-size: 13px; }
.crs-link { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.crs-link:hover { text-decoration: underline; }
.crs-space { flex: 1; }
.crs-btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text-primary); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.crs-btn:hover { border-color: var(--accent); }
.crs-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.crs-btn.primary:hover { background: var(--accent-hover); }
.crs-btn:disabled { opacity: .6; cursor: default; }
.crs-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* The bar over a class board: kind + Beta, Weeks / Schedule, Add to calendar, Share with students, Next due */
.crs-bar { display: flex; flex-direction: column; gap: 10px; padding: 4px 24px 12px; }
.crs-bar-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.crs-kind { font-size: 13px; font-weight: 600; color: var(--text-secondary); border: 1px solid var(--border); border-radius: 999px; padding: 5px 11px; }
.crs-toggle { display: inline-flex; background: var(--bg-secondary); border-radius: 999px; padding: 3px; margin-left: 6px; }
.crs-toggle button { border: 0; background: none; color: var(--text-secondary); font: inherit; font-size: 13px; font-weight: 600; padding: 6px 14px; border-radius: 999px; cursor: pointer; }
.crs-toggle button[aria-pressed="true"] { background: var(--bg-card); color: var(--text-primary); box-shadow: 0 1px 3px var(--shadow-hover); }
.crs-phone-only { display: none; }
.crs-banner { display: flex; align-items: center; gap: 8px; margin: 0; padding: 9px 14px; border-radius: 12px; background: var(--bg-secondary); color: var(--text-secondary); font-size: 13px; }

/* Columns: Course info first (pinned, not draggable), then one per week */
.board.course-board { padding-top: 4px; }
.crs-col .column-header.crs-head { cursor: default; align-items: flex-start; gap: 8px; }
.crs-head-text { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; min-width: 0; flex: 1; }
.crs-head-text small { flex-basis: 100%; color: var(--text-muted); font-size: 13px; font-weight: 500; }
.crs-topic { flex-basis: 100%; font-size: 13px; font-weight: 500; color: var(--text-secondary); font-style: italic; background: none; border: 0; padding: 0; text-align: left; font-family: inherit; }
.crs-topic.editable { cursor: text; }
.crs-add-topic { font-style: normal; color: var(--text-muted); cursor: pointer; opacity: 0; transition: opacity .15s; }
.crs-week:hover .crs-add-topic, .crs-add-topic:focus-visible { opacity: 1; }
.crs-topic-input { flex-basis: 100%; font: inherit; font-size: 13px; padding: 4px 8px; border: 2px solid var(--accent); border-radius: 8px; background: var(--bg-card); color: var(--text-primary); }
.crs-now { box-shadow: inset 0 0 0 2px var(--accent); }
.crs-now-pill { font-size: 11px; font-weight: 700; color: #fff; background: var(--accent); border-radius: 999px; padding: 3px 8px; }
.crs-col .cards { padding: 0 12px 12px; overflow-y: auto; flex: 1; min-height: 0; }
.crs-add { padding: 0 12px 12px; }
.crs-add button { width: 100%; background: none; border: 1px dashed var(--border); border-radius: 12px; padding: 10px; color: var(--text-muted); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.crs-add button:hover { border-color: var(--accent); color: var(--accent); }
.crs-week.collapsed .crs-add { display: none; }
.crs-empty { color: var(--text-muted); font-size: 13px; padding: 8px 6px; }
.crs-dropping { outline: 2px dashed var(--accent); outline-offset: -4px; }
/* A past week folds to a narrow strip: "Week 1 · Aug 24 · 3 done" */
.crs-week.collapsed .column-header { padding: 14px 0; height: 100%; }
.crs-strip { writing-mode: vertical-rl; background: none; border: 0; font: inherit; font-size: 13px; font-weight: 600; color: var(--text-secondary); cursor: pointer; padding: 0; white-space: nowrap; }

/* Course info + Course files */
.crs-info .cards { display: flex; flex-direction: column; gap: 10px; }
.crs-info-card { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.crs-row { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.crs-row small { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.crs-row a { color: var(--accent); }
.crs-row span { color: var(--text-secondary); }
.crs-about { margin: 0; color: var(--text-secondary); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.crs-about.open { display: block; }
.crs-more { align-self: flex-start; }
.crs-info-form { display: flex; flex-direction: column; gap: 10px; }
.crs-info-form label, .crs-small label, .crs-card-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.crs-info-form input, .crs-info-form textarea { font: inherit; font-size: 14px; padding: 7px 9px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-primary); color: var(--text-primary); }
.crs-sub { font-size: 12px; font-weight: 600; color: var(--text-muted); margin: 6px 4px 0; }
.crs-files { display: flex; flex-direction: column; gap: 6px; }
.crs-file { display: flex; align-items: center; gap: 4px; background: var(--bg-card); border: 1px solid var(--border-light); border-radius: 12px; }
.crs-file-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 8px 10px; font: inherit; color: var(--text-primary); text-align: left; cursor: pointer; }
.crs-tile { flex: none; width: 34px; height: 34px; border-radius: 8px; background: var(--bg-secondary); color: var(--text-secondary); display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 800; letter-spacing: .03em; }
.crs-file-text { min-width: 0; display: flex; flex-direction: column; }
.crs-file-text b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crs-file-text small { font-size: 12px; color: var(--text-muted); }
.crs-file-del { background: none; border: 0; color: var(--text-muted); padding: 8px; cursor: pointer; border-radius: 8px; opacity: 0; }
.crs-file:hover .crs-file-del, .crs-file-del:focus-visible { opacity: 1; }
.crs-file-del:hover { color: var(--over); }
.crs-add-file { align-self: flex-start; background: none; border: 0; color: var(--accent); font: inherit; font-weight: 600; font-size: 14px; padding: 4px; cursor: pointer; }
.crs-cap { font-size: 12px; color: var(--text-muted); margin: -4px 4px 0; }

/* Assignment cards: Upcoming (muted), Due soon (coral), Past due (red), Turned in (moss tick, struck title, 75%) */
.task-card.crs-card { cursor: pointer; padding: 12px 14px; }
.crs-card-top { display: flex; align-items: center; gap: 6px; min-height: 22px; margin-bottom: 8px; }
.crs-card-top:empty { display: none; }
.crs-clip { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; color: var(--text-muted); margin-left: auto; }
.crs-card-main { display: flex; align-items: flex-start; gap: 10px; }
.crs-tick { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); background: var(--bg-card); color: transparent; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; margin-top: 1px; }
.crs-tick:hover { border-color: var(--wx-timer); color: var(--wx-timer); }
.crs-tick.on { background: var(--wx-timer); border-color: var(--wx-timer); color: var(--on-wx-timer); }
.crs-card-text { min-width: 0; flex: 1; }
.crs-title { font-size: 15px; font-weight: 600; line-height: 1.3; color: var(--text-primary); overflow-wrap: anywhere; }
.crs-due { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.crs-moved { font-size: 12px; color: var(--text-secondary); margin-top: 3px; font-style: italic; }
.crs-soon .crs-due, .crs-due.crs-soon, .crs-table td.crs-soon { color: var(--accent); font-weight: 600; }
.crs-over .crs-due, .crs-due.crs-over, .crs-table td.crs-over { color: var(--over); font-weight: 600; }
.crs-done .crs-due, .crs-due.crs-done, .crs-table td.crs-done { color: var(--wx-timer); font-weight: 600; }
.task-card.crs-done { opacity: .75; }
.crs-done .crs-title { text-decoration: line-through; text-decoration-color: var(--text-muted); }
.task-card.crs-soon { border-color: color-mix(in srgb, var(--accent) 45%, var(--border-light)); }
.task-card.crs-mine { border-style: dashed; }

/* Opened assignment */
.crs-overlay { z-index: 3000; }
.crs-overlay .gh-dialog { width: min(520px, calc(100vw - 32px)); }
.crs-card-dialog { display: flex; flex-direction: column; gap: 12px; }
.crs-card-form { display: flex; flex-direction: column; gap: 12px; }
.crs-card-form input, .crs-card-form select, .crs-card-form textarea, .crs-small input { font: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-primary); color: var(--text-primary); }
.crs-dialog-title { font-size: 22px; line-height: 1.25; margin: 0; }
.crs-desc { margin: 0; color: var(--text-secondary); line-height: 1.5; white-space: pre-wrap; }
.crs-files-on-card h4, .crs-mine-list h4 { font-size: 12px; font-weight: 600; color: var(--text-muted); margin: 4px 0 6px; }
.crs-mine-list h4 small { font-weight: 500; }
.crs-file-link { display: flex; align-items: center; gap: 6px; color: var(--text-primary); font-size: 14px; padding: 4px 0; }
.crs-turn-in { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; border-radius: 12px; border: 2px solid var(--wx-timer); background: var(--bg-card); color: var(--wx-timer); font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; }
.crs-turn-in.on, .crs-turn-in:hover { background: var(--wx-timer); color: var(--on-wx-timer); }
.crs-mine-list ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.crs-mine-list li { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.crs-mine-list li label { flex: 1; display: flex; align-items: center; gap: 8px; }
.crs-mine-list li button { background: none; border: 0; color: var(--text-muted); cursor: pointer; font-size: 18px; }
.crs-step-input { width: 100%; font: inherit; font-size: 14px; padding: 7px 9px; border: 1px solid var(--accent); border-radius: 8px; background: var(--bg-primary); color: var(--text-primary); margin-bottom: 6px; }
.crs-copy { display: flex; gap: 8px; }
.crs-copy input { flex: 1; min-width: 0; font: inherit; font-size: 13px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-primary); color: var(--text-primary); }
.crs-steps { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--text-secondary); }
.crs-small form { display: flex; flex-direction: column; gap: 12px; }

/* Schedule view: Canvas's Course Summary, dated */
.crs-schedule { width: 100%; max-width: 960px; margin: 0 auto; padding: 0 0 40px; align-self: flex-start; }
.crs-sched-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.crs-sched-head h2 { font-size: 20px; margin: 0; color: var(--text-primary); }
.crs-sched-scroll { overflow-x: auto; background: var(--bg-card); border: 1px solid var(--border-light); border-radius: 16px; }
.crs-table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 14px; }
.crs-table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--text-muted); padding: 12px 14px; border-bottom: 1px solid var(--border); }
.crs-table td { padding: 10px 14px; border-top: 1px solid var(--border-light); vertical-align: middle; color: var(--text-primary); }
.crs-table tr:not(.crs-day-first) td { border-top-color: transparent; }
.crs-table td:first-child { white-space: nowrap; font-weight: 600; width: 130px; }
.crs-table td:nth-child(3) { white-space: nowrap; color: var(--text-muted); }
.crs-sched-title { background: none; border: 0; padding: 0; margin-left: 6px; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.crs-sched-title:hover { text-decoration: underline; }

/* Set up your course */
.crs-setup-overlay { z-index: 2500; align-items: stretch; }
.crs-setup { width: min(1080px, calc(100vw - 32px)); margin: 32px auto; background: var(--bg-primary); border: 1px solid var(--border); border-radius: 22px; padding: 22px 28px 28px; color: var(--text-primary); }
.crs-back { background: none; border: 0; color: var(--text-muted); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; padding: 4px 0; }
.crs-setup h1 { font-size: clamp(24px, 4vw, 32px); margin: 6px 0 18px; }
.crs-setup-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 28px; }
.crs-setup-left { display: flex; flex-direction: column; gap: 14px; }
.crs-setup-left > label, .crs-two label, .crs-time { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.crs-setup input[type="text"], .crs-setup input:not([type]), .crs-setup input[type="date"], .crs-setup input[type="time"], .crs-setup select, .crs-setup textarea { font: inherit; font-size: 15px; padding: 9px 11px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-card); color: var(--text-primary); min-width: 0; }
.crs-time input { max-width: 180px; }
.crs-role { border: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.crs-role legend { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.crs-radio { display: flex; gap: 10px; align-items: flex-start; padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-card); cursor: pointer; }
.crs-radio:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.crs-radio input { accent-color: var(--accent); margin-top: 3px; }
.crs-radio b { display: block; font-size: 15px; }
.crs-radio small { display: block; font-size: 13px; color: var(--text-muted); line-height: 1.35; margin-top: 2px; }
.crs-drop { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px; padding: 14px 16px; border: 2px dashed var(--border); border-radius: 14px; background: var(--bg-card); }
.crs-drop b { font-size: 14px; }
.crs-drop .crs-drop-name { grid-column: 1; font-size: 13px; color: var(--text-muted); }
.crs-drop .crs-btn { grid-column: 2; grid-row: 1 / 3; }
.crs-drop.over, .crs-drop:focus-visible { border-color: var(--accent); }
.crs-drop.has-file .crs-drop-name { color: var(--text-primary); font-weight: 600; }
.crs-setup-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.crs-setup-right { background: var(--bg-secondary); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.crs-setup-right h2 { font-size: 17px; margin: 0; color: var(--text-primary); }
.crs-setup-right h2 small, .crs-review h3 small { font-weight: 500; color: var(--text-muted); font-size: 13px; }
.crs-tabs { display: inline-flex; align-self: flex-start; background: var(--bg-card); border-radius: 999px; padding: 3px; }
.crs-tabs button { border: 0; background: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--text-secondary); padding: 7px 14px; border-radius: 999px; cursor: pointer; }
.crs-tabs button[aria-selected="true"] { background: var(--accent); color: #fff; }
.crs-scan-row { display: flex; gap: 12px; align-items: center; }
.crs-scan-status, .crs-paste-status { font-size: 13px; color: var(--text-secondary); margin: 0; min-height: 1em; }
.crs-scan-status.ok, .crs-paste-status.ok { color: var(--wx-timer); font-weight: 600; }
.crs-tab-paste { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.crs-tab-paste textarea { width: 100%; resize: vertical; font-size: 14px; }
.crs-review { background: var(--bg-card); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.crs-review h3 { font-size: 15px; margin: 0; }
.crs-review ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 340px; overflow-y: auto; }
.crs-review-row { display: grid; grid-template-columns: 104px minmax(0, 1fr) 140px 108px 74px 26px; gap: 6px; align-items: center; }
.crs-review-row input, .crs-review-row select { font-size: 13px !important; padding: 6px 7px !important; border-radius: 8px !important; border-color: var(--border-light) !important; }
.crs-review-row input:focus, .crs-review-row select:focus { border-color: var(--accent) !important; }
.crs-review-week { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.crs-review-row button { background: none; border: 0; color: var(--text-muted); font-size: 18px; cursor: pointer; }
.crs-review-row button:hover { color: var(--over); }

/* Settings → Phone reminders → Class due dates */
.crs-setting { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 12px; cursor: pointer; }
.crs-setting input { margin-top: 3px; accent-color: var(--accent); }
.crs-setting b { display: block; font-size: 14px; }
.crs-setting small { display: block; color: var(--text-muted); font-size: 13px; }

/* A student's own board: From my classes */
.crs-classes .cards { display: flex; flex-direction: column; gap: 14px; }
.crs-class-head { display: flex; align-items: center; gap: 8px; margin: 0 4px 8px; flex-wrap: wrap; }
.crs-class-head b { font-size: 14px; }
.crs-class-head small { font-size: 12px; color: var(--text-muted); }
.crs-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; vertical-align: middle; margin-right: 6px; }
.card-title .crs-dot { margin-top: -2px; }
.crs-classes .task-card { cursor: grab; }
.crs-add-class { align-self: flex-start; background: none; border: 0; color: var(--accent); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; padding: 4px; }

/* The one-time feedback ask, above the Feedback button */
.crs-fb-ask { position: fixed; left: 16px; bottom: 76px; z-index: 2600; width: min(320px, calc(100vw - 32px)); background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 14px 16px; box-shadow: 0 12px 32px var(--shadow-hover); display: flex; flex-direction: column; gap: 10px; font-size: 14px; color: var(--text-primary); }
.crs-fb-ask p { margin: 0; line-height: 1.4; }
.crs-fb-ask div { display: flex; gap: 8px; }
.crs-fb-ask button { font: inherit; font-size: 13px; font-weight: 600; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text-primary); cursor: pointer; }
.crs-fb-ask button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Phones: This week / All weeks / Schedule, big 28px ticks, one column at a time */
@media (max-width: 760px) {
  .crs-phone-only { display: inline; }
  .crs-desk-only { display: none; }
  .crs-bar { padding: 4px 16px 10px; }
  .crs-bar .crs-btn span { display: none; }
  .crs-toggle { order: 5; flex-basis: 100%; margin-left: 0; justify-content: space-between; }
  .crs-toggle button { flex: 1; }
  .crs-tick { width: 28px; height: 28px; }
  .crs-setup { margin: 0; border-radius: 0; padding: 16px; width: 100%; min-height: 100%; }
  .crs-setup-grid, .crs-role { grid-template-columns: 1fr; }
  .crs-review-row { grid-template-columns: 1fr 1fr 26px; }
  .crs-review-row [data-k="title"] { grid-column: 1 / 3; grid-row: 1; }
  .crs-review-row [data-rm] { grid-column: 3; grid-row: 1; }
  .crs-review-week { display: none; }
  .board.course-board { flex-direction: column; gap: 12px; overflow-y: auto; }
  .course-board > .crs-col { min-width: 0; max-width: none; width: 100%; height: auto; max-height: none; }
  .course-board > .crs-col.collapsed { min-width: 0; max-width: none; }
  .course-board > .crs-col.collapsed .crs-strip { writing-mode: horizontal-tb; padding: 0 16px; }
  .crs-schedule { padding: 0 0 24px; }
}

/* Print the Schedule view: just the table */
@media print {
  body.course-on > *:not(.app):not(main) { }
  body.course-on header, body.course-on .crs-bar, body.course-on .crs-sched-head button, body.course-on #fbHost, body.course-on .crs-fb-ask { display: none !important; }
  body.course-on .crs-sched-scroll { border: 0; overflow: visible; }
  body.course-on .crs-table { min-width: 0; font-size: 12px; }
  body.course-on .crs-chip { border: 1px solid #999; background: none; }
}
.crs-main { display: flex; flex-direction: column; flex: 1; min-width: 0; min-height: 0; }
.crs-main > .board { flex: 1; min-height: 0; }
.crs-main > .crs-bar { padding-left: 0; padding-right: 0; }
/* Class boards: cards are added from each week (+ Add assignment / + Add my own card), not the phone's quick add */
body.course-on #fabAdd, body.course-on #fabVoice, body.course-on #voiceBtn { display: none !important; }
/* Class boards have no clients, so no Changelogs tab */
body.course-on #logsTabBtn { display: none; }

/* My classes: Courses column (like Clients) and the mixed This week / Up next / Done */
.crs-back-link { background: none; border: 0; font: inherit; font-size: 14px; font-weight: 600; color: var(--text-secondary); cursor: pointer; padding: 6px 4px; }
.crs-back-link:hover { color: var(--accent); }
.crs-courses .column-header .col-add-btn { margin-left: auto; }
.crs-courses .cards { display: flex; flex-direction: column; gap: 10px; }
.crs-course-card { position: relative; cursor: pointer; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.crs-course-card .crs-chip { flex: none; }
.crs-course-top { display: flex; align-items: center; gap: 10px; min-width: 0; padding-right: 22px; }
.crs-course-tile { flex: none; width: 40px; height: 40px; border-radius: 10px; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; letter-spacing: .02em; }
.crs-course-name { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.crs-course-name b { font-size: 15px; font-weight: 600; line-height: 1.25; }
.crs-course-name small { font-size: 12px; color: var(--text-muted); }
.crs-course-next { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 13px; color: var(--text-secondary); }
.crs-course-next b { font-weight: 600; color: var(--text-primary); }
.crs-course-count { color: var(--accent); font-weight: 600; }
.crs-course-arch { position: absolute; top: 10px; right: 8px; background: none; border: 0; color: var(--text-muted); cursor: pointer; padding: 4px; border-radius: 8px; opacity: 0; font: inherit; font-size: 12px; font-weight: 600; }
.crs-course-card:hover .crs-course-arch, .crs-course-arch:focus-visible, .crs-course-card.archived .crs-course-arch { opacity: 1; }
.crs-course-card.archived { opacity: .7; margin-top: 8px; }
.crs-course-card.archived .crs-course-arch { position: static; align-self: flex-start; color: var(--accent); }
.crs-archived summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text-muted); padding: 6px 4px; }
.crs-from { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-right: 2px; }
.crs-from .crs-dot { margin-right: 5px; }
.crs-mixed .crs-card-top { flex-wrap: wrap; }

/* Plan: class due dates as chips (all-day row and Month), study blocks name their class */
.plan-ad-ev.crs-plan-due { display: flex; align-items: center; gap: 4px; border-style: solid; border-color: var(--border); background: var(--bg-card); color: var(--text-primary); cursor: pointer; font-family: inherit; }
.plan-ad-ev.crs-plan-due:hover { border-color: var(--accent); background: var(--bg-card); }
.plan-ad-ev.crs-plan-due.over { border-color: color-mix(in srgb, var(--over) 60%, transparent); color: var(--over); }
.crs-plan-due .crs-dot { width: 8px; height: 8px; margin: 0; }
.crs-plan-name { font-weight: 700; color: var(--text-secondary); flex: none; }
.crs-plan-due.over .crs-plan-name { color: inherit; }
.crs-plan-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.crs-plan-time { flex: none; margin-left: auto; font-weight: 500; color: var(--text-muted); }
.crs-plan-due.over .crs-plan-time { color: inherit; }
.plan-block .crs-plan-name { color: inherit; opacity: .8; }
.crs-plan-group { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text-secondary); margin: 12px 2px 4px; }
.crs-plan-group .crs-dot { margin: 0; }
.plan-item.crs-plan-item { display: flex; align-items: baseline; gap: 8px; }
.plan-item.crs-plan-item span { flex: 1; min-width: 0; }
.plan-item.crs-plan-item small { color: var(--text-muted); font-size: 12px; flex: none; }

/* Plan → Month */
.plan-month-on .plan-head > div { padding: 8px 10px; font-size: 12px; font-weight: 600; color: var(--text-muted); text-align: left; }
.plan-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-auto-rows: minmax(118px, 1fr); border-left: 1px solid var(--border-light); }
.plan-month-day { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 6px; text-align: left; border: 0; border-right: 1px solid var(--border-light); border-bottom: 1px solid var(--border-light); background: transparent; color: var(--text-primary); font: inherit; cursor: pointer; overflow: hidden; }
.plan-month-day:hover { background: color-mix(in srgb, var(--bg-card) 60%, transparent); }
.plan-month-day.other { color: var(--text-muted); background: color-mix(in srgb, var(--bg-secondary) 60%, transparent); }
.plan-month-day.other .plan-month-items { opacity: .6; }
.plan-month-num { font-size: 13px; font-weight: 600; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; flex: none; }
.plan-month-day.is-today .plan-month-num { background: var(--accent); color: #fff; }
.plan-month-items { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.plan-month-line { display: flex; align-items: center; gap: 5px; min-width: 0; font-size: 12px; line-height: 1.3; white-space: nowrap; }
.plan-month-line i { width: 3px; height: 12px; border-radius: 2px; background: var(--line-color); flex: none; }
.plan-month-line .t { color: var(--text-muted); flex: none; }
.plan-month-line .n { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.plan-month-line.done .n { text-decoration: line-through; color: var(--text-muted); }
.plan-month .plan-ad-ev.crs-plan-due { font-size: 11.5px; padding: 1px 5px; }
.plan-month-more { font-size: 12px; font-weight: 600; color: var(--text-muted); padding-left: 2px; }
.plan-month-dots { display: none; }
.plan-month-list { display: none; }
@media (max-width: 760px) {
  .plan-month { grid-auto-rows: 52px; }
  .plan-month-on .plan-head > div { padding: 6px 4px; text-align: center; }
  .plan-month-day { align-items: center; padding: 4px 2px; gap: 4px; }
  .plan-month-items { display: none; }
  .plan-month-dots { display: flex; gap: 3px; }
  .plan-month-dots i { width: 5px; height: 5px; border-radius: 50%; }
  .plan-month-day.picked { box-shadow: inset 0 0 0 2px var(--accent); border-radius: 10px; }
  .plan-month-list { display: flex; flex-direction: column; gap: 8px; padding: 14px 4px 24px; }
  .plan-month-list h3 { font-size: 16px; margin: 0 0 2px; }
  .plan-month-list .plan-month-line { font-size: 14px; }
  .plan-month-list .plan-ad-ev.crs-plan-due { font-size: 13px; padding: 6px 8px; }
  .plan-month-open { align-self: flex-start; margin-top: 4px; background: none; border: 1px solid var(--border); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 600; color: var(--text-primary); }
}
.plan-month-day:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
@media (max-width: 760px) {
  .crs-plan-group { flex: none; white-space: nowrap; margin: 0 2px; align-self: center; }
  .plan-item.crs-plan-item small { display: none; }
}

/* Class cards: labels and Start in Dojo */
.crs-label { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: color-mix(in srgb, var(--label-color) 18%, transparent); color: color-mix(in srgb, var(--label-color) 60%, var(--text-primary)); white-space: nowrap; }
.crs-card { position: relative; }
.crs-card[hidden] { display: none; }
.crs-dojo { position: absolute; right: 8px; bottom: 8px; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border); background: var(--bg-card); color: var(--wx-timer); display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; opacity: 0; transition: opacity .15s; }
.crs-card:hover .crs-dojo, .crs-dojo:focus-visible { opacity: 1; }
@media (hover: none) { .crs-dojo { opacity: 1; } }
.crs-dojo:hover { border-color: var(--wx-timer); }
.crs-dojo-big { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text-primary); font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; }
.crs-dojo-big:hover { border-color: var(--wx-timer); color: var(--wx-timer); }

/* Class boards on the app's own columns and cards */
.crs-week .crs-strip { display: none; }
.crs-week.collapsed .crs-strip { display: inline; writing-mode: vertical-rl; font-size: 13px; font-weight: 600; color: var(--text-secondary); white-space: nowrap; }
.crs-week.collapsed .column-title, .crs-week.collapsed .crs-now-pill, .crs-week.collapsed .crs-week-meta { display: none; }
.crs-week-meta { padding: 0 18px 10px; margin-top: -8px; font-size: 13px; color: var(--text-muted); }
.crs-week .crs-now-pill { margin-left: 8px; flex: none; }
.crs-week .column-header .column-title { flex: 0 1 auto; min-width: 0; }
.course-board.crs-only-week > .crs-other-week, .course-board.crs-only-week > .stack > .crs-other-week { display: none; }
.crs-n .crs-card-top { margin: -2px 0 8px; }
.crs-n.crs-done { opacity: .75; }
.crs-n.crs-done .card-title { text-decoration: line-through; text-decoration-color: var(--text-muted); }
.crs-n .checkbox.checked { background: var(--wx-timer); border-color: var(--wx-timer); }
.due-badge.crs-due-soon { color: var(--accent); }
.due-badge.crs-due-over { color: var(--over); }
.due-badge.crs-due-done { color: var(--wx-timer); }
.crs-n.crs-soon { border-color: color-mix(in srgb, var(--accent) 45%, var(--border-light)); }
.crs-n.crs-locked { cursor: pointer; }
body.course-student .crs-locked .card-menu-btn, body.course-student .crs-locked .title-add, body.course-student .crs-locked .card-foot { display: none !important; }
body.course-student .course-board .col-delete, body.course-student .course-board .col-rename { display: none; }
.crs-mixed .crs-card { margin-bottom: 10px; }
.crs-week-meta .crs-week-topic { display: block; margin-top: 2px; font-style: italic; color: var(--text-secondary); }
.crs-week .column-header .column-title { white-space: nowrap; }

/* My classes, client-style: All classes + each class; the open class is selected with its info under it */
.crs-all { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; width: 100%; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border-light); background: var(--bg-card); color: var(--text-primary); font: inherit; cursor: pointer; text-align: left; }
.crs-all b { font-size: 15px; font-weight: 600; }
.crs-all small { font-size: 12px; color: var(--accent); font-weight: 600; }
.crs-all.on, .crs-course-card.selected { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.crs-course-card.selected { background: color-mix(in srgb, var(--accent) 7%, var(--bg-card)); }
.crs-course-menu { position: absolute; top: 8px; right: 8px; background: none; border: 0; color: var(--text-secondary); cursor: pointer; padding: 2px 8px; border-radius: 8px; font-size: 18px; line-height: 1; }
.crs-course-menu:hover { background: var(--bg-secondary); color: var(--text-primary); }
.crs-info-box { display: flex; flex-direction: column; gap: 10px; margin: -2px 0 6px 10px; padding-left: 10px; border-left: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); }
@media (max-width: 760px) {
  /* Phones: Courses is a row of chips at the top; the open class's info folds under it */
  .course-board > .crs-courses { background: transparent; }
  .crs-courses .column-header { padding: 4px 4px 8px; }
  .crs-courses .cards { flex-direction: row !important; flex-wrap: nowrap; overflow-x: auto; gap: 8px; padding: 0 0 6px; scrollbar-width: none; }
  .crs-courses .crs-all, .crs-courses .crs-course-card { flex: none; width: auto; min-width: 0; padding: 8px 12px; margin: 0; }
  .crs-courses .crs-course-card .crs-course-next, .crs-courses .crs-course-card .crs-course-name small, .crs-courses .crs-course-card .crs-chip, .crs-courses .crs-course-arch, .crs-courses .crs-archived, .crs-courses .crs-all small { display: none; }
  .crs-courses .crs-course-top { padding-right: 0; gap: 8px; }
  .crs-courses .crs-course-tile { width: 28px; height: 28px; font-size: 9px; border-radius: 8px; }
  .crs-courses .crs-course-name b { font-size: 14px; white-space: nowrap; }
  .crs-courses .crs-course-menu { position: static; }
  .crs-courses .crs-info-box { display: none; }
}
@media (max-width: 760px) {
  .crs-courses .cards { align-items: center; }
  .crs-courses .crs-course-card { flex-direction: row; align-items: center; gap: 8px; }
  .crs-courses .crs-all { align-items: center; }
  .course-board > .column.crs-week.collapsed { min-width: 0; max-width: none; height: auto; }
  .course-board > .column.crs-week.collapsed .column-header { flex-direction: row; height: auto; padding: 10px 14px; }
  .course-board > .column.crs-week.collapsed .crs-strip { writing-mode: horizontal-tb; }
}
/* Chips never wrap inside: one line, same height, the title shortens with … */
.crs-plan-due, .crs-plan-due > * { white-space: nowrap; }
.crs-course-next span { min-width: 0; }
.crs-course-next > span:first-child { display: flex; gap: 4px; min-width: 0; max-width: 100%; white-space: nowrap; }
.crs-course-next > span:first-child b { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.crs-course-count { white-space: nowrap; }

/* Class tiles (colour + short code, as in Courses) on cards, chips and lists */
.crs-mini { display: inline-flex; align-items: center; justify-content: center; flex: none; height: 18px; min-width: 28px; padding: 0 4px; border-radius: 5px; font-size: 9.5px; font-weight: 800; letter-spacing: .02em; line-height: 1; }
.crs-plan-due .crs-mini { height: 15px; min-width: 24px; font-size: 8.5px; border-radius: 4px; }
.client-avatar.crs-avatar { font-size: 10px; font-weight: 800; letter-spacing: .02em; cursor: inherit; }
.client-avatar.crs-avatar:hover { box-shadow: none; }
.crs-card { padding-right: 52px; }
.crs-avatar-abs { position: absolute; top: 12px; right: 12px; }
.crs-from .crs-mini { margin-right: 4px; }
.crs-avatar-abs { width: 36px; height: 36px; font-size: 10px; border-radius: 10px; }
.crs-n .crs-card-top { display: flex; align-items: center; gap: 6px; }
.settings-nav button[hidden] { display: none; }
.today-item .crs-mini { margin-right: 6px; vertical-align: 1px; }
/* Tiles fit their code: four letters get a smaller size, never clipped */
.crs-mini, .crs-avatar, .crs-course-tile { overflow: visible; white-space: nowrap; letter-spacing: 0; }
.crs-mini.len4 { font-size: 8.5px; min-width: 30px; }
.client-avatar.crs-avatar { padding: 0 2px; }
.client-avatar.crs-avatar.len4 { font-size: 8.5px; }
.crs-course-tile.len4 { font-size: 10.5px; }
/* Card tiles sized like the Courses tile: centred, with room on both sides */
.task-card > div:first-of-type > .client-avatar.crs-avatar, .task-card > .client-avatar.crs-avatar { font-size: calc(12px * var(--logo-scale, 1)); font-weight: 800; letter-spacing: 0; padding: 0 4px; display: flex; align-items: center; justify-content: center; }
.task-card > div:first-of-type > .client-avatar.crs-avatar.len4, .task-card > .client-avatar.crs-avatar.len4 { font-size: calc(10px * var(--logo-scale, 1)); }
.crs-course-tile { padding: 0 4px; }
/* Week columns named by date; the week number small and muted */
.crs-week-meta .crs-week-range { display: block; }
.crs-week-meta .crs-week-num { display: block; margin-top: 2px; font-size: 11px; color: var(--text-muted); opacity: .8; }
.crs-beta-mini { margin-left: 8px; font-size: 10px; font-weight: 700; color: var(--text-muted); border: 1px solid var(--border); border-radius: 999px; padding: 1px 6px; vertical-align: 2px; }
/* Class tiles at full colour everywhere, exactly as in Courses (a turned-in card still dims as a whole) */
.task-card > div:first-of-type > .client-avatar.crs-avatar, .task-card > .client-avatar.crs-avatar, .crs-avatar, .crs-mini { opacity: 1; filter: none; }

/* A class in four columns (This week / Next week / Later / Done) */
.crs-viewcol .col-rename, .crs-viewcol .col-delete { display: none; }
/* My classes: its four columns are fixed (not renamed or deleted) */
.crs-mixed .col-rename, .crs-mixed .col-delete { display: none; }
/* The class tile sits top right: the card's text keeps clear of it (other card rules set their own right padding) */
body .task-card.crs-card { padding-right: 58px; }
.crs-viewcol .column-title { cursor: default; }
.crs-later-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; margin: 14px 4px 6px; font-size: 12px; color: var(--text-muted); }
.crs-later-head:first-child { margin-top: 2px; }
.crs-later-head b { font-weight: 600; color: var(--text-secondary); }
.crs-later-head .crs-week-topic { flex-basis: 100%; margin: 0; }
.crs-week-topic[data-topic-week] { cursor: text; }
.crs-week-meta .crs-add-topic { display: block; margin-top: 2px; font-size: 12px; opacity: .8; }
.crs-filter-chip { display: inline-flex; align-items: center; gap: 6px; }
.crs-course-card.crs-focused { box-shadow: inset 0 0 0 2px var(--accent); }

/* Spotlight (Shift+F on a class or client): the same blur as card Focus; nothing moves */
body.crs-spot #tasksPanel .task-card:not(.crs-spot-on), body.crs-spot #tasksPanel .client-card:not(.crs-spot-on),
body.crs-spot #tasksPanel .crs-all, body.crs-spot #tasksPanel .crs-later-head, body.crs-spot #tasksPanel .crs-info-box,
body.crs-spot #tasksPanel .today .today-item:not(.crs-spot-on) {
  filter: blur(4px); opacity: 0.3; pointer-events: none; transition: filter 0.25s ease, opacity 0.25s ease;
}
body.crs-spot #tasksPanel .crs-spot-on { position: relative; z-index: 5; }
.crs-spot-pill { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 3000; display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 16px; border-radius: 999px; background: var(--bg-card); border: 1px solid var(--accent); box-shadow: 0 8px 24px var(--shadow-hover); font-size: 14px; color: var(--text-primary); }
.crs-spot-pill button { font: inherit; font-size: 13px; font-weight: 600; border: 1px solid var(--border); background: var(--bg-secondary); color: var(--text-primary); border-radius: 999px; padding: 4px 10px; cursor: pointer; }
.crs-spot-pill kbd { font: inherit; font-size: 11px; color: var(--text-muted); margin-left: 4px; }

/* Plan → List: every due date by date */
.plan-list-on .plan-head { display: none; }
.plan-list { max-width: 960px; margin: 0 auto; padding: 4px 0 24px; }
.plan-list-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.plan-list .crs-mini { margin-right: 6px; }
@media print {
  body:has(.plan-list-on) header, body:has(.plan-list-on) .plan-tray, body:has(.plan-list-on) .plan-toolbar, body:has(.plan-list-on) .plan-list-head, body:has(.plan-list-on) .crs-fb-ask, body:has(.plan-list-on) #crsSpotPill { display: none !important; }
  body:has(.plan-list-on) .crs-sched-scroll { border: 0; overflow: visible; }
  body:has(.plan-list-on) .crs-table { min-width: 0; font-size: 12px; }
}

/* Setup: Upload syllabus / Paste dates */
.crs-tab-scan[hidden], .crs-tab-paste[hidden] { display: none !important; }
.crs-up-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 22px 18px; border: 2px dashed var(--border); border-radius: 14px; background: var(--bg-card); cursor: pointer; }
.crs-up-drop:hover, .crs-up-drop.over, .crs-up-drop:focus-visible { border-color: var(--accent); }
.crs-up-title { font-size: 15px; }
.crs-up-help { font-size: 13px; color: var(--text-muted); max-width: 420px; }
.crs-up-file { font-size: 14px; }
.crs-up-file[hidden], .crs-up-title[hidden] { display: none; }
.crs-scan-status { margin-top: 8px; }
.crs-setup { position: relative; }
.crs-setup-close { position: absolute; top: 14px; right: 16px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--bg-secondary); color: var(--text-secondary); font-size: 22px; line-height: 1; cursor: pointer; }
.crs-setup-close:hover { color: var(--text-primary); background: var(--border); }
.crs-discard { position: absolute; top: 12px; right: 60px; display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 999px; border: 1px solid var(--accent); background: var(--bg-card); box-shadow: 0 8px 24px var(--shadow-hover); font-size: 14px; z-index: 2; }
.crs-discard[hidden] { display: none; }
/* One row: Next due chips on the left, the actions on the right (the chips shorten first; on phones the actions go under) */
.crs-bar { gap: 8px; padding-top: 0; }
.crs-actions { display: flex; align-items: center; gap: 8px; flex: none; }
@media (max-width: 760px) {
}
.crs-main > .crs-bar { padding-top: 10px; }

/* Today: the next assignments from your classes (the whole title, due in coral within 3 days, overdue in red) */
.today-item.crs-today { align-items: flex-start; }
.crs-today .ti-main { min-width: 0; }
.crs-today b { white-space: normal; overflow: visible; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.crs-today-top { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.crs-today.crs-soon small { color: var(--accent); font-weight: 600; }
.crs-today.crs-over small { color: var(--over); font-weight: 600; }
/* The class actions at the right end of the labels row; on phones they wrap under it */
#boardTools .crs-actions { margin-left: auto; flex: none; }
@media (max-width: 760px) { #boardTools { flex-wrap: wrap; } #boardTools .crs-actions { margin-left: 0; flex-basis: 100%; } }

/* Course file viewer: PDFs and images inline, others offer Download; full screen on phones */
.crs-viewer { position: fixed; inset: 0; z-index: 3200; background: rgba(0, 0, 0, .55); display: flex; align-items: center; justify-content: center; padding: 24px; }
.crs-viewer-box { width: min(1000px, 100%); height: min(92vh, 1200px); display: flex; flex-direction: column; background: var(--bg-card); border-radius: 16px; overflow: hidden; box-shadow: 0 20px 60px rgba(0, 0, 0, .4); }
.crs-viewer-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 18px; border-bottom: 1px solid var(--border-light); color: var(--text-primary); }
.crs-viewer-head b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crs-viewer-head .crs-btn { text-decoration: none; }
.crs-viewer-close { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--bg-secondary); color: var(--text-secondary); font-size: 20px; line-height: 1; cursor: pointer; }
.crs-viewer-body { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; background: var(--bg-secondary); }
.crs-viewer-body iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.crs-viewer-body img { max-width: 100%; max-height: 100%; object-fit: contain; }
@media (max-width: 760px) { .crs-viewer { padding: 0; } .crs-viewer-box { width: 100%; height: 100%; border-radius: 0; } }
/* A class's spotlight: only This week stays (with the class's cards sharp in it), Courses keeps the class's card;
   the other columns and the labels row's buttons dim and blur like card Focus. Cards in This week stay clickable */
body.crs-spot-class #tasksPanel .column.crs-viewcol:not(.crs-col-this), body.crs-spot-class #tasksPanel .column.crs-mixed:not(.crs-col-this),
body.crs-spot-class #boardTools > :not(#crsSpotPill) {
  filter: blur(4px); opacity: 0.3; pointer-events: none; transition: filter 0.25s ease, opacity 0.25s ease;
}
body.crs-spot-class #tasksPanel .column.crs-col-this .task-card.crs-spot-on { pointer-events: auto; }
/* A class's spotlight leaves other items out of Today (no blurry gaps) */
body.crs-spot-class #tasksPanel .today .today-item:not(.crs-spot-on), body.crs-spot-class #tasksPanel .today .today-empty:not(.crs-spot-empty) { display: none; }

/* Someone with only class boards: no client or Harvest settings inside Dojo and Completed either */
.biz-hidden .biz-only { display: none !important; }

/* Client boards: a header row over the title (design/card-header). The title row becomes two rows:
   "#142 · from Joe · 12 hr ago … + › logo" and then the circle with the title at the card's full width.
   Repeated classes outrank the older rules that put a large logo at the card's right and padded the card for it */
.task-card.has-head.has-head, .task-card.has-head.has-head:has(> div:first-of-type > .client-avatar) { padding-right: 16px; min-height: 0; justify-content: flex-start; }
.task-card.has-head > div.card-row-head {
  display: grid; grid-template-columns: 18px minmax(0, 1fr) auto auto auto; grid-template-areas: "info info add fold logo" "check title title title title";
  column-gap: 12px; row-gap: 4px; align-items: center; min-height: 0;
}
.task-card.has-head > div.card-row-head > .checkbox { grid-area: check; align-self: start; margin-top: 2px; }
.task-card.has-head > div.card-row-head > .card-title { grid-area: title; min-width: 0; }
.task-card.has-head > div.card-row-head > .card-head-info { grid-area: info; }
.task-card.has-head > div.card-row-head > .title-add { grid-area: add; margin: 0; align-self: center; }
.task-card.has-head > div.card-row-head > .card-fold { grid-area: fold; margin: 0; align-self: center; }
.task-card.has-head > div.card-row-head > .card-menu-btn { display: none; }
.task-card.has-head.has-head > div.card-row-head > .client-avatar.client-avatar {
  grid-area: logo; position: relative; top: auto; right: auto; transform: none; display: flex; overflow: hidden; width: 24px; height: 24px; border-radius: 6px; font-size: 10px; margin: 0; opacity: 1; /* small now, so full strength */
}
.task-card.has-head > div.card-row-head > .client-avatar img { padding: 2px; }
.card-head-info { display: flex; align-items: center; gap: 6px; min-width: 0; min-height: 24px; font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; }
.card-head-info > * + *::before { content: '·'; display: inline-block; margin-right: 6px; color: var(--text-muted); }
.card-head-info .card-no { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--text-secondary); }
.card-head-info .fb-from { border: 0; background: none; padding: 0; font: inherit; color: var(--text-secondary); cursor: pointer; }
.card-head-info .fb-from:hover { color: var(--text-primary); text-decoration: underline; }
.card-head-info .fb-from::before { text-decoration: none; }
.card-head-info:empty { visibility: hidden; }
/* Collapsed: the header (with its logo) and the title stay */
.task-card.has-head.folded.folded { padding: 10px 16px; }
.task-card.has-head.folded.folded > div.card-row-head > .client-avatar.client-avatar { display: flex; }
/* The footer band runs edge to edge: with the logo in the header the card no longer keeps room for it on the right */
.task-card.has-head.has-head:has(> div:first-of-type > .client-avatar) > .card-foot { --pr: 16px; }
.task-card.has-head.has-head.folded:has(> div:first-of-type > .client-avatar) > .card-foot { --pr: 16px; margin-top: 10px; margin-bottom: -10px; }
/* Phones: the title row no longer keeps room on its right for a big logo; a collapsed card's buttons still sit top right */
body .task-card.has-head.has-head > div.card-row-head.card-row-head.card-row-head { padding-right: 0; min-height: 0; }
.task-card.has-head.has-head.has-touchbar.folded { padding-right: 104px; }
.task-card.has-head.has-head.has-touchbar.folded:has(.tb-subs) { padding-right: 160px; }
    /* The Feedback view's email log: each email the note sent its client, and when */
    .fbv-mails { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
    .fbv-mails time { color: var(--text-muted); }
