/* Task Helper — time clock (job-intake.md §20; slices T-1 BRIEF-790, T-2 BRIEF-792, T-3 FIX-792, T-4a BRIEF-795, T-4b CLOSE-OUT-796, BRIEF-799, BRIEF-817). Namespace .tht-
   Uses the app's own colour tokens (index.html :root). Touch targets ≥ 44 px (§14.7). */

/* ── Top-bar pill: only while the person's clock runs. Phone: ● 1:23 · desktop: ● TSK-… 1:23:45 ──
   (.topbar prefix: this file loads before the page's own <style>, so equal-weight rules would lose.) */
.topbar .tht-pill { gap:6px; padding:0 10px; font-size:14px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.tht-dot { flex:none; width:8px; height:8px; border-radius:50%; background:#4ade80; animation:tht-pulse 2s ease-in-out infinite; }
@keyframes tht-pulse { 50% { opacity:.35; } }
.tht-pill-key, .tht-pill-long { display:none; }
@media (min-width:768px) {
  .tht-pill-key, .tht-pill-long { display:inline; }
  .tht-pill-short { display:none; }
  .tht-pill-key { max-width:120px; overflow:hidden; text-overflow:ellipsis; color:#c9d1db; font-weight:500; }
}
/* Narrow phones: the bar must stay on ONE line with the project name still readable.
   .tht-on = a clock is running (pill showing, on a server without the Time view);
   .tht-seg3 = the bar has three views (Tasks · Map · Time) — compact always. */
@media (max-width:419px) {
  .topbar .tht-pill { gap:4px; padding:0 6px; font-size:13px; }
  .topbar.tht-on, .topbar.tht-seg3 { gap:6px; }
  .topbar.tht-on .tb-seg, .topbar.tht-seg3 .tb-seg { padding:0 9px; font-size:13px; }
  .topbar.tht-on .tb-projbtn, .topbar.tht-seg3 .tb-projbtn { padding:0 4px; }
  .topbar.tht-on .tb-projbtn .tb-caret, .topbar.tht-seg3 .tb-projbtn .tb-caret { display:none; }   /* 20 px back to the project name */
}
/* The Time segment carries the running clock on a phone ("● 1:23"); there the separate pill is
   not shown. From 768 px the segment just reads "Time" and the pill shows as before. */
.tb-seg .tht-segclock, .tb-seg .tht-dot { display:none; }
@media (max-width:767px) {
  .topbar.tht-seg3 .tht-slot { display:none; }
  .tb-seg.tht-run .tht-seglabel { display:none; }
  .tb-seg.tht-run .tht-segclock { display:inline; font-variant-numeric:tabular-nums; }
  .tb-seg.tht-run .tht-dot { display:inline-block; margin-right:5px; vertical-align:middle; }
  .tb-seg.tht-run[aria-pressed="true"] .tht-dot { background:#1f9d55; }
}

/* ── Task list: a quiet clock button, top-right of each task card (BRIEF-817) ──
   44 × 44 hit area, absolutely placed (the card is position:relative), so the card is no taller.
   z-index 1 puts it above the card's own full-card "open" target. */
.tasklist .task > button.tht-rowclock, .bd-card > button.tht-rowclock { position:absolute; top:2px; right:2px; z-index:1; width:44px; height:44px; padding:0; display:inline-flex;
                                         align-items:center; justify-content:center; background:transparent; color:var(--branch); border-radius:10px; }
.tasklist .task > button.tht-rowclock:hover, .bd-card > button.tht-rowclock:hover { background:var(--hover); color:var(--ink); }
.tasklist .task > button.tht-rowclock.tht-on .tht-dot, .bd-card > button.tht-rowclock.tht-on .tht-dot { width:12px; height:12px; background:#1f9d55; box-shadow:0 0 0 4px #e8f5ee; }
.tasklist .task.tht-hasclock > .k, .tasklist .task.tht-hasclock > h3 { padding-right:40px; }   /* the title never runs under the button */
.bd-card.tht-hasclock > .bd-open { padding-right:44px; }   /* (a) a Board card: the same, its title never under the clock */
.tht-sheet .tht-actions button.tht-no { flex:1; margin-top:0; }
.tht-sheet .tht-actions button.tht-yes { flex:1; }
.tht-sheet .tht-actions button.tht-yes.tht-stop { background:#b3261e; color:#fff; min-height:52px; font-size:16px; }

/* ── The clock sheet (from the pill): bottom sheet on a phone, a card under the bar on desktop ── */
.tht-overlay { position:fixed; inset:0; z-index:70; display:flex; align-items:flex-end; justify-content:center;
               background:rgba(20,28,40,.45); }
.tht-sheet { width:100%; max-width:480px; background:var(--card); color:var(--ink); border-radius:16px 16px 0 0;
             padding:8px 16px calc(16px + env(safe-area-inset-bottom)); box-shadow:0 -10px 30px rgba(20,28,40,.2); }
@media (min-width:768px) {
  .tht-overlay { align-items:flex-start; justify-content:flex-end; padding:calc(64px + env(safe-area-inset-top)) 16px 16px; }
  .tht-sheet { max-width:380px; border-radius:14px; padding-bottom:16px; box-shadow:0 10px 30px rgba(20,28,40,.2); }
}
.tht-sheet-head { display:flex; align-items:center; gap:8px; min-height:48px; }
.tht-sheet-head h2 { flex:1; min-width:0; margin:0; font-size:17px; color:var(--ink); text-transform:none; letter-spacing:0; }
/* BRIEF-1315 (THFrame): the head + button row stay in reach — they reach the sheet's 16px sides and cancel its top / bottom padding */
.tht-sheet.tht-framed { --th-dpad:16px; }
.tht-sheet.tht-framed > .th-dhead { top:-8px; margin-top:-8px; padding-top:8px; }
.tht-sheet.tht-framed > .th-dfoot { margin-top:14px; bottom:calc(-16px - env(safe-area-inset-bottom)); }   /* flush with the sheet's edge, even with History below it */
.tht-sheet.tht-framed > .th-dfoot:last-child { margin-bottom:calc(-16px - env(safe-area-inset-bottom)); }
@media (min-width:768px) {
  .tht-sheet.tht-framed > .th-dhead { border-radius:14px 14px 0 0; }
  .tht-sheet.tht-framed > .th-dfoot { bottom:-16px; border-radius:0 0 14px 14px; }
  .tht-sheet.tht-framed > .th-dfoot:last-child { margin-bottom:-16px; }
}
.tht-x { flex:none; width:44px; height:44px; padding:0; display:inline-flex; align-items:center; justify-content:center;
         background:transparent; color:var(--muted); border-radius:10px; }
.tht-x:hover { background:var(--hover); }
.tht-sheet-task { margin:4px 0 0; font-size:16px; overflow-wrap:anywhere; }
.tht-sheet-proj { margin:2px 0 0; font-size:13px; color:var(--muted); }
.tht-big { margin:14px 0 2px; font-size:44px; line-height:1.1; font-weight:700; font-variant-numeric:tabular-nums; text-align:center; }
.tht-sub { margin:0 0 14px; font-size:14px; color:var(--muted); text-align:center; }
.tht-sheet button.tht-stop, .tht-pane button.tht-stop { min-height:56px; font-size:18px; background:#b3261e; color:#fff; }
.tht-sheet button.tht-ghost { margin-top:10px; min-height:48px; background:transparent; color:var(--ink); border:1px solid var(--line); }
.tht-sheet button.tht-ghost:hover { background:var(--hover); }

/* Messages (not .msg — the task form looks its own .msg up inside the panel). */
.tht-msg { margin:10px 0 0; font-size:14px; }
.tht-msg.tht-ok { color:#17703d; }     /* 6.0:1 on white */
.tht-msg.tht-err { color:#b3261e; }
.tht-msg.tht-warn { color:#8a5300; }   /* 6.9:1 on white */

/* ── Entry editor (in the sheet): start, finish, docket number, note, Delete / Save, History ── */
.tht-sheet { max-height:calc(100vh - 24px); max-height:calc(100dvh - 24px); overflow-y:auto; }
.tht-frow { margin-top:12px; }
.tht-dt { display:flex; gap:8px; }
.tht-dt input { flex:1 1 0; min-width:0; min-height:48px; }
.tht-sheet textarea { min-height:72px; }
.tht-sheet input:disabled, .tht-sheet textarea:disabled { color:var(--ink); opacity:.75; }
.tht-dur { min-height:20px; margin:8px 0 0; font-size:14px; font-weight:600; }
.tht-dur.tht-err { color:#b3261e; font-weight:400; }
.tht-dur.tht-warn { color:#8a5300; }
.tht-dur.tht-hint { color:var(--muted); font-weight:400; }
.tht-actions { display:flex; gap:10px; margin-top:14px; }
.tht-actions button { min-height:52px; }
.tht-actions button.tht-save { flex:1; }
.tht-actions button.tht-del { flex:none; width:auto; padding:0 16px; background:transparent; color:#b3261e; border:1px solid var(--line); }
.tht-sheet button.tht-link { margin-top:6px; min-height:44px; padding:0 8px; font-size:14px; background:transparent; color:var(--accent); }
.tht-sheet button.tht-other { width:auto; min-height:44px; margin-top:8px; padding:0 14px; font-size:14px; }
/* ── Overlap conflicts (BRIEF-799): highlighted rows, banner, stepper, fix all ── */
.tht-row.tht-conflict { border-left:4px solid #b26a00; padding-left:8px; background:#fff8ec; }
.tht-ovl { display:flex; align-items:center; flex-wrap:wrap; gap:4px 10px; padding:0 4px 8px; font-size:13px; color:#8a5300; }
.tht-ovl span { flex:1 1 150px; min-width:0; }
.tht-pane button.tht-fixbtn, .tht-view button.tht-fixbtn { flex:none; width:auto; min-height:44px; padding:0 12px; font-size:13px; background:var(--card); color:var(--ink); border:1px solid var(--line); }
.tht-banner { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin:0 0 12px; padding:10px 12px; font-size:14px; color:#5c3800;
              background:#fdf1dc; border:1px solid #f0d49a; border-radius:12px; }
.tht-banner span { flex:1 1 160px; min-width:0; }
.tht-pane .tht-banner button, .tht-view .tht-banner button { flex:none; width:auto; min-height:44px; padding:0 14px; font-size:14px; background:var(--card); color:var(--ink); border:1px solid #e0c080; }
.tht-cf-kind { margin:4px 0 10px; font-size:15px; }
.tht-cf-pair > div { padding:8px 10px; margin-bottom:6px; border:1px solid var(--line); border-radius:10px; overflow-wrap:anywhere; }
.tht-cf-pair span { display:block; font-size:13px; color:var(--muted); }
.tht-cf-choices { margin:12px 0 0; padding:0; border:0; }
.tht-cf-choices legend { padding:0; margin-bottom:4px; font-size:13px; color:var(--muted); }
.tht-cf-choice { display:flex; align-items:flex-start; gap:10px; min-height:44px; margin:0; padding:8px 4px; font-size:15px; color:var(--ink); border-radius:8px; cursor:pointer; }
.tht-cf-choice:hover { background:var(--hover); }
.tht-cf-choice input { flex:none; width:22px; height:22px; margin:1px 0 0; padding:0; }
.tht-cf-choice.tht-off { color:var(--muted); cursor:default; }
.tht-cf-choice em { display:block; font-style:normal; font-size:12px; }
.tht-cf-manual { margin:4px 0 4px 32px; }
.tht-cf-after { margin-top:12px; padding:10px 12px; background:#f5f7fa; border-radius:10px; font-size:14px; }
.tht-cf-after h3 { margin:0 0 4px; font-size:12px; color:var(--muted); text-transform:uppercase; letter-spacing:.5px; }
.tht-cf-after ul, .tht-cf-report { margin:0; padding-left:18px; }
.tht-cf-after li, .tht-cf-report li { margin:3px 0; overflow-wrap:anywhere; }
.tht-cf-total { list-style:none; margin-left:-18px !important; padding-top:6px; }
.tht-cf-nav { display:flex; gap:8px; margin-top:10px; }
.tht-sheet .tht-cf-nav button.tht-ghost { flex:1; margin-top:0; }
.tht-cf-report { font-size:14px; margin-bottom:8px; }

/* ── Planned time (BRIEF-835): Actual | Planned on the task's Time tab; a plan never looks like actual time ── */
.tht-kinds { display:flex; margin:0 0 14px; border:1px solid var(--line); border-radius:10px; overflow:hidden; }
.tht-pane button.tht-kind { flex:1; width:auto; min-height:44px; padding:0 12px; font-size:14px; font-weight:600; border-radius:0; background:var(--card); color:var(--muted); }
.tht-pane button.tht-kind + button.tht-kind { border-left:1px solid var(--line); }
.tht-pane button.tht-kind[aria-pressed="true"] { background:#e8eefc; color:var(--ink); }
.tht-row.tht-planned { margin:6px 0; border:1.5px dashed #8fa3c7; border-radius:10px; }
.tht-row.tht-planned + .tht-row.tht-planned { border-top:1.5px dashed #8fa3c7; }
.tht-row.tht-planned .tht-row-dur { font-weight:500; }
.tht-badge.tht-plan { background:#e8eefc; color:#1f3f8f; }
.tht-view .tht-kinds { margin-bottom:12px; }
.tht-view button.tht-kind { flex:1; width:auto; min-height:44px; padding:0 12px; font-size:14px; font-weight:600; border-radius:0; background:var(--card); color:var(--muted); }
.tht-view button.tht-kind + button.tht-kind { border-left:1px solid var(--line); }
.tht-view button.tht-kind[aria-pressed="true"] { background:#e8eefc; color:var(--ink); }
/* A plan over several days: which days of the week get an entry */
.tht-range { margin-top:10px; }
.tht-range .tht-note { margin:0 0 6px; }
.tht-dows { display:grid; grid-template-columns:repeat(7, 1fr); gap:4px; }
.tht-sheet button.tht-wd { width:auto; min-height:44px; padding:0; font-size:13px; font-weight:600; background:var(--card); color:var(--muted); border:1px solid var(--line); border-radius:9px; }
.tht-sheet button.tht-wd[aria-pressed="true"] { background:#e8eefc; color:var(--ink); border-color:#8fa3c7; }
.tht-plantotals { margin-top:4px; padding-top:0; border-top:0; }

/* ── "Open task" in a time editor (BRIEF-858) ── */
.tht-opentask-row { margin:2px 0 0; }
.tht-sheet .tht-opentask-row button.tht-opentask { width:auto; margin-top:0; padding:0; min-height:44px; text-align:left; }
.tht-sheet .tht-opentask-row button.tht-opentask:disabled { color:var(--muted); opacity:1; }
.tht-opentask-row .tht-note { display:block; margin:-6px 0 4px; }
.tht-ask { margin:6px 0 10px; padding:10px 12px; background:#fdf1dc; border:1px solid #f0d49a; border-radius:10px; }
.tht-ask p { margin:0 0 8px; font-size:14px; color:#5c3800; }
.tht-sheet .tht-ask button { min-height:44px; margin-top:6px; font-size:15px; }

/* ── Long-running clock (BRIEF-821): never stopped — from 12 h the indicators turn amber and a warning shows ── */
.tht-warnmark { display:none; flex:none; width:16px; height:16px; border-radius:50%; background:#f5a524; color:#3b2600; font-size:12px; font-weight:800;
                line-height:16px; text-align:center; }
.topbar .tht-pill.tht-long { border-color:#f5a524; }
.topbar .tht-pill.tht-long .tht-dot, .tb-seg.tht-long .tht-dot { background:#f5a524; animation:none; }
.topbar .tht-pill.tht-long .tht-warnmark { display:inline-block; }
@media (max-width:767px) { .tb-seg.tht-run.tht-long .tht-warnmark { display:inline-block; margin-right:4px; vertical-align:middle; } .tb-seg.tht-run.tht-long .tht-dot { display:none; } }
.tht-runcard.tht-long { border-color:#f0d49a; background:#fff8ec; }
.tht-runcard .tht-longwarn { flex:1 1 100%; margin:0; }
.tht-longothers { font-size:14px; }
/* Map pin pop-up: Start / Stop clock */
button.tht-popclock { display:inline-flex; align-items:center; gap:6px; width:auto; min-height:44px; margin-top:8px; padding:0 12px; font-size:14px; font-weight:600;
                      background:#fff; color:var(--ink); border:1px solid var(--line); border-radius:10px; }
button.tht-popclock:hover { background:var(--hover); }
button.tht-popclock.tht-on .tht-dot { width:10px; height:10px; background:#1f9d55; }
.tht-hist { margin-top:14px; border-top:1px solid var(--line); }
.tht-hist summary { min-height:44px; display:flex; align-items:center; font-size:14px; font-weight:600; cursor:pointer; }
.tht-hist-list { list-style:none; margin:0; padding:0; font-size:14px; }
.tht-hist-list li { padding:8px 0; border-top:1px solid var(--line); overflow-wrap:anywhere; }
.tht-hist-who { font-size:12px; color:var(--muted); }

/* ── The Time view (timesheet, T-4a): my week, by day ── */
body.tht-timeview #fab { display:none; }   /* no floating "+ New task" over the timesheet */
@media (min-width:768px) { .tht-view { max-width:780px; } body.panel-open .tht-view { margin-right:436px; } }
.tht-wk { display:flex; align-items:center; gap:8px; }
.tht-wk-label { flex:1; min-width:0; margin:0; text-align:center; font-size:17px; color:var(--ink); text-transform:none; letter-spacing:0; }
.tht-view button.tht-nav { flex:none; width:48px; height:48px; padding:0; font-size:26px; line-height:1; background:var(--card);
                           color:var(--ink); border:1px solid var(--line); }
.tht-view button.tht-nav:hover:not(:disabled) { background:var(--hover); }
.tht-wk-total { display:flex; align-items:center; gap:10px; margin:12px 0; }
.tht-wk-total p { flex:1; min-width:0; margin:0; font-size:14px; color:var(--muted); }
.tht-wk-num { font-size:28px; font-weight:700; color:var(--ink); font-variant-numeric:tabular-nums; }
.tht-view button.tht-wkbtn { flex:none; width:auto; min-height:44px; padding:0 12px; font-size:14px; background:var(--card); color:var(--ink); border:1px solid var(--line); }
/* Filters (T-4b): Project · Person · Download CSV */
.tht-filters { display:flex; flex-wrap:wrap; align-items:flex-end; gap:8px 10px; margin:0 0 14px; }
.tht-flabel { flex:1 1 140px; min-width:0; margin:0; }
.tht-flabel select { display:block; width:100%; min-height:44px; margin-top:2px; padding:0 10px; font-size:15px; color:var(--ink);
                     background:var(--card); border:1px solid var(--line); border-radius:9px; }
.tht-view button.tht-csv { flex:none; width:auto; min-height:44px; padding:0 14px; font-size:14px; background:var(--card); color:var(--ink); border:1px solid var(--line); }
.tht-view button.tht-csv:hover:not(:disabled), .tht-view button.tht-wkbtn:hover { background:var(--hover); }
/* Everyone (desktop only): people × days */
.tht-sr { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.tht-gridwrap { overflow-x:auto; margin-bottom:14px; background:var(--card); border:1px solid var(--line); border-radius:12px; }
.tht-grid { width:100%; border-collapse:collapse; font-size:14px; font-variant-numeric:tabular-nums; }
.tht-grid th, .tht-grid td { padding:4px 6px; text-align:right; border-top:1px solid var(--line); white-space:nowrap; }
.tht-grid thead th { border-top:0; padding:10px 6px; font-size:12px; color:var(--muted); font-weight:600; }
.tht-grid th:first-child { text-align:left; padding-left:12px; max-width:220px; overflow:hidden; text-overflow:ellipsis; }
.tht-grid td:last-child, .tht-grid th:last-child { padding-right:12px; }
.tht-grid tbody th { font-weight:400; }
.tht-grid tfoot th, .tht-grid tfoot td, .tht-gtot { font-weight:700; }
.tht-grid tfoot td, .tht-grid tfoot th { padding-top:10px; padding-bottom:10px; }
.tht-nil { color:var(--muted); padding:0 8px; }
.tht-view button.tht-gcell, .tht-view button.tht-gperson { width:auto; min-height:36px; padding:0 8px; font-size:14px; font-weight:400;
                                                           background:transparent; color:var(--ink); border-radius:8px; }
.tht-view button.tht-gperson { max-width:200px; overflow:hidden; text-overflow:ellipsis; padding-left:0; text-align:left; }
.tht-view button.tht-gcell:hover, .tht-view button.tht-gperson:hover { background:var(--hover); }
.tht-view button.tht-gcell.tht-sel { background:var(--ink); color:#fff; }
.tht-days { display:grid; grid-template-columns:repeat(7, 1fr); gap:4px; margin-bottom:14px; }
.tht-view button.tht-day { display:flex; flex-direction:column; align-items:center; gap:1px; min-height:60px; padding:6px 0; font-weight:400;
                           background:var(--card); color:var(--ink); border:1px solid var(--line); border-radius:10px; }
.tht-view button.tht-day[aria-current="date"] { border-color:var(--accent); box-shadow:inset 0 0 0 1px var(--accent); }
.tht-view button.tht-day.tht-none { color:var(--muted); }
.tht-dow { font-size:11px; color:var(--muted); }
.tht-dom { font-size:16px; font-weight:700; }
.tht-dt { font-size:11px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.tht-runcard { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; margin-bottom:14px; padding:12px; background:var(--card);
               border:1px solid var(--line); border-radius:12px; }
.tht-run-what { flex:1 1 60%; min-width:0; }
.tht-run-task { font-weight:600; overflow-wrap:anywhere; }
.tht-run-proj { font-size:13px; color:var(--muted); }
.tht-run-t { flex:none; font-size:24px; font-weight:700; font-variant-numeric:tabular-nums; }
.tht-view button.tht-runstop { flex:1 1 100%; min-height:52px; font-size:17px; background:#b3261e; color:#fff; }
.tht-daysec { margin-bottom:14px; background:var(--card); border:1px solid var(--line); border-radius:12px; padding:4px 12px 4px; scroll-margin-top:calc(64px + env(safe-area-inset-top)); }
.tht-dayhead { display:flex; align-items:baseline; justify-content:space-between; gap:10px; margin:0; padding:10px 0 8px; font-size:15px; }
.tht-dayhead span + span { font-variant-numeric:tabular-nums; }
.tht-view .tht-row-when { overflow-wrap:anywhere; }
.tht-view .tht-badge { margin-left:6px; }

/* ── Task panel: Details | Time ── */
.tht-tabs { display:flex; margin:-4px 0 14px; border:1px solid var(--line); border-radius:10px; overflow:hidden; }
.tht-tabs button { flex:1; width:auto; min-height:44px; padding:0 12px; font-size:15px; font-weight:600; border-radius:0;
                   background:var(--card); color:var(--muted); }
.tht-tabs button + button { border-left:1px solid var(--line); }
.tht-tabs button[aria-selected="true"] { background:var(--ink); color:#fff; }
.tht-tabs button:focus-visible { outline-offset:-3px; }
.tht-tabs button[aria-selected="true"]:focus-visible { outline-color:#fff; }
.tht-tabdot { display:inline-block; width:8px; height:8px; margin-left:6px; border-radius:50%; background:#1f9d55; vertical-align:middle; }
.tht-tabs button[aria-selected="true"] .tht-tabdot, .tt-tabs button[aria-selected="true"] .tht-tabdot { background:#4ade80; }

.tht-pane { padding-bottom:calc(24px + env(safe-area-inset-bottom)); }
.tht-pane button.tht-go { min-height:56px; font-size:18px; }
/* BRIEF-1289 G3: the big clock button greyed — a filled button needs a neutral fill too, not only THGate's muted label */
.tht-pane button.tht-go.gt-off { background: var(--bg); border: 1px solid var(--line); box-shadow: none; }
.tht-gtrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.tht-elapsed { margin:12px 0 0; font-size:36px; line-height:1.1; font-weight:700; font-variant-numeric:tabular-nums; text-align:center; }
.tht-note { margin:8px 0 0; font-size:13px; color:var(--muted); }
.tht-totals { display:flex; align-items:center; gap:10px; margin:18px 0 6px; padding-top:10px; border-top:1px solid var(--line); }
.tht-totals p { flex:1; min-width:0; margin:0; font-size:14px; font-weight:600; }
.tht-totals span + span::before { content:' · '; color:var(--muted); font-weight:400; }
.tht-pane button.tht-add { flex:none; width:auto; min-height:44px; padding:0 14px; font-size:14px; background:transparent;
                           color:var(--ink); border:1px solid var(--line); }
.tht-pane button.tht-add:hover { background:var(--hover); }
.tht-list { list-style:none; margin:0; padding:0; }
.tht-row { border-top:1px solid var(--line); }
.tht-sheet .tht-row { padding:10px 0; }
/* A row is a button (opens the entry): the page's base button look is reset. */
.tht-pane button.tht-rowbtn, .tht-view button.tht-rowbtn { display:block; width:100%; min-height:44px; padding:10px 4px; text-align:left; font-weight:400;
                              background:transparent; color:var(--ink); border-radius:8px; }
.tht-pane button.tht-rowbtn:hover, .tht-view button.tht-rowbtn:hover { background:var(--hover); }
.tht-row-top { display:flex; align-items:baseline; gap:10px; font-size:15px; }
.tht-row-when { flex:1; min-width:0; }
.tht-row-dur { flex:none; font-weight:700; font-variant-numeric:tabular-nums; }
.tht-row-sub { display:block; margin-top:2px; font-size:13px; color:var(--muted); overflow-wrap:anywhere; }
.tht-badge { display:inline-block; margin-left:6px; padding:1px 7px; font-size:12px; font-weight:600; border-radius:999px;
             background:#e8f5ee; color:#17703d; vertical-align:1px; }
.tht-badge.tht-auto { background:#fdf1dc; color:#8a5300; }
.tht-badge.tht-plain { background:#eef1f4; color:#4a5461; }
.tht-empty { margin:12px 0 0; font-size:14px; color:var(--muted); }
.tht-pane button.tht-retry, .tht-view button.tht-retry { width:auto; min-height:44px; margin-top:8px; padding:0 14px; font-size:14px;
                             background:transparent; color:var(--ink); border:1px solid var(--line); }

/* The Length box (BRIEF-897) — under Finish; typed lengths move the finish */
.tht-sheet .tht-lenbox { display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; }
.tht-sheet .tht-len { width:8.5em; min-height:44px; font-weight:600; }
.tht-sheet .tht-len.tht-bad { border-color:#b3261e; box-shadow:0 0 0 1px #b3261e; }
.tht-sheet .tht-lenerr { color:#b3261e; font-size:14px; }

/* A plan without a task (BRIEF-913): Task | Describe it (the recent words float: public/shared/suggest.css) */
.tht-sheet .tht-subjs { margin:4px 0 10px; }
.tht-sheet .tht-keepnote { margin:0 0 8px; }

/* Days left out of a range plan (holidays, BRIEF-931g): toggles — unticked = left out */
.tht-sheet .tht-skips { display:flex; flex-direction:column; gap:6px; margin-top:8px; }
.tht-sheet .tht-skips .tht-note { margin:0; }
.tht-sheet button.tht-skip { width:auto; min-height:44px; padding:8px 12px; text-align:left; font-weight:400; background:transparent; color:inherit; border:1px dashed var(--line, #bbb); border-radius:8px; }
.tht-sheet button.tht-skip[aria-pressed="true"] { border-style:solid; background:rgba(158,140,91,.16); font-weight:600; }
.tht-sheet button.tht-skip[aria-pressed="false"] { opacity:.75; text-decoration:line-through; }

/* BILLING's Charges section inside the Time tab (MX-3c, BRIEF-1021) — under the actual time */
.tht-timewrap > .tht-slot[data-slot="charges"] { margin-top:18px; padding-top:14px; border-top:1px solid var(--line); }

/* DOCKETS (DK-2, BRIEF-1052, job-intake §37): tick boxes, the docket bar, the Send / Resend sheet, the "emailed" marks */
body.tht-dkticking .nb-plusw { display:none !important; }   /* while time is ticked, the "+" would cover Send docket */
.tht-row.tht-tickable { display:flex; flex-wrap:wrap; align-items:flex-start; gap:0 4px; }
.tht-row.tht-tickable > .tht-rowbtn { flex:1; min-width:0; }
.tht-row.tht-tickable > :not(.tht-tick):not(.tht-rowbtn) { flex-basis:100%; }   /* the overlap line goes under */
.tht-tick { flex:none; display:flex; align-items:center; justify-content:center; width:44px; min-height:44px; margin:0; cursor:pointer; }
.tht-tick input { width:22px; height:22px; margin:0; accent-color:#9E8C5B; cursor:pointer; }
.tht-badge.tht-dkmark { background:#e6f3ea; color:#1e5b31; }
.tht-badge.tht-dkchanged { background:#fdf1dc; color:#8a5300; }
.tht-dkbar { position:sticky; bottom:0; z-index:5; display:flex; flex-wrap:wrap; align-items:center; gap:8px 10px; margin:12px -4px 0; padding:10px 12px calc(10px + env(safe-area-inset-bottom));
  background:var(--card); border:1px solid var(--line); border-radius:12px 12px 0 0; box-shadow:0 -4px 14px rgba(0,0,0,.10); }
.tht-dkbar .tht-dkcount { flex:1; margin:0; font-weight:600; font-variant-numeric:tabular-nums; }
.tht-dkbar .tht-dkwhy { flex-basis:100%; order:3; margin:0; }
.tht-view .tht-dkbar button { flex:none; width:auto; min-height:44px; margin:0; padding:0 16px; }
.tht-view .tht-dkbar button.tht-ghost { background:transparent; color:var(--ink); border:1px solid var(--line); }
.tht-view .tht-dkbar button[disabled] { opacity:.5; cursor:not-allowed; }
.tht-sheet .tht-dkto { margin:12px 0 0; padding:0; border:0; }
.tht-sheet .tht-dkto legend { padding:0; font-weight:600; }
.tht-sheet .tht-dkclient { margin:10px 0 2px; font-size:13px; color:var(--muted); }
.tht-sheet .tht-dkpick { display:flex; align-items:center; gap:10px; min-height:44px; cursor:pointer; }
.tht-sheet .tht-dkpick input { width:20px; height:20px; margin:0; accent-color:#9E8C5B; }
.tht-sheet .tht-dkprev { margin-top:12px; }
.tht-sheet .tht-dkprev summary { min-height:44px; display:flex; align-items:center; cursor:pointer; font-weight:600; }
.tht-sheet .tht-dktext { margin:4px 0 0; padding:10px; max-height:45vh; overflow:auto; white-space:pre-wrap; overflow-wrap:anywhere; font:13px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace;
  background:rgba(0,0,0,.04); border:1px solid var(--line); border-radius:8px; }
.tht-sheet .tht-actions button.tht-dkgo { flex:1; }
.tht-sheet .tht-actions button.tht-ghost { margin-top:0; flex:none; width:auto; padding:0 16px; }
.tht-note.tht-warn { color:#8a5300; }
.tht-dkline { display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; margin-top:12px; padding:8px 10px; border-radius:8px; background:#e6f3ea; color:#1e5b31; }
.tht-dkline p { flex:1; min-width:12em; margin:0; }
.tht-dkline.tht-dkline-changed { background:#fdf1dc; color:#8a5300; }
.tht-sheet .tht-dkline button.tht-dkresend { flex:none; width:auto; margin:0; min-height:44px; padding:0 14px; color:inherit; }

/* THE DIARY (BRIEF-1234): Show: Time · Stock used · Take 5s, and the rows other lanes feed in (one look; the feed only names its badge) */
.tht-view .tht-dshow { margin-bottom:12px; }
.tht-view .tht-dshow button.tht-kind[aria-pressed="false"] { color:var(--muted); background:var(--card); text-decoration:line-through; text-decoration-thickness:1px; }
.tht-view .tht-dshow button.tht-kind[aria-pressed="true"] { color:var(--ink); background:rgba(158,140,91,.16); }
.tht-wk-hid { color:var(--muted); font-weight:600; }
.tht-xrow .tht-xbtn { display:block; width:100%; min-height:44px; padding:8px 0; text-align:left; background:none; border:0; border-radius:0; color:inherit; font:inherit; cursor:pointer; box-shadow:none; }
.tht-xrow .tht-xbtn[disabled] { cursor:default; }
.tht-xrow .tht-row-dur.tht-xat { font-weight:500; color:var(--muted); }
.tht-badge.tht-xbadge { margin-left:0; margin-right:4px; background:#eef1f4; color:#4a5461; }
.tht-xrow.tht-xrow-stop { border-left:4px solid #b3261e; padding-left:8px; background:#fdecea; }
.tht-xrow.tht-xrow-warn { border-left:4px solid #b26a00; padding-left:8px; background:#fff8ec; }
.tht-badge.tht-xalert.tht-xstop { background:#b3261e; color:#fff; }
.tht-badge.tht-xalert.tht-xwarn { background:#fdf1dc; color:#8a5300; }
.tht-xhint button.tht-link { display:inline-flex; align-items:center; width:auto; min-height:44px; padding:0 2px; margin:0; background:none; border:0; color:#1f5fbf; text-decoration:underline; font:inherit; cursor:pointer; }
.tht-view .tht-xhead { margin:18px 0 4px; font-size:15px; }

/* BRIEF-1244: the task's Time section — today in full, older entries under "Earlier (n)" */
.tht-pane .tht-earlier { margin-top:10px; border-top:1px solid var(--line); }
.tht-pane .tht-earlier > summary { display:flex; align-items:center; min-height:44px; cursor:pointer; font-weight:600; color:var(--muted); list-style:none; }
.tht-pane .tht-earlier > summary::-webkit-details-marker { display:none; }
.tht-pane .tht-earlier > summary::after { content:'▸'; margin-left:6px; transition:transform .15s; }
.tht-pane .tht-earlier[open] > summary::after { transform:rotate(90deg); }
.tht-pane .tht-notoday { margin:8px 0 0; }
@media (prefers-reduced-motion: reduce) { .tht-pane .tht-earlier > summary::after { transition:none; } }

/* BRIEF-1254: a ticked stock row sits like a ticked time row (box left, row beside it); the docket bar's count gets its own line on phones */
.tht-row.tht-tickable > .tht-xbtn:not(.tht-tick):not(.tht-rowbtn) { flex:1 1 0; flex-basis:0; width:auto; min-width:0; }   /* beats the "> :not(.tht-tick):not(.tht-rowbtn)" full-width rule (same weight, later) */
@media (max-width: 520px) { .tht-dkbar .tht-dkcount { flex-basis:100%; } .tht-view .tht-dkbar button.tht-dksend { flex:1; } }
body.nb-on .tht-dkbar { bottom:calc(64px + env(safe-area-inset-bottom)); }   /* the phone bar (NAV2, 64 px) never covers Clear / Send docket */

/* ── The Diary, look A "Soft cards" (ROUND 48, Gary d-cal1 = A). Tokens + pieces (.th-soft-*) are CALENDAR's shared module
   /shared/soft/v1/soft.css (time.js links it on first use) — only the Diary's own layout lives here. Scoped to .tht-view.tht-soft. ── */
@media (min-width:768px) { .tht-view.tht-soft { max-width:none; padding-left:24px; padding-right:24px; } }   /* CALENDAR S7 (cross-lane, SHERIFF-assigned; Gary 2026-10-18 "the WHOLE screen"): the Diary fills the width beside the Jobs panel, like the Calendar — was a 1180 px cap */
.tht-soft .tht-wk { gap:10px; }
.tht-soft .tht-wk-label { font-size:20px; font-weight:800; }
.tht-view.tht-soft button.tht-nav { border:0; border-radius:14px; background:var(--th-soft-card, var(--card)); box-shadow:var(--th-soft-shadow-sm); }
.tht-view.tht-soft button.tht-wkbtn, .tht-view.tht-soft button.tht-csv { border-radius:999px; }
.tht-soft .tht-chips { display:flex; gap:8px; overflow-x:auto; margin:0 0 12px; padding:2px 2px 4px; scrollbar-width:none; }
.tht-soft .tht-chips::-webkit-scrollbar { display:none; }
.tht-view.tht-soft .tht-chips button.th-soft-chip { flex:none; width:auto; margin:0; }
.tht-soft .tht-fmore { margin:0 0 12px; }
.tht-soft .tht-fmore > summary { display:flex; align-items:center; min-height:44px; font-size:14px; font-weight:600; color:var(--accent); cursor:pointer; }
.tht-soft .tht-fmore[open] > summary { margin-bottom:6px; }
.tht-soft .tht-runcard { border:0; border-radius:var(--th-soft-radius, 16px); box-shadow:var(--th-soft-shadow); }
/* desktop: the list + the week card beside it */
.tht-soft .tht-body.tht-withcard { display:grid; grid-template-columns:minmax(0, 1fr) 300px; gap:24px; align-items:start; }
.tht-soft .tht-main { min-width:0; }
/* day sections: no box — the heading, then the cards */
.tht-soft .tht-daysec { margin:0 0 4px; padding:0; background:none; border:0; border-radius:0; }
.tht-soft .tht-dayhead.th-soft-dayhead { padding:0; font-size:14.5px; }
.tht-soft .tht-dayhead.th-soft-dayhead:focus { outline:none; }
.tht-soft .tht-dayhead.th-soft-dayhead:focus-visible { outline:2px solid var(--accent); outline-offset:3px; border-radius:6px; }
.tht-soft .tht-list { display:flex; flex-direction:column; gap:var(--th-soft-gap, 8px); padding:2px 0 6px; }
/* a card row: [docket tick] [the row button: mark · title / pill · times · key · duration · initials] [Stop] (+ the overlap line under) */
.tht-soft .tht-row.tht-card { display:flex; flex-wrap:wrap; align-items:center; border-top:0; padding:0; }
.tht-soft .tht-row.tht-card > :not(.tht-tick):not(.tht-rowbtn):not(.tht-xbtn):not(.tht-rowstop):not(.tht-pinopen):not(.tht-unpin) { flex-basis:100%; }
.tht-view.tht-soft .tht-row.tht-card > button.tht-rowbtn, .tht-soft .tht-row.tht-card > .tht-xbtn { flex:1 1 0; width:auto; min-width:0; display:flex; align-items:center; gap:12px;
  min-height:64px; padding:12px 14px; background:none; border-radius:var(--th-soft-radius, 16px); }
.tht-view.tht-soft .tht-row.tht-card > button.tht-rowbtn:hover, .tht-soft .tht-row.tht-card > .tht-xbtn:hover:not([disabled]) { background:color-mix(in srgb, var(--hover, #f1f3f5) 70%, transparent); }
.tht-soft .tht-row.tht-card > .tht-tick + button { padding-left:2px; }
.tht-soft .tht-mark { width:22px; height:22px; }
.tht-soft .tht-nomark { flex:none; display:inline-block; }
.tht-soft .tht-cmain { flex:1; min-width:0; display:flex; flex-direction:column; gap:4px; }
.tht-soft .tht-card .tht-row-top { font-size:16px; font-weight:700; color:var(--ink); }
.tht-soft .tht-card .tht-row-sub { display:flex; flex-wrap:wrap; align-items:center; gap:4px 8px; margin:0; font-size:13.5px; }
.tht-soft .tht-csub { min-width:0; overflow-wrap:anywhere; }
.tht-soft .tht-ckey { display:none; }
@media (min-width:768px) { .tht-soft .tht-ckey { display:inline; } }
.tht-soft .tht-card .tht-row-dur { flex:none; font-size:17px; font-weight:800; color:var(--ink); }
.tht-soft .tht-card.tht-running .tht-row-dur { color:var(--th-soft-done, #16a34a); }
.tht-soft .tht-card .tht-ini { width:36px; height:36px; font-size:12.5px; }
.tht-soft .tht-rbmark { display:inline-grid; place-items:center; width:26px; height:20px; border-radius:6px; background:#fdecea; color:#b3261e; }
.tht-view.tht-soft button.tht-rowstop { flex:none; width:auto; min-height:44px; margin:0 12px 0 0; padding:0 18px; font-size:15px; border-radius:999px; }
.tht-soft .tht-row.tht-card.tht-conflict { padding-left:0; border-left:4px solid #b26a00; background:#fff8ec; }
.tht-soft .tht-xrow.tht-card.tht-xrow-stop { padding-left:0; background:#fdecea; }
.tht-soft .tht-xrow.tht-card.tht-xrow-warn { padding-left:0; background:#fff8ec; }
.tht-soft .tht-xrow .tht-xbadge { margin-left:0; }
.tht-soft .tht-xrow .tht-row-dur.tht-xat { font-size:14px; font-weight:600; color:var(--muted); }
/* the week card (desktop): a bar per day; tap = that day */
.tht-weekcard { position:sticky; top:calc(72px + env(safe-area-inset-top)); padding:16px; }
.tht-wch { margin:0 0 8px; font-size:12px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; color:var(--th-soft-muted, var(--muted)); }
.tht-view button.tht-wcday { display:grid; grid-template-columns:64px 1fr auto; align-items:center; gap:10px; width:100%; min-height:40px; padding:4px 6px;
  font-size:15px; font-weight:700; text-align:left; background:none; color:var(--ink); border:0; border-radius:10px; box-shadow:none; }
.tht-view button.tht-wcday:hover { background:var(--hover); }
.tht-view button.tht-wcday[aria-current="date"] { border:0; box-shadow:none; color:var(--th-soft-today, var(--accent)); }
.tht-view button.tht-wcday.tht-none { color:var(--muted); font-weight:600; }
.tht-wcbar { display:block; height:10px; border-radius:999px; background:var(--th-soft-hairline, #eef1f4); overflow:hidden; }
.tht-wcbar > span { display:block; height:100%; border-radius:inherit; background:var(--th-soft-today, var(--accent)); }
.tht-wct { min-width:52px; text-align:right; white-space:nowrap; font-variant-numeric:tabular-nums; }
.tht-soft .tht-card .tht-row-when { overflow-wrap:break-word; }   /* words wrap whole, never letter by letter */
/* a phone: smaller initials + tighter row; the running row's Stop goes full width under its card */
@media (max-width:767px) {
  .tht-view.tht-soft .tht-row.tht-card > button.tht-rowbtn, .tht-soft .tht-row.tht-card > .tht-xbtn { gap:10px; padding:12px 10px; }
  .tht-soft .tht-card .tht-ini { width:28px; height:28px; font-size:11px; }
  .tht-soft.tht-whome .tht-card .tht-ini { display:none; }
  .tht-soft .tht-card > .tht-tick { width:36px; margin-left:4px; }
  .tht-soft .tht-card .tht-row-dur { font-size:15px; }
  .tht-view.tht-soft button.tht-rowstop { flex:1 1 100%; margin:0 12px 12px; }
}
/* D2 — pinned tasks (ROUND 48, Gary d-cal3 = 2): the "Pinned" block on top of the Diary; the edge is the shared --th-soft-pin */
.tht-soft .tht-pinsec { margin:0 0 6px; }
.tht-pinhead { display:flex; align-items:center; gap:6px; margin:4px 2px 6px; font-size:12px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; color:var(--th-soft-muted, var(--muted)); }
.tht-soft .tht-row.tht-pincard { border-left:4px solid var(--th-soft-pin, #d97706); }
.tht-soft .tht-row.tht-card > .tht-pinopen { flex:1 1 0; width:auto; min-width:0; display:flex; align-items:center; gap:12px; min-height:64px; padding:12px 14px; text-align:left;
  font-weight:400; background:none; color:inherit; border-radius:var(--th-soft-radius, 16px); }
.tht-soft .tht-row.tht-card > .tht-pinopen:hover { background:color-mix(in srgb, var(--hover, #f1f3f5) 70%, transparent); }
.tht-view.tht-soft .tht-row.tht-card > button.tht-unpin { flex:none; width:44px; height:44px; min-height:44px; margin:0 8px 0 0; padding:0; display:inline-grid; place-items:center;
  background:none; color:var(--th-soft-pin, #d97706); border-radius:12px; }
.tht-view.tht-soft .tht-row.tht-card > button.tht-unpin:hover { background:var(--hover); }
/* the pin toggle (an entry's sheet, a task's Time tab) */
.tht-pinrow { display:flex; flex-wrap:wrap; align-items:center; gap:4px 10px; margin:8px 0 0; }
button.tht-pintoggle { display:inline-flex; align-items:center; gap:6px; width:auto; min-height:44px; margin:0; padding:0 14px; font-size:14px; font-weight:600;
  background:var(--card); color:var(--ink); border:1px solid var(--line); border-radius:999px; }
button.tht-pintoggle[aria-pressed="true"] { color:var(--th-soft-pin, #b45309); border-color:var(--th-soft-pin, #d97706); background:color-mix(in srgb, var(--th-soft-pin, #d97706) 10%, var(--card)); }
.tht-pinmsg { font-size:13px; color:var(--muted); }
.tht-pinmsg.tht-err { color:#b3261e; }
/* the "Work group ▾" chip — a select wearing the shared chip (pressed look: .th-soft-chip.is-on, CALENDAR's) */
.tht-chipsel { flex:none; display:inline-flex; margin:0; }
.tht-soft .tht-chips select.th-soft-chip { width:auto; min-height:0; margin:0; padding:0 30px 0 14px; appearance:none; -webkit-appearance:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23667085' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 12px center; }
