/* Layout: sticky toolbar (year · search · Latin) over a single working column of plant rows; status is a four-part bar echoing the old sheet colors (yellow needed, purple ordered, green received, gray planted). */
:root {
  --bg: #F2F4EF; --surface: #FFFFFF; --surface-2: #E8ECE5; --ink: #1D231F; --muted: #5E6A62; --line: #D3DAD0;
  --accent: #82287A; --accent-ink: #FFFFFF; --accent-soft: #F3E4F0;
  --need: #E2B12C; --need-soft: #FBF1CC; --ord: #8B68BF; --ord-soft: #ECE4F6; --rec: #2F6DB0; --rec-soft: #DEE9F6; --rec-fill: #6AA7EC; --inst: #3B9660; --inst-soft: #DDEFE3;
  --danger: #B3402F; --danger-soft: #F7E1DC;
  --f-display: "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif;
  --f-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --r: 10px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0D100E; --surface: #1B201C; --surface-2: #242A25; --ink: #E5EAE5; --muted: #9AA59D; --line: #323A34;
  --accent: #CF93C0; --accent-ink: #1D0F19; --accent-soft: #34232F;
  --need: #E0B43E; --need-soft: #3A3219; --ord: #A98BDA; --ord-soft: #2E2640; --rec: #72A8E2; --rec-soft: #1B2A3B; --rec-fill: #8CC2F5; --inst: #5CBA82; --inst-soft: #1C3226;
  --danger: #E58370; --danger-soft: #3D2320; color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #0D100E; --surface: #1B201C; --surface-2: #242A25; --ink: #E5EAE5; --muted: #9AA59D; --line: #323A34;
  --accent: #CF93C0; --accent-ink: #1D0F19; --accent-soft: #34232F;
  --need: #E0B43E; --need-soft: #3A3219; --ord: #A98BDA; --ord-soft: #2E2640; --rec: #72A8E2; --rec-soft: #1B2A3B; --rec-fill: #8CC2F5; --inst: #5CBA82; --inst-soft: #1C3226;
  --danger: #E58370; --danger-soft: #3D2320; color-scheme: dark; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { background: var(--bg); color: var(--ink); font: 15px/1.45 var(--f-body); }
html, body { touch-action: manipulation; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
/* iPhone date boxes: stop them overflowing their column and collapsing when empty */
input[type=date] { -webkit-appearance: none; appearance: none; min-width: 0; max-width: 100%; min-height: 40px; box-sizing: border-box; line-height: 1.45; }
input[type=date]::-webkit-date-and-time-value { text-align: left; min-height: 1.45em; margin: 0; }
input[type=date]::-webkit-calendar-picker-indicator { opacity: .7; }
/* iPhones zoom in when you tap a box with text under 16px; keeping them at 16px stops that */
@media (max-width: 720px) { input, select, textarea { font-size: 16px !important; } }
button, input, select, textarea { font: inherit; color: inherit; }
.num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.latin { font-style: italic; color: var(--muted); font-size: 13px; }
.muted { color: var(--muted); }
.wrap { max-width: 1040px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* Toolbar */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding-block: 12px 0; }
.brand { display: flex; align-items: baseline; gap: 8px; margin-right: auto; }
.brand b { font-family: var(--f-display); font-size: 22px; letter-spacing: -0.01em; color: var(--accent); }
.brand span { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.search { flex: 1 1 100%; min-width: 0; display: flex; gap: 8px; align-items: center; }
.search[hidden] { display: none; }
.search input { width: 100%; }
.tools { flex-wrap: nowrap !important; }
h2 .h-yr, h2 .h-sep { color: var(--muted); font-weight: 300; }
@media (max-width: 430px) { .head:has(.fl-btn ~ .btn.primary:not(.add-btn)) h2 :is(.h-yr, .h-sep) { display: none; } }
.tools #year { height: 38px; min-height: 0; padding-top: 0; padding-bottom: 0; line-height: 36px; }
.icon-btn { width: 38px; height: 38px; display: inline-grid; place-items: center; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; cursor: pointer; color: var(--ink); padding: 0; flex: none; }
.icon-btn:hover { border-color: var(--muted); }
.icon-btn[aria-expanded="true"], .icon-btn.on { background: var(--surface-2); border-color: var(--muted); }
.icon-btn.on { color: var(--accent); }
.icon-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.set-wrap { position: relative; }
.set-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 28px rgb(0 0 0 / .14); padding: 6px; display: grid; }
.set-pop[hidden] { display: none; }
.set-pop { max-height: min(440px, 70vh); overflow-y: auto; overscroll-behavior: contain; }
.btn.add-btn { width: calc(1.45em + 16px); height: calc(1.45em + 16px); padding: 0; display: inline-grid; place-items: center; }
.add-btn svg { display: block; }
.add-btn svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; fill: none; }
.add-pop { min-width: 160px; }
#q::-webkit-search-cancel-button { display: none; }
@media (max-width: 560px) { .brand span { display: none; } .top .wrap { flex-wrap: wrap; } .tools { gap: 6px; } }
.set-row { display: flex; align-items: center; gap: 8px; text-align: left; border: 0; background: none; padding: 10px; border-radius: 6px; font: inherit; font-size: 14px; color: var(--ink); cursor: pointer; }
.set-row:hover { background: var(--surface-2); }
.set-pop .switch { color: var(--ink); font-size: 14px; }
input[type=text], input[type=number], input[type=date], input[type=search], select, textarea {
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; min-width: 0; }
textarea { width: 100%; resize: vertical; min-height: 60px; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); cursor: pointer; user-select: none; }
.switch input { accent-color: var(--accent); width: 16px; height: 16px; }
.tabs { width: 100%; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; margin-top: 4px; }
.tab { border: 0; background: none; padding: 10px 14px; border-bottom: 2.5px solid transparent; color: var(--muted); font-weight: 500; cursor: pointer; white-space: nowrap; }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.tab .ct { font-family: var(--f-mono); font-size: 12px; margin-left: 4px; color: var(--muted); }

main { padding-block: 18px 80px; }
h2 { font-family: var(--f-display); font-size: 28px; margin: 0; letter-spacing: -0.01em; text-wrap: balance; }
h3 { font-family: var(--f-display); font-size: 18px; margin: 0; }
.head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 14px; }
.head .grow { margin-right: auto; }

.btn { border: 1px solid var(--line); background: var(--surface); padding: 7px 12px; border-radius: 8px; cursor: pointer; font-weight: 500; font-size: 14px; white-space: nowrap; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--accent); padding-inline: 8px; }
.btn.danger { color: var(--danger); }
.btn.armed { background: var(--danger); border-color: var(--danger); color: #fff; }

.btn:disabled { opacity: .5; cursor: default; }

/* Summary chips */
.chips { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; margin-bottom: 16px; }
.chip { text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r); padding: 10px 12px; cursor: pointer; display: grid; gap: 2px; }
.chip .n { font-family: var(--f-mono); font-size: 22px; font-weight: 500; }
.chip .l { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.chip[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.d-fence { background: var(--muted); } .d-need { background: var(--need); } .d-ord { background: var(--ord); } .d-rec { background: var(--rec-fill); } .d-inst { background: var(--inst); }
@media (max-width: 620px) { .chips { grid-template-columns: repeat(2, minmax(0,1fr)); } }

/* Status bar */
.bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--surface-2); min-width: 60px; }
.bar span { display: block; height: 100%; }
.bar .s-inst { background: var(--inst); } .bar .s-rec { background: var(--rec-fill); } .bar .s-ord { background: var(--ord); }
.bar .s-need { background: repeating-linear-gradient(135deg, var(--need) 0 3px, var(--need-soft) 3px 6px); }

/* Plant rows */
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.list > :last-child, .list > :last-child .prow-main { border-radius: 0 0 var(--r) var(--r); }
.sticky-h { position: sticky; top: var(--toph, 0px); z-index: 5; margin: -13px -1px 0; padding-top: 12px; background: var(--bg); }
.sticky-h > .b-head, .sticky-h > .bp-head { border: 1px solid var(--line); border-radius: var(--r) var(--r) 0 0; }
@media (max-width: 860px) { .b-table > .sticky-h { display: none; } }
@media (max-width: 720px) { .bp > .sticky-h { display: none; } }
.prow + .prow { border-top: 1px solid var(--line); }
.prow-main { width: 100%; border: 0; background: none; text-align: left; cursor: pointer; padding: 12px 14px;
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1.6fr) 56px; gap: 6px 14px; align-items: center; }
.prow-main:hover { background: var(--surface-2); }
.pname { min-width: 0; }
.pname b { font-weight: 600; }
.sizes { display: flex; flex-wrap: wrap; gap: 4px; justify-self: start; min-width: 0; }
.size-block { padding: 6px 0 4px; }
.size-block + .size-block { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; }
.size-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding-bottom: 4px; }
.size-acts, .row-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.size-acts { margin-left: auto; }
.arow { padding-left: 12px; }
.size.zas, .zas { font-style: italic; }
.size.zas { border-style: dashed; }
.size { font-family: var(--f-mono); font-size: 12px; border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px 2px; justify-self: start; white-space: nowrap; color: var(--muted); }
.counts { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--muted); }
.counts .c { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.counts .c b { font-family: var(--f-mono); font-weight: 500; color: var(--ink); }
@media (max-width: 720px) {
  .prow-main { grid-template-columns: minmax(0,1fr) auto; }
  .prow-main .bar { grid-column: 1 / -1; }
  .prow-main .counts, .prow-main .lst { grid-column: 1 / -1; }
}
.detail { background: var(--bg); border-top: 1px dashed var(--line); padding: 8px 14px 12px; }
.arow { display: grid; grid-template-columns: minmax(0, 2fr) minmax(80px, 1fr) auto; gap: 8px 14px; align-items: center; padding: 8px 0; }
.arow + .arow { border-top: 1px solid var(--line); }
.arow .who { min-width: 0; }
.arow .who small { display: block; color: var(--muted); font-size: 12.5px; }
.detail-foot { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 10px; }
@media (max-width: 560px) { .arow { grid-template-columns: minmax(0,1fr) auto; } .arow .bar { grid-column: 1 / -1; grid-row: 2; } }

/* Projects */
.clients { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.client-areas { display: contents; }
.client { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.client-h { display: flex; align-items: baseline; gap: 8px; }
.client-h h3 { margin-right: auto; min-width: 0; line-height: 20px; }
.cost-sum { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; }
.cost-sum .big { font-family: var(--f-mono); font-size: 30px; font-weight: 500; line-height: 1; }
.cost-list { display: grid; }
dialog.wide { width: min(980px, calc(100vw - 24px)); }
.cost-scroll { overflow-x: auto; margin: 0 -16px; padding: 0 16px; }
.cost-list.multi { min-width: calc(170px + var(--n) * 96px + 100px); }
.cost-list.multi .cost-row { grid-template-columns: minmax(150px,1fr) repeat(var(--n), 84px) 92px; }
.cost-row .ac { text-align: right; font-family: var(--f-mono); white-space: nowrap; font-size: 14px; }
.cost-row .ac small { display: block; color: var(--muted); font-size: 12px; }
.cost-row .ac.nil { color: var(--muted); }
.cost-row.cost-head { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 6px 0; border-top: 0; align-items: end; }
.cost-head .ac, .cost-head .amt { font-family: var(--f-body); font-size: 12px; white-space: normal; overflow-wrap: anywhere; }
.cost-row.cost-tot { font-weight: 600; background: var(--surface-2); margin: 0 -8px; padding: 10px 8px; border-radius: 8px; border-top: 0; }
.cost-row.cost-tot + .cost-row { border-top: 0; }
@media (max-width: 560px) { .cost-list.multi { min-width: calc(130px + var(--n) * 80px + 90px); } .cost-list.multi .cost-row { grid-template-columns: minmax(124px,1fr) repeat(var(--n), 72px) 82px; } }
.cost-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 6px 12px; padding: 10px 0; border-top: 1px solid var(--line); align-items: center; }
.cost-row .nm { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; min-width: 0; }
.cost-row .amt { text-align: right; font-family: var(--f-mono); white-space: nowrap; }
.cost-row .amt small { display: block; color: var(--muted); font-size: 12px; }
.cost-row select { grid-column: 1 / -1; width: 100%; font-size: 13.5px; padding-top: 6px; padding-bottom: 6px; }
.cost-row .src { grid-column: 1 / -1; font-size: 12.5px; color: var(--muted); margin-top: -2px; }
.cost-row.missing .amt { color: var(--need-ink, var(--muted)); }
.cost-row.part { padding-left: 14px; border-left: 2px solid var(--line); }
.cost-row .src .lnk, .lnk { border: 0; background: none; padding: 0; color: var(--accent); font: inherit; cursor: pointer; }
.cost-row .cf-x { font-size: 12.5px; padding: 0 4px; }
.cost-form { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.3fr) 110px auto auto; gap: 8px; align-items: center; padding: 8px; background: var(--surface-2); border-radius: 8px; }
.cost-form.sz { grid-template-columns: minmax(0,1fr) 110px auto auto; }
.cost-form input { width: 100%; }
@media (max-width: 560px) { .cost-form, .cost-form.sz { grid-template-columns: 1fr 1fr; } .cost-form .btn { justify-self: start; } }
.area-btn { width: 100%; text-align: left; border: 1px solid var(--line); background: var(--bg); border-radius: 8px; padding: 10px; cursor: pointer; display: grid; gap: 7px; }
.area-btn:hover { border-color: var(--muted); }
.area-btn { grid-template-columns: minmax(0,1fr) auto; gap: 4px 12px; align-items: center; }
.area-btn .t { display: flex; align-items: baseline; gap: 8px; align-self: end; }
.area-btn > .muted { grid-column: 1; align-self: start; }
.area-btn .ring { grid-column: 2; grid-row: 1 / span 2; }
.ring-key { grid-column: 1; display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 12.5px; color: var(--muted); }
.ring-key > span { display: inline-flex; align-items: baseline; gap: 5px; min-width: 0; }
.ring-key > span > .dot { flex: none; align-self: center; }
.area-btn .ring { grid-row: 1 / span 3; }
.ring { position: relative; width: 52px; height: 52px; display: inline-grid; place-items: center; flex: none; }
.ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 6; }
.ring .r-bg { stroke: color-mix(in srgb, var(--line) 70%, var(--surface-2)); } .ring .s-inst { stroke-linecap: round; } .ring .s-inst { stroke: var(--inst); } .ring .s-rec { stroke: var(--rec-fill); } .ring .s-ord { stroke: var(--ord); } .ring .s-need { stroke: var(--need); }
.ring .pct { position: relative; font-size: 11.5px; font-weight: 600; }
.area-btn .t b { font-weight: 600; }
.pct { font-family: var(--f-mono); font-size: 13px; }
.tag { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; padding: 1px 6px 2px; border-radius: 4px; background: var(--surface-2); color: var(--muted); }

/* Orders & stock */
.section-label { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 18px 0 8px; display: flex; gap: 8px; align-items: center; }
.ocard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px 14px; }
.ocard + .ocard { margin-top: 8px; }
.ocard .meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted); }
.ocard .meta b { color: var(--ink); font-weight: 500; }
.ocard .alloc { grid-column: 1 / -1; font-size: 13px; color: var(--muted); }
.ocard .acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: start; justify-content: end; }
.status { font-size: 12px; font-weight: 600; padding: 2px 8px 3px; border-radius: 999px; white-space: nowrap; }
.st-inst { background: var(--inst-soft); color: var(--inst); }
.st-ord { background: var(--ord-soft); color: var(--ord); } .st-rec { background: var(--rec-soft); color: var(--rec); }
.st-warn { background: var(--need-soft); color: var(--ink); } .st-bad { background: var(--danger-soft); color: var(--danger); }
@media (max-width: 560px) { .ocard { grid-template-columns: minmax(0,1fr); } .ocard .acts { justify-content: start; } }
@media (max-width: 560px) { .ocard.pcard { grid-template-columns: minmax(0,1fr) auto; } .ocard.pcard .acts { justify-content: end; } }

/* Species table */
.tbl-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 500; }
tbody tr { cursor: pointer; } tbody tr:hover { background: var(--surface-2); }
tbody tr:last-child td { border-bottom: 0; }

.pills { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.pill { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 12px; font-size: 13.5px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.pill[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 7px; margin: -2px 0 18px; }
.summary .big { font-size: 19px; font-weight: 700; line-height: 1; }
.summary .pills { margin-left: auto; }
.fl-desk { display: contents; }
.summary .fl-status { display: contents; }
.sec-h .sec-sum { margin: 0; }
.sec-h .sec-dot { color: var(--muted); font-weight: 300; font-size: 18px; margin: 0 -2px; }
/* Installations: Filters button + panel on every width (other tabs still show filters inline on desktop) */
.fl-btn.fl-all { display: inline-flex; align-items: center; }
.fl-panel.fl-all { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 28px; padding: 12px 14px; margin: -4px 0 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.fl-panel.fl-all .fl-g { display: grid; gap: 6px; }
.fl-panel.fl-all .lnk { font-size: 13.5px; }
.fl-panel.fl-all > .fl-g:not(:has(.lbl)), .fl-panel.fl-all > .lnk { min-height: 32px; display: flex; align-items: center; }
.fl-btn, .fl-panel { display: none; }
@media (max-width: 720px) { .hide-m { display: none !important; } }
.fl-n { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 11.5px; font-weight: 600; margin-left: 4px; }
@media (max-width: 720px) {
  .fl-desk, .summary .fl-status { display: none; }
  .sec-h .sec-dot { display: none; }
  .fl-panel.fl-all { display: grid; gap: 12px; padding: 12px; }
  .fl-panel.fl-all .lnk { justify-self: start; }
  .fl-panel.fl-all > .fl-g:not(:has(.lbl)), .fl-panel.fl-all > .lnk { min-height: 0; }
  .sec-h:not(.sec-fut) { margin-top: 12px; }
  .sec-h h3 { order: 1; }  .sec-h .sec-sum { order: 3; flex-basis: 100%; margin: 0; }
  .fl-btn { display: inline-flex; align-items: center; }
  .head:has(.fl-btn) { gap: 8px; flex-wrap: nowrap; } .head:has(.fl-btn) h2 { white-space: nowrap; }
  .head h2 { font-size: 25px; }
  .fl-panel { display: grid; gap: 12px; padding: 12px; margin: -4px 0 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
  .fl-g { display: grid; gap: 6px; }
  .fl-panel .lnk { justify-self: start; font-size: 13.5px; }
}
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 12px; align-items: start; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 6px 14px 8px; min-width: 0; }
.card-h { display: flex; align-items: baseline; gap: 10px; padding: 8px 0 6px; border-bottom: 1px solid var(--line); }
.card-t { border: 0; background: none; padding: 0; font-family: var(--f-display); font-size: 17px; font-weight: 600; text-align: left; margin-right: auto; min-width: 0; }
button.card-t:hover { color: var(--accent); }
.lrow { display: flex; align-items: center; gap: 8px; }
.lrow + .lrow { border-top: 1px solid var(--line); }
.lrow-main { flex: 1; min-width: 0; border: 0; background: none; text-align: left; cursor: pointer; padding: 9px 0; display: grid; grid-template-columns: minmax(0,1fr) auto; grid-template-areas: "n c" "s c"; gap: 2px 10px; align-items: center; }
.lrow-main:hover .lname { color: var(--accent); }
.lname { grid-area: n; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.lname .latin { width: 100%; }
.lname .size { line-height: 15px; padding: 1px 6px; margin-block: -2px; }
.lst { grid-area: s; display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 12.5px; color: var(--muted); }
.lst .st { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.lcount { grid-area: c; font-size: 18px; font-weight: 500; }
.prow-main .lst { grid-area: auto; }
.prow-main .lcount { grid-area: auto; text-align: right; }
.plant-btn { padding: 6px 10px; font-size: 13px; }
.more-rows { height: 0; overflow: hidden; opacity: 0; transition: height .6s ease, opacity 0s linear .6s; }
.more-rows.open { height: auto; opacity: 1; transition: height .6s ease, opacity .6s ease; }
.more-rows > div > .lrow:first-child { border-top: 1px solid var(--line); }
@media (prefers-reduced-motion: reduce) { .more-rows { transition: none; } }
.show-more { display: block; width: 100%; padding: 10px 0 2px; border-top: 1px solid var(--line) !important; font-size: 14px; text-align: center; }
.icon-btn.caret { width: 34px; height: 34px; border-color: transparent; background: none; }
.icon-btn.caret:hover { border-color: var(--line); }
.icon-btn.caret svg { transition: transform .2s ease; }
.icon-btn.caret[aria-expanded="true"] { background: none; }
.icon-btn.caret[aria-expanded="true"] svg { transform: rotate(180deg); }
.caret-sp { width: 34px; flex: none; }
.pcard .acts { flex-wrap: nowrap; align-items: center; align-self: start; gap: 4px; }
.pcard .pc-areas { grid-column: 1 / -1; }
.pcard { padding-right: 8px; }
.pcard .pc-areas[hidden] { display: none; }
.pcard.tap { cursor: pointer; } .pcard.tap:hover { border-color: var(--muted); }
.st-sec { margin-top: 28px; } .st-sec:first-of-type { margin-top: 0; }
.st-stick { position: sticky; top: var(--toph, 0px); z-index: 4; background: var(--bg); padding-top: 8px; }
.st-stick .stock-sec { margin: 0 0 12px; }
.st-stick .st-head { border: 1px solid var(--line); border-radius: var(--r) var(--r) 0 0; }
.stbl { background: var(--surface); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--r) var(--r); overflow: clip; }
.st-sec.xo { --st-a: 60px; }
.st-row { display: grid; grid-template-columns: minmax(0,1fr) 64px 64px var(--st-a, 96px); gap: 4px 10px; align-items: center; padding: 8px 8px 8px 14px; }
.st-sec.xo .st-row { grid-template-columns: minmax(0,1fr) 64px var(--st-a); }
.st-row + .st-row { border-top: 1px solid var(--line); }
.st-head { padding-block: 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 500; background: var(--surface-2); }
.st-n { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; min-width: 0; }
.st-c { text-align: right; }
.st-row > .st-c.num { font-size: 15px; }
.st-x { color: var(--inst); font-weight: 600; } .st-0 { color: var(--muted); }
.st-row .acts { display: flex; gap: 4px; align-items: center; justify-content: end; align-self: center; }
.st-row .pc-areas { grid-column: 1 / -1; padding-bottom: 4px; }
.st-row .pc-areas[hidden] { display: none; }
.st-row.tap { cursor: pointer; } .st-row.tap:hover { background: var(--surface-2); }
@media (max-width: 560px) { .st-sec { --st-a: 80px; } .st-sec.xo { --st-a: 50px; } .st-row { grid-template-columns: minmax(0,1fr) 40px 42px var(--st-a); gap: 4px 6px; padding-left: 12px; padding-right: 6px; } .st-row .acts { gap: 0; } .st-row .acts .btn { padding: 6px 9px; font-size: 13.5px; min-height: 0; } .st-row .icon-btn.caret { width: 30px; } .st-row .caret-sp { width: 30px; } .st-sec.xo .st-row { grid-template-columns: minmax(0,1fr) 44px var(--st-a); } .st-head { font-size: 11px; letter-spacing: .03em; } }
.pmenu { display: grid; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.pmenu-i { display: grid; gap: 2px; text-align: left; border: 0; background: var(--surface); padding: 12px 14px; cursor: pointer; font: inherit; color: inherit; }
.pmenu-i + .pmenu-i { border-top: 1px solid var(--line); }
.pmenu-i:hover { background: var(--surface-2); }
.pmenu-i span { font-size: 13px; }
.lrow.multi > .row-btns { align-self: flex-start; margin-top: 9px; }
.row-btns { display: flex; flex-direction: column; gap: 4px; align-items: stretch; flex: none; }
.lrow.task .lname { font-weight: 500; }
.pm-list { display: grid; border: 1px solid var(--line); border-radius: 8px; }
.pm-row { display: grid; grid-template-columns: minmax(0,1fr) auto auto auto; gap: 10px; align-items: center; padding: 10px 12px; }
.pm-row + .pm-row { border-top: 1px solid var(--line); }
.pm-t { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; min-width: 0; }
.pm-t small { width: 100%; font-size: 12.5px; }
.pm-stp { grid-template-columns: 36px 60px 36px; }
.pm-more { font-size: 13px; }
.pm-new { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 6px; }
.pm-new select, .pm-new input { width: 100%; }
.pm-new .pm-a { grid-column: 1; grid-row: 1; } .pm-new .pm-z { grid-column: 2; grid-row: 1; }
.pm-new .pm-an { grid-column: 1 / -1; grid-row: 2; }
@media (max-width: 520px) { .pm-row { grid-template-columns: minmax(0,1fr) auto; } .pm-all { grid-column: 1; justify-self: start; } .pm-more { grid-column: 2; justify-self: end; } }
.detail .lrow { padding-left: 12px; }
.stepper { display: inline-grid; grid-template-columns: 40px 76px 40px; }
.stepper .btn { padding: 8px 0; font-size: 18px; line-height: 1; }
.stepper .btn:first-child { border-radius: 8px 0 0 8px; } .stepper .btn:last-child { border-radius: 0 8px 8px 0; }
.stepper input { border-radius: 0; border-left: 0; border-right: 0; text-align: center; font-family: var(--f-mono); font-size: 16px; width: 100%; padding-inline: 4px; -moz-appearance: textfield; appearance: textfield; }
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
input[type=number]::-webkit-outer-spin-button, input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ns-sec { display: grid; gap: 8px; border-top: 1px solid var(--line); padding-top: 14px; }
.ns-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ns-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.ns-sum { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.ns-sum .big { font-size: 28px; font-weight: 500; }
.pl-list { border: 1px solid var(--line); border-radius: 8px; max-height: 46dvh; overflow-y: auto; }
.pl-row { display: grid; grid-template-columns: minmax(0,1fr) 104px 72px 32px; gap: 8px; align-items: start; padding: 8px 10px; }
.pl-row + .pl-row { border-top: 1px solid var(--line); }
.pl-row input { width: 100%; }
.pl-row input[data-f="qty"] { text-align: right; font-family: var(--f-mono); }
.pl-name { display: grid; gap: 3px; min-width: 0; }
.pl-latin { font-style: italic; }
.pl-tag { font-size: 12px; color: var(--muted); }
.pl-tag.close { color: var(--ink); background: var(--need-soft); border-radius: 4px; padding: 0 6px 1px; justify-self: start; }
.pl-tag.new { color: var(--ord); }
.pl-row .x { margin-top: 4px; }
@media (max-width: 520px) { .pl-row { grid-template-columns: minmax(0,1fr) 72px 32px; } .pl-name { grid-column: 1 / -1; } }
/* shared by every custom dropdown: add class "sfade" to a scrolling list and its edges fade only while there's more to scroll that way */
.sfade.fade-b { -webkit-mask-image: linear-gradient(#000 calc(100% - 28px), transparent); mask-image: linear-gradient(#000 calc(100% - 28px), transparent); }
.sfade.fade-t { -webkit-mask-image: linear-gradient(transparent, #000 24px); mask-image: linear-gradient(transparent, #000 24px); }
.sfade.fade-t.fade-b { -webkit-mask-image: linear-gradient(transparent, #000 24px, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(transparent, #000 24px, #000 calc(100% - 28px), transparent); }
/* shared dropdown parts: a scrolling list (.dd-scroll) above a pinned action bar (.dd-foot > .dd-btn) */
.dd-scroll { flex: 0 1 auto; min-height: 0; overflow-y: auto; padding: 4px; overscroll-behavior: contain; }
.dd-foot { flex: none; border-top: 1px solid var(--line); padding: 4px; background: var(--surface); }
.dd-btn { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; border-radius: 6px; background: none; color: var(--accent); font: inherit; font-size: 13.5px; font-weight: 600; padding: 9px 10px; cursor: pointer; text-align: left; }
.dd-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.dd-btn.edit svg { stroke-width: 1.8; }
@media (hover: hover) { .dd-btn:hover { background: var(--accent-soft); color: color-mix(in srgb, var(--accent) 72%, var(--ink)); } }
.dd-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.combo { position: fixed; z-index: 200; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 28px rgb(0 0 0 / .16); overflow: hidden; display: flex; flex-direction: column; }
.combo-i { padding: 7px 10px; border-radius: 6px; cursor: pointer; display: flex; flex-direction: column; gap: 1px; font-size: 14px; }
.combo-i i { font-size: 12.5px; color: var(--muted); }
.combo-i:hover, .combo-i.act { background: var(--surface-2); }
.combo-i.cur { box-shadow: inset 3px 0 0 var(--accent); font-weight: 600; }
.combo-empty { padding: 8px 10px; font-size: 13px; color: var(--muted); }
.menu-wrap { position: relative; display: inline-block; }
.menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 28px rgb(0 0 0 / .14); padding: 4px; display: grid; min-width: 200px; }
.menu button { border: 0; background: none; text-align: left; padding: 9px 12px; border-radius: 6px; cursor: pointer; font-size: 14px; white-space: nowrap; }
.menu button:hover { background: var(--surface-2); }
.cl-last { font-weight: 300; color: var(--muted); }
.pp { display: grid; gap: 6px; }
.pp-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) 34px; gap: 6px; align-items: center; }
.pp-x { width: 34px; height: 34px; border-color: transparent; background: none; } .pp-x:hover { border-color: var(--line); }
.pp-x[hidden] { display: inline-flex !important; visibility: hidden; }
.pp-foot { display: flex; align-items: baseline; gap: 12px; font-size: 13.5px; } .pp-full { margin-left: auto; text-align: right; font-weight: 600; color: var(--ink); } .pp-full:not(:empty)::before { content: "Full name: "; font-weight: 400; color: var(--muted); }
.cm-name { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 10px; align-items: center; }
.cm-2 { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(0,1fr); gap: 8px; }
.cm-top { display: flex; align-items: center; gap: 10px; } .cm-top input { flex: 1; min-width: 0; } .cm-top #cm-sum { flex: 0 1 auto; max-width: 45%; }
.cm-list { border: 1px solid var(--line); border-radius: 8px; max-height: max(220px, calc(100dvh - 300px)); overflow-y: auto; }
.dlg-b:has(.cm-new:not([hidden])) .cm-list { max-height: max(220px, calc(100dvh - 490px)); }
.cm-new { display: grid; gap: 8px; padding: 12px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); }
.cm-new { position: relative; } .cm-new[hidden] { display: none; }
.cm-new-h { display: flex; justify-content: space-between; align-items: baseline; } .cm-new-h .lnk { font-size: 13.5px; }
.cm-new .pp-row { margin-right: 108px; }
.cm-new #cm-add { position: absolute; right: 12px; top: 41px; }
.cm-new .pp-row:not(:has(.pp-x:not([hidden]))) { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
.cm-new .pp-row:not(:has(.pp-x:not([hidden]))) .pp-x { display: none !important; }
.cm-row { display: grid; gap: 8px; padding: 12px; transition: background-color .4s; } .cm-row.flash { background: var(--need-soft); } .cm-row + .cm-row { border-top: 1px solid var(--line); }
.cm-row textarea { min-height: 0; font-size: 13.5px; }
.cm-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; min-height: 30px; flex-wrap: wrap; }
.cm-acts { display: flex; gap: 4px; margin-left: auto; } .cm-acts .btn { font-size: 13px; padding: 5px 10px; }
.cm-merge { display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 8px; align-items: center; width: 100%; padding: 8px; background: var(--surface-2); border-radius: 8px; }
.cm-merge small { grid-column: 1 / -1; font-size: 12.5px; }
.dup-warn { display: grid; gap: 10px; padding: 12px; border-radius: 8px; background: var(--need-soft); font-size: 14px; } .dup-warn > div { display: flex; flex-wrap: wrap; gap: 8px; }
.lm-list { border: 1px solid var(--line); border-radius: 8px; max-height: 50dvh; overflow-y: auto; }
.lm-row.sz { grid-template-columns: minmax(0,1fr) 150px 52px auto auto; }
.pr-card { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: grid; gap: 10px; background: var(--surface); }
.pr-card h4 { margin: 0; font-family: var(--f-display); font-size: 17px; display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.pr-card h4 small { font-family: var(--f-body); font-weight: 400; font-size: 12.5px; color: var(--muted); }
.pr-steps { display: grid; gap: 6px; }
.pr-step { display: grid; grid-template-columns: minmax(0,1fr) 84px auto minmax(0,1.2fr) 32px; gap: 6px; align-items: center; }
.pr-step input, .pr-step select, .pr-tax input, .pr-tax select { width: 100%; }
.pr-step .pct, .pr-tax .pct { text-align: right; font-family: var(--f-mono); }
.pr-tax { display: grid; grid-template-columns: minmax(0,1fr) 84px auto minmax(0,1.2fr) 32px; gap: 6px; align-items: center; }
.pr-ex { font-size: 13px; background: var(--surface-2); border-radius: 8px; padding: 8px 10px; font-family: var(--f-mono); line-height: 1.6; }
.pr-ex b { font-weight: 600; }
.pr-card textarea { min-height: 76px; font-size: 13.5px; }
@media (max-width: 560px) { .pr-step, .pr-tax { grid-template-columns: 1fr 72px auto; } .pr-step select, .pr-tax select { grid-column: 1 / 3; } }
.lm-min { display: inline-flex; align-items: center; gap: 5px; }
.lm-row .lm-min input { width: 62px; text-align: right; font-family: var(--f-mono); }
.lm-min small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.lm-row { display: grid; grid-template-columns: minmax(0,1fr) auto auto auto; gap: 8px; align-items: center; padding: 6px 8px; }
.lm-row + .lm-row { border-top: 1px solid var(--line); }
.lm-row input { width: 100%; }
.lm-row .lm-min input { width: 62px; }
@media (max-width: 560px) {
  .lm-row.sz { grid-template-columns: minmax(0,1fr) auto auto; row-gap: 6px; padding: 10px; }
  .lm-row.sz > input[type=text] { grid-column: 1 / -1; }
  .lm-row.sz .lm-min { justify-self: start; }
}
.linkish { border: 0; background: none; padding: 0; color: var(--accent); cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; font-size: 15px; }
.b-top { display: grid; grid-template-columns: 170px 220px auto minmax(0,1fr); gap: 12px; margin-bottom: 14px; align-items: end; }
.cl-wrap { position: relative; min-width: 0; max-width: 340px; }
.cl-btn { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); cursor: pointer; text-align: left; }
.cl-btn span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-btn.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.cl-btn svg { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cl-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
@media (hover: hover) { .cl-btn:hover { border-color: var(--muted); } .cl-btn.on:hover { border-color: var(--accent); } .cl-row:hover { background: var(--surface-2); } }
.cl-pop { position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; width: min(360px, calc(100vw - 32px)); max-height: min(460px, 70vh); overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 28px rgb(0 0 0 / .14); display: flex; flex-direction: column; }
.cl-scroll { flex: 0 1 auto; min-height: 0; overflow-y: auto; padding: 6px; display: grid; overscroll-behavior: contain; }
.cl-row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 6px; cursor: pointer; font-size: 14px; }
.cl-wrap .cl-row input[type=checkbox] { accent-color: var(--accent); width: 17px; height: 17px; min-width: 0; min-height: 0; flex: none; margin: 0; padding: 0; }
.cl-row .cl-n { margin-right: auto; min-width: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cl-row .muted { font-size: 12.5px; white-space: nowrap; }
.cl-gh { font-weight: 600; }
.cl-grp { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
.cl-grp .cl-mh { padding: 6px 10px 3px 22px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.cl-grp .cl-mh input[type=checkbox] { width: 15px !important; height: 15px !important; }
.cl-grp .cl-c { padding: 4px 10px 4px 46px; }
.cl-none { padding: 10px; font-size: 13.5px; }
.cl-foot { flex: none; display: flex; justify-content: flex-end; border-top: 1px solid var(--line); padding: 8px 10px; background: var(--surface); }
.b-hid { font-size: 13px; margin-right: auto; }
@media (max-width: 560px) { .b-bar:has(.b-hid) { flex-wrap: wrap; row-gap: 6px; } .b-hid { flex-basis: 100%; } }
.b-table { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }

.b-row { display: grid; grid-template-columns: minmax(0,2fr) minmax(0,3.6fr); gap: 8px 14px; align-items: start; padding: 10px 12px; }
.b-row + .b-row { border-top: 1px solid var(--line); }
.b-lines { display: grid; gap: 6px; min-width: 0; }
.b-line { display: grid; grid-template-columns: 64px 104px 60px 72px 72px minmax(90px,1fr) 56px 32px; gap: 6px; align-items: center; }
.b-line input { width: 100%; padding: 6px 8px; min-width: 0; }
.b-line input[type=number], .b-line input[data-b="per"] { text-align: right; font-family: var(--f-mono); }
.b-line input:disabled { background: var(--surface-2); opacity: .5; }
.b-plant { min-width: 0; display: grid; gap: 5px; }
.b-plant .bp-where { margin-bottom: 2px; }
.b-plant input { width: 100%; }
.b-need { text-align: right; }
.btn.b-addsize { justify-self: start; font-size: 13px; padding: 2px 0; }
.b-foot { grid-column: 1 / -1; display: flex; justify-content: center; margin-top: -4px; }
.b-line .b-note { grid-column: 2 / -1; width: 100%; }
.btn.b-notebtn { font-size: 13px; padding: 2px 0; white-space: nowrap; }
.btn.b-notebtn.on { color: var(--muted); }
.b-head { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--surface-2); padding-block: 8px; }
.b-head .b-line div:first-child { text-align: right; white-space: nowrap; }
.b-empty { padding: 18px 12px; }
.b-bar { position: sticky; bottom: 0; margin-top: 14px; padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px)); background: var(--bg); border-top: 1px solid var(--line); display: flex; justify-content: flex-end; align-items: center; gap: 14px; }
@media (min-width: 861px) { .b-line input:not(.b-note)::placeholder { color: transparent; } }
@media (max-width: 860px) {
  .b-top { grid-template-columns: minmax(0,1fr) minmax(0,1fr); } .b-top p { grid-column: 1 / -1; }
  .b-top .cl-wrap { grid-column: 1 / -1; max-width: none; }
  .b-head { display: none; }
  .b-row { grid-template-columns: minmax(0,1fr); }
  .b-line { grid-template-columns: repeat(4, minmax(0,1fr)) 32px; background: var(--bg); border-radius: 8px; padding: 6px; }
  .b-line .b-need { grid-column: 5; grid-row: 1; }
  .b-line input[data-b="size"] { grid-column: 1 / 3; grid-row: 1; } .b-line input[data-b="nursery"] { grid-column: 3 / 5; grid-row: 1; }
  .b-line input[data-b="trays"] { grid-column: 1; grid-row: 2; } .b-line input[data-b="per"] { grid-column: 2; grid-row: 2; } .b-line input[data-b="qty"] { grid-column: 3 / 5; grid-row: 2; }
  .b-line > .x, .b-line > .b-rmph { grid-column: 5; grid-row: 2; }
  .b-line .b-notebtn { grid-column: 1 / 3; grid-row: 3; justify-self: start; }
  .b-line .b-note { grid-column: 1 / -1; grid-row: 4; }
}
.bp-head { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,2fr) 76px 76px; gap: 12px; padding: 8px 14px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--surface-2); }
.bp-head .num { text-align: right; }
.prow-main.bp-row { grid-template-columns: minmax(0,1.2fr) minmax(0,2fr) 76px 76px; align-items: start; gap: 12px; }
.bp-name { display: grid; gap: 4px; min-width: 0; }
.bp-mob { display: none; font-size: 12.5px; color: var(--muted); }
.bp-where { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.wchip { display: inline-block; font-size: 12.5px; line-height: 1.55; background: var(--surface-2); border-radius: 5px; padding: 2px 7px; max-width: 100%; min-width: 0; overflow-wrap: break-word; }
.wchip .wc-t { display: inline; }
.wchip > .sub.sub { display: inline-block; white-space: nowrap; margin-left: 5px; vertical-align: 1px; }
.wchip b { font-weight: 700; font-size: 13.5px; color: var(--ink); }
.wchip i.res { font-style: normal; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--rec); margin-left: 2px; }
.wchip .sub { display: block; line-height: 1.35; font-size: 11.5px; border-radius: 4px; padding: 0 5px 1px; font-weight: 600; }
.wchip .sub.ord { background: var(--ord-soft); color: color-mix(in srgb, var(--ord) 80%, var(--ink)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ord) 35%, transparent); }
.wchip .sub.have { background: var(--rec-soft); color: color-mix(in srgb, var(--rec) 80%, var(--ink)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rec) 35%, transparent); }
.wchip .chk { width: 12.6px; height: 12.6px; vertical-align: -1.5px; margin-left: 3px; }
.wchip .chk circle { fill: var(--inst); }
.wchip .chk path { fill: none; stroke: var(--surface); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.wchip.need { background: var(--need-soft); }
.wchip.ord { background: var(--ord-soft); }
.wchip.done, .wchip.have { color: var(--ink); }
.wchip.done b { color: color-mix(in srgb, var(--inst) 80%, var(--ink)); }
.wchip.have b { color: color-mix(in srgb, var(--rec) 80%, var(--ink)); }
.wchip.need b { color: color-mix(in srgb, var(--need) 50%, var(--ink)); }
.wchip.ord b { color: color-mix(in srgb, var(--ord) 80%, var(--ink)); }
.wchip.have { background: var(--rec-soft); color: var(--rec); }
.wchip i { color: var(--muted); font-style: normal; }
.wchip i.zas { color: inherit; font-style: italic; }
.wchip.done { background: var(--inst-soft); color: var(--inst); }
.bp-n { text-align: right; font-size: 17px; }
.prow-main.bp-row .lcount { grid-area: auto; }
@media (max-width: 720px) { .bp-head { display: none; } .prow-main.bp-row { grid-template-columns: minmax(0,1fr); } .bp-row .bp-n { display: none; } .bp-row .bp-where { grid-column: 1 / -1; grid-row: 2; } }
.sp-lines { display: grid; gap: 8px; }
.sp-line { display: grid; grid-template-columns: minmax(0,1fr) 120px 32px; gap: 8px; align-items: center; }
.sp-line input { width: 100%; }
.sp-line.sp3 { grid-template-columns: minmax(0,1fr) 96px 96px 32px; }
.sp-hd { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: -8px; }
.pr-lines { display: grid; gap: 8px; }
.pr-head, .pr-line { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.3fr) 104px 32px; gap: 8px; align-items: center; }
.pr-head { font-size: 12px; color: var(--muted); font-weight: 600; }
.pr-line input { width: 100%; }
.pr-cost { position: relative; }
.pr-cost::before { content: "$"; position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); font-family: var(--f-mono); pointer-events: none; }
.pr-cost input { padding-left: 22px; text-align: right; font-family: var(--f-mono); }
.pr-list { display: grid; gap: 2px; font-size: 13px; white-space: nowrap; }
.pr-list .num { font-weight: 500; }
@media (max-width: 520px) { .pr-head { display: none; } .pr-line { grid-template-columns: minmax(0,1fr) 96px 32px; } .pr-line .pr-nu { grid-column: 1 / 3; grid-row: 2; } }
.sp-qty { text-align: right; font-family: var(--f-mono); }
.hero { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 28px; margin-bottom: 16px; }
.hero > div:first-child { display: grid; gap: 2px; }
.hero-n { font-size: 46px; font-weight: 500; line-height: 1; color: var(--ink); }
.hero-s { display: flex; flex-wrap: wrap; gap: 6px 20px; color: var(--muted); padding-bottom: 4px; }
.hero-s b { color: var(--ink); font-weight: 500; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; margin-bottom: 12px; min-width: 0; }
.panel-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 10px; }
.panel-h h3 { margin-right: auto; font-size: 16px; }
.chart-wrap { position: relative; overflow-x: auto; }
.chart { width: 100%; min-width: 600px; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .ax { fill: var(--muted); font-size: 11px; font-family: var(--f-mono); }
.chart .val { fill: var(--ink); font-size: 12px; font-family: var(--f-mono); font-weight: 500; }
.chart .bar { fill: var(--inst); }
.chart .bar-g:hover .bar { fill: color-mix(in srgb, var(--inst) 80%, var(--ink)); }
.tip { position: absolute; pointer-events: none; background: var(--ink); color: var(--bg); font-size: 12.5px; padding: 4px 8px; border-radius: 6px; white-space: nowrap; }
.tbl-toggle { margin-top: 8px; font-size: 13px; color: var(--muted); }
.tbl-toggle table { width: auto; margin-top: 6px; }
.tbl-toggle td { padding: 3px 14px 3px 0; border: 0; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 12px; }
.hlist { display: grid; gap: 6px; }
.hrow { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(40px, 1fr) 52px; gap: 10px; align-items: center; font-size: 13.5px; }
.hl { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hl .hl-lat { display: block; overflow: hidden; text-overflow: ellipsis; font-size: 12px; line-height: 1.25; }
.hb { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.hb span { display: block; height: 100%; background: var(--inst); border-radius: 4px; }
.hv { text-align: right; }
.ship { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 20px; }
.ship-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--ord-soft); border-radius: var(--r) var(--r) 0 0; }
.ship.rec .ship-h { background: var(--rec-soft); }
.ship-h > div { display: grid; gap: 0; margin-right: auto; min-width: 0; }
.ship-h h3 { font-size: 18px; }
.ship-h .muted { font-size: 13px; }
.ship-i { display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 6px 14px; align-items: center; padding: 8px 14px; }
.ship-i + .ship-i { border-top: 1px solid var(--line); }
.ship-n { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; min-width: 0; }
.ship-q { font-size: 15px; text-align: right; }
.ship-a { display: flex; gap: 4px; }
@media (max-width: 560px) { .ship-i { grid-template-columns: minmax(0,1fr) auto; } .ship-a { grid-column: 1 / -1; } }
.card-areas { display: flex; flex-wrap: wrap; gap: 2px 10px; padding: 3px 10px; margin: 6px 0 2px; background: color-mix(in srgb, var(--surface-2) 75%, var(--surface)); border-radius: 6px; }
.card-areas:empty { display: none; }
.card-h .card-meta { font-size: 13.5px; }
.card-top { display: flex; align-items: baseline; gap: 8px; min-width: 0; margin-right: auto; }
.card-n { font-family: var(--f-display); font-size: 17px; font-weight: 400; /* Regular (was rendering Light before 400 was loaded) */ color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }
.crow .card-top .card-t { flex: none; font-weight: 700; }
.an { display: inline-flex; align-items: center; gap: 6px; }
.card-n .an { margin-left: 8px; }
.card-n .an + .an { margin-left: 18px; }
.an-no { display: inline-grid; place-items: center; flex: none; width: 19px; height: 19px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink); font-family: var(--f-mono); font-size: 11px; font-weight: 600; line-height: 1; }
.card-n .an-no { width: 18px; height: 18px; font-size: 10.5px; }
/* several areas: the dot stays beside the name and the numbered list wraps as its own block, so every line starts at the same edge */
.card-n.multi { display: inline-flex; align-items: flex-start; align-self: center; white-space: normal; overflow: visible; gap: 8px; }
.card-n.multi .an-list { display: flex; flex-wrap: wrap; gap: 4px 18px; min-width: 0; }
.card-n.multi .an, .card-n.multi .an + .an { margin-left: 0; }
.card-n.multi .an { white-space: nowrap; }
.crow .card-top { gap: 6px; }
.cards.rows { grid-template-columns: minmax(0, 1fr); gap: 8px; }
/* plant table in an expanded client row (desktop only) */
.ptab { display: none; margin-top: 4px; }
.ptab { grid-template-columns: var(--cols); column-gap: 22px; }
.pt-r, .pt-grp { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; }
.pt-r { align-items: center; padding: 7px 0; min-height: 46px; }
.pt-grp::after { grid-column: 1 / -1; }
.pt-sec { grid-column: 1 / -1; }
.pt-r + .pt-r { border-top: 1px solid color-mix(in srgb, var(--line) 55%, transparent); }
.pt-r.pt-first:not(:first-child + .pt-r) { border-top-color: var(--line); }
.pt-h { min-height: 0; height: 34px; box-sizing: border-box; padding: 0; margin: 0; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
  position: sticky; top: calc(var(--toph, 0px) + 40px); z-index: 3; }
.pt-h::before { content: ""; position: absolute; inset: 0 -14px; z-index: -1; background: color-mix(in srgb, var(--surface-2) 55%, var(--surface)); border-bottom: 1px solid var(--line); }
.pt-h + .pt-r { border-top: 0; }
.pt-c { display: flex; align-items: center; justify-content: flex-end; gap: 5px; white-space: nowrap; }
.pt-p { min-width: 0; display: grid; }
.pt-p .latin { font-size: 12.5px; }
.pt-n { text-align: right; font-family: var(--f-mono); font-variant-numeric: tabular-nums; font-size: 14px; white-space: nowrap; }
.pt-n small { display: block; font-family: var(--f-body); font-size: 11.5px; color: var(--muted); }
.pt-n.need { color: var(--ink); }
.pt-left { font-weight: 600; font-size: 15px; }
/* section headings stick under the column names (desktop) or under the toolbar (phones) */
.pt-sec, .l-sec { display: flex; align-items: baseline; gap: 10px; padding: 8px 14px; margin: 0 -14px; border-bottom: 1px solid var(--line);
  position: sticky; z-index: 2; background: color-mix(in srgb, var(--surface-2) 70%, var(--line)); }
.pt-sec { top: var(--toph, 0px); height: 40px; box-sizing: border-box; padding-block: 0; align-items: center; }
.l-sec { top: var(--toph, 0px); }
/* the space between sections is a block at the end of the group above (inside it, unlike padding), so its sticky heading stays until the next one meets it (no gap while scrolling) */
.pt-grp:has(+ .pt-grp)::after, .l-grp:has(+ .l-grp)::after { content: ""; display: block; height: 14px; }
.pt-grp + .pt-grp > .pt-sec, .l-grp + .l-grp > .l-sec { border-top: 1px solid var(--line); }
.pt-sec h4, .l-sec h4 { margin: 0; font-family: var(--f-display); font-size: 16px; font-weight: 600; }
.pt-sec .muted, .l-sec .muted { font-size: 13px; }
.pt-sec + .pt-r { border-top: 0; }
.prows-m > .l-grp:first-child > .l-sec { margin-top: 6px; border-top: 1px solid var(--line); }
.l-sec + .lrow { border-top: 0; }
.pt-n .chk { width: 16px; height: 16px; vertical-align: -3px; }
.pt-n .chk circle { fill: var(--inst); } .pt-n .chk path { fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pt-0 { color: var(--muted); opacity: .6; }
.pt-a { display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: 4px; }
.pt-a .btn { white-space: nowrap; padding-inline: 8px; }
.pt-p, .pt-r .pt-link { overflow-wrap: anywhere; }
.pt-link { border: 0; background: none; padding: 0; font: inherit; color: var(--ink); text-align: left; cursor: pointer; min-width: 0; }
@media (hover: hover) { .pt-link:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; } .pt-link.pt-sz:hover { text-decoration: none; } .pt-link.pt-sz:hover .size { border-color: var(--accent); color: var(--accent); } }
@media (min-width: 861px) { .crow .ptab { display: grid; } .crow .prows-m { display: none; } }
.crow { padding: 0 14px; }
.crow .card-h { cursor: pointer; padding: 12px 14px; margin: 0 -14px; border-bottom: 0; align-items: center; border-radius: calc(var(--r) - 1px); transition: background-color .12s; }
.crow.open .card-h { border-radius: calc(var(--r) - 1px) calc(var(--r) - 1px) 0 0; }
.crow.open .card-h { border-bottom: 1px solid var(--line); }
.crow.open .card-h:has(+ .card-areas:not(:empty)) { border-bottom: 0; }
.crow.open { padding-bottom: 8px; }
/* open row: same gap above the name, between the name and the action bar, and below the action bar */
/* open client row: actions are real buttons (outlined, icon + label), evenly spaced under the name */
.crow .card-areas { margin: 2px 0 16px; background: none !important; border: 0; padding: 0; gap: 8px; align-items: center; }
.crow .card-areas .btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font-size: 13.5px; font-weight: 500; text-decoration: none !important; white-space: nowrap; }
@media (max-width: 560px) { .crow .card-areas { flex-wrap: nowrap; } .crow .card-areas .ab-v { display: none; } .crow .card-areas .btn { padding: 0 10px; } }
.crow .card-areas .btn .ab-i { width: 16px; height: 16px; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.crow .card-areas .btn .dd-car { margin-left: 0; vertical-align: 0; color: var(--muted); }
@media (hover: hover) { .crow .card-areas .btn:hover { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); color: var(--accent); } }
.crow .card-areas .btn[aria-expanded="true"] { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.crow .card-areas + .ptab, .crow .card-areas ~ .ptab { margin-top: 0; }
.crow .prows-m > .l-grp:first-child > .l-sec { margin-top: 0; }
/* desktop: counts line up as right-aligned columns down the list */
@media (min-width: 561px) {
  /* only the counts a client actually has, right-aligned; the time estimate keeps a fixed slot at the end so it lines up */
  .crow .card-meta { display: flex; justify-content: flex-end; align-items: baseline; gap: 22px; }
  .crow .card-meta .mp-sep { display: none; }
  .crow .card-meta .mp-t { min-width: 78px; text-align: right; }
}
.crow .row-car { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.crow.open .row-car { transform: rotate(180deg); }
@media (hover: hover) { .crow .card-h:hover { background: color-mix(in srgb, var(--accent-soft) 70%, var(--surface)); } .crow .card-h:hover .card-t { color: var(--accent); } .crow .card-h:hover .row-car { stroke: var(--accent); } }
.mo-h { display: flex; align-items: baseline; gap: 8px; margin: 22px 0 8px; }
.mo-h:first-of-type { margin-top: 2px; }
.mo-h h4 { margin: 0; font-size: 14.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.mo-h .muted { font-size: 13.5px; }
.card-top .card-t { margin-right: 0; }
.mo-pill { flex: none; font-size: 12px; font-weight: 600; line-height: 1; padding: 4px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.card-meta .mp { white-space: nowrap; }
@media (max-width: 560px) {
  .card-h { flex-direction: column; align-items: stretch; gap: 1px; padding-bottom: 8px; }
  .crow .card-h { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; row-gap: 1px; padding: 12px 14px 14px; }
  .crow .card-h .card-top { grid-column: 1; grid-row: 1; justify-content: flex-start; flex-wrap: wrap; row-gap: 3px; }
  .card-n.multi { flex-basis: 100%; white-space: normal; overflow: visible; font-size: 15.5px; margin-top: -2px; margin-bottom: 6px; }
  .card-n.multi .an-list { gap: 3px 16px; }
  .card-n.multi .cn-dot { display: none; }
  .card-n.multi .an, .card-n.multi .an + .an { margin-left: 0; }
  .crow .card-h .card-meta { grid-column: 1; grid-row: 2; }
  .crow .card-h .row-car { grid-column: 2; grid-row: 1 / 3; align-self: center; }
  .card-top { margin-right: 0; justify-content: space-between; }
  .card-h .card-meta { font-size: 13px; }
}
.sec-h { display: flex; align-items: baseline; gap: 6px 10px; flex-wrap: wrap; margin: 4px 0 12px; }
.sec-fut { border-top: 1px solid var(--line); padding-top: 32px; margin-top: 34px; }
.sec-h .sec-tog { margin-left: 8px; padding: 0 2px; font-size: 15px; line-height: inherit; align-self: baseline; }
.sec-h .tog-m { display: none; }
@media (max-width: 720px) { .sec-h .tog-d { display: none; } .sec-h .tog-m { display: inline-block; order: 2; margin-left: auto; padding: 0; } }
@media (hover: hover) { .sec-h .sec-tog:hover { text-decoration: underline; text-underline-offset: 3px; } }
.sec-empty { padding: 14px 16px; border: 1px dashed var(--line); border-radius: var(--r); background: var(--surface); font-size: 14px; }
.set-pop.pop-left { left: 0; right: auto; }
.card-areas .dd-car { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; margin-left: 2px; }
.card-areas .set-pop .set-row { font-size: 14px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .card-areas { background: color-mix(in srgb, var(--surface-2) 65%, var(--line)); } }
:root[data-theme="dark"] .card-areas { background: color-mix(in srgb, var(--surface-2) 65%, var(--line)); }
.card-h:has(+ .card-areas:not(:empty)) { border-bottom: 0; }
.card-areas .btn { font-size: 12.5px; padding: 2px 0; }
.lrow.multi .lrow-main.as-div { cursor: default; grid-template-areas: "n c" "s c" "w w"; }
.lrow.multi .lrow-main.as-div:hover .lname { color: inherit; }
.lchips { grid-area: w; margin-top: 4px; margin-bottom: 3px; }
.wbtn { border: 0; background: none; padding: 0; cursor: pointer; font: inherit; color: inherit; border-radius: 5px; }
.wbtn:hover .wchip { box-shadow: inset 0 0 0 1px currentColor; }
.card-areas .ex-btn { margin-left: auto; font-weight: 600; }
.card-areas .ex-btn2 { font-weight: 600; }
@media (max-width: 720px) { .card-areas .ex-btn2 { margin-left: auto; } }
.af-x { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.af-x .switch { color: var(--ink); font-size: 14px; }
@media (max-width: 560px) { .af-x { flex-direction: column; align-items: flex-start; } }
.af-l { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; } .af-l select { width: auto; padding-top: 5px; padding-bottom: 5px; }
.af-in { display: inline-flex; align-items: center; gap: 6px; } .af-in input { width: 110px; text-align: right; font-family: var(--f-mono); } .af-in small { color: var(--muted); min-width: 34px; }
.ts-row .af-in small { min-width: 78px; }
.pm-fl { width: 100%; margin-top: 4px; color: var(--ink); }
.area-tasks { display: grid; gap: 6px; }
.est-btn { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.est-btn:hover { color: var(--accent); }
.tb-g { border: 1px solid var(--line); border-radius: 8px; }
.tb-h { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 12px; background: var(--surface-2); border-radius: 8px 8px 0 0; font-size: 14px; }
.tb-r { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--line); font-size: 14px; }
.tb-r small { display: block; font-size: 12.5px; }
.tb-miss .tb-h { background: var(--need-soft); }
.tb-3 { display: grid !important; grid-template-columns: minmax(0,1fr) 78px 78px; gap: 8px; align-items: center; }
.tb-3 > .num, .tb-cols > span { text-align: right; }
.tb-cols { padding: 0 12px; font-size: 12.5px; margin-bottom: -8px; }
.tb-tot { display: flex; gap: 28px; flex-wrap: wrap; }
.tb-tot > div { display: grid; gap: 2px; } .tb-tot .muted { font-size: 13px; } .tb-tot .big { font-family: var(--f-mono); font-size: 26px; font-weight: 500; line-height: 1.1; }
.tb-miss p { padding: 0 12px 10px; }
.area-sec { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 6px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.area-sec h4 { margin: 0; font-family: var(--f-display); font-size: 17px; }
.area-sec .muted { font-size: 13px; }
.ts-sec { display: grid; gap: 6px; } .ts-sec h4 { margin: 0; font-family: var(--f-display); font-size: 16px; } .ts-sec p { margin: 0; font-size: 13px; }
.ts-list { border: 1px solid var(--line); border-radius: 8px; }
.ts-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 10px; font-size: 14px; }
.ts-row + .ts-row { border-top: 1px solid var(--line); }
.ts-n { width: 84px !important; text-align: right; font-family: var(--f-mono); }
.ts-n::placeholder { color: var(--muted); opacity: .55; }
.ts-2 { display: grid !important; grid-template-columns: minmax(0,1fr) 84px 84px; gap: 8px; align-items: center; }
.ts-2 small { display: block; font-size: 12px; }
.ts-hd { padding: 6px 10px 0; font-size: 12px; color: var(--muted); } .ts-hd span { text-align: right; }
.ts-2.ts-g { grid-template-columns: 26px minmax(0,1fr) 84px 84px; padding-left: 4px; }
.ts-hd.ts-g { padding-left: 4px; }
.ts-grip { width: 26px; height: 34px; display: grid; place-items: center; border: 0; background: none; padding: 0; color: var(--muted); cursor: grab; touch-action: none; border-radius: 6px; }
.ts-grip svg, .ts-grip-i { width: 16px; height: 16px; fill: currentColor; }
.ts-grip-i { width: 14px; height: 14px; vertical-align: -2px; color: var(--muted); }
@media (hover: hover) { .ts-grip:hover { color: var(--ink); background: var(--surface-2); } }
.ts-row.drag { background: var(--surface-2); box-shadow: 0 4px 14px rgb(0 0 0 / .14); position: relative; z-index: 1; border-radius: 8px; }
.ts-row.drag .ts-grip { cursor: grabbing; color: var(--accent); }
@media (max-width: 420px) { .ts-2 { grid-template-columns: minmax(0,1fr) 70px 70px; } .ts-n { width: 70px !important; } }
.area-task { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }
.area-task.done .at-t { text-decoration: line-through; color: var(--muted); }
.bp-area { padding: 8px 12px; background: var(--surface-2); font-weight: 600; font-size: 13px; display: flex; justify-content: space-between; align-items: center; }
.bp-area + .pm-row, .pm-row + .bp-area { border-top: 1px solid var(--line); }
.bp-sub { padding: 6px 12px; font-size: 12px; font-weight: 600; color: var(--muted); border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface-2) 50%, transparent); }
.bp-sub + .pm-row { border-top: 1px solid var(--line); }
.pm-row .bp-on { width: 18px; height: 18px; accent-color: var(--accent); }
.pm-row.bp { grid-template-columns: 22px minmax(0,1fr) auto; }
.pm-row.bp:has(.bp-on:not(:checked)) .pm-t, .pm-row.bp:has(.bp-on:not(:checked)) .pm-stp { opacity: .45; }
@media (max-width: 520px) { .pm-row.bp { grid-template-columns: 22px minmax(0,1fr); } .pm-row.bp .pm-stp { grid-column: 2; justify-self: start; } }
.ex-list { border: 1px solid var(--line); border-radius: 8px; max-height: 52dvh; overflow-y: auto; }
.ex-row { display: grid; grid-template-columns: 22px minmax(0,1fr) auto 80px; gap: 10px; align-items: center; padding: 8px 10px; }
.ex-row .ex-q { grid-column: 4; grid-row: 1; }
.ex-row + .ex-row { border-top: 1px solid var(--line); }
.ex-row:has(.ex-on:not(:checked)) .ex-name, .ex-row:has(.ex-on:not(:checked)) .ex-q { opacity: .45; }
.ex-on { width: 18px; height: 18px; accent-color: var(--accent); }
.ex-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; min-width: 0; }
.ex-name small { width: 100%; font-size: 12.5px; }
.ex-name input { flex: 1 1 140px; }
.ex-q { width: 100%; text-align: right; font-family: var(--f-mono); }
.ex-row .ex-nb { grid-column: 3; grid-row: 1; font-size: 13px; white-space: nowrap; }
.ex-row .ex-note { grid-column: 2 / -1; width: 100%; font-size: 13.5px; padding: 6px 8px; }
.ex-gnote { white-space: pre-wrap; font-size: 14px; padding: 8px 10px; border-left: 3px solid var(--accent); background: var(--surface-2); border-radius: 0 6px 6px 0; margin-bottom: 12px; }
.ex-table td.ex-ncell { font-size: 13px; color: var(--muted); }
.ex-table tr.ex-grp td.ex-fh { text-align: right; font-size: 12px; color: var(--muted); }
.ex-areas { max-height: 56dvh; overflow-y: auto; display: grid; gap: 14px; border-radius: 8px; }
.ex-areas .ex-list { max-height: none; overflow: visible; }
.ex-area { display: grid; gap: 8px; } .ex-area[hidden] { display: none; }
.ex-ah { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 10px; background: var(--surface-2); border-radius: 8px; }
.ex-ah b { font-family: var(--f-display); font-size: 15.5px; color: var(--ink); } .ex-ah .switch { color: var(--ink); } .ex-ah .ex-acount { font-size: 12.5px; text-align: right; }
.ex-area.off .ex-list, .ex-area.off .ex-fp, .ex-area.off .ex-empty { opacity: .4; pointer-events: none; }
.ex-empty { margin: 0 4px; font-size: 13px; } .ex-empty[hidden] { display: none; }
.ex-ablk { font-family: var(--f-display); font-size: 16px; font-weight: 300; margin: 18px 0 8px; } .ex-ablk:first-of-type { margin-top: 4px; } .ex-ablk .muted { font-family: var(--f-body); font-size: 13px; font-weight: 400; }
.ex-eta { display: grid; gap: 0; font-size: 14px; line-height: 1.3; align-self: center; } .ex-eta .muted { font-size: 12.5px; } .ex-eta-n { font-size: 11.5px !important; }
.fence-ask { display: flex; align-items: baseline; gap: 12px; font-size: 13px; } .fence-ask .lnk { font-weight: 600; }
.ex-fp { display: grid; gap: 6px; } .ex-fp[hidden] { display: none; } .ex-frow .ex-q { grid-column: 4; }
.ex-fl { display: inline-flex; align-items: center; gap: 4px; } .ex-fsw { font-size: 13.5px; margin-right: 4px; white-space: nowrap; }
.ex-sheet { border: 1px solid var(--line); border-radius: 8px; padding: 14px; background: var(--surface); }
.ex-sheet-h { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; align-items: baseline; margin-bottom: 10px; }
.ex-sheet-h b { font-family: var(--f-display); font-size: 18px; }
.ex-table { width: 100%; border-collapse: collapse; font-size: 14px; table-layout: fixed; }
.ex-table td { overflow-wrap: anywhere; }
.ex-table th, .ex-table td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; cursor: default; }
.ex-table thead th { background: var(--surface-2); color: var(--ink); font-size: 12.5px; text-transform: none; letter-spacing: 0; font-weight: 600; }
.ex-table tbody tr:hover { background: none; }
.ex-table .num { text-align: right; font-family: var(--f-mono); }
.ex-table tfoot td { font-weight: 600; }
.ex-table + .ex-table { margin-top: 16px; }
.ex-table tbody tr:last-child td { border-bottom: 1px solid var(--line); }
.ex-total { margin: 12px 0 0; font-weight: 600; font-size: 14px; } .ex-total.ex-total-eta { margin-top: 4px; font-weight: 400; color: var(--muted); }
.ex-table tr.ex-grp td { background: var(--surface-2); font-weight: 600; font-size: 13px; padding-top: 8px; }
.ex-out { width: 100%; font-family: var(--f-mono); font-size: 13px; }
.stock-sec { display: flex; align-items: baseline; gap: 12px; margin: 36px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.stock-sec:first-of-type { margin-top: 8px; }
.stock-sec h3 { font-size: 22px; }
.empty { padding: 36px 18px; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r); }
.empty b { display: block; color: var(--ink); font-family: var(--f-display); font-size: 18px; margin-bottom: 4px; }

/* Dialog */
dialog { border: 1px solid var(--line); border-radius: 14px; padding: 0; width: min(620px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); background: var(--surface); color: var(--ink); }
dialog::backdrop { background: rgb(10 14 11 / .45); }
.dlg-h { position: sticky; top: 0; background: var(--surface); display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); z-index: 1; }
.dlg-h h3 { margin-right: auto; min-width: 0; }
.dlg-b { padding: 16px; display: grid; gap: 14px; }
.x { border: 0; background: var(--surface-2); width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 18px; line-height: 1; flex: none; }
@media (max-width: 560px) { dialog { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 14px 14px 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); } }
.field { display: grid; gap: 5px; min-width: 0; }
.field > label, .lbl { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.field input, .field select { width: 100%; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.row3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; align-items: end; }
@media (max-width: 480px) { .row2, .row3 { grid-template-columns: minmax(0,1fr); } }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; flex-wrap: wrap; }
.seg label { padding: 7px 12px; cursor: pointer; font-size: 14px; position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: var(--accent); color: var(--accent-ink); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; }
.alloc-list { border: 1px solid var(--line); border-radius: 8px; }
.alloc-item { display: grid; grid-template-columns: minmax(0,1fr) 84px; gap: 10px; align-items: center; padding: 8px 10px; }
.alloc-item + .alloc-item { border-top: 1px solid var(--line); }
.alloc-item small { display: block; color: var(--muted); font-size: 12.5px; }
.alloc-item input { width: 100%; text-align: right; }
.add-area { display: grid; grid-template-columns: minmax(0,1fr) 84px auto; gap: 8px; margin-top: 8px; }
.add-area select { min-width: 0; width: 100%; }
.add-area input { text-align: right; width: 100%; }
input[readonly] { background: var(--surface-2); }
.tally { font-size: 13.5px; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); }
.dlg-f { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; padding: 12px 16px 16px; border-top: 1px solid var(--line); position: sticky; bottom: 0; background: var(--surface); }
.dlg-f .left { margin-right: auto; }
.need-item { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: grid; gap: 8px; }
.need-top { display: flex; gap: 10px; align-items: start; }
.need-top .pname { margin-right: auto; }
.need-top .ar-ck { width: 18px; height: 18px; accent-color: var(--accent); margin-top: 2px; flex: none; }
.need-item.picked { border-color: var(--accent); }
.sel-bar ~ .need-item, .need-item:has(.ar-ck) { cursor: pointer; }
.sel-bar { position: sticky; top: -16px; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 10px; background: var(--surface-2); border-radius: 8px; }
.sel-bar .switch { color: var(--ink); font-size: 14px; }
.sel-acts { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.hist { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12.5px; }
.hist-chip { border: 0; cursor: pointer; font-size: 12.5px; background: var(--inst-soft); border-radius: 6px; padding: 3px 8px; }
.hist-chip:hover { background: var(--surface-2); }
.hist span { background: var(--inst-soft); border-radius: 6px; padding: 2px 4px 2px 8px; display: inline-flex; align-items: center; gap: 4px; }
.hist button { border: 0; background: none; cursor: pointer; color: var(--muted); padding: 0 4px; font-size: 14px; }
.hist button.armed { color: var(--danger); font-weight: 600; font-size: 12px; }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: 14px; z-index: 100; max-width: calc(100vw - 32px); box-shadow: 0 6px 24px rgb(0 0 0 / .2); }
.banner { background: var(--need-soft); border: 1px solid var(--need); border-radius: var(--r); padding: 10px 14px; font-size: 14px; margin-bottom: 14px; }
@media (prefers-reduced-motion: no-preference) { .prow-main, .chip, .btn, .area-btn { transition: background-color .12s, border-color .12s; } }
/* One dropdown look: native selects and type-ahead pickers share the same chevron */
select, input[data-combo] {
  -webkit-appearance: none; appearance: none; cursor: pointer;
  background-color: var(--surface);
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 52%, calc(100% - 12px) 52%;
  background-size: 5px 5px; background-repeat: no-repeat;
  padding-right: 32px; }
input[data-combo] { cursor: text; }
.b-line input[data-combo] { padding-right: 28px; background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%; }
.b-line input[data-combo]:disabled { background-image: none; }
select::-ms-expand { display: none; }
/* Hover states for everything you can click (only on devices with a real pointer, so phones don't get stuck highlights) */
@media (hover: hover) {
  .btn.primary:not(:disabled):hover { background: color-mix(in srgb, var(--accent) 68%, #000); border-color: color-mix(in srgb, var(--accent) 68%, #000); }
  :root[data-theme="dark"] .btn.primary:not(:disabled):hover { background: color-mix(in srgb, var(--accent) 84%, #000); border-color: color-mix(in srgb, var(--accent) 84%, #000); }
  .btn.ghost:not(:disabled):hover, .lnk:not(:disabled):hover, .linkish:hover { color: color-mix(in srgb, var(--accent) 75%, var(--ink)); text-decoration: underline; text-underline-offset: 3px; }
  .btn.danger:not(:disabled):hover { border-color: var(--danger); }
  .btn.ghost.danger:not(:disabled):hover { color: var(--danger); border-color: transparent; }
  .btn.armed:hover { background: color-mix(in srgb, var(--danger) 85%, #000); }
  .tab:not([aria-selected="true"]):hover { color: var(--ink); border-bottom-color: var(--line); }
  .pill:not([aria-pressed="true"]):hover { border-color: var(--muted); color: var(--ink); }
  .pill[aria-pressed="true"]:hover { background: color-mix(in srgb, var(--ink) 85%, var(--bg)); }
  .chip:not([aria-pressed="true"]):hover { border-color: var(--muted); }
  .x:hover { background: var(--line); }
  .seg label:not(:has(input:checked)):hover { background: var(--surface-2); }
  .switch:hover { color: var(--ink); }
  select:hover, input[data-combo]:hover { border-color: var(--muted); }
  .hist-chip:hover { box-shadow: inset 0 0 0 1px currentColor; }
}
@media (hover: hover) and (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.primary:not(:disabled):hover { background: color-mix(in srgb, var(--accent) 84%, #000); border-color: color-mix(in srgb, var(--accent) 84%, #000); } }
@media (prefers-reduced-motion: no-preference) { .tab, .pill, .x, .lnk, .seg label, .switch { transition: color .12s, background-color .12s, border-color .12s; } }
/* Apple-style continuous ("squircle") corners where the browser supports them; true circles and pills stay round */
@supports (corner-shape: squircle) {
  * { corner-shape: squircle; }
  .dot, .status, .pill, .fl-n, .x, input[type=checkbox], input[type=radio], .an-no, .mo-pill, .doc-spin, .pin, .pin::before, .pin-ghost, .pin-x, .pin-x::before, .pin-dot, .pin-chip { corner-shape: round; }
}
/* ---------- App shell: sidebar of Wild Plum tools beside the current tool ---------- */
:root { --side-w: 232px; --rail-w: 64px; }
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100dvh; }
:root.rail .shell { grid-template-columns: var(--rail-w) minmax(0, 1fr); }
.app { min-width: 0; }
.side { position: sticky; top: env(safe-area-inset-top, 0px); height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--line); z-index: 20; overflow: hidden; }
.side-h { display: flex; align-items: center; gap: 8px; padding: 14px 12px 10px 16px; min-height: 62px; }
.side-brand { font-family: var(--f-display); font-weight: 700; font-size: 20px; color: var(--accent); letter-spacing: -0.01em; margin-right: auto; white-space: nowrap; }
.side-brand small { display: block; font-family: var(--f-body); font-weight: 500; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.side-nav { flex: 1; overflow-y: auto; padding: 4px 8px; display: grid; align-content: start; gap: 2px; }
.side-lbl { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 14px 10px 4px; white-space: nowrap; }
.nav-i { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none; text-align: left; padding: 9px 10px; border-radius: 8px; color: var(--ink); font: inherit; font-size: 14.5px; font-weight: 500; cursor: pointer; white-space: nowrap; text-decoration: none; min-height: 40px; }
.nav-i svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; color: var(--muted); }
.nav-i .soon { font-style: normal; margin-left: auto; font-size: 11px; font-weight: 500; color: var(--muted); }
.nav-i[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.nav-i[aria-current="page"] svg { color: var(--accent); }
@media (hover: hover) { .nav-i:not([aria-current="page"]):hover { background: var(--surface-2); } }
.side-f { border-top: 1px solid var(--line); padding: 10px 8px 12px; display: grid; gap: 2px; }
.acct { display: flex; align-items: center; gap: 10px; padding: 8px 10px; min-width: 0; }
.acct .av { corner-shape: round; width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 13px; }
.acct .who { min-width: 0; line-height: 1.25; }
.acct .who b { display: block; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct .who small { display: block; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side .icon-btn { width: 34px; height: 34px; border-color: transparent; background: none; color: var(--muted); }
@media (hover: hover) { .side .icon-btn:hover { background: var(--surface-2); color: var(--ink); } }
/* Desktop: collapsed icon rail */
:root.rail .side-brand, :root.rail .side-lbl, :root.rail .nav-i span, :root.rail .nav-i .soon, :root.rail .acct .who { display: none; }
:root.rail .side-h { padding-inline: 0; justify-content: center; }
:root.rail .nav-i { justify-content: center; padding-inline: 0; }
:root.rail .acct { justify-content: center; padding-inline: 0; }
:root.rail #side-collapse svg { transform: scaleX(-1); }
.side-x, .scrim, #btn-menu { display: none; }
/* Phones and tablets: the sidebar becomes a drawer opened from the menu button */
@media (max-width: 899px) {
  .shell, :root.rail .shell { display: block; }
  #btn-menu { display: inline-grid; }
  #side-collapse { display: none; }
  .side-x { display: inline-grid; }
  .side { position: fixed; top: 0; right: 0; bottom: 0; height: auto; width: min(300px, 86vw); border-right: 0; border-left: 1px solid var(--line); transform: translateX(100%); visibility: hidden; transition: transform .22s ease, visibility 0s .22s; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); padding-right: env(safe-area-inset-right, 0px); box-shadow: -12px 0 32px rgb(0 0 0 / .18); }
  :root.menu-open .side { transform: none; visibility: visible; transition: transform .22s ease; }
  .scrim { display: block; position: fixed; inset: 0; background: rgb(0 0 0 / .35); z-index: 19; opacity: 0; pointer-events: none; transition: opacity .22s; }
  :root.menu-open .scrim { opacity: 1; pointer-events: auto; }
  :root.rail .side-brand, :root.rail .side-lbl, :root.rail .nav-i span, :root.rail .nav-i .soon, :root.rail .acct .who { display: revert; }
  :root.rail .nav-i { justify-content: flex-start; padding-inline: 10px; } :root.rail .acct { justify-content: flex-start; padding-inline: 10px; }
  :root.rail .side-h { padding: 14px 12px 10px 16px; justify-content: flex-start; }
  .nav-i { min-height: 46px; font-size: 15.5px; }
  /* Name and account sit at the top of the drawer on phones */
  .side { display: flex; } .side-f { order: -1; border-top: 0; border-bottom: 1px solid var(--line); padding-top: 0; }
  .side-h { order: -2; }
}
@media (prefers-reduced-motion: reduce) { .side, .scrim { transition: none !important; } }
/* Non-installation sections hide the Installations toolbar pieces */
:root:not([data-sec="installations"]) :is(#year, #btn-search, #tabs, #searchbar) { display: none !important; }
:root:not([data-sec="installations"]) .top .wrap { padding-bottom: 12px; }
.brand b { font-size: 22px; }
/* Playground notice */
.pg-note { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; background: var(--need-soft); color: var(--ink); font-size: 13px; padding-block: 7px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); border-bottom: 1px solid var(--line); }
.pg-note b { font-weight: 600; }
/* Section pages */
.sec-page { display: grid; gap: 18px; max-width: 760px; }
.set-grp { display: grid; gap: 8px; }
.set-grp > h3 { font-size: 15px; letter-spacing: .02em; }
.set-grp > p { margin: -4px 0 0; color: var(--muted); font-size: 13.5px; }
.set-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); display: grid; overflow: hidden; }
.set-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 10px 14px; border: 0; background: none; text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.set-item + .set-item { border-top: 1px solid var(--line); }
.set-item .t { flex: 1; min-width: 0; } .set-item .t small { display: block; color: var(--muted); font-size: 12.5px; }
.set-item > svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
@media (hover: hover) { button.set-item:hover { background: var(--surface-2); } }
.set-item input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent); }
.theme-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; flex: none; }
.theme-seg button { border: 0; background: var(--surface); padding: 7px 11px; font: inherit; font-size: 13.5px; color: var(--muted); cursor: pointer; }
.theme-seg button + button { border-left: 1px solid var(--line); }
.theme-seg button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.clients-page { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.clients-page .cm-list { max-height: none; }
.clients-page .dlg-f { position: static; border-radius: 0 0 var(--r) var(--r); }
.soon-card { padding: 40px 20px; text-align: center; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r); display: grid; justify-items: center; gap: 6px; }
.soon-card svg { width: 34px; height: 34px; fill: none; stroke: var(--accent); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 4px; }
.soon-card b { font-family: var(--f-display); font-size: 19px; font-weight: 600; }
.soon-card p { margin: 0; color: var(--muted); max-width: 40ch; }

/* ---------- Mileage Tracker ---------- */
#mtabs { display: none; }
:root[data-sec="mileage"] #mtabs { display: flex; }
:root[data-sec="mileage"] .top .wrap { padding-bottom: 0; }
:root[data-sec="mileage"] .tools #year { display: inline-block !important; }
.mi-page { display: grid; gap: 16px; }
.mi-sm { font-size: 13px; }
.mi-ink { color: var(--ink); }
.mi-lnk { border: 0; background: none; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.mi-lnk:hover { text-decoration-color: currentColor; }
.mi-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 24px; }
.mi-total { margin-right: auto; min-width: 0; }
.mi-big { display: flex; align-items: baseline; gap: 8px; }
.mi-big .num { font-size: 44px; font-weight: 500; line-height: 1.08; }
.mi-big .u { font-size: 18px; color: var(--muted); }
.mi-addbtn { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding-inline: 16px; font-size: 15px; }
.mi-addbtn svg, #dlg .btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; flex: none; }
#dlg .btn:has(svg) { display: inline-flex; align-items: center; gap: 6px; }
.mi-warn { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; background: var(--need-soft); border-radius: var(--r); padding: 10px 14px; font-size: 14px; }
.mi-warn > span { flex: 1 1 260px; min-width: 0; }
.mi-warn .btn { background: transparent; border-color: color-mix(in srgb, var(--need) 70%, var(--line)); }
.mi-wi { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.mi-month { display: grid; gap: 8px; }
.mi-mh { display: flex; align-items: baseline; gap: 12px; padding: 4px 2px 0; }
.mi-mh h3 { margin: 0 auto 0 0; font-family: var(--f-display); font-size: 21px; font-weight: 600; }
.mi-mh .muted { font-size: 13.5px; }
.mi-day { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.mi-dh { display: flex; align-items: baseline; gap: 10px; padding: 7px 14px; background: color-mix(in srgb, var(--surface-2) 45%, var(--surface)); border-bottom: 1px solid var(--line); font-size: 13.5px; }
.mi-dh b { font-weight: 600; margin-right: auto; }
.mi-trip { display: grid; grid-template-columns: minmax(0, 1fr) 100px 110px; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 8px 14px; border: 0; border-top: 1px solid var(--line); background: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.mi-trip:first-of-type { border-top: 0; }
.mi-dh + .mi-trip { border-top: 0; }
@media (hover: hover) { .mi-trip:hover { background: color-mix(in srgb, var(--accent-soft) 60%, var(--surface)); } .mi-trip:hover .mi-name { color: var(--accent); } }
.mi-tn { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mi-name { font-weight: 500; }
.mi-kind { font-size: 12px; color: var(--muted); margin-left: 8px; font-weight: 400; }
.mi-tt { font-size: 13.5px; color: var(--muted); }
.mi-tm { text-align: right; }
.mi-flag { justify-self: end; font: 500 12.5px var(--f-body); color: color-mix(in srgb, var(--need) 55%, var(--ink)); background: var(--need-soft); border: 0; border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
button.mi-flag { cursor: pointer; }
@media (max-width: 560px) {
  .mi-trip { grid-template-columns: minmax(0, 1fr) auto; row-gap: 0; }
  .mi-tt { grid-column: 1; grid-row: 2; font-size: 12.5px; }
  .mi-tm, .mi-trip .mi-flag { grid-column: 2; grid-row: 1 / 3; align-self: center; }
  .mi-big .num { font-size: 36px; }
}
/* season */
.mi-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.mi-stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: grid; gap: 2px; }
.mi-stat .n { font-size: 25px; font-weight: 500; line-height: 1.15; }
.mi-stat .n small { font-size: 14px; color: var(--muted); }
.mi-stat .l { font-size: 13px; color: var(--muted); }
.mi-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; min-width: 0; }
.mi-ch { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px; margin-bottom: 12px; }
.mi-ch h3 { margin: 0 auto 0 0; font-family: var(--f-display); font-size: 18px; font-weight: 600; }
.mi-ch .muted { font-size: 13px; }
.mi-chart { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; align-items: end; height: 226px; border-bottom: 1px solid var(--line); }
.mi-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; min-width: 0; }
.mi-cv { font-size: 11px; color: var(--muted); }
.mi-bar { width: 100%; max-width: 44px; background: color-mix(in srgb, var(--accent) 45%, var(--surface)); border-radius: 4px 4px 0 0; }
.mi-bar.top { background: var(--accent); }
.mi-chart-x { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; margin-top: 6px; font-size: 12px; color: var(--muted); text-align: center; }
@media (max-width: 560px) { .mi-cv { display: none; } .mi-chart-x span { font-size: 0; } .mi-chart-x span::first-letter { font-size: 12px; } }
.mi-vr { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(40px, 1fr) 48px 48px 78px; gap: 10px; align-items: center; padding: 7px 0; border-top: 1px solid color-mix(in srgb, var(--line) 60%, var(--surface)); font-size: 14px; }
.mi-vr > .num, .mi-vr > .mi-flag { text-align: right; justify-self: end; }
.mi-vh { border-top: 0; font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding-top: 0; }
.mi-vh span:nth-child(n+3) { text-align: right; }
.mi-vn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mi-vb { height: 9px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.mi-vb span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.mi-more { padding-top: 10px; border-top: 1px solid color-mix(in srgb, var(--line) 60%, var(--surface)); font-size: 14px; }
@media (max-width: 560px) { .mi-vr { grid-template-columns: minmax(0, 1fr) 40px 40px 64px; } .mi-vb { display: none; } .mi-vh span:nth-child(2) { display: none; } }
/* add trips */
.mi-add { display: flex; flex-wrap: wrap; }
.mi-paste { flex: 1 1 280px; max-width: 330px; padding: 16px; border-right: 1px solid var(--line); background: color-mix(in srgb, var(--surface-2) 35%, var(--surface)); display: grid; gap: 8px; align-content: start; }
.mi-paste p { margin: 0; font-size: 12.5px; }
.mi-pl { font-weight: 600; font-size: 14.5px; }
.mi-paste textarea { width: 100%; box-sizing: border-box; font-family: var(--f-mono); font-size: 12.5px; line-height: 1.5; resize: vertical; white-space: pre; padding: 10px 12px; min-height: 220px; }
.mi-pr { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.mi-pr .btn { margin-right: auto; }
.mi-paste > .btn { justify-self: start; margin-top: 6px; }
.mi-prev { flex: 999 1 460px; min-width: 0; padding: 16px; }
.mi-ph { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.mi-ph h4 { margin: 0 auto 0 0; font-size: 15px; }
.mi-ph .muted { font-size: 13.5px; }
.mi-empty { padding: 40px 12px; text-align: center; font-size: 14px; border: 1px dashed var(--line); border-radius: var(--r); margin-top: 8px; }
.mi-row { display: grid; grid-template-columns: 142px minmax(0, 1fr) 124px 66px 38px 38px; grid-template-areas: "date dest type mi dup rm"; gap: 6px; align-items: center; padding: 4px 0; }
.mi-row > input[type=date] { grid-area: date; } .mi-row > [data-f=dest], .mi-row > .mi-dd { grid-area: dest; } .mi-row > [data-f=type] { grid-area: type; } .mi-rm { grid-area: mi; } .mi-row [data-mi=dup] { grid-area: dup; } .mi-row [data-mi=rm] { grid-area: rm; }
.mi-row select, .mi-row input { min-width: 0; width: 100%; height: 38px; }
.mi-row .icon-btn { width: 38px; height: 38px; border-color: transparent; background: none; color: var(--muted); }
@media (hover: hover) { .mi-row .icon-btn:hover { background: var(--surface-2); color: var(--ink); } }
.mi-rh { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding-bottom: 0; }
.mi-row.mi-rh span:nth-child(4), .mi-rr.mi-rh span:nth-child(5) { text-align: right; }
.mi-rm { text-align: right; font-size: 13px; white-space: nowrap; }
.mi-rm.none { color: var(--muted); }
/* destination picker: a type-to-search field (chevron like the other dropdowns) over a shared dropdown list */
.mi-row input.mi-dd { -webkit-appearance: none; appearance: none; cursor: pointer; text-overflow: ellipsis; white-space: nowrap;
  background-color: var(--surface); background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 52%, calc(100% - 12px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
.mi-row input.mi-dd.open { cursor: text; color: var(--ink); border: 1px solid var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background-color: var(--surface);
  background-image: linear-gradient(135deg, transparent 50%, var(--muted) 50%), linear-gradient(45deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 52%, calc(100% - 12px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.mi-row:not(.amb) input.mi-dd.mi-multi:not(.open) { background-color: var(--need-soft); }
.mi-row input.mi-dd::placeholder { color: var(--muted); opacity: 1; }
.mi-row input.mi-dd.open::placeholder { color: var(--muted); }
@media (hover: hover) { .mi-row input.mi-dd:not(.open):not(.mi-multi):not(.mi-none):hover { border-color: var(--muted); } }
.mi-dl .dd-scroll { padding-top: 0; }
.mi-dl .mi-dg { display: flex; align-items: center; gap: 6px; padding: 10px 10px 4px; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.mi-dl .mi-dg + .combo-i { margin-top: 0; }
.mi-dl .mi-dg:not(:first-child) { border-top: 1px solid var(--surface-2); margin-top: 4px; }
.mi-dl .mi-dg span { font-weight: 400; letter-spacing: 0; text-transform: none; }
.mi-dl .mi-dg .dot { background: var(--need); width: 8px; height: 8px; }
.mi-dl .combo-i { flex-direction: row; align-items: center; gap: 10px; }
.mi-dl .combo-i .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mi-dl .combo-i .nm b { font-weight: 700; }
.mi-dl .combo-i .ls { color: var(--muted); }
.mi-dl .combo-i .ls b { color: var(--ink); }
.mi-dl .combo-i .mi { font-family: var(--f-mono); font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.mi-dl .combo-i .mi.nd { font-family: var(--f-body); font-style: italic; }
@media (max-width: 720px) { .mi-dl .combo-i { min-height: 44px; } .mi-dl .dd-btn { min-height: 44px; font-size: 14.5px; } }
dialog.wide.mi-wide { width: min(1160px, calc(100vw - 24px)); }
.mi-prev { container-type: inline-size; }
.mi-ds.mi-multi { border: 1.5px solid var(--need); background: var(--need-soft); }
.mi-ds.mi-none { border: 1.5px dashed var(--need); color: var(--muted); }
.mi-pday { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.mi-pdh { font-weight: 600; font-size: 14.5px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.mi-dw { font-weight: 500; font-size: 12.5px; color: color-mix(in srgb, var(--need) 55%, var(--ink)); display: inline-flex; align-items: center; gap: 4px; }
.mi-src { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 12.5px; color: var(--muted); margin: 10px 0 2px; }
.mi-src q { font-family: var(--f-mono); font-size: 12px; color: var(--ink); background: var(--surface-2); border-radius: 6px; padding: 2px 8px; quotes: none; overflow-wrap: anywhere; }
.mi-new { margin: 4px 0 8px; border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; background: color-mix(in srgb, var(--surface-2) 35%, var(--surface)); display: grid; gap: 10px; }
.mi-nh { display: flex; align-items: center; gap: 8px; } .mi-nh b { margin-right: auto; font-size: 14px; }
.mi-ng { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.mi-once { display: flex; align-items: flex-start; gap: 8px; font-size: 13.5px; cursor: pointer; }
.mi-once input { accent-color: var(--accent); width: 16px; height: 16px; margin: 2px 0 0; flex: none; }
.mi-ot { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; padding: 1px 6px 2px; border-radius: 4px; background: var(--surface-2); color: var(--muted); margin-left: 6px; vertical-align: 1px; white-space: nowrap; }
.mi-nf { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; } .mi-nf .muted { font-size: 12.5px; flex: 1 1 220px; }
.mi-need { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: color-mix(in srgb, var(--need) 55%, var(--ink)); }
@media (max-width: 640px) {
  .mi-paste { max-width: none; border-right: 0; border-bottom: 1px solid var(--line); }
  .mi-paste textarea { min-height: 150px; }
  .mi-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto 38px 38px; grid-template-areas: "dest dest dest dest dest" "date type mi dup rm"; padding: 8px 0; border-bottom: 1px dashed var(--line); }
  .mi-rh { display: none; }
  .mi-ng { grid-template-columns: minmax(0, 1fr); }
}
@container (max-width: 680px) {
  .mi-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto 38px 38px; grid-template-areas: "dest dest dest dest dest" "date type mi dup rm"; padding: 8px 0; border-bottom: 1px dashed var(--line); }
  .mi-rh { display: none; }
}
/* rates + destinations */
.mi-rt-wrap { overflow-x: auto; }
.mi-rr { display: grid; grid-template-columns: 148px 148px 104px minmax(140px, 1fr) 54px 38px; gap: 8px; align-items: center; padding: 5px 0; min-width: 640px; }
.mi-rr > .num { text-align: right; font-size: 13px; }
.mi-rr .icon-btn, .mi-dr .icon-btn { width: 38px; height: 38px; border-color: transparent; background: none; color: var(--muted); }
.mi-rr input, .mi-dr input, .mi-dr select { width: 100%; min-width: 0; height: 38px; box-sizing: border-box; }
.mi-cents { position: relative; display: block; }
.mi-cents input { padding-right: 40px; font-family: var(--f-mono); }
.mi-cents span { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--muted); pointer-events: none; }
.mi-info { background: color-mix(in srgb, var(--surface-2) 45%, var(--surface)); border-radius: var(--r); padding: 10px 12px; font-size: 13.5px; color: var(--muted); }
.mi-info b { color: var(--ink); }
.mi-dtop { display: flex; gap: 8px; } .mi-dtop input { flex: 1; min-width: 0; }
#mi-dl { overflow-x: auto; }
.mi-dr { display: grid; grid-template-columns: minmax(150px, 1.3fr) 112px 92px minmax(140px, 1fr) 38px; gap: 8px; align-items: center; padding: 5px 0; border-top: 1px solid color-mix(in srgb, var(--line) 60%, var(--surface)); min-width: 600px; }
.mi-dr.mi-rh { border-top: 0; }
.mi-dn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14.5px; }
.mi-dr > .mi-kind { margin-left: 0; }
/* shared client form (Clients page + Mileage Tracker) */
.cf { display: grid; gap: 8px; }
.cf textarea { min-height: 0; font-size: 13.5px; }
.cm-mi input { max-width: 140px; font-family: var(--f-mono); }
.cm-new .pp-row { margin-right: 0 !important; }
.cm-new #cm-add { position: static !important; justify-self: end; }
.mi-new .cf { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.mi-nh { flex-wrap: wrap; }
.mi-kseg { margin-right: auto; }
.mi-kseg label { padding: 6px 12px; font-size: 13.5px; }
.mi-dr.flash { background: var(--need-soft); transition: background-color .4s; }
#mi-dnew:empty { display: none; }
.mi-chk { display: flex; align-items: center; gap: 8px; margin-top: 8px; color: var(--ink); cursor: pointer; }
.mi-chk input { width: 18px; height: 18px; accent-color: var(--accent); }
dialog.mi-cf { width: min(480px, calc(100vw - 24px)); }
.mi-cfr { display: grid; gap: 2px; font-size: 14px; }
.mi-cfr span { color: var(--muted); font-size: 13.5px; }
.clients-page .dlg-b:has(.cm-new:not([hidden])) .cm-list { max-height: none; }
/* every section uses the same content width as Installations (the .wrap column) */
.sec-page { max-width: none; }
/* unmatched preview rows */
.mi-row.unm, .mi-row.amb { border-radius: 8px; padding: 6px 8px; margin: 2px -8px; }
.mi-row.unm { background: var(--danger-soft); }
.mi-row.amb { background: var(--need-soft); }
.mi-row.unm .mi-ds, .mi-row.amb .mi-ds { border: 2px solid; font-weight: 600; background-color: var(--surface); }
.mi-row.unm .mi-ds { border-color: var(--danger); color: var(--danger); }
.mi-row.amb .mi-ds { border-color: color-mix(in srgb, var(--need) 80%, var(--ink)); color: color-mix(in srgb, var(--need) 45%, var(--ink)); }
.mi-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; border-radius: 999px; padding: 2px 10px 2px 8px; }
.mi-badge.none { background: var(--danger); color: #fff; }
.mi-badge.amb { background: var(--need-soft); color: color-mix(in srgb, var(--need) 45%, var(--ink)); border: 1px solid color-mix(in srgb, var(--need) 60%, transparent); }
.mi-badge.close { background: var(--surface-2); color: var(--muted); font-weight: 500; }
.mi-badge .mi-wi { width: 15px; height: 15px; vertical-align: 0; }
@media (max-width: 640px) { .mi-row.unm, .mi-row.amb { border-bottom: 0; } }
/* possible duplicates */
.mi-row.dupr { background: var(--need-soft); border-radius: 8px; padding: 6px 8px; margin: 2px -8px; }
.mi-badge.dupb { background: var(--need-soft); color: color-mix(in srgb, var(--need) 45%, var(--ink)); border: 1px solid color-mix(in srgb, var(--need) 60%, transparent); }
.mi-rmg { font-size: 13px; padding: 2px 6px; min-height: 0; }
.mi-need { flex-wrap: wrap; gap: 4px 14px; }
.mi-need > span { display: inline-flex; align-items: center; gap: 6px; }
/* ---------- Herbicide Tracker ----------
   Applications tab: Scheduled (Overdue / This week / Next week / Later, one block per day, Morning/Afternoon when a day has 2+ sprays or a set time),
   To Schedule (no date, custom order), Completed (by month). Rows share one layout; phones stack client / site / hours · notes / series tag. */
#htabs { display: none; }
:root[data-sec="herbicide"] #htabs { display: flex; }
:root[data-sec="herbicide"] .top .wrap { padding-bottom: 0; }
:root[data-sec="herbicide"] .tools #year { display: inline-block !important; }
.hb-page { display: grid; gap: 24px; padding-bottom: 24px; }
.hb-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 24px; }
.hb-tot { margin-right: auto; min-width: 0; }
.hb-big { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.hb-big .num { font-size: 44px; font-weight: 500; line-height: 1.08; }
.hb-big .u { font-size: 18px; color: var(--muted); }
.hb-sm { font-size: 14px; color: var(--muted); }
.hb-addbtn { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding-inline: 16px; font-size: 15px; }
.hb-addbtn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; flex: none; }
.hb-sec { display: grid; gap: 10px; }
.hb-sh { display: flex; align-items: baseline; gap: 10px; padding: 6px 2px 2px; }
.hb-sh h2 { font-family: var(--f-display); font-size: 26px; font-weight: 600; margin: 0; letter-spacing: -0.01em; }
.hb-sh .nd { font-size: 14px; color: var(--muted); }
.hb-sh .cnt { margin-left: auto; font-size: 13.5px; color: var(--muted); }
.hb-groups { display: grid; gap: 16px; }
.hb-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.hb-gh { display: flex; align-items: baseline; gap: 10px; padding: 9px 14px; background: color-mix(in srgb, var(--surface-2) 70%, var(--line)); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink); font-weight: 600; }
.hb-gh span { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 12.5px; color: var(--muted); }
.hb-gh.late { color: var(--danger); }
.hb-none { padding: 18px 16px; color: var(--muted); font-size: 14px; }
.hb-done-sec { border-top: 1px solid var(--line); padding-top: 42px; margin-top: 20px; }
.hb-mh { display: flex; align-items: baseline; gap: 12px; padding: 4px 2px 0; }
.hb-mh + .hb-card { margin-top: -2px; }
.hb-mh:not(:first-of-type) { margin-top: 8px; }
.hb-mh h3 { font-family: var(--f-display); font-size: 19px; font-weight: 600; margin: 0 auto 0 0; }
.hb-mh span { font-size: 13.5px; color: var(--muted); }

/* one day: date on the left, its sprays (and Morning / Afternoon) on the right */
.hb-day { display: grid; grid-template-columns: 86px minmax(0, 1fr); column-gap: 16px; padding-left: 14px; border-top: 1px solid var(--line); }
.hb-gh + .hb-day { border-top: 0; }
.hb-d { display: grid; gap: 2px; justify-items: start; align-content: start; padding-top: 14px; min-width: 0; }
.hb-d b { font-family: var(--f-mono); font-weight: 500; font-size: 15px; white-space: nowrap; }
.hb-d .wd { font-size: 13px; color: var(--muted); }
.hb-late { font-size: 12px; font-weight: 500; border-radius: 999px; padding: 1px 8px; white-space: nowrap; background: var(--danger-soft); color: var(--danger); }
.hb-late .sh { display: none; }
.hb-dayb { min-width: 0; }
.hb-part { display: flex; align-items: baseline; gap: 6px; padding: 12px 14px 0 0; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; color: var(--ink); }
.hb-part span { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 12.5px; color: var(--muted); }
.hb-part ~ .hb-part { border-top: 1px solid var(--line); }
.hb-empty { display: none; margin: 6px 14px 14px 0; padding: 10px 12px; border-radius: 8px; background: var(--bg); color: var(--muted); font-size: 13.5px; }
.hb-list:not(:has(> .hb-row)) > .hb-empty { display: block; }

/* a spray row */
.hb-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "c a" "x x"; column-gap: 16px; align-items: center; padding: 14px 14px 14px 0; border-top: 1px solid var(--line); transition: background-color .2s ease, box-shadow .2s ease; }
/* zero-width purple edge when closed, so it slides in and out with the background instead of popping */
.hb-row { box-shadow: inset 0 0 0 var(--accent); }
.hb-list > .hb-row:first-child { border-top: 0; }
.hb-day .hb-row { border-top: 0; margin-left: -14px; padding-left: 14px; }
.hb-day .hb-row + .hb-row::before { content: ""; position: absolute; top: 0; left: 14px; right: 0; border-top: 1px solid var(--line); }
.hb-part + .hb-list > .hb-row:first-child { padding-top: 6px; }
.hb-row.wd { grid-template-columns: 86px minmax(0, 1fr) auto; grid-template-areas: "d c a" "d x x"; padding: 12px 8px 12px 14px; }
.hb-row.wd > .hb-d { grid-area: d; padding-top: 1px; align-self: start; }
.hb-row.ud { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "c l a" "x x x"; padding-left: 14px; }
.hb-c { grid-area: c; min-width: 0; }
.hb-acts { grid-area: a; display: flex; align-items: center; gap: 6px; }
.hb-nm { font-weight: 600; overflow-wrap: anywhere; }
/* client name styled like the Projects tab cards: display font, bold first names, light gray last name */
.hb-cl { font-family: var(--f-display); font-size: 18px; font-weight: 700; line-height: 20px; }
.hb-site { font-weight: 400; color: var(--muted); }
.hb-ser { display: inline-block; margin-left: 8px; font-family: var(--f-mono); font-size: 12px; font-weight: 500; color: var(--accent); background: var(--accent-soft); border-radius: 5px; padding: 1px 6px; vertical-align: 1px; white-space: nowrap; }
.hb-ser.dn { color: var(--muted); background: var(--surface-2); }
.hb-sub { font-size: 13.5px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-h { color: var(--ink); font-weight: 500; }
/* the one-line note preview fades out on open but keeps its space, so nothing above it shifts */
.hb-nt { transition: opacity .2s ease; }
.hb-open .hb-nt { opacity: 0; }

.hb-last { grid-area: l; display: grid; justify-items: end; text-align: right; font-size: 12.5px; color: var(--muted); line-height: 1.4; padding-right: 6px; white-space: nowrap; }
.hb-last b { font-family: var(--f-mono); font-weight: 500; font-size: 13px; color: var(--ink); }
.hb-last.m { display: none; }
.hb-eb { width: 36px; height: 36px; display: inline-grid; place-items: center; border: 0; background: none; border-radius: 8px; padding: 0; color: var(--muted); cursor: pointer; flex: none; }
.hb-eb svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.hb-ck { display: none; width: 44px; height: 44px; border: 0; background: none; place-items: center; padding: 0; color: var(--accent); cursor: pointer; flex: none; }
.hb-ck span { width: 34px; height: 34px; border-radius: 50%; border: 1.6px solid var(--accent); display: grid; place-items: center; transition: background-color .2s, color .2s; }
.hb-ck.pri span, .hb-asking .hb-ck span { background: var(--accent); color: var(--accent-ink); }
.hb-ck svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.hb-grip { width: 28px; height: 36px; border: 0; background: none; display: grid; place-items: center; color: var(--muted); padding: 0; cursor: grab; border-radius: 6px; touch-action: none; flex: none; }
.hb-grip svg { width: 16px; height: 16px; fill: currentColor; }
@media (hover: hover) {
  .hb-eb:hover { background: var(--surface-2); color: var(--accent); }
  .hb-grip:hover { background: var(--surface-2); color: var(--ink); }
}

/* details: grows open and closed */
.hb-xw { grid-area: x; display: grid; grid-template-rows: 0fr; transition: grid-template-rows .24s ease; }
.hb-open > .hb-xw { grid-template-rows: 1fr; }
.hb-x { min-height: 0; overflow: hidden; }
.hb-xi { padding: 10px 8px 2px 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; justify-items: start; }
.hb-xn { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--ink); max-width: 640px; white-space: pre-line; }
.hb-xn.muted { color: var(--muted); }
.hb-xs { display: grid; gap: 4px; font-size: 13.5px; align-content: start; }
.hb-xl { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.hb-sp { display: flex; gap: 8px; align-items: center; }
.hb-sp i { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--accent); }
.hb-sp.dn { color: var(--muted); }
.hb-sp.dn i { background: var(--muted); }
.hb-sp.cur { font-weight: 600; }
.hb-sp.late { color: var(--danger); }
.hb-sp.late i { background: var(--danger); }
.hb-open { background: color-mix(in srgb, var(--surface-2) 40%, var(--surface)); box-shadow: inset 3px 0 0 var(--accent); }

/* Mark done: the question slides in where the buttons were */
.hb-askw { display: none; }
.hb-asking > .hb-acts { display: none; }
.hb-asking > .hb-askw { display: block; grid-area: a; animation: hb-in .22s ease both; }
.hb-still > .hb-askw { animation: none; }
.hb-closing > .hb-askw { animation: hb-out .16s ease both; }
@keyframes hb-in { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
@keyframes hb-out { to { opacity: 0; transform: translateX(16px); } }
.hb-ask { display: flex; align-items: center; gap: 6px; background: var(--accent-soft); border-radius: 10px; padding: 4px 4px 4px 6px; box-shadow: 0 2px 8px rgb(0 0 0 / .1); }
.hb-dd { position: relative; display: inline-flex; align-items: center; gap: 4px; border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); background: var(--surface); border-radius: 7px; padding: 3px 6px 3px 9px; font-size: 13px; color: var(--accent); min-height: 32px; white-space: nowrap; cursor: pointer; }
.hb-dd b { font-weight: 600; }
.hb-dd svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hb-dd input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: auto; height: auto; margin: 0; padding: 0; opacity: 0; cursor: pointer; }
.hb-dd input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; padding: 0; margin: 0; cursor: pointer; min-height: 0 !important; }
.hb-ask-sep { width: 1px; align-self: stretch; margin: 4px; background: color-mix(in srgb, var(--accent) 25%, transparent); }
.hb-aq { font-size: 13.5px; font-weight: 500; color: var(--accent); white-space: nowrap; }
.hb-ab { display: flex; gap: 6px; }
.hb-ask .btn { min-height: 32px; padding: 4px 12px; }
.hb-cx { width: 32px; height: 32px; border: 0; background: none; border-radius: 6px; display: grid; place-items: center; color: var(--accent); cursor: pointer; padding: 0; }
.hb-cx svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.hb-cx span { display: none; }
@media (hover: hover) { .hb-cx:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); } }

/* undo banner */
.hb-toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 120; display: flex; align-items: center; gap: 10px; background: var(--ink); color: var(--bg); border-radius: 10px; padding: 6px 6px 6px 14px; font-size: 14px; box-shadow: 0 10px 28px rgb(0 0 0 / .25); max-width: calc(100vw - 24px); width: max-content; animation: hb-up .26s ease both; }
.hb-toast.out { animation: hb-down .2s ease both; }
.hb-toast > svg { width: 18px; height: 18px; fill: none; stroke: color-mix(in srgb, var(--inst) 60%, var(--bg)); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.hb-toast span { min-width: 0; line-height: 1.35; }
.hb-toast .undo { margin-left: 6px; border: 0; background: none; color: color-mix(in srgb, var(--accent) 50%, var(--bg)); font: inherit; font-weight: 600; padding: 0 10px; min-height: 36px; border-radius: 6px; cursor: pointer; }
.hb-toast .hb-tx { border: 0; background: none; color: inherit; opacity: .6; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 6px; cursor: pointer; padding: 0; }
.hb-toast .hb-tx svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
@keyframes hb-up { from { opacity: 0; transform: translate(-50%, 16px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes hb-down { to { opacity: 0; transform: translate(-50%, 16px); } }

/* drag to reorder: the row follows the pointer, its old spot stays darker */
.hb-src { background: color-mix(in srgb, var(--surface-2) 80%, var(--line)) !important; box-shadow: none !important; }
.hb-src > * { visibility: hidden; }
.hb-ghost { position: fixed !important; z-index: 200; pointer-events: none; margin: 0 !important; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 14px 34px rgb(0 0 0 / .22); padding-left: 14px !important; }
.hb-ghost::before { display: none; }
body.hb-dragging, body.hb-dragging * { cursor: grabbing !important; user-select: none; -webkit-user-select: none; }

/* schedule / edit window */
.hb-form .field { align-content: start; }
.hb-seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hb-seg.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hb-seg label { text-align: center; }
.hb-seg label + label { border-left: 1px solid var(--line); }
.hb-r2 { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 12px; }
.hb-hint { font-size: 12.5px; }
.hb-fbox { border: 1px solid var(--line); border-radius: 10px; background: var(--bg); padding: 12px 14px; display: grid; gap: 10px; }
.hb-fbox b { font-weight: 600; font-size: 14.5px; }
.hb-fbox .hb-ser { margin-left: 0; }

/* Season Overview */
.hb-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.hb-stack { width: 100%; max-width: 44px; display: flex; flex-direction: column; border-radius: 4px 4px 0 0; overflow: hidden; }
.hb-first { background: color-mix(in srgb, var(--accent) 45%, var(--surface)); }
.hb-stack.top .hb-first { background: var(--accent); }
.hb-fu { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--accent) 45%, var(--surface)) 0 3px, color-mix(in srgb, var(--accent) 16%, var(--surface)) 3px 6px); }
.hb-stack.top .hb-fu { background: repeating-linear-gradient(135deg, var(--accent) 0 3px, color-mix(in srgb, var(--accent) 45%, var(--surface)) 3px 6px); }
.hb-hbar { width: 100%; max-width: 44px; border-radius: 4px 4px 0 0; background: color-mix(in srgb, var(--inst) 45%, var(--surface)); }
.hb-hbar.top { background: var(--inst); }
.hb-leg { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.hb-leg i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.hb-vr { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(40px, 2fr) 52px; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid color-mix(in srgb, var(--line) 60%, var(--surface)); font-size: 14px; }
.hb-vr > .num { text-align: right; }
.hb-vh { border-top: 0; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding-top: 0; }
.hb-vh span:last-child { text-align: right; }
.hb-vn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-vb { height: 9px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.hb-vb span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }

@media (max-width: 720px) {
  .hb-page { gap: 18px; }
  .hb-big .num { font-size: 36px; }
  .hb-day { grid-template-columns: 58px minmax(0, 1fr); column-gap: 10px; padding-left: 12px; }
  .hb-d { padding-top: 11px; }
  .hb-late { padding: 0 6px; }
  .hb-late .lg { display: none; } .hb-late .sh { display: inline; }
  .hb-part { padding-top: 10px; }
  .hb-empty { margin: 6px 12px 12px 0; }
  .hb-row { column-gap: 8px; padding: 10px 4px 10px 0; grid-template-areas: "c a" "x x" "k k"; }
  .hb-day .hb-row { margin-left: -10px; padding-left: 10px; }
  .hb-day .hb-row + .hb-row::before { left: 10px; }
  .hb-row.wd { grid-template-columns: 58px minmax(0, 1fr) auto; grid-template-areas: "d c a" "d x x" "k k k"; padding: 9px 4px 9px 12px; column-gap: 10px; }
  .hb-row.ud { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "c a" "x x" "k k"; padding-left: 12px; }
  .hb-c { display: flex; flex-direction: column; cursor: pointer; }
  .hb-nm { display: contents; }
  .hb-cl { order: 0; }
  .hb-site { order: 1; font-size: 14px; line-height: 1.4; margin-top: 2px; }
  .hb-dot { display: none; }
  .hb-sub { order: 2; font-size: 14px; margin-top: 1px; line-height: 1.4; }
  .hb-ser { order: 3; align-self: flex-start; margin: 8px 0 0; padding: 3px 6px; font-size: 12px; }
  .hb-last.dk { display: none; }
  .hb-last.m { order: 4; display: block; text-align: left; padding: 0; margin-top: 6px; white-space: normal; font-size: 13.5px; }
  .hb-last.m b { font-size: 14px; }
  .hb-last.m .hb-ago { display: block; margin-top: 1px; }
  .hb-det, .hb-mark, .hb-grip { display: none; }
  .hb-ck { display: grid; }
  .hb-eb { width: 40px; height: 44px; }
  .hb-setd { font-size: 13.5px; padding: 4px 10px; margin-right: 4px; }
  .hb-xi { grid-template-columns: minmax(0, 1fr); padding: 8px 10px 4px 0; }
  .hb-xn { font-size: 14px; }
  .hb-asking > .hb-acts { display: flex; }
  .hb-asking .hb-eb { display: none; }
  .hb-asking > .hb-askw { grid-area: k; overflow: hidden; animation-name: hb-drop; animation-duration: .26s; }
  .hb-closing > .hb-askw { animation: hb-lift .18s ease both; }
  @keyframes hb-drop { from { opacity: 0; max-height: 0; } to { opacity: 1; max-height: 340px; } }
  @keyframes hb-lift { from { opacity: 1; max-height: 340px; } to { opacity: 0; max-height: 0; } }
  .hb-ask { flex-wrap: wrap; gap: 10px; padding: 12px; margin: 8px 8px 2px 0; box-shadow: none; }
  .hb-dd { flex: 1 1 100%; min-height: 44px; font-size: 14.5px; padding: 0 12px; }
  .hb-dd svg { margin-left: auto; width: 16px; height: 16px; }
  .hb-ask-sep { display: none; }
  .hb-aq { flex: 1 1 100%; font-size: 14.5px; white-space: normal; }
  .hb-ab { flex: 1 1 100%; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 8px; }
  .hb-ask .btn { min-height: 44px; font-size: 15px; }
  .hb-cx { flex: 1 1 100%; width: auto; height: 36px; }
  .hb-cx svg { display: none; }
  .hb-cx span { display: inline; font-size: 14px; font-weight: 500; }
  .hb-row[data-drag] { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
  .hb-done-sec { padding-top: 30px; margin-top: 12px; }
  .hb-two { grid-template-columns: minmax(0, 1fr); }
  .hb-vr { grid-template-columns: minmax(0, 1fr) 90px 28px; gap: 10px; }
  .hb-r2 { grid-template-columns: minmax(0, 1fr) 110px; }
  .hb-toast { left: 12px; right: 12px; width: auto; transform: none; animation-name: hb-up-m; }
  .hb-toast.out { animation-name: hb-down-m; }
  @keyframes hb-up-m { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
  @keyframes hb-down-m { to { opacity: 0; transform: translateY(16px); } }
}
@media (prefers-reduced-motion: reduce) {
  .hb-row, .hb-xw, .hb-askw, .hb-toast, .hb-ck span { transition: none !important; animation: none !important; }
}


/* ---------- client form (Clients page + Mileage Tracker): compact, two columns ---------- */
.cf { display: grid; gap: 12px; }
.cf input[type=text], .cf textarea { font-size: 14px; }
.cf input[type=text] { height: 34px; min-height: 0; padding-top: 0; padding-bottom: 0; }
.cf textarea { min-height: 0; padding: 7px 10px; line-height: 1.45; resize: vertical; width: 100%; box-sizing: border-box; }
.cf .lbl { white-space: nowrap; font-size: 12px; }
.cf-g { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px 24px; align-items: start; }
.cf-g:first-child { align-items: center; }
/* Shown as ends where Last name ends: the people rows keep a 34px column (plus 6px gap) for the remove × */
.cf-sa { display: flex; align-items: center; gap: 8px; margin-right: 40px; min-width: 0; }
.cf-sa input { flex: 1; min-width: 0; font-weight: 600; }
.cf-pp, .cf-no { display: grid; gap: 6px; min-width: 0; }
.cf .pp-row { grid-template-columns: minmax(0,1fr) minmax(0,1fr) 34px !important; margin-right: 0 !important; }
.cf .pp-x { display: inline-grid !important; }
.cf .pp-x[hidden] { visibility: hidden; }
.cf-ft { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.cf-mi { display: flex; align-items: center; gap: 8px; }
.cf-mi input { width: 84px; font-family: var(--f-mono); }
.cf-mi .muted { font-size: 13px; }
.cf-act { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px 8px; margin-left: auto; }
@media (max-width: 720px) { .cf input[type=text], .cf textarea { font-size: 16px; } .cf input[type=text] { height: 40px; } .cf-sa { margin-right: 0; flex-direction: column; align-items: stretch; gap: 6px; } .cf-sa input { flex: none; } }

/* ---------- Clients page ---------- */
.cl-page { gap: 12px; }
.cl-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.cl-top input { flex: 1 1 240px; max-width: 380px; }
.cl-top #cm-sum { font-size: 13px; margin-right: auto; }
.cl-addbtn { display: inline-flex; align-items: center; gap: 6px; }
.cl-addbtn svg, .cl-edit svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cl-hint { margin: -4px 0 0; font-size: 13px; }
#cl-new:empty { display: none; }
.cl-list { display: grid; gap: 8px; }
.cl-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.6fr) 96px 150px auto; gap: 16px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 9px 10px 9px 16px; transition: background-color .4s; }
.cl-row.flash { background: var(--need-soft); }
.cl-nm { font-family: var(--f-display); font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.cl-nm b { font-weight: 700; }
.cl-notes { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.cl-mi { font-size: 13.5px; text-align: right; white-space: nowrap; }
.cl-notes.none, .cl-mi.none { color: var(--muted); opacity: .8; }
.cl-meta { font-size: 12.5px; color: var(--muted); text-align: right; white-space: nowrap; }
.cl-edit { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; }
.cl-card { background: var(--surface); border: 1.5px solid var(--accent); border-radius: 12px; overflow: hidden; }
.cl-card .cf { padding: 12px 18px 16px; }
.cl-new { box-shadow: 0 0 0 4px var(--accent-soft); }
.cl-band { display: flex; align-items: center; gap: 12px; background: var(--accent); color: var(--accent-ink); padding: 8px 12px 8px 18px; min-height: 42px; box-sizing: border-box; }
.cl-band h3 { margin: 0 auto 0 0; font: 600 15px var(--f-body); color: inherit; }
.cl-band.soft { background: var(--accent-soft); color: var(--accent); }
.cl-bmeta { font-size: 12.5px; color: var(--muted); }
.cl-merge { display: contents; }
.cl-merge:empty { display: none; }
.cl-card.merging .cl-merge { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; flex-basis: 100%; }
.cl-card.merging [data-cl=merge] { display: none; }
.cl-merge select { max-width: 320px; }
.cl-merge small { flex-basis: 100%; text-align: right; }
@media (max-width: 720px) {
  .cl-row { grid-template-columns: minmax(0, 1fr) auto auto; padding: 8px 8px 8px 14px; }
  .cl-notes, .cl-meta { display: none; }
  .cl-card .cf { padding: 12px 14px 14px; }
}

/* ---------- Buttons: use these everywhere ----------
   .btn.primary   the main action (Save, Add client, Add trips)
   .btn.secondary every action beside it (Cancel, Back, Edit): white with a grey border; hover darkens the border,
                  the same as Edit Client's Cancel. Safe on any background, never underlines.
   .btn.ghost     a text-only link inside content */
.btn.secondary { background: var(--surface); border-color: var(--line); color: var(--ink); text-decoration: none; }
.btn.secondary:not(:disabled):hover { background: var(--surface); border-color: var(--muted); color: var(--ink); text-decoration: none; }
/* ---- Nov 2026 updates: mulch, Add Project, To Install tags, costs ---- */
.pr-list .num { font-weight: 700; }
.sp-tbl table { table-layout: fixed; min-width: 880px; }
.sp-tbl td:nth-child(3) { white-space: nowrap; }
.sp-tbl td:nth-child(2), .sp-tbl td:last-child { overflow-wrap: break-word; }
.sp-tbl .pr-list { white-space: normal; }
.wtags { display: flex; flex-wrap: wrap; gap: 6px; }
.wt { display: inline-flex; align-items: center; gap: 4px; font-family: var(--f-body); font-size: 12px; font-weight: 600; line-height: 1.35; padding: 2px 9px 3px; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.wt.done { background: var(--inst-soft); color: var(--inst); }
.wt svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.leftdiv { display: flex; align-items: center; gap: 10px; margin: 2px 0 8px; font-size: 11.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.leftdiv::before, .leftdiv::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.leftdiv::before { flex: 0 0 14px; }
.from { font-family: var(--f-body); font-size: 12px; font-weight: 600; line-height: 1.35; padding: 2px 8px 3px; border-radius: 999px; background: var(--need-soft); color: var(--ink); white-space: nowrap; align-self: center; }
.hcol { display: grid; gap: 7px; margin-right: auto; min-width: 0; }
.crow .hcol .card-top { margin-right: 0; }
.crow .task-after { margin-top: 10px; }
.mo-h { margin: 40px 0 8px; }
.sec-h + .mo-h { margin-top: 2px; }
.past-meta { font-size: 13px; }
@media (max-width: 560px) { .crow .card-h .hcol { grid-column: 1; grid-row: 1; } .crow .card-h .hcol .card-top { justify-content: flex-start; flex-wrap: wrap; row-gap: 3px; } .crow .card-h .hcol + .card-meta { margin-top: 4px; } }
.at-b { display: flex; gap: 6px; flex: none; }
.vd-btn { display: inline-flex; align-items: center; gap: 4px; }
.vd-btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.vd-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.mul-card { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.mul-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.mul-h h4 { margin: 0; font-family: var(--f-display); font-size: 16px; }
.mul-h .muted { font-size: 13px; }
.mul-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.mul-3 .af-in { display: flex; } .mul-3 .af-in input { width: 100%; min-width: 0; }
.mul-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 14px; align-items: end; }
.mul-2 > div:first-child { display: grid; gap: 8px; }
.mul-cost { line-height: 1.7; }
.mul-note { font-size: 12px; color: var(--muted); font-family: var(--f-body); }
@media (max-width: 560px) { .mul-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .mul-3 .mul-zn { grid-column: 1 / -1; } .mul-2 { grid-template-columns: minmax(0, 1fr); } }
.mp-row { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr) 92px auto; gap: 6px 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.mp-row.h { border-top: 0; padding: 0 0 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.mp-row > * { text-align: left; }
.mp-row > .num { text-align: right; font-family: var(--f-mono); }
.mp-row.h > .num { font-family: inherit; }
.mp-row b { font-weight: 600; }
.mp-row.ed { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr) 110px; }
.mp-row.ed input, .mp-row.ed select { width: 100%; min-width: 0; }
.mp-row.ed .mp-acts { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; }
.mp-row.ed .mp-acts .danger { margin-right: auto; }
.mp-edit { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; font-size: 13px; }
.mp-edit svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mp-sub { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 6px 0 0; }
.mp-new { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 8px; align-items: center; }
.mp-new input { min-width: 0; }
.mp-none { font-size: 13px; color: var(--muted); padding: 6px 0; }
@media (max-width: 520px) {
  .mp-row { grid-template-columns: minmax(0, 1fr) auto auto; }
  .mp-row > .mp-u { grid-column: 1; grid-row: 2; margin-top: -6px; font-size: 12.5px; }
  .mp-row.h > .mp-u { display: none; }
  .mp-row.ed { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .mp-row.ed > :first-child { grid-column: 1 / -1; }
  .mp-new { grid-template-columns: minmax(0, 1fr) auto; } .mp-new input { grid-column: 1 / -1; }
}
input.ap-dd[type] { -webkit-appearance: none; appearance: none; cursor: pointer; background-color: var(--surface);
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 52%, calc(100% - 12px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
input.ap-dd[type]:disabled { cursor: default; }
input.ap-dd[type].open { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent);
  background-image: linear-gradient(135deg, transparent 50%, var(--muted) 50%), linear-gradient(45deg, var(--muted) 50%, transparent 50%); }
@media (hover: hover) { input.ap-dd[type]:not(:disabled):hover { border-color: var(--muted); } input.ap-dd[type].open:hover { border-color: var(--accent); } }
.ap-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 28px rgb(0 0 0 / .12); background: var(--surface); margin-top: 2px; overflow: hidden; max-height: none; }
.ap-list .dd-scroll { max-height: 236px; }
.ap-list .combo-i > span { font-size: 14px; }
.ap-new { display: grid; gap: 10px; padding: 12px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); }
.ap-new-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.ap-hint { font-size: 12.5px; }
.pp-add { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; font-size: 13.5px; }
.pp-add svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.un-sw { justify-self: start; color: var(--ink); }
.cost-sec { margin: 16px 0 0; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.cost-form.ot { grid-template-columns: 130px 120px minmax(0, 1fr) auto auto; }
.cost-form .ot-t, .cost-form .cf-note { font-size: 12.5px; color: var(--ink); }
.cost-form .cf-note { grid-column: 1 / -1; }
.cost-form .sz-ar { grid-column: 1 / -1; width: 100%; }
.cost-row .cost-form select { grid-column: auto; margin: 0; padding-top: 8px; padding-bottom: 8px; }
.cost-row .cost-form .sz-ar { grid-column: 1 / -1; }
@media (max-width: 560px) { .cost-form.ot { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .cost-form.ot .ot-t { grid-column: 1 / -1; } }
.cost-more { margin: 0; font-size: 13px; text-align: center; }
.cost-row .ot-tag { font-size: 11.5px; }
.hrow .hl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* ---------- Pricing Calculator ---------- */
#ptabs { display: none; }
:root[data-sec="pricing"] #ptabs { display: flex; }
:root[data-sec="pricing"] .top .wrap { padding-bottom: 0; }
:root[data-sec="pricing"] .tools #year { display: inline-block !important; } /* on both tabs so the header doesn't shift; Price Rules isn't by year */
:root[data-sec="pricing"] #main { padding-bottom: 0; }
.pc-page { display: grid; gap: 14px; padding: 18px 0 40px; --pc-l2: color-mix(in srgb, var(--line) 55%, var(--surface)); --pc-panel: color-mix(in srgb, var(--surface-2) 35%, var(--surface)); --pc-gh: color-mix(in srgb, var(--surface-2) 70%, var(--line)); --pc-ink2: color-mix(in srgb, var(--ink) 80%, var(--muted)); }
.pc-page h2 { font-family: var(--f-display); font-size: 28px; font-weight: 600; margin: 0; letter-spacing: -0.01em; }
.pc-page h3 { font-family: var(--f-display); font-size: 19px; font-weight: 600; margin: 0; }
.pc-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.pc-head h2 { margin-right: auto; }
.pc-page .pc-head input[type=search] { width: 300px; max-width: 100%; }
.pc-page .btn { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; }
.pc-page .btn svg, .pc-new svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.pc-page .btn.primary:hover { background: color-mix(in srgb, var(--accent) 85%, #000); }
.pc-page .btn.ghost:hover { background: var(--accent-soft); }
.pc-danger, .pc-page .btn.ghost.pc-danger { color: var(--danger); }
.pc-lnk.pc-danger { color: var(--danger); }
.pc-lnk { border: 0; background: none; padding: 0; color: var(--accent); font: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer; text-align: left; }
.pc-lnk:hover { text-decoration: underline; }
.pc-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); min-width: 0; }
.pc-ch { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); min-height: 58px; }
.pc-ch h3 { margin-right: auto; }
.pc-ch > .muted { font-size: 13.5px; }
.pc-ch h3 + .muted { margin-right: auto; margin-left: -4px; }
.pc-ch h3:has(+ .muted) { margin-right: 0; }
.pc-cb { padding: 14px 16px 16px; }
.pc-f { display: grid; gap: 5px; min-width: 0; align-content: start; }
.pc-f > label, .pc-page .fl { font-size: 13px; font-weight: 600; }
.pc-page input[type=text], .pc-page input[type=date], .pc-page input[type=search], .pc-page select, .pc-page textarea { background-color: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; min-height: 40px; width: 100%; min-width: 0; color: var(--ink); }
.pc-page textarea { min-height: 60px; resize: vertical; }
.pc-page input:focus, .pc-page select:focus, .pc-page textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
.pc-page input:disabled, .pc-page select:disabled { opacity: .6; }
.pc-r { text-align: right; font-family: var(--f-mono); }
.pc-page input.ed, .pc-dol:has(input[data-ed]) input { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.pc-page input.faint { color: var(--muted); }
.pc-unit { position: relative; }
.pc-unit > span { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 13px; color: var(--muted); pointer-events: none; }
.pc-dol { position: relative; display: block; }
.pc-dol > span { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-family: var(--f-mono); color: color-mix(in srgb, var(--muted) 70%, var(--surface)); pointer-events: none; }
.pc-dol input { padding-left: 22px !important; }
.pc-chk { display: inline-flex; gap: 8px; align-items: center; font-size: 13.5px; cursor: pointer; }
.pc-chk input, .pc-inc input { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; flex: none; }
.pc-hint { font-size: 12.5px; }
.pc-full { grid-column: 1 / -1; }
.pc-addno { justify-self: start; margin: 2px 0 0 -8px; padding-block: 4px; font-size: 14px; }
.pc-eb { width: 36px; height: 36px; display: inline-grid; place-items: center; border: 0; background: none; border-radius: 8px; padding: 0; color: var(--muted); flex: none; cursor: pointer; }
.pc-eb:hover { background: var(--surface-2); color: var(--ink); }
.pc-eb svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pc-eb svg circle { fill: currentColor; stroke: none; }
.pc-tg { display: inline-block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; padding: 1px 6px 2px; border-radius: 4px; background: var(--surface-2); color: var(--muted); font-weight: 500; white-space: nowrap; }
.pc-tg.ph { background: var(--ord-soft); color: color-mix(in srgb, var(--ord) 70%, var(--ink)); }
.pc-tg.ty { background: var(--need-soft); color: color-mix(in srgb, var(--need) 45%, var(--ink)); }
.pc-chip { font-size: 12.5px; background: var(--surface-2); border-radius: 5px; padding: 2px 7px; white-space: nowrap; }
.pc-chip.w { background: var(--need-soft); }
.pc-empty { display: grid; gap: 10px; justify-items: start; margin: 14px 16px; padding: 16px; border: 1.5px dashed var(--line); border-radius: 10px; background: var(--pc-panel); }
.pc-areas .pc-empty { margin: 0; }
.pc-empty p { margin: 0; color: var(--muted); font-size: 14px; }
.pc-empty p b { display: block; color: var(--ink); font-weight: 600; font-size: 15px; margin-bottom: 2px; }
.pc-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); height: 40px; }
.pc-seg button { border: 0; background: none; padding: 5px 14px; font-size: 13.5px; font-weight: 500; color: var(--pc-ink2); cursor: pointer; }
.pc-seg button + button { border-left: 1px solid var(--line); }
.pc-seg button:hover { background: var(--surface-2); }
.pc-seg button.on { background: var(--accent-soft); color: var(--accent); }
.pc-pn { color: color-mix(in srgb, var(--need) 45%, var(--ink)); background: var(--need-soft); border-radius: 4px; padding: 1px 6px; font-family: var(--f-body); font-size: 12.5px; white-space: nowrap; }
.pc-needp { color: color-mix(in srgb, var(--need) 45%, var(--ink)); background: var(--need-soft); border-radius: 4px; padding: 1px 7px; font-size: 13px; }

/* quotes list */
.pc-gh { display: flex; align-items: baseline; gap: 10px; padding: 9px 16px; background: var(--pc-gh); border-top: 1px solid var(--line); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--pc-ink2); font-weight: 600; }
.pc-ql > .pc-gh:first-child { border-top: 0; border-radius: var(--r) var(--r) 0 0; }
.pc-gh span { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 12.5px; margin-left: auto; }
.pc-q { display: grid; grid-template-columns: 72px minmax(0,1.3fr) minmax(0,1.4fr) 120px 36px; column-gap: 16px; align-items: center; padding: 12px 8px 12px 16px; border-top: 1px solid var(--line); cursor: pointer; }
.pc-q:hover { background: color-mix(in srgb, var(--accent-soft) 60%, var(--surface)); }
.pc-q:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.pc-q .dt { font-family: var(--f-mono); font-size: 14px; font-weight: 500; color: var(--pc-ink2); }
.pc-q .dt small { display: block; font-family: var(--f-body); font-weight: 400; font-size: 12.5px; color: var(--muted); }
.pc-q .who { min-width: 0; display: grid; }
.pc-q .cn { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-q .cn .last { font-weight: 300; color: var(--muted); }
.pc-q .qn { font-size: 13.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-q .has { display: grid; gap: 5px; min-width: 0; }
.pc-q .who .ty { display: block; font-size: 12.5px; font-weight: 500; color: var(--ink); margin-top: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-q .has .chs { display: flex; flex-wrap: wrap; gap: 4px; }
.pc-chip.sg { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.pc-q .tot { text-align: right; font-weight: 500; font-size: 15.5px; }
.pc-mw { position: relative; }
.pc-pop { position: absolute; right: 0; top: 38px; z-index: 30; min-width: 160px; }
.pc-pop .set-row { width: 100%; text-align: left; }
.pc-foot-n { margin: 0; font-size: 13.5px; }

/* quote */
.pc-quote { padding-bottom: 0; }
.pc-back { justify-self: start; margin: -6px 0 -6px -8px; }
.pc-back svg { width: 18px; height: 18px; }
.pc-qh { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.pc-qh h2 { margin-right: auto; min-width: 0; overflow-wrap: anywhere; }
.pc-qh .muted { font-size: 13.5px; }
.pc-rates { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: 13px; color: var(--muted); margin-top: -8px; }
.pc-stack { display: grid; gap: 16px; min-width: 0; }
.pc-det { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,1.2fr) 170px; gap: 14px; padding: 16px; }
.pc-clin { font-weight: 600; cursor: pointer; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%) !important; background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50% !important; background-size: 5px 5px !important; background-repeat: no-repeat !important; padding-right: 30px !important; }
.pc-clin.open { cursor: text; font-weight: 400; border-color: var(--accent); }
.pc-clin::placeholder { font-weight: 400; color: color-mix(in srgb, var(--muted) 80%, var(--surface)); }
.pc-dl .mi { font-size: 12.5px; }
.pc-dl .latin { font-size: 12.5px; }
.pc-ddf { display: grid; }
.pc-ddf .dd-btn span { display: grid; text-align: left; }
.pc-ddf .dd-btn small { font-size: 12px; color: var(--muted); font-weight: 400; }
.pc-ddf .dd-btn + .dd-btn { border-top: 1px solid var(--line); }
.pc-areas { display: grid; gap: 10px; }
.pc-area { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.pc-area.open { box-shadow: inset 3px 0 0 var(--accent); }
.pc-area-c { display: flex; align-items: center; gap: 12px; padding: 12px 8px 12px 14px; min-height: 56px; width: 100%; border: 0; background: none; text-align: left; cursor: pointer; border-radius: 10px; color: var(--ink); }
.pc-area-c:hover { background: color-mix(in srgb, var(--accent-soft) 50%, var(--surface)); }
.pc-area-c .nm { margin-right: auto; min-width: 0; }
.pc-area-c .nm b { font-weight: 600; }
.pc-area-c small { display: block; font-size: 13px; color: var(--muted); }
.pc-area-c > svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; margin: 0 9px; }
/* closed area card: up/down arrows on the left, the area's number (documents and map), the rounded price with the exact cost under it */
.pc-arow { display: flex; align-items: stretch; }
.pc-arow .pc-area-c { flex: 1; min-width: 0; }
.pc-amv { display: grid; align-content: center; padding-left: 4px; }
.pc-amv .pc-eb { width: 30px; height: 26px; }
.pc-amv .pc-eb:disabled { opacity: .3; cursor: default; background: none; }
.pc-arow .pc-amv + .pc-area-c { padding-left: 6px; }
.pc-ano { align-self: flex-start; margin-top: 2px; }
.pc-ap { text-align: right; }
.pc-ap small { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }
.pc-atop { display: grid; grid-template-columns: minmax(0,420px) 120px minmax(0,1fr) 36px; gap: 12px; align-items: end; padding: 14px 14px 0; }
.pc-tier { justify-self: start; display: inline-flex; font-size: 12.5px; font-weight: 500; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 3px 10px; white-space: nowrap; margin-bottom: 9px; }
.pc-ab { padding: 14px 14px 0; display: grid; gap: 10px; }
.pc-needs { display: flex; flex-wrap: wrap; gap: 6px; }
.pc-nd { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 12px; font-size: 13.5px; min-height: 34px; color: var(--pc-ink2); cursor: pointer; }
.pc-nd:hover { border-color: var(--muted); }
.pc-nd svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.pc-nd.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 500; }
.pc-opts { display: flex; flex-wrap: wrap; gap: 12px 14px; align-items: end; padding: 12px; border-radius: 8px; background: var(--pc-panel); border: 1px solid var(--pc-l2); }
.pc-row8 { display: flex; align-items: center; gap: 8px; }
.pc-mh { font-size: 12.5px; white-space: nowrap; }
.pc-up { min-height: 40px; }
.pc-lt { padding: 14px 14px 6px; }
.pc-ln { display: grid; grid-template-columns: minmax(0,1fr) 112px 96px 112px; column-gap: 14px; align-items: center; }
.pc-ln > :nth-child(n+2) { text-align: right; justify-self: end; }
.pc-lnh { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 500; padding: 0 0 6px; }
button.pc-lng { width: 100%; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; cursor: pointer; padding: 11px 0; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--ink); }
button.pc-lng:hover { background: var(--pc-panel); }
.pc-lng .gn { display: inline-flex; align-items: center; gap: 6px; }
.pc-lng .car { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.pc-lng.open .car { transform: rotate(90deg); }
.pc-lng .num { text-transform: none; letter-spacing: 0; font-weight: 600; font-size: 14.5px; }
.pc-lns { padding: 0 0 10px; }
.pc-lnr { padding: 3px 0; font-size: 14px; }
.pc-lnr .lb { min-width: 0; }
.pc-lnr .kind { font-size: 12px; color: var(--muted); margin-left: 8px; }
.pc-lnr .num { font-size: 13.5px; }
.pc-page .pc-rate, .pc-page .pc-amt, .pc-page .pc-qty { border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; font-family: var(--f-mono); font-size: 13.5px; background: var(--surface); text-align: right; min-height: 30px; }
.pc-page .pc-rate { width: 88px; }
.pc-page .pc-amt { width: 112px; }
.pc-page .pc-qty { width: 54px; }
.pc-qbox { display: inline-flex; align-items: center; gap: 5px; }
.pc-qbox > span { font-size: 12.5px; color: var(--muted); min-width: 32px; text-align: left; }
.pc-lnr.miss { background: var(--need-soft); border-radius: 6px; padding: 5px 8px; margin: 2px -8px; }
.pc-mn { font-size: 12.5px; color: var(--muted); margin: 4px 0 0; }
.pc-afoot { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: flex-end; gap: 6px 16px; padding: 10px 14px 12px; border-top: 1px solid var(--line); background: var(--pc-panel); border-radius: 0 0 10px 10px; margin-top: 8px; }
.pc-afoot .btn { margin-right: auto; margin-left: -8px; }
.pc-afoot > span:last-child b { font-size: 15.5px; margin-left: 4px; }

/* Add area: two kinds (Daniel, Nov 8) */
.pc-akw { position: relative; }
.pc-akm { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: 340px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 28px rgba(0,0,0,.16); padding: 6px; display: grid; gap: 2px; }
.pc-aks { display: grid; gap: 8px; width: min(100%, 420px); margin-top: 4px; }
.pc-aks .pc-ak { border: 1px solid var(--line); }
.pc-ak { display: grid; grid-template-columns: 28px minmax(0,1fr); gap: 10px; align-items: start; text-align: left; border: 0; background: var(--surface); border-radius: 8px; padding: 10px 12px; color: var(--ink); cursor: pointer; font: inherit; }
.pc-ak:hover, .pc-ak:focus-visible { background: var(--accent-soft); }
.pc-ak b { display: block; font-weight: 600; }
.pc-ak small { display: block; font-size: 13px; color: var(--muted); line-height: 1.35; margin-top: 2px; }
.pc-ak .ic svg { width: 24px; height: 24px; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
/* area by individual plant: roomier than a square-footage area (Daniel: "things look too close") */
.pc-plarea .pc-pltop { grid-template-columns: minmax(0,420px) minmax(0,1fr) 36px; padding: 18px 18px 0; }
.pc-plarea .pc-ab { padding: 18px 18px 0; gap: 12px; }
.pc-plarea .pc-hint { margin: 0; font-size: 13px; }
.pc-plarea .pc-opts { gap: 14px 18px; padding: 14px 16px; }
.pc-kind { justify-self: start; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border-radius: 8px; background: var(--surface-2); font-size: 13.5px; color: var(--pc-ink2); white-space: nowrap; }
.pc-kind svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.pc-plh { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 22px 18px 10px; }
.pc-plh .fl { margin: 0 auto 0 0; }
.pc-plt { margin: 0 18px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.pc-plt .pc-pth { background: var(--surface-2); }
.pc-plempty { margin: 0; padding: 16px; font-size: 14px; }
.pc-plarea .pc-lt { padding: 18px 18px 6px; }
.pc-plarea .pc-afoot { margin-top: 12px; padding: 12px 18px 14px; }
@media (max-width: 720px) { .pc-plarea .pc-pltop { grid-template-columns: minmax(0,1fr) 36px; } .pc-plarea .pc-kind { grid-column: 1; grid-row: 2; height: 32px; } .pc-plt { margin: 0 12px; } .pc-akm { width: min(340px, calc(100vw - 32px)); } }

/* plant list */
.pc-ptw { min-width: 0; }
.pc-pt { display: grid; grid-template-columns: minmax(0,1fr) 72px 44px 84px 96px 108px 36px; column-gap: 12px; align-items: center; }
.pc-pt > :nth-child(n+5):not(.pc-bd) { text-align: right; }
.pc-pt > :nth-child(3) { text-align: right; }
.pc-pth { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 500; padding: 9px 8px 9px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.pc-ptr { padding: 9px 8px 9px 16px; border-top: 1px solid var(--line); cursor: pointer; }
.pc-pth + .pc-ptr { border-top: 0; }
.pc-ptr:hover:not(.pc-ptx) { background: color-mix(in srgb, var(--accent-soft) 45%, var(--surface)); }
.pc-ptr .nm { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.pc-ptr .nm b { font-weight: 600; }
.pc-size { font-family: var(--f-mono); font-size: 12px; border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px 2px; color: var(--muted); white-space: nowrap; }
.pc-inc { display: grid; gap: 3px; font-size: 13px; color: var(--pc-ink2); }
.pc-inc label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.pc-ptx { background: var(--pc-panel); box-shadow: inset 3px 0 0 var(--accent); cursor: default; }
.pc-ptx > .pc-bd { cursor: auto; }
.pc-bd { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,1fr); gap: 16px 28px; padding: 16px 9px 14px 0; text-align: left; align-items: start; }
.pc-bdl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 12px; align-content: start; }
.pc-bdl > .pc-f { min-width: 110px; }
.pc-bdl .latin { font-size: 12.5px; }
.pc-addf { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding-top: 4px; }
.pc-addf .muted { font-size: 12.5px; }
.pc-bdt { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 6px 14px; font-size: 13.5px; align-content: start; padding: 12px 14px; border-radius: 8px; background: var(--surface); border: 1px solid var(--pc-l2); }
.pc-bdt .num { text-align: right; }
.pc-bdt .tot { border-top: 1px solid var(--line); padding-top: 6px; font-weight: 600; }
.pc-ptadd { padding: 6px 16px; border-top: 1px solid var(--line); }
.pc-ptfoot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 16px; padding: 12px 16px; border-top: 1px solid var(--line); background: var(--pc-panel); border-radius: 0 0 10px 10px; }
.pc-ptfoot > .muted { font-size: 13px; margin-right: auto; }
.pc-ptfoot b { font-size: 15.5px; margin-left: 4px; }

/* trips & time */
.pc-tt { display: grid; gap: 12px; }
.pc-trow { display: flex; flex-wrap: wrap; align-items: end; gap: 10px 12px; }
.pc-x { padding-bottom: 10px; }
.pc-tamt { padding-bottom: 9px; font-size: 16px; }
.pc-ws { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13.5px; padding: 10px 12px; border-radius: 8px; background: var(--pc-panel); border: 1px solid var(--pc-l2); }
.pc-ws label { font-weight: 600; }
.pc-page .pc-ws input { width: 60px; min-height: 34px; padding: 4px 8px; }
.pc-wsn { flex: 1 1 100%; font-size: 13px; }
.pc-tsum { margin: 0; font-size: 13.5px; color: var(--muted); }
.pc-tsum2 { font-size: 14.5px; padding-top: 10px; border-top: 1px solid var(--pc-l2); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.pc-tsum2 > b { font-weight: 600; }
.pc-tdet { display: grid; gap: 10px; }
.pc-wk { display: grid; grid-template-columns: 150px minmax(0, max-content) max-content; gap: 4px 24px; font-size: 13px; color: var(--pc-ink2); padding: 10px 12px; border-radius: 8px; background: var(--pc-panel); border: 1px solid var(--pc-l2); justify-self: start; max-width: 100%; }
.pc-wk .num { text-align: right; }
.pc-wk .sub { color: var(--muted); }
.pc-wk .gap { font-weight: 600; color: var(--ink); padding-top: 8px; }
.pc-wk .gap.r { text-align: right; font-weight: 400; color: var(--muted); }
.pc-wk .t { font-weight: 600; color: var(--ink); border-top: 1px solid var(--line); padding-top: 4px; margin-top: 2px; }
.pc-wk .t.sub { font-weight: 400; color: var(--muted); }

/* other items */
.pc-misc { display: grid; grid-template-columns: minmax(0,1fr) 140px 92px 140px 36px; gap: 8px; align-items: center; }
.pc-misch { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 500; }

/* sticky total */
.pc-tbar { position: sticky; bottom: 0; z-index: 9; background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgb(0 0 0 / .08); margin: 6px -16px 0; padding: 0 16px env(safe-area-inset-bottom, 0px); }
.pc-tbr { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 12px 0 14px; }
.pc-tbt { margin-right: auto; flex: 1 1 260px; min-width: 0; }
.pc-rup { font-size: 12px; font-weight: 400; } /* the total's text wraps before the buttons do */
.pc-tbl { font-size: 12.5px; font-weight: 600; }
.pc-tbr .big { font-family: var(--f-mono); font-size: 26px; font-weight: 600; line-height: 1.1; }
.pc-tbh { font-size: 12.5px; color: var(--muted); }
.pc-tbh b { color: var(--ink); font-weight: 500; }
.pc-tbtog svg { width: 16px; height: 16px; transition: transform .2s; }
.pc-tbtog.on svg { transform: rotate(180deg); }
.pc-tbx { display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,1.5fr) minmax(0,.9fr); gap: 8px 30px; padding: 16px 0 6px; border-bottom: 1px solid var(--pc-l2); max-height: 60vh; overflow: auto; }
/* Prices on documents (breakdown): one row per area / task, own cost, shared costs, the printed price */
.pc-dpw { grid-column: 1 / -1; display: grid; gap: 6px; padding-top: 10px; border-top: 1px solid var(--pc-l2); }
.pc-dp { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; font-size: 14px; align-items: baseline; }
.pc-dp > span { padding: 5px 0; border-top: 1px solid var(--pc-l2); align-self: stretch; }
.pc-dp > span:not(:nth-child(4n + 1)) { padding-left: 22px; }
.pc-dp > span small { display: block; font-size: 12.5px; color: var(--muted); }
.pc-dp > .pc-dph { border-top: 0; padding-top: 0; font-size: 12.5px; color: var(--muted); font-family: var(--f-body); }
.pc-dp > .pc-dpd { color: color-mix(in srgb, var(--inst) 75%, var(--ink)); }
.pc-dp > .pc-dpt { font-weight: 600; border-top-color: var(--line); }
@media (max-width: 560px) {
  /* phones: the name on its own line, the three amounts under it */
  .pc-dp { grid-template-columns: repeat(3, minmax(0, 1fr)); font-size: 13.5px; }
  .pc-dp > span:nth-child(4n + 2) { padding-left: 0; }
  .pc-dp > span:not(:nth-child(4n + 1)) { padding-left: 10px; }
  .pc-dp > span:nth-child(4n + 2) { padding-left: 0; }
  .pc-dp > span:nth-child(4n + 1) { grid-column: 1 / -1; padding-bottom: 0; }
  .pc-dp > span:nth-child(4n + 2), .pc-dp > span:nth-child(4n + 3), .pc-dp > span:nth-child(4n + 4) { border-top: 0; padding-top: 2px; }
  .pc-dp > .pc-dph:nth-child(1) { display: none; }
  .pc-dp > .pc-dph { padding-top: 0; }
}
@media (max-width: 560px) {
  .set-item.doc-si .t { flex-basis: 100%; }
  .doc-kinds:has(button:nth-child(4)) { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .doc-kinds:has(button:nth-child(4)) button:nth-child(3) { border-left: 0; }
  .doc-kinds:has(button:nth-child(4)) button:nth-child(n + 3) { border-top: 1px solid var(--line); }
}
.pc-sh { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; margin: 0 0 4px; }
.pc-srow { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 5px 0; font-size: 14px; }
.pc-srow + .pc-srow { border-top: 1px solid var(--pc-l2); }
.pc-tb2 { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); column-gap: 28px; }
.pc-tb2 .pc-srow:nth-child(2) { border-top: 0; }
.pc-sw { display: flex; align-items: center; gap: 8px; }
.pc-sw i { width: 9px; height: 9px; border-radius: 2px; flex: none; }
.pc-stack { gap: 16px; }
.pc-tbx .pc-stack { display: flex; height: 10px; border-radius: 5px; overflow: hidden; margin: 6px 0 8px; gap: 2px; }
.pc-tbx .pc-stack span { display: block; height: 100%; }
.pc-er { display: flex; align-items: baseline; gap: 8px; padding: 5px 0 1px; }
.pc-er b { font-size: 17px; font-weight: 600; }
.pc-er span { font-size: 13.5px; }
.pc-ern { font-size: 12px; color: var(--muted); line-height: 1.35; padding-bottom: 6px; border-bottom: 1px solid var(--pc-l2); margin-bottom: 2px; }
.pc-ern:last-child { border-bottom: 0; }
.pc-rfx { display: grid; grid-template-columns: max-content max-content; gap: 6px 24px; font-size: 14.5px; padding: 12px 14px; border-radius: 8px; background: var(--surface-2); }

/* price rules */
.pc-intro { margin: -6px 0 0; font-size: 14px; }
.pc-grp { font-family: var(--f-display); font-size: 19px; font-weight: 600; color: var(--muted); margin: 10px 0 -2px; }
.pc-sub { margin: 0 0 12px; font-size: 13.5px; }
.pc-rr { display: grid; column-gap: 10px; align-items: center; padding: 4px 0; font-size: 14px; }
.pc-rr .r, .pc-sz .r { text-align: right; }
.pc-rr .pc-dol input { width: 100%; }
.pc-rrh { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 500; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.pc-rrh2 { margin-top: 18px; color: var(--ink); font-weight: 700; }
.pc-rrs { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; font-weight: 600; }
.pc-rrs .muted { font-weight: 400; font-size: 13px; }
.pc-rg { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; padding: 12px 0 4px; }
.pc-rg span { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--muted); font-size: 13px; }
.pc-page .pc-nt { min-height: 34px; padding: 6px 8px; font-size: 13px; resize: none; border-color: transparent; background: transparent; color: var(--muted); line-height: 1.35; }
.pc-page .pc-nt:hover { border-color: var(--line); }
.pc-page .pc-nt:focus { background: var(--surface); color: var(--ink); }
.pc-la { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 14px; }
.pc-la .muted { font-size: 13px; }
.pc-upg { display: flex; }
.pc-mps { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 14px; margin-bottom: 8px; }
.pc-mp { border: 1px solid var(--pc-l2); border-radius: 8px; padding: 12px 14px; background: var(--pc-panel); display: grid; gap: 8px; align-content: start; }
.pc-mph { font-weight: 600; font-size: 15px; }
.pc-mph span { font-weight: 400; color: var(--muted); font-size: 13.5px; }
.pc-mg { display: grid; grid-template-columns: 116px minmax(0,1fr); gap: 6px 12px; align-items: center; font-size: 14px; }
.pc-mg .mv { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-height: 34px; }
.pc-mg .mv select { max-width: 100%; }
.pc-mg .eq { font-family: var(--f-mono); }
.pc-mg .msep { grid-column: 1 / -1; border-top: 1px solid var(--line); }
.pc-mp .pc-mn { font-size: 12.5px; }
.pc-ipr { display: grid; grid-template-columns: minmax(0,1fr) max-content; gap: 20px 28px; }
.pc-ipg { display: grid; grid-template-columns: 170px minmax(0,1fr); gap: 10px 14px; align-items: center; align-content: start; }
.pc-szw { justify-self: end; }
.pc-szt { display: grid; gap: 4px; }
.pc-sz { display: grid; grid-template-columns: 72px 96px 68px; gap: 8px; align-items: center; font-size: 14px; }
.pc-szh { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 500; }
.pc-sz select { grid-column: 1 / -1; min-height: 34px; padding: 4px 8px; width: 120px !important; }
.pc-szw > p { max-width: 260px; }
.pc-drv { display: grid; grid-template-columns: 200px 110px 36px; gap: 8px 14px; align-items: center; }
.pc-drv + .pc-szn { margin-top: 12px; }
.pc-oth { display: grid; grid-template-columns: 180px minmax(0,1fr); gap: 10px 14px; align-items: center; }
.pc-lt2 { display: grid; gap: 0; }
.pc-lr { display: grid; grid-template-columns: minmax(0,1fr) 140px 164px 140px 96px minmax(0,1.3fr); column-gap: 10px; align-items: center; padding: 3px 0; font-size: 14px; }
.pc-lr > :nth-child(5) { text-align: right; }
.pc-lr > .pc-nt, .pc-lrh > :last-child { padding-left: 8px; }
.pc-lr select { width: auto !important; min-height: 34px !important; padding: 4px 6px !important; }
.pc-lr input.pc-r { min-height: 34px; padding: 4px 8px; }
.pc-lrh { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 500; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.pc-lgh { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; padding: 14px 0 4px; }
.pc-lgh span { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--muted); font-size: 13px; margin-left: 6px; }
.pc-wd { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 10px; }
.pc-wd > .muted { font-size: 13px; }
.pc-brs { display: grid; gap: 6px; }

.pc-brn { width: 24px; height: 24px; border-radius: 50%; background: var(--surface-2); display: inline-grid; place-items: center; font-size: 12px; font-weight: 600; }
.pc-br .pc-r { min-height: 38px; }
/* phone price rules */
.pc-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-size: 14.5px; }
.pc-note svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-top: 1px; }
.pc-pr { overflow: hidden; }
.pc-prs { display: flex; align-items: center; gap: 10px; width: 100%; padding: 14px; border: 0; background: none; text-align: left; min-height: 56px; color: var(--ink); cursor: pointer; }
.pc-prs h3 { font-size: 18px; }
.pc-prs small { display: block; font-size: 13px; color: var(--muted); }
.pc-prs svg { width: 18px; height: 18px; flex: none; margin-left: auto; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pc-pseg { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin: 0 14px 10px; }
.pc-pseg button { flex: 1; border: 0; background: var(--surface); padding: 8px 2px; min-height: 42px; font-size: 13px; color: var(--pc-ink2); }
.pc-pseg button + button { border-left: 1px solid var(--line); }
.pc-pseg button.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.pc-pgh { padding: 7px 14px; background: var(--surface-2); font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--pc-ink2); font-weight: 600; }
.pc-prr { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 9px 14px; font-size: 14.5px; border-top: 1px solid var(--pc-l2); }
.pc-pgh + .pc-prr { border-top: 0; }
.pc-prr .k { font-size: 12px; color: var(--muted); }
.pc-prr.sub { background: var(--accent-soft); font-weight: 600; }
.pc-prr .num { text-align: right; }

/* narrower desktop */
@media (max-width: 1100px) {
  .pc-lr { grid-template-columns: minmax(0,1fr) 130px 156px 132px 80px minmax(0,.8fr); }
  .pc-ipr { grid-template-columns: 1fr; } .pc-szw { justify-self: start; }
}
/* phones */
@media (max-width: 720px) {
  .pc-page { padding-top: 12px; }
  .pc-page h2 { font-size: 24px; }
  .pc-page .pc-head input[type=search] { width: 100%; order: 3; }
  .pc-head h2 .h-yr, .pc-head h2 .h-sep { display: inline; }
  .pc-new { width: 44px; height: 44px; padding: 0 !important; justify-content: center; }
  .pc-new span { display: none; }
  .pc-q { grid-template-columns: minmax(0,1fr) auto; gap: 2px 12px; padding: 12px 14px; }
  .pc-q .dt { grid-column: 2; grid-row: 2; text-align: right; font-family: var(--f-body); font-size: 13px; font-weight: 400; color: var(--muted); }
  .pc-q .dt small { display: none; }
  .pc-q .who { grid-column: 1; grid-row: 1 / 3; }
  .pc-q .tot { grid-column: 2; grid-row: 1; }
  .pc-q .has { grid-column: 1 / -1; grid-row: 3; margin-top: 6px; }
  .pc-q .pc-mw { display: none; }
  .pc-det { grid-template-columns: minmax(0,1fr) 150px; padding: 14px; }
  .pc-det .pc-clf { grid-column: 1 / -1; }
  .pc-cb { padding: 12px 14px 14px; }
  .pc-ch { padding: 12px 14px; }
  .pc-atop { grid-template-columns: minmax(0,1fr) 112px 36px; }
  .pc-atop .pc-tier { grid-column: 1 / -1; grid-row: 2; margin: 0; }
  .pc-atop .pc-eb { grid-row: 1; grid-column: 3; }
  .pc-opts .pc-of { width: auto !important; flex: 1 1 130px; }
  .pc-mh { white-space: normal; }
  .pc-lt { padding: 12px 12px 4px; }
  .pc-ln { grid-template-columns: minmax(0,1fr) auto; row-gap: 4px; }
  .pc-lnh { display: none; }
  button.pc-lng { grid-template-columns: minmax(0,1fr) auto; }
  button.pc-lng > span:nth-child(2), button.pc-lng > span:nth-child(3) { display: none; }
  .pc-lnr { grid-template-columns: minmax(0,1fr) 88px 104px; padding: 8px 0; border-top: 1px solid var(--pc-l2); }
  .pc-lnr .lb { grid-column: 1 / -1; }
  .pc-lnr .kind { display: block; margin: 0; }
  .pc-lnr > :nth-child(2) { justify-self: start; text-align: left; }
  .pc-pth { display: none; }
  .pc-pt { grid-template-columns: minmax(0,1fr) auto auto; row-gap: 6px; }
  .pc-ptr { padding: 12px 8px 12px 14px; }
  .pc-ptr .nm { grid-column: 1; grid-row: 1; }
  .pc-ptr > :nth-child(2) { grid-column: 1; grid-row: 2; display: flex; gap: 8px; }
  .pc-ptr > :nth-child(3) { grid-column: 1; grid-row: 2; justify-self: start; margin-left: 78px; text-align: left; }
  .pc-ptr > :nth-child(3)::before { content: "× "; color: var(--muted); }
  .pc-ptr > .pc-inc { grid-column: 1; grid-row: 3; display: flex; gap: 16px; }
  .pc-ptr > :nth-child(5) { display: none; }
  .pc-ptr > :nth-child(6) { grid-column: 2; grid-row: 1; }
  .pc-ptr > .pc-eb { grid-column: 3; grid-row: 1 / 3; }
  .pc-bd { grid-template-columns: 1fr; padding-right: 6px; grid-row: auto; }
  .pc-bdl { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .pc-bdl > .pc-f { min-width: 0; }
  .pc-misc { grid-template-columns: minmax(0,1fr) 112px 44px; }
  .pc-misc > input[type=text]:first-child { grid-column: 1 / -1; }
  .pc-misc > select { grid-column: 1; }
  .pc-misc > .pc-unit { grid-column: 2; }
  .pc-misc > .pc-dol { grid-column: 1 / 3; }
  .pc-misc > .pc-eb { grid-column: 3; grid-row: 2; }
  .pc-misc { padding-bottom: 10px; border-bottom: 1px solid var(--pc-l2); }
  .pc-misch { display: none; }
  .pc-tbar { margin: 6px -16px 0; }
  .pc-tbr { gap: 8px 12px; padding: 10px 0 12px; }
  .pc-tbr .big { font-size: 22px; }
  .pc-tbr .pc-chk { order: 3; flex-basis: 100%; }
  .pc-tbx { grid-template-columns: 1fr; gap: 14px; }
  .pc-tb2 { grid-template-columns: 1fr; }
  .pc-tb2 .pc-srow:nth-child(2) { border-top: 1px solid var(--pc-l2); }
}
.pc-lr .pc-ph { font-family: var(--f-body); font-size: 12.5px; white-space: nowrap; }
.pc-lr > .num { white-space: nowrap; font-size: 13.5px; }
.pc-page .pc-nt { overflow: hidden; }
.pc-page select { padding-right: 30px; }
.pc-page .pc-lr select { padding: 4px 24px 4px 8px !important; background-position: calc(100% - 13px) 52%, calc(100% - 8px) 52%; }
.pc-pw { display: none; }
@media (max-width: 720px) {
  .pc-hw { display: none; } .pc-pw { display: inline; }
  .pc-tbt { flex: 1 1 0; min-width: 0; }
  .pc-atop { grid-template-columns: 136px minmax(0,1fr) 36px; }
  .pc-atop .pc-an { grid-column: 1 / 3; grid-row: 1; }
  .pc-atop .pc-as { grid-column: 1; grid-row: 2; }
  .pc-atop .pc-tier { grid-column: 2; grid-row: 2; align-self: end; justify-self: start; margin-bottom: 9px; white-space: normal; }
  .pc-atop .pc-eb { grid-column: 3; grid-row: 1; align-self: end; }
  .pc-opts .pc-of { flex: 1 1 40%; }
  .pc-lnr { grid-template-columns: minmax(0,1fr) 84px 108px; }
  .pc-page .pc-lnr .pc-rate, .pc-page .pc-lnr .pc-amt { width: 100%; }
  .pc-lnr > span.num { white-space: nowrap; font-size: 12.5px; }
  .pc-trow .pc-f:first-child input { width: 64px !important; }
  .pc-ch { gap: 6px 12px; }
}

/* Price Rules tables (Area Rates, Labor Time Estimates) */
.pc-ch2 { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px 12px; }
.pc-ch2 > div { margin-right: auto; min-width: 0; }
.pc-ch2 p { margin: 4px 0 0; font-size: 13.5px; color: var(--muted); max-width: 900px; }
.pc-ch2 p b { color: var(--ink); font-weight: 600; }
.pc-tw { border-top: 1px solid var(--line); border-radius: 0 0 var(--r) var(--r); }
.pc-th { display: grid; column-gap: 10px; align-items: center; padding: 8px 16px; background: color-mix(in srgb, var(--surface-2) 55%, var(--line)); font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--pc-ink2); font-weight: 600; }
.pc-th .r, .pc-tr .r { text-align: right; }
.pc-th2 { border-top: 1px solid var(--line); margin-top: 0; color: var(--ink); font-weight: 700; }
.pc-tband { padding: 7px 16px; background: color-mix(in srgb, var(--surface-2) 75%, var(--surface)); border-top: 1px solid var(--line); font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--ink); }
.pc-tband span { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--muted); font-size: 12.5px; margin-left: 6px; }
.pc-tband .pc-lki { width: 14px; height: 14px; color: var(--accent); margin-left: 6px; }
.pc-tband .pc-lnk { font-size: 12.5px; }
.pc-tr { display: grid; column-gap: 10px; align-items: center; padding: 6px 16px; border-top: 1px solid var(--pc-l2); font-size: 14px; min-height: 46px; }
.pc-tband + .pc-tr, .pc-th + .pc-tr { border-top: 0; }
.pc-tsub { background: var(--accent-soft); font-weight: 600; border-top: 1px solid var(--line); }
.pc-tsub .muted { font-weight: 400; font-size: 13px; }
.pc-upg { display: flex; }
.pc-tfoot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 10px 16px; background: color-mix(in srgb, var(--surface-2) 75%, var(--surface)); border-top: 1px solid var(--line); border-radius: 0 0 var(--r) var(--r); font-size: 14px; }
.pc-tfoot .muted { font-size: 13px; }
.pc-tw .pc-lr { grid-template-columns: minmax(0,1fr) 136px 158px 158px 100px minmax(0,1.2fr); padding-top: 4px; padding-bottom: 4px; min-height: 42px; }
.pc-lr > .pc-phc { text-align: right; justify-self: end; }
.pc-lname { display: inline-flex; align-items: center; gap: 6px; }
.pc-lk { color: var(--accent); display: inline-flex; }
.pc-lk .pc-lki { width: 14px; height: 14px; }
.pc-phv { font-weight: 700; font-size: 14.5px; color: var(--ink); }
.pc-phw { position: relative; display: inline-block; }
.pc-phb { border: 1px solid transparent; background: none; border-radius: 6px; padding: 3px 6px; margin-right: -6px; font-family: var(--f-mono); font-weight: 700; font-size: 14.5px; color: var(--ink); cursor: pointer; text-align: right; line-height: 1.25; text-decoration: underline dotted color-mix(in srgb, var(--muted) 60%, transparent); text-underline-offset: 3px; }
.pc-phb small { display: block; font-family: var(--f-body); font-weight: 400; font-size: 11.5px; color: var(--muted); text-decoration: none; }
.pc-phb:hover, .pc-phb[aria-expanded="true"] { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, transparent); color: var(--accent); }
.pc-php { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; width: 340px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 30px rgb(0 0 0 / .14); padding: 10px 12px; text-align: left; }
.pc-phh { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.pc-phr { display: grid; grid-template-columns: minmax(0,1fr) auto 64px; gap: 10px; align-items: baseline; padding: 5px 0; font-size: 13.5px; border-top: 1px solid var(--pc-l2); }
.pc-phr:first-of-type { border-top: 0; }
.pc-phr b { text-align: right; font-weight: 700; }
.pc-phr .num.muted { font-size: 12.5px; }
.pc-php p { margin: 6px 0 0; font-size: 12px; }
/* Counts as: tags, also inside the dropdown */
.pc-cat { display: inline-flex; align-items: center; gap: 4px; border: 1px solid transparent; border-radius: 6px; padding: 2px 8px; font-size: 12.5px; font-weight: 500; white-space: nowrap; line-height: 1.5; }
button.pc-cat { cursor: pointer; padding-right: 5px; }
button.pc-cat svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: .7; }
button.pc-cat:hover, button.pc-cat[aria-expanded="true"] { border-color: currentColor; }
.pc-cat.c-design { background: var(--accent-soft); color: var(--accent); }
.pc-cat.c-mat { background: color-mix(in srgb, #2F6DB0 14%, var(--surface)); color: color-mix(in srgb, #2F6DB0 80%, var(--ink)); }
.pc-cat.c-lab { background: color-mix(in srgb, #3B9660 15%, var(--surface)); color: color-mix(in srgb, #2F7D4F 80%, var(--ink)); }
.pc-catw { position: relative; justify-self: start; }
.pc-catm { position: absolute; left: 0; top: calc(100% + 4px); z-index: 40; min-width: 160px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 30px rgb(0 0 0 / .14); padding: 4px; display: grid; }
.pc-catm button { display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 0; background: none; padding: 7px 8px; border-radius: 6px; cursor: pointer; color: var(--ink); }
.pc-catm button:hover { background: var(--surface-2); }
.pc-catm svg { width: 15px; height: 15px; fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
/* mulch card */
.pc-mband { padding: 10px 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--pc-panel); }
.pc-mband .pc-la { font-size: 14px; }
.pc-vb { display: inline-flex; align-items: center; font-family: var(--f-mono); font-size: 13.5px; padding: 2px 7px; border-radius: 5px; background: var(--surface-2); font-weight: 500; white-space: nowrap; }
.pc-vb.hi { background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 14px; }
.pc-psf { display: grid; gap: 2px; font-size: 13px; padding: 8px 10px; border-radius: 6px; background: var(--surface); border: 1px solid var(--pc-l2); }
.pc-psf > span:first-child { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; color: var(--muted); }
.pc-psf b { font-weight: 700; }
.pc-psf .muted { font-size: 12px; }
/* install table */
.pc-szbox { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.pc-szbox .pc-sz { grid-template-columns: 82px 100px 76px; padding: 4px 10px; border-top: 1px solid var(--pc-l2); }
.pc-szbox .pc-szh { padding: 7px 10px; background: color-mix(in srgb, var(--surface-2) 55%, var(--line)); border-top: 0; color: var(--pc-ink2); font-weight: 600; font-size: 11.5px; }
.pc-szbox input.pc-r { min-height: 32px; padding: 3px 8px; }
.pc-szt { justify-self: start; font-family: var(--f-mono); font-size: 12px; border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px 2px; color: var(--pc-ink2); background: var(--surface); white-space: nowrap; }
.pc-szn { display: flex; align-items: flex-start; gap: 12px; margin-top: 8px; max-width: 300px; }
.pc-szn .pc-lnk { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.pc-szn .pc-lnk svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.pc-szn .muted { font-size: 12.5px; }
.pc-szn .muted .pc-lnk { font-size: 12.5px; display: inline; }
.pc-szadd { display: flex; gap: 6px; margin-top: 8px; }
.pc-szadd input { width: 120px !important; }
/* edit size brackets */
.pc-brbox { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.pc-br { display: grid; grid-template-columns: 28px minmax(0,1fr) 38px; gap: 10px; align-items: center; padding: 8px 8px 8px 14px; min-height: 56px; font-size: 14.5px; }
.pc-br + .pc-br { border-top: 1px solid var(--pc-l2); }
.pc-br.add { background: var(--pc-panel); box-shadow: inset 3px 0 0 var(--accent); }
.pc-brr { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pc-brf { min-width: 52px; text-align: right; font-size: 14px; }
.pc-br input.pc-r { width: 96px; min-height: 38px; }
.pc-tg.new { background: var(--accent-soft); color: var(--accent); }
.pc-tg.sg { background: var(--accent-soft); color: var(--accent); font-weight: 600; vertical-align: middle; }
h2 .pc-tg.sg { font-family: var(--f-body); font-size: 11.5px; position: relative; top: -2px; }
/* after signing: payments, change orders, progress statements */
.doc-gb.doc-gb1 { padding-top: 16px; }
.doc-gb1 > h3 { font-size: 18px; }
.doc-kinds { flex-wrap: wrap; height: auto; min-height: 40px; }
.doc-rev small { display: block; color: var(--muted); font-size: 12.5px; }
.doc-pls { display: grid; }
.doc-pl { display: flex; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 8px 0; border-top: 1px solid var(--pc-l2); font-size: 14px; }
.doc-pl:first-child { border-top: 0; }
.doc-pl b { font-weight: 600; }
.doc-pl small { display: block; color: var(--muted); font-size: 12.5px; }
.pc-page .doc-pl .btn { height: 32px; min-height: 32px; padding: 0 12px; font-size: 13.5px; flex: none; }
.doc-paid { display: inline-flex; align-items: center; gap: 4px; color: color-mix(in srgb, var(--inst) 75%, var(--ink)); font-size: 13.5px; font-weight: 600; flex: none; }
.doc-paid svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.doc-pdel { width: 28px !important; height: 28px !important; vertical-align: middle; }
.doc-cos { flex-wrap: wrap; height: auto; min-height: 40px; justify-self: start; }
.doc-cor { display: grid; grid-template-columns: minmax(0, 1fr) 120px auto; gap: 6px; padding: 10px 0; border-top: 1px solid var(--pc-l2); align-items: center; }
.doc-cor:first-child { border-top: 0; padding-top: 0; }
.doc-cor input[type=text][data-co="heading"], .doc-cor textarea { grid-column: 1 / -1; }
.doc-cor input[data-co="heading"] { font-weight: 600; }
.doc-due { flex-wrap: wrap; height: auto; min-height: 40px; }
.doc-due button:disabled { opacity: .45; cursor: default; background: none; }
.doc-psi { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 10px; padding: 6px 0; border-top: 1px solid var(--pc-l2); }
.doc-psi:first-child { border-top: 0; }
.doc-psi input[type=date] { width: auto; }
.doc-psd { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; padding: 6px 0; border-top: 1px solid var(--pc-l2); }
.doc-sugs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.doc-sugs .btn.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

.pc-warn { padding: 10px 12px; border-radius: 8px; background: var(--need-soft); font-size: 13.5px; line-height: 1.45; }
@media (max-width: 1100px) { .pc-tw .pc-lr { grid-template-columns: minmax(0,1fr) 128px 150px 150px 92px minmax(0,.8fr); } }
.pc-th > :last-child { padding-left: 9px; }
.pc-pnote { grid-column: 5 / -1; min-width: 0; } .pc-pnote .pc-la { flex-wrap: nowrap; }
.pc-page .pc-nt { height: auto; }
.pc-phr > span:first-child { white-space: nowrap; }
.pc-days { font-weight: 400; color: var(--muted); font-family: var(--f-body); }
.pc-psr { display: grid; grid-template-columns: 112px minmax(0,1fr) 64px; gap: 8px; align-items: baseline; padding: 2px 0; }
.pc-psr > span:nth-child(2) { color: var(--muted); font-size: 12.5px; }
.pc-psr > b { text-align: right; font-weight: 600; }
.pc-pst { border-top: 1px solid var(--line); margin-top: 3px; padding-top: 5px; }
.pc-pst > b { font-weight: 700; }
.pc-psf > .muted { margin-top: 2px; }
.pc-calc { display: flex; align-items: center; justify-content: flex-end; height: 36px; padding: 0 9px; border-radius: 8px; background: var(--pc-panel); border: 1px dashed var(--line); font-size: 13.5px; color: var(--pc-ink2); }
.pc-mnote { font-size: 12.5px; color: var(--muted); padding-left: 9px; line-height: 1.35; }
.pc-tband-m { display: flex; align-items: center; }
.pc-tband-m > span { margin-right: auto; }
.pc-mtog { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); background: var(--surface); border-radius: 7px; padding: 3px 10px; font: 500 13px/1.3 var(--f-body); color: var(--accent); text-transform: none; letter-spacing: 0; cursor: pointer; }
.pc-mtog svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.pc-mtog.on svg { transform: rotate(180deg); }
.pc-mtog:hover { background: var(--accent-soft); }
.pc-mx { display: grid; gap: 14px; margin: 4px 16px 12px; padding: 14px; border: 1px solid var(--pc-l2); border-radius: 10px; background: color-mix(in srgb, var(--pc-panel) 50%, var(--surface)); box-shadow: inset 3px 0 0 var(--accent); }
.pc-mx .pc-mps { margin: 0; }
.pc-tr > .pc-cat { justify-self: start; }
.pc-tsub .pc-mnote { font-weight: 400; }
/* Individual Plants Rates: keep each "= total" on the same line as its parts */
.pc-ipg { grid-template-columns: 148px minmax(0,1fr); column-gap: 10px; }
.pc-calcrow { flex-wrap: nowrap; gap: 5px; white-space: nowrap; }
.pc-calcrow .pc-dol input { padding-right: 7px; padding-left: 19px !important; }
.pc-calcrow .pc-dol > span { left: 7px; }
.pc-calcrow .muted { font-size: 12.5px; }
.pc-ipr { column-gap: 22px; }
@media (max-width: 1260px) { .pc-ipr { grid-template-columns: 1fr; } .pc-szw { justify-self: start; } }
@media (max-width: 720px) { .pc-calcrow { flex-wrap: wrap; white-space: normal; } .pc-ipg { grid-template-columns: 1fr; } }
.pc-wk { grid-template-columns: 150px minmax(0, max-content) max-content max-content; }
.pc-crew { display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 4px 16px; align-items: baseline; font-size: 13.5px; padding: 4px 0 6px; }
.pc-crew .r { text-align: right; }
.pc-crew > span.r { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.pc-crew b { font-weight: 600; }
.pc-crew small { font-family: var(--f-body); font-weight: 400; color: var(--muted); font-size: 11.5px; }
.pc-tsum2 { gap: 4px 8px; }
@media (max-width: 720px) { .pc-wk { grid-template-columns: minmax(0,1fr) auto auto; grid-auto-flow: row dense; column-gap: 14px; } .pc-wk > .sub, .pc-wk > .t.sub { grid-column: 1 / -1; font-size: 12px; } .pc-wk > span:empty { display: none; } }
.pc-phs { display: inline-grid; justify-items: end; }
.pc-ph2 { display: block; font-family: var(--f-body); font-weight: 400; font-size: 11.5px; color: var(--muted); white-space: nowrap; text-decoration: none; }
.pc-phr b .pc-ph2 { font-size: 11px; }
.pc-tw .pc-lr { grid-template-columns: minmax(0,1fr) 136px 158px 110px 118px minmax(0,1.2fr); }
/* Price Rules tables: the column headings and section bands stay in view while you scroll */
.pc-tw > .pc-th { position: sticky; top: var(--toph, 0px); z-index: 6; min-height: 34px; box-shadow: 0 1px 0 var(--line); }
.pc-tw > .pc-tband { position: sticky; top: calc(var(--toph, 0px) + 34px); z-index: 5; box-shadow: 0 1px 0 var(--line); }
.pc-tw > .pc-tband-m { padding-top: 5px; padding-bottom: 5px; }
@media (max-width: 720px) { .pc-tw > .pc-th, .pc-tw > .pc-tband { position: static; } }
.pc-tr.pc-upg { display: grid; gap: 6px; padding-top: 8px; padding-bottom: 10px; } .pc-upn { font-size: 13px; }
.pc-cat.c-mk { background: color-mix(in srgb, #E2B12C 20%, var(--surface)); color: color-mix(in srgb, #9A6F00 85%, var(--ink)); }
.nav-undo { display: none !important; }
@media (max-width: 899px) { .nav-undo { display: flex !important; margin-top: 6px; } }
.nav-undo span { display: grid; line-height: 1.25; }
.nav-undo small { font-size: 12px; color: var(--muted); }
.nav-undo:disabled { cursor: default; } .nav-undo:disabled svg, .nav-undo:disabled span > :first-child { opacity: .5; }
.te-link { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; padding: 10px 12px; border-radius: 8px; background: var(--accent-soft); color: color-mix(in srgb, var(--accent) 70%, var(--ink)); }
.te-link .pc-lki { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.te-link .pc-lnk { font-size: inherit; font-weight: 600; }
.te-pr { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--accent); margin-top: 1px; }
.te-pr .pc-lki { width: 13px; height: 13px; }
.pc-lki { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -2px; }
/* ---------- Quote page refresh (Daniel, Nov 9): roomier sections, Trips & Time tiles, Other Items rows, total bar ---------- */
.pc-quote h2 { font-size: 32px; }
.pc-quote h3 { font-size: 24px; }
.pc-quote .pc-ch { padding: 20px 24px; min-height: 74px; align-items: baseline; }
.pc-quote .pc-ch > .muted { font-size: 18px; }
.pc-quote .pc-ch h3 + .muted { margin-left: 2px; }
.pc-quote .pc-cb { padding: 22px 24px 24px; }
.pc-quote .pc-det { padding: 24px; grid-template-columns: minmax(0,1.2fr) minmax(0,1.2fr) auto auto; }
.pc-quote .pc-dtf input { width: 136px; padding-right: 8px; }
.pc-dot { margin: 0 9px; }
/* text-style buttons with the light purple hover don't underline too */
.pc-page .btn.ghost:not(:disabled):hover { text-decoration: none; }
/* + Notes at the end of the details row; the Notes box on the next line, Remove note beside it */
.pc-notesc { display: flex; align-items: flex-end; }
.pc-notesc .pc-addno { margin: 0; height: 40px; padding-inline: 8px; }
.pc-notesf { grid-column: 1 / 4; }
.pc-notesf textarea { resize: vertical; min-height: 64px; }
/* the client's distance in light gray after the name, in the box and in the list */
.pc-clw { position: relative; display: block; }
.pc-clw .pc-clin { width: 100%; }
.pc-clg { position: absolute; inset: 0; display: flex; align-items: center; gap: 8px; padding: 0 40px 0 11px; pointer-events: none; white-space: nowrap; overflow: hidden; font-size: 15px; }
.pc-clg .nm { visibility: hidden; font-weight: 600; overflow: hidden; text-overflow: clip; min-width: 0; }
.pc-clmi, .pc-ddmi { color: color-mix(in srgb, var(--muted) 75%, var(--surface)); font-weight: 400; font-size: 13px; white-space: nowrap; flex: none; }
.pc-clw:has(.pc-clin.open) .pc-clg { display: none; }
.pc-ddmi { margin-left: 8px; }
/* Price Rules changed since the quote's rates */
.pc-ratealert { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px 10px 14px; border: 1px solid var(--need); background: var(--need-soft); border-radius: 10px; font-size: 14.5px; color: var(--ink); }
.pc-ratealert svg { flex: none; }
.pc-ratealert .btn { margin-left: auto; }
/* Trips & Time: one tile per count, explanations behind How it's figured */
.oa-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; padding: 24px; align-items: start; }
.oa-tile { border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; background: color-mix(in srgb, var(--surface-2) 60%, var(--surface)); }
.oa-lab { font-size: 14px; font-weight: 600; }
.oa-row { display: flex; align-items: center; gap: 8px; }
.pc-page .oa-row input.oa-in, .pc-page .oa-water input.oa-in { width: 68px; min-width: 0; flex: none; }
.oa-x, .oa-eq { font-size: 15px; white-space: nowrap; }
.oa-amt { font-size: 19px; }
.oa-amtc { flex: 1 1 auto; text-align: center; }
.oa-how { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
.oa-how svg { width: 12px; height: 12px; transition: transform .15s; }
.oa-how[aria-expanded="true"] svg { transform: rotate(180deg); }
.oa-why { margin: 0; font-size: 13px; color: var(--muted); background: var(--surface); border-radius: 8px; padding: 10px 12px; }
.oa-why b { font-weight: 600; color: var(--ink); }
.oa-why .pc-dol { margin-top: 6px; }
.oa-ed { font-size: 12.5px; color: var(--muted); margin: -2px 0 0; }
.oa-foot { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; padding: 20px 24px; border-top: 1px solid var(--line); }
.oa-foot .pc-lnk { margin-left: auto; }
.oa-det { padding: 0 24px 24px; }
.oa-water { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.oa-water .oa-how { margin-left: auto; align-self: center; }
.oa-note2 { font-size: 13px; }
.oa-wwhy { flex-basis: 100%; background: var(--pc-panel); }
@media (max-width: 820px) { .oa-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
/* Other Items: simple rows that open */
.ob-list { display: flex; flex-direction: column; gap: 8px; }
.ob-row { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.ob-row.open { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.ob-sum { display: grid; grid-template-columns: 28px minmax(0,1fr) auto 120px 32px; gap: 10px; align-items: center; padding: 10px 12px; cursor: pointer; }
.ob-tog { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; padding: 0; }
.ob-tog svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ob-tog.up svg { transform: rotate(180deg); }
.ob-name { display: flex; flex-direction: column; min-width: 0; }
.ob-name b { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ob-name b.ph { color: var(--muted); font-weight: 400; }
.ob-name small { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ob-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.ob-tag { font-size: 12.5px; padding: 3px 9px; border-radius: 999px; white-space: nowrap; font-weight: 500; }
.ob-tag.t0 { background: var(--surface-2); color: var(--muted); }
.ob-tag.t1 { background: var(--inst-soft); color: var(--inst); }
.ob-tag.t2 { background: var(--ord-soft); color: var(--ord); }
.ob-tag.t3 { background: var(--accent-soft); color: var(--accent); }
.ob-tag.ta { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.ob-amt { text-align: right; font-family: var(--f-mono); font-size: 16px; font-weight: 600; }
.ob-body { border-top: 1px solid var(--line); padding: 16px 16px 18px 50px; display: grid; gap: 16px; }
.ob-grid { display: grid; grid-template-columns: minmax(0,1fr) 170px 100px 130px; gap: 12px; }
.ob-grid.both { grid-template-columns: minmax(0,1fr) 170px 100px 120px 120px; }
.ob-f { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ob-f > .fl { font-size: 13px; font-weight: 600; }
.ob-f > .fl em { font-style: normal; font-weight: 400; color: var(--muted); }
.ob-shows { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; }
.ob-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.ob-opt > b { font-size: 14px; font-weight: 600; color: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ob-opt > b { color: #fff; } }
:root[data-theme="dark"] .ob-opt > b { color: #fff; }
.ob-opt > span { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.ob-opt.sel { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.ob-pair { display: grid; grid-template-columns: 240px minmax(0,1fr); gap: 12px; align-items: start; }
.ob-hint { font-size: 12.5px; color: var(--muted); margin: 0; }
.ob-na { font-size: 13.5px; color: var(--muted); padding-top: 10px; }
.ob-docs { display: grid; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.ob-dh { margin: 0; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.ob-rte { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); overflow: hidden; }
.ob-rte:focus-within { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.ob-tb { display: flex; align-items: center; gap: 4px; padding: 6px 8px; border-bottom: 1px solid var(--line); background: var(--surface-2); flex-wrap: wrap; }
.ob-tb button { min-width: 32px; height: 30px; padding: 0 8px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; }
.ob-tb button:hover, .ob-tb button[aria-pressed="true"] { background: var(--surface); border-color: var(--line); }
.ob-sep { width: 1px; height: 18px; background: var(--line); margin: 0 4px; }
.ob-keys { margin-left: auto; font-size: 12px; color: var(--muted); }
.pc-page .ob-rte .doc-rt { border: 0; border-radius: 0; min-height: 70px; padding: 10px 12px; font-size: 14.5px; line-height: 1.45; background: transparent; box-shadow: none; outline: none; }
.ob-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.ob-foot .btn { display: inline-flex; align-items: center; gap: 6px; }
.ob-foot svg, .ob-addbar svg, .ob-saved svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.ob-saved svg { fill: currentColor; }
.ob-saved { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--accent); }
.ob-fnote { font-size: 12.5px; color: var(--muted); }
.ob-addbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; position: relative; justify-self: start; }
.ob-addbar .btn { display: inline-flex; align-items: center; gap: 6px; }
.ob-pop { position: absolute; left: 0; bottom: calc(100% + 6px); width: min(600px, calc(100vw - 32px)); z-index: 20; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgb(0 0 0 / .22); padding: 10px; display: grid; gap: 6px; }
.ob-pl { display: grid; gap: 2px; max-height: 360px; overflow: auto; }
.ob-pi { display: grid; grid-template-columns: minmax(0,1fr) auto 96px; gap: 12px; align-items: center; padding: 9px 10px; border-radius: 8px; cursor: pointer; border: 0; background: transparent; text-align: left; font: inherit; color: var(--ink); }
.ob-pi:hover, .ob-pi:focus-visible { background: var(--surface-2); }
.ob-pin { display: flex; flex-direction: column; min-width: 0; }
.ob-pin > b { font-size: 14.5px; font-weight: 600; }
.ob-pin > small { font-size: 12.5px; color: var(--muted); }
.ob-pamt { text-align: right; font-family: var(--f-mono); font-size: 14px; font-weight: 600; }
.ob-pfoot { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding: 8px 4px 0; font-size: 12.5px; color: var(--muted); }
.ob-mg { display: grid; gap: 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.ob-mgh { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
.ob-mgh > h4 { margin: 0; font-size: 16px; }
.ob-mgh > .btn { margin-left: auto; }
.ob-mr { display: grid; grid-template-columns: minmax(0,1fr) auto auto 32px; gap: 12px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.ob-ren { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.ob-ren svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.pc-page input.ob-rin { flex: 1; min-width: 0; min-height: 0; font: inherit; font-size: 14.5px; font-weight: 600; color: var(--ink); background: transparent; border: 1px solid transparent; border-radius: 6px; padding: 3px 6px; margin-left: -7px; }
.pc-page input.ob-rin:hover { border-color: var(--line); }
.pc-page input.ob-rin:focus { border-color: var(--accent); background: var(--surface); outline: none; box-shadow: 0 0 0 2px var(--accent-soft); }
.ob-ms { position: relative; }
.ob-msb { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; text-align: left; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; cursor: pointer; min-height: 40px; box-sizing: border-box; }
.ob-msb svg { width: 12px; height: 12px; flex: none; fill: none; stroke: var(--muted); stroke-width: 1.6; stroke-linecap: round; }
.ob-msv { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ob-msp { position: absolute; left: 0; top: calc(100% + 4px); z-index: 25; scroll-margin-bottom: 110px; width: min(340px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgb(0 0 0 / .22); padding: 6px; display: grid; }
.ob-mso { display: grid; grid-template-columns: 20px minmax(0,1fr) auto; gap: 8px; align-items: center; padding: 7px 8px; border-radius: 6px; cursor: pointer; font-size: 14px; }
.ob-mso:hover { background: var(--surface-2); }
.ob-mso input { margin: 0; width: 16px; height: 16px; accent-color: var(--accent); }
.ob-msall { border-bottom: 1px solid var(--line); border-radius: 6px 6px 0 0; margin-bottom: 4px; padding-bottom: 9px; }
.ob-msall > .ob-msn { font-weight: 600; }
.ob-mss { font-family: var(--f-mono); font-size: 12.5px; color: var(--muted); }
.ob-msall > .ob-mss { font-family: inherit; }
.ob-msf { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); margin-top: 4px; padding: 8px 4px 2px; font-size: 12.5px; color: var(--muted); }
/* total bar: background the full width of the page, contents in the page column; no label unless the bundle discount is on */
:root[data-sec="pricing"] .app { container-type: inline-size; } /* the total bar spans the app column, beside the sidebar */
.pc-quote .pc-tbar { margin-left: calc(50% - 50cqw); margin-right: calc(50% - 50cqw); padding-left: calc(50cqw - 50%); padding-right: calc(50cqw - 50%); }
.pc-quote .pc-tbr { min-height: 82px; box-sizing: border-box; }
.pc-tbm { display: flex; align-items: center; gap: 6px 16px; flex-wrap: wrap; }
.pc-tbr .pc-tbm .big { font-size: 28px; }
.pc-tbhrs { line-height: 1.4; }
.pc-tbrnd { grid-column: 1 / -1; font-size: 13px; color: var(--muted); margin: 0; }
.pc-tbrnd b { color: var(--ink); font-weight: 500; }
@media (max-width: 720px) {
  .pc-quote h2 { font-size: 26px; }
  .pc-quote h3 { font-size: 20px; }
  .pc-quote .pc-ch { padding: 14px 16px; min-height: 58px; }
  .pc-quote .pc-ch > .muted { font-size: 14px; }
  .pc-quote .pc-cb { padding: 14px 16px 16px; }
  .pc-quote .pc-det { padding: 16px; grid-template-columns: minmax(0,1fr) auto; }
  .pc-quote .pc-det .pc-clf { grid-column: 1 / -1; }
  .pc-notesc { grid-column: 1 / -1; }
  .pc-notesf { grid-column: 1 / -1; }
  .oa-grid { grid-template-columns: minmax(0,1fr); padding: 16px; }
  .oa-foot { padding: 14px 16px; }
  .oa-det { padding: 0 16px 16px; }
  .ob-sum { grid-template-columns: 28px minmax(0,1fr) auto 32px; }
  .ob-sum .ob-tags { grid-column: 2 / 4; grid-row: 2; justify-content: flex-start; }
  .ob-name b, .ob-name small { white-space: normal; }
  .ob-body { padding: 14px 12px 16px; }
  .ob-grid, .ob-grid.both { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .ob-grid > .ob-f:first-child { grid-column: 1 / -1; }
  .ob-shows { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .ob-pair { grid-template-columns: minmax(0,1fr); }
  .ob-keys { display: none; }
  .ob-pi { grid-template-columns: minmax(0,1fr) auto; }
  .ob-pi .ob-tag { display: none; }
  .ob-mr { grid-template-columns: minmax(0,1fr) auto 32px; }
  .ob-mr .ob-tag { display: none; }
  .pc-tbr .pc-tbm .big { font-size: 24px; }
  .pc-clg { font-size: 16px; }
}
/* ---------- Document screen (proposals & contracts): details on the left, the PDF pages on the right ---------- */
:root[data-sec="pricing"][data-pcdoc] .wrap { max-width: 1480px; }
.doc-page { container-type: inline-size; }
/* quote page header buttons: the size of the To Install row buttons (.crow .card-areas .btn: 34px, 0 12px, 13.5px, 16px icon) */
.pc-qbs { display: inline-flex; flex-wrap: wrap; gap: 8px; align-self: center; }
.pc-page :is(.pc-qh, .pc-tbr) .btn, .pc-quote .btn:is([data-pc="area-add"], [data-pc="plant-add"], [data-pc="o-add"], .pc-addf .btn) { height: 34px; min-height: 34px; font-size: 13.5px; gap: 6px; }
.pc-page :is(.pc-qh, .pc-tbr) .btn:not(.ghost), .pc-quote .btn:not(.ghost):is([data-pc="area-add"], [data-pc="plant-add"], [data-pc="o-add"], .pc-addf .btn) { padding: 0 12px; }
@media (max-width: 560px) { .pc-page :is(.pc-qh, .pc-tbr) .btn:not(.ghost), .pc-quote .btn:not(.ghost):is([data-pc="area-add"], [data-pc="plant-add"], [data-pc="o-add"], .pc-addf .btn) { padding: 0 10px; } }
/* total bar: Bundle discount and Proposal & Contract, beside Show breakdown; on phones they share a row under the total */
.pc-tba { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
@media (max-width: 720px) { .pc-tbr .pc-tba { order: 3; flex-basis: 100%; justify-content: space-between; } .pc-tbr .pc-tba .pc-chk { order: 0; flex-basis: auto; } }
.pc-tbd { color: color-mix(in srgb, var(--inst) 75%, var(--ink)); }
.doc-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.doc-tt { margin-right: auto; min-width: 0; display: grid; gap: 2px; }
.doc-tt h2 { overflow-wrap: anywhere; }
.doc-tt .muted, .doc-st { font-size: 13.5px; }
.doc-st:empty { display: none; }
.doc-grid { display: grid; grid-template-columns: minmax(0, clamp(300px, 40%, 420px)) minmax(0, 1fr); gap: 16px; align-items: start; }
.doc-form { display: grid; gap: 12px; min-width: 0; align-content: start; }
.doc-gb { display: grid; gap: 12px; padding: 0 14px 16px; }
.doc-rs { justify-self: start; }
.doc-gb p { margin: 0; }
.doc-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.doc-ih { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--pc-ink2); padding-top: 4px; }
.doc-ih + .pc-f { margin-top: -4px; }
.doc-tl, .doc-ul { display: grid; gap: 6px; }
.doc-tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 6px; }
.doc-li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px; align-items: start; }
.pc-page .doc-li textarea, .pc-page .doc-gb textarea { resize: none; overflow: hidden; line-height: 1.4; min-height: 40px; }
.doc-lb { display: flex; }
/* formatted text boxes (bold, italic, underline): look like the app's text boxes */
.doc-rt { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; min-height: 40px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; cursor: text; color: var(--ink); }
.doc-rt.multi { min-height: 64px; }
.doc-rt.multi > div + div { margin-top: 6px; }
.doc-rt:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
.doc-rt:empty::before { content: attr(data-ph); color: color-mix(in srgb, var(--muted) 80%, var(--surface)); pointer-events: none; }
.doc-rt b, .doc-rt strong { font-weight: 600; }
@media (max-width: 720px) { .doc-rt { font-size: 16px; } }
.doc-kb { font-family: var(--f-body); }
.doc-addr { display: grid; grid-template-columns: minmax(0, 1fr) 64px 96px; gap: 8px; }
/* Save PDF window (pdfSaveDialog) */
.psd-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; align-items: start; }
.psd-th { border-radius: 4px; box-shadow: 0 0 0 1px var(--line), 0 2px 8px rgb(0 0 0 / .08); background: var(--surface-2); min-height: 116px; overflow: hidden; }
.psd-th.on { background: #fff; min-height: 0; }
.psd-th canvas { display: block; width: 100%; height: auto; }
.psd-info { display: grid; gap: 10px; min-width: 0; }
.psd-f { display: grid; gap: 5px; }
.psd-f label { font-size: 13px; font-weight: 600; }
.psd-name { display: flex; align-items: flex-end; gap: 6px; }
.psd-name textarea { flex: 1; min-width: 0; resize: none; overflow: hidden; line-height: 1.4; }
.psd-name span, .psd-pages, .psd-note { font-size: 13.5px; }
.psd-name span { color: var(--muted); padding-bottom: 10px; }
.psd-err { margin: 0; font-size: 13.5px; color: var(--danger); }
@media (max-width: 560px) { .psd-row { grid-template-columns: minmax(0, 1fr); } .psd-th { width: 140px; } }
/* the Notes box: one editor, a bulleted line is <div class="li"> */
.doc-ntb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.pc-page .doc-ltog { height: 32px; min-height: 32px; padding: 0 12px; font-size: 13.5px; }
.doc-ltog[aria-pressed="true"] { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); color: var(--accent); }
.doc-notes { min-height: 96px; }
.doc-rt.multi.doc-notes > div + div { margin-top: 4px; }
.doc-notes > div.li { position: relative; padding-left: 18px; }
.doc-notes > div.li::before { content: ""; position: absolute; left: 5px; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.doc-notes > div.li + div:not(.li), .doc-notes > div:not(.li) + div.li { margin-top: 8px; }
.pc-page .doc-tx { resize: none; overflow: hidden; line-height: 1.4; min-height: 40px; }
.doc-std { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: 13.5px; }
.doc-lb .pc-eb { width: 30px; height: 40px; }
.doc-lb .pc-eb:disabled { opacity: .3; cursor: default; background: none; }
.doc-add { justify-self: start; margin-left: -8px; }
.doc-rows { display: grid; }
.doc-rows .pc-srow { font-size: 14px; }
.doc-rows .doc-disc { color: color-mix(in srgb, var(--inst) 75%, var(--ink)); }
.doc-rows .doc-tot, .doc-rows .doc-due { font-weight: 600; }
.doc-rows .doc-tot { border-top-color: var(--line); }
.doc-hin { margin: -8px 0 0 24px; }
.doc-ao, .doc-oi { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; font-size: 14px; padding-top: 8px; border-top: 1px solid var(--pc-l2); }
.doc-ao .num, .doc-oi .num { font-size: 13px; margin-left: 4px; }
.pc-page .doc-oi select { width: auto; max-width: 100%; min-height: 36px; padding-top: 4px; padding-bottom: 4px; }
.doc-bdate { max-width: 200px; margin: -4px 0 0 24px; }
.doc-prev { position: sticky; top: calc(var(--toph, 0px) + 12px); max-height: calc(100dvh - var(--toph, 0px) - 24px); overflow: auto; overscroll-behavior: contain; background: var(--pc-panel); }
.doc-pages { display: grid; gap: 14px; padding: 14px; transition: opacity .2s; }
.doc-pages:empty { display: none; }
.doc-pages.stale { opacity: .45; }
.doc-pg { background: #fff; border-radius: 3px; box-shadow: 0 0 0 1px var(--line), 0 2px 8px rgb(0 0 0 / .08); overflow: hidden; }
.doc-pg canvas { display: block; width: 100%; height: auto; }
.doc-load { margin: 14px; }
.doc-err { margin: 14px 14px 0; padding: 12px 14px; border-radius: 8px; background: var(--danger-soft); font-size: 14px; }
.doc-err b { color: var(--danger); font-weight: 600; }
.doc-err pre { margin: 8px 0 0; font: 12px/1.45 var(--f-mono); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 240px; overflow: auto; }
.doc-warn { font-size: 13.5px; }
/* map photo (Date & Locations) and the "Missing area photos" notice */
.doc-mapask { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.doc-mab { display: inline-flex; gap: 6px; }
.pc-page .doc-mab .btn { height: 32px; min-height: 32px; padding: 0 12px; font-size: 13.5px; }
.doc-map0 { display: grid; gap: 6px; justify-items: start; }
.doc-map { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; align-items: start; }
.doc-mth { padding: 0; border: 0; background: var(--surface-2); border-radius: 6px; overflow: hidden; cursor: pointer; box-shadow: 0 0 0 1px var(--line); line-height: 0; }
.doc-mth:hover { box-shadow: 0 0 0 2px var(--accent); }
.doc-mth img { width: 112px; height: 84px; object-fit: cover; display: block; }
.doc-mi { display: grid; gap: 4px; min-width: 0; font-size: 14px; }
.doc-mi .muted { font-size: 12.5px; }
.doc-mbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 2px; }
.pc-page .doc-mbs .btn { height: 32px; min-height: 32px; font-size: 13.5px; }
.pc-page .doc-mbs .btn.secondary { padding: 0 12px; }
.doc-mapb { grid-template-columns: auto minmax(0, 1fr); align-items: center; padding: 10px 12px; border-radius: 8px; background: var(--pc-panel); border: 1px solid var(--pc-l2); font-size: 14px; }
.doc-mapb b { font-weight: 600; }
.doc-spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--accent-soft); border-top-color: var(--accent); animation: doc-spin .8s linear infinite; }
@keyframes doc-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .doc-spin { animation-duration: 2.4s; } }
/* showcase pages on a proposal */
.doc-scl { align-items: center; }
.doc-scl .pc-chk { align-items: flex-start; line-height: 1.35; padding: 8px 0; }
.doc-scl .pc-chk input { margin-top: 2px; }
.doc-scl .muted { font-size: 12.5px; }
/* Settings › Documents, and the Showcase Library window */
.set-item.doc-si { cursor: default; flex-wrap: wrap; }
.doc-sbs { display: inline-flex; gap: 6px; }
.doc-sbs .btn { height: 34px; padding: 0 12px; font-size: 13.5px; }
.doc-lcs { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.doc-lc { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.doc-lc img, .doc-lth { width: 96px; aspect-ratio: 11 / 8.5; object-fit: cover; object-position: top; border-radius: 4px; box-shadow: 0 0 0 1px var(--line); background: var(--surface-2); display: block; }
.doc-lci { display: grid; gap: 6px; min-width: 0; align-content: start; }
.doc-lci > .muted { font-size: 12.5px; overflow-wrap: anywhere; }
.doc-lci input[type=text] { font-weight: 600; }
.doc-lcb { display: flex; flex-wrap: wrap; align-items: center; gap: 0 2px; margin-left: -6px; }
.doc-lcb .pc-eb { width: 30px; height: 32px; }
.doc-lcb .pc-eb:disabled { opacity: .3; cursor: default; background: none; }
.doc-lcb .btn { font-size: 13.5px; padding: 4px 8px; }
.doc-lsum { margin-right: auto; align-self: center; font-size: 13.5px; }
@media (max-width: 560px) { .doc-lc { grid-template-columns: 72px minmax(0, 1fr); } .doc-lc img, .doc-lth { width: 72px; } .doc-map { grid-template-columns: 88px minmax(0, 1fr); } .doc-mth img { width: 88px; height: 66px; } }
@container (max-width: 820px) { .doc-grid { grid-template-columns: minmax(0, 1fr); } .doc-prev { position: static; max-height: none; overflow: visible; } }
@media (max-width: 720px) { .doc-2 { grid-template-columns: minmax(0, 1fr); } .doc-pages { padding: 10px; gap: 10px; } }

/* import: the counts table */
.imp-counts{display:grid;grid-template-columns:1fr auto;gap:4px 16px;max-width:320px;margin:0 0 10px;font-size:14px}
.imp-counts .num{text-align:right}
