/* FYZICAL Copperfield records portal. Palette from confido.health: navy ink, Confido blue accent. */
:root {
  --ink: #17234d; --ink-2: #3a4667; --muted: #737d95; --faint: #a0a8bd;
  --rule: #e6eaf3; --rule-2: #f0f2f8;
  --paper: #ffffff; --surface: #ffffff; --surface-2: #f7f9ff;
  --blue: #4d65ff; --blue-2: #3a50e6; --blue-3: #6b7fff; --blue-tint: #eef1ff; --blue-tint-2: #e4e9ff; --blue-line: #c5cdff;
  --ok: #1f8f6a; --ok-tint: #e3f7f1; --warn: #9a5b00; --warn-tint: #fff3d6; --bad: #c02b0a; --bad-tint: #fde8e3;
  --focus: #316bff;
  --radius: 14px; --radius-sm: 10px; --pill: 999px;
  --shadow: none;
  --shadow-lg: 0 12px 32px rgba(23, 35, 77, .10), 0 2px 6px rgba(23, 35, 77, .06);
  --sidebar: 248px;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; background: var(--paper); color: var(--ink);
  font: 15px/1.5 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.7rem; line-height: 1.2; margin: .1rem 0 .3rem; letter-spacing: -.02em; font-weight: 700; color: var(--ink); }
.auth-card h1, .pagehead h1 { color: var(--ink); }
h2 { font-size: 1.05rem; margin: 0 0 .75rem; font-weight: 650; letter-spacing: -.01em; }
h3 { font-size: .95rem; margin: 1.25rem 0 .5rem; font-weight: 650; }
small, .fine { font-size: .8rem; }
.fine { color: var(--muted); margin: .6rem 0 0; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: .88em; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.bad { color: var(--bad); }
.opt { color: var(--muted); font-weight: 400; font-size: .78rem; }
kbd { font-family: var(--mono); font-size: .7rem; border: 1px solid currentColor; border-radius: 4px; padding: 0 .3rem; opacity: .7; margin-left: .25rem; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
svg.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- shell: sidebar + content ---------- */
.sidebar { width: var(--sidebar); flex: none; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background: var(--surface); border-right: 1px solid var(--rule); padding: 1.1rem .9rem; z-index: 20; }
.brand { display: flex; align-items: center; gap: .7rem; color: var(--ink); padding: .25rem .5rem .9rem; }
.brand:hover { text-decoration: none; }
.brand .mark { width: 34px; height: 34px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 1.05rem; flex: none; }
.brand strong { display: block; font-size: .95rem; line-height: 1.15; letter-spacing: -.01em; }
.brand small { display: block; color: var(--muted); font-size: .72rem; }
.nav { display: flex; flex-direction: column; gap: .15rem; flex: 1; overflow-y: auto; }
.nav .group { margin: .9rem .6rem .35rem; font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); font-weight: 650; }
.nav a { display: flex; align-items: center; gap: .7rem; color: var(--ink-2); padding: .55rem .85rem; border-radius: var(--pill); font-size: .9rem; font-weight: 500; position: relative; }
.nav a svg { color: var(--muted); }
.nav a:hover { background: var(--surface-2); text-decoration: none; color: var(--ink); }
.nav a.on { background: var(--blue-tint); color: var(--blue); font-weight: 600; }
.nav a.on svg { color: var(--blue); }
.nav a.on::after { content: none; position: absolute; right: -.9rem; top: .4rem; bottom: .4rem; width: 3px; border-radius: 3px 0 0 3px; background: var(--blue); }
.nav a .count { margin-left: auto; font-size: .7rem; font-weight: 700; background: var(--blue); color: #fff; border-radius: 999px; padding: .05rem .45rem; min-width: 1.3rem; text-align: center; }
.who { border-top: 1px solid var(--rule); margin: .75rem -.9rem 0; padding: .9rem .9rem 0; display: flex; align-items: center; gap: .6rem; font-size: .85rem; }
.who .avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--blue-tint); color: var(--blue); display: grid; place-items: center; font-weight: 700; font-size: .8rem; flex: none; }
.who .id { flex: 1; min-width: 0; }
.who .id span { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who small { display: block; color: var(--muted); font-size: .72rem; }
.who form { margin: 0; }
.iconbtn { border: 0; background: transparent; color: var(--muted); padding: .4rem; border-radius: 8px; cursor: pointer; display: grid; place-items: center; }
.iconbtn:hover { background: var(--blue-tint); color: var(--blue); }

.backdrop { display: none; }
.shell { flex: 1; min-width: 0; display: flex; flex-direction: column; }
@media (min-width: 961px) {
  body.with-nav { background: linear-gradient(90deg, var(--surface) 0 calc(var(--sidebar) - 1px), var(--rule) calc(var(--sidebar) - 1px) var(--sidebar), var(--paper) var(--sidebar)); }
  /* Billing review gets the whole width: the sidebar collapses to an icon rail. */
  body.reviewing { --sidebar: 68px; }
  body.reviewing .sidebar { padding: 1.1rem .75rem; align-items: center; }
  body.reviewing .brand span:not(.mark), body.reviewing .nav .group, body.reviewing .nav a span.txt, body.reviewing .who .id { display: none; }
  body.reviewing .brand { padding: .25rem 0 .9rem; }
  body.reviewing .nav { width: 100%; }
  body.reviewing .nav a { justify-content: center; padding: .6rem 0; }
  body.reviewing .nav a.on::after { right: -.75rem; }
  body.reviewing .who { flex-direction: column; margin: .75rem -.75rem 0; padding: .9rem 0 0; width: calc(100% + 1.5rem); }
}
.mobilebar { display: none; }
.page { width: 100%; max-width: 1220px; margin: 0 auto; padding: 2rem 2.5rem 4rem; }
.page.wide { max-width: none; padding: 0; }
.pagehead { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.headactions { display: flex; gap: .5rem; flex-wrap: wrap; }
.eyebrow { text-transform: uppercase; letter-spacing: .1em; font-size: .68rem; font-weight: 650; color: var(--blue); margin: 0 0 .15rem; }
.eyebrow a { color: inherit; }
.meta { color: var(--muted); margin: 0; font-size: .9rem; }

/* ---------- cards & tiles ---------- */
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.35rem 1.5rem; margin-bottom: 1.25rem; box-shadow: var(--shadow); min-width: 0; }
.card.narrow { max-width: 620px; margin: 3rem auto; }
.card.center { text-align: center; }
.narrowcard { max-width: 540px; }
.cardhead { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: .75rem; flex-wrap: wrap; }
.cardhead h2 { margin: 0; }
.total { color: var(--muted); } .total strong { color: var(--ink); font-size: 1.1rem; margin-left: .35rem; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.25rem; align-items: start; }
.stackcol > .card { margin-bottom: 1.25rem; }
.empty { color: var(--muted); padding: 1rem 0; margin: 0; text-align: center; }

.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.tile { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.15rem 1.25rem; color: var(--ink-2); box-shadow: var(--shadow);
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: .75rem; font-size: .86rem; transition: border-color .15s, box-shadow .15s; }
a.tile:hover { text-decoration: none; border-color: var(--blue); }
.tile .label { grid-column: 1; grid-row: 1; color: var(--muted); font-weight: 500; }
.tile .num { grid-column: 1; grid-row: 2; text-align: left; font-size: 2rem; font-weight: 700; color: var(--ink); line-height: 1.15; letter-spacing: -.02em; margin-top: .25rem; }
.tile .ico { grid-column: 2; grid-row: 1 / span 2; align-self: start; width: 42px; height: 42px; border-radius: 50%; background: var(--blue-tint); color: var(--blue); display: grid; place-items: center; }
.tile .ico svg { width: 20px; height: 20px; }
.tile.attn .ico { background: var(--warn-tint); color: var(--warn); }
.tile.attn .num { color: var(--warn); }
.tile.good .ico { background: var(--ok-tint); color: var(--ok); }
.tile .sub { grid-column: 1 / -1; font-size: .78rem; color: var(--muted); margin-top: .35rem; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border: 1px solid var(--rule); background: var(--surface); color: var(--ink); padding: .55rem 1.15rem; border-radius: var(--pill); font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s; box-shadow: 0 1px 1px rgba(23, 35, 77, .04); }
.btn:hover { border-color: var(--blue-line); background: var(--blue-tint); color: var(--blue); text-decoration: none; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 6px 16px rgba(77, 101, 255, .28); }
.btn.primary:hover { background: var(--blue-2); border-color: var(--blue-2); color: #fff; }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.small { padding: .32rem .8rem; font-size: .8rem; }
.btn.danger { color: var(--bad); }
.btn.danger:hover { background: var(--bad-tint); border-color: var(--bad); color: var(--bad); }
.btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn.approve { background: var(--ok); border-color: var(--ok); color: #fff; padding: .7rem 1.4rem; font-size: .95rem; box-shadow: 0 6px 16px rgba(31, 143, 106, .25); }
.btn.approve:hover { filter: brightness(.94); color: #fff; }
.linkbtn { background: none; border: 0; color: var(--blue); font: inherit; font-size: .85rem; font-weight: 500; cursor: pointer; padding: 0 .2rem; }
.linkbtn:hover { text-decoration: underline; }
.linkbtn.danger { color: var(--bad); }
form.inline { display: inline; margin: 0; white-space: nowrap; }

/* ---------- pills, notices ---------- */
.pill { display: inline-flex; align-items: center; gap: .3rem; font-size: .72rem; font-weight: 600; padding: .15rem .6rem; border-radius: 999px; background: var(--rule-2); color: var(--ink-2); white-space: nowrap; line-height: 1.4; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; }
.pill.ok { background: var(--ok-tint); color: var(--ok); }
.pill.warn { background: var(--warn-tint); color: var(--warn); }
.pill.bad { background: var(--bad-tint); color: var(--bad); }
.pill.info { background: var(--blue-tint); color: var(--blue); }
.notice { background: var(--ok-tint); color: var(--ok); border: 1px solid transparent; border-radius: var(--radius-sm); padding: .65rem 1rem; margin-bottom: 1.25rem; font-weight: 550; display: flex; gap: .5rem; align-items: center; }
.alert { background: var(--bad-tint); color: var(--bad); border-radius: var(--radius-sm); padding: .65rem 1rem; margin: .75rem 0; }
.callout { border: 1px solid var(--blue-line); border-left: 4px solid var(--blue); background: var(--blue-tint); padding: .85rem 1.1rem; border-radius: var(--radius-sm); margin-bottom: 1.25rem; font-size: .92rem; }
.callout.warn { border-color: var(--warn-tint); border-left-color: var(--warn); background: var(--warn-tint); }
.callout.bad { border-color: var(--bad-tint); border-left-color: var(--bad); background: var(--bad-tint); }

/* ---------- tables ---------- */
.tablewrap { overflow-x: auto; margin: 0 -1.5rem; padding: 0 1.5rem; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: .6rem .6rem; border-bottom: 1px solid var(--rule); white-space: nowrap; }
td { padding: .8rem .6rem; border-bottom: 1px solid var(--rule-2); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
td a { font-weight: 500; }
tr.rowlink { transition: background .1s; }
tr.rowlink:hover td { background: var(--surface-2); }
tr.rowlink:hover td:first-child a { text-decoration: underline; }
tr.subrow td { padding-top: 0; padding-bottom: .5rem; }
tr.subrow details summary { font-size: .78rem; color: var(--muted); cursor: pointer; }
tr.subrow details summary:hover { color: var(--blue); }
tr.inactive td { opacity: .55; }
.ledger tr.subtotal td, tfoot td { font-weight: 650; background: var(--surface-2); border-bottom: 0; }
.ledger tr.subtotal td { border-radius: 0; }
tr.adj td { background: var(--warn-tint); }
.older { font-size: .82rem; color: var(--muted); margin: .25rem 0; }
.doctype { display: inline-flex; align-items: center; gap: .55rem; font-weight: 600; }
.doctype .fileico { width: 32px; height: 32px; border-radius: 8px; background: var(--blue-tint); color: var(--blue); display: grid; place-items: center; flex: none; }
.doctype .fileico svg { width: 16px; height: 16px; }
.doctype .muted { font-weight: 400; }

/* ---------- forms ---------- */
label { display: flex; flex-direction: column; gap: .3rem; font-size: .8rem; font-weight: 600; color: var(--ink-2); }
input, select, textarea { font: inherit; font-size: .92rem; color: var(--ink); background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-sm); padding: .5rem .7rem; min-width: 0; font-weight: 400; transition: border-color .15s, box-shadow .15s; }
input:hover, select:hover, textarea:hover { border-color: var(--blue-line); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-tint); }
textarea { resize: vertical; }
input[type=file] { padding: .3rem; }
input[type=file]::file-selector-button { font: inherit; font-size: .82rem; font-weight: 600; color: var(--blue); background: var(--blue-tint); border: 0; border-radius: 6px; padding: .3rem .7rem; margin-right: .6rem; cursor: pointer; }
input[type=checkbox] { accent-color: var(--blue); width: 16px; height: 16px; }
label.check { flex-direction: row; align-items: center; gap: .5rem; font-weight: 500; }
label.check.strong { font-weight: 650; color: var(--ink); }
.stack { display: flex; flex-direction: column; gap: .8rem; }
.stack.tight { gap: .45rem; }
.formrow { display: flex; gap: .75rem; align-items: flex-end; flex-wrap: wrap; margin-bottom: .6rem; }
.formrow label { flex: 1 1 160px; }
.formrow .grow, .grow { flex: 2 1 240px; }
.rowform { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-top: .5rem; }
.formgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.formgrid fieldset { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; align-content: start; }
.formgrid legend { font-weight: 650; margin-bottom: .75rem; font-size: 1rem; }
.span2 { grid-column: 1 / -1; }
.checks { grid-column: 1 / -1; display: flex; flex-direction: column; gap: .45rem; }
.actions { display: flex; justify-content: flex-end; gap: .5rem; }
.upload { border-top: 1px solid var(--rule); margin-top: 1.25rem; padding-top: .25rem; }
.searchbar { display: flex; gap: .75rem; align-items: flex-end; flex-wrap: wrap; margin-bottom: 1rem; padding: 1rem; background: var(--surface-2); border: 1px solid var(--rule); border-radius: var(--radius); }
.searchbar label { flex: 1 1 170px; }
.tabs { display: inline-flex; gap: .2rem; border: 1px solid var(--rule); border-radius: var(--pill); padding: .25rem; margin-bottom: 1rem; background: var(--surface); flex-wrap: wrap; }
.tabs a, .tabs span { padding: .4rem .95rem; color: var(--muted); font-size: .86rem; font-weight: 500; border-radius: var(--pill); }
.tabs a:hover { color: var(--ink); text-decoration: none; background: var(--paper); }
.tabs .on { color: var(--blue); background: var(--blue-tint); font-weight: 600; }
.plain { list-style: none; padding: 0; margin: 0 0 .5rem; } .plain li { padding: .3rem 0; font-size: .9rem; border-bottom: 1px solid var(--rule-2); } .plain li:last-child { border-bottom: 0; }
details.menu { position: relative; display: inline-block; text-align: left; }
details.menu summary { cursor: pointer; color: var(--blue); font-size: .85rem; font-weight: 500; list-style: none; }
details.menu[open] > :not(summary) { margin-top: .5rem; }
details.menu[open] { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-sm); padding: .7rem; box-shadow: var(--shadow-lg); }
.linkbox { display: flex; gap: .5rem; margin: 1rem 0; } .linkbox input { flex: 1; font-family: var(--mono); font-size: .8rem; }

/* ---------- auth pages ---------- */
body.auth { display: block; background: #fff; }
.auth-card { max-width: 440px; margin: 9vh auto 3rem; background: var(--surface); border: 1px solid var(--rule); border-radius: 20px; padding: 2.25rem; box-shadow: 0 20px 50px rgba(23, 35, 77, .08); }
.auth-card .brand { padding: 0 0 1.5rem; }
.auth-card h1 { font-size: 1.5rem; }
.auth-card form { margin-top: 1.25rem; }
.steps { padding-left: 1.2rem; color: var(--ink-2); font-size: .9rem; }
.qr { display: grid; place-items: center; background: #fff; border-radius: 10px; padding: .5rem; margin: .75rem auto; width: fit-content; border: 1px solid var(--rule); }
.qr svg { width: 200px; height: 200px; }
.key { display: flex; flex-direction: column; align-items: center; gap: .2rem; font-size: .75rem; color: var(--muted); }
.key code { font-size: .85rem; letter-spacing: .08em; color: var(--ink); word-break: break-all; text-align: center; }

/* ---------- billing review: source document beside extracted lines ---------- */
body.reviewing .shell main { height: 100vh; }
.review { display: grid; grid-template-columns: minmax(0, 1fr) minmax(560px, 1fr); height: 100%; }
.review .notice { position: absolute; }
.source { display: flex; flex-direction: column; border-right: 1px solid var(--rule); background: var(--rule-2); min-height: 0; }
.sourcehead { display: flex; justify-content: space-between; padding: .6rem 1.25rem; font-size: .82rem; color: var(--muted); background: var(--surface); border-bottom: 1px solid var(--rule); }
.source iframe { flex: 1; width: 100%; border: 0; background: #fff; }
.nosource { display: grid; place-items: center; flex: 1; padding: 2rem; text-align: center; color: var(--muted); }
.lines { overflow-y: auto; padding: 1.5rem 1.75rem 2rem; background: var(--surface); }
.lines h2 { margin-top: 1.5rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.linetable td { padding: .45rem .4rem; }
.linetable tr[data-line].selected td { background: var(--blue-tint); }
.linetable tr[data-line].selected td:first-child { box-shadow: inset 3px 0 0 var(--blue); }
.linetable tr.flag td { background: var(--bad-tint); }
.lineform { display: flex; gap: .3rem; margin: 0; }
.cpt { width: 5.2rem; } .mods { width: 4.2rem; } .units { width: 3.6rem; }
.addline { display: flex; gap: .4rem; margin-top: .75rem; flex-wrap: wrap; align-items: center; padding: .75rem; background: var(--surface-2); border: 1px solid var(--rule); border-radius: var(--radius-sm); }
.addmissed summary { cursor: pointer; color: var(--blue); font-size: .88rem; margin-top: .75rem; }
.adjust summary { cursor: pointer; color: var(--blue); font-size: .82rem; }
.approvebar { position: sticky; bottom: -2rem; background: var(--surface); border-top: 1px solid var(--rule); margin: 1.5rem -1.75rem 0; padding: 1rem 1.75rem; display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; box-shadow: 0 -8px 20px rgba(23, 35, 77, .04); }
.approvebar form { margin: 0; }
.approvenote { flex: 1 1 200px; font-size: .8rem; color: var(--muted); }
.navlinks { display: flex; gap: 1rem; align-items: center; font-size: .88rem; }
.keys { font-size: .78rem; color: var(--muted); margin-top: .75rem; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  body { display: block; }
  .sidebar { position: fixed; top: 0; left: 0; bottom: 0; height: auto; transform: translateX(-100%); transition: transform .2s ease; box-shadow: none; }
  body.nav-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
  .backdrop { display: none; position: fixed; inset: 0; background: rgba(23, 35, 77, .35); z-index: 15; border: 0; padding: 0; }
  body.nav-open .backdrop { display: block; }
  .mobilebar { display: flex; align-items: center; gap: .6rem; padding: .55rem 16px; background: var(--surface); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 10; }
  .mobilebar .brand { padding: 0; flex: 1; }
  .mobilebar .brand .mark { width: 28px; height: 28px; font-size: .9rem; border-radius: 8px; }
  .page { padding: 1.25rem 16px 3rem; }
  .grid2, .formgrid { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .review { grid-template-columns: 1fr; height: auto; }
  body.reviewing .shell main { height: auto; }
  .source { height: 60vh; }
  .lines { overflow: visible; }
}
@media (max-width: 600px) {
  .hide-sm { display: none; }
  .ledger .subtotal-label { font-size: .85rem; }
  table.docs td, table.docs th { padding-left: .3rem; padding-right: .3rem; }
  .card { padding: 1.1rem 1rem; }
  .tablewrap { margin: 0 -1rem; padding: 0 1rem; }
  .formgrid fieldset { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: 1fr 1fr; gap: .6rem; }
  .tile { padding: .9rem 1rem; }
  .tile .num { font-size: 1.6rem; }
  .tile .ico { width: 34px; height: 34px; }
  .auth-card { margin: 1rem 16px; padding: 1.5rem; }
  .lines { padding: 1rem 16px 2rem; }
  .approvebar { margin: 1.5rem -16px 0; padding: 1rem 16px; }
  h1 { font-size: 1.4rem; }
}

/* one patient, several cases */
.patientcell { vertical-align: top; }
tr.multi-next td:first-child { border-left: 3px solid var(--blue-line); }
.othercases .caselist { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .6rem; }
.casechip { display: flex; flex-direction: column; gap: .3rem; padding: .75rem .9rem; border: 1px solid var(--rule); border-radius: var(--radius-sm); color: var(--ink); font-size: .86rem; background: var(--surface); }
.casechip:hover { text-decoration: none; border-color: var(--blue); }
.casechip.current { border-color: var(--blue); background: var(--blue-tint); }
.ledgerscope { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; }
.ledgerscope .tabs { margin-bottom: .75rem; }
.ledgerscope .pick summary { font-size: .82rem; color: var(--muted); cursor: pointer; }
.ledgerscope .pickrow { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; margin: .4rem 0 .75rem; }
.ledger tr.casehead td { background: var(--blue-tint); color: var(--blue); font-weight: 650; }
.ledger tr.casetotal td { background: var(--rule-2); }
