/* Trade Management Pro. Warm paper, ink, one orange for the next action. Plain CSS, no framework. */
@font-face { font-family: 'IBM Plex Sans'; src: url(fonts/plex-400.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'IBM Plex Sans'; src: url(fonts/plex-500.woff2) format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'IBM Plex Sans'; src: url(fonts/plex-600.woff2) format('woff2'); font-weight: 600; font-display: swap; }

:root {
  /* TMP design system: TMP orange, blue and industrial charcoal on light surfaces. */
  --bg: #F4F5F7; --surface: #FFFFFF; --surface-2: #EEF0F3; --hover: #E4E7EB; --row-hover: #F8F9FA;
  --line: #DFE3E8; --line-strong: #98A0A9; --btn-line: #C8CDD4;
  --ink: #262C31; --ink-2: #454D55; --muted: #66707A;
  --brand: #FC5800; --brand-hover: #E04F00; --brand-tint: #FFF0E6; --brand-ink: #262C31; /* one orange (the logo's, #FC5800): text that sits on orange tints is dark, never a second orange */
  --accent: #FC5800; --blue: #0050B8; --blue-tint: #E8F0FB;
  --red: #B3261E; --red-tint: #FCEEEC; --amber: #8A5300; --amber-tint: #FDF3DC; --green: #1D6B3F; --green-tint: #E7F3EB;
  --note: #FFF8DB; --dot: #A8A29A;
  --r-sm: 8px; --r: 10px; --r-lg: 12px;
  --shadow: 0 8px 24px rgba(28, 27, 25, .12);
  --font: 'IBM Plex Sans', system-ui, 'Segoe UI', Roboto, sans-serif;
  --rail: 240px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 15px/1.5 var(--font); color: var(--ink); background: var(--bg); }
a { color: inherit; text-decoration: none; }
.content a:not(.btn):not(.strip-cell):not(.job-card):not(.chip):not(.todo-link):not(.nav-item):hover, .link:hover { text-decoration: underline; text-underline-offset: 3px; }
h1 { font-size: 24px; line-height: 30px; font-weight: 600; letter-spacing: -.01em; margin: 0; }
h2 { font-size: 16px; line-height: 24px; font-weight: 600; margin: 0; }
h3 { font-size: 15px; font-weight: 600; margin: 0; }
p { margin: 0 0 .6em; }
button, input, select, textarea { font: inherit; color: inherit; }
.num, .tbl td.r, .tbl th.r { font-variant-numeric: tabular-nums; }
.r { text-align: right; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.nowrap .row { flex-wrap: nowrap; }
.po-bar { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 6px 16px; padding: 14px 20px; margin-bottom: 16px; }
.po-bar .po-label { font-weight: 600; white-space: nowrap; }
.po-bar .row { flex-wrap: nowrap; }
.po-bar input { width: 280px; min-width: 0; }
.po-bar .hint { grid-column: 2; }
@media (max-width: 640px) { .po-bar { grid-template-columns: minmax(0, 1fr); padding: 14px 16px; } .po-bar .hint { grid-column: 1; } .po-bar input { flex: 1; width: auto; } }
.tone-bad { color: var(--red) !important; }
.tone-warn { color: var(--amber) !important; }
.tone-good { color: var(--green) !important; }
.inline { display: inline; margin: 0; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ic { width: 18px; height: 18px; flex: none; }

/* ---------- app frame ---------- */
body.app { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); min-height: 100vh; }
/* Browser extensions add their own boxes to the page (one put a div first and pushed the menu across the screen):
   the menu and the page keep their own columns whatever else is there. */
body.app > .rail { grid-column: 1; grid-row: 1; }
body.app > .main { grid-column: 2; grid-row: 1; }
.rail { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 12px; padding: 16px 12px; background: var(--surface); border-right: 1px solid var(--line); overflow-y: auto; }
.rail-brand { display: flex; align-items: center; gap: 8px; padding: 2px 6px 6px; }
.rail-brand img { height: 40px; width: auto; }
.co { border-top: 1px solid var(--line); padding-top: 12px !important; }
.co .co-mark { width: 28px; height: 28px; font-size: 11px; }
.co .co-name { font-size: 14px; }
.co { display: flex; align-items: center; gap: 10px; padding: 4px 6px 4px; }
.co-mark { width: 32px; height: 32px; border-radius: 8px; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 600; flex: none; letter-spacing: .02em; }
.co-name { font-weight: 600; font-size: 15px; line-height: 1.25; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px; border-radius: var(--r-sm); color: var(--ink-2); font-weight: 500; font-size: 14px; border: 1px solid transparent; cursor: pointer; }
.nav-item .ic { color: var(--muted); }
.nav-item:hover { background: var(--hover); color: var(--ink); }
.nav-item.on { background: var(--brand-tint); border-color: transparent; color: var(--brand-ink); }
.nav-item.on .ic { color: var(--accent); }
.nav-item .count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 600; display: grid; place-items: center; }
button.nav-item { width: 100%; background: none; text-align: left; font: inherit; font-size: 14px; font-weight: 500; }
.rail-foot { margin-top: auto; display: flex; flex-direction: column; gap: 2px; border-top: 1px solid var(--line); padding-top: 10px; }
.rail-foot .me { width: 100%; }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; height: 56px; display: flex; align-items: center; gap: 16px; padding: 0 32px; background: rgba(244, 245, 247, .92); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.crumbs { font-size: 13px; color: var(--ink-2); display: flex; gap: 8px; align-items: center; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs .sep { color: var(--line-strong); }
/* Back to Inbox: on the page an Inbox item opened */
.back-link { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; margin: -8px 0 8px; font-size: 14px; font-weight: 600; color: var(--ink-2); text-decoration: none; }
.back-link .ic { width: 18px; height: 18px; }
.back-link:hover { color: var(--ink); }
/* Back in the top bar: up one level. Desktop: "Back" beside the breadcrumb; phones: the place it goes, in place of the logo. */
.top-back { display: inline-flex; align-items: center; gap: 4px; flex: none; min-height: 36px; padding: 0 10px 0 6px; margin-left: -6px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--ink); text-decoration: none; }
.top-back:hover { background: rgba(0, 0, 0, .05); }
.top-back .ic { width: 18px; height: 18px; flex: none; }
.top-back .tb-to { display: none; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-back + .crumbs { padding-left: 12px; border-left: 1px solid var(--line); }
/* The proposal preview and Print pages: Back above the document. */
.back-bar { max-width: 780px; margin: 0 auto; padding: 16px 16px 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 14px; color: var(--ink-2); }
.back-bar .btn .ic { width: 16px; height: 16px; }
.top-title { display: none; }
.search { position: relative; margin-left: auto; width: min(440px, 45vw); }
.search > .ic { position: absolute; left: 11px; top: 11px; color: var(--muted); pointer-events: none; }
.search input { width: 100%; height: 38px; padding: 0 12px 0 36px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.search input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(201, 71, 12, .18); }
.top .search-btn { display: none; }
.search-pop { position: absolute; top: 44px; left: 0; right: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; z-index: 40; }
.search-pop a { display: flex; gap: 10px; align-items: baseline; padding: 10px 12px; border-top: 1px solid var(--line); }
.search-pop a:first-child { border-top: 0; }
.search-pop a.sel, .search-pop a:hover { background: var(--surface-2); text-decoration: none !important; }
.search-pop .kind { font-size: 12px; color: var(--muted); width: 64px; flex: none; }
.search-pop .none { padding: 12px; color: var(--muted); }
.content { width: 100%; max-width: 1280px; margin: 0 auto; padding: 24px 32px 64px; }
.content.wide { max-width: none; }
body.is-field .content { max-width: 720px; }
.tabbar { display: none; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90; max-width: min(440px, calc(100vw - 32px)); padding: 12px 16px; border-radius: var(--r); background: var(--ink); color: #fff; font-size: 14px; box-shadow: var(--shadow); animation: toast-in .2s ease-out, toast-out .3s ease-in 4.2s forwards; }
.toast-bad { background: var(--red); animation: toast-in .2s ease-out; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }
@keyframes toast-out { to { opacity: 0; visibility: hidden; } }
.notice { padding: 10px 14px; border-radius: var(--r-sm); background: var(--green-tint); color: var(--green); font-size: 14px; }
.notice-bad { background: var(--red-tint); color: var(--red); }
.notice-warn { background: var(--amber-tint); color: var(--amber); }
.notice a { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.notice a.btn { text-decoration: none; }
.notice a.btn-primary { color: #fff; }
.notice-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 12px; }

/* ---------- record header ---------- */
.head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 24px; align-items: start; margin-bottom: 20px; }
.head-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.head-meta { margin-top: 4px; color: var(--ink-2); font-size: 14px; display: flex; gap: 6px 14px; flex-wrap: wrap; align-items: center; }
.head-meta a { color: var(--blue); text-decoration: underline; text-decoration-color: rgba(0, 80, 184, .35); text-underline-offset: 3px; }
.link, .auth-alt a, .tl-body a, .demo-bar a { color: var(--blue); }
.demo-bar { padding: 8px 32px; background: var(--blue-tint); color: var(--blue); font-size: 14px; font-weight: 500; border-bottom: 1px solid #CFE0F6; }
.demo-bar a { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.top-mark { display: none; }
.head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
@media (min-width: 761px) {
  .head-actions .btn-sm { height: 38px; padding: 0 14px; font-size: 14px; }
  /* The stage track already shows the stage. */
  .head:has(.track) .head-title > .dot-status, .head:has(.track) .head-title > .pill { display: none; }
}
.facts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 12px 36px; margin: 4px 0 0; }
.fact dt { font-size: 13px; color: var(--muted); }
.fact dd { margin: 2px 0 0; font-size: 16px; font-weight: 500; font-variant-numeric: tabular-nums; }
.track { grid-column: 1 / -1; list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.track li { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 99px; font-size: 13px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); }
.track li .ic { width: 14px; height: 14px; color: var(--green); }
.track li.done { color: var(--ink-2); }
.track li.now { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 500; }

/* ---------- next step ---------- */
.next { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 16px 20px; margin-bottom: 20px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--r-lg); }
.next-label { font-size: 13px; color: var(--muted); }
.next-text { font-size: 17px; font-weight: 600; }
.next .row { margin-left: auto; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { height: 40px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; color: var(--ink-2); font-weight: 500; font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none !important; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--ink); border-bottom-color: var(--brand); }
.tab-count { color: var(--muted); font-size: 13px; }

/* ---------- surfaces ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 24px; }
.panel.flush { padding: 0; overflow: hidden; }
.sect + .sect { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.sect-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.panel + .sect, .sect + .panel, .panel + .panel, .private + .sect { margin-top: 28px; }
.panel + .private, .sect + .private { margin-top: 16px; }
.sect-head + .empty { padding: 0 0 4px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.side { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 16px; }
.side .panel { padding: 16px 18px; }
.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; margin: 0; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; text-align: right; font-variant-numeric: tabular-nums; }
.kv dd.l { text-align: left; }
.private { background: var(--surface-2); border-radius: var(--r); padding: 14px 16px; }
.private-head { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.private-head .ic { width: 14px; height: 14px; }

/* ---------- strip of numbers ---------- */
.strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; margin-bottom: 24px; }
.strip-cell { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 16px 20px; border-left: 1px solid var(--line); min-width: 0; }
.strip-cell:first-child { border-left: 0; }
a.strip-cell:hover { background: var(--row-hover); }
.strip-label { font-size: 13px; color: var(--muted); }
.strip-value { font-size: 26px; line-height: 32px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; }
.strip-sub { font-size: 13px; color: var(--ink-2); }
.strip-cell .chev { position: absolute; right: 12px; top: 16px; width: 16px; height: 16px; color: var(--line-strong); opacity: 0; }
a.strip-cell:hover .chev { opacity: 1; }

/* ---------- tables ---------- */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 500; color: var(--muted); padding: 10px 12px; background: var(--surface-2); white-space: nowrap; }
.tbl td { padding: 12px; border-top: 1px solid var(--line); vertical-align: middle; }
.tbl th.r, .tbl td.r { text-align: right; }
.tbl td:first-child, .tbl th:first-child { padding-left: 20px; }
.tbl td:last-child, .tbl th:last-child { padding-right: 20px; }
.tbl tr.link-row { cursor: pointer; }
.tbl tr.link-row:hover td { background: var(--row-hover); }
.tbl td:first-child a { font-weight: 600; }
.tbl tfoot td { font-weight: 600; border-top: 2px solid var(--line); }
.tbl tr.row-bad td { background: #FFF8F7; }
.tbl .sub { display: block; font-size: 13px; color: var(--muted); font-weight: 400; }
.panel > .tbl-wrap { margin: 0 -24px; }
.panel.flush > .tbl-wrap { margin: 0; }
.bar { display: inline-block; width: 90px; height: 6px; border-radius: 3px; background: var(--surface-2); vertical-align: middle; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--ink-2); }
.bar.bad > i { background: var(--red); }

/* ---------- status ---------- */
.pill { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.pill-bad { background: var(--red-tint); color: var(--red); }
.pill-warn { background: var(--amber-tint); color: var(--amber); }
.pill-good { background: var(--green-tint); color: var(--green); }
.dot-status { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.dot-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--dot); }
.dot-status.is-live i { background: var(--brand); }
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; background: var(--surface-2); color: var(--ink-2); font-size: 12px; font-weight: 500; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: var(--r-sm); border: 1px solid var(--btn-line); background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; user-select: none; text-decoration: none !important; }
.btn:hover { background: var(--surface-2); }
.btn .ic { width: 16px; height: 16px; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn-quiet { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-quiet:hover { background: var(--surface-2); color: var(--ink); }
.sect-head .btn-quiet { background: var(--surface); border-color: var(--btn-line); color: var(--ink); }
.sect-head .btn-quiet:hover { background: var(--surface-2); }
.btn-danger { color: var(--red); border-color: var(--red); background: var(--surface); }
.btn-danger:hover { background: var(--red-tint); }
.btn-sm { height: 32px; padding: 0 10px; font-size: 13px; }
.btn-lg { height: 48px; padding: 0 20px; font-size: 16px; }
.btn-block { width: 100%; max-width: 100%; height: auto; min-height: 38px; padding-block: 6px; white-space: normal; text-align: center; line-height: 1.25; }
.btn-lg.btn-block { min-height: 48px; }
.btn-sm.btn-block { min-height: 32px; }
.btn > .ic, .btn > svg { flex: none; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.icon-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: var(--r-sm); border: 0; background: transparent; cursor: pointer; color: var(--ink-2); }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn.danger:hover { color: var(--red); }

/* ---------- menus (details) ---------- */
details.menu { position: relative; }
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
.menu-pop { position: absolute; top: calc(100% + 6px); left: 0; min-width: 200px; z-index: 60; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 6px; display: flex; flex-direction: column; }
details.menu.right .menu-pop { left: auto; right: 0; }
details.menu.up .menu-pop { top: auto; bottom: calc(100% + 6px); }
.menu-pop a, .menu-pop button { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 9px 10px; border-radius: 6px; border: 0; background: none; font-size: 14px; color: var(--ink); cursor: pointer; text-decoration: none !important; }
.menu-pop a:hover, .menu-pop button:hover { background: var(--surface-2); }
.menu-pop button.danger { color: var(--red); }
.menu-pop form { margin: 0; }
.menu-pop hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.create .menu-pop { left: 0; right: 0; }

/* ---------- sheets: a dialog without JavaScript (details + fixed panel; the summary becomes the backdrop) ---------- */
details.sheet { display: inline-block; }
details.sheet[open] > summary { position: fixed; inset: 0; z-index: 80; background: rgba(28, 27, 25, .42); border: 0; border-radius: 0; color: transparent; font-size: 0; padding: 0; height: auto; cursor: default; }
details.sheet[open] > summary > * { display: none; }
.sheet-panel { position: fixed; z-index: 81; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow-y: auto; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 20px 24px 24px; text-align: left; white-space: normal; font-weight: 400; color: var(--ink); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.sheet-head h2 { font-size: 18px; }
.sheet-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
/* A sheet whose opener lives elsewhere on the page (an editor's "Send to client" saves first, then opens it). */
.js details.sheet.hide-trigger:not([open]) > summary { display: none; }

/* ---------- forms ---------- */
input, select, textarea { width: 100%; min-height: 40px; padding: 8px 11px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); font-size: 15px; }
/* A field that can't be changed here (your own email on Teams > People) reads as locked. */
input:disabled, select:disabled, textarea:disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
textarea { resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(201, 71, 12, .18); }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; min-height: 0; accent-color: var(--brand); }
input::placeholder, textarea::placeholder { color: #7A838C; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.hint { font-size: 13px; color: var(--muted); }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form .full { grid-column: 1 / -1; }
.form-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 720px; }
.form.panel { max-width: 880px; }
.form:has(input[name=next][value=callback]:not(:checked)) .callback-date { display: none; }
input[type=color] { width: 72px; height: 40px; padding: 4px; cursor: pointer; }
form.row > .btn { height: 40px; }
.form-actions { grid-column: 1 / -1; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 4px; }
.stack-form { display: flex; flex-direction: column; gap: 14px; }
.check-row { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.check-row input { margin-top: 2px; }
.money-in { position: relative; display: block; }
.money-in i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); font-style: normal; pointer-events: none; }
.money-in input { padding-left: 24px; text-align: right; font-variant-numeric: tabular-nums; }
.pct-in { position: relative; display: block; }
.pct-in i { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); font-style: normal; pointer-events: none; }
.pct-in input { padding-right: 28px; text-align: right; font-variant-numeric: tabular-nums; }
.seg { display: inline-flex; border: 1px solid var(--btn-line); border-radius: var(--r-sm); overflow: hidden; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 8px 14px; line-height: 22px; font-size: 14px; font-weight: 500; color: var(--ink-2); border-left: 1px solid var(--btn-line); }
.seg label:first-child span { border-left: 0; }
.seg input:checked + span { background: var(--brand-tint); color: var(--brand-ink); }
.seg input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: -2px; }

/* ---------- empty, avatars ---------- */
.empty { padding: 24px 0; color: var(--muted); display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.empty p { margin: 0; }
.avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--surface-2); color: var(--ink-2); display: inline-grid; place-items: center; font-size: 11px; font-weight: 600; flex: none; border: 1px solid var(--line); }
.avatar-none { background: transparent; border: 1px dashed var(--line-strong); }

/* ---------- today: to-do list and schedule list ---------- */
.day-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.day-head .muted { font-size: 15px; }
.todo { list-style: none; margin: 0; padding: 0; }
.todo li { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 8px; margin: 0 -8px; border-radius: var(--r-sm); border-top: 1px solid var(--line); }
.todo li:has(.todo-link):hover { background: var(--row-hover); }
.todo li:first-child { border-top: 0; }
.todo-ic { width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; flex: none; color: var(--ink-2); }
.todo-ic .ic { width: 16px; height: 16px; }
.todo-ic:empty { width: 22px; height: 22px; margin: 4px; background: transparent; border: 2px solid var(--line-strong); }
.todo li.sev-3 .todo-ic { background: var(--red-tint); color: var(--red); }
.todo li.sev-2 .todo-ic { background: var(--amber-tint); color: var(--amber); }
.todo-text { flex: 1; min-width: 0; }
.todo-text b { font-weight: 600; }
.todo-text .sub { display: block; font-size: 13px; color: var(--muted); }
.todo-amt { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.visits-list { list-style: none; margin: 0; padding: 0; }
.visits-list li { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.visits-list li:first-child { border-top: 0; }
.visits-list .t { font-weight: 600; font-variant-numeric: tabular-nums; font-size: 14px; }
.visits-list .sub { display: block; font-size: 13px; color: var(--muted); font-weight: 400; }

/* ---------- jobs board ---------- */
.board { display: grid; grid-template-columns: repeat(var(--cols, 5), minmax(200px, 1fr)); gap: 12px; align-items: start; overflow-x: auto; padding-bottom: 8px; }
.col-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 4px 4px 10px; font-size: 13px; font-weight: 600; }
.col-head span { color: var(--muted); font-weight: 400; }
.col-body { display: flex; flex-direction: column; gap: 8px; min-height: 64px; border-radius: var(--r); padding: 2px; }
.col.drop .col-body { outline: 2px dashed var(--line-strong); outline-offset: 2px; }
.col-empty { border: 1px dashed var(--line); border-radius: var(--r); min-height: 56px; padding: 0; font-size: 13px; color: var(--muted); text-align: center; }
.job-card { display: flex; flex-direction: column; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; cursor: grab; }
.job-card:hover { border-color: var(--btn-line); }
.job-card.dragging { opacity: .45; }
.job-card-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.job-card-top b { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.job-card-top .num { font-size: 14px; font-weight: 600; white-space: nowrap; }
.job-card > span { font-size: 14px; color: var(--ink-2); }
.job-card-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.view-toggle { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--r); background: var(--surface-2); }
.view-toggle .btn { height: 32px; border-color: transparent; background: transparent; color: var(--ink-2); }
.view-toggle .btn[aria-current] { background: var(--surface); border-color: var(--line); color: var(--ink); box-shadow: 0 1px 2px rgba(28, 27, 25, .08); }

/* ---------- schedule ---------- */
.sched-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: auto; }
.sched { width: 100%; min-width: 960px; border-collapse: collapse; table-layout: fixed; }
.sched th, .sched td { border-left: 1px solid var(--line); border-top: 1px solid var(--line); vertical-align: top; }
.sched thead th { border-top: 0; padding: 10px 8px; font-size: 13px; font-weight: 500; color: var(--muted); text-align: left; background: var(--surface-2); }
.sched thead th b { color: var(--ink); font-size: 15px; font-weight: 600; margin-left: 3px; }
.sched thead th.today { color: var(--brand-ink); box-shadow: inset 0 2px 0 var(--brand); }
.sched th.who, .sched thead th:first-child { width: 150px; border-left: 0; }
.sched th.who { padding: 12px; text-align: left; background: var(--surface-2); font-size: 14px; font-weight: 600; }
.sched th.who span { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.sched td { height: 96px; padding: 6px; position: relative; }
.sched td.today { background: #FFFBF7; }
.sched td .add { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: flex-end; padding: 6px 8px; color: transparent; font-size: 12px; text-decoration: none !important; }
.sched td:hover .add, .sched td .add:focus { color: var(--muted); }
.chip { position: relative; z-index: 1; display: block; padding: 6px 8px; margin-bottom: 6px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--line-strong); font-size: 12px; line-height: 1.3; text-decoration: none !important; }
.chip b { font-size: 13px; font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip span { color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip:hover { border-color: var(--btn-line); }
.chip.s-en_route { border-left-color: var(--amber); }
.chip.s-in_progress { border-left-color: var(--brand); }
.chip.s-done { border-left-color: var(--green); }
.chip.s-done b { color: var(--ink-2); }
.chip.late::after { content: ""; position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--red); }
.daystrip { display: none; }

/* ---------- field visit card ---------- */
.visit-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.visit-time { font-size: 15px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.visit-card h2 { font-size: 20px; line-height: 26px; }
.visit-who { color: var(--ink-2); }
.visit-addr { display: flex; gap: 8px; align-items: flex-start; color: var(--ink-2); }
.visit-notes { background: var(--note); border-radius: var(--r-sm); padding: 10px 12px; white-space: pre-wrap; }
.visit-status { display: flex; flex-direction: column; gap: 4px; }
.visit-status .btn { height: 56px; font-size: 17px; }
.visit-status small { color: var(--muted); font-size: 13px; text-align: center; }
.visit-tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; }
.visit-tools .btn { height: 52px; flex-direction: column; gap: 2px; font-size: 13px; }
.visit-tools .btn .ic { width: 20px; height: 20px; }
.since { font-size: 13px; color: var(--muted); }

/* ---------- history ---------- */
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.timeline li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; align-items: start; }
.tl-ic { width: 28px; height: 28px; padding: 6px; border-radius: 50%; background: var(--surface-2); color: var(--ink-2); }
.tl-missed .tl-ic { background: var(--red-tint); color: var(--red); }
.tl-card { min-width: 0; }
.tl-meta { font-size: 13px; color: var(--muted); display: flex; gap: 4px; flex-wrap: wrap; align-items: baseline; }
.tl-meta b { color: var(--ink); font-weight: 600; }
.tl-meta time { margin-left: auto; white-space: nowrap; }
.tl-body { margin-top: 4px; white-space: pre-wrap; overflow-wrap: anywhere; }
.tl-body audio { display: block; width: 100%; max-width: 360px; height: 36px; }
.phone-only { display: none; }
.tl-in .tl-body { background: var(--surface-2); border-radius: 12px; padding: 8px 12px; display: inline-block; }
.tl-note .tl-body, .tl-visit .tl-body { background: var(--note); border-radius: 8px; padding: 8px 12px; }
.tl-system { grid-template-columns: 28px minmax(0, 1fr) auto !important; font-size: 13px; color: var(--muted); align-items: center !important; }
.tl-system .tl-ic { background: transparent; }
.tl-dot { display: grid; place-items: center; }
.tl-dot::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); }
.tl-system time { white-space: nowrap; }

/* ---------- inbox ---------- */
.inbox-list { list-style: none; margin: 0; padding: 0; }
.inbox-list li { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.inbox-list li:first-child { border-top: 0; }
.inbox-list .unread-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); flex: none; }
.inbox-list .read-dot { width: 8px; flex: none; }
.inbox-list .sub { display: block; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- estimate and invoice editors ---------- */
.lines { width: 100%; border-collapse: collapse; font-size: 14px; }
.lines th { text-align: left; font-size: 12px; font-weight: 500; color: var(--muted); padding: 8px 6px; background: var(--surface-2); white-space: nowrap; }
.lines th.r { text-align: right; }
.lines td { padding: 4px; border-top: 1px solid var(--line); vertical-align: top; }
.lines th:first-child, .lines td:first-child { padding-left: 16px; }
.lines th:last-child, .lines td:last-child { padding-right: 10px; }
.lines input, .lines select, .lines textarea { border-color: var(--line); background: var(--surface); min-height: 36px; padding: 7px 8px; font-size: 14px; }
.lines tr:hover input, .lines tr:hover select, .lines tr:hover textarea { border-color: var(--line-strong); background: var(--surface); }
.lines input:focus, .lines select:focus, .lines textarea:focus { background: var(--surface); }
.lines textarea { resize: none; overflow: hidden; }
.lines .c-desc { width: 100%; min-width: 240px; }
.lines .c-qty { width: 84px; } .lines .c-unit { width: 70px; } .lines .c-money { width: 108px; } .lines .c-pct { width: 80px; } .lines .c-code { width: 210px; } .lines .c-kind { width: 120px; }
.lines .c-qty input { min-width: 64px; } .lines .c-unit input { min-width: 56px; } .lines .c-code select { min-width: 200px; }
.lines .c-kind select { min-width: 112px; } .lines .c-money input { min-width: 100px; }
.lines .c-total { width: 112px; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.lines .c-src { width: 150px; } .lines .c-src select { min-width: 140px; } .lines .c-sdate { width: 150px; } .lines .c-sdate input { min-width: 140px; }
/* a scope package heading row (src/estimating.js) */
.lines tr.line-section td { background: var(--surface-2); border-top: 2px solid var(--line-strong); }
.lines tr.line-section textarea { font-weight: 600; }
.lines td.c-sec-total { padding: 12px 13px 4px 4px; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink-2); }
/* .checks: dot lists (Today's Your jobs and Your projects, reviews, punches); only proposal reviews had the style before */
.checks { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.review-box .checks { margin-bottom: 12px; }
.checks li { position: relative; padding-left: 20px; line-height: 1.45; }
.checks li::before { content: ''; position: absolute; left: 2px; top: .5em; width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.checks li.check-warn::before { background: #C98A0C; }
.checks li.check-bad::before { background: var(--bad, #B42318); }
.review-box .review-h { margin: 14px 0 8px; font-size: 15px; }
.review-decide { max-width: 520px; margin-top: 8px; }
.doc-lines tr.doc-sec td { padding-top: 16px; border-bottom: 1px solid var(--line-strong); }
.doc-lines tr.doc-sec .doc-text { margin-top: 2px; font-size: 13px; }
.tbl tr.row-section td { background: var(--surface-2); }
/* proposal draft: checks and the AI helper side by side (R2) */
.est-side { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 16px; }
.est-side > .sect { margin: 0; }
.est-side > .sect-wide { grid-column: 1 / -1; }
.price-go { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
.price-go p { margin: 0; max-width: 76ch; }
.price-go .scan-progress { margin-top: 10px; }
.price-go form { min-width: 260px; }
.ai-box .ai-list { margin: 0 0 12px; padding: 0; list-style: none; display: grid; gap: 10px; }
.ai-box .ai-list li { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.ai-box .ai-act { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.ai-box .ai-act input, .ai-box .ai-act select { flex: 1 1 180px; min-width: 0; height: 32px; font: inherit; font-size: 13px; }
.tag { display: inline-block; padding: 1px 7px; border-radius: 4px; background: var(--surface-2); color: var(--ink-2); font-size: 12px; font-weight: 600; }
.tag-high { background: #FDE8E6; color: #9B1C13; } .tag-medium { background: #FFF2D6; color: #7A4B00; }
details.overview { padding: 12px 16px; margin-bottom: 4px; }
details.overview > summary { cursor: pointer; padding: 4px 0; }
details.overview .form { margin-top: 12px; }
.qa { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; } .qa li div { color: var(--ink-2); }
.tone-warn { color: #7A4B00; }
@media (max-width: 1100px) { .est-side { grid-template-columns: 1fr; } }
/* Teams: work order form, confirmations, directory edits */
.assign-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; align-items: center; max-width: 520px; }
.sub-row { display: grid; grid-template-columns: 2fr 2fr 1fr 1fr; gap: 8px 12px; align-items: end; margin-bottom: 8px; }
.ack-box { padding: 14px 16px; margin-bottom: 16px; background: var(--brand-tint); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--r-lg); }
.ack-box input { max-width: 420px; }
.inline-edit > summary { list-style: none; } .inline-edit > summary::-webkit-details-marker { display: none; }
.inline-edit[open] form { margin-top: 8px; min-width: 260px; }
.visit-wo { margin: 6px 0; display: grid; gap: 8px; justify-items: start; }
.row.wrap { flex-wrap: wrap; }
/* job photos and Trade Patrol */
.ack-box.submit-box, .submit-box { padding: 14px 16px; margin-bottom: 16px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: var(--r-lg); }
.submit-box input { max-width: 420px; }
.photo-grid { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.photo-grid li { min-width: 0; }
.photo-grid a { display: block; border-radius: var(--r); overflow: hidden; background: var(--bg); border: 1px solid var(--line); aspect-ratio: 4 / 3; }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-grid .photo-file { display: flex; gap: 6px; align-items: center; padding: 10px; font-size: 13px; overflow-wrap: anywhere; height: 100%; }
.photo-grid .small { margin-top: 4px; line-height: 1.35; overflow-wrap: anywhere; }
.photo-checks { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.photo-checks li { display: inline-flex; align-items: center; gap: 6px; color: var(--amber); font-weight: 600; }
.photo-checks li.is-done { color: var(--green); }
.photo-checks .ic { width: 16px; height: 16px; }
.photo-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; margin-top: 4px; }
.photo-form .field { margin: 0; min-width: 140px; }
.photo-form .field.grow { flex: 1 1 200px; }
.photo-form .upload-state { flex-basis: 100%; }
.photo-add > summary { list-style: none; } .photo-add > summary::-webkit-details-marker { display: none; }
.photo-add[open] .photo-form { margin-top: 10px; }
.qa-form textarea { width: 100%; }
.photo-filter { margin-bottom: 16px; gap: 8px; }
.stack-sects { display: grid; gap: 16px; min-width: 0; } .stack-sects > .sect { margin: 0; }
@media (max-width: 760px) { .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .sub-row { grid-template-columns: 1fr 1fr; } }
/* security floor: backup codes, set-up steps, recently deleted files */
.backup-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 24px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 15px; }
.steps-plain { margin: 0 0 8px; padding-left: 20px; display: grid; gap: 8px; line-height: 1.5; }
.deleted-files { margin: -8px 0 16px; }
.deleted-files summary { cursor: pointer; padding: 6px 0; }
.deleted-files li { flex-wrap: wrap; row-gap: 4px; }
.deleted-files li .grow { min-width: 12em; }
.deleted-files li form { margin-left: auto; }
/* client AI notes (R3) */
/* Client AI notes: one row per heading (never a grid with a hole), the heading beside its notes on wide screens. */
.intel-sum { display: grid; }
.intel-sum > div { display: grid; grid-template-columns: minmax(170px, 220px) minmax(0, 1fr); gap: 4px 24px; padding: 14px 0; border-top: 1px solid var(--line); }
.intel-sum > div:first-child { padding-top: 0; border-top: 0; }
.intel-sum > div:last-child { padding-bottom: 0; }
.intel-sum > div > :not(.review-h) { grid-column: 2; }
.intel-sum .review-h { margin: 0; }
@media (max-width: 760px) { .intel-sum > div { grid-template-columns: minmax(0, 1fr); } .intel-sum > div > :not(.review-h) { grid-column: 1; } }
.intel-list { margin: 0; padding: 0; list-style: none; display: grid; }
.intel-list > li { display: grid; gap: 4px; padding: 14px 0; border-top: 1px solid var(--line); }
.intel-list > li:first-child { padding-top: 0; border-top: 0; }
.intel-act { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
.small-tabs a { font-size: 13px; }
/* what we read from a company website (src/scan.js) */
.profile > p { margin: 0 0 10px; line-height: 1.55; }
.profile ul.plain, .profile ol.plain { margin: 0; padding-left: 18px; }
.profile ul.plain li, .profile ol.plain li { margin: 2px 0; }
.scan-found h2 { font-size: 16px; margin: 6px 0 8px; }
.scan-now p { margin: 0 0 10px; line-height: 1.5; }
.lines td.c-total { padding: 12px 13px 4px 4px; }
.lines th { padding: 8px 13px; }
.lines th:first-child { padding-left: 25px; }
.lines .money-in i { display: none; }
.lines .money-in input { padding-left: 8px; }
.lines input.num, .lines .num input { text-align: right; }
.costing-off .c-cost { display: none; }
.editor-bar { position: sticky; bottom: 0; z-index: 15; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 12px 32px; margin: auto -32px -64px; background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -4px 12px rgba(28, 27, 25, .06); }
.content:has(> form[data-editor]) { flex: 1; display: flex; flex-direction: column; }
.content > form[data-editor] { flex: 1; }
.editor-bar .totals { display: flex; gap: 20px; flex-wrap: wrap; align-items: baseline; font-size: 14px; color: var(--ink-2); }
.editor-bar .totals b { font-size: 16px; color: var(--ink); font-variant-numeric: tabular-nums; }
.editor-bar .totals [data-sum="total"] { font-size: 20px; }
.editor-bar .row { margin-left: auto; }

/* ---------- client-facing documents ---------- */
body.public { background: var(--bg); }
.doc { max-width: 780px; margin: 0 auto; padding: 24px 16px 96px; }
.doc-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 20px 24px; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--doc, var(--ink)); border-radius: var(--r-lg) var(--r-lg) 0 0; }
.doc-co { font-size: 20px; font-weight: 600; }
.doc-head + .notice { margin: 0; border-radius: 0; border: 1px solid var(--line); border-top: 0; border-bottom: 0; padding: 10px 24px; }
.doc-body > .notice:first-child { margin: 0 0 20px; }
.doc-body > h1 + .notice { margin-top: 12px; }
.doc-contact { font-size: 13px; color: var(--muted); }
.doc-contact span + span::before { content: ' · '; }
.doc-body { background: var(--surface); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--r-lg) var(--r-lg); padding: 28px 24px; }
.doc-title { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 20px; }
.doc-title h1 { font-size: 26px; line-height: 32px; margin-top: 2px; }
.doc-to { text-align: right; font-size: 14px; }
.doc-po { margin-top: 10px; }
.doc-total { font-size: 32px; font-weight: 600; font-variant-numeric: tabular-nums; }
.doc-text { white-space: pre-wrap; color: var(--ink-2); margin-bottom: 16px; }
.doc-lines td.doc-text { margin-bottom: 0; }
.doc-lines { width: 100%; border-collapse: collapse; margin: 16px 0 8px; font-size: 14px; }
.doc-lines th { text-align: left; font-size: 12px; font-weight: 500; color: var(--muted); padding: 8px 0; border-bottom: 1px solid var(--line); }
.doc-lines td { padding: 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc-lines .r { text-align: right; padding-left: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.doc-lines tfoot td { border-bottom: 0; padding: 6px 0; }
.doc-lines tfoot tr.grand td { font-size: 18px; font-weight: 600; border-top: 2px solid var(--line); padding-top: 12px; }
.doc-section { margin-top: 20px; }
.doc-section h2 { margin-bottom: 6px; }
.doc-approve { margin-top: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 24px; }
.doc-approve .btn-primary, .doc-bar .btn-primary { background: var(--doc, var(--brand)); border-color: var(--doc, var(--brand)); }
.doc-approve > details.sheet { display: block; margin-top: 12px; }
/* A change order's signature block until it's signed: lines to sign on the printout (change-orders.js signHere). */
.doc-sign h2 { margin: 0 0 6px; }
.sign-lines { display: grid; grid-template-columns: 2fr 1fr; gap: 22px 24px; margin: 22px 0 6px; }
.sign-lines span { display: block; height: 36px; border-bottom: 1px solid var(--ink); }
.sign-lines small { display: block; margin-top: 4px; color: var(--ink-2); font-size: 12px; }
@media (max-width: 640px) { .sign-lines { grid-template-columns: 1fr; gap: 16px; } }
.co-for { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; padding: 10px 12px; background: var(--surface-2); border-radius: var(--r-sm); }
.co-for dt { color: var(--ink-2); }
.co-for dd { margin: 0; overflow-wrap: anywhere; }
.doc-approve > details.sheet:not([open]) > summary.btn-quiet { height: auto; padding: 0; color: var(--ink-2); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.doc-foot { text-align: center; font-size: 12px; color: var(--muted); margin-top: 24px; }
.doc-bar { display: none; }

/* ---------- sign in ---------- */
body.bare { min-height: 100vh; background: var(--bg); }
.auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; gap: 16px; }
.auth-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.auth-card h1 { font-size: 22px; }
@media (max-width: 360px) { .auth { padding: 16px 10px; } .auth-card { padding: 20px 16px; } }
.auth-alt { font-size: 14px; color: var(--ink-2); margin: 0; }
.auth-alt a { text-decoration: underline; }
.auth-foot { font-size: 13px; color: var(--muted); text-align: center; }
.brandmark { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 4px; }
.brandmark img { height: 68px; width: auto; }
.doc-foot img { height: 14px; width: auto; vertical-align: -2px; }
.brandmark .co-mark { background: var(--brand); }
.auth-foot a { color: var(--muted); text-decoration: underline; }

/* ---------- public site (home, privacy, terms): src/routes/site.js ---------- */
body.site { background: #fff; }
.site .skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 14px; background: var(--ink); color: #fff; border-radius: var(--r-sm); }
.site .skip:focus { top: 12px; }
.site .wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.site .nowrap { white-space: nowrap; }
.site h2 { font-size: clamp(26px, 3vw, 36px); line-height: 1.2; letter-spacing: -.015em; }
.site h3 { font-weight: 600; margin: 0; }
.site main a:not(.btn) { color: var(--brand-ink); text-decoration: underline; text-underline-offset: 2px; }
/* the logo's slant, used as the section mark and list marker */
.s-row h2::before, .s-dark h2::before, .s-extras h2::before, .s-faq h2::before { content: ''; display: block; width: 40px; height: 7px; margin: 0 0 16px 4px; background: var(--accent); transform: skewX(-24deg); }

/* header */
.sh { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--line); }
.sh-in { display: flex; align-items: center; gap: 24px; height: 68px; }
.sh-logo img { display: block; height: 44px; width: auto; }
.sh-nav { display: flex; gap: 22px; margin-right: auto; }
.sh-nav a { color: var(--ink-2); font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap; }
.sh-nav a:hover { color: var(--brand-ink); }
.sh-act { display: flex; align-items: center; gap: 8px; }
.sh-tel { display: inline-flex; align-items: center; gap: 6px; margin-right: 6px; font-weight: 600; color: var(--ink); text-decoration: none; white-space: nowrap; }
.sh-tel .ic, .sh-call .ic, .sbar .ic, .s-contact .ic { width: 18px; height: 18px; }
.sh-call, .sh-menu { display: none; }
.sh-menu summary { list-style: none; cursor: pointer; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--btn-line); border-radius: var(--r-sm); color: var(--ink); }
.sh-menu summary::-webkit-details-marker { display: none; }
.sh-menu summary svg { width: 22px; height: 22px; }
.sh-menu:not([open]) .sh-panel { display: none; }
.sh-panel { position: absolute; left: 0; right: 0; top: 68px; display: flex; flex-direction: column; padding: 4px 16px 16px; background: #fff; border-bottom: 1px solid var(--line); }
.sh-panel a:not(.btn) { padding: 13px 0; border-bottom: 1px solid var(--line); color: var(--ink); font-weight: 600; text-decoration: none; }
.sh-panel .btn { margin-top: 14px; }

/* hero */
.s-hero { padding: 52px 0 64px; background: var(--bg); border-bottom: 1px solid var(--line); }
.s-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 420px); gap: 56px; align-items: start; }
.s-hero-more .s-cta-row { margin-top: 28px; }
.s-hero-top { container-type: inline-size; padding-top: 6px; }
.s-hero h1 { margin: 0; letter-spacing: -.02em; }
.h1-name { display: block; font-size: clamp(34px, 9.4cqi, 62px); line-height: 1.04; color: var(--ink); }
.h1-line { display: block; margin-top: 14px; font-size: clamp(22px, 4.8cqi, 32px); line-height: 1.25; color: var(--accent); }
.s-proof, .s-list { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 12px; }
.s-proof li, .s-list li { position: relative; padding-left: 28px; font-size: 17px; line-height: 1.55; color: var(--ink-2); }
.s-list li { font-size: 16px; }
.s-proof li::before, .s-list li::before { content: ''; position: absolute; left: 3px; top: .62em; width: 13px; height: 5px; background: var(--accent); transform: skewX(-24deg); }
.s-talk { margin: 24px 0 0; font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.s-form { background: #fff; border: 1px solid var(--line); border-top: 5px solid var(--accent); border-radius: var(--r-lg); padding: 24px; }
.s-form h2 { font-size: 22px; }
.s-form > p { margin: 6px 0 18px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.s-form-alt { margin: 16px 0 0; font-size: 14px; color: var(--ink-2); }
.site .s-show { margin-top: 56px; }
.shots-pair { position: relative; }
.shots-pair > img, .s-row-img > img { display: block; width: 100%; height: auto; background: #fff; border: 1px solid var(--line-strong); border-radius: 10px; }
.shot-phone { position: absolute; right: -10px; bottom: -36px; width: 21%; }
.shot-phone img { display: block; width: 100%; height: auto; border: 7px solid #262C31; border-radius: 30px; background: #fff; }
.s-row-img .shots-pair { margin-bottom: 36px; }
.pair-doc > img { width: 74%; }
.pair-doc .shot-phone { right: 2%; width: 22%; top: 10%; bottom: auto; }

/* trades list in the hero */
.s-trades { margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; font-size: 15px; color: var(--ink-2); }
.s-trades b { color: var(--ink); }
.s-trades span { white-space: nowrap; }
.s-trades span + span::before { content: ''; display: inline-block; width: 9px; height: 4px; margin-right: 16px; background: var(--accent); transform: skewX(-24deg); vertical-align: middle; }

/* feature rows: text on top, a full-width screenshot below */
.s-row { padding: 76px 0; background: #fff; }
.s-row.alt { background: var(--bg); }
.s-row-head { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 64px; align-items: start; }
.s-row-head > div > p, .s-ai-grid > div > p, .s-price p { margin: 14px 0 0; font-size: 18px; line-height: 1.6; color: var(--ink-2); }
.s-row-head .s-list { margin-top: 58px; }
.s-row-img { margin-top: 40px; }

/* phone band */
.s-dark { padding: 76px 0; background: #262C31; color: #E9ECEF; }
.s-dark h2 { color: #fff; }
.s-dark p { margin: 14px 0 0; font-size: 17px; line-height: 1.6; color: #CBD0D6; }
.site .s-dark a:not(.btn) { color: #FFB27A; }
.s-dark-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.s-steps { list-style: none; counter-reset: st; margin: 58px 0 0; padding: 0; }
.s-steps li { counter-increment: st; position: relative; padding: 14px 0 14px 56px; border-top: 1px solid #424A53; color: #CBD0D6; line-height: 1.55; }
.s-steps li:last-child { border-bottom: 1px solid #424A53; }
.s-steps li::before { content: counter(st); position: absolute; left: 0; top: 12px; width: 34px; height: 28px; display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 600; transform: skewX(-12deg); border-radius: 3px; }
.s-steps b { color: #fff; }

/* also included */
.s-extras { padding: 76px 0; background: #fff; }
.s-extras-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px 40px; margin-top: 32px; }
.s-extras h3 { padding-top: 14px; border-top: 2px solid var(--ink); font-size: 18px; line-height: 1.3; }
.s-extras p { margin: 8px 0 0; line-height: 1.6; color: var(--ink-2); }

/* AI */
.s-ai-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.s-ai-grid h2::before { content: ''; display: block; width: 40px; height: 7px; margin: 0 0 16px 4px; background: var(--accent); transform: skewX(-24deg); }
.s-next { margin-top: 23px; padding: 26px; background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--blue); border-radius: 10px; }
.s-next h3 { font-size: 20px; line-height: 1.3; }
.s-next p { margin: 10px 0 0; line-height: 1.6; color: var(--ink-2); }

/* switching */
.s-switch { list-style: none; counter-reset: sw; display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; margin: 32px 0 0; padding: 0; }
.s-switch li { counter-increment: sw; display: flex; flex-direction: column; gap: 8px; padding-top: 16px; border-top: 2px solid var(--ink); }
.s-switch li::before { content: counter(sw); font-size: 40px; line-height: 1; font-weight: 600; color: var(--accent); }
.s-switch b { font-size: 19px; }
.s-switch span { line-height: 1.6; color: var(--ink-2); }

/* pricing */
.s-price { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.s-price h2::before { content: ''; display: block; width: 40px; height: 7px; margin: 0 0 16px 4px; background: var(--accent); transform: skewX(-24deg); }
.s-cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.s-incl { margin: 0; padding: 26px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }

/* questions */
.s-faq { padding: 76px 0; background: #fff; }
.s-faq-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 64px; align-items: start; }
.s-faq details { border-bottom: 1px solid var(--line); }
.s-faq details:first-of-type { margin-top: 26px; border-top: 1px solid var(--line); }
.s-faq summary { position: relative; padding: 18px 40px 18px 0; list-style: none; cursor: pointer; font-size: 17px; font-weight: 600; }
.s-faq summary::-webkit-details-marker { display: none; }
.s-faq summary::after { content: '+'; position: absolute; right: 6px; top: 13px; font-size: 26px; font-weight: 400; color: var(--brand-ink); }
.s-faq details[open] summary::after { content: '\2013'; }
.s-faq details p { margin: 0 0 20px; max-width: 70ch; line-height: 1.65; color: var(--ink-2); }
.s-contact { position: sticky; top: 92px; display: grid; gap: 10px; padding: 26px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; }
.s-contact h3 { font-size: 20px; }
.s-contact p { margin: 0 0 6px; line-height: 1.55; color: var(--ink-2); }
.s-contact .btn { white-space: normal; height: auto; min-height: 44px; padding: 10px 14px; }

/* closing band */
.s-close { padding: 64px 0; background: var(--brand); color: #fff; }
.s-close h2 { color: #fff; }
.s-close p { margin: 10px 0 0; font-size: 18px; color: #fff; }
.s-btn-light { background: #fff; border-color: #fff; color: var(--brand-ink); }
.s-btn-line { background: transparent; border-color: rgba(255, 255, 255, .75); color: #fff; }

/* footer */
.sf { padding: 48px 0 24px; background: var(--bg); border-top: 1px solid var(--line); color: var(--ink-2); }
.sf-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 40px; }
.sf-brand img { display: block; height: 44px; width: auto; }
.sf-brand p { margin: 14px 0 0; max-width: 38ch; line-height: 1.6; }
.sf-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.sf-cols > div { display: flex; flex-direction: column; gap: 10px; }
.sf-h { margin: 0 0 2px; font-weight: 600; color: var(--ink); }
.sf a { color: var(--ink-2); text-decoration: none; }
.sf a:hover { color: var(--brand-ink); text-decoration: underline; }
.sf-copy { margin: 32px 0 0; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-2); }

/* phone call bar */
.sbar { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); }
.sbar .btn { flex: 1; height: 46px; }

/* privacy and terms */
.site-legal { max-width: 760px; margin: 0 auto; padding: 40px 16px 64px; }
.site-legal h1 { font-size: 32px; line-height: 1.2; }
.site-legal h2 { margin-top: 28px; font-size: 18px; }
.site-legal p { margin: 8px 0 0; color: var(--ink-2); line-height: 1.65; }
.site-note { margin: 14px 0 0; font-size: 14px; color: var(--muted); }

@media (max-width: 1100px) { .sh-nav { display: none; } .sh-act { margin-left: auto; } .sh-menu { display: block; } }
@media (max-width: 960px) {
  /* the form comes right after the headline on phones */
  .s-hero-grid { grid-template-columns: 1fr; grid-template-areas: "top" "form" "more"; gap: 28px; }
  .s-hero-copy { display: contents; }
  .s-hero-top { grid-area: top; }
  .s-hero-more { grid-area: more; }
  .s-form { grid-area: form; }
  .s-hero-more .s-cta-row { margin-top: 0; }
  .s-row-head, .s-dark-grid, .s-ai-grid, .s-price, .s-faq-grid { grid-template-columns: 1fr; gap: 28px; }
  .s-form { max-width: 560px; }
  .s-row-head .s-list, .s-steps { margin-top: 4px; }
  .s-next { margin-top: 0; }
  .s-contact { position: static; }
  .s-extras-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .sh-act { display: none; }
  .sh-call { display: inline-flex; align-items: center; gap: 6px; height: 44px; margin-left: auto; padding: 0 10px; font-weight: 600; color: var(--ink); text-decoration: none; }
  .sh-in { gap: 8px; }
  .sbar { display: flex; }
  body.site { padding-bottom: 76px; }
  .s-hero { padding: 28px 0 48px; }
  .s-row, .s-dark, .s-extras, .s-faq { padding: 52px 0; }
  .site .s-show { margin-top: 40px; }
  .shot-phone { width: 30%; right: -4px; bottom: -24px; }
  .shot-phone img { border-width: 4px; border-radius: 18px; }
  .s-switch, .sf-top, .sf-cols { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 600px) { .s-extras-grid { grid-template-columns: 1fr; } .s-proof li { font-size: 16px; } }
.bare-card { max-width: 440px; margin: 15vh auto 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; }

/* ---------- settings ---------- */
.settings-nav { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 20px; }
.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.list-plain li:first-child { border-top: 0; }
.swatch { display: inline-block; width: 16px; height: 16px; border-radius: 4px; border: 1px solid var(--line); background: var(--c); vertical-align: -3px; }
.code-box { font-family: Consolas, 'SF Mono', Menlo, monospace; font-size: 13px; background: var(--surface-2); border-radius: var(--r-sm); padding: 10px 12px; white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- tablet ---------- */
@media (max-width: 1100px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; }
}

/* ---------- phone ---------- */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .phone-only { display: block; }
  .desk-only { display: none !important; }
  body.app { grid-template-columns: minmax(0, 1fr); }
  body.app > .main { grid-column: 1; }
  .rail { display: none; }
  .top { height: 52px; padding: 0 16px; }
  .crumbs, .search { display: none; }
  .top.has-back .top-mark { display: none; }
  .top-back { min-height: 44px; max-width: calc(100% - 56px); font-size: 15px; }
  .top-back .tb-word { display: none; }
  .top-back .tb-to { display: block; }
  .content > .back-link { display: none; } /* the top bar has it */
  .back-bar { padding: 12px 16px; }
  .top-mark { display: block; flex: none; }
  .top-mark img { display: block; height: 22px; width: auto; }
  .demo-bar { padding: 8px 16px; font-size: 13px; }
  .top-title { display: none; }
  .top .search-btn { display: inline-grid; width: 44px; height: 44px; margin-left: auto; }
  .content { padding: 16px 16px calc(96px + env(safe-area-inset-bottom)); }
  h1 { font-size: 22px; line-height: 28px; }
  input, select, textarea { font-size: 16px; min-height: 48px; }
  .btn { height: 46px; font-size: 16px; padding: 0 16px; }
  .btn-sm { height: 40px; font-size: 15px; }
  .icon-btn { width: 44px; height: 44px; }
  .head { grid-template-columns: minmax(0, 1fr); }
  .head-actions { justify-content: flex-start; }
  .track { display: none; }
  .facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; }
  .next { flex-direction: column; align-items: stretch; gap: 10px; padding: 14px 16px; }
  .next .row { margin-left: 0; flex-direction: column; align-items: stretch; }
  .next .row .btn, .next .row form, .next .row form .btn { width: 100%; }
  .form { grid-template-columns: minmax(0, 1fr); }
  form.row > .btn { height: 48px; }
  form.row[role=search] > input.grow { flex: 1 1 100%; }
  form.row[role=search] > label, form.row[role=search] > .btn { flex: 1 1 calc(50% - 4px); }
  .seg { display: flex; width: 100%; }
  .seg label { flex: 1; }
  .seg span { text-align: center; }
  .check-row { min-height: 44px; align-items: center; }
  .check-row input { margin-top: 0; }
  .panel { padding: 16px; border-radius: var(--r); }
  .panel > .tbl-wrap { margin: 0 -16px; }
  .strip { grid-template-columns: 1fr 1fr; }
  .strip-cell { border-left: 0; border-top: 1px solid var(--line); padding: 12px 14px; }
  .strip-cell:nth-child(-n+2) { border-top: 0; }
  .strip-cell:nth-child(even) { border-left: 1px solid var(--line); }
  .strip-cell:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .strip-value { font-size: 20px; line-height: 26px; }
  /* tables become stacked rows */
  .tbl thead { display: none; }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl tr { padding: 12px 16px; border-top: 1px solid var(--line); }
  .tbl tbody tr:first-child { border-top: 0; }
  .tbl td { border: 0; padding: 2px 0 !important; text-align: left !important; }
  .tbl td:first-child { font-size: 16px; }
  .tbl td:not(:first-child):not(:empty) { text-align: right !important; }
  .tbl td:not(:first-child):not(:empty)::before { content: attr(data-label); float: left; margin-right: 12px; color: var(--muted); font-size: 13px; }
  .tbl td.no-label::before { content: none !important; }
  .tbl td.no-label { text-align: left !important; margin-left: -16px; width: calc(100% + 16px); }
  .tbl td:empty { display: none; }
  .tbl tr.row-bad { background: #FFF8F7; }
  .tbl tr.row-bad td { background: transparent; }
  .tbl tfoot { display: block; }
  .tbl tfoot tr { border-top: 2px solid var(--line); }
  .tbl tfoot td { border: 0; }
  .tbl tfoot td:empty { display: none; }
  /* board becomes a list */
  .board { grid-template-columns: minmax(0, 1fr); overflow: visible; }
  .col-body { min-height: 0; }
  /* schedule becomes a day agenda */
  .sched-wrap { display: none; }
  .daystrip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-bottom: 12px; }
  .daystrip a { position: relative; min-width: 0; height: 56px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 12px; color: var(--muted); text-decoration: none !important; }
  .daystrip a b { font-size: 17px; color: var(--ink); }
  .daystrip a.on { background: var(--ink); border-color: var(--ink); color: #fff; }
  .daystrip a.on b { color: #fff; }
  .daystrip a.has::after { content: ''; position: absolute; bottom: 6px; width: 5px; height: 5px; border-radius: 50%; background: var(--brand); }
  /* editors */
  .lines thead { display: none; }
  .lines, .lines tbody, .lines tr, .lines td { display: block; width: 100%; }
  .lines tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 8px; padding: 12px; border-top: 1px solid var(--line); }
  .lines td { border: 0; padding: 0 !important; width: auto !important; min-width: 0 !important; }
  .lines input, .lines select { min-width: 0 !important; }
  .lines td.c-desc { grid-column: 1 / -1; }
  .lines td.c-total { text-align: left; padding-top: 0 !important; }
  .lines input, .lines select, .lines textarea { border-color: var(--line-strong); background: var(--surface); }
  .lines td.c-code, .lines td.c-kind { grid-column: 1 / -1; }
  .lines input, .lines select, .lines textarea { font-size: 16px; min-height: 44px; }
  .lines td:last-child { justify-self: end; align-self: end; }
  .lines td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; color: var(--muted); }
  .editor-bar { margin: 16px -16px calc(-96px - env(safe-area-inset-bottom)); padding: 10px 16px calc(10px + 64px + env(safe-area-inset-bottom)); }
  /* sheets become bottom sheets */
  .sheet-panel { left: 0; right: 0; top: auto; bottom: 0; transform: none; width: 100%; max-height: 88vh; border-radius: 16px 16px 0 0; padding: 12px 16px calc(20px + env(safe-area-inset-bottom)); }
  .sheet-panel::before { content: ""; display: block; width: 36px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto 10px; }
  /* bottom tab bar */
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; height: calc(64px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--line); }
  .tabbar .nav-item { height: 64px; flex-direction: column; justify-content: center; gap: 3px; padding: 0; border: 0; border-radius: 0; font-size: 12px; font-weight: 600; background: none !important; position: relative; }
  .tabbar .nav-item .ic { width: 24px; height: 24px; }
  .tabbar .nav-item.on { color: var(--brand); }
  .tabbar .nav-item .count { position: absolute; top: 4px; left: calc(50% + 6px); margin: 0; box-shadow: 0 0 0 2px var(--surface); }
  .tabbar .plus { display: grid; place-items: center; }
  .tabbar .plus-btn { width: 52px; height: 52px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; }
  .tabbar .plus-btn:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
  .tabbar .plus-btn .ic { width: 26px; height: 26px; }
  /* On phones messages show at the top, clear of the tab bar and the editors' sticky bars. */
  .toast { top: calc(12px + env(safe-area-inset-top)); bottom: auto; }
  .editor-bar .c-cost { display: none; }
  .editor-bar .totals { width: 100%; justify-content: space-between; gap: 2px 12px; font-size: 13px; }
  .editor-bar .totals b, .editor-bar .totals [data-sum="total"] { font-size: 15px; }
  .editor-bar .row { margin-left: 0; width: 100%; }
  .editor-bar .row .btn-primary { flex: 1; }
  /* public documents */
  .doc { padding: 0 0 calc(96px + env(safe-area-inset-bottom)); }
  .doc-head, .doc-body { border-radius: 0; border-left: 0; border-right: 0; }
  .doc-to { text-align: left; }
  .doc-lines thead { display: none; }
  .doc-lines tbody tr { display: grid; grid-template-columns: 1fr auto; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .doc-lines tbody td { border: 0; padding: 0; }
  .doc-lines tbody tr.doc-sec { padding-top: 16px; border-bottom-color: var(--line-strong); }
  .doc-lines tbody tr.doc-sec td { border: 0; padding-top: 0; }
  .doc-lines tbody td:first-child:nth-last-child(n+3) { grid-column: 1 / -1; font-weight: 500; }
  .doc-lines tbody tr:has(> td:nth-child(4)) { grid-template-columns: auto 1fr auto; column-gap: 6px; }
  .doc-lines tbody td.qty { color: var(--muted); text-align: left; padding-left: 0; }
  .doc-lines tbody td.price { display: block; text-align: left; color: var(--muted); padding-left: 0; }
  .doc-lines tbody td.price::before { content: '\00d7  '; }
  .doc-lines, .doc-lines tbody, .doc-lines tfoot { display: block; }
  .doc-lines tfoot tr { display: grid; grid-template-columns: 1fr auto; gap: 12px; }
  .doc-lines tfoot tr.grand { border-top: 2px solid var(--line); }
  .doc-lines tfoot tr.grand td { border-top: 0; }
  .doc-contact span { display: block; }
  .doc-contact span + span::before { content: none; }
  .doc-head .btn-quiet { margin-left: -16px; }
  .doc-approve { border-radius: 0; border-left: 0; border-right: 0; }
  .doc-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -4px 12px rgba(28, 27, 25, .06); }
  .doc-bar b { font-size: 18px; font-variant-numeric: tabular-nums; }
}

@media (hover: none) { .sched td .add { color: var(--muted); } }

@media print {
  .doc-approve, .doc-bar, .doc-head .btn, .toast, .no-print { display: none !important; }
  .rail, .top, .tabbar, .head-actions, .next, .tabs, .editor-bar, .sheet { display: none !important; }
  body.app { display: block; background: #fff; }
  .content { padding: 0; max-width: none; }
  .panel, .strip { border-color: #ccc; }
  body.public { background: #fff; }
  .doc { max-width: none; padding: 0; }
  .doc-head, .doc-body { border: 0; }
}
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 6px 12px; }
pre.code-box { margin: 0; }
.ai-text { white-space: pre-line; line-height: 1.55; margin-bottom: 8px; }

/* ---------- sign in with Google ---------- */
.btn-google { gap: 10px; background: var(--surface); color: var(--ink); border-color: var(--btn-line); font-weight: 600; }
.btn-google:hover { background: var(--row-hover); }
.btn-google .ic { width: 20px; height: 20px; }
.auth-or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; border-top: 1px solid var(--line); }

/* ---------- calls ---------- */
.call-list { list-style: none; margin: 0; padding: 0; }
.call-row { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-top: 1px solid var(--line); }
.call-row:first-child { border-top: 0; }
.call-ic { width: 20px; height: 20px; flex: none; margin-top: 2px; color: var(--muted); }
.call-row.is-missed .call-ic, .call-row.is-missed .call-head b { color: var(--red); }
.call-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.call-head time { margin-left: auto; }
.tl-summary { margin-top: 8px; padding: 10px 12px; background: var(--blue-tint); border-radius: var(--r-sm); font-size: 14px; line-height: 1.5; white-space: pre-line; }
.tl-summary b { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--blue); margin-bottom: 2px; }
.transcript { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; line-height: 1.5; }
.transcript b { display: inline-block; min-width: 52px; color: var(--muted); font-weight: 600; }
.pick-list { list-style: none; margin: 0; padding: 0; }
.pick-list li { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); }
.pick-list li:first-child { border-top: 0; }
.pick-list li .muted { flex: 1; }

/* ---------- the phone window ---------- */
.phone { min-height: 100vh; display: flex; flex-direction: column; gap: 14px; padding: 16px; background: var(--bg); }
.phone-state { margin-left: auto; font-size: 13px; color: var(--muted); }
.phone-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px 18px; text-align: center; display: flex; flex-direction: column; gap: 6px; }
.phone-who { font-size: 22px; font-weight: 600; margin: 0; }
.phone-sub { color: var(--muted); margin: 0; }
.phone-time { font-variant-numeric: tabular-nums; font-size: 18px; margin: 4px 0 0; min-height: 1.4em; }
.phone-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 12px; }
.phone-alt { text-align: center; }

/* ---------- files and custom fields ---------- */
.upload { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; max-width: 100%; }
.file-list { list-style: none; margin: 0; padding: 0; }
.file-list li { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--line); }
.file-list li:first-child { border-top: 0; }
.file-list a { overflow-wrap: anywhere; }
.pre { white-space: pre-wrap; }

/* ---------- signatures ---------- */
.sig { border: 1px dashed var(--line-strong); border-radius: var(--r-sm); background: var(--surface); touch-action: none; }
.sig canvas { display: block; width: 100%; height: 150px; cursor: crosshair; }
.sig-img { display: block; max-width: 320px; height: auto; margin-top: 6px; border-bottom: 1px solid var(--line-strong); }
.file-field { border-top: 1px solid var(--line); }
.file-field:first-child { border-top: 0; }
.file-field-head { display: flex; align-items: center; gap: 10px; padding: 10px 16px; }
.file-field-head b { flex: 1; font-weight: 600; }
.file-field .file-list li { padding-left: 28px; }
.logo-preview { max-height: 64px; max-width: 240px; width: auto; display: block; margin-right: auto; }
.doc-logo { display: block; max-height: 56px; max-width: 220px; width: auto; margin-bottom: 6px; }
/* Settings > Document center: logo size, Classic lettering and the footer note on the client's page */
.doc-logo-s { max-height: 40px; max-width: 160px; }
.doc-logo-l { max-height: 84px; max-width: 320px; }
.doc-serif .doc { font-family: Georgia, 'Times New Roman', Times, serif; }
.doc-note { text-align: center; font-size: 13px; color: var(--muted); margin: 20px 0 -12px; }
.doc-samples { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 20px; }
.doc-form .form + p { margin-top: 12px; }
.doc-form .form-actions { margin-top: 16px; }
.doc-sizes { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.goes-on { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
.goes-on .muted { flex-basis: 100%; }
.doc-files { list-style: none; margin: 0; padding: 0; }
.doc-files li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.doc-files li:last-child { border-bottom: 1px solid var(--line); }
.doc-file-name { flex: 1 1 100%; min-width: 0; overflow-wrap: anywhere; }
.doc-files .goes-on { flex: 1 1 auto; }
.doc-files .goes-on .muted { flex-basis: auto; }
.doc-add { margin-top: 16px; }
@media (max-width: 640px) { .doc-samples > span { flex-basis: 100%; } .doc-samples .btn { flex: 1 1 0; justify-content: center; padding-left: 8px; padding-right: 8px; } .doc-samples .ic { display: none; } .goes-on { flex-direction: column; align-items: flex-start; } .goes-on .muted { flex-basis: auto; } }

/* Quick Action Hub, team messages, time clock, drafts and the offline outbox */
.rail-new { margin: 0 0 8px; }
.quick-for { margin: -6px 0 12px; color: var(--ink-2); }
.quick-sheet .sheet-head h2 { font-size: 24px; }
.quick-sheet .sheet-panel { width: min(520px, calc(100vw - 32px)); }
.quick-list { list-style: none; margin: 0 0 12px; padding: 0; }
.quick-list > li + li { border-top: 1px solid var(--line); }
.quick-row { display: flex; align-items: center; gap: 20px; min-height: 60px; padding: 8px 6px; color: var(--ink); font-size: 18px; font-weight: 500; text-decoration: none; border-radius: var(--r-sm); cursor: pointer; }
.quick-row:hover { background: var(--row-hover); }
.quick-row:focus-visible { outline: 3px solid var(--brand); outline-offset: -3px; }
.quick-row .ic { width: 28px; height: 28px; color: var(--brand); }
.quick-row.is-locked { color: var(--muted); cursor: default; }
.quick-row.is-locked .ic { color: var(--muted); }
.quick-row small { margin-left: auto; font-size: 13px; font-weight: 400; }
.quick-more > summary { list-style: none; } .quick-more > summary::-webkit-details-marker { display: none; }
.quick-more > summary .chev { margin-left: auto; width: 20px; height: 20px; color: var(--muted); transform: rotate(90deg); transition: transform .15s; }
.quick-more[open] > summary .chev { transform: rotate(-90deg); }
.quick-more > .quick-list { margin: 0 0 4px; border-top: 1px solid var(--line); }
.quick-more > .quick-list .quick-row { font-size: 16px; min-height: 52px; }
.quick-more > .quick-list .quick-row .ic { width: 24px; height: 24px; }
.pick-list { list-style: none; margin: 0; padding: 0; }
.pick-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); }
.pick-list li:first-child { border-top: 0; }
.pick-list a { flex: 1; padding: 14px 4px; font-weight: 600; overflow-wrap: anywhere; }
.ai-filled { margin-bottom: 12px; border-left: 4px solid var(--brand); }
.draft-note { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; grid-column: 1 / -1; }
form[aria-busy="true"] button[type="submit"], form[aria-busy="true"] button:not([type]) { opacity: .6; }
.outbox-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 75; height: 32px; line-height: 32px; padding: 0 16px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; background: var(--amber-tint); color: var(--ink); border-top: 1px solid var(--line); font-size: 13px; font-weight: 600; text-align: center; }
body.has-outbox .content { padding-bottom: 104px; }
.thread-list { list-style: none; margin: 0; padding: 0; }
.thread-list li { border-top: 1px solid var(--line); }
.thread-list li:first-child { border-top: 0; }
.thread-list a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; padding: 12px 16px; color: var(--ink); text-decoration: none; }
.thread-list a .muted { grid-column: 1 / -1; overflow-wrap: anywhere; }
.thread-list .unread-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--brand); align-self: center; }
.msg-list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; }
.msg-list li { max-width: min(560px, 88%); padding: 10px 12px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.msg-list li.is-mine { justify-self: end; background: var(--brand-tint); }
.msg-meta { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-form { display: flex; gap: 8px; align-items: flex-end; position: sticky; bottom: 0; padding: 8px 0; background: var(--bg); }
.msg-form textarea { flex: 1; min-width: 0; }
.clock-btn { min-height: 56px; font-size: 18px; }
@media (max-width: 760px) {
  .msg-form { bottom: calc(64px + env(safe-area-inset-bottom)); }
  .quick-sheet .sheet-panel { width: 100%; }
  .outbox-bar { bottom: calc(64px + env(safe-area-inset-bottom)); }
  body.has-outbox .content { padding-bottom: calc(132px + env(safe-area-inset-bottom)); }
  body.has-outbox .msg-form { bottom: calc(96px + env(safe-area-inset-bottom)); }
}

/* New job: Office or Field first, then only that type's fields */
.lead-q { font-size: 18px; font-weight: 600; margin: 0 0 12px; }
.type-pick { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.type-card { display: flex; align-items: center; gap: 16px; padding: 20px; min-height: 96px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); color: var(--ink); text-decoration: none; }
.type-card:hover { border-color: var(--brand); background: var(--row-hover); }
.type-card:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.type-card > .ic { width: 32px; height: 32px; color: var(--brand); }
.type-card b { display: block; font-size: 18px; margin-bottom: 2px; }
.type-card small { display: block; color: var(--muted); font-size: 14px; line-height: 1.4; }
.type-card .chev { margin-left: auto; width: 20px; height: 20px; color: var(--muted); }
.field-req { margin-bottom: 16px; }
.client-pick { display: grid; gap: 4px; }
.client-pick p { margin: 0; }
.job-form .more-opts { border-top: 1px solid var(--line); padding-top: 12px; }
.more-opts > summary { cursor: pointer; font-weight: 600; color: var(--brand); list-style: none; padding: 6px 0; }
.more-opts > summary::-webkit-details-marker { display: none; }
.more-opts > summary::before { content: "+ "; }
.more-opts[open] > summary::before { content: "− "; }
.more-opts > .form { margin-top: 8px; }
.type-tag { color: var(--ink-2); font-weight: 600; }
.seg-links { display: flex; gap: 6px; margin: 0 0 12px; flex-wrap: wrap; }
.seg-links a { padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--r); color: var(--ink); text-decoration: none; font-size: 14px; }
.seg-links a.on { border-color: var(--brand); color: var(--brand); font-weight: 600; }
.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding: 4px 0; }
.check-list li:first-child { border-top: 0; }
.check-list form { flex: 1; min-width: 0; }
.check-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 6px 4px; background: none; border: 0; text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.check-item .box { width: 20px; height: 20px; padding: 2px; border: 2px solid var(--line-strong); border-radius: 4px; color: transparent; flex: none; }
.check-list li.is-done .check-item .box { border-color: var(--green); background: var(--green); color: #fff; }
.check-list li.is-done .check-item span { color: var(--muted); text-decoration: line-through; }
.chip.chip-due { border-left-color: var(--amber); background: var(--amber-tint); }
@media (max-width: 760px) { .type-pick { grid-template-columns: 1fr; } }

/* ======================================================================================================
   TMP look (2026-11-29): taken from the logo, not a template. Charcoal, royal blue and orange; the slanted
   orange "PRO" tag is the signature (active menu item, primary buttons, section marks, the stage track);
   squarer corners, no soft tints for state, the heavy italic of the lettering on titles and numbers.
   ====================================================================================================== */
:root {
  --charcoal: #2B3036; --charcoal-2: #3A4047; --on-dark: #FFFFFF; --on-dark-2: #B9C0C8;
  --accent: #FC5800; --brand: #FC5800; --brand-hover: #E04F00; --blue: #0052B8;
  --bg: #EEF0F2; --line: #D7DBE0; --btn-fill: #E2E5E9; --btn-fill-hover: #D4D8DD;
  --r-sm: 4px; --r: 4px; --r-lg: 6px; --slant: -14deg;
}
h1 { font-size: 28px; line-height: 34px; font-style: italic; letter-spacing: -.02em; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.head-meta a { color: var(--blue); }

/* the frame: a charcoal rail with the light logo; the active item is the slanted orange tag */
.rail { background: var(--charcoal); border-right: 0; color: var(--on-dark); }
.rail .co { border-top-color: rgba(255, 255, 255, .12); }
.rail .co .co-name { color: var(--on-dark); }
.rail .co .co-mark { background: var(--accent); color: var(--charcoal); border-radius: 3px; }
.rail .nav-item { color: var(--on-dark-2); position: relative; isolation: isolate; border-radius: 0; }
.rail .nav-item .ic { color: var(--on-dark-2); }
.rail .nav-item:hover { background: transparent; color: var(--on-dark); }
.rail .nav-item:hover::before { content: ""; position: absolute; inset: 0 4px; z-index: -1; background: rgba(255, 255, 255, .07); transform: skewX(var(--slant)); }
.rail .nav-item.on { background: transparent; color: var(--on-dark); font-weight: 600; }
.rail .nav-item.on .ic { color: var(--on-dark); }
.rail .nav-item.on::before { content: ""; position: absolute; inset: 0 4px; z-index: -1; background: var(--brand); transform: skewX(var(--slant)); }
.rail .nav-item .count { background: var(--accent); color: var(--charcoal); font-weight: 700; }
.rail-foot { border-top-color: rgba(255, 255, 255, .12); }
.rail-foot .avatar { background: var(--charcoal-2); color: var(--on-dark); }
.rail .menu-pop { color: var(--ink); }
.rail-new.btn { background: var(--brand); color: #fff; border: 0; border-radius: 0; clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%); font-weight: 600; }
.rail-new.btn:hover { background: var(--brand-hover); }
.top { background: #fff; border-bottom: 1px solid var(--line); backdrop-filter: none; }

/* buttons: primary is the slanted tag; the rest are solid light fills, not outlines */
.btn { border-radius: var(--r-sm); border-color: transparent; background: var(--btn-fill); color: var(--ink); font-weight: 600; }
.btn:hover { background: var(--btn-fill-hover); }
.btn-primary { background: var(--brand); color: #fff; border: 0; border-radius: 0; padding-inline: 22px; clip-path: polygon(9px 0, 100% 0, calc(100% - 9px) 100%, 0 100%); }
.btn-primary.btn-sm { padding-inline: 16px; clip-path: polygon(7px 0, 100% 0, calc(100% - 7px) 100%, 0 100%); }
.btn-primary:hover { background: var(--brand-hover); }
.btn-primary:focus-visible { clip-path: none; }
.btn-quiet { background: transparent; color: var(--ink-2); }
.btn-quiet:hover { background: var(--btn-fill); }
.sect-head .btn-quiet { background: var(--btn-fill); border-color: transparent; }
.sect-head .btn-quiet:hover { background: var(--btn-fill-hover); }
.btn-danger { background: #fff; border-color: var(--red); }
input, select, textarea { border-radius: var(--r-sm); border-color: #B5BCC4; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 82, 184, .16); }

/* sections: a slanted orange mark on each heading instead of lines and boxes between them */
.sect + .sect { border-top: 0; padding-top: 8px; margin-top: 32px; }
.sect-head h2 { display: flex; align-items: center; gap: 10px; font-size: 17px; }
.sect-head h2::before { content: ""; width: 9px; height: 17px; flex: none; background: var(--accent); transform: skewX(var(--slant)); }
.panel { border-radius: var(--r-lg); border-color: var(--line); }
.tabs { border-bottom: 2px solid var(--line); }
.tabs a { font-weight: 600; border-bottom-width: 3px; margin-bottom: -2px; }
.tabs a.on { border-bottom-color: var(--accent); }

/* the stage track: connected slanted segments; done in charcoal, now in orange */
.track { gap: 2px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 2px 8px; margin-left: -8px; }
.track::-webkit-scrollbar { display: none; }
.track li { position: relative; isolation: isolate; border: 0; border-radius: 0; background: none; padding: 5px 14px; font-weight: 600; white-space: nowrap; color: #5E6770; }
.track li::before { content: ""; position: absolute; inset: 0; z-index: -1; background: #DFE2E6; transform: skewX(var(--slant)); }
.track li.done { color: #fff; }
.track li.done::before { background: var(--charcoal); }
.track li.done .ic { color: #fff; }
.track li.now { background: none; color: #fff; }
.track li.now::before { background: var(--brand); }

/* the numbers: one charcoal ledger band, italic figures like the lettering */
.strip { background: var(--charcoal); border: 0; border-radius: var(--r-lg); }
.strip-cell { border-left-color: rgba(255, 255, 255, .12); color: var(--on-dark); }
a.strip-cell:hover { background: rgba(255, 255, 255, .06); }
.strip-label { color: var(--on-dark-2); }
.strip-value { color: #fff; font-style: italic; font-size: 30px; line-height: 36px; letter-spacing: -.02em; }
.strip-sub { color: var(--on-dark-2); }
.strip .tone-bad { color: #FF9A62 !important; }
.strip-cell .chev { color: var(--on-dark-2); }

/* the next step: the one strong area on a project */
.next { background: var(--charcoal); color: var(--on-dark); border: 0; border-radius: var(--r-lg); }
.next-label { color: var(--on-dark-2); }
.next-text { color: #fff; font-style: italic; font-size: 19px; }
.next .btn:not(.btn-primary) { background: rgba(255, 255, 255, .12); color: #fff; }
.next .btn:not(.btn-primary):hover { background: rgba(255, 255, 255, .2); }

/* status tags: squared, like labels on a job board */
.pill { border-radius: 3px; font-weight: 600; }
.seg { border: 0; background: var(--btn-fill); border-radius: var(--r-sm); padding: 3px; gap: 3px; }
.seg span { border-left: 0; border-radius: 3px; }
.seg input:checked + span { background: var(--charcoal); color: #fff; }

/* needs attention: solid square signs (red, amber), not soft tinted circles */
.todo li { border-radius: 0; }
.todo-ic { border-radius: 3px; background: var(--btn-fill); color: var(--ink-2); }
.todo li.sev-3 .todo-ic { background: var(--red); color: #fff; }
.todo li.sev-2 .todo-ic { background: #F2B705; color: var(--charcoal); }
.todo-amt { font-size: 16px; }

/* the project board: cards marked down the left edge */
.job-card { border-radius: var(--r-sm); border-left: 3px solid var(--charcoal); }
.job-card:hover { border-color: var(--line); border-left-color: var(--brand); }
.tbl th { background: #E9ECEF; color: var(--ink-2); font-weight: 600; }

/* the + menu: grouped rows, each with its own pictogram and a line saying what it does */
.quick-sheet .sheet-head h2 { font-style: italic; font-size: 26px; letter-spacing: -.02em; }
.quick-row { gap: 16px; min-height: 64px; padding: 8px 6px; font-size: 17px; font-weight: 600; }
.quick-row .qt { display: flex; flex-direction: column; min-width: 0; }
.quick-row .qt small { font-size: 13px; font-weight: 400; color: var(--muted); line-height: 1.35; }
.quick-group { font-size: 13px; font-weight: 600; color: var(--muted); margin: 14px 0 2px; }

@media (max-width: 760px) {
  .tabbar { background: var(--charcoal); border-top: 0; }
  .tabbar .nav-item { color: var(--on-dark-2); }
  .tabbar .nav-item.on { color: #fff; }
  .tabbar .nav-item.on .ic { color: var(--accent); }
  .tabbar .nav-item .count { box-shadow: 0 0 0 2px var(--charcoal); background: var(--accent); color: var(--charcoal); }
  .tabbar .plus-btn { width: 60px; height: 46px; border-radius: 0; background: var(--brand); clip-path: polygon(11px 0, 100% 0, calc(100% - 11px) 100%, 0 100%); }
  .tabbar .plus-btn:focus-visible { clip-path: none; outline-color: #fff; }
  h1 { font-size: 26px; line-height: 32px; }
  .strip-value { font-size: 24px; line-height: 30px; }
}
/* two-column screens keep their columns level; a hidden sheet in a heading row takes no space */
.est-side > .sect, .stack-sects > .sect { margin-top: 0; padding-top: 0; }
.js .sect-head > details.sheet.hide-trigger:not([open]) { position: absolute; }
/* new job, step 1: big pictograms (hammer for office work, truck for the field); the field-job note is plain text */
.type-card { border-radius: var(--r-lg); border-color: var(--line); }
.type-card:hover { border-color: var(--charcoal); background: var(--surface); }
.field-req { background: none; padding: 0; color: var(--ink-2); }
.pick-list a { padding-inline: 0; }
/* long forms in labeled groups, each with the slanted mark */
.form-sub { display: flex; align-items: center; gap: 10px; font-size: 16px; margin: 8px 0 -4px; }
.form-sub::before { content: ""; width: 8px; height: 15px; flex: none; background: var(--accent); transform: skewX(var(--slant)); }
.form-sub:not(:first-child) { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.tpl-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.tpl-list a { display: flex; flex-direction: column; gap: 2px; padding: 12px 0; border-top: 1px solid var(--line); color: var(--ink); }
.tpl-list li:nth-child(-n + 2) a { border-top: 0; }
.tpl-list a:hover b { color: var(--brand); }
@media (max-width: 760px) { .tpl-list { grid-template-columns: 1fr; } .tpl-list li:nth-child(2) a { border-top: 1px solid var(--line); } }
.track { flex-wrap: wrap; overflow: visible; row-gap: 4px; }


/* words, not pictures (2026-11-29): no picture icons anywhere. The menus are type; the slanted orange tag
   still marks where you are, and alerts are slanted bars in their color. */
.rail .nav-item { font-size: 15px; padding-left: 14px; }
.todo-ic, .todo-ic:empty { width: 7px; height: 34px; margin: 0 6px 0 2px; border: 0; border-radius: 0; background: #C4C9CF; transform: skewX(var(--slant)); }
.todo li.sev-3 .todo-ic { background: var(--red); }
.todo li.sev-2 .todo-ic { background: #F2B705; }
.todo-ic.tone-good { background: var(--green); }
.timeline .tl-dot { background: transparent; }
.tl-missed .tl-dot::after { background: var(--red); }
.quick-row { padding-left: 2px; }
.quick-row .qt > span { font-size: 18px; }
@media (max-width: 760px) {
  .tabbar .nav-item.on::before { content: ""; position: absolute; bottom: 4px; left: calc(50% - 14px); width: 28px; height: 3px; background: var(--accent); transform: skewX(var(--slant)); }
}

/* team messages: the box can turn a message into a question or an action request (Dad's Team Message spec) */
.msg-form { display: block; }
.msg-row { display: flex; gap: 8px; align-items: flex-end; }
.msg-row textarea { flex: 1; min-width: 0; }
.ask-toggle { display: inline-flex; gap: 8px; align-items: center; margin-top: 8px; font-size: 14px; font-weight: 600; cursor: pointer; }
.ask-toggle input { width: 18px; height: 18px; }
.ask-fields { display: none; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; margin-top: 10px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.msg-form:has(.ask-toggle input:checked) { position: static; }
.msg-form:has(.ask-toggle input:checked) .ask-fields { display: grid; }
.ask-fields .field { margin: 0; }
.ask-fields select, .ask-fields input[type="date"], .ask-fields input[name="subject"] { width: 100%; }
.ask-note { grid-column: 1 / -1; margin: 0; }
.msg-list li.has-ask { max-width: min(640px, 94%); }
.ask-card { display: grid; gap: 8px; margin-top: 8px; padding: 10px 12px; background: var(--bg); border-left: 4px solid #C4C9CF; }
.ask-card.ask-p-high { border-left-color: #F2B705; }
.ask-card.ask-p-urgent, .ask-card.ask-overdue { border-left-color: var(--red); }
.ask-card.ask-closed { border-left-color: var(--green); }
.ask-card p { margin: 0; }
.ask-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.ask-act { display: grid; gap: 6px; }
.ask-act textarea, .ask-act input { width: 100%; }
.ask-files { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 14px; }
@media (max-width: 760px) { .ask-fields { grid-template-columns: 1fr; } }

/* Aiden's line icons (src/line-icons.js): in the menus, the + menu, buttons and search */
.quick-row .qi { width: 28px; height: 28px; flex: none; display: grid; place-items: center; }
.quick-row .qi .ic { width: 26px; height: 26px; color: var(--charcoal); }
.quick-row.is-locked .qi .ic { color: #B5BCC4; }
.rail .nav-item .ic { width: 20px; height: 20px; }

/* Try it with your website (src/routes/try.js, public/static/try.js) */
.try { padding: 40px 0 72px; }
.try-wrap { max-width: 780px; }
.try h1 { font-size: 36px; line-height: 42px; font-style: italic; letter-spacing: -.02em; margin: 0 0 10px; }
.try-lead { font-size: 18px; line-height: 1.5; color: var(--ink-2); margin: 0 0 18px; }
.try-progress { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 28px; padding: 0 0 0 6px; }
.try-progress li { position: relative; isolation: isolate; padding: 6px 16px; font-size: 14px; font-weight: 600; color: #5E6770; }
.try-progress li::before { content: ""; position: absolute; inset: 0; z-index: -1; background: #DFE2E6; transform: skewX(var(--slant)); transition: background .3s; }
.try-progress li.on { color: #fff; } .try-progress li.on::before { background: var(--brand); }
.try-progress li.done { color: #fff; } .try-progress li.done::before { background: var(--charcoal); }
.try-form { display: flex; gap: 10px; margin: 0 0 12px; }
.try-form input { flex: 1; min-width: 0; height: 54px; font-size: 18px; padding: 0 16px; }
.try-error { margin: 0 0 12px; padding: 10px 14px; border-left: 4px solid var(--red); background: #fff; font-weight: 600; }
.try-bar { height: 6px; background: #DFE2E6; margin: 18px 0 24px; overflow: hidden; }
.try-bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .7s ease; }
.try-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.try-steps li { display: flex; align-items: center; gap: 14px; font-size: 18px; color: #98A0A8; transition: color .3s; }
.try-steps li::before { content: ""; width: 24px; height: 24px; flex: none; background: #DFE2E6; transform: skewX(var(--slant)); transition: background .3s; }
.try-steps li.now { color: var(--ink); font-weight: 600; }
.try-steps li.now::before { background: var(--accent); animation: try-blink .8s ease-in-out infinite alternate; }
.try-steps li.done { color: var(--ink); }
.try-steps li.done::before { background: var(--charcoal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 15px no-repeat; }
@keyframes try-blink { from { opacity: .45; } to { opacity: 1; } }
.try-found { animation: try-rise .5s ease both; }
@keyframes try-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.try-card { display: flex; gap: 22px; align-items: center; margin: 0 0 20px; }
.try-logo { width: 140px; height: 140px; flex: none; display: grid; place-items: center; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); animation: try-pop .7s cubic-bezier(.2, 1.5, .4, 1) .1s both; }
.try-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.try-initials { font-size: 40px; font-weight: 700; font-style: italic; color: var(--brand); }
@keyframes try-pop { from { opacity: 0; transform: scale(.4) rotate(-8deg); } to { opacity: 1; transform: none; } }
.try-name h1 { margin-bottom: 6px; }
.try-name p { margin: 0; font-size: 17px; line-height: 1.5; color: var(--ink-2); }
.try-facts { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 10px 18px; margin: 0 0 14px; padding: 18px 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); }
.try-facts dt { font-weight: 600; color: var(--muted); }
.try-facts dd { margin: 0; overflow-wrap: anywhere; }
.try-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.try-tags span { padding: 2px 10px; background: var(--btn-fill); border-radius: 3px; font-weight: 600; font-size: 14px; }
.try-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 18px; }
.try-check { max-width: 540px; }
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1000; }
@media (max-width: 640px) {
  .try { padding-top: 24px; }
  .try h1 { font-size: 27px; line-height: 33px; }
  .try-form { flex-direction: column; }
  .try-card { flex-direction: column; align-items: flex-start; }
  .try-facts { grid-template-columns: 1fr; gap: 2px; }
  .try-facts dd { margin-bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) { .try-found, .try-logo, .try-steps li.now::before { animation: none; } .try-bar i { transition: none; } }
/* a company's logo in the side menu, on a white tile so dark logos show on the charcoal */
.co-logo { width: 56px; height: 40px; flex: none; display: grid; place-items: center; padding: 3px; background: #fff; border-radius: 4px; }
.co-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.try-peek { margin: 36px 0 0; }
.try-peek img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--r-lg); }
.try-peek figcaption { margin-top: 10px; color: var(--muted); font-size: 14px; }

/* the website scraper's checks (src/scan.js): what a page says, and what AI summarized */
.scan-ok, .scan-ai { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 3px; font-size: 12px; font-weight: 600; vertical-align: 1px; white-space: nowrap; }
.scan-ok { background: #E3F1E7; color: #1E6B3A; }
.scan-ok::before { content: "\2713\00a0"; }
.scan-ai { background: #FFF3D6; color: #7A5600; }
.scan-review { margin-top: 8px; }
.scan-review h2 { font-size: 20px; font-style: italic; margin: 0; }
.scan-brand { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.scan-logo { max-height: 72px; max-width: 220px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); object-fit: contain; }
.scan-icon { width: 40px; height: 40px; padding: 4px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); object-fit: contain; }
.scan-services { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
.scan-list li { margin: 3px 0; }
.try-read { display: flex; gap: 8px; align-items: center; } .try-read img { flex: none; border-radius: 3px; }

/* line controls: the + on the orange buttons drawn heavier */
.tabbar .plus-btn .ic, .rail-new .ic, .btn-primary .ic { stroke-width: 2.25; }
.tabbar .plus-btn .ic { stroke-width: 2.6; }

/* website changes (Settings > Company) */
.site-changes { border-left: 3px solid var(--accent); padding-left: 14px; margin-bottom: 18px; }
.site-changes h3 { margin: 0; }
.change-row > span { display: flex; flex-direction: column; gap: 2px; }
.change-pair { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.change-pair input[type=color] { width: 28px; height: 20px; padding: 0; border: 0; vertical-align: middle; }
.change-logo { max-height: 40px; max-width: 160px; vertical-align: middle; }
.change-icon { width: 24px; height: 24px; vertical-align: middle; }

/* public site inner pages: features, phone, switching, pricing, questions */
.s-page-top { padding: 52px 0 56px; background: var(--bg); border-bottom: 1px solid var(--line); }
.s-page-top h1 { margin: 0; max-width: 20ch; font-size: clamp(34px, 5vw, 56px); line-height: 1.06; letter-spacing: -.02em; }
.s-lead { margin: 16px 0 0; max-width: 62ch; font-size: 19px; line-height: 1.6; color: var(--ink-2); }
.s-more { font-weight: 600; }
.sh-nav a[aria-current="page"] { color: var(--brand-ink); box-shadow: inset 0 -3px 0 var(--accent); }
.s-extras h3 a { color: var(--ink); }
.s-top-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 64px; align-items: center; }
.s-page-top .s-contact { position: static; background: #fff; }
.s-faq-grid.solo { grid-template-columns: minmax(0, 1fr); }
.s-tiers { margin-top: 32px; border-bottom: 1px solid var(--line); }
.s-tier { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 12px 48px; padding: 24px 0; border-top: 2px solid var(--ink); }
.s-tier h3 { font-size: 26px; font-style: italic; }
.s-tier p { margin: 6px 0 0; color: var(--ink-2); }
.s-tier .s-list { margin: 4px 0 0; grid-template-columns: 1fr 1fr; gap: 12px 32px; }
@media (max-width: 960px) { .s-top-grid { grid-template-columns: 1fr; gap: 28px; } .s-page-top .s-contact { max-width: 560px; } .s-tier { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .s-tier .s-list { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .s-page-top { padding: 32px 0 40px; } .s-lead { font-size: 17px; } }

/* Settings > Automations: one automatic text */
.auto-text { margin: 0; padding: 14px 0; border: 0; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.auto-text:first-of-type { border-top: 0; }

/* Settings > Calls and texts > Call flow */
.flow-days { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.flow-key { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr); gap: 8px; align-items: center; margin-top: 8px; }
@media (max-width: 600px) { .flow-key { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .flow-key > span { grid-column: 1 / -1; } }

/* sign-up steps */
.step-note { margin: 0 0 4px; font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--muted); }
.no-site { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.no-site summary { cursor: pointer; font-weight: 600; color: var(--brand-ink); }
.no-site form { margin-top: 12px; }

/* sign-up: first and last name side by side */
.name-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 380px) { .name-pair { grid-template-columns: 1fr; } }
/* reading a website: the progress bar */
.scan-progress { margin-top: 14px; }
.scan-bar { height: 8px; background: var(--brand-tint); border-radius: 4px; overflow: hidden; }
.scan-bar span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 4px; transition: width .25s linear; }
.scan-progress p { margin: 8px 0 0; color: var(--ink-2); }
.scan-now button:disabled { opacity: 1; background: var(--accent); filter: saturate(.85); }
@media (prefers-reduced-motion: reduce) { .scan-bar span { transition: none; } }
/* every tick box the same size, whatever the text beside it */
.check-row input[type="checkbox"], .check-row input[type="radio"] { flex: none; width: 18px; height: 18px; }
/* the services to check: name, then where it was found, on the line under it */
.scan-services { gap: 2px; }
.check-row.svc { padding: 8px 0; border-top: 1px solid var(--line); align-items: flex-start; }
.check-row.svc:first-of-type { border-top: 0; }
.check-row.svc > span { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; font-size: 15px; }
.check-row.svc .scan-ok, .check-row.svc .scan-ai { margin-left: 0; }

/* phone use this month (Calls > Numbers, Admin) */
.use-row { display: grid; grid-template-columns: 140px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 6px 0; }
.use-label { font-weight: 600; }
.use-bar { display: block; height: 8px; background: var(--bg); border-radius: 4px; overflow: hidden; }
.use-bar > span { display: block; height: 100%; background: var(--green); }
.use-bar.high > span { background: var(--amber); }
.use-bar.full > span { background: var(--red); }
.use-num { font-variant-numeric: tabular-nums; color: var(--ink-2); white-space: nowrap; }
.limits { display: flex; flex-wrap: wrap; gap: 8px 12px; margin-top: 8px; align-items: center; }
.limits input { width: auto; min-width: 0; padding: 4px 6px; }
@media (max-width: 600px) { .use-row { grid-template-columns: 1fr auto; } .use-bar { grid-column: 1 / -1; grid-row: 2; } }

/* calling: the dial box on Calls and the dial pad in the phone window */
.dial-box { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.dial-box .field { margin: 0; min-width: 200px; }
.dial-box input[type=tel] { font-size: 20px; letter-spacing: .02em; }
/* the dial pad: on the phone page and in its small window */
.phone-page { min-height: 0; padding: 0; background: none; max-width: 380px; margin: 0 auto; }
.dialer { display: grid; gap: 12px; }
.dial-card { display: grid; gap: 16px; justify-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px 24px; }
.dial-top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; width: 100%; margin: 0; }
.dial-top .dial-line { flex: 1; min-width: 0; width: auto; }
.dial-top .dial-from { text-align: left; }
.dial-who { margin: 0 0 -12px; font-size: 16px; font-weight: 600; }
.dial-search { position: relative; }
.dial-search > .ic { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.dial-search input { width: 100%; height: 48px; padding-left: 40px; font-size: 16px; background: var(--surface); }
.dial-results { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20; max-height: 340px; overflow-y: auto; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.dial-hit { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; padding: 10px 12px; border: 0; border-radius: var(--r-sm); background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.dial-hit:hover, .dial-hit:focus-visible { background: var(--surface-2); }
.dial-hit span { font-size: 13px; color: var(--muted); }
.dial-hit:disabled { opacity: .6; cursor: default; }
.dial-none { margin: 0; padding: 10px 12px; color: var(--muted); }
.dial-from { margin: 0; color: var(--muted); font-size: 13px; text-align: center; }
.dial-line { width: 100%; }
.dial-display { position: relative; width: 100%; }
.dial-display input { width: 100%; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; box-shadow: none; font-size: 28px; font-weight: 600; text-align: center; letter-spacing: .02em; padding: 6px 44px 10px; font-variant-numeric: tabular-nums; }
.dial-display input:focus { outline: none; border-bottom-color: var(--brand); }
.dial-display input::placeholder { font-size: 17px; font-weight: 400; letter-spacing: 0; color: var(--muted); }
.dial-del { position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.dial-del:hover { background: var(--surface-2); color: var(--ink); }
.dial-display input:placeholder-shown + .dial-del { visibility: hidden; }
.dial-from a, .phone-note a { color: var(--brand-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.dial-keys { display: grid; grid-template-columns: repeat(3, 72px); gap: 12px 22px; justify-content: center; }
.dial-key { width: 72px; height: 72px; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; font: inherit; line-height: 1; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; }
.dial-key b { font-size: 28px; font-weight: 400; }
.dial-key small { height: 11px; margin-top: 4px; font-size: 10px; font-weight: 600; letter-spacing: .14em; color: var(--muted); }
.dial-key:hover { background: var(--hover); }
.dial-key:active { background: var(--line); }
.dial-call { width: 64px; height: 64px; border: 0; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; cursor: pointer; }
.dial-call .ic { width: 28px; height: 28px; }
.dial-call:hover { background: var(--brand-hover); }
.dial-call:disabled { background: var(--line-strong); cursor: not-allowed; }
.phone-card .dial-keys { margin-top: 14px; gap: 10px 18px; grid-template-columns: repeat(3, 60px); }
.phone-card .dial-key { width: 60px; height: 60px; }
.phone-note { margin: 0; color: var(--muted); font-size: 13px; text-align: center; }
@media (max-width: 360px) { .dial-keys { grid-template-columns: repeat(3, 64px); gap: 10px 16px; } .dial-key { width: 64px; height: 64px; } }

/* public site: Sign in for people who already have an account */
.sh-login .ic { width: 16px; height: 16px; }
.sh-signin { display: none; }
@media (max-width: 760px) { .sh-signin { display: inline-flex; align-items: center; gap: 6px; height: 44px; margin-left: auto; padding: 0 8px; font-weight: 600; color: var(--ink); text-decoration: none; } .sh-signin .ic { width: 18px; height: 18px; } .sh-signin + .sh-call { margin-left: 0; } }
.s-form-alt + .s-form-alt { margin-top: 6px; }
.sh-signin { white-space: nowrap; }
@media (max-width: 400px) { .sh-call { display: none !important; } .sh-signin { padding: 0 4px; } }

/* phones: the office tab bar is Schedule, +, Phone, Messages; every other page sits under Go to in the + sheet */
@media (max-width: 760px) { .tabbar.staff { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 1fr; } }

/* client forms: address suggestions and the map of the spot */
.addr-field { position: relative; }
.addr-pop { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; margin-top: 4px; padding: 4px; max-height: 300px; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.addr-hit { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; padding: 9px 10px; border: 0; border-radius: var(--r-sm); background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.addr-hit:hover, .addr-hit:focus-visible { background: var(--surface-2); }
.addr-hit span { font-size: 13px; color: var(--muted); }
.addr-map.is-drawn { position: relative; height: 220px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r); background: #AAD3DF; user-select: none; }
.addr-map img { position: absolute; width: 256px; height: 256px; max-width: none; }
.addr-map .map-pin { position: absolute; left: calc(50% - 14px); top: calc(50% - 38px); width: 28px; height: 40px; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .35)); }
.addr-map .map-credit { position: absolute; right: 4px; bottom: 3px; padding: 0 4px; border-radius: 3px; background: rgba(255, 255, 255, .75); color: #555; font-size: 10px; line-height: 15px; }
.addr-note { padding: 10px 12px; color: var(--muted); font-size: 14px; }
.addr-note.is-busy::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; vertical-align: -1px; border: 2px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: addr-spin .7s linear infinite; }
@keyframes addr-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .addr-note.is-busy::before { animation: none; } }
.call-search { margin: 0 0 12px; }
.addr-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 0 16px; }
.addr-row .field { margin: 0; }

/* the TMP assistant: the corner button and its chat panel (public/static/assistant.js) */
.ai-fab { position: fixed; right: 20px; bottom: 20px; z-index: 80; display: grid; place-items: center; width: 54px; height: 54px; padding: 0; border: 0; border-radius: 50%; background: var(--surface); color: var(--ai); box-shadow: 0 4px 16px rgba(28, 27, 25, .18); cursor: pointer; transition: transform .15s; }
.ai-fab .ic { width: 28px; height: 28px; fill: var(--ai); stroke: var(--ai); }
.ai-fab:hover { transform: scale(1.06); }
.ai-fab:focus-visible { outline: 3px solid var(--ai); outline-offset: 3px; }
.ai-tip { position: absolute; right: calc(100% + 10px); top: 50%; transform: translateY(-50%); padding: 6px 10px; border-radius: var(--r-sm); background: var(--charcoal); color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s; }
.ai-fab:hover .ai-tip, .ai-fab:focus-visible .ai-tip { opacity: 1; }
.ai-panel { position: fixed; right: 20px; bottom: 20px; z-index: 90; display: flex; flex-direction: column; width: 400px; max-width: calc(100vw - 32px); height: min(620px, calc(100vh - 40px)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.ai-head { display: flex; align-items: center; gap: 2px; padding: 8px 8px 8px 16px; border-bottom: 1px solid var(--line); }
.ai-head b { margin-right: auto; font-size: 15px; }
.ai-head .ai-voice { margin-right: 4px; }
.ai-head .ai-voice.on { color: var(--brand-ink); background: var(--brand-tint); }
.ai-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 14px; }
.ai-hello { margin: auto 0 0; color: var(--muted); }
.ai-hello b { display: block; margin-bottom: 4px; color: var(--ink); font-size: 17px; }
.ai-hello p { margin: 0; }
.ai-msg { max-width: 86%; padding: 9px 12px; border-radius: 12px; line-height: 1.45; }
.ai-msg p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.ai-msg .btn { margin: 8px 6px 0 0; }
.ai-msg.from-me { align-self: flex-end; background: var(--charcoal); color: #fff; border-bottom-right-radius: 4px; }
.ai-msg.from-ai { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 4px; }
.ai-confirm { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.ai-confirm .ai-q { font-weight: 600; }
.ai-mail { margin: 6px 0 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.ai-typing { display: flex; gap: 5px; padding: 13px 14px; }
.ai-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: ai-dot 1s infinite ease-in-out; }
.ai-typing span:nth-child(2) { animation-delay: .15s; }
.ai-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes ai-dot { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.ai-form { display: flex; align-items: flex-end; gap: 6px; padding: 10px; border-top: 1px solid var(--line); }
.ai-form textarea { flex: 1; min-height: 44px; max-height: 140px; padding: 10px 12px; resize: none; font-size: 16px; line-height: 1.4; }
.ai-form .icon-btn, .ai-send { width: 44px; height: 44px; padding: 0; flex: none; }
.ai-mic.on { background: var(--red-tint); color: var(--red); animation: ai-listen 1.2s infinite; }
@keyframes ai-listen { 50% { box-shadow: 0 0 0 6px rgba(179, 38, 30, .15); } }
@media (prefers-reduced-motion: reduce) { .ai-typing span, .ai-mic.on { animation: none; } }
@media (max-width: 760px) {
  .ai-fab { right: 14px; bottom: calc(64px + 14px + env(safe-area-inset-bottom)); width: 52px; height: 52px; }
  body:has(.editor-bar) .ai-fab { bottom: calc(64px + 172px + env(safe-area-inset-bottom)); }
  .ai-panel { inset: 0; width: auto; max-width: none; height: auto; border: 0; border-radius: 0; padding-bottom: env(safe-area-inset-bottom); }
}
@media print { .ai-fab, .ai-panel { display: none !important; } }

/* Settings: a grouped side menu next to the page on computers; on phones one scrolling strip, scrollbar visible */
.set-nav { display: flex; gap: 4px; margin: 0 0 20px; padding-bottom: 6px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: thin; }
.set-group { display: contents; }
.set-h { display: none; }
.set-nav a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: var(--r-sm); color: var(--ink-2); font-size: 14px; font-weight: 600; white-space: nowrap; text-decoration: none !important; }
.set-nav a:hover { background: var(--surface-2); color: var(--ink); }
.set-nav a.on { background: var(--brand-tint); color: var(--brand-ink); }
@media (min-width: 900px) {
  .content:has(> .set-nav) { display: grid; grid-template-columns: 210px minmax(0, 1fr); column-gap: 32px; align-items: start; }
  .content:has(> .set-nav) > * { grid-column: 2; min-width: 0; }
  .content:has(> .set-nav) > .head { grid-column: 1 / -1; }
  .content:has(> .set-nav) > .set-nav { grid-column: 1; grid-row: 2 / span 40; position: sticky; top: 16px; display: block; overflow: visible; margin: 0; padding: 0; border: 0; }
  .set-group { display: block; margin-bottom: 18px; }
  .set-h { display: block; margin: 0 0 4px 12px; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
  .set-nav a { display: flex; min-height: 36px; }
}
/* Tab bars that hold more than fits: a thin scrollbar so nothing looks cut off */
.tabs { scrollbar-width: thin; }
.tabs::-webkit-scrollbar { display: block; height: 4px; }
.tabs::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 2px; }

/* Long details read from the left (the business profile), bullets beside their text */
.profile .kv { grid-template-columns: minmax(110px, auto) minmax(0, 1fr); }
.profile .kv dd { text-align: left; }
.profile .kv dd ul, .profile .kv dd ol { margin: 0; padding-left: 18px; }
.profile .kv dd li + li { margin-top: 4px; }
@media (max-width: 600px) { .profile .kv { grid-template-columns: minmax(0, 1fr); gap: 2px 0; } .profile .kv dt { margin-top: 10px; font-weight: 600; } }
/* A word only breaks when it can't fit on a line by itself */
td, th, dd, .sub, .muted { overflow-wrap: break-word; }

/* AI writing under text boxes: purple, so it reads as AI and not as a save button */
:root { --ai: #6B3FD4; --ai-tint: #F2ECFF; }
.ai-write-btn { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; padding: 3px 10px 3px 7px; border: 1px solid #D9CCFB; border-radius: var(--r-sm); background: var(--ai-tint); color: var(--ai); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.ai-write-btn .ic { width: 15px; height: 15px; }
.ai-write-btn:hover { background: #E7DCFF; }
.stack-form > .ai-write-btn { align-self: flex-start; margin-top: -8px; }
.ai-write { margin-top: 8px; padding: 12px; border: 1px solid #D9CCFB; border-radius: var(--r); background: #FBF9FF; }
.ai-write-h { margin: 0 0 8px; color: var(--muted); font-size: 13px; }
.ai-ask { width: 100%; }
.ai-out { margin-top: 10px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; }
.ai-out.is-busy { color: var(--muted); }
.ai-write-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ai-write-row .ai-go { background: var(--ai); border-color: var(--ai); color: #fff; }
.ai-write-row .ai-go:hover { background: #5A31BF; }

/* The + menu: every action as a big button, then Go to (phones), the same buttons */
.quick-grid { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 0 14px; padding: 0; }
@media (min-width: 761px) { .quick-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.quick-tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; min-height: 86px; padding: 10px 6px; border-radius: var(--r); background: var(--surface-2); color: var(--ink); font-size: 14px; font-weight: 600; line-height: 1.25; text-align: center; text-decoration: none !important; }
.quick-tile .ic { width: 28px; height: 28px; flex: none; color: var(--brand); }
.quick-tile:hover { background: var(--hover); }
.quick-tile:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
/* Every button the same colors, even one the plan doesn't include yet (its small note says which plan) */
.quick-tile.is-locked { cursor: default; }
.quick-grid { grid-auto-rows: 1fr; }
.quick-grid > li { display: flex; }
.quick-grid > li > .quick-tile { flex: 1; }
.quick-tile small { font-size: 11px; font-weight: 500; color: var(--muted); }
.quick-tile .count { position: absolute; top: 6px; right: 8px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 600; display: grid; place-items: center; }
/* No half-empty last row: the last button stretches across what is left */
@media (max-width: 760px) {
  .quick-grid > li:last-child:nth-child(3n+1) { grid-column: 1 / -1; }
  .quick-grid > li:last-child:nth-child(3n+2) { grid-column: span 2; }
}
@media (min-width: 761px) {
  .quick-grid > li:last-child:nth-child(4n+1) { grid-column: 1 / -1; }
  .quick-grid > li:last-child:nth-child(4n+2) { grid-column: span 3; }
  .quick-grid > li:last-child:nth-child(4n+3) { grid-column: span 2; }
}

/* Links in running text: dark words, logo-orange underline (one orange everywhere, and still easy to read) */
.dial-from a, .phone-note a, .site main a:not(.btn) { color: var(--ink); text-decoration: underline; text-decoration-color: var(--brand); text-decoration-thickness: 2px; text-underline-offset: 3px; }
/* the assistant's voice: hold the mic, or call hands-free */
.ai-mic { touch-action: none; user-select: none; -webkit-user-select: none; }
.ai-call { color: var(--green); }
.ai-callbar { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--line); background: var(--green-tint); }
.ai-callbar .grow { display: flex; flex-direction: column; min-width: 0; }
.ai-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); flex: none; animation: ai-listen 1.4s infinite; }
@media (prefers-reduced-motion: reduce) { .ai-dot { animation: none; } }

/* ---------- schedule: week / month switch, date bar, month calendar ---------- */
.period { display: flex; align-items: center; gap: 4px; margin: -6px 0 16px; }
.period b { font-size: 17px; font-weight: 600; min-width: 128px; text-align: center; white-space: nowrap; }
.period .today-btn { margin-left: 8px; }
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.mhead { background: var(--surface-2); padding: 8px 10px; font-size: 13px; font-weight: 500; color: var(--muted); }
.mcell { min-width: 0; min-height: 116px; padding: 6px 8px 8px; background: var(--surface); display: flex; flex-direction: column; gap: 4px; color: var(--ink); text-decoration: none !important; }
.mcell:hover { background: var(--row-hover); }
.mcell.out { background: var(--bg); }
.mcell.out .mnum { color: var(--muted); }
.mnum { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; font-size: 14px; font-weight: 600; }
.mcell.today .mnum { background: var(--brand); color: #fff; }
.mchip { display: block; padding: 3px 6px; border-radius: 6px; background: var(--surface-2); border-left: 3px solid var(--brand); font-size: 12px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mchip b { font-weight: 600; }
.mmore { font-size: 12px; color: var(--muted); padding-left: 6px; }
.mdots { display: none; }
.month-foot { margin-top: 10px; }
@media (max-width: 760px) {
  .head:has(.view-toggle) .head-actions { justify-content: space-between; }
  .head:has(.view-toggle) .view-toggle .btn { height: 38px; padding: 0 18px; }
  .period { margin: -8px 0 12px; justify-content: space-between; }
  .period b { flex: 1; min-width: 0; font-size: 16px; }
  .period .today-btn { margin-left: 4px; order: 3; }
  .mhead { padding: 6px 0; text-align: center; font-size: 12px; }
  .mcell { min-height: 58px; padding: 6px 2px; align-items: center; gap: 3px; }
  .mnum { width: 30px; height: 30px; font-size: 15px; font-weight: 500; }
  .mchip, .mmore { display: none; }
  .mdots { display: flex; gap: 3px; }
  .mdots i { width: 5px; height: 5px; border-radius: 50%; background: var(--brand); }
  .mcell.out .mdots i { opacity: .5; }
  /* The week's day strip: weekday over the date, the picked day filled, today's date in orange. */
  .daystrip { gap: 4px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
  .daystrip a { height: 58px; border: 0; border-radius: 12px; background: transparent; gap: 2px; font-size: 12px; }
  .daystrip a b { font-size: 18px; font-weight: 600; }
  .daystrip a.today b { color: var(--brand); }
  .daystrip a.on { background: var(--ink); }
  .daystrip a.on b { color: #fff; }
  .daystrip a.has::after { bottom: 5px; }
  .daystrip a.on.has::after { background: #fff; }
}

/* ---------- calls: the date and time on its own line; Listen beside Call ---------- */
.call-when { display: block; margin-top: 2px; font-size: 14px; color: var(--ink-2); }
.call-acts { display: flex; gap: 8px; flex: none; align-items: center; }
.btn.listen[aria-pressed] { background: var(--ink); border-color: var(--ink); color: #fff; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  .call-row { flex-wrap: wrap; }
  .call-acts { width: 100%; }
  .call-acts .btn { flex: 1; }
}
/* A tab strip scrolls sideways only (its underline sat 2px past the box and drew a vertical scrollbar). */
.tabs { overflow-y: hidden; }

/* ---------- people lists: a search box over a short scrolling list ---------- */
[data-pick] .pick-q { margin-bottom: 8px; }
div.pick-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 12px; max-height: 248px; overflow-y: auto; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.pick-list .check-row { padding: 4px 0; }
.pick-list .check-row small { margin-left: 4px; }
@media (max-width: 760px) { div.pick-list { grid-template-columns: minmax(0, 1fr); max-height: 296px; } }

/* ---------- messages and texts: photos, the photo button, Seen ---------- */
.msg-photo { display: block; margin-top: 6px; }
.msg-photo img { display: block; max-width: min(260px, 100%); max-height: 320px; border-radius: var(--r); object-fit: cover; background: var(--surface-2); }
.msg-add { flex: none; width: 46px; padding: 0; justify-content: center; }
.msg-file:empty { display: none; }
.msg-file { margin: 4px 0 0; }
.msg-seen { text-align: right; margin: -8px 0 16px; }
.msg-body a { color: var(--blue); text-decoration: underline; overflow-wrap: anywhere; }
.msg-hint { margin: 4px 0 0; }

/* ---------- + menu as a list: the icon, then the name, one per row (Aiden, 2026-11-30) ---------- */
.quick-grid, .quick-grid.quick-go { display: block; margin: 0 0 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.quick-grid > li { display: block; border-top: 1px solid var(--line); }
.quick-grid > li:first-child { border-top: 0; }
.quick-grid .quick-tile { flex-direction: row; justify-content: flex-start; align-items: center; gap: 14px; min-height: 56px; padding: 8px 16px; border-radius: 0; background: transparent; font-size: 16px; font-weight: 600; text-align: left; }
.quick-grid .quick-tile .ic { box-sizing: content-box; width: 20px; height: 20px; padding: 8px; border-radius: 10px; background: var(--brand-tint); color: var(--brand); }
.quick-grid .quick-tile:hover { background: var(--row-hover); }
.quick-grid .quick-tile:focus-visible { outline-offset: -3px; }
.quick-grid .quick-tile small, .quick-grid .quick-tile .count { position: static; margin-left: auto; }
.quick-sheet .sheet-panel { width: min(440px, calc(100vw - 32px)); }
@media (max-width: 760px) { .quick-sheet .sheet-panel { width: 100%; } }

/* ---------- TMP AI panel: a dark header with the purple badge, starter questions, and a way to a person ---------- */
.ai-panel { border-radius: 16px; overflow: hidden; box-shadow: 0 18px 48px rgba(16, 20, 24, .2), 0 2px 6px rgba(16, 20, 24, .08); }
.ai-head { gap: 4px; padding: 12px 8px 12px 14px; background: var(--charcoal); color: #fff; border-bottom: 0; }
.ai-head b { margin: 0; font-size: 16px; }
.ai-badge { flex: none; display: grid; place-items: center; width: 36px; height: 36px; margin-right: 6px; border-radius: 50%; background: var(--ai); }
.ai-badge .ic { width: 20px; height: 20px; fill: #fff; stroke: #fff; }
.ai-title { display: flex; flex-direction: column; min-width: 0; margin-right: auto; line-height: 1.25; }
.ai-title span { font-size: 12px; color: rgba(255, 255, 255, .72); white-space: nowrap; }
.ai-head .icon-btn, .ai-head .ai-voice { color: rgba(255, 255, 255, .86); }
.ai-head .icon-btn:hover, .ai-head .ai-voice:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.ai-head .ai-voice.on { background: var(--ai); color: #fff; }
.ai-log { background: var(--bg); }
.ai-msg.from-ai { background: var(--surface); border: 1px solid var(--line); }
.ai-hello { color: var(--ink-2); }
.ai-hello b { font-size: 20px; margin-bottom: 6px; }
.ai-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.ai-chip { padding: 8px 12px; border: 1px solid #D9CCFB; border-radius: var(--r); background: var(--surface); color: var(--ai); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-align: left; }
.ai-chip:hover { background: var(--ai-tint); }
.ai-panel .ai-send { background: var(--ai); border-color: var(--ai); }
.ai-panel .ai-send:hover { background: #5A31BF; }
.ai-human { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0 14px 12px; font-size: 13px; font-weight: 600; color: var(--ink-2); background: var(--surface); text-decoration: none; }
.ai-human:hover { color: var(--ink); text-decoration: underline; }
.ai-human .ic { width: 16px; height: 16px; }
.help-intro { display: flex; gap: 12px; align-items: flex-start; margin: 0; color: var(--ink-2); }
.help-intro .ic { flex: none; width: 22px; height: 22px; color: var(--brand); margin-top: 2px; }
.msg-list li.from-support { border-color: #D9CCFB; background: #FBF9FF; }

/* ---------- Admin: one card a company ---------- */
.co-list { display: grid; gap: 12px; }
.co-card { padding: 18px 20px; }
.co-top { display: flex; gap: 12px 20px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.co-id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.co-id b { font-size: 17px; }
.co-state { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.co-desc { margin: 10px 0 0; max-width: 72ch; color: var(--ink-2); font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.co-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px 24px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.co-block { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.co-wide { grid-column: 1 / -1; }
.co-h { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.co-limits { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px 14px; align-items: end; }
.co-limits p { grid-column: 1 / -1; margin: 0; }
.co-limits label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.co-limits input { width: 100%; }
.co-limits .btn { justify-self: start; }
.co-list > .panel { margin: 0; }
/* Admin: TMP AI chats (src/routes/admin.js /platform/chats) */
.chat-filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.chat-filter select { width: auto; flex: 1 1 200px; max-width: 320px; min-width: 0; }
.chat-list { display: grid; gap: 10px; }
.chat-list > .panel { margin: 0; }
.chat-log { padding: 14px 18px; }
.chat-log.is-bad { border-left: 3px solid var(--red); }
.chat-log p { margin: 0 0 6px; }
.chat-say { white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-lines .chat-say { margin-bottom: 4px; }
.co-block form.row { display: flex; flex-wrap: nowrap; gap: 8px; align-items: center; }
.co-block form.row select { flex: 1; min-width: 0; }
.ai-head .ai-voice { gap: 6px; }
.ai-head .ai-voice .ic { width: 18px; height: 18px; }
@media (max-width: 760px) { .ai-title span { white-space: normal; } .ai-head .ai-voice { padding: 0 10px; } }
.panel:has(> .quick-grid) { padding: 0; border: 0; background: none; box-shadow: none; }
/* Aiden: no colored square behind the icons, and the icon closer to its name. */
.quick-grid .quick-tile { gap: 10px; }
.quick-grid .quick-tile .ic { box-sizing: border-box; width: 22px; height: 22px; padding: 0; border-radius: 0; background: none; }
.phone-off h2 { margin: 0 0 6px; font-size: 18px; }
.phone-off p { margin: 0 0 12px; max-width: 64ch; color: var(--ink-2); }
.phone-off p:last-child { margin-bottom: 0; }

/* A company logo in the side menu: its own white card the width of the menu, the name on one line under it (Aiden). */
.co:has(.co-logo) { flex-direction: column; align-items: stretch; gap: 8px; }
.co:has(.co-logo) .co-logo { width: 100%; height: 60px; padding: 8px 14px; border-radius: 8px; }
.co:has(.co-logo) .co-logo img { max-height: 44px; }
.rail .co:has(.co-logo) .co-name { font-size: 13px; font-weight: 600; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .85; }

/* ---------- TMP AI voice call: the orb screen ---------- */
.ai-panel:has(.ai-stage:not([hidden])) .ai-log, .ai-panel:has(.ai-stage:not([hidden])) .ai-human { display: none; }
.ai-stage { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 18px 18px 22px; background: #F6F5F3; }
.ai-orb { width: min(270px, 68vw); height: min(270px, 68vw); }
.ai-orb.no-gl { border-radius: 50%; background: radial-gradient(circle at 34% 30%, #FFC48A 0, #FC5800 32%, #C2408F 62%, #6B3FD4 100%); transition: transform .12s ease-out; }
.ai-stage-state { margin: 10px 0 0; font-size: 18px; font-weight: 600; color: var(--ink); }
.ai-stage[data-mode="speaking"] .ai-stage-state { color: var(--ai); }
/* Under the orb on a call: what needs the person (a Yes or No) and what TMP AI opened (Aiden, 2026-12-01). */
.ai-stage-acts { width: 100%; max-width: 320px; display: grid; gap: 8px; }
.ai-stage-acts:empty { display: none; }
.ai-stage-acts > .btn { width: 100%; justify-content: center; }
.ai-call-ask { padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 2px 8px rgba(16, 20, 24, .06); }
.ai-call-ask p { margin: 0 0 12px; font-weight: 600; color: var(--ink); line-height: 1.4; }
.ai-call-yesno { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ai-call-yesno .btn { justify-content: center; }
.ai-stage-row { display: flex; gap: 28px; margin-top: 10px; }
/* Mute and End call under the orb, each named under its circle (Aiden, 2026-12-02: voices nearby were cutting in). */
.ai-key { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; cursor: pointer; }
.ai-key-label { font-size: 13px; font-weight: 600; }
.ai-key:focus-visible { outline: none; }
.ai-key:focus-visible .ai-round { outline: 3px solid var(--ai); outline-offset: 3px; }
.ai-key .ic-off, .ai-key[aria-pressed="true"] .ic-on { display: none; }
.ai-key[aria-pressed="true"] .ic-off { display: block; }
.ai-key[aria-pressed="true"] .ai-round { background: #B42318; border-color: #B42318; color: #fff; }
.ai-key[aria-pressed="true"] .ai-key-label { color: #B42318; }
.ai-stage[data-muted] .ai-stage-state { color: #B42318; }
.ai-stage-muted { margin: -4px 0 0; font-size: 14px; color: var(--muted); }
.ai-stage-tip { margin: 0; font-size: 13px; color: var(--muted); }
/* The viewer beside a call: the proposal or document as the client sees it, kept up to date, with Save as PDF. */
.ai-view { position: fixed; z-index: 91; top: 20px; bottom: 20px; left: 20px; right: 440px; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: 0 18px 48px rgba(16, 20, 24, .2), 0 2px 6px rgba(16, 20, 24, .08); }
.ai-view[hidden] { display: none; }
.ai-view-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.ai-view-title { font-size: 15px; color: var(--ink); }
.ai-view-frame { flex: 1; width: 100%; min-height: 0; border: 0; background: #fff; }
@media (max-width: 1000px) { .ai-view { inset: 0; border: 0; border-radius: 0; z-index: 95; padding-bottom: env(safe-area-inset-bottom); } }
@media (max-width: 760px) { .ai-view-bar { flex-wrap: nowrap; } .ai-view-bar a.btn { display: none; } }
@media print { .ai-view { display: none !important; } }
.ai-round { width: 60px; height: 60px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--ink); cursor: pointer; box-shadow: 0 2px 6px rgba(16, 20, 24, .08); }
.ai-round .ic { width: 24px; height: 24px; }
.ai-round:hover, .ai-key:hover .ai-round:not(.ai-end) { background: var(--surface-2); }
.ai-round.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.ai-round:focus-visible { outline: 3px solid var(--ai); outline-offset: 3px; }
/* End the call: a round blue button with a white X (Aiden, 2026-12-01, from a picture), not a red hang-up phone. */
.ai-end { background: #2F6BD6; border: 3px solid #fff; color: #fff; box-shadow: 0 2px 8px rgba(16, 20, 24, .18); }
.ai-end:hover, .ai-key:hover .ai-end { background: #2558B8; }
.ai-end .ic { width: 26px; height: 26px; stroke-width: 2.4; }
.ai-stage-time { margin: 4px 0 0; font-size: 13px; color: var(--muted); }

/* ---------- TMP AI voice picker ---------- */
.ai-head .ai-pick { color: rgba(255, 255, 255, .86); }
.ai-head .ai-pick:hover, .ai-head .ai-pick[aria-expanded="true"] { background: rgba(255, 255, 255, .12); color: #fff; }
.ai-voices { position: absolute; top: 62px; left: 10px; right: 10px; z-index: 5; max-height: min(420px, 70%); overflow-y: auto; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 36px rgba(16, 20, 24, .18); }
.ai-voices-h { margin: 6px 8px 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.ai-vrow { display: flex; align-items: center; gap: 6px; border-radius: 8px; }
.ai-vrow:hover { background: var(--row-hover); }
.ai-vrow.on { background: var(--ai-tint); }
.ai-vpick { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 8px 10px; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.ai-vpick b { font-size: 15px; }
.ai-vpick span { font-size: 12px; color: var(--muted); }
.ai-vrow.on .ai-vpick b { color: var(--ai); }
.ai-vplay { flex: none; margin-right: 6px; padding: 6px 12px; border: 1px solid #D9CCFB; border-radius: var(--r-sm); background: #fff; color: var(--ai); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.ai-vplay:hover { background: var(--ai-tint); }

/* ---------- people picker: search, Show everyone for big teams, and a Lead choice per person ---------- */
.pick-top { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.pick-top .pick-q { flex: 1; min-width: 0; margin: 0; }
.pick-top .pick-all { flex: none; white-space: nowrap; }
.pick-list .pick-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
.pick-list .pick-row .check-row { flex: 1; min-width: 0; }
.pick-list.with-lead { grid-template-columns: minmax(0, 1fr); max-width: 560px; }
.lead-opt { display: flex; align-items: center; gap: 6px; flex: none; font-size: 13px; color: var(--ink-2); cursor: pointer; }
@media (max-width: 760px) { .pick-top { flex-wrap: wrap; } .pick-top .pick-all { width: 100%; } }
/* Only the people picker (a div) hides when a search leaves nobody; project lists are ul.pick-list. */
div.pick-list:not(:has(> .pick-row:not([hidden]))) { display: none; }

/* ---------- project notes: dated, signed, tagged High / Urgent (Dad, 2026-11-30) ---------- */
.pnotes { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pnote { padding: 10px 12px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--line-strong); }
.pnote.pri-high { border-left-color: var(--amber); }
.pnote.pri-urgent { border-left-color: var(--red); }
.pnote-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 12px; color: var(--muted); }
.pnote-meta a { color: inherit; font-weight: 600; }
.pri-tag { padding: 1px 7px; border-radius: 4px; font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: #fff; background: var(--amber); }
.pnote.pri-urgent .pri-tag { background: var(--red); }
.pnote-body { margin-top: 4px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; }
.pnote-done { margin-top: 4px; font-size: 12px; color: var(--green); }
.pnote form { margin-top: 6px; }
/* The project's top box (dark): notes first, then the next-step buttons, photos and a receipt. */
.next.project-box { flex-direction: column; align-items: stretch; gap: 14px; }
.pbox-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.pbox-head b { font-size: 16px; color: #fff; }
.project-box .pnote { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .1); border-left-color: rgba(255, 255, 255, .3); }
.project-box .pnote.pri-high { border-left-color: var(--amber); }
.project-box .pnote.pri-urgent { border-left-color: #FF6B5E; }
.project-box .pnote-meta { color: var(--on-dark-2); }
.project-box .pnote-body { color: #fff; }
.project-box .pnote .btn-quiet { color: var(--on-dark); }
.pbox-empty { margin: 0; color: var(--on-dark-2); font-size: 14px; }
.pbox-more { display: inline-block; margin-top: 8px; font-size: 13px; color: var(--on-dark); text-decoration: underline; }
.next.project-box .pbox-actions { margin-left: 0; display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 760px) { .next.project-box .pbox-actions { flex-direction: column; align-items: stretch; } }


/* ---------- client page: every project's files, grouped (Dad, 2026-11-30) ---------- */
.pf-list { display: grid; gap: 10px; }
.pf-group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 0 16px; }
.pf-group > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; cursor: pointer; list-style: none; }
.pf-group > summary::-webkit-details-marker { display: none; }
.pf-group[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.pf-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pf-title b { overflow-wrap: anywhere; }
.pf-h { margin: 14px 0 8px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); }
.pf-grid { list-style: none; margin: 0 0 6px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.pf-grid li { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pf-grid img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-sm); background: var(--surface-2); }
.pf-grid span { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.pf-group .file-list { margin-bottom: 10px; }
.pf-none { margin-top: 10px; }

/* A sheet opened from the dark project box is a normal white sheet: its text and buttons don't take the box's dark style
   (the photo sheet's Take photo / Upload buttons were white on white). */
.next .sheet-panel { color: var(--ink); text-align: left; }
.next .sheet-panel .btn:not(.btn-primary) { background: var(--surface-2); color: var(--ink); }
.next .sheet-panel .btn:not(.btn-primary):hover { background: var(--hover); }
.next .sheet-panel .row { margin-left: 0; }
/* A section title with more than one button: the buttons sit together on the right, not spread across the row. */
.sect-head { justify-content: flex-start; gap: 8px; }
.sect-head > h2 { margin-right: auto; }
/* Level text (Aiden, 2026-11-30): in a table row, every cell's first line sits on one baseline, so a name with an
   email under it lines up with the role and status beside it instead of floating above them. */
.tbl td { vertical-align: baseline; }
/* A pop-up's close button lines up with the first line of its title, even when the title wraps. */
.sheet-head { align-items: flex-start; }
.sheet-head .icon-btn { margin-top: -6px; flex: none; }
@media (max-width: 760px) {
  .sheet-head .icon-btn { margin-top: -10px; }
  /* A tick box beside a title with a line under it lines up with the title, not between the two lines. */
  .check-row:has(small, br, .small, .sub) { align-items: flex-start; }
  .check-row:has(small, br, .small, .sub) input { margin-top: 3px; }
}
/* Team table: name with email under it; one Edit button; a find box when the team is big. */
.who-cell { display: inline-flex; align-items: flex-start; gap: 10px; min-width: 0; }
.who-cell .avatar { margin-top: -3px; }
.who-cell > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.who-cell small { font-size: 13px; overflow-wrap: anywhere; }
[data-find-scope] { display: grid; gap: 10px; }
.find-box { position: relative; display: block; max-width: 420px; }
.find-box .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.find-box input { width: 100%; padding-left: 38px; }
.team-more { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); display: grid; gap: 14px; }
.team-off { display: grid; gap: 8px; justify-items: start; }
.team-off p { margin: 0; }
/* The photo picked for a message or receipt, shown before it's sent. */
.attach-picked { display: inline-flex; align-items: center; gap: 8px; }
.attach-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); flex: none; }

/* ---------- TMP AI in the Workiz "Ask Genius" layout (Aiden, 2026-11-30) ----------
   A light window with a purple-to-orange edge, the gradient spark as the TMP AI mark, settings / history / full screen
   in the header, a centered greeting with suggestions, the message box with its buttons inside, then Talk to TMP Support. */
:root { --ai-grad: linear-gradient(135deg, #6B4BF2 0%, #D9479A 55%, #FC5800 100%); }
.ai-fab-ic { width: 28px; height: 28px; }
.ai-choose { position: fixed; right: 20px; bottom: 86px; z-index: 85; width: 310px; max-width: calc(100vw - 28px); display: grid; gap: 8px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 48px rgba(16, 20, 24, .18), 0 2px 6px rgba(16, 20, 24, .08); }
.ai-choose-h { margin: 0 0 2px 2px; font-size: 14px; font-weight: 600; color: var(--ink); }
.ai-choice { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; text-align: left; text-decoration: none !important; cursor: pointer; }
.ai-choice:hover, .ai-choice:focus-visible { border-color: var(--ink); outline: none; }
.ai-choice b { display: block; font-size: 15px; line-height: 1.3; }
.ai-choice small { display: block; font-size: 13px; color: var(--muted); }
.ai-choice-mark { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #F3EEFF; }
.ai-choice-ic { width: 22px; height: 22px; }
.ai-choice-mark.is-help { background: var(--brand-tint); color: var(--brand-ink); }
.ai-choice-mark.is-help .ic { width: 20px; height: 20px; }

.ai-panel { flex-direction: row; width: 400px; height: min(640px, calc(100vh - 40px)); border: 2px solid transparent; border-radius: 16px; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--ai-grad) border-box; }
.ai-main { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ai-head { display: flex; align-items: center; gap: 8px; padding: 12px 8px 8px 16px; background: none; color: var(--ink); border-bottom: 0; }
.ai-title { display: flex; flex-direction: row; align-items: center; gap: 8px; margin-right: auto; min-width: 0; }
.ai-head .ai-title b { margin: 0; font-size: 17px; font-weight: 700; color: var(--ink); }
.ai-head-ic { width: 22px; height: 22px; flex: none; }
.ai-tools { display: flex; gap: 2px; }
.ai-head .icon-btn { width: 36px; height: 36px; color: var(--ink-2); }
.ai-head .icon-btn:hover, .ai-head .icon-btn[aria-expanded="true"], .ai-head .icon-btn[aria-pressed="true"] { background: var(--surface-2); color: var(--ink); }
.ai-head .icon-btn .ic { width: 20px; height: 20px; }
.ai-log { background: var(--surface); padding: 8px 16px 14px; }
.ai-msg.from-ai { background: var(--surface-2); border: 0; }
.ai-hello { margin: auto 0; display: grid; justify-items: center; gap: 6px; text-align: center; color: var(--ink-2); }
.ai-hello-h { display: flex; align-items: flex-start; justify-content: center; gap: 8px; margin: 0; max-width: 30ch; font-size: 20px; line-height: 1.3; font-weight: 600; color: var(--ink); }
.ai-hello-h .ai-head-ic { margin-top: 3px; }
.ai-hello-sub { margin: 0; max-width: 34ch; font-size: 14px; line-height: 1.45; color: var(--muted); }
.ai-chips { display: grid; gap: 8px; width: 100%; margin-top: 14px; }
.ai-chip { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.ai-chip .ic { width: 18px; height: 18px; flex: none; color: var(--ink-2); }
.ai-chip:hover { background: var(--surface-2); border-color: var(--btn-line); }
.ai-panel .ai-form { flex-direction: column; align-items: stretch; gap: 4px; margin: 0 14px; padding: 10px 8px 6px 12px; border: 1px solid var(--btn-line); border-radius: 12px; background: var(--surface); }
.ai-panel .ai-form:focus-within { border-color: var(--ai); box-shadow: 0 0 0 3px var(--ai-tint); }
.ai-panel .ai-form textarea { min-height: 44px; max-height: 160px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; outline: none; font-size: 16px; }
.ai-form-row { display: flex; align-items: center; gap: 2px; }
.ai-form-hint { flex: 1; min-width: 0; }
.ai-panel .ai-form .icon-btn { width: 38px; height: 38px; }
.ai-panel .ai-send { background: none; border: 0; color: var(--ai); }
.ai-panel .ai-send:hover { background: var(--ai-tint); color: var(--ai); }
.ai-foot { display: grid; gap: 8px; padding: 10px 14px 12px; }
.ai-panel .ai-human { justify-content: center; gap: 8px; height: 44px; padding: 0 14px; border-radius: 10px; background: var(--brand); color: #fff; font-size: 15px; font-weight: 600; text-decoration: none; }
.ai-panel .ai-human:hover { background: var(--brand-hover, #E04E00); color: #fff; text-decoration: none; }
.ai-panel .ai-human .ic { width: 18px; height: 18px; }
.ai-note { margin: 0; text-align: center; font-size: 12px; color: var(--muted); }
.ai-panel:has(.ai-stage:not([hidden])) .ai-foot { display: none; }

/* settings: your instructions and the voice */
.ai-settings { position: absolute; top: 56px; left: 12px; right: 12px; z-index: 7; max-height: calc(100% - 68px); overflow-y: auto; display: grid; gap: 12px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 40px rgba(16, 20, 24, .16); }
.ai-set-head { display: flex; align-items: flex-start; gap: 12px; }
.ai-set-head > span:nth-child(2) { flex: 1; min-width: 0; }
.ai-set-head b { display: block; font-size: 16px; }
.ai-set-head small { display: block; margin-top: 2px; font-size: 13px; line-height: 1.4; color: var(--muted); }
.ai-set-head .icon-btn { margin: -6px -6px 0 0; }
.ai-set-ic { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: #F3EEFF; color: var(--ai); }
.ai-set-ic .ic { width: 20px; height: 20px; }
.ai-ins { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ai-ins-none { display: grid; justify-items: center; gap: 2px; padding: 18px 12px; border: 1px dashed var(--btn-line); border-radius: 12px; text-align: center; font-size: 13px; color: var(--muted); }
.ai-ins-none b { font-size: 14px; color: var(--ink); }
.ai-ins-item { display: flex; align-items: center; gap: 8px; padding: 8px 6px 8px 12px; border-radius: 8px; background: var(--surface-2); font-size: 14px; }
.ai-ins-item span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ai-ins-del, .ai-thread-del { flex: none; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; }
.ai-ins-del:hover, .ai-thread-del:hover { background: var(--line); color: var(--ink); }
.ai-set-h { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.ai-ex { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-ex-chip { padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
.ai-ex-chip:hover { border-color: var(--btn-line); background: var(--surface-2); }
.ai-ins-add { display: flex; gap: 8px; }
.ai-ins-add input { flex: 1; min-width: 0; }
.ai-set-count { display: flex; justify-content: space-between; gap: 8px; margin: -4px 0 0; }
.ai-set-voice { display: grid; gap: 8px; justify-items: start; padding-top: 12px; border-top: 1px solid var(--line); }
.ai-settings .ai-voices { position: static; max-height: 260px; padding: 0; border: 0; box-shadow: none; }

/* chat history: over the chat, or on the left in full screen */
.ai-side { display: none; }
.ai-panel.show-side .ai-side { position: absolute; inset: 0; z-index: 8; display: flex; flex-direction: column; gap: 10px; padding: 14px; background: var(--surface); border-radius: 14px; }
.ai-side-head { display: flex; align-items: center; justify-content: space-between; }
.ai-side-head b { font-size: 16px; }
.ai-newthread { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; padding: 6px 4px; border: 0; background: none; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.ai-newthread .ic { width: 18px; height: 18px; }
.ai-hsearch { position: relative; display: block; }
.ai-hsearch .ic { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.ai-hsearch input { width: 100%; height: 38px; padding-left: 32px; }
.ai-threads { flex: 1; min-height: 0; overflow-y: auto; display: grid; align-content: start; gap: 2px; margin: 0; padding: 0; list-style: none; }
.ai-thread { display: flex; align-items: center; border-radius: 8px; }
.ai-thread:hover { background: var(--row-hover, var(--surface-2)); }
.ai-thread.on { background: var(--ai-tint); }
.ai-thread-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 9px 10px; border: 0; background: none; color: var(--ink); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.ai-thread-t { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ai-thread-at { flex: none; font-size: 12px; color: var(--muted); }
.ai-thread-del { margin-right: 4px; opacity: 0; }
.ai-thread:hover .ai-thread-del, .ai-thread-del:focus-visible { opacity: 1; }
@media (hover: none) { .ai-thread-del { opacity: 1; } }
.ai-thread-none { padding: 10px; font-size: 13px; color: var(--muted); }

/* full screen */
.ai-panel.ai-full { inset: 16px; width: auto; max-width: none; height: auto; z-index: 95; }
.ai-panel.ai-full .ai-side { position: static; display: flex; flex-direction: column; gap: 10px; width: 270px; flex: none; padding: 16px 12px; border-right: 1px solid var(--line); border-radius: 14px 0 0 14px; background: #FAFAF9; }
.ai-panel.ai-full .ai-side-x { display: none; }
.ai-panel.ai-full .ai-hello, .ai-panel.ai-full .ai-form, .ai-panel.ai-full .ai-foot { width: calc(100% - 28px); max-width: 760px; margin-left: auto; margin-right: auto; }
.ai-panel.ai-full .ai-log { padding-left: max(16px, calc((100% - 760px) / 2)); padding-right: max(16px, calc((100% - 760px) / 2)); }
.ai-panel.ai-full .ai-foot { padding-left: 0; padding-right: 0; }
.ai-panel.ai-full .ai-settings { left: auto; width: 420px; }
@media (max-width: 760px) {
  .ai-choose { right: 14px; bottom: calc(64px + 78px + env(safe-area-inset-bottom)); }
  .ai-panel, .ai-panel.ai-full { inset: 0; width: auto; max-width: none; height: auto; border: 0; border-radius: 0; background: var(--surface); padding-bottom: env(safe-area-inset-bottom); }
  .ai-expand { display: none; }
  .ai-panel.ai-full .ai-side { display: none; }
  .ai-panel.ai-full.show-side .ai-side { position: absolute; display: flex; width: auto; border-radius: 0; }
}
.ai-expand .ai-to-small, .ai-expand[aria-pressed="true"] .ai-to-full { display: none; }
.ai-expand[aria-pressed="true"] .ai-to-small { display: block; }
/* Sales: New picks an estimate, change order or invoice (Dad, 2026-11-30). */
.sales-pick { max-width: 720px; }
.sales-pick .quick-tile > span { display: flex; flex-direction: column; gap: 2px; }
.sales-pick .quick-tile small { font-size: 13px; font-weight: 400; color: var(--muted); }
.seg-links a.on { color: var(--ink); background: var(--brand-tint); }
@media (max-width: 760px) {
  /* Sales tabs on a phone: all four in a 2 by 2 grid, none cut off at the edge. */
  .tabs.tabs-fit { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; overflow: visible; border-bottom: 0; }
  .tabs.tabs-fit a { justify-content: center; min-width: 0; height: auto; min-height: 42px; padding-block: 4px; white-space: normal; text-align: center; line-height: 1.2; margin: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
  .tabs.tabs-fit a.on { border-color: var(--brand); background: var(--brand-tint); color: var(--ink); }
}
/* Lessons on Home (Aiden, 2026-11-30): three cards of the same height, a progress bar, and a page per lesson. */
.learn-progress { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; }
.learn-bar { flex: none; width: 140px; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.learn-bar i { display: block; height: 100%; background: var(--green, #2E7D4F); }
.learn-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.learn-card { height: 100%; display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--ink); text-decoration: none !important; }
.learn-card:hover { border-color: var(--btn-line); background: var(--row-hover); }
.learn-card b { font-size: 16px; line-height: 1.3; }
.learn-n { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.learn-why { flex: 1; font-size: 14px; color: var(--ink-2); line-height: 1.45; }
.learn-go { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: 14px; }
.learn-go .ic { width: 16px; height: 16px; }
.learn-list { list-style: none; margin: 0; padding: 0; counter-reset: lesson; }
.learn-list li { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--line); counter-increment: lesson; }
.learn-list li:first-child { border-top: 0; }
.learn-list li::before { content: counter(lesson); flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); font-weight: 600; font-size: 13px; }
.learn-list li.is-done::before { content: '✓'; background: var(--green-tint, #E6F4EC); color: var(--green, #2E7D4F); }
.learn-list a { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; color: var(--ink); text-decoration: none; }
.learn-lead { margin: 0 0 12px; font-size: 16px; color: var(--ink-2); }
.learn-steps { margin: 0 0 18px; padding-left: 22px; display: grid; gap: 10px; font-size: 16px; line-height: 1.5; max-width: 64ch; }
.learn-actions { flex-wrap: wrap; }
@media (max-width: 960px) { .learn-cards { grid-template-columns: minmax(0, 1fr); } }
/* Urgent on Home: the red warning triangle (Dad, Team Message spec); high stays the amber bar. */
.todo li.sev-3 .todo-ic { width: 24px; height: 24px; margin: 0 4px 0 0; transform: none; background: none; color: var(--red); display: grid; place-items: center; }
.todo li.sev-3 .todo-ic .ic { width: 22px; height: 22px; }
.msg-file-link { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* A person's picture: their photo, or initials in their color (Aiden, 2026-11-30). */
.avatar.has-photo { padding: 0; overflow: hidden; background: var(--surface-2); }
.avatar.has-photo img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.avatar.has-color { background: var(--av); border-color: var(--av); color: #fff; }
.avatar-lg { width: 64px; height: 64px; font-size: 22px; }
.pic-row { display: flex; align-items: flex-start; gap: 16px; }
.pic-main { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.pic-main .stack-form { gap: 10px; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch-pick { position: relative; cursor: pointer; }
.swatch-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.swatch-pick > span { display: block; width: 30px; height: 30px; border-radius: 50%; background: var(--av); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.swatch-pick input:checked + span { box-shadow: 0 0 0 2px var(--ink); }
.swatch-pick input:focus-visible + span { outline: 3px solid var(--ai, #6B3FD4); outline-offset: 2px; }
.team-more .pic-row { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
/* "Just for this person": the area-by-area access shows only when that role is picked. */
.role-pick .perm-grid { display: none; }
.role-pick:has(input[value="personal"]:checked) .perm-grid { display: grid; gap: 10px; margin: 4px 0 4px 28px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); }
/* Phones: tab rows wrap into buttons instead of running off the screen (Aiden: nothing cut off). */
@media (max-width: 760px) {
  .tabs { flex-wrap: wrap; gap: 6px; overflow: visible; border-bottom: 0; }
  .tabs a { height: 38px; margin: 0; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
  .tabs a.on { border-color: var(--brand); background: var(--brand-tint); color: var(--ink); }
}
/* Settings on a phone or small window: one button that opens the grouped list. */
.set-jump { display: none; margin: 0 0 16px; }
.set-jump summary { display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); cursor: pointer; list-style: none; }
.set-jump summary::-webkit-details-marker { display: none; }
.set-jump summary span { flex: 1; min-width: 0; }
.set-jump summary .ic { width: 18px; height: 18px; flex: none; }
.set-jump[open] summary .ic:last-child { transform: rotate(90deg); }
.set-jump-list { display: grid; gap: 12px; margin-top: 8px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.set-jump-list .set-h { display: block; margin: 0 0 4px; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.set-jump-list a { display: flex; align-items: center; min-height: 40px; padding: 0 10px; border-radius: var(--r-sm); color: var(--ink); font-weight: 600; text-decoration: none; }
.set-jump-list a.on { background: var(--brand-tint); }
@media (max-width: 899px) { .set-jump { display: block; } .set-nav { display: none; } }

/* ---------- Dial pad on phones and small windows (Aiden, 2026-11-30) ----------
   Nothing wider than the screen; the From number in a box that scrolls when long; on a call the round buttons sit
   where Call was, Hang up red with the phone pointing down. */
.phone, .phone > *, .dialer, .dial-card { min-width: 0; }
.dialer { grid-template-columns: minmax(0, 1fr); }
.dial-card { width: 100%; box-sizing: border-box; grid-template-columns: minmax(0, 1fr); padding: 14px 14px 22px; }
.dial-top { flex-direction: column; align-items: stretch; gap: 6px; }
.dial-top .phone-state { margin: 0; text-align: center; }
.dial-from-pick { position: relative; display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 12px; border: 1px solid var(--btn-line); border-radius: var(--r); background: var(--surface); cursor: pointer; }
.dial-from-pick:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.dial-from-pick .dial-line { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.dial-from-chev { flex: none; width: 18px; height: 18px; color: var(--muted); transform: rotate(90deg); }
.marquee { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; font-size: 15px; font-weight: 600; color: var(--ink); }
.marquee > span { display: inline-block; }
.marquee.is-long > span { padding-right: 48px; animation: tmp-marquee var(--marquee-s, 12s) linear infinite; }
@keyframes tmp-marquee { 0%, 12% { transform: translateX(0); } 100% { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .marquee.is-long > span { animation: none; } .marquee { text-overflow: ellipsis; } }
.dial-keys { grid-template-columns: repeat(3, minmax(56px, 72px)); gap: 12px clamp(12px, 5vw, 22px); }
.dial-key { width: auto; aspect-ratio: 1; height: auto; min-width: 56px; }
.phone-card { align-items: center; }
.phone-card > [data-keys] { width: 100%; }
.phone-card .dial-keys { grid-template-columns: repeat(3, minmax(52px, 60px)); }
.phone-card .dial-key { width: auto; height: auto; }
.phone-actions { gap: 20px; margin-top: 18px; }
.call-round { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--ink-2); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.call-round .ic { box-sizing: content-box; width: 28px; height: 28px; padding: 18px; border-radius: 50%; background: var(--surface-2); color: var(--ink); }
.call-round.is-answer .ic { background: var(--green, #1F8A5B); color: #fff; }
.call-round.is-end .ic { background: var(--red); color: #fff; transform: rotate(135deg); }
.call-round.is-end:hover .ic { background: #B4231B; }
.call-round.is-mute[aria-pressed="true"] .ic { background: var(--ink); color: #fff; }
.call-round:focus-visible .ic { outline: 3px solid var(--brand); outline-offset: 3px; }
.dial-card > .dial-top, .dial-card > .dial-who { justify-self: stretch; width: 100%; min-width: 0; }
.dial-from-pick { min-width: 0; max-width: 100%; }
/* ---------- Project book (Aiden, 2026-11-30): one place for specs, designs, permits, before and after photos ---------- */
.book { display: grid; gap: 14px; }
.book-card { padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); scroll-margin-top: 16px; }
.book-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.book-head h3 { margin: 0 auto 0 0; font-size: 17px; }
.book-head .row { gap: 8px; flex-wrap: wrap; }
.book-kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 18px; margin: 0; }
.book-kv dt { color: var(--muted); font-size: 14px; }
.book-kv dd { margin: 0; overflow-wrap: anywhere; }
.book-text { white-space: pre-line; line-height: 1.55; max-width: 80ch; }
.book-team { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.book-team > span { display: inline-flex; align-items: center; gap: 6px; }
/* Two photos a row on a phone, so a day's pictures fit on a screen or two. */
.book-files { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.book-files li { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.book-files li:not(.is-img) { flex-direction: row; align-items: center; justify-content: space-between; grid-column: 1 / -1; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); }
.book-files li:not(.is-img) a { display: inline-flex; align-items: center; gap: 8px; min-width: 0; color: var(--ink); font-weight: 600; }
.book-files li:not(.is-img) a span { overflow-wrap: anywhere; }
/* The date, who added it and Delete: beside a document's name (under it on a narrow screen), under a picture. */
.book-file-end { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.book-files li:not(.is-img) { flex-wrap: wrap; column-gap: 12px; }
.book-files li:not(.is-img) .book-file-end { margin-left: auto; }
.book-files li.is-img .book-file-end { flex-direction: column; align-items: flex-start; margin-top: auto; }
.book-files li.is-img .book-file-end > .sheet > summary { margin-left: -10px; } /* the words line up with the caption */
.book-files li.is-img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--line); }
/* Photo viewer (app.js): a tapped photo full screen, the next one a swipe or an arrow away. */
.pv { position: fixed; inset: 0; z-index: 1001; background: #111; color: #fff; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.pv[hidden] { display: none; }
.pv-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(6px + env(safe-area-inset-top)) 6px 6px 16px; font-size: 14px; color: #ddd; }
.pv-btn { width: 48px; height: 48px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .45); color: #fff; cursor: pointer; }
.pv-btn:hover { background: rgba(255, 255, 255, .18); }
.pv-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.pv-x { background: none; }
.pv-stage { position: relative; touch-action: pan-y pinch-zoom; }
.pv-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.pv-full { opacity: 0; transition: opacity .15s; }
.pv-full.is-ready { opacity: 1; }
.pv-prev, .pv-next { position: absolute; top: 50%; transform: translateY(-50%); }
.pv-prev { left: 10px; }
.pv-next { right: 10px; }
.pv-one .pv-prev, .pv-one .pv-next { display: none; }
.pv-cap { margin: 0; min-height: 20px; padding: 10px 16px calc(14px + env(safe-area-inset-bottom)); font-size: 14px; line-height: 1.4; text-align: center; color: #ddd; overflow-wrap: anywhere; }
body.pv-open { overflow: hidden; }
.book-files li.is-img span { font-size: 13px; color: var(--ink-2); overflow-wrap: anywhere; }
@media (max-width: 760px) { .book-kv { grid-template-columns: minmax(0, 1fr); gap: 2px; } .book-kv dt { margin-top: 8px; } .book-head .row { width: 100%; } }
/* The project's top box: every button orange (Aiden, 2026-11-30). */
.next.project-box .pbox-actions .btn, .next.project-box .pbox-actions summary.btn, .next.project-box .pbox-head summary.btn { background: var(--brand); border-color: var(--brand); color: #fff; }
.next.project-box .pbox-actions .btn:hover, .next.project-box .pbox-actions summary.btn:hover, .next.project-box .pbox-head summary.btn:hover { background: var(--brand-hover); }
.next.project-box .pbox-actions .btn .ic, .next.project-box .pbox-head summary.btn .ic { color: #fff; }
.punch-map { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.punch-map .ic { width: 15px; height: 15px; }
/* Under the month: everything from today on, by date (Aiden, 2026-11-30). */
.upcoming { display: grid; gap: 14px; }
.upcoming-day h3 { margin: 0 0 6px; font-size: 15px; font-weight: 700; }
.upcoming-day h3 .muted { font-weight: 500; }
.upcoming-day .visits-list { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
/* A company's own look: their logo on top of the side menu and the phone header. */
.rail-brand.is-own { display: block; }
.rail-brand.is-own .co-logo { display: flex; align-items: center; justify-content: center; width: 100%; height: 64px; padding: 8px 14px; border-radius: 8px; background: #fff; box-sizing: border-box; }
.rail-brand.is-own .co-logo img { max-width: 100%; max-height: 48px; object-fit: contain; }
.rail .co.co-own { justify-content: center; }
.top-mark.is-own img { width: auto; height: 26px; max-width: 120px; object-fit: contain; }
.look-form .swatches { align-items: center; }
.swatch-custom > span { background: conic-gradient(from 90deg, #C8322B, #FC5800, #E8C21A, #1D7A46, #1F5FBF, #6B3FD4, #C8322B) !important; }
.swatch-custom input:checked + span { background: var(--av) !important; }
.look-color { width: 44px; height: 34px; padding: 2px; border: 1px solid var(--btn-line); border-radius: var(--r-sm); background: var(--surface); cursor: pointer; }

/* ---------- A visit: Directions, Call, Text outlined; "On this job" as grouped rows (Aiden, 2026-11-30) ---------- */
.site-tools, .visit-tools { gap: 10px; }
.site-tools .btn, .visit-tools .btn { height: 44px; padding: 0 16px; border: 1.5px solid var(--ink); border-radius: 12px; background: var(--surface); color: var(--ink); font-weight: 600; }
.site-tools .btn .ic, .visit-tools .btn .ic { color: var(--brand); }
.site-tools .btn:hover, .visit-tools .btn:hover { background: var(--surface-2); }
.kit { display: grid; gap: 12px; margin: 22px 0; }
.kit-h { margin: 0; font-size: 18px; }
.kit-group { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.kit-row { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 10px 16px; color: var(--ink); text-decoration: none !important; cursor: pointer; }
.kit-row + .kit-row { border-top: 1px solid var(--line); }
.kit-row:hover, .kit-row:focus-within { background: var(--row-hover); }
.kit-ic { flex: none; width: 24px; height: 24px; color: var(--brand); }
.kit-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.kit-t b { font-size: 16px; font-weight: 600; }
.kit-t small { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.kit-go { flex: none; width: 18px; height: 18px; color: var(--muted); }
.kit-phase { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 12px 12px 10px; border-bottom: 1px solid var(--line); }
.kit-phase label { position: relative; cursor: pointer; }
.kit-phase input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.kit-phase span { display: grid; place-items: center; height: 38px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.kit-phase input:checked + span { border-color: var(--ink); background: var(--ink); color: #fff; }
.kit-phase input:focus-visible + span { outline: 3px solid var(--brand); outline-offset: 2px; }
.kit-state { margin: 0; padding: 0 16px; }
.kit-state:not(:empty) { padding: 0 16px 12px; }
@media (min-width: 900px) { .kit { max-width: 640px; } }
form.kit-group.upload { display: block; gap: 0; }
form.kit-group.upload .kit-row { width: 100%; box-sizing: border-box; }
/* + menu: Sales opens downward with Lead, Follow-up, Estimate, Change order and Invoice under it. */
.quick-drop > summary { list-style: none; cursor: pointer; }
.quick-drop > summary::-webkit-details-marker { display: none; }
.quick-grid .quick-drop .quick-tile .quick-drop-arrow { margin-left: auto; width: 18px; height: 18px; padding: 0; background: none; color: var(--muted); transform: rotate(90deg); transition: transform .15s; }
.quick-drop[open] .quick-drop-arrow { transform: rotate(-90deg) !important; }
.quick-sub { list-style: none; margin: 0; padding: 0 0 6px; background: var(--surface-2); }
.quick-sub li + li { border-top: 1px solid var(--line); }
.quick-sub a { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 16px 6px 34px; color: var(--ink); font-size: 15px; font-weight: 600; text-decoration: none !important; }
.quick-sub a:hover { background: var(--hover); }
.quick-sub .ic { width: 20px; height: 20px; flex: none; color: var(--brand); }
.quick-sub small { margin-left: auto; padding-left: 10px; font-size: 12px; font-weight: 400; color: var(--muted); text-align: right; }
@media (max-width: 420px) { .quick-sub small { display: none; } }
/* Clock in and Clock out side by side, the one you can use now in orange (Dad: "make sure there is a punch out"). */
.clock-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.clock-pair .btn { height: 56px; font-size: 17px; }
.clock-pair .btn[disabled] { opacity: .45; cursor: not-allowed; }
.clock-state { margin: 2px 0 0; font-weight: 600; color: var(--ink-2); }
@media (max-width: 760px) { .tabs.tabs-fit a:first-child:nth-last-child(odd) { grid-column: 1 / -1; } }
/* Teams > People: the parts of a person's Edit sheet (password, their own number) */
.team-part { display: grid; gap: 8px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.team-part .review-h, .team-part p { margin: 0; }
.team-pw { display: grid; gap: 6px; }
.team-num input { width: 100%; }
/* "Your number" at the top of Phone and Texts */
.my-number { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); font-size: 15px; }
.my-number .ic { width: 18px; height: 18px; color: var(--brand); flex: none; }
.my-number b { font-size: 16px; }
.my-number .muted a { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
/* Sales pipeline: the six stages, intake to paid, in one row on a wide screen and three by two on a laptop
   (phones use the strip's own two by three) */
/* Accounting's strip uses the same six-across, three-by-two layout; the project's money calculator (five) is one row, three over two on a laptop. */
@media (min-width: 761px) {
  :is(.pipe-strip, .money-strip) .strip:has(> :nth-child(6):last-child) { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .money-strip .strip:has(> :nth-child(5):last-child) { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  :is(.pipe-strip, .money-strip) .strip-cell { padding: 14px 16px; }
  :is(.pipe-strip, .money-strip) .strip-value { font-size: 22px; line-height: 28px; }
}
@media (min-width: 761px) and (max-width: 1240px) {
  :is(.pipe-strip, .money-strip) .strip:has(> :nth-child(6):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  :is(.pipe-strip, .money-strip) .strip:has(> :nth-child(6):last-child) .strip-cell:nth-child(4) { border-left: 0; }
  :is(.pipe-strip, .money-strip) .strip:has(> :nth-child(6):last-child) .strip-cell:nth-child(n+4) { border-top: 1px solid var(--line); }
  /* The money calculator's five: three on top, two below, each row full width, so a $1M+ project still fits. */
  .money-strip .strip:has(> :nth-child(5):last-child) { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .money-strip .strip:has(> :nth-child(5):last-child) .strip-cell { grid-column: span 2; }
  .money-strip .strip:has(> :nth-child(5):last-child) .strip-cell:nth-child(n+4) { grid-column: span 3; border-top: 1px solid var(--line); }
  .money-strip .strip:has(> :nth-child(5):last-child) .strip-cell:nth-child(4) { border-left: 0; }
}
.ledger-note { display: block; font-size: 13px; color: var(--muted); }
#ledger .row-out td:nth-child(4), #ledger .row-in td:nth-child(3) { font-weight: 600; }
/* Follow-up dates: on a proposal or invoice, and on each action item */
.follow-box { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 16px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); font-size: 14px; }
.follow-box .ic { width: 18px; height: 18px; color: var(--muted); flex: none; }
.follow-box.is-due { border-color: var(--amber); background: var(--amber-tint); }
.follow-box.is-due .ic, .follow-box.is-due .follow-label { color: var(--amber); font-weight: 600; }
.follow-box input[type="date"] { height: 34px; padding: 0 8px; width: auto; }
.follow-box.is-compact { margin: 0; padding: 0; border: 0; background: none; gap: 6px; flex-wrap: nowrap; }
.act-list { list-style: none; margin: 0; padding: 0; }
.act-item { display: flex; align-items: center; gap: 16px; padding: 14px 20px; border-top: 1px solid var(--line); }
.act-item:first-child { border-top: 0; }
.act-main { flex: 1; min-width: 0; }
.act-main .tag { margin-right: 6px; }
.act-when { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.act-date { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.act-item.is-late .act-date { color: var(--red); }
.act-item.is-today .act-date { color: var(--amber); }
@media (max-width: 760px) {
  .act-item { flex-direction: column; align-items: stretch; gap: 8px; padding: 12px 14px; }
  .act-when { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; }
}
/* Visit notes: the add form above the log */
.note-form { display: grid; gap: 8px; padding-bottom: 16px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.note-form p { margin: 0; }
.note-form-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.note-pri { display: flex; align-items: center; gap: 8px; }
.note-pri select { width: auto; }
/* Visit "On this job": the file input covers its whole row, so a tap anywhere opens the camera or the photos */
form.kit-group.upload .kit-row { position: relative; }
.kit-file { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 0; }
.kit-row:has(.kit-file:focus-visible) { outline: 2px solid var(--brand); outline-offset: -2px; }
.kit-state:empty { display: none; }
.kit-state { margin: 0; padding: 8px 16px; }
.kit-photos { padding: 12px 16px 4px; border-top: 1px solid var(--line); }
.kit-photos-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; font-size: 14px; }
.kit-photos .photo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.kit-photos .photo-grid .small { font-size: 12px; }
/* The project's Project details tab stands out from the others (Aiden, 2026-11-30): heavier and darker, with a dark
   outline on phones where the tabs are buttons */
.tabs a.tab-strong { font-weight: 800; color: var(--ink); letter-spacing: .01em; }
@media (max-width: 760px) { .tabs a.tab-strong:not(.on) { border-color: var(--ink); border-width: 1.5px; } }
/* A project's Receipts: a small photo, then the store with what it was for under it */
.rc-thumb { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--bg); font-size: 12px; font-weight: 600; color: var(--ink-2); }
.rc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rc-what { display: block; margin-top: 2px; overflow-wrap: anywhere; }
.rc-list { list-style: none; margin: 0; padding: 0; }
.rc-item { display: flex; align-items: center; gap: 14px; padding: 12px 20px; border-top: 1px solid var(--line); }
.rc-item:first-child { border-top: 0; }
.rc-item[hidden] { display: none; }
.rc-thumb { flex: none; }
.rc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rc-main b { font-size: 15px; }
.rc-what { margin: 0; font-size: 14px; color: var(--ink-2); }
.rc-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
@media (max-width: 760px) { .rc-item { padding: 12px 14px; align-items: flex-start; } }
/* Project details sections and Site pictures: compact empty sections, the upload sheet, TMP AI's scope draft */
.book-empty { margin: 0; }
.book-card .book-head { margin-bottom: 6px; }
.book-head h3 .muted { font-weight: 500; font-size: 14px; }
.book-files li.is-img small { font-size: 12px; }
.book-up { display: grid; gap: 10px; }
.book-up p { margin: 0; }
.book-draft { display: grid; gap: 10px; margin-bottom: 14px; padding: 12px 14px; border: 1px solid var(--brand); border-radius: var(--r-sm); background: var(--brand-tint); }
.book-draft p { margin: 0; }
.book-group { margin: 10px 0 0; font-size: 18px; }
form.inline { display: inline; margin: 0; }
/* Phones: each row of tab buttons fills the width, so a last button never sits alone with a gap beside it */
@media (max-width: 760px) { .tabs:not(.tabs-fit) a { flex: 1 1 auto; justify-content: center; } }
/* Teams > People: a team member's page locks, each row saying Locked or Unlocked */
.role-pick:has(input[value="personal"]:checked) .perm-grid.page-locks { gap: 0; padding: 4px 14px; }
.page-locks > p { margin: 8px 0; }
.lock-row { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px 0; border-top: 1px solid var(--line); cursor: pointer; }
.lock-row input { width: 20px; height: 20px; flex: none; accent-color: var(--brand); }
.lock-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lock-t small { font-size: 12px; }
.lock-state { flex: none; }
.lock-state::before { content: 'Locked'; display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--ink-2); background: var(--surface-2); }
.lock-row input:checked ~ .lock-state::before { content: 'Unlocked'; color: var(--green); background: var(--green-tint); }
/* Phones: a page's More button goes to the right, under Text and the other contact buttons (Aiden, 2026-11-30), so its
   menu, which opens to the left, stays on the screen */
@media (max-width: 760px) { .head-actions > details.menu:last-child { margin-left: auto; } }
/* AI Add Client: the name box, and what TMP AI read */
.ai-client-q { gap: 10px; }
.ai-client-q input { width: 100%; }
.ai-clues { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ai-clues li { display: grid; gap: 2px; padding-top: 12px; border-top: 1px solid var(--line); }
.ai-clues li:first-child { padding-top: 0; border-top: 0; }
.ai-clues .tag { justify-self: start; }
.ai-clues p { margin: 4px 0 0; font-size: 14px; color: var(--ink-2); overflow-wrap: anywhere; }
@media (max-width: 760px) { .ai-client-q { flex-wrap: wrap; } .ai-client-q .btn { width: 100%; justify-content: center; } }

/* TMP AI: the buttons under a reply, web sources, small menus, folders and Clean up chats (Aiden, 2026-11-30) */
.ai-acts { display: flex; gap: 2px; margin: -4px 0 4px 2px; }
button.ai-act { display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--muted); cursor: pointer; }
button.ai-act .ic { width: 16px; height: 16px; }
button.ai-act:hover, button.ai-act:focus-visible { background: var(--surface-2); color: var(--ink); }
button.ai-act.on, button.ai-act.done { color: var(--ai, var(--blue)); }
.ai-sources { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ai-src { display: inline-flex; align-items: center; max-width: 100%; padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-2); font-size: 12px; text-decoration: none; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ai-src:hover { color: var(--ink); border-color: var(--ink-2); }
.ai-pop { position: absolute; z-index: 30; min-width: 180px; max-width: calc(100% - 16px); padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 8px 24px rgba(0, 0, 0, .14); }
.ai-pop-i { display: block; width: 100%; padding: 9px 12px; border: 0; border-radius: 6px; background: none; color: var(--ink); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.ai-pop-i:hover, .ai-pop-i:focus-visible { background: var(--surface-2); }
.ai-pop-i.danger { color: var(--bad, #B42318); }
.ai-side-acts { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.ai-threads { overflow-x: hidden; }
.ai-threads li, .ai-folder-list li, .ai-folder-row { min-width: 0; }
.ai-thread-more { flex: none; display: inline-grid; place-items: center; width: 30px; height: 30px; margin-right: 4px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--muted); cursor: pointer; }
.ai-thread-more .ic { width: 16px; height: 16px; }
.ai-thread-more:hover, .ai-thread-more:focus-visible { background: var(--line); color: var(--ink); }
.ai-tree-h { padding: 10px 10px 2px; font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--muted); }
.ai-folder-row { display: flex; align-items: center; border-radius: 8px; }
.ai-folder-row:hover { background: var(--row-hover, var(--surface-2)); }
.ai-folder-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 9px 10px; border: 0; background: none; color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; text-align: left; cursor: pointer; }
.ai-folder-ic { flex: none; display: inline-grid; place-items: center; }
.ai-folder-ic .ic { width: 18px; height: 18px; }
.ai-folder-list { margin: 0 0 4px 18px; padding: 0 0 0 8px; border-left: 1px solid var(--line); list-style: none; }
.ai-rename { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; width: 100%; }
.ai-rename input { flex: 1 1 140px; min-width: 0; height: 34px; }
.ai-fed { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.ai-fed-h { font-size: 15px; }
.ai-fed-l { font-size: 12px; font-weight: 600; color: var(--muted); }
.ai-fed-ics { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.ai-fed-ic { display: grid; place-items: center; aspect-ratio: 1; border: 1px solid transparent; border-radius: 8px; background: var(--surface-2); cursor: pointer; }
.ai-fed-ic .ic { width: 18px; height: 18px; }
.ai-fed-ic.on { border-color: currentColor; background: var(--surface); }
.ai-fed-colors { display: flex; flex-wrap: wrap; gap: 8px; }
.ai-fed-c { width: 26px; height: 26px; padding: 0; border: 2px solid var(--surface); border-radius: 50%; box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.ai-fed-c.on { box-shadow: 0 0 0 2px var(--ink); }
.ai-fed-acts { display: flex; gap: 6px; }
.ai-cleanup { align-self: flex-start; padding: 6px 4px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.ai-cleanup:hover { color: var(--ink); }
.ai-clean-h { display: grid; gap: 6px; padding: 4px 6px 8px; }
.ai-clean-sub { font-size: 13px; color: var(--muted); }
.ai-clean-h select { height: 34px; }
.ai-clean-row label { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.ai-clean-row label:hover { background: var(--surface-2); }
.ai-clean-row input { flex: none; width: 18px; height: 18px; }
.ai-clean-t { flex: 1; min-width: 0; display: grid; }
.ai-clean-acts { display: flex; gap: 6px; padding: 10px 6px; }
[data-ai-refresh].is-busy [data-ai-when]::after { content: ' Updating…'; }

/* New estimate and the other + menu pickers: the client and stage under each project, a search, the two ways to start */
.pick-list a { display: grid; gap: 2px; }
.pick-t { overflow-wrap: anywhere; }
.pick-sub { font-size: 13px; font-weight: 400; color: var(--muted); }
.pick-search { width: 100%; height: 40px; margin: 4px 0 8px; }
.pick-none { padding: 12px 4px; }
.est-start { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: 12px; }
.est-start-opt { display: grid; align-content: start; gap: 6px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; }
.est-start-opt p { margin: 0 0 4px; }
.est-start-opt form, .est-start-opt .btn { justify-self: start; }
/* How TMP AI priced a proposal (src/routes/estimates.js pricePanel) */
.ai-how { margin-top: 12px; }
.ai-how > summary { cursor: pointer; font-weight: 600; }
.ai-how .pre { margin: 8px 0; max-height: 420px; overflow: auto; overflow-wrap: anywhere; }

.more-fields { display: grid; gap: 12px; }
.more-fields > summary { cursor: pointer; font-weight: 600; padding: 4px 0; color: var(--blue); list-style: none; }
.more-fields > summary::-webkit-details-marker { display: none; }
.more-fields > summary::before { content: "+ "; font-weight: 700; }
.more-fields[open] > summary::before { content: "− "; }


/* Marketing (src/routes/marketing.js) */
.mk-cols { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 0 24px; align-items: start; }
@media (max-width: 1100px) { .mk-cols { grid-template-columns: minmax(0, 1fr); } }
.mk-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
@media (max-width: 560px) { .mk-two { grid-template-columns: minmax(0, 1fr); } }
.mk-list { margin: 6px 0 0; padding-left: 18px; }
.mk-list li { margin: 4px 0; }
.mk-steps { margin: 0 0 10px; padding-left: 20px; }
.mk-steps li { margin: 4px 0; }
.mk-mail { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #fff; }
.mk-mail-head { display: grid; gap: 2px; margin: 0; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.mk-mail-body { padding: 14px; overflow-wrap: anywhere; }
.mk-group { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); }
.mk-group legend { padding: 0 4px; font-weight: 600; }
.mk-aud, .mk-q, .choice-row { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.choice-row { flex-direction: row; flex-wrap: wrap; gap: 8px 18px; }
.choice-row legend { width: 100%; margin-bottom: 4px; }
.mk-q input[name^="o"] { max-width: 420px; }
.row-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.row-form .field { flex: 1 1 240px; margin: 0; }
.mk-filter { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin: 0 0 10px; }
.mk-filter select { width: auto; min-width: 180px; }
.mk-review p { margin: 0 0 8px; }
.mk-review form { margin-top: 6px; }

/* Front Desk (src/routes/frontdesk.js): the call box on the public demo and in Settings */
.fd-call { display: flex; flex-direction: column; gap: 10px; }
.fd-stage { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.fd-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); flex: none; }
.fd-call.live .fd-dot { background: #1E8E3E; box-shadow: 0 0 0 4px rgba(30, 142, 62, .18); }
.fd-clock { margin-left: auto; font-weight: 400; color: var(--muted); font-variant-numeric: tabular-nums; }
.fd-lines { list-style: none; margin: 0; padding: 0; max-height: 240px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.fd-lines:empty { display: none; }
.fd-lines li { padding: 6px 10px; border-radius: var(--r-sm); background: var(--surface-2); overflow-wrap: anywhere; }
.fd-lines li.you { background: var(--blue-tint); }
.fd-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.fd-err { margin: 0; color: var(--red); }
.fd-card { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; background: var(--surface); margin: 6px 0 10px; }
.fd-card-head { margin: 0 0 8px; font-weight: 700; letter-spacing: .02em; }
.fd-card dl { display: grid; grid-template-columns: minmax(120px, max-content) minmax(0, 1fr); gap: 4px 14px; margin: 0; font-size: 14px; }
.fd-card dt { color: var(--muted); }
.fd-card dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 520px) { .fd-card dl { grid-template-columns: minmax(0, 1fr); } .fd-card dd { margin-bottom: 6px; } }
.fd-script { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: 13px; margin: 8px 0 0; padding: 10px; background: var(--surface-2); border-radius: var(--r-sm); }
.fd-demo { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.fd-demo h3 { margin: 0; }
.fd-top { align-items: start; }
.ai-pic { gap: 8px; flex-wrap: wrap; align-items: center; }
.ai-pic select { width: auto; max-width: 100%; }
.mk-blank { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin-top: 10px; }
/* Rows of two sections side by side stretch to the same height. The ad plan: each ad group's keywords beside its headlines. */
.mk-even > div { display: flex; flex-direction: column; }
.mk-even > div > .sect { flex: 1; display: flex; flex-direction: column; }
.mk-even > div > .sect > .panel { flex: 1; }
@media (min-width: 900px) {
  .mk-plan .mk-group { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 16px; }
  .mk-plan .mk-group > legend, .mk-plan .mk-group > .field:first-of-type, .mk-plan .mk-group > .check-row { grid-column: 1 / -1; }
}
.pros-co { display: flex; flex-direction: column; gap: 2px; min-width: 180px; }
/* The demo box needs room for its fields beside the headline. */
.s-top-grid.fd-top { grid-template-columns: minmax(0, 1fr) minmax(0, 480px); gap: 48px; align-items: start; }
@media (max-width: 960px) { .s-top-grid.fd-top { grid-template-columns: minmax(0, 1fr); gap: 24px; } }
/* The AI chat's buttons (Aiden, 2026-12-01): a microphone to talk instead of typing, and a round blue voice button for a
   hands-free conversation, then Send. */
.ai-panel .ai-form .ai-call, .ai-form .ai-call { color: #fff; background: #1A73E8; border-color: #1A73E8; border-radius: 50%; }
.ai-panel .ai-form .ai-call:hover, .ai-form .ai-call:hover { background: #1558B0; border-color: #1558B0; color: #fff; }
.ai-form .ai-call .ic { width: 20px; height: 20px; stroke-width: 2.2; }
.ai-panel .ai-form .ai-mic { color: var(--ink-2); }
/* The TMP mark centered over the menu column; a logo with its background taken out sits on the menu with no white box. */
.rail-brand:not(.is-own) { justify-content: center; }
.co-logo.is-clear, .rail-brand.is-own .co-logo.is-clear, .co:has(.co-logo) .co-logo.is-clear { background: transparent; padding: 0; }
.rail-brand.is-own .co-logo.is-clear img, .co:has(.co-logo) .co-logo.is-clear img { max-height: 56px; }
.logo-preview { background: repeating-conic-gradient(#E9ECEF 0% 25%, #fff 0% 50%) 50% / 16px 16px; }

/* A campaign being built step by step */
.mk-steps-live { list-style: none; margin: 10px 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mk-steps-live li { padding-left: 26px; position: relative; color: var(--muted); }
.mk-steps-live li::before { content: ''; position: absolute; left: 0; top: 3px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-strong); }
.mk-steps-live li.done { color: var(--ink); }
.mk-steps-live li.done::before { background: #1E8E3E; border-color: #1E8E3E; }
.mk-steps-live li.now { color: var(--ink); font-weight: 600; }
.mk-steps-live li.now::before { border-color: var(--accent); border-top-color: transparent; animation: mk-spin 1s linear infinite; }
@keyframes mk-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .mk-steps-live li.now::before { animation: none; } }
.mk-progress { margin: 12px 0 4px; }
.mk-bar { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.mk-bar span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: inherit; transition: width .4s ease; }
.mk-progress-line { display: flex; gap: 10px; align-items: baseline; margin: 8px 0 0; }
.mk-progress-line b { min-width: 3.2em; font-variant-numeric: tabular-nums; }

/* Settings > AI instructions: the tool catalog */
.ai-rule-h { margin: 18px 0 8px; font-size: 15px; }
.ai-catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 6px 24px; }
.ai-catalog h3 { margin: 12px 0 6px; font-size: 14px; }
.ai-catalog ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ai-catalog li { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; font-size: 13px; }
.ai-catalog li small { flex-basis: 100%; }
.ai-catalog code { font-size: 12px; }
/* A branded document (src/routes/ai-settings.js) */
.doc-panel { max-width: 860px; }
.doc-page { display: flex; flex-direction: column; gap: 10px; }
.doc-page h1 { margin: 8px 0 0; font-size: 24px; }
.doc-page h2 { margin: 14px 0 0; font-size: 17px; }
.doc-page p, .doc-page ul { margin: 0; }
.doc-page .doc-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.doc-brand { display: flex; gap: 14px; align-items: center; padding-bottom: 12px; border-bottom: 2px solid var(--accent); }
.doc-brand img { max-height: 56px; max-width: 180px; object-fit: contain; }
.doc-brand div { display: flex; flex-direction: column; gap: 2px; }
.doc-brand small { color: var(--muted); }
.doc-sign { margin-top: 28px; display: flex; flex-direction: column; gap: 4px; max-width: 320px; }
.doc-sign span { border-bottom: 1px solid var(--ink); height: 36px; }
.doc-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
@media print { .doc-panel { border: 0; box-shadow: none; padding: 0; max-width: none; } }
/* The connect-AI demo (src/routes/site.js aiDemo, played by public/static/ai-link.js): ChatGPT green and Claude clay on one
   card, TMP on the other, and an elbow line between them that carries each ask over and the answer back. Flat, no shadows. */
.al { --gpt: #10A37F; --gpt-ink: #0A6B53; --gpt-tint: #E6F5F0; --claude: #D97757; --claude-ink: #A3472A; --claude-tint: #FBEDE7;
  width: 100%; max-width: 680px; align-self: center; container-type: inline-size; }
.al-in { position: relative; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); column-gap: 72px; padding: 26px 24px 14px; background: #22272C; border-radius: 12px; }
.al-wire { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.al-line { fill: none; stroke: #6B747D; stroke-width: 2; stroke-linejoin: round; }
.al-out, .al-back { fill: none; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 14 200; stroke-dashoffset: 14; }
.al-out { stroke: var(--gpt); }
.al[data-app="claude"] .al-out { stroke: var(--claude); }
.al-back { stroke: var(--accent); }
.al-card { position: relative; z-index: 1; min-width: 0; background: #fff; border-radius: 8px; padding: 14px; }
.al-ai { grid-column: 1; grid-row: 1; margin-top: 118px; }
.al-tmp { grid-column: 2; grid-row: 1; align-self: start; }
.al-apps { display: flex; flex-wrap: wrap; gap: 6px; }
.al-app { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 10px 0 5px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; font-weight: 600; color: var(--muted); transition: background-color .3s, color .3s, border-color .3s; }
.al-ico { display: block; flex: none; width: 20px; height: 20px; }
.al-app .al-ico { filter: grayscale(1); opacity: .5; transition: filter .3s, opacity .3s; }
.al[data-app="gpt"] .al-app.is-gpt { background: var(--gpt-tint); border-color: var(--gpt); color: var(--gpt-ink); }
.al[data-app="claude"] .al-app.is-claude { background: var(--claude-tint); border-color: var(--claude); color: var(--claude-ink); }
.al[data-app="gpt"] .al-app.is-gpt .al-ico, .al[data-app="claude"] .al-app.is-claude .al-ico { filter: none; opacity: 1; }
.al-chat { display: flex; flex-direction: column; gap: 10px; min-height: 140px; margin-top: 14px; }
.al-you { align-self: flex-end; min-height: 39px; margin: 0; padding: 9px 12px; background: var(--bg); border-radius: 12px 12px 3px 12px; font-size: 14px; line-height: 1.45; color: var(--ink); }
.al-you.is-typing::after { content: ''; display: inline-block; width: 2px; height: 1.05em; margin-left: 2px; vertical-align: -2px; background: currentColor; animation: al-caret .9s steps(1) infinite; }
@keyframes al-caret { 50% { opacity: 0; } }
.al-reply { display: flex; gap: 8px; align-items: flex-start; margin: 0; font-size: 14px; line-height: 1.45; color: var(--ink-2); transition: opacity .35s; }
.al-reply .al-ico { display: none; margin-top: 1px; }
.al[data-app="gpt"] .al-reply .al-ico-gpt, .al[data-app="claude"] .al-reply .al-ico-claude { display: block; }
.al-reply.is-waiting { opacity: 0; transition: none; }
.al-tmp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 10px; border-bottom: 3px solid var(--accent); }
.al-tmp-head img { display: block; width: 86px; height: auto; }
.al-tmp-head span { font-size: 12px; color: var(--muted); }
.al-feed { list-style: none; margin: 0; padding: 0; }
.al-feed li { display: flex; gap: 10px; align-items: flex-start; margin: 0 -6px; padding: 10px 6px; border-bottom: 1px solid var(--line); border-radius: 4px; transition: background-color 1.6s ease-in; }
.al-feed li:nth-child(3) { border-bottom: 0; }
.al-feed li:nth-child(n+4) { display: none; }
.al-feed li.is-new { background: #FFEBDD; transition: none; }
.al-feed .al-ico { width: 18px; height: 18px; margin-top: 1px; }
.al-feed b { display: block; font-size: 14px; line-height: 1.35; color: var(--ink); }
.al-feed small { display: block; font-size: 13px; line-height: 1.35; color: var(--muted); }
.al-tabs { grid-column: 1 / -1; grid-row: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 0 20px; margin-top: 20px; padding-top: 4px; border-top: 1px solid #3A4148; }
.al-tab { position: relative; min-height: 40px; padding: 0; border: 0; background: none; font: inherit; font-size: 13px; font-weight: 600; color: #AEB6BE; cursor: pointer; }
.al-tab:hover, .al-tab[aria-pressed="true"] { color: #fff; }
.al-tab[aria-pressed="true"]::after { content: ''; position: absolute; left: 2px; right: 2px; bottom: 4px; height: 3px; background: var(--gpt); transform: skewX(-24deg); }
.al-tab[data-app="claude"][aria-pressed="true"]::after { background: var(--claude); }
.al-play { display: grid; place-items: center; width: 34px; height: 34px; margin-left: auto; padding: 0; border: 1px solid #4A525B; border-radius: 6px; background: none; color: #D5DADF; cursor: pointer; }
.al-play[hidden] { display: none; }
.al-play svg { width: 14px; height: 14px; }
.al-play .i-pause, .al.is-playing .al-play .i-play { display: none; }
.al.is-playing .al-play .i-pause { display: block; }
.al-tab:focus-visible, .al-play:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.s-top-grid.al-top { grid-template-columns: minmax(0, 1fr) minmax(0, 600px); gap: 48px; }
.al-note { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 2px; margin: 0; font-size: 13px; line-height: 1.4; color: #AEB6BE; }
.al-note b { font-size: 14px; color: #fff; }
.al-note-ai { grid-column: 1; grid-row: 1; align-self: start; }
.al-note-ai::before { content: ''; width: 26px; height: 5px; margin: 0 0 10px 3px; background: var(--accent); transform: skewX(-24deg); }
.al-note-tmp { grid-column: 2; grid-row: 1; align-self: end; padding-bottom: 6px; }
.s-asks { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; }
.s-asks li { padding: 13px 18px; background: var(--bg); border-radius: 16px 16px 16px 4px; font-size: 17px; line-height: 1.45; color: var(--ink); }
.s-connect { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 40px; margin-top: 32px; }
.s-connect > div { padding-top: 16px; border-top: 3px solid var(--ink); }
.s-connect h3 { margin: 0; font-size: 20px; }
.s-connect ol { margin: 12px 0 0; padding-left: 22px; display: grid; gap: 10px; font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.s-connect code { font-size: 14px; overflow-wrap: anywhere; background: #fff; padding: 1px 5px; border-radius: 4px; border: 1px solid var(--line); }
@media (max-width: 960px) { .s-top-grid.al-top { grid-template-columns: minmax(0, 1fr); gap: 28px; } .s-connect { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .s-asks { grid-template-columns: minmax(0, 1fr); } .s-asks li { font-size: 16px; } }
/* The demo fits its own width (container queries): tighter in a narrow column, stacked on phones. */
@container (max-width: 599px) { .al-in { column-gap: 44px; padding: 22px 16px 12px; } .al-ai { margin-top: 112px; } }
@container (max-width: 459px) {
  .al-in { grid-template-columns: minmax(0, 1fr); padding: 18px 14px 8px; }
  .al-ai { grid-row: 1; margin: 0 28px 0 0; }
  .al-tmp { grid-column: 1; grid-row: 2; margin: 72px 0 0 28px; }
  .al-tabs { grid-row: 3; display: grid; grid-template-columns: auto auto 1fr; gap: 0 20px; }
  .al-tab { justify-self: start; }
  .al-tab:nth-child(odd) { grid-column: 1; }
  .al-tab:nth-child(even) { grid-column: 2; }
  .al-play { grid-column: 3; grid-row: 1 / span 2; align-self: center; justify-self: end; }
  .al-chat { min-height: 116px; }
  .al-note { display: none; }
}
/* Home: at laptop widths the demo gets the wider column so it keeps its side-by-side layout. */
@media (min-width: 961px) and (max-width: 1180px) { .s-ai-grid { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 40px; } }
/* The TMP AI welcome (src/views.js aiIntro, public/static/ai-intro.js): the orb from the voice calls, a card with the
   TMP AI window's gradient edge, then a spotlight on the corner button. */
html.ai-intro-open { overflow: hidden; }
html.ai-intro-raise .ai-fab { z-index: 1002; }
.ai-intro { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px; }
.ai-intro[hidden] { display: none; }
.ai-intro-scrim { position: absolute; inset: 0; background: rgba(17, 20, 24, .64); opacity: 0; transition: opacity .4s ease; }
.ai-intro.is-on .ai-intro-scrim { opacity: 1; }
.ai-intro.is-on.is-spot .ai-intro-scrim { opacity: 0; }
.ai-intro-orb { position: fixed; left: 0; top: 0; z-index: 2; width: 128px; height: 128px; opacity: 0; pointer-events: none; will-change: transform, opacity; }
.ai-intro-card { position: relative; z-index: 1; width: min(560px, 100%); max-height: calc(100vh - 96px); overflow: auto; padding: 80px 28px 22px; border: 2px solid transparent; border-radius: 18px;
  background: linear-gradient(#fff, #fff) padding-box, var(--ai-grad) border-box; opacity: 0; }
.ai-intro-skip { position: absolute; top: 10px; right: 10px; min-height: 40px; padding: 0 12px; border: 0; border-radius: 8px; background: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; }
.ai-intro-skip:hover { color: var(--ink); background: var(--surface-2); }
.ai-intro-h { min-height: 1.2em; margin: 0; text-align: center; font-size: 26px; line-height: 1.2; letter-spacing: -.01em; color: var(--ink); }
.ai-intro-h.is-typing::after { content: ''; display: inline-block; width: 3px; height: .95em; margin-left: 3px; vertical-align: -3px; border-radius: 1px; background: var(--ai); animation: al-caret .9s steps(1) infinite; }
.ai-intro-p { max-width: 46ch; margin: 10px auto 0; text-align: center; font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.ai-intro-try { margin: 22px 0 8px; font-size: 14px; font-weight: 600; color: var(--ink); }
.ai-intro-asks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ai-intro-ask { display: flex; align-items: flex-start; gap: 10px; min-height: 52px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font: inherit; font-size: 14px; line-height: 1.4; text-align: left; color: var(--ink); cursor: pointer; transition: border-color .2s, background-color .2s; }
.ai-intro-ask .ic { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--ai); }
.ai-intro-ask:hover, .ai-intro-ask:focus-visible { border-color: var(--ai); background: var(--ai-tint); }
.ai-intro-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 22px; }
.ai-intro-btns { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.ai-intro-dots { display: flex; gap: 6px; }
.ai-intro-dots i { width: 18px; height: 5px; border-radius: 2px; background: var(--line); transform: skewX(-24deg); }
.ai-intro-dots i.on { background: var(--accent); }
.ai-intro-mail { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 14px; background: var(--ai-tint); color: var(--ai); }
.ai-intro-mail .ic { width: 26px; height: 26px; }
.ai-intro-mail.done { background: #E3F4EA; color: #1E7B45; }
.ai-intro-spot { position: fixed; left: 0; top: 0; z-index: 1; border-radius: 50%; box-shadow: 0 0 0 200vmax rgba(17, 20, 24, .64); opacity: 0; transition: opacity .4s ease; pointer-events: none; }
.ai-intro.is-spot .ai-intro-spot { opacity: 1; }
.ai-intro-spot::before, .ai-intro-spot::after, .ai-fab.ai-fab-hint::before, .ai-fab.ai-fab-hint::after { content: ''; position: absolute; inset: 0; border: 2px solid #D9479A; border-radius: 50%; pointer-events: none; animation: ai-ring 2.4s cubic-bezier(.2, .6, .3, 1) infinite; }
.ai-intro-spot::after, .ai-fab.ai-fab-hint::after { border-color: #6B4BF2; animation-delay: 1.2s; }
@keyframes ai-ring { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(1.75); opacity: 0; } }
@keyframes ai-ring-soft { 0%, 100% { opacity: .2; } 50% { opacity: .85; } }
.ai-intro-tip { position: fixed; z-index: 3; width: min(320px, calc(100vw - 32px)); padding: 16px 18px 14px; border: 2px solid transparent; border-radius: 14px; background: linear-gradient(#fff, #fff) padding-box, var(--ai-grad) border-box; opacity: 0; }
.ai-intro-tip b { display: block; font-size: 17px; color: var(--ink); }
.ai-intro-tip p { margin: 6px 0 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.ai-intro-tip .ai-intro-foot { margin-top: 14px; }
.ai-intro-tip::after { content: ''; position: absolute; right: var(--ax, 20px); bottom: -9px; width: 14px; height: 14px; background: #fff; border-right: 2px solid #F2622F; border-bottom: 2px solid #F2622F; border-radius: 0 0 3px 0; transform: rotate(45deg); }
@media (prefers-reduced-motion: reduce) {
  .ai-intro-spot::before, .ai-intro-spot::after, .ai-fab.ai-fab-hint::before, .ai-fab.ai-fab-hint::after { transform: scale(1.3); animation: ai-ring-soft 2.4s ease-in-out infinite; }
}
@media (max-width: 600px) {
  .ai-intro-card { padding: 66px 18px 18px; border-radius: 16px; }
  .ai-intro-orb { width: 104px; height: 104px; }
  .ai-intro-h { font-size: 22px; }
  .ai-intro-p { font-size: 15px; }
  .ai-intro-asks { grid-template-columns: minmax(0, 1fr); }
  .ai-intro-ask { min-height: 46px; }
}
/* The welcome's speaker (public/static/ai-intro.js): waves when TMP AI talks, a cross when muted, and "Tap to hear me"
   with a soft pulse while the browser is holding the sound back until the page is tapped. */
.ai-intro-sound { position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 10px; border: 0; border-radius: 8px; background: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; }
.ai-intro-sound:hover { color: var(--ink); background: var(--surface-2); }
.ai-intro-sound .ic { width: 20px; height: 20px; }
.ai-intro-sound span, .ai-intro-sound .s-off, .ai-intro-sound.is-off .s-on { display: none; }
.ai-intro-sound.is-off .s-off { display: inline; }
.ai-intro-sound.is-blocked { color: var(--ai); background: var(--ai-tint); animation: ai-hear 1.8s ease-out infinite; }
.ai-intro-sound.is-blocked span { display: inline; }
@keyframes ai-hear { 0% { box-shadow: 0 0 0 0 rgba(107, 63, 212, .4); } 100% { box-shadow: 0 0 0 10px rgba(107, 63, 212, 0); } }
@media (max-width: 600px) { .ai-intro-sound.is-blocked span { display: none; } }
/* The welcome's Back buttons: on phones the buttons move under the step dots when they don't fit beside them. */
@media (max-width: 600px) { .ai-intro-foot { flex-wrap: wrap; row-gap: 10px; } .ai-intro-btns { margin-left: auto; } }
/* TMP AI settings: the orb's colours (src/views.js orbMix): a preview orb beside a colour wheel, then brightness and a
   colour code for the colour being changed, then one row per colour with how much of the orb it takes. */
.ai-set-orb { display: grid; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.ai-set-orb > .muted { margin: -4px 0 0; }
.ai-orb-edit { display: flex; align-items: center; justify-content: center; gap: 20px; }
.ai-orb.ai-orb-mini { width: 112px; height: 112px; flex: none; }
.ai-wheel { --l: 50%; position: relative; width: 168px; aspect-ratio: 1; flex: none; border-radius: 50%; touch-action: none; cursor: crosshair; box-shadow: inset 0 0 0 1px rgba(16, 20, 24, .12);
  background: radial-gradient(closest-side, hsl(0 0% var(--l)), hsl(0 0% var(--l) / 0)), conic-gradient(hsl(0 100% var(--l)), hsl(60 100% var(--l)), hsl(120 100% var(--l)), hsl(180 100% var(--l)), hsl(240 100% var(--l)), hsl(300 100% var(--l)), hsl(360 100% var(--l))); }
.ai-wheel:focus-visible { outline: 3px solid var(--ai); outline-offset: 3px; }
.ai-wheel i { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px rgba(16, 20, 24, .35), 0 2px 6px rgba(16, 20, 24, .3); pointer-events: none; }
.ai-orb-tune { display: grid; grid-template-columns: minmax(0, 1fr) 112px; gap: 12px; align-items: end; }
.ai-orb-tune label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.ai-orb-tune input[type="range"], .ai-orb-row input[type="range"] { width: 100%; min-height: 36px; accent-color: var(--ai); }
.ai-orb-hex input { width: 100%; min-height: 36px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font: inherit; font-size: 14px; color: var(--ink); text-transform: uppercase; }
.ai-orb-rows { display: grid; gap: 6px; }
.ai-orb-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) 44px 36px; gap: 8px; align-items: center; }
.ai-orb-sw { width: 40px; height: 40px; padding: 0; border: 2px solid var(--line); border-radius: 50%; background: var(--c); cursor: pointer; }
.ai-orb-sw[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 2px var(--surface); }
.ai-orb-pct { font-size: 14px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.ai-orb-x { width: 36px; height: 36px; border: 0; border-radius: 8px; background: none; font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; }
.ai-orb-x:hover { background: var(--line); color: var(--ink); }
.ai-orb-btns { display: flex; flex-wrap: wrap; gap: 8px; }
/* Settings > Front Desk > Starting prices: a kind of project and what it usually starts at, one row each. */
.fd-prices { display: grid; gap: 8px; margin: 12px 0; }
.fd-price { display: grid; grid-template-columns: minmax(0, 1fr) 180px 40px; gap: 10px; align-items: end; }
.fd-price .field { margin: 0; }
.fd-money { display: flex; align-items: center; gap: 6px; }
.fd-money > span { font-weight: 600; color: var(--muted); }
.fd-money input { min-width: 0; }
.fd-price-x { align-self: end; margin-bottom: 2px; }
.fd-price + .fd-price .field-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (max-width: 600px) {
  .fd-price { grid-template-columns: minmax(0, 1fr) 40px; grid-template-areas: "what what" "from x"; gap: 6px 8px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
  .fd-price > :nth-child(1) { grid-area: what; } .fd-price > :nth-child(2) { grid-area: from; } .fd-price > :nth-child(3) { grid-area: x; }
}
/* Step-by-step setups (src/routes/guides.js): one question a screen, Back / Skip / Next, the progress under the buttons. */
.guide { max-width: 640px; margin: 0 auto; display: grid; gap: 14px; }
.guide-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 15px; color: var(--ink-2); }
.guide-exit { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 10px; border-radius: 8px; color: var(--muted); font-weight: 600; text-decoration: none; }
.guide-exit:hover { background: var(--surface-2); color: var(--ink); }
.guide-exit .ic { width: 18px; height: 18px; }
.guide-card { display: grid; gap: 14px; padding: 28px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.guide-card h1 { margin: 0; font-size: 26px; line-height: 1.2; }
.guide-help { margin: -4px 0 0; font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.guide-fields { display: grid; gap: 12px; }
.guide-fields .field input, .guide-fields .field textarea, .guide-fields .field select { font-size: 16px; }
.guide-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.guide-choices { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; }
.guide-choice { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 16px; border: 1px solid var(--line); border-radius: 10px; font-size: 16px; font-weight: 600; cursor: pointer; }
.guide-choice:has(input:checked) { border-color: var(--accent); background: #FFF4EC; }
.guide-choice input { width: 18px; height: 18px; accent-color: var(--accent); }
.guide-note { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 12px 14px; border-radius: 10px; background: #FFF4EC; font-size: 15px; line-height: 1.5; }
.guide-note .ic { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--accent); }
.guide-actions { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.guide-actions .btn { min-height: 44px; padding: 0 20px; }
.guide-progress { display: grid; gap: 6px; padding-top: 14px; border-top: 1px solid var(--line); }
.guide-bar { display: block; height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.guide-bar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; transition: width .4s ease; }
.guide-pct { font-size: 14px; color: var(--muted); }
.guide-pct b { color: var(--ink); margin-right: 8px; }
.guide-done { text-align: left; }
.guide-done-ic { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: #E3F4EA; color: #1E7B45; }
.guide-done-ic .ic { width: 28px; height: 28px; }
.guide-done-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.guide-done-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 16px; line-height: 1.45; }
.guide-done-list .ic { flex: none; width: 18px; height: 18px; margin-top: 3px; color: #1E7B45; }
.guide-start { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 18px; padding: 16px 18px; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 0; background: var(--surface); font-size: 15px; }
@media (max-width: 600px) {
  .guide-card { padding: 20px 16px; }
  .guide-card h1 { font-size: 22px; }
  .guide-two { grid-template-columns: minmax(0, 1fr); }
  .guide-actions .btn { padding: 0 14px; }
}
/* Simpler settings (Aiden, 2026-12-01): the rarely used parts of a page fold under "More options". */
.more-sections { margin: 4px 0 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.more-sections > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 10px 16px; cursor: pointer; list-style: none; }
.more-sections > summary::-webkit-details-marker { display: none; }
.more-sections > summary span { display: grid; gap: 2px; }
.more-sections > summary small { color: var(--muted); font-size: 13px; }
.more-sections > summary .ic { flex: none; width: 20px; height: 20px; color: var(--muted); transition: transform .2s; }
.more-sections[open] > summary .ic { transform: rotate(90deg); }
.more-sections-in { padding: 4px 16px 16px; border-top: 1px solid var(--line); }
/* The settings menu: Advanced folds closed. */
.set-fold > summary { display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none; }
.set-fold > summary::-webkit-details-marker { display: none; }
.set-fold > summary .ic { width: 14px; height: 14px; transition: transform .2s; }
.set-fold[open] > summary .ic { transform: rotate(90deg); }
/* Get set up: how far along, and each step with what it's for. */
.setup-top { display: grid; gap: 8px; margin-bottom: 16px; }
.setup-top div { display: grid; gap: 2px; }
.setup-top b { font-size: 18px; }
.setup-list { list-style: none; margin: 0; padding: 0; }
.setup-list li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.setup-ic { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border: 2px solid var(--line-strong); border-radius: 50%; }
.setup-list li.is-done .setup-ic { border-color: #1E7B45; background: #1E7B45; color: #fff; }
.setup-ic .ic { width: 15px; height: 15px; }
.setup-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.setup-text small { color: var(--muted); font-size: 13px; line-height: 1.4; }
.setup-list li.is-done .setup-text b { font-weight: 500; color: var(--ink-2); }
.setup-list .btn { flex: none; }

/* Settings > Connectors */
.conn-status { margin: 0; overflow-wrap: anywhere; }
.conn-note { margin: -4px 0 10px; }
/* Marketing > Google Business Profile: one card per profile (map, name, score ring, rating, reviews, posts, calls, views, to-dos) */
.gbp-cards { display: grid; gap: 16px; }
.gbp-card { container-type: inline-size; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.gbp-card-top { display: grid; grid-template-columns: 176px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 16px; }
.gbp-map { height: 104px; border-radius: var(--r); }
.addr-map.gbp-map.is-drawn { height: 104px; }
.gbp-map-none { display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.gbp-map-none .ic { width: 28px; height: 28px; }
.gbp-id { min-width: 0; }
.gbp-name { font-size: 18px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.gbp-ok { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-left: 6px; vertical-align: -3px; border-radius: 50%; background: var(--blue); color: #fff; }
.gbp-ok .ic { width: 13px; height: 13px; stroke-width: 3; }
.gbp-addr, .gbp-cat { margin: 3px 0 0; color: var(--muted); font-size: 14px; }
.gbp-cat { color: var(--ink-2); }
.gbp-warn { margin: 0; padding: 8px 16px; background: var(--amber-tint); color: var(--amber); font-size: 13px; }
.gbp-stats { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); background: #FAFBFC; }
.gbp-stat { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 12px 14px; border-left: 1px solid var(--line); }
.gbp-stat:first-child { border-left: 0; }
.gbp-stat-label { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .02em; }
.gbp-stat-value { font-size: 22px; font-weight: 600; line-height: 1.2; color: var(--ink); }
.gbp-stat-sub { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.gbp-stat-sub a { color: var(--blue); font-weight: 600; }
.gbp-stat.is-todo .gbp-stat-value { color: var(--brand-hover); }
a.gbp-stat-score { flex-direction: row; align-items: center; gap: 10px; color: inherit; text-decoration: none !important; }
a.gbp-stat-score > span { display: flex; flex-direction: column; gap: 2px; }
a.gbp-stat-score:hover { background: var(--row-hover); }
@container (max-width: 1060px) {
  .gbp-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .gbp-stat-score { grid-row: span 2; flex-direction: column !important; justify-content: center; text-align: center; }
  .gbp-stat-score > span { align-items: center; }
  .gbp-stat:nth-child(n+5) { border-top: 1px solid var(--line); }
}
@container (max-width: 600px) {
  .gbp-card-top { grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
  .gbp-card-top .gbp-map { grid-column: 1 / -1; height: 120px; }
  .addr-map.gbp-map.is-drawn { height: 120px; }
  .gbp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gbp-stat-score { grid-row: auto; grid-column: 1 / -1; flex-direction: row !important; justify-content: flex-start; text-align: left; }
  .gbp-stat-score > span { align-items: flex-start; }
  .gbp-stat { border-top: 1px solid var(--line); }
  .gbp-stat:nth-child(2n) { border-left: 0; }
  .gbp-stat:first-child { border-top: 0; }
}

/* Score ring: green from 80, amber from 50, red below */
.gbp-ring { width: 52px; height: 52px; flex: none; }
.gbp-ring.is-big { width: 120px; height: 120px; }
.gbp-ring circle { fill: none; stroke-width: 5; }
.gbp-ring-bg { stroke: var(--surface-2); }
.gbp-ring-fg { stroke-linecap: round; }
.gbp-ring text { font: 600 16px var(--font); fill: var(--ink); }
.gbp-ring.tone-good .gbp-ring-fg { stroke: #1E8E4E; }
.gbp-ring.tone-ok .gbp-ring-fg { stroke: #E39B00; }
.gbp-ring.tone-low .gbp-ring-fg { stroke: var(--red); }

/* Stars: the gold row sits over a grey row, cut to the rating */
.gbp-stars { position: relative; display: inline-block; color: #D3D7DC; font-size: 15px; letter-spacing: 1px; line-height: 1; white-space: nowrap; }
.gbp-stars-on { position: absolute; inset: 0 auto 0 0; overflow: hidden; color: #F4B400; }
.gbp-chg { font-size: 13px; font-weight: 600; }
.gbp-chg.up { color: var(--green); }
.gbp-chg.down { color: var(--red); }
.gbp-spark { width: 96px; max-width: 100%; height: 26px; margin-top: 2px; }
.gbp-spark polyline { fill: none; stroke: var(--blue); stroke-width: 1.75; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.gbp-count { margin: -6px 0 10px; }
.gbp-foot { margin-top: 14px; }
.gbp-what { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.gbp-what li { display: flex; align-items: flex-start; gap: 8px; }
.gbp-mark { flex: none; width: 15px; height: 15px; margin-top: 3px; }
.gbp-what li.is-no { color: var(--muted); }
.gbp-intro { max-width: 680px; }
.gbp-pick { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.gbp-pick li { padding: 10px 4px; border-bottom: 1px solid var(--line); }
.gbp-pick small { display: block; }

/* One profile's page */
.gbp-two { display: grid; gap: 0; }
.gbp-score-box { display: flex; align-items: center; gap: 18px; padding-bottom: 14px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.gbp-score-box p { margin: 0; max-width: 360px; }
.gbp-parts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
.gbp-parts li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.gbp-parts li::before { content: ''; flex: none; width: 9px; height: 9px; margin-top: 6px; border-radius: 50%; background: var(--line-strong); }
.gbp-parts li span { flex: 1; }
.gbp-parts li.is-done::before { background: #1E8E4E; }
.gbp-parts li.is-part::before { background: #E39B00; }
.gbp-nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
.gbp-num { display: flex; flex-direction: column; gap: 3px; padding: 4px 16px; border-left: 1px solid var(--line); min-width: 0; }
.gbp-num:first-child { border-left: 0; padding-left: 0; }
.gbp-num-value { font-size: 26px; font-weight: 600; line-height: 1.2; }
.gbp-chart { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.gbp-chart .gbp-spark { display: block; width: 100%; height: 64px; margin-top: 6px; }
.gbp-vs { margin: 10px 0 0; }
.gbp-todos { list-style: none; margin: 0; padding: 0; }
.gbp-todos li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.gbp-todos li:last-child { border-bottom: 0; padding-bottom: 0; }
.gbp-todos li:first-child { padding-top: 0; }
.gbp-todos p { margin: 2px 0 0; }
.gbp-searches { margin: 0 0 10px; padding: 0; list-style: none; counter-reset: q; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
.gbp-searches li { counter-increment: q; display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.gbp-searches li::before { content: counter(q); width: 22px; flex: none; color: var(--muted); font-variant-numeric: tabular-nums; }
.gbp-searches li span { flex: 1; overflow-wrap: anywhere; }
.gbp-rv-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0 16px; }
.gbp-rv-top .gbp-stars { font-size: 20px; }
.gbp-big { font-size: 34px; font-weight: 600; line-height: 1; }
.gbp-reviews, .gbp-posts { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.gbp-review, .gbp-posts li { padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.gbp-review.is-open { border-left: 3px solid var(--brand); }
.gbp-rv-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gbp-rv-text, .gbp-posts p { margin: 8px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.gbp-posts p { margin: 0 0 6px; }
.gbp-reply { margin-top: 10px; padding: 10px 12px; background: var(--surface-2); border-radius: var(--r); }
.gbp-reply p { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.gbp-reply-form { display: grid; gap: 10px; margin-top: 12px; }
.gbp-reply-form p { margin: 0; }
.gbp-hour { display: block; }
@media (max-width: 760px) {
  .gbp-score-box { flex-direction: column; align-items: flex-start; }
  .gbp-parts, .gbp-searches { grid-template-columns: minmax(0, 1fr); }
  .gbp-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 14px; }
  .gbp-num:nth-child(odd) { border-left: 0; padding-left: 0; }
  .gbp-todos li { flex-direction: column; align-items: flex-start; }
}
.gbp-wait { max-width: 720px; }
.gbp-wait-head { display: flex; align-items: center; gap: 8px; margin: 0; }
.gbp-wait-head .ic { width: 20px; height: 20px; padding: 3px; border-radius: 50%; background: #45A048; color: #fff; stroke-width: 3; }

/* narrow screens: long words wrap instead of pushing the page sideways */
.head-meta > * { min-width: 0; overflow-wrap: anywhere; }
.crumbs a { padding-block: 3px; }
.follow-box.is-compact { flex-wrap: wrap; }
@media (max-width: 360px) { .pic-row { flex-direction: column; } }

/* Connectors: each heading carries the service's logo (Aiden, 2026-12-02) */
.conn-logo { flex: none; display: inline-grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.conn-logo svg.brand { width: 22px; height: 22px; }
.conn-logo .ic { width: 18px; height: 18px; color: var(--ink-2); }
.btn > svg.brand { flex: none; box-sizing: border-box; width: 20px; height: 20px; padding: 2px; border-radius: 5px; background: #fff; }
/* Search settings (shared.js findBox): above the side menu on computers, above the Settings menu on phones. */
.set-find { margin: 0 0 16px; }
.set-find-in { position: relative; display: block; }
.set-find-in .ic { position: absolute; left: 11px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.set-find-in input { width: 100%; min-height: 42px; padding-left: 34px; }
.set-find-list { display: grid; gap: 2px; margin-top: 6px; padding: 4px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.set-find-list[hidden] { display: none; }
.set-find-list a, .set-found a { display: grid; align-items: start; gap: 2px; min-height: 0; padding: 8px 10px; border-radius: var(--r-sm); color: var(--ink); font-size: 14px; font-weight: 400; white-space: normal; text-decoration: none; overflow-wrap: anywhere; }
.set-find-list a span { color: var(--muted); font-size: 13px; }
.set-find-list a:hover, .set-find-list a:focus-visible, .set-found a:hover { background: var(--surface-2); }
.set-find-none { margin: 0; padding: 8px 10px; color: var(--muted); font-size: 14px; }
.set-found { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.set-nav .set-find { margin: 0 0 18px; }
@media (min-width: 900px) { .set-find-m { display: none; } }
/* Clients list (clients.js): figures, then search on one line, then type, sort, Fields and Export; sortable headings; pages. */
.cl-strip .strip { margin-bottom: 0; }
/* Four figures: two by two until there is room for one row, never three and one alone. */
@media (min-width: 761px) and (max-width: 1279px) { .cl-strip.n4 .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cl-strip.n4 .strip-cell:nth-child(3) { border-left: 0; } .cl-strip.n4 .strip-cell:nth-child(n+3) { border-top: 1px solid rgba(255, 255, 255, .12); } }
@media (min-width: 1280px) { .cl-strip.n4 .strip { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.cl-bar { display: grid; gap: 8px; }
.cl-find { flex-wrap: nowrap; }
.cl-find input.grow { min-width: 0; }
.cl-opts { gap: 8px; }
.cl-opts select { max-width: 100%; }
.cl-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }
.cl-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 12px; }
.th-sort { color: inherit; text-decoration: none; white-space: nowrap; }
.th-sort:hover { color: var(--ink); text-decoration: underline; }
.tbl .nw { white-space: nowrap; }
.cl-pages { flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; }
.tbl td.cl-nm { min-width: 9.5em; }
/* Phones: type and sort, then Fields and Export, two even rows. */
@media (max-width: 760px) { .cl-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); } .cl-opts label, .cl-opts select { width: 100%; } .cl-tools { display: contents; } .cl-tools .btn { width: 100%; justify-content: center; } }
/* Client AI notes: the pain point, risk and opportunity icons, centred beside their words. */
.intel-h { display: flex; align-items: center; gap: 8px; }
.intel-h .intel-ic { width: 24px; height: 24px; flex: none; }
.tag .intel-ic { width: 16px; height: 16px; margin-right: 4px; vertical-align: -3px; }
/* Import clients: one big spot to pick or drop the file, its icon in the middle. */
.drop { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 200px; padding: 28px 20px; text-align: center; border: 2px dashed var(--line-strong); border-radius: var(--r-lg); background: var(--surface-2); color: var(--ink); cursor: pointer; }
.drop:hover, .drop.on { border-color: var(--brand); background: var(--surface); }
.drop:focus-within { outline: 2px solid var(--brand); outline-offset: 2px; }
.drop .drop-ic { color: var(--ink-2); margin-bottom: 6px; }
.drop b { font-size: 16px; }
.drop input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
details.paste > summary { cursor: pointer; color: var(--ink-2); font-size: 14px; padding: 4px 0; }
details.paste[open] > summary { margin-bottom: 12px; }

/* AI help on a call (the phone): live text of both sides and short tips, only on this person's screen. */
.call-round.is-help .ic { background: var(--brand-tint); color: var(--ink); }
.call-round.is-help[aria-pressed="true"] .ic { background: var(--brand); color: #fff; }
.call-help { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.call-help-h { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.call-help-h b { font-size: 15px; }
.call-help-h span { flex: 1; color: var(--muted); font-size: 13px; }
.call-help-msg { margin: 0; color: var(--ink-2); font-size: 14px; }
.call-help-tips, .call-help-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.call-help-tips { gap: 8px; }
.call-help-tips:empty, .call-help-lines:empty { display: none; }
.call-tip { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 12px; border-radius: var(--r); background: var(--surface-2); font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.call-tip:first-child { background: var(--brand-tint); font-size: 16px; color: var(--ink); }
.call-tip img, .call-tip .ic { width: 20px; height: 20px; margin-top: 2px; }
.call-tip b { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.call-help-lines { gap: 6px; max-height: 220px; overflow-y: auto; border-top: 1px solid var(--line); padding-top: 10px; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.call-help-lines b { color: var(--muted); font-weight: 600; }
.call-help-lines .is-them b { color: var(--ink); }
.call-help-pref { text-align: center; font-size: 13px; color: var(--muted); }
.call-help-pref select { width: auto; margin-left: 6px; font-size: 13px; padding: 4px 8px; }
