/* Fonts for Santali (Ol Chiki) and Manipuri (Meetei Mayek), which many phones lack; downloaded only when that script is on screen. */
@font-face { font-family: "SQ Ol Chiki"; src: url("vendor/fonts/noto-sans-ol-chiki-400.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+1C50-1C7F, U+200C-200D, U+25CC; }
@font-face { font-family: "SQ Ol Chiki"; src: url("vendor/fonts/noto-sans-ol-chiki-700.woff2") format("woff2"); font-weight: 600 900; font-display: swap; unicode-range: U+1C50-1C7F, U+200C-200D, U+25CC; }
@font-face { font-family: "SQ Meetei Mayek"; src: url("vendor/fonts/noto-sans-meetei-mayek-400.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+AAE0-AAF6, U+ABC0-ABFF; }
@font-face { font-family: "SQ Meetei Mayek"; src: url("vendor/fonts/noto-sans-meetei-mayek-700.woff2") format("woff2"); font-weight: 600 900; font-display: swap; unicode-range: U+AAE0-AAF6, U+ABC0-ABFF; }
: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", "SQ Ol Chiki", "SQ Meetei Mayek", "Noto Sans", 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; }
}

/* ==================================================================
 * v0.5 — step-by-step app for site use
 * One column, big tap targets, high contrast for daylight. The item
 * cards read like a measurement-book entry: No. × L × B × D = Qty.
 * Hi-vis yellow marks only the one main action on a screen.
 * ================================================================== */
:root {
  --ink: #17302b;
  --ink-soft: #4f625b;
  --paper: #ffffff;
  --ground: #f2f4f0;
  --rule: #d6e0da;
  --forest: #123c35;
  --moss: #287c60;
  --hivis: #f5c518;
  --hivis-deep: #d9a900;
  --warn-ink: #8a5410;
  --warn-bg: #fff6e3;
  --alert-ink: #a3261c;
  --alert-bg: #fdecea;
  --radius: 10px;
  --tap: 48px;
  font-size: 16px;
}
body { background: var(--ground); color: var(--ink); -webkit-text-size-adjust: 100%; }
.app { max-width: 760px; margin: 0 auto; min-height: 100vh; background: var(--ground); }
main { padding: 6px 16px 128px; }
.screen-title:focus { outline: none; }
:focus-visible { outline: 3px solid var(--hivis-deep); outline-offset: 2px; }

/* App bar and stepper */
.appbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--forest); color: #fff; }
.appbar-home { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; color: #d6eee2; text-decoration: none; font-size: 14px; font-weight: 650; }
.appbar-home .brand-mark { width: 20px; height: 22px; }
.appbar-home b { display: inline-block; min-width: 20px; margin-left: 2px; padding: 1px 6px; border-radius: 99px; background: rgba(255,255,255,.16); color: #fff; font-size: 12px; text-align: center; }
.appbar-project { flex: 1; min-width: 0; display: grid; line-height: 1.2; }
.appbar-project strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.appbar-project .save-status { display: block; margin: 0; color: #a9cbbd; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appbar-project .save-status.saved { color: #8edab7; }
.appbar .button.primary { background: #fff; color: var(--forest); min-height: 40px; }
.stepper { position: sticky; top: 60px; z-index: 25; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 8px 16px; background: var(--ground); border-bottom: 1px solid var(--rule); }
.stepper a { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; border-radius: 8px; color: var(--ink-soft); background: var(--paper); border: 1px solid var(--rule); font-size: 14px; font-weight: 650; text-decoration: none; }
.stepper a span { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--ground); font-size: 12px; font-weight: 750; }
.stepper a.is-done { color: var(--moss); border-color: #b9d9c7; }
.stepper a.is-done span { background: #dff0e6; }
.stepper a.is-current { color: #fff; background: var(--forest); border-color: var(--forest); }
.stepper a.is-current span { background: var(--hivis); color: var(--ink); }
/* Step names in long-word languages (Tamil, Malayalam…) shorten with an ellipsis instead of spilling out. */
.stepper { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stepper a { min-width: 0; padding: 0 4px; }
.stepper a b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: inherit; }

/* Screens */
.screen { padding-top: 14px; }
.screen-title { margin: 6px 0 6px; font-size: 26px; line-height: 1.15; letter-spacing: -.5px; font-weight: 760; }
.screen-lead { margin: 0 0 18px; max-width: 60ch; color: var(--ink-soft); font-size: 15px; line-height: 1.5; }
.block { margin: 0 0 18px; padding: 16px; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); }
.block-title { margin: 0 0 10px; font-size: 18px; line-height: 1.25; font-weight: 720; letter-spacing: -.2px; }
.block-title span { color: var(--ink-soft); font-size: 14px; font-weight: 550; margin-left: 4px; }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.block-head .block-title, .block-head .screen-title { margin-bottom: 0; }
.hint { margin: 6px 0 0; color: var(--ink-soft); font-size: 14px; line-height: 1.45; }
.attribution { margin: 4px 2px 20px; color: #7d8c86; font-size: 12px; line-height: 1.4; }

/* Forms */
.form-stack { display: grid; gap: 14px; }
.field { gap: 6px; color: var(--ink); font-size: 14px; font-weight: 650; }
.field em { color: var(--ink-soft); font-style: normal; font-weight: 500; }
.field input, .field select, .field textarea { min-height: var(--tap); font-size: 16px; border-radius: 8px; border: 1px solid #b9c8c0; background: #fff; color: var(--ink); padding: 10px 12px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--moss); box-shadow: 0 0 0 3px rgba(40,124,96,.18); outline: none; }
.field small, .field-help { color: var(--ink-soft); font-size: 13px; font-weight: 500; line-height: 1.4; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
details.more { border-top: 1px dashed var(--rule); padding-top: 10px; }
details.more > summary, .advanced-assumptions > summary, .boq-details > summary, .revision-history > summary, details.workings > summary { min-height: 40px; display: flex; align-items: center; color: var(--moss); font-size: 15px; font-weight: 650; cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details.more > summary::before, .advanced-assumptions > summary::before, .boq-details > summary::before, .revision-history > summary::before, details.workings > summary::before { content: "+"; display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 8px; border: 1.5px solid currentColor; border-radius: 50%; font-size: 14px; line-height: 1; }
details[open] > summary::before { content: "−"; }
details.more[open] > summary { margin-bottom: 10px; }

/* Buttons */
.button { min-height: var(--tap); padding: 12px 18px; border-radius: 8px; font-size: 15px; font-weight: 720; }
.button.small { min-height: 40px; padding: 8px 14px; font-size: 14px; }
.button.go { background: var(--hivis); color: var(--ink); }
.button.go:hover { filter: brightness(1.03); }
.text-button { min-height: 40px; color: var(--moss); font-size: 14px; font-weight: 650; }

/* Pincode */
.pincode-field { display: grid; gap: 8px; }
.pincode-result { padding: 12px 14px; border-left: 4px solid var(--moss); border-radius: 8px; background: #edf7f1; display: grid; gap: 4px; font-size: 15px; line-height: 1.4; }
.pincode-result .pincode-areas { font-size: 16px; }
.pincode-result .pincode-place { color: var(--ink-soft); }
.pincode-result .pincode-border { color: var(--warn-ink); }
.pincode-result.is-loading { border-left-color: var(--rule); background: var(--ground); color: var(--ink-soft); }
.pincode-result.is-invalid, .pincode-result.is-not_found, .pincode-result.is-offline { border-left-color: var(--hivis-deep); background: var(--warn-bg); color: var(--warn-ink); }
.pincode-result .text-button { justify-self: start; padding: 0; }

/* Government documents */
.india-sources { background: var(--paper); box-shadow: none; }
.india-source-summary { margin: 0 0 10px; color: var(--ink-soft); font-size: 14px; line-height: 1.45; }
.india-source-row { gap: 12px; padding: 12px; border-radius: 8px; }
.india-source-row strong { font-size: 14px; }
.india-source-row small { font-size: 12px; }
.india-source-link { min-height: 40px; display: inline-flex; align-items: center; padding: 8px 12px; font-size: 13px; border-radius: 8px; }
.govt-note { margin: 0 0 12px; font-size: 14px; line-height: 1.5; color: var(--ink); }

/* Items: add tiles */
.element-section { margin: 0 0 22px; padding-top: 4px; }
.group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 2px 10px; }
.group-head .block-title { margin: 0; }
.group-chip { padding: 4px 9px; border-radius: 99px; background: var(--paper); border: 1px solid var(--rule); color: var(--ink-soft); font-size: 12px; font-weight: 650; white-space: nowrap; }
.add-tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 10px 0; }
.add-tiles.single { grid-template-columns: 1fr; }
.add-tile { min-height: 72px; display: grid; justify-items: center; align-content: center; gap: 6px; padding: 10px 4px; border: 1.5px dashed #9fbcae; border-radius: var(--radius); background: #fbfdfb; color: var(--forest); font-size: 14px; font-weight: 700; }
.add-tiles.single .add-tile { min-height: 56px; grid-auto-flow: column; justify-content: center; gap: 14px; }
.add-tile:hover, .add-tile:focus-visible { border-style: solid; border-color: var(--moss); background: #f0f8f3; }
.tile-icon { display: block; width: 34px; height: 22px; position: relative; }
.tile-icon::before { content: ""; position: absolute; inset: 0; margin: auto; border: 2px solid var(--forest); border-radius: 2px; background: #e4efe8; }
.tile-slab::before { height: 7px; width: 34px; }
.tile-footing::before { top: auto; height: 9px; width: 30px; }
.tile-footing::after { content: ""; position: absolute; left: 14px; top: 0; width: 6px; height: 13px; border: 2px solid var(--forest); border-bottom: 0; background: #e4efe8; }
.tile-beam::before { height: 9px; width: 34px; }
.tile-column::before { width: 10px; height: 22px; }
.tile-custom::before { width: 22px; height: 18px; border-style: dashed; }
.tile-wall::before { width: 34px; height: 20px; background: repeating-linear-gradient(0deg, #f1d9c8 0 4px, var(--forest) 4px 5px), #f1d9c8; }
.tile-plaster::before { width: 34px; height: 20px; background: #eef1ef; border-left-width: 6px; }

/* Item cards: a measurement-book entry */
.element-list { display: grid; gap: 10px; }
.element-card { border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper); box-shadow: none; }
.element-card.is-open { border-color: #9fbcae; }
.element-head { min-height: 64px; }
.element-toggle { min-height: 64px; padding: 12px 14px; }
.element-kind { font-size: 12px; font-weight: 700; color: var(--moss); letter-spacing: 0; text-transform: none; }
.element-name { font-size: 16px; font-weight: 720; }
.element-summary { font-size: 14px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.element-body { padding: 0 14px 14px; }
.measure-picture { margin: 0 0 6px; padding: 6px 0 2px; border-bottom: 1px dashed var(--rule); }
.measure-diagram { display: block; width: 100%; max-width: 340px; height: auto; margin: 0 auto; }
.measure-diagram .face-front { fill: #fff; stroke: var(--forest); stroke-width: 1.5; }
.measure-diagram .face-top { fill: #e4efe8; stroke: var(--forest); stroke-width: 1.5; }
.measure-diagram .face-side { fill: #c9ddd2; stroke: var(--forest); stroke-width: 1.5; }
.measure-diagram .face-ghost { fill: none; stroke: #8fa69b; stroke-width: 1.2; stroke-dasharray: 3 3; }
.measure-diagram .face-brick { fill: #f6e4d7; }
.measure-diagram .face-plaster { fill: #edf1ee; stroke-width: 3; }
.measure-diagram .face-opening { fill: #fff; stroke: #8fa69b; stroke-width: 1.2; stroke-dasharray: 3 2; }
.measure-diagram text { fill: var(--ink); font-size: 11px; font-weight: 650; font-family: inherit; }
.measure-tip { margin: 4px 0 2px; padding: 10px 12px; border-radius: 8px; background: var(--ground); color: var(--ink); font-size: 14px; line-height: 1.45; }
.element-grid { gap: 14px; }
.ftin-box { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.presets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: -4px; }
.preset { min-height: 40px; padding: 8px 12px; border: 1px solid #b9c8c0; border-radius: 99px; background: #fff; color: var(--forest); font-size: 14px; font-weight: 650; }
.preset:hover { border-color: var(--moss); background: #f0f8f3; }
.preset-clear { color: var(--ink-soft); border-style: dashed; }
.element-results { margin-top: 12px; padding: 12px; border-radius: 8px; background: #f7faf8; border: 1px solid var(--rule); }
.results-heading { margin: 0 0 6px; font-size: 14px; font-weight: 720; color: var(--ink); }
.result-line { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dotted #c6d3cb; font-size: 15px; font-variant-numeric: tabular-nums; }
.result-line strong { white-space: nowrap; }
.result-total { border-bottom: 0; font-weight: 720; }
.result-note { margin: 4px 0 0; color: var(--ink-soft); font-size: 13px; }
details.workings { margin-top: 8px; border-top: 1px dashed var(--rule); padding-top: 4px; }
.workings-steps { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; line-height: 1.45; color: var(--ink); font-variant-numeric: tabular-nums; }
.element-actions { gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.element-action { min-height: 40px; padding: 8px 12px; font-size: 14px; }
.group-card { margin: 4px 0 0; padding: 0 14px; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: none; position: static; }
.group-card > summary { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; color: var(--ink-soft); cursor: pointer; list-style: none; }
.group-card > summary strong { color: var(--ink); font-size: 15px; font-variant-numeric: tabular-nums; }
.group-card[open] { padding-bottom: 12px; }
.estimate-row { font-variant-numeric: tabular-nums; }

/* Materials needed */
.materials-list { display: grid; }
.material-row { display: grid; grid-template-columns: 1fr auto auto; align-items: baseline; gap: 12px; padding: 10px 0; border-bottom: 1px dotted #c6d3cb; font-variant-numeric: tabular-nums; }
.material-row:last-child { border-bottom: 0; }
.material-name { font-weight: 650; }
.material-qty { font-size: 17px; }
.material-cost { min-width: 84px; text-align: right; color: var(--ink-soft); font-size: 14px; }

/* Rates */
.verification-summary { margin: 0 0 12px; padding: 12px; border-radius: 8px; gap: 10px; font-size: 14px; }
.rate-rows { display: grid; gap: 4px; }
.rate-row { display: grid; gap: 6px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.rate-row:last-child { border-bottom: 0; }
.rate-row > .field { font-size: 15px; }
.rate-entry { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.25fr); align-items: center; gap: 8px; }
.rate-entry:not(:has(select)) { grid-template-columns: minmax(0, 1fr) auto; max-width: 260px; }
.rate-entry input, .rate-entry select { min-height: var(--tap); width: 100%; font-size: 16px; border-radius: 8px; border: 1px solid #b9c8c0; padding: 10px 12px; background: #fff; color: var(--ink); font-variant-numeric: tabular-nums; }
.rate-entry select { font-size: 15px; }
.rupee { font-size: 18px; font-weight: 700; color: var(--ink-soft); }
.rate-entry .fixed-unit { position: static; color: var(--ink-soft); font-size: 15px; font-weight: 600; }
.advanced-assumptions { margin-top: 12px; padding: 4px 0 0; border: 0; border-top: 1px dashed var(--rule); border-radius: 0; background: none; box-shadow: none; }
.prov { gap: 6px 10px; }
.prov-detail { display: none; }
.prov .prov-badge { cursor: help; }
.pricing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.input-suffix { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px; }
.input-suffix i { font-style: normal; color: var(--ink-soft); font-weight: 650; }
.quote-source-status { margin: 12px 0 0; color: var(--ink-soft); font-size: 13px; }
.upload-zone { min-height: 96px; margin-top: 12px; border-radius: var(--radius); }
.upload-zone strong { font-size: 16px; }
.upload-zone span { font-size: 13px; }
.extraction-review { margin-top: 12px; padding: 12px 0 0; border: 0; box-shadow: none; background: none; }
.review-heading h3 { margin: 0; font-size: 16px; }
.extraction-status { margin: 12px 0 0; padding: 0; background: none; color: var(--ink-soft); font-size: 13px; }
.file-item { min-height: 56px; }

/* Quote */
.quote-card { position: static; margin: 0 0 18px; padding: 18px; border-radius: var(--radius); background: var(--forest); color: #eaf5ef; box-shadow: none; }
.quote-card h2 { margin: 0 0 12px; font-size: 18px; color: #fff; }
.quote-card .quote-line { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,.12); font-size: 15px; font-variant-numeric: tabular-nums; }
.quote-card .quote-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 10px; padding-top: 6px; }
.quote-card .quote-total span { font-size: 15px; color: #cfe6da; }
.quote-card .quote-total strong { font-size: 32px; letter-spacing: -.5px; color: #fff; font-variant-numeric: tabular-nums; }
.quote-footnote, .quote-verification { color: #b9d3c6; font-size: 13px; }
.quote-verification { color: #ffd76a; }
.boq-section { display: block; }
.boq-details { margin: 0 0 18px; padding: 4px 16px; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); }
.boq-details[open] { padding-bottom: 16px; }
.boq-panel { padding: 0; border: 0; box-shadow: none; }
.branding-panel { padding: 16px; }
.branding-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.branding-grid { gap: 12px; }
.brand-preview { margin-top: 12px; }
.export-card { position: static; margin: 0 0 18px; padding: 16px; border-radius: var(--radius); border: 2px solid var(--hivis-deep); background: #fffdf3; color: var(--ink); box-shadow: none; }
.export-card .block-title { color: var(--ink); }
.export-state { color: var(--ink-soft); font-size: 14px; }
.export-actions { display: grid; gap: 10px; margin-top: 12px; }
.export-actions .button.primary { background: var(--hivis); color: var(--ink); }
.export-actions .button.secondary { background: #fff; }
.revision-history { margin-top: 12px; border-top: 1px dashed var(--rule); padding-top: 4px; }

/* Estimates list */
#saved .block-head { margin: 6px 0 14px; }
.saved-projects { display: grid; gap: 10px; margin-bottom: 18px; }
.saved-card { padding: 14px; border-radius: var(--radius); }
.saved-card h3 { font-size: 16px; }
.saved-card footer { flex-wrap: wrap; }
.saved-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.saved-actions button { min-height: 40px; padding: 8px 12px; font-size: 14px; }
.backup-panel { display: block; }
.backup-actions { display: grid; gap: 10px; margin-top: 12px; }

/* Bottom bar: total and the next step */
.stepbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; max-width: 760px; margin: 0 auto; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--paper); border-top: 1px solid var(--rule); box-shadow: 0 -6px 18px rgba(18,60,53,.08); }
.stepbar-total { display: grid; justify-items: center; line-height: 1.1; }
.stepbar-total small { color: var(--ink-soft); font-size: 12px; font-weight: 650; }
.stepbar-total strong { font-size: 20px; font-variant-numeric: tabular-nums; letter-spacing: -.3px; }
.stepbar .button { min-width: 0; padding: 12px 14px; }
.stepbar #step-back[hidden] + .stepbar-total { justify-items: start; }
.toast { bottom: calc(86px + env(safe-area-inset-bottom)); }

@media (max-width: 420px) {
  .add-tiles { grid-template-columns: repeat(3, 1fr); }
  .stepper a { font-size: 13px; gap: 4px; }
  .rate-entry { grid-template-columns: auto minmax(0, 1fr); }
  .rate-entry select { grid-column: 1 / -1; }
  .screen-title { font-size: 24px; }
}
@media (min-width: 761px) {
  main { padding-left: 24px; padding-right: 24px; }
  .appbar, .stepper { padding-left: 24px; padding-right: 24px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .button:hover { transform: none; } }

/* Government schedule rates: reference only */
.govt-schedule { margin: 12px 0; padding: 12px; border: 1px solid var(--rule); border-radius: 8px; background: #fbfcfb; }
.govt-schedule-head { display: grid; gap: 2px; }
.govt-schedule-head small, .govt-basis, .govt-source { color: var(--ink-soft); font-size: 13px; line-height: 1.4; }
.govt-basis { margin: 6px 0 0; }
.govt-items { margin: 8px 0; }
.govt-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 8px 0; border-bottom: 1px dotted #c6d3cb; }
.govt-item:last-child { border-bottom: 0; }
.govt-item-label { display: block; font-size: 14px; font-weight: 600; }
.govt-item small { color: var(--ink-soft); font-size: 12px; }
.govt-item-rate { font-variant-numeric: tabular-nums; white-space: nowrap; }
.govt-source { display: block; margin: 4px 0 8px; }
.govt-docs-title { margin: 14px 0 8px; font-size: 14px; font-weight: 700; }
.govt-for-item { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--rule); }
.govt-for-line { margin: 4px 0; font-size: 13px; line-height: 1.45; color: var(--ink); }
.govt-for-line small { display: block; color: var(--moss); font-weight: 650; }

/* ==================================================================
 * v0.7 — calm, professional visuals and a real desktop layout
 * Phone (< 960px): one column, steps on top, total and Next at the bottom.
 * Computer (>= 960px, also a phone browser's "Desktop site"): steps and
 * the total in a left rail beside the screen. Wide (>= 1200px): each step
 * gets a working column and a side column.
 * Motion is light and functional; body.fx-off (the switch or reduced
 * motion) stops all of it in one place. Nothing here changes a number.
 * ================================================================== */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
body.fx-off *, body.fx-off *::before, body.fx-off *::after { animation: none !important; transition: none !important; }
.screen[hidden] { display: none !important; }
.rail { display: contents; }
.split-main, .split-side { min-width: 0; }

/* Phone order for split screens: the building or the quote first, Issue last. */
.screen.reorder:not([hidden]) { display: flex; flex-direction: column; }
.screen.reorder > .screen-title, .screen.reorder > .screen-lead { order: -3; }
.screen.reorder > .split-side { display: contents; }
.screen.reorder .phone-first { order: -2; }
.screen.reorder .phone-last { order: 1; }

/* Item drawings: one labelled sketch per item */
.site-scene { margin: 0 0 18px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper); overflow: hidden; }
.scene-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 12px 14px 2px; }
.scene-title { margin: 0; font-size: 16px; font-weight: 720; }
.scene-count { color: var(--ink-soft); font-size: 13px; font-weight: 600; }
.scene-strip { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x proximity; overscroll-behavior-x: contain; padding: 8px 14px 10px; scrollbar-width: thin; }
.sketch { flex: 0 0 236px; scroll-snap-align: start; display: grid; gap: 2px; min-width: 0; padding: 10px 10px 8px; border: 1px solid var(--rule); border-radius: 8px; background: #fbfcfb; color: var(--ink); text-align: left; font: inherit; cursor: pointer; transition: border-color .15s ease; }
.sketch:hover, .sketch:focus-visible { border-color: var(--moss); background: #f5faf7; }
.sketch-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; min-width: 0; }
.sketch-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 720; }
.sketch-kind { flex: none; color: var(--moss); font-size: 11px; font-weight: 700; }
.sketch-svg { display: block; width: 100%; height: auto; }
.sketch-svg polygon { stroke-width: .8; stroke-linejoin: round; }
.sketch-svg .dim { fill: var(--ink); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; paint-order: stroke; stroke: #fbfcfb; stroke-width: 3px; }
.sketch-empty { fill: none; stroke: #9fb3a9; stroke-width: 1.2; stroke-dasharray: 4 3; }
.sketch-empty-text { fill: var(--ink-soft); font-size: 12px; font-weight: 650; }
.sketch-foot { color: var(--ink-soft); font-size: 12px; line-height: 1.35; font-variant-numeric: tabular-nums; }
.sketch.is-off { background: #f6f7f6; }
.sketch.is-off .sketch-svg { opacity: .45; }
.sketch.is-off .sketch-foot { color: var(--warn-ink); font-weight: 650; }
.sketch.is-new, .sketch.is-changed { animation: sketch-flash 1.2s ease-out; }
@keyframes sketch-flash { 0%, 35% { border-color: var(--moss); box-shadow: 0 0 0 3px rgba(40,124,96,.22); } 100% { box-shadow: 0 0 0 0 rgba(40,124,96,0); } }
.sketch-none { margin: 4px 0 6px; color: var(--ink-soft); font-size: 14px; }
.card-sketch { max-width: 420px; }
.measure-picture .card-sketch .dim { stroke: #fff; }
.scene-caption { margin: 0; padding: 0 14px 12px; color: var(--ink-soft); font-size: 12px; line-height: 1.4; }
.m-footing.face-t { fill: #c3cbc6; } .m-footing.face-r { fill: #9aa49f; } .m-footing.face-l { fill: #afb8b3; } .m-footing { stroke: #6f7a75; }
.m-concrete.face-t { fill: #e6eae7; } .m-concrete.face-r { fill: #b6c0bb; } .m-concrete.face-l { fill: #ccd4cf; } .m-concrete { stroke: #75827c; }
.m-slab.face-t { fill: #eef1ef; } .m-slab.face-r { fill: #bcc5c0; } .m-slab.face-l { fill: #d4dad6; } .m-slab { stroke: #75827c; }
.m-brick.face-t { fill: #d4a58b; } .m-brick.face-r { fill: #b07a5e; } .m-brick.face-l { fill: #c28d71; } .m-brick { stroke: #84573f; }
.m-plaster.face-t { fill: #f7f4ee; } .m-plaster.face-r { fill: #ddd6c8; } .m-plaster.face-l { fill: #ebe5da; } .m-plaster { stroke: #a69c88; }
.m-opening { fill: #9fb3bd; stroke: #5d7480; stroke-width: .8; }

/* Change on the total */
.stepbar-total { position: relative; }
.money-chip { position: absolute; left: 50%; bottom: calc(100% + 2px); transform: translateX(-50%); padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; white-space: nowrap; pointer-events: none; font-variant-numeric: tabular-nums; animation: chip-fade 1.5s ease-out forwards; }
.money-chip.is-up { background: #fff4d6; color: #7a5600; }
.money-chip.is-down { background: #e3f3ea; color: #1d6a4c; }
@keyframes chip-fade { 0% { opacity: 0; transform: translate(-50%, 4px); } 15% { opacity: 1; transform: translate(-50%, 0); } 75% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -6px); } }

/* Materials: share of material cost */
.material-row { grid-template-columns: 1fr auto auto; row-gap: 6px; }
.material-bar { grid-column: 1 / -1; display: block; height: 6px; border-radius: 99px; background: #edf1ee; overflow: hidden; }
.material-fill { display: block; height: 100%; width: calc(var(--share, 0) * 100%); border-radius: 99px; transition: width .5s ease; }
.fill-cement { background: #7d8a84; }
.fill-sand { background: #c9a35b; }
.fill-aggregate { background: #5f6b66; }
.fill-rebar { background: #3e4a52; }
.fill-bricks { background: #b5704e; }
.material-share { grid-column: 1 / -1; margin-top: -2px; color: var(--ink-soft); font-size: 12px; }

/* Quote: where the money goes */
.quote-donut { display: grid; grid-template-columns: 96px 1fr; align-items: center; gap: 16px; margin: 2px 0 12px; }
.donut { width: 96px; height: 96px; transform: rotate(-90deg); }
.donut-ring { fill: none; stroke: rgba(255,255,255,.12); stroke-width: 5; }
.donut-arc { fill: none; stroke-width: 5; transition: stroke-dasharray .5s ease, stroke-dashoffset .5s ease; }
.arc-materials { stroke: #f2c94c; background: #f2c94c; }
.arc-labour { stroke: #8edab7; background: #8edab7; }
.arc-risk { stroke: #d9e6df; background: #d9e6df; }
.arc-tax { stroke: #e8956c; background: #e8956c; }
.donut-legend { display: grid; gap: 6px; font-size: 13px; color: #d7ebe0; font-variant-numeric: tabular-nums; }
.donut-legend span { display: flex; align-items: center; gap: 8px; }
.donut-legend .swatch { width: 10px; height: 10px; border-radius: 2px; flex: none; }

/* Pincode: a location marker, no motion */
.pincode-result { position: relative; padding-right: 44px; }
.pin-drop { position: absolute; right: 16px; top: 15px; width: 14px; height: 14px; border-radius: 50% 50% 50% 0; background: var(--moss); transform: rotate(-45deg); }
.pin-drop::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: #edf7f1; }

/* Steps */
.screen.enter-forward, .screen.enter-back { animation: screen-in .18s ease-out; }
@keyframes screen-in { from { opacity: 0; } to { opacity: 1; } }
.stepper a.is-done span { font-size: 0; }
.stepper a.is-done span::after { content: "✓"; font-size: 12px; }
.element-card { scroll-margin-top: 120px; }
.element-card.is-spotlit { animation: spotlight 1.4s ease-out; }
@keyframes spotlight { 0%, 40% { box-shadow: 0 0 0 3px rgba(40,124,96,.35); } 100% { box-shadow: 0 0 0 0 rgba(40,124,96,0); } }

/* Government schedules */
.india-sources[data-status="state"] .india-source-summary, .india-sources[data-status="alternative"] .india-source-summary { color: var(--ink); }
.govt-status { display: grid; gap: 3px; margin: 0 0 12px; padding: 12px 14px; border-radius: 8px; border-left: 4px solid var(--moss); background: #edf7f1; font-size: 14px; line-height: 1.45; }
.govt-status strong { font-size: 15px; }
.govt-status.is-alternative { border-left-color: var(--hivis-deep); background: var(--warn-bg); }
.govt-section { margin: 14px 0 0; }
.govt-section-title { margin: 0 0 8px; font-size: 14px; font-weight: 700; color: var(--ink); }
.govt-steps { margin: 0 0 10px; padding-left: 20px; display: grid; gap: 4px; font-size: 14px; line-height: 1.45; }
.govt-checked { display: block; margin-top: 12px; color: var(--ink-soft); font-size: 12px; line-height: 1.4; }

/* Estimate check (v0.9) */
.check-score { padding: 4px 10px; border-radius: 99px; font-size: 13px; font-weight: 750; white-space: nowrap; font-variant-numeric: tabular-nums; }
.check-score.is-good { background: #e3f3ea; color: #1d6a4c; }
.check-score.is-fair { background: var(--warn-bg); color: var(--warn-ink); }
.check-score.is-poor { background: var(--alert-bg); color: var(--alert-ink); }
.check-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; }
.check-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--rule); background: #fbfcfb; }
.check-row.is-warn { border-color: #f0d9a3; background: var(--warn-bg); }
.check-row.is-error { border-color: #f1c0bb; background: var(--alert-bg); }
.check-icon { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%; font-size: 13px; font-weight: 800; color: #fff; background: var(--hivis-deep); }
.check-row.is-error .check-icon { background: var(--alert-ink); }
.check-copy { display: grid; gap: 3px; min-width: 0; font-size: 14px; line-height: 1.45; }
.check-copy strong { font-size: 15px; }
.check-row .check-fix { min-height: 36px; padding: 6px 14px; background: #fff; }
.check-passed { display: block; padding: 8px 12px; border: 0; background: none; color: var(--moss); font-size: 14px; font-weight: 650; }

.share-result { margin: 8px 0 0; padding: 8px 10px; border-radius: 8px; background: #edf7f1; color: var(--ink); font-size: 14px; white-space: pre-line; }

/* Languages (v1.0) */
.language-button { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; max-width: 120px; padding: 6px 10px; border: 1px solid rgba(255,255,255,.28); border-radius: 8px; background: transparent; color: #fff; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.language-button:hover, .language-button:focus-visible { background: rgba(255,255,255,.1); }
.language-button span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.language-globe { position: relative; flex: none; width: 16px; height: 16px; border: 1.6px solid currentColor; border-radius: 50%; }
.language-globe::before { content: ""; position: absolute; inset: -1.6px 4px; border: 1.6px solid currentColor; border-radius: 50%; }
.language-globe::after { content: ""; position: absolute; left: -1px; right: -1px; top: 50%; border-top: 1.6px solid currentColor; }
.language-globe.large { width: 22px; height: 22px; color: var(--moss); margin-top: 2px; }
.language-dialog { width: min(560px, calc(100vw - 24px)); }
.language-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 12px 0 6px; max-height: 60vh; overflow-y: auto; }
.language-option { display: grid; gap: 2px; min-height: 56px; padding: 8px 12px; border: 1px solid var(--rule); border-radius: 8px; background: #fff; color: var(--ink); text-align: start; font: inherit; cursor: pointer; }
.language-option strong { font-size: 17px; line-height: 1.3; }
.language-option small { color: var(--ink-soft); font-size: 12px; }
.language-option:hover, .language-option:focus-visible { border-color: var(--moss); background: #f0f8f3; }
.language-option[aria-pressed="true"] { border-color: var(--forest); box-shadow: inset 0 0 0 1px var(--forest); background: #edf7f1; }
.language-option.is-loading { opacity: .6; }
.language-note { margin: 6px 0 0; color: var(--warn-ink); font-size: 13px; }
.language-note.is-error { color: var(--alert-ink); }
.language-settings { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.language-row { cursor: default; }
@media (max-width: 420px) { .language-button { padding: 6px 8px; } .appbar-home-label { font-size: 13px; } }

/* Right-to-left languages (Urdu, Kashmiri, Sindhi): mirror the few places set by side. */
[dir="rtl"] .stepper a, [dir="rtl"] .language-option { text-align: right; }
/* Right-to-left screens: names people typed keep their own direction, and the client-facing BOQ (English) reads left to right. */
[dir="rtl"] [translate="no"] { unicode-bidi: plaintext; text-align: right; }
[dir="rtl"] .boq-panel { direction: ltr; text-align: left; }
/* Drawings keep their left-to-right geometry so size labels stay where they belong. */
[dir="rtl"] svg { direction: ltr; }
[dir="rtl"] .money-chip { direction: ltr; }
[dir="rtl"] .rate-entry input, [dir="rtl"] .input-suffix input, [dir="rtl"] .field input[type="number"], [dir="rtl"] .stepbar-total strong, [dir="rtl"] .quote-total strong { direction: ltr; text-align: right; }
[dir="rtl"] .workings-steps, [dir="rtl"] .govt-steps { padding-left: 0; padding-right: 20px; }
[dir="rtl"] .pincode-result { border-left: 0; border-right: 4px solid var(--moss); padding-right: 14px; padding-left: 44px; }
[dir="rtl"] .pin-drop { right: auto; left: 16px; }
[dir="rtl"] .govt-status { border-left: 0; border-right: 4px solid var(--moss); }
[dir="rtl"] .element-chevron { transform: scaleX(-1); }

/* Settings */
.switch-row { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; cursor: pointer; }
.switch-row strong { display: block; font-size: 15px; }
.switch-row small { display: block; margin-top: 3px; color: var(--ink-soft); font-size: 13px; line-height: 1.4; }

/* ------------------------------------------------------------------
 * Computer: steps and total in a left rail
 * ------------------------------------------------------------------ */
@media (min-width: 960px) {
  body { background: var(--ground); }
  .app { max-width: 1360px; display: grid; grid-template-columns: 228px minmax(0, 1fr); grid-template-rows: auto auto 1fr; column-gap: 32px; padding: 0 32px; }
  .appbar { grid-column: 1 / -1; margin: 0 -32px; padding: 12px 32px; box-shadow: none; clip-path: none; isolation: isolate; }
  /* Extend the bar background sideways without a giant box-shadow that paints over the workspace. */
  .appbar::before { content: ""; position: absolute; z-index: -1; inset: 0 auto 0 50%; width: 100vw; transform: translateX(-50%); background: var(--forest); pointer-events: none; }
  .appbar-project strong { font-size: 16px; }
  .storage-alert { grid-column: 1 / -1; }
  .rail { grid-column: 1; grid-row: 3; display: grid; align-content: start; gap: 16px; position: sticky; top: 64px; align-self: start; padding: 28px 0 24px; }
  .stepper { position: static; grid-template-columns: 1fr; gap: 6px; padding: 0; background: none; border: 0; }
  .stepper a { justify-content: flex-start; gap: 10px; min-height: 46px; padding: 0 14px; font-size: 15px; border-color: transparent; background: none; }
  .stepper a:hover { background: var(--paper); border-color: var(--rule); }
  .stepper a.is-done { border-color: transparent; }
  .stepper a.is-current { background: var(--forest); border-color: var(--forest); }
  .stepper a span { width: 24px; height: 24px; font-size: 12px; background: var(--paper); border: 1px solid var(--rule); }
  .stepbar[hidden] { display: none; }
  .stepbar { position: static; display: grid; grid-template-columns: 1fr; grid-template-areas: "total" "next" "back"; gap: 8px; max-width: none; margin: 0; padding: 16px; border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: none; background: var(--paper); }
  .stepbar-total { grid-area: total; justify-items: start; padding-bottom: 4px; }
  .stepbar-total small { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; }
  .stepbar-total strong { font-size: 26px; }
  .stepbar #step-back { grid-area: back; }
  .stepbar #step-next { grid-area: next; }
  .stepbar .button { min-height: 44px; padding: 10px 12px; font-size: 14px; }
  .money-chip { left: auto; right: 0; bottom: auto; top: 0; transform: none; animation-name: chip-fade-side; }
  @keyframes chip-fade-side { 0% { opacity: 0; } 15% { opacity: 1; } 75% { opacity: 1; } 100% { opacity: 0; } }
  main { grid-column: 2; grid-row: 3; padding: 28px 0 72px; min-width: 0; }
  .screen-title { font-size: 30px; }
  .screen-lead { font-size: 16px; margin-bottom: 22px; }
  .toast { left: calc(50% + 130px); max-width: 520px; bottom: 24px; }
  .add-tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .add-tiles.single { grid-template-columns: minmax(0, 320px); }
  .saved-projects { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
  #saved .backup-panel, #saved .settings-block { max-width: 760px; }
  .export-actions { grid-template-columns: 1fr; }
  .boq-table-wrap { overflow-x: auto; }
}

/* Wide: a working column and a side column on every step */
@media (min-width: 1200px) {
  .screen.split:not([hidden]), .screen.reorder:not([hidden]) { display: grid; grid-template-columns: minmax(0, 1fr) 360px; column-gap: 28px; align-items: start; }
  .screen.split > .screen-title, .screen.split > .screen-lead { grid-column: 1 / -1; }
  .screen.split > .split-main { grid-column: 1; }
  .screen.split > .split-side { grid-column: 2; display: block; }
  /* In the side column the drawings wrap two to a row instead of scrolling sideways. */
  #screen-items .scene-strip { display: grid; grid-template-columns: minmax(0, 1fr); overflow: visible; }
  #screen-items .sketch { flex: none; grid-template-columns: minmax(0, 1fr); }
  #screen-items .sketch-svg { max-height: 132px; }
  #screen-site > .split-main { max-width: 640px; }
  .quote-card { margin-bottom: 16px; }
}

/* ------------------------------------------------------------------
 * Assistant (v1.1): "Ask" in the top bar opens a chat panel —
 * full screen on a phone, a side sheet on a computer.
 * ------------------------------------------------------------------ */
/* A floating "Ask" button, above the step bar on a phone and in the corner on a computer. */
.assistant-button { position: fixed; z-index: 29; right: max(16px, calc((100vw - 760px) / 2 + 16px)); bottom: calc(86px + env(safe-area-inset-bottom)); display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px 0 15px; border: 0; border-radius: 99px; background: var(--forest); color: #fff; box-shadow: 0 8px 22px rgba(18, 60, 53, .32); font: inherit; font-size: 15px; font-weight: 760; cursor: pointer; }
.assistant-button:hover, .assistant-button:focus-visible { background: #18493f; }
.assistant-button .assistant-icon { color: var(--hivis); }
.assistant-button-label { white-space: nowrap; }
body[data-current-screen="saved"] .assistant-button { bottom: calc(16px + env(safe-area-inset-bottom)); }
/* Lifted while the undo message is showing, so neither covers the other. */
#element-toast:not([hidden]) ~ .assistant-button { bottom: calc(150px + env(safe-area-inset-bottom)); }
main { padding-bottom: 156px; }
.assistant-icon { position: relative; flex: none; width: 18px; height: 15px; border: 2px solid currentColor; border-radius: 6px 6px 6px 2px; }
.assistant-icon::before { content: ""; position: absolute; left: 3px; right: 3px; top: 3px; height: 2px; border-radius: 1px; background: currentColor; box-shadow: 0 4px 0 currentColor; }
[dir="rtl"] .assistant-button { right: auto; left: max(16px, calc((100vw - 760px) / 2 + 16px)); }
/* On a computer it sits at the foot of the steps column. */
@media (min-width: 960px) {
  .assistant-button, body[data-current-screen="saved"] .assistant-button, #element-toast:not([hidden]) ~ .assistant-button { right: auto; left: max(32px, calc((100vw - 1360px) / 2 + 32px)); bottom: 24px; width: 228px; justify-content: center; border-radius: 10px; box-shadow: 0 6px 18px rgba(18, 60, 53, .18); }
  [dir="rtl"] .assistant-button, [dir="rtl"] #element-toast:not([hidden]) ~ .assistant-button { left: auto; right: max(32px, calc((100vw - 1360px) / 2 + 32px)); }
  main { padding-bottom: 96px; }
}
@media (min-width: 960px) and (max-height: 620px) {
  .assistant-button, body[data-current-screen="saved"] .assistant-button, #element-toast:not([hidden]) ~ .assistant-button { left: auto; right: 24px; width: auto; border-radius: 99px; }
  [dir="rtl"] .assistant-button, [dir="rtl"] #element-toast:not([hidden]) ~ .assistant-button { right: auto; left: 24px; }
}

.assistant-dialog { width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; padding: 0; border: 0; background: var(--ground); color: var(--ink); }
.assistant-dialog[open] { display: flex; flex-direction: column; }
.assistant-dialog::backdrop { background: rgba(10, 36, 29, .45); }
.assistant-head { display: flex; align-items: center; gap: 10px; padding: 10px 8px 10px 16px; padding-top: calc(10px + env(safe-area-inset-top)); background: var(--forest); color: #fff; }
.assistant-head h2 { flex: 1; min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 17px; font-weight: 720; }
.assistant-head .assistant-icon { color: var(--hivis); }
.assistant-new { min-height: 40px; padding: 6px 10px; border: 1px solid rgba(255,255,255,.28); border-radius: 8px; background: transparent; color: #fff; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.assistant-close { width: 44px; height: 44px; border: 0; background: none; color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
.assistant-new:hover, .assistant-close:hover { background: rgba(255,255,255,.1); border-radius: 8px; }
.assistant-body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px; overscroll-behavior: contain; }
.assistant-intro { display: grid; gap: 12px; }
.assistant-lead { margin: 0; font-size: 15px; line-height: 1.5; }
.assistant-suggestions { display: flex; flex-wrap: wrap; gap: 8px; }
.assistant-chip { min-height: 40px; padding: 8px 12px; border: 1px solid #b9d9c7; border-radius: 99px; background: #fff; color: var(--forest); font: inherit; font-size: 14px; font-weight: 650; text-align: start; cursor: pointer; }
.assistant-chip:hover, .assistant-chip:focus-visible { background: #edf7f1; border-color: var(--moss); }
.assistant-chip:disabled { opacity: .55; cursor: default; }
.assistant-privacy { margin: 0; padding: 10px 12px; border-radius: 8px; background: #eaf1ed; color: var(--ink-soft); font-size: 13px; line-height: 1.45; }
.assistant-log { display: grid; gap: 14px; }
.assistant-log:not(:empty) { margin-top: 4px; }
.assistant-msg { display: grid; gap: 6px; justify-items: start; }
.assistant-msg.is-user { justify-items: end; }
.assistant-bubble { max-width: 92%; padding: 10px 13px; border-radius: 14px 14px 14px 4px; background: #fff; border: 1px solid var(--rule); font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.assistant-msg.is-user .assistant-bubble { max-width: 85%; border-color: var(--forest); border-radius: 14px 14px 4px 14px; background: var(--forest); color: #fff; white-space: pre-wrap; }
.assistant-bubble p { margin: 0 0 8px; }
.assistant-bubble p:last-child, .assistant-bubble ul:last-child, .assistant-bubble ol:last-child { margin-bottom: 0; }
.assistant-bubble ul, .assistant-bubble ol { margin: 0 0 8px; padding-inline-start: 20px; }
.assistant-bubble li + li { margin-top: 3px; }
.assistant-status { margin: 0; color: var(--ink-soft); font-size: 14px; }
.assistant-status::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-inline-end: 8px; border-radius: 50%; background: var(--moss); vertical-align: 1px; animation: assistant-pulse 1.1s ease-in-out infinite; }
@keyframes assistant-pulse { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .assistant-status::before { animation: none; } }
.assistant-note { margin: 0; color: var(--ink-soft); font-size: 13px; }
.assistant-note.is-error { max-width: 92%; padding: 8px 10px; border-radius: 8px; background: var(--alert-bg); color: var(--alert-ink); }
.assistant-retry { min-height: 32px; color: var(--alert-ink); font-size: 13px; }
.assistant-sources { max-width: 92%; font-size: 13px; }
.assistant-sources strong { color: var(--ink-soft); font-weight: 700; }
.assistant-sources ul { margin: 4px 0 0; padding-inline-start: 18px; }
.assistant-sources a { color: var(--moss); overflow-wrap: anywhere; }
.assistant-proposal { width: min(100%, 520px); padding: 12px 14px; border: 1px solid #b9d9c7; border-inline-start: 4px solid var(--moss); border-radius: 10px; background: #fff; }
.assistant-proposal h3 { margin: 0 0 6px; font-size: 15px; font-weight: 750; }
.assistant-proposal-summary { margin: 0 0 8px; font-size: 14px; line-height: 1.45; }
.assistant-changes { display: grid; gap: 6px; margin: 0 0 10px; padding: 0; list-style: none; }
.assistant-changes li { display: grid; gap: 1px; padding: 7px 10px; border-radius: 8px; background: #f3f8f5; font-size: 13px; line-height: 1.4; }
.assistant-changes strong { font-size: 14px; }
.assistant-changes span { color: var(--ink-soft); overflow-wrap: anywhere; }
.assistant-problems { margin: 0 0 4px; color: var(--warn-ink); font-size: 13px; }
.assistant-problem-list { margin: 0 0 10px; padding-inline-start: 18px; color: var(--warn-ink); font-size: 12px; }
.assistant-proposal-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.assistant-proposal-actions:empty { display: none; }
.assistant-proposal-result { margin: 8px 0 0; font-size: 14px; font-weight: 650; color: var(--forest); }
.assistant-proposal-result:empty { display: none; }
.assistant-unavailable { margin: 14px 0 0; padding: 10px 12px; border-radius: 8px; background: var(--warn-bg); color: var(--warn-ink); font-size: 14px; line-height: 1.45; }
.assistant-composer { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--rule); background: #fff; }
.assistant-composer textarea { flex: 1; min-width: 0; min-height: 44px; max-height: 150px; padding: 10px 12px; border: 1px solid #c8d5ce; border-radius: 10px; background: #fff; color: var(--ink); font: inherit; font-size: 16px; line-height: 1.4; resize: none; }
.assistant-composer textarea:focus { border-color: var(--moss); outline: 2px solid #cfe6d9; }
.assistant-composer .button { flex: none; min-height: 44px; }
.assistant-dialog.is-unavailable .assistant-composer textarea, .assistant-dialog.is-unavailable .assistant-chip { opacity: .6; }
.assistant-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 10px; margin: 0; padding: 0 12px 8px; padding-bottom: calc(8px + env(safe-area-inset-bottom)); background: #fff; color: var(--ink-soft); font-size: 12px; text-align: center; }
.assistant-claude { min-height: 32px; padding: 4px 10px; border: 1px solid #cbd8d1; border-radius: 99px; background: #fff; color: var(--forest); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.assistant-claude::after { content: " ↗"; }
.assistant-claude:hover, .assistant-claude:focus-visible { border-color: var(--moss); background: #edf7f1; }
[dir="rtl"] .assistant-bubble { text-align: start; }
@media (min-width: 760px) {
  .assistant-dialog { width: 460px; max-width: 460px; height: 100%; margin: 0 0 0 auto; box-shadow: -12px 0 40px rgba(0,0,0,.18); }
  [dir="rtl"] .assistant-dialog { margin: 0 auto 0 0; }
}

/* Make items from a file (v1.2) */
.items-from-file .hint { margin: 0 0 12px; }
.items-file-button { display: inline-flex; align-items: center; cursor: pointer; }
.items-file-status { margin: 10px 0 0; }


/* Counted wall openings (doors, windows, ventilators and custom cut-outs). */
.opening-schedule { min-width: 0; padding: 14px; border-radius: 10px; border: 1px solid #d8e7dd; background: #f8fbf8; }
.opening-schedule > .mini-heading { margin-bottom: 6px; }
.opening-schedule > .field-help { display: block; margin: 0 0 12px; }
.opening-add-actions { margin: 0 0 12px; }
.opening-add-actions .preset { min-height: 38px; }
.opening-item-list { display: grid; gap: 10px; }
.opening-item { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.opening-item-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.opening-item-head strong { color: var(--forest); font-size: 13px; }
.opening-remove { flex: 0 0 auto; min-height: 32px; }
.opening-item-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; }
.opening-item-fields .field { min-width: 0; }
.opening-item-fields .field input, .opening-item-fields .field select { min-height: 42px; font-size: 14px; }
.opening-dimension-note { grid-column: 1 / -1; margin: -3px 0 0; color: var(--ink-soft); font-size: 12px; }
.opening-empty { margin: 0; padding: 12px; border: 1px dashed var(--line); border-radius: 8px; color: var(--ink-soft); font-size: 13px; }
@media (max-width: 540px) {
  .opening-item-fields { grid-template-columns: 1fr; }
  .opening-schedule { padding: 12px; }
  .opening-add-actions .preset { flex: 1 1 calc(50% - 8px); }
}


/* Item-specific material and labour rates. Blank / unchecked means use the project rate. */
.rate-override-fields { min-width: 0; padding: 14px; border: 1px solid #d8e7dd; border-radius: 10px; background: #f8fbf8; }
.rate-override-fields > .mini-heading { margin-bottom: 5px; }
.rate-override-fields > .field-help { display: block; margin: 0 0 12px; }
.rate-override-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rate-override-row { min-width: 0; padding: 11px; border: 1px solid var(--line); border-radius: 9px; background: #fff; display: grid; gap: 8px; }
.rate-override-heading { min-width: 0; display: grid; gap: 3px; }
.rate-override-heading strong { color: var(--forest); font-size: 13px; }
.rate-override-heading small { color: var(--ink-soft); font-size: 11px; line-height: 1.35; }
.rate-override-toggle { font-size: 12px; }
.rate-override-row .field { min-width: 0; }
.rate-override-row .field input { min-height: 40px; font-size: 14px; }
.rate-override-row [data-rate-override-value] { margin: 0; }
@media (max-width: 540px) {
  .rate-override-fields { padding: 12px; }
  .rate-override-list { grid-template-columns: 1fr; }
}

.rate-source-note { display: inline-block; margin-left: 7px; color: var(--warning-ink, #875b12); font-size: 10px; font-weight: 600; }

.result-note.geometry-error { color: #9b3024; font-weight: 650; }
.geometry-help { margin: -4px 0 2px; }


/* Account entry point */
.account-link {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--forest);
  background: #fff;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color .18s, background .18s, color .18s;
}
.account-link:hover {
  border-color: #b8d3c2;
  color: #1e694b;
  background: #f5faf6;
}
@media (max-width: 540px) {
  .account-link { min-height: 32px; padding: 0 8px; font-size: 10px; }
}


/* Signed-in account menu */
.account-control { position: relative; z-index: 1; display: inline-flex; align-items: center; flex: 0 0 auto; }
.account-link-icon { display: none; width: 15px; height: 15px; }
.account-link-icon circle, .account-link-icon path { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.account-menu-button {
  min-height: 36px;
  max-width: 190px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 9px 3px 4px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--forest);
  background: #fff;
  font-size: 11px;
  font-weight: 700;
}
.account-menu-button:hover { border-color: #b8d3c2; background: #f7fbf8; }
.account-avatar {
  width: 26px;
  height: 26px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #205e43;
  background: #e1f0e6;
  font-size: 10px;
  font-weight: 800;
}
.account-menu-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-menu-chevron { color: #819188; font-size: 13px; }
.account-menu-panel {
  position: absolute;
  z-index: 100;
  top: calc(100% + 9px);
  right: 0;
  width: min(260px, calc(100vw - 36px));
  display: grid;
  gap: 7px;
  padding: 15px;
  border: 1px solid #e0e9e3;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(20, 47, 39, .16);
}
.account-menu-panel[hidden] { display: none !important; }
.account-menu-kicker { color: #6a927b; font-size: 8px; font-weight: 800; letter-spacing: 1.2px; }
.account-menu-panel strong { color: var(--ink); font-size: 12px; }
.account-menu-panel small { overflow-wrap: anywhere; color: var(--muted); font-size: 10px; }
.account-role { width: fit-content; padding: 4px 7px; border: 1px solid #d8e9df; border-radius: 999px; color: #236345; background: #f0f8f2; font-size: 8px; font-weight: 800; letter-spacing: .7px; }
.account-menu-panel button {
  min-height: 35px;
  margin-top: 5px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #9b3831;
  background: #fff;
  font-size: 10px;
  font-weight: 700;
}
.account-menu-panel button:hover { border-color: #e8c8c4; background: #fff8f7; }
@media (max-width: 540px) {
  .appbar { gap: 7px; padding-left: 10px; padding-right: 10px; }
  .account-link { width: 32px; min-width: 32px; height: 32px; min-height: 32px; justify-content: center; padding: 0; font-size: 0; }
  .account-link-label { display: none; }
  .account-link-icon { display: block; }
  .account-menu-button { width: 32px; min-width: 32px; min-height: 32px; max-width: 32px; justify-content: center; gap: 0; padding: 3px; }
  .account-menu-label, .account-menu-chevron { display: none; }
  .account-avatar { width: 23px; height: 23px; }
}


/* Authentication entry gate: keep the estimator hidden until account state is checked. */
body.auth-checking #app { visibility: hidden; }
.auth-gate { position: fixed; z-index: 1000; inset: 0; width: 100%; min-height: 100vh; background: #f5f7f4; }
.auth-gate[hidden] { display: none !important; }
.auth-gate iframe { display: block; width: 100%; height: 100%; min-height: 100vh; border: 0; background: #f5f7f4; }

.site-legal-footer{display:flex;flex-wrap:wrap;justify-content:space-between;gap:10px;padding:18px 24px 26px;border-top:1px solid var(--line);color:var(--muted);font-size:12px}.site-legal-footer a,.auth-legal-links a{margin-right:14px;color:var(--green);text-decoration:none}.site-legal-footer a:hover,.auth-legal-links a:hover{text-decoration:underline}.auth-legal-links{display:flex;gap:16px;flex-wrap:wrap}.auth-legal-links a{font-size:12px;font-weight:650}

/* Account cloud-sync indicator */
.cloud-sync-status { display: block; margin-top: 5px; font-size: 11px; line-height: 1.45; color: var(--muted, #71817b); overflow-wrap: anywhere; }
.cloud-sync-status[data-tone="success"] { color: #24775c; }
.cloud-sync-status[data-tone="working"] { color: #9a6a1a; }
.cloud-sync-status[data-tone="error"] { color: #a7342c; }

.owner-admin-entry { min-height: 34px; margin-top: 5px; border: 1px solid #d8e9df !important; border-radius: 6px; color: #236345 !important; background: #f5faf6 !important; font-size: 11px !important; font-weight: 750 !important; }
.owner-admin-entry[hidden] { display: none !important; }
body.owner-admin-open { overflow: hidden; }
