/* Lead Control core styles. Colours come from the client's brand.css (CSS variables); nothing client-specific here.
   Type scale 28 / 20 / 16 / 14 px, nothing under 14 px. Phone first for the pages people use on their feet. */
@font-face { font-family: 'Inter'; src: url('fonts/InterVariable.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: 'Inter', -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.45; color: var(--ink); background: var(--frame); font-feature-settings: 'tnum' 1, 'cv11' 1; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--ink); text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; letter-spacing: -0.01em; }
h1 { font-size: 28px; line-height: 1.2; font-weight: 700; }
h2 { font-size: 20px; line-height: 1.3; font-weight: 650; }
h3 { font-size: 16px; font-weight: 650; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.ico.sm { width: 16px; height: 16px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------------------------------------------------------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--edge); background: var(--sheet); color: var(--ink); font-weight: 600; font-size: 16px; cursor: pointer; text-decoration: none; white-space: nowrap; max-width: 100%; }
.btn:hover { border-color: #cfcfcb; }
.btn.primary { background: var(--main); border-color: var(--main); color: #fff; }
.btn.primary:hover { background: var(--main-hover); border-color: var(--main-hover); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--grey-tint); }
.btn.quiet { background: transparent; border: 1px dashed #c9c9c5; color: var(--muted); font-weight: 500; }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 8px; }
.btn.back { border: 1.5px solid var(--ink); min-height: 48px; background: transparent; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn .ico { width: 18px; height: 18px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 10px; border: 0; background: transparent; cursor: pointer; color: inherit; flex: none; }
.icon-btn:hover { background: var(--grey-tint); }
.link-btn { border: 0; background: none; padding: 0; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: inherit; }

/* ---------------------------------------------------------------- pills (a dot and a word, never colour alone) */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 14px; font-weight: 550; white-space: nowrap; background: var(--grey-tint); color: var(--grey); max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.pill.plain::before { display: none; }
/* Calm tags: grey with a coloured dot. Red is only for "late" (red words and dot, no red box). */
.pill.red { background: transparent; color: var(--red-text); padding: 0 2px; font-weight: 650; }
.pill.amber { color: var(--ink); }
.pill.amber::before { background: var(--accent); }
.pill.green { color: var(--ink); }
.pill.green::before { background: var(--green); }
.pill.ink { background: var(--ink); color: #fff; }
.pill.outline { background: transparent; border: 1px solid var(--edge); color: var(--ink); }
.pill > span { overflow: hidden; text-overflow: ellipsis; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--grey-tint); color: var(--ink); font-size: 14px; font-weight: 650; flex: none; }
.avatar.dark { background: #2c2c2c; color: #fff; }

/* ---------------------------------------------------------------- sign-in */
#login-view { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 42%) 1fr; }
.login-band { background: var(--band); color: #fff; padding: 48px; display: flex; flex-direction: column; gap: 28px; }
.login-band img { width: 260px; max-width: 100%; height: auto; }
.login-band .lead { font-size: 20px; line-height: 1.4; color: #e9e9e6; max-width: 26em; }
.login-band .note { color: #c9c9c5; font-size: 16px; }
.login-main { padding: 48px; display: flex; flex-direction: column; gap: 20px; max-width: 760px; }
.login-form-wrap { border-top: 1px solid var(--edge); padding-top: 18px; }
#login-form, #newpass-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; margin-top: 10px; }
#login-error { color: var(--red-text); font-size: 14px; min-height: 20px; }
.login-foot { display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }

/* ---------------------------------------------------------------- the app shell */
#app-view { min-height: 100vh; }
.band { position: sticky; top: 0; z-index: 30; height: 56px; background: var(--band); color: #fff; display: flex; align-items: center; gap: 16px; padding: 0 16px 0 20px; }
.band .logo { height: 30px; width: auto; display: block; }
.band .mark { height: 34px; width: 34px; display: none; }
.band .spacer { flex: 1; }
#demo-btn { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid #3a3a3a; background: transparent; color: #fff; cursor: pointer; font-size: 14px; font-weight: 600; white-space: nowrap; flex: none; }
#demo-btn:hover, #demo-btn[aria-expanded=true] { background: #222; }
#demo-btn .ico { width: 14px; height: 14px; fill: currentColor; }
#view-as { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid #3a3a3a; background: #222; color: #fff; cursor: pointer; font-size: 14px; white-space: nowrap; max-width: 46vw; overflow: hidden; }
#view-as b { font-weight: 650; }
#view-as .role { color: #c9c9c5; }
.band .me { width: 36px; height: 36px; border-radius: 50%; border: 0; background: #2c2c2c; color: #fff; font-weight: 650; font-size: 14px; cursor: pointer; }
.va-menu { position: fixed; top: 52px; right: 16px; z-index: 60; width: 300px; max-width: calc(100vw - 24px); background: var(--sheet); border-radius: 12px; box-shadow: 0 12px 40px rgba(0,0,0,.18); border: 1px solid var(--edge); padding: 6px; }
.va-menu .va-head { padding: 10px 12px 6px; font-size: 14px; color: var(--muted); }
.va-menu button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; min-height: 48px; border: 0; background: none; border-radius: 8px; cursor: pointer; text-align: left; font-size: 16px; }
.va-menu button:hover, .va-menu button[aria-current=true] { background: var(--grey-tint); }
.va-menu .role { color: var(--muted); font-size: 14px; display: block; }
.va-menu .dm-clock { display: flex; gap: 8px; align-items: center; padding: 10px 12px 8px; margin-top: 4px; border-top: 1px solid var(--rule); font-size: 14px; color: var(--muted); }

.layout { display: grid; grid-template-columns: 228px 1fr; min-height: calc(100vh - 56px); }
.side { position: sticky; top: 56px; height: calc(100vh - 56px); background: var(--sheet); border-right: 1px solid var(--edge); display: flex; flex-direction: column; padding: 12px 10px; overflow-y: auto; }
#nav { display: flex; flex-direction: column; gap: 2px; }
#nav button { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px; border-radius: 10px; border: 0; background: none; cursor: pointer; font-size: 16px; font-weight: 500; color: var(--ink); text-align: left; }
#nav button:hover { background: var(--grey-tint); }
#nav button[aria-current=page] { background: var(--ink); color: #fff; }
#nav button .badge { margin-left: auto; min-width: 24px; height: 22px; border-radius: 11px; background: var(--red-tint); color: var(--red-text); font-size: 14px; font-weight: 650; display: inline-flex; align-items: center; justify-content: center; padding: 0 6px; }
#nav button[aria-current=page] .badge { background: #fff; }
#nav .more-toggle { color: var(--muted); margin-top: 6px; }
#nav .more-toggle .chev { margin-left: auto; transition: transform .15s; }
#nav .more-toggle[aria-expanded=true] .chev { transform: rotate(180deg); }
#nav .more-toggle.has-current { color: var(--ink); }
#nav .nav-more { display: flex; flex-direction: column; gap: 2px; }
#nav .nav-more[hidden] { display: none !important; }
.side .foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--rule); display: flex; flex-direction: column; gap: 4px; }
#logout { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px; border-radius: 10px; border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 16px; }
#logout:hover { background: var(--grey-tint); color: var(--ink); }
main { min-width: 0; }
#content { padding: 24px 28px 64px; max-width: 1480px; }
#content.loading > * { opacity: .55; }
#toasts { pointer-events: none; position: fixed; z-index: 90; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 24px)); }
body:has([role=dialog]) #toasts { top: 72px; bottom: auto; }
.toast { background: var(--ink); color: #fff; border-radius: 10px; padding: 12px 16px; font-size: 16px; box-shadow: 0 8px 24px rgba(0,0,0,.2); overflow-wrap: anywhere; } /* a long link wraps */

/* ---------------------------------------------------------------- page parts */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head .titles { min-width: 0; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.page-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.crumb { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 14px; min-height: 48px; margin: -8px 0 0; background: none; border: 0; padding: 0 8px 0 0; cursor: pointer; }
.card, section.card { background: var(--sheet); border-radius: 12px; box-shadow: 0 1px 2px rgba(0,0,0,.06); border: 1px solid var(--edge); padding: 18px 20px; min-width: 0; }
.card + .card { margin-top: 16px; }
.stack > .card + .card, .stack > details.card { margin-top: 0; }
.card h2 { margin-bottom: 4px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head .sub { color: var(--muted); font-size: 14px; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.cols { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.finding { font-size: 16px; font-weight: 600; margin: 0 0 4px; }
.method { font-size: 14px; color: var(--muted); margin: 0; }
.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 6px; }
.error-box { background: var(--red-tint); color: var(--red-text); border-radius: 12px; padding: 18px 20px; }
.skel { height: 64px; border-radius: 12px; background: linear-gradient(90deg, #ececea, #f4f4f2, #ececea); background-size: 200% 100%; animation: sk 1.2s infinite; margin-bottom: 10px; }
@keyframes sk { to { background-position: -200% 0; } }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; background: var(--grey-tint); color: var(--grey); font-size: 14px; }
.notice.amber { background: var(--amber-tint); color: var(--amber); }
.notice .ico { width: 18px; height: 18px; margin-top: 1px; }

/* ---------------------------------------------------------------- toolbar: search, chips, view switch, count */
.toolbar { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.toolbar .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.search { position: relative; flex: 1 1 260px; max-width: 420px; }
.search input { width: 100%; height: 44px; border-radius: 10px; border: 1px solid var(--edge); background: var(--sheet); padding: 0 12px 0 40px; font-size: 16px; }
.search .ico { position: absolute; left: 12px; top: 12px; color: var(--muted); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--edge); background: var(--sheet); font-size: 14px; font-weight: 550; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.chip[aria-pressed=true] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip .n { color: inherit; opacity: .75; }
.selects { display: flex; gap: 8px; flex-wrap: wrap; }
.selects select, .selects input { height: 36px; border-radius: 8px; border: 1px solid var(--edge); background: var(--sheet); padding: 0 8px; font-size: 14px; max-width: 220px; }
.count { font-size: 14px; color: var(--muted); }
.tb-main { gap: 10px 12px; }
.tb-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; min-width: 0; }
.pick { display: inline-flex; flex: none; }
.pick select { height: 36px; max-width: 220px; border-radius: 999px; border: 1px solid var(--edge); padding: 0 32px 0 14px; font-size: 14px; font-weight: 550; cursor: pointer; appearance: none; -webkit-appearance: none; background: var(--sheet) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23595959' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 16px 16px; }
.filters-btn { border-radius: 999px; min-height: 36px; }
.filters-btn[aria-expanded=true] { border-color: var(--ink); }
.badge-n { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 650; }
.filter-panel { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 12px; padding: 12px; border-radius: 10px; background: var(--frame); border: 1px solid var(--edge); }
.filter-panel[hidden] { display: none !important; }
.pf { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pf-l { font-size: 14px; color: var(--muted); font-weight: 550; }
.pf select, .pf input { height: 40px; width: 100%; border-radius: 8px; border: 1px solid var(--edge); background: var(--sheet); padding: 0 8px; font-size: 14px; }
.tb-foot { gap: 8px 12px; min-height: 24px; }
.chip.scope { height: 30px; padding: 0 8px 0 12px; display: inline-flex; align-items: center; gap: 4px; background: var(--grey-tint); border-color: transparent; }
.chip.scope .ico { width: 14px; height: 14px; }
/* a small "⋯" menu on a page (the lead page's Extend and Edit) */
.pop-wrap { position: relative; display: inline-flex; }
.pop-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 25; min-width: 200px; background: var(--sheet); border: 1px solid var(--edge); border-radius: 12px; box-shadow: 0 12px 40px rgba(0,0,0,.16); padding: 6px; display: flex; flex-direction: column; }
.pop-menu[hidden] { display: none; }
.pop-menu button { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border: 0; background: none; border-radius: 8px; font-size: 16px; text-align: left; cursor: pointer; }
.pop-menu button:hover { background: var(--grey-tint); }
.switch { display: inline-flex; border: 1px solid var(--edge); border-radius: 10px; overflow: hidden; background: var(--sheet); flex: none; }
.switch button { height: 36px; padding: 0 14px; border: 0; background: none; font-size: 14px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.switch button[aria-pressed=true] { background: var(--ink); color: #fff; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--edge); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs button { height: 44px; padding: 0 14px; border: 0; border-bottom: 2px solid transparent; background: none; font-size: 16px; font-weight: 550; color: var(--muted); cursor: pointer; white-space: nowrap; }
.tabs button[aria-selected=true] { color: var(--ink); border-bottom-color: var(--ink); }

/* ---------------------------------------------------------------- KPI tiles */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpis.six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.two-up .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kpi { background: var(--sheet); border: 1px solid var(--edge); border-radius: 12px; padding: 14px 16px; box-shadow: 0 1px 2px rgba(0,0,0,.06); text-align: left; cursor: default; min-width: 0; }
button.kpi { cursor: pointer; font: inherit; }
button.kpi:hover { border-color: var(--ink); }
.kpi .label { font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .value { font-size: 28px; font-weight: 700; line-height: 1.2; margin-top: 4px; white-space: nowrap; }
.kpi .delta { font-size: 14px; color: var(--muted); margin-top: 2px; line-height: 1.3; }
.kpi .delta.up { color: var(--green); }
.kpi .delta.down { color: var(--grey); }
.kpi .note { font-size: 14px; color: var(--muted); line-height: 1.3; margin-top: 2px; }
/* A stretched button tile keeps its lines at the top, like its neighbours (a taller tile with a note sets the row). */
button.kpi { display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; }

/* ---------------------------------------------------------------- charts (one hue; red only for flags) */
.bars { display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: grid; grid-template-columns: minmax(120px, 42%) 1fr; align-items: center; gap: 12px; border: 0; background: none; padding: 2px 0; text-align: left; font: inherit; width: 100%; }
button.bar-row { cursor: pointer; }
button.bar-row:hover .bar-label { text-decoration: underline; }
.bar-label { font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
.bar-track { display: flex; align-items: center; gap: 8px; min-width: 0; }
.bar-fill { height: 18px; border-radius: 4px; background: var(--ink); display: flex; overflow: hidden; min-width: 2px; }
.bar-fill > i { display: block; height: 100%; }
.bar-val { font-size: 14px; font-weight: 600; white-space: nowrap; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.twin-table { display: none; }
.chart-card.as-table .twin-chart { display: none; }
.chart-card.as-table .twin-table { display: block; }

/* ---------------------------------------------------------------- tables (fit their card; phone: rows become cards) */
.tbl-wrap { width: 100%; }
table.tbl { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 16px; }
.tbl th { text-align: left; font-size: 14px; font-weight: 600; color: var(--muted); padding: 10px 10px; border-bottom: 1px solid var(--edge); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbl td { padding: 12px 10px; border-bottom: 1px solid var(--rule); vertical-align: middle; overflow: hidden; text-overflow: ellipsis; }
.tbl td.wrap { white-space: normal; }
.tbl td:not(.wrap) { white-space: nowrap; }
.tbl th.r, .tbl td.r { text-align: right; }
.tbl tr.total td { font-weight: 700; border-top: 1px solid var(--edge); }
.tbl tbody tr[data-href], .tbl tbody tr[data-lead] { cursor: pointer; }
.tbl tbody tr[data-href]:hover td, .tbl tbody tr[data-lead]:hover td { background: #fafaf9; }
.tbl .sub { display: block; font-size: 14px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.tbl .pill { max-width: 100%; }

/* ---------------------------------------------------------------- record rows (lists that are not tables) */
.rows { display: flex; flex-direction: column; }
.rowi { display: flex; align-items: center; gap: 14px; padding: 14px 4px; border-bottom: 1px solid var(--rule); min-width: 0; }
.rowi:last-child { border-bottom: 0; }
.rowi[data-lead], .rowi[data-href] { cursor: pointer; }
.rowi .main { flex: 1; min-width: 0; }
.rowi .main b { font-weight: 650; }
.rowi .line { font-size: 14px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rowi .line.wrap { white-space: normal; }
.rowi .meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.rowi .side-r { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; max-width: 45%; }
.rowi.stacked { flex-wrap: wrap; }
.rowi.stacked .side-r { max-width: none; flex-basis: 100%; align-items: stretch; }
.rowi.stacked .side-r select { width: 100%; }
.rowi.stacked > .avatar ~ .side-r { padding-left: 50px; align-items: flex-start; }
.nw { white-space: nowrap; }
.late-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--main); margin-right: 8px; vertical-align: 2px; flex: none; }
.tile-ico { width: 44px; height: 44px; border-radius: 10px; background: var(--grey-tint); color: var(--grey); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.dl { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: 8px 16px; margin: 0; }
.dl dt { color: var(--muted); font-size: 14px; padding-top: 2px; }
.dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.group-title { font-size: 14px; font-weight: 650; color: var(--muted); text-transform: none; margin: 0 0 10px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--rule); font-size: 16px; }
.timeline li:last-child { border-bottom: 0; }
.timeline time { color: var(--muted); font-size: 14px; white-space: nowrap; }
.track { display: flex; gap: 4px; flex-wrap: wrap; }
.track span { font-size: 14px; padding: 4px 10px; border-radius: 999px; background: var(--grey-tint); color: var(--muted); white-space: nowrap; }
.track span.done { background: var(--green-tint); color: var(--green); }
.track span.on { background: var(--ink); color: #fff; }

/* ---------------------------------------------------------------- the board */
.board { display: grid; grid-template-columns: repeat(var(--cols, 7), minmax(0, 1fr)); gap: 8px; align-items: start; }
.col { background: #efefed; border-radius: 12px; padding: 8px; min-width: 0; min-height: 120px; }
.col.drop { outline: 2px dashed var(--ink); outline-offset: -2px; }
.col-head { padding: 4px 4px 8px; }
.col-head b { display: block; font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.col-head span { font-size: 14px; color: var(--muted); white-space: nowrap; }
.col-cards { display: flex; flex-direction: column; gap: 8px; }
.lcard { background: var(--sheet); border-radius: 10px; border: 1px solid var(--edge); padding: 10px; box-shadow: 0 1px 2px rgba(0,0,0,.06); cursor: pointer; min-width: 0; position: relative; }

.lcard[draggable=true] { cursor: grab; }
.lcard .co { font-weight: 650; font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
.lcard .ask { font-size: 14px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; }
.lcard .meta { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.lcard .meta .pill { height: 24px; padding: 0 8px; font-size: 14px; }
.lcard .foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 8px; }
.lcard .foot .avatar { width: 26px; height: 26px; font-size: 14px; }
.lcard .q { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.lcard .ad { font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 4px; }
.lcard .move { width: 30px; height: 30px; border-radius: 8px; flex: none; color: var(--muted); }
.lcard .move:hover { color: var(--ink); }
.lcard .ask.one { display: block; white-space: nowrap; text-overflow: ellipsis; -webkit-line-clamp: unset; }
.lcard .foot .q { flex: 1; }
.lcard .foot .q .coin { margin-right: 3px; } /* a won card's value and quote number fit beside the rep at 1280 px */
.lcard .co .late-dot { margin-right: 6px; vertical-align: 1px; }
.stage-strip { display: none; }
.lcard .q small { display: block; font-weight: 500; color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.lcard .meta .pill { white-space: normal; height: auto; min-height: 24px; padding: 2px 8px; line-height: 1.3; }
.lcard .meta .pill::before { align-self: flex-start; margin-top: 6px; }
/* the lead board: seven readable columns in two rows below 1800 px (no sideways scroll on a laptop) */
@media (min-width: 761px) and (max-width: 1799px) {
  .board.two-rows { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 14px; }
}
.board-note { font-size: 14px; color: var(--muted); margin: 0 0 10px; }

/* ---------------------------------------------------------------- sheets (forms and previews) */
.scrim { position: fixed; inset: 0; background: rgba(20,20,20,.42); z-index: 70; }
.sheet { position: fixed; z-index: 71; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--sheet); display: flex; flex-direction: column; box-shadow: -12px 0 40px rgba(0,0,0,.18); }
.sheet.wide { width: min(760px, 100vw); }
.sheet > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 12px 22px; border-bottom: 1px solid var(--rule); }
.sheet > header h2 { font-size: 20px; }
.sheet form, .sheet .sheet-in { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.sheet-body { flex: 1; overflow-y: auto; padding: 18px 22px 24px; }
.sheet footer { border-top: 1px solid var(--rule); padding: 12px 22px 14px; background: var(--sheet); }
.form-error { background: var(--red-tint); color: var(--red-text); border-radius: 8px; padding: 10px 12px; font-size: 14px; font-weight: 550; margin-bottom: 10px; }
.sheet-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.sheet-actions .step-nav { margin-right: auto; display: none; gap: 10px; }
fieldset { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
legend { font-size: 16px; font-weight: 650; margin-bottom: 10px; padding: 0; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; min-width: 0; }
.field label, .field .lab { font-size: 14px; font-weight: 600; color: var(--ink); }
.field .hint { font-size: 14px; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; min-height: 44px; border: 1px solid #d6d6d2; border-radius: 10px; padding: 8px 12px; font-size: 16px; background: #fff; }
.field textarea { min-height: 88px; resize: vertical; }
.field.bad input, .field.bad select, .field.bad textarea { border-color: var(--main); }
.fields2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.fields3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 0 12px; }
.tick { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 16px; cursor: pointer; }
.tick input { width: 20px; height: 20px; accent-color: var(--ink); }
.choice { display: grid; gap: 8px; }
.choice label { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--edge); border-radius: 10px; cursor: pointer; min-height: 52px; }
.choice label:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.choice input { accent-color: var(--ink); width: 18px; height: 18px; }
.choice .sub { font-size: 14px; color: var(--muted); display: block; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--edge); border-radius: 10px; overflow: hidden; }
.stepper button { width: 44px; height: 44px; border: 0; background: var(--sheet); cursor: pointer; font-size: 20px; }
.stepper output { min-width: 48px; text-align: center; font-weight: 700; }
.toggle { position: relative; width: 48px; height: 28px; flex: none; appearance: none; -webkit-appearance: none; background: #cfcfcb; border-radius: 14px; cursor: pointer; transition: background .15s; margin: 0; }
.toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .15s; }
.toggle:checked { background: var(--ink); }
.toggle:checked::after { transform: translateX(20px); }
.toggle:disabled { opacity: .5; cursor: not-allowed; }
.tick input.toggle { width: 48px; height: 28px; }
.preview { background: var(--frame); border: 1px solid var(--edge); border-radius: 12px; padding: 16px; font-size: 16px; }
.preview .hdr { font-size: 14px; color: var(--muted); margin-bottom: 10px; display: grid; gap: 2px; }
.preview p { margin: 0 0 8px; }

/* ---------------------------------------------------------------- the public form and the ad pages */
.public { min-height: 100vh; background: var(--frame); }
.public .pband { background: var(--band); height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; }
.public .pband img { height: 30px; }
.public .pband a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1.5px solid rgba(255,255,255,.5); border-radius: 999px; color: #fff; font-size: 16px; font-weight: 600; text-decoration: none; } /* a 44 px target, like the ad pages' Online store */
.pwrap { max-width: 560px; margin: 0 auto; padding: 22px 16px 48px; }
.phone-frame { max-width: 420px; border: 1px solid var(--edge); border-radius: 22px; overflow: hidden; background: var(--frame); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.phone-frame .pwrap { padding: 18px 14px 28px; }
.progress { height: 6px; border-radius: 3px; background: #e2e2de; overflow: hidden; margin: 6px 0 18px; }
.progress i { display: block; height: 100%; background: var(--ink); }
.q-title { font-size: 20px; font-weight: 700; margin: 0 0 6px; }
.answers { display: grid; gap: 10px; margin: 14px 0; }
.answer { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px 16px; min-height: 56px; border-radius: 12px; border: 1px solid var(--edge); background: var(--sheet); cursor: pointer; text-align: left; font-size: 16px; font-weight: 600; }
.answer span { font-weight: 400; font-size: 14px; color: var(--muted); }
.answer[aria-pressed=true] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.q-nav { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-top: 18px; }
.how { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 8px; }
.how li { display: flex; gap: 10px; align-items: flex-start; font-size: 16px; }
.thanks { text-align: center; padding: 40px 10px; }
.thanks h1 { margin-bottom: 8px; }

/* ---------------------------------------------------------------- the landing pages (#/quote; landing conversion round)
   Phone first: a dark band (top bar and hero: eyebrow, a large white H1, the sub), then the form card, which sits on
   the band's lower edge; the trust strip; How it works; the film; a red closing band; the shop band; the footer; and a
   sticky Get a quote while the form is out of view. From 900 px (#public-view only; the in-app phone preview keeps
   the phone layout) the card is the right column and overlaps the band's lower edge; the trust strip (the proof, shown
   once) sits under the band's words, beside the card's foot. These public pages use red for their accents (the card's progress, Next and Send, the icons, the closing
   band), the one exception to the staff app's "red only for the main button and red flags"; orange marks the
   eyebrow on the dark band. The logo only on dark. Every target is at least 40 px (most 44 to 52). */
.thanks h2 { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 8px; font-size: 24px; }
.thanks h2:focus, .q-title:focus { outline: none; }
.thanks .lp-again, .thanks [data-again] { min-height: 44px; padding: 0 10px; } /* "Start again", "Send another": 44 px targets */
.lp { --lp-over: 48px; min-height: 100vh; display: flex; flex-direction: column; background: var(--sheet); color: var(--ink); }
.lp-main { flex: 1; width: 100%; }
.lp-wrap { width: 100%; max-width: 1216px; margin: 0 auto; padding: 0 16px; }
.lp-top { background: var(--band); color: #fff; }
.lp-top-in { display: flex; align-items: center; gap: 8px; min-height: 60px; }
.lp-logo { display: block; height: 30px; width: auto; }
.lp-nav { display: none; gap: 2px; margin-left: auto; }
.lp-link { min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; background: none; color: #fff; font-size: 16px; font-weight: 550; cursor: pointer; }
.lp-link:hover { background: rgba(255,255,255,.1); }
.lp-store { display: inline-flex; align-items: center; min-height: 44px; margin-left: auto; padding: 0 16px; border: 1.5px solid rgba(255,255,255,.55); border-radius: 999px; color: #fff; font-size: 16px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.lp-store:hover { background: rgba(255,255,255,.1); }
.lp-top :focus-visible, .lp-hero :focus-visible, .lp-cta :focus-visible, .lp-foot :focus-visible, .lp-sticky :focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lp-poster:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* The hero band. A configured photo sits behind a flat scrim (the one darkening allowed on a photo), cropped to the band.
   On a phone the card fills most of the band, so the photo stays behind the words at the top and fades into the band
   before the card (a shorter crop keeps the subject in view, and the small file sharp enough). */
.lp-hero { position: relative; background: var(--band); color: #fff; }
.lp-hero-bg { position: absolute; top: 0; right: 0; left: 0; height: 360px; overflow: hidden; -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
.lp-pic { display: contents; } /* the <picture> only picks the file: its <img> is laid out as if it stood alone */
.lp-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
/* Strong enough for the brightest photo (white breakers): the H1 11:1, the sub 7.8:1 and the eyebrow, a lighter tint of
   the accent on a photo, 5:1 at worst. */
.lp-scrim { position: absolute; inset: 0; background: rgba(21,21,21,.82); }
.lp-hero.has-img .lp-eyebrow { color: color-mix(in srgb, var(--accent) 70%, #fff); }
.lp-hero-in { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; padding-top: 22px; }
.lp-pitch { min-width: 0; }
.lp-eyebrow { margin: 0; color: var(--accent); font-size: 15px; font-weight: 650; }
.lp-h1 { margin: 8px 0 0; color: inherit; font-size: 30px; line-height: 1.08; font-weight: 800; letter-spacing: -0.025em; text-wrap: balance; }
.lp-lede { margin: 12px 0 0; max-width: 36em; color: #d9d9d6; font-size: 16px; line-height: 1.5; }
.lp-side { position: relative; min-width: 0; margin-bottom: calc(-1 * var(--lp-over)); scroll-margin-top: 12px; }
.lp-card { padding: 18px 18px 20px; border-radius: 14px; background: var(--sheet); color: var(--ink); box-shadow: 0 18px 44px rgba(0,0,0,.28); }
.lp-q-head { display: flex; flex-direction: column-reverse; gap: 6px; }
.lp-q-head .progress { height: 4px; margin: 0; background: #e8e8e4; }
.lp-q-of { color: var(--muted); font-size: 14px; font-weight: 550; }
.lp-card .q-title { margin: 10px 0 14px; font-size: 22px; font-weight: 750; letter-spacing: -0.01em; }
.lp-card .progress i, .pwrap .form-slot .progress i { background: var(--main); }
/* The page's type, on one line with Change (the choices open inline; the choice is kept). */
.lp-type { display: flex; align-items: center; gap: 8px; min-height: 48px; margin: 0 0 14px; padding: 2px 4px 2px 14px; border-radius: 10px; background: var(--frame); font-size: 16px; font-weight: 650; }
.lp-type-name { min-width: 0; }
.lp-change { min-height: 44px; margin-left: -4px; padding: 0 8px; border: 0; border-radius: 8px; background: none; color: var(--red-text); font-size: 16px; font-weight: 650; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.lp-change:hover { background: var(--red-tint); }
.lp-types { margin: -4px 0 16px; }
/* Files: a large drop zone (a tap opens the phone's picker or photos), the list with sizes and Remove, the progress. */
.lp-filesbox { margin: 0 0 12px; }
/* A message next to what it is about (fix round 1): under its field, or the files' live region under the drop zone
   (empty, it takes no room). */
.lp-msg { margin: 6px 0 12px; padding: 8px 12px; border-radius: 8px; background: var(--red-tint); color: var(--red-text); font-size: 14px; font-weight: 600; line-height: 1.4; }
.lp-msg:empty { margin: 0; padding: 0; }
.lp-filesbox .lp-msg { margin: 8px 0 0; }
.lp-filesbox .lp-msg:empty { margin: 0; }
form.ap .field:has(+ .lp-msg), form.ap .fields2:has(+ .lp-msg) { margin-bottom: 0; }
.lp-drop { position: relative; display: grid; justify-items: center; gap: 4px; padding: 18px 14px 16px; border: 2px dashed #c4c4bf; border-radius: 12px; background: #fafaf8; text-align: center; cursor: pointer; transition: border-color .15s ease, background-color .15s ease; }
.lp-drop .ico { width: 28px; height: 28px; color: var(--main); }
.lp-drop b { font-size: 17px; }
.lp-drop-hint, .lp-drop-limit { color: var(--muted); font-size: 14px; line-height: 1.4; }
.lp-drop-limit { font-weight: 550; }
.lp-drop input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.lp-drop:hover, .lp-drop.over { border-color: var(--main); background: var(--red-tint); }
.lp-drop:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }
.lp-files { display: grid; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.lp-files li { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 4px 4px 4px 12px; border-radius: 10px; background: var(--frame); font-size: 15px; }
.lp-fname { display: inline-flex; align-items: center; gap: 8px; flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 550; }
.lp-fsize { flex: none; color: var(--muted); font-size: 14px; }
.lp-unfile { flex: none; min-height: 40px; padding: 0 12px; font-size: 14px; }
.lp-up { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 14px; font-weight: 600; }
.lp-up-bar { height: 8px; border-radius: 4px; background: #e8e8e4; overflow: hidden; }
.lp-up-bar i { display: block; height: 100%; background: var(--main); transition: width .2s ease; }
.lp-up-pct { min-width: 3.2em; text-align: right; font-variant-numeric: tabular-nums; }
/* When: optional chips; a tender asks for its closing date. */
.lp-when { margin-top: 4px; }
.lp-chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: row dense; gap: 8px; }
.lp-chip { min-height: 44px; padding: 6px 10px; border: 1px solid #d6d6d2; border-radius: 10px; line-height: 1.25; background: var(--sheet); color: var(--ink); font-size: 14px; font-weight: 550; cursor: pointer; }
.lp-chip.wide { grid-column: span 2; }
.lp-chip:hover { border-color: var(--ink); }
.lp-chip[aria-pressed=true] { border-color: var(--ink); background: var(--ink); color: #fff; }
.lp-q-go { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
form.ap .btn.dark[type=submit], form.ap .btn.primary[type=submit] { min-height: 52px; padding: 0 22px; border-radius: 10px; background: var(--main); border-color: var(--main); color: #fff; font-size: 17px; }
form.ap .btn.dark[type=submit]:hover, form.ap .btn.primary[type=submit]:hover { background: var(--main-hover); border-color: var(--main-hover); }
form.ap .btn.primary[aria-disabled=true] { opacity: .6; cursor: progress; }
/* The consent tick: the whole label row is the target (48 px), the box itself a visible 24 px. */
form.ap .tick, #public-view form.wf .tick { min-height: 48px; }
form.ap .tick input, #public-view form.wf .tick input { width: 24px; height: 24px; flex: none; }
.lp-card .q-nav { margin-top: 16px; }

/* The trust strip: the page's own proof points, with simple icons. */
.lp-strip { padding: calc(var(--lp-over) + 28px) 0 36px; background: var(--sheet); }
.lp-proof { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.lp-proof li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; align-items: start; font-size: 16px; font-weight: 700; line-height: 1.4; }
.lp-proof .ico { width: 28px; height: 28px; color: var(--main); stroke-width: 1.75; }
.lp-proof li span { padding-top: 3px; }

/* How it works: three steps in a row on a light field; the step is the sentence, no boxes. */
.lp-how { padding: 56px 0 60px; background: var(--frame); scroll-margin-top: 0; }
.lp-how h2, .lp-video h2 { margin: 0; font-size: 28px; line-height: 1.12; font-weight: 800; letter-spacing: -0.02em; }
.lp-how ol { display: grid; gap: 28px; margin: 28px 0 0; padding: 0; list-style: none; }
.lp-how li { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 16px; align-items: start; align-content: start; }
.lp-how-ico { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--band); color: #fff; }
.lp-how-ico .ico { width: 24px; height: 24px; }
.lp-how p { margin: 0; padding-top: 2px; font-size: 18px; line-height: 1.45; }
.lp-how p b { font-weight: 750; }

/* The film: a large poster beside its words. */
.lp-video { padding: 60px 0; background: var(--sheet); scroll-margin-top: 0; }
.lp-video-in { display: grid; gap: 24px; align-items: center; }
.lp-film-words p { margin: 12px 0 22px; max-width: 30em; color: var(--grey); font-size: 18px; line-height: 1.5; }
.lp-get { min-height: 52px; padding: 0 24px; font-size: 17px; }
.lp-film { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 14px; background: var(--band); }
.lp-film iframe, .lp-poster { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lp-poster { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 16px; background: var(--band); color: #fff; font-size: 17px; font-weight: 650; cursor: pointer; }
.lp-poster-logo { width: min(260px, 58%); height: auto; }
.lp-poster-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lp-poster.has-img::before { content: ''; position: absolute; inset: 0; z-index: 1; background: rgba(21,21,21,.42); }
.lp-poster.has-img .lp-play, .lp-poster.has-img .lp-watch { position: relative; z-index: 2; }
.lp-poster.has-img .lp-watch { padding: 6px 14px; border-radius: 999px; background: rgba(21,21,21,.82); }
.lp-play { position: relative; flex: none; width: 76px; height: 54px; border-radius: 14px; background: var(--main); transition: transform .15s ease; }
.lp-play::after { content: ''; position: absolute; left: 30px; top: 16px; border-style: solid; border-width: 11px 0 11px 19px; border-color: transparent transparent transparent #fff; }
.lp-poster:hover .lp-play { transform: scale(1.06); }
.lp-trust { padding: 0 0 48px; background: var(--sheet); }
.lp-trust .lp-wrap { display: grid; gap: 6px; }
.lp-trust p { margin: 0; padding: 14px 16px; border-radius: 12px; background: var(--frame); font-weight: 600; }

/* The closing band: the page's promise again, and Get a quote (it scrolls to the form; nothing is drawn again). */
.lp-cta { padding: 48px 0; background: var(--main); color: #fff; }
.lp-cta-in { display: grid; gap: 22px; justify-items: start; }
.lp-cta h2 { margin: 0; max-width: 22em; color: #fff; font-size: 28px; line-height: 1.12; font-weight: 800; letter-spacing: -0.02em; text-wrap: balance; }
.lp-cta-btn { min-height: 52px; padding: 0 24px; border: 0; border-radius: 10px; background: #fff; color: var(--ink); font-size: 17px; }
.lp-cta-btn:hover { background: #f1f1ef; border: 0; }
.lp-door { padding: 26px 0; background: var(--frame); }
.lp-door-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.lp-door h2 { margin: 0; font-size: 20px; font-weight: 750; }
.lp-door-btn { min-height: 48px; border: 1.5px solid var(--ink); background: transparent; }
.lp-foot { padding: 28px 0 32px; background: var(--band); color: #d6d6d6; font-size: 14px; }
.lp-foot-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; }
.lp-foot-logo { display: block; height: 28px; width: auto; }
.lp-foot p { margin: 2px 0; }
.lp-foot b { color: #fff; }
.lp-foot .lp-note { margin-top: 8px; color: #bdbdbd; }
/* The phone's sticky Get a quote, while the form is out of view (the script sets hidden). Never on a desktop. */
.lp-sticky { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--band); }
.lp-sticky .btn { width: 100%; min-height: 52px; font-size: 17px; }
#public-view .lp.sticky-on .lp-foot { padding-bottom: calc(32px + 72px); }

.phone-frame .lp-mini { margin: -18px -14px 16px; padding: 18px 14px 20px; background: var(--band); color: #fff; }
.phone-frame .lp-h1 { font-size: 24px; }
.phone-frame .lp-proof { margin-top: 18px; }
.phone-frame .lp-proof li { font-size: 15px; }
/* A choice of four or more answers sits two across from 600 px; a phone keeps one column. */
@media (min-width: 600px) {
  #public-view .lp-card .answers.many { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  #public-view .lp-card .answers.many .answer { padding: 10px 14px; }
  #public-view .lp-proof { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 28px; }
  #public-view .lp-chips { display: flex; flex-wrap: wrap; }
  #public-view .lp-chip { padding: 0 13px; border-radius: 999px; }
  #public-view .lp-h1 { font-size: 40px; }
}
@media (min-width: 761px) {
  #public-view .lp-nav { display: flex; }
  #public-view .lp-store { margin-left: 8px; }
}
@media (min-width: 900px) {
  #public-view .lp { --lp-over: 128px; }
  #public-view .lp-wrap { padding: 0 32px; }
  #public-view .lp-top-in { min-height: 72px; }
  #public-view .lp-logo { height: 36px; }
  #public-view .lp-hero-bg { bottom: 0; height: auto; -webkit-mask-image: none; mask-image: none; }
  /* The card is the right column; its foot runs --lp-over past the band's lower edge (the band ends --lp-over above it). */
  #public-view .lp-hero-in { grid-template-columns: minmax(0, 1fr) minmax(0, 456px); gap: 0 64px; padding-top: 56px; padding-bottom: 56px; align-items: end; }
  #public-view .lp-pitch { align-self: center; padding: 8px 0; }
  #public-view .lp-side { margin-bottom: calc(-56px - var(--lp-over)); }
  #public-view .lp-card { padding: 26px 28px 28px; }
  #public-view .lp-eyebrow { font-size: 17px; }
  #public-view .lp-h1 { font-size: clamp(44px, 4.3vw, 62px); line-height: 1.02; letter-spacing: -0.035em; }
  #public-view .lp-lede { margin-top: 20px; font-size: 19px; line-height: 1.55; }
  #public-view .lp-strip { padding: 48px 0 56px; }
  #public-view .lp-strip-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 456px); gap: 0 64px; }
  /* How it works: three even cards (the row's height, the words at the top), close together under the heading. */
  #public-view .lp-how { padding: 72px 0 80px; }
  #public-view .lp-how h2, #public-view .lp-video h2 { font-size: 44px; }
  #public-view .lp-how ol { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; gap: 20px; margin-top: 32px; }
  #public-view .lp-how li { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; align-content: start; gap: 18px; padding: 28px 28px 32px; border-radius: 16px; background: #fff; box-shadow: 0 1px 2px rgba(21, 21, 21, 0.06); }
  #public-view .lp-how-ico { width: 52px; height: 52px; }
  #public-view .lp-how p { padding-top: 0; font-size: 19px; line-height: 1.5; }
  #public-view .lp-video { padding: 104px 0; }
  #public-view .lp-video-in { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 64px; }
  #public-view .lp-cta { padding: 88px 0; }
  #public-view .lp-cta-in { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 48px; }
  #public-view .lp-cta h2 { font-size: 44px; }
  #public-view .lp-cta-btn { min-height: 60px; padding: 0 32px; font-size: 19px; }
  #public-view .lp-door { padding: 32px 0; }
  #public-view .lp-sticky { display: none !important; }
  #public-view .lp-foot { padding-bottom: 32px; }
}
@media (prefers-reduced-motion: reduce) { .lp-play, .lp-drop, .lp-up-bar i { transition: none; } }

/* ---------------------------------------------------------------- the tour (not a dialog: it never blocks the page) */
.tour { position: fixed; z-index: 80; right: 20px; bottom: 20px; width: 360px; max-width: calc(100vw - 24px); background: var(--sheet); border-radius: 14px; border: 1px solid var(--edge); box-shadow: 0 16px 48px rgba(0,0,0,.2); padding: 16px 18px; }
.tour .t-step { font-size: 14px; color: var(--muted); }
.tour h3 { font-size: 18px; margin: 4px 0 6px; }
.tour p { margin: 0 0 12px; font-size: 16px; }
.tour .t-nav { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.tour.welcome { border-top: 4px solid var(--accent); }
/* The welcome: a centred dialog over a backdrop. */
.welcome-wrap { position: fixed; inset: 0; z-index: 85; display: grid; place-items: center; padding: 16px; }
.welcome-wrap .scrim { position: absolute; z-index: auto; }
.welcome-wrap .tour { position: relative; inset: auto; width: min(440px, 100%); max-width: none; }
/* A tour step on a desktop docks in the free lower part of the sidebar, never over the page. */
@media (min-width: 761px) {
  .tour:not(.welcome) { left: 10px; right: auto; bottom: 64px; width: 208px; padding: 14px; }
  .tour:not(.welcome) p { font-size: 15px; }
  .tour:not(.welcome) .t-nav { justify-content: flex-start; }
}

/* ---------------------------------------------------------------- the all-pages sheet (phone) */
.all-pages { display: grid; gap: 4px; }
.all-pages button { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 12px; border: 0; border-radius: 10px; background: none; font-size: 16px; text-align: left; cursor: pointer; }
.all-pages button:hover { background: var(--grey-tint); }

/* ---------------------------------------------------------------- Today, the lead page, small shared bits */
.today { max-width: 980px; }
.card-head .pick select { background-color: var(--sheet); }
.needs .head-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.flag-row .late-dot { margin: 0 2px 0 4px; }
.rowi.flag-row .line.reason { color: var(--ink); white-space: normal; }
.late-word { color: var(--red-text); font-weight: 600; }
.rowi .line.reason { white-space: nowrap; }
.rowi .line.reason .ico { width: 14px; height: 14px; vertical-align: -2px; color: var(--muted); }
.feed-line { margin: 0; font-size: 16px; font-weight: 550; line-height: 1.6; }
.feed-line .sep { color: var(--muted); }
.btn.icon-only { width: 44px; padding: 0; }
.btn.small.icon-only { width: 36px; }
.lead-head .one-line { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 62ch; }
.lead-head .head-tag { margin-top: 8px; }
.lead-head .titles { flex: 1 1 320px; }
.sub-line { display: block; color: var(--muted); font-size: 14px; margin-top: 2px; }
details.card > summary { cursor: pointer; font-size: 16px; font-weight: 650; list-style: none; display: flex; align-items: center; justify-content: space-between; min-height: 28px; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::after { content: '+'; font-size: 20px; color: var(--muted); font-weight: 400; }
details.card[open] > summary::after { content: '−'; }
.chip.scope.fixed { cursor: default; }
.lead-row .side-r { flex-direction: row; align-items: center; }

/* ---------------------------------------------------------------- desktop widths */
@media (max-width: 1360px) {
  .kpis.six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lcard .ad { display: none; }
}
@media (max-width: 1100px) {
  .cols { grid-template-columns: minmax(0, 1fr); }
  .grid3 { grid-template-columns: 1fr 1fr; }
}

/* ---------------------------------------------------------------- phone (390 px first for reps, Today, Red flags, the forms) */
@media (max-width: 760px) {
  body { font-size: 16px; }
  h1 { font-size: 24px; }
  #login-view { grid-template-columns: 1fr; }
  .login-band { padding: 24px 20px; gap: 14px; }
  .login-band img { width: 190px; }
  .login-band .lead { font-size: 16px; }
  .login-main { padding: 20px 16px 40px; }
  #login-form { grid-template-columns: 1fr; }
  .band { padding: 0 10px 0 12px; gap: 10px; }
  .band .logo, .band .tag { display: none; }
  .band .mark { display: block; }
  #view-as { max-width: none; flex: 1; min-width: 0; }
  #view-as .lbl { display: none; }
  .layout { display: block; }
  .side { position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: 64px; z-index: 40; padding: 0 4px calc(env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--edge); flex-direction: row; overflow: visible; }
  .side .foot { display: none; }
  #nav { flex-direction: row; width: 100%; gap: 0; }
  #nav button { display: none; }
  #nav button.tab { display: flex; flex: 1; flex-direction: column; justify-content: center; gap: 2px; height: 64px; padding: 0; border-radius: 0; font-size: 14px; font-weight: 550; min-width: 0; }
  #nav button.tab .lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  #nav button.tab[aria-current=page], #nav .more-toggle.has-current { background: none; color: var(--ink); box-shadow: inset 0 3px 0 var(--ink); }
  #nav .more-toggle { margin-top: 0; color: var(--muted); }
  #nav .more-toggle .chev { display: none; }
  #nav .nav-more { position: fixed; right: 8px; bottom: calc(70px + env(safe-area-inset-bottom)); width: min(260px, calc(100vw - 16px)); z-index: 45; background: var(--sheet); border: 1px solid var(--edge); border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.18); padding: 6px; }
  #nav .nav-more button { display: flex; height: 48px; width: 100%; }
  #nav button .badge { position: absolute; margin: -22px 0 0 26px; }
  #nav button.tab { position: relative; }
  #content { padding: 16px 14px 150px; }
  .page-head { margin-bottom: 12px; }
  .page-actions { width: 100%; }
  .page-actions .btn.main-action { flex: 1 1 auto; }
  .chips, .tabs, .selects { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 0 14px 2px; }
  .tabs { margin-bottom: 14px; } /* the normal gap under a tab bar (New leads, Reports, Rules) */
  .chips::-webkit-scrollbar, .selects::-webkit-scrollbar { display: none; }
  /* Phone toolbar: search and Filters on one line, the view switch (icons), quick chips and the rep picker on the next. */
  .tb-main { flex-wrap: wrap; }
  .search { max-width: none; flex: 1 1 190px; min-width: 0; }
  .tb-tools { display: contents; }
  .tb-tools > .filters-btn { order: 1; }
  .tb-tools > :not(.filters-btn) { order: 2; }
  .tb-tools .switch button { padding: 0 11px; }
  .tb-tools .switch .ico + .vl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .tb-tools .chips { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; min-width: 0; }
  .pick select { max-width: 160px; height: 40px; }
  .filters-btn { min-height: 40px; }
  .filter-panel { grid-template-columns: 1fr 1fr; padding: 10px; }
  .pf select, .pf input { height: 44px; }
  .board-note { display: none; }
  .kpis, .kpis.six { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi .value { font-size: 22px; }
  .grid2, .grid3, .fields2, .fields3 { grid-template-columns: 1fr; }
  .card, section.card { padding: 14px; }
  .dl { grid-template-columns: 1fr; gap: 2px; }
  .dl dd { margin-bottom: 8px; }
  .timeline li { grid-template-columns: 1fr; gap: 0; }
  .sheet, .sheet.wide { top: 6vh; width: 100vw; border-radius: 16px 16px 0 0; }
  .sheet-body { padding: 16px; }
  .sheet footer { padding: 10px 16px 14px; }
  .sheet .steps fieldset { display: none; }
  .sheet .steps fieldset.on { display: block; }
  .sheet.stepped .sheet-actions .step-nav { display: flex; }
  .sheet.stepped:not(.last) [type=submit] { display: none; }
  .sheet.stepped.last .step-next { display: none; }
  .sheet.stepped.first .step-back { display: none; }
  .btn { min-height: 48px; }
  .tour:not(.welcome) { left: 12px; right: 12px; bottom: 76px; width: auto; }
  /* The step card sits 76 px up (over the bottom menu): the page ends below it, and toasts move to the top. */
  body.touring #content { padding-bottom: calc(var(--tour-h, 240px) + 92px); }
  body.touring #toasts { top: 64px; bottom: auto; }
  #toasts { left: 12px; right: 12px; bottom: 80px; }
  body:has([role=dialog]) #toasts { top: 64px; bottom: auto; }
  /* tables become cards */
  table.tbl.stackable, .tbl.stackable tbody, .tbl.stackable tr, .tbl.stackable td { display: block; width: 100%; }
  .tbl.stackable thead { display: none; }
  .tbl.stackable tr { border: 1px solid var(--edge); border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; background: var(--sheet); }
  .tbl.stackable td { border: 0; padding: 3px 0; white-space: normal; }
  .tbl.stackable td[data-l]::before { content: attr(data-l) ': '; color: var(--muted); font-size: 14px; }
  .tbl.stackable td.r { text-align: left; }
  /* the board: a sticky stage strip and snapping columns */
  .stage-strip { display: flex; gap: 6px; overflow-x: auto; position: sticky; top: 56px; z-index: 20; background: var(--frame); padding: 8px 14px; margin: 0 -14px 8px; scrollbar-width: none; }
  .stage-strip button { flex: none; height: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--edge); background: var(--sheet); font-size: 14px; font-weight: 600; white-space: nowrap; }
  .stage-strip button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
  .board { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; margin: 0 -14px; padding: 0 14px 8px; scrollbar-width: none; }
  .col { flex: 0 0 86%; scroll-snap-align: start; }
  .lcard .co, .lcard .ask { font-size: 16px; }
  .lcard .ad { display: block; }
  .lcard .move { width: 48px; height: 48px; }
  .lead-head .one-line { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .lead-head .page-actions .btn { flex: 1 1 auto; }
  .lead-head .page-actions .pop-wrap { flex: none; }
  .lead-head .page-actions .pop-wrap .btn { flex: none; }
  .needs .card-head { align-items: flex-start; }
  /* New leads rows on a phone: the text takes the full width (no product tile), the rep and the button go below. */
  .rowi.lead-row { flex-wrap: wrap; }
  .rowi.lead-row > .tile-ico { display: none; }
  .rowi.lead-row .side-r { max-width: none; flex-basis: 100%; justify-content: flex-end; }
  .rowi.flag-row .side-r { max-width: none; }
  .numbers .card-head { flex-wrap: nowrap; }
  .rowi .side-r { max-width: 40%; }
  .rowi.wrap-sm { flex-wrap: wrap; }
  .rowi.wrap-sm .side-r { max-width: none; flex-basis: 100%; align-items: stretch; }
  .rowi.wrap-sm .side-r .switch, .rowi.stacked .side-r .switch { width: 100%; } .rowi.wrap-sm .side-r .switch button, .rowi.stacked .side-r .switch button { flex: 1; justify-content: center; }
  .rowi.stacked > .avatar ~ .side-r { padding-left: 0; }

  .kpi .label { white-space: normal; }
  .band .spacer { display: none; }
  #view-as .role { white-space: nowrap; }
}

/* ================================================================ won (the client calls it Gold): marks, the moment,
   the sales meeting and the leaderboard. Colours from brand.css (--won*, --stage*, --silver*, --bronze*). The coin and
   the stage are the only places with a gradient (Eli's request, 2 Dec 2026: "very cool"). */
.coin { display: inline-block; width: 12px; height: 12px; border-radius: 50%; flex: none; margin-right: 6px; vertical-align: -1px;
  background: radial-gradient(circle at 35% 30%, var(--won-light), var(--won) 55%, var(--won-deep)); box-shadow: inset 0 0 0 1px var(--won-deep); }
.coin.big { width: 22px; height: 22px; margin-right: 0; box-shadow: inset 0 0 0 1.5px var(--won-deep), inset 0 0 0 4px color-mix(in srgb, var(--won-light) 45%, transparent); }
/* The motto is a big gold banner, not a quiet subtitle (Eli, 2 Dec 2026: "Why is it not big?"). Text stays on the
   dark golds (--won-text to --won-deep, 4.4:1 or more on the tint). */
.page-head p.motto, .motto { display: inline-flex; align-items: center; gap: 10px; margin: 10px 0 4px; padding: 8px 20px 8px 10px;
  border-radius: 999px; border: 1px solid var(--won-edge); background: linear-gradient(180deg, #fffdf6, var(--won-tint));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 8px 22px color-mix(in srgb, var(--won) 24%, transparent);
  color: var(--won-text); font-size: 22px; line-height: 1.2; font-weight: 800; letter-spacing: -.005em; }
.motto .coin { width: 26px; height: 26px; margin: 0; box-shadow: inset 0 0 0 1.5px var(--won-deep), inset 0 0 0 4px color-mix(in srgb, var(--won-light) 45%, transparent); }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .motto .mt { background: linear-gradient(90deg, var(--won-text), var(--won-deep) 55%, var(--won-text)); -webkit-background-clip: text; background-clip: text; color: transparent; }
}
@media (max-width: 640px) {
  .page-head p.motto, .motto { font-size: 18px; padding: 6px 14px 6px 7px; gap: 8px; }
  .motto .coin { width: 22px; height: 22px; }
}
.lb-stage .tv-bar .tv-motto { margin: 0; font-size: 24px; font-weight: 800; }
.lb-stage .tv-bar .tv-motto .coin { width: 22px; height: 22px; }
@media (max-width: 760px) { .lb-stage .tv-bar .tv-motto { display: none; } }
.page-head .titles p.small { font-size: 14px; }
.motto-big { display: flex; align-items: center; gap: 10px; margin: -8px 0 0; color: var(--won-light); font-size: 20px; font-weight: 650; letter-spacing: .01em; }
.motto-big .coin { width: 18px; height: 18px; margin: 0; }
.won-word { display: inline-flex; align-items: center; color: var(--won-text); font-weight: 650; }
.won-total { color: var(--won-text) !important; font-weight: 650; display: inline-flex; align-items: center; }
.kpi.won { border-color: var(--won-edge); }
.kpi.won .label { display: flex; align-items: center; color: var(--won-text); font-weight: 600; }
.pill.won { background: var(--won-tint); color: var(--won-text); }
.pill.won::before { background: var(--won); box-shadow: inset 0 0 0 1px var(--won-deep); }
.lcard.won { border-color: var(--won-edge); }
.lcard.won .q { display: inline-flex; align-items: center; }
.lcard.just-won { animation: wonCard 1.9s ease-out 1; }
@keyframes wonCard {
  0% { background: var(--won-light); box-shadow: 0 0 0 0 color-mix(in srgb, var(--won) 0%, transparent); }
  35% { background: var(--won-light); box-shadow: 0 0 0 6px color-mix(in srgb, var(--won) 40%, transparent); }
  100% { background: var(--sheet); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
}
/* the moment: one line under the top bar and the coins (both on <body>, never taking a click) */
.won-line { position: fixed; z-index: 96; top: 70px; left: 0; right: 0; margin: 0 auto; width: max-content; display: flex; align-items: center; gap: 12px; max-width: min(620px, calc(100vw - 24px));
  padding: 12px 20px 12px 14px; border-radius: 999px; background: var(--stage); color: var(--won-light); border: 1px solid var(--won-deep);
  font-size: 16px; font-weight: 700; box-shadow: 0 14px 40px rgba(0,0,0,.3), 0 0 0 5px color-mix(in srgb, var(--won) 18%, transparent);
  pointer-events: none; opacity: 0; transform: translateY(-14px) scale(.96); transition: opacity .3s ease, transform .45s cubic-bezier(.2,.9,.3,1.25); }
.won-line.show { opacity: 1; transform: none; }
.won-line .won-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coin-rain { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 95; pointer-events: none; }

/* ---------------------------------------------------------------- the sales meeting */
.rep-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.rep-cards > .card + .card { margin-top: 0; }
.rc-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rc-head .avatar { width: 44px; height: 44px; font-size: 16px; background: var(--ink); color: #fff; }
.rc-name { flex: 1; min-width: 0; }
.rc-name h2 { font-size: 18px; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-won { display: grid; justify-items: end; text-align: right; flex: none; }
.rc-won .l { display: inline-flex; align-items: center; font-size: 14px; font-weight: 650; color: var(--won-text); }
.rc-won .v { font-size: 20px; font-weight: 750; line-height: 1.2; }
.rc-won .sub { font-size: 14px; color: var(--muted); }
.mstats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 10px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.mstat .v { font-size: 20px; font-weight: 700; line-height: 1.2; }
.mstat .l { font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mstat .n { font-size: 14px; color: var(--muted); line-height: 1.3; }
.rep-card .group-title { margin: 16px 0 0; }
.deal-row, .act-row { padding: 10px 2px; }
.deal-row .val { font-weight: 650; font-size: 16px; }
.deal-row .late-dot { margin-right: 6px; }
.act-row { align-items: flex-start; gap: 12px; }
.act-row .main b { font-weight: 600; display: block; overflow-wrap: anywhere; }
.act-row .line { white-space: normal; }
.act-row .side-r .icon-btn { width: 36px; height: 36px; color: var(--muted); }
.tick-btn { width: 32px; height: 32px; margin-top: -3px; border-radius: 50%; border: 1.5px solid #b9b9b4; background: var(--sheet); color: transparent; display: inline-flex; align-items: center; justify-content: center; flex: none; cursor: pointer; padding: 0; }
.tick-btn .ico { stroke-width: 2.5; }
.tick-btn:hover:not([disabled]) { border-color: var(--ink); color: var(--muted); }
.tick-btn[aria-pressed=true] { background: var(--green); border-color: var(--green); color: #fff; }
.tick-btn[disabled] { cursor: default; opacity: .55; }
.act-row.is-done .main b { color: var(--muted); font-weight: 500; text-decoration: line-through; text-decoration-color: #b9b9b4; }
.add-for { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; margin-top: 6px; }
.meeting-end { margin-top: 16px; }
.end-card { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }
.end-card h2 { font-size: 18px; }
.end-card .ec-text { flex: 1 1 320px; min-width: 0; }
.end-card .ec-text p { margin: 2px 0 0; }
.ec-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.agreed .card-head { margin-bottom: 4px; }
.plain-select { height: 40px; border-radius: 8px; border: 1px solid var(--edge); padding: 0 8px; background: var(--sheet); font-size: 16px; }

/* ---------------------------------------------------------------- the leaderboard: a dark stage */
.lb-head .page-actions { align-items: center; }
.tv-btn { gap: 8px; }
.lb-stage { --s: 1; position: relative; overflow: hidden; border-radius: 16px; padding: calc(var(--s) * 24px); color: var(--stage-ink);
  background: radial-gradient(110% 70% at 50% -12%, color-mix(in srgb, var(--won) 30%, transparent), transparent 62%),
    radial-gradient(70% 40% at 50% 112%, color-mix(in srgb, var(--won) 12%, transparent), transparent 70%), var(--stage);
  border: 1px solid color-mix(in srgb, var(--won) 30%, transparent); box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 22px 50px rgba(20,17,12,.18); }
.lb-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px 24px; flex-wrap: wrap; margin-bottom: calc(var(--s) * 22px); }
.lb-team { display: grid; gap: 2px; min-width: 0; flex: 1 1 280px; }
.lb-team .eyebrow { display: inline-flex; align-items: center; font-size: calc(var(--s) * 14px); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--won-light); }
.lb-team-v { font-size: calc(var(--s) * 40px); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; color: #fff; }
.lb-team-t { font-size: calc(var(--s) * 14px); color: var(--stage-muted); }
.lb-team-bar { width: min(380px, 100%); height: 6px; margin-top: 8px; border-radius: 3px; background: rgba(255,255,255,.1); overflow: hidden; }
.lb-team-bar i, .lb-row .bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--won-deep), var(--won) 60%, var(--won-light)); }
.lb-latest { display: grid; justify-items: end; gap: 2px; text-align: right; font-size: calc(var(--s) * 14px); color: var(--stage-muted); max-width: 100%; }
.lb-latest .l { text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--won-light); }
.lb-latest span:nth-child(2) { color: var(--stage-ink); font-weight: 600; }
.lb-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: calc(var(--s) * 22px); }
.lb-main { min-width: 0; }
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: calc(var(--s) * 14px); max-width: calc(var(--s) * 780px); margin: 0 auto; }
.pod { display: flex; flex-direction: column; align-items: center; min-width: 0; text-align: center; }
.pod.first { order: 2; } .pod.second { order: 1; } .pod.third { order: 3; }
.pod.m1 { --medal: var(--won); --medal-light: var(--won-light); --medal-deep: var(--won-deep); }
.pod.m2 { --medal: var(--silver); --medal-light: var(--silver-light); --medal-deep: var(--silver-deep); }
.pod.m3 { --medal: var(--bronze); --medal-light: var(--bronze-light); --medal-deep: var(--bronze-deep); }
.pod.linked { cursor: pointer; }
.pod.linked:hover .pod-name, .pod.linked:focus-visible .pod-name { text-decoration: underline; text-underline-offset: 3px; }
.pod-who { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 100%; min-width: 0; padding: 0 4px calc(var(--s) * 12px); }
.ring-wrap { position: relative; width: calc(var(--s) * 92px); height: calc(var(--s) * 92px); margin: calc(var(--s) * 14px) 0 8px; flex: none; }
.pod.first .ring-wrap { width: calc(var(--s) * 118px); height: calc(var(--s) * 118px); }
.ring { position: absolute; inset: 0; transform: rotate(-90deg); overflow: visible; }
.ring circle { fill: none; stroke-width: 5; }
.ring .track { stroke: rgba(255,255,255,.12); }
.ring .arc { stroke: var(--medal); stroke-linecap: round; transition: stroke-dashoffset 1.1s cubic-bezier(.2,.8,.2,1); filter: drop-shadow(0 0 4px color-mix(in srgb, var(--medal) 60%, transparent)); }
.ring-wrap .avatar { position: absolute; inset: 13%; width: auto; height: auto; border-radius: 50%; font-size: calc(var(--s) * 20px); font-weight: 750; letter-spacing: .02em; color: var(--stage-ink);
  background: radial-gradient(circle at 32% 25%, #3a3226, #1b1711 70%); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.pod.first .ring-wrap .avatar { font-size: calc(var(--s) * 26px); color: var(--won-light); }
.crown { position: absolute; top: -21%; left: 50%; width: 36%; transform: translateX(-50%); fill: var(--won); filter: drop-shadow(0 2px 6px rgba(0,0,0,.45)); }
.medal { position: absolute; right: 0; bottom: 0; width: 30%; height: 30%; min-width: 24px; min-height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; color: #1a1408; background: radial-gradient(circle at 35% 30%, var(--medal-light), var(--medal) 60%, var(--medal-deep)); box-shadow: 0 2px 8px rgba(0,0,0,.45); }
.pod-name { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; font-size: calc(var(--s) * 16px); font-weight: 650; max-width: 100%; }
.pod-v { font-size: calc(var(--s) * 24px); font-weight: 800; color: #fff; letter-spacing: -0.01em; line-height: 1.25; }
.pod.first .pod-v { font-size: calc(var(--s) * 30px); color: var(--won-light); }
.pod-sub { font-size: calc(var(--s) * 14px); color: var(--stage-muted); line-height: 1.35; }
.pod-sub > span { white-space: nowrap; }
.pod-sub .ts { display: none; }
.pod-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 8px; }
.pb { display: inline-flex; align-items: center; gap: 5px; min-height: 26px; padding: 0 9px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--won-light);
  background: color-mix(in srgb, var(--won) 13%, transparent); border: 1px solid color-mix(in srgb, var(--won) 32%, transparent); }
.plinth { width: 100%; display: flex; justify-content: center; padding-top: calc(var(--s) * 8px); border-radius: 10px 10px 4px 4px; font-size: calc(var(--s) * 30px); font-weight: 800; color: rgba(26,20,8,.72);
  background: linear-gradient(180deg, var(--medal-light), var(--medal) 42%, var(--medal-deep)); box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 12px 26px rgba(0,0,0,.35); }
.pod.first .plinth { height: calc(var(--s) * 104px); }
.pod.second .plinth { height: calc(var(--s) * 74px); }
.pod.third .plinth { height: calc(var(--s) * 54px); }
.pod.you .ring-wrap::after { content: ''; position: absolute; inset: -7px; border-radius: 50%; box-shadow: 0 0 0 2px var(--won-light), 0 0 26px color-mix(in srgb, var(--won) 65%, transparent); pointer-events: none; }
.you-tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; background: var(--won); color: #1a1408; font-size: 14px; font-weight: 800; letter-spacing: .02em; }
.pod.flash .ring-wrap, .lb-row.flash { animation: lbFlash 1.1s ease-in-out 3; }
@keyframes lbFlash { 50% { filter: brightness(1.35); box-shadow: 0 0 0 5px color-mix(in srgb, var(--won) 45%, transparent); border-radius: 999px; } }
.lb-rest { list-style: none; display: grid; gap: 8px; max-width: calc(var(--s) * 780px); margin: calc(var(--s) * 18px) auto 0; padding: 0; }
.lb-row { display: grid; grid-template-columns: calc(var(--s) * 28px) calc(var(--s) * 40px) minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); }
.lb-row.you { border-color: var(--won); background: color-mix(in srgb, var(--won) 12%, transparent); }
.lb-row.linked { cursor: pointer; }
.lb-row.linked:hover { background: rgba(255,255,255,.09); }
.lb-row .rk { font-size: calc(var(--s) * 18px); font-weight: 800; color: var(--stage-muted); text-align: center; }
.lb-row .avatar { width: calc(var(--s) * 40px); height: calc(var(--s) * 40px); background: #2a241a; color: var(--stage-ink); }
.lb-row .nm { min-width: 0; }
.lb-row .nm b { display: flex; align-items: center; gap: 6px; font-size: calc(var(--s) * 16px); }
.lb-row .bar { height: 5px; margin: 6px 0 4px; border-radius: 3px; background: rgba(255,255,255,.1); overflow: hidden; max-width: 320px; }
.lb-row .sub { font-size: calc(var(--s) * 14px); color: var(--stage-muted); }
.lb-row .vv { font-size: calc(var(--s) * 20px); font-weight: 800; color: #fff; }
.lb-row .row-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.lb-row .rb { display: inline-flex; align-items: center; gap: 5px; min-height: 24px; padding: 0 8px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--won-light);
  background: color-mix(in srgb, var(--won) 13%, transparent); border: 1px solid color-mix(in srgb, var(--won) 32%, transparent); }
.lb-badges { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.lb-badge { display: flex; align-items: flex-start; gap: 12px; min-width: 0; padding: 14px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); }
.lb-badge .bi { width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; flex: none; color: #1a1408;
  background: radial-gradient(circle at 35% 30%, var(--won-light), var(--won) 60%, var(--won-deep)); box-shadow: 0 4px 14px rgba(0,0,0,.35); }
.lb-badge.none .bi { background: rgba(255,255,255,.08); color: var(--stage-muted); box-shadow: none; }
.lb-badge .bt { min-width: 0; }
.lb-badge .bh { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.lb-badge .bh b { font-size: calc(var(--s) * 16px); }
.lb-badge .who { font-size: calc(var(--s) * 14px); font-weight: 700; color: var(--won-light); }
.lb-badge p { margin: 4px 0 0; font-size: calc(var(--s) * 14px); line-height: 1.4; color: var(--stage-muted); }
/* TV mode: the stage alone, full screen, bigger type; the shell's poll keeps it fresh. */
body.tv-mode[data-screen="leaderboard"] .band, body.tv-mode[data-screen="leaderboard"] .side, body.tv-mode[data-screen="leaderboard"] .tour { display: none; }
body.tv-mode[data-screen="leaderboard"] .layout { display: block; min-height: 100vh; }
body.tv-mode[data-screen="leaderboard"] #content { padding: 0; max-width: none; }
body.tv-mode[data-screen="leaderboard"] { background: var(--stage); }
.lb-stage.tv { --s: 1.1; min-height: 100vh; border: 0; border-radius: 0; padding: 24px 40px 40px; }
@media (min-width: 1600px) and (min-height: 950px) { .lb-stage.tv { --s: 1.45; } }
.tv-bar { display: flex; align-items: center; gap: 12px 18px; flex-wrap: wrap; margin-bottom: 24px; }
.tv-bar .spacer { flex: 1; }
.tv-logo { height: 34px; width: auto; display: block; }
.tv-per { font-size: 18px; color: var(--stage-muted); }
.lb-stage .tv-bar .switch { background: transparent; border-color: rgba(255,255,255,.22); }
.lb-stage .tv-bar .switch button { color: var(--stage-ink); }
.lb-stage .tv-bar .switch button[aria-pressed=true] { background: var(--won); color: #1a1408; }
.tv-exit { background: transparent; color: var(--stage-ink); border-color: rgba(255,255,255,.25); }
.tv-exit:hover { border-color: var(--stage-ink); }
/* a laptop in TV mode: the bar keeps one row for the motto; the stage's eyebrow and the switch already say the period */
@media (min-width: 761px) and (max-width: 1499px) { .tv-per { display: none; } }
@media (min-width: 1100px) {
  .lb-stage.tv .lb-body { grid-template-columns: minmax(0, 1.7fr) minmax(320px, 1fr); align-items: start; }
  .lb-stage.tv .lb-badges { grid-template-columns: 1fr; }
}
@media (max-width: 1100px) { .rep-cards { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .motto-big { font-size: 16px; margin: -4px 0 0; }
  .won-line { top: 64px; border-radius: 16px; }
  .won-line .won-text { white-space: normal; }
  .tick-btn { width: 40px; height: 40px; margin-top: -6px; }
  .rc-won .v, .mstat .v { font-size: 18px; }
  .mstat .l { white-space: normal; line-height: 1.3; }
  .mstats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 12px; } /* 2 x 2 on a phone: the rate's note fits on one line */
  .end-card .ec-actions { width: 100%; }
  .end-card .ec-actions .btn { flex: 1 1 auto; }
  .lb-head .page-actions { flex-wrap: nowrap; }
  .lb-periods { flex: 1; min-width: 0; }
  .lb-periods button { flex: 1; padding: 0 6px; justify-content: center; }
  .tv-btn { width: 48px; padding: 0; flex: none; }
  .tv-btn .tl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .lb-stage { padding: 18px 12px; border-radius: 14px; }
  .lb-team-v { font-size: 32px; }
  .lb-latest { display: flex; flex-wrap: wrap; gap: 2px 8px; text-align: left; }
  .podium { gap: 6px; }
  .ring-wrap { width: 64px; height: 64px; margin-top: 12px; }
  .pod.first .ring-wrap { width: 82px; height: 82px; }
  .ring-wrap .avatar { font-size: 16px; }
  .pod.first .ring-wrap .avatar { font-size: 20px; }
  .medal { min-width: 22px; min-height: 22px; }
  .pod-who { padding: 0 0 10px; }
  .pod-v { font-size: 16px; }
  .pod.first .pod-v { font-size: 18px; }
  .pod-sub > span { display: block; }
  .pod-sub .sep, .pod-sub .tt { display: none; }
  .pod-sub .ts { display: inline; }
  .pod-badges, .lb-row .row-badges { display: none; }
  .plinth { font-size: 22px; }
  .pod.first .plinth { height: 70px; } .pod.second .plinth { height: 50px; } .pod.third .plinth { height: 38px; }
  .lb-row { grid-template-columns: 22px 36px minmax(0, 1fr) auto; gap: 10px; padding: 10px 12px; }
  .lb-row .avatar { width: 36px; height: 36px; }
  .lb-row .vv { font-size: 16px; }
  .lb-badges { grid-template-columns: 1fr; }
  .lb-stage.tv { padding: 16px 12px 28px; --s: 1; }
  .tv-bar { gap: 10px; margin-bottom: 18px; }
  .tv-logo { height: 28px; }
  .tv-exit { order: 2; }
  .tv-per { order: 3; flex-basis: 100%; font-size: 16px; }
  .lb-stage .tv-bar .switch { order: 4; flex-basis: 100%; }
  .lb-stage .tv-bar .switch button { flex: 1; justify-content: center; padding: 0 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .won-line { transition: none; transform: none; }
  .lcard.just-won, .pod.flash .ring-wrap, .lb-row.flash { animation: none; }
  .ring .arc { transition: none; }
}

/* Existing clients' quotes (the client's asks, 2 Dec 2026): Today's "kept apart" line, the rule's notice on Quotes. */
.feed-apart { margin: 4px 0 0; }
.feed-apart .link-btn { min-height: 40px; text-align: left; }
.apart-note > span { min-width: 0; }
.apart-h { margin: 14px 0 4px; font-size: 15px; }
/* The owner's phone (the client's asks, 2 Dec 2026): every control the owner taps is at least 40 px tall (and wide) at 390 px: the
   person button, the small buttons, the chips, the Board / List switch, Filters, and the links that stand on their own
   (a card's "See ..." link, Clear, a lead's customer, phone and email). tests/phone-check.mjs checks it. */
@media (max-width: 760px) {
  .band .me { width: 40px; height: 40px; }
  .btn.small { min-height: 40px; }
  .btn.small.icon-only { width: 40px; }
  .chip, .chip.scope, .switch button { height: 40px; }
  .switch button { min-width: 40px; justify-content: center; }
  :is(.card-head, .head-actions, .tb-foot, dd, .feed-apart) > :is(.link-btn, a[href]) { min-height: 40px; display: inline-flex; align-items: center; }
  /* ...and on every other page the owner opens (fix round 1): Reports' bar rows and the numbers in its tables (any
     table's link alone in a cell), the meeting's Edit icons and "Earlier meetings", the Rules page's product picker. */
  button.bar-row { min-height: 40px; }
  .tbl td > .link-btn { min-height: 40px; min-width: 40px; display: inline-flex; align-items: center; }
  .tbl:not(.stackable) td.r > .link-btn { justify-content: flex-end; }
  .act-row .side-r .icon-btn { width: 40px; height: 40px; }
  details.card > summary { min-height: 40px; }
  .selects select, .selects input { height: 40px; }
  /* A word link inside a sentence (My day's "booked for later: ...") is exempt, but gets a taller tap area that doesn't
     move the line. */
  p:not(.feed-apart) > .link-btn { padding-block: 8px; margin-block: -8px; }
  /* An on/off switch keeps its 48 x 28 look; a clear 6 px ring around it (no layout change) makes it 60 x 40 to tap. */
  .toggle, .tick input.toggle { box-sizing: content-box; width: 48px; height: 28px; border: 6px solid transparent; background-clip: padding-box; border-radius: 20px; margin: -6px; }
}
/* The demo fetch's sheet: a quote's line ("R 26,900 · Matched by phone") and its gaps pill wrap rather than being cut
   short. At every width on purpose: the 560 px sheet cut the long labels on desktop too. */
.fetch-rows .rowi .line { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
.fetch-rows .pill { height: auto; min-height: 26px; padding-block: 3px; white-space: normal; }
.fetch-rows .pill > span { overflow: visible; text-overflow: clip; }
