/* MHTT worker app. Brand tokens up top; the logo is the .mono element (swap for an image later). */
:root {
  --bg: #f4f6f8; --card: #ffffff; --ink: #0f2233; --muted: #5b6b7b; --line: #d5dde5;
  --brand: #0f2233; --brand-ink: #ffffff; --accent: #f2b705; --accent-ink: #1b1400;
  --ok: #1d7a3e; --err: #b3261e; --warn-bg: #fff4d6; --err-bg: #fdecea; --ok-bg: #e6f4ea;
  --tap: 48px; --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1824; --card: #16324a; --ink: #f3f6f9; --muted: #9fb3c6; --line: #2c4a64;
    --brand: #0f2233; --warn-bg: #3b3210; --err-bg: #3d1a18; --ok-bg: #16361f;
    --ok: #7fd49a; --err: #ff8a80;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
[hidden] { display: none !important; }

header.bar { position: sticky; top: 0; z-index: 5; background: var(--brand); color: var(--brand-ink);
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px; display: flex; align-items: center; gap: 10px; }
.mono { width: 36px; height: 36px; border-radius: 8px; background: var(--accent); color: var(--accent-ink);
  font-weight: 800; font-size: .62rem; letter-spacing: .02em; display: grid; place-items: center; }
header.bar .title { font-weight: 700; flex: 1; }
header.bar .who { font-size: .85rem; opacity: .85; text-align: right; }

main { max-width: 560px; margin: 0 auto; padding: 16px 16px 120px; }
h1 { font-size: 1.35rem; margin: 4px 0 12px; }
h2 { font-size: 1.05rem; margin: 20px 0 8px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.steps { display: flex; gap: 6px; margin: 0 0 14px; }
.steps span { flex: 1; height: 5px; border-radius: 3px; background: var(--line); }
.steps span.on { background: var(--accent); }

label { display: block; font-size: .85rem; color: var(--muted); margin: 10px 0 4px; }
input, textarea, select { width: 100%; min-height: var(--tap); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; font: inherit; background: var(--bg); color: var(--ink); }
textarea { min-height: 80px; }
.row { display: flex; gap: 8px; }
.row > * { flex: 1; min-width: 0; }
.row > .narrow { flex: 0 0 72px; }

button { min-height: var(--tap); border: 0; border-radius: 10px; font: inherit; font-weight: 600; cursor: pointer;
  padding: 0 16px; background: var(--line); color: var(--ink); }
button.primary { background: var(--accent); color: var(--accent-ink); }
button.ghost { background: transparent; border: 1px solid var(--line); }
button.block { width: 100%; }
button:disabled { opacity: .5; cursor: default; }
.actions { position: fixed; left: 0; right: 0; bottom: 0; background: var(--card); border-top: 1px solid var(--line);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); display: flex; gap: 10px; justify-content: center; }
.actions > button { flex: 1; max-width: 270px; }

.msg { border-radius: 10px; padding: 10px 12px; margin: 10px 0; }
.msg.err { background: var(--err-bg); color: var(--err); }
.msg.warn { background: var(--warn-bg); }
.msg.ok { background: var(--ok-bg); color: var(--ok); }

.suggest { border: 1px solid var(--line); border-radius: 10px; margin-top: 6px; overflow: hidden; }
.suggest button { width: 100%; text-align: left; border-radius: 0; background: var(--card); border-bottom: 1px solid var(--line);
  padding: 10px 12px; font-weight: 400; min-height: 56px; }
.suggest button:last-child { border-bottom: 0; }
.suggest b { display: block; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; background: var(--line); }
.dot.r1 { background: var(--ok); } .dot.r2 { background: var(--accent); }

.qty { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.qty:last-child { border-bottom: 0; }
.qty .name { flex: 1; }
.qty .ctl { display: flex; align-items: center; gap: 6px; }
.qty .ctl button { width: var(--tap); padding: 0; font-size: 1.4rem; }
.qty .ctl output { width: 40px; text-align: center; font-size: 1.2rem; font-weight: 700; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button { flex: 1 1 30%; background: var(--bg); border: 1px solid var(--line); }
.seg button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

.total { text-align: center; padding: 20px 12px; }
.total .amt { font-size: 2.6rem; font-weight: 800; letter-spacing: -.01em; }
.total .lbl { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; color: var(--muted); }
table.math { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.math td { padding: 5px 0; border-bottom: 1px solid var(--line); }
table.math td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
dl.sum { display: grid; grid-template-columns: 40% 60%; gap: 4px 8px; margin: 0; }
dl.sum dt { color: var(--muted); } dl.sum dd { margin: 0; word-break: break-word; }

.list button { width: 100%; text-align: left; background: var(--card); border: 1px solid var(--line); margin-bottom: 8px;
  padding: 10px 12px; font-weight: 400; display: flex; justify-content: space-between; gap: 8px; }
.pill { font-size: .75rem; padding: 2px 8px; border-radius: 99px; background: var(--line); }
.pill.final { background: var(--ok-bg); color: var(--ok); }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; }
.check input { width: 24px; height: 24px; min-height: 24px; flex: 0 0 24px; margin-top: 2px; }

/* 019 — the price slider (spec 10/11). Band limits are rendered from the ruleset, never styled in. */
.sliderEnds { display: flex; justify-content: space-between; color: var(--muted); font-size: .8rem; margin: -2px 0 14px; }
#pctSlider { width: 100%; min-height: var(--tap); padding: 0; border: 0; background: transparent; accent-color: var(--accent); }
.dollarRow { display: flex; align-items: center; gap: 8px; }
.dollarRow span { font-size: 1.3rem; font-weight: 700; color: var(--muted); }
.dollarRow input { font-size: 1.3rem; font-weight: 700; }
.linkish { width: 100%; background: transparent; border: 0; color: var(--accent); text-decoration: underline;
  min-height: var(--tap); padding: 0; margin-top: 10px; font-size: .95rem; }
#totalAmt { transition: opacity .12s ease; }

/* 021 — the archived proposals list */
.pdfList { margin-top: 10px; }
.pdfList .row2 { display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 8px 0; border-top: 1px solid var(--line); font-size: .92rem; }
.pdfList .row2 a { color: var(--accent); }
.pdfList .who { color: var(--muted); font-size: .82rem; }
