:root {
  --ink: #080808;
  --muted: #686862;
  --paper: #fafaf7;
  --card: #ffffff;
  --soft: #f1f1ec;
  --forest: #080808;
  --forest-deep: #000000;
  --copper: #9a5b2c;
  --copper-soft: #f5e8dc;
  --danger: #8f2921;
  --danger-soft: #f8e5e2;
  --success: #184d37;
  --success-soft: #e2eee8;
  --line: #deded8;
  --line-strong: #b8b8b0;
  --focus: #1d5f67;
}

* { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 15px/1.5 Arial, Helvetica, system-ui, sans-serif; letter-spacing: -.01em; }
a { color: inherit; text-underline-offset: .2em; }
a:hover { color: var(--muted); }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 30; color: white; background: var(--ink); padding: .75rem 1rem; border-radius: 99px; }
.skip-link:focus { top: 1rem; }

.topbar { background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1320px; min-height: 82px; margin: auto; padding: 1rem 1.6rem; display: flex; align-items: center; gap: 2rem; }
.workspace-line { max-width: 1320px; margin: 0 auto; padding: 0 1.6rem .6rem; color: var(--muted); font-size: .8rem; }
.brand { display: inline-flex; align-items: center; gap: .75rem; color: var(--ink); text-decoration: none; white-space: nowrap; font-size: 1.24rem; font-weight: 600; letter-spacing: -.04em; }
.brand:hover { color: var(--ink); }
.brand small { display: block; margin-top: .1rem; color: var(--muted); font-size: .58rem; line-height: 1; font-weight: 600; letter-spacing: .11em; text-transform: uppercase; }
.brand-mark { display: grid; grid-template-columns: repeat(2, 10px); gap: 3px; width: 23px; flex: 0 0 23px; }
.brand-mark i { display: block; width: 10px; height: 10px; background: var(--ink); border-radius: 4px 7px 4px 7px; }
.brand-mark i:nth-child(2), .brand-mark i:nth-child(3) { border-radius: 7px 4px 7px 4px; }
.nav { display: flex; align-items: center; gap: .15rem; margin: 0 auto; }
.nav a { padding: .55rem .8rem; border-radius: 99px; color: #343431; text-decoration: none; font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); background: var(--soft); }
.identity { display: flex; align-items: center; gap: .8rem; }
.identity-copy { font-size: .78rem; color: var(--muted); line-height: 1.25; }
.identity-copy strong, .identity-copy span { display: block; }
.identity-copy strong { color: var(--ink); font-size: .83rem; }
.role-switch { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: .45rem .85rem; border: 1px solid var(--line); border-radius: 99px; color: var(--ink); background: white; text-decoration: none; font-weight: 600; }
.role-switch:hover { color: var(--ink); border-color: var(--ink); }
.link-button { border: 0; padding: 0; color: var(--ink); background: transparent; text-decoration: underline; cursor: pointer; }

main { max-width: 1240px; margin: 0 auto; padding: 3.5rem 1.6rem 6rem; }
.narrow { max-width: 820px; }
.practice-account { max-width: 36rem; margin: 0 auto; padding: clamp(1.25rem, 4vw, 2rem); }
.practice-account h1 { font-size: clamp(2rem, 5vw, 2.75rem); line-height: 1.1; }
.practice-account code { display: block; margin-top: .75rem; overflow-wrap: anywhere; }
.practice-account > form + form { margin-top: 1.5rem; }
.eyebrow { margin: 0 0 .5rem; color: var(--muted); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; }
h1, h2, h3 { margin-top: 0; color: var(--ink); font-family: Arial, Helvetica, system-ui, sans-serif; letter-spacing: -.045em; }
h1 { margin-bottom: 0; font-size: clamp(2.9rem, 6vw, 5.15rem); line-height: .98; font-weight: 500; }
h2 { margin-bottom: 0; font-size: clamp(1.45rem, 2.5vw, 2rem); line-height: 1.08; font-weight: 500; }
h3 { margin-bottom: 0; font-size: 1.05rem; line-height: 1.2; font-weight: 600; letter-spacing: -.025em; }
p { margin: .5rem 0 0; }
.lede { max-width: 720px; color: #363633; font-size: clamp(1rem, 1.5vw, 1.18rem); line-height: 1.45; }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 2rem; }
.page-head .lede { margin-top: 1rem; }
.page-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.today-hero { display: flex; min-height: 380px; padding: 1rem 0 4.5rem; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.today-hero .eyebrow { margin-top: 2.2rem; }
.today-hero .lede { max-width: 700px; margin: 1.25rem auto 0; }
.today-hero .page-actions { justify-content: center; margin-top: 1.65rem; }
.handoff-pill { display: inline-flex; align-items: center; gap: .55rem; min-height: 38px; max-width: min(100%, 760px); padding: .5rem .95rem; border-radius: 99px; color: #383834; background: var(--soft); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.handoff-pill span { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: var(--success); }

.autopilot-hero { padding: clamp(1.5rem, 4vw, 3rem); color: white; background: var(--ink); border-radius: 24px; }
.autopilot-copy { display: grid; justify-items: start; }
.autopilot-hero .eyebrow, .autopilot-hero .lede { color: #d6d6cf; }
.autopilot-hero h1 { color: white; }
.autopilot-hero form { margin-top: 1.5rem; }
.autopilot-hero .button { color: var(--ink); background: white; border-color: white; }
.autopilot-hero .button:hover { color: var(--ink); background: #eeeeea; }
.outcome-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; margin-top: 2.5rem; }
.outcome-card { min-width: 0; padding: 1.2rem; color: var(--ink); background: white; border-radius: 14px; }
.outcome-step { display: grid; place-items: center; width: 28px; height: 28px; margin-bottom: 1.2rem; color: white; background: var(--success); border-radius: 50%; font-size: .75rem; font-weight: 700; }
.outcome-card h2 { min-height: 2.4em; font-size: 1.05rem; font-weight: 700; letter-spacing: -.025em; }
.outcome-card strong { display: block; margin-top: .85rem; overflow-wrap: anywhere; font-size: 1.1rem; }
.outcome-card p { color: var(--muted); font-size: .78rem; }
.autopilot-close { margin-top: 1.5rem; font-size: clamp(1.35rem, 3vw, 2.15rem); font-weight: 600; letter-spacing: -.04em; }
.today-summary { padding: 3rem 0 2rem; }
.today-summary .lede { margin-top: .8rem; }
.today-summary .page-actions { margin-top: 1.2rem; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 48px; padding: .65rem 1.25rem; border: 1px solid var(--ink); border-radius: 99px; color: white; background: var(--ink); text-decoration: none; font-weight: 600; letter-spacing: -.015em; cursor: pointer; }
.button::after { content: "→"; font-size: 1.05em; }
button.button::after { content: none; }
.button:hover { color: white; background: #2d2d2a; }
.button.secondary { color: var(--ink); background: white; border-color: var(--line); }
.button.secondary:hover { color: var(--ink); border-color: var(--ink); background: white; }
.button.copper { color: white; border-color: var(--copper); background: var(--copper); }
.button.danger { color: var(--danger); border-color: #d4aaa5; background: transparent; }
.button.danger:hover { color: white; border-color: var(--danger); background: var(--danger); }
.button[disabled] { opacity: .55; cursor: wait; }

.card { overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: 18px; }
.card-body { padding: 1.5rem; }
.hero-summary { padding: 1.5rem; margin-bottom: 1rem; }
.hero-summary p { max-width: 800px; font-size: 1.2rem; line-height: 1.45; }
.meta { color: var(--muted); font-size: .8rem; letter-spacing: 0; }
.muted { color: var(--muted); }

.count-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 0 0 3rem; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line); }
.count-card { min-height: 132px; padding: 1.35rem 1.25rem; background: transparent; border-right: 1px solid var(--line); }
.count-card:last-child { border-right: 0; }
.count-card strong { display: block; color: var(--ink); font-size: clamp(2.5rem, 5vw, 4rem); line-height: 1; font-weight: 400; letter-spacing: -.06em; }
.count-card span { display: block; margin-top: .8rem; color: var(--muted); font-size: .82rem; }
.count-card.attention { color: var(--danger); background: transparent; }
.count-card.attention strong { color: var(--danger); }
.count-grid.import-counts { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 1.5rem; }
.count-grid.import-counts .count-card { min-height: 0; padding: 1rem 1.1rem; }
.count-grid.import-counts .count-card strong { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.import-layouts { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.import-layouts li { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.import-layouts li p { width: 100%; margin: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(290px, .7fr); gap: 1rem; align-items: start; }
.stack { display: grid; gap: 1rem; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: 1.35rem 1.45rem 1.1rem; border-bottom: 1px solid var(--line); }
.queue-list { list-style: none; padding: 0; margin: 0; }
.queue-item { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 1rem; padding: 1.25rem 1.45rem; border-bottom: 1px solid var(--line); transition: background-color .15s ease; }
.queue-item:last-child { border-bottom: 0; }
.queue-item:hover { background: #f8f8f4; }
.queue-title { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
.patient { color: var(--ink); font-size: 1.02rem; font-weight: 600; text-decoration: none; }
.patient:hover { text-decoration: underline; }
.queue-details { margin-top: .35rem; color: var(--muted); font-size: .84rem; }
.amount { color: var(--ink); font-size: 1rem; font-weight: 600; white-space: nowrap; }

.badge { display: inline-flex; align-items: center; width: fit-content; min-height: 26px; padding: .18rem .55rem; border-radius: 99px; color: #343431; background: var(--soft); font-size: .7rem; font-weight: 700; letter-spacing: 0; }
.badge.blocked, .badge.release_failed, .badge.rejected, .badge.failed { color: var(--danger); background: var(--danger-soft); }
.badge.awaiting_office, .badge.awaiting_provider, .badge.appeal_drafted, .badge.checking_held { color: #75411f; background: var(--copper-soft); }
.badge.released, .badge.submitted, .badge.paid, .badge.appeal_approved, .badge.sent { color: var(--success); background: var(--success-soft); }
.badge.test-lane { color: #75411f; background: var(--copper-soft); }

.activity { list-style: none; margin: 0; padding: .7rem 1.45rem 1.1rem; }
.activity li { position: relative; padding: .6rem 0 .6rem 1rem; color: #363633; font-size: .82rem; }
.activity li::before { content: ""; position: absolute; left: 0; top: 1rem; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }
.release-list { list-style: none; margin: 0; padding: .7rem 1.45rem 1.1rem; }
.release-list li { padding: .7rem 0; border-bottom: 1px solid var(--line); }
.release-list li:last-child { border: 0; }

.notice { padding: .9rem 1rem; border: 1px solid #a8c4b4; border-radius: 12px; color: var(--success); background: var(--success-soft); margin: 0 0 1rem; }
.notice.warning { color: #6e3b1c; border-color: #dcb38f; background: var(--copper-soft); }
.notice.error { color: var(--danger); border-color: #d8aaa5; background: var(--danger-soft); }

.decision-card { padding: clamp(1.4rem, 3vw, 2.35rem); border-color: var(--ink); border-radius: 22px; }
.decision-card > h2 { max-width: 900px; font-size: clamp(1.8rem, 4vw, 3.25rem); line-height: 1.05; }
.decision-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; margin-top: 2rem; }
.decision-grid section { padding-top: 1rem; border-top: 1px solid var(--line); }
.decision-grid strong { display: block; color: var(--muted); font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; }
.proof-disclosure { margin-top: 1rem; }
.proof-disclosure > summary { padding: 1rem 1.25rem; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 14px; font-weight: 700; cursor: pointer; }
.proof-disclosure > summary::marker { color: var(--muted); }
.proof-disclosure[open] > summary { border-color: var(--line-strong); }
.proof-disclosure-body { padding-top: .1rem; }
.approval-track { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; margin: 1.5rem 0; }
.approval-step { padding: 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.approval-step.complete { border-color: #9fb9aa; background: var(--success-soft); }
.approval-step.current { border-color: #c99b77; background: var(--copper-soft); }
.approval-step span { display: block; margin-top: .2rem; color: var(--muted); font-size: .78rem; }

.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.definition-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem 1.2rem; margin-top: 1rem; }
.definition-grid dt { color: var(--muted); font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.definition-grid dd { margin: .15rem 0 0; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .84rem; }
th { text-align: left; padding: .75rem 1rem; color: var(--muted); font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; border-bottom: 1px solid var(--line); }
td { padding: .85rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
.row-error { background: #fff7f5; }
.issue-list { list-style: none; margin: .8rem 0 0; padding: 0; }
.issue-list li { padding: .75rem 0; border-bottom: 1px solid var(--line); }
.issue-list li:last-child { border: 0; }
.issue-code { display: block; color: var(--muted); font-size: .66rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

.timeline { list-style: none; margin: 1rem 0 0; padding: 0 0 0 1.1rem; border-left: 1px solid var(--line-strong); }
.timeline li { position: relative; padding: 0 0 1.25rem 1rem; }
.timeline li::before { content: ""; position: absolute; left: -1.38rem; top: .4rem; width: 8px; height: 8px; border-radius: 50%; background: var(--card); border: 2px solid var(--ink); }
.timeline time { display: block; color: var(--muted); font-size: .7rem; }
.timeline p { margin: .18rem 0; }

form.stack-form { display: grid; gap: .9rem; margin-top: 1.2rem; }
label { display: grid; gap: .35rem; color: var(--ink); font-weight: 600; }
label small { color: var(--muted); font-weight: 400; }
input, select, textarea { width: 100%; min-height: 48px; padding: .7rem .8rem; color: var(--ink); background: white; border: 1px solid var(--line-strong); border-radius: 10px; }
input:hover, select:hover, textarea:hover { border-color: var(--ink); }
textarea { min-height: 100px; resize: vertical; }
input[type="file"] { padding: .62rem; background: var(--card); }
.form-actions { display: flex; gap: .65rem; align-items: center; flex-wrap: wrap; }
.drop-card { min-height: 260px; display: flex; align-items: center; justify-content: center; padding: 2.2rem; border: 1px dashed var(--line-strong); text-align: center; }
.drop-card form { width: min(100%, 560px); }
.column-list { columns: 2; padding-left: 1.2rem; color: var(--muted); font-size: .82rem; }

.artifact { padding: 1rem; border: 1px solid var(--line); background: var(--paper); border-radius: 12px; }
.artifact-label { color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; font-size: .66rem; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; font: .78rem/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--soft); padding: 1rem; border-radius: 10px; }
.empty { padding: 2rem 1.4rem; color: var(--muted); text-align: center; }
.checklist { list-style: none; margin: .8rem 0 0; padding: 0; }
.checklist li { position: relative; padding: .8rem 0 .8rem 1.8rem; border-bottom: 1px solid var(--line); }
.checklist li::before { content: "✓"; position: absolute; left: .15rem; color: var(--success); font-weight: 800; }

.login-shell { max-width: 1180px; margin: 2vh auto; }
.login-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(300px, .8fr); gap: 2.5rem; align-items: start; }
.login-main h1 { max-width: 12ch; }
.login-demo h1 { font-size: 2rem; }
.login-main .lede { margin-top: 1rem; }
.login-main > .card { margin-top: 2rem; max-width: 460px; }
.login-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2rem; }
.login-card { min-height: 315px; padding: 1.6rem; }
.login-card p { color: var(--muted); }
.login-card .demo-boundary { margin: 1.25rem 0 0; font-size: .82rem; }

.revenue-page { min-width: 0; max-width: 1240px; overflow: hidden; font-variant-numeric: tabular-nums; }
.revenue-hero { padding: 1rem 0 3.5rem; }
.revenue-hero h1 { max-width: 760px; margin-top: .65rem; font-size: clamp(2rem, 4vw, 3.7rem); }
.revenue-hero .lede { margin-top: 1rem; }
.revenue-total { margin: 0; color: var(--success); font-size: clamp(4rem, 10vw, 8rem); line-height: .92; font-weight: 600; letter-spacing: -.065em; }
.revenue-chart-card { margin-bottom: 1rem; }
.revenue-chart-scroll, .revenue-table-scroll { max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; }
.revenue-chart { display: block; width: 100%; min-width: 760px; height: auto; background: var(--paper); }
.revenue-gridline { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.revenue-area { fill: var(--success-soft); stroke: none; }
.revenue-line { fill: none; stroke: var(--success); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.revenue-final-point { fill: var(--success); stroke: var(--paper); stroke-width: 4; vector-effect: non-scaling-stroke; }
.revenue-axis-label { fill: var(--muted); font: 12px Arial, Helvetica, system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.revenue-axis-label-x { font-size: 11px; }
.revenue-final-label { fill: var(--ink); font: 700 14px Arial, Helvetica, system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.revenue-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin: 0 0 1.25rem; }
.revenue-tile { min-width: 0; padding: 1.35rem; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.revenue-tile span { display: block; min-height: 2.4em; color: var(--muted); font-size: .78rem; }
.revenue-tile strong { display: block; margin-top: 1.2rem; color: var(--ink); font-size: clamp(1.65rem, 3vw, 2.4rem); line-height: 1; letter-spacing: -.045em; overflow-wrap: anywhere; }
.revenue-tile a { display: block; margin-top: 1rem; font-size: .78rem; }
.revenue-paid-card { margin-bottom: 1rem; }
.revenue-table { min-width: 720px; }
.revenue-money { text-align: right; white-space: nowrap; }
.revenue-paid-amount { color: var(--success); font-weight: 700; }
.revenue-honesty { margin-top: 1rem; padding: 1.1rem 1.25rem; color: var(--ink); background: var(--paper); border-top: 1px solid var(--copper); border-bottom: 1px solid var(--line); }
.revenue-honesty p { margin: 0; }

.public-actions { display: flex; align-items: center; gap: 1.4rem; margin-left: auto; }
.sales-text-link { color: var(--muted); font-size: .9rem; font-weight: 600; text-decoration: none; }
.sales-text-link:hover { color: var(--ink); }

.site-footer { max-width: 1240px; margin: auto; padding: 2rem 1.6rem 3rem; display: flex; gap: 1.3rem; flex-wrap: wrap; color: var(--muted); font-size: .75rem; border-top: 1px solid var(--line); }
.site-footer strong { color: var(--ink); margin-right: auto; }
.legal-links { margin-left: auto; }
.legal-links a { color: inherit; }
.legal-page { max-width: 720px; }
.legal-page h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); }
.legal-page h2 { margin: 2.2rem 0 .55rem; font-size: 1.2rem; }
.legal-page p, .legal-page li { line-height: 1.65; font-size: .95rem; }
.legal-page ul { margin: .6rem 0 0; padding-left: 1.2rem; }
.legal-page .legal-updated, .legal-page .legal-companion { margin-top: 1.4rem; color: var(--muted); font-size: .8rem; }

@media (max-width: 900px) {
  .topbar-inner { align-items: center; flex-wrap: wrap; gap: .8rem; }
  .nav { order: 3; width: 100%; overflow-x: auto; justify-content: center; }
  .identity { margin-left: auto; }
  main { padding-top: 2.4rem; }
  .today-hero { min-height: 330px; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .count-grid { grid-template-columns: repeat(3, 1fr); }
  .count-card:nth-child(3) { border-right: 0; }
  .count-card:nth-child(n+4) { border-top: 1px solid var(--line); }
  .layout, .detail-grid, .decision-grid, .login-layout { grid-template-columns: 1fr; }
  .outcome-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .revenue-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 580px) {
  body { font-size: 16px; }
  .topbar-inner, main { padding-left: 1rem; padding-right: 1rem; }
  .topbar-inner { min-height: 70px; }
  .brand small, .identity-copy { display: none; }
  .nav { justify-content: flex-start; }
  .nav a { white-space: nowrap; }
  .today-hero { min-height: 0; padding: .5rem 0 3rem; align-items: flex-start; text-align: left; }
  .today-hero .lede { margin-left: 0; }
  .today-hero .page-actions { width: 100%; justify-content: flex-start; }
  .handoff-pill { max-width: 100%; }
  .login-grid, .approval-track { grid-template-columns: 1fr; }
  .outcome-grid { grid-template-columns: 1fr; }
  .queue-item { grid-template-columns: 1fr; gap: .35rem; }
  .count-grid { grid-template-columns: repeat(2, 1fr); }
  .count-card:nth-child(n) { border-top: 0; border-right: 1px solid var(--line); }
  .count-card:nth-child(2n) { border-right: 0; }
  .count-card:nth-child(n+3) { border-top: 1px solid var(--line); }
  .count-grid.import-counts { grid-template-columns: 1fr; }
  .count-grid.import-counts .count-card:nth-child(n) { border-right: 0; border-top: 1px solid var(--line); }
  .count-grid.import-counts .count-card:first-child { border-top: 0; }
  .definition-grid { grid-template-columns: 1fr; }
  .column-list { columns: 1; }
  .button { width: 100%; }
  .page-actions, .form-actions { width: 100%; }
  .revenue-tiles { grid-template-columns: 1fr; }
  .revenue-tile span { min-height: 0; }
  .site-footer { flex-direction: column; gap: .45rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

@media print {
  .topbar, .site-footer, .no-print { display: none !important; }
  body { background: white; }
  main { max-width: none; padding: 0; }
  .card { border-radius: 0; box-shadow: none; }
}

/* ==========================================================================
   Department page — owned by the department_page package.
   Appended section. Nothing above this line is restyled.
   ========================================================================== */
.dept-page .autopilot-hero { margin-bottom: 1rem; }
.dept-honesty { max-width: 720px; margin-top: 1.25rem; color: #d6d6cf; font-size: .82rem; }
.dept-section { margin-top: 1rem; }

.dept-exception-group { border-bottom: 1px solid var(--line); }
.dept-exception-group:last-child { border-bottom: 0; }
.dept-exception-head { padding: 1.15rem 1.45rem .3rem; }
.dept-exception-head h3 { display: flex; align-items: baseline; gap: .5rem; }
.dept-exception-head p { max-width: 70ch; margin-top: .3rem; font-size: .84rem; }
.dept-exception-links { display: grid; justify-items: end; gap: .4rem; align-content: start; }
.dept-exception-links .button { min-height: 40px; padding: .4rem .9rem; font-size: .85rem; }
.dept-link { color: var(--muted); font-size: .78rem; font-weight: 600; text-decoration: underline; }
.dept-link:hover { color: var(--ink); }

.dept-stage { margin: 0 1.45rem 1rem; }
.dept-stage:first-of-type { margin-top: 1.1rem; }
.dept-table { min-width: 0; }
.dept-table td, .dept-table th { padding: .7rem .8rem; }
.dept-table td:first-child { min-width: 190px; }
.ledger-detail > td { padding-top: 0; background: var(--paper); }
.ledger-detail p { margin: .25rem 0 0; font-size: .82rem; }

.evidence-drawer { margin-top: .7rem; }
.evidence-drawer > summary { display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .75rem; border: 1px solid var(--line-strong); border-radius: 99px; color: var(--ink); background: var(--card); font-size: .76rem; font-weight: 700; cursor: pointer; }
.evidence-drawer[open] > summary { border-color: var(--ink); }
.evidence-drawer-body { margin-top: .7rem; padding: .95rem 1.1rem; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.evidence-list { list-style: none; margin: 0; padding: 0; }
.evidence-list li { padding: .5rem 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.evidence-list li:last-child { border-bottom: 0; }
.evidence-list p { font-size: .8rem; }
.evidence-kind { display: inline-block; min-width: 8.5em; color: var(--muted); font-size: .64rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.evidence-drawer code, .provenance-grid code { font: .76rem/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }

.provenance-grid { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .35rem 1.1rem; margin: .9rem 0 0; padding-top: .9rem; border-top: 1px solid var(--line); }
.provenance-grid dt { color: var(--muted); font-size: .64rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding-top: .12rem; }
.provenance-grid dd { min-width: 0; margin: 0; font-size: .82rem; overflow-wrap: anywhere; }
.prov-pair { display: inline-block; margin-right: .8rem; }
.prov-pair strong { color: var(--muted); font-size: .72rem; font-weight: 700; }

.dept-history { padding: 0 1.45rem 1.4rem; }
.dept-history-list { list-style: none; margin: .5rem 0 0; padding: 0; }
.dept-history-list li { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; padding: .5rem 0; border-bottom: 1px solid var(--line); font-size: .82rem; }
.dept-history-list li:last-child { border-bottom: 0; }
.dept-history-list li.current { font-weight: 600; }

.dept-timeline { list-style: none; margin: 0; padding: 0; }
.dept-timeline-item { padding: 1.25rem 1.45rem; border-bottom: 1px solid var(--line); }
.dept-timeline-item:last-child { border-bottom: 0; }
.dept-timeline-head { display: flex; justify-content: space-between; align-items: start; gap: 1rem; }
.dept-timeline-head h3 { display: flex; align-items: baseline; gap: .55rem; flex-wrap: wrap; }
.dept-timeline-head p { max-width: 80ch; font-size: .86rem; }
.dept-timeline-badges { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; justify-content: flex-end; }
.dept-timeline-item .meta { display: inline-block; }

@media (max-width: 900px) {
  .dept-stage { margin-left: 1rem; margin-right: 1rem; }
  .dept-exception-links { justify-items: start; }
  .dept-timeline-head { flex-direction: column; }
  .dept-timeline-badges { justify-content: flex-start; }
}

@media (max-width: 580px) {
  .provenance-grid { grid-template-columns: 1fr; gap: .1rem; }
  .provenance-grid dd { margin-bottom: .55rem; }
  .evidence-kind { min-width: 0; display: block; }
  .dept-exception-links .button { width: 100%; }
}
/* End department page section. */

/* ==========================================================================
   Lanes — shared by the landing page, login, department board, claim strip.
   Appended section. Nothing above this line is restyled.
   ========================================================================== */
.lane-tag { display: inline-flex; align-items: center; min-height: 22px; padding: .1rem .5rem; margin-right: .45rem; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--ink); background: var(--paper); font-size: .66rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }

.lane-board { list-style: none; margin: 0; padding: 0; }
.lane-row { display: grid; grid-template-columns: 44px minmax(0, 1.6fr) minmax(0, 1fr) 150px; gap: 1rem; align-items: center; padding: 1rem 1.45rem; border-bottom: 1px solid var(--line); }
.lane-row:last-child { border-bottom: 0; }
.lane-row.touched { background: #fbfbf8; }
.lane-index { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: var(--muted); background: var(--soft); font-size: .78rem; font-weight: 700; }
.lane-row.touched .lane-index { color: white; background: var(--ink); }
.lane-copy h3 { font-size: 1rem; }
.lane-copy p { margin-top: .2rem; font-size: .82rem; }
.lane-transactions { display: flex; gap: .35rem; flex-wrap: wrap; }
.lane-transactions span { padding: .05rem .45rem; border-radius: 99px; color: var(--muted); background: var(--soft); font-size: .66rem; font-weight: 700; }
.lane-counts { display: flex; gap: 1.2rem; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.lane-count { display: grid; color: var(--muted); font-size: .72rem; }
.lane-count strong { color: var(--ink); font-size: 1.3rem; line-height: 1.1; letter-spacing: -.03em; }
.lane-count.done strong { color: var(--success); }
.lane-count.person strong { color: #75411f; }
.lane-empty { color: var(--muted); font-size: .8rem; }
.lane-next { display: grid; justify-items: end; text-align: right; font-size: .82rem; }
.lane-next .meta { font-size: .66rem; letter-spacing: .06em; text-transform: uppercase; }
.lane-next strong::after { content: " \2192"; color: var(--muted); }
.lane-row:last-child .lane-next strong::after { content: none; }
.lane-ledger > summary .lane-tag { margin-right: .6rem; }
.lane-job-head { margin: 1rem 0 .3rem; font-size: .9rem; }
.lane-job-head:first-child { margin-top: .5rem; }

@media (max-width: 900px) {
  .lane-row { grid-template-columns: 32px minmax(0, 1fr); }
  .lane-counts, .lane-next { grid-column: 2; justify-items: start; text-align: left; }
}

.claim-lanes { margin: 0 0 1.25rem; padding: 1rem 1.25rem; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.claim-lanes-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.claim-lanes-head .eyebrow { margin-bottom: .6rem; }
.claim-lane-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .5rem; list-style: none; margin: 0; padding: 0; }
.claim-lane { display: grid; gap: .35rem; padding: .6rem .7rem; border: 1px dashed var(--line-strong); border-radius: 10px; color: var(--muted); font-size: .76rem; }
.claim-lane.touched { border-style: solid; border-color: var(--ink); color: var(--ink); }
.claim-lane-title { font-weight: 700; }
.claim-lane .badge { min-height: 22px; font-size: .64rem; }

.login-preview { padding: 1.6rem; border-radius: 22px; color: white; background: var(--ink); }
.login-preview .eyebrow { color: #d6d6cf; }
.login-preview h2 { color: white; }
.login-preview .muted { color: #b9b9b1; font-size: .82rem; }
.preview-steps { list-style: none; margin: 1.2rem 0 1.8rem; padding: 0; display: grid; gap: .8rem; }
.preview-steps li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: .8rem; align-items: start; }
.preview-steps .outcome-step { margin: 0; }
.preview-steps strong { display: block; font-size: .95rem; }
.preview-steps span:not(.outcome-step) { display: block; color: #d6d6cf; font-size: .8rem; }
.preview-lanes { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; margin: .8rem 0 1.2rem; padding: 0; counter-reset: lane; }
.preview-lanes li { counter-increment: lane; padding: .25rem .6rem; border: 1px solid #3a3a37; border-radius: 99px; font-size: .74rem; font-weight: 600; }
.preview-lanes li::before { content: counter(lane) " "; color: #8f8f88; }

.money-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; list-style: none; margin: 1rem 0 0; padding: 0; font-variant-numeric: tabular-nums; }
.money-strip li { display: grid; gap: .2rem; padding: .7rem .9rem; border-radius: 10px; border: 1px solid #3a3a37; color: white; }
.money-strip span { color: #b9b9b1; font-size: .66rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.money-strip strong { font-size: .95rem; }
@media (max-width: 580px) { .money-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Practice payment and checkout views. */
.payment-checkout { margin-top: 1rem; border-color: var(--ink); }
.payment-checkout-head { display: flex; justify-content: space-between; gap: 1rem; align-items: start; }
.payment-checkout-head h2 { font-size: clamp(1.8rem, 3vw, 2.8rem); }
.payment-checkout-head p { max-width: 720px; color: var(--muted); }
.payment-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; margin: 1.35rem 0 0; }
.payment-metrics div, .payment-summary article { min-width: 0; padding: .95rem 1rem; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.payment-metrics dt, .payment-summary span { color: var(--muted); font-size: .66rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.payment-metrics dd, .payment-summary strong { display: block; margin: .3rem 0 0; color: var(--ink); font-size: 1.25rem; line-height: 1.1; font-weight: 700; font-variant-numeric: tabular-nums; }
.payment-note { margin-top: 1rem; }
.payment-detail-grid { margin-top: 1rem; }
.payment-disclosure { margin-top: 1rem; }
.payment-disclosure > summary { padding: .75rem 1rem; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--paper); font-weight: 700; cursor: pointer; }
.payment-disclosure[open] > summary { margin-bottom: .8rem; }
.payment-summary { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .7rem; margin: 0 0 1rem; }
.payment-ar-card { margin-top: 1rem; }
.payment-ar-table { min-width: 980px; }
.payment-limit-note { margin-top: 1rem; color: var(--muted); font-size: .84rem; }

@media (max-width: 900px) {
  .payment-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .payment-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 580px) {
  .payment-checkout-head { flex-direction: column; }
  .payment-summary, .payment-metrics { grid-template-columns: 1fr; }
}

/* Practice lead overview. Counts and examples come from the displayed run. */
.dept-page { padding-top: 1.5rem; }
.department-overview { scroll-margin-top: 1rem; }
.department-heading { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 2rem; align-items: center; }
.department-heading h1 { font-size: 2rem; line-height: 1.15; letter-spacing: -.035em; }
.department-heading .lede { max-width: 620px; margin-top: .85rem; color: var(--muted); font-size: 1rem; }
.department-run { display: grid; gap: .9rem; justify-items: end; text-align: right; }
.demo-label { display: inline-block; padding: .35rem .7rem; border: 1px solid var(--line-strong); border-radius: 6px; color: #45453f; background: var(--soft); font-size: .72rem; font-weight: 600; }
.department-run p { max-width: 240px; margin: 0; font-size: .75rem; color: var(--muted); }
.department-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 1.3rem; color: white; background: var(--ink); border-radius: 16px; }
.department-metrics article { min-width: 0; padding: 1.05rem 1.5rem; border-right: 1px solid #3c3c37; }
.department-metrics article:last-child { border-right: 0; }
.department-metrics strong { font-size: 2.75rem; line-height: 1; font-weight: 500; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.department-metrics h2 { margin-top: .6rem; color: white; font-size: .92rem; font-weight: 600; letter-spacing: -.015em; }
.department-metrics p { margin-top: .3rem; color: #bcbcb4; font-size: .74rem; }
.department-run-note { display: flex; justify-content: space-between; gap: .4rem 1rem; flex-wrap: wrap; margin-top: .65rem; color: var(--muted); font-size: .7rem; }
.department-replay { padding: .8rem 1rem; color: var(--success); background: var(--success-soft); border-radius: 8px; font-size: .85rem; }
.department-examples { margin: 1.25rem 0; }
.department-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .9rem; }
.department-section-heading h2 { font-size: 1.35rem; }
.department-section-heading > a { font-size: .8rem; color: var(--muted); }
.department-example-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .85rem; }
.department-example { display: flex; flex-direction: column; align-items: start; padding: 1.15rem; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.department-example h3 { margin-top: 1rem; font-size: 1.1rem; }
.department-example p { margin: .55rem 0 1.1rem; color: var(--muted); font-size: .83rem; }
.department-example a { display: flex; justify-content: space-between; gap: .8rem; width: 100%; margin-top: auto; padding-top: .8rem; border-top: 1px solid var(--line); text-decoration: none; font-size: .79rem; font-weight: 600; }
.department-example a:hover { text-decoration: underline; }
.dept-section { scroll-margin-top: 1rem; }
.dept-page .section-head h2 { font-size: 1.45rem; }
.dept-page .section-head { padding: 1.1rem 1.35rem; }
summary.dept-exception-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.35rem; cursor: pointer; }
summary.dept-exception-head::after { content: '+'; font-size: 1.4rem; color: var(--muted); }
.dept-exception-group[open] > summary::after { content: '−'; }
.dept-exception-head > span:first-child { flex: 1; }
.dept-exception-actor { display: block; max-width: 85ch; margin-top: .2rem; font-size: .78rem; color: var(--muted); }
.department-request-count { padding: .15rem .6rem; border-radius: 6px; background: var(--copper-soft); color: #75411f; font-size: .85rem; font-weight: 700; }
.dept-page .lane-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dept-page .lane-row { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: .65rem; align-items: start; padding: 1.25rem; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
.dept-page .lane-row:nth-child(3n) { border-right: 0; }
.dept-page .lane-row:last-child { border-bottom: 0; }
.dept-page .lane-index { width: 25px; height: 25px; font-size: .68rem; }
.dept-page .lane-copy p { font-size: .78rem; }
.dept-page .lane-transactions { display: none; }
.dept-page .lane-counts { grid-column: 2; gap: 1rem; margin-top: .3rem; }
.dept-page .lane-count strong { font-size: 1.05rem; }
.dept-page .lane-next { display: none; }
.dept-page .lane-copy h3 { font-size: .9rem; }
@media (max-width: 900px) {
  .department-heading { grid-template-columns: minmax(0, 1fr) 230px; gap: 1rem; }
  .department-heading h1 { font-size: 2rem; }
  .department-metrics article { padding: 1.1rem; }
  .department-metrics strong { font-size: 2.3rem; }
  .dept-page .lane-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dept-page .lane-row:nth-child(3n) { border-right: 1px solid var(--line); }
  .dept-page .lane-row:nth-child(2n) { border-right: 0; }
}
@media (max-width: 580px) {
  .department-heading { grid-template-columns: 1fr; gap: 1.3rem; }
  .department-heading h1 { font-size: 1.8rem; }
  .department-run { justify-items: start; text-align: left; gap: .65rem; }
  .department-run form { width: 100%; }
  .department-run p { max-width: none; }
  .department-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 1.2rem; }
  .department-metrics article:nth-child(2n) { border-right: 0; }
  .department-metrics article:nth-child(-n+2) { border-bottom: 1px solid #3c3c37; }
  .department-example-grid { grid-template-columns: 1fr; }
  .department-section-heading { align-items: start; }
  .department-section-heading > a { white-space: nowrap; }
  .dept-page .lane-board { grid-template-columns: 1fr; }
  .dept-page .lane-row:nth-child(n) { border-right: 0; }
  .dept-page .section-head { align-items: start; flex-direction: column; }
}

.dept-timeline-item { scroll-margin-top: 1rem; }
.dept-timeline-item:target { border-left: 3px solid var(--copper); background: #fffdf9; }
.dept-event-context { display: none; }
.dept-timeline-item:target .dept-event-context { display: block; margin: 0 0 1rem; color: var(--muted); font-size: .78rem; }
.dept-page .page-head h1 { font-size: clamp(2.3rem, 4vw, 3.45rem); }

.today-page { padding-top: 1.5rem; }
.practice-demo-autopilot { padding: 1.75rem; border-radius: 16px; }
.practice-demo-autopilot h1 { font-size: 2rem; }
.practice-demo-autopilot .lede { font-size: .95rem; }
.practice-demo-autopilot form { margin-top: 1rem; }
.practice-demo-autopilot .outcome-grid { margin-top: 1.4rem; }
.practice-demo-autopilot .outcome-step { margin-bottom: .7rem; }
.practice-demo-autopilot .outcome-card { padding: 1rem; }
.practice-demo-autopilot .autopilot-close { margin-top: 1rem; font-size: 1.15rem; }
.revenue-page { padding-top: 1.5rem; }
.revenue-hero { padding: .5rem 0 1.5rem; }
.revenue-total { font-size: clamp(3.5rem, 6vw, 5rem); }
.revenue-hero h1 { font-size: 2rem; }
.revenue-hero .lede { font-size: .95rem; }
.autopilot-demo-note { margin-top: .75rem; color: #d6d6cf; font-size: .78rem; }

/* Keep open claim work visible without pushing the payment report off the page. */
#open-claims .revenue-table-scroll { max-height: 360px; }
#open-claims thead { position: sticky; top: 0; background: var(--card); }
#open-claims th:last-child, #open-claims td:last-child { min-width: 110px; white-space: nowrap; }
#open-claims th:nth-child(4) { text-align: right; }

/* Keep payment ownership and next actions readable without sideways scrolling. */
@media (max-width: 640px) {
  .payment-ar-card .table-wrap { overflow: visible; }
  .payment-ar-table { display: block; min-width: 0; width: 100%; }
  .payment-ar-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .payment-ar-table tbody { display: block; }
  .payment-ar-table tr { display: grid; grid-template-columns: minmax(0, 1fr); padding: 1rem; border-bottom: 1px solid var(--line); }
  .payment-ar-table td { display: block; min-width: 0; padding: .5rem 0; border: 0; white-space: normal; overflow-wrap: anywhere; }
  .payment-ar-table td[data-label]::before { content: attr(data-label); display: block; margin-bottom: .25rem; color: var(--muted); font-size: .7rem; font-weight: 600; }
}

/* Payer rule review (ATO-204). */
.rule-filters { display: flex; align-items: end; gap: .6rem; flex-wrap: wrap; }
.rule-filters label { min-width: 11rem; font-size: .8rem; }
.rule-group-index { display: flex; gap: .5rem; flex-wrap: wrap; margin: 0 0 1rem; }
.rule-group-index a { display: inline-flex; align-items: center; gap: .6rem; min-height: 40px; padding: .4rem .9rem; border: 1px solid var(--line); border-radius: 99px; background: var(--card); color: var(--ink); text-decoration: none; font-size: .84rem; }
.rule-group-index strong { font-variant-numeric: tabular-nums; }
.rule-group { margin-top: 1rem; scroll-margin-top: 1rem; }
.rule-id, .rule-title { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: -.02em; overflow-wrap: anywhere; }
.rule-id { color: var(--ink); font-weight: 600; text-decoration: none; }
.rule-title { font-size: clamp(1.5rem, 3.2vw, 2.4rem); }
.badge.rule-status.candidate, .badge.rule-status.source_change { color: #75411f; background: var(--copper-soft); }
.badge.rule-status.live { color: var(--success); background: var(--success-soft); }
.badge.rule-status.retired, .badge.rule-status.rejected { color: var(--muted); background: var(--soft); }
.badge.rule-off { color: var(--danger); background: var(--danger-soft); }
.rule-support { margin-top: .45rem; font-size: .84rem; }
.rule-support-block { margin-top: 1rem; padding-top: .9rem; border-top: 1px solid var(--line); }
.code-chip { display: inline-block; margin: .1rem .15rem; padding: .05rem .45rem; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--paper); font: 600 .74rem ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: nowrap; }
.quote-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; margin: .8rem 0; }
.quote-compare figure { margin: 0; min-width: 0; }
.quote-compare figcaption { color: var(--muted); font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.quote-compare blockquote, .rule-quote { margin: .35rem 0 0; padding: .7rem .9rem; border-left: 3px solid var(--line-strong); background: var(--paper); font-size: .88rem; overflow-wrap: anywhere; }
.quote-compare figure + figure blockquote { border-left-color: var(--copper); }
.quote-compare.compact blockquote { max-height: 7.5em; overflow: hidden; font-size: .8rem; }
.rule-section { margin-top: 1rem; }
.score-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; margin: 1rem 0; font-variant-numeric: tabular-nums; }
.score-grid div { padding: .8rem .9rem; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.score-grid dt { color: var(--muted); font-size: .72rem; }
.score-grid dd { margin: .2rem 0 0; font-size: 1.35rem; font-weight: 600; }
.gate-result { margin: 0 0 .8rem; padding: .9rem 1rem; border-radius: 12px; }
.gate-pass { color: var(--success); background: var(--success-soft); border: 1px solid #a8c4b4; }
.gate-fail { color: var(--danger); background: var(--danger-soft); border: 1px solid #d4aaa5; }
.gate-fail ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.notice.refusal { color: var(--danger); background: var(--danger-soft); border-color: #d4aaa5; }
.gap { color: var(--danger); font-weight: 600; }
.rule-form { display: grid; gap: .8rem; margin-top: 1rem; padding: 1.1rem; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.rule-form h3, .rule-decisions h3 { margin: 0; font-size: 1rem; }
.rule-form-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: .7rem; }
.rule-form .button, .rule-decisions .button { justify-self: start; }
.rule-decisions { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .8rem; margin-top: 1rem; }
.rule-decisions form { display: grid; gap: .5rem; align-content: start; padding: 1.1rem; border: 1px solid var(--line); border-radius: 14px; }
.rule-decisions p { margin: 0; }
@media (max-width: 760px) {
  .quote-compare, .rule-form-grid { grid-template-columns: minmax(0, 1fr); }
  .score-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rule-filters label { min-width: 0; flex: 1 1 9rem; }
}
