/* ==========================================================================
   metalguy.app — "Shop Floor" design system  v2.0
   One stylesheet for the hub, PlasmaGuy, StairGuy, GateGuy, Yards, Shop, Quotes.
   Fonts: Space Grotesk (display) · Inter (body) · JetBrains Mono (numbers/labels)
   ========================================================================== */

:root {
  color-scheme: dark;
  /* palette */
  --bg:        #141517;
  --bg-2:      #1a1b1d;
  --surface:   #222427;
  --surface-2: #2a2d31;
  --field:     #101113;
  --stage:     #0f1012;
  --line:      rgba(255,255,255,.11);
  --line-2:    rgba(255,255,255,.18);
  --ink:       #F1EEE7;
  --ink-2:     #D7D2C9;
  --muted:     #A7A29A;
  --muted-2:   #6F6A62;

  --copper:    #C6853F;
  --copper-2:  #D59450;
  --copper-3:  #A5641F;
  --copper-rgb: 198,133,63;
  --weld:      #E85D2F;   /* fail / error */
  --shop:      #5BB85B;   /* pass / live */
  --amber:     #E8A02F;   /* warn / caution */
  --blue:      #6FA3F0;   /* dimension / info */
  --mine:      #8FA8FF;   /* "my yard" override */

  /* type */
  --fd: 'Space Grotesk', system-ui, sans-serif;
  --fb: 'Inter', system-ui, -apple-system, sans-serif;
  --fm: 'JetBrains Mono', Menlo, Consolas, monospace;

  /* shape + rhythm */
  --r-sm: 6px; --r: 10px; --r-lg: 14px; --r-xl: 18px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px; --s10: 40px; --s12: 48px; --s16: 64px;
  --shadow: 0 2px 10px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.07);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.08);
  --appbar-h: 56px;
  --tabbar-h: 58px;
  --max: 1180px;
}

/* --------------------------------------------------------------------------
   base
   -------------------------------------------------------------------------- */
*,*::before,*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { margin: 0; min-height: 100%; }
body {
  color: var(--ink);
  font-family: var(--fb);
  font-size: 14.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  background-color: var(--bg);
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,.016) 0 1px, rgba(0,0,0,.05) 1px 2px),
    linear-gradient(112deg, rgba(255,255,255,.05) 0%, rgba(255,255,255,0) 18%, rgba(255,255,255,.04) 38%, rgba(255,255,255,0) 60%, rgba(255,255,255,.04) 82%, rgba(255,255,255,0) 100%),
    radial-gradient(130% 90% at 50% -10%, #33363a 0%, #222427 45%, #151618 100%);
  background-attachment: fixed;
}
a { color: var(--copper-2); text-decoration: none; }
a:hover { color: var(--ink); }
h1,h2,h3,h4 { font-family: var(--fd); letter-spacing: -.015em; margin: 0; line-height: 1.1; }
p { margin: 0 0 1em; }
code, .mono, .num, .n { font-family: var(--fm); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.tiny { font-size: 11px; }
.hidden, [hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--copper); outline-offset: 2px; border-radius: var(--r-sm); }
::selection { background: rgba(var(--copper-rgb), .35); }
button { font: inherit; color: inherit; }
img, svg, canvas { max-width: 100%; display: block; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--s5) 0; }

/* --------------------------------------------------------------------------
   app bar
   -------------------------------------------------------------------------- */
.appbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: var(--s3);
  min-height: var(--appbar-h); padding: 8px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(20,21,23,.82);
  backdrop-filter: saturate(140%) blur(10px); -webkit-backdrop-filter: saturate(140%) blur(10px);
}
.brand {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--fm); font-weight: 500; font-size: 17px; letter-spacing: -.02em; color: var(--ink); white-space: nowrap;
}
.brand .dot { width: 10px; height: 10px; border-radius: 2px; background: var(--copper); box-shadow: 0 0 12px rgba(var(--copper-rgb), .7); }
.brand b, .brand .tool { color: var(--copper); font-weight: 700; }
.brand .tld { color: var(--copper); font-weight: 700; }
.appbar__spec { color: var(--muted); font-family: var(--fm); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appbar__grow { flex: 1 1 auto; min-width: 0; }
.appbar__actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }

/* job header — compact inputs living in the app bar */
.jobhead { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.jobhead .jh {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--field); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 4px 8px; height: 32px;
}
.jobhead .jh label { font-family: var(--fm); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.jobhead .jh input, .jobhead .jh select {
  background: transparent; border: 0; color: var(--ink); font-family: var(--fm); font-size: 12.5px; padding: 0; min-width: 0; height: 22px;
}
.jobhead .jh input { width: 120px; }
.jobhead .jh input.zip { width: 62px; }
.jobhead .jh select { width: 150px; }
.jobhead .jh input:focus, .jobhead .jh select:focus { outline: none; }
.jobhead .jh:focus-within { border-color: var(--copper); }

/* nav (hub + secondary pages) */
.nav { display: flex; gap: 4px; align-items: center; }
.nav a { font-family: var(--fm); font-size: 12.5px; color: var(--muted); padding: 6px 10px; border-radius: var(--r-sm); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); background: rgba(255,255,255,.06); }

/* --------------------------------------------------------------------------
   buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--fb); font-weight: 600; font-size: 13.5px; line-height: 1;
  padding: 10px 14px; border-radius: var(--r); cursor: pointer; white-space: nowrap;
  border: 1px solid var(--line-2);
  background: linear-gradient(180deg, #33363a, #222427); color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.10);
  transition: filter .12s ease, transform .12s ease, border-color .12s ease;
}
.btn:hover { filter: brightness(1.12); border-color: var(--copper); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.btn--primary {
  background: linear-gradient(180deg, var(--copper-2), var(--copper-3)); color: #1a120a;
  border-color: rgba(0,0,0,.35); box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 2px 8px rgba(0,0,0,.4);
}
.btn--primary:hover { border-color: rgba(0,0,0,.35); }
.btn--ghost { background: transparent; box-shadow: none; }
.btn--sm { padding: 7px 10px; font-size: 12.5px; border-radius: var(--r-sm); }
.btn--lg { padding: 14px 20px; font-size: 15px; border-radius: 12px; }
.btn .arw { transition: transform .15s ease; }
.btn:hover .arw { transform: translateX(3px); }
.btn-group { display: inline-flex; gap: 6px; flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   workspace: the 3-pane tool layout
   -------------------------------------------------------------------------- */
.workspace {
  display: grid; gap: 16px; padding: 16px; align-items: start;
  grid-template-columns: 300px minmax(0,1fr) 360px;
  max-width: 1760px; margin: 0 auto;
}
.pane {
  min-width: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 16px; box-shadow: var(--shadow);
}
.pane--spec { position: sticky; top: calc(var(--appbar-h) + 16px); max-height: calc(100vh - var(--appbar-h) - 32px); overflow: auto; }
.pane__title {
  font-family: var(--fm); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--copper);
  margin: 0 0 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.pane__title .sub { color: var(--muted); letter-spacing: .04em; text-transform: none; font-size: 11px; }
.pane h3.pane__title { margin-top: 20px; }
.pane > .pane__title:first-child { margin-top: 0; }
.section { padding-top: 14px; margin-top: 14px; border-top: 1px solid var(--line); }
.section:first-child { padding-top: 0; margin-top: 0; border-top: 0; }

/* stage (drawing) */
.stage {
  background: var(--stage); border: 1px solid var(--line); border-radius: var(--r);
  min-height: 300px; display: grid; place-items: center; padding: 14px; position: relative; overflow: hidden;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 24px 24px;
}
.stage svg { max-width: 100%; height: auto; }
.stage canvas { max-width: 100%; height: auto; border-radius: var(--r-sm); }
.stage__empty { color: var(--muted); font-family: var(--fm); font-size: 12.5px; }
.stage__hud {
  position: absolute; top: 10px; left: 10px; background: rgba(16,17,19,.88); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 8px 10px; font-family: var(--fm); font-size: 11.5px; line-height: 1.5; pointer-events: none; max-width: calc(100% - 20px);
}
.stage__hud b { color: var(--ink); font-weight: 600; }
.stage__hud .c { color: var(--copper); } .stage__hud .b { color: var(--blue); } .stage__hud .g { color: var(--shop); }
.caption { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.viewmodes { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }

/* --------------------------------------------------------------------------
   form controls
   -------------------------------------------------------------------------- */
.field { display: block; margin-bottom: 12px; }
.field > .lbl, .lbl { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; color: var(--muted); margin-bottom: 5px; gap: 8px; }
.lbl .val { font-family: var(--fm); font-size: 12px; color: var(--copper-2); font-weight: 600; }
.lbl .hint { color: var(--muted-2); font-size: 11px; }
.inp, select.inp, textarea.inp {
  width: 100%; background: var(--field); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 9px 10px;
  font-size: 13.5px; font-family: inherit; transition: border-color .12s ease;
}
.inp.num, input[type=number].inp { font-family: var(--fm); }
.inp:focus { outline: none; border-color: var(--copper); box-shadow: 0 0 0 3px rgba(var(--copper-rgb), .15); }
.inp::placeholder { color: var(--muted-2); }
textarea.inp { min-height: 80px; resize: vertical; font-family: var(--fm); font-size: 12px; }
select.inp {
  appearance: none; -webkit-appearance: none; padding-right: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23A7A29A' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.three { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.two .field, .three .field { margin-bottom: 10px; }

/* range */
input[type=range] { width: 100%; margin: 6px 0 2px; accent-color: var(--copper); height: 22px; cursor: pointer; background: transparent; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(90deg, rgba(var(--copper-rgb),.9), rgba(255,255,255,.14)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -7px; border-radius: 50%; background: var(--copper-2); border: 2px solid #1a120a; box-shadow: 0 0 0 2px rgba(var(--copper-rgb),.35); }
input[type=range]::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(255,255,255,.14); }
input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--copper-2); border: 2px solid #1a120a; }

/* segmented control */
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button {
  flex: 1 1 auto; min-width: 0; background: var(--field); color: var(--muted); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 8px 8px; font-size: 12.5px; cursor: pointer; font-family: inherit; font-weight: 500;
  transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.seg button:hover { color: var(--ink); border-color: var(--line-2); }
.seg button[aria-pressed="true"] { background: rgba(var(--copper-rgb), .16); border-color: var(--copper); color: var(--ink); }
.seg--sm button { padding: 6px 6px; font-size: 11.5px; }

/* checkbox / switch */
.check { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--ink-2); cursor: pointer; margin: 8px 0; }
.check input { accent-color: var(--copper); width: 16px; height: 16px; margin: 0; }
.check .hint { color: var(--muted); font-size: 11.5px; }

/* shape / preset grid */
.shapes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.shapebtn {
  background: var(--field); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 4px 6px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 5px; color: var(--muted);
  font-family: var(--fm); font-size: 9px; letter-spacing: .04em; text-transform: uppercase; text-align: center;
}
.shapebtn:hover { border-color: var(--copper); color: var(--ink); }
.shapebtn[aria-pressed="true"] { border-color: var(--copper); color: var(--ink); background: rgba(var(--copper-rgb), .12); }
.shapebtn svg { width: 40px; height: 40px; }
.shapebtn svg * { fill: none; stroke: var(--copper); stroke-width: 3.4; stroke-linejoin: round; vector-effect: non-scaling-stroke; }

/* --------------------------------------------------------------------------
   results: tables, stats, tags, chips
   -------------------------------------------------------------------------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tbl th { font-family: var(--fm); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); text-align: left; font-weight: 500; padding: 0 0 6px; }
.tbl td { padding: 6px 0; border-top: 1px solid rgba(255,255,255,.08); vertical-align: top; }
.tbl td.n, .tbl th.n { text-align: right; font-family: var(--fm); white-space: nowrap; }
.tbl td .sub { display: block; color: var(--muted); font-size: 10.5px; font-family: var(--fm); margin-top: 1px; }
.tbl tr.total td { border-top: 1px solid var(--line-2); font-weight: 600; }
.tbl--dense td { padding: 4px 0; font-size: 12px; }
.tbl--wide { font-family: var(--fm); font-size: 12px; }
.tbl--wide th, .tbl--wide td { padding: 6px 8px; white-space: nowrap; }
.tbl--wrap th, .tbl--wrap td { white-space: normal; }
.tbl--wrap td:nth-child(2) { font-family: var(--fb); color: var(--ink); min-width: 180px; }
.tbl--wide tr:hover td { background: rgba(255,255,255,.03); }
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl .mark { color: var(--copper-2); font-weight: 700; font-family: var(--fm); }

.tag {
  display: inline-block; margin-left: 6px; font-family: var(--fm); font-size: 9px; letter-spacing: .06em; text-transform: uppercase;
  padding: 1px 5px; border-radius: 4px; vertical-align: middle; line-height: 1.5;
}
.tag.live { background: rgba(91,184,91,.18); color: var(--shop); }
.tag.mine { background: rgba(143,168,255,.18); color: var(--mine); }
.tag.sample, .tag.est { background: rgba(255,255,255,.10); color: var(--muted); }
.tag.new { background: rgba(var(--copper-rgb),.2); color: var(--copper-2); }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.stat { background: var(--field); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 9px 10px; min-width: 0; }
.stat .k { font-family: var(--fm); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.stat .v { font-family: var(--fm); font-size: 17px; font-weight: 700; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .s { font-family: var(--fm); font-size: 10.5px; color: var(--muted); margin-top: 1px; }
.stat--hero { grid-column: 1 / -1; border-color: var(--copper); }
.stat--hero .v { color: var(--copper-2); font-size: 22px; }
.stat--ok .v { color: var(--shop); } .stat--warn .v { color: var(--amber); } .stat--fail .v { color: var(--weld); } .stat--blue .v { color: var(--blue); }

.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.chip { font-family: var(--fm); font-size: 10.5px; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--line); color: var(--muted); }
.chip.ok { background: rgba(91,184,91,.14); color: var(--shop); border-color: rgba(91,184,91,.4); }
.chip.warn { background: rgba(232,160,47,.13); color: var(--amber); border-color: rgba(232,160,47,.45); }
.chip.fail { background: rgba(232,93,47,.16); color: var(--weld); border-color: rgba(232,93,47,.55); }
.chip.info { background: rgba(255,255,255,.05); }

.verdict { margin-top: 10px; font-family: var(--fm); font-size: 13px; font-weight: 700; padding: 10px 12px; border-radius: var(--r-sm); }
.verdict.ok { background: rgba(91,184,91,.14); color: var(--shop); border: 1px solid rgba(91,184,91,.4); }
.verdict.warn { background: rgba(232,160,47,.13); color: var(--amber); border: 1px solid rgba(232,160,47,.45); }
.verdict.fail { background: rgba(232,93,47,.16); color: var(--weld); border: 1px solid rgba(232,93,47,.5); }

.banner { background: rgba(232,93,47,.10); border: 1px solid rgba(232,93,47,.4); color: #f0a07a; border-radius: var(--r-sm); padding: 9px 11px; font-size: 12px; margin-top: 10px; line-height: 1.5; }
.banner--info { background: rgba(111,163,240,.10); border-color: rgba(111,163,240,.4); color: #b9d0f5; }
.banner--ok { background: rgba(91,184,91,.10); border-color: rgba(91,184,91,.4); color: #b7e3b7; }
.gov { font-family: var(--fm); font-size: 11px; color: var(--muted); margin-top: 12px; line-height: 1.6; border-left: 2px solid var(--copper); padding-left: 10px; }
.gov b { color: var(--ink); font-weight: 500; }
.note { font-size: 11.5px; color: var(--muted); margin-top: 12px; line-height: 1.55; }
.err { color: var(--weld); font-family: var(--fm); font-size: 12px; margin-top: 8px; min-height: 1em; }

/* key/value rows */
.kv { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: 12.5px; }
.kv dt { color: var(--muted); margin: 0; }
.kv dd { margin: 0; font-family: var(--fm); text-align: right; }

/* --------------------------------------------------------------------------
   tabs (results/sections)
   -------------------------------------------------------------------------- */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 12px; overflow-x: auto; }
.tabs button {
  background: transparent; border: 0; border-bottom: 2px solid transparent; color: var(--muted); padding: 8px 10px;
  font-family: var(--fm); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; white-space: nowrap; margin-bottom: -1px;
}
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--copper-2); border-bottom-color: var(--copper); }
[role=tabpanel][hidden] { display: none; }

/* --------------------------------------------------------------------------
   toasts, modal
   -------------------------------------------------------------------------- */
.toasts { position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 12px); transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast {
  pointer-events: auto; background: #2a2d31; border: 1px solid var(--line-2); color: var(--ink); border-radius: var(--r);
  padding: 10px 14px; font-size: 13px; box-shadow: var(--shadow-lg); display: flex; gap: 10px; align-items: center; max-width: min(92vw, 520px);
  animation: toast-in .18s ease;
}
.toast.ok { border-color: rgba(91,184,91,.55); } .toast.err { border-color: rgba(232,93,47,.6); }
.toast a { color: var(--copper-2); font-family: var(--fm); font-size: 12px; word-break: break-all; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px);} to { opacity: 1; transform: none; } }
@media (min-width: 900px) { .toasts { bottom: 20px; } }

.modal { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; background: rgba(0,0,0,.6); padding: 16px; }
.modal__box { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 20px; width: min(560px, 100%); box-shadow: var(--shadow-lg); max-height: 90vh; overflow: auto; }
.modal__box h2 { font-size: 20px; margin-bottom: 10px; }

/* --------------------------------------------------------------------------
   hub / marketing
   -------------------------------------------------------------------------- */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 22px; }
.hero { padding: 64px 0 28px; max-width: 800px; }
.kicker { font-family: var(--fm); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--copper); margin: 0 0 16px; }
.hero h1 { font-weight: 700; font-size: clamp(34px, 6vw, 60px); line-height: 1.04; letter-spacing: -.02em; margin: 0 0 18px; }
.hero h1 .fade { color: var(--muted); }
.hero .sub { font-size: clamp(16px, 2.2vw, 19px); color: var(--ink-2); max-width: 640px; }
.hero .cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.card {
  background: linear-gradient(180deg, rgba(52,55,59,.55), rgba(30,32,35,.85)); border: 1px solid var(--line); border-radius: var(--r-xl);
  padding: 24px; display: flex; flex-direction: column; box-shadow: var(--shadow); transition: transform .15s ease, border-color .15s ease; position: relative;
}
.card:hover { transform: translateY(-3px); border-color: rgba(var(--copper-rgb), .55); }
.card .ic { width: 52px; height: 52px; margin-bottom: 14px; }
.card .ic svg * { fill: none; stroke: var(--copper); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.card h2 { font-size: 24px; margin-bottom: 3px; }
.card .tag-line { font-family: var(--fm); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--copper); margin: 0 0 12px; }
.card p { color: var(--ink-2); font-size: 14.5px; margin: 0 0 20px; flex: 1; }
.card .ext { display: inline-block; font-family: var(--fm); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; margin-left: 8px; vertical-align: middle; }
.card .preview { background: var(--stage); border: 1px solid var(--line); border-radius: var(--r); padding: 10px; margin-bottom: 16px; aspect-ratio: 16/8; display: grid; place-items: center; }
.card .preview svg { width: 100%; height: 100%; }
.strip { margin-top: 26px; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--r); background: rgba(16,17,19,.6); font-family: var(--fm); font-size: 12.5px; color: var(--muted); display: flex; gap: 22px; flex-wrap: wrap; align-items: center; }
.strip b { color: var(--ink); font-weight: 500; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 56px 0 18px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(24px, 3.4vw, 34px); }
.section-head p { color: var(--muted); margin: 6px 0 0; max-width: 620px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.step { background: rgba(16,17,19,.6); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; }
.step .n { font-family: var(--fm); color: var(--copper); font-size: 12px; letter-spacing: .1em; }
.step h3 { font-size: 17px; margin: 8px 0 6px; }
.step p { color: var(--ink-2); font-size: 13.5px; margin: 0; }
.foot { margin-top: 56px; padding: 22px 0 40px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-family: var(--fm); font-size: 12px; color: var(--muted); }
.foot a { color: var(--muted); } .foot a:hover { color: var(--ink); }
.foot .links { display: flex; gap: 14px; flex-wrap: wrap; }

/* simple pages (yards, shop, quote) */
.page { max-width: 1060px; margin: 0 auto; padding: 24px 22px 60px; }
.page h1 { font-size: clamp(26px, 4vw, 38px); margin-bottom: 8px; }
.page .lede { color: var(--ink-2); font-size: 16px; max-width: 680px; margin-bottom: 24px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.yard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; box-shadow: var(--shadow); }
.yard h3 { font-size: 17px; }
.yard .meta { font-family: var(--fm); font-size: 11.5px; color: var(--muted); margin: 4px 0 10px; }
.yard .dist { color: var(--copper-2); font-weight: 600; }
.list { display: grid; gap: 12px; }

/* --------------------------------------------------------------------------
   mobile tab bar (tools)
   -------------------------------------------------------------------------- */
.tabbar { display: none; }

/* --------------------------------------------------------------------------
   responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1240px) {
  .workspace { grid-template-columns: 290px minmax(0,1fr); }
  .pane--results { grid-column: 2; position: static; max-height: none; }
}
@media (max-width: 899px) {
  :root { --appbar-h: 52px; }
  .appbar { padding: 6px 12px; gap: 8px; flex-wrap: wrap; }
  .appbar__spec { display: none; }
  .appbar__actions { margin-left: auto; }
  .jobhead { flex: 1 1 100%; order: 10; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .jobhead .jh { width: 100%; min-width: 0; }
  .jobhead .jh input, .jobhead .jh select, .jobhead .jh input.zip { width: 100%; flex: 1 1 auto; }
  .jobhead > .btn { grid-column: span 2; }
  .workspace, .workspace--gate { grid-template-columns: minmax(0, 1fr); padding: 12px; gap: 12px; padding-bottom: calc(var(--tabbar-h) + 16px); }
  .pane { min-width: 0; }
  .pane--spec, .pane--results { position: static; max-height: none; overflow: visible; grid-column: auto; }
  .workspace[data-view] .pane { display: none; }
  .workspace[data-view="spec"] .pane--spec,
  .workspace[data-view="stage"] .pane--stage,
  .workspace[data-view="results"] .pane--results { display: block; }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; height: var(--tabbar-h);
    background: rgba(20,21,23,.94); border-top: 1px solid var(--line); backdrop-filter: blur(10px);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar button {
    flex: 1; background: transparent; border: 0; color: var(--muted); font-family: var(--fm); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; cursor: pointer;
  }
  .tabbar button svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar button[aria-selected="true"] { color: var(--copper-2); }
  .two, .three { grid-template-columns: 1fr 1fr; }
  .cols { grid-template-columns: 1fr; }
  .hero { padding: 40px 0 20px; }
  .wrap { padding: 0 16px; }
  .toasts { left: 12px; right: 12px; transform: none; align-items: stretch; }
  .stage__hud { position: static; margin-top: 8px; max-width: none; }
  .stage { display: block; }
}
@media (max-width: 480px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .shapes { grid-template-columns: repeat(3, 1fr); }
  .appbar__actions .btn .txt { display: none; }
}

/* --------------------------------------------------------------------------
   print: the quote / cut sheet
   -------------------------------------------------------------------------- */
@media print {
  @page { margin: 12mm; }
  body { background: #fff !important; color: #111 !important; font-size: 11.5px; }
  .appbar, .tabbar, .toasts, .no-print, .pane--spec, .viewmodes, .btn { display: none !important; }
  .print-head { display: block !important; }
  .workspace { display: block; padding: 0; }
  .pane { background: #fff; border: 0; box-shadow: none; padding: 0; margin: 0 0 14px; break-inside: avoid; }
  .pane--stage .stage { background: #fff; border: 1px solid #ccc; }
  .pane__title { color: #7a4a14; }
  .stat { background: #fafafa; border-color: #ddd; }
  .stat--hero { border-color: #7a4a14; } .stat--hero .v { color: #7a4a14; }
  .tbl td { border-color: #e5e5e5; }
  .tag { border: 1px solid #ccc; color: #555 !important; background: none !important; }
  .chip, .verdict, .banner, .gov { border-color: #ccc !important; background: none !important; color: #222 !important; }
  .stage svg * { vector-effect: non-scaling-stroke; }
  a { color: inherit; }
}
.print-head { display: none; border-bottom: 2px solid #7a4a14; padding-bottom: 8px; margin-bottom: 14px; font-family: var(--fm); }
.print-head h1 { font-size: 18px; }
.print-head .row { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: 11px; color: #333; }

/* --------------------------------------------------------------------------
   accordion groups in the spec pane
   -------------------------------------------------------------------------- */
details.acc { border-top: 1px solid var(--line); padding: 4px 0 6px; }
details.acc:first-child { border-top: 0; }
details.acc > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-family: var(--fm); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--copper); padding: 10px 0;
}
details.acc > summary::-webkit-details-marker { display: none; }
details.acc > summary::after { content: ''; width: 8px; height: 8px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(-45deg); transition: transform .15s ease; flex: none; }
details.acc[open] > summary::after { transform: rotate(45deg); }
details.acc > summary .sub { color: var(--muted); letter-spacing: .04em; text-transform: none; font-size: 11px; margin-left: auto; }
details.acc > summary .sub.on { color: var(--shop); }
details.acc > .acc__body { padding: 2px 0 8px; }

/* choice cards (type of logo, etc.) */
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.choice {
  text-align: left; background: var(--field); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 9px 10px; cursor: pointer; color: var(--ink-2);
  display: flex; flex-direction: column; gap: 3px; font: inherit; transition: border-color .12s ease, background .12s ease;
}
.choice b { font-size: 13px; color: var(--ink); font-weight: 600; }
.choice span { font-size: 11px; color: var(--muted); line-height: 1.4; }
.choice:hover { border-color: var(--line-2); }
.choice[aria-pressed="true"] { border-color: var(--copper); background: rgba(var(--copper-rgb), .12); }
.choice[aria-pressed="true"] b { color: var(--copper-2); }
.addrow { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   cut list (check-off)
   -------------------------------------------------------------------------- */
.cutlist__bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.cutlist__progress { flex: 1 1 220px; min-width: 0; }
.cutlist__ptext { font-family: var(--fm); font-size: 12.5px; color: var(--ink); margin-bottom: 5px; }
.cutlist--done .cutlist__ptext { color: var(--shop); }
.cutlist__track { height: 6px; background: rgba(255,255,255,.08); border-radius: 3px; overflow: hidden; }
.cutlist__fill { height: 100%; background: linear-gradient(90deg, var(--copper-2), var(--shop)); border-radius: 3px; transition: width .2s ease; }
.cutlist__group { margin-top: 12px; }
.cutlist__gtitle { font-family: var(--fm); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--copper); padding: 6px 0; border-bottom: 1px solid var(--line); margin-bottom: 2px; display: flex; justify-content: space-between; }
.cutlist__row {
  display: grid; grid-template-columns: 24px minmax(70px, max-content) minmax(0, 1fr) auto auto; gap: 4px 10px; align-items: center;
  padding: 8px 4px; border-bottom: 1px solid rgba(255,255,255,.06); cursor: pointer; min-height: 44px;
}
.cutlist__row:hover { background: rgba(255,255,255,.03); }
.cutlist__row input { width: 20px; height: 20px; accent-color: var(--shop); margin: 0; cursor: pointer; }
.cutlist__mark { font-family: var(--fm); font-weight: 700; color: var(--copper-2); font-size: 12.5px; }
.cutlist__desc { font-size: 13.5px; color: var(--ink); min-width: 0; }
.cutlist__spec { display: block; font-family: var(--fm); font-size: 10.5px; color: var(--muted); margin-top: 1px; }
.cutlist__len { font-family: var(--fm); font-size: 15px; font-weight: 700; color: var(--blue); text-align: right; white-space: nowrap; }
.cutlist__len2 { display: block; font-size: 12px; font-weight: 500; color: var(--muted); }
.cutlist__qty { font-family: var(--fm); font-size: 12.5px; color: var(--muted); text-align: right; min-width: 30px; }
.cutlist__note { grid-column: 3 / -1; font-family: var(--fm); font-size: 10.5px; color: var(--muted); }
.cutlist__row.is-done .cutlist__desc, .cutlist__row.is-done .cutlist__mark { text-decoration: line-through; opacity: .55; }
.cutlist__row.is-done .cutlist__len { color: var(--shop); opacity: .7; }
.cutlist__exit { display: none; }

/* full screen: one list, big type, nothing else */
.cutlist--full {
  position: fixed; inset: 0; z-index: 300; overflow: auto; background: var(--bg); padding: 16px max(16px, env(safe-area-inset-right, 0px)) 40px max(16px, env(safe-area-inset-left, 0px));
  font-size: 18px;
}
.cutlist--full .cutlist__exit { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: sticky; top: 0; background: var(--bg); padding: 10px 0 12px; border-bottom: 1px solid var(--line); margin-bottom: 10px; z-index: 1; }
.cutlist__exittitle { font-family: var(--fd); font-size: 20px; font-weight: 700; }
.cutlist--full .cutlist__ptext { font-size: 16px; }
.cutlist--full .cutlist__track { height: 10px; }
.cutlist--full .cutlist__row { grid-template-columns: 34px minmax(96px, max-content) minmax(0, 1fr) auto auto; min-height: 64px; padding: 12px 6px; }
.cutlist--full .cutlist__row input { width: 28px; height: 28px; }
.cutlist--full .cutlist__mark { font-size: 16px; }
.cutlist--full .cutlist__desc { font-size: 18px; }
.cutlist--full .cutlist__spec { font-size: 13px; }
.cutlist--full .cutlist__len { font-size: 26px; }
.cutlist--full .cutlist__len2 { font-size: 16px; }
.cutlist--full .cutlist__qty { font-size: 16px; }
.cutlist--full .cutlist__gtitle { font-size: 13px; padding: 14px 0 6px; }
.cutlist--full [data-full] { display: none; }
body.has-cutlist-full { overflow: hidden; }
@media (max-width: 599px) {
  .cutlist__row { grid-template-columns: 24px minmax(0, 1fr) auto; }
  .cutlist__mark { grid-column: 2; }
  .cutlist__desc { grid-column: 2; }
  .cutlist__len { grid-row: 1 / span 2; grid-column: 3; align-self: center; }
  .cutlist__qty { grid-column: 3; }
  .cutlist__note { grid-column: 2 / -1; }
  .cutlist--full .cutlist__row { grid-template-columns: 34px minmax(0, 1fr) auto; }
}
@media print { .cutlist__row input { -webkit-appearance: checkbox; appearance: checkbox; } .cutlist__bar .btn-group { display: none; } }
