/* HomFax — Estimate workspace styling.
 *
 * Loaded by both hosts: the claim workspace (app.html) and the standalone
 * estimator (estimate.html). Kept in one file so the support flags cannot come
 * to mean different things in the two places they are read.
 *
 * Expects the host to define --line, --muted, --navy, --blue, --amber, --red,
 * --ink and --bg.
 */
/* ── Estimate workspace ───────────────────────────────────────────────────
   The estimate is the argument. Every line has to show, at a glance, whether
   it is backed by evidence — so support is a visible property of the row,
   not something you learn only when the carrier pushes back. */
.est-versions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.est-chip { border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 9px 13px;
  cursor: pointer; text-align: left; min-height: 0; color: var(--ink); }
.est-chip:hover { border-color: var(--navy); }
.est-chip.on { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); }
.est-chip .v { font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); font-weight: 700; }
.est-chip .t { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.3px; }

.meters { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin-bottom: 16px; }
.meter { border: 1px solid var(--line); border-radius: 9px; padding: 13px 15px; background: #fff; }
.meter .cap { font-size: 10.5px; text-transform: uppercase; letter-spacing: .9px; color: var(--muted); font-weight: 700; }
.meter .val { font-size: 22px; font-weight: 800; letter-spacing: -.6px; font-variant-numeric: tabular-nums; margin: 3px 0 6px; }
.meter .bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.meter .bar i { display: block; height: 100%; border-radius: 3px; background: var(--blue); }
.meter.warn .bar i { background: var(--amber); } .meter.bad .bar i { background: var(--red); }
.meter .why { font-size: 11.5px; color: var(--muted); margin-top: 7px; line-height: 1.5; }

/* A line is either backed or it is not; the left edge says which without reading. */
.est-row.ok  td:first-child { box-shadow: inset 3px 0 0 var(--blue); }
.est-row.gap td:first-child { box-shadow: inset 3px 0 0 var(--amber); }
.est-flag { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px;
  padding: 2px 7px; border-radius: 4px; background: #faeeda; color: var(--amber); white-space: nowrap; }
.est-flag.ok { background: #e7effa; color: var(--blue); }
.est-flag.code { background: #edeaf7; color: #5b4b9e; }
.btn-why { font-size: 11px; min-height: 0; padding: 4px 9px; }

.why-panel { border: 1px solid var(--navy); border-radius: 10px; padding: 16px 18px; margin: 14px 0; background: #fbfcfe; }
.why-step { display: grid; grid-template-columns: 130px 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.why-step:last-child { border-bottom: 0; }
.why-step .k { font-size: 10.5px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); font-weight: 700; padding-top: 2px; }
.why-gaps { margin-top: 12px; border-left: 3px solid var(--amber); padding: 8px 0 8px 12px; font-size: 13px; }
.why-gaps li { margin: 3px 0; }
.est-missing { border-left: 3px solid var(--amber); padding: 10px 0 10px 13px; margin-top: 14px; font-size: 13px; }
.cmp-finding { border: 1px solid var(--line); border-left: 3px solid var(--red); border-radius: 7px;
  padding: 10px 13px; margin-bottom: 8px; font-size: 13px; background: #fff; }
.cmp-finding.mild { border-left-color: var(--amber); }
