:root {
  --ink: #19312d;
  --muted: #6c7b75;
  --line: #dfe7e2;
  --ground: #f6f7f3;
  --surface: #ffffff;
  --forest: #123c35;
  --moss: #287c60;
  --mint: #e2f1e8;
  --gold: #ecae49;
  --shadow: 0 12px 34px rgba(17, 48, 42, .07);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--ground);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--ground); }
button, input, select { font: inherit; }
button { cursor: pointer; }

.app-shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 28px 18px; background: var(--forest); color: #eff8f1; display: flex; flex-direction: column; }
.brand { align-items: center; display: inline-flex; gap: 10px; color: inherit; font-size: 22px; font-weight: 760; letter-spacing: -.8px; text-decoration: none; padding: 2px 10px 33px; }
.brand > span:last-child span { color: #8edab7; }
.brand-mark { display: grid; width: 25px; height: 28px; grid-template-columns: repeat(3, 1fr); gap: 3px; align-items: end; }
.brand-mark i { display:block; background: #8edab7; border-radius: 2px 2px 0 0; }
.brand-mark i:nth-child(1) { height: 13px; }.brand-mark i:nth-child(2) { height: 25px; }.brand-mark i:nth-child(3) { height: 18px; }
.sidebar nav { display: grid; gap: 5px; }
.nav-item { color: #c2d5cb; text-decoration: none; padding: 11px 12px; border-radius: 8px; display: flex; gap: 12px; align-items: center; font-size: 14px; font-weight: 550; transition: .2s ease; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.08); }.nav-item.active { color: #fff; background: rgba(142,218,183,.15); }.nav-item > span { font-size: 17px; width: 17px; text-align: center; }.nav-item b { margin-left:auto; padding: 2px 7px; border-radius: 99px; background: rgba(255,255,255,.13); font-size: 11px; }
.sidebar-note { margin: auto 4px 5px; padding: 15px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 11px; font-size: 12px; line-height: 1.5; color:#bbcdc4; }.sidebar-note strong { display:block; color:#f4f9f5; margin: 3px 0 3px; }.sidebar-note p { margin:0; }.lock-icon { color:#8edab7; font-size:18px; }

main { min-width: 0; padding-bottom: 72px; }
.topbar { min-height: 116px; padding: 26px clamp(24px, 5vw, 72px); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.78); display:flex; align-items:center; justify-content:space-between; gap: 24px; }.eyebrow { margin:0 0 7px; color:var(--moss); letter-spacing: .115em; font-size: 10px; font-weight: 800; }.topbar h1 { margin:0; font-size:26px; letter-spacing:-.8px; }.top-actions { display:flex; align-items:center; gap:10px; }.save-status { color:var(--muted); font-size:12px; margin-right:4px; }.save-status.saved { color:var(--moss); }
.button { appearance:none; border:0; border-radius:7px; padding: 11px 15px; color:#fff; background:var(--forest); font-size:13px; font-weight:720; box-shadow:none; transition:.2s ease; }.button:hover { transform:translateY(-1px); filter:brightness(1.06); }.button.secondary { color:var(--forest); background:#fff; border:1px solid #cbd8d1; }.button.primary { background:var(--moss); }
.progress { padding: 24px clamp(24px, 5vw, 72px); display:flex; align-items:center; gap: 12px; max-width: 840px; }.progress i { height: 1px; flex:1; max-width:82px; background:#cddbd4; }.progress-step { color:#7e8d87; text-decoration:none; display:flex; align-items:center; gap:8px; font-size:12px; font-weight:680; white-space:nowrap; }.progress-step span { display:grid; place-items:center; width:23px; height:23px; border-radius:50%; color:#759088; background:#e1e8e4; font-size:11px; }.progress-step.current { color:var(--forest); }.progress-step.current span { color:#fff; background:var(--moss); }
.workspace-section { max-width: 1230px; margin: 0 auto; padding: 26px clamp(24px, 5vw, 72px); scroll-margin-top: 18px; }.section-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; margin-bottom:17px; }.section-heading.compact { margin-bottom:14px; }.section-heading h2 { margin:0; font-size:22px; line-height:1.2; letter-spacing:-.6px; }.section-heading p:not(.eyebrow) { max-width:665px; color:var(--muted); font-size:13px; line-height:1.55; margin:8px 0 0; }.pill { padding:7px 10px; border:1px solid #b9d9c7; border-radius:99px; color:#207051; background:#ecf7f0; font-size:11px; white-space:nowrap; }.panel { background:var(--surface); border:1px solid var(--line); border-radius: 12px; box-shadow:var(--shadow); }
.form-grid { padding: 21px; display:grid; grid-template-columns: repeat(4, 1fr); gap:17px; }.field { min-width:0; display:grid; gap:7px; color:#4d5d57; font-size:12px; font-weight:680; }.field.span-2 { grid-column:span 2; }.field input, .field select, .mix-picker select { width:100%; min-height:41px; padding: 9px 10px; color:var(--ink); background: #fff; border: 1px solid #cbd8d1; border-radius: 6px; outline:none; font-size:13px; font-weight: 500; transition: border .15s, box-shadow .15s; }.field input:focus, .field select:focus, .mix-picker select:focus { border-color:var(--moss); box-shadow:0 0 0 3px rgba(40,124,96,.12); }.field input::placeholder { color:#9eaba5; }.field small { margin-top:-3px; color:#8a9992; font-weight:480; font-size:10px; }
.india-sources { margin-top:14px; padding:17px; }.india-sources-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:14px; }.india-sources h3 { margin:0; font-size:14px; }.source-policy { padding:5px 7px; border-radius:99px; color:#73571e; background:#fff1cf; font-size:10px; font-weight:760; white-space:nowrap; }.india-source-summary { margin:8px 0 13px; color:var(--muted); font-size:11px; line-height:1.45; }.india-source-list { display:grid; gap:8px; }.india-source-row { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:11px; border:1px solid #dce8e0; border-radius:7px; background:#fbfdfb; }.india-source-row strong, .india-source-row small { display:block; }.india-source-row strong { font-size:12px; }.india-source-row small { margin-top:3px; color:#7a8982; font-size:10px; line-height:1.4; }.india-source-link { flex:0 0 auto; padding:6px 8px; border-radius:5px; color:#fff; background:var(--moss); font-size:10px; font-weight:750; text-decoration:none; }.india-source-empty { margin:0; padding:11px; border:1px dashed #cbd8d1; border-radius:7px; color:#708078; font-size:11px; line-height:1.45; }
.two-column-layout { display:grid; grid-template-columns:minmax(0, 1.65fr) minmax(245px, .75fr); gap: 21px; align-items:stretch; }.upload-zone { min-height:145px; border: 1.5px dashed #9bbcaf; border-radius:11px; background:#f9fcfa; display:grid; place-items:center; align-content:center; text-align:center; gap:6px; color:var(--muted); padding:18px; cursor:pointer; transition:.2s ease; }.upload-zone:hover { border-color:var(--moss); background:#f1f9f4; }.upload-zone input { position:absolute; inline-size:1px; block-size:1px; opacity:0; }.upload-zone strong { color:var(--forest); font-size:13px; }.upload-zone span:last-child { font-size:11px; }.upload-icon { display:grid; place-items:center; width:29px; height:29px; color:#fff; background:var(--moss); border-radius:50%; font-size:19px; line-height:1; }.file-list { margin-top:10px; display:grid; gap:7px; }.file-item { display:flex; align-items:center; gap:10px; padding:9px 11px; border-radius:8px; background:#fff; border:1px solid var(--line); }.file-type { padding:4px 5px; border-radius:4px; background:#e8f4ec; color:#247355; font-size:9px; font-weight:800; }.file-item div { min-width:0; flex:1; }.file-name { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; }.file-meta { display:block; margin-top:2px; color:var(--muted); font-size:10px; }.remove-file { border:0; color:#86938d; background:transparent; font-size:20px; line-height:1; }.extraction-card { padding: 22px; border-radius:12px; background:var(--forest); color:#e9f2ed; }.card-icon { color:#9ee1bc; font-size:19px; }.extraction-card h3 { margin:10px 0 7px; font-size:16px; }.extraction-card p { color:#bdcec5; font-size:12px; line-height:1.55; margin:0; }.extraction-status { margin-top:20px; padding:10px; border-radius:6px; background:rgba(255,255,255,.09); color:#d4e6da; font-size:11px; line-height:1.4; }
.extraction-review { margin-top:12px; padding:16px; }.review-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }.review-heading h3 { margin:0; font-size:14px; }.review-count { padding:4px 7px; border-radius:99px; color:#276e54; background:#e4f3e9; font-size:10px; font-weight:760; white-space:nowrap; }.review-intro { margin:8px 0 11px; color:var(--muted); font-size:11px; line-height:1.45; }.review-list { display:grid; gap:7px; }.review-row { display:grid; grid-template-columns:auto minmax(0,1fr) 98px; align-items:center; gap:9px; padding:9px; border:1px solid #e1e9e4; border-radius:7px; background:#fbfdfb; }.review-row input[type="checkbox"] { width:15px; height:15px; accent-color:var(--moss); }.review-label { min-width:0; }.review-label strong, .review-label small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.review-label strong { color:#2a443c; font-size:11px; }.review-label small { margin-top:2px; color:#81918a; font-size:10px; }.review-rate { min-width:0; display:flex; align-items:center; gap:5px; }.review-rate input { width:66px; min-height:31px; padding:5px; border:1px solid #cbd8d1; border-radius:5px; color:var(--ink); font-size:11px; }.review-rate span { color:#81918a; font-size:10px; white-space:nowrap; }.review-actions { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:12px; }.review-actions > span { color:#77867f; font-size:10px; line-height:1.35; }.review-actions .button { padding:8px 10px; font-size:11px; }.review-actions .button:disabled { cursor:not-allowed; color:#899690; background:#d9e2dc; transform:none; filter:none; }
.text-button { padding:4px 0; border:0; color:var(--moss); background:transparent; font-size:12px; font-weight:730; text-decoration:underline; text-underline-offset:3px; }.notice { display:flex; align-items:flex-start; gap:9px; margin-bottom:13px; padding:10px 13px; border-left:3px solid var(--gold); border-radius:4px; background:#fff8e9; color:#77603c; }.notice span { display:grid; place-items:center; flex:0 0 auto; width:16px; height:16px; border-radius:50%; color:#fff; background:#cc9132; font-size:11px; font-weight:700; }.notice p { margin:0; font-size:11px; line-height:1.5; }.rates-grid { padding:18px 20px; display:grid; grid-template-columns:repeat(auto-fit, minmax(130px, 1fr)); gap:13px; }
.calculator-section { padding-top:41px; }.mix-picker { width: 185px; display:grid; gap:6px; color:#53635c; font-size:11px; font-weight:720; }.mix-picker select { min-height:38px; font-size:12px; }.calculator-layout { display:grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); gap:21px; align-items:start; }.calculator-inputs { padding:21px; }.calculator-inputs h3 { margin:0; font-size:15px; }.dimension-grid { display:grid; grid-template-columns:repeat(4, 1fr); gap:13px; margin-top:17px; }.field { position:relative; }.measure-unit { position:absolute; right:10px; bottom:12px; color:#8a9992; font-size:10px; font-weight:600; }.field:has(.measure-unit) input { padding-right:28px; }.custom-mix-fields { margin-top:19px; padding:13px; background:#f5f9f6; border:1px solid #dbe8df; border-radius:7px; }.mini-heading { margin:0 0 10px; color:#537066; font-size:10px; letter-spacing:.07em; font-weight:800; }.three-field-grid, .rebar-grid { display:grid; grid-template-columns:repeat(3, 1fr); gap:12px; }.divider { height:1px; margin:21px 0; background:var(--line); }.optional-rebar { display:flex; justify-content:space-between; align-items:center; gap:15px; }.optional-rebar h3 span { color:#82918a; font-size:11px; font-weight:500; }.optional-rebar p { color:var(--muted); font-size:11px; margin:5px 0 0; }.toggle { position:relative; display:block; width:39px; height:22px; flex:0 0 auto; }.toggle input { opacity:0; width:0; height:0; }.toggle span { position:absolute; inset:0; border-radius:99px; background:#c9d4ce; transition:.2s; }.toggle span::after { content:""; position:absolute; width:16px; height:16px; top:3px; left:3px; border-radius:50%; background:#fff; box-shadow:0 1px 3px #789; transition:.2s; }.toggle input:checked + span { background:var(--moss); }.toggle input:checked + span::after { transform:translateX(17px); }.rebar-grid { grid-template-columns:repeat(2, 1fr); margin-top:17px; max-width:360px; }
.estimate-card { padding:21px; border-radius:12px; background:#f0f8f3; border:1px solid #c8e1d2; }.estimate-card-heading { padding-bottom:15px; border-bottom:1px solid #cadfd2; display:flex; justify-content:space-between; gap:10px; }.estimate-card h3 { margin:0; font-size:16px; }.volume-badge { align-self:start; padding:4px 7px; background:#fff; border:1px solid #d7e7dc; border-radius:4px; color:#36775f; font-size:10px; font-weight:760; white-space:nowrap; }.estimate-row { display:grid; grid-template-columns:1fr auto; gap:3px 10px; padding:13px 0; border-bottom:1px solid #d6e8dc; }.estimate-row span { color:#53635c; font-size:12px; }.estimate-row strong { color:#1a372f; font-size:13px; }.estimate-row small { grid-column:1 / -1; color:#688379; font-size:11px; }.estimate-total { margin-top:14px; display:flex; justify-content:space-between; color:#174333; }.estimate-total span { font-weight:700; font-size:13px; }.estimate-total strong { font-size:19px; letter-spacing:-.5px; }.estimate-footnote { margin:11px 0 15px; color:#63776d; font-size:10px; line-height:1.5; }.report-button { width:100%; background:var(--forest); }.report-button span { margin-left:6px; padding:2px 5px; color:#805500; background:#ffd783; border-radius:3px; font-size:9px; letter-spacing:.04em; }

.estimator-section { padding-top:41px; }.measure-area-unit, .fixed-unit { position:absolute; right:10px; bottom:12px; color:#8a9992; font-size:10px; font-weight:600; }.field:has(.measure-area-unit) input, .field:has(.fixed-unit) input { padding-right:34px; }.four-field-grid { display:grid; grid-template-columns:repeat(4, 1fr); gap:12px; }.brick-specification { padding-bottom:16px; }.estimator-notice { margin:20px 0 0; }
.project-summary-section { padding-top:28px; }.project-summary-layout { display:grid; grid-template-columns:minmax(0, 1.35fr) minmax(300px, .65fr); gap:21px; align-items:stretch; }.quote-inputs { padding:21px; }.quote-inputs h3 { margin:0; font-size:15px; }.pricing-grid { display:grid; grid-template-columns:repeat(4, 1fr); gap:13px; margin-top:17px; }.quote-input-note { margin:13px 0 0; color:#7d8b84; font-size:11px; line-height:1.45; }.quote-source-status { display:flex; align-items:flex-start; gap:8px; margin-top:18px; padding:11px; border-radius:7px; color:#4b6e60; background:#edf7f1; font-size:11px; line-height:1.45; }.quote-source-status > span:first-child { color:var(--moss); }.quote-card { padding:21px; border-radius:12px; color:#eff8f2; background:var(--forest); box-shadow:var(--shadow); }.quote-card-heading { display:flex; justify-content:space-between; gap:10px; padding-bottom:15px; border-bottom:1px solid rgba(225,244,233,.18); }.quote-card .eyebrow { color:#9fe0bc; }.quote-card h3 { margin:0; color:#fff; font-size:16px; }.quote-live { align-self:start; padding:4px 6px; border-radius:4px; color:#133f33; background:#a9eac5; font-size:9px; font-weight:850; letter-spacing:.05em; }.quote-line { display:flex; justify-content:space-between; gap:12px; padding:11px 0; border-bottom:1px solid rgba(225,244,233,.15); color:#c5d9ce; font-size:12px; }.quote-line strong { color:#fff; font-size:13px; }.quote-total { display:flex; justify-content:space-between; gap:12px; margin-top:14px; color:#bfe9d0; font-size:13px; font-weight:700; }.quote-total strong { color:#fff; font-size:21px; letter-spacing:-.5px; }.quote-footnote { margin:11px 0 0; color:#a3bfb0; font-size:10px; line-height:1.45; }
.saved-section { padding-top:42px; }.saved-projects { display:grid; grid-template-columns:repeat(auto-fill,minmax(255px,1fr)); gap:12px; }.empty-state { margin:0; padding:20px; color:var(--muted); font-size:13px; background:#fff; border:1px dashed #cbd8d1; border-radius:9px; }.saved-card { padding:16px; background:#fff; border:1px solid var(--line); border-radius:9px; }.saved-card h3 { margin:0 0 5px; font-size:14px; }.saved-card p { margin:0 0 14px; color:var(--muted); font-size:11px; }.saved-card footer { display:flex; justify-content:space-between; align-items:center; gap:9px; font-size:11px; }.saved-card strong { color:var(--forest); }.load-project { padding:5px 7px; color:var(--moss); background:#edf8f1; border:0; border-radius:4px; font-size:11px; font-weight:750; }
.report-dialog { max-width:410px; padding:29px; border:0; border-radius:12px; color:var(--ink); box-shadow:0 20px 70px rgba(0,0,0,.2); }.report-dialog::backdrop { background:rgba(10,36,29,.45); }.report-dialog h2 { margin:0 0 10px; font-size:22px; }.report-dialog p:not(.eyebrow) { margin:0 0 18px; color:var(--muted); line-height:1.55; font-size:13px; }.dialog-close { position:absolute; right:12px; top:8px; border:0; color:#718079; background:none; font-size:23px; }.dialog-dismiss { width:100%; }

@media (max-width: 1060px) { .rates-grid { grid-template-columns:repeat(3, 1fr); }.form-grid { grid-template-columns:repeat(2, 1fr); }.calculator-layout, .project-summary-layout { grid-template-columns:1fr 340px; }.pricing-grid { grid-template-columns:repeat(2, 1fr); } }
@media (max-width: 800px) { .app-shell { display:block; }.sidebar { position:static; height:auto; padding:16px 18px; }.brand { padding:2px 0 13px; }.sidebar nav { display:flex; overflow:auto; padding-bottom:2px; }.nav-item { padding:8px 10px; white-space:nowrap; }.nav-item > span, .sidebar-note { display:none; }.topbar { min-height:auto; padding-top:22px; padding-bottom:22px; }.progress { overflow:auto; }.two-column-layout, .calculator-layout, .project-summary-layout { grid-template-columns:1fr; }.extraction-card { min-height:0; }.rates-grid { grid-template-columns:repeat(3,1fr); }.estimate-card { position:static; }.dimension-grid { grid-template-columns:repeat(2,1fr); } }
@media (max-width: 540px) { .topbar, .section-heading { align-items:flex-start; flex-direction:column; }.top-actions { width:100%; }.top-actions .button { flex:1; }.save-status { display:none; }.progress { gap:8px; }.progress i { min-width:12px; }.progress-step { font-size:10px; }.form-grid, .rates-grid, .pricing-grid { grid-template-columns:1fr; }.field.span-2 { grid-column:span 1; }.rates-grid { gap:14px; }.section-heading h2 { font-size:20px; }.mix-picker { width:100%; }.three-field-grid, .four-field-grid { grid-template-columns:1fr; }.workspace-section { padding-top:22px; padding-bottom:22px; } }

/* ---------- Shared additions ---------- */
.field textarea { width:100%; min-height:62px; padding:9px 10px; color:var(--ink); background:#fff; border:1px solid #cbd8d1; border-radius:6px; outline:none; font:inherit; font-size:13px; font-weight:500; resize:vertical; transition:border .15s, box-shadow .15s; }
.field textarea:focus { border-color:var(--moss); box-shadow:0 0 0 3px rgba(40,124,96,.12); }
.field em { color:#8a9992; font-style:normal; font-weight:500; font-size:10px; margin-left:4px; }
.field-help { margin:10px 0 0; color:#6f7f78; font-size:11px; line-height:1.45; }
.button.small { padding:7px 10px; font-size:11px; }
.button:disabled { cursor:not-allowed; color:#899690; background:#d9e2dc; border-color:#d9e2dc; transform:none; filter:none; }
a.button { display:inline-block; text-align:center; text-decoration:none; }
.storage-alert { display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; margin:14px clamp(24px, 5vw, 72px) 0; padding:11px 14px; border:1px solid #f0b4a8; border-left:4px solid #c2412d; border-radius:6px; background:#fff3f0; color:#7a2a1d; font-size:12px; line-height:1.45; }
.storage-alert[hidden] { display:none; }
.storage-alert strong { color:#6b1e12; }
.storage-alert[data-tone="warn"] { border-color:#f1d39a; border-left-color:var(--gold); background:#fffaf0; color:#6d5626; }
.storage-alert[data-tone="warn"] strong { color:#5c4614; }

/* ---------- Provenance ---------- */
.verification-summary { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:13px; padding:10px 13px; border:1px solid #f1d39a; border-radius:7px; background:#fffaf0; color:#6d5626; }
.verification-summary p { margin:0; font-size:11px; line-height:1.5; }
.verification-summary.is-clear { border-color:#bfdccb; background:#eef8f2; color:#2a6a51; }
.verification-summary .button[hidden] { display:none; }
.tracked-field { display:grid; align-content:start; gap:6px; min-width:0; }
.prov { display:flex; flex-wrap:wrap; align-items:center; gap:4px 6px; min-height:20px; }
.prov-badge { padding:2px 6px; border-radius:99px; font-size:9.5px; font-weight:760; line-height:1.5; white-space:nowrap; }
.prov-warn .prov-badge { color:#7a5a12; background:#fff0c9; }
.prov-ok .prov-badge { color:#21684d; background:#e1f3e8; }
.prov-alert .prov-badge { color:#8f2a17; background:#fde1db; }
.prov-confirm { padding:1px 6px; border:1px solid #c9b27a; border-radius:99px; color:#6a5016; background:#fff; font-size:9.5px; font-weight:760; }
.prov-confirm:hover { background:#fff6de; }
.prov-detail { flex-basis:100%; color:#7c8a84; font-size:10px; line-height:1.4; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.advanced-assumptions { margin-top:12px; padding:0; }
.advanced-assumptions summary { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 10px; padding:14px 20px; cursor:pointer; list-style:none; }
.advanced-assumptions summary::-webkit-details-marker { display:none; }
.advanced-assumptions summary::before { content:"▸"; color:var(--moss); font-size:12px; transition:transform .15s; }
.advanced-assumptions[open] summary::before { transform:rotate(90deg); }
.advanced-assumptions summary span { color:var(--forest); font-size:13px; font-weight:760; }
.advanced-assumptions summary small { color:var(--muted); font-size:11px; }
.advanced-grid { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:13px; padding:0 20px; }
.advanced-note { margin:12px 20px 16px; color:#7d8b84; font-size:11px; line-height:1.45; }

/* ---------- Calculator additions ---------- */
.inputs-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.include-toggle { display:inline-flex; align-items:center; gap:7px; padding:5px 9px; border:1px solid #cfe0d6; border-radius:99px; color:#2f5c4c; background:#f3faf6; font-size:11px; font-weight:700; cursor:pointer; }
.include-toggle input { width:14px; height:14px; margin:0; accent-color:var(--moss); }
.excluded-chip { margin:12px 0 0; padding:6px 9px; border-radius:5px; color:#6d5626; background:#fff1cf; font-size:11px; font-weight:700; }
.estimate-card.is-excluded .estimate-row, .estimate-card.is-excluded .estimate-total { opacity:.5; }
.review-conflicts { margin:10px 0 0; padding:9px 10px; border-left:3px solid #c2412d; border-radius:4px; background:#fff3f0; color:#7a2a1d; font-size:11px; line-height:1.45; }
.review-row.is-conflict { border-color:#e9a798; background:#fff7f5; }
/* The supplier's own line and unit notes wrap and stay visible: phones show no tooltips. */
.review-row { align-items:start; }.review-row input[type="checkbox"] { margin-top:2px; }.review-rate { margin-top:-2px; }
.review-label small.review-excerpt, .review-label small.review-note, .review-label small.review-warning { white-space:normal; overflow:visible; overflow-wrap:anywhere; line-height:1.4; margin-top:4px; }
.review-label small.review-excerpt { color:#5f6f68; font-style:italic; }
.review-label small.review-note { color:#207051; font-weight:650; }
.review-label small.review-warning { color:#8a5410; font-weight:650; }
.review-row.is-flagged { border-color:#efcf8f; background:#fffaf0; }
.quote-verification { margin:9px 0 0; padding:7px 9px; border-radius:5px; color:#ffe3a3; background:rgba(255,214,120,.12); font-size:10.5px; line-height:1.4; }
.quote-boq-link { width:100%; margin-top:14px; color:var(--forest); background:#a9eac5; }
.saved-meta { margin:-8px 0 12px !important; color:#55786a !important; }
.saved-actions { display:flex; gap:6px; }
.delete-project { padding:5px 7px; color:#8f2a17; background:#fdeeea; border:0; border-radius:4px; font-size:11px; font-weight:750; }

/* ---------- BOQ ---------- */
.boq-section { padding-top:42px; }
.boq-status { align-self:flex-start; padding:6px 10px; border-radius:99px; color:#6d5626; background:#fff1cf; font-size:11px; font-weight:780; white-space:nowrap; }
.boq-status.is-issued { color:#1f6a4d; background:#e1f3e8; }
.boq-status.is-blocked { color:#8f2a17; background:#fde1db; }
.boq-warnings { display:grid; gap:7px; margin-bottom:12px; }
.boq-warning { margin:0; padding:9px 12px; border-left:3px solid; border-radius:4px; font-size:11.5px; line-height:1.45; }
.boq-warning.tone-warn { border-color:var(--gold); background:#fff8e9; color:#6d5626; }
.boq-warning.tone-alert { border-color:#c2412d; background:#fff3f0; color:#7a2a1d; }
.boq-warning.tone-info { border-color:#8fbfa8; background:#f1f8f4; color:#3b6455; }
.boq-panel { padding:18px 20px 16px; }
.boq-meta { display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:10px 18px; padding-bottom:14px; margin-bottom:4px; border-bottom:1px solid var(--line); }
.boq-meta div { min-width:0; }
.boq-meta span { display:block; color:#7c8a84; font-size:10px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; }
.boq-meta strong { display:block; margin-top:3px; color:var(--ink); font-size:12.5px; overflow-wrap:anywhere; }
.boq-table-wrap { overflow-x:auto; }
.boq-table { width:100%; border-collapse:collapse; font-size:12px; }
.boq-table th { padding:10px 8px; border-bottom:2px solid var(--forest); color:#4d5d57; font-size:10px; font-weight:800; letter-spacing:.06em; text-align:left; text-transform:uppercase; white-space:nowrap; }
.boq-table td { padding:8px; border-bottom:1px solid #e6ede9; vertical-align:top; }
.boq-table .num { text-align:right; white-space:nowrap; font-variant-numeric:tabular-nums; }
.boq-table .item-row td { padding-top:12px; background:#f6faf7; font-weight:700; color:#1d3a32; }
.boq-table .item-row .boq-desc small { display:block; margin-top:3px; color:#6c7b75; font-weight:500; font-size:11px; line-height:1.45; }
.boq-table .component-row td { color:#41534c; }
.boq-table .component-row .boq-desc { padding-left:20px; }
.boq-table .flag { color:#b7791f; font-weight:800; margin-left:2px; }
.mobile-unit { display:none; }
.field-label { display:block; }
.boq-table .subtotal-row td { border-top:1px solid #cddbd3; font-weight:760; color:#1d3a32; }
.boq-table .commercial-row td { color:#41534c; }
.boq-table .total-row td { border-top:2px solid var(--forest); border-bottom:0; padding-top:12px; color:var(--forest); font-size:14px; font-weight:820; }
.boq-table .empty-row td { padding:22px 8px; color:var(--muted); text-align:center; }
.boq-legend { margin:10px 0 0; color:#7c8a84; font-size:10.5px; line-height:1.45; }
.boq-reconcile { display:flex; flex-wrap:wrap; gap:6px; margin-top:10px; }
.boq-reconcile span { padding:3px 8px; border-radius:99px; font-size:10px; font-weight:720; }
.boq-reconcile .ok { color:#21684d; background:#e1f3e8; }
.boq-reconcile .bad { color:#8f2a17; background:#fde1db; }
.boq-layout { display:grid; grid-template-columns:minmax(0, 1.35fr) minmax(300px, .65fr); gap:21px; align-items:start; margin-top:21px; }
.branding-panel { padding:20px; }
.branding-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; }
.branding-heading h3 { margin:0; font-size:15px; }
.branding-status { padding:4px 8px; border-radius:99px; color:#6d5626; background:#fff1cf; font-size:10px; font-weight:760; white-space:nowrap; }
.branding-status.is-set { color:#21684d; background:#e1f3e8; }
.branding-grid { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:13px; margin-top:16px; }
.branding-grid .span-2 { grid-column:span 2; }
.branding-grid input[type="color"] { padding:3px; min-height:41px; cursor:pointer; }
.branding-grid .field small.is-warning { color:#a3631a; }
.logo-field > span { color:#4d5d57; font-size:12px; font-weight:680; }
.logo-row { display:flex; align-items:center; gap:10px; min-height:41px; }
.logo-row input[type="file"] { position:absolute; inline-size:1px; block-size:1px; opacity:0; }
.logo-upload { cursor:pointer; }
.logo-row .text-button[hidden] { display:none; }
.brand-preview { --brand-accent:#123c35; display:flex; align-items:center; gap:14px; margin-top:18px; padding:14px 16px; border:1px solid var(--line); border-top:4px solid var(--brand-accent); border-radius:8px; background:#fff; }
.brand-preview img { max-width:110px; max-height:48px; object-fit:contain; }
.brand-preview img[hidden] { display:none; }
.brand-preview div { min-width:0; flex:1; }
.brand-preview strong { display:block; color:var(--brand-accent); font-size:15px; overflow-wrap:anywhere; }
.brand-preview small { display:block; margin-top:3px; color:#6c7b75; font-size:11px; line-height:1.4; overflow-wrap:anywhere; }
.brand-preview-tag { align-self:flex-start; color:#7c8a84; font-size:9px; font-weight:800; letter-spacing:.08em; white-space:nowrap; }
.export-card { padding:21px; border-radius:12px; background:#f0f8f3; border:1px solid #c8e1d2; }
.export-card h3 { margin:0; color:var(--forest); font-size:17px; }
.export-state { margin:7px 0 14px; color:#4f675d; font-size:12px; line-height:1.5; }
.export-note { margin-bottom:12px; }
.export-actions { display:grid; gap:8px; }
.export-actions .button { width:100%; }
.export-blocker { margin:10px 0 0; padding:8px 10px; border-radius:5px; color:#7a2a1d; background:#fff3f0; font-size:11px; line-height:1.45; }
.export-blocker[hidden], .export-result[hidden] { display:none; }
.export-result { display:grid; gap:8px; margin-top:12px; padding:11px; border-radius:7px; background:#fff; border:1px solid #cfe2d6; font-size:11.5px; color:#2b4a3f; }
.export-result .result-actions { display:flex; flex-wrap:wrap; gap:6px; }
.export-result.is-error { border-color:#f0b4a8; background:#fff3f0; color:#7a2a1d; }
.revision-history { margin-top:18px; padding-top:14px; border-top:1px solid #cadfd2; }
.revision-list { display:grid; gap:7px; }
.revision-empty { margin:0; color:#6c7b75; font-size:11px; }
.revision-item { padding:9px 10px; border:1px solid #d4e6db; border-radius:7px; background:#fff; }
.revision-item header { display:flex; justify-content:space-between; gap:8px; font-size:12px; }
.revision-item header strong { color:var(--forest); }
.revision-item p { margin:3px 0 7px; color:#6c7b75; font-size:10.5px; line-height:1.4; overflow-wrap:anywhere; }
.revision-item .result-actions { display:flex; gap:6px; }
.revision-item .button { padding:5px 8px; font-size:10.5px; }

@media (max-width: 1060px) { .boq-layout { grid-template-columns:1fr 320px; } .boq-meta { grid-template-columns:repeat(2, minmax(0, 1fr)); } .branding-grid { grid-template-columns:repeat(2, minmax(0, 1fr)); } }
@media (max-width: 800px) { .boq-layout { grid-template-columns:1fr; } .advanced-grid { grid-template-columns:1fr 1fr; } .verification-summary { flex-direction:column; align-items:flex-start; } }
@media (max-width: 640px) {
  .boq-panel { padding:14px; }
  .boq-table thead { display:none; }
  .boq-table, .boq-table tbody, .boq-table tr, .boq-table td { display:block; width:100%; }
  .boq-table tr { padding:8px 0; border-bottom:1px solid #e6ede9; }
  .boq-table td { padding:2px 4px; border:0; }
  .boq-table td.num { display:flex; justify-content:space-between; text-align:right; }
  .boq-table td.num::before, .boq-table td.unit-cell::before { content:attr(data-label); color:#7c8a84; font-size:10px; font-weight:700; letter-spacing:.05em; text-transform:uppercase; }
  .boq-table td.unit-cell { display:none; }
  .mobile-unit { display:inline; color:#6c7b75; font-weight:500; }
  .boq-table td:empty { display:none; }
  .boq-table .ref-cell { color:#7c8a84; font-size:10px; font-weight:800; }
  .boq-table .item-row { padding:10px 8px; background:#f6faf7; border-radius:6px; }
  .boq-table .item-row td { background:transparent; padding-top:2px; }
  .boq-table .component-row .boq-desc { padding-left:4px; }
  .boq-table .total-row td { border:0; }
  .boq-table .total-row { border-top:2px solid var(--forest); }
}
@media (max-width: 540px) { .advanced-grid, .branding-grid { grid-template-columns:1fr; } .branding-grid .span-2 { grid-column:span 1; } .boq-meta { grid-template-columns:1fr 1fr; } }

/* ---------- Element builder (v0.3, designed for a 390 px phone first) ---------- */
[hidden] { display:none !important; }
.element-section { padding-top:36px; }
.group-chip { align-self:flex-start; padding:6px 10px; border:1px solid #b9d9c7; border-radius:99px; color:#207051; background:#ecf7f0; font-size:11px; font-weight:740; white-space:nowrap; font-variant-numeric:tabular-nums; }
.element-layout { display:grid; grid-template-columns:minmax(0, 1.35fr) minmax(300px, .65fr); gap:21px; align-items:start; }
.element-column { display:grid; gap:12px; min-width:0; }
.element-list { display:grid; gap:10px; }
.element-empty { margin:0; padding:16px; border:1px dashed #cbd8d1; border-radius:10px; background:#fff; color:var(--muted); font-size:12px; }
.element-card { overflow:hidden; border:1px solid var(--line); border-radius:12px; background:#fff; box-shadow:var(--shadow); }
.element-card.is-open { border-color:#a9cdb9; }
.element-card.is-excluded { background:#fafbf9; box-shadow:none; }
.element-card.is-excluded .element-name { color:#7c8a84; }
.element-card.is-excluded .element-kind { color:#7c8a84; background:#eef1ef; }
.element-head { display:flex; align-items:center; gap:8px; padding:4px 12px 4px 4px; }
.element-toggle { flex:1; min-width:0; min-height:58px; display:grid; grid-template-columns:minmax(0, 1fr) auto; grid-template-areas:"title chevron" "summary chevron"; align-items:center; gap:3px 8px; padding:10px; border:0; border-radius:9px; background:transparent; color:inherit; text-align:left; }
.element-toggle:focus-visible { outline:2px solid var(--moss); outline-offset:-2px; }
.element-title { grid-area:title; display:flex; align-items:center; gap:7px; min-width:0; }
.element-kind { flex:0 0 auto; padding:2px 6px; border-radius:4px; color:#247355; background:#e8f4ec; font-size:9.5px; font-weight:800; letter-spacing:.04em; text-transform:uppercase; }
.element-name { min-width:0; overflow:hidden; color:var(--ink); font-size:14px; font-weight:740; text-overflow:ellipsis; white-space:nowrap; }
.element-summary { grid-area:summary; color:#55786a; font-size:12px; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.element-summary.is-empty { color:#a3631a; font-weight:700; }
.element-chevron { grid-area:chevron; color:#7c8a84; font-size:22px; line-height:1; transition:transform .15s; }
.element-card.is-open .element-chevron { transform:rotate(90deg); }
.element-include { width:44px; height:26px; }
.element-include span::after { width:20px; height:20px; }
.element-include input:checked + span::after { transform:translateX(18px); }
.element-body { padding:2px 14px 14px; border-top:1px solid var(--line); }
.element-grid { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:12px; margin-top:12px; }
.element-grid .span-all, .element-grid .custom-mix-fields, .element-grid .element-rebar, .element-grid .allowance-fields { grid-column:1 / -1; }
.element-grid .custom-mix-fields { margin-top:0; }
.element-grid .field { align-self:start; }
.input-box { position:relative; display:block; }
.input-box .measure-unit, .input-box .fixed-unit, .input-box .measure-area-unit { top:50%; bottom:auto; transform:translateY(-50%); pointer-events:none; }
.element-grid .field small { margin-top:0; line-height:1.35; }
.element-grid .field input, .element-grid .field select { min-height:44px; font-size:15px; }
.allowance-fields { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:12px; }
.check-row { display:flex; align-items:center; gap:9px; min-height:40px; color:#4d5d57; font-size:12.5px; font-weight:680; }
.check-row input { width:20px; height:20px; margin:0; accent-color:var(--moss); }
.element-rebar .rebar-grid { max-width:none; margin-top:6px; }
.element-results { margin-top:14px; padding:10px 12px; border:1px solid #c8e1d2; border-radius:8px; background:#f0f8f3; }
.result-line { display:flex; justify-content:space-between; gap:10px; padding:4px 0; color:#41534c; font-size:12px; }
.result-line strong { color:#1a372f; font-variant-numeric:tabular-nums; white-space:nowrap; }
.result-total { margin-top:4px; padding-top:7px; border-top:1px solid #cadfd2; font-weight:760; }
.result-note { margin:6px 0 0; color:#688379; font-size:10.5px; line-height:1.4; }
.element-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.element-action { min-height:42px; padding:8px 12px; border:1px solid #cbd8d1; border-radius:8px; background:#fff; color:var(--forest); font-size:12.5px; font-weight:720; }
.element-action:hover:not(:disabled) { background:#f1f8f4; }
.element-action[data-action="remove"] { margin-left:auto; border-color:#f0c4b9; background:#fff7f5; color:#8f2a17; }
.element-action:disabled { border-color:#e3e8e5; background:#f4f6f5; color:#a7b3ad; cursor:not-allowed; }
.add-element { padding:12px; border:1.5px dashed #9bbcaf; border-radius:12px; background:#f9fcfa; }
.add-element .mini-heading { margin-bottom:8px; }
.add-buttons { display:flex; flex-wrap:wrap; gap:8px; }
.add-button { min-height:44px; padding:10px 14px; border:1px solid #b9d9c7; border-radius:9px; background:#fff; color:var(--forest); font-size:13px; font-weight:760; }
.add-button:hover { background:#ecf7f0; }
.add-wide { width:100%; }
.group-card [data-group-lines] .estimate-row:last-child { border-bottom:1px solid #d6e8dc; }
.group-empty { margin:12px 0 0; color:var(--muted); font-size:11px; }
.toast { position:fixed; left:50%; bottom:16px; z-index:50; display:flex; align-items:center; gap:10px; width:min(92vw, 460px); padding:10px 8px 10px 16px; border-radius:10px; background:#123c35; color:#eff8f2; box-shadow:0 12px 30px rgba(0,0,0,.25); font-size:13px; transform:translateX(-50%); }
.toast > span { flex:1; overflow-wrap:anywhere; }
.toast-button { min-height:38px; padding:8px 14px; border:0; border-radius:7px; background:#a9eac5; color:#123c35; font-size:12.5px; font-weight:800; }
.toast-close { min-width:38px; min-height:38px; border:0; background:transparent; color:#bfe9d0; font-size:22px; }
.boq-table .section-row td { padding:14px 8px 6px; border-bottom:1px solid #b9d9c7; color:var(--moss); background:transparent; font-size:10.5px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.boq-table .section-row td span { float:right; color:#55786a; letter-spacing:0; text-transform:none; font-variant-numeric:tabular-nums; }
.boq-table .item-flag { margin-left:4px; color:#b7791f; font-weight:800; }
.revision-item.is-superseded header strong { color:#55786a; }

@media (min-width: 1061px) { .element-grid { grid-template-columns:repeat(4, minmax(0, 1fr)); } .allowance-fields { grid-template-columns:repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1060px) { .element-layout { grid-template-columns:1fr 320px; } }
@media (max-width: 800px) { .element-layout { grid-template-columns:1fr; } }
@media (max-width: 540px) {
  .element-section .section-heading { gap:10px; }
  .element-card .three-field-grid { grid-template-columns:repeat(3, minmax(0, 1fr)); }
  .element-card .four-field-grid { grid-template-columns:repeat(2, minmax(0, 1fr)); }
  .allowance-fields { grid-template-columns:1fr; }
  .element-body { padding:2px 12px 12px; }
  .element-action { flex:1 1 calc(50% - 8px); }
  .element-action[data-action="remove"] { margin-left:0; }
  .boq-table .section-row { padding:12px 4px 4px; border-bottom:1px solid #b9d9c7; }
  .boq-table .section-row td { padding:0; border:0; }
}

/* ---------- Backup and restore (v0.4) ---------- */
.visually-hidden-input { position:absolute; inline-size:1px; block-size:1px; opacity:0; overflow:hidden; }
.backup-panel { display:grid; grid-template-columns:minmax(0, 1fr) auto; gap:14px 22px; align-items:start; margin-bottom:14px; padding:18px 20px; }
.backup-copy h3 { margin:0 0 6px; color:var(--forest); font-size:15px; }
.backup-line { margin:4px 0 0; color:#4f675d; font-size:12px; line-height:1.5; }
.backup-line.is-warning { color:#7a5a12; }
.backup-actions { display:grid; gap:8px; min-width:230px; }
.backup-actions .button { min-height:44px; width:100%; cursor:pointer; text-align:center; }
.backup-panel .export-result { grid-column:1 / -1; margin-top:0; }
.saved-actions { flex-wrap:wrap; justify-content:flex-end; }
.export-project { padding:5px 7px; color:var(--forest); background:#fff; border:1px solid #cbd8d1; border-radius:4px; font-size:11px; font-weight:750; }
.restore-dialog { width:min(94vw, 580px); max-width:580px; max-height:90vh; padding:22px; overflow:auto; }
.restore-dialog h2 { margin-bottom:6px; }
.restore-summary { margin:0 0 12px !important; font-size:12px !important; overflow-wrap:anywhere; }
.restore-list { display:grid; gap:10px; }
.restore-item { padding:12px; border:1px solid var(--line); border-radius:10px; background:#fbfdfb; }
.restore-item header { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:6px 10px; }
.restore-item header strong { color:var(--ink); font-size:14px; overflow-wrap:anywhere; }
.restore-chip { padding:3px 8px; border-radius:99px; font-size:10px; font-weight:780; white-space:nowrap; }
.chip-new { color:#21684d; background:#e1f3e8; }
.chip-same { color:#4d5d57; background:#eef1ef; }
.chip-different { color:#7a5a12; background:#fff0c9; }
.restore-dialog .restore-meta, .restore-dialog .restore-note { margin:6px 0 0 !important; font-size:11.5px !important; line-height:1.45 !important; }
.restore-dialog .restore-note.is-warning { color:#7a5a12 !important; }
.restore-dialog .restore-note.is-error { color:#8f2a17 !important; font-weight:700; }
.restore-choice { margin-top:10px; }
.restore-choice select { min-height:44px; font-size:14px; }
.restore-branding { margin-top:12px; padding:10px 12px; border:1px solid var(--line); border-radius:10px; }
.restore-warnings { margin-top:8px; }
.dialog-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:16px; }
.dialog-actions .button { min-height:44px; }
@media (max-width: 800px) { .backup-panel { grid-template-columns:1fr; } .backup-actions { min-width:0; } }
@media (max-width: 540px) {
  .dialog-actions { flex-direction:column-reverse; }
  .dialog-actions .button { width:100%; }
  .restore-dialog { padding:18px 14px; }
  .saved-actions button { min-height:36px; }
}
