:root {
  color-scheme: light;
  --bg: #f3f1eb;
  --surface: #fbfaf7;
  --surface-soft: #efede7;
  --ink: #171913;
  --muted: #6f7169;
  --line: #dad8d0;
  --lime: #c9ff52;
  --lime-deep: #a6dc34;
  --dark: #151712;
  --shadow: 0 20px 65px rgba(31, 34, 25, 0.1);
  --radius: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.dark-mode {
  --bg: #11120f;
  --surface: #1a1c17;
  --surface-soft: #20231c;
  --ink: #f4f4ee;
  --muted: #a7aa9f;
  --line: #34372f;
  --dark: #080907;
  --shadow: 0 20px 80px rgba(0,0,0,.35);
}

button, input, select { font: inherit; }
button, select { cursor: pointer; }
button { color: inherit; }
.page-glow { position: fixed; width: 420px; height: 420px; border-radius: 50%; filter: blur(110px); pointer-events: none; opacity: .23; z-index: -1; }
.glow-one { top: 90px; left: -240px; background: var(--lime); }
.glow-two { bottom: -220px; right: -150px; background: #adbcff; opacity: .16; }

.topbar {
  max-width: 1260px;
  margin: 0 auto;
  min-height: 82px;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand { color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 11px; font-size: 18px; font-weight: 750; letter-spacing: -.02em; }
.brand small { padding: 3px 6px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); font-size: 9px; letter-spacing: .08em; vertical-align: 2px; }
.brand-mark { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--dark); color: var(--lime); }
.brand-mark svg { width: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.topbar-actions { display: flex; align-items: center; gap: 18px; }
.save-state { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lime-deep); box-shadow: 0 0 0 4px color-mix(in srgb, var(--lime) 18%, transparent); }
.icon-button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); display: grid; place-items: center; }
.icon-button svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }

main { max-width: 1440px; margin: 0 auto; padding: 0 28px 80px; }
.intro { min-height: 320px; padding: 70px 0 58px; display: flex; justify-content: space-between; align-items: end; gap: 60px; }
.eyebrow { margin: 0 0 18px; color: #70765f; font-size: 11px; font-weight: 750; letter-spacing: .18em; }
.intro h1 { margin: 0; max-width: 760px; font-size: clamp(50px, 7.5vw, 94px); line-height: .88; letter-spacing: -.075em; font-weight: 790; }
.intro h1 em { color: transparent; -webkit-text-stroke: 1.4px var(--ink); font-style: normal; }
.intro-copy { max-width: 360px; margin: 0 0 7px; color: var(--muted); font-size: 16px; line-height: 1.65; }

.calculator-shell { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(500px, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: 30px; box-shadow: var(--shadow); overflow: hidden; }
.input-panel { padding: 38px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 30px; }
.panel-heading > div { display: flex; align-items: center; gap: 13px; }
.panel-heading h2 { margin: 0; font-size: 20px; letter-spacing: -.03em; }
.step-number { width: 31px; height: 31px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); font-size: 10px; font-weight: 800; }
.step-number.light { border-color: #3d4137; color: #b8bdad; }
.text-button { border: 0; border-bottom: 1px solid currentColor; padding: 2px 0; background: none; color: #687052; font-size: 12px; font-weight: 700; }

.project-row, .factor-grid { display: grid; grid-template-columns: 1.55fr .65fr; gap: 14px; }
.field { display: grid; gap: 8px; }
.field[hidden]{display:none!important}
.field > span { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .02em; }
.info-tip{position:relative;display:inline-grid;place-items:center;width:17px;height:17px;margin-left:6px;padding:0;border:1px solid color-mix(in srgb,var(--muted) 55%,transparent);border-radius:50%;background:transparent;color:var(--muted);font:700 10px/1 inherit;vertical-align:middle;cursor:help}
.info-tip::after{content:attr(data-tip);position:absolute;z-index:40;left:50%;bottom:calc(100% + 8px);width:min(230px,72vw);padding:9px 11px;border-radius:9px;background:#171914;color:#f4f5ef;font:500 12px/1.45 inherit;letter-spacing:0;text-align:left;box-shadow:0 10px 30px #0003;opacity:0;visibility:hidden;transform:translate(-50%,5px);transition:.16s;pointer-events:none}
.info-tip:hover::after,.info-tip:focus-visible::after{opacity:1;visibility:visible;transform:translate(-50%,0)}
input, select { width: 100%; border: 1px solid var(--line); border-radius: 12px; outline: none; background: var(--surface); color: var(--ink); transition: border-color .18s, box-shadow .18s; }
input:focus, select:focus { border-color: #9bb947; box-shadow: 0 0 0 3px color-mix(in srgb, var(--lime) 22%, transparent); }
.field > input, .field > select { height: 46px; padding: 0 13px; font-size: 13px; font-weight: 600; }
select { appearance: none; background-image: linear-gradient(45deg,transparent 50%,var(--muted) 50%),linear-gradient(135deg,var(--muted) 50%,transparent 50%); background-position: calc(100% - 16px) 19px,calc(100% - 11px) 19px; background-size: 5px 5px,5px 5px; background-repeat: no-repeat; padding-right: 32px !important; }

.work-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 27px 0; }
.work-card { min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 15px; display: grid; grid-template-columns: auto minmax(0,1fr) 92px; align-items: center; gap: 11px; background: color-mix(in srgb, var(--surface) 92%, var(--surface-soft)); transition: transform .18s, border-color .18s; }
.work-card:focus-within { border-color: #a8bf67; transform: translateY(-1px); }
.work-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-soft); color: var(--ink); }
.work-icon svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.work-info { min-width: 0; }
.work-info h3 { margin: 0 0 4px; font-size: 13px; }
.work-info p { margin: 0; overflow: hidden; color: var(--muted); font-size: 10px; white-space: nowrap; text-overflow: ellipsis; }
.compact-input { height: 42px; padding: 0 10px; display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.compact-input input { min-width: 0; height: 38px; padding: 0; border: 0; border-radius: 0; font-weight: 750; }
.compact-input input:focus { box-shadow: none; }
.compact-input span { color: var(--muted); font-size: 10px; }
.scope-included{display:grid;place-items:center;min-height:42px;padding:0 10px;border:1px solid color-mix(in srgb,var(--lime) 42%,var(--line));border-radius:10px;background:color-mix(in srgb,var(--lime) 9%,var(--surface));color:#60702e;font-size:10px;font-weight:800;text-align:center;line-height:1.25}
#pricingModeHint{margin:.85rem 0 0;max-width:48rem}
.delivery-warning{margin:.85rem 0 0;padding:.8rem .9rem;border-left:3px solid #d59b16;border-radius:8px;background:#fff8df;color:#75510b;font-size:13px;line-height:1.5}
.field-explainer{display:block;margin-top:.45rem;color:var(--muted);font-size:12px;font-weight:500;line-height:1.45}

.rate-settings { margin-top: 27px; border-top: 1px solid var(--line); }
.rate-settings summary { padding: 22px 0 0; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 20px; cursor: pointer; }
.rate-settings summary::-webkit-details-marker { display: none; }
.rate-settings summary > span:first-child { display: flex; align-items: center; gap: 9px; font-size: 12px; font-weight: 750; }
.rate-settings summary svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.summary-note { color: var(--muted); font-size: 10px; }
.rate-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 10px; padding-top: 20px; }
.money-input, .unit-input { height: 42px; border: 1px solid var(--line); border-radius: 10px; display: flex; align-items: center; padding: 0 11px; background: var(--surface); }
.money-input span, .unit-input span { color: var(--muted); font-size: 11px; }
.money-input input, .unit-input input { height: 39px; min-width: 0; padding: 0 5px; border: 0; border-radius: 0; font-weight: 700; }
.money-input input:focus, .unit-input input:focus { box-shadow: none; }
.rate-grid select { height: 42px; padding: 0 11px; font-size: 11px; }

.result-panel { padding: 37px 34px; background: var(--dark); color: #f4f5ef; position: relative; }
.result-panel:before { content: ""; position: absolute; top: -70px; right: -80px; width: 260px; height: 260px; border-radius: 50%; background: var(--lime); opacity: .07; filter: blur(2px); }
.result-topline { display: flex; align-items: center; gap: 12px; }
.result-label { color: #a5aa9c; font-size: 10px; font-weight: 750; letter-spacing: .14em; }
.price-wrap { margin: 31px 0 22px; }
.price-wrap strong { display: block; color: var(--lime); font-size: clamp(42px, 5vw, 62px); line-height: 1; letter-spacing: -.055em; white-space: nowrap; }
.price-wrap > span { display: block; margin-top: 9px; color: #919589; font-size: 11px; }
.price-meter { width: 100%; height: 3px; border-radius: 9px; overflow: hidden; background: #35392f; }
.price-meter span { display: block; width: 72%; height: 100%; background: var(--lime); transition: width .35s ease; }
.range-copy { margin: 10px 0 30px; display: flex; justify-content: space-between; gap: 10px; color: #878c7f; font-size: 10px; }
.range-copy b { color: #c9cdbf; font-weight: 650; }
.breakdown { padding: 22px 0 16px; border-top: 1px solid #34372f; border-bottom: 1px solid #34372f; }
.breakdown h3 { margin: 0 0 18px; font-size: 12px; }
.breakdown-row { display: flex; align-items: center; justify-content: space-between; padding: 7px 0; color: #9da294; font-size: 11px; }
.breakdown-row b { color: #e6e8df; font-size: 11px; font-weight: 650; }
.accent-row b { color: var(--lime); }
.totals { padding: 17px 0; }
.totals > div { display: flex; justify-content: space-between; padding: 6px 0; color: #92978a; font-size: 11px; }
.totals b { color: #e6e8df; }
.totals .grand-total { margin-top: 9px; padding-top: 15px; align-items: center; border-top: 1px dashed #3e4238; color: #e3e5dd; }
.grand-total strong { color: #fff; font-size: 18px; }
.result-actions { display: grid; grid-template-columns: 1fr 48px; gap: 8px; margin-top: 10px; }
.primary-button, .secondary-button { height: 48px; border: 0; border-radius: 12px; display: flex; align-items: center; justify-content: center; gap: 9px; font-size: 11px; font-weight: 800; }
.primary-button { background: var(--lime); color: #161910; }
.primary-button:hover { background: #d5ff78; }
.secondary-button { background: #2a2d26; color: #f1f2eb; }
.primary-button svg, .secondary-button svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.result-footnote { margin: 16px 0 0; color: #71766b; font-size: 9px; line-height: 1.5; }

.quote-preview { margin-top: 28px; padding: 34px 38px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 40px rgba(31, 34, 25, .055); }
.quote-preview .panel-heading { margin-bottom: 23px; }
.ready-badge { display: flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 99px; background: color-mix(in srgb, var(--lime) 24%, transparent); color: #657535; font-size: 10px; font-weight: 750; }
.ready-badge span { width: 6px; height: 6px; border-radius: 50%; background: #7ba411; }
.proposal-card { display: flex; justify-content: space-between; align-items: center; gap: 30px; padding: 27px 30px; background: var(--surface-soft); border-radius: 16px; }
.proposal-kicker { margin: 0 0 8px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .13em; }
.proposal-card h3 { margin: 0 0 7px; font-size: 19px; letter-spacing: -.025em; }
.proposal-card > div:first-child > p:last-child { margin: 0; color: var(--muted); font-size: 11px; }
.proposal-price { text-align: right; }
.proposal-price span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.proposal-price strong { font-size: 25px; letter-spacing: -.035em; white-space: nowrap; }
.toast { position: fixed; z-index: 10; left: 50%; bottom: 24px; transform: translate(-50%, 30px); padding: 12px 17px; border-radius: 10px; background: var(--ink); color: var(--surface); font-size: 11px; font-weight: 700; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 930px) {
  .intro { min-height: 280px; padding-top: 55px; }
  .calculator-shell { grid-template-columns: 1fr; }
  .result-panel { min-height: auto; }
  .rate-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 650px) {
  .topbar, main { padding-left: 17px; padding-right: 17px; }
  .topbar { min-height: 70px; }
  .save-state { display: none; }
  .intro { min-height: 265px; display: block; padding: 54px 0 38px; }
  .intro h1 { font-size: clamp(47px, 15.5vw, 70px); }
  .intro-copy { margin-top: 28px; font-size: 14px; }
  .input-panel, .result-panel { padding: 27px 20px; }
  .panel-heading { align-items: flex-start; }
  .text-button { margin-top: 8px; }
  .project-row, .factor-grid, .work-grid { grid-template-columns: 1fr; }
  .work-card { grid-template-columns: auto minmax(0,1fr) 90px; }
  .currency-field { width: 100%; }
  .rate-grid { grid-template-columns: 1fr 1fr; }
  .summary-note { display: none; }
  .price-wrap strong { font-size: 52px; }
  .quote-preview { padding: 25px 20px; }
  .proposal-card { align-items: flex-start; flex-direction: column; }
  .proposal-price { text-align: left; }
}

@media (max-width: 400px) {
  .rate-grid { grid-template-columns: 1fr; }
  .price-wrap strong { font-size: 44px; }
}

@media print {
  body { background: #fff; }
  .topbar, .intro, .input-panel, .result-actions, .result-footnote, .quote-preview .panel-heading, .page-glow { display: none !important; }
  main { max-width: none; padding: 0; }
  .calculator-shell { display: block; border: 0; box-shadow: none; }
  .result-panel { min-height: 100vh; border-radius: 0; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .quote-preview { margin: 0; border: 0; box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
/* Sheets-aligned pricing */
.factor-grid{grid-template-columns:1fr 1fr}.work-grid{grid-template-columns:1fr}.work-card{grid-template-columns:1fr 110px}.compact-input input{width:65px}.helper{font-size:11px;line-height:1.65;color:var(--muted)}.helper a{color:inherit}.conditions{display:flex;flex-wrap:wrap;gap:12px;margin:20px 0}.conditions label{display:flex;align-items:center;gap:8px;font-size:12px}.conditions input{width:17px;height:17px;accent-color:#759b20}.rate-grid{grid-template-columns:1fr 1fr}.rate-grid input{height:42px;padding:10px}.fx-fields{margin-top:18px}.outline-button{padding:11px 15px;border:1px solid var(--line);border-radius:10px;background:var(--surface);font-weight:650;font-size:12px}.tiers{display:grid;gap:10px;margin-top:24px}.tier{display:grid;grid-template-columns:1fr auto;text-align:left;padding:18px;border:1px solid #414538;border-radius:14px;background:transparent;color:#eee;gap:7px}.tier span{font-size:12px}.tier strong{font-size:23px;white-space:nowrap}.tier small{font-size:10px;color:#a5aa9c}.tier.active{background:var(--lime);color:#151712;border-color:var(--lime)}.tier.active small{color:#49572b}.result-panel .helper{color:#b4b9ab}.result-panel{min-width:0}.quote-preview pre{white-space:pre-wrap;overflow-wrap:anywhere;font:13px/1.8 inherit;margin:0}.result-actions{grid-template-columns:1fr 64px}.intro h1{font-size:clamp(45px,6.5vw,80px)}#error{margin-top:20px;color:#ffbdb0;font-size:13px}button:disabled{opacity:.45;cursor:not-allowed}.breakdown-row{gap:20px;align-items:start}.breakdown-row b{white-space:nowrap}input:invalid{border-color:#b84930}#copyFallback{width:100%;min-height:200px;margin-top:15px}.tier:focus-visible,button:focus-visible{outline:3px solid #8db726;outline-offset:3px}
@media(max-width:650px){.factor-grid{grid-template-columns:1fr}.panel-heading h2{font-size:17px}.panel-heading{gap:10px}.intro{padding-top:40px}.work-card{grid-template-columns:1fr 105px}.quote-preview{padding:22px 16px}.intro h1{font-size:clamp(42px,12vw,65px)}}
@media print{body{color:#000;background:#fff}header,.intro,.calculator-shell,.toast,.quote-preview .panel-heading{display:none!important}.quote-preview{display:block!important;padding:10mm;background:#fff;color:#000}.quote-preview pre{font:11pt/1.6 sans-serif}}
.quote-preview pre{font-family:ui-sans-serif,system-ui,sans-serif;font-size:13px;line-height:1.8}

/* Schedule and client proposal */
.schedule-card{margin:1.5rem 0;padding:1.25rem;border:1px solid var(--line);border-radius:1rem;background:var(--surface-soft)}
.schedule-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin-bottom:1rem}
.schedule-heading h3{margin:.2rem 0 0;font-size:1.05rem;letter-spacing:-.02em}
.section-kicker{color:var(--muted);font-size:.75rem;font-weight:800;letter-spacing:.12em}
.date-chip{max-width:55%;padding:.55rem .75rem;border-radius:999px;background:var(--lime);color:#1a1d12;font-size:.75rem;font-weight:800;text-align:center}
.schedule-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.9rem}
.settings-toolbar{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding-top:1rem}
.settings-toolbar .helper{margin:0}
.mini-button{flex:0 0 auto;padding:.55rem .7rem;border:1px solid var(--line);border-radius:.65rem;background:var(--surface);color:var(--ink);font-size:.75rem;font-weight:750;cursor:pointer}
.settings-space{margin-top:1rem}
textarea{width:100%;padding:.8rem;border:1px solid var(--line);border-radius:.75rem;background:var(--surface);color:var(--ink);font:inherit;font-size:.875rem;line-height:1.55;resize:vertical;outline:none}
textarea:focus{border-color:#9bb947;box-shadow:0 0 0 3px color-mix(in srgb,var(--lime) 22%,transparent)}
.client-mode-bar{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:2rem;padding-bottom:1rem;border-bottom:1px solid var(--line);font-size:.8rem;font-weight:800;color:var(--muted)}
.proposal-header{display:flex;align-items:flex-start;justify-content:space-between;gap:2rem;padding:1rem 0 2rem;border-bottom:1px solid var(--line)}
.proposal-kicker{margin:0 0 .65rem;color:#70803f;font-size:.75rem;font-weight:850;letter-spacing:.14em}
.proposal-header h2{margin:0 0 .55rem;font-size:clamp(1.8rem,4vw,3.5rem);line-height:1;letter-spacing:-.055em}
.proposal-header p:last-child{margin:0;color:var(--muted);font-size:.9rem}
.proposal-total{min-width:14rem;padding:1.2rem;border-radius:1rem;background:var(--dark);color:#f4f5ef;text-align:right}
.proposal-total span,.proposal-total small{display:block;color:#aab09f;font-size:.72rem;font-weight:800;letter-spacing:.08em}
.proposal-total strong{display:block;margin:.55rem 0;color:var(--lime);font-size:clamp(1.65rem,3vw,2.35rem);line-height:1;letter-spacing:-.04em}
.proposal-section{margin-top:1.25rem;padding:1.25rem;border:1px solid var(--line);border-radius:1rem;background:var(--surface)}
.proposal-section h3{margin:0 0 1rem;font-size:1rem;letter-spacing:-.02em}
.proposal-rows{display:grid}
.proposal-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:1rem;padding:.85rem 0;border-bottom:1px solid var(--line)}
.proposal-row div{display:grid;gap:.25rem}
.proposal-row strong{font-size:.9rem}
.proposal-row small{color:var(--muted);font-size:.75rem;line-height:1.45}
.proposal-row b{font-size:.9rem;white-space:nowrap}
.proposal-sum{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding-top:1.1rem;font-size:.9rem;font-weight:750}
.proposal-sum strong{font-size:1.35rem}
.proposal-grid{display:grid;grid-template-columns:1fr;gap:1.25rem}
.proposal-section dl{margin:0;display:grid;gap:.75rem}
.proposal-section dl div{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding-bottom:.7rem;border-bottom:1px solid var(--line)}
.proposal-section dt{color:var(--muted);font-size:.8rem}
.proposal-section dd{margin:0;text-align:right;font-size:.85rem;font-weight:750}
.proposal-terms p{margin:.65rem 0;color:var(--muted);font-size:.82rem;line-height:1.65}
.proposal-actions{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:.75rem;margin-top:1.25rem}
.proposal-actions button{min-height:3rem;padding:.75rem 1rem;border-radius:.75rem;font-size:.78rem;font-weight:800}
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
body.client-mode{background:var(--bg)}
body.client-mode .topbar,body.client-mode main>.intro,body.client-mode .calculator-shell{display:none}
body.client-mode main{padding-top:1.25rem}
body.client-mode .quote-preview{margin-top:0}
.field>span{font-size:.8rem}.work-info p,.summary-note,.result-label{font-size:.75rem}.helper{font-size:.8rem}.breakdown-row,.breakdown-row b,.totals>div{font-size:.8rem}.text-button,.mini-button,.outline-button{font-size:.8rem}

@media(max-width:650px){
  .schedule-grid,.proposal-grid{grid-template-columns:1fr}
  .date-chip{max-width:none}
  .schedule-heading,.proposal-header{flex-direction:column}
  .proposal-total{width:100%;min-width:0;text-align:left}
  .proposal-actions{grid-template-columns:1fr}
  .settings-toolbar{align-items:flex-start}
  .client-mode-bar{position:sticky;top:0;z-index:4;margin:-.5rem -.25rem 1rem;padding:.75rem .25rem;background:var(--surface)}
}

@media print{
  .topbar,.intro,.calculator-shell,.client-mode-bar,.proposal-actions,.toast{display:none!important}
  main{padding:0!important}
  .quote-preview{display:block!important;margin:0!important;padding:8mm!important;border:0!important;box-shadow:none!important}
  .proposal-header{break-inside:avoid}.proposal-section{break-inside:avoid;border-color:#ccc}.proposal-total{background:#171913!important;color:#fff!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
}

/* RateLab v5 polish */
.brand-mark svg path:not(:first-child){fill:#f5f2e9;stroke:none}
html.i18n-loading body{visibility:hidden}
.language-switch{display:flex;padding:3px;border:1px solid var(--line);border-radius:999px;background:var(--surface)}
.language-switch button{min-width:36px;height:30px;padding:0 9px;border:0;border-radius:999px;background:transparent;color:var(--muted);font-size:.75rem;font-weight:850}
.language-switch button.active{background:var(--dark);color:var(--lime)}
.profile-card{margin-bottom:1.4rem;padding:1.65rem;border:1px solid var(--line);border-radius:1.35rem;background:var(--surface);box-shadow:0 12px 38px rgba(31,34,25,.05)}
.profile-copy{display:flex;align-items:flex-start;gap:1rem;margin-bottom:1.35rem}.profile-copy h2{margin:.2rem 0 .45rem;font-size:clamp(1.35rem,3vw,2rem);letter-spacing:-.04em}.profile-copy p:last-child{max-width:47rem;margin:0;color:var(--muted);font-size:.9rem;line-height:1.6}
.profile-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.9rem}.base-rate-output{min-height:76px;padding:.85rem 1rem;border-radius:.85rem;background:var(--dark);color:#f5f2e9;display:flex;flex-direction:column;justify-content:center}.base-rate-output span,.base-rate-output small{color:#aeb3a4;font-size:.72rem}.base-rate-output strong{margin:.25rem 0;color:var(--lime);font-size:1.1rem;letter-spacing:-.02em}
.rate-mode{display:grid;grid-template-columns:minmax(0,1fr) minmax(240px,.65fr);gap:.9rem;align-items:end}.manual-hourly{max-width:28rem}.manual-hourly input:disabled{opacity:.55;cursor:not-allowed}.rate-calculator-toggle{display:flex;align-items:flex-start;gap:.8rem;margin:1rem 0 0;padding:1rem;border:1px solid var(--line);border-radius:.9rem;background:var(--surface-soft);cursor:pointer}.rate-calculator-toggle input{flex:0 0 auto;width:18px;height:18px;margin:.1rem 0 0;accent-color:#7da620}.rate-calculator-toggle span{display:grid;gap:.25rem}.rate-calculator-toggle strong{font-size:.86rem}.rate-calculator-toggle small{color:var(--muted);font-size:.76rem;line-height:1.45}.optional-rate-fields{margin-top:1rem;padding-top:1rem;border-top:1px solid var(--line)}.optional-rate-fields[hidden]{display:none}
.project-intelligence{display:grid;grid-template-columns:minmax(140px,.45fr) 1fr;gap:1rem;margin:1.2rem 0;padding:1rem;border:1px solid color-mix(in srgb,var(--lime) 40%,var(--line));border-radius:.9rem;background:color-mix(in srgb,var(--lime) 8%,var(--surface))}.project-intelligence span{display:block;margin-bottom:.3rem;color:var(--muted);font-size:.67rem;font-weight:850;letter-spacing:.12em}.project-intelligence strong{font-size:.9rem}.project-intelligence p{margin:0;color:var(--muted);font-size:.8rem;line-height:1.55}
.explanation-card,.market-card{margin-top:1rem;padding:1rem;border:1px solid #3b4035;border-radius:.9rem;background:rgba(255,255,255,.025)}.explanation-card .section-kicker,.market-card .section-kicker{color:#92998a}#whyPriceRows{display:grid;gap:.65rem;margin-top:.9rem}#whyPriceRows>div{display:flex;justify-content:space-between;gap:1rem;color:#aeb3a4;font-size:.76rem}#whyPriceRows b{color:#f5f2e9;white-space:nowrap}
.market-card>div{display:flex;align-items:end;justify-content:space-between;gap:1rem}.market-card strong{color:var(--lime);font-size:1.3rem;white-space:nowrap}.market-card p{margin:.7rem 0;color:#b8bdaf;font-size:.76rem;line-height:1.55}.market-card small{color:#7f8578;font-size:.68rem;line-height:1.5}.market-card a{color:#cbd2bf;text-underline-offset:3px}
.result-panel{align-self:start}.tiers{grid-template-columns:repeat(3,minmax(0,1fr))}.tier{min-width:0;padding:1rem;display:flex;flex-direction:column}.tier strong{font-size:clamp(1rem,1.55vw,1.35rem);white-space:nowrap}.tier small{line-height:1.35}
@media(max-width:1000px){.profile-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.tiers{grid-template-columns:1fr}.tier{display:grid;grid-template-columns:1fr auto}.result-panel{align-self:stretch}}
@media(max-width:650px){.topbar-actions{gap:.55rem}.language-switch button{min-width:32px;padding:0 7px}.profile-card{padding:1.15rem}.profile-grid,.rate-mode{grid-template-columns:1fr}.project-intelligence{grid-template-columns:1fr}.tiers{grid-template-columns:1fr}.intro{min-height:240px}.calculator-shell{border-radius:1.25rem}.market-card>div{align-items:flex-start;flex-direction:column}.base-rate-output{min-height:84px}.manual-hourly{max-width:none}}
.logout-link{color:var(--muted);text-decoration:none;font-size:12px;font-weight:700;padding:8px 10px;border:1px solid var(--line);border-radius:8px}.logout-link:hover{color:var(--ink);border-color:var(--muted)}

.trial-banner{padding:18px;border:1px solid #859c54;border-radius:12px;margin:20px 0;display:flex;gap:16px;align-items:center;flex-wrap:wrap;font-size:14px}.trial-banner[hidden]{display:none}.trial-banner button,.trial-banner a{padding:10px;border-radius:8px;background:#b8ff38;color:#151712;border:0;text-decoration:none;cursor:pointer}#trialWatermark{text-align:center;font-size:12px;color:#666}@media print{.trial-banner{display:none!important}}

.purchase-dialog{width:min(460px,calc(100vw - 40px));box-sizing:border-box;padding:28px;border:1px solid var(--line);border-radius:18px;background:var(--surface);color:var(--ink,#151712)}
.purchase-dialog::backdrop{background:rgb(0 0 0 / .65)}
.purchase-dialog h2{font-size:24px;margin:22px 0 12px}.purchase-dialog p{font-size:16px;line-height:1.6}
.purchase-dialog a{display:flex;align-items:center;justify-content:center;margin-top:18px;text-align:center;font-size:16px}.purchase-dialog #closePurchase{float:right;font-size:20px}
.agreement-dialog{width:min(760px,calc(100vw - 32px));box-sizing:border-box;padding:30px;border:1px solid var(--line);border-radius:18px;background:var(--surface);color:var(--ink,#151712)}.agreement-dialog::backdrop{background:rgb(0 0 0 / .65)}.agreement-dialog h2{margin:10px 0 8px;font-size:clamp(24px,4vw,34px);letter-spacing:-.04em}.agreement-dialog>p:not(.proposal-kicker):not(.agreement-notice){margin:0 0 16px;color:var(--muted);line-height:1.55}.agreement-close{float:right;font-size:20px}.agreement-dialog textarea{width:100%;min-height:420px;box-sizing:border-box;resize:vertical;padding:15px;border:1px solid var(--line);border-radius:12px;background:var(--surface-soft);color:var(--ink);font:13px/1.6 ui-monospace,SFMono-Regular,Menlo,monospace}.agreement-notice{margin:12px 0;color:var(--muted);font-size:11px;line-height:1.5}.agreement-dialog .primary-button{width:100%;min-height:44px}
.print-access-notice{display:none}#newProject{margin-left:8px}
@media print{.purchase-dialog{display:none!important}body.export-restricted>*{display:none!important}body.export-restricted>.print-access-notice{display:block!important;padding:24px;font:16px/1.6 sans-serif;color:#000}}

.pricing-method,.quick-examples{margin:0 0 28px;padding:30px 34px;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);box-shadow:0 12px 38px rgba(31,34,25,.04)}
.method-heading,.examples-heading{display:flex;align-items:flex-start;gap:13px}.method-heading h2,.examples-heading h2{margin:3px 0 0;font-size:clamp(22px,2.4vw,30px);letter-spacing:-.045em}.method-heading .section-kicker,.examples-heading .section-kicker{margin:0;color:#70765f;font-size:10px;font-weight:800;letter-spacing:.14em}.method-steps{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-top:25px}.method-steps article{min-width:0;padding:17px;border:1px solid var(--line);border-radius:15px;background:color-mix(in srgb,var(--surface) 92%,var(--surface-soft))}.method-steps article>span,.example-card>span{color:#6f7d38;font-size:10px;font-weight:850;letter-spacing:.12em}.method-steps h3{margin:11px 0 7px;font-size:14px;letter-spacing:-.02em}.method-steps p{margin:0;color:var(--muted);font-size:12px;line-height:1.55}.examples-heading{justify-content:space-between}.examples-heading>p{max-width:260px;margin:4px 0 0;color:var(--muted);font-size:12px;line-height:1.55}.example-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-top:24px}.example-card{min-height:142px;padding:18px;border:1px solid var(--line);border-radius:15px;background:var(--surface);text-align:left;transition:transform .18s,border-color .18s,box-shadow .18s}.example-card:hover,.example-card:focus-visible{border-color:#a9c45a;transform:translateY(-2px);box-shadow:0 14px 28px rgba(31,34,25,.08);outline:none}.example-card strong,.example-card small{display:block}.example-card strong{margin:13px 0 8px;font-size:15px;line-height:1.25;letter-spacing:-.025em}.example-card small{color:var(--muted);font-size:11px;line-height:1.45}
@media (max-width:930px){.method-steps,.example-cards{grid-template-columns:1fr}.example-card{min-height:0}.pricing-method,.quick-examples{padding:26px 24px}}
@media (max-width:650px){.examples-heading{display:block}.examples-heading>p{margin-top:12px}.pricing-method,.quick-examples{padding:23px 20px}.method-heading h2,.examples-heading h2{font-size:24px}}

.premium-workspace{position:relative;margin:28px 0;padding:34px 38px;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);box-shadow:0 12px 40px rgba(31,34,25,.055)}
.workspace-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:24px}.workspace-heading h2{margin:5px 0 8px;font-size:clamp(24px,3vw,36px);letter-spacing:-.045em}.workspace-heading>div>p:last-child{max-width:720px;margin:0;color:var(--muted);font-size:13px;line-height:1.6}.workspace-badge{flex:0 0 auto;padding:8px 11px;border-radius:999px;background:var(--dark);color:var(--lime);font-size:10px;font-weight:850;letter-spacing:.1em}.workspace-lock{margin-top:24px;padding:18px;display:flex;align-items:center;justify-content:space-between;gap:20px;border:1px solid color-mix(in srgb,var(--lime) 35%,var(--line));border-radius:15px;background:color-mix(in srgb,var(--lime) 8%,var(--surface-soft))}.workspace-lock strong{font-size:14px}.workspace-lock p{margin:5px 0 0;color:var(--muted);font-size:12px;line-height:1.5}.workspace-lock .primary-button{min-width:170px;padding:0 16px}.workspace-content{margin-top:26px}.workspace-content[hidden],.workspace-lock[hidden]{display:none}.workspace-card{padding:20px;border:1px solid var(--line);border-radius:16px;background:var(--surface-soft)}.workspace-card-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}.workspace-card-heading>div{display:flex;align-items:center;gap:10px}.workspace-card-heading>div>span{width:26px;height:26px;display:grid;place-items:center;border:1px solid var(--line);border-radius:8px;color:var(--muted);font-size:9px;font-weight:850}.workspace-card-heading h3{margin:0;font-size:15px;letter-spacing:-.02em}.workspace-card-heading small,.workspace-helper{color:var(--muted);font-size:11px}.brand-grid{display:grid;grid-template-columns:190px minmax(0,1fr);gap:24px;margin-top:20px}.logo-control{display:flex;flex-wrap:wrap;align-content:start;gap:8px}.logo-preview{width:100%;height:116px;display:grid;place-items:center;overflow:hidden;border:1px dashed var(--line);border-radius:13px;background:var(--surface)}.logo-preview img{width:100%;height:100%;object-fit:contain;padding:12px}.logo-preview span{width:54px;height:54px;display:grid;place-items:center;border-radius:14px;background:var(--dark);color:var(--lime);font-weight:900}.logo-upload{display:inline-flex;align-items:center;justify-content:center;cursor:pointer}.logo-control>small{width:100%;color:var(--muted);font-size:10px;line-height:1.45}.brand-fields{display:grid;grid-template-columns:1fr 1fr;gap:13px}.workspace-columns{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:16px}.compact-action{min-height:38px;height:38px;padding:0 12px}.secondary-dark-button{border:0;border-radius:10px;background:var(--dark);color:#f4f5ef;font-size:11px;font-weight:800}.workspace-helper{margin:11px 0 16px;line-height:1.5}.saved-list{display:grid;gap:8px}.saved-empty{padding:17px;border:1px dashed var(--line);border-radius:11px;color:var(--muted);font-size:11px;text-align:center}.saved-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center;padding:12px;border:1px solid var(--line);border-radius:11px;background:var(--surface)}.saved-item-copy{min-width:0}.saved-item strong,.saved-item small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.saved-item strong{font-size:12px}.saved-item small{margin-top:4px;color:var(--muted);font-size:10px}.saved-item-actions{display:flex;gap:5px}.saved-item-actions button{min-height:32px;padding:0 9px;border:1px solid var(--line);border-radius:8px;background:var(--surface);font-size:10px;font-weight:750}.saved-item-actions .delete-saved{color:#a34434}.proposal-brand{display:flex;align-items:center;gap:12px;margin-bottom:22px}.proposal-brand img{width:52px;height:52px;object-fit:contain;border:1px solid var(--line);border-radius:10px;padding:5px}.proposal-brand strong,.proposal-brand small{display:block}.proposal-brand strong{font-size:14px}.proposal-brand small{max-width:440px;margin-top:4px;color:var(--muted);font-size:10px;line-height:1.4}
@media(max-width:820px){.workspace-columns{grid-template-columns:1fr}.brand-grid{grid-template-columns:150px minmax(0,1fr)}}
@media(max-width:650px){.premium-workspace{padding:24px 18px}.workspace-heading,.workspace-lock,.workspace-card-heading{align-items:flex-start;flex-direction:column}.workspace-lock .primary-button{width:100%}.brand-grid,.brand-fields{grid-template-columns:1fr}.logo-preview{height:100px}.workspace-card-heading .compact-action{width:100%}}
@media print{.premium-workspace{display:none!important}.proposal-brand{display:flex!important}}
body.client-mode main>.pricing-method,body.client-mode main>.quick-examples,body.client-mode main>.profile-card,body.client-mode main>.premium-workspace,body.client-mode main>.trial-banner{display:none}

/* Proposal PDF: never print the calculator, settings, workspace or page chrome. */
@media print{
  @page{margin:0}
  html,body{background:#fff!important}
  body.printing-proposal> :not(main){display:none!important}
  body.printing-proposal main{max-width:none!important;margin:0!important;padding:0!important}
  body.printing-proposal main> :not(#clientProposal){display:none!important}
  body.printing-proposal #clientProposal{display:block!important;margin:0!important;padding:12mm!important;border:0!important;background:#fff!important;box-shadow:none!important;color:#111!important}
  body.printing-proposal #clientProposal .client-mode-bar,
  body.printing-proposal #clientProposal .proposal-actions,
  body.printing-proposal #clientProposal #copyFallback,
  body.printing-proposal #clientProposal #quoteText{display:none!important}
  body.printing-proposal #clientProposal .proposal-header{padding:0 0 8mm!important}
  body.printing-proposal #clientProposal .proposal-section{break-inside:avoid!important;page-break-inside:avoid!important;background:#fff!important}
  body.printing-proposal #clientProposal .proposal-grid{break-inside:avoid!important;page-break-inside:avoid!important}
}
