/* Instant Audit page. Tokens come from /site.css. */
[hidden] { display: none !important; }   /* the hidden attribute wins over any display rule below */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.audit-hero h1 { max-width: 20ch; }
.privacy-line { display: flex; gap: 12px; align-items: flex-start; max-width: 64ch; color: var(--ink); background: var(--ok-soft); border: 1px solid color-mix(in srgb, var(--ok) 25%, transparent); border-radius: var(--radius); padding: 14px 16px; font-size: 1rem; }
.privacy-line .lock { color: var(--ok); flex: none; width: 18px; height: 18px; margin-top: 2px; }
.privacy-line .lock svg { width: 18px; height: 18px; }

.audit-hero { padding-block: clamp(24px, 3.5vw, 40px) clamp(20px, 3vw, 32px); }
.audit-hero .wrap { display: grid; gap: 14px; }
.audit-hero h1 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
.audit-hero .drop { padding: clamp(20px, 3vw, 30px) 20px; }
.audit-tool { padding-top: 8px; }
.phone-note { display: none; }
@media (max-width: 640px), (pointer: coarse) and (max-width: 900px) {
  .phone-note { display: grid; gap: 10px; padding: 16px 18px; border: 1px solid color-mix(in srgb, var(--bonnet) 30%, transparent); background: var(--bonnet-soft); border-radius: var(--radius); }
  .phone-note .btn { width: 100%; background: var(--surface); color: var(--bonnet-ink); border: 1.5px solid var(--bonnet); box-shadow: none; }
  .phone-note p { margin: 0; }
}
.help-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 10px; font-weight: 400; }
.todo .ticks li { color: var(--ink); }
.drop { display: grid; justify-items: center; text-align: center; gap: 14px; padding: clamp(28px, 5vw, 48px) 20px; background: var(--surface); border: 2px dashed color-mix(in srgb, var(--bonnet) 35%, var(--line)); border-radius: 20px; box-shadow: var(--shadow); transition: border-color .15s, background .15s; }
.drop.over { border-color: var(--bonnet); background: var(--bonnet-soft); }
.drop.busy { opacity: .7; pointer-events: none; }
.drop-icon { width: 64px; height: 64px; padding: 12px; border-radius: 50%; background: var(--bonnet-soft); color: var(--bonnet); }
.drop-title { font-family: var(--display); font-weight: 700; font-size: clamp(1.25rem, 2.6vw, 1.6rem); }
.drop .cta-row { justify-content: center; }
.drop label.btn { cursor: pointer; }
.drop:has(#file:focus-visible) label.btn { outline: 2px solid var(--bonnet); outline-offset: 2px; }
.status { min-height: 1.6em; margin-top: 14px; text-align: center; color: var(--muted); }
.status.err { color: var(--leak); font-weight: 600; }
.status .bar { display: block; width: min(320px, 80%); height: 4px; margin: 8px auto 0; background: var(--sunk); border-radius: 4px; overflow: hidden; }
.status .bar i { display: block; height: 100%; width: 40%; background: var(--bonnet); border-radius: 4px; animation: slide 1.1s ease-in-out infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

.results { display: grid; gap: 22px; margin-top: 12px; }
.sample-note { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--muted); font-size: 0.92rem; }
.headline { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: clamp(20px, 3vw, 32px); box-shadow: var(--shadow); }
@media (max-width: 860px) { .headline { grid-template-columns: 1fr; } }
.hl-main { display: grid; gap: 4px; align-content: center; }
.hl-kicker { font-weight: 600; font-size: 1.05rem; color: var(--muted); }
.hl-big { font-family: var(--display); font-weight: 700; font-size: clamp(2.4rem, 7vw, 3.6rem); line-height: 1; color: var(--leak); overflow-wrap: anywhere; }
.tiers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tier { display: grid; gap: 2px; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--paper); min-width: 0; }
.tier b { font-family: var(--display); font-size: clamp(1.2rem, 3vw, 1.55rem); overflow-wrap: anywhere; }
.tier-label { font-weight: 700; font-size: 1rem; line-height: 1.3; }
.tier-note { font-size: 0.9rem; color: var(--muted); }
.tier.fixable { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 30%, transparent); } .tier.fixable b { color: var(--ok); }
.tier.check { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 30%, transparent); } .tier.check b { color: var(--warn); }
.tier.final b { color: var(--muted); }
.tier.review b { color: var(--bonnet-ink); }
.tier.zero { background: var(--surface); border-style: dashed; } .tier.zero b { color: var(--muted); }

.monthly { border-left: 4px solid var(--ok); font-size: 1.05rem; background: var(--ok-soft); border-radius: 0 var(--radius) var(--radius) 0; padding: 14px 18px; display: grid; gap: 4px; }
.monthly.none { border-left-color: var(--warn); background: var(--warn-soft); }
.monthly b.big { font-family: var(--display); font-size: clamp(1.3rem, 3vw, 1.7rem); color: var(--ok); }
.monthly .method { font-size: 0.95rem; color: var(--muted); }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 10px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 2px; min-width: 0; }
.kpi span { font-size: 0.92rem; color: var(--muted); line-height: 1.35; }
.kpi b { font-family: var(--display); font-weight: 700; font-size: 1.2rem; overflow-wrap: anywhere; }
.rh { font-size: clamp(1.3rem, 2.4vw, 1.55rem); margin-top: 10px; }
td .what { font-weight: 600; display: block; }
td .code { display: block; font-size: 0.9rem; color: var(--muted); margin-top: 1px; }
td .meaning, td .fix { display: block; color: var(--muted); font-size: 0.95rem; margin-top: 4px; }
td .fix { color: var(--ink); }
.pill.fixable { background: var(--ok-soft); color: var(--ok); }
.pill.check { background: var(--warn-soft); color: var(--warn); }
.pill.final { background: var(--sunk); color: var(--muted); }
.pill.review { background: var(--bonnet-soft); color: var(--bonnet-ink); }
tfoot td { font-weight: 600; background: var(--sunk); }
.notes ul { padding-left: 1.2em; display: grid; gap: 6px; color: var(--muted); }
.notes li b { color: var(--ink); }
.next { margin-top: 6px; }
.next p { color: var(--muted); max-width: 70ch; }
.row-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.print-only { display: none; }

/* Every denied claim: filter chips, the list, the CSV button and "Fix these claims" */
.claims-sub { color: var(--muted); max-width: 75ch; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 12px; }
.chip { min-height: 48px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: inherit; font-size: 0.95rem; cursor: pointer; }
.chip .num { color: var(--muted); margin-left: 4px; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip[aria-pressed="true"] .num { color: inherit; }
.chip:focus-visible { outline: 3px solid var(--focus, #015DAB); outline-offset: 2px; }
td .who { display: block; font-size: 0.92rem; font-weight: 400; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
.claims-table td { vertical-align: top; }
.claims-table .nb { white-space: nowrap; }
.pill.soon { background: var(--warn-soft); color: var(--warn); }
#claims .row-actions .btn { min-height: 48px; }
.csv-note { font-size: 0.95rem; color: var(--muted); margin-top: 4px; }
.fix-cta { margin-top: 14px; border-left: 4px solid var(--ok); }
.fix-cta h3 { margin: 0 0 6px; font-size: clamp(1.2rem, 2.4vw, 1.4rem); }
.fix-cta p { color: var(--muted); max-width: 70ch; }
.fix-cta .fix-price { color: var(--ink); font-weight: 600; }
.fix-sticky { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--paper); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(0, 0, 0, .08); }
.fix-sticky[hidden] { display: none; }
.fix-sticky span { flex: 1 1 auto; font-weight: 600; font-size: 0.95rem; line-height: 1.3; }
.fix-sticky .btn { flex: none; min-height: 48px; }

@media print {
  .nav, footer, .audit-hero .privacy-line a, .drop, .phone-note, .status, #how, .section:not(.audit-tool), .row-actions, .next .cta-row, .skip, .chips, .fix-cta, .fix-sticky, .csv-note { display: none !important; }
  body { background: #fff; }
  .print-only { display: block !important; }
  .print-foot { margin-top: 18px; padding-top: 10px; border-top: 1px solid #bbb; font-size: 0.8rem; color: #333; }
  .page-hero { border: 0; padding: 0 0 12px; }
  .headline, .kpi, .tablewrap { box-shadow: none; break-inside: avoid; }
  .tablewrap { overflow: visible; }
  .tablewrap table, .tablewrap table.wide { min-width: 0; }
}

/* Phones: the reason table reads as cards; outlook pill and amounts sit under the reason */
@media (max-width: 640px) {
  #t-codes td:first-child { padding-top: 12px; }
  .tiers { grid-template-columns: 1fr 1fr; }
  .row-actions .btn { flex: 1 1 100%; }
  .fix-cta .btn { width: 100%; justify-content: center; }
  body.has-sticky { padding-bottom: 84px; }
}
