@font-face { font-family: 'Big Shoulders'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('assets/big-shoulders.woff2') format('woff2'); }
:root { color-scheme: light; --ink: #24362f; --paper: #faf9f4; --accent: #dfab51; }
* { box-sizing: border-box; }
body { margin: 0; background: #e6e7e1; color: var(--ink); font-family: 'Plan Sans', 'Avenir Next', sans-serif; }
.toolbar { min-height: 86px; padding: 18px 32px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid #c4cbc1; background: #fafbf7; }
.identity { display: flex; align-items: center; gap: 13px; }
.mark { width: 38px; height: 38px; border: 1.5px solid var(--ink); display: grid; place-items: center; font-family: 'Plan Mono', monospace; font-size: 13px; }
.identity-label { display: block; margin-bottom: 3px; color: #5c6b60; font-family: 'Plan Mono', monospace; font-size: 10.5px; letter-spacing: .1em; line-height: 1.2; text-transform: uppercase; }
.identity strong { display: block; font-size: 20px; font-weight: 600; line-height: 1.15; }
/* Equal-width buttons: each auto-sized 1fr column takes the widest label's width. */
.actions { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 10px 15px; border: 1px solid #bac3b8; border-radius: 3px; background: transparent; color: var(--ink); font: 600 13px 'Plan Sans', 'Avenir Next', sans-serif; cursor: pointer; white-space: nowrap; }
.actions button { font-family: 'Big Shoulders', 'Plan Display', sans-serif; font-size: 16px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
button:hover { background: #e8ece4; border-color: var(--ink); }
button:focus-visible { outline: 3px solid #bb8729; outline-offset: 3px; }
button:disabled { cursor: progress; opacity: .65; }
.primary { background: var(--ink); border-color: var(--ink); color: #fffdf4; }
.primary:hover { background: #365242; }
button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.viewer { padding: 30px 32px 20px; overflow: auto; }
.sheet { width: min(100%, 1680px); margin: 0 auto; background: var(--paper); box-shadow: 0 8px 28px #20352817, 0 1px 3px #20352824; }
#plan { display: block; width: 100%; height: auto; }
.sheet { position: relative; }
/* A transparent switch over the sheet's drawn earthwork stage (856, 612, 184 × 160 in sheet units).
   The drawing shows the state, so print and the PNG keep it; this input makes it operable. */
.sheet-switch { position: absolute; left: calc(856 / 1680 * 100%); top: calc(612 / 1260 * 100%); width: calc(184 / 1680 * 100%); height: calc(160 / 1260 * 100%); margin: 0; border: 0; border-radius: 0; background: transparent; appearance: none; -webkit-appearance: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.sheet-switch:hover { background: #24362f0d; }
.sheet-switch:focus-visible { outline: 3px solid #bb8729; outline-offset: 2px; }
.export-status { margin: 0; padding: 0 24px 20px; text-align: center; color: #5c6b60; font-size: 12px; }
.export-status:empty { padding: 0; }
dialog { width: min(1120px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid #000; border-radius: 0; background: #fff; color: #000; box-shadow: 0 24px 80px #0003; overscroll-behavior: contain; }
dialog::backdrop { background: #0009; backdrop-filter: blur(4px); }
.costs { --costs-muted: #666; font-family: 'Plan Sans', 'Avenir Next', sans-serif; }
.costs-head { display: grid; grid-template-columns: 1fr auto; gap: 32px; padding: 34px 38px 30px; border-bottom: 1px solid #000; }
.costs-kicker, .costs-label { font-family: 'Plan Mono', monospace; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.costs h2 { margin: 18px 0 8px; font: 600 clamp(38px, 6vw, 72px)/.92 'Plan Display', 'DIN Condensed', sans-serif; letter-spacing: -.025em; text-transform: uppercase; }
.costs-address { margin: 0; color: var(--costs-muted); font-size: 14px; line-height: 1.5; }
.proposal-status { align-self: start; min-width: 210px; padding: 12px 14px 13px; border: 1px solid #000; border-top: 3px solid #f5a623; background: #fafafa; }
.proposal-status span, .proposal-status small { display: block; color: #666; font: 9px 'Plan Mono', monospace; letter-spacing: .1em; text-transform: uppercase; }
.proposal-status strong { display: block; margin: 8px 0 5px; font-size: 14px; font-weight: 600; }
.costs-meta { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid #000; }
.costs-meta > div { padding: 18px 38px; border-right: 1px solid #d8d8d8; }
.costs-meta > div:last-child { border-right: 0; }
.costs-meta strong { display: block; margin-top: 7px; font: 400 13px 'Plan Mono', monospace; }
.costs-body { padding: 4px 38px 32px; }
.costs-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.costs-table th { padding: 18px 0 11px; border-bottom: 1px solid #000; color: var(--costs-muted); font: 10px 'Plan Mono', monospace; letter-spacing: .08em; text-align: left; text-transform: uppercase; }
.costs-table td { padding: 16px 0; border-bottom: 1px solid #e5e5e5; vertical-align: top; }
.costs-table th:nth-child(n+2), .costs-table td:nth-child(n+2) { padding-left: 18px; text-align: right; white-space: nowrap; }
.item-name { display: block; font-weight: 600; }
.item-note { display: block; margin-top: 4px; color: var(--costs-muted); font-size: 11px; line-height: 1.5; }
.costs-total { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 24px; padding: 24px 0 28px; border-bottom: 1px solid #000; }
.costs-total p { max-width: 520px; margin: 8px 0 0; color: var(--costs-muted); font-size: 11px; line-height: 1.55; }
.costs-total strong { font: 600 clamp(38px, 5vw, 64px)/1 'Plan Display', 'DIN Condensed', sans-serif; letter-spacing: -.02em; white-space: nowrap; }
.costs-deposit { display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center; margin-top: 18px; padding: 20px 22px; background: #000; color: #fff; }
.costs-deposit .costs-label { color: #aaa; }
.costs-deposit h3 { margin: 7px 0 5px; font-size: 15px; font-weight: 600; }
.costs-deposit p { max-width: 670px; margin: 0; color: #bbb; font-size: 11px; line-height: 1.55; }
.deposit-amount { text-align: right; }
.deposit-amount strong { display: block; font: 600 clamp(30px, 4vw, 48px)/1 'Plan Display', 'DIN Condensed', sans-serif; letter-spacing: -.015em; white-space: nowrap; }
.deposit-amount small { display: block; margin-top: 6px; color: #aaa; font: 10px 'Plan Mono', monospace; letter-spacing: .06em; text-transform: uppercase; }
.costs-scope { padding: 28px 0 24px; border-bottom: 1px solid #000; }
.scope-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 34px; margin: 14px 0 0; padding: 0; list-style: none; }
.scope-list li { position: relative; padding: 9px 0 9px 20px; border-bottom: 1px solid #ececec; font-size: 12px; line-height: 1.4; }
.scope-list li::before { content: '+'; position: absolute; left: 0; font-family: 'Plan Mono', monospace; }
.costs-spec { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid #000; }
.costs-spec > div { padding: 18px 16px 18px 0; }
.costs-spec strong { display: block; margin-top: 7px; font-size: 15px; font-weight: 600; }
.costs-excavation { display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center; margin-top: 24px; padding: 18px 22px 20px; border: 1px solid #000; border-top: 3px solid #f5a623; break-inside: avoid; }
.costs-excavation h3 { margin: 7px 0 6px; font-size: 15px; font-weight: 600; }
.costs-excavation p { max-width: 640px; margin: 0; color: var(--costs-muted); font-size: 11px; line-height: 1.55; }
.costs-excavation p[data-excavation-text] { margin-bottom: 4px; color: #000; font-size: 12px; font-weight: 600; }
.costs [data-excavation-text="included"], .costs[data-excavation="included"] [data-excavation-text="excluded"] { display: none; }
.costs[data-excavation="included"] [data-excavation-text="included"] { display: block; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 12px; min-height: 44px; font-size: 12px; font-weight: 600; white-space: nowrap; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.switch-track { position: relative; flex: none; width: 46px; height: 26px; border: 1px solid #000; border-radius: 13px; background: #fff; transition: background-color .18s ease; }
.switch-thumb { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #000; transition: transform .18s ease, background-color .18s ease; }
.switch input:checked + .switch-track { background: #000; }
.switch input:checked + .switch-track .switch-thumb { transform: translateX(20px); background: #fff; }
.switch input:focus-visible + .switch-track { outline: 3px solid #bb8729; outline-offset: 3px; }
.switch:hover .switch-track { box-shadow: 0 0 0 3px #0000001a; }
.costs-excluded { padding: 24px 0 22px; border-bottom: 1px solid #000; }
.costs-excluded .scope-list li::before { content: '−'; }
.costs-contact { margin: 18px 0 0; font-size: 12px; line-height: 1.5; }
.costs-contact a { color: inherit; font-weight: 600; }
.costs-actions { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 8px; padding: 14px 38px; border-top: 1px solid #000; background: #fff; }
.costs-actions button { border-color: #000; border-radius: 0; color: #000; }
.costs-actions .costs-primary { background: #000; color: #fff; }
.costs-actions .costs-primary:hover { background: #222; }
.print-costs-document { display: none; }
html.map-open { overflow: hidden; overscroll-behavior: none; }
body.map-open { position: fixed; width: 100%; overflow: hidden; }
.map-dialog { position: fixed; inset: 0; width: 100%; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; overflow: hidden; background: #17251e; box-shadow: none; overscroll-behavior: none; }
.map-dialog::backdrop { background: #17251e; backdrop-filter: none; }
.map-viewport { position: absolute; inset: 0; overflow: hidden; touch-action: none; overscroll-behavior: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; cursor: grab; }
.map-viewport.is-dragging { cursor: grabbing; }
.map-viewport:focus-visible { outline: 2px solid #f2cb7c; outline-offset: -4px; }
#map-art { position: absolute; left: 0; top: 0; display: block; max-width: none; transform-origin: 0 0; will-change: transform; pointer-events: none; }
.map-close { position: absolute; z-index: 1; top: max(16px, env(safe-area-inset-top)); right: max(16px, env(safe-area-inset-right)); width: 48px; height: 48px; min-height: 48px; padding: 0; border: 1px solid #ffffff40; border-radius: 50%; background: #1d3028e8; color: #fffdf4; box-shadow: 0 2px 14px #0003; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); touch-action: manipulation; }
.map-close:hover { background: #243e31; border-color: #ffffff80; }
.map-close svg { width: 22px; height: 22px; }
.map-hint { position: absolute; bottom: max(24px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); margin: 0; padding: 11px 16px; border: 1px solid #ffffff26; border-radius: 24px; background: #1d3028e8; color: #fffdf4; font-size: 12px; line-height: 1.4; white-space: nowrap; pointer-events: none; opacity: 1; transition: opacity .3s ease; }
.map-hint.is-hidden { opacity: 0; }
.map-help { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .map-hint, .switch-track, .switch-thumb { transition: none; } }
@media screen and (max-width: 700px) {
  .toolbar { padding: 14px 16px; flex-wrap: wrap; gap: 14px; }
  .identity { min-width: 0; }
  .mark { flex-shrink: 0; }
  .actions { width: 100%; grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  button { flex: 1; min-height: 44px; padding: 10px 8px; font-size: 12px; }
  .viewer { padding: 16px 12px; }
  dialog { width: 100vw; max-width: none; max-height: 100dvh; height: 100dvh; margin: 0; border: 0; }
  .costs-head { padding: 26px 22px; grid-template-columns: 1fr; gap: 20px; }
  .proposal-status { justify-self: start; }
  .costs-meta { grid-template-columns: 1fr; }
  .costs-meta > div { padding: 14px 22px; border-right: 0; border-bottom: 1px solid #e5e5e5; }
  .costs-body { padding: 4px 22px 26px; }
  .costs-table { table-layout: fixed; }
  .costs-table th:nth-child(2), .costs-table td:nth-child(2), .costs-table th:nth-child(3), .costs-table td:nth-child(3) { display: none; }
  .costs-table th:last-child, .costs-table td:last-child { width: 104px; }
  .scope-list { grid-template-columns: 1fr; }
  .costs-spec { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .costs-total, .costs-deposit, .costs-excavation { grid-template-columns: 1fr; }
  .costs-excavation { gap: 16px; }
  .deposit-amount { text-align: left; }
  .costs-actions { padding: 12px 22px; }
}
@page plan-sheet { size: 24in 18in; margin: 0; }
@page costs-sheet { size: letter portrait; margin: .5in; }
@media print {
  html, body { margin: 0; background: white; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  html.map-open, body.map-open { position: static; top: auto !important; width: auto; overflow: visible; }
  .toolbar, .export-status, dialog, .sheet-switch { display: none !important; }
  .viewer { page: plan-sheet; padding: 0; overflow: visible; }
  .sheet { width: 24in; height: 18in; max-width: none; margin: 0; box-shadow: none; }
  #plan { width: 24in; height: 18in; }
  body.print-costs .viewer { display: none !important; }
  .print-costs-document { page: costs-sheet; display: block; color: #000; }
  .costs-head { gap: 16px; padding: 16px 0 22px; }
  .costs h2 { font-size: 50px; }
  .proposal-status { min-width: 175px; }
  .costs-meta > div { padding: 16px; }
  .costs-meta > div:first-child { padding-left: 0; }
  .costs-body { padding: 4px 0 0; }
  .costs-deposit { grid-template-columns: 1fr; gap: 16px; break-inside: avoid; }
  .deposit-amount { text-align: left; }
  .costs-actions { display: none; }
  /* Two letter pages: the scope on the first; the excavation choice, the money it drives, and the exclusions on the second. */
  .costs-excavation { break-before: page; margin-top: 0; }
  .costs-total { break-inside: avoid; }
}
