:root {
  --pad: #f7f5f2;
  --grid: #ebe6df;
  --sheet: #ffffff;
  --field: #ffffff;
  --ink: #1c1917;
  --header: #292524;
  --graphite: #45556c;
  --line: #c9c2b8;
  --pencil: #b3261e;
  --steel: #2a5ea8;
  --concrete: #e4ded7;
  --body: 'Archivo', 'Segoe UI', sans-serif;
  --head: 'Archivo', 'Arial Narrow', sans-serif;
  --accent: #7a1f2b;
  --accent-dark: #5c1520;
  --accent-tint: #f6e9eb;
  --link: #7a1f2b;
  --muted: #657684;
  --hand: 'Architects Daughter', 'Comic Sans MS', cursive;
  --title-h: 84px;
  --top-h: 124px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  font: 400 16px/1.45 var(--body);
  background-color: var(--pad);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
  font-variant-numeric: tabular-nums;
}

h2, h3, h4 { font-family: var(--head); font-weight: 700; line-height: 1.15; margin: 0; }
h2 { font-size: 30px; margin-bottom: 8px; }
h3 { font-size: 20px; margin: 24px 0 10px; }
h4 { font-size: 17px; }

button, input, select { font: inherit; color: inherit; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }

.titleblock {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  height: var(--title-h);
  padding: 12px 24px 10px;
  background: var(--header);
  color: var(--sheet);
  position: sticky;
  top: 0;
  z-index: 21; /* above the tab bar, so the search list is not hidden under it */
}
.titleblock-left { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; }
.brand-home { flex: none; padding: 0; border: 0; background: none; line-height: 0; cursor: pointer; }
.brand-mark { flex: none; height: 58px; width: auto; }
.titleblock-search { position: relative; flex: 1 1 320px; max-width: 420px; align-self: center; margin: 0 0 12px; }
.boq-head > .titleblock-search { margin: 0 auto 0 24px; }
.titleblock-left { flex: 1 1 240px; min-width: 200px; }
@media (max-width: 1100px) { .user-meta { display: none; } .titleblock-search { flex: 1 1 180px; min-width: 140px; } .titleblock { gap: 14px; } }
.titleblock-search input { width: 100%; min-height: 38px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 3px; background: #fff; color: var(--ink); }
.titleblock-search input::placeholder { color: var(--muted); }
.titleblock-search input:focus { border-color: var(--accent); outline: none; }
.search-results { position: absolute; top: calc(100% + 4px); left: 0; right: 0; min-width: 320px; overflow-x: hidden; z-index: 50; max-height: 360px; overflow-y: auto; border: 1px solid var(--concrete); border-radius: 4px; background: #fff; box-shadow: 0 14px 32px rgba(28, 25, 23, 0.2); }
.search-results button { display: flex; justify-content: space-between; gap: 12px; width: 100%; padding: 9px 12px; border: 0; border-bottom: 1px solid var(--pad); background: #fff; color: var(--ink); text-align: left; cursor: pointer; }
.search-results button:hover, .search-results button[aria-selected="true"] { background: var(--pad); }
.search-results small { flex: none; color: var(--muted); }
.search-empty { margin: 0; padding: 10px 12px; color: var(--muted); }
.rate-found td { background: #fdecc8; }
.titleblock-actions { display: flex; flex: none; align-self: center; gap: 8px; }
.titleblock-actions button { min-height: 38px; padding: 6px 16px; border: 1px solid #78716c; border-radius: 3px; background: transparent; color: #fff; font-weight: 600; cursor: pointer; }
.titleblock-actions button:hover { background: #44403c; }
.titleblock-actions button:disabled { opacity: 0.4; cursor: default; background: transparent; }
.titleblock-user { display: flex; align-items: center; gap: 8px; margin-left: 8px; color: #ece7e0; font-size: 14px; }

[hidden] { display: none !important; }
.signed-out .titleblock, .signed-out .tabs, .signed-out main { display: none; }
#signin { min-height: 100vh; background: var(--pad); }
.brand-lockup { display: flex; align-items: center; gap: 12px; color: #fff; font-size: 14px; font-weight: 600; letter-spacing: 0.24em; }
.paywall-bar .brand-mark { height: 38px; }
.signup-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 64px; align-items: center; max-width: 1180px; margin: 0 auto; padding: 56px 32px 64px; }
.signup-hero h1 { margin: 0 0 22px; font: 800 66px/1 var(--head); font-stretch: 112%; letter-spacing: -0.035em; color: var(--ink); }
.signup-hero h1 span { color: var(--accent); }
.signup-list { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--concrete); color: var(--graphite); font-size: 15px; }
.signup-card { padding: 32px; border-color: #dbe3e8; box-shadow: 0 18px 40px rgba(28, 25, 23, 0.08); background-color: #fff; background-image: linear-gradient(#f1f5f7 1px, transparent 1px), linear-gradient(90deg, #f1f5f7 1px, transparent 1px); background-size: 28px 28px; }
.signup-card h2 { font-size: 26px; letter-spacing: -0.02em; }
.signup-intro { max-width: 58ch; margin: 0; font-size: 18px; line-height: 1.55; color: var(--graphite); }
.signup-note { font-size: 14px; color: var(--graphite); }
.signup-note a, .legal a { color: var(--link); }
.legal-page { background: var(--pad); }
.legal { max-width: 760px; margin: 0 auto; padding: 36px 24px 64px; }
.legal h1 { margin: 0 0 4px; font: 800 44px/1.05 var(--head); font-stretch: 112%; letter-spacing: -0.03em; }
.legal h2 { margin: 28px 0 8px; font: 800 20px/1.25 var(--head); }
.legal p, .legal li { line-height: 1.6; }
.legal p { margin: 0 0 10px; }
.legal ul { margin: 0 0 10px; padding-left: 20px; }
.legal-date { color: var(--muted); }
.legal-draft { display: inline-block; padding: 6px 10px; border: 1px solid var(--accent); color: var(--link); font-weight: 700; }
.legal-links { margin-top: 32px !important; }
.signup-list .pay-features { display: grid; gap: 10px; padding: 0; list-style: none; font-size: 16px; font-weight: 500; }
.signup-list .pay-features li { position: relative; padding-left: 28px; }
.signup-list .pay-features li::before { content: "✓"; position: absolute; left: 2px; font-weight: 800; color: var(--accent); }
.google-button { display: flex; justify-content: center; min-height: 44px; }
.signup-or { text-align: center; color: var(--graphite); }
.otp-form { display: grid; gap: 12px; }
.otp-form .notice { margin: 0; }
.otp-form button { min-height: 44px; cursor: pointer; }
.otp-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.otp-choice button { border: 1px solid var(--line); border-radius: 3px; background: var(--field); font-weight: 600; }
.otp-choice button { color: var(--graphite); }
.otp-choice button[aria-pressed="true"] { border-color: var(--ink); background: var(--concrete); color: var(--ink); }
.user-meta { display: grid; justify-items: end; line-height: 1.2; }
#access-timer { font-size: 12px; font-weight: 600; color: #ffffff; white-space: nowrap; }
#paywall { min-height: 100vh; background: var(--pad); }
.paywall-bar { display: flex; justify-content: space-between; align-items: center; padding: 12px 24px; background: var(--header); }
.paywall-bar button { min-height: 38px; padding: 6px 16px; border: 1px solid #78716c; border-radius: 3px; background: transparent; color: #fff; font-weight: 600; cursor: pointer; }
.paywall-body { max-width: 980px; margin: 0 auto; padding: 28px 24px 48px; }
.paywall-kicker { margin: 0 0 10px; font-size: 13px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.paywall-body h1 { margin: 0 0 16px; font: 800 44px/1.04 var(--head); font-stretch: 112%; letter-spacing: -0.03em; color: var(--ink); }
.paywall-steps { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; padding: 0; list-style: none; counter-reset: pay-step; }
.paywall-steps li { counter-increment: pay-step; padding: 6px 12px; border: 1px solid var(--line); border-radius: 3px; background: var(--sheet); font-size: 14px; font-weight: 500; }
.paywall-steps li::before { content: counter(pay-step) ". "; font-weight: 700; }
.paywall-body .notice { margin: 0 0 16px; }
.paywall-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.paywall-column { display: grid; gap: 16px; }
.pay-card { display: grid; gap: 12px; padding: 20px; border: 1px solid #dbe3e8; border-radius: 2px; background: var(--sheet); }
.pay-card h2 { margin: 0; font: 800 20px/1.2 var(--head); font-stretch: 112%; color: var(--ink); }
.pay-card p, .pay-card ul { margin: 0; }
.pay-card .lead { margin: 0; }
/* Plan cards on the payment page: a Monthly and Yearly switch, then one card per plan. */
.billing-toggle { display: flex; width: max-content; margin: 0 auto 16px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--sheet); }
.billing-toggle button { padding: 7px 18px; border: 0; border-radius: 999px; background: transparent; color: var(--graphite); font-weight: 600; cursor: pointer; }
.billing-toggle button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.plan-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 0 0 20px; }
.plan-card { display: flex; flex-direction: column; gap: 12px; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--sheet); }
.plan-card.is-chosen { border: 2px solid var(--accent); padding: 21px; background: var(--accent-tint); box-shadow: 0 6px 18px rgba(122, 31, 43, 0.14); }
.plan-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.plan-card-top strong { font-size: 15px; }
.plan-badge { padding: 3px 9px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.plan-card h3 { margin: 0; font: 800 22px/1.15 var(--head); font-stretch: 112%; }
.plan-card .plan-tagline { margin: -6px 0 0; font-size: 14px; opacity: 0.8; }
/* The founding slots left: the one line that should catch the eye. */
.plan-card .plan-slots { justify-self: start; width: max-content; max-width: 100%; margin: -4px 0 0; padding: 5px 10px; border: 1px solid var(--accent); border-radius: 999px; background: #fff; color: var(--accent); font-size: 13px; font-weight: 700; opacity: 1; }
.plan-card .plan-choose { width: 100%; padding: 11px; border: 1px solid var(--ink); border-radius: 999px; background: var(--sheet); color: var(--ink); font-weight: 700; cursor: pointer; }
.plan-card.is-chosen .plan-choose { border-color: var(--accent); background: var(--accent); color: #fff; }
.plan-card .plan-amount strong { color: var(--accent); }
.plan-amount { margin: 0; font-size: 14px; opacity: 0.85; }
.plan-amount strong { font: 800 34px/1 var(--head); opacity: 1; }
.plan-amount s { margin-right: 4px; font-size: 16px; }
.plan-note { margin: -6px 0 0; font-size: 13px; opacity: 0.85; }
.plan-card ul { display: grid; gap: 8px; margin: 4px 0 0; padding: 0; list-style: none; font-size: 14px; }
.plan-card li { position: relative; padding-left: 22px; }
.plan-card li::before { content: "✓"; position: absolute; left: 0; font-weight: 800; }
.pay-price { white-space: nowrap; color: var(--graphite); }
.pay-price strong { font: 800 32px/1 var(--head); color: var(--accent); }
.pay-term { font-weight: 600; }
.pay-features { padding-left: 18px; }
.pay-qr { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.pay-qr img { width: 170px; height: 170px; object-fit: contain; border: 1px solid var(--line); background: #fff; }
.pay-qr dl { margin: 0; }
.pay-qr dt { font-size: 13px; color: var(--graphite); }
.pay-qr dd { margin: 0 0 8px; font-size: 18px; font-weight: 600; overflow-wrap: anywhere; }
#pay-form button { min-height: 44px; cursor: pointer; }
.pay-receipt { max-width: 340px; max-height: 520px; margin-top: 10px; border: 1px solid var(--line); }
.pay-qr-saved { width: 90px; height: 90px; object-fit: contain; border: 1px solid var(--line); background: #fff; }
@media (max-width: 760px) {
  .paywall-grid, .signup-grid { grid-template-columns: minmax(0, 1fr); }
  .signup-grid { display: flex; flex-direction: column; align-items: stretch; gap: 12px; padding: 28px 16px 40px; }
  .signup-hero { display: contents; }
  .signup-hero h1 { margin: 0; font-size: 44px; }
  .paywall-kicker { margin-bottom: 0; }
  .signup-side { order: 2; margin-top: 6px; }
  .signup-list { order: 3; margin-top: 8px; }
  .paywall-body { padding: 20px 16px 36px; }
  .paywall-body h1 { font-size: 30px; }
  .paywall-bar { padding: 10px 16px; }
}
.rates input.access-days { width: 72px; min-width: 72px; }
.helper-toggle { position: fixed; right: 20px; bottom: 20px; z-index: 40; display: flex; align-items: center; gap: 8px; padding: 8px 16px 8px 8px; border: 0; border-radius: 999px; background: var(--header); color: #fff; font-weight: 700; box-shadow: 0 8px 24px rgba(28, 25, 23, 0.25); cursor: pointer; }
.helper-toggle img { width: 34px; height: 34px; }
.helper-toggle:hover { background: #44403c; }
.helper-panel { position: fixed; right: 20px; bottom: 80px; z-index: 41; display: flex; flex-direction: column; width: min(380px, calc(100vw - 32px)); height: min(520px, calc(100vh - 120px)); border: 1px solid var(--concrete); border-radius: 6px; background: #fff; box-shadow: 0 18px 40px rgba(28, 25, 23, 0.18); }
.helper-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-radius: 6px 6px 0 0; background: var(--header); color: #fff; }
.helper-head button { border: 0; background: none; color: #fff; font-size: 24px; line-height: 1; cursor: pointer; }
.helper-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 14px; }
.helper-msg { max-width: 88%; margin: 0; padding: 9px 12px; border-radius: 10px; white-space: pre-wrap; line-height: 1.45; font-size: 15px; }
.helper-msg.user { align-self: flex-end; background: var(--accent); color: #fff; }
.helper-msg.assistant { align-self: flex-start; background: var(--pad); color: var(--ink); }
.helper-msg.thinking { color: var(--muted); font-style: italic; }
.helper-msg.error { color: var(--pencil); }
.helper-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--concrete); }
.helper-form input { flex: 1; min-width: 0; padding: 9px 10px; border: 1px solid var(--line); border-radius: 3px; }
.signed-out .helper-toggle, .signed-out .helper-panel { display: none; }
.save-error { position: fixed; right: 16px; bottom: 16px; left: 16px; z-index: 30; margin: 0; padding: 12px 16px; border-radius: 3px; background: var(--pencil); color: #fff; font-weight: 600; }
.titleblock-name { flex: 1; min-width: 0; }
.titleblock-name label, .titleblock-total span { display: block; font-size: 14px; color: #ece7e0; }
.titleblock-name input {
  width: 100%;
  max-width: 560px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid #78716c;
  background: transparent;
  color: #fff;
  font: 600 26px/1.3 var(--head);
}
.titleblock-name input::placeholder { color: #d6d3d1; }
/* Client and location beside the project name. */
.titleblock-left:has(.titleblock-info) { flex-wrap: wrap; row-gap: 6px; }
.titleblock-left:has(.titleblock-info) .titleblock-name { flex: 1 1 260px; min-width: 220px; }
.titleblock-info { display: flex; gap: 18px; flex: 1 1 320px; max-width: 480px; min-width: 0; align-self: flex-end; margin-bottom: 4px; }
.titleblock-info > div { flex: 1 1 0; min-width: 0; }
.titleblock-info label { display: block; font-size: 13px; color: #ece7e0; }
.titleblock-info input { width: 100%; padding: 2px 0; border: 0; border-bottom: 1px solid #78716c; background: transparent; color: #fff; font: 500 17px/1.3 var(--body, inherit); }
.titleblock-info input::placeholder { color: #a8a29e; }
.titleblock-info input:focus, .titleblock-name input:focus { outline: none; border-bottom-color: var(--accent); }

.titleblock-total { text-align: right; white-space: nowrap; }
.titleblock-total strong { font: 700 38px/1.05 var(--head); }

.tabs {
  padding: 0 24px;
  background: var(--header);
  position: sticky;
  top: var(--title-h);
  z-index: 20;
}
.tabs button {
  padding: 8px 20px;
  border: 0;
  border-radius: 6px 6px 0 0;
  background: #44403c;
  color: #ffffff;
  font: 600 18px var(--head);
  cursor: pointer;
}
.tabs button[aria-current] { background: var(--sheet); color: var(--ink); }
.side-tabs { display: flex; gap: 2px; margin-left: auto; }
.feedback-form { display: grid; gap: 8px; max-width: 640px; margin-bottom: 28px; }
.feedback-form select { max-width: 260px; }
.feedback-form textarea { width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 3px; font: inherit; }
.feedback-send { display: flex; align-items: center; gap: 14px; }
.feedback-ok { color: var(--accent-dark); font-weight: 600; }
.feedback-photo { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.feedback-photo img { max-width: 220px; max-height: 160px; border: 1px solid var(--line); border-radius: 3px; }
.feedback-thumb { display: block; max-width: 240px; max-height: 180px; margin-top: 8px; border: 1px solid var(--line); border-radius: 3px; }
.feedback-list small { display: block; color: var(--muted); }
.feedback-text { white-space: pre-wrap; min-width: 280px; }
.boq-add-row td { padding: 6px 8px; background: var(--pad); }
.sched-date { white-space: nowrap; }
.sketch .win-frame { fill: #eef4f7; stroke: var(--ink); stroke-width: 3; }
.sketch .win-panel { fill: #dfeaf0; stroke: var(--ink); stroke-width: 1.4; }
.sketch .win-mark { stroke: var(--graphite); stroke-width: 1.2; }
.sketch .win-arrow { fill: var(--graphite); }
.sketch .win-hinge { fill: none; stroke: var(--graphite); stroke-width: 1.1; stroke-dasharray: 5 3; }
.sketch .win-label { fill: var(--graphite); font: 11px var(--body); }
.win-elev, td.win-elev-cell.sketch svg.win-elev { display: block; width: auto; max-width: none; margin: 0; border: 0; background: none; }
td.win-elev-cell.sketch { width: 240px; background: none; border-radius: 0; }
.win-elev-cell { padding: 6px 10px; }
.print-only { display: none; }
@media print { #print-area .print-only { display: block; } }
.sched-sheet td.sched-date { min-width: 10.6em; }
.sched-date input { width: 9.8em; min-width: 9.8em; padding: 4px 6px; border: 1px solid var(--line); border-radius: 3px; font: inherit; font-size: 14px; }
.sched-date input.own { border: 2px solid var(--accent); }
.sched-reset { display: block; margin-top: 2px; font-size: 12px; }
.boq-add-line { padding: 5px 12px; border: 1px dashed var(--accent); border-radius: 3px; background: #fff; color: var(--accent-dark); font-weight: 600; cursor: pointer; }
.boq-add-line:hover { background: var(--accent-tint); }
.boq-added input[type="text"] { width: 100%; min-width: 7em; }
.boq-added-code { padding-left: 26px; color: var(--muted); }
.tab-row { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.tab-row::-webkit-scrollbar { display: none; }
/* The project type bar above the tabs: the type picked is in the accent color. */
.type-bar { display: flex; align-items: center; gap: 6px; padding: 8px 0 10px; overflow-x: auto; }
.type-bar-label { margin-right: 6px; color: #d6d3d1; font-size: 14px; white-space: nowrap; }
.tabs .type-bar button { padding: 5px 14px; border: 1px solid #78716c; border-radius: 999px; background: transparent; color: #fff; font: 600 15px var(--body); white-space: nowrap; }
.tabs .type-bar button:hover { border-color: #fff; }
.tabs .type-bar button[aria-current] { border-color: var(--accent); background: var(--accent); color: #fff; }
.tabs .type-bar .type-soon { border-style: dashed; color: #d6d3d1; }
.side-tabs button { background: transparent; font-size: 16px; white-space: nowrap; }

.sheet { padding: 24px; background: var(--sheet); min-height: calc(100vh - 130px); }

.lead { margin: 0 0 16px; color: var(--graphite); max-width: 72ch; }
.muted { color: var(--graphite); }
.empty { padding: 56px 0; text-align: center; font-size: 18px; color: var(--graphite); }
.notice { margin: 14px 0 0; padding: 8px 12px; background: #ece7e0; border-left: 4px solid var(--ink); }
.flag { margin: 10px 0; color: var(--pencil); font-weight: 600; }
.flag-inline { color: var(--pencil); font-weight: 600; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

.reuse .picker { margin-top: 14px; }
.form-title { font-size: 24px; margin: 0 0 8px; }

.estimate-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; align-items: start; }
.estimate-nav p.nav-group-head { margin: 0; cursor: default; }
.nav-more { margin: 14px 0 0; font-size: 14px; }
.estimate-nav { position: sticky; top: calc(var(--top-h) + 12px); max-height: calc(100vh - var(--top-h) - 24px); overflow-y: auto; padding-right: 16px; border-right: 1px solid var(--line); }
.nav-group { border-bottom: 1px solid var(--line); }
.nav-group-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; width: 100%; padding: 9px 2px; border: 0; background: none; font: 600 18px var(--head); color: var(--ink); text-align: left; cursor: pointer; }
.nav-count { font-size: 14px; font-weight: 500; color: var(--graphite); white-space: nowrap; }
.item-tabs { display: flex; flex-direction: column; gap: 5px; margin: 0 2px 11px; }
.item-tab { width: 100%; text-align: left; padding: 7px 14px; border: 2px solid var(--line); border-radius: 3px; background: var(--field); font: 600 17px var(--head); color: var(--ink); cursor: pointer; }
.item-tab:hover { border-color: var(--ink); }
.item-tab.is-done { background: var(--field); border-color: var(--ink); color: var(--ink); }
.item-tab.is-none { background: #ece7e0; border-color: #ece7e0; color: var(--graphite); text-decoration: line-through; }
/* The item open now is in the accent color, so it stands out from the ones already done, which only carry a check. */
.item-tab[aria-current] { background: var(--accent); border-color: var(--accent); color: #fff; text-decoration: none; }
.nav-group-head[aria-expanded="true"] { background: #ece7e0; }
.item-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.added { list-style: none; margin: 0 0 16px; padding: 0; }
.added li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; padding: 7px 0; border-bottom: 1px solid var(--grid); }
.added-name { flex: 1 1 200px; }
.added-detail { flex: 1 1 200px; color: var(--graphite); font-size: 15px; }
.added-cost { font-weight: 600; white-space: nowrap; }
.added-row { cursor: pointer; padding-left: 8px !important; padding-right: 8px !important; border-left: 3px solid transparent; }
.added-row:hover, .added-row:focus-visible { background: var(--pad); outline: none; }
.added-row.is-editing { background: var(--pad); border-left-color: var(--accent); }
.linked { margin: 10px 0 0; padding: 10px 12px; background: var(--concrete); }
.linked p { margin: 0 0 4px; }
.picker { display: flex; flex-wrap: wrap; gap: 6px; }
.picker button, .actions button, .reuse li button {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--field);
  cursor: pointer;
}
.picker button { font: 600 17px var(--head); }
.picker button:hover, .actions button:hover, .reuse li button:hover { border-color: var(--ink); }
.picker button.active { background: var(--ink); color: #fff; border-color: var(--ink); }
button.primary, .actions button.primary {
  padding: 10px 22px;
  border: 1px solid var(--accent);
  border-radius: 3px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}
button.primary:hover:not(:disabled) { background: var(--accent-dark); border-color: var(--accent-dark); }
button.primary:disabled { opacity: 0.55; cursor: not-allowed; }
button.link { padding: 0; border: 0; background: none; color: var(--link); text-decoration: underline; cursor: pointer; font-weight: 600; }
button.link.danger { color: var(--pencil); }

.estimate-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 460px;
  gap: 32px;
  margin-top: 22px;
  align-items: start;
}
.drawing { position: sticky; top: calc(var(--top-h) + 12px); max-height: calc(100vh - var(--top-h) - 24px); overflow-y: auto; }

.field-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px 14px; }
.field-grid.narrow { max-width: 760px; }
.field-row { display: flex; flex-wrap: wrap; gap: 12px 14px; margin-top: 10px; }
.field-row .field { flex: 1 1 170px; }
.field label { display: block; margin-bottom: 3px; font-size: 14px; font-weight: 500; color: var(--graphite); }
.field input, .field select, .rates input {
  width: 100%;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--field);
}
.with-unit { display: flex; align-items: center; gap: 6px; }
.with-unit span { font-size: 14px; color: var(--graphite); }

.work { padding: 12px 0; border-top: 1px solid var(--line); }
.work-off .check { color: var(--graphite); }
#custom-form, #type-form { margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.estimate-grid { padding-top: 22px; border-top: 1px solid var(--line); }
#item-form h3:not(.form-title) { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.work-list { display: block; }
.work-list .work { padding: 14px 0; border-top: 1px solid var(--concrete); }
.work-list .work:first-child { padding-top: 2px; border-top: 0; }
.quick-question { font: 800 24px/1.2 var(--head) !important; font-stretch: 112%; color: var(--ink) !important; }
.quick-setup .field { max-width: 560px; margin-bottom: 20px; }
.quick-setup .field input { min-height: 46px; font-size: 17px; }
.quick-checklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px 28px; margin: 12px 0 20px; }
.quick-group { min-width: 0; margin: 0; padding: 0; border: 0; }
.quick-group legend, .quick-group h3 { margin: 0 0 6px; padding: 0; font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.quick-group .check { display: flex; gap: 8px; margin: 4px 0; font-weight: 500; }
.quick-group ul { margin: 0; padding: 0; list-style: none; }
.quick-check { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; border: 1px solid transparent; border-radius: 3px; background: none; color: var(--ink); text-align: left; font-weight: 500; cursor: pointer; }
.quick-check:hover { border-color: var(--line); }
.quick-check.is-current { border-color: var(--ink); background: var(--concrete); }
.quick-mark { display: inline-grid; place-items: center; flex: none; width: 20px; height: 20px; border: 2px solid var(--line); border-radius: 50%; font-size: 12px; font-weight: 800; color: #fff; }
.quick-check.is-done .quick-mark { border-color: var(--accent); background: var(--accent); }
.quick-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.quick-head h2 { margin: 0; }
.quick-item { margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--concrete); }
.quick-search { position: relative; max-width: 560px; margin-bottom: 20px; }
.quick-search label { display: block; margin-bottom: 6px; font: 800 22px/1.2 var(--head); font-stretch: 112%; color: var(--ink); }
.quick-search input { width: 100%; min-height: 46px; padding: 10px 14px; border: 2px solid var(--ink); border-radius: 3px; background: var(--field); font-size: 17px; }
.quick-search input:focus { border-color: var(--accent); outline: none; }
.quick-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 18px 0; }
.quick-choices button { display: flex; flex-direction: column; gap: 8px; min-height: 150px; padding: 22px; border: 2px solid var(--ink); border-radius: 6px; background: var(--field); color: var(--ink); text-align: left; cursor: pointer; }
.quick-choices button:hover { border-color: var(--accent); box-shadow: 0 8px 20px rgba(28, 25, 23, 0.08); }
.quick-choice.soon { display: flex; flex-direction: column; gap: 8px; min-height: 150px; padding: 22px; border: 2px dashed var(--line); border-radius: 6px; background: var(--pad); color: var(--muted); cursor: not-allowed; }
.quick-choice.soon strong { font: 800 24px/1.15 var(--head); font-stretch: 112%; color: var(--graphite); }
.soon-tag { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 10px; background: var(--accent); color: #fff; font: 700 12px var(--body); letter-spacing: 0.04em; text-transform: uppercase; vertical-align: middle; }
.soon-choices { margin-top: 0; }
.soon-head { margin: 28px 0 10px; }
.quick-choice.soon.preview { border-style: solid; border-color: var(--accent); background: #fff; color: var(--ink); cursor: pointer; text-align: left; font: inherit; }
.quick-choice.soon.preview:hover { background: var(--accent-tint); }
.soon-choices .quick-choice.soon { min-height: 0; }
.quick-choices button.is-picked { border-color: var(--accent); background: var(--accent-tint); }
.quick-choices button.is-picked strong { color: var(--accent-dark); }
.quick-choices strong { font: 800 24px/1.15 var(--head); font-stretch: 112%; }
.quick-choices span { font-size: 16px; line-height: 1.45; color: var(--graphite); }
/* The Coming soon tag keeps white text on the accent; the card text rule above made it grey on maroon. */
.quick-choices .soon-tag { color: #fff; font-size: 12px; line-height: 1.5; }
.quick-back { display: inline-block; margin-bottom: 10px; }
.quick-jobs-group { margin-top: 18px; }
.quick-jobs-group h3 { margin: 0 0 8px; font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.quick-jobs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.quick-job { display: flex; flex-direction: column; gap: 2px; min-height: 58px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 4px; background: var(--field); color: var(--ink); text-align: left; cursor: pointer; }
.quick-job:hover { border-color: var(--ink); }
.quick-job strong { font: 700 16px var(--head); }
.quick-job span { font-size: 13px; color: var(--muted); }
.quick-more { margin-top: 20px; }
.quick-more summary { cursor: pointer; font-weight: 600; color: var(--link); }
.quick-head-actions { display: flex; align-items: center; gap: 14px; }
.quick-head-actions button:not(.link) { min-height: 38px; padding: 6px 14px; border: 1px solid var(--ink); border-radius: 3px; background: var(--field); font-weight: 600; cursor: pointer; }
.quick-modes { display: inline-flex; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.quick-modes button { padding: 8px 18px; border: 0; background: var(--field); color: var(--ink); font-weight: 600; cursor: pointer; }
.quick-modes button[aria-pressed="true"] { background: var(--ink); color: #fff; }
/* The mascot keeps its own column, so the bubble never runs over him. */
.dennis-stage { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 24px; align-items: start; }
.dennis-figure { margin: 0; text-align: center; }
.dennis-figure img { display: block; width: 100%; max-width: 140px; height: 200px; margin: 0 auto; object-fit: contain; object-position: bottom; animation: dennis-pop 0.35s ease-out; }
.dennis-figure img.pose-think { animation: dennis-pop 0.35s ease-out, dennis-sway 1.6s ease-in-out 0.35s infinite; }
.dennis-figure figcaption { margin-top: 4px; font: 800 18px var(--head); color: var(--ink); }
.dennis-figure figcaption span { display: block; font-size: 12px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
@keyframes dennis-pop { from { transform: translateY(8px) scale(0.96); opacity: 0.4; } to { transform: none; opacity: 1; } }
@keyframes dennis-sway { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-2deg); } }
.dennis-talk { min-width: 0; padding-top: 12px; }
.dennis-asked { margin: 0 0 8px auto; max-width: 85%; width: fit-content; padding: 8px 12px; border-radius: 12px; background: var(--accent); color: #fff; }
.dennis-bubble { position: relative; padding: 16px 18px; border: 2px solid var(--ink); border-radius: 16px; background: #fff; box-shadow: 0 8px 20px rgba(28, 25, 23, 0.08); }
.dennis-bubble::before, .dennis-bubble::after { content: ""; position: absolute; top: 22px; width: 0; height: 0; border-style: solid; }
.dennis-bubble::before { left: -14px; border-width: 10px 14px 10px 0; border-color: transparent var(--ink) transparent transparent; }
.dennis-bubble::after { left: -10px; top: 24px; border-width: 8px 11px 8px 0; border-color: transparent #fff transparent transparent; }
.dennis-bubble > p { margin: 0; font-size: 17px; line-height: 1.5; white-space: pre-wrap; }
.dennis-bubble > p[role="alert"] { color: var(--pencil); font-weight: 600; }
.dennis-typing { display: flex; gap: 6px; padding: 6px 0; }
.dennis-typing span { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); animation: dennis-dot 1s ease-in-out infinite; }
.dennis-typing span:nth-child(2) { animation-delay: 0.15s; }
.dennis-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes dennis-dot { 0%, 100% { opacity: 0.3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .dennis-figure img, .dennis-figure img.pose-think, .dennis-typing span { animation: none; } }
.dennis-card { margin-top: 12px; padding: 12px 14px; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 4px; background: var(--field); }
.dennis-card table { font-size: 14px; }
.dennis-card td { padding: 4px 6px; }
.dennis-card td.num { white-space: nowrap; }
.dennis-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.dennis-tag { padding: 2px 8px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 700; }
.dennis-removed { margin: 12px 0 0 !important; padding: 8px 12px; border-left: 4px solid var(--pencil); background: var(--pad); font-size: 15px !important; }
.dennis-buy { margin: 8px 0 0; font-size: 14px; color: var(--graphite); }
.dennis-buy span { font-weight: 700; color: var(--ink); }
.dennis-card-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--concrete); font-size: 14px; color: var(--graphite); }
.dennis-card-total strong { font: 700 20px var(--head); color: var(--ink); }
.dennis-form { display: flex; gap: 8px; margin-top: 16px; }
.dennis-form input { flex: 1; min-width: 0; min-height: 50px; padding: 10px 14px; border: 2px solid var(--ink); border-radius: 3px; background: var(--field); font-size: 17px; }
.dennis-form input:focus { border-color: var(--accent); outline: none; }
.dennis-foot { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 8px; }
.dennis-note { margin: 0; font-size: 13px; color: var(--muted); }
.dennis-foot .link { flex: none; white-space: nowrap; }
.dennis-history { margin-top: 20px; padding-top: 12px; border-top: 1px solid var(--concrete); }
.dennis-history summary { cursor: pointer; font-weight: 600; color: var(--link); }
.dennis-past { margin-top: 10px; line-height: 1.5; }
.dennis-past.user { color: var(--graphite); }
@media (max-width: 640px) {
  .dennis-stage { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .dennis-figure { display: flex; align-items: flex-end; gap: 10px; text-align: left; }
  .dennis-figure img { width: auto; height: 120px; margin: 0; }
  .dennis-talk { padding-top: 0; }
  .dennis-bubble::before { left: 40px; top: -14px; border-width: 0 10px 14px 10px; border-color: transparent transparent var(--ink) transparent; }
  .dennis-bubble::after { left: 42px; top: -10px; border-width: 0 8px 11px 8px; border-color: transparent transparent #fff transparent; }
}
.quick-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.quick-boq { position: sticky; top: calc(var(--top-h) + 12px); max-height: calc(100vh - var(--top-h) - 24px); overflow-y: auto; padding-left: 24px; border-left: 1px solid var(--line); }
.quick-boq-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.quick-boq-head h2 { margin: 0; font-size: 22px; }
/* New tab: the sketch stays beside the size fields so the user can picture the item. */
.quick-left .estimate-grid { grid-template-columns: minmax(0, 1fr) minmax(220px, 300px); gap: 20px; }
.quick-left .drawing { position: sticky; top: calc(var(--top-h) + 12px); grid-row: auto; max-height: calc(100vh - var(--top-h) - 24px); }
@media (max-width: 640px) {
  .quick-left .estimate-grid { grid-template-columns: minmax(0, 1fr); }
  .quick-left .drawing { position: static; grid-row: 1; max-height: none; }
}
.quick-boq-table { font-size: 14px; }
.quick-boq-table th, .quick-boq-table td { padding: 5px 6px; }
.quick-boq-table td.num { white-space: nowrap; }
.quick-boq-table tr.discipline th { padding-top: 14px; font-size: 16px; }
.quick-boq .totals { margin-top: 14px; font-size: 15px; }
.quick-boq-excel { width: 100%; margin-top: 14px; }
.quick-boq .totals .grand dd { font-size: 26px; }
@media (max-width: 960px) {
  .quick-layout { grid-template-columns: minmax(0, 1fr); }
  .quick-boq { position: static; max-height: none; padding: 20px 0 0; border-left: 0; border-top: 2px solid var(--concrete); }
}
.quick-divider { display: flex; align-items: center; gap: 14px; margin: 36px 0 20px; font-size: 13px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.quick-divider::before, .quick-divider::after { content: ""; flex: 1; border-top: 2px solid var(--concrete); }
.add-custom-closed { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--concrete); }
.add-custom-closed button { min-height: 40px; padding: 8px 16px; border: 1px dashed var(--line); border-radius: 3px; background: var(--field); font-weight: 600; cursor: pointer; }
.add-custom-closed button:hover { border-color: var(--ink); }
.add-custom-closed span { font-size: 14px; color: var(--muted); }
.add-custom-open { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--concrete); }
.add-custom-open h3 { margin-top: 0; }
.work-equipment { grid-column: 1 / -1; }
.work-equipment .check { font-weight: 500; }
.work-hint.field-hint { margin-left: 0; }
.work-lead { margin: 0 0 8px; font-size: 15px; color: var(--graphite); }
.work-hint { margin: 2px 0 0 26px; max-width: 60ch; font-size: 14px; line-height: 1.4; color: var(--graphite); }
.work-params { margin-top: 10px; }
#item-form .field-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.field input { text-overflow: ellipsis; }
.field input::placeholder { font-size: 14px; color: #78716c; }
dialog { width: min(480px, calc(100vw - 32px)); padding: 20px; border: 2px solid var(--ink); border-radius: 3px; background: var(--sheet); color: var(--ink); }
dialog::backdrop { background: rgb(43 43 43 / 0.45); }
dialog h3 { margin: 0 0 8px; font-size: 22px; }
dialog p { margin: 0 0 12px; overflow-wrap: anywhere; }
#search-all-status:empty { display: none; }
#search-all-status { margin: 0 0 10px; }
#remarks-body { white-space: pre-line; max-height: 50vh; overflow-y: auto; }
button.search-price { padding: 0; border: 0; background: none; color: var(--link); text-decoration: underline; font-weight: 600; cursor: pointer; white-space: nowrap; }
button.search-price:disabled { color: var(--graphite); text-decoration: none; cursor: default; }
.actions-inline { display: flex; gap: 8px; flex-wrap: wrap; }
.actions-inline button:not(.primary) { padding: 10px 16px; border: 1px solid var(--line); border-radius: 3px; background: var(--field); cursor: pointer; }
.plan-chat { margin: 12px 0 0; padding: 8px; max-width: 1000px; border: 1px solid var(--line); border-radius: 6px; background: var(--field); }
.plan-chat:focus-within { border-color: var(--accent); }
.plan-chat-row { display: flex; align-items: center; gap: 8px; }
.plan-plus { flex: none; padding: 0 6px; border: 0; background: none; color: var(--ink); font-size: 26px; line-height: 1; cursor: pointer; }
.plan-plus:hover { color: var(--accent); }
.plan-chat-row #plan-note { flex: 1; min-width: 0; text-overflow: ellipsis; padding: 7px 4px; border: 0; background: transparent; }
.plan-chat-row #plan-note:focus-visible { outline: none; }
.plan-chat-row button.primary { padding: 7px 16px; }
.plan-chat-row button:disabled { opacity: 0.55; cursor: default; }
.plan-chip { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 15px; }
.plan-chip img { width: 56px; height: 56px; object-fit: cover; border: 1px solid var(--line); border-radius: 3px; }
.add-type { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; }
.add-type label { font: 600 18px var(--head); }
.add-type input { padding: 7px 9px; border: 1px solid var(--line); border-radius: 3px; background: var(--field); }
.add-type #type-name { flex: 1 1 200px; max-width: 280px; }
.add-type input[type="number"] { width: 84px; }
.add-type span { font-size: 14px; color: var(--graphite); }
.add-type button { padding: 8px 14px; border: 1px solid var(--ink); border-radius: 3px; background: var(--field); font-weight: 600; cursor: pointer; }
.add-type button.primary { border-color: var(--accent); background: var(--accent); color: #fff; }
.add-type button.primary:hover { border-color: var(--accent-dark); background: var(--accent-dark); }
.add-custom #custom-name { flex: 1 1 160px; max-width: 220px; }
.add-custom #custom-qty { width: 72px; }
.add-custom #custom-unit { width: 72px; }
.add-custom #custom-material, .add-custom #custom-labor, .add-custom #custom-equipment { width: 140px; }
.type-list { list-style: none; margin: 0 0 14px; padding: 0; }
.type-list li { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; padding: 4px 0; border-bottom: 1px solid var(--grid); }
.type-list span { color: var(--graphite); font-size: 15px; }
.plan-review { margin-top: 20px; }
.plan-notes { padding: 8px 12px; background: var(--concrete); max-width: 72ch; }
.plan-table input:not([type="checkbox"]), .plan-table select { width: 92px; padding: 5px 6px; border: 1px solid var(--line); border-radius: 3px; background: var(--field); }
.plan-table :is(input, select).ai { background: #fff3c4; border-color: #c9a227; }
.plan-table :is(input, select).needs { background: #fbdcd8; border-color: var(--pencil); }
.plan-table th { white-space: normal; vertical-align: bottom; }
.assume { margin-top: 10px; }
.assume summary { cursor: pointer; color: var(--link); font-weight: 600; }
.assume .field-grid { margin-top: 8px; }
.boq-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.boq-head h2 { margin: 0; }
.rates-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.price-asof { margin: 0; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 3px; background: var(--field); font-size: 0.92rem; }
.price-asof-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
@media (max-width: 700px) { .rates-actions { align-items: flex-start; } }
.markups { margin: 4px 0; padding: 6px 0; border-top: 1px solid var(--ink); }
.markup { display: grid; grid-template-columns: minmax(0, 1fr) 96px minmax(96px, auto); gap: 10px; align-items: center; padding: 3px 0; }
.markup label { color: var(--graphite); }
.markup input { width: 100%; padding: 4px 6px; border: 1px solid var(--line); border-radius: 3px; background: var(--field); text-align: right; }
.markup-amount { text-align: right; font-weight: 600; white-space: nowrap; }
.check { display: flex; align-items: center; gap: 8px; font: 700 18px var(--head); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--ink); }
.actions { display: flex; gap: 8px; margin-top: 20px; }

.sketch { border: 1px solid var(--line); background: var(--field); }
.sketch svg { display: block; width: 100%; height: auto; }
.sketch .conc { fill: var(--concrete); stroke: var(--ink); stroke-width: 2; }
.sketch .tie { fill: none; stroke: var(--steel); stroke-width: 2; }
.sketch .steel { stroke: var(--steel); stroke-width: 1.5; }
.sketch .tie-line { stroke: var(--steel); stroke-width: 1; }
.sketch .steel-dot { fill: var(--steel); }
.sketch .steel-dot.second { fill: #d97706; }
.sketch .course { stroke: var(--line); stroke-width: 1; }
.sketch .dim line { stroke: var(--pencil); stroke-width: 1; }
/* Sizes in the plain type: the hand font hid the decimal point, so 1.00 m read as 100 m. */
.sketch .dim text { fill: var(--pencil); font: 600 15px var(--body); }
.sketch .sketch-note { fill: var(--graphite); font: 16px var(--hand); }

.takeoff { margin-top: 14px; }

/* Cabinet builder: the 3D drawing with the sizes of the picked piece beside it, then the ready-made pieces. */
.cab-builder { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }
.cab-how { display: flex; flex-wrap: wrap; gap: 4px 26px; margin: 4px 0 14px; padding-left: 20px; color: var(--graphite); font-size: 15px; }
.cab-stage { max-width: 780px; }
.cab-panel { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-top: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 3px; background: var(--pad); }
.cab-panel h4 { flex-basis: 100%; margin: 0; }
.cab-panel .cab-tip, .cab-panel .flag, .cab-panel .muted { flex-basis: 100%; margin: 0; }
.cab-field { display: grid; grid-template-columns: auto 118px auto; align-items: center; gap: 8px; }
.cab-field label { font-size: 15px; font-weight: 500; }
.cab-unit { font-size: 14px; color: var(--graphite); }
.stepper { display: flex; }
.stepper button { width: 38px; padding: 6px 0; border: 1px solid var(--line); background: var(--field); font-size: 18px; font-weight: 700; line-height: 1; cursor: pointer; }
.stepper button:first-child { border-radius: 3px 0 0 3px; }
.stepper button:last-child { border-radius: 0 3px 3px 0; }
.stepper button:hover { border-color: var(--accent); color: var(--accent); }
.stepper input { width: 100%; min-width: 0; padding: 6px 4px; border: 1px solid var(--line); border-left: 0; border-right: 0; background: var(--field); text-align: center; font-weight: 600; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cab-panel .flag { font-size: 14px; }
.cab-piece-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; flex-basis: 100%; }
.cab-piece-actions button:not(.link) { padding: 5px 10px; border: 1px solid var(--line); border-radius: 3px; background: var(--field); font-size: 14px; cursor: pointer; }
.cab-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.cab-chips button { padding: 5px 10px; border: 1px solid var(--line); border-radius: 3px; background: var(--field); font-size: 14px; cursor: pointer; }
.cab-chips button.active { border-color: var(--accent); background: var(--accent); color: #fff; }
.cab-group h4 { margin: 12px 0 6px; font-size: 14px; color: var(--graphite); text-transform: uppercase; letter-spacing: 0.06em; }
.cab-templates { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.cab-template { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 3px; background: var(--field); text-align: left; cursor: pointer; }
.cab-template:hover { border-color: var(--accent); }
.cab-set { padding: 10px 12px; border-left: 3px solid var(--accent); }
.cab-all { margin: 12px 0 0; font-size: 15px; color: var(--graphite); }
.cab-template strong { display: block; font-size: 15px; }
.cab-template small { display: block; font-size: 13px; color: var(--graphite); }
.cab-icon { flex: 0 0 48px; width: 48px; height: 50px; }
.cab-icon .ic-body { fill: #efdfc2; stroke: #5b4630; stroke-width: 1; }
.cab-icon .ic-front { fill: #f9f2e4; stroke: #5b4630; stroke-width: 0.8; }
.cab-icon .ic-shelf { fill: #5b4630; }
.cab-icon .ic-floor { stroke: var(--line); stroke-width: 1; }
.cab-takeoff { margin-top: 20px; max-width: 560px; }

/* Cabinet 3D drawing. The wood tones are fixed, so the drawing reads as plywood. */
.sketch .cab.room.front, .sketch .cab.room.side { fill: #f4f1ec; stroke: var(--grid); }
.sketch .cab.room.top { fill: #e9e4dc; stroke: var(--grid); }
.sketch .cab.sel { stroke: var(--accent); stroke-width: 1.8; }
.sketch .cab[data-mod] { cursor: pointer; }
.sketch .cab.sel[data-mod] { cursor: move; }
.cab-view-wrap { position: relative; }
.cab-dim { position: absolute; z-index: 1; display: flex; align-items: center; gap: 3px; padding: 2px 5px 2px 2px; transform: translate(-50%, -50%); border: 1.5px solid var(--pencil); border-radius: 3px; background: var(--field); color: var(--pencil); font-size: 13px; font-weight: 600; }
.cab-dim[hidden] { display: none; }
.cab-dim.bad { border-style: dashed; background: #fbf1ef; }
.cab-dim input { width: 44px; padding: 1px 2px; border: 0; background: transparent; color: var(--pencil); text-align: right; font: 700 15px var(--body); -moz-appearance: textfield; }
.cab-dim input::-webkit-outer-spin-button, .cab-dim input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cab-dim:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(122, 31, 43, 0.25); }
.cab-dim input:focus { outline: none; }
.sketch .piece-dim line { stroke-width: 1.4; }
.sketch .piece-dim circle { fill: var(--pencil); }
.cab-tip { margin: 0 0 10px; font-size: 14px; color: var(--graphite); }
.cab-handle { cursor: grab; }
.cab-handle:active { cursor: grabbing; }
.cab-handle .hit { fill: transparent; }
.cab-handle line { stroke: var(--accent); stroke-width: 3; stroke-linecap: round; }
.cab-handle .dot { fill: var(--accent); stroke: #fff; stroke-width: 2.5; }
.cab-handle:hover .dot { fill: var(--accent-dark); }
.cut-table .cut-piece th { padding-top: 14px; background: var(--pad); font-size: 15px; }
.sketch .cab { stroke: #5b4630; stroke-width: 0.8; stroke-linejoin: round; }
.sketch .cab.body.front { fill: #e3cda6; }
.sketch .cab.body.side { fill: #cdb287; }
.sketch .cab.body.top { fill: #efdfc2; }
.sketch .cab.back.front, .sketch .cab.back.side, .sketch .cab.back.top { fill: #d9c6a3; }
.sketch .cab.dark.front, .sketch .cab.dark.side, .sketch .cab.dark.top { fill: #8a7355; }
.sketch .cab.front.front { fill: #f6ecd9; }
.sketch .cab.front.side { fill: #dcc7a0; }
.sketch .cab.front.top { fill: #f9f2e4; }
.sketch .cab.handle { fill: var(--header); stroke: none; }
.sketch .cab3d { cursor: grab; touch-action: none; user-select: none; }
.sketch .cab3d:active { cursor: grabbing; }
.cab-toggles { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.cab-code-pieces { display: inline-flex; align-items: center; gap: 4px; }
.cab-code-pieces button { min-width: 28px; padding: 2px 6px; border: 1px solid var(--line); border-radius: 3px; background: #fff; font-weight: 700; cursor: pointer; }
.cab-code-pieces button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: #fff; }
.cab3d polygon.faded { opacity: 0.28; }
.cab3d .cab-codes text { font: 700 12px var(--body); fill: var(--ink); stroke: #fff; stroke-width: 3px; paint-order: stroke; pointer-events: none; }
.cab-tools { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 14px; padding: 6px 10px; border-top: 1px solid var(--grid); font-size: 14px; color: var(--graphite); }

/* Panel diagram of the electrical design. */
.sketch .el-title { fill: var(--ink); font: 700 15px var(--head); }
.sketch .el-text { fill: var(--ink); font: 12.5px var(--body); }
.sketch .el-text.spare { fill: var(--muted); }
.sketch .el-main { fill: var(--header); }
.sketch .el-main-text { fill: #fff; font: 700 13px var(--body); }
.sketch .el-bus { stroke: var(--ink); stroke-width: 2; }
.sketch .el-breaker { fill: var(--field); stroke: var(--accent); stroke-width: 1.5; }
.sketch .el-breaker.spare { stroke: var(--line); stroke-dasharray: 3 3; }
.sketch .el-breaker-text { fill: var(--ink); font: 600 12px var(--body); }

/* Cutting list and load schedule under the item form. */
.item-extra:empty { display: none; }
.item-extra { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.extra-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.extra-head h3 { margin: 0; }
.extra-lead, .extra-foot { max-width: 80ch; color: var(--graphite); font-size: 15px; }
.extra-notes { margin: 10px 0; padding: 10px 14px 10px 30px; border-left: 3px solid var(--pencil); background: #fbf1ef; font-size: 15px; }
.extra-notes.plain { border-left-color: var(--line); background: var(--pad); color: var(--graphite); }
.cut-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.cut-table th, .cut-table td { padding: 6px 10px; border-bottom: 1px solid var(--grid); text-align: left; }
.cut-table th.num, .cut-table td.num { text-align: right; }
.cut-table thead th { border-bottom: 2px solid var(--line); font-size: 14px; color: var(--graphite); }
.cut-table tfoot td { font-weight: 600; border-top: 2px solid var(--line); }
.cut-board { margin-top: 20px; }
.cut-board h4, .item-extra h4 { margin: 0 0 8px; }
.cut-sheets { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.cut-sheets figure { margin: 0; }
.cut-sheets svg { display: block; width: 100%; height: auto; }
.cut-sheets figcaption { margin-top: 4px; font-size: 14px; color: var(--graphite); }
.ply-sheet { fill: #ece7df; stroke: var(--ink); stroke-width: 5; }
.ply-part { fill: #efdfc2; stroke: #5b4630; stroke-width: 4; }
.ply-text { fill: var(--ink); font-family: var(--body); font-weight: 600; }
.cut-hardware { list-style: none; margin: 0 0 12px; padding: 0; max-width: 520px; font-size: 15px; }
.cut-hardware li { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border-bottom: 1px solid var(--grid); }
.cut-hardware li span:last-child { white-space: nowrap; font-weight: 600; }
.item-extra h4 { margin-top: 18px; }
.design-summary { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px 20px; margin: 14px 0; }
.design-summary div { padding: 10px 12px; border: 1px solid var(--line); border-radius: 3px; background: var(--field); }
.design-summary dt { font-size: 14px; color: var(--graphite); }
.design-summary dd { margin: 2px 0 0; font-weight: 700; }

/* The quotation: a white page laid out like the printed sheet. */
.quotation { max-width: 900px; margin: 6px 0 30px; padding: 36px 40px; border: 1px solid var(--line); background: #fff; color: var(--ink); box-shadow: 0 10px 30px rgba(28, 25, 23, 0.08); }
.q-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; padding-bottom: 16px; border-bottom: 3px solid var(--accent); }
.q-brand { display: flex; align-items: center; gap: 12px; }
.q-brand img { width: 52px; height: 52px; }
.q-brand strong { display: block; font: 800 20px var(--head); }
.q-brand span { font-size: 13px; color: var(--graphite); }
.q-title h1 { margin: 0 0 6px; font: 800 30px var(--head); text-align: right; letter-spacing: 0.04em; text-transform: uppercase; }
.q-title dl, .q-totals { margin: 0; }
.q-title dl div { display: flex; justify-content: flex-end; gap: 10px; font-size: 14px; }
.q-title dt { color: var(--graphite); }
.q-title dd { margin: 0; font-weight: 600; }
.q-project { display: flex; flex-wrap: wrap; gap: 10px 40px; margin: 16px 0 18px; }
.q-project span { display: block; font-size: 12px; color: var(--graphite); text-transform: uppercase; letter-spacing: 0.05em; }
.q-project strong { font-size: 17px; }
.q-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.q-table th, .q-table td { padding: 6px 8px; border-bottom: 1px solid var(--grid); text-align: left; vertical-align: top; }
.q-table th.num, .q-table td.num { text-align: right; white-space: nowrap; }
.q-table thead th { border-bottom: 2px solid var(--ink); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--graphite); }
.q-table td small { display: block; font-size: 12px; color: var(--muted); }
.q-table tr.q-section th { padding-top: 14px; border-bottom: 1px solid var(--line); font-size: 15px; color: var(--ink); text-transform: none; letter-spacing: 0; }
.q-table tr.q-subtotal td { font-weight: 600; border-bottom: 0; }
.q-totals { width: min(100%, 380px); margin: 18px 0 0 auto; }
.q-totals div { display: flex; justify-content: space-between; gap: 16px; padding: 5px 0; border-bottom: 1px solid var(--grid); }
.q-totals dd { margin: 0; font-weight: 600; }
.q-totals .q-grand { border-top: 2px solid var(--ink); border-bottom: 0; padding-top: 8px; font-size: 18px; }
.q-totals .q-grand dd { color: var(--accent-dark); font-weight: 800; }
.q-terms { margin-top: 26px; font-size: 13px; color: var(--graphite); }
.q-terms h2 { margin: 0 0 4px; font-size: 14px; color: var(--ink); }
.q-terms ul { margin: 0; padding-left: 18px; }
.q-sign { display: flex; flex-wrap: wrap; gap: 30px 60px; margin-top: 44px; font-size: 14px; }
.q-sign div { flex: 1 1 220px; }
.q-sign .line { display: block; margin-bottom: 4px; border-bottom: 1px solid var(--ink); height: 34px; }
.q-sign small { display: block; color: var(--muted); }
/* Boxes you can type in on the quotation: a dashed line on screen, plain text on paper. */
.q-edit { width: 100%; padding: 2px 4px; border: 0; border-bottom: 1px dashed var(--accent); border-radius: 0; background: transparent; color: inherit; font: inherit; }
.q-edit:hover { background: var(--accent-tint); }
.q-edit:focus { outline: 2px solid var(--accent); outline-offset: 1px; background: #fff; }
.q-edit::placeholder { color: var(--muted); font-weight: 400; }
.q-company { font: 800 20px var(--head); }
.q-tagline { font-size: 13px; color: var(--graphite); }
.q-title dd .q-edit { width: 150px; text-align: right; font-weight: 600; }
.q-name { font-weight: 600; }
.q-role { font-size: 13px; color: var(--graphite); }
.quotation .q-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
.q-brand { min-width: 0; }
.q-company-col { flex: 1; min-width: 0; }
.q-logo-col { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.q-logo { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 0; border: 1px dashed transparent; background: none; cursor: pointer; }
.q-logo:hover { border-color: var(--accent); }
.q-logo img { width: auto; height: 56px; max-width: 130px; object-fit: contain; }
.q-logo span { font-size: 11px; color: var(--link); font-weight: 600; }
.q-logo-remove { font-size: 11px; }
@media print {
  .no-print, #print-area .no-print { display: none !important; }
  #print-area .q-edit { border: 0; padding: 0; background: none; }
  #print-area .q-edit::placeholder { color: transparent; }
  #print-area .q-logo { border: 0; }
}
@media (max-width: 640px) { .quotation .q-head { grid-template-columns: minmax(0, 1fr); } .q-title dd .q-edit { text-align: left; } .quotation { padding: 20px 16px; } .q-title h1, .q-title dl div { text-align: left; justify-content: flex-start; } }
@media print {
  #print-area.quotation-print, #print-area .quotation { box-shadow: none; border: 0; padding: 0; max-width: none; }
  #print-area .q-table thead { display: table-header-group; }
  @page { margin: 14mm; }
}
#print-area { display: none; }
/* Electrical plan sheet */
.elec-sheet { max-width: 1100px; padding: 28px; border: 1px solid var(--line); background: #fff; }
.elec-sheet h3 { margin: 22px 0 8px; font-size: 18px; }
.es-head { display: flex; justify-content: space-between; gap: 24px; padding-bottom: 14px; border-bottom: 3px solid var(--ink); }
.es-head h2 { margin: 2px 0 8px; }
.es-head p { margin: 4px 0; }
.es-kicker { margin: 0; color: var(--accent); font-weight: 700; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; }
.es-meta { display: grid; gap: 6px; margin: 0; }
.es-meta div { display: flex; gap: 10px; justify-content: flex-end; }
.es-meta dt { color: var(--muted); }
.es-meta dd { margin: 0; font-weight: 600; }
.elec-sheet .q-edit.short { width: 9em; }
.elec-sheet .q-edit.wide { width: min(28em, 100%); }
.sld { width: 100%; max-width: 760px; height: auto; }
.sld-line { stroke: var(--ink); stroke-width: 1.5; fill: none; }
.sld-bus { stroke: var(--ink); stroke-width: 5; }
.sld-brk, .sld-main { fill: #fff; stroke: var(--ink); stroke-width: 1.5; }
.sld-brk.spare { stroke-dasharray: 4 3; }
.sld-meter { fill: #fff; stroke: var(--ink); stroke-width: 1.5; }
.sld-text { font: 600 12px var(--body); fill: var(--ink); }
.sld-small { font: 11px var(--body); fill: var(--graphite); }
.es-table { font-size: 13px; }
.es-table th, .es-table td { padding: 5px 7px; white-space: nowrap; }
.es-table td:nth-child(2) { white-space: normal; }
.el-flag { color: var(--accent); }
.es-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; }
.es-calc { width: 100%; font-size: 14px; }
.es-calc td { padding: 4px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.es-calc td:first-child { width: 50%; }
.es-calc td.num { text-align: right; white-space: normal; }
.es-small { color: var(--muted); font-size: 13px; }
.es-notes { margin: 0; padding-left: 20px; font-size: 13px; columns: 2 340px; column-gap: 28px; }
.es-steps { margin: 0; padding-left: 22px; }
.es-steps > li { margin-bottom: 12px; break-inside: avoid; }
.es-steps strong { display: block; }
.es-rule { display: block; color: var(--muted); font-size: 13px; }
.es-eq { margin: 2px 0 0 14px; font: 14px/1.5 var(--body); font-variant-numeric: tabular-nums; }
.es-eq b { color: var(--ink); }
.es-notes li { margin-bottom: 4px; }
.es-sign { display: flex; justify-content: flex-end; gap: 20px; margin-top: 26px; padding-top: 16px; border-top: 3px solid var(--ink); }
.es-ree { position: relative; width: min(640px, 100%); padding-right: 130px; }
.es-ree p { margin: 6px 0; }
.es-seal { position: absolute; top: 0; right: 0; display: grid; place-items: center; width: 110px; height: 110px; border: 1px dashed var(--line); border-radius: 50%; color: var(--muted); font-size: 12px; }
.es-line { margin-top: 46px; padding-top: 4px; border-top: 1px solid var(--ink); }
@media (max-width: 760px) { .es-two, .es-sign { grid-template-columns: minmax(0, 1fr); } .es-head { flex-direction: column; } .es-meta div { justify-content: flex-start; } .elec-sheet { padding: 16px; } }
@media print {
  #print-area .elec-sheet { border: 0; padding: 0; max-width: none; }
  #print-area .es-seal { border-style: solid; }
  @page { size: auto; }
}
@media print {
  body.print-extra > *:not(#print-area) { display: none !important; }
  body.print-extra #print-area { display: block; margin: 0; padding: 0; border: 0; }
  #print-area button { display: none; }
  #print-area figure, #print-area tr { break-inside: avoid; }
}
.takeoff-work { padding: 10px 0; border-bottom: 1px solid var(--line); }
.takeoff-work h4 { display: flex; justify-content: space-between; gap: 12px; }
.takeoff-work ul { list-style: none; margin: 6px 0; padding: 0; font-size: 15px; }
.takeoff-work li { display: flex; justify-content: space-between; gap: 12px; }
.takeoff-work li span:last-child { white-space: nowrap; }
.takeoff-work dl { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 6px 0 0; font-size: 14px; }
.takeoff-work dl div { display: flex; gap: 6px; }
.takeoff-work dt { color: var(--graphite); }
.takeoff-work dd { margin: 0; font-weight: 600; }
.takeoff-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 10px; font-weight: 600; }
.takeoff-total strong { font: 700 30px var(--head); color: var(--pencil); }

.reuse { margin-top: 24px; max-width: 620px; }
.reuse p { color: var(--graphite); }
.reuse ul { list-style: none; margin: 14px 0; padding: 0; display: grid; gap: 6px; }
.reuse li button { width: 100%; display: flex; justify-content: space-between; gap: 16px; text-align: left; }

.table-wrap { position: relative; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { text-align: left; font: 700 16px var(--head); padding: 6px 10px; border-bottom: 2px solid var(--ink); white-space: nowrap; }
td { padding: 6px 10px; border-bottom: 1px solid var(--grid); }
.num { text-align: right; white-space: nowrap; }
.row-actions { white-space: nowrap; text-align: right; }
.row-actions button + button { margin-left: 14px; }
.rates input { min-width: 110px; }
.rates td.num input { text-align: right; max-width: 130px; }

.boq tr.discipline th { padding-top: 22px; font-size: 22px; border-bottom: 2px solid var(--ink); }
.boq tr.discipline-total td { font-weight: 700; border-top: 2px solid var(--ink); border-bottom: 0; }
.boq tr.group th { padding-top: 16px; font-size: 18px; border-bottom: 1px solid var(--line); }
.boq tr.subtotal td { font-weight: 600; border-bottom: 0; }
.quick-job.picked { border-color: var(--accent); background: var(--accent-tint); }
.quick-job.picked strong { color: var(--accent-dark); }
.proj-go { display: flex; align-items: center; gap: 14px; margin: 12px 0; }
.start { margin-bottom: 30px; padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.start h2 { margin-top: 0; }
.projects-head { margin-top: 6px; }
.boq-sheet.bom-sheet { min-width: 0; width: 100%; max-width: 900px; }
.bom-note { max-width: 900px; margin-top: 22px; padding: 12px 16px; border-left: 3px solid var(--accent); background: var(--pad); color: var(--graphite); font-size: 14px; }
.bom-note strong { color: var(--ink); }
.bom-note p { margin: 4px 0 0; }
.flag-text { color: var(--pencil); font-weight: 600; }
.buy button { padding: 7px 12px; border: 1px solid var(--line); border-radius: 3px; background: var(--field); font-weight: 600; cursor: pointer; }
.sched-summary { display: flex; flex-wrap: wrap; align-items: end; gap: 14px 30px; margin: 10px 0 16px; }
.sched-summary dl { display: flex; flex-wrap: wrap; gap: 8px 26px; margin: 0; }
.sched-summary dt { font-size: 13px; color: var(--graphite); }
.sched-summary dd { margin: 0; font: 700 20px var(--head); }
.sched-start input { padding: 6px 8px; border: 1px solid var(--line); border-radius: 3px; background: var(--field); }
.boq-sheet.sched-sheet { min-width: 1100px; }
.sched-sheet td { vertical-align: middle; }
.sched-sheet td input { width: 56px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 3px; text-align: right; background: var(--field); }
.sched-sheet tr.sched-phase th { padding: 6px 8px; text-align: left; background: var(--grid); font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--graphite); }
.sched-legend { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; padding: 0; list-style: none; font-size: 13px; color: var(--graphite); }
.sched-legend li { display: flex; align-items: center; gap: 8px; }
.sched-legend .sched-bar { position: static; display: inline-block; width: 34px; height: 12px; }
.sched-from { display: block; font-size: 12px; color: var(--muted); }
.sched-est { margin-left: 4px; color: var(--pencil); font-weight: 700; text-decoration: none; cursor: help; }
.sched-axis, .sched-track { position: relative; width: 46%; min-width: 420px; padding: 0 !important; }
.sched-axis { height: 38px; }
.sched-week { position: absolute; top: 0; bottom: 0; padding: 3px 4px; border-left: 1px solid var(--line); font-size: 11px; text-align: left; white-space: nowrap; overflow: hidden; }
.sched-week small { display: block; font-weight: 400; color: var(--muted); }
.sched-track { height: 34px; background-image: repeating-linear-gradient(90deg, transparent 0, transparent calc(100% / var(--weeks, 1) - 1px), var(--grid) calc(100% / var(--weeks, 1) - 1px), var(--grid) calc(100% / var(--weeks, 1))); }
.sched-bar { position: absolute; top: 8px; height: 18px; min-width: 4px; border-radius: 3px; background: var(--accent); }
.sched-bar.along { background: var(--graphite); opacity: 0.55; }
.sched-bar.est { background: repeating-linear-gradient(135deg, var(--accent) 0 6px, #b8707a 6px 10px); }
.rate-kinds { display: flex; gap: 4px; margin: 14px 0 6px; border-bottom: 2px solid var(--ink); }
.rate-kinds button { padding: 8px 18px; border: 1px solid var(--line); border-bottom: 0; border-radius: 4px 4px 0 0; background: var(--grid); font: 600 16px var(--head); color: var(--graphite); cursor: pointer; }
.design-kinds { margin-top: 0; }
.design-panel { max-width: 560px; margin-bottom: 18px; padding: 10px; }
.design-cabinet { max-width: 820px; margin-bottom: 18px; }
.rate-kinds button.active { background: var(--header); border-color: var(--header); color: #fff; }
.rate-kinds .kind-blank { display: inline-block; min-width: 20px; margin-left: 4px; padding: 0 6px; border-radius: 10px; background: var(--pencil); color: #fff; font-size: 12px; }
.rates td.prod { min-width: 190px; }
.prod-box { display: flex; align-items: center; gap: 6px; margin: 2px 0; font-size: 12px; color: var(--graphite); white-space: nowrap; }
.prod-box input { width: 70px !important; text-align: right; }
.prod-box.est span { color: var(--pencil); }
.prod-box.own input { border-color: var(--accent); font-weight: 700; }
.rate-item { margin-top: 18px; }
.rate-item h3 { display: flex; align-items: baseline; gap: 10px; margin: 0 0 6px; }
.rate-item h3 small { font-size: 13px; font-weight: 500; color: var(--muted); }
.rates td.rate-kind { font-size: 13px; color: var(--graphite); white-space: nowrap; }
.rates td.missing input { border: 2px solid var(--pencil); background: #fffaf9; }
.boq-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; }
/* The BOQ as a spreadsheet: a grid of cells, with the cells you can type in shown white. */
.boq-sheet { min-width: 1320px; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.boq-sheet th, .boq-sheet td { border: 1px solid var(--line); padding: 5px 8px; }
.boq-sheet thead th { background: var(--grid); font-size: 13px; text-align: center; white-space: nowrap; }
.boq-sheet thead th.num { text-align: right; }
.boq-sheet tr.discipline th { padding: 9px 8px; font-size: 16px; text-align: left; background: var(--header); color: #fff; border-color: var(--header); }
.boq-sheet tr.discipline-total td { font-weight: 700; background: var(--grid); border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line); }
.boq-sheet .boq-item td { vertical-align: middle; }
.boq-sheet .boq-item.off td { color: var(--muted); background: #fbfaf8; }
.boq-sheet .boq-item.off strong { font-weight: 500; }
.boq-sheet .boq-item small { margin-left: 6px; font-size: 12px; color: var(--muted); font-weight: 400; }
.boq-sheet .item-row td { background: var(--pad); }
.boq-sheet .item-row td.cell { padding: 0; background: var(--field); }
.boq-sheet td.amount { background: #f3efe9; }
.boq-sheet td.sum { font-weight: 700; }
.boq-sheet .line td { background: var(--sheet); }
.boq-sheet .line td:nth-child(2) { padding-left: 22px; }
.boq-sheet td.cell input { display: block; width: 100%; min-width: 74px; height: 100%; padding: 7px 8px; border: 0; border-radius: 0; background: transparent; text-align: right; font: inherit; -moz-appearance: textfield; }
.boq-sheet td.cell input[type="text"] { min-width: 52px; text-align: left; }
.boq-sheet td.cell input::-webkit-outer-spin-button, .boq-sheet td.cell input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
/* Something still missing: red hatching, like hidden lines on a plan. It sits under the cell's text and stays clear of the typing. */
.boq-sheet td.missing, .boq-sheet .item-row td.cell.missing {
  background-color: #fffaf9;
  background-image: repeating-linear-gradient(135deg, rgba(179, 38, 30, 0.12) 0 1.5px, transparent 1.5px 8px);
  box-shadow: inset 0 0 0 2px var(--pencil);
}
.boq-sheet tr.works-row td { padding: 6px 8px; background: var(--sheet); border-top: 0; }
.boq-sheet tr.works-row td[colspan] { display: table-cell; }
.works-label { margin-right: 8px; font-size: 13px; color: var(--graphite); font-weight: 600; }
.works-hint { margin-left: 8px; font-size: 13px; color: var(--muted); }
.boq-add-work { margin: 2px 6px 2px 0; padding: 3px 9px; border: 1px dashed var(--accent); border-radius: 3px; background: var(--field); color: var(--link); font-size: 13px; font-weight: 600; cursor: pointer; }
.boq-add-work:hover { background: var(--accent); color: #fff; border-style: solid; }
.work-chip { display: inline-flex; align-items: center; gap: 5px; margin: 2px 6px 2px 0; padding: 3px 9px; border: 1px solid var(--line); border-radius: 3px; background: var(--field); font-size: 13px; color: var(--graphite); cursor: pointer; }
.work-chip.on { border-color: var(--accent); color: var(--ink); font-weight: 600; }
.work-chip input { accent-color: var(--accent); }
.boq-add-equip { padding: 3px 8px; border: 1px dashed var(--accent); border-radius: 3px; background: var(--field); color: var(--link); font-size: 13px; font-weight: 600; font-style: normal; cursor: pointer; white-space: nowrap; }
.boq-add-equip:hover { background: var(--accent); color: #fff; border-style: solid; }
.boq-sheet td.none { color: var(--muted); font-style: italic; background: var(--sheet); }
/* A size still needed on the item form: the same red hatch as the BOQ, around the box. */
.field.needs-fill input {
  border: 2px solid var(--pencil);
  background-color: #fffaf9;
  background-image: repeating-linear-gradient(135deg, rgba(179, 38, 30, 0.12) 0 1.5px, transparent 1.5px 8px);
}
.field.needs-fill input::placeholder { color: #7a4a44; }
.field.needs-fill input:focus { background-image: none; background-color: var(--field); }
.field.needs-fill label { color: var(--pencil); font-weight: 600; }
.field .req { color: var(--pencil); }
.boq-sheet td.cell.missing input { background: transparent; font-weight: 600; }
.boq-sheet td.cell.missing input::placeholder { color: #7a4a44; }
.boq-sheet td.cell input:focus { outline: 2px solid var(--accent); outline-offset: -2px; }
.boq-sheet td.acts { white-space: nowrap; background: var(--sheet); }
.boq-sheet td.acts button + button { margin-left: 6px; }
.boq-solid { padding: 5px 10px; border: 1px solid var(--line); border-radius: 3px; background: var(--field); font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.boq-solid:hover { border-color: var(--accent); color: var(--link); }
.boq-tools button:not(.primary) { padding: 7px 12px; border: 1px solid var(--line); border-radius: 3px; background: var(--field); font-weight: 600; cursor: pointer; }
.boq-pick { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; cursor: pointer; }
.boq-pick input { width: 18px; height: 18px; accent-color: var(--accent); }
.boq-estimate { padding: 5px 10px; font-size: 13px; border: 1px solid var(--accent); border-radius: 3px; background: var(--field); color: var(--link); font-weight: 600; cursor: pointer; white-space: nowrap; }
.boq-estimate:hover { background: var(--accent); color: #fff; }
.back-boq { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 14px; padding: 8px 12px; border-left: 3px solid var(--accent); background: var(--pad); color: var(--graphite); font-size: 15px; }
.back-boq button { padding: 5px 12px; border: 1px solid var(--line); border-radius: 3px; background: var(--field); font-weight: 600; cursor: pointer; }
.boq-foot { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 40px; margin-top: 24px; align-items: start; }
.totals { margin: 0; }
.totals div { display: flex; justify-content: space-between; gap: 16px; padding: 4px 0; }
.totals dt { color: var(--graphite); }
.totals dd { margin: 0; font-weight: 600; }
.totals .rule { border-top: 1px solid var(--ink); margin-top: 4px; padding-top: 8px; }
.totals .grand { margin-top: 8px; padding-top: 8px; border-top: 2px solid var(--ink); align-items: baseline; }
.totals .grand dt { color: var(--ink); font-weight: 600; }
.totals .grand dd { font: 700 34px var(--head); color: var(--pencil); }

@media (max-width: 1200px) {
  .estimate-grid { grid-template-columns: minmax(0, 1fr); }
  .drawing { position: static; grid-row: 1; max-height: none; }
}

@media (max-width: 800px) {
  .estimate-layout { grid-template-columns: minmax(0, 1fr); }
  .estimate-nav { position: static; max-height: none; padding-right: 0; border-right: 0; }
}

@media (max-width: 960px) {
  .estimate-grid, .boq-foot { grid-template-columns: minmax(0, 1fr); }
  .drawing { position: static; grid-row: 1; max-height: none; }
}

@media (max-width: 560px) {
  .titleblock-search { max-width: none; flex-basis: auto; }
  .titleblock { position: static; height: auto; flex-direction: column; align-items: stretch; padding: 12px 16px; gap: 8px; }
  .tabs { top: 0; }
  .titleblock-total { text-align: left; }
  .titleblock-total strong { font-size: 30px; }
  .tabs { padding: 0 16px; }
  .tabs button { padding: 8px 14px; }
  .sheet { padding: 16px; }
}
/* Crew make-up and manpower cost on the Schedule. */
.sched-crew { white-space: nowrap; color: var(--muted); font-size: 0.92em; }
.sched-manpower { flex-basis: 100%; margin: 4px 0 0; color: var(--muted); font-size: 0.95em; }
/* Free trial: a bar above the header, and nothing to print. */
.free-banner { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; padding: 8px 16px; background: var(--accent-tint); border-bottom: 1px solid var(--accent); color: var(--ink); font-size: 0.95rem; }
.free-banner .primary { padding: 6px 14px; }
@media print {
  body.free-tier > * { display: none !important; }
  body.free-tier::before { content: 'Printing needs a subscription.'; display: block; padding: 40px; font: 600 18px/1.4 sans-serif; }
}
/* Count of new payments on the Admin tab. */
.tab-badge { display: inline-block; min-width: 18px; margin-left: 4px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 12px; line-height: 18px; text-align: center; }
/* Top, Side and 3D views of a concrete item. */
.sketch-views { display: flex; gap: 0; margin-bottom: 6px; }
.sketch-views button { padding: 5px 14px; border: 1px solid var(--line); background: var(--field); cursor: pointer; font: inherit; font-size: 14px; }
.sketch-views button + button { border-left: 0; }
.sketch-views button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.sketch .face-top { fill: #ece7e0; }
.sketch .face-front { fill: #d6cfc4; }
.sketch .face-side { fill: #c4bcaf; }
.user-tools { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin: 8px 0 12px; }
.user-tools label { display: flex; gap: 6px; align-items: center; }
.user-tools input[type=search] { min-width: 220px; }
