/* ETAlabs Checker. Layout idea: one column on a phone (pick condition, tap models, list, fixed total bar);
   picker and list side by side on a tablet or laptop. Brand: ETAlabs RGB triad, amber accent, LCD total. */
:root {
  --bg: #eef0f1;
  --surface: #ffffff;
  --surface-2: #f5f6f7;
  --ink: #0e1115;
  --ink-2: #4b535d;
  --ink-3: #69717b;
  --line: rgba(14, 17, 21, 0.12);
  --accent: #ff8a1f;
  --accent-hover: #ff9d42;
  --on-accent: #0e1115;
  --broken: #d61f35;
  --shadow: #6d4fe6;
  --touch: #1f6fe5;
  --good: #128a4a;
  --warn: #a35200;
  --lcd-bg: #0b0c0e;
  --lcd-ink: #ff8a1f;
  --r: #ff3347;
  --g: #22d46d;
  --b: #2f7cff;
  --f-body: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-display: "Doto", "Courier New", monospace;
  --f-seg: "DSEG7", "Archivo", monospace;
  --radius: 14px;
  --bar-h: 76px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0c0e;
    --surface: #15171b;
    --surface-2: #1d2025;
    --ink: #f1f3f5;
    --ink-2: #b4bcc6;
    --ink-3: #8f98a3;
    --line: rgba(255, 255, 255, 0.12);
    --broken: #ff5566;
    --shadow: #a48fff;
    --touch: #5c9bff;
    --good: #2fd47a;
    --warn: #ffb15c;
    --lcd-bg: #000000;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0c0e;
  --surface: #15171b;
  --surface-2: #1d2025;
  --ink: #f1f3f5;
  --ink-2: #b4bcc6;
  --ink-3: #8f98a3;
  --line: rgba(255, 255, 255, 0.12);
  --broken: #ff5566;
  --shadow: #a48fff;
  --touch: #5c9bff;
  --good: #2fd47a;
  --warn: #ffb15c;
  --lcd-bg: #000000;
  color-scheme: dark;
}

@font-face { font-family: "Archivo"; src: url(fonts/archivo.woff2) format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "Doto"; src: url(fonts/doto.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "DSEG7"; src: url(fonts/dseg7.woff2) format("woff2"); font-weight: 700; font-display: swap; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.45;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
h1, h2 { text-wrap: balance; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* top bar */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); background: var(--surface); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; }
.brand b { font-weight: 400; color: var(--ink-2); }
.triad { display: inline-flex; gap: 3px; height: 20px; }
.triad i { display: block; width: 5px; border-radius: 1.5px; }
.triad i:nth-child(1) { background: var(--r); }
.triad i:nth-child(2) { background: var(--g); }
.triad i:nth-child(3) { background: var(--b); }
.top-note { font-size: 13px; color: var(--ink-3); }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.view { padding: 24px 0 48px; }
#view-edit { padding-bottom: calc(var(--bar-h) + 40px + env(safe-area-inset-bottom, 0px)); }

.head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.head .grow { flex: 1; }
.title { font-family: var(--f-display); font-weight: 800; font-size: 34px; line-height: 1.05; letter-spacing: 0.01em; }
.title-plain { font-size: 26px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.15; }
.h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.muted { color: var(--ink-3); }
.help { font-size: 15px; color: var(--ink-2); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 15px; font-weight: 600; text-decoration: none; }
.btn:hover { background: var(--surface-2); }
.btn-accent { border-color: transparent; background: var(--accent); color: var(--on-accent); }
.btn-accent:hover { background: var(--accent-hover); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-lg { min-height: 54px; padding: 0 24px; font-size: 17px; border-radius: 14px; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { color: var(--broken); }
.btn-danger.armed { border-color: var(--broken); background: var(--broken); color: #fff; }
.back { padding-left: 10px; }
.back::before { content: ""; width: 9px; height: 9px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-right: 2px; }

/* quote list */
.list-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 12px; }
.qcard { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: center; width: 100%; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-align: left; }
.qcard:hover { border-color: var(--ink-3); }
.qcard-shop { font-size: 18px; font-weight: 700; overflow-wrap: anywhere; }
.qcard-meta { grid-column: 1; font-size: 14px; color: var(--ink-2); }
.qcard-total { grid-row: 1 / span 2; grid-column: 2; font-size: 20px; font-weight: 700; }
.qcard-mix { grid-column: 1 / -1; display: flex; height: 6px; margin-top: 8px; border-radius: 3px; overflow: hidden; background: var(--surface-2); }
.qcard-mix i { display: block; height: 100%; }
.pill { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--ink-2); vertical-align: 2px; }
.list-note { margin-top: 14px; }
.empty { padding: 28px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--ink-2); }
.store-warn { margin-bottom: 16px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--warn); color: var(--warn); font-size: 14px; }

/* edit: shop and date */
.fields { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 12px 16px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-bottom: 28px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .field .field-label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.input { width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); font-size: 17px; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 138, 31, 0.3); }
.input::placeholder { color: var(--ink-3); }

.edit-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
@media (min-width: 960px) {
  .edit-grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: start; }
  .lines-col { position: sticky; top: 16px; max-height: calc(100vh - var(--bar-h) - 40px); overflow: auto; padding-right: 4px; }
}
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 6px; }

/* picker: condition piles */
.picker-head { position: sticky; top: 0; z-index: 5; margin: 0 -20px; padding: 12px 20px 12px; background: var(--bg); }
.conds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.cond { --c: var(--ink-3); position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 64px; padding: 10px 10px 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-align: left; overflow: hidden; }
.cond::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--c); }
.cond-name { font-size: 15px; font-weight: 700; line-height: 1.15; }
.cond-count { font-size: 13px; color: var(--ink-2); }
.cond[aria-pressed="true"] { border-color: var(--c); background: color-mix(in srgb, var(--c) 13%, var(--surface)); box-shadow: inset 0 0 0 1px var(--c); }
.cond[aria-pressed="true"] .cond-name { color: var(--c); }
.cond-hint { margin-top: 10px; font-size: 14px; color: var(--ink-2); }
.cond-hint strong { color: var(--ink); }

.find { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.seg-ctl { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.seg-ctl button { min-height: 40px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; font-size: 15px; font-weight: 600; color: var(--ink-2); }
.seg-ctl button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.search { position: relative; flex: 1 1 220px; min-width: 0; }
.search .input { min-height: 46px; padding-right: 44px; background: var(--surface); }
.search-clear { position: absolute; right: 4px; top: 50%; width: 38px; height: 38px; margin-top: -19px; border: 0; border-radius: 9px; background: transparent; color: var(--ink-3); font-size: 22px; line-height: 1; }

.series { margin-top: 18px; }
.series-name { margin-bottom: 8px; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.chip { --c: var(--ink-3); position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; min-height: 60px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-align: left; }
.chip:hover { border-color: var(--c); }
.chip:active { transform: scale(0.98); }
.chip-name { font-size: 15px; font-weight: 700; line-height: 1.2; }
.chip-price { font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.chip-zero .chip-price { color: var(--ink-3); }
.chip-unset { border-style: dashed; }
.chip-unset .chip-price { color: var(--warn); font-weight: 600; }
.chip-n { position: absolute; top: -8px; right: -6px; box-shadow: 0 0 0 2px var(--bg); min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px; background: var(--c); color: #fff; font-size: 13px; font-weight: 700; line-height: 24px; text-align: center; }
.chip.flash { animation: flash 0.45s ease-out; }
@keyframes flash { from { box-shadow: 0 0 0 4px var(--c); } to { box-shadow: 0 0 0 0 transparent; } }
.no-results { margin-top: 18px; color: var(--ink-2); }

/* lines */
.groups { display: flex; flex-direction: column; gap: 18px; margin-top: 12px; }
.group { --c: var(--ink-3); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 12px 16px; border-left: 5px solid var(--c); background: color-mix(in srgb, var(--c) 9%, var(--surface)); }
.group-name { font-weight: 700; color: var(--c); }
.group-sum { font-size: 14px; color: var(--ink-2); }
.line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); }
.line-model { font-weight: 600; overflow-wrap: anywhere; }
.line-note { display: block; font-size: 13px; font-weight: 400; color: var(--ink-2); }
.line-total { font-weight: 700; text-align: right; }
.line-ctl { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.stepper button { width: 44px; height: 40px; border: 0; background: var(--surface-2); font-size: 20px; font-weight: 600; line-height: 1; }
.stepper button:hover { background: var(--line); }
.stepper output { min-width: 38px; text-align: center; font-weight: 700; }
.price-in { display: inline-flex; align-items: center; gap: 2px; padding-left: 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); }
.price-in span { color: var(--ink-3); }
.price-in input { width: 74px; height: 40px; padding: 0 10px 0 2px; border: 0; background: transparent; font-size: 16px; font-weight: 600; }
.price-in input:focus { outline: none; }
.price-in:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 138, 31, 0.3); }
.price-in.unset { border-color: var(--warn); }
.each { font-size: 13px; color: var(--ink-3); }
.need { font-size: 13px; font-weight: 600; color: var(--warn); }
.lines-empty { margin-top: 12px; padding: 20px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--ink-2); }

/* fixed total bar while editing */
.ebar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; border-top: 1px solid var(--line); background: var(--surface); padding-bottom: env(safe-area-inset-bottom, 0px); }
.ebar-in { display: flex; align-items: center; gap: 14px; min-height: var(--bar-h); }
.ebar-count { flex: 1; min-width: 0; font-size: 14px; color: var(--ink-2); line-height: 1.3; }
.ebar-count strong { display: block; font-size: 17px; color: var(--ink); }

/* LCD total */
.lcd { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 10px; background: var(--lcd-bg); color: var(--lcd-ink); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
.lcd-cur { font-size: 15px; font-weight: 700; }
.seg { position: relative; display: inline-block; font-family: var(--f-seg); font-weight: 700; line-height: 1; letter-spacing: 0.02em; white-space: nowrap; }
.seg-ghost { opacity: 0.12; }
.seg-val { position: absolute; right: 0; top: 0; text-shadow: 0 0 10px rgba(255, 138, 31, 0.45); }
.lcd-sm .seg { font-size: 22px; }

/* review: the quote document */
.review-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
@media (min-width: 960px) { .review-grid { grid-template-columns: minmax(0, 1fr) 300px; } }
.banner { margin-bottom: 16px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.doc { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.doc-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 18px; border-bottom: 2px solid var(--ink); }
.doc-title { font-family: var(--f-display); font-weight: 800; font-size: 30px; letter-spacing: 0.04em; }
.doc-meta { display: grid; grid-template-columns: repeat(3, minmax(0, auto)); justify-content: start; gap: 6px 36px; margin: 18px 0 8px; }
.doc-meta dt { font-size: 13px; font-weight: 600; color: var(--ink-3); }
.doc-meta dd { margin: 0; font-size: 17px; font-weight: 700; overflow-wrap: anywhere; }
.doc-missing { color: var(--warn); }
.doc-group { --c: var(--ink-3); margin-top: 22px; }
.doc-group h2 { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 0 0 6px 12px; border-left: 5px solid var(--c); font-size: 17px; }
.doc-group h2 span { font-size: 14px; font-weight: 500; color: var(--ink-2); }
.tbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tbl th { padding: 6px 0; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-3); text-align: right; border-bottom: 1px solid var(--line); }
.tbl th:first-child, .tbl td:first-child { text-align: left; }
.tbl td { padding: 9px 0; border-bottom: 1px solid var(--line); text-align: right; vertical-align: top; }
.tbl td + td, .tbl th + th { padding-left: 14px; }
.tbl .note { display: block; font-size: 13px; color: var(--ink-2); }
.tbl tfoot td { border-bottom: 0; font-weight: 700; }
.tbl .unset { color: var(--warn); font-weight: 600; }
.doc-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 26px; padding-top: 18px; border-top: 2px solid var(--ink); }
.doc-total-label { font-size: 15px; font-weight: 700; }
.doc-total-label span { display: block; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.lcd-lg .seg { font-size: 40px; }
.lcd-lg .lcd-cur { font-size: 20px; }
.doc-small { margin-top: 14px; font-size: 13px; color: var(--ink-3); }

.panel { display: flex; flex-direction: column; gap: 12px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.panel-label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.panel .btn { width: 100%; }
.panel .seg-ctl { width: 100%; }
.panel .seg-ctl button { flex: 1; }
.copied { font-size: 14px; color: var(--good); }
.copy-box { width: 100%; min-height: 220px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); font: 13px/1.4 ui-monospace, Menlo, Consolas, monospace; }

/* price sheet */
.sheet-back { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, 0.45); }
.sheet { position: fixed; left: 50%; bottom: 0; z-index: 41; width: min(520px, 100%); transform: translateX(-50%); padding: 22px 20px calc(20px + env(safe-area-inset-bottom, 0px)); border-radius: 20px 20px 0 0; background: var(--surface); box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3); }
@media (min-width: 700px) { .sheet { bottom: 50%; transform: translate(-50%, 50%); border-radius: 20px; } }
.sheet h2 { font-size: 20px; }
.sheet-sub { margin-top: 2px; color: var(--ink-2); font-size: 15px; }
.sheet-sub b { color: var(--c); }
.sheet-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; margin-top: 18px; }
.sheet-form .field-wide { grid-column: 1 / -1; }
.money { position: relative; }
.money span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-size: 18px; }
.money .input { padding-left: 30px; font-size: 20px; font-weight: 700; }
.sheet-err { grid-column: 1 / -1; font-size: 14px; color: var(--broken); }
.sheet-btns { display: flex; gap: 10px; margin-top: 18px; }
.sheet-btns .btn { flex: 1; }

/* toast */
.toast { position: fixed; left: 0; right: 0; bottom: calc(var(--bar-h) + 14px + env(safe-area-inset-bottom, 0px)); z-index: 30; display: flex; align-items: center; gap: 14px; width: max-content; max-width: calc(100% - 32px); margin: 0 auto; padding: 10px 10px 10px 16px; border-radius: 12px; background: var(--ink); color: var(--bg); font-size: 15px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25); }
.toast button { min-height: 36px; padding: 0 12px; border: 0; border-radius: 8px; background: var(--accent); color: var(--on-accent); font-weight: 700; }
.toast.no-bar { bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }

.foot { padding: 24px 0 40px; font-size: 13px; color: var(--ink-3); }

/* header: who's logged in, saving state */
.top-right { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; justify-content: flex-end; min-width: 0; }
.user-bar { display: flex; align-items: center; gap: 8px; }
.user-name { font-size: 14px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.btn-sm { min-height: 38px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.sync { font-size: 13px; color: var(--ink-3); }
.sync-saving { color: var(--ink-2); }
.sync-offline, .sync-error { color: var(--warn); font-weight: 600; }
.demo #logout-btn { display: none; }

/* log in and set up */
.auth-view { display: flex; justify-content: center; }
.auth-card { width: min(440px, 100%); display: flex; flex-direction: column; gap: 14px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.auth-wide { width: min(620px, 100%); }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form .btn-lg { width: 100%; }
.code-input { font-size: 22px; font-weight: 700; letter-spacing: 0.2em; font-variant-numeric: tabular-nums; }
.captcha-slot { min-height: 65px; font-size: 14px; color: var(--warn); }
.form-err { min-height: 0; font-size: 15px; font-weight: 600; color: var(--broken); }
.form-err:empty { display: none; }
.small { font-size: 13px; }
.step-title { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 18px; font-weight: 700; }
.step-num { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--bg); font-size: 15px; }
.rules { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 14px; color: var(--ink-2); }
.rules li { display: flex; align-items: flex-start; gap: 8px; }
.rule-mark { flex: none; width: 16px; height: 16px; margin-top: 2px; border: 2px solid var(--ink-3); border-radius: 50%; }
.rule-ok { color: var(--good); }
.rule-ok .rule-mark { border-color: var(--good); background: var(--good); box-shadow: inset 0 0 0 3px var(--surface); }
.qr-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.qr { flex: none; width: 184px; height: 184px; padding: 6px; border-radius: 12px; background: #fff; }
.qr svg { display: block; width: 100%; height: 100%; }
.qr-row .help { flex: 1 1 200px; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; }
.secret { display: inline-block; margin-top: 6px; padding: 6px 8px; border-radius: 8px; background: var(--surface-2); font-size: 15px; color: var(--ink); letter-spacing: 0.04em; word-break: break-all; }
.dead { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }

/* Team (admin) */
.team-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
@media (min-width: 960px) { .team-grid { grid-template-columns: minmax(0, 1fr) 360px; } }
.team-help { margin-bottom: 12px; }
.members { display: flex; flex-direction: column; gap: 10px; }
.member { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.member-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.member-name { font-size: 18px; font-weight: 700; }
.member-meta { font-size: 14px; color: var(--ink-2); overflow-wrap: anywhere; }
.member-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.member-out:empty { display: none; }
.pill-good { border-color: color-mix(in srgb, var(--good) 45%, transparent); color: var(--good); }
.pill-warn { border-color: color-mix(in srgb, var(--warn) 45%, transparent); color: var(--warn); }
.pill-off { color: var(--ink-3); }
.member .pill { margin-left: 0; }
.btn-confirm.armed { border-color: var(--broken); background: var(--broken); color: #fff; }
.add-form { display: flex; flex-direction: column; gap: 12px; }
select.input { appearance: auto; }
.link-box { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; padding: 14px; border: 1px solid color-mix(in srgb, var(--good) 45%, var(--line)); border-radius: 12px; background: color-mix(in srgb, var(--good) 7%, var(--surface)); font-size: 14px; }
.link-box .input { font-size: 13px; min-height: 42px; }
.activity { margin-top: 36px; }
.audit { display: flex; flex-direction: column; margin: 12px 0 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.audit li { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 4px 14px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 14px; overflow-wrap: anywhere; }
.audit li:first-child { border-top: 0; }
.audit time { color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* colour bar on each saved quote */
.qcard-mix .m-broken { background: var(--broken); }
.qcard-mix .m-shadow { background: var(--shadow); }
.qcard-mix .m-touch { background: var(--touch); }
.qcard-mix .m-good { background: var(--good); }

/* condition colours: after every component rule so they win over each component's grey default */
.c-broken { --c: var(--broken); }
.c-shadow { --c: var(--shadow); }
.c-touch { --c: var(--touch); }
.c-good { --c: var(--good); }

@media (max-width: 640px) {
  .top { flex-wrap: wrap; }
  .top-note { display: none; }
  .auth-card { padding: 20px 16px; }
  .audit li { grid-template-columns: minmax(0, 1fr); }
  .wrap { padding: 0 16px; }
  .picker-head { margin: 0 -16px; padding: 10px 16px; }
  .top { padding: 12px 16px; }
  .title { font-size: 28px; }
  .fields { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .conds { gap: 6px; }
  .cond { min-height: 58px; padding: 8px 6px 8px 11px; }
  .cond-name { font-size: 14px; }
  .chips { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
  .doc { padding: 20px 16px; }
  .doc-meta { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 20px; }
  .doc-meta > div:first-child { grid-column: 1 / -1; }
  .lcd-lg .seg { font-size: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  .chip.flash { animation: none; }
  .chip:active { transform: none; }
}

@media print {
  :root { --bg: #fff; --surface: #fff; --surface-2: #fff; --ink: #000; --ink-2: #333; --ink-3: #555; --line: #bbb; color-scheme: light; }
  .top, .no-print, .ebar, .toast, .banner, .sheet, .sheet-back, .foot { display: none !important; }
  .view { padding: 0; }
  .review-grid { display: block; }
  .doc { border: 0; padding: 0; }
  .lcd { background: #fff; color: #000; box-shadow: none; padding: 0; }
  .seg-ghost { display: none; }
  .seg-val { position: static; text-shadow: none; }
}
