/* MotoLoop Monochrome. Tokens mirror the design system's tokens.json.
   --brand / --on-brand are set per dealer in base.html. */
:root {
  --ink: #000000;
  --ink-2: #4a4a4a;
  --muted: #6b6b6b;
  --paper: #ffffff;
  --canvas: #f4f4f4;
  --line: #e2e2e2;
  --line-strong: #cfcfcf;
  --stage: #000000;
  --stage-raised: #1c1c1c;
  --on-stage: #ffffff;
  --on-stage-muted: #a3a3a3;
  --track-stage: #3a3a3a;
  --brand: #000000;
  --on-brand: #ffffff;

  --font-display: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --font-body: Inter, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, Menlo, Consolas, monospace;

  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 40px; --space-7: 56px;
  --gutter: max(20px, env(safe-area-inset-left, 0px));
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 15px/22px var(--font-body); }
body.app { background: var(--canvas); }
a { color: var(--ink); }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.on-stage :focus-visible, .stage :focus-visible, .topbar :focus-visible { outline-color: var(--on-stage); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; margin: 0; text-wrap: balance; }
.display-xl { font-size: clamp(40px, 6vw, 64px); line-height: 1; letter-spacing: -.035em; }
.display-l { font-size: clamp(34px, 5vw, 48px); line-height: 1; letter-spacing: -.035em; }
.heading { font-size: clamp(24px, 3vw, 30px); line-height: 1.13; letter-spacing: -.025em; }
.title { font-size: 22px; line-height: 26px; letter-spacing: -.02em; font-family: var(--font-display); font-weight: 500; }
.label { font: 600 11px/14px var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.stage .label { color: var(--on-stage-muted); }
.small { font-size: 13px; line-height: 19px; }
.muted { color: var(--muted); }
.ink-2 { color: var(--ink-2); }
.mono { font-family: var(--font-mono); }
.nums { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { max-width: 1280px; margin: 0 auto; padding-left: max(var(--space-6), env(safe-area-inset-left, 0px)); padding-right: max(var(--space-6), env(safe-area-inset-right, 0px)); }
.container.wide { max-width: 1360px; }
.container.narrow { max-width: 640px; }
@media (max-width: 700px) {
  .container { padding-left: var(--gutter); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
}
.stack { display: flex; flex-direction: column; gap: var(--space-5); }
.row { display: flex; gap: var(--space-3); align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.cols { display: flex; flex-wrap: wrap; gap: var(--space-7); align-items: flex-start; }
.cols > .main { flex: 999 1 560px; min-width: 0; }
.cols > .side { flex: 1 1 320px; min-width: 0; }

/* --- Buttons ------------------------------------------------------------ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: 48px; padding: 0 24px; border: 1px solid var(--ink); border-radius: 0; background: var(--paper); color: var(--ink); font: 700 12px/16px var(--font-body); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--canvas); }
.btn.solid { background: var(--ink); color: var(--paper); }
.btn.solid:hover { background: #262626; }
.btn.brand { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn.brand:hover { filter: brightness(.94); }
.btn.inverse { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: 11px; }
.btn.block { width: 100%; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }

/* --- Forms ---------------------------------------------------------------- */
label.field-label, .field > label { display: block; font-size: 14px; font-weight: 600; margin-bottom: var(--space-2); }
.field { margin-bottom: var(--space-4); }
input, select, textarea { width: 100%; font: 400 15px/22px var(--font-body); color: var(--ink); background: var(--paper); border: 1px solid var(--line-strong); border-radius: 0; padding: 11px 13px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--ink); outline-offset: -2px; border-color: var(--ink); }
textarea { min-height: 84px; resize: vertical; }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; accent-color: var(--ink); margin: 0; flex: none; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 400; cursor: pointer; }
.input-big { font-size: 18px; padding: 15px 16px; border-color: var(--ink); }
.affix { display: flex; border: 1px solid var(--ink); }
.affix input { border: 0; flex: 1; min-width: 0; font-weight: 500; font-size: 16px; padding: 14px; }
.affix .sfx { background: var(--canvas); padding: 14px; color: var(--ink-2); border-left: 1px solid var(--ink); white-space: nowrap; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0 var(--space-3); }
.code-input { font: 500 32px/1 var(--font-display); letter-spacing: .4em; text-align: center; padding: 16px; border-color: var(--ink); }

/* --- Flash ---------------------------------------------------------------- */
.flash { padding: 14px 16px; margin: 0 0 var(--space-4); font-size: 14px; border: 1px solid var(--ink); background: var(--paper); display: flex; gap: 10px; align-items: flex-start; }
.flash.error { background: var(--ink); color: var(--paper); }
.flashes { padding-top: var(--space-5); }

/* --- Section heads & rows ------------------------------------------------- */
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-3); }
.rule-label { padding-bottom: 10px; border-bottom: 1px solid var(--ink); }
.rows { border-top: 1px solid var(--ink); }
.rows > * { border-bottom: 1px solid var(--line); }
.dl { display: grid; grid-template-columns: 120px 1fr; margin: 0; font-size: 14px; }
.dl dt, .dl dd { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--line); }
.dl dt { color: var(--muted); }
.timeline { display: grid; grid-template-columns: 96px 1fr; column-gap: var(--space-5); border-top: 1px solid var(--ink); }
.timeline > div { padding: 15px 0; border-bottom: 1px solid var(--line); }
@media (max-width: 560px) { .timeline { grid-template-columns: 1fr; } .timeline > .when { border-bottom: 0; padding-bottom: 0; } }
/* Customer updates: one line each, date then what happened */
.timeline.compact { grid-template-columns: max-content 1fr; column-gap: 0; align-items: stretch; }
.timeline.compact > div { padding: 8px 0; font-size: 15px; line-height: 21px; }
/* Both cells stretch to the row, so the divider lines meet even when the text wraps */
.timeline.compact > .when { font-size: 13px; line-height: 21px; white-space: nowrap; padding-right: 14px; }
@media (max-width: 560px) { .timeline.compact > .when { border-bottom: 1px solid var(--line); padding-bottom: 8px; } }

/* --- Customer header ------------------------------------------------------ */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); }
.site-header .container { display: flex; align-items: center; gap: var(--space-6); min-height: 76px; flex-wrap: wrap; padding-block: 12px; }
/* Customer pages: the shop's logo (or name) sits in the middle, account links on the right */
.site-header.centered .container { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; }
.site-header.centered .brandmark { grid-column: 2; justify-self: center; }
.site-header.centered .site-nav { grid-column: 3; justify-self: end; margin-left: 0; gap: 14px; flex-wrap: nowrap; }
@media (max-width: 640px) {
  .site-header.centered .container { grid-template-columns: 1fr; row-gap: 8px; min-height: 0; padding-block: 12px; }
  .site-header.centered .brandmark, .site-header.centered .site-nav { grid-column: 1; justify-self: center; }
  .site-header.centered .site-nav { gap: 18px; font-size: 11px; }
  .site-header.centered .site-nav a.on { border-bottom-width: 1px; padding-bottom: 2px; }
  .site-header.centered .site-nav .btn { border: 0; background: none; padding: 0; min-height: 0; color: var(--muted); font: inherit; letter-spacing: inherit; }
}
.brandmark { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; }
.brandmark img { height: 40px; width: auto; max-width: 220px; object-fit: contain; }
.brandmark .word { font: 700 17px/1.05 var(--font-display); text-transform: uppercase; letter-spacing: .02em; }
.site-nav { margin-left: auto; display: flex; gap: var(--space-5); align-items: center; flex-wrap: wrap; font: 600 12px/16px var(--font-body); letter-spacing: .12em; text-transform: uppercase; }
.site-nav a, .site-nav .linkbtn { text-decoration: none; color: var(--muted); }
.site-nav a.on { color: var(--ink); border-bottom: 2px solid var(--ink); padding-bottom: 4px; }
.site-footer { border-top: 1px solid var(--line); margin-top: var(--space-7); }
.site-footer .container { display: flex; justify-content: space-between; gap: var(--space-2); flex-wrap: wrap; padding-block: 20px; font-size: 12px; color: var(--muted); }
.site-footer strong { color: var(--ink); font-weight: 600; }

/* --- Stage (hero band) ---------------------------------------------------- */
.stage { background: var(--stage); color: var(--on-stage); }
.stage .container { padding-block: var(--space-7); }
.hero-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: var(--space-6) var(--space-7); align-items: center; }
.hero-facts { display: flex; gap: var(--space-6); flex-wrap: wrap; border-top: 1px solid #333333; padding-top: 22px; margin-top: 28px; }
.hero-facts .v { font: 500 26px/1.15 var(--font-display); letter-spacing: -.02em; margin-top: 8px; display: flex; align-items: center; gap: 10px; }
.mark { width: 10px; height: 10px; background: var(--brand); flex: none; display: inline-block; }
.mark.sm { width: 8px; height: 8px; }
.photo { aspect-ratio: 4 / 3; max-width: 100%; background: var(--stage-raised); display: flex; align-items: flex-end; justify-content: space-between; padding: 18px; position: relative; overflow: hidden; }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo .label { position: relative; color: #8f8f8f; }

/* --- Step track ----------------------------------------------------------- */
.track { display: grid; grid-template-columns: repeat(var(--n, 7), minmax(0, 1fr)); gap: 6px; }
.track .bar { height: 4px; background: var(--line); }
.track .done .bar { background: var(--ink); }
.track .cur .bar { background: var(--brand); }
.track .name { font-size: 14px; line-height: 1.3; margin-top: 12px; font-weight: 500; }
.track .cur .name { font-weight: 700; }
.track .todo .name { color: var(--muted); }
.track .date { font-size: 12px; color: var(--muted); margin-top: 3px; }
.segs { display: flex; gap: 3px; }
.segs span { flex: 1; height: 4px; background: var(--line); }
.segs .d { background: var(--ink); }
.segs .c { background: var(--brand); }
.stage .segs span { background: var(--track-stage); }
.stage .segs .d { background: var(--on-stage); }
.stage .segs .c { background: var(--brand); }
/* The current step's segment throbs so the tracker feels live */
.segs .c { animation: throb 1.8s ease-in-out infinite; }
@keyframes throb { 0%, 100% { opacity: 1; box-shadow: 0 0 6px 0 var(--brand); } 50% { opacity: .45; box-shadow: 0 0 0 0 transparent; } }
@media (max-width: 760px) { .track.labelled { display: none; } }

/* --- Step list ------------------------------------------------------------ */
.steplist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.steplist li { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); padding: 13px 0; border-bottom: 1px solid var(--line); }
.steplist .nm { display: flex; gap: 12px; align-items: center; min-width: 0; }
.steplist .cur { background: var(--stage); color: var(--on-stage); font-weight: 600; padding: 13px 14px; margin: 0 -14px; border-bottom: 0; }
.steplist .todo { color: var(--muted); }
.steplist .box { width: 14px; height: 14px; border: 1.5px solid var(--line-strong); margin: 0 1px; flex: none; }
.steplist .ic { width: 16px; height: 16px; display: grid; place-items: center; flex: none; }
.steplist.desktop-hide { display: none; }
@media (max-width: 760px) { .steplist.desktop-hide { display: block; } }

/* --- Notice --------------------------------------------------------------- */
.notice { background: var(--canvas); }
.notice .container { display: flex; gap: 14px; align-items: flex-start; padding-block: 18px; }
.notice svg { flex: none; margin-top: 1px; }

/* --- Extra-work approval ------------------------------------------------- */
.approval { border-bottom: 1px solid var(--ink); border-top: 4px solid var(--ink); background: var(--paper); }
.approval .container { padding-block: var(--space-6); }
.approval .label { color: var(--ink); }
.appr-grid { display: grid; grid-template-columns: 1fr auto; gap: var(--space-5); align-items: end; }
.appr-act { display: grid; gap: 12px; justify-items: end; }
.appr-act .price { font: 500 34px/1 var(--font-display); letter-spacing: -.03em; }
.appr-btns { display: flex; gap: 8px; }
.appr-btns .btn { min-width: 132px; }
@media (max-width: 640px) {
  .appr-grid { grid-template-columns: 1fr; }
  .appr-act { justify-items: stretch; }
  .appr-btns .btn { flex: 1; min-width: 0; }
}
.appr-row { padding: 12px 0; border-bottom: 1px solid var(--line); }

/* --- Order cards (customer list) ------------------------------------------ */
.ocard { display: block; text-decoration: none; color: inherit; border: 1px solid var(--line); background: var(--paper); padding: var(--space-5); }
.ocard:hover { border-color: var(--ink); }

/* --- Shop app ------------------------------------------------------------- */
.topbar { background: var(--stage); color: var(--on-stage); }
.topbar .container { display: flex; align-items: center; gap: var(--space-5); min-height: 64px; flex-wrap: wrap; padding-block: 10px; }
.topbar .brandmark { color: var(--on-stage); }
.topbar .brandmark .chip { background: var(--paper); padding: 4px 8px; display: flex; align-items: center; }
.topbar .brandmark img { height: 28px; }
.topbar .brandmark .word { font-size: 14px; }
.appnav { display: flex; gap: var(--space-5); flex-wrap: wrap; font: 600 12px/16px var(--font-body); letter-spacing: .12em; text-transform: uppercase; }
.appnav a { color: var(--on-stage-muted); text-decoration: none; padding: 6px 0 4px; border-bottom: 2px solid transparent; }
.appnav a:hover { color: var(--on-stage); }
.appnav a.on { color: var(--on-stage); border-bottom-color: var(--brand); }
.topbar .who { margin-left: auto; display: flex; gap: var(--space-4); align-items: center; font-size: 13px; color: var(--on-stage-muted); }
.rolebar { background: var(--paper); border-bottom: 1px solid var(--line); }
.rolebar .container { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 6px; flex-wrap: wrap; }
.rolebar .seg button { padding: 7px 12px; font-size: 10px; }
.rolebar.previewing { background: var(--ink); color: var(--paper); border-bottom-color: var(--ink); }
.rolebar.previewing .seg { border-color: var(--paper); }
.flag-row { padding: 12px 0; border-bottom: 1px solid var(--line); }
.flag-row form .grid-2 { margin-top: 8px; }
.readonly-days { font-size: 13px; color: var(--ink-2); min-width: 40px; text-align: right; }
.devbar { background: #1c1c1c; color: var(--on-stage-muted); font-size: 12px; }
.devbar .container { padding-block: 7px; }
.devbar a { color: var(--on-stage); }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--space-4); flex-wrap: wrap; padding: var(--space-6) 0 var(--space-5); }
.page { padding-bottom: var(--space-7); }
.panel { background: var(--paper); padding: var(--space-5); }
.panel + .panel { margin-top: var(--space-3); }

.stats { display: grid; grid-template-columns: repeat(4, auto); border: 1px solid var(--ink); background: var(--paper); }
.stats > div { padding: 12px 22px; border-right: 1px solid var(--ink); }
.stats > div:last-child { border-right: 0; }
.stats b { display: block; font: 500 30px/1 var(--font-display); }
.stats .label { margin-top: 4px; display: block; }
.stats .hot { background: var(--ink); color: var(--paper); }
.stats .hot .label { color: #c9c9c9; }
@media (max-width: 600px) { .stats { grid-template-columns: repeat(2, 1fr); width: 100%; } .stats > div:nth-child(2) { border-right: 0; } .stats > div:nth-child(-n+2) { border-bottom: 1px solid var(--ink); } }

.seg { display: inline-flex; border: 1px solid var(--ink); background: var(--paper); }
.seg a, .seg button { padding: 10px 16px; font: 700 11px/16px var(--font-body); letter-spacing: .12em; text-transform: uppercase; text-decoration: none; color: var(--ink); background: var(--paper); border: 0; cursor: pointer; }
.seg a + a, .seg button + button { border-left: 1px solid var(--ink); }
.seg .on { background: var(--ink); color: var(--paper); }
.filters { display: flex; gap: var(--space-2); flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.filters input, .filters select { width: auto; flex: 0 1 300px; min-width: 0; }

.jobs { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--space-3); }
.job { display: block; text-decoration: none; color: inherit; background: var(--paper); border: 1px solid var(--line); padding: 18px; }
.job:hover { border-color: var(--ink-2); }
.job.overdue { border-color: var(--ink); }
.job .top { display: flex; justify-content: space-between; gap: var(--space-2); align-items: flex-start; }
.job .nm { font: 600 19px/1.2 var(--font-display); letter-spacing: -.015em; }
.job .step { display: flex; align-items: center; gap: 8px; margin: 16px 0 10px; font-weight: 600; }
.job .foot { display: flex; justify-content: space-between; gap: var(--space-2); margin-top: 12px; font-size: 12px; color: var(--muted); }
.job.overdue .eta { color: var(--ink); font-weight: 700; }
.tags { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.tag { font: 700 10px/1 var(--font-body); letter-spacing: .12em; text-transform: uppercase; padding: 5px 7px; border: 1px solid var(--ink); white-space: nowrap; background: var(--paper); color: var(--ink); }
.tag.solid { background: var(--ink); color: var(--paper); }
.tag.quiet { border-color: var(--line-strong); color: var(--muted); }

.checklist { display: grid; gap: 6px; }
.checklist .ck { display: flex; gap: 6px; align-items: stretch; }
.checklist .ck > label:first-child { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 13px 14px; border: 1px solid var(--line); cursor: pointer; background: var(--paper); }
.checklist .ck > label:first-child:has(input:checked) { border-color: var(--ink); background: var(--canvas); }
.sticky-save { position: sticky; bottom: 0; background: var(--canvas); padding: var(--space-4) 0 max(var(--space-4), env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); }

.shopsteps { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.shopsteps > li { display: flex; align-items: center; gap: var(--space-3); padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.shopsteps .tick { width: 44px; height: 44px; border: 1.5px solid var(--line-strong); background: var(--paper); display: grid; place-items: center; cursor: pointer; color: transparent; flex: none; }
.shopsteps .tick:hover { border-color: var(--ink); color: var(--muted); }
.shopsteps .done .tick, .shopsteps li.done .tick { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.shopsteps li.cur { background: var(--canvas); margin: 0 calc(-1 * var(--space-5)); padding-left: var(--space-5); padding-right: var(--space-5); }
.shopsteps li.cur .tick { border-color: var(--ink); }
.shopsteps li.cur .tick::after { content: ""; width: 10px; height: 10px; background: var(--brand); }
.shopsteps li.cur .tick:hover::after { display: none; }
.shopsteps .sn { flex: 1; min-width: 160px; }
.shopsteps li.done .sn > span:first-child { color: var(--muted); text-decoration: line-through; }
.shopsteps details { flex-basis: 100%; }
.shopsteps details:not([open]) { flex-basis: auto; }
summary { cursor: pointer; }
.eta-panel { background: var(--stage); color: var(--on-stage); padding: var(--space-5); }
.eta-panel .big { font: 500 30px/1.05 var(--font-display); letter-spacing: -.025em; margin: 8px 0 6px; }
.eta-panel .small { color: var(--on-stage-muted); }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 14px; }
th { font: 600 11px/14px var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); border-bottom-color: var(--ink); }
.scroll-x { overflow-x: auto; }

/* --- Setup / brand -------------------------------------------------------- */
.stepper { list-style: none; margin: 0 0 0 auto; padding: 0; display: flex; gap: 20px; flex-wrap: wrap; font: 600 11px/14px var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--on-stage-muted); }
.stepper .on { color: var(--on-stage); border-bottom: 2px solid var(--on-stage); padding-bottom: 4px; }
.swatches { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.swatch { position: relative; }
.swatch input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; margin: 0; }
.swatch span { display: block; width: 44px; height: 44px; border: 1px solid var(--line-strong); outline: 2px solid transparent; outline-offset: 2px; }
.swatch input:checked + span { outline-color: var(--ink); }
.swatch input:focus-visible + span { outline: 2px dashed var(--ink); }
.found { border-top: 1px solid var(--ink); margin-top: var(--space-5); }
.found > div { display: grid; grid-template-columns: 140px 1fr; gap: var(--space-4); padding: 16px 0; border-bottom: 1px solid var(--line); align-items: center; }
@media (max-width: 560px) { .found > div { grid-template-columns: 1fr; gap: var(--space-2); } }
.logo-tile { border: 1px solid var(--line); padding: 8px 12px; background: var(--paper); display: inline-flex; align-items: center; }
.logo-tile img { height: 36px; width: auto; max-width: 200px; object-fit: contain; }
.dropzone { border: 1.5px dashed #9a9a9a; padding: var(--space-5); text-align: center; color: var(--ink-2); }
.phone-preview { width: 320px; max-width: 100%; border: 8px solid var(--ink); border-radius: 36px; overflow: hidden; background: var(--paper); }
.phone-preview .url { background: #ececec; padding: 8px 12px; font-size: 11px; color: #3d3d3d; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- Root marketing ------------------------------------------------------- */
.root-hero .container { padding-block: clamp(56px, 10vw, 120px); }
.feature-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0; border-top: 1px solid var(--ink); }
.feature-row > div { padding: var(--space-5) var(--space-5) var(--space-6) 0; border-bottom: 1px solid var(--line); }
.feature-row > div + div { padding-left: var(--space-5); border-left: 1px solid var(--line); }
@media (max-width: 620px) { .feature-row > div + div { padding-left: 0; border-left: 0; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* A paper card placed inside the stage band (landing page sample) */
.stage .on-paper .label { color: var(--muted); }
.stage .on-paper .segs span { background: var(--line); }
.stage .on-paper .segs .d { background: var(--ink); }

/* Photos */
.cam { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 48px; min-height: 44px; padding: 0 10px; border: 1px solid var(--line); background: var(--paper); color: var(--ink-2); cursor: pointer; font: 700 12px var(--font-body); }
.cam:hover, .cam:focus-within { border-color: var(--ink); color: var(--ink); }
.cam.has { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.cam-form { margin: 0; }
.shopsteps .cam { min-height: 44px; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: var(--space-3); }
.thumbs figure { margin: 0; display: grid; gap: 6px; }
.thumbs img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: var(--canvas); }
.thumbs figcaption { display: grid; gap: 2px; font-size: 13px; line-height: 1.4; }
.thumbs.mini { grid-template-columns: repeat(auto-fill, 64px); gap: 6px; }
/* Job videos */
.videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--space-4); }
.videos figure { margin: 0; display: grid; gap: 8px; align-content: start; }
.videos video { width: 100%; aspect-ratio: 16 / 9; background: var(--stage); display: block; object-fit: contain; }
.appr-vids { display: grid; gap: 8px; margin: 8px 0 10px; max-width: 360px; }
.appr-vids video { width: 100%; aspect-ratio: 16 / 9; background: var(--stage); display: block; object-fit: contain; }
.videos figcaption { display: grid; gap: 2px; font-size: 14px; line-height: 1.4; }
.videos figcaption .title { font-weight: 600; }
.videos figcaption form { margin: 4px 0 0; }
.vid-status { grid-column: 1 / -1; display: grid; gap: 6px; }
.vid-status[hidden] { display: none; }
.vid-bar { height: 4px; background: var(--line); }
.vid-bar span { display: block; height: 100%; width: 0; background: var(--brand); transition: width .2s; }
.vid-status.error .vid-msg { background: var(--ink); color: var(--paper); padding: 10px 12px; font-weight: 600; }
.vid-status.error .vid-bar { display: none; }
.thumbs.mini img { width: 64px; }
.shopsteps .tags { order: 2; }
.shopsteps .cam-form { order: 3; }
.shopsteps details { order: 4; }
.photo .label { text-shadow: 0 1px 3px rgba(0,0,0,.6); }
a.photo { text-decoration: none; }

/* Step durations */
.step-days { border-top: 1px solid var(--ink); }
.sd-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 76px auto; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.sd-row label { font-size: 14px; font-weight: 500; margin: 0; }
.sd-row input { padding: 6px 8px; text-align: right; }
.sd-row.changed input, .days-form input.changed { border-color: var(--ink); font-weight: 700; }
.days-form { display: flex; align-items: center; gap: 4px; order: 3; margin: 0; }
.days-form input { width: 62px; padding: 6px 6px; text-align: right; font-size: 14px; }
.days-form input:disabled { background: transparent; border-color: transparent; color: var(--muted); }
.shopsteps .cam-form { order: 4; }
.shopsteps details { order: 5; }
/* All jobs */
.jobs-table td { vertical-align: top; padding-top: 14px; padding-bottom: 14px; }
.jobs-table tr.is-archived td { color: var(--muted); }
.jobs-table tr.is-archived a { color: var(--ink-2); }
.jobs-table .segs { max-width: 200px; }

/* --- Shop TV (read-only board for a shop-floor TV). Sized off the viewport so it reads from across the room. */
body.tv { background: var(--stage); color: var(--on-stage); min-height: 100vh; overflow: hidden; font-size: clamp(14px, 1.05vw, 22px); line-height: 1.35; }
body.tv .label { color: var(--on-stage-muted); font-size: max(11px, .62em); }
.tv-head { display: flex; justify-content: space-between; align-items: center; gap: 2vw; padding: 1.6vh 2vw; border-bottom: 1px solid var(--track-stage); }
.tv-shop { display: flex; align-items: center; gap: 1.2vw; }
.tv-shop .chip { display: inline-flex; background: var(--paper); padding: .35em .6em; }
.tv-shop img { height: 2.2em; width: auto; display: block; }
.tv-shopname { font: 600 1.6em/1 var(--font-display); letter-spacing: -.02em; }
.tv-meta { display: flex; align-items: center; gap: 1.6vw; }
#tv-clock { font: 500 1.6em/1 var(--font-display); letter-spacing: -.02em; white-space: pre; }
.tv-board { padding: 1.6vh 2vw 0; }
.tv-stats { display: flex; border: 1px solid var(--on-stage); margin-bottom: 1.6vh; }
.tv-stats > div { flex: 1; padding: .7em 1em; border-right: 1px solid var(--on-stage); }
.tv-stats > div:last-child { border-right: 0; }
.tv-stats b { display: block; font: 500 2.2em/1 var(--font-display); letter-spacing: -.02em; }
.tv-stats .label { display: block; margin-top: .35em; }
.tv-stats .hot { background: var(--on-stage); color: var(--stage); }
.tv-stats .hot .label { color: #4a4a4a; }
.tv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(max(300px, 22vw), 1fr)); gap: 1vw; align-items: start; }
.tv-card { background: var(--stage-raised); border: 1px solid var(--track-stage); padding: 1em 1.1em; min-width: 0; }
.tv-card.overdue { border: 2px solid var(--on-stage); }
.tv-card .top { display: flex; justify-content: space-between; align-items: flex-start; gap: .5em; }
.tv-card .nm { font: 600 1.45em/1.15 var(--font-display); letter-spacing: -.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-card .veh { color: var(--on-stage-muted); margin-top: .15em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-card .step { display: flex; align-items: center; gap: .5em; margin: .8em 0 .55em; font-weight: 600; font-size: 1.15em; }
.tv-card .mark { width: .6em; height: .6em; background: var(--tv-accent); }
.tv-card .segs span { height: .3em; background: var(--track-stage); }
.tv-card .segs .d { background: var(--on-stage); }
.tv-card .segs .c { background: var(--tv-accent); }
.tv-card .foot { display: flex; justify-content: space-between; gap: .5em; margin-top: .7em; font-size: .85em; color: var(--on-stage-muted); }
.tv-card .foot strong { color: var(--on-stage); font-weight: 600; }
.tv-card.overdue .eta { color: var(--on-stage); font-weight: 700; }
.tv-card .tag { font-size: max(10px, .58em); padding: .45em .6em; background: transparent; color: var(--on-stage); border-color: var(--on-stage); }
.tv-card .tag.solid { background: var(--on-stage); color: var(--stage); }
.tv-card .tag.quiet { border-color: var(--track-stage); color: var(--on-stage-muted); }
.tv-empty { display: grid; place-items: center; min-height: 60vh; font: 500 2.4em/1.2 var(--font-display); color: var(--on-stage-muted); text-align: center; padding: 0 4vw; }
@media (max-width: 900px) { body.tv { overflow: auto; } .tv-stats { flex-wrap: wrap; } .tv-stats > div { flex: 1 0 33%; border-bottom: 1px solid var(--on-stage); } }
.tv-pair { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 3vh; padding: 6vh 8vw; }
.tv-pair-h { font: 500 3em/1 var(--font-display); letter-spacing: -.03em; }
.tv-code { font-size: clamp(64px, 11vw, 220px); line-height: 1; font-weight: 700; letter-spacing: .06em; padding: .15em .3em; border: 3px solid var(--on-stage); }
.tv-code span { color: var(--on-stage-muted); margin: 0 .1em; }
.tv-pair-steps { margin: 0; padding-left: 1.4em; font-size: 1.4em; line-height: 1.45; max-width: 46em; }
.tv-pair-steps li { margin-bottom: .6em; }
.muted-on { color: var(--on-stage-muted); font-size: .85em; }
/* Upload panel that opens under a step or an extra-work item */
.media-inline { flex-basis: 100%; order: 6; margin: 4px 0 6px; padding: var(--space-4); border: 1px solid var(--line); background: var(--paper); }
.shopsteps li .media-inline { margin-left: 56px; }
.media-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 var(--space-4); }
@media (max-width: 600px) { .shopsteps li .media-inline { margin-left: 0; } }
