:root {
  --bg: #0b0e12;
  --surface: #12171d;
  --surface-2: #181e26;
  --surface-3: #202833;
  --border: #252e39;
  --border-2: #313c49;
  --text: #e8ecf1;
  --muted: #8b96a3;
  --faint: #5d6874;
  --accent: #3d8bfd;
  --accent-soft: rgba(61, 139, 253, 0.14);
  --ready: #2fbf71;
  --ready-soft: rgba(47, 191, 113, 0.14);
  --flag: #f2a33a;
  --flag-soft: rgba(242, 163, 58, 0.14);
  --submitted: #3d8bfd;
  --paid: #9aa5b1;
  --paid-soft: rgba(154, 165, 177, 0.14);
  --rejected: #ef5350;
  --rejected-soft: rgba(239, 83, 80, 0.14);
  --radius: 14px;
  --head: "Sora", "Inter", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); overflow-anchor: none; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.45;
  font-feature-settings: "tnum" 1, "cv11" 1;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; }
h2, h3 { font-family: var(--head); margin: 0; letter-spacing: -0.01em; }
h3 { font-size: 16px; font-weight: 600; }
.eyebrow { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.r { text-align: right; }

/* Banner + header */
.demo-banner {
  position: sticky; top: 0; z-index: 20;
  background: var(--flag); color: #1b1203;
  text-align: center; font-weight: 700; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 4px 16px;
}
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 28px; border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #0f1318, var(--bg));
}
.brand { display: flex; align-items: center; gap: 12px; }
.mark { width: 36px; height: 36px; flex: none; }
.mark rect { fill: var(--accent); }
.mark path { fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.brand-name { font-family: var(--head); font-weight: 700; font-size: 20px; letter-spacing: -0.02em; line-height: 1.1; }
.brand-by { font-size: 12.5px; color: var(--muted); }
.top-right { display: flex; align-items: center; gap: 20px; }
.client { display: flex; flex-direction: column; align-items: flex-end; font-size: 14px; font-weight: 500; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 8px; border: 1px solid transparent; padding: 9px 16px;
  font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: #2f7cf0; }
.btn.secondary { background: var(--surface-3); border-color: var(--border-2); color: var(--text); }
.btn.secondary:hover { background: #283240; }
.btn.ghost { background: transparent; border-color: var(--border-2); color: var(--muted); }
.btn.ghost:hover { color: var(--text); border-color: var(--muted); }
.btn.small { padding: 5px 10px; font-size: 12.5px; border-radius: 7px; }
.btn.wide { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.4; cursor: not-allowed; pointer-events: none; }

/* Status chips */
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap;
}
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip.ready { color: var(--ready); background: var(--ready-soft); }
.chip.flagged { color: var(--flag); background: var(--flag-soft); }
.chip.submitted { color: var(--submitted); background: var(--accent-soft); }
.chip.paid { color: var(--paid); background: var(--paid-soft); }
.chip.rejected { color: var(--rejected); background: var(--rejected-soft); }
.chip.big { font-size: 15px; padding: 7px 15px; }
.chip.big::before { width: 9px; height: 9px; }

/* Progress strip */
.strip {
  display: flex; align-items: center; gap: 20px;
  padding: 16px 28px; border-bottom: 1px solid var(--border); background: var(--surface);
}
.steps { flex: 1; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin: 0; padding: 0; list-style: none; }
.step { position: relative; display: flex; align-items: center; gap: 12px; color: var(--faint); transition: color 0.25s; min-width: 0; }
.step .line { flex: 1; min-width: 16px; height: 2px; margin: 0 14px 0 4px; background: var(--border); position: relative; border-radius: 2px; overflow: hidden; }
.step .line::after { content: ""; position: absolute; inset: 0; width: 0; background: var(--ready); transition: width 0.5s ease; }
.step.done .line::after { width: 100%; }
.step.flagged .line::after { width: 100%; background: var(--flag); }
.step b { display: block; font-family: var(--head); font-size: 15px; font-weight: 600; color: inherit; }
.step small { display: block; font-size: 12px; color: var(--faint); white-space: nowrap; }
.dot {
  position: relative; z-index: 2; flex: none;
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  border: 2px solid var(--border-2); background: var(--bg); font-weight: 700; font-size: 14px;
  transition: all 0.25s;
}
.step.active { color: var(--text); }
.step.active .dot { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 0 rgba(61, 139, 253, 0.55); animation: pulse 1.1s infinite; }
.step.active small { color: var(--muted); }
.step.done { color: var(--text); }
.step.done .dot { border-color: var(--ready); background: var(--ready); color: #04210f; font-size: 0; }
.step.done .dot::after, .step.flagged .dot::after {
  content: ""; width: 14px; height: 8px; border: 3px solid #04210f; border-top: 0; border-right: 0;
  transform: rotate(-45deg) translate(1px, -2px); font-size: 0;
}
.step.flagged { color: var(--text); }
.step.flagged .dot { border-color: var(--flag); background: var(--flag); color: #2a1a00; font-size: 0; }
.step.flagged .dot::after { content: "!"; width: auto; height: auto; border: 0; transform: none; font-size: 19px; font-weight: 800; color: #2a1a00; }
.step.flagged small { color: var(--flag); }
.step.error .dot { border-color: var(--rejected); color: var(--rejected); }
.step.error small { color: var(--rejected); }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(61, 139, 253, 0.5); }
  100% { box-shadow: 0 0 0 12px rgba(61, 139, 253, 0); }
}
.clock { display: flex; flex-direction: column; align-items: flex-end; min-width: 130px; }
.clock b { font-family: var(--head); font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.clock.done b { color: var(--ready); }

/* Layout */
.layout {
  display: grid; grid-template-columns: 290px minmax(0, 1fr) 280px; gap: 20px;
  padding: 20px 28px 0; align-items: start;
}
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.meta { font-size: 12.5px; color: var(--muted); }

/* Capture column */
.phone {
  background: #07090c; border: 1px solid var(--border-2); border-radius: 28px; padding: 14px 14px 16px;
  box-shadow: inset 0 0 0 5px #11161c;
}
.phone-bar { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; color: var(--muted); padding: 4px 8px 10px; }
.phone-bar .truck { color: var(--faint); }
.drop {
  position: relative; display: grid; place-items: center; height: 270px; margin-bottom: 12px;
  border-radius: 16px; background: radial-gradient(ellipse at 50% 40%, #18202a, #0d1116);
  cursor: pointer; overflow: hidden; outline: 2px dashed transparent; outline-offset: -8px;
  transition: outline-color 0.15s, background 0.15s;
}
.drop:hover, .drop.over { outline-color: var(--accent); background: radial-gradient(ellipse at 50% 40%, #1b2735, #0d1116); }
.corner { position: absolute; width: 26px; height: 26px; border: 3px solid rgba(232, 236, 241, 0.55); }
.corner.tl { top: 14px; left: 14px; border-right: 0; border-bottom: 0; border-radius: 6px 0 0 0; }
.corner.tr { top: 14px; right: 14px; border-left: 0; border-bottom: 0; border-radius: 0 6px 0 0; }
.corner.bl { bottom: 14px; left: 14px; border-right: 0; border-top: 0; border-radius: 0 0 0 6px; }
.corner.br { bottom: 14px; right: 14px; border-left: 0; border-top: 0; border-radius: 0 0 6px 0; }
.drop-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 0 30px; }
.drop-empty svg { width: 42px; height: 42px; fill: none; stroke: var(--muted); stroke-width: 1.6; stroke-linejoin: round; margin-bottom: 6px; }
.drop-empty b { font-size: 15px; }
.drop-empty small { color: var(--muted); font-size: 12.5px; }
#drop-preview { position: absolute; inset: 20px; width: calc(100% - 40px); height: calc(100% - 40px); object-fit: contain; }
.sent {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  background: var(--ready); color: #04210f; font-weight: 700; font-size: 12.5px; padding: 5px 12px; border-radius: 999px;
  animation: pop 0.35s ease;
}
.samples { margin-top: 18px; }
.sample-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0 8px; }
.sample {
  position: relative; display: block; padding: 0; border: 1px solid var(--border-2); border-radius: 9px; overflow: hidden;
  background: var(--surface-2); cursor: grab; aspect-ratio: 3 / 3.6; transition: transform 0.15s, border-color 0.15s;
}
.sample:hover { transform: translateY(-2px); border-color: var(--accent); }
.sample img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.sample span {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 3px 0; text-align: center;
  font-size: 11.5px; font-weight: 600; background: rgba(7, 9, 12, 0.82);
}
.hint { color: var(--faint); font-size: 12px; }

/* Work column */
.empty {
  border: 1px dashed var(--border-2); border-radius: var(--radius); padding: 70px 40px; text-align: center;
  background: repeating-linear-gradient(135deg, transparent 0 14px, rgba(255, 255, 255, 0.012) 14px 28px);
}
.empty h2 { font-size: 30px; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 10px; }
.empty p { color: var(--muted); max-width: 520px; margin: 0 auto; font-size: 16px; }
.cards { display: grid; grid-template-columns: 230px minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.photo-card { grid-row: 1 / span 2; }
.read-card { grid-column: 2 / span 2; }
.card.dim { opacity: 0.35; }
.card.live { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.photo { position: relative; display: block; width: 100%; padding: 0; border: 0; background: var(--surface-2); border-radius: 9px; overflow: hidden; cursor: zoom-in; }
.photo img { display: block; width: 100%; }
.scan { position: absolute; left: 0; right: 0; height: 70px; top: -70px; pointer-events: none; opacity: 0; }
.scan.on {
  opacity: 1; animation: scan 1.4s linear infinite;
  background: linear-gradient(180deg, transparent, rgba(61, 139, 253, 0.35) 70%, rgba(110, 170, 255, 0.9) 98%, transparent);
}
@keyframes scan { from { top: -70px; } to { top: 100%; } }

.fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 14px; margin-bottom: 14px; }
.field { min-width: 0; opacity: 0; transform: translateY(4px); transition: opacity 0.25s, transform 0.25s; }
.field.in { opacity: 1; transform: none; }
.field dt, .field .k { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.field .v { font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.field .v.missing { color: var(--flag); font-weight: 700; }
.field .v.ok { color: var(--ready); }
table { border-collapse: collapse; width: 100%; }
.items th, .rows th {
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
  text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--border);
}
.items th.r, .rows th.r { text-align: right; }
.items td { padding: 8px 10px; border-bottom: 1px solid var(--border); font-size: 14.5px; }
.items tbody tr { opacity: 0; transition: opacity 0.25s; }
.items tbody tr.in { opacity: 1; }
.items td.bad { color: var(--flag); font-weight: 700; background: var(--flag-soft); border-radius: 4px; }

.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.checks li {
  display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; padding: 7px 8px; border-radius: 8px;
  opacity: 0; transform: translateX(-6px); transition: opacity 0.25s, transform 0.25s;
}
.checks li.in { opacity: 1; transform: none; }
.checks li.fail { background: var(--flag-soft); }
.checks .ico { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; }
.checks li.pass .ico { background: var(--ready-soft); color: var(--ready); }
.checks li.fail .ico { background: var(--flag); color: #2a1a00; }
.checks b { font-size: 14px; font-weight: 600; }
.checks p { margin: 2px 0 0; font-size: 14px; color: #ffd9a6; line-height: 1.4; }
.check-foot { margin-top: 10px; font-size: 13px; color: var(--muted); }
.check-foot strong { color: var(--text); }

.draft-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 8px 12px; }
.inv-no { font-family: var(--head); font-size: 15px; font-weight: 600; color: var(--muted); }
.inv-amt { font-family: var(--head); font-size: 34px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; margin: 6px 0 2px; }
.inv-op { color: var(--muted); font-size: 14px; }
.oi { margin: 14px 0 12px; padding: 10px 12px; border-radius: 9px; font-weight: 600; font-size: 14px; display: flex; gap: 10px; align-items: center; }
.oi.ok { background: var(--ready-soft); color: var(--ready); }
.oi.no { background: var(--flag-soft); color: var(--flag); }
.draft-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pop { animation: pop 0.35s ease; }
@keyframes pop { from { transform: scale(0.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* Weekly */
.weekly h3 { font-size: 18px; margin: 2px 0 12px; }
.kpis { margin: 0; display: grid; gap: 10px; }
.kpi { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px; }
.kpi dt { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.kpi dd { margin: 2px 0 0; font-family: var(--head); font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.kpi small { display: block; font-size: 12px; color: var(--faint); }
.kpi dd.bump { color: var(--accent); transition: color 0.6s; }

/* Tracker */
.tracker { margin: 20px 28px 32px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px; }
.legend .chip { font-size: 10.5px; padding: 3px 9px; }
.table-wrap { overflow-x: auto; }
.rows td { padding: 10px; border-bottom: 1px solid var(--border); font-size: 14.5px; vertical-align: middle; }
.rows tr:last-child td { border-bottom: 0; }
.rows td.num { font-weight: 600; font-family: var(--head); }
.rows td.amt { text-align: right; font-weight: 600; }
.rows td.flags { max-width: 330px; color: var(--muted); font-size: 13.5px; }
.rows td.flags > span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rows td.flags .count {
  display: inline-grid; place-items: center; min-width: 19px; height: 19px; margin-right: 6px; border-radius: 10px;
  background: var(--flag-soft); color: var(--flag); font-weight: 700; font-size: 11.5px;
}
.rows td.acts { text-align: right; white-space: nowrap; }
.rows td.acts .btn + .btn, .rows td.acts .btn + a { margin-left: 6px; }
.rows tr.none td { color: var(--faint); text-align: center; padding: 22px; }
.rows tr.flash td { animation: flash 2.2s ease; }
@keyframes flash { 0%, 30% { background: rgba(61, 139, 253, 0.16); } 100% { background: transparent; } }
a.pdf { color: var(--muted); font-size: 13px; text-decoration: none; border-bottom: 1px dotted var(--faint); }
a.pdf:hover { color: var(--text); }

/* Modals + toast */
.modal { background: var(--surface); color: var(--text); border: 1px solid var(--border-2); border-radius: 20px; padding: 22px 24px; width: min(760px, calc(100vw - 32px)); }
.modal::backdrop { background: rgba(3, 5, 8, 0.72); }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.modal-head h3 { font-size: 19px; display: inline; margin-right: 10px; }
.tag { display: inline-block; vertical-align: 3px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--flag); background: var(--flag-soft); padding: 3px 9px; border-radius: 999px; }
.x { background: none; border: 0; font-size: 26px; line-height: 1; color: var(--muted); cursor: pointer; }
.endpoint { display: block; font-size: 13px; color: var(--accent); background: var(--surface-2); border: 1px solid var(--border); padding: 8px 10px; border-radius: 8px; margin: 12px 0 8px; word-break: break-all; }
.modal pre { max-height: 52vh; overflow: auto; background: #080b0f; border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; font-size: 12.5px; line-height: 1.5; margin: 0; }
.modal pre .k { color: #8fc1ff; } .modal pre .s { color: #b6e3a5; } .modal pre .n { color: #ffcb7a; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.zoom { width: auto; max-width: 92vw; padding: 12px; }
.zoom img { display: block; max-height: 86vh; max-width: 88vw; }
.zoom .x { position: absolute; right: 14px; top: 8px; color: #fff; }
.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 50;
  background: #2a1414; color: #ffd0cf; border: 1px solid #5d2525; padding: 10px 16px; border-radius: 10px; font-weight: 500; max-width: min(640px, calc(100vw - 32px));
}

/* Money found: underbilling the ticket left out */
.checks li.gain { background: var(--ready-soft); }
.checks li.gain .ico { background: var(--ready); color: #04210f; }
.checks p.gain { color: #b5f0cd; }
.checks em { font-style: normal; margin-left: 8px; font-weight: 700; font-size: 13px; color: var(--ready); white-space: nowrap; }
.checks em.maybe { color: var(--muted); font-weight: 600; }
.check-foot .caught { display: inline-block; color: var(--ready); font-weight: 600; margin-bottom: 4px; }
.check-foot .caught b { font-family: var(--head); font-size: 17px; color: var(--ready); margin-left: 4px; }
.items td.good { color: var(--ready); font-weight: 700; background: var(--ready-soft); border-radius: 4px; }
.inv-gain { color: var(--ready); font-weight: 700; font-size: 14px; margin-bottom: 2px; }
.oi.nudge { background: var(--accent-soft); color: var(--text); font-weight: 500; flex-wrap: wrap; }
.rows td.gain { color: var(--ready); }
.empty p.small { font-size: 14px; color: var(--faint); margin-top: 12px; }
.kpi.hero { grid-column: 1 / -1; background: linear-gradient(180deg, rgba(47, 191, 113, 0.16), rgba(47, 191, 113, 0.05)); border-color: rgba(47, 191, 113, 0.45); }
.kpi.hero dt { color: var(--text); font-weight: 600; }
.kpi.hero dd, .kpi.hero dd.bump { font-size: 34px; color: var(--ready); }
.cta { margin-top: 14px; padding: 14px; border-radius: 10px; background: var(--accent-soft); border: 1px solid rgba(61, 139, 253, 0.35); }
.cta b { font-family: var(--head); font-size: 15px; }
.cta p { margin: 4px 0 10px; font-size: 13.5px; color: var(--muted); }

/* Leak check form */
.tag.ok { color: var(--ready); background: var(--ready-soft); }
.leak .muted { margin: 10px 0 0; }
.leak .mine { color: var(--ready); font-weight: 600; margin: 8px 0 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin-top: 14px; }
.form-grid label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.form-grid .full { grid-column: 1 / -1; }
.form-grid input, .form-grid textarea {
  font: inherit; font-size: 14.5px; font-weight: 400; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--border-2); border-radius: 8px; padding: 9px 10px; width: 100%;
}
.form-grid input[type="file"] { padding: 7px; }
.form-grid input:focus, .form-grid textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.form-grid .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.leak .fine { font-size: 12px; color: var(--faint); margin: 12px 0 0; }
.form-err { color: #ffb4b2; font-weight: 600; margin: 10px 0 0; }
.leak .done b { display: block; font-family: var(--head); font-size: 22px; margin: 16px 0 6px; }
.leak .done p { color: var(--muted); margin: 0; }

/* Recovered revenue, running total at the top */
.recovered { display: flex; flex-direction: column; align-items: flex-end; padding: 6px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); min-width: 170px; }
.recovered b { font-family: var(--head); font-size: 24px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; color: var(--muted); }
.recovered small { font-size: 11.5px; color: var(--faint); }
.recovered.has { border-color: rgba(47, 191, 113, 0.5); background: linear-gradient(180deg, rgba(47, 191, 113, 0.16), rgba(47, 191, 113, 0.05)); }
.recovered.has b { color: var(--ready); }
.recovered.has small { color: var(--muted); }
.recovered b.bump { color: var(--ready); }

/* Flag citations: clause, dollars, corrected total */
.checks .cite { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 5px 0 4px; }
.cite span { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.cite .clause { background: var(--surface-3); color: var(--text); border: 1px solid var(--border-2); }
.cite .amt { background: var(--ready); color: #04210f; }
.cite .amt.maybe { background: var(--surface-3); color: var(--muted); }
.cite .fix { background: rgba(47, 191, 113, 0.12); color: var(--ready); border: 1px solid rgba(47, 191, 113, 0.4); }
.checks li.fail .cite .clause { border-color: rgba(242, 163, 58, 0.5); }
.check-foot .recon { display: block; color: var(--muted); margin-bottom: 4px; line-height: 1.6; }
.check-foot .recon strong.up { color: var(--ready); font-family: var(--head); font-size: 16px; }
.check-foot .recon .arrow { color: var(--faint); }
.check-foot .recon .caught { margin: 0 0 0 6px; }
.fields .v.none { color: var(--faint); }

/* Rate sheet card */
.ratesheet { margin-bottom: 16px; }
.ratesheet h3 { font-size: 18px; margin: 2px 0 10px; }
.rs-tabs { display: flex; gap: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; padding: 3px; }
.rs-tabs button {
  flex: 1 1 0; min-width: 0; font: inherit; font-size: 12px; font-weight: 600; line-height: 1.2; color: var(--muted); background: none; border: 0;
  border-radius: 7px; padding: 5px 3px; cursor: pointer; text-align: center;
}
.rs-tabs button[aria-selected="true"] { background: var(--surface-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-2); }
.rs-tabs button:hover { color: var(--text); }
.rs-doc { font-size: 12px; color: var(--faint); margin: 8px 2px 6px; line-height: 1.4; }
.rs-doc .warn { color: var(--flag); font-weight: 600; }
.rs-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.rs-rows li {
  display: grid; grid-template-columns: 34px 1fr auto; gap: 8px; align-items: start; padding: 6px 7px; border-radius: 7px;
  border: 1px solid transparent; transition: background 0.4s, border-color 0.4s;
}
.rs-rows .sec { font-size: 12px; font-weight: 700; color: var(--accent); padding-top: 1px; }
.rs-rows .rs-main b { display: block; font-size: 13px; font-weight: 600; }
.rs-rows .rs-main small { display: block; font-size: 11.5px; color: var(--faint); line-height: 1.35; }
.rs-rows .val { font-size: 13px; font-weight: 600; text-align: right; white-space: nowrap; }
.rs-rows .val em { display: block; font-style: normal; color: var(--ready); font-weight: 700; font-size: 12.5px; }
.rs-rows li.hit-gain { background: var(--ready-soft); border-color: rgba(47, 191, 113, 0.45); }
.rs-rows li.hit-gain .sec { color: var(--ready); }
.rs-rows li.hit-block { background: var(--flag-soft); border-color: rgba(242, 163, 58, 0.45); }
.rs-rows li.hit-block .sec { color: var(--flag); }
.rs-foot { display: block; margin-top: 8px; font-size: 11px; color: var(--faint); }

/* Weekly: four small recovered tiles under the hero */
.kpis { grid-template-columns: 1fr 1fr; }
.kpi { grid-column: 1 / -1; }
.kpi.sm { grid-column: auto; padding: 9px 11px; }
.kpi.sm dt { font-size: 12px; }
.kpi.sm dd { font-size: 19px; color: var(--ready); }

/* Tracker */
.tracker h3 small { font-family: var(--body); font-size: 12.5px; font-weight: 500; margin-left: 8px; }
.rows td.ts { font-size: 13px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.rows td.who b { display: block; font-weight: 600; }
.rows td.who small { display: block; font-size: 12px; color: var(--faint); }
.rows td.muted-amt { color: var(--muted); }

/* Responsive */
@media (max-width: 1360px) {
  .kpi { grid-column: auto; }
  .kpi.hero { grid-column: 1 / -1; }
  .ratesheet { margin-bottom: 0; }
  .layout { grid-template-columns: 270px minmax(0, 1fr); }
  .col-weekly { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(260px, 1fr) 2fr; gap: 16px; align-items: start; }
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .step small { display: none; }
}
@media (max-width: 820px) {
  .col-weekly { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .top-right { flex-wrap: wrap; width: 100%; }
  .recovered { order: -1; flex: 1 1 100%; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; min-width: 0; }
}
@media (max-width: 1100px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .photo-card { grid-row: auto; }
  .read-card { grid-column: 1 / -1; order: -1; }
  .fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .top { padding: 12px 16px; flex-wrap: wrap; }
  .brand { flex: 1 1 100%; }
  .top-right { gap: 8px; }
  .form-grid { grid-template-columns: 1fr; }
  .client { display: none; }
  .strip { padding: 12px 16px; flex-wrap: wrap; }
  .steps { gap: 4px; }
  .step { flex-direction: column; text-align: center; gap: 4px; padding: 0; }
  .step .line { display: none; }
  .step b { font-size: 12px; }
  .dot { width: 32px; height: 32px; }
  .clock { align-items: flex-start; }
  .layout { grid-template-columns: minmax(0, 1fr); padding: 16px 16px 0; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .read-card, .photo-card { grid-column: auto; }
  .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tracker { margin: 16px; }
  .items { display: block; overflow-x: auto; }
  .items td, .items th { padding: 6px 6px; font-size: 13px; }
}
