/* IQL · quote preparation — one stylesheet, tokens first. RTL by default. */
:root {
  --bg: #f5f6f4; --surface: #ffffff; --surface-2: #f9faf8; --line: #e2e5e0; --line-strong: #cdd2cb;
  --ink: #1b2420; --ink-2: #47524d; --ink-3: #5c6761;
  --accent: #1f6b5e; --accent-ink: #ffffff; --accent-soft: #e6f2ef; --accent-line: #b9d9d1;
  --ok: #1b7040; --ok-soft: #e8f5ec; --warn: #8a5100; --warn-soft: #fff4e0; --bad: #b3261e; --bad-soft: #fdecea;
  --info: #2f5e9e; --info-soft: #eaf1fb; --neutral-soft: #eff1ee; --wait: #5b4bb0; --wait-soft: #efecfb;
  --radius: 12px; --radius-sm: 8px; --shadow: 0 1px 2px rgba(16, 24, 20, .05), 0 4px 16px rgba(16, 24, 20, .05);
  --focus: 0 0 0 3px rgba(31, 107, 94, .35);
  --font: "Segoe UI", "Noto Sans Hebrew", "Arial Hebrew", Arial, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121614; --surface: #1a201d; --surface-2: #1f2622; --line: #2d3531; --line-strong: #3a443f;
    --ink: #e7ece9; --ink-2: #bdc6c1; --ink-3: #9aa59f;
    --accent: #4fb3a0; --accent-ink: #0d1412; --accent-soft: #1d302b; --accent-line: #2e5249;
    --ok: #5cc48a; --ok-soft: #17291f; --warn: #f0b457; --warn-soft: #2e2413; --bad: #f28b82; --bad-soft: #321a19;
    --info: #8ab4f8; --info-soft: #18243a; --neutral-soft: #232a26; --wait: #b7a9f5; --wait-soft: #251f3d;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3); color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
bdi, .ltr { unicode-bidi: isolate; direction: ltr; }
.mono { font-family: var(--mono); font-size: .86em; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 30; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 1320px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 20px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; white-space: nowrap; }
.brand-mark { width: 32px; height: 32px; border-radius: 8px; background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; font-size: 12px; letter-spacing: .5px; }
.brand-sub { font-weight: 400; color: var(--ink-3); font-size: 14px; }
.nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.nav a { padding: 8px 12px; border-radius: var(--radius-sm); color: var(--ink-2); text-decoration: none; font-size: 14px; white-space: nowrap; }
.nav a:hover { background: var(--neutral-soft); }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.user { position: relative; }
.user-btn { display: flex; align-items: center; gap: 8px; background: none; border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 6px 4px 12px; cursor: pointer; color: var(--ink); font: inherit; font-size: 14px; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.menu { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); min-width: 240px; padding: 8px; }
.menu .who { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu button { width: 100%; text-align: start; }

/* ---------- layout ---------- */
.page { max-width: 1320px; margin: 0 auto; padding: 24px 20px 80px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
h1 { font-size: 24px; margin: 0; letter-spacing: -.2px; }
h2 { font-size: 18px; margin: 0 0 4px; }
h3 { font-size: 15px; margin: 0 0 8px; }
.lead { color: var(--ink-2); margin: 4px 0 0; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
@media (max-width: 1040px) { .split { grid-template-columns: 1fr; } .aside { order: -1; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 20px; }
.section + .section { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }

/* ---------- stepper ---------- */
.stepper { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 16px; counter-reset: step; }
.step { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--surface); cursor: pointer; font: inherit; color: var(--ink-2); text-align: start; min-width: 0; }
.step .num { flex: 0 0 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700;
  background: var(--neutral-soft); color: var(--ink-2); }
.step .lbl { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step .st { display: block; font-size: 12px; color: var(--ink-3); }
.step[aria-current="step"] { border-color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); color: var(--ink); }
.step[aria-current="step"] .num { background: var(--accent); color: var(--accent-ink); }
.step.done .num { background: var(--ok-soft); color: var(--ok); }
.step.attn .num { background: var(--warn-soft); color: var(--warn); }
@media (max-width: 760px) { .stepper { grid-template-columns: repeat(5, minmax(44px, 1fr)); } .step .lbl, .step .st { display: none; } .step { justify-content: center; } }

/* ---------- forms ---------- */
.grid { display: grid; gap: 14px 16px; grid-template-columns: repeat(12, 1fr); }
.col-12 { grid-column: span 12; } .col-8 { grid-column: span 8; } .col-6 { grid-column: span 6; }
.col-4 { grid-column: span 4; } .col-3 { grid-column: span 3; }
@media (max-width: 900px) { .col-3, .col-4 { grid-column: span 6; } .col-8 { grid-column: span 12; } }
@media (max-width: 560px) { .col-3, .col-4, .col-6 { grid-column: span 12; } }
.field label, .label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.req::after { content: " *"; color: var(--bad); font-weight: 400; }
.hint { font-size: 12.5px; color: var(--ink-3); margin-top: 5px; line-height: 1.45; }
.err-text { font-size: 12.5px; color: var(--bad); margin-top: 5px; }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=url], input:not([type]), select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); padding: 9px 11px; min-height: 40px; }
textarea { min-height: 110px; resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible, .step:focus-visible { outline: none; box-shadow: var(--focus); border-color: var(--accent); }
input:disabled, select:disabled { background: var(--surface-2); color: var(--ink-3); }
input.invalid, select.invalid, textarea.invalid { border-color: var(--bad); }
input[type=number] { direction: ltr; text-align: end; }
.input-row { display: flex; gap: 8px; align-items: stretch; }
.input-row > input, .input-row > select { flex: 1; min-width: 0; }

.seg { display: inline-flex; background: var(--neutral-soft); border-radius: var(--radius-sm); padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 6px; font: inherit; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); font-weight: 600; }

/* declared-state chip next to a quantity */
.state-btn { flex: 0 0 auto; border: 1px dashed var(--line-strong); background: transparent; color: var(--ink-2); border-radius: var(--radius-sm);
  padding: 0 10px; font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; }
.state-btn:hover { border-style: solid; }
.state-tag { display: inline-flex; align-items: center; gap: 6px; background: var(--info-soft); color: var(--info); border-radius: 999px;
  padding: 4px 6px 4px 12px; font-size: 13px; font-weight: 600; }
.state-tag button { border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 16px; line-height: 1; padding: 0 4px; }
.popover { position: absolute; z-index: 40; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 6px; min-width: 260px; }
.popover button { display: block; width: 100%; text-align: start; background: none; border: 0; padding: 8px 10px; border-radius: 6px; font: inherit; cursor: pointer; color: var(--ink); }
.popover button:hover, .popover button:focus-visible { background: var(--neutral-soft); }
.popover .note { display: block; font-size: 12px; color: var(--ink-3); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: var(--radius-sm); padding: 9px 16px;
  font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; border: 1px solid transparent; min-height: 40px; text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-secondary { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.btn-secondary:hover { background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--neutral-soft); }
.btn-danger { background: var(--surface); border-color: var(--bad); color: var(--bad); }
.btn-sm { padding: 5px 10px; min-height: 32px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.spacer { flex: 1; }

/* ---------- component cards ---------- */
.components { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 760px) { .components { grid-template-columns: 1fr 1fr; } }
.comp { position: relative; display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 12px; cursor: pointer; background: var(--surface); text-align: start; font: inherit; color: var(--ink); }
.comp input { margin: 3px 0 0; accent-color: var(--accent); width: 16px; height: 16px; }
.comp b { display: block; font-size: 14px; }
.comp span { font-size: 12.5px; color: var(--ink-3); }
.comp:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }

/* ---------- status panel ---------- */
.aside { position: sticky; top: 76px; display: grid; gap: 12px; }
.status-hero { padding: 16px; border-radius: var(--radius); display: flex; gap: 12px; align-items: center; }
.status-hero.ready { background: var(--ok-soft); color: var(--ok); }
.status-hero.blocked { background: var(--warn-soft); color: var(--warn); }
.status-hero.idle { background: var(--neutral-soft); color: var(--ink-2); }
.status-hero .icon { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 18px; background: var(--surface); flex: 0 0 36px; }
.status-hero b { display: block; font-size: 15px; color: var(--ink); }
.status-hero span { font-size: 13px; }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.checklist li:last-child { border-bottom: 0; }
.checklist .dot { flex: 0 0 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; margin-top: 1px; }
.dot.ok { background: var(--ok-soft); color: var(--ok); } .dot.bad { background: var(--bad-soft); color: var(--bad); }
.dot.warn { background: var(--warn-soft); color: var(--warn); } .dot.na { background: var(--neutral-soft); color: var(--ink-3); }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-align: start; text-decoration: underline; text-underline-offset: 3px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 14px; }
.kv + .kv { border-top: 1px solid var(--line); }
.kv .k { color: var(--ink-3); flex: 0 0 auto; }
.kv > span:last-child { min-width: 0; overflow-wrap: anywhere; text-align: end; }
.saved { font-size: 12.5px; color: var(--ink-3); display: flex; gap: 6px; align-items: center; }

/* ---------- identity ---------- */
.identity { margin-top: 10px; border-radius: var(--radius-sm); padding: 10px 12px; font-size: 14px; }
.identity.ok { background: var(--ok-soft); }
.identity.choose { background: var(--warn-soft); }
.identity.none { background: var(--neutral-soft); }
.cands { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.cand { display: inline-flex; gap: 8px; align-items: baseline; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 999px;
  padding: 6px 12px; font: inherit; font-size: 14px; cursor: pointer; color: var(--ink); }
.cand:hover { border-color: var(--accent); }
.cand .rate { color: var(--ink-3); font-size: 13px; }

/* ---------- question card ---------- */
.progress { height: 6px; background: var(--neutral-soft); border-radius: 999px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .25s; }
.qcard { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: var(--surface-2); margin-top: 14px; }
.qcard.blocking { border-color: var(--warn); background: var(--warn-soft); }
.qmeta { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-3); margin-bottom: 10px; }
.qask { font-size: 20px; font-weight: 700; line-height: 1.4; margin: 0 0 6px; }
.qwhy { color: var(--ink-2); max-width: 68ch; }
.qopts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.qfree { display: flex; gap: 8px; margin-top: 12px; max-width: 520px; }
.qstates { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line-strong); align-items: center; }
details.why { margin-top: 12px; font-size: 13px; color: var(--ink-3); }
details.why summary { cursor: pointer; }
.answered { list-style: none; padding: 0; margin: 14px 0 0; }
.answered li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }

/* ---------- findings ---------- */
.findings { display: grid; gap: 12px; }
.fgroup { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.fgroup > header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; font-weight: 700; font-size: 14px; }
.fgroup .count { font-weight: 600; font-size: 12px; border-radius: 999px; padding: 2px 9px; background: var(--surface); }
.fgroup.bad > header { background: var(--bad-soft); color: var(--bad); }
.fgroup.warn > header { background: var(--warn-soft); color: var(--warn); }
.fgroup.info > header { background: var(--info-soft); color: var(--info); }
.fgroup.ok > header { background: var(--ok-soft); color: var(--ok); }
.fgroup.na > header { background: var(--neutral-soft); color: var(--ink-2); }
.frow { padding: 10px 14px; border-top: 1px solid var(--line); }
.frow .t { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.frow .v { font-weight: 600; }
.frow .why { color: var(--ink-2); font-size: 13.5px; margin-top: 2px; }
.chip { display: inline-block; font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); border: 1px solid var(--line); border-radius: 5px; padding: 0 6px; background: var(--surface); }

/* ---------- banners, tables, misc ---------- */
.banner { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius); font-size: 14px; }
.banner.info { background: var(--info-soft); color: var(--ink); } .banner.warn { background: var(--warn-soft); }
.banner.bad { background: var(--bad-soft); } .banner.ok { background: var(--ok-soft); }
.banner b { display: block; }
.verdict { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--radius); }
.verdict .big { font-size: 18px; font-weight: 700; }
.verdict .vicon { flex: 0 0 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 18px; background: var(--surface); }
.verdict.ok { background: var(--ok-soft); } .verdict.bad { background: var(--bad-soft); } .verdict.warn { background: var(--warn-soft); } .verdict.na { background: var(--neutral-soft); }
.stages { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 8px; }
.stages li { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--ink-3); }
.stages li.active { color: var(--ink); font-weight: 600; } .stages li.done { color: var(--ok); }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--accent); animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { text-align: start; font-weight: 600; color: var(--ink-3); font-size: 12.5px; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data tr:hover td { background: var(--surface-2); }
.pill { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); } .pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.warn { background: var(--warn-soft); color: var(--warn); } .pill.na { background: var(--neutral-soft); color: var(--ink-2); }
.pill.info { background: var(--info-soft); color: var(--info); }
.empty { text-align: center; padding: 40px 20px; color: var(--ink-3); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 14px; font: inherit; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.tabs button[aria-selected="true"] { border-bottom-color: var(--accent); color: var(--ink); font-weight: 600; }
.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; min-height: 40px; }
.toggle input { width: 18px; height: 18px; accent-color: var(--accent); }
.savebar { position: sticky; bottom: 0; margin-top: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 12px 16px; display: flex; gap: 12px; align-items: center; }
dialog { border: 0; border-radius: var(--radius); padding: 0; box-shadow: 0 20px 60px rgba(0,0,0,.25); width: min(560px, calc(100vw - 32px));
  background: var(--surface); color: var(--ink); }
dialog::backdrop { background: rgba(10, 16, 13, .45); }
dialog .dlg-head { padding: 18px 20px 0; } dialog .dlg-body { padding: 16px 20px; } dialog .dlg-foot { padding: 0 20px 18px; }
.toast-wrap { position: fixed; inset-block-end: 20px; inset-inline-start: 20px; display: grid; gap: 8px; z-index: 60; }
.toast { background: var(--ink); color: var(--bg); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 14px; box-shadow: var(--shadow); max-width: 420px; }
.toast.bad { background: var(--bad); color: #fff; }
.skeleton { background: linear-gradient(90deg, var(--neutral-soft), var(--surface-2), var(--neutral-soft)); background-size: 200% 100%;
  animation: shimmer 1.4s infinite; border-radius: 6px; height: 14px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.dropzone { border: 1.5px dashed var(--line-strong); border-radius: var(--radius); padding: 14px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- work queue, review, states (2026-09-17) ---------- */
.btn-lg { padding: 11px 20px; min-height: 46px; font-size: 15px; }
.icon-btn { min-width: 32px; padding: 0 8px; }
kbd { font-family: var(--mono); font-size: 11px; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 4px;
  padding: 0 5px; background: var(--surface); color: var(--ink-2); line-height: 1.5; }
.btn kbd { margin-inline-end: 2px; }
.keys-hint { margin-top: 12px; }
.warn-text { color: var(--warn); }
.crumbs { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--ink-3); margin-bottom: 6px; }
.crumbs a { color: var(--ink-2); text-decoration: none; } .crumbs a:hover { text-decoration: underline; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.tile-n { font-size: 30px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tile-l { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.tile.warn { background: var(--warn-soft); border-color: transparent; } .tile.warn .tile-n { color: var(--warn); }
.home-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.card-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 16px 20px 0; }
.list { padding: 6px 8px 8px; }
.row-item { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 12px; border-radius: var(--radius-sm); color: var(--ink); text-decoration: none; }
.row-item + .row-item { border-top: 1px solid var(--line); }
.row-item.link:hover { background: var(--surface-2); }
.ri-main { min-width: 0; } .ri-main b { font-weight: 600; }
.ri-side { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.chev { color: var(--ink-3); font-size: 18px; }
.suggest { border: 1px solid var(--accent-line); background: var(--accent-soft); border-radius: var(--radius); overflow: hidden; }
.suggest > header { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; padding: 10px 14px; }
.suggest-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 8px 14px; border-top: 1px solid var(--accent-line); background: var(--surface); }
.suggest-row .k { color: var(--ink-2); font-size: 13px; min-width: 90px; } .suggest-row .v { font-weight: 700; }
.status-hero.waiting { background: var(--wait-soft); color: var(--wait); }
.fgroup.wait > header { background: var(--wait-soft); color: var(--wait); }
.step.wait .num { background: var(--wait-soft); color: var(--wait); }
.dot.wait { background: var(--wait-soft); color: var(--wait); }
.bgroup + .bgroup { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
.bgroup-h { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; font-weight: 700; color: var(--ink-2); padding: 6px 0 0; }
.aside details summary { cursor: pointer; padding: 6px 0; color: var(--ink-2); }
.handoff { border: 1px solid var(--ok); border-radius: var(--radius); padding: 16px 18px; background: var(--surface); margin-top: 8px; }
.handoff-head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.handoff .vicon { flex: 0 0 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 18px; background: var(--ok-soft); color: var(--ok); }
.handoff .big, .verdict .big { font-size: 18px; font-weight: 700; outline: none; }
details.trace summary { cursor: pointer; font-size: 14px; color: var(--ink-2); padding: 6px 0; }
.review-status { display: flex; flex-direction: column; gap: 2px; padding: 14px 18px; border-radius: var(--radius); margin-bottom: 16px; }
.review-status.warn { background: var(--warn-soft); } .review-status.warn b { color: var(--warn); }
.review-status.ok { background: var(--ok-soft); } .review-status.na { background: var(--neutral-soft); }
.review-split { grid-template-columns: minmax(0, 1fr) 320px; }
.stack { display: grid; gap: 14px; align-content: start; }
.corrections { list-style: none; margin: 12px 0 0; padding: 0; }
.corrections li { display: flex; gap: 14px; justify-content: space-between; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.corrections li.done .c-main > div:first-child b { text-decoration: line-through; color: var(--ink-3); }
.c-main { min-width: 0; flex: 1 1 260px; display: grid; gap: 2px; }
.c-act { display: flex; gap: 8px; align-items: center; flex: 0 1 340px; }
.c-act input { min-height: 32px; padding: 5px 9px; font-size: 13px; }
/* The currency correction asks for more than a note: a rate, a pair, a source and a day. Laid out
   as label/field pairs so it stays readable when it wraps under the note on a narrow screen. */
.fx-fields { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 8px;
             align-items: center; flex: 1 1 100%; margin-bottom: 6px; }
.fx-fields select { min-height: 32px; padding: 5px 9px; font-size: 13px; }
.source-list { display: grid; gap: 10px; margin-top: 14px; }
.source-row { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 14px 14px; margin: 0; min-width: 0; }
.source-row legend { font-weight: 700; font-size: 14px; padding: 0 6px; }
.col-2 { grid-column: span 2; } .col-5 { grid-column: span 5; }
@media (max-width: 1100px) { .col-2 { grid-column: span 4; } .col-5 { grid-column: span 8; } }
@media (max-width: 900px) { .home-grid, .review-split { grid-template-columns: 1fr; } .tiles { grid-template-columns: 1fr 1fr 1fr; } }
/* WCAG 2.5.8: nothing clickable under 24×24 */
.state-tag button { min-width: 24px; min-height: 24px; display: inline-grid; place-items: center; border-radius: 50%; }
.state-tag button:hover { background: rgba(0,0,0,.06); }
.linkish { min-height: 24px; min-width: 24px; display: inline-flex; align-items: center; }
.seg button { min-height: 32px; }
[tabindex="-1"]:focus { outline: none; }

/* ---------- demo data, conflicts, margin (2026-09-18) ---------- */
.demo-strip { background: var(--warn-soft); color: var(--ink); border-bottom: 1px solid var(--line); padding: 8px 20px; text-align: center; font-size: 13.5px; }
.demo-strip b { color: var(--warn); }
.suggest-row.conflict { background: var(--bad-soft); }
.suggest-row .evidence { flex-basis: 100%; }
.margin-card { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; padding: 14px 18px; border-radius: var(--radius); margin-bottom: 16px; border: 1px solid var(--line); background: var(--surface); }
.margin-card .big { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.margin-card > .small { flex: 1 1 260px; }
.margin-card.ok { border-color: var(--ok); } .margin-card.warn { border-color: var(--warn); background: var(--warn-soft); } .margin-card.na { background: var(--neutral-soft); }
.source-row legend .pill { font-weight: 600; margin-inline-start: 6px; }

.app-foot { text-align: center; padding: 20px 0 8px; font-size: 13px; }
.decision textarea { width: 100%; }
.gate-rail { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0 0 10px; }
.gate-rail li { font-size: 12px; }
.constraint-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.constraint-list li { border-inline-start: 3px solid var(--line); padding-inline-start: 10px; }
h1 .pill { font-size: 13px; vertical-align: middle; margin-inline-start: 8px; }

/* ---------- phone overrides (last, so they win) ---------- */
@media (max-width: 760px) {
  .topbar-in { flex-wrap: wrap; height: auto; padding: 8px 16px; gap: 6px 12px; }
  .brand { flex: 1; } .brand #productTitle { font-size: 14px; }
  .nav { order: 3; flex-basis: 100%; margin: 0 -4px; }
  .page { padding: 16px 16px 60px; }
  .aside .kv-card { display: none; }
  .user-btn .small { display: none; }
  .tiles { grid-template-columns: 1fr 1fr 1fr; gap: 8px; } .tile { padding: 12px; } .tile-n { font-size: 24px; } .tile-l { font-size: 12px; }
  .row-item { flex-wrap: wrap; } .ri-side { justify-content: flex-start; }
  .col-2, .col-5 { grid-column: span 12; }
  .c-act { flex-basis: 100%; }
  .keys-hint { display: none; }
}
@media (max-width: 559px) {
  .popover { position: fixed; inset-inline: 8px; bottom: 8px; top: auto !important; left: 8px !important; min-width: 0;
    max-height: 70vh; overflow-y: auto; box-shadow: 0 -8px 40px rgba(0,0,0,.25); }
  .popover button { min-height: 44px; }

  /* A phone is where a PMO reads a brief and starts a quote; the wizard was laid out for a desk.
     Nothing is hidden here — every field stays reachable, it just stops pretending to be a grid. */
  .page { padding: 12px 12px 72px; }
  .col-1, .col-2, .col-3, .col-4, .col-5, .col-6, .col-8, .col-9, .col-10 { grid-column: span 12; }
  .grid { gap: 10px; }
  #stepper { display: flex; overflow-x: auto; gap: 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  #stepper::-webkit-scrollbar { display: none; }
  #stepper .step { white-space: nowrap; flex: 0 0 auto; min-height: 44px; }
  #stepper .step .st { display: none; }            /* the sub-label does not survive 375px */
  .page-head { flex-direction: column; align-items: stretch; gap: 8px; }
  .page-head .btn-row { flex-wrap: wrap; }
  .btn { min-height: 44px; }                       /* a thumb, not a mouse pointer */
  /* iOS zooms the page whenever a focused field is under 16px. Every field, including the ones
     that are deliberately compact on a desk (`.c-act input`, table filters, the small inputs). */
  input, select, textarea,
  .c-act input, .field input, .field select, .field textarea,
  .data input, .data select { font-size: 16px; }
  .tiles { grid-template-columns: 1fr 1fr; }
  /* A wide table scrolls inside its own box instead of dragging the page sideways. The reason it
     did not is the default `min-width: auto` on a flex/grid item: a card refuses to shrink below
     its content until it is told it may. */
  main, .page, .card, .aside, .banner, .margin-card, .table-wrap { min-width: 0; max-width: 100%; }
  .table-wrap { overflow-x: auto; }
  .data th, .data td { white-space: nowrap; }
  .card, .banner { overflow-wrap: anywhere; }
  .margin-card { flex-direction: column; align-items: stretch; gap: 10px; }
  .gate-rail { gap: 4px; }
  /* the one thing worth pinning: the action that moves the quote forward */
  .step-actions { position: sticky; bottom: 0; background: var(--bg); padding: 10px 0;
    border-top: 1px solid var(--line); z-index: 5; }
}


/* ---------- print: a quote summary, not a picture of an application ---------- */
@media print {
  .nav, .app-foot, .btn, .btn-row, .tabs, #envStrip, .skeleton, details:not([open]) { display: none !important; }
  body { background: #fff; color: #000; }
  .card, .margin-card, .review-status { border: 1px solid #999; box-shadow: none; break-inside: avoid; }
  a[href^="#"]::after { content: ""; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 11px; }
  table { break-inside: auto; }
  tr, li { break-inside: avoid; }
  h1, h2 { break-after: avoid; }
  main { max-width: none; padding: 0; }
}

/* The launch-readiness list on the admin status screen. One row per check, blocked first; the
   detail line is the point, so it is not hidden behind a disclosure. */
.readiness { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 10px; }
.readiness li { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.readiness li.done { opacity: .62; }
.readiness li > div + div { margin-top: 3px; }

/* The language switch. Deliberately quiet: it is not a feature of the work, it is a way out of a
   language you cannot read, so it has to be findable without being loud. */
.lang-btn { flex: 0 0 auto; margin-inline-start: 8px; }
.lang-float { position: fixed; inset-block-start: 12px; inset-inline-end: 12px; z-index: 5; }

/* The first-quote walkthrough (BIZ-08). Anchored to the corner rather than floating over the
   field it describes: a bubble that follows an element is a bubble that covers it on a phone. */
.tour { position: fixed; inset-block-end: 16px; inset-inline-start: 16px; z-index: 40;
        max-width: 340px; background: var(--card); border: 1px solid var(--line);
        border-radius: var(--radius); padding: 14px 16px; box-shadow: 0 10px 40px rgba(0,0,0,.18); }
.tour-head { display: flex; align-items: baseline; gap: 8px; }
.tour-title { font-size: 15px; }
.tour-count { margin-inline-start: auto; font-size: 12px; color: var(--muted); }
.tour-body { margin: 8px 0 0; }
.tour-acts { margin-top: 12px; }
@media (max-width: 559px) {
  .tour { inset-inline: 12px; max-width: none; inset-block-end: 12px; }
}
