:root{--navy:#10364d;--ink:#1a2a3c;--blue:#2475a3;--sky:#eaf4fa;--line:#dbe5ec;--muted:#5e707d;--surface:#fff;--bg:#f3f7fa;font-family:Arial,Helvetica,sans-serif;color:var(--ink);font-size:16px;line-height:1.5;font-synthesis:none}*{box-sizing:border-box}body{margin:0;background:var(--bg)}[hidden]{display:none!important}button,input,select,textarea{font:inherit}button,a,input,select,textarea,summary{touch-action:manipulation}button,a{ -webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{opacity:.55;cursor:wait}a{color:var(--blue)}.topbar{background:white;border-bottom:1px solid var(--line);padding:20px 4vw;display:flex;justify-content:space-between;align-items:center;gap:20px}.brand{display:flex;align-items:center;gap:25px}.brand img{width:195px;height:79px;object-fit:contain}.brand-divider{height:36px;width:1px;background:var(--line)}.workspace-label{font-size:.75rem;font-weight:700;letter-spacing:.17em;color:var(--muted)}.owner{text-align:right;font-size:.875rem;display:grid;gap:2px}.owner span{color:var(--muted)}main{max-width:1460px;margin:auto;padding:38px 4vw 24px}.page-heading{display:flex;justify-content:space-between;align-items:center;gap:24px;margin-bottom:29px}.eyebrow{font-size:.75rem;letter-spacing:.17em;font-weight:700;color:var(--blue);margin:0 0 9px}h1{font-size:clamp(1.65rem,2.5vw,2.35rem);letter-spacing:-.04em;line-height:1.2;margin:0;color:var(--navy)}.intro{font-size:1rem;color:var(--muted);margin:12px 0 0}.button{border:1px solid transparent;border-radius:8px;padding:11px 18px;font-size:.875rem;font-weight:700;line-height:1.4;text-decoration:none;display:inline-flex;justify-content:center;align-items:center;gap:10px;white-space:nowrap}.primary{background:var(--blue);color:white;box-shadow:0 4px 9px #1a719221}.primary:hover{background:#1b6593}.secondary{color:var(--navy);background:white;border-color:#c8d7e2}.secondary:hover{background:var(--sky)}.workspace{display:grid;grid-template-columns:minmax(0,1fr) minmax(450px,.98fr);gap:30px;align-items:start}form{min-width:0;background:white;border:1px solid var(--line);border-radius:14px;overflow:hidden;box-shadow:0 3px 8px #213b4b04}.form-section{padding:28px;border-bottom:1px solid var(--line)}.form-section:last-child{border:0}.section-heading{display:flex;align-items:center;gap:13px;margin-bottom:22px}.step{background:var(--sky);border-radius:6px;width:31px;height:31px;color:var(--blue);display:grid;place-items:center;font-size:.75rem;font-weight:700}h2{font-size:1.125rem;letter-spacing:-.02em;margin:0}h3{font-size:1rem;margin:0}.grid{display:grid;gap:17px}.grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.full{grid-column:1/-1}label{font-size:.875rem;font-weight:600;display:block;color:#344a5b}input:not([type=checkbox]),select,textarea{display:block;width:100%;margin-top:7px;border:1px solid #c9d7e1;border-radius:7px;padding:10px 11px;background:#fff;color:var(--ink);font-size:1rem;line-height:1.4;min-width:0}textarea{resize:vertical;min-height:70px}input::placeholder,textarea::placeholder{color:#8b98a2;font-weight:400}input:hover,textarea:hover,select:hover{border-color:#93b3ca}:focus-visible{outline:3px solid #86c6ee;outline-offset:3px}input:focus,textarea:focus,select:focus{border-color:var(--blue);outline:2px solid #bce3fa;outline-offset:0}.optional{font-weight:400;color:var(--muted);font-size:.75rem;margin-left:4px}.required{color:var(--blue)}small{display:block;font-size:.75rem;font-weight:400;color:var(--muted);margin-top:5px}.checkbox{display:flex;align-items:flex-start;gap:9px;font-weight:400;line-height:1.5}.checkbox input{accent-color:var(--blue);width:17px;height:17px;flex-shrink:0;margin:2px 0 0}.date-grid,#residential-factors{margin-top:19px}.sample-option{margin-top:20px;color:var(--muted)}details{margin-top:20px;background:#f6f9fb;border:1px solid var(--line);border-radius:8px;padding:12px 14px}summary{font-size:.875rem;font-weight:600;cursor:pointer;list-style-position:inside}details[open]>summary{margin-bottom:15px}.help{font-size:.875rem;line-height:1.55;color:var(--muted);margin:0 0 16px;font-weight:400}details .help{margin:12px 0}.spaced{margin-top:17px}.calculation-note{margin-top:19px;background:var(--sky);border-left:3px solid var(--blue);padding:12px 14px;color:var(--navy);font-size:.875rem}.calculation-note strong{font-size:1.1rem}.line-editor{margin:17px 0;padding:17px;background:#f7fafc;border:1px solid var(--line);border-radius:10px}.line-editor .editor-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px;gap:12px}.remove{font-size:.875rem;border:0;background:transparent;color:#92515b;padding:5px}.line-editor .grid{gap:12px}.line-editor .row-controls{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:14px}.line-editor .help{margin:11px 0 0;font-size:.75rem}.add{border:1px dashed #9cbfd6;background:white;color:var(--blue);width:100%;margin-top:10px}.add:hover{background:var(--sky)}.travel-details summary{display:flex;justify-content:space-between;gap:12px}.travel-details summary::before{content:'+';margin-right:6px}.travel-details summary span{margin-left:auto;font-weight:400;color:var(--blue)}.tax-confirm{margin:22px 0 18px}.submit{width:100%;padding:15px 20px;font-size:1rem;justify-content:space-between}.privacy-note{font-size:.75rem;text-align:center;margin:12px 0 0;color:var(--muted)}.error-box{font-size:.875rem;background:#fff0ef;border:1px solid #edbcb9;color:#902f29;padding:14px;border-radius:7px;margin-bottom:15px}.error-box ul{margin:5px 0;padding-left:20px}.preview-panel{position:sticky;top:22px;min-width:0}.preview-top{display:flex;align-items:center;justify-content:space-between;margin:1px 0 15px}.preview-top .eyebrow{margin:0}.preview-top p{font-size:.875rem;color:var(--muted);margin:3px 0 0}.pill{font-size:.7rem;letter-spacing:.06em;background:#e6eef4;border:1px solid #ccdce7;color:#566c7d;padding:5px 9px;border-radius:5px;font-weight:700}.paper{background:white;box-shadow:0 8px 32px #12334a0b,0 1px 4px #12334a09;border:1px solid #d5e0e7;border-radius:2px;padding:30px 27px 24px;min-height:610px;font-size:.8rem;line-height:1.5;overflow-wrap:anywhere;position:relative;border-top:5px solid var(--navy)}.paper-header{display:flex;align-items:flex-start;justify-content:space-between;gap:15px}.paper-logo{width:160px;max-width:100%;height:66px;object-fit:contain;object-position:left center}.paper-type{font-size:1.4rem;font-weight:800;color:var(--navy);line-height:1.2;letter-spacing:.04em;text-align:right;margin-top:12px}.paper-number{text-align:right;font-size:.75rem;margin-top:5px;color:var(--muted)}.paper-contact{font-size:.7rem;color:#64727d;margin:10px 0 20px;line-height:1.65}.paper-meta{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:13px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);font-size:.75rem}.paper-label{text-transform:uppercase;font-size:.63rem;letter-spacing:.08em;font-weight:700;color:var(--blue);margin-bottom:5px}.paper-parties{display:grid;grid-template-columns:1fr 1fr;gap:24px;margin:20px 0}.paper table{width:100%;border-collapse:collapse;table-layout:fixed;font-size:.75rem}.paper th{text-align:right;background:var(--navy);color:white;font-size:.62rem;font-weight:700;padding:9px 6px}.paper th:first-child{text-align:left;width:49%}.paper th:nth-child(2){width:12%}.paper td{padding:12px 6px;border-bottom:1px solid var(--line);text-align:right;vertical-align:top}.paper td:first-child{text-align:left}.item-description{font-weight:600}.item-detail{font-size:.65rem;color:var(--muted);margin-top:3px}.paper-totals{margin:17px 0 20px auto;max-width:240px;font-size:.75rem}.paper-totals>div{display:flex;justify-content:space-between;gap:15px;margin:6px 0}.paper-totals .due-total{background:var(--sky);border-top:2px solid var(--blue);padding:10px 8px;margin-top:10px;font-weight:700;color:var(--navy);font-size:.9rem}.paper-notes{font-size:.68rem;color:var(--muted);border-top:1px solid var(--line);padding-top:13px;white-space:pre-wrap}.paper-notes p{margin:0 0 9px}.paper-footer{border-bottom:3px solid var(--blue);padding:13px 0 9px;font-size:.6rem;letter-spacing:.06em;color:var(--blue);text-align:center}.sample-banner{background:#fff5da;color:#735827;font-size:.68rem;font-weight:700;padding:7px;margin-bottom:13px}.placeholder{color:#6a7884}.preview-bottom{display:flex;align-items:center;justify-content:space-between;padding:18px 0 0;color:var(--navy)}.preview-bottom span{font-size:.875rem}.preview-bottom strong{font-size:1.8rem;letter-spacing:-.04em}.preview-help{font-size:.75rem;color:var(--muted);margin:5px 0 0}.generated{background:white;border:1px solid #afd0e4;border-radius:12px;margin-top:24px;padding:20px}.generated-title span{display:block;font-size:.75rem;color:var(--muted);margin:5px 0 14px;overflow-wrap:anywhere}.pdf-actions{display:flex;gap:10px;flex-wrap:wrap}iframe{border:1px solid var(--line);border-radius:6px;width:100%;height:560px;margin-top:15px;background:#f3f7fa}.generated .help{margin:10px 0 0}.app-footer{font-size:.75rem;display:flex;justify-content:space-between;gap:15px;color:var(--muted);padding:25px 0 5px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(min-width:1700px){main{padding-left:45px;padding-right:45px}}@media(max-width:1080px){.workspace{grid-template-columns:minmax(0,1fr) minmax(360px,.85fr);gap:20px}.form-section{padding:22px}.paper{padding:24px 18px}.paper-logo{width:130px}.paper-type{font-size:1.15rem}.grid.three{grid-template-columns:1fr}.date-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}.date-grid input{font-size:.875rem;padding:10px 5px}.owner{display:none}}
@media(max-width:800px){.topbar{padding:14px 5vw}.brand img{width:158px;height:64px}.brand{gap:18px}.workspace-label{font-size:.65rem}.brand-divider{height:28px}main{padding:27px 5vw}.page-heading{align-items:flex-start;flex-direction:column;gap:18px}.page-heading .button{font-size:.8rem}.workspace{grid-template-columns:1fr;gap:30px}.preview-panel{position:static}.form-section{padding:23px}.grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.paper{padding:30px 24px;min-height:0}.paper-logo{width:160px}.paper-type{font-size:1.35rem}.app-footer{flex-direction:column;gap:4px}.preview-bottom{padding-top:15px}}
@media(max-width:460px){.grid.two,.grid.three,.date-grid{grid-template-columns:1fr!important}.line-editor .row-controls{grid-template-columns:repeat(2,minmax(0,1fr))}.form-section{padding:20px}.paper{padding:24px 16px}.paper-logo{width:137px}.paper-type{font-size:1.12rem}.workspace-label{max-width:75px}.paper-parties{gap:12px}.paper td,.paper th{padding-left:4px;padding-right:4px}.paper td{font-size:.68rem}.preview-top{gap:12px}.date-grid input{font-size:1rem;padding:10px 11px}iframe{height:440px}}

.drive-status{font-size:.875rem;overflow-wrap:anywhere;padding:12px;background:var(--sky);border-radius:6px}.drive-panel label{margin-top:14px}.drive-panel details .button{margin-top:15px}.drive-panel .button{white-space:normal}.setup-guide{max-width:850px;margin:auto;background:white;padding:35px;border:1px solid var(--line);border-radius:12px}.setup-guide li{margin:14px 0}.setup-guide code{overflow-wrap:anywhere}.setup-guide h2{margin-top:25px}.setup-guide p,.setup-guide li{font-size:1rem}

.template-bar{padding:18px 20px;background:white;border:1px solid var(--line);border-radius:12px;margin-bottom:24px}.template-bar>strong{font-size:.875rem}.template-buttons{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}.template-bar .help{margin:10px 0 0}.service-prices{grid-template-columns:repeat(3,minmax(0,1fr))!important}.chemical-catalog label{margin-top:12px}.chemical-catalog .button{margin-top:15px}.line-editor details{margin-top:12px}.line-editor details label{margin-top:9px}@media(max-width:460px){.template-bar{padding:15px}.template-buttons{display:grid;grid-template-columns:1fr 1fr}.template-buttons .button{padding:10px 7px;white-space:normal}.service-prices{grid-template-columns:1fr 1fr!important}.service-prices label:first-child{grid-column:1/-1}}

.mobile-action-bar{display:none}@media(max-width:800px){body{padding-bottom:calc(88px + env(safe-area-inset-bottom))}.topbar{padding:10px 5vw}.brand img{width:140px;height:55px}main{padding-top:20px}.page-heading{margin-bottom:18px}.page-heading .eyebrow{display:none}.intro{margin-top:8px}.button,summary{min-height:44px}.remove{min-width:64px;min-height:44px}.mobile-action-bar{display:flex;position:fixed;bottom:0;left:0;right:0;z-index:20;align-items:center;justify-content:space-between;gap:12px;background:#fff;border-top:1px solid var(--line);box-shadow:0 -4px 20px #10364d0c;padding:10px 5vw calc(10px + env(safe-area-inset-bottom))}.mobile-action-bar small{margin:0;font-size:.75rem}.mobile-action-bar strong{font-size:1.25rem}.mobile-action-bar .button{min-width:150px;min-height:48px}.template-buttons .button{min-height:48px}.form-section{scroll-margin-top:12px}.preview-panel{scroll-margin-bottom:110px}}

@media(min-width:801px) and (max-width:1000px){.workspace{grid-template-columns:1fr}.preview-panel{position:static}.paper{max-width:700px;margin:auto}.service-prices{grid-template-columns:repeat(3,minmax(0,1fr))!important}}.paper td:nth-child(n+2){overflow-wrap:normal;white-space:nowrap}.paper td:nth-child(2) .item-detail{white-space:normal}
.records-tools{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr);gap:18px;margin:20px 0}.records-layout{display:grid;grid-template-columns:minmax(260px,.8fr) minmax(0,1.3fr);gap:25px;align-items:start}.invoice-cards{display:grid;gap:12px}.invoice-card{text-align:left;width:100%;padding:20px;border:1px solid var(--line);border-radius:12px;background:white;display:grid;gap:9px;color:var(--navy);overflow-wrap:anywhere}.invoice-card.selected{border:2px solid var(--blue);background:var(--sky)}.card-top{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;flex-wrap:wrap}.card-top .pill{white-space:nowrap}.card-amount{font-weight:600}.account-panel{background:white;border:1px solid var(--line);border-radius:12px;padding:25px;min-width:0;scroll-margin-top:15px;overflow-wrap:anywhere}.account-totals{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:20px 0}.account-totals>div{padding:13px;background:var(--sky);border-radius:8px;display:grid;font-size:.8rem}.account-totals strong{font-size:1.25rem}.payment-form{padding:20px;margin-top:20px;box-shadow:none}.payment-form h3{margin-bottom:12px}.payment-form .grid{margin:18px 0}.payment-form>.help{margin:16px 0}.payment-entry{border:1px solid var(--line);padding:18px;border-radius:10px;margin-top:14px}.payment-entry p{margin:7px 0}.payment-entry.voided{background:#f7f7f7}.payments-page .pdf-actions{margin:12px 0}.payments-page .button{white-space:normal}.payments-page .account-panel form{border:0;padding:15px 0}.payments-page #load-more{margin-top:16px}@media(max-width:900px){.records-layout{grid-template-columns:1fr}.account-panel{padding:20px}.records-tools{grid-template-columns:1fr}.payments-page{padding-bottom:0}.payments-page .topbar{flex-wrap:wrap}.payment-form{padding:15px}.invoice-card{min-height:100px}}

/* ===== Invoice page: guided steps ===== */
.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 60;
  background: var(--navy);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus {
  top: 12px;
}
.studio-page .page-heading {
  align-items: flex-end;
  margin-bottom: 20px;
}
.studio-page .intro {
  max-width: 62ch;
}
.heading-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* "Pick up where you left off?" */
.draft-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px 20px;
  flex-wrap: wrap;
  background: #fffaf0;
  border: 1px solid #f0d49a;
  border-left: 4px solid #d9a431;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 22px;
}
.draft-banner h2 {
  font-size: 1rem;
  color: var(--navy);
}
.draft-banner p {
  margin: 4px 0 0;
  font-size: 0.875rem;
  color: #5d4a1f;
}

/* Step tracker */
.stepper {
  margin: 0 0 24px;
}
.stepper ol {
  list-style: none;
  margin: 0;
  padding: 6px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 3px 12px #213b4b0d;
}
.stepper a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--navy);
  min-width: 0;
  transition: background-color var(--dur-fast, 140ms) ease, box-shadow var(--dur-fast, 140ms) ease;
}
.stepper a:hover {
  background: var(--sky);
}
.stepper a[aria-current="step"] {
  background: var(--sky);
  box-shadow: inset 0 0 0 1px #b9d8ec;
}
.step-dot {
  position: relative;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  background: #eef3f7;
  color: var(--muted);
  border: 2px solid #d3dee7;
  transition: background-color var(--dur, 240ms) ease, border-color var(--dur, 240ms) ease, color var(--dur, 240ms) ease;
}
.step-text {
  display: grid;
  min-width: 0;
  line-height: 1.25;
}
.step-text strong,
.step-text small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.step-text strong {
  font-size: 0.85rem;
}
.step-text small {
  margin: 2px 0 0;
  font-size: 0.72rem;
}
.stepper a[data-state="progress"] .step-dot {
  border-color: var(--blue);
  color: var(--blue);
  background: #fff;
}
.stepper a[data-state="done"] .step-dot {
  background: #1f7a4d;
  border-color: #1f7a4d;
  color: transparent;
}
.stepper a[data-state="done"] .step-dot::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 5px;
  border-left: 2.5px solid #fff;
  border-bottom: 2.5px solid #fff;
  transform: translateY(-1px) rotate(-45deg);
}
.stepper a[data-state="done"] small {
  color: #1f7a4d;
}
.stepper a[data-state="attention"] .step-dot {
  background: #fff0ef;
  border-color: #d0564d;
  color: #a3342d;
}
.stepper a[data-state="attention"] small {
  color: #a3342d;
  font-weight: 700;
}
.stepper a[data-state="optional"] .step-dot {
  border-style: dashed;
}

/* Each step is its own card */
.studio-page #invoice-form {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
  display: grid;
  gap: 22px;
}
.studio-page .form-section,
.studio-page .form-section:last-child {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 3px 12px #213b4b0a;
  padding: 24px 28px 28px;
  transition: border-color var(--dur, 240ms) ease, box-shadow var(--dur, 240ms) ease;
}
.studio-page .form-section[data-state="attention"] {
  border-color: #eab5b0;
}
.studio-page .section-heading {
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #edf2f6;
}
.studio-page .section-heading .step {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 0.95rem;
  background: var(--navy);
  color: #fff;
  transition: background-color var(--dur, 240ms) ease;
}
.studio-page .form-section[data-state="done"] .section-heading .step {
  background: #1f7a4d;
}
.studio-page .form-section[data-state="attention"] .section-heading .step {
  background: #b33c34;
}
.section-titles {
  flex: 1;
  min-width: 0;
}
.section-titles h2 {
  font-size: 1.25rem;
  color: var(--navy);
  outline: none;
}
.section-lead {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.step-badge {
  flex: none;
  align-self: center;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  background: #e8f6ee;
  color: #1f7a4d;
  border: 1px solid #b9e0c9;
  white-space: nowrap;
}
.step-badge[data-state="attention"] {
  background: #fff0ef;
  color: #a3342d;
  border-color: #edbcb9;
}

/* Invoice or estimate */
.doc-type {
  border: 0;
  padding: 0;
  margin: 0 0 20px;
  min-width: 0;
}
.doc-type legend {
  font-size: 0.875rem;
  font-weight: 600;
  color: #344a5b;
  padding: 0;
  margin-bottom: 8px;
}
.choice-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.choice {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 14px 16px;
  border: 1.5px solid #c9d7e1;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 400;
  background: #fff;
  transition: border-color var(--dur-fast, 140ms) ease, background-color var(--dur-fast, 140ms) ease, box-shadow var(--dur-fast, 140ms) ease;
}
.choice:hover {
  border-color: #93b3ca;
}
.choice input[type="radio"] {
  display: inline-block;
  flex: none;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  padding: 0;
  accent-color: var(--blue);
}
.choice input[type="radio"]:focus {
  outline: none;
}
.choice strong {
  display: block;
  color: var(--navy);
  font-size: 0.95rem;
}
.choice small {
  margin-top: 2px;
}
.choice:has(input:checked) {
  border-color: var(--blue);
  background: #f2f8fc;
  box-shadow: 0 0 0 3px #bce3fa80;
}
.choice:has(input:focus-visible) {
  outline: 3px solid #86c6ee;
  outline-offset: 2px;
}

/* Addresses */
.address-wrap {
  position: relative;
}
/* The textarea sits outside its label, so it doesn't inherit the label's weight like the other fields do. */
.address-wrap textarea {
  font-weight: 600;
}
.field-help {
  margin: 6px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  align-items: baseline;
}
.address-wrap .lookup-hint,
.address-wrap.has-lookup .lookup-plain {
  display: none;
}
.address-wrap.has-lookup .lookup-hint {
  display: inline;
}
.map-link {
  font-weight: 700;
  white-space: nowrap;
}
.address-panel {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 40;
  margin-top: 4px;
  background: #fff;
  border: 1px solid #c9d7e1;
  border-radius: 10px;
  box-shadow: 0 14px 34px #10364d29;
  overflow: hidden;
}
.address-suggestions {
  list-style: none;
  margin: 0;
  padding: 4px;
  max-height: 290px;
  overflow-y: auto;
}
.address-suggestions li {
  display: grid;
  gap: 1px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
}
.address-suggestions li strong {
  font-size: 0.92rem;
  color: var(--navy);
}
.address-suggestions li span {
  font-size: 0.8rem;
  color: var(--muted);
}
.address-suggestions li:hover,
.address-suggestions li[aria-selected="true"] {
  background: var(--sky);
}
.address-credit {
  margin: 0;
  padding: 6px 12px 8px;
  font-size: 0.7rem;
  color: #7b8a96;
  border-top: 1px solid #edf2f6;
  text-align: right;
}
.studio-page .date-grid {
  margin-top: 18px;
}

/* Tuck-away sections */
.studio-page .subtle-details {
  margin-top: 18px;
  background: #f7fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0;
}
.studio-page .subtle-details > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  list-style: none;
  color: var(--navy);
  border-radius: 10px;
}
.studio-page .subtle-details > summary::-webkit-details-marker,
.studio-page .line-more > summary::-webkit-details-marker {
  display: none;
}
.studio-page .line-more > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  list-style: none;
  color: var(--navy);
}
.studio-page .subtle-details > summary::before,
.studio-page .line-more > summary::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--blue);
  border-bottom: 2px solid var(--blue);
  transform: rotate(-45deg);
  transition: transform var(--dur, 240ms) var(--ease-out, ease);
}
.studio-page .subtle-details[open] > summary::before,
.studio-page .line-more[open] > summary::before {
  transform: rotate(45deg);
}
.studio-page .subtle-details > summary:hover {
  background: #eef5fa;
}
.studio-page .subtle-details[open] > summary {
  margin-bottom: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 10px 10px 0 0;
}
.studio-page .subtle-details > :not(summary) {
  margin: 14px 16px 0;
}
.studio-page .subtle-details > :last-child {
  margin-bottom: 16px;
}
.summary-note {
  margin-left: auto;
  font-weight: 400;
  color: var(--muted);
  font-size: 0.78rem;
}

/* Services */
.quick-add {
  background: linear-gradient(180deg, #f5f9fc, #edf5fa);
  border: 1px solid #d6e5ef;
  border-radius: 12px;
  padding: 16px 18px;
}
.quick-add-label {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--navy);
}
.quick-add .template-buttons {
  margin-top: 10px;
}
.quick-add .help {
  margin: 10px 0 0;
  font-size: 0.8rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #b9d3e4;
  background: #fff;
  color: var(--navy);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 700;
  font-size: 0.85rem;
  line-height: 1.3;
}
.chip::before {
  content: "+";
  color: var(--blue);
  font-weight: 700;
}
.chip:hover {
  background: var(--sky);
  border-color: var(--blue);
}
.empty-state {
  margin: 14px 0 0;
  padding: 18px;
  border: 1.5px dashed #c6d7e3;
  border-radius: 12px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  background: #fbfdfe;
}
.empty-state.is-error {
  border-color: #d0564d;
  color: #a3342d;
  background: #fff7f6;
}
.studio-page .line-list {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}
.studio-page .line-list:empty {
  display: none;
}
.studio-page .line-editor {
  margin: 0;
  padding: 16px 18px 18px;
  background: #fff;
  border: 1px solid #d3dfe8;
  border-radius: 12px;
  box-shadow: 0 2px 6px #213b4b0a;
  transition: border-color var(--dur, 240ms) ease, box-shadow var(--dur, 240ms) ease;
}
.studio-page .line-editor:focus-within {
  border-color: #9fc4dc;
}
.studio-page .line-editor.has-issue {
  border-color: #e3a19b;
  box-shadow: 0 0 0 3px #fbe3e1;
}
.studio-page .line-editor .editor-title {
  flex-wrap: wrap;
  align-items: flex-start;
  padding-bottom: 12px;
  border-bottom: 1px dashed #dde6ed;
}
.editor-name {
  display: grid;
  flex: 1 1 160px;
  min-width: 0;
}
.editor-name strong {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
}
.editor-subtitle {
  font-weight: 700;
  color: var(--navy);
  font-size: 1rem;
  overflow-wrap: anywhere;
}
.line-total {
  align-self: center;
  font-weight: 700;
  color: var(--navy);
  font-size: 1.05rem;
  white-space: nowrap;
}
.line-total[data-state="pending"] {
  font-weight: 600;
  font-size: 0.78rem;
  color: #7a5200;
  background: #fff6e0;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: normal;
  text-align: right;
  max-width: 230px;
}
.studio-page .line-editor .remove {
  align-self: center;
  border-radius: 6px;
}
.studio-page .line-editor .remove:hover {
  background: #fbeeee;
}
.line-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.tool-button {
  padding: 8px 12px;
  font-size: 0.82rem;
  gap: 7px;
}
.tool-icon {
  width: 17px;
  height: 17px;
  flex: none;
}
.lookup-note {
  margin: 10px 0 0;
  padding: 9px 12px;
  font-size: 0.8rem;
  line-height: 1.5;
  background: #f0f7fc;
  border: 1px solid #cfe3f0;
  color: var(--navy);
  border-radius: 8px;
}
.studio-page .line-editor .material-prices {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (min-width: 1001px) and (max-width: 1239px) {
  .studio-page .line-editor .material-prices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.studio-page .add {
  margin-top: 12px;
}
.studio-page .calculation-note:empty {
  display: none;
}
.link-button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-weight: 700;
  color: var(--blue);
  text-decoration: underline;
  cursor: pointer;
}

/* Extras and travel */
.sub-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  background: #fbfdfe;
}
.sub-card + .sub-card {
  margin-top: 16px;
}
.sub-card h3 {
  color: var(--navy);
  font-size: 1.02rem;
  margin-bottom: 6px;
}
.sub-card > .help {
  margin-bottom: 0;
}
.sub-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.sub-card-head h3 {
  margin: 0;
}
.travel-summary {
  font-weight: 700;
  color: var(--navy);
  background: var(--sky);
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.85rem;
  white-space: nowrap;
}
.travel-card #travel-help {
  margin-bottom: 14px;
}
.travel-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}
.travel-row label {
  flex: 1 1 220px;
}
.travel-row .button {
  flex: none;
}
/* Payment */
.payments-later {
  margin: 16px 0 0;
}

/* Review */
.review-list {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.review-row {
  display: grid;
  grid-template-columns: minmax(120px, 34%) minmax(0, 1fr);
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid #edf2f6;
  align-items: baseline;
}
.review-row:last-child {
  border-bottom: 0;
}
.review-row dt {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
}
.review-row dd {
  margin: 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 0.9rem;
  min-width: 0;
}
.review-value {
  min-width: 0;
  overflow-wrap: anywhere;
}
.review-value small {
  margin-top: 1px;
}
.review-edit {
  flex: none;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
}
.review-edit:hover {
  text-decoration: underline;
}
.review-row.is-total {
  background: #f2f8fc;
}
.review-row.is-total dt,
.review-row.is-total dd {
  color: var(--navy);
  font-weight: 700;
  font-size: 0.95rem;
}
.review-missing {
  color: #8a5a00;
  font-style: italic;
}
.review-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  background: #fff5da;
  color: #735827;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: 1px;
}
.studio-page .tax-confirm {
  margin: 18px 0 16px;
  padding: 14px 16px;
  background: #f7fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-weight: 600;
}
.studio-page .tax-confirm:has(input:checked) {
  background: #f1f9f4;
  border-color: #b9e0c9;
}

/* Problems to fix */
.field-error {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  margin-top: 6px;
  color: #a3342d;
  font-weight: 600;
  font-size: 0.78rem;
}
.field-error::before {
  content: "!";
  flex: none;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  border-radius: 50%;
  background: #c0463e;
  color: #fff;
  font-size: 0.68rem;
}
input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: #d0564d;
  background: #fffafa;
}
input[aria-invalid="true"]:focus,
select[aria-invalid="true"]:focus,
textarea[aria-invalid="true"]:focus {
  border-color: #c0463e;
  outline-color: #f5c2bd;
}
.studio-page .error-box {
  margin: 0 0 16px;
}
.error-box .error-title {
  margin: 0 0 6px;
  font-weight: 700;
}
.error-box p {
  margin: 0;
}
.error-box ol {
  margin: 6px 0 0;
  padding-left: 20px;
  display: grid;
  gap: 5px;
}
.error-box a {
  color: #902f29;
  font-weight: 600;
}
.error-step {
  display: inline-block;
  margin-right: 7px;
  padding: 1px 6px;
  border-radius: 4px;
  background: #fbdcd9;
  color: #7d2721;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: 1px;
}
.error-box:focus {
  outline: 3px solid #f0a8a2;
  outline-offset: 2px;
}

/* Live preview */
.preview-flag {
  margin: 0 0 12px;
  padding: 8px 10px;
  font-size: 0.72rem;
  background: #fff6e0;
  border: 1px solid #f0d49a;
  color: #6d4c00;
  border-radius: 6px;
}
.placeholder-row td {
  font-style: italic;
  text-align: left !important;
}
#document-status[data-state="ready"] {
  background: #e8f6ee;
  border-color: #b9e0c9;
  color: #1f7a4d;
}
.studio-page #generated {
  border-color: #b9e0c9;
  background: #f6fbf8;
}
.generated-title {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px 10px;
}
.generated-title h3 {
  color: #1f7a4d;
}
.studio-page .generated-title span {
  margin: 0 0 10px;
}
.studio-page #generated .drive-status {
  margin: 0 0 12px;
}
.drive-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
}
.drive-head a {
  font-size: 0.82rem;
  font-weight: 700;
}
.drive-status[data-state="saved"],
.drive-status[data-state="ready"] {
  background: #eef7f1;
  color: #245c3c;
}
.drive-status[data-state="failed"],
.drive-status[data-state="error"] {
  background: #fff0ef;
  color: #902f29;
}
.drive-status[data-state="setup"] {
  background: #fff6e0;
  color: #6d4c00;
}
.drive-panel #drive-pending {
  margin: 10px 0;
}
.drive-panel #drive-upload {
  margin-top: 4px;
}

/* "Generating Invoice..." */
.generating-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgb(16 54 77 / 0.62);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 280ms ease;
}
.generating-overlay.is-visible {
  opacity: 1;
}
.generating-card {
  min-width: min(380px, 100%);
  padding: 32px 40px 28px;
  border-radius: 18px;
  background: #fff;
  text-align: center;
  box-shadow: 0 24px 60px #0a22333d;
  transform: translateY(10px) scale(0.98);
  transition: transform 420ms var(--ease-out, ease);
}
.generating-overlay.is-visible .generating-card {
  transform: none;
}
.generating-text {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 1.95rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--navy);
  white-space: nowrap;
}
.generating-dots {
  display: inline-block;
  width: 1.4ch;
  text-align: left;
}
.generating-sub {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* "Your invoice is ready" */
.result-dialog {
  width: min(1180px, calc(100vw - 32px));
  max-width: none;
  height: min(900px, calc(100dvh - 32px));
  max-height: none;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 30px 80px #0a22334d;
  overflow: hidden;
}
.result-shell {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.result-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 26px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #f3faf6, #fff);
}
.result-head .eyebrow {
  color: #1f7a4d;
  margin-bottom: 4px;
}
.result-head h2 {
  font-size: 1.5rem;
  color: var(--navy);
  outline: none;
}
.result-meta {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}
.icon-button {
  flex: none;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid #c8d7e2;
  background: #fff;
  color: var(--navy);
  font-size: 1.5rem;
  line-height: 1;
}
.icon-button:hover {
  background: var(--sky);
}
.result-body {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(330px, 0.9fr);
  gap: 24px;
  padding: 20px 26px 26px;
}
.result-preview {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.result-preview iframe {
  flex: 1;
  height: auto;
  min-height: 520px;
  margin: 0;
  border-radius: 10px;
}
.result-preview .help {
  margin: 8px 0 0;
  font-size: 0.78rem;
}
.studio-page .result-paper {
  min-height: 0;
  max-height: 75vh;
  overflow: auto;
}
.result-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.result-file {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.result-side .drive-status {
  margin: 0;
}
.job-retry {
  align-self: flex-start;
}
.studio-page #generated .job-retry {
  margin: 0 0 12px;
}
.result-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.result-actions .button {
  white-space: normal;
  text-align: center;
}
.result-actions #download-pdf {
  grid-column: 1 / -1;
  padding: 13px 18px;
  font-size: 0.95rem;
}
.email-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  background: #fbfdfe;
}
.email-card h3 {
  color: var(--navy);
  font-size: 1.05rem;
  margin-bottom: 10px;
}
.studio-page #email-form {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
  display: grid;
  gap: 12px;
}
.email-card textarea {
  min-height: 170px;
}
.email-card .help {
  margin: 0;
  font-size: 0.78rem;
}
.email-card #email-unavailable {
  display: grid;
  gap: 12px;
}
.email-status {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  background: var(--sky);
  color: var(--navy);
  border: 1px solid #cfe3f0;
}
.email-status[data-tone="success"] {
  background: #eef7f1;
  color: #245c3c;
  border-color: #c8e6d3;
}
.email-status[data-tone="error"] {
  background: #fff0ef;
  color: #902f29;
  border-color: #edbcb9;
}
.email-status[data-tone="warning"] {
  background: #fff6e0;
  color: #6d4c00;
  border-color: #f0d49a;
}
.email-card .pdf-actions .button {
  flex: 1 1 auto;
  white-space: normal;
}
.result-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding-top: 4px;
}
.result-footer .button {
  flex: 1 1 160px;
}

/* "Start a new invoice?" */
.confirm-dialog {
  width: min(440px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: 16px;
  box-shadow: 0 24px 60px #0a22334d;
}
.studio-page .confirm-dialog form {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
  padding: 24px;
}
.confirm-dialog h2 {
  font-size: 1.2rem;
  color: var(--navy);
}
.confirm-dialog p {
  color: var(--muted);
  margin: 8px 0 18px;
}

@media (min-width: 801px) {
  .stepper {
    position: sticky;
    top: 10px;
    z-index: 15;
  }
  .studio-page .form-section {
    scroll-margin-top: 96px;
  }
}
@media (min-width: 1001px) {
  .studio-page .preview-panel {
    top: 92px;
    max-height: calc(100vh - 104px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    padding: 0 4px 12px 0;
  }
}
@media (max-width: 1080px) {
  .studio-page .form-section,
  .studio-page .form-section:last-child {
    padding: 22px;
  }
  .studio-page .date-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .studio-page .date-grid input {
    font-size: 1rem;
    padding: 10px 11px;
  }
  .step-text small {
    font-size: 0.68rem;
  }
}
@media (max-width: 900px) {
  .result-body {
    grid-template-columns: 1fr;
  }
  .result-side {
    order: -1;
  }
  .result-preview iframe {
    min-height: 70vh;
  }
}
@media (max-width: 800px) {
  .studio-page {
    --toast-offset: 100px;
  }
  .studio-page .page-heading {
    align-items: flex-start;
  }
  .stepper {
    margin-bottom: 18px;
  }
  .stepper ol {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }
  .stepper ol::-webkit-scrollbar {
    display: none;
  }
  .stepper li {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }
  .stepper a {
    min-height: 48px;
  }
  .studio-page #invoice-form {
    gap: 16px;
  }
  .studio-page .form-section,
  .studio-page .form-section:last-child {
    padding: 20px 18px 22px;
    border-radius: 14px;
  }
  .studio-page .section-heading {
    flex-wrap: wrap;
  }
  .studio-page .line-editor {
    padding: 14px;
  }
  .studio-page .line-editor .material-prices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .chip {
    min-height: 44px;
  }
  .tool-button {
    min-height: 44px;
  }
  .result-dialog {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border-radius: 0;
  }
  .result-head {
    padding: 14px 16px 12px;
  }
  .result-head h2 {
    font-size: 1.25rem;
  }
  .result-body {
    padding: 16px;
    gap: 18px;
  }
}
@media (max-width: 560px) {
  .choice-row {
    grid-template-columns: 1fr;
  }
  .review-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .result-actions {
    grid-template-columns: 1fr;
  }
  .studio-page .draft-banner .pdf-actions {
    width: 100%;
  }
  .studio-page .draft-banner .button {
    flex: 1 1 auto;
  }
}
@media (max-width: 460px) {
  .studio-page .date-grid {
    grid-template-columns: 1fr !important;
  }
  .step-badge {
    display: none;
  }
  .generating-card {
    padding: 26px 22px 22px;
  }
}

/* Fuel charge */
.fuel-box {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  transition: border-color var(--dur, 240ms) ease, background-color var(--dur, 240ms) ease;
}
.fuel-box.is-on {
  border-color: #b9d8ec;
  background: #f6fbfe;
}
.fuel-toggle {
  margin: 0;
  cursor: pointer;
}
.fuel-toggle strong {
  display: block;
  color: var(--navy);
}
.fuel-toggle small {
  margin-top: 2px;
  white-space: normal;
}
.fuel-fields .grid {
  margin: 12px 0 0;
}
.fuel-fields label small {
  white-space: normal;
}
.fuel-actions .button {
  margin-top: 10px;
}
.fuel-math {
  margin: 10px 0 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
}
.fuel-math:empty {
  display: none;
}

/* Public property records */
.parcel-card {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdfe;
}
.parcel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 10px;
}
.parcel-head h3 {
  margin: 0;
  color: var(--navy);
  font-size: 0.98rem;
}
.parcel-badge {
  padding: 3px 9px;
  border-radius: 999px;
  background: #eef3f7;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
}
.parcel-status {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}
.parcel-card .tool-button {
  margin-top: 10px;
}
.parcel-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px 18px;
  margin: 12px 0 0;
}
.parcel-facts div {
  min-width: 0;
}
.parcel-facts dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.parcel-facts dd {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}
.parcel-buildings {
  margin: 12px 0 0;
  padding: 12px;
  border: 1px solid rgba(74, 144, 184, 0.28);
  border-radius: 12px;
  background: #f5fbff;
}
.parcel-buildings h4 {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: 0.9rem;
}
.parcel-buildings ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  color: var(--ink);
  font-size: 0.86rem;
}
.parcel-buildings-note,
.parcel-buildings-source {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.45;
}
:root[data-theme="dark"] .parcel-card {
  background: var(--surface);
}
:root[data-theme="dark"] .parcel-badge {
  background: rgba(255, 255, 255, 0.08);
}
:root[data-theme="dark"] .parcel-buildings {
  border-color: rgba(125, 211, 252, 0.3);
  background: rgba(125, 211, 252, 0.08);
}
.parcel-more {
  margin-top: 10px;
}
.parcel-more summary {
  color: var(--blue);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
}
.parcel-source {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.5;
}
@media (max-width: 390px) {
  .parcel-card {
    padding: 12px;
  }
  .parcel-facts {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .parcel-buildings {
    padding: 10px;
  }
}

/* Icons (icons.mjs). <i data-icon="…"> keeps the icon's space until the drawing is swapped in. */
.ui-icon {
  flex: none;
  overflow: visible;
  vertical-align: -0.2em;
}
.ui-icon:not([width]) {
  height: 1.15em;
  width: 1.15em;
}
i[data-icon] {
  display: inline-block;
  flex: none;
  height: 1.15em;
  width: 1.15em;
  vertical-align: -0.2em;
}
.button .ui-icon:not([width]) {
  height: 18px;
  width: 18px;
}