/* Goods MFG — site styles. Built from the Goods MFG design system (Brand Manual V1.0).
   Carbon + Natural lead · square edges · thin rules · 42px page margins. */
@font-face { font-family: 'Noto Sans Display Condensed'; src: url('/fonts/NotoSansDisplay-CondensedBlack.woff2') format('woff2'); font-weight: 900; font-display: swap; }
@font-face { font-family: 'Lato'; src: url('/fonts/Lato-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Lato'; src: url('/fonts/Lato-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'DejaVu Sans Mono'; src: url('/fonts/DejaVuSansMono.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'DejaVu Sans Mono'; src: url('/fonts/DejaVuSansMono-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --carbon: #121212; --natural: #f8f7f3; --concrete: #b9b8b3; --industrial: #1e1e1c; --rule: #464643;
  --surface: var(--carbon); --raised: var(--industrial); --ink: var(--natural); --muted: var(--concrete);
  --line: var(--rule); --strong: var(--concrete); --action: var(--natural); --on-action: var(--carbon);
  --active: #7fb2ff; --hold: #f2a65a;
  --display: 'Noto Sans Display Condensed', 'Arial Narrow', sans-serif;
  --body: Lato, 'Helvetica Neue', Arial, sans-serif;
  --mono: 'DejaVu Sans Mono', Menlo, Consolas, monospace;
  --page: 42px;
}
.nat { --surface: var(--natural); --raised: var(--natural); --ink: var(--carbon); --muted: var(--rule); --line: var(--concrete); --strong: var(--rule); --action: var(--carbon); --on-action: var(--natural); --active: #1f5bb5; --hold: #9a4a06; background: var(--surface); color: var(--ink); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--surface); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--ink); }
a:hover { color: var(--muted); }
:focus-visible { outline: 2px solid var(--strong); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--action); color: var(--on-action); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }

/* Type */
.disp { font-family: var(--display); font-weight: 900; line-height: .92; letter-spacing: 0; }
.xl { font-size: clamp(52px, 7vw, 96px); line-height: .9; }
.l { font-size: clamp(40px, 4.6vw, 64px); }
.m { font-size: clamp(30px, 3vw, 40px); line-height: .95; }
.s { font-size: clamp(22px, 2vw, 26px); line-height: 1.05; }
.lead { font-size: clamp(18px, 1.6vw, 20px); line-height: 1.4; color: var(--muted); max-width: 36em; }
.sup { font-size: 14px; line-height: 1.5; color: var(--muted); }
.lbl { font-family: var(--mono); font-size: 12px; line-height: 1.4; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ink { color: var(--ink); }
.spec { font-family: var(--mono); font-size: 14px; letter-spacing: .02em; }
.strong { font-weight: 700; color: var(--ink); }

/* Layout */
.wrap { width: 100%; max-width: 1440px; margin: 0 auto; padding-left: var(--page); padding-right: var(--page); }
.stack { display: flex; flex-direction: column; }
.hr { border: 0; border-top: 1px solid var(--line); margin: 0; }
.raised { background: var(--raised); }
.section { padding-top: 96px; padding-bottom: 96px; }
.head { display: flex; flex-direction: column; gap: 12px; padding-bottom: 32px; }
.head-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; padding-bottom: 32px; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--col, 260px)), 1fr)); border-top: 1px solid var(--line); }
.cols > * { padding: 24px 24px 32px; border-left: 1px solid var(--line); }
.cols > *:first-child { padding-left: 0; border-left: 0; }
.cols > *:last-child { padding-right: 0; }

/* Header */
.site-head { border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 24px; padding-bottom: 16px; }
.mark { width: 82px; } /* PNG has built-in padding: 82px file = 72px visible mark (brand minimum) */
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px; }
.nav a.lbl { color: var(--ink); text-decoration: none; }
.nav a.lbl:hover, .nav a.lbl[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; }
.nav .menu-btn { display: none; }
.mob-menu { display: none; }

/* Footer */
.site-foot .wrap { padding-top: 16px; padding-bottom: 32px; }
.site-foot .row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.tagline { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 24px; border: 1px solid var(--strong); border-radius: 0; background: transparent; color: var(--ink); font-family: var(--mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { color: var(--ink); border-color: var(--ink); }
.btn.p { background: var(--action); border-color: var(--action); color: var(--on-action); font-weight: 700; }
.btn.p:hover { color: var(--on-action); opacity: .9; }
.btn.t { border-color: transparent; padding: 0 8px; text-decoration: underline; text-underline-offset: 4px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.btn.block { width: 100%; }

/* Forms */
.fld { display: grid; gap: 4px; min-width: 0; align-content: start; }
.fld > span, .legend { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.fld input, .fld select, .fld textarea { font: inherit; font-size: 16px; color: var(--ink); background: var(--raised); border: 1px solid var(--strong); border-radius: 0; min-height: 44px; padding: 0 12px; width: 100%; min-width: 0; }
.fld 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% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.fld textarea { min-height: 96px; padding: 12px; resize: vertical; }
.fld small, .help { font-size: 14px; color: var(--muted); }
.fld input:user-invalid { border-color: var(--hold); }
.err { color: var(--hold); font-size: 14px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; align-items: start; }
.sizes { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.sizes input { text-align: center; font-family: var(--mono); padding: 0 4px; }
.opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.opt { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 16px; border: 1px solid var(--line); cursor: pointer; }
.opt input { margin: 4px 0 0; accent-color: var(--ink); }
.opt:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.opt strong { font-family: var(--display); font-weight: 900; font-size: 22px; line-height: 1.05; display: block; }
.check { display: flex; gap: 12px; align-items: flex-start; }
.check input { margin-top: 5px; accent-color: var(--ink); width: 16px; height: 16px; flex: none; }
.box { padding: 20px; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 16px; }
.drop { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 32px; border: 1px dashed var(--strong); cursor: pointer; }
.drop.over { border-style: solid; background: var(--raised); }
.drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.files { list-style: none; padding: 0; display: grid; gap: 8px; }
.files li { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); font-size: 14px; }
.files .bar { grid-column: 1 / -1; height: 2px; background: var(--line); }
.files .bar i { display: block; height: 100%; width: 0; background: var(--active); transition: width .2s; }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }

/* Status */
.st { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; color: var(--ink); max-width: 100%; }
p.st, .st.wrap-ok { white-space: normal; } /* sentence-length statuses wrap on phones */
.st::before { content: ""; width: 8px; height: 8px; border: 1px solid currentColor; flex: none; }
.st.a { color: var(--active); } .st.a::before { background: currentColor; }
.st.h { color: var(--hold); } .st.h::before { background: currentColor; transform: rotate(45deg); }
.st.d::before { background: currentColor; }
.st.w { color: var(--muted); }

/* Imagery */
.ph { display: flex; align-items: flex-end; padding: 12px; background: var(--raised); border: 1px dashed var(--line); color: var(--muted); }
.concept { position: relative; overflow: hidden; background: var(--raised); }
.concept img { width: 100%; height: 100%; object-fit: cover; }
.ctag-below { display: block; margin-top: 8px; font-family: var(--mono); font-size: 10px; letter-spacing: .06em; color: var(--muted); text-align: right; }
.ctag { position: absolute; right: 12px; bottom: 12px; font-family: var(--mono); font-size: 10px; letter-spacing: .06em; color: var(--natural); background: rgba(18,18,18,.72); padding: 2px 6px; white-space: nowrap; }

/* Quote page */
.progress { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 0 12px; }
.progress li { flex: 1 1 120px; padding: 12px 12px 0 0; border-top: 2px solid var(--line); }
.progress li.on { border-top-color: var(--ink); }
.progress li.on .lbl { color: var(--ink); }
.qgrid { display: flex; flex-wrap: wrap; gap: 42px; align-items: flex-start; }
.qform { flex: 999 1 560px; min-width: 0; }
.qsec { display: flex; flex-direction: column; gap: 20px; padding: 32px 0; border-top: 1px solid var(--line); scroll-margin-top: 16px; }
.summary { flex: 1 1 340px; position: sticky; top: 24px; padding: 24px; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 16px; }
.summary dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 14px; }
.big { font-family: var(--display); font-weight: 900; font-size: 64px; line-height: 1; }
.bar-m { display: none; }
[hidden] { display: none !important; }

/* Mobile */
@media (max-width: 720px) {
  :root { --page: 24px; }
  .section { padding-top: 64px; padding-bottom: 64px; }
  .nav .desk { display: none; }
  .nav .menu-btn { display: inline-flex; }
  .site-head .wrap { flex-wrap: nowrap; }
  .nav { gap: 8px; flex-wrap: nowrap; }
  .site-head .btn { padding: 0 12px; font-size: 12px; }
  .progress { display: none; }
  .mob-menu[data-open="true"] { display: flex; flex-direction: column; gap: 4px; padding: 8px var(--page) 16px; border-bottom: 1px solid var(--line); }
  .mob-menu a { padding: 12px 0; text-decoration: none; border-bottom: 1px solid var(--line); }
  .cols > * { padding: 20px 0 !important; border-left: 0 !important; }
  .cols > * + * { border-top: 1px solid var(--line); }
  .sizes { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .summary { position: static; }
  .bar-m { display: flex; position: sticky; bottom: 0; z-index: 5; flex-direction: column; gap: 10px; padding: 14px var(--page) 22px; border-top: 1px solid var(--line); background: var(--raised); }
  .big { font-size: 52px; }
  .files li { grid-template-columns: 1fr auto; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .files .bar i { transition: none; } }

/* ---------------------------------------------------------------- Shop (internal) */
.tag { border: 1px solid var(--line); padding: 2px 8px; }
.demo-bar { margin: 0; padding: 8px var(--page); font-family: var(--mono); font-size: 12px; letter-spacing: .06em; color: var(--carbon); background: var(--hold); }
.shop-main { padding: 32px var(--page) 64px; max-width: 1600px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; }
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.filters .fld { width: 200px; }
.counts { display: flex; flex-wrap: wrap; gap: 8px 32px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.board-scroll { overflow-x: auto; padding-bottom: 8px; }
.board { display: flex; gap: 16px; min-width: max-content; align-items: flex-start; }
.col { flex: 0 0 256px; display: flex; flex-direction: column; gap: 12px; min-height: 200px; }
.col-head { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 8px; border-bottom: 2px solid var(--ink); }
.col.drop-ok { outline: 1px dashed var(--strong); outline-offset: 6px; }
.card { display: flex; flex-direction: column; gap: 8px; padding: 14px; background: var(--raised); border: 1px solid var(--line); text-decoration: none; color: var(--ink); cursor: grab; }
.card:hover { border-color: var(--strong); color: var(--ink); }
.card.hold { border-color: var(--hold); }
.card.dragging { opacity: .4; }
.card .top { display: flex; justify-content: space-between; gap: 8px; font-family: var(--mono); font-size: 12px; }
.card .due.late { color: var(--hold); }
.card strong { font-size: 15px; line-height: 1.3; }
.card .next { font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 8px; }
.empty { font-size: 13px; color: var(--muted); padding: 12px 0; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; max-width: min(560px, calc(100% - 32px)); padding: 12px 16px; background: var(--natural); color: var(--carbon); font-size: 14px; border: 1px solid var(--carbon); }
.toast.err { background: var(--hold); }
.seg { display: inline-flex; flex-wrap: nowrap; }
.seg label { position: relative; display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border: 1px solid var(--strong); margin-left: -1px; font-family: var(--mono); font-size: 12px; letter-spacing: .08em; cursor: pointer; }
.seg label:first-child { margin-left: 0; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg label:has(input:checked) { background: var(--action); color: var(--on-action); border-color: var(--action); z-index: 1; }
.seg label:has(input:checked[value="HOLD"]) { background: var(--hold); border-color: var(--hold); color: var(--carbon); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--strong); outline-offset: 2px; }
.check-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.check-row > div:first-child { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.order-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; }
.meta { display: grid; grid-template-columns: repeat(2, auto); gap: 6px 24px; }
.tabs { display: flex; flex-wrap: wrap; gap: 24px; border-bottom: 1px solid var(--line); }
.tabs a { text-decoration: none; padding-bottom: 8px; }
.tabs a.on { color: var(--ink); border-bottom: 2px solid var(--ink); }
.panel { display: flex; flex-direction: column; gap: 16px; padding-top: 8px; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr)); gap: 42px; align-items: start; }
.table-scroll { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-family: var(--mono); font-weight: 400; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 8px 12px 8px 0; border-bottom: 1px solid var(--line); }
table.t td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t .num { font-family: var(--mono); text-align: center; }
table.t input { width: 100%; min-width: 44px; min-height: 36px; font-family: var(--mono); text-align: center; background: var(--surface); color: var(--ink); border: 1px solid var(--strong); border-radius: 0; font-size: 16px; }
.log { list-style: none; padding: 0; display: flex; flex-direction: column; }
.log li { padding: 10px 0; border-bottom: 1px solid var(--line); display: grid; gap: 2px; font-size: 14px; }
.stage-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.savebar { position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px var(--page); margin: 0 calc(var(--page) * -1); background: var(--raised); border-top: 1px solid var(--line); }
.login { max-width: 420px; margin: 0 auto; padding: 96px var(--page); display: flex; flex-direction: column; gap: 20px; }
@media (max-width: 720px) {
  .filters { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .filters .fld { width: 100%; }
  .filters .fld:first-child { grid-column: 1 / -1; }
  .board-hint { display: none; }
  .counts { gap: 6px 20px; }
  .board-scroll { scroll-snap-type: x mandatory; margin: 0 calc(var(--page) * -1); padding: 0 var(--page) 8px; }
  .col { flex-basis: 80vw; scroll-snap-align: start; }
  .shop-head .lbl.tag { display: none; }
  .meta { grid-template-columns: auto 1fr; }
}

/* ---------------------------------------------------------------- Customer tracker */
.progress-v { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 16px 12px; }
.progress-v li { flex: 1 1 120px; display: flex; flex-direction: column; gap: 6px; padding-top: 12px; border-top: 2px solid var(--line); }
.progress-v li.done { border-top-color: var(--ink); }
.progress-v li.now { border-top-color: var(--active); }
.proof-img { max-width: 100%; max-height: 640px; border: 1px solid var(--line); background: var(--natural); }
@media (max-width: 720px) {
  .progress-v li { flex: 1 1 100%; flex-direction: row; justify-content: space-between; align-items: center; border-top-width: 1px; padding: 10px 0; }
}

/* ---------------------------------------------------------------- Account */
.ord { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 24px; align-items: center; padding: 16px; border: 1px solid var(--line); }
.ord .acts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.mock-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 12px; }
.mock { border: 1px solid var(--line); display: flex; flex-direction: column; }
.mock img { width: 100%; aspect-ratio: 1; object-fit: contain; background: var(--industrial); }
.mock .meta-row { padding: 10px; display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 720px) { .ord { grid-template-columns: 1fr; } .ord .acts { justify-content: flex-start; } }


/* ---------------------------------------------------------------- Design lab */
.lab { padding: 24px var(--page) 48px; max-width: 1600px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.lab-top { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.lab-title h1 { font-size: clamp(32px, 4vw, 48px); margin: 4px 0 0; }
.lab-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.lab-actions .btn svg, .lab-rail svg { flex: none; }
.lab-grid { display: grid; grid-template-columns: 84px minmax(300px, 360px) minmax(0, 1fr); border: 1px solid var(--line); min-height: 720px; }
.lab-rail { display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.lab-rail button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 4px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--muted); font-family: var(--mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.lab-rail button:hover { color: var(--ink); }
.lab-rail button[aria-selected=true] { color: var(--carbon); background: var(--natural); }
.lab-panel { border-right: 1px solid var(--line); padding: 20px; overflow-y: auto; max-height: 820px; display: flex; flex-direction: column; gap: 16px; }
.lab-panel > section { display: none; flex-direction: column; gap: 16px; }
.lab-panel > section.on { display: flex; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; }
.sheet-x { display: none; min-height: 36px; padding: 0 8px; }
.lab-canvas { display: flex; flex-direction: column; gap: 12px; padding: 16px; min-width: 0; }
.lab-tools { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.ib { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; background: transparent; color: var(--ink); cursor: pointer; border-radius: 0; padding: 0; }
.ib:hover:not(:disabled) { border-color: var(--strong); }
.ib:disabled { opacity: .3; cursor: default; }
.ib[aria-pressed=true] { background: var(--natural); color: var(--carbon); }
.tb-sep { width: 1px; height: 24px; background: var(--line); margin: 0 6px; }
.tb-sel { display: inline-flex; gap: 4px; }
.tb-guides { margin-left: auto; }
.stage-wrap { position: relative; }
svg#stage { width: min(100%, 74vh); aspect-ratio: 1; display: block; margin: 0 auto; touch-action: none; user-select: none; background: var(--industrial); }
svg#stage:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.stage-msg { position: absolute; left: 12px; bottom: 12px; right: 12px; margin: 0; font-family: var(--mono); font-size: 12px; letter-spacing: .04em; color: var(--natural); pointer-events: none; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.views { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.views button { width: 88px; padding: 4px 4px 6px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; font-family: var(--mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; display: flex; flex-direction: column; gap: 4px; align-items: center; border-radius: 0; }
.views button[aria-selected=true] { border-color: var(--ink); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.views svg { width: 78px; height: 78px; display: block; background: var(--industrial); }
.lab-products { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lab-products button { display: flex; flex-direction: column; gap: 4px; padding: 8px; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; text-align: left; font: inherit; border-radius: 0; }
.lab-products button[aria-pressed=true] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.lab-products svg { width: 100%; aspect-ratio: 1; background: var(--industrial); }
.lab-products img.photo { width: 100%; aspect-ratio: 1; object-fit: contain; background: var(--natural); display: block; }
.lab-products .lab-cat { grid-column: 1 / -1; margin-top: 10px; }
/* Photo views (black colorway): black garments need the light Natural stage. */
svg#stage.photo, .views svg.photo { background: var(--natural); }
.lab-products strong { font-size: 13px; line-height: 1.25; }
.lab-products span { font-family: var(--mono); font-size: 10px; color: var(--muted); letter-spacing: .04em; }
.swatches, .inks { display: flex; flex-wrap: wrap; gap: 6px; }
.swatches button, .inks button { width: 32px; height: 32px; border: 1px solid var(--strong); border-radius: 0; cursor: pointer; padding: 0; }
.inks button { width: 26px; height: 26px; }
.swatches button[aria-pressed=true], .inks button[aria-pressed=true] { outline: 2px solid var(--ink); outline-offset: 2px; }
.inks .custom { position: relative; overflow: hidden; background: conic-gradient(#c8102e, #ffd100, #00843d, #1f4fa3, #5b2a86, #c8102e); }
.inks .custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.font-list { display: flex; flex-direction: column; max-height: 260px; overflow-y: auto; border: 1px solid var(--line); }
.font-list > * { flex-shrink: 0; } /* scroll the list instead of squashing the rows */
.font-list .grp { font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 8px 10px 4px; position: sticky; top: 0; background: var(--surface); }
.font-list button { text-align: left; padding: 8px 10px; border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--ink); font-size: 20px; line-height: 1.2; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.font-list button[aria-pressed=true] { background: var(--natural); color: var(--carbon); }
.rng { display: grid; grid-template-columns: 72px 1fr 52px; align-items: center; gap: 10px; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.rng input { accent-color: var(--natural); width: 100%; }
.rng output { text-align: right; color: var(--ink); }
.bseg { display: flex; border: 1px solid var(--strong); }
.bseg button { flex: 1; min-height: 36px; border: 0; border-right: 1px solid var(--strong); background: transparent; color: var(--ink); font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.bseg button:last-child { border-right: 0; }
.bseg button[aria-pressed=true] { background: var(--natural); color: var(--carbon); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { min-height: 32px; padding: 0 10px; border: 1px solid var(--strong); background: transparent; color: var(--ink); font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; border-radius: 0; }
.chips button[aria-pressed=true] { background: var(--natural); color: var(--carbon); }
.clip-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.clip-grid button { aspect-ratio: 1; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; padding: 10px; border-radius: 0; display: flex; align-items: center; justify-content: center; }
.clip-grid button:hover { border-color: var(--ink); }
.clip-grid svg, .clip-grid img { width: 100%; height: 100%; object-fit: contain; }
.idea-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.idea-grid button { border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; padding: 6px; display: flex; flex-direction: column; gap: 6px; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; border-radius: 0; }
.idea-grid button:hover { border-color: var(--ink); }
.idea-grid svg { width: 100%; aspect-ratio: 1; background: var(--industrial); }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.checks li { display: grid; grid-template-columns: 14px 1fr; gap: 6px; }
.checks li::before { content: ''; width: 8px; height: 8px; margin-top: 6px; background: var(--muted); }
.checks .ok::before { background: #3c8a4a; }
.checks .warn::before { background: var(--hold); transform: rotate(45deg); }
.checks .bad::before { background: #c4442f; }
.roster-wrap { max-height: 260px; overflow-y: auto; border: 1px solid var(--line); }
.roster th, .roster td { padding: 4px; }
.roster input, .roster select { width: 100%; min-height: 36px; background: var(--raised); color: var(--ink); border: 1px solid var(--strong); border-radius: 0; font: inherit; font-size: 14px; padding: 0 6px; }
.roster td:nth-child(1) { width: 72px; } .roster td:nth-child(3) { width: 60px; } .roster td:nth-child(4) { width: 36px; }
.roster .ib { width: 32px; height: 32px; }
.lab-sizes { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.price-box { gap: 6px; }
.price-box .big { font-size: 56px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.lab-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--natural); color: var(--carbon); padding: 12px 18px; font-family: var(--mono); font-size: 12px; letter-spacing: .04em; z-index: 60; max-width: min(92vw, 560px); }
.lab-toast a { color: var(--carbon); }
@media (max-width: 1100px) { .lab-grid { grid-template-columns: 76px 300px minmax(0, 1fr); } }
@media (max-width: 900px) {
  .lab { padding: 12px 12px 120px; }
  .lab-title { display: none; }
  .lab-top { order: 3; }
  .lab-actions { width: 100%; } .lab-actions .btn { flex: 1; padding: 0 10px; } .lab-actions .btn.p { flex-basis: 100%; }
  .lab-grid { display: block; border: 0; min-height: 0; }
  .lab-canvas { padding: 0; }
  .lab-tools { gap: 0; } .tb-guides { display: none; } .tb-sep { margin: 0 2px; }
  .ib { width: 36px; height: 36px; }
  .views button { width: 72px; } .views svg { width: 62px; height: 62px; }
  .lab-rail { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; flex-direction: row; background: var(--carbon); border: 0; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .lab-rail button { flex: 1; border: 0; padding: 10px 2px; font-size: 9px; }
  .lab-panel { position: fixed; left: 0; right: 0; bottom: 64px; z-index: 45; max-height: 62vh; background: var(--carbon); border: 0; border-top: 1px solid var(--strong); box-shadow: 0 -12px 32px rgba(0,0,0,.5); transform: translateY(110%); transition: transform .2s ease; }
  .lab-panel.open { transform: none; }
  .sheet-x { display: inline-flex; }
  .lab-sizes { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lab-toast { bottom: 84px; }
  .lab-page .site-foot { padding-bottom: 96px; }
}

/* ---------------------------------------------------------------- Shop dashboard */
.dash .toolbar { align-items: end; }
.dash-range { flex-wrap: wrap; }
.dash-range button { padding: 0 12px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.kpi { background: var(--surface); padding: 16px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.kpi .big { font-size: 40px; }
.kpis.small .big { font-size: 32px; }
.kpi .sup { font-size: 12px; }
.kpi.good .lbl::before, .kpi.warn .lbl::before, .kpi.bad .lbl::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 6px; vertical-align: 1px; }
.kpi.good .lbl::before { background: #3c8a4a; } .kpi.warn .lbl::before { background: var(--hold); transform: rotate(45deg); } .kpi.bad .lbl::before { background: #c4442f; }
.panel-d { border: 1px solid var(--line); padding: 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pd-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.pd-head > div { min-width: 0; }
.tbl-btn { min-height: 32px; padding: 0 10px; }
.dash-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 24px; }
.dash-three { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 24px; }
.dash-three > div { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .hit:focus { outline: none; } .chart .hit:focus-visible rect { stroke: var(--natural); stroke-width: 1; }
.dlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.dlist li { border-top: 1px solid var(--line); }
.dlist li > a, .dlist li:not(:has(a)) { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; gap: 2px 12px; padding: 10px 0; color: var(--ink); text-decoration: none; align-items: baseline; }
.dlist li > a .sup { grid-column: 2; }
.dlist li > a > .spec:last-child { grid-row: 1; grid-column: 3; }
.dlist li > a:hover { background: var(--raised); }
.dlist li.sup { display: block; padding: 10px 0; }
#top li { grid-template-columns: minmax(0, 1fr) auto auto; }
.tip { position: fixed; z-index: 80; pointer-events: none; background: var(--natural); color: var(--carbon); padding: 8px 10px; font-size: 13px; line-height: 1.4; max-width: 260px; box-shadow: 0 6px 20px rgba(0,0,0,.4); }
.tbl-dlg { background: var(--surface); color: var(--ink); border: 1px solid var(--strong); padding: 20px; max-width: min(92vw, 720px); width: 100%; }
.tbl-dlg::backdrop { background: rgba(0,0,0,.6); }
.tbl-dlg .t { margin-top: 12px; width: 100%; }
@media (max-width: 720px) { .shop-head .nav { gap: 12px; } .shop-head .tag, .shop-head .wrap > div > .lbl { display: none; } .shop-head .mark { flex: none; width: 56px; height: auto; } .kpi .big { font-size: 30px; } .kpi { padding: 12px; } }

/* Owner-only parts are hidden for helper accounts (the API also withholds the data). */
[data-role=helper] [data-owner] { display: none !important; }

/* ---------------------------------------------------------------- Artwork check badges */
.artcheck { grid-column: 1 / -1; display: flex; gap: 10px; align-items: flex-start; font-size: 13px; }
.artcheck ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; color: var(--muted); }
.artcheck li.problem { color: var(--ink); }
.ab { flex: none; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; padding: 2px 8px; border: 1px solid var(--strong); }
.ab.ready { border-color: #3c8a4a; color: #6fbf7d; } .ab.check { border-color: var(--hold); color: var(--hold); } .ab.problem { background: #c4442f; border-color: #c4442f; color: var(--natural); } .ab.info { color: var(--muted); }
.nat .ab.ready, .box .ab.ready { color: #3c8a4a; }
.files .artcheck li { display: block; border: 0; padding: 0; font-size: 13px; line-height: 1.45; }

/* ---------------------------------------------------------------- Production schedule */
.sched-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.sched-actions .bseg button { padding: 0 14px; min-height: 44px; font-size: 13px; }
.sched-scroll { overflow-x: auto; }
.sched-grid { border-collapse: collapse; width: 100%; min-width: 980px; table-layout: fixed; }
.sched-grid th, .sched-grid td { border: 1px solid var(--line); vertical-align: top; padding: 8px; text-align: left; }
.sched-grid thead th { display: table-cell; }
.sched-grid thead th > * { display: block; }
.sched-grid th:first-child { width: 120px; }
.sched-grid .lane { display: table-cell; } .sched-grid .lane > * { display: block; }
.sched-grid td { height: 120px; }
.sched-grid .off { background: repeating-linear-gradient(135deg, transparent 0 8px, rgba(255,255,255,.03) 8px 16px); }
.sched-grid .today { box-shadow: inset 0 2px 0 var(--natural); }
.sched-grid td.drop-ok { outline: 2px dashed var(--natural); outline-offset: -4px; }
.dayoff { margin-top: 4px; background: none; border: 0; padding: 0; color: var(--muted); font-family: var(--mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; text-decoration: underline; cursor: pointer; }
.meter { height: 4px; background: var(--line); } .meter i { display: block; height: 100%; background: var(--natural); }
.cap { font-size: 11px; color: var(--muted); margin: 4px 0 6px; }
.chip { display: grid; gap: 1px; padding: 6px 8px; margin-top: 6px; border: 1px solid var(--strong); background: var(--raised); color: var(--ink); text-decoration: none; font-size: 12px; line-height: 1.3; cursor: pointer; }
.chip span:nth-child(2) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip .spec { font-size: 11px; }
.chip.prio { border-left: 3px solid var(--active); }
.chip.hold { border-color: var(--hold); }
.chip.late { border-color: #c4442f; } .chip .lt { font-family: var(--mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: #ff8a73; }
.qrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.qrow select { min-height: 36px; background: var(--raised); color: var(--ink); border: 1px solid var(--strong); font: inherit; font-size: 13px; padding: 0 6px; max-width: 160px; }
#partner input[type=date] { min-height: 36px; background: var(--raised); color: var(--ink); border: 1px solid var(--strong); font: inherit; font-size: 13px; padding: 0 6px; color-scheme: dark; }
#cap .chips button { min-width: 52px; }
.sched-grid .lane .disp { font-size: 20px; overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .shop-head .wrap { flex-wrap: wrap; row-gap: 10px; }
  .shop-head .nav { width: 100%; justify-content: space-between; gap: 8px; }
  .shop-head .nav .lbl { font-size: 11px; }
  .shop-head #who { display: none; }
}

/* ---------- Printable work order + QC sheet (/shop/print) ---------- */
.print-bar { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.print-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.print-tools .bseg button { padding: 0 14px; }
#print-note { margin-bottom: 24px; }
#sheets { display: flex; flex-direction: column; align-items: center; gap: 32px; }
#sheets[data-what="both"] .sheet[data-kind="care"], #sheets[data-what="wo"] .sheet:not([data-kind="wo"]), #sheets[data-what="qc"] .sheet:not([data-kind="qc"]), #sheets[data-what="care"] .sheet:not([data-kind="care"]) { display: none; }
.sheet { --ink: #121212; --muted: #464643; --line: #b9b8b3;
  width: 8.5in; min-height: 11in; max-width: 100%; padding: .45in .5in .4in; background: #fff; color: var(--ink);
  border: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; font-size: 11.5px; line-height: 1.4; position: relative; }
.sheet a { color: var(--ink); }
.sheet .lbl { font-size: 9.5px; color: var(--muted); }
.sheet .lbl.ink, .sheet h3.lbl { color: var(--ink); }
.sheet .spec { font-size: 11px; }
.wo-head { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: end; padding-bottom: 12px; border-bottom: 2px solid var(--ink); }
.wo-head img { width: 58px; height: auto; }
.wo-head-t h2 { font-size: 46px; line-height: .9; margin-top: 4px; }
.ptag { display: inline-block; margin-top: 6px; margin-right: 6px; padding: 2px 6px; border: 1px solid var(--ink); font-family: var(--mono); font-size: 9.5px; letter-spacing: .06em; }
.ptag.hold { background: var(--ink); color: #fff; }
.wo-head-k { display: grid; grid-template-columns: repeat(2, auto); gap: 6px 22px; }
.wo-head-k dd { font-weight: 700; }
.pgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.pblock { display: flex; flex-direction: column; gap: 6px; break-inside: avoid; }
.pblock h3 { padding-bottom: 4px; border-bottom: 1px solid var(--ink); }
.pdl { display: grid; grid-template-columns: auto 1fr; gap: 3px 14px; }
.pdl dt { padding-top: 1px; }
.ptable { width: 100%; border-collapse: collapse; }
.ptable th, .ptable td { border: 1px solid var(--line); padding: 4px 6px; text-align: left; vertical-align: top; }
.ptable thead th { font-family: var(--mono); font-size: 9px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 400; }
.psub { display: block; font-size: 10px; color: var(--muted); }
.psub.warn { color: var(--ink); font-weight: 700; }
.psizes td, .psizes thead th { text-align: center; min-width: 40px; }
.psizes tbody th { width: 120px; }
.psizes tbody tr:last-child td, .psizes tbody tr:nth-child(2) td { height: 26px; }
.plog th { width: 26%; font-weight: 400; color: var(--muted); }
.plog td { height: 26px; }
.pqc td:nth-child(n+3):nth-child(-n+5) { text-align: center; width: 44px; vertical-align: middle; }
.pqc td:last-child { width: 64px; }
.psign td { height: 30px; width: 40%; }
.psign th { width: 20%; }
.pbx { display: inline-block; width: 12px; height: 12px; border: 1.5px solid var(--ink); vertical-align: middle; position: relative; flex: none; }
.pbx.on { background: var(--ink); }
.pk { font-family: var(--mono); font-size: 9px; margin: 0 8px 0 4px; }
.pchecks { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pchecks li { display: flex; align-items: center; gap: 8px; }
.pchecks li .pk + .pbx { margin-left: 0; }
.pfill { display: inline-block; min-width: 60px; border-bottom: 1px solid var(--ink); }
.pfiles { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.pfiles li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; overflow-wrap: anywhere; }
.pfiles .psub { grid-column: 1 / -1; }
.pnote { white-space: pre-wrap; min-height: 54px; padding: 6px 8px; border: 1px solid var(--line); }
.psmall { font-size: 10px; color: var(--muted); }
.pcount { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.pcount div { border: 1px solid var(--line); padding: 4px 6px; min-height: 48px; }
.pcount dd { font-size: 18px; font-weight: 700; padding-top: 4px; }
.plines { height: 84px; background: repeating-linear-gradient(to bottom, transparent 0 27px, var(--line) 27px 28px); }
.pdiag { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; }
.pd, .pmock { width: 170px; display: flex; flex-direction: column; gap: 4px; }
.pd svg { width: 100%; height: auto; border: 1px solid var(--line); }
.pmock img { width: 100%; border: 1px solid var(--line); }
.pd-g { fill: none; stroke: #121212; stroke-width: 2; }
.pd-l { fill: none; stroke: #464643; stroke-width: 1; }
.pd-area { fill: none; stroke: #b9b8b3; stroke-width: 1.5; stroke-dasharray: 5 4; }
.pd-art { fill: rgba(18,18,18,.08); stroke: #121212; stroke-width: 2; }
.pd-tag { fill: #121212; }
.pd-num { fill: #fff; font: 700 11px 'DejaVu Sans Mono', monospace; text-anchor: middle; }
.pf { margin-top: auto; display: flex; justify-content: space-between; gap: 12px; padding-top: 8px; border-top: 1px solid var(--ink); font-family: var(--mono); font-size: 8.5px; letter-spacing: .05em; color: var(--muted); }
@media (max-width: 720px) {
  .sheet { padding: 20px 16px; min-height: 0; font-size: 12px; }
  .pgrid { grid-template-columns: 1fr; }
  .wo-head { grid-template-columns: auto 1fr; }
  .wo-head-k { grid-column: 1 / -1; }
  .ptable { display: block; overflow-x: auto; }
  .pf { flex-direction: column; }
}
@page { size: letter portrait; margin: .4in .45in; }
@media print {
  html, body { background: #fff !important; }
  .site-head, .shop-head, .no-print, .skip, #loading, .toast { display: none !important; }
  .print-main { padding: 0 !important; margin: 0 !important; max-width: none !important; }
  #sheets { display: block; gap: 0; }
  .sheet { border: 0; width: auto; max-width: none; min-height: 10.15in; padding: 0; break-after: page; page-break-after: always; margin: 0; }
  .sheet.plast { break-after: auto; page-break-after: auto; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.dayprint { display: block; margin-top: 4px; color: var(--ink); font-family: var(--mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.sched-grid th .dayoff { display: block; }
#mockup-box { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.mock-thumbs { display: flex; gap: 8px; }
.mock-thumbs img { width: 120px; border: 1px solid var(--line); }
.carry { display: flex; flex-direction: column; gap: 12px; padding: 20px; border: 1px solid var(--strong); }
.carry .opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 720px) { .carry .opts { grid-template-columns: 1fr; } }
.repeat-box { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border: 1px solid var(--strong); }
.rep-diff td, .rep-diff th { padding: 6px 8px; }
.rep-sizes { display: grid; grid-template-columns: repeat(7, minmax(56px, 1fr)); gap: 8px; margin: 16px 0; }
@media (max-width: 720px) { .rep-sizes { grid-template-columns: repeat(4, 1fr); } }
#repeat-start { display: flex; flex-direction: column; gap: 12px; }
#repeat-start[hidden] { display: none; }
.head > .st, #carry-skip, #plan-repeat, .repeat-box .st, #o-status .st, #approvals .st { white-space: normal; height: auto; line-height: 1.4; padding-top: 6px; padding-bottom: 6px; }

/* ---------- Order messages (tracker + shop order page) ---------- */
.thread { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; max-height: 480px; overflow-y: auto; }
.thread li { max-width: 80%; padding: 10px 14px; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.thread li p { white-space: pre-wrap; overflow-wrap: anywhere; }
.thread li.mine { align-self: flex-end; border-color: var(--strong); }
.thread li.theirs { align-self: flex-start; background: var(--raised); }
.thread li.empty { max-width: none; border: 0; padding: 0; background: none; }
@media (max-width: 720px) { .thread li { max-width: 92%; } }
.card .unread { color: var(--carbon); background: var(--hold); padding: 0 4px; }

/* ---------- Made to Last care steps (tracker + care card) ---------- */
.care-steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.care-sheet { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 0; padding: 0; }
.care-card { padding: .35in; display: flex; flex-direction: column; gap: 8px; border: 1px dashed var(--line); font-size: 11px; }
.care-card h3 { font-size: 24px; line-height: .95; }
.care-card .care-steps { gap: 4px; padding-left: 18px; }
.care-foot { margin-top: auto; display: flex; justify-content: space-between; gap: 8px; padding-top: 6px; border-top: 1px solid var(--ink); font-family: var(--mono); font-size: 8.5px; letter-spacing: .05em; }
@media print { .care-sheet { min-height: 10.15in; } }
@media (max-width: 720px) { .care-sheet { grid-template-columns: 1fr; } }

/* ---------- Public pages: long-form text, FAQ, footer columns, draft notice ---------- */
.draft-note { display: flex; gap: 12px; align-items: baseline; padding: 10px 14px; border: 1px dashed var(--hold); color: var(--muted); font-size: 14px; margin-bottom: 24px; }
.doc { max-width: 760px; display: flex; flex-direction: column; gap: 14px; }
.doc h2 { font-family: var(--display); font-weight: 900; font-size: 26px; line-height: 1; padding-top: 24px; margin-top: 8px; border-top: 1px solid var(--line); }
.doc h3 { font-weight: 700; font-size: 17px; }
.doc ul, .doc ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.doc .updated { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; color: var(--muted); }
.page-head { padding-top: 64px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 12px; }
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; font-weight: 700; font-size: 18px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-family: var(--mono); color: var(--muted); }
.faq details[open] summary::after { content: '−'; }
.faq details > div { padding: 0 0 20px; max-width: 760px; display: flex; flex-direction: column; gap: 10px; color: var(--muted); }
.foot-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 24px; padding: 32px 0; }
.foot-cols nav { display: flex; flex-direction: column; gap: 8px; }
.foot-cols a { color: var(--muted); text-decoration: none; font-size: 15px; }
.foot-cols a:hover { color: var(--ink); }
.steps { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.steps > li { display: grid; grid-template-columns: 80px minmax(0, 1fr) minmax(0, 1.2fr); gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--line); }
@media (max-width: 720px) { .steps > li { grid-template-columns: 1fr; gap: 8px; } .page-head { padding-top: 40px; } }

/* ---------- Partner program ---------- */
/* Radio version of the .bseg toggle (labels + radios instead of buttons) */
.bseg label { flex: 1; min-height: 40px; display: flex; align-items: center; justify-content: center; border-right: 1px solid var(--strong); font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; position: relative; }
.bseg label:last-child { border-right: 0; }
.bseg label input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.bseg label:has(input:checked) { background: var(--natural); color: var(--carbon); }
.bseg label:has(input:focus-visible) { outline: 2px solid var(--active); outline-offset: 2px; }
.dir-card { text-decoration: none; color: var(--ink); }
.dir-card:hover { border-color: var(--strong); }
.share-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.share-row .spec { padding: 8px 12px; border: 1px solid var(--strong); word-break: break-all; }
.caption { padding: 12px 14px; border: 1px solid var(--line); white-space: pre-wrap; font-size: 15px; }

.prod-row { border: 1px solid var(--line); padding: 12px; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); gap: 10px; align-items: end; }
.prod-row[disabled] { opacity: .75; }
.prod-row .prod-price { grid-column: 1 / -1; }
@media (max-width: 720px) { .shop-head .nav { flex-wrap: wrap; justify-content: flex-start; column-gap: 14px; row-gap: 6px; } }

/* ---------- Meters (public/js/meters.js): level = amount toward a target, stepper = stages in order ---------- */
.level { display: flex; flex-direction: column; gap: 8px; }
.level-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.level-value { font-family: var(--display); font-weight: 900; font-size: 30px; line-height: 1; }
.level-sm .level-value { font-family: var(--mono); font-weight: 400; font-size: 13px; letter-spacing: .04em; }
.level-track { position: relative; height: 14px; background: var(--line); }
.level-sm .level-track { height: 6px; }
.level-fill { position: absolute; inset: 0 auto 0 0; background: var(--ink); transition: width .6s cubic-bezier(.2,.7,.2,1); }
.level-hold .level-fill { background: var(--hold); }
.level-mark { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--surface); }
.level-mark::after { content: ''; position: absolute; inset: 4px 0; background: var(--strong); }
.level-mark.reached::after { background: var(--surface); }
.level-mark-label { position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); white-space: nowrap; font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.level-mark.reached .level-mark-label { color: var(--ink); }
.level-mark.first .level-mark-label { left: 0; transform: none; }
.level-mark.last .level-mark-label { left: auto; right: 0; transform: none; }
.level.has-marks .level-track { margin-bottom: 22px; }
.level-caption { font-size: 14px; color: var(--muted); }

.stepper { display: flex; flex-direction: column; gap: 12px; }
.stepper-track { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; }
.stepper-track li { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.stepper-seg { display: block; height: 10px; background: var(--line); position: relative; overflow: hidden; }
.stepper-sm .stepper-seg { height: 5px; }
.stepper-track li.done .stepper-seg { background: var(--ink); }
.stepper-track li.now .stepper-seg { background: repeating-linear-gradient(135deg, var(--ink) 0 6px, transparent 6px 10px), var(--line); }
.stepper-track li.hold .stepper-seg { background: var(--hold); }
.stepper-label { font-family: var(--mono); font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); overflow-wrap: anywhere; }
.stepper-track li.done .stepper-label, .stepper-track li.now .stepper-label, .stepper-track li.hold .stepper-label { color: var(--ink); }
.stepper-status { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; }
.stepper-now { font-weight: 700; }
.stepper-lg .stepper-now { font-family: var(--display); font-weight: 900; font-size: 22px; text-transform: uppercase; line-height: 1; }
.stepper-next { font-size: 14px; color: var(--muted); }
@media (max-width: 720px) { .stepper-lg .stepper-label { display: none; } } /* phones: segments + one status line */
@media (prefers-reduced-motion: reduce) { .level-fill { transition: none; } }

/* ---------- Stockroom cards (public/js/stockroom.js). Photos are black garments, so they sit on a Natural panel. ---------- */
.sr-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; padding: 8px 12px; background: transparent; color: var(--ink); border: 1px solid var(--line); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.blank-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 40px 28px; }
.blank { display: flex; flex-direction: column; gap: 8px; }
.blank-photo { position: relative; aspect-ratio: 1; background: var(--natural); border: 1px solid var(--line); }
.blank-photo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.blank-photo .ctag { right: 8px; bottom: 8px; font-size: 9px; }
.blank-views { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 4px; }
.blank-views button { padding: 0; aspect-ratio: 1; min-width: 0; background: var(--natural); border: 1px solid var(--line); cursor: pointer; }
.blank-views button[aria-pressed="true"] { outline: 2px solid var(--ink); outline-offset: 1px; }
.blank-views img { width: 100%; height: 100%; object-fit: contain; display: block; }
.blank-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.sr-else { margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--line); max-width: 640px; display: flex; flex-direction: column; gap: 8px; }
/* Garment pictures on cards (home, storefront, quote form): photos on Natural, drawn colors on the raised panel. */
.pic-panel { position: relative; display: block; aspect-ratio: 1; background: var(--natural); border: 1px solid var(--line); }
.pic-panel:has(svg) { background: var(--raised); }
.pic-panel img, .pic-panel svg { width: 100%; height: 100%; object-fit: contain; display: block; }
.pic-panel .ctag { right: 8px; bottom: 8px; font-size: 9px; }
.sum-pic { max-width: 220px; margin-bottom: 4px; }
@media (max-width: 480px) { .btn { white-space: normal; text-align: center; line-height: 1.3; } } /* long button labels wrap on small phones */

/* ---------- Pop-up store page (store.js). --accent is the organization's color (ACCENTS in shared/stores.mjs). ---------- */
.shop-store { --accent: var(--natural); }
.store-head { display: flex; flex-direction: column; gap: 20px; padding-top: 40px; padding-bottom: 32px; border-top: 4px solid var(--accent); }
.store-brand { display: flex; align-items: center; gap: 24px; min-width: 0; }
.store-brand h1 { overflow-wrap: anywhere; }
.store-logo { flex: none; width: 104px; height: 104px; display: grid; place-items: center; background: var(--natural); padding: 10px; }
.store-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.store-progress { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 28px; padding: 20px; border: 1px solid var(--line); }
.store-progress .level-fill { background: var(--accent); }
.store-body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; padding-bottom: 40px; }
.store-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 24px; }
.store-item { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.store-pic { aspect-ratio: 1; background: var(--natural); display: grid; place-items: center; overflow: hidden; }
.store-pic img, .store-pic svg { width: 100%; height: 100%; object-fit: contain; }
.store-pic > .lbl { color: var(--rule); }
.store-price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.store-buy { display: grid; grid-template-columns: minmax(0, 1fr) 72px auto; gap: 8px; align-items: end; }
.store-add, .btn.store-pay { background: var(--accent); border-color: var(--accent); color: var(--carbon); font-weight: 700; }
.store-add:hover, .btn.store-pay:hover { color: var(--carbon); opacity: .9; }
.store-cart { position: sticky; top: 16px; gap: 14px; }
.store-note { padding-bottom: 48px; }
.store-bar { display: none; }
/* Edit mode: editor beside the live store */
.store-editing { border-bottom: 1px solid var(--line); background: var(--raised); }
.store-editing .wrap { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline; padding-top: 10px; padding-bottom: 10px; }
.store-layout.editing { display: grid; grid-template-columns: 360px minmax(0, 1fr); align-items: start; }
.store-editor { position: sticky; top: 0; max-height: 100vh; overflow-y: auto; gap: 18px; margin: 16px 0 16px var(--page); }
.store-editor textarea { min-height: 0; padding: 10px 12px; resize: vertical; }
.store-count { float: right; color: var(--rule); }
.store-flag { border: 1px solid var(--hold); padding: 8px 10px; color: var(--ink); }
.store-logo-edit { display: flex; gap: 14px; align-items: center; }
.store-logo-edit .store-logo { width: 84px; height: 84px; }
.store-swatches { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.store-swatches legend { margin-bottom: 8px; }
.store-swatches label { position: relative; cursor: pointer; }
.store-swatches input { position: absolute; opacity: 0; }
.store-swatches span { display: block; width: 36px; height: 36px; border: 2px solid var(--line); }
.store-swatches input:checked + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.store-swatches input:focus-visible + span { outline: 2px dashed var(--ink); outline-offset: 2px; }
.store-order { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.store-order li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 2px; }
.store-order input { font: inherit; font-size: 16px; min-height: 40px; padding: 0 10px; color: var(--ink); background: var(--raised); border: 1px solid var(--strong); border-radius: 0; min-width: 0; }
.store-order .btn { padding: 0 10px; min-height: 40px; text-decoration: none; }
@media (max-width: 1100px) {
  .store-body { grid-template-columns: 1fr; }
  .store-cart { position: static; max-width: 640px; }
  .store-layout.editing { grid-template-columns: 1fr; }
  .store-editor { position: static; max-height: none; margin: 16px var(--page); }
}
@media (max-width: 700px) {
  .store-brand { flex-direction: column; align-items: flex-start; gap: 16px; }
  .store-logo { width: 84px; height: 84px; }
  .store-bar { display: flex; position: sticky; bottom: 0; z-index: 5; justify-content: space-between; align-items: center; gap: 12px; padding: 14px var(--page); background: var(--accent); color: var(--carbon); font-family: var(--mono); font-size: 14px; font-weight: 700; text-decoration: none; }
  .store-bar[hidden] { display: none; }
  .store-bar .lbl { color: var(--carbon); }
}
/* Shop → Stores: the store's look and product mockups */
.st-look { display: inline-flex; align-items: center; gap: 6px; vertical-align: middle; }
.st-look img { width: 28px; height: 28px; object-fit: contain; background: var(--natural); padding: 2px; }
.st-look i { width: 14px; height: 14px; border: 1px solid var(--line); }
.st-edited { border: 1px solid var(--hold); padding: 8px 12px; align-items: center; }
.st-pics { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: 12px; }
.st-pic { display: grid; gap: 6px; }
.st-pic-img { aspect-ratio: 1; background: var(--natural); display: grid; place-items: center; padding: 8px; text-align: center; }
.st-pic-img img { width: 100%; height: 100%; object-fit: contain; }
.st-pic-img .sup { color: var(--rule); }
/* ---------- Open stores directory (store-cards.js) ---------- */
.dir-tools { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: end; justify-content: space-between; margin-bottom: 12px; }
.dir-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 20px; margin-top: 16px; }
.dir-card { display: flex; flex-direction: column; gap: 16px; padding: 20px; border: 1px solid var(--line); border-top: 4px solid var(--accent); text-decoration: none; color: var(--ink); min-width: 0; }
.dir-card:hover { border-color: var(--strong); border-top-color: var(--accent); color: var(--ink); }
.dir-card .level-fill { background: var(--accent); }
.dir-top { display: flex; gap: 14px; align-items: center; }
.dir-logo { flex: none; width: 56px; height: 56px; display: grid; place-items: center; background: var(--natural); padding: 6px; }
.dir-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.dir-logo b { font-family: var(--display); font-weight: 900; font-size: 26px; color: var(--carbon); }
.dir-top h3 { overflow-wrap: anywhere; }
.dir-about { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dir-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: auto; }
.dir-go { background: var(--accent); border-color: var(--accent); color: var(--carbon); font-weight: 700; padding: 0 16px; }
.dir-card:hover .dir-go { opacity: .9; }
/* Account: the organization's live store link */
.live-card { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px; border: 1px solid var(--active); }
.live-card.off { border-color: var(--line); }
.live-dot { display: inline-block; width: 8px; height: 8px; margin-right: 8px; background: var(--active); vertical-align: 1px; }
.live-url { font-family: var(--mono); font-size: clamp(15px, 2vw, 20px); word-break: break-all; color: var(--ink); }

/* ---------------------------------------------------------------- UX pass (phase 23)
   Public: sticky header that tucks away on scroll (js/ux.js), current-page marks, homepage paths, quote steps.
   Shop: compact header, status chips that filter the board, column jump on phones, Undo in toasts. */

/* Header: sticky, tucks away while scrolling down, returns on scroll up */
.site-head.sticky { position: sticky; top: 0; z-index: 40; background: var(--surface); transition: transform .25s ease; }
.site-head.sticky.tucked { transform: translateY(-100%); }
.site-head.sticky.scrolled .wrap { padding-top: 12px; padding-bottom: 12px; }
.site-head.sticky.scrolled .mark { width: 64px; }
.site-head .mark { transition: width .2s ease; }
body:has(.site-head.sticky:not(.tucked)) .summary { top: 120px; } /* quote summary clears the header when it's showing */
.mob-menu a[aria-current="page"], .foot-cols a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

/* Homepage: four ways in */
.paths { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.path { display: flex; flex-direction: column; gap: 12px; padding: 24px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); min-height: 240px; }
.path strong { font-family: var(--display); font-weight: 900; font-size: clamp(26px, 2.4vw, 32px); line-height: 1; }
.path .go { margin-top: auto; padding-top: 12px; }
.path:hover, .path:focus-visible { background: var(--raised); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.path:hover .go { text-decoration: underline; text-underline-offset: 6px; }

/* Quote: steps are links and show a mark when that part is done */
.progress a { text-decoration: none; display: block; padding-bottom: 4px; }
.progress a:hover { color: var(--ink); }
.progress li.done .lbl::after { content: " ✓"; color: var(--ink); }
.progress li.done { border-top-color: var(--strong); }
.progress li.on { border-top-color: var(--ink); }
.draft-note { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.draft-note .btn.t { min-height: 32px; padding: 0; }

/* Keyboard hints */
kbd { font-family: var(--mono); font-size: 12px; padding: 1px 6px; border: 1px solid var(--strong); color: var(--ink); }

/* Shop: compact header, so the work starts higher on the screen */
.shop-head .wrap { padding-top: 12px; padding-bottom: 12px; }
.shop-head .mark { width: 56px; }
.shop-main .toolbar .disp.l, .shop-main > .order-head .disp.l { font-size: clamp(32px, 3.2vw, 44px); }
.shop-head .nav a.lbl[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px; }

/* Shop board: status chips filter the board */
.counts .sfilter { appearance: none; background: none; border: 1px solid transparent; border-radius: 0; min-height: 36px; padding: 0 10px; margin-left: -10px; cursor: pointer; font: inherit; font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.counts .sfilter + .chip { margin-left: 0; }
.counts .sfilter:hover { border-color: var(--line); }
.counts .sfilter[aria-pressed="true"] { border-color: currentColor; background: var(--raised); }
.counts .btn.t { min-height: 36px; font-size: 12px; }
.board-scroll { scrollbar-color: var(--rule) transparent; }
.col-jump { display: none; }

/* Toast action (Undo) */
.toast { display: flex; align-items: center; gap: 16px; }
.toast-act { appearance: none; background: none; border: 0; border-left: 1px solid currentColor; padding: 0 0 0 16px; min-height: 28px; font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; text-decoration: underline; text-underline-offset: 4px; color: inherit; cursor: pointer; }

@media (max-width: 720px) {
  .site-head.sticky.scrolled .mark { width: 56px; }
  body:has(.site-head.sticky:not(.tucked)) .summary { top: 0; }
  .path { min-height: 0; }
  /* Shop header: logo row, then one swipeable line of pages */
  .shop-head .wrap { flex-wrap: wrap; gap: 4px; }
  .shop-head .nav { width: 100%; flex-wrap: nowrap; overflow-x: auto; gap: 20px; scrollbar-width: none; }
  .shop-head .nav a.lbl, .shop-head .nav .btn.t { min-height: 44px; display: inline-flex; align-items: center; white-space: nowrap; }
  /* Board: jump row, and columns snap with the page margin kept */
  .col-jump { display: flex; gap: 8px; overflow-x: auto; margin: 0 calc(var(--page) * -1); padding: 0 var(--page) 4px; scrollbar-width: none; }
  .col-jump button { appearance: none; flex: none; min-height: 36px; padding: 0 10px; background: none; border: 1px solid var(--line); border-radius: 0; color: var(--ink); font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
  .col-jump button span { color: var(--muted); }
  .board-scroll { scroll-padding-inline: var(--page); }
  .sched-scroll > table.t { min-width: 600px; }
  .toast { bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) { .site-head.sticky, .site-head .mark { transition: none; } }

/* ---------------------------------------------------------------- UI pass (phase 23b)
   Visual polish within the design system: Carbon/Natural lead, square edges, hairlines, no gradients or shadows,
   one filled button per view. Covers native controls, type finish, states, and a few shop details. */

/* Native controls match the theme (date pickers, scrollbars, dropdown lists) */
:root { color-scheme: dark; }
.nat, .sheet { color-scheme: light; }
html { scrollbar-color: var(--rule) var(--carbon); }
::selection { background: var(--natural); color: var(--carbon); }
.nat ::selection { background: var(--carbon); color: var(--natural); }

/* Type finish: headlines break evenly, paragraphs avoid one-word last lines, figures line up */
.disp, h1, h2, h3 { text-wrap: balance; }
.lead, .sup, p { text-wrap: pretty; }
body { font-variant-numeric: tabular-nums; }

/* One filled button per view: the header's Start a quote is quiet at the top of the page (the page's own
   button leads), fills in once you scroll, and hides on the quote page itself. */
.site-head:not(.shop-head):not(.scrolled) .nav > .btn.p { background: transparent; color: var(--ink); border-color: var(--strong); font-weight: 400; }
.site-head:not(.shop-head):not(.scrolled) .nav > .btn.p:hover { background: var(--raised); border-color: var(--ink); opacity: 1; }
.nav > .btn.p[aria-current="page"] { display: none; }

/* Buttons: clear hover and pressed states */
.btn { transition: background-color .12s, border-color .12s, color .12s, opacity .12s; }
/* Quiet buttons only; buttons with their own fill (store accent: .store-add, .store-pay, .dir-go) keep it */
.btn:not(.p):not(.t):not(.store-add):not(.store-pay):not(.dir-go):hover { background: var(--raised); }
.btn:active:not([disabled]) { opacity: .8; }
.btn.t:hover { text-decoration-thickness: 2px; }

/* Fields: hover and focus are visible; placeholders are quieter than typed text */
.fld input, .fld select, .fld textarea { transition: border-color .12s; }
.fld input:hover, .fld select:hover, .fld textarea:hover { border-color: var(--ink); }
.fld input:focus-visible, .fld select:focus-visible, .fld textarea:focus-visible { border-color: var(--ink); outline: 2px solid var(--ink); outline-offset: 0; }
::placeholder { color: var(--muted); opacity: .6; }
.fld input:disabled, .fld select:disabled, .fld textarea:disabled { opacity: .5; cursor: not-allowed; }
.sizes input::-webkit-outer-spin-button, .sizes input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sizes input { -moz-appearance: textfield; }

/* Radios and checkboxes: square, like everything else in the system */
input[type=radio], input[type=checkbox] { -webkit-appearance: none; appearance: none; flex: none; width: 16px; height: 16px; margin: 0; border: 1px solid var(--strong); border-radius: 0; background: transparent; cursor: pointer; display: inline-grid; place-content: center; vertical-align: -3px; }
input[type=radio]::before { content: ""; width: 8px; height: 8px; background: var(--ink); transform: scale(0); transition: transform .1s; }
input[type=checkbox]::before { content: ""; width: 9px; height: 5px; border-left: 2px solid var(--on-action); border-bottom: 2px solid var(--on-action); transform: translateY(-1px) rotate(-45deg) scale(0); transition: transform .1s; }
input[type=radio]:checked { border-color: var(--ink); }
input[type=radio]:checked::before { transform: scale(1); }
input[type=checkbox]:checked { background: var(--ink); border-color: var(--ink); }
input[type=checkbox]:checked::before { transform: translateY(-1px) rotate(-45deg) scale(1); }
input[type=radio]:focus-visible, input[type=checkbox]:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.opt input { margin-top: 5px; }
.check input { margin-top: 4px; }
.opt:hover { border-color: var(--strong); }

/* Clickable cards: a hairline that firms up on hover */
.blank-photo, .blank-views button { transition: border-color .12s; }
.blank:hover .blank-photo { border-color: var(--strong); }
.blank-views button:hover { border-color: var(--ink); }
.path { transition: background-color .12s; }
.path:hover, .path:focus-visible { box-shadow: none; outline: 1px solid var(--ink); outline-offset: -1px; }
.quick a, .lane { transition: border-color .12s; }

/* Tables: rows highlight while you scan */
table.t tbody tr { transition: background-color .1s; }
table.t tbody tr:hover { background: var(--raised); }

/* Footer: two columns on phones instead of one long list */
@media (max-width: 720px) {
  .foot-cols { grid-template-columns: 1fr 1fr; gap: 24px 16px; }
  .foot-cols nav:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .foot-cols a { font-size: 14px; padding: 4px 0; }
}

/* Shop: empty board columns read as places to drop a card */
.col .empty { border: 1px dashed var(--line); padding: 16px 12px; text-align: center; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.col.drop-ok .empty { border-color: var(--strong); color: var(--ink); }
.card { transition: border-color .12s, background-color .12s; }
.card:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .btn, .fld input, .fld select, .fld textarea, .card, .path, table.t tbody tr, input[type=radio]::before, input[type=checkbox]::before { transition: none; }
}
/* Quote on phones: the sticky bar is the one send button, so the in-page copies step aside */
@media (max-width: 720px) { #quote .qsec button[type=submit], .summary button[type=submit] { display: none; } }
/* Store color swatch (shop Stores): a wide bar with a hairline, so it never reads as a checkbox */
.st-look i { width: 22px; height: 10px; border: 1px solid var(--strong); }


/* ---------------------------------------------------------------- Buttons + navigation (phase 25)
   Forward arrow on the main action, /// while something is sending, crisp inverted hover on quiet buttons,
   task-first navigation, a full-screen phone menu, account state in the header, breadcrumbs. */

/* Forward arrow: on primary links and buttons marked .go (send, sign in, pay). Nudges on hover. */
a.btn.p::after, .btn.p.go::after { content: "→"; display: inline-block; font-weight: 400; transition: transform .15s ease; }
a.btn.p:hover::after, .btn.p.go:hover::after { transform: translateX(3px); }

/* Busy: the label steps back and the brand's triple slash draws itself while the request runs */
.btn[aria-busy="true"] { position: relative; color: transparent !important; pointer-events: none; opacity: 1; }
.btn[aria-busy="true"]::after { content: "///"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 3ch; overflow: hidden; white-space: nowrap; color: var(--ink); font-family: var(--mono); font-weight: 700; letter-spacing: .1em; animation: slashes 0.9s steps(3, jump-start) infinite; }
.btn.p[aria-busy="true"]::after { content: "///"; color: var(--on-action); } /* same weight as the arrow rule, so the loader wins */
@keyframes slashes { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 -10% 0 0); } }

/* Quiet buttons invert on hover, like a print pulling off the screen (Natural ↔ Carbon) */
.btn:not(.p):not(.t):not(.store-add):not(.store-pay):not(.dir-go):not(.menu-btn):hover { background: var(--ink); color: var(--surface); border-color: var(--ink); }

/* Phones: a form's main button runs full width, within thumb reach */
@media (max-width: 720px) { form .btn.p { width: 100%; } }

/* Header: task-first links, a thin divider, then the account and the one main action */
.nav-sep { width: 1px; height: 20px; background: var(--line); }
.nav-acct { white-space: nowrap; }
.nav a.lbl { padding: 12px 0; text-underline-offset: 8px; }
.nav a.lbl:hover { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; }
.nav a.lbl[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; }

/* Phone menu: a full-screen sheet with big display links, small links, and the main action at thumb reach */
@media (max-width: 720px) {
  .mob-menu[data-open="true"] { position: fixed; inset: 0; top: var(--menu-top, 0px); z-index: 45; display: flex; flex-direction: column; gap: 0; padding: 8px var(--page) calc(20px + env(safe-area-inset-bottom)); background: var(--surface); border-bottom: 0; overflow-y: auto; }
  html.menu-open { overflow: hidden; }
  .mm-main { display: flex; flex-direction: column; }
  .mob-menu .mm-main a { display: flex; flex-direction: column; gap: 2px; padding: 14px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
  .mm-main b { font-family: var(--display); font-weight: 900; font-size: 38px; line-height: .95; }
  .mm-main a[aria-current="page"] b { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; }
  .mm-sub { display: flex; flex-wrap: wrap; gap: 4px 24px; padding: 20px 0; }
  .mob-menu .mm-sub a, .mm-sub button { border: 0; padding: 10px 0; background: none; cursor: pointer; text-decoration: underline; text-underline-offset: 5px; }
  .mm-cta { margin-top: auto; }
  .site-head.sticky.tucked:has(.mob-menu[data-open="true"]) { transform: none; }
}

/* Breadcrumb on inner pages: "Goods / Stockroom / 001" */
.crumb a { color: var(--muted); text-underline-offset: 4px; }
.crumb a:hover { color: var(--ink); }


@media (prefers-reduced-motion: reduce) {
  a.btn.p::after, .btn.p.go::after { transition: none; }
  .btn[aria-busy="true"]::after { animation: none; clip-path: none; }
}
/* While the phone menu is open: its own Start a quote link takes over */
html.menu-open .site-head .nav > .btn.p { display: none; }

/* Account page (phase 25): section jump bar, "Needs you", questions box */
.acct-nav { position: sticky; top: 0; z-index: 30; display: flex; gap: 24px; overflow-x: auto; scrollbar-width: none; margin: -24px calc(var(--page) * -1) 0; padding: 12px var(--page); background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.acct-nav:empty { display: none; }
.acct-nav a { flex: none; text-decoration: none; color: var(--muted); padding: 6px 0; }
.acct-nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 6px; }
body:has(.site-head.sticky:not(.tucked)) .acct-nav { top: var(--head-h, 0px); }
#a-app section[id], #a-app [id="refer"] { scroll-margin-top: 140px; }
.needs { display: flex; flex-direction: column; gap: 16px; padding: 24px; border: 1px solid var(--hold); }
.needs-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.needs-list li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; padding: 14px 0; border-top: 1px solid var(--line); }
.needs-list li:first-child { border-top: 0; padding-top: 0; }
.needs-list .what { color: var(--muted); font-size: 14px; }
.ord .stack > .st.h { align-self: flex-start; }
.ask-box { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px 32px; padding: 24px; border: 1px solid var(--line); }
.ask-box .stack { max-width: 36em; }
.ask-acts { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
#a-signin .ask-box { align-items: center; padding: 16px 20px; }
@media (max-width: 720px) {
  .acct-nav { margin-top: -16px; gap: 20px; }
  .needs, .ask-box { padding: 20px 16px; }
  .needs-list li .btn, .ask-acts .btn:not(.t) { width: 100%; }
}

/* Shop (phase 25): new-message count on the Board link, and the "waiting on your reply" banner on an order */
.nav-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; margin-left: 4px; background: var(--active); color: var(--carbon); font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0; text-decoration: none; vertical-align: 1px; }
.reply-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-top: 20px; padding: 14px 16px; border: 1px solid var(--active); color: var(--ink); text-decoration: none; }
.reply-banner:hover { background: var(--raised); color: var(--ink); }
.reply-banner .reply-snip { flex: 1 1 280px; min-width: 0; font-size: 15px; }
.reply-banner .lbl { margin-left: auto; }

/* ---- Order size: small run (1–12, DTG) vs bulk (13+) ---- */
.sizes { grid-template-columns: repeat(9, minmax(0, 1fr)); }
@media (max-width: 700px) { .sizes { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.sizes .fld[hidden] { display: none; }
.opt.off { opacity: .45; cursor: not-allowed; }
.opt.off:hover { border-color: var(--line); }
.run-opts .opt strong { font-size: 26px; }
.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.tiers > * { padding: 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.tiers strong { font-family: var(--display); font-weight: 900; font-size: 26px; line-height: 1; }
.tiers .bulk { background: var(--raised); }
/* Design lab: the quick-form link stays visible on phones (the title itself hides there). */
.lab-title #quick-form { display: inline-block; margin-top: 6px; }
@media (max-width: 900px) { .lab-title { display: block; order: 4; } .lab-title .lbl, .lab-title h1 { display: none; } .lab-title #quick-form { margin: 0; } }
