/* GTM Command. A working tool: calm, dense, legible. One accent color. */

:root {
  color-scheme: light dark;

  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #eef0f3;
  --line: #dde1e6;
  --line-strong: #c2c9d2;
  --text: #1a2028;
  --text-2: #4a5563;
  --text-3: #646f7d;

  --accent: #1d5fc2;
  --accent-ink: #ffffff;
  --accent-text: #1a55ad;
  --accent-soft: #e8f0fb;
  --accent-line: #b9cdec;

  --ok: #17734a;
  --ok-soft: #e2f3e9;
  --bad: #b3312a;
  --bad-soft: #fbe8e6;
  --bad-solid: #c0382f;
  --warn: #7d5200;
  --warn-soft: #fbf0d6;
  --skip: #55606d;
  --skip-soft: #e8ebef;
  --veil: rgba(20, 26, 34, 0.32);

  --radius: 6px;
  --rail-w: 208px;
  --topbar-h: 48px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

/* Dark colors. They apply when the device asks for dark and the person has not chosen light, or when the person
   chose dark (Settings, Profile, Appearance). The choice is the data-theme attribute on <html>. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #13161a;
    --surface: #1a1e23;
    --surface-2: #242a31;
    --line: #2d343d;
    --line-strong: #414b57;
    --text: #e7eaee;
    --text-2: #b1bac5;
    --text-3: #909ba8;

    --accent: #82b1ff;
    --accent-ink: #0c1422;
    --accent-text: #93bcff;
    --accent-soft: #1b2942;
    --accent-line: #34496e;

    --ok: #6fd69a;
    --ok-soft: #16301f;
    --bad: #ff9c92;
    --bad-soft: #3a1d1a;
    --bad-solid: #d9483e;
    --warn: #f0c466;
    --warn-soft: #372b10;
    --skip: #b1bac5;
    --skip-soft: #2a3038;
    --veil: rgba(0, 0, 0, 0.55);
  }
}
:root[data-theme="dark"] {
  --bg: #13161a;
  --surface: #1a1e23;
  --surface-2: #242a31;
  --line: #2d343d;
  --line-strong: #414b57;
  --text: #e7eaee;
  --text-2: #b1bac5;
  --text-3: #909ba8;

  --accent: #82b1ff;
  --accent-ink: #0c1422;
  --accent-text: #93bcff;
  --accent-soft: #1b2942;
  --accent-line: #34496e;

  --ok: #6fd69a;
  --ok-soft: #16301f;
  --bad: #ff9c92;
  --bad-soft: #3a1d1a;
  --bad-solid: #d9483e;
  --warn: #f0c466;
  --warn-soft: #372b10;
  --skip: #b1bac5;
  --skip-soft: #2a3038;
  --veil: rgba(0, 0, 0, 0.55);
  }
/* Parchment and Denim: the palette of the original GTM Command artifact. A version turns it on with
   APP.palette = 'parchment' in my-app.js. Light only, as it was there: dark mode keeps the app's dark colors. */
@media (prefers-color-scheme: light) {
  :root[data-palette="parchment"]:not([data-theme="dark"]) {
    --bg: #F7F0E2;
    --surface: #FFFCF5;
    --surface-2: #F0E6D5;
    --line: #E7DDCA;
    --line-strong: #D2C3AA;
    --text: #3E342B;
    --text-2: #5F5242;
    --text-3: #766752;

    --accent: #426281;
    --accent-ink: #FFFFFF;
    --accent-text: #3A5773;
    --accent-soft: #E5EBEE;
    --accent-line: #B7C5CF;

    --ok: #456643;
    --ok-soft: #EAF1E7;
    --bad: #A43F43;
    --bad-soft: #FAE6E5;
    --bad-solid: #A43F43;
    --warn: #865C17;
    --warn-soft: #F8EDCF;
    --skip: #766752;
    --skip-soft: #F0E6D5;
    --veil: rgba(62, 52, 43, 0.32);
  }
}
:root[data-palette="parchment"][data-theme="light"] {
  --bg: #F7F0E2;
  --surface: #FFFCF5;
  --surface-2: #F0E6D5;
  --line: #E7DDCA;
  --line-strong: #D2C3AA;
  --text: #3E342B;
  --text-2: #5F5242;
  --text-3: #766752;

  --accent: #426281;
  --accent-ink: #FFFFFF;
  --accent-text: #3A5773;
  --accent-soft: #E5EBEE;
  --accent-line: #B7C5CF;

  --ok: #456643;
  --ok-soft: #EAF1E7;
  --bad: #A43F43;
  --bad-soft: #FAE6E5;
  --bad-solid: #A43F43;
  --warn: #865C17;
  --warn-soft: #F8EDCF;
  --skip: #766752;
  --skip-soft: #F0E6D5;
  --veil: rgba(62, 52, 43, 0.32);
}
:root[data-palette="parchment"]:not([data-theme="dark"]) .rail-brand, :root[data-palette="parchment"]:not([data-theme="dark"]) .brand { color: var(--accent); }

:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 var(--font);
  overflow-wrap: break-word;
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
h1 { font-size: 20px; line-height: 1.25; font-weight: 650; }
h2 { font-size: 15px; line-height: 1.3; font-weight: 650; }
h3 { font-size: 12px; line-height: 1.3; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-2); }

a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--mono); font-size: 0.92em; }
time { white-space: nowrap; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
main:focus, h1:focus, h2:focus { outline: none; }

.muted { color: var(--text-3); }
.meta { color: var(--text-3); font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.wrap-any { overflow-wrap: anywhere; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.is-bad { color: var(--bad); font-weight: 650; }
.icon { flex: none; }

.skip-link { position: absolute; left: 8px; top: -48px; z-index: 100; padding: 8px 12px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); }
.skip-link:focus { top: 8px; }
.boot { padding: 32px; color: var(--text-2); }

/* ---------------------------------------------------------------- buttons and fields */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 32px; padding: 5px 12px;
  font: inherit; font-size: 13px; font-weight: 550; line-height: 1.2; text-align: center;
  color: var(--text); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent); filter: brightness(1.08); }
.btn-danger { background: var(--bad-solid); border-color: var(--bad-solid); color: #fff; }
.btn-danger:hover { background: var(--bad-solid); filter: brightness(1.08); }
.btn-quiet { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-quiet:hover { background: var(--surface-2); }
.btn-danger-quiet { color: var(--bad); }
.btn-small { min-height: 28px; padding: 3px 9px; font-size: 12.5px; }
.btn-wide { width: 100%; white-space: normal; min-height: 40px; font-size: 14px; }
.btn-icon { padding: 5px; min-width: 32px; }

input[type="text"], input[type="email"], input[type="search"], input[type="date"], input[type="password"], select, textarea {
  width: 100%; min-height: 32px; padding: 5px 9px;
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--radius);
}
textarea { resize: vertical; line-height: 1.45; }
select { padding-right: 24px; }
::placeholder { color: var(--text-3); opacity: 1; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 0; border-color: var(--accent); }

.field { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.field-label, legend { font-size: 12px; font-weight: 600; color: var(--text-2); }
.field-hint { font-size: 12px; color: var(--text-3); }
.form-row { display: flex; flex-wrap: wrap; gap: 10px 12px; }
.form-row > .field { flex: 1 1 160px; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
form { display: flex; flex-direction: column; gap: 10px; }

.check { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; cursor: pointer; }
.check input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }

.segs legend { margin-bottom: 3px; }
.segs-row { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.seg { position: relative; cursor: pointer; }
.seg + .seg { border-left: 1px solid var(--line-strong); }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: block; padding: 6px 12px; font-size: 13px; font-weight: 550; color: var(--text-2); line-height: 18px; }
.seg input:checked + span { background: var(--accent-soft); color: var(--accent-text); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -2px; }

.toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 16px; margin: 0 0 12px; }
.toolbar .field { flex: 0 1 300px; }
.result-count { margin-left: auto; align-self: center; }

.confirm { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
.confirm-q { font-size: 12.5px; font-weight: 600; color: var(--text); }

/* ---------------------------------------------------------------- tags, notices, cards */

.tag {
  display: inline-block; vertical-align: baseline;
  padding: 0 7px; border-radius: 9px;
  font-size: 11.5px; font-weight: 600; line-height: 18px; white-space: nowrap;
  background: var(--skip-soft); color: var(--text-2);
}
.tag-ok { background: var(--ok-soft); color: var(--ok); }
.tag-bad { background: var(--bad-soft); color: var(--bad); }
.tag-warn { background: var(--warn-soft); color: var(--warn); }
.tag-skip { background: var(--skip-soft); color: var(--skip); }
.tag-accent { background: var(--accent-soft); color: var(--accent-text); }
.tag-outline { background: transparent; color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line-strong); }

.scope {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 1px 8px 1px 6px; border-radius: 10px;
  font-size: 12px; font-weight: 600; line-height: 18px; white-space: nowrap;
  color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line-strong);
}
.scope-private { color: var(--accent-text); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-line); }

.notice-slot:empty { display: none; }
.notice {
  padding: 7px 10px; border-radius: var(--radius);
  font-size: 13px; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text);
}
.notice-error { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); }
.notice-ok { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.notice a { color: inherit; text-decoration: underline; }
.notice .btn { margin-left: 4px; }

.empty { padding: 14px 0; color: var(--text-3); max-width: 70ch; }
.loading { padding: 14px 0; color: var(--text-3); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.card + .card, .card-alerts { margin-top: 12px; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 8px; }
.card-head h2 { display: inline-flex; align-items: center; gap: 6px; }
.card-head > a, .card-tools { margin-left: auto; }
.card-tools .field { flex-direction: row; align-items: center; gap: 8px; }
.card-tools select { width: auto; min-width: 150px; }
.card h3 { margin: 14px 0 5px; }
.card .notice-slot { margin: 8px 0; }

/* ---------------------------------------------------------------- sign-in */

.signin { max-width: 380px; margin: 12vh auto 0; padding: 24px 20px; display: flex; flex-direction: column; gap: 14px; }
.signin h1 { font-size: 24px; }
.signin-sub { color: var(--text-2); }
.signin-local { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.signin-local h2 { font-size: 14px; }

/* ---------------------------------------------------------------- shell */

.shell { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); min-height: 100vh; }

.rail {
  padding: 0 10px 12px; background: var(--surface); border-right: 1px solid var(--line);
}
.rail .rail-top { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 4px; background: var(--surface); }
.rail .rail-top .brand { flex: 1; min-width: 0; }
.rail .nav { position: sticky; top: calc(var(--topbar-h) + 6px); }
.brand { display: flex; align-items: center; height: var(--topbar-h); padding: 0 10px; font-size: 15px; font-weight: 700; color: var(--text); letter-spacing: 0.01em; }
.brand:hover { text-decoration: none; }
.brand-top { display: none; padding: 0; }
.hamburger { display: none; align-items: center; justify-content: center; width: 40px; height: 40px; margin-left: -8px;
  border: 0; border-radius: var(--radius); background: none; color: var(--text); cursor: pointer; }
.hamburger:hover { background: var(--surface-2); }
.top-left { display: flex; align-items: center; gap: 4px; min-width: 0; }
.nav { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.nav-link {
  position: relative; display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border-radius: var(--radius);
  color: var(--text-2); font-weight: 550;
}
.nav-link:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav-link[aria-current="page"] { background: var(--accent-soft); color: var(--accent-text); }
.nav-icon { position: relative; display: inline-flex; }
.badge {
  margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 10px;
  background: var(--accent); color: var(--accent-ink);
  font-size: 11.5px; font-weight: 700; line-height: 20px; text-align: center; font-variant-numeric: tabular-nums;
}
.dot { position: absolute; top: -3px; right: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--bad-solid); border: 2px solid var(--surface); }

.col { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: flex-end; gap: 12px;
  height: var(--topbar-h); padding: 0 24px;
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.who { display: flex; align-items: center; gap: 6px; min-width: 0; }
.who-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shell-note {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 24px; font-size: 13px;
  background: var(--warn-soft); color: var(--warn); border-bottom: 1px solid var(--line);
}
.main { width: 100%; max-width: 1480px; padding: 18px 24px 56px; }

.page-head { margin-bottom: 14px; }
.page-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.page-sub { margin-top: 4px; color: var(--text-2); max-width: 90ch; }
.page-sub .icon { vertical-align: -2px; margin-right: 6px; }
.crumb { font-size: 12.5px; color: var(--text-3); margin-bottom: 4px; }

/* ---------------------------------------------------------------- tables */

.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.table-scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; }
.table th, .table td { padding: 9px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.table th.num, .table td.num { text-align: right; }
.table tbody tr:last-child > td { border-bottom: 0; }
.table thead th {
  position: sticky; top: var(--topbar-h); z-index: 5;
  padding-top: 7px; padding-bottom: 7px;
  background: var(--surface-2); color: var(--text-2);
  font-size: 12px; font-weight: 650; line-height: 1.3; vertical-align: bottom;
  border-bottom: 1px solid var(--line-strong);
}
.table thead th:first-child { border-top-left-radius: 5px; }
.table thead th:last-child { border-top-right-radius: 5px; }
.table tbody tr:hover > td { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.table .c-main { font-weight: 600; min-width: 190px; }
.table .c-main > a { display: inline-block; }
.table .c-status { color: var(--text-2); min-width: 220px; }
.table tr.is-open > td { background: var(--accent-soft); }
.table tr.is-off > td { color: var(--text-3); }
.cell-sub { display: block; font-size: 12.5px; font-weight: 400; color: var(--text-3); }
.cell-tags { margin-top: 4px; }
.table-compact th, .table-compact td { padding: 6px 10px; font-size: 13px; }
.table-scroll .table thead th { position: static; }

@media (max-width: 1180px) and (min-width: 761px) {
  .table-wrap { overflow-x: auto; }
  .table-wrap > .table thead th { position: static; }
}

/* ---------------------------------------------------------------- home */

.layers { display: grid; grid-template-columns: minmax(250px, 1fr) minmax(0, 3fr); gap: 12px; align-items: stretch; }
.layers-one { grid-template-columns: minmax(0, 1fr); }
.layers .card + .card { margin-top: 0; }
.layer-private { background: var(--accent-soft); border-color: var(--accent-line); }
.waiting { font-size: 17px; font-weight: 650; margin: 2px 0 6px; }
.waiting a { text-decoration: underline; text-underline-offset: 3px; }

.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 10px 0; }
.figure { display: flex; flex-direction: column-reverse; justify-content: flex-end; padding: 0 12px; border-left: 1px solid var(--line); min-width: 0; }
.figure dt { font-size: 12px; color: var(--text-3); line-height: 1.3; }
.figure dd { font-size: 20px; font-weight: 650; line-height: 1.25; font-variant-numeric: tabular-nums; }
.figures-plain { grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); }
.figures-plain + .meta { margin-top: 10px; }

.alerts { display: flex; flex-direction: column; }
.alert { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.alert:first-child { border-top: 0; padding-top: 2px; }
.alert-body { flex: 1 1 auto; min-width: 0; }
.alert-msg { overflow-wrap: anywhere; }
.card-alerts { border-color: var(--bad); margin-bottom: 12px; }

.feed-row { display: grid; grid-template-columns: 96px minmax(120px, 190px) 128px minmax(0, 1fr); gap: 2px 12px; padding: 9px 0; border-top: 1px solid var(--line); align-items: baseline; }
.feed-row:first-child { border-top: 0; }
.feed-when { color: var(--text-2); font-size: 13px; }
.feed-acct { font-weight: 600; }

/* ---------------------------------------------------------------- one account */

.facts, .kv { display: flex; flex-wrap: wrap; gap: 6px 28px; }
.facts { margin: -4px 0 14px; }
.facts > div, .kv > div { display: flex; gap: 6px; min-width: 0; }
.facts dt, .kv dt { color: var(--text-3); }
.facts dt::after, .kv dt::after { content: ":"; }
.facts dd { font-weight: 550; }

.account-grid { display: grid; grid-template-columns: minmax(0, 1fr) 410px; gap: 14px; align-items: start; }
.account-main { min-width: 0; }
.account-side { position: sticky; top: calc(var(--topbar-h) + 12px); max-height: calc(100vh - var(--topbar-h) - 24px); overflow-y: auto; padding: 0; }

.lead { font-size: 16px; line-height: 1.45; font-weight: 550; margin-bottom: 4px; }
.brief-list { list-style: disc; padding-left: 18px; }
.brief-list li { margin: 3px 0; }
.brief-list li::marker { color: var(--text-3); }
.brief-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); }
.brief-foot .btn { margin-left: auto; }
.brief .empty + .notice-slot + .brief-foot { border-top: 0; margin-top: 0; padding-top: 0; }
.brief .empty + .notice-slot + .brief-foot .btn { margin-left: 0; }

.refs { display: inline-flex; flex-wrap: wrap; gap: 4px; vertical-align: 1px; }
.ref {
  padding: 0 5px; font: 11px/17px var(--mono); color: var(--text-2);
  background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 4px; cursor: pointer;
}
.ref:hover { color: var(--accent-text); border-color: var(--accent); }
.ref-id { font: 11px var(--mono); }

.ledger { padding-bottom: 4px; }
.ledger-list { margin: 0 -16px; }
.lrow { display: grid; grid-template-columns: 92px 128px minmax(0, 1fr) auto; gap: 2px 12px; padding: 9px 16px; border-top: 1px solid var(--line); align-items: baseline; }
.l-date { color: var(--text-2); font-size: 13px; }
.l-kind { display: flex; flex-wrap: wrap; gap: 4px; }
.l-act { min-width: 0; }
.lrow.is-retracted .l-text, .lrow.is-retracted .l-date { color: var(--text-3); }
.lrow.is-retracted .l-text { font-style: italic; }
.lrow.is-retracted .l-kind .tag:first-child { opacity: 0.6; }
.lrow.is-target { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.lrow:focus { outline: none; }

.tabs { display: flex; overflow-x: auto; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 2; scrollbar-width: thin; }
.tab {
  flex: none; display: inline-flex; align-items: center; gap: 5px;
  padding: 10px 8px 8px; font: inherit; font-size: 12.5px; font-weight: 550;
  color: var(--text-2); background: none; border: 0; border-bottom: 2px solid transparent; cursor: pointer;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--accent-text); border-bottom-color: var(--accent); }
.tab:focus-visible { outline-offset: -2px; }
.tab-n { font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.tab-panel { padding: 4px 16px 12px; }
.tab-panel:focus-visible { outline-offset: -2px; }

.side-list > li { padding: 9px 0; border-top: 1px solid var(--line); }
.side-list > li:first-child { border-top: 0; }
.side-title { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-weight: 600; overflow-wrap: anywhere; }
.mini { display: grid; grid-template-columns: repeat(4, minmax(0, auto)); justify-content: start; gap: 2px 18px; margin: 4px 0 2px; }
.mini dt { font-size: 11.5px; color: var(--text-3); }
.mini dd { font-size: 13px; }
.ext .icon { margin-left: 3px; vertical-align: -1px; }
.identity-group h3 { margin-top: 12px; }
.identity-group li { padding: 2px 0; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- leads */

.ladder { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px 16px; margin-bottom: 12px; }
.ladder-open { flex: 3 1 560px; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.ladder-closed { flex: 2 1 320px; display: flex; flex-wrap: wrap; align-items: stretch; gap: 0; border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.ladder-cap { display: flex; align-items: center; padding: 0 10px; font-size: 12px; font-weight: 650; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.04em; }
.rung {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  padding: 8px 12px 7px; min-width: 0;
  font: inherit; text-align: left; color: var(--text);
  background: none; border: 0; border-bottom: 2px solid transparent; cursor: pointer;
}
.ladder-open .rung + .rung { border-left: 1px solid var(--line); }
.rung:hover { background: var(--surface-2); }
.rung[aria-pressed="true"] { background: var(--accent-soft); border-bottom-color: var(--accent); }
.rung:focus-visible { outline-offset: -2px; }
.rung-n { font-size: 19px; font-weight: 650; line-height: 1.2; font-variant-numeric: tabular-nums; }
.rung-label { font-size: 12px; color: var(--text-2); line-height: 1.25; }
.ladder-closed .rung { flex: 1 1 0; padding: 8px 9px 7px; }
.ladder-closed .rung-n { font-size: 15px; color: var(--text-2); }
.ladder-closed .rung-label { color: var(--text-3); }

.panel-veil { position: fixed; inset: 0; z-index: 39; background: var(--veil); }
.panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 40;
  width: min(500px, 100vw); overflow-y: auto;
  background: var(--surface); border-left: 1px solid var(--line-strong);
}
.panel-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px 10px 18px; background: var(--surface); border-bottom: 1px solid var(--line); }
.panel-head h2 { font-size: 17px; overflow-wrap: anywhere; }
.panel-body { padding: 14px 18px 28px; display: flex; flex-direction: column; gap: 18px; }
.panel-body h3 { margin-bottom: 6px; }
.kv { flex-direction: column; gap: 5px; }
.kv dt { flex: 0 0 132px; }
.kv dd { min-width: 0; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- my queue */

.view-me .page-sub { display: flex; align-items: flex-start; gap: 2px; padding: 8px 12px; background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: var(--radius); color: var(--text); }
.view-me .page-sub .icon { margin-top: 3px; color: var(--accent-text); }
.me-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(300px, 2fr); gap: 14px; align-items: start; }
.queue { margin: 8px -16px -14px; }
.qrow { padding: 12px 16px; border-top: 1px solid var(--line); }
.q-top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.q-top > a { font-weight: 650; }
.q-text { margin: 5px 0 9px; font-size: 14.5px; }
.q-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.conns > li { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.conns > li:first-child { border-top: 0; }
.conn-main { flex: 1 1 200px; min-width: 0; }
.conn-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.conn-error { color: var(--bad); font-size: 13px; overflow-wrap: anywhere; }
.danger { margin-top: 16px; padding-top: 2px; border-top: 1px solid var(--line); }
.danger .btn-danger-quiet { white-space: normal; padding-left: 0; padding-right: 0; text-align: left; text-decoration: underline; text-underline-offset: 3px; }
.danger .btn-danger-quiet:hover { background: none; }
.danger-form { margin-top: 8px; max-width: 340px; }

/* ---------------------------------------------------------------- routines */

.routines-side { display: grid; grid-template-columns: minmax(0, 3fr) minmax(220px, 1fr); gap: 12px; margin-top: 12px; align-items: start; }
.routines-side .card + .card { margin-top: 0; }
.onoff { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 24px; }
.onoff li { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.view-routines .page-head { margin-bottom: 4px; }
.view-routines .page-head + .meta { margin-bottom: 12px; }
.view-routines > .notice-slot { margin-bottom: 12px; }

.routines .c-main { min-width: 240px; font-weight: 400; }
.routines td code { white-space: nowrap; }
.routine-row { cursor: pointer; }
.row-toggle {
  display: inline-flex; align-items: flex-start; gap: 6px; padding: 0; margin: 0 0 2px -2px;
  font: inherit; font-weight: 650; color: var(--text); text-align: left;
  background: none; border: 0; cursor: pointer;
}
.row-toggle .icon { margin-top: 3px; color: var(--text-3); transition: transform 0.12s; }
.row-toggle[aria-expanded="true"] .icon { transform: rotate(90deg); }
.row-toggle:hover span { text-decoration: underline; }
.row-actions { display: flex; align-items: center; gap: 10px; }
.runs-row > td { padding: 10px 12px 14px; background: var(--bg); }
.table tbody tr.runs-row:hover > td { background: var(--bg); }
.runs-cap { font-size: 12px; font-weight: 650; color: var(--text-2); margin-bottom: 6px; }
.runs td { vertical-align: top; }
.run-error { color: var(--bad); overflow-wrap: anywhere; min-width: 160px; }
.pairs { font-size: 12.5px; }
.pair-k { color: var(--text-3); }

.switch { display: inline-flex; align-items: center; gap: 6px; padding: 3px 2px; font: inherit; font-size: 12.5px; color: var(--text-2); background: none; border: 0; cursor: pointer; }
.switch-knob { position: relative; flex: none; width: 30px; height: 18px; border-radius: 9px; background: var(--line-strong); transition: background 0.12s; }
.switch-knob::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); transition: left 0.12s; }
.switch[aria-checked="true"] .switch-knob { background: var(--accent); }
.switch[aria-checked="true"] .switch-knob::after { left: 14px; }
.switch-text { min-width: 20px; }

/* ---------------------------------------------------------------- knowledge */

.kb { display: grid; grid-template-columns: 310px minmax(0, 1fr); gap: 14px; align-items: start; }
.kb-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.kb-kinds ul { display: flex; flex-wrap: wrap; gap: 6px; }
.kb-kinds a { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 14px; font-size: 13px; font-weight: 550; color: var(--text-2); background: var(--surface); border: 1px solid var(--line-strong); }
.kb-kinds a:hover { text-decoration: none; color: var(--text); }
.kb-kinds a[aria-current="true"] { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-text); }
.kb-n { font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.kb-list .result-count { margin: 0 0 4px; }
.doc-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.doc-list li + li { border-top: 1px solid var(--line); }
.doc-link { display: flex; flex-direction: column; gap: 1px; padding: 8px 12px; color: var(--text); }
.doc-link:hover { background: var(--surface-2); text-decoration: none; }
.doc-link[aria-current="true"] { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.doc-title { font-weight: 600; }
.kb-reader { min-width: 0; padding: 18px 22px 24px; }
.kb-back { display: none; }
.doc-head { margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.doc-head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.doc-head h2 { font-size: 20px; line-height: 1.25; }
.doc-meta { margin-top: 5px; }
.doc-edit { font-family: var(--mono); font-size: 13px; min-height: 320px; }

.md { max-width: 78ch; font-size: 14.5px; line-height: 1.55; }
.md > * + * { margin-top: 10px; }
.md h2, .md h3, .md h4, .md h5, .md h6 { margin-top: 20px; color: var(--text); text-transform: none; letter-spacing: 0; line-height: 1.3; }
.md > :first-child { margin-top: 0; }
.md .md-h1 { font-size: 19px; }
.md .md-h2 { font-size: 16.5px; }
.md .md-h3 { font-size: 14.5px; }
.md .md-h4, .md .md-h5, .md .md-h6 { font-size: 13px; color: var(--text-2); }
.md ul { list-style: disc; padding-left: 22px; }
.md ol { list-style: decimal; padding-left: 24px; }
.md li { margin: 3px 0; }
.md li > ul, .md li > ol { margin-top: 3px; }
.md li > p { margin-top: 6px; }
.md a { text-decoration: underline; text-underline-offset: 2px; }
.md code { padding: 1px 4px; border-radius: 4px; background: var(--surface-2); }
.md-code { padding: 10px 12px; overflow-x: auto; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); font-size: 13px; line-height: 1.5; }
.md-code code { padding: 0; background: none; white-space: pre; }
.md blockquote { padding: 2px 0 2px 12px; border-left: 3px solid var(--line-strong); color: var(--text-2); }
.md blockquote > * + * { margin-top: 8px; }
.md hr { border: 0; border-top: 1px solid var(--line-strong); margin: 18px 0; }
.md-table { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.md-table table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.md-table th, .md-table td { padding: 6px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.md-table th { background: var(--surface-2); font-weight: 650; white-space: nowrap; }
.md-table tr:last-child td { border-bottom: 0; }
.md-table .md-right { text-align: right; }
.md-table .md-center { text-align: center; }

/* ---------------------------------------------------------------- people */

.view-people .card { margin-top: 14px; }
.view-people > .notice-slot { margin-bottom: 12px; }
.person-form { max-width: 860px; }

/* ---------------------------------------------------------------- narrower desktop */

@media (max-width: 1180px) {
  .account-grid { grid-template-columns: minmax(0, 1fr); }
  .account-main { display: contents; }
  .account-main > *, .account-side { margin-top: 0; }
  .brief { order: 1; }
  .account-side { order: 2; position: static; max-height: none; }
  .account-main > section:not(.brief):not(.ledger) { order: 3; }
  .ledger { order: 4; }
  .me-grid { grid-template-columns: minmax(0, 1fr); }
  .kb { grid-template-columns: 260px minmax(0, 1fr); }
}

/* ---------------------------------------------------------------- phone */

@media (max-width: 760px) {
  body { font-size: 14.5px; }
  input[type="text"], input[type="email"], input[type="search"], input[type="date"], input[type="password"], select, textarea { font-size: 16px; min-height: 38px; }
  .btn { min-height: 38px; }
  .btn-small { min-height: 34px; padding: 5px 11px; }

  /* Phone (Ty, Nov 25): the menu stays on the left, as a drawer behind a hamburger in the top bar. */
  .shell { display: block; }
  .rail {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 40;
    width: min(280px, 84vw); height: 100dvh; overflow-y: auto;
    padding: 0 10px calc(12px + env(safe-area-inset-bottom, 0));
    border-right: 1px solid var(--line); box-shadow: 0 0 24px rgba(0, 0, 0, .18);
    transform: translateX(-105%); transition: transform .2s ease; visibility: hidden;
  }
  .shell.nav-open .rail { transform: none; visibility: visible; }
  .rail .brand { position: static; }
  .rail .nav { position: static; }
  .nav-link { padding: 10px 10px; min-height: 44px; }
  .nav-scrim { position: fixed; inset: 0; z-index: 35; background: rgba(0, 0, 0, .35); }
  .hamburger { display: inline-flex; }
  .topbar { padding: 0 12px; justify-content: space-between; }
  .brand-top { display: flex; }
  .shell-note { padding: 7px 12px; align-items: flex-start; }
  .main { padding: 14px 12px 24px; }

  .card { padding: 12px; }
  .alert { flex-wrap: wrap; }
  .alert-body { flex-basis: 70%; }
  .alert > .btn { margin-left: auto; }
  .layers { grid-template-columns: minmax(0, 1fr); }
  .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 0; }
  .figures-plain { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toolbar .field { flex: 1 1 100%; }
  .result-count { margin-left: 0; }

  .feed-row { grid-template-columns: minmax(0, 1fr) auto; }
  .feed-acct { grid-column: 1; grid-row: 1; }
  .feed-kind { grid-column: 2; grid-row: 1; }
  .feed-text { grid-column: 1 / -1; grid-row: 2; }
  .feed-when { grid-column: 1 / -1; grid-row: 3; font-size: 12.5px; color: var(--text-3); }

  .ledger-list { margin: 0 -12px; }
  .lrow { grid-template-columns: minmax(0, 1fr) auto; padding: 10px 12px; }
  .l-kind { grid-column: 1; grid-row: 1; }
  .l-date { grid-column: 2; grid-row: 1; font-size: 12.5px; }
  .l-body { grid-column: 1 / -1; grid-row: 2; }
  .l-act { grid-column: 1 / -1; grid-row: 3; }
  .l-act:empty { display: none; }
  .confirm { justify-content: flex-start; }
  .card-tools { margin-left: 0; flex: 1 1 100%; }
  .card-tools select { flex: 1 1 auto; }
  .tab-panel { padding: 4px 12px 12px; }
  .mini { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ref { line-height: 22px; padding: 0 7px; }

  .ladder-open { grid-template-columns: repeat(4, minmax(0, 1fr)); flex-basis: 100%; }
  .ladder-open .rung:nth-child(n+5) { border-top: 1px solid var(--line); }
  .ladder-open .rung:nth-child(5) { border-left: 0; }
  .ladder-closed { flex-basis: 100%; }
  .ladder-cap { flex: 1 1 100%; padding: 6px 9px 0; }
  .rung { padding: 8px 9px 7px; }
  .rung-label { font-size: 11.5px; }
  .kv dt { flex-basis: 118px; }

  .queue { margin: 8px -12px -12px; }
  .qrow { padding: 12px; }
  .routines-side { grid-template-columns: minmax(0, 1fr); }

  .kb { display: block; }
  .kb.has-doc .kb-side { display: none; }
  .kb:not(.has-doc) .kb-reader { display: none; }
  .kb-reader { padding: 14px 12px 18px; }
  .kb-back { display: block; }
  .doc-head h2 { font-size: 18px; }

  /* Tables become cards: one row is one block, with the column name in front of each value. */
  .table.cards > thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .table.cards, .table.cards > tbody { display: block; }
  .table.cards > tbody > tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding: 11px 12px; border-bottom: 1px solid var(--line); }
  .table.cards > tbody > tr:last-child { border-bottom: 0; }
  .table.cards > tbody > tr > td { display: block; padding: 0; border: 0; min-width: 0; text-align: left; }
  .table.cards > tbody > tr:hover > td { background: none; }
  .table.cards > tbody > tr > td.c-main { min-width: 0; flex: 1 1 55%; order: -2; font-size: 15px; }
  .table.cards > tbody > tr > td.c-tag { order: -1; margin-left: auto; }
  .table.cards > tbody > tr > td.c-wide, .table.cards > tbody > tr > td.c-actions { flex: 1 1 100%; }
  .table.cards > tbody > tr > td.c-status { min-width: 0; }
  .table.cards > tbody > tr > td[data-label] { font-size: 13px; color: var(--text-2); }
  .table.cards > tbody > tr > td[data-label]::before { content: attr(data-label) ": "; color: var(--text-3); }
  .table.cards > tbody > tr > td[data-label] .cell-sub { display: inline; margin-left: 6px; }
  .table.cards > tbody > tr > td.c-actions:empty { display: none; }
  .table.cards > tbody > tr.is-open { background: var(--accent-soft); }
  .table.cards > tbody > tr.is-open > td { background: none; }
  .table.cards > tbody > tr.runs-row { display: block; padding: 10px 12px 12px; background: var(--bg); }
  .table.cards > tbody > tr.runs-row > td { background: none; }
  .table.cards > tbody > tr.runs-row .table-wrap { max-width: 100%; }
  .routines .c-main { min-width: 0; flex-basis: 100%; }
  .row-actions { margin-top: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .rail { transition: none; }
  * { transition: none !important; scroll-behavior: auto !important; }
}

.conn-key { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.conn-key input { width: 200px; }

/* ---------------------------------------------------------------- calendar */
/* Kind colors: External uses the accent, Internal the neutral, Personal the green. */
.s-external { --strip: var(--accent); }
.s-internal { --strip: var(--skip); }
.s-personal { --strip: var(--ok); }
.kd { display: inline-block; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--strip, var(--skip)); }

/* header */
.view-calendar .page-head { margin-bottom: 10px; }
.view-calendar .page-title { flex-wrap: nowrap; align-items: center; gap: 10px 16px; }
.view-calendar .page-title h1 { flex: none; }
.cal-bar { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.cal-bar-d { display: grid; gap: 1px; min-width: 0; margin-right: auto; }
.cal-range { margin: 0; font-size: 15px; font-weight: 650; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-range-sub { color: var(--text-3); font-weight: 500; }
.cal-key { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 11.5px; line-height: 1.3; color: var(--text-3); }
.cal-key-i { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.cal-ctl { display: flex; align-items: center; gap: 6px; flex: none; }
.cal-nav-b { min-width: 32px; font-size: 15px; }
.cal-mode { flex: none; display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; }
.cal-mode-b { border: 0; background: var(--surface); color: var(--text-2); font: inherit; font-size: 12.5px; font-weight: 600; min-height: 28px; padding: 0 12px; cursor: pointer; }
.cal-mode-b + .cal-mode-b { border-left: 1px solid var(--line-strong); }
.cal-mode-b:hover { background: var(--surface-2); }
.cal-mode-b.on { background: var(--accent-soft); color: var(--accent-text); }
.cal-mode-b:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* body */
.cal-body { min-width: 0; }
.cal-body.is-loading { opacity: .6; transition: opacity .15s; }
.cal-wnote { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 12px; padding: 2px 2px 8px; font-size: 12.5px; color: var(--text-3); }
.cal-none { color: var(--text-2); font-weight: 600; }
.cal-w7 { border: 0; background: none; padding: 0; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--accent-text); cursor: pointer; }
.cal-w7:hover { text-decoration: underline; }
.cal-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.cal-tabs::-webkit-scrollbar { display: none; }
.cal-tab { flex: 1 0 auto; display: inline-flex; align-items: baseline; justify-content: center; gap: 4px; border: 0; background: none; font: inherit; padding: 4px 8px 8px; font-size: 13.5px; color: var(--text-2); white-space: nowrap; border-bottom: 2px solid transparent; cursor: pointer; }
.cal-tab .n { font-variant-numeric: tabular-nums; }
.cal-tab sup { font-size: 10px; color: var(--text-3); }
.cal-tab.quiet { color: var(--text-3); }
.cal-tab.today .n { color: var(--accent-text); font-weight: 700; }
.cal-tab.on { color: var(--text); font-weight: 700; border-bottom-color: var(--accent); }

/* the time grid */
.cal-scroll { position: relative; overflow: auto; height: calc(100vh - var(--topbar-h) - 170px); min-height: 360px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overscroll-behavior: contain; }
.cal-wg { --tc: 56px; --hd: 52px; display: grid; grid-template-columns: var(--tc) repeat(var(--cols), minmax(0, 1fr)); width: 100%; }
.cal-wcorner, .cal-wh { position: sticky; top: 0; height: 52px; z-index: 4; background: var(--surface); border-bottom: 1px solid var(--line); }
.cal-wcorner { left: 0; z-index: 6; display: flex; align-items: flex-end; justify-content: flex-end; padding: 0 8px 8px 0; font-size: 10.5px; color: var(--text-3); }
.cal-wh { display: grid; align-content: center; justify-items: center; gap: 2px; padding: 0 2px; border-top: 0; border-left: 0; border-right: 0; font: inherit; color: var(--text); }
button.cal-wh { cursor: pointer; }
button.cal-wh:hover { background: var(--surface-2); }
.cal-wh .dow { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.cal-wh .n { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text-2); padding: 0 7px; border-radius: var(--radius); line-height: 22px; }
.cal-wh.today .dow { color: var(--accent-text); }
.cal-wh.today .n { background: var(--accent); color: var(--accent-ink); }
.cal-wh.past .dow, .cal-wh.past .n { opacity: .6; }
.cal-wadc { position: sticky; left: 0; top: var(--hd); z-index: 5; background: var(--surface); display: flex; justify-content: flex-end; padding: 6px 8px 0 0; font-size: 10.5px; color: var(--text-3); border-bottom: 1px solid var(--line); }
.cal-wad-cell { position: sticky; top: var(--hd); z-index: 3; background: var(--surface); display: grid; gap: 2px; align-content: start; padding: 3px 2px; min-width: 0; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); }
.cal-ad { display: block; min-width: 0; border: 0; border-left: 3px solid var(--strip); border-radius: 3px; background: color-mix(in srgb, var(--strip) 12%, var(--surface)); color: var(--text); font: inherit; font-size: 11px; font-weight: 600; text-align: left; padding: 2px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.cal-whours { position: sticky; left: 0; z-index: 3; background: var(--surface); }
.cal-whours span { position: absolute; right: 8px; font-size: 10.5px; color: var(--text-3); transform: translateY(-7px); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cal-wcol { position: relative; background: var(--bg); border-left: 1px solid var(--line); }
.cal-wcol.today { background: color-mix(in srgb, var(--accent-soft) 55%, var(--bg)); }
.cal-hl { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); pointer-events: none; }
.cal-wnow { position: absolute; left: 0; right: 0; border-top: 2px solid var(--bad); z-index: 3; pointer-events: none; }
.cal-wnow::before { content: ""; position: absolute; left: -4px; top: -5px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); }
.cal-wb { position: absolute; display: grid; align-content: start; gap: 1px; min-width: 0; overflow: hidden; padding: 3px 6px 3px 12px;
  background: var(--surface); color: var(--text); border: 0; border-radius: 4px; box-shadow: 0 0 0 1px var(--line-strong);
  font: inherit; text-align: left; cursor: pointer; z-index: 1; }
.cal-wb::before { content: ""; position: absolute; left: 4px; top: 3px; bottom: 3px; width: 3px; border-radius: 2px; background: var(--strip); }
.cal-wb:hover { z-index: 2; box-shadow: 0 0 0 1px var(--strip), 0 3px 10px rgba(0, 0, 0, .12); }
.cal-wb:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; z-index: 2; }
.cal-wb.is-open { box-shadow: 0 0 0 2px var(--accent); z-index: 2; }
.cal-wb.s-external { background: color-mix(in srgb, var(--accent-soft) 60%, var(--surface)); }
.cal-wb.s-personal { background: color-mix(in srgb, var(--ok-soft) 60%, var(--surface)); }
.cal-wb b { font-size: 12.5px; font-weight: 650; line-height: 1.25; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-wb b.two { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cal-wb b.one { display: flex; align-items: center; gap: 5px; font-size: 12px; }
.cal-wb b.one .tt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-wb b.one small { flex: none; margin-left: auto; padding-left: 4px; font-size: 10.5px; font-weight: 500; color: var(--text-3); }
.cal-wb i { display: flex; align-items: center; gap: 5px; font-style: normal; font-size: 11px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.cal-wb.done b, .cal-wcol.past .cal-wb b { font-weight: 550; color: var(--text-2); }
.cal-wb.done, .cal-wcol.past .cal-wb { box-shadow: 0 0 0 1px var(--line); }
.cal-wg.is-day { --hd: 0px; }
.cal-wg.is-day .cal-wcorner, .cal-wg.is-day .cal-wh { display: none; }
.cal-wg.is-day .cal-wb b { font-size: 13.5px; }
.cal-wg.is-day .cal-wb i { font-size: 12px; }
.cal-connect { max-width: 560px; }

/* the meeting modal */
body.cal-modal-open { overflow: hidden; }
.cal-sheet-scrim { position: fixed; inset: 0; z-index: 60; display: flex; justify-content: center; align-items: center; padding: 18px; background: var(--veil); }
.cal-sheet { width: min(820px, 100%); max-height: min(90vh, 960px); overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column;
  background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); border-radius: 12px; padding: 16px 24px 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .3); animation: calSheetPop .18s ease; }
.cal-sheet:focus { outline: none; }
@keyframes calSheetPop { from { transform: translateY(8px) scale(.985); opacity: 0; } to { transform: none; opacity: 1; } }
.cal-sheet-bar { display: flex; justify-content: flex-end; margin: 0 -8px 2px 0; }
.cal-rb { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--surface-2); color: var(--text); font-size: 20px; line-height: 1; display: grid; place-items: center; cursor: pointer; }
.cal-rb:hover { background: var(--line); }
.cal-sheet-t { margin: 0 0 10px; font-size: 23px; line-height: 1.15; letter-spacing: -0.02em; text-wrap: balance; }
.cal-sheet-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; }
.cal-kind { font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 4px; background: color-mix(in srgb, var(--strip) 12%, var(--surface)); border-left: 3px solid var(--strip); }
.cal-kv { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.cal-kv > span:first-child { color: var(--text-3); }
.cal-kv > span:last-child { font-weight: 600; font-variant-numeric: tabular-nums; min-width: 0; overflow-wrap: anywhere; }
.cal-ppl { display: block; font-style: normal; font-weight: 400; font-size: 12.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-sheet-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.cal-join { min-width: 72px; }
.cal-orig { margin: 10px 0 0; font-size: 12.5px; color: var(--text-3); }
.cal-sheet .notice-slot { margin-top: 10px; }

/* deal checklist */
.deal-ck { display: grid; gap: 8px; margin: 16px 0 2px; padding: 10px 12px; background: var(--surface-2); border-radius: var(--radius); }
.deal-ck-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 13px; }
.deal-ck-row > b { width: 50px; flex: none; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.deal-ck-item { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); }
.deal-ck-item.on { color: var(--text); }
.deal-ck-lbl { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.deal-ck-item.on .deal-ck-lbl span { font-weight: 600; }
.deal-ck-box { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.deal-ck .deal-ck-in { width: 120px; min-height: 26px; padding: 2px 6px; font-size: 12.5px; background: transparent; border-color: transparent; border-bottom: 1px dashed var(--line-strong); border-radius: 3px; }
.deal-ck .deal-ck-in.is-n { width: 64px; }
.deal-ck .deal-ck-in:hover { border-color: var(--line-strong); background: var(--surface); }
.deal-ck .deal-ck-in:focus { border-color: var(--accent); border-style: solid; background: var(--surface); outline: none; }

/* call prep and the account part */
.cal-sec { margin-top: 18px; border-top: 1px solid var(--line); }
.cal-sec > summary { display: flex; align-items: center; gap: 8px; padding: 12px 0 6px; cursor: pointer; list-style: none; }
.cal-sec > summary::-webkit-details-marker { display: none; }
.cal-sec > summary::before { content: "▸"; width: 10px; font-size: 11px; color: var(--text-3); transition: transform .15s; }
.cal-sec[open] > summary::before { transform: rotate(90deg); }
.cal-sec > summary b { font-size: 15px; min-width: 0; }
.cal-sec > summary > .cal-sec-note { margin-left: auto; font-size: 12px; color: var(--text-3); white-space: nowrap; }
.built-pill { flex: none; border: 0; border-radius: 999px; background: var(--surface-2); color: var(--text-2); font: inherit; font-size: 11.5px; font-weight: 600; padding: 2px 9px; cursor: pointer; }
.built-pill:hover, .built-pill[aria-expanded="true"] { background: var(--accent-soft); color: var(--accent-text); }
.built-src { margin: 0 0 8px; padding: 8px 10px; font-size: 12px; line-height: 1.5; color: var(--text-2); background: var(--surface-2); border-radius: var(--radius); }
.cal-prep-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0 2px; }
.cal-prep-hint { font-size: 11.5px; color: var(--text-3); }
.cal-prep-edit { display: grid; gap: 8px; margin-top: 8px; }
.cal-sheet textarea.cal-prep-area { min-height: 320px; font-family: var(--mono); font-size: 12.5px; line-height: 1.6; resize: vertical; border-color: var(--accent); }
.cal-sec-md { margin-top: 10px; padding: 14px 18px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); }
.cal-sec-md .md { max-width: none; }
.cal-pl-empty { margin: 6px 0 0; font-size: 13px; color: var(--text-3); }
.cal-acct-body { padding-bottom: 4px; }
.cal-account { margin: 4px 0 0; }
.cal-asec { margin-top: 14px; }
.cal-asec h3 { margin: 0 0 6px; font-size: 14px; }
.cal-asec ul { margin: 0; padding-left: 18px; }
.cal-asec li + li { margin-top: 4px; }
.cal-quote { margin: 4px 0 10px; padding: 6px 12px; border-left: 3px solid var(--accent-line); background: var(--accent-soft); white-space: pre-wrap; }
.cal-lead { margin-top: 14px; }
.cal-lead p { margin: 0 0 4px; }
.cal-updates { list-style: none; padding-left: 0 !important; }

@media (max-width: 900px) {
  .view-calendar .page-title { flex-wrap: wrap; }
  .cal-bar { flex-basis: 100%; }
}
@media (max-width: 600px) {
  .cal-bar { gap: 8px; }
  .cal-bar-d { flex-basis: 100%; }
  .cal-ctl { flex: 1 1 auto; }
  .cal-ctl .btn { flex: 1 1 auto; }
  .cal-key { gap: 3px 10px; }
  .cal-wg { --tc: 44px; }
  .cal-wg:not(.is-day) { grid-template-columns: var(--tc) repeat(var(--cols), minmax(92px, 1fr)); width: max-content; min-width: 100%; }
  .cal-whours span { right: 5px; font-size: 10px; }
  .cal-tab { padding: 4px 4px 8px; font-size: 13px; flex-direction: column; align-items: center; gap: 0; }
  .cal-tab sup { display: none; }
  .cal-sheet-scrim { padding: 0; align-items: stretch; }
  .cal-sheet { width: 100%; max-height: none; height: 100%; border: 0; border-radius: 0; box-shadow: none;
    padding: calc(env(safe-area-inset-top, 0px) + 10px) 16px calc(32px + env(safe-area-inset-bottom, 0px)); animation-name: calSheetUp; }
  @keyframes calSheetUp { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
  .cal-sheet-t { font-size: 21px; }
  .cal-kv { font-size: 14.5px; }
  .deal-ck-row > b { width: 100%; }
  .cal-sec-md { padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .cal-sheet { animation: none; }
  .cal-sec > summary::before { transition: none; }
}

/* ---------------------------------------------------------------- Shortcut */
.sc-vh { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sc-tabs { margin-bottom: 14px; background: transparent; position: static; }
.sc-tabs .tab { text-decoration: none; }
.sc-tabs .tab[aria-current="page"] { color: var(--accent-text); border-bottom-color: var(--accent); }
.sc-toolbar { align-items: center; }
.sc-pin { display: flex; flex-direction: row; flex-wrap: nowrap; gap: 6px; align-items: center; flex: 0 1 auto; }
.sc-pin select { flex: 1 1 auto; min-width: 0; }
.sc-pin select { max-width: 280px; }
.sc-sync { margin: 0 0 0 auto; }
.sc-callout { margin: 0 0 12px; }
.sc-acct .card-head h2 { font-size: 16px; }
.sc-issues { list-style: none; margin: 0; padding: 0; }
.sc-issue { padding: 10px 0; border-top: 1px solid var(--line); }
.sc-issue:first-child { border-top: 0; padding-top: 2px; }
.sc-issue-top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.sc-issue-t { font-weight: 600; color: var(--text); text-decoration: none; }
.sc-issue-t:hover { color: var(--accent-text); text-decoration: underline; }
.sc-stops { margin: 4px 0 0; color: var(--text-2); font-size: 13px; max-width: 80ch; }
.sc-tix { list-style: none; margin: 6px 0 0; padding: 0 0 0 2px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.sc-tix li { overflow-wrap: anywhere; }
.sc-tix li.is-done > a { color: var(--text-3); text-decoration: line-through; }
.sc-tix select { margin-left: 4px; max-width: 220px; font-size: 12.5px; }
.sc-loose { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line-strong); }
.sc-loose h3 { margin: 0 0 4px; font-size: 13px; color: var(--text-2); }
.sc-chips { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.sc-chip { display: inline-flex; align-items: center; gap: 3px; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); color: var(--text); font-size: 12.5px; text-decoration: none; border: 1px solid var(--line); }
a.sc-chip:hover { border-color: var(--accent-line); color: var(--accent-text); }
.sc-chip-x { display: inline-flex; border: 0; background: transparent; color: var(--text-3); padding: 2px; margin-right: -4px; cursor: pointer; border-radius: 50%; }
.sc-chip-x:hover { color: var(--bad); }
.sc-act { white-space: nowrap; }
.sc-act .btn + .btn { margin-left: 4px; }
.sc-assign { display: flex; flex-direction: column; gap: 6px; min-width: 240px; white-space: normal; }
.sc-assign-btns { display: flex; gap: 6px; }
.sc-fold summary { cursor: pointer; font-weight: 600; }
.sc-fold[open] summary { margin-bottom: 6px; }
.sc-issue-form { display: flex; flex-direction: column; gap: 12px; }
.sc-issue-form .field select, .sc-issue-form .field textarea, .sc-issue-form .field input { width: 100%; }
.sc-found { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.sc-danger { border-top: 1px solid var(--line); padding-top: 12px; }
.sc-pre { white-space: pre-wrap; }
@media (max-width: 640px) {
  .sc-sync { margin-left: 0; width: 100%; }
  .sc-pin { width: 100%; }
  .sc-pin select { max-width: none; }
  .sc-tix select { margin: 4px 0 0; display: block; max-width: 100%; }
}
/* ---------------------------------------------------------------- punchlist
   Ported from the old app's final punchlist design (Oct 1): the list on the left, the open item on the right;
   on a phone the item opens as a full-screen sheet. */
.pl-headr { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.pl-status { font-size: 12.5px; color: var(--text-3); white-space: nowrap; }
.pl { display: grid; grid-template-columns: minmax(340px, 460px) minmax(0, 1fr); min-height: 520px; height: calc(100vh - var(--topbar-h) - 120px);
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.pl-list { position: relative; overflow-y: auto; border-right: 1px solid var(--line); overscroll-behavior: contain; --plh: 84px; }
.pl-pane { overflow-y: auto; padding: 26px 32px 40px; }
.pl-pane-empty { color: var(--text-3); margin: 40px 0; text-align: center; }
.pl-head { position: sticky; top: 0; z-index: 3; height: var(--plh); display: grid; grid-template-rows: auto 1fr; padding: 10px 16px 0;
  background: var(--surface); border-bottom: 1px solid var(--line); }
.pl-l1 { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pl-count { font-size: 13px; color: var(--text-3); }
.pl-count b { font-size: 15px; color: var(--text); }
.pl-tools { display: flex; gap: 6px; }
.pl-tool { border: 0; background: var(--surface-2); color: var(--text-2); border-radius: 4px; padding: 5px 10px; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.pl-tool:hover { background: var(--line); }
.pl-tool:disabled { opacity: .5; cursor: default; }
.pl-tool[aria-expanded="true"] { background: var(--text); color: var(--surface); }
.pl-tabs { display: flex; gap: 18px; align-self: end; }
.pl-tabs button { border: 0; background: none; padding: 4px 0 8px; font: inherit; font-size: 13px; font-weight: 500; color: var(--text-3);
  border-bottom: 2px solid transparent; white-space: nowrap; cursor: pointer; }
.pl-tabs button.on { color: var(--text); font-weight: 700; border-bottom-color: var(--text); }
.pl-tabs sup { font-size: 10px; margin-left: 2px; color: var(--text-3); }
.pl-gh { position: sticky; top: var(--plh); z-index: 2; display: flex; align-items: center; background: var(--surface); border-bottom: 1px solid var(--line); }
.pl-gh-t { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 10px 6px 8px 16px; border: 0; background: none;
  color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.pl-gh .car { width: 12px; color: var(--text-3); font-size: 11px; transition: transform .15s; }
.pl-gh.closed .car { transform: rotate(-90deg); }
.pl-gh b { flex: 1; min-width: 0; font-size: 15px; font-weight: 750; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-gh .n { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.pl-gh-a { margin-right: 14px; font-size: 12px; }
.pl-new-n { font-size: 11px; font-weight: 700; color: var(--bad); }
.pl-row { position: relative; display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 8px; align-items: start;
  padding: 11px 12px 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface); }
.pl-row::before { content: ""; position: absolute; left: 4px; top: 10px; bottom: 10px; width: 3px; border-radius: 2px; background: var(--strip, transparent); }
.pl-row.is-waiting { --strip: var(--line-strong); }
.pl-row.sel { background: var(--surface-2); }
.pl-chk { width: 22px; height: 22px; margin-top: 1px; border-radius: 50%; border: 1.5px solid var(--line-strong); background: var(--surface);
  color: transparent; display: grid; place-items: center; padding: 0; cursor: pointer; }
.pl-chk svg { width: 13px; height: 13px; }
.pl-chk:hover { border-color: var(--ok); color: var(--ok); }
.pl-tx { min-width: 0; display: grid; gap: 3px; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.pl-tx .t { font-size: 14.5px; font-weight: 600; line-height: 1.3; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pl-row.is-waiting .t, .pl-row.team .t { color: var(--text-2); font-weight: 500; }
.pl-tx .s { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-tx .nw { color: var(--bad); font-weight: 750; }
.pl-tx .sg { color: var(--ok); font-weight: 650; }
.pl-tx:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.pl-rt { display: flex; align-items: center; gap: 4px; }
.pl-rt .ini { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--text-2); color: var(--text); font-size: 10px; font-weight: 700; display: grid; place-items: center; }
.pl-ic { width: 28px; height: 26px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--text-3); cursor: pointer; }
.pl-ic svg { width: 15px; height: 15px; }
.pl-ic:hover { background: var(--surface-2); color: var(--text); }
.pl-empty { padding: 56px 24px; display: grid; gap: 6px; justify-items: center; text-align: center; color: var(--text-3); }
.pl-empty b { font-size: 19px; color: var(--text); letter-spacing: -0.02em; }
.pl-foot { display: flex; gap: 8px; padding: 14px 16px 6px; }
.pl-fold { border: 0; background: var(--surface-2); color: var(--text-2); border-radius: 4px; padding: 6px 10px; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.pl-fold span { color: var(--text-3); margin-left: 3px; }
.pl-fold[aria-expanded="true"] { background: var(--text); color: var(--surface); }
.pl-fold[aria-expanded="true"] span { color: inherit; }
.pl-parked { list-style: none; margin: 0; padding: 4px 16px 24px; display: grid; gap: 4px; }
.pl-pk { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.pl-pk-t { min-width: 0; display: grid; gap: 2px; font-size: 13px; color: var(--text-2); }
.pl-pk-t small { font-size: 11.5px; color: var(--ok); }
.pl-addform { display: grid; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.pl-addrow { display: flex; flex-wrap: wrap; gap: 8px; }
.pl-addrow select { flex: 1 1 140px; }
.pl-in { width: 100%; }
.pl-hint { margin: 0; font-size: 12px; color: var(--text-3); }
.pl-det { display: grid; gap: 12px; justify-items: start; max-width: 720px; }
.pl-det > * { max-width: 100%; }
.pl-det-t { margin: 0; font-size: 23px; line-height: 1.2; letter-spacing: -0.02em; text-wrap: balance; }
.pl-det-b { margin: 0; font-size: 15px; line-height: 1.55; white-space: pre-wrap; }
.pl-ev { width: 100%; padding: 10px 14px; border-left: 3px solid var(--ok); background: var(--ok-soft); border-radius: 0 var(--radius) var(--radius) 0; }
.pl-ev b { font-size: 13px; }
.pl-ev p { margin: 4px 0 0; }
.pl-ev-sg { border-left-color: var(--accent); background: var(--accent-soft); }
.pl-kv { width: 100%; margin: 0; display: grid; }
.pl-kv > div { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.pl-kv dt { color: var(--text-3); }
.pl-kv dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.pl-src { margin: 0; font-size: 12.5px; color: var(--text-3); }
.pl-links { margin: 0; display: flex; flex-wrap: wrap; gap: 14px; font-size: 13.5px; }
.pl-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.pl-acts .btn svg { width: 14px; height: 14px; margin-right: 4px; vertical-align: -2px; }
.pl-toast { position: fixed; left: 50%; bottom: 24px; z-index: 70; transform: translateX(-50%); display: flex; align-items: center; gap: 14px;
  padding: 10px 16px; border-radius: 8px; background: var(--text); color: var(--surface); font-size: 13.5px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.pl-toast button { border: 0; background: none; color: var(--surface); font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
body.pl-sheet-open { overflow: hidden; }
.pl-sheet { position: fixed; inset: 0; z-index: 60; overflow-y: auto; background: var(--surface);
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 16px calc(32px + env(safe-area-inset-bottom, 0px)); animation: plUp .18s ease; }
@keyframes plUp { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.pl-sheet-bar { width: 100%; margin-bottom: 4px; }
.pl-back { border: 0; background: none; color: var(--accent-text); font: inherit; font-size: 15px; font-weight: 600; padding: 8px 0; cursor: pointer; }

@media (max-width: 900px) {
  .view-punchlist .page-title { flex-wrap: wrap; }
  .pl { grid-template-columns: minmax(0, 1fr); height: auto; min-height: 0; border-radius: 10px; }
  .pl-list { border-right: 0; overflow: visible; }
  .pl-pane { display: none; }
  .pl-head { position: static; height: auto; gap: 8px; padding-bottom: 0; }
  .pl-gh { top: 0; }
  .pl-row { padding: 12px 8px 11px 12px; }
  .pl-chk { width: 26px; height: 26px; }
  .pl-ic { width: 36px; height: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  .pl-sheet { animation: none; }
  .pl-gh .car { transition: none; }
}

/* My queue: pick several, see where each fact came from */
.q-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--line); background: var(--surface-2); }
.q-all-l { display: inline-flex; align-items: center; gap: 6px; margin-right: auto; font-size: 13px; color: var(--text-2); cursor: pointer; }
.q-sel { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; }
.q-pick, .q-all { width: 16px; height: 16px; margin: 3px 0 0; accent-color: var(--accent); }
.q-main { min-width: 0; }
.q-sel .q-text { margin-bottom: 4px; }
.q-src { margin: 0 0 9px; font-size: 12.5px; color: var(--text-3); overflow-wrap: anywhere; }
.conn-key .conn-card { width: 140px; }

.nav-label .nav-short { display: none; }

/* punchlist: what an item absorbed */
.pl-merged { width: 100%; padding: 10px 14px; background: var(--surface-2); border-radius: var(--radius); }
.pl-merged b { font-size: 13px; }
.pl-merged ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.pl-merged li { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pl-merged li > div { min-width: 0; display: grid; gap: 1px; font-size: 13px; }
.pl-merged small { font-size: 11.5px; color: var(--text-3); overflow-wrap: anywhere; }
@media (max-width: 900px) { .pl-tools { flex-wrap: wrap; justify-content: flex-end; } }

/* My queue: Plaud setup */
.plaud-setup { display: grid; gap: 8px; margin: 10px 0 4px; padding: 12px 14px; background: var(--surface-2); border-radius: var(--radius); }
.plaud-setup .side-title { margin: 0; }
.plaud-url { flex: 1 1 260px; min-width: 0; font-family: var(--mono); font-size: 12px; }
.plaud-steps { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 13px; }
.plaud-steps code { font-family: var(--mono); font-size: 12px; }

/* ---------------------------------------------------------------- settings */
.set-tabs { display: flex; gap: 20px; margin: 4px 0 16px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.set-tab { padding: 6px 0 10px; color: var(--text-3); font-weight: 550; text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; }
.set-tab[aria-current="page"] { color: var(--text); font-weight: 700; border-bottom-color: var(--text); }
.set-body { display: grid; gap: 16px; max-width: 860px; }
.set-card h2 { margin: 0 0 10px; font-size: 16px; }
.set-kv { margin: 0 0 14px; display: grid; }
.set-kv > div { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.set-kv dt { color: var(--text-3); }
.set-kv dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.safe { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 12px; padding: 10px 14px; border-radius: var(--radius);
  background: var(--ok-soft); color: var(--text); }
.safe .icon { flex: none; margin-top: 2px; color: var(--ok); }
.safe p { margin: 0; }
.safe p + p { margin-top: 4px; }
details.desc summary { cursor: pointer; font-size: 12.5px; color: var(--accent-text); }
details.desc p { margin: 4px 0 0; }
.doc-det summary { cursor: pointer; list-style: none; }
.doc-det summary::-webkit-details-marker { display: none; }
.doc-det summary .side-title { display: inline; }
.doc-body { margin: 8px 0; padding: 12px 14px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); max-height: 520px; overflow-y: auto; }
.who-name { color: var(--text); text-decoration: none; font-weight: 600; }
.who-name:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- notifications bell */
.bell-wrap { position: relative; }
.bell { position: relative; width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 50%;
  background: transparent; color: var(--text-2); cursor: pointer; }
.bell:hover, .bell[aria-expanded="true"] { background: var(--surface-2); color: var(--text); }
.bell-n { position: absolute; top: 3px; right: 2px; min-width: 16px; padding: 0 4px; border-radius: 8px; background: var(--bad-solid);
  color: #fff; font-size: 10.5px; font-weight: 700; line-height: 16px; text-align: center; }
.bell-panel { position: absolute; right: 0; top: 42px; z-index: 50; width: min(380px, calc(100vw - 24px)); max-height: 70vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: 0 16px 40px rgba(0, 0, 0, .2); padding: 8px; }
.bell-h { margin: 4px 8px 8px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }
.bell-panel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.bell-i a { display: grid; gap: 2px; padding: 9px 10px 9px 14px; border-radius: 6px; color: var(--text); text-decoration: none; position: relative; }
.bell-i a::before { content: ""; position: absolute; left: 4px; top: 10px; bottom: 10px; width: 3px; border-radius: 2px; background: var(--accent-line); }
.bell-warn a::before { background: var(--warn); }
.bell-i a:hover { background: var(--surface-2); }
.bell-i b { font-size: 13.5px; }
.bell-i span { font-size: 12.5px; color: var(--text-2); }
.bell-i small { font-size: 11.5px; color: var(--text-3); }
.bell-empty { margin: 8px 10px 12px; color: var(--text-3); font-size: 13px; }
@media (max-width: 760px) { .bell-panel { position: fixed; left: 12px; right: 12px; top: 52px; width: auto; } }

/* ---------------------------------------------------------------- Shortcut: the GTM list (Ty, Nov 24) */
.sc-gl-head h2 { font-size: 20px; display: flex; align-items: baseline; gap: 8px; }
.sc-gl-n { font-size: 13px; font-weight: 500; color: var(--text-3); }
.sc-gl-sub { margin: 6px 0 2px; color: var(--text-2); max-width: 90ch; }
.sc-linkbtn { border: 0; background: none; padding: 0; font: inherit; font-size: 13px; color: var(--accent-text); text-decoration: underline; cursor: pointer; }
.sc-linkbtn:hover { color: var(--accent); }
.sc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 0; }
.sc-actions .ext { font-size: 13px; margin-left: 4px; }
.sc-extra:not(:empty) { margin-top: 10px; padding: 10px 12px; background: var(--surface-2); border-radius: var(--radius); }
.sc-inline { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; }
.sc-inline select { max-width: 320px; }
.sc-mini { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.sc-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-top: 14px; }
.sc-tile { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; background: var(--surface); }
.sc-tile p { margin: 0; }
.sc-tile-l { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.sc-tile-n { font-size: 26px; font-weight: 650; line-height: 1.25; margin-top: 4px !important; font-variant-numeric: tabular-nums; }
.sc-tile-s { font-size: 12.5px; color: var(--text-3); margin-top: 2px !important; }
.sc-gl { padding: 12px 0 4px; margin-top: 12px; }
.sc-gl-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 0 16px 10px; }
.sc-gl-tools select { width: auto; }
.sc-ag-h, .sc-ag-row { display: grid; grid-template-columns: minmax(0, 1fr) 72px 72px 80px; gap: 8px; align-items: center; padding: 8px 16px; }
.sc-ag-h { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); border-bottom: 1px solid var(--line); }
.sc-ag-h .num, .sc-ag-row .num { text-align: right; font-variant-numeric: tabular-nums; }
.sc-ags { list-style: none; margin: 0; padding: 0; }
.sc-ag { border-bottom: 1px solid var(--line); }
.sc-ag:last-child { border-bottom: 0; }
.sc-ag.is-open > .sc-ag-row { background: var(--surface-2); }
.sc-ag-name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; }
.sc-ag-t, .sc-ig-t { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 2px 0; font: inherit; color: var(--text); cursor: pointer; text-align: left; }
.sc-ag-t { font-weight: 650; font-size: 15px; }
.sc-ag-t .icon, .sc-ig-t .icon { transition: transform .12s; color: var(--text-3); flex: none; }
.sc-ag-t[aria-expanded="true"] .icon, .sc-ig-t[aria-expanded="true"] .icon { transform: rotate(90deg); }
.sc-ag-t:hover span, .sc-ig-t:hover .sc-ig-name { text-decoration: underline; }
.sc-pri, .sc-menu { width: auto; min-height: 26px; padding: 1px 6px; font-size: 12px; border-radius: 999px; border: 1px dashed var(--line-strong); background: var(--surface); color: var(--text-2); }
.sc-menu { border-style: solid; border-color: transparent; background: transparent; font-weight: 700; letter-spacing: .1em; }
.sc-menu:hover, .sc-menu:focus-visible { border-color: var(--line-strong); }
.sc-pri-high { border: 1px solid var(--bad); background: var(--bad-soft); color: var(--bad); }
.sc-pri-med { border: 1px solid var(--warn); background: var(--warn-soft); color: var(--warn); }
.sc-pri-low { border: 1px solid var(--line-strong); background: var(--skip-soft); color: var(--skip); }
.sc-ag-body { padding: 4px 16px 14px 30px; }
.sc-tk-h, .sc-tk { display: grid; grid-template-columns: minmax(0, 2.6fr) minmax(110px, 1.1fr) 104px 104px minmax(120px, 1fr) 40px; gap: 10px; align-items: start; }
.sc-tk-h { padding: 8px 0; border-bottom: 1px solid var(--line-strong); }
.sc-sort { border: 0; background: none; padding: 0; font: inherit; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); cursor: pointer; text-align: left; }
.sc-sort[aria-pressed="true"], .sc-sort:hover { color: var(--text); }
.sc-ig { border-bottom: 1px solid var(--line); padding: 8px 0; }
.sc-ig:last-child { border-bottom: 0; }
.sc-ig-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.sc-ig-t { font-weight: 650; font-size: 15px; }
.sc-ig-other .sc-ig-t { color: var(--text-2); }
.sc-rename { width: min(420px, 100%); font-weight: 600; }
.sc-ig .sc-stops { margin: 2px 0 0 20px; }
.sc-tks { margin: 6px 0 0 6px; border-left: 3px solid var(--line-strong); }
.sc-tk { padding: 8px 0 8px 12px; border-top: 1px solid var(--line); font-size: 13px; }
.sc-tk:first-child { border-top: 0; }
.sc-tk-main { min-width: 0; overflow-wrap: anywhere; }
.sc-tk-main > a { font-weight: 600; }
.sc-tk-main .cell-sub { display: inline; }
.sc-tk-accts, .sc-tk-tags { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.sc-plus { border: 0; background: none; padding: 0 4px; font-size: 15px; line-height: 1; color: var(--text-3); cursor: pointer; border-radius: 4px; }
.sc-plus:hover { color: var(--accent-text); background: var(--accent-soft); }
.sc-state { color: var(--text-2); }
.sc-state.is-working { color: var(--ok); font-weight: 600; }
.sc-tk-menu { text-align: right; }
.sc-tagedit { display: flex; flex-direction: column; gap: 4px; }
.sc-none { margin: 6px 0 0 20px; }
@media (max-width: 820px) {
  .sc-ag-body { padding-left: 16px; }
  .sc-tk-h { display: none; }
  .sc-tk { grid-template-columns: 1fr 1fr; gap: 4px 12px; }
  .sc-tk-main { grid-column: 1 / -1; }
  .sc-tk > [data-label]::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; }
  .sc-tk-menu { grid-column: 1 / -1; text-align: left; }
}
@media (max-width: 520px) {
  .sc-ag-h, .sc-ag-row { grid-template-columns: minmax(0, 1fr) 44px 44px 56px; padding: 8px 12px; gap: 4px; }
  .sc-ag-h span { font-size: 10px; letter-spacing: .02em; }
  .sc-inline select { max-width: 100%; }
}
/* The ⋯ menus are selects: a select sizes to its longest option, so pin it to the dots. */
.sc-menu { appearance: none; -webkit-appearance: none; width: 32px; min-width: 32px; max-width: 32px; padding: 1px 0; text-align: center; text-align-last: center; cursor: pointer; }
.sc-pri { max-width: 150px; }
/* settings: pop-ups and sub-headings */
.set-modal { width: min(560px, 100%); }
.set-form { display: grid; gap: 12px; }
.set-steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; line-height: 1.5; }
.set-steps code { font-family: var(--mono); font-size: 12.5px; }
.safe-line { display: flex; gap: 6px; align-items: flex-start; margin: 0; font-size: 12.5px; color: var(--text-3); }
.safe-line .icon { flex: none; margin-top: 2px; color: var(--ok); }
.set-h { margin: 8px 0 2px; font-size: 16px; }
.set-sub { margin: 0 0 4px; }
.set-modal .plaud-url { flex: 1 1 260px; }
.pl-sweep { margin: -6px 0 12px; font-size: 13px; color: var(--text-3); }
.sales-l { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.sales-box { width: 16px; height: 16px; accent-color: var(--accent); }

/* ---------------------------------------------------------------- team edition (ui/ty, Nov 25) */

/* The menu, grouped by the job. */
.nav-group { margin: 14px 10px 4px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.nav-group:empty { margin: 8px 10px 0; border-top: 1px solid var(--line); height: 0; }
.rail { overflow-y: auto; }
.rail .nav { position: static; }
.shell > .rail { position: sticky; top: 0; height: 100vh; }

/* Search in the top bar. */
.topbar { justify-content: space-between; }
.search { position: relative; display: flex; align-items: center; flex: 1 1 320px; min-width: 0; max-width: 460px; margin-right: auto; color: var(--text-3); }
.search > .icon { position: absolute; left: 10px; pointer-events: none; }
.search input.search-input { width: 100%; min-width: 0; height: 34px; min-height: 34px; padding: 0 34px 0 32px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--text); font: inherit; }
.search-input::-webkit-search-cancel-button { display: none; }
.search-kbd { position: absolute; right: 8px; padding: 0 6px; border: 1px solid var(--line-strong); border-radius: 4px; font: 11px/18px var(--mono); color: var(--text-3); background: var(--surface-2); }
.search-input:focus + .search-kbd { display: none; }
.search-results { position: absolute; top: 40px; left: 0; right: 0; z-index: 30; max-height: min(70vh, 520px); overflow-y: auto; margin: 0; padding: 6px; list-style: none;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: 0 10px 28px rgba(0, 0, 0, .16); }
.search-group { padding: 8px 8px 3px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.search-opt { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 7px 8px; border-radius: 4px; cursor: pointer; color: var(--text); }
.search-opt.is-active, .search-opt:hover { background: var(--accent-soft); }
.search-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-opt .meta { flex: none; }
.search-none { padding: 10px 8px; color: var(--text-3); }

/* Today. */
.today { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.today-main > .card + .card, .today-side > .card + .card { margin-top: 12px; }
.sec-h { margin: 22px 0 8px; font-size: 15px; }
.count { display: inline-block; min-width: 22px; padding: 0 7px; border-radius: 11px; background: var(--surface-2); color: var(--text-2); font-size: 12px; font-weight: 700; line-height: 22px; text-align: center; font-variant-numeric: tabular-nums; }
.wq { list-style: none; margin: 0; padding: 0; }
.wq-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 10px 0 10px 12px; border-top: 1px solid var(--line); border-left: 3px solid transparent; margin-left: -16px; padding-left: 13px; }
.wq-row:first-child { border-top: 0; }
.wq-now { border-left-color: var(--bad-solid); }
.wq-soon { border-left-color: #c58a12; }
.wq-tidy { border-left-color: var(--line-strong); }
.wq-main { min-width: 0; }
.wq-title { font-weight: 600; }
.wq-why { margin-top: 2px; color: var(--text-2); max-width: 78ch; }
.wq-side { flex: none; display: flex; align-items: center; gap: 10px; font-size: 13px; text-align: right; }
.wq-sub { margin-left: auto; }
.wq-clear { display: flex; align-items: center; gap: 8px; padding: 6px 0; color: var(--ok); font-weight: 600; }
.age { display: inline-block; min-width: 34px; padding: 0 7px; border-radius: 10px; background: var(--surface-2); color: var(--text-2); font-size: 12px; font-weight: 650; line-height: 20px; text-align: center; font-variant-numeric: tabular-nums; }
.age-old { background: var(--bad-soft); color: var(--bad); }
.side-h { margin: 10px 0 4px; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); }
.side-h:first-of-type { margin-top: 0; }
.side-foot { margin-top: 10px; font-size: 13px; }
.mt { list-style: none; margin: 0; padding: 0; }
.mt li { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 8px; padding: 5px 0; }
.mt-when { color: var(--text-2); font-variant-numeric: tabular-nums; font-size: 13px; }
.mt-prep { margin-left: 6px; }
.big-link { font-size: 20px; font-weight: 650; }
.figures-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 0; }
.figures-2 .figure:nth-child(odd) { border-left: 0; padding-left: 0; }
.setup { border-color: var(--accent-line); background: var(--accent-soft); margin-bottom: 12px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px 20px; }
.steps li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; align-items: start; }
.step-mark { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-top: 1px; border: 1.5px solid var(--line-strong); border-radius: 50%; background: var(--surface); color: var(--ok); }
.steps .is-done .step-mark { border-color: var(--ok); }
.steps .is-done a { color: var(--text-2); }

/* Tables inside a card sit flush, without a second box. */
.card > .table-wrap { border: 0; background: none; overflow-x: auto; margin: 0 -4px; }
.card > .table-wrap .table th:first-child, .card > .table-wrap .table td:first-child { padding-left: 4px; }
.card > .table-wrap .table thead th { position: static; }
.table tbody th { font-weight: 600; text-align: left; white-space: nowrap; }
.table td.hot { color: var(--bad); font-weight: 700; }
.table td.warm { color: var(--warn); font-weight: 700; }
.table .row-total > th, .table .row-total > td { border-top: 2px solid var(--line-strong); font-weight: 700; }
.table .row-rate > th, .table .row-rate > td { color: var(--text-2); font-size: 13px; }
.table .row-detail > td { background: var(--surface-2); padding: 8px 12px 10px 28px; }
.row-toggle { padding: 0; border: 0; background: none; color: var(--accent-text); font: inherit; font-weight: 600; cursor: pointer; text-align: left; }
.row-toggle::before { content: "▸"; display: inline-block; width: 16px; color: var(--text-3); }
.row-toggle[aria-expanded="true"]::before { content: "▾"; }
.row-toggle:disabled { color: var(--text-3); cursor: default; }
.lead-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 4px 20px; }
.plain { margin: 0; padding-left: 18px; max-width: 90ch; }
.plain li + li { margin-top: 5px; }

/* Deal review. */
.moved { list-style: none; margin: 0; padding: 0; }
.moved-row { padding: 10px 0; border-top: 1px solid var(--line); }
.moved-row:first-child { border-top: 0; padding-top: 2px; }
.moved-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.moved-name { font-weight: 650; }
.chg { list-style: none; margin: 5px 0 0; padding: 0; }
.chg li { display: flex; align-items: baseline; gap: 8px; padding: 2px 0; }
.chg-mark { flex: none; width: 14px; text-align: center; font-size: 11px; }
.chg-up .chg-mark { color: var(--ok); }
.chg-down .chg-mark { color: var(--bad); }
.chg-flat .chg-mark { color: var(--text-3); }

/* Playbook. */
.pb-toc { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 14px; font-size: 13.5px; }
.pb { scroll-margin-top: calc(var(--topbar-h) + 10px); }
.pb > h2 { margin-bottom: 8px; }
.pb > * + * { margin-top: 10px; }
.pb p { max-width: 90ch; }
.defs { display: grid; grid-template-columns: minmax(120px, 190px) minmax(0, 1fr); gap: 8px 16px; margin: 0; }
.defs dt { font-weight: 650; }
.defs dd { margin: 0; color: var(--text-2); max-width: 80ch; }
.ladder { display: flex; flex-wrap: wrap; gap: 6px 0; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.ladder li { position: relative; padding: 5px 26px 5px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); margin-right: 18px; font-size: 13.5px; }
.ladder li:not(:last-child)::after { content: "→"; position: absolute; right: -15px; top: 4px; color: var(--text-3); }
.journey { margin: 0; padding: 0; list-style: none; counter-reset: j; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 10px; }
.journey li { counter-increment: j; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); }
.journey li > strong::before { content: counter(j) ". "; color: var(--text-3); }
.journey li p { margin-top: 3px; color: var(--text-2); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* Playbook: one continuous reading page, no cards. */
.pbx { max-width: 920px; min-width: 0; }
.pbx .table-wrap { overflow-x: auto; }
/* Ty, Nov 30: a sticky header inside a table's own scroll box covered the first rows. These tables are short: no sticky. */
.pbx .table-wrap > .table thead th { position: static; }
.pbx-toc ol { margin: 0 0 8px; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 13.5px; counter-reset: t; }
.pbx-toc li { counter-increment: t; }
.pbx-toc li::before { content: counter(t) ". "; color: var(--text-3); }
.pbx-part { scroll-margin-top: calc(var(--topbar-h) + 10px); padding-top: 28px; margin-top: 28px; border-top: 1px solid var(--line); }
.pbx-part > h2 { font-size: 22px; margin: 0 0 10px; }
.pbx h3 { font-size: 16px; margin: 22px 0 6px; text-transform: none; letter-spacing: normal; color: var(--text); font-weight: 650; }
.pbx p { max-width: 75ch; margin: 0 0 10px; line-height: 1.55; }
.pbx-list { list-style: disc; margin: 0 0 10px; padding-left: 20px; max-width: 75ch; line-height: 1.55; }
.pbx-list li + li { margin-top: 4px; }
.pbx-defs { margin: 6px 0 12px; line-height: 1.5; }
.pbx-day { list-style: none; margin: 8px 0 0 8px; padding: 0 0 0 4px; border-left: 2px solid var(--line); }
.pbx-day li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding: 0 0 14px 16px; position: relative; }
.pbx-day li::before { content: ""; position: absolute; left: -13px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); }
.pbx-when { font-family: var(--mono); font-size: 13px; color: var(--text-3); padding-top: 1px; }
.pbx-day p { color: var(--text-2); margin: 2px 0 0; }
.pbx-ladder { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 4px 0 8px; padding: 0; list-style: none; }
.pbx-ladder li { position: relative; display: grid; font-size: 13.5px; }
.pbx-ladder li:not(:last-child)::after { content: "\2192"; position: absolute; right: -16px; top: 0; color: var(--text-3); }
.pbx-ladder .meta { font-size: 12px; }
.pbx-step { margin-top: 18px; padding-top: 4px; }
.pbx-step h3 { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin-top: 18px; }
.pbx-n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); font-size: 12.5px; font-weight: 700; }
.pbx-stage { font-size: 12.5px; font-weight: 500; color: var(--text-3); text-transform: none; letter-spacing: normal; }
.pbx-goal { font-weight: 550; }
.pbx-watch { font-size: 12.5px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-3); margin: 8px 0 4px !important; }
.pbx-table td, .pbx-table th { vertical-align: top; }
.pbx-who { display: block; font-weight: 400; font-size: 12.5px; margin-top: 2px; }
@media (max-width: 760px) {
  .pbx-day li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .pbx-table thead { display: none; }
  /* The other tables (stages, HubSpot fields, routines) stack too, so nothing scrolls sideways on a phone. */
  .pbx .table:not(.pbx-table) thead { display: none; }
  .pbx .table:not(.pbx-table), .pbx .table:not(.pbx-table) tbody, .pbx .table:not(.pbx-table) tr,
  .pbx .table:not(.pbx-table) th, .pbx .table:not(.pbx-table) td { display: block; width: auto; }
  .pbx .table:not(.pbx-table) tr { padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .pbx .table:not(.pbx-table) th, .pbx .table:not(.pbx-table) td { border: 0; padding: 2px 0; white-space: normal; }
  .pbx-table, .pbx-table tbody, .pbx-table tr, .pbx-table th, .pbx-table td { display: block; width: auto; }
  .pbx-table tr { padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .pbx-table th, .pbx-table td { border: 0; padding: 2px 0; }
  .pbx-table td:nth-of-type(1)::before { content: "Owns: "; font-weight: 650; }
  .pbx-table td:nth-of-type(2)::before { content: "Lands: "; font-weight: 650; }
  .pbx-table td:nth-of-type(3)::before { content: "Misses: "; font-weight: 650; }
}

@media (max-width: 1100px) {
  .today { grid-template-columns: minmax(0, 1fr); }
  .today-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
  .today-side > .card + .card { margin-top: 0; }
}
@media (max-width: 760px) {
  .shell > .rail { position: fixed; height: 100dvh; }
  .search { flex: 1 1 auto; max-width: none; margin: 0 4px; }
  .search input.search-input { padding-right: 10px; }
  .topbar .who { flex: none; }
  .search-kbd { display: none; }
  .brand-top { display: none; }
  .who-name { display: none; }
  .search-results { position: fixed; top: 52px; left: 8px; right: 8px; }
  .wq-row { flex-direction: column; gap: 4px; }
  .wq-side { text-align: left; }
  .wq-sub { display: none; }
  .defs { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .defs dd { margin-bottom: 8px; }
  .feed-row { grid-template-columns: minmax(0, 1fr); }
}
/* Settings, MQL posts: the post gate. */
.card-off { border-color: var(--bad); background: var(--bad-soft); }
.count { display: inline-block; min-width: 22px; padding: 0 7px; border-radius: 11px; background: var(--surface-2); color: var(--text-2); font-size: 12px; font-weight: 700; line-height: 22px; text-align: center; }
.held { list-style: none; margin: 0; padding: 0; }
.held-post { padding: 10px 0; border-top: 1px solid var(--line); }
.held-post:first-child { border-top: 0; padding-top: 0; }
.held-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.held-actions { margin-left: auto; display: inline-flex; gap: 6px; }
.held-body { margin: 8px 0 0; padding: 10px 12px; background: var(--surface-2); border-radius: var(--radius); font: inherit; white-space: pre-wrap; overflow-wrap: anywhere; max-width: 80ch; }

/* The core app and Explore (Nov 25). */
.rail-note { margin: 16px 10px 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12.5px; line-height: 1.45; color: var(--text-3); }
.ex-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.ex-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.ex-card p { margin-top: 4px; color: var(--text-2); font-size: 13.5px; }
.ex-title { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; }
.ex-grid-quiet .ex-card { background: transparent; }
.ex-own > * + * { margin-top: 10px; }
.ex-own p { max-width: 86ch; }
.ex-steps { margin: 0; padding-left: 20px; max-width: 86ch; }
.ex-steps li + li { margin-top: 6px; }
.ex-prompt-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; max-width: 86ch; }
.ex-prompt { margin: 6px 0 0; padding: 12px 14px; background: var(--surface-2); border-radius: var(--radius); font: 12.5px/1.5 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; max-width: 86ch; }
.table-deals .c-step { max-width: 34ch; }
.table-deals .tag + .tag { margin-left: 4px; }
.table-deals td:last-child { min-width: 180px; }
.bell-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bell-clear { border: 0; background: none; padding: 2px 4px; color: var(--accent-text); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.bell-clear:hover { text-decoration: underline; }
.ex-steps { list-style: decimal; }

.ex-starters { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin-top: 10px; }
.ex-starter { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius); cursor: pointer; }
.ex-starter.is-on { border-color: var(--accent); background: var(--accent-soft); }
.ex-starter input { margin-top: 3px; accent-color: var(--accent); }
.ex-starter-body { display: flex; flex-direction: column; gap: 3px; font-size: 13.5px; color: var(--text-2); }
.ex-starter-body strong { color: var(--text); font-size: 14.5px; }

/* ---------------------------------------------------------------- the sample, the first run, the walkthrough */

/* The bar that says the data is made up. It stays on every screen for as long as the sample is on. */
.sample-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 8px 20px; background: var(--warn-soft); color: var(--warn); border-bottom: 1px solid var(--line); font-size: 13.5px; }
.sample-bar p { margin: 0; min-width: 0; flex: 1 1 320px; }
.sample-bar strong { font-weight: 700; }
.sample-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.sample-bar .btn { color: var(--text); }
.sample-bar .btn-primary { color: var(--accent-ink); }

.welcome { border-color: var(--accent-line); background: var(--accent-soft); margin-bottom: 12px; }
.welcome h2 { font-size: 18px; }
.welcome p { margin-top: 6px; max-width: 80ch; }
.welcome-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 12px; }

.su { max-width: 880px; }
.su-head { margin-bottom: 16px; }
.su-head h1 { font-size: 24px; }
.su-count { margin-bottom: 2px; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); }
.su-sub { margin-top: 4px; color: var(--text-2); max-width: 76ch; }
.su-bar { display: flex; gap: 6px; margin-top: 12px; }
.su-bar span { flex: 1 1 0; max-width: 120px; height: 4px; border-radius: 2px; background: var(--line-strong); }
.su-bar span.is-on { background: var(--accent); }
.su .card + .card { margin-top: 12px; }
.su-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.su-choices .card + .card { margin-top: 0; }
.su-choice h2 { font-size: 16px; }
.su-choice > * + * { margin-top: 8px; }
.su-choice-main { border-color: var(--accent-line); background: var(--accent-soft); }
.su-aside { margin-top: 12px; }
.su-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 16px; }
.su-foot-note { flex: 1 1 200px; color: var(--text-2); font-size: 13px; }
.su-rows { list-style: none; margin: 0; padding: 0; }
.su-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.su-row:first-child { border-top: 0; padding-top: 2px; }
.su-row:last-child { padding-bottom: 2px; }
.su-row.is-done .step-mark { border-color: var(--ok); }
.su-row-body p { margin-top: 2px; color: var(--text-2); font-size: 13.5px; max-width: 64ch; }
.su-row-act { max-width: 240px; text-align: right; }
.su-picks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 4px 20px; }
.su-pick { display: flex; gap: 10px; align-items: flex-start; padding: 8px 6px; border-radius: var(--radius); cursor: pointer; }
.su-pick:hover { background: var(--surface-2); }
.su-pick input { margin-top: 3px; accent-color: var(--accent); flex: none; }
.su-pick-body { display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; color: var(--text-2); min-width: 0; }
.su-pick-body strong { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--text); font-size: 14px; }
.su-pick-body strong .meta { font-weight: 400; }

.ex-ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: 4px; }
.ex-ways .card { margin-top: 0; }
.ex-way h3 { font-size: 15px; text-transform: none; letter-spacing: 0; color: var(--text); }
.ex-way > * + * { margin-top: 6px; }
.ex-way p { color: var(--text-2); font-size: 13.5px; }
.ex-act { margin-top: 8px; }
.bd-form > * + * { margin-top: 12px; }
.bd-form input[type="text"], .bd-form textarea { width: 100%; max-width: 720px; }
.bd-label { font-weight: 600; font-size: 13.5px; }
.bd-details summary { cursor: pointer; font-weight: 600; }
.bd-details[open] summary { margin-bottom: 8px; }

@media (max-width: 760px) {
  .sample-bar { padding: 8px 12px; }
  .su-row { grid-template-columns: 22px minmax(0, 1fr); }
  .su-row-act { grid-column: 2; max-width: none; text-align: left; }
  .su-foot .btn { flex: 1 1 auto; text-align: center; }
}

/* ---------------------------------------------------------------- the GTM update and the shared login */

.signin-team, .signin-guest { display: flex; flex-direction: column; gap: 10px; }
.signin-team h2, .signin-guest h2 { font-size: 14px; }
.signin-guest { margin-top: 10px; padding-top: 20px; border-top: 1px solid var(--line); }
.signin .muted { color: var(--text-2); font-size: 13.5px; }
.shell-guest { display: block; }
.shell-guest .main { max-width: 980px; margin: 0 auto; }
.brand-guest { font-weight: 700; }

.gu { max-width: 940px; }
.gu > .card + .card { margin-top: 12px; }
.gu-note p { font-size: 16px; line-height: 1.55; max-width: 76ch; }
.gu-note p + p { margin-top: 8px; }
.gu-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px 20px; margin: 0; }
.gu-tile { display: flex; flex-direction: column; min-width: 0; }
.gu-tile dt { order: 2; color: var(--text-2); font-size: 13.5px; font-weight: 600; }
.gu-tile dd { order: 1; margin: 0; font-size: 28px; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
.gu-tile .meta { order: 3; margin-top: 2px; font-size: 12.5px; }
.gu-list { list-style: none; margin: 0; padding: 0; }
.gu-list li { padding: 10px 0; border-top: 1px solid var(--line); }
.gu-list li:first-child { border-top: 0; padding-top: 2px; }
.gu-list li:last-child { padding-bottom: 2px; }
.gu-list p { margin-top: 3px; color: var(--text-2); max-width: 84ch; }
.gu-who { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.gu-ask { display: flex; gap: 8px; }
.gu-ask input { flex: 1 1 auto; min-width: 0; }
.gu-ideas { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.gu-answers:not(:empty) { margin-top: 12px; }
.gu-answer { padding: 10px 12px; border-radius: var(--radius); background: var(--surface-2); }
.gu-answer + .gu-answer { margin-top: 8px; }
.gu-q { font-weight: 600; margin-bottom: 3px; }
.gu-foot { margin-top: 14px; }

.gu-edit { max-width: 980px; }
.gu-edit > .card + .card { margin-top: 12px; }
.gu-edit textarea { width: 100%; }
.gu-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.gu-rows { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.gu-row { display: grid; grid-template-columns: minmax(140px, 1.3fr) minmax(70px, .6fr) minmax(140px, 1.6fr) minmax(90px, .7fr) auto; gap: 6px; align-items: center; }
.gu-row input { min-width: 0; width: 100%; }
.gu-pick { list-style: none; margin: 0; padding: 0; }
.gu-pick li { align-items: start; display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.gu-pick li:first-child { border-top: 0; }
.gu-pick input[type="checkbox"] { margin-top: 4px; accent-color: var(--accent); }
.gu-pick-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.gu-preview { padding: 14px; border: 1px dashed var(--line-strong); border-radius: var(--radius); max-width: 980px; }
.gu-access > * + * { margin-top: 10px; }
.gu-access input { max-width: 260px; }
.gu-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.gu-secret code { font-size: 15px; font-weight: 700; user-select: all; }

@media (max-width: 760px) {
  .gu-row { grid-template-columns: 1fr 1fr; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
  .gu-ask { flex-direction: column; }
  .gu-tile dd { font-size: 24px; }
}

.gu-raw { max-height: 360px; overflow: auto; }

/* Web analytics */
.web-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 12px; }
.web-when { margin-bottom: 12px; }
.web-small .gu-tile dd { font-size: 22px; }
.web-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 16px; align-items: start; margin-bottom: 12px; }
.web-grid .card { margin: 0; min-width: 0; }
.web-table td.num, .web-table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.web-table .web-name { overflow-wrap: anywhere; }


/* The welcome sits over everything the first time. */
.welcome-scrim { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(15, 23, 42, .55); overflow: auto; }
.welcome-box { width: 100%; max-width: 620px; max-height: 100%; overflow: auto; padding: 26px 28px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line-strong); box-shadow: 0 24px 60px rgba(0, 0, 0, .3); }
.welcome-box h2 { font-size: 22px; }
.welcome-box h3 { margin-top: 18px; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); }
.welcome-box p { margin-top: 10px; }
.welcome-lead { font-size: 16px; color: var(--text-2); }
.welcome-list { list-style: none; margin: 8px 0 0; padding: 0; }
.welcome-list li { padding: 10px 0; border-top: 1px solid var(--line); }
.welcome-list li:first-child { border-top: 0; }
.welcome-box .welcome-tools { margin-top: 18px; }
.setup-bar { background: var(--accent-soft); color: var(--text); }
@media (max-width: 760px) { .welcome-box { padding: 20px 18px; } .welcome-scrim { align-items: flex-start; } }

.bd-claim { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.bd-claim .field { flex: 0 1 280px; }
.bd-step > * + * { margin-top: 8px; }

/* ---------------------------------------------------------------- the short pages */
.as { max-width: 820px; }
.as > .card + .card { margin-top: 12px; }
.as .card > h2 { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); margin-bottom: 8px; }
.as .card > h3, .as-deal + h3 { margin: 14px 0 4px; font-size: 13.5px; font-weight: 650; text-transform: none; letter-spacing: 0; color: var(--text); }
.as .lead { font-size: 18px; line-height: 1.45; font-weight: 550; }
.as-list { margin: 6px 0 0; padding-left: 20px; max-width: 76ch; list-style: disc; }
.as-list li + li { margin-top: 5px; }
.as-facts { display: flex; flex-wrap: wrap; gap: 10px 32px; margin: 0; }
.as-facts dt { color: var(--text-3); font-size: 12.5px; }
.as-facts dd { margin: 0; font-weight: 600; }
.as-deal + .as-deal { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.as-note { margin-top: 14px; }
.as-note-form textarea { width: 100%; }
.as-note-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 8px; }
.as-mores { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.as-more { border-top: 1px solid var(--line); }
.as-more:first-child { border-top: 0; }
.as-more > summary { display: flex; align-items: center; gap: 8px; padding: 10px 14px; cursor: pointer; font-weight: 600; }
.as-more > summary .count { font-weight: 700; }
.as-more-body { padding: 2px 14px 14px; }
.as-log { list-style: none; margin: 0; padding: 0; }
.as-log li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); }
.as-log li:first-child { border-top: 0; }
.as-log-date { color: var(--text-2); font-size: 13px; }
.as-foot { margin-top: 16px; }
.pl-how { margin-top: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.ladder-short { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 560px; flex: 0 1 560px; }
.lp-who { color: var(--text-2); }
.lp-quote { padding: 8px 12px; border-left: 3px solid var(--line-strong); background: var(--surface-2); border-radius: 0 var(--radius) var(--radius) 0; }
.lead-move-short { display: flex; gap: 8px; }
.lead-move-short select { flex: 1 1 auto; min-width: 0; }
.panel-body .as-mores { margin-top: 14px; }
@media (max-width: 760px) { .as-log li { grid-template-columns: 1fr; gap: 0; } .ladder-short { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.theme-pick { display: flex; flex-wrap: wrap; gap: 8px; }

/* Punchlist priority */
.pl-guide { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; margin-bottom: 8px; border-radius: var(--radius); background: var(--accent-soft); font-size: 13px; line-height: 1.45; }
.pl-guide p { flex: 1 1 240px; margin: 0; }
.pl-star { display: inline-flex; align-items: center; gap: 2px; padding: 2px 4px; border: 0; background: none; color: var(--text-3); font-size: 16px; line-height: 1; cursor: pointer; border-radius: 4px; }
.pl-star:hover { color: var(--warn); background: var(--surface-2); }
.pl-star.on { color: #d49a00; }
.pl-ai { font-size: 9.5px; font-weight: 800; letter-spacing: .04em; padding: 1px 4px; border-radius: 4px; background: var(--accent-soft); color: var(--accent-text); }
.pl-owner { max-width: 220px; }

/* Today */
.td-setup { margin-bottom: 12px; padding: 0; }
.td-setup > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 10px 16px; cursor: pointer; }
.td-setup .td-next { margin-left: auto; }
.td-setup[open] > summary { border-bottom: 1px solid var(--line); }
.td-steps { list-style: none; margin: 0; padding: 10px 16px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px 18px; }
.td-steps li { display: flex; align-items: center; gap: 8px; }
.td-steps li.is-done a { color: var(--text-3); text-decoration: line-through; }
.td-steps input { accent-color: var(--accent); }
.td-setup > p { padding: 6px 16px 12px; }
.today-main > .card + .card, .today-side > .card + .card { margin-top: 12px; }
.td-group + .td-group { margin-top: 12px; }
.td-group h3 { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.td-rows { list-style: none; margin: 0; padding: 0; }
.td-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; padding: 5px 0 5px 10px; border-left: 3px solid var(--line-strong); }
.td-row + .td-row { margin-top: 3px; }
.td-row.td-now { border-left-color: var(--bad-solid); }
.td-row.td-soon { border-left-color: #c58a12; }
.td-row .age { margin-left: auto; }
.td-meet { list-style: none; margin: 0; padding: 0; }
.td-meet li { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); }
.td-meet li:first-child { border-top: 0; }
.td-pri, .td-deals { list-style: none; margin: 0; padding: 0; }
.td-pri li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 6px; padding: 6px 0; border-top: 1px solid var(--line); }
.td-pri li:first-child, .td-deals li:first-child { border-top: 0; }
.td-star { color: #d49a00; display: inline-flex; gap: 2px; align-items: center; }
/* The sparkle tucks into the star's upper right, like a badge (Ty, Nov 26). */
.td-star, .pl-star { position: relative; }
.td-star .ai-spark, .pl-star .ai-spark { position: absolute; width: 8px; height: 8px; top: 1px; right: -7px; color: var(--text-3); pointer-events: none; }
.pl-star .ai-spark { top: -1px; right: -2px; }
.td-deals li { display: flex; flex-direction: column; padding: 6px 0; border-top: 1px solid var(--line); }

.su-row-wide { grid-template-columns: 22px minmax(0, 1fr) auto; align-items: start; }
.su-row-body > .su-key, .su-row-body > p + p { margin-top: 8px; }
.su-key-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.su-key-row input { flex: 1 1 220px; min-width: 0; }
.su-why { margin-bottom: 12px; }

/* Menu: folding sections and the editor */
.nav-group-btn { display: flex; align-items: center; gap: 6px; width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; text-align: left; }
.nav-car { font-size: 9px; transition: transform .15s; }
.nav-group.is-collapsed .nav-car { transform: rotate(-90deg); }
.nav-group-blank { margin-top: 10px; border-top: 1px solid var(--line); padding: 0; min-height: 0; }
.nav-edit-li { margin-top: 10px; }
.nav-edit-btn { border: 0; background: none; color: var(--text-3); font: inherit; font-size: 12.5px; cursor: pointer; padding: 4px 10px; }
.nav-edit-btn:hover { color: var(--accent-text); text-decoration: underline; }
.nav-ed-help { font-size: 12px; color: var(--text-3); padding: 0 6px 8px; line-height: 1.4; }
.nav-ed-group, .nav-ed-item { display: flex; align-items: center; gap: 6px; padding: 4px 6px; border-radius: var(--radius); cursor: grab; }
.nav-ed-group { margin-top: 10px; background: var(--surface-2); }
.nav-ed-item { margin-left: 12px; }
.nav-ed-item .nav-label { flex: 1; min-width: 0; font-size: 13.5px; }
.nav-name { flex: 1; min-width: 0; font-size: 12.5px; font-weight: 700; padding: 3px 6px; min-height: 28px; }
.nav-grip { color: var(--text-3); font-size: 11px; letter-spacing: -2px; }
.nav-arr { border: 0; background: none; color: var(--text-3); cursor: pointer; padding: 2px 4px; font-size: 12px; border-radius: 4px; }
.nav-arr:hover { background: var(--surface); color: var(--text); }
.nav-drop { outline: 2px dashed var(--accent); outline-offset: -2px; }
.nav-ed-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; padding: 0 6px; }

.rt-simple { list-style: none; margin: 0; padding: 0; }
.rt-simple li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.rt-simple li:first-child { border-top: 0; }
.rt-simple li > span:first-child { flex: 1 1 200px; font-weight: 600; }

.bd-checks { list-style: none; margin: 8px 0; padding: 0; }
.bd-checks li + li { margin-top: 8px; }
.bd-checks label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.bd-checks input { margin-top: 3px; accent-color: var(--accent); flex: none; }
.bd-checks .meta { display: inline; }
.bd-pre { border-color: var(--accent-line); }

/* Shipments table */
.sh-strip { display: grid; grid-template-columns: 2.2fr repeat(5, minmax(0, 1fr)); max-width: 980px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 10px; }
.sh-strip .rung + .rung { border-left: 1px solid var(--line); }
.sh-tools input { width: 100%; max-width: 520px; }
.sh-sum { margin: 6px 0 8px; }
.sh-ser { font-family: var(--mono); font-size: 12.5px; }
.sh-log { position: relative; }
.sh-log > summary { list-style: none; cursor: pointer; }
.sh-log > summary::-webkit-details-marker { display: none; }
.sh-log[open] > form { position: absolute; right: 0; top: 36px; z-index: 20; width: min(420px, 90vw); box-shadow: 0 12px 32px rgba(0,0,0,.2); }

/* Today, second pass (design review, Nov 25) */
.td-head h1 { font-size: 34px; letter-spacing: -0.02em; }
.td-askbox { margin: 4px 0 18px; }
.td-ask { display: flex; gap: 8px; max-width: 860px; }
.td-ask input { flex: 1 1 auto; min-width: 0; min-height: 42px; font-size: 15px; }
.td-answer:not(:empty) { margin-top: 10px; max-width: 860px; }
.td-sec + .td-sec { margin-top: 22px; }
.td-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.td-sec-head h2 { font-size: 19px; letter-spacing: -0.01em; }
.td-sec-head a, .td-linkbtn { font-size: 13.5px; font-weight: 600; }
.td-linkbtn { border: 0; background: none; color: var(--accent-text); cursor: pointer; padding: 0; font-family: inherit; }
.td-fu { list-style: none; margin: 0; padding: 0; }
.td-fu li { padding: 14px 18px; border-top: 1px solid var(--line); border-left: 3px solid transparent; }
.td-fu li:first-child { border-top: 0; }
.td-fu li.is-first { border-left-color: var(--accent); }
.td-fu-top { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.td-fu-acct { font-weight: 650; color: var(--text-2); }
.td-fu-title { display: block; margin-top: 3px; font-size: 18px; font-weight: 650; line-height: 1.3; color: var(--text); }
.td-fu-title:hover { color: var(--accent-text); }
.td-fu-why { margin-top: 4px; color: var(--text-2); max-width: 70ch; }
.td-nm-time { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.td-nm-title { margin-top: 10px; font-size: 17px; font-weight: 650; }
.td-nm > p + p { margin-top: 6px; }
.td-nm-rest { list-style: none; margin: 14px 0 0; padding: 10px 0 0; border-top: 1px solid var(--line); }
.td-nm-rest li { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px; padding: 4px 0; font-size: 13.5px; }
.td-tw-sub { margin: -4px 0 8px; }
.td-watch { list-style: none; margin: 0; padding: 0; }
.td-watch li { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; background: var(--surface-2); border-radius: var(--radius); border-left: 3px solid var(--line-strong); }
.td-watch li + li { margin-top: 6px; }
.td-watch li.td-now { border-left-color: var(--bad-solid); }
.td-watch li.td-soon { border-left-color: #c58a12; }
.td-watch a { flex: none; font-weight: 600; font-size: 13.5px; }
@media (max-width: 760px) { .td-ask { flex-direction: column; } .td-head h1 { font-size: 28px; } .td-fu-top { flex-direction: column; gap: 0; } .td-watch li { flex-direction: column; align-items: flex-start; gap: 4px; } }

/* Punchlist item, the plain form */
.pl-det-plain .pl-det-acct { font-size: 13.5px; color: var(--text-2); margin-bottom: 4px; }
.pl-det-plain .pl-det-t { font-size: 24px; line-height: 1.25; letter-spacing: -0.01em; }
.pl-det-from { margin: 8px 0 14px; font-size: 13.5px; color: var(--text-2); }
.pl-det-from a { color: inherit; text-decoration: underline; }
.pl-det-plain .pl-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 16px; }
.pl-hand { display: inline-flex; align-items: center; gap: 6px; }
.pl-det-plain .pl-det-b p { font-size: 15.5px; line-height: 1.55; max-width: 68ch; }
.pl-det-plain .pl-det-b p + p { margin-top: 8px; }
.pl-addctx { margin-top: 14px; border: 0; background: none; padding: 0; color: var(--accent-text); font: inherit; font-weight: 650; cursor: pointer; }

/* Business headline */
.bz-head { margin-bottom: 8px; }
.bz-scope { font-size: 12.5px; color: var(--text-3); }
.bz-num { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; margin-top: 4px; }
.bz-span { margin-top: 2px; font-weight: 600; }
.bz-warn { font-weight: 400; color: var(--warn); }
.bz-list { list-style: none; margin: 14px 0 10px; padding: 0; border-top: 1px solid var(--line); }
.bz-list li { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.bz-list a { flex: none; font-weight: 600; font-size: 13.5px; }

/* Deals on a phone: a card per deal, no sideways scroll */
@media (max-width: 760px) {
  .table-deals, .table-deals tbody, .table-deals tr, .table-deals th, .table-deals td { display: block; width: auto; }
  .table-deals thead { display: none; }
  .table-deals tr { padding: 12px 4px; border-top: 1px solid var(--line); cursor: pointer; }
  .table-deals tr:first-child { border-top: 0; }
  .table-deals th, .table-deals td { padding: 2px 0; border: 0; white-space: normal; text-align: left; }
  .table-deals th { font-size: 15.5px; }
  .table-deals td[data-label]::before { content: attr(data-label) ": "; color: var(--text-3); }
  .table-deals .md-more { display: none; }
  .table-deals tr.is-open .md-more { display: block; }
  .table-deals .md-off { margin-top: 4px; }
  .card > .table-wrap:has(.table-deals) { overflow-x: visible; }
  .bz-list li { flex-direction: column; gap: 2px; }
}

/* Tools */
.tl-grid { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.tl-card > * + * { margin-top: 8px; }
.tl-card h2 { font-size: 17px; }
.tl-login { margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--line); }
.tl-login div { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 8px; align-items: center; padding: 3px 0; }
.tl-login dt { color: var(--text-3); font-size: 12.5px; }
.tl-login dd { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tl-login code { user-select: all; }
.tl-row { margin-bottom: 10px; }
.tl-row-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-bottom: 8px; }
.tl-row-grid input { width: 100%; }

/* Punchlist closeout tools (Ty, Nov 28). */
.pl-closebar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: -2px 0 10px; font-size: 13px; }
.pl-own { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; color: var(--text-2); cursor: pointer; }
.pl-own input { accent-color: var(--accent); }

/* Folding menu (Ty, Nov 28): icons only, desktop. */
.rail-toggle { flex: none; width: 28px; height: 28px; border: 0; border-radius: 6px; background: none; color: var(--text-3); font-size: 16px; line-height: 1; cursor: pointer; }
.rail-toggle:hover { background: var(--surface-2); color: var(--text); }
.rail-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
@media (min-width: 761px) {
  .shell.rail-min { grid-template-columns: 56px minmax(0, 1fr); }
  .shell.rail-min .rail { padding: 0 6px 12px; }
  .shell.rail-min .rail-top { justify-content: center; }
  .shell.rail-min .rail-top .brand, .shell.rail-min .nav-label, .shell.rail-min .nav-group, .shell.rail-min .rail-note,
  .shell.rail-min .nav-edit-li, .shell.rail-min .nav-link .badge { display: none; }
  .shell.rail-min .nav-link { justify-content: center; padding: 8px 0; }
}
@media (max-width: 760px) { .rail-toggle { display: none; } }

/* ---------------------------------------------------------------- Today, compact (Ty, Nov 28) */
.td2-pagehead { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.td2-pagehead h1 { font-size: 28px; letter-spacing: -0.02em; margin: 0; }
.today { gap: 14px; }
.today-main > .td2 + .td2, .today-side > .td2 + .td2, .today-side > .card + .td2, .today-side > .td2 + .card { margin-top: 14px; }
.td2 { padding: 0; }
.td2-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px 10px; border-bottom: 1px solid var(--line); }
.td2-head h2 { font-size: 15px; font-weight: 650; margin: 0; }
.td2-more { margin-left: auto; font-size: 13px; font-weight: 600; }
.td2-list { list-style: none; margin: 0; padding: 0; }
.td2-row { display: flex; align-items: baseline; gap: 12px; padding: 9px 16px; border-top: 1px solid var(--line); }
.td2-row:first-child { border-top: 0; }
.td2-main { flex: 1 1 auto; min-width: 0; }
.td2-title { font-size: 14.5px; font-weight: 600; color: var(--text); line-height: 1.35; }
a.td2-title:hover { color: var(--accent-text); }
.td2-sub { margin: 1px 0 0; font-size: 13px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td2-sub b { font-weight: 600; color: var(--text-2); }
.td2-side { flex: 0 0 auto; font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; }
.td2-star { color: #d49a00; margin-right: 6px; font-size: 13px; }
.td2-time { font-weight: 600; color: var(--text-2); }
.td2-time.next { color: var(--accent-text); }
.td2-late { color: var(--bad-solid, #c62f2f); font-weight: 600; }
.td2-now .td2-sub { color: var(--text-2); }
.td2-empty { margin: 0; padding: 12px 16px; font-size: 13.5px; color: var(--text-3); }
@media (max-width: 760px) { .td2-sub { white-space: normal; } }
.td2-star { position: relative; }
.td2-star .ai-spark { position: absolute; width: 8px; height: 8px; top: 1px; right: -7px; color: var(--text-3); pointer-events: none; }
/* Tools as a table (Ty, Nov 28): tool, what it is for, how to sign in. */
.tl-table .tl-name { white-space: nowrap; font-weight: 600; vertical-align: top; }
.tl-table .tl-desc { min-width: 220px; vertical-align: top; }
.tl-table .tl-signin { vertical-align: top; min-width: 240px; }
.tl-table .tl-signin .tl-login { margin: 0; padding-top: 0; border-top: 0; }
.tl-table .tl-signin .tl-login div { padding: 0 0 2px; }
.tl-table .tl-signin .meta { margin-top: 4px; }

/* ---------------------------------------------------------------- Today's optional cards (Ty, Nov 30) */
.tc-slot:empty { display: none; }
.tc-slot > .td2 + .td2 { margin-top: 14px; }
.today-main > .tc-slot:not(:empty) + .td2, .today-side > .tc-slot + .td2, .today-side > .td2 + .tc-slot:not(:empty) { margin-top: 14px; }
.tc-slot { min-width: 0; }
.tc-slot:not(:empty) + .today { margin-top: 14px; }
.tc-body { padding: 12px 16px 14px; display: flex; flex-direction: column; gap: 10px; }
.tc-lead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.tc-big { font-size: 26px; font-weight: 700; line-height: 1.1; letter-spacing: -0.01em; }
.tc-bar { position: relative; height: 10px; border-radius: 5px; background: var(--surface-2); }
.tc-bar > i { position: absolute; inset: 0 auto 0 0; border-radius: 5px; background: var(--accent); }
.tc-bar.ok > i { background: var(--ok); } .tc-bar.warn > i { background: var(--warn); } .tc-bar.bad > i { background: var(--bad-solid, var(--bad)); }
.tc-bar > b { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--text); }
.tc-key { margin: -4px 0 0; display: flex; align-items: center; gap: 6px; }
.tc-mark { display: inline-block; width: 2px; height: 12px; background: var(--text); }
.tc-sides { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px 20px; }
.tc-side { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tc-side-h { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.tc-side .tc-deals { margin: 0 -16px; }
.tc-side .td2-row { padding-left: 16px; padding-right: 16px; }
.tc-goalform { display: flex; flex-wrap: wrap; align-items: end; gap: 8px 12px; padding: 10px 12px; border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.tc-gf { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; color: var(--text-3); }
.tc-gf input { width: 140px; }
.tc-gh { display: flex; align-items: center; gap: 6px; margin: 0; padding: 10px 16px 4px; font-size: 12px; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-3); border-top: 1px solid var(--line); }
.tc-gh:first-child { border-top: 0; }
.tc-gh.bad { color: var(--bad); } .tc-gh.warn { color: var(--warn); }
.tc-gh + .td2-list > .td2-row:first-child { border-top: 0; }
.tc-tick { align-items: flex-start; }
.tc-tick > input { margin: 3px 0 0; width: 16px; height: 16px; flex: none; accent-color: var(--accent); }
.tc-foot { padding: 8px 16px 12px; margin: 0; border-top: 1px solid var(--line); }
.tc-rm { font-size: 12.5px; color: var(--text-3); }
.tc-add { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line-strong); }
.td2-head .td2-more { display: flex; align-items: center; gap: 10px; }
.tc-money { font-weight: 650; }
.tc-pill { display: inline-block; font-size: 12px; font-weight: 650; border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.tc-pill.ok { background: var(--ok-soft); color: var(--ok); } .tc-pill.bad { background: var(--bad-soft); color: var(--bad); }
/* The punchlist's Handed to you section (Ty, Nov 30). */
.pl-hand { list-style: none; margin: 0; padding: 0; }
.pl-hand-r { display: flex; gap: 10px; align-items: flex-start; padding: 8px 12px; border-top: 1px solid var(--line); }
.pl-hand-r:first-child { border-top: 0; }
.pl-hand-r input { margin-top: 3px; width: 16px; height: 16px; flex: none; accent-color: var(--accent); }
.pl-hand-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tc-wrap .td2-sub { white-space: normal; }
.tc-body > .td-linkbtn { align-self: flex-start; }

/* Shipments (Rebecca, Nov 30): sortable headers and a Columns menu. */
.sh-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sh-sort { border: 0; background: none; padding: 0; font: inherit; color: inherit; font-weight: inherit; cursor: pointer; text-align: inherit; white-space: nowrap; }
.sh-sort:hover, .sh-sort.on { color: var(--accent-text); }
.sh-cols { position: relative; }
.sh-cols > summary { list-style: none; }
.sh-cols > summary::-webkit-details-marker { display: none; }
.sh-cols-menu { position: absolute; z-index: 20; top: calc(100% + 4px); right: 0; min-width: 190px; display: flex; flex-direction: column; gap: 6px;
  padding: 10px 12px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.sh-cols-menu label { display: flex; align-items: center; gap: 6px; font-size: 13.5px; white-space: nowrap; }
@media (max-width: 760px) { .sh-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); } .sh-strip .rung:first-child { grid-column: 1 / -1; } .sh-cols-menu { left: 0; right: auto; } }
.sh-sortpick { display: none; }
@media (max-width: 760px) { .sh-sortpick { display: inline-block; } }

/* Cards scrolled into view clear the sticky top bar (Nov 30 audit). */
.tc-slot > .td2 { scroll-margin-top: calc(var(--topbar-h) + 12px); }
.is-reloading { opacity: .55; transition: opacity .15s; pointer-events: none; }
.td-askrow { display: flex; align-items: center; gap: 10px; } .td-askrow > .td-ask { flex: 1 1 auto; min-width: 0; }

/* Lead funnel: view switch beside the window, and the Enterprise (Top Down) funnel (Nov 30). */
.fn-controls { display: flex; flex-wrap: wrap; gap: 8px; }
.tdf-funnel { display: grid; gap: 6px; padding: 4px 0 8px; }
.tdf-row { border: 0; background: none; font: inherit; color: inherit; text-align: left; width: 100%; padding: 2px 4px; border-radius: 6px; cursor: pointer; display: grid; grid-template-columns: minmax(110px, 160px) 1fr 84px; align-items: center; gap: 12px; }
.tdf-label { font-size: 0.9rem; color: var(--text); }
.tdf-track { display: flex; justify-content: center; height: 28px; }
.tdf-bar { display: block; height: 100%; background: var(--accent); border-radius: 4px; min-width: 0; transition: width 0.2s; }
.tdf-row:hover .tdf-bar { filter: brightness(1.1); }
.tdf-num { font-variant-numeric: tabular-nums; text-align: right; font-weight: 600; }
.tdf-pct { font-weight: 400; color: var(--text-3); font-size: 0.85rem; }
@media (max-width: 560px) { .tdf-row { grid-template-columns: 96px 1fr 64px; gap: 8px; } }
.tdf-row:disabled { cursor: default; }
.tdf-row:hover:not(:disabled), .tdf-row.is-open { background: var(--accent-soft); }
.tdf-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.tdf-panel { margin: 2px 0 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); }
.tdf-cos { margin: 4px 0 0; padding: 0; list-style: none; columns: 2 260px; column-gap: 24px; }
.tdf-cos li { break-inside: avoid; padding: 2px 0; }
.tdf-note { margin: -4px 0 8px; }
.tdf-callout { margin: 0 0 12px; padding: 10px 14px; border: 1px solid var(--warn-soft); border-left: 3px solid var(--warn); border-radius: 6px; background: var(--warn-soft); color: var(--text); font-size: 0.92rem; }

/* ---------------------------------------------------------------- Brandan's version (Dec 1): Shipping and Today */

.bs-tabs { position: static; margin-bottom: 12px; background: none; }
.bs-tabs .tab { font-size: 14px; padding: 10px 12px 8px; }
.bs-stops { margin-bottom: 12px; }
.bs-stop { align-items: center; text-align: center; }
.bs-stop .rung-n { display: inline-flex; align-items: center; gap: 7px; }
.bs-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--text-3)); display: inline-block; }
.bs-transit, .bs-in_production { --c: var(--accent); }
.bs-out, .bs-to_ship { --c: var(--warn); }
.bs-delivered, .bs-shipped { --c: var(--ok); }
.bs-exception { --c: var(--bad); }
.bs-tools input[type="search"] { flex: 1 1 260px; }
.bs-card { padding: 12px 16px; margin-bottom: 10px; }
.bs-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.bs-co { font-size: 15px; }
.bs-pill { margin-left: auto; display: inline-flex; gap: 6px; }
.bs-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px 16px; margin: 10px 0 0; }
.bs-facts dt { font-size: 11.5px; color: var(--text-3); }
.bs-facts dd { margin: 0; font-size: 13px; overflow-wrap: anywhere; }
.bs-mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; }
.bs-fx { margin: 8px 0 0; }
.bs-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin-top: 14px; padding: 12px 16px;
  text-decoration: none; color: var(--text); }
.bs-strip:hover { background: var(--surface-2); }
.bs-strip b { font-size: 15px; }
.bs-strip .bs-go { margin-left: auto; font-weight: 600; color: var(--accent-text); }
.td2-store { margin-left: 6px; vertical-align: 1px; }
@media (max-width: 700px) {
  .bs-facts { grid-template-columns: 1fr 1fr; }
  .bs-stops { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .bs-stops .rung:nth-child(n+4) { border-top: 1px solid var(--line); }
  .bs-stops .rung:nth-child(4) { border-left: 0; }
  .bs-strip .bs-go { margin-left: 0; }
}
