
:root{
  /* Layout: a dispatch desk. Sticky header with a tab strip; the job board scrolls sideways like the wall board it replaces; quotes render as paper. */
  --bg:#e9ece6; --surface:#f8f9f5; --sunk:#dfe3dc; --ink:#18211c; --muted:#56635b; --line:#cbd2c9;
  --accent:#2b5a43; --accent-ink:#ffffff; --accent-soft:#d5e3d9;
  --flag:#a85712; --flag-soft:#f5e1cc; --ok:#2a7347; --ok-soft:#d6eadd;
  --paper:#ffffff; --shadow:0 1px 2px rgba(20,30,24,.08),0 6px 18px rgba(20,30,24,.06);
  --f-display:"Barlow Condensed","Arial Narrow",sans-serif;
  --f-body:"IBM Plex Sans",system-ui,-apple-system,"Segoe UI",sans-serif;
  --f-mono:"IBM Plex Mono",ui-monospace,Menlo,Consolas,monospace;
}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]){
  --bg:#101512; --surface:#171f1a; --sunk:#0c110e; --ink:#e2e9e4; --muted:#95a39a; --line:#29342d;
  --accent:#86c29e; --accent-ink:#0c1a12; --accent-soft:#1f3729;
  --flag:#eaa35c; --flag-soft:#3a2917; --ok:#86cfa0; --ok-soft:#1b3424;
  --paper:#1c2520; --shadow:0 1px 2px rgba(0,0,0,.4),0 8px 22px rgba(0,0,0,.3); color-scheme:dark}}
:root[data-theme="dark"]{
  --bg:#101512; --surface:#171f1a; --sunk:#0c110e; --ink:#e2e9e4; --muted:#95a39a; --line:#29342d;
  --accent:#86c29e; --accent-ink:#0c1a12; --accent-soft:#1f3729;
  --flag:#eaa35c; --flag-soft:#3a2917; --ok:#86cfa0; --ok-soft:#1b3424;
  --paper:#1c2520; --shadow:0 1px 2px rgba(0,0,0,.4),0 8px 22px rgba(0,0,0,.3); color-scheme:dark}

*{box-sizing:border-box}
body{background:var(--bg);color:var(--ink);font-family:var(--f-body);font-size:14px;line-height:1.5}
body::before{content:"";position:fixed;inset:0 0 auto;height:env(safe-area-inset-top,0px);z-index:30;background:var(--surface)}
h1,h2,h3{font-family:var(--f-display);font-weight:600;letter-spacing:.01em;text-wrap:balance;margin:0;line-height:1.1}
h1{font-size:34px}h2{font-size:26px}h3{font-size:19px}
p{margin:0}
button,input,select,textarea{font:inherit;color:inherit}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.num{font-family:var(--f-mono);font-variant-numeric:tabular-nums}
.eyebrow{font-size:11.5px;font-weight:600;letter-spacing:.09em;text-transform:uppercase;color:var(--muted)}
.fine{font-size:12.5px;color:var(--muted)}
.gut{padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px))}

/* header */
.top{position:sticky;top:env(safe-area-inset-top,0px);z-index:20;background:var(--surface);border-bottom:1px solid var(--line)}
.top-in{display:flex;align-items:center;gap:14px 20px;flex-wrap:wrap;padding-block:10px;max-width:1440px;margin:0 auto}
.brand{display:flex;align-items:center;gap:10px;flex:0 0 auto}
.brand-name{font-family:var(--f-display);font-weight:700;font-size:21px;letter-spacing:.04em;text-transform:uppercase;line-height:1}
.brand-name span{color:var(--muted);font-weight:500}
.nav{display:flex;gap:2px;overflow-x:auto;flex:1 1 420px;min-width:0;scrollbar-width:none}
.nav button{border:0;background:none;padding:8px 12px;border-radius:5px;font-weight:500;color:var(--muted);cursor:pointer;white-space:nowrap}
.nav button:hover{background:var(--sunk);color:var(--ink)}
.nav button[aria-current="page"]{background:var(--accent);color:var(--accent-ink)}
.role{display:flex;align-items:center;gap:8px;flex:0 0 auto}
.role label{font-size:12px;color:var(--muted)}

/* shell */
.wrap{max-width:1440px;margin:0 auto;padding-block:22px 80px;display:flex;flex-direction:column;gap:18px}
.banner{display:flex;gap:10px;align-items:flex-start;font-size:13px;color:var(--muted);background:var(--sunk);border-radius:6px;padding:9px 12px}
.banner b{color:var(--ink);font-weight:600}
.view-head{display:flex;justify-content:space-between;align-items:flex-end;gap:12px;flex-wrap:wrap}
.view-head > div{display:flex;flex-direction:column;gap:4px;min-width:0}
.lede{color:var(--muted);max-width:62ch}
.panel{background:var(--surface);border:1px solid var(--line);border-radius:8px;padding:18px;display:flex;flex-direction:column;gap:14px;min-width:0}
.grid2{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:18px;align-items:start}
@media (max-width:900px){.grid2{grid-template-columns:minmax(0,1fr)}}

/* controls */
.btn{border:1px solid var(--line);background:var(--surface);padding:8px 14px;border-radius:6px;cursor:pointer;font-weight:500;display:inline-flex;align-items:center;gap:6px;text-decoration:none;color:var(--ink)}
.btn:hover{background:var(--sunk)}
.btn.primary{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
.btn.primary:hover{filter:brightness(1.08)}
.btn.small{padding:5px 10px;font-size:13px}
.btns{display:flex;gap:8px;flex-wrap:wrap}
.field{display:flex;flex-direction:column;gap:5px;min-width:0}
.field > span{font-size:12.5px;font-weight:500;color:var(--muted)}
input[type=text],input[type=number],input[type=email],input[type=tel],input[type=date],select,textarea{width:100%;border:1px solid var(--line);background:var(--paper);border-radius:6px;padding:8px 10px;min-width:0}
textarea{resize:vertical;min-height:64px}
.row{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px}
.check{display:flex;gap:8px;align-items:center;cursor:pointer}
.check input{width:17px;height:17px;accent-color:var(--accent)}
.chips{display:flex;flex-wrap:wrap;gap:6px}
.chip{border:1px solid var(--line);background:var(--paper);padding:7px 12px;border-radius:999px;cursor:pointer;font-weight:500}
.chip[aria-pressed="true"]{background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}
.stepper{display:inline-flex;align-items:center;border:1px solid var(--line);border-radius:6px;background:var(--paper)}
.stepper button{border:0;background:none;width:34px;height:34px;cursor:pointer;font-size:17px}
.stepper span{min-width:28px;text-align:center}
.step-row{display:flex;gap:18px;flex-wrap:wrap}
.step-row > div{display:flex;flex-direction:column;gap:5px}
.step{display:flex;flex-direction:column;gap:10px;padding-top:14px;border-top:1px solid var(--line)}
.step:first-child{border-top:0;padding-top:0}

/* estimator */
.map-tools{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}
#yard{width:100%;height:auto;aspect-ratio:720/460;max-width:100%;border-radius:6px;cursor:crosshair;touch-action:manipulation;display:block;background:#5d7a45}
.map-foot{display:flex;justify-content:space-between;align-items:baseline;gap:10px;flex-wrap:wrap}
.map-foot strong{font-size:22px}
.result{background:var(--accent-soft);border-radius:8px;padding:16px;display:flex;flex-direction:column;gap:8px}
.range{font-family:var(--f-display);font-size:44px;font-weight:700;line-height:1;letter-spacing:.01em}
.err{color:var(--flag);font-size:13px;font-weight:500}

/* board */
.summary{display:flex;gap:10px;flex-wrap:wrap}
.stat{background:var(--surface);border:1px solid var(--line);border-radius:8px;padding:10px 14px;display:flex;flex-direction:column;gap:2px;min-width:150px}
.stat strong{font-family:var(--f-display);font-size:26px;font-weight:600;line-height:1.1}
.stat.warn strong{color:var(--flag)}
.board-scroll{overflow-x:auto;padding-bottom:10px;margin-inline:-4px}
.board{display:flex;gap:10px;padding-inline:4px;width:max-content}
.col{width:232px;background:var(--sunk);border-radius:8px;padding:10px;display:flex;flex-direction:column;gap:8px;align-self:flex-start}
.col-head{display:flex;justify-content:space-between;align-items:baseline;padding:2px 4px 4px}
.col-head h3{font-size:17px}
.col-head span{font-size:12px;color:var(--muted)}
.col-empty{font-size:12.5px;color:var(--muted);padding:10px 4px;border:1px dashed var(--line);border-radius:6px;text-align:center}
.card{all:unset;box-sizing:border-box;background:var(--surface);border:1px solid var(--line);border-radius:6px;padding:10px 11px;display:flex;flex-direction:column;gap:4px;cursor:pointer;box-shadow:var(--shadow)}
.card:hover{border-color:var(--accent)}
.card:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.card-top{display:flex;justify-content:space-between;font-size:12px;color:var(--muted)}
.card strong{font-weight:600;font-size:14.5px;line-height:1.3}
.card-scope{font-size:12.5px;color:var(--muted)}
.card-amt{font-size:13px;font-weight:500}
.flags{display:flex;flex-wrap:wrap;gap:4px;margin-top:2px}
.flag{font-size:11.5px;font-weight:600;padding:2px 7px;border-radius:4px;background:var(--sunk);color:var(--muted);white-space:nowrap}
.card .flag{background:var(--bg)}
.flag.warn{background:var(--flag-soft);color:var(--flag)}
.flag.ok{background:var(--ok-soft);color:var(--ok)}
.flag.info{background:var(--accent-soft);color:var(--accent)}

/* quote doc */
.doc{background:var(--paper);border:1px solid var(--line);border-radius:4px;padding:28px;display:flex;flex-direction:column;gap:20px;box-shadow:var(--shadow);min-width:0}
.doc-head{display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap;padding-bottom:16px;border-bottom:2px solid var(--ink)}
.lh-name{font-family:var(--f-display);font-weight:700;font-size:26px;text-transform:uppercase;letter-spacing:.04em;line-height:1}
.lh-sub{font-size:12.5px;color:var(--muted);margin-top:4px}
.doc-meta{text-align:right;display:flex;flex-direction:column;gap:1px;font-size:12.5px;color:var(--muted)}
.doc-meta strong{font-family:var(--f-mono);font-size:16px;color:var(--ink)}
.doc-to{display:flex;flex-direction:column;gap:2px}
.tbl-wrap{overflow-x:auto}
table.lines{width:100%;border-collapse:collapse;font-size:13.5px}
table.lines th{font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);font-weight:600;text-align:left;padding:6px 8px;border-bottom:1px solid var(--line)}
table.lines td{padding:9px 8px;border-bottom:1px solid var(--line);vertical-align:top}
table.lines .r{text-align:right;white-space:nowrap}
.totals{display:flex;flex-direction:column;gap:6px;margin-left:auto;width:min(320px,100%)}
.totals div{display:flex;justify-content:space-between;gap:12px}
.totals .grand{border-top:2px solid var(--ink);padding-top:8px;font-weight:600;font-size:16px}
.totals .dep{background:var(--accent-soft);color:var(--accent);padding:7px 10px;border-radius:5px;font-weight:600}
.terms{margin:0;padding-left:18px;font-size:12.5px;color:var(--muted);display:flex;flex-direction:column;gap:3px}
.margin-box{display:flex;flex-direction:column;gap:8px}
.mrow{display:flex;justify-content:space-between;gap:10px;font-size:13.5px}
.mrow.big{font-size:17px;font-weight:600;padding-top:8px;border-top:1px solid var(--line)}
.mrow.big .num{color:var(--ok)}
.locked{font-size:13px;color:var(--muted);background:var(--sunk);border-radius:6px;padding:10px 12px}

/* schedule */
.sched-wrap{overflow-x:auto;border:1px solid var(--line);border-radius:8px;background:var(--surface)}
table.sched{border-collapse:collapse;min-width:1100px;width:100%}
table.sched th,table.sched td{border-bottom:1px solid var(--line);border-right:1px solid var(--line);padding:8px;vertical-align:top;text-align:left}
table.sched thead th{font-size:12px;font-weight:600;color:var(--muted);background:var(--sunk)}
table.sched thead th.today{color:var(--accent)}
table.sched tbody th{position:sticky;left:0;background:var(--surface);width:150px;font-weight:600;z-index:1}
table.sched tbody th small{display:block;font-weight:400;color:var(--muted);font-size:12px}
.slot{all:unset;box-sizing:border-box;display:block;width:100%;background:var(--accent-soft);color:var(--ink);border-radius:5px;padding:6px 8px;font-size:12.5px;cursor:pointer;margin-bottom:4px}
.slot b{display:block;font-weight:600}
.slot:hover{outline:1px solid var(--accent)}
.slot.sub{background:var(--flag-soft)}

/* price book */
.pb-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,420px),1fr));gap:18px;align-items:start}
table.pb{width:100%;border-collapse:collapse;font-size:13.5px}
table.pb th{font-size:11px;letter-spacing:.07em;text-transform:uppercase;color:var(--muted);font-weight:600;text-align:left;padding:6px;border-bottom:1px solid var(--line)}
table.pb td{padding:6px;border-bottom:1px solid var(--line)}
table.pb input{padding:5px 7px;max-width:96px}
table.pb .sell{font-weight:600}

/* drawer + sheet */
.scrim{position:fixed;inset:0;background:rgba(10,16,12,.42);z-index:40}
.drawer{position:fixed;top:0;right:0;bottom:0;width:min(580px,100%);background:var(--bg);z-index:41;overflow-y:auto;box-shadow:-10px 0 30px rgba(0,0,0,.2);padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px);padding-right:env(safe-area-inset-right,0px)}
.dr-in{display:flex;flex-direction:column;gap:14px;padding:18px}
.dr-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}
.dr-head h2{margin-top:3px}
.x{border:1px solid var(--line);background:var(--surface);width:36px;height:36px;border-radius:6px;cursor:pointer;font-size:18px;flex:0 0 auto}
.stage-bar{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.stage-bar select{width:auto;flex:1 1 180px}
.sec{background:var(--surface);border:1px solid var(--line);border-radius:8px;padding:14px;display:flex;flex-direction:column;gap:10px}
.sec-h{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap}
.pad{width:100%;max-width:100%;aspect-ratio:560/280;height:auto;border-radius:6px;border:1px solid var(--line);touch-action:none;display:block;cursor:crosshair}
.photos{display:flex;gap:6px;flex-wrap:wrap}
.photos img{width:72px;height:72px;object-fit:cover;border-radius:5px;border:1px solid var(--line)}
.co{display:flex;justify-content:space-between;gap:8px;font-size:13.5px;padding:7px 0;border-bottom:1px solid var(--line)}
.sheet{position:fixed;inset:0;z-index:42;overflow-y:auto;padding-top:calc(env(safe-area-inset-top,0px) + 24px);padding-bottom:calc(env(safe-area-inset-bottom,0px) + 40px)}
.sheet-in{max-width:760px;margin:0 auto;display:flex;flex-direction:column;gap:12px}
.frame-label{display:flex;justify-content:space-between;align-items:center;gap:10px;color:#fff;font-size:13px;flex-wrap:wrap}
.frame-label .eyebrow{color:rgba(255,255,255,.8)}
.sigpad{width:100%;max-width:100%;aspect-ratio:600/150;height:auto;border:1px solid var(--line);border-radius:6px;touch-action:none;display:block;cursor:crosshair}
.paid-box{background:var(--ok-soft);border-radius:8px;padding:16px;display:flex;flex-direction:column;gap:8px}
.copyline{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.copyline code{font-family:var(--f-mono);font-size:13px;background:var(--paper);border:1px solid var(--line);border-radius:5px;padding:6px 9px;word-break:break-all}
.sketch-svg{width:100%;height:auto;max-width:100%;border:1px solid var(--line);border-radius:6px;background:#fbfaf5}
.kv{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:6px 16px;font-size:13.5px}
.kv dt{color:var(--muted)}.kv dd{margin:0}

.toast{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(20px + env(safe-area-inset-bottom,0px));background:var(--ink);color:var(--bg);padding:10px 16px;border-radius:7px;font-size:13.5px;z-index:60;max-width:min(92vw,520px);box-shadow:var(--shadow)}
@media (max-width:560px){h1{font-size:28px}.doc{padding:18px}.range{font-size:36px}}
@media (prefers-reduced-motion:no-preference){.drawer{animation:slide .18s ease-out}@keyframes slide{from{transform:translateX(24px);opacity:.6}}}

/* live-site additions */
body.public .nav,body.public #who{display:none}
body:not(.public) .site-foot{display:none}
.site-foot{max-width:1440px;margin:0 auto;padding:18px 16px 40px;color:var(--muted);font-size:13px;display:flex;gap:10px;justify-content:space-between;flex-wrap:wrap;border-top:1px solid var(--line)}
.site-foot a{color:var(--muted)}
#who{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--muted);flex:0 0 auto}
.linkbtn{border:0;background:none;color:var(--accent);cursor:pointer;padding:4px;font-weight:500;text-decoration:underline}
.login{max-width:380px;margin:40px auto}
.cust{max-width:820px;margin:0 auto;display:flex;flex-direction:column;gap:14px;width:100%}
.photos a{display:block}

/* satellite map */
.gmap{width:100%;aspect-ratio:4/3;border-radius:6px;background:#1d2a22;overflow:hidden}
.map-ph{aspect-ratio:4/3;display:grid;place-items:center;text-align:center;padding:24px;border-radius:6px;background:var(--sunk);color:var(--muted);border:1px dashed var(--line)}
.findrow{display:flex;gap:8px}
.findrow input{flex:1;min-width:0}
.seglabel{position:absolute;transform:translate(-50%,-50%);background:rgba(20,24,22,.86);color:#fff;font:600 12px "IBM Plex Mono",monospace;padding:2px 6px;border-radius:4px;white-space:nowrap;pointer-events:none}
