/* Hallmark · shape: app screen · genre: modern-minimal · theme: Dusk (deal 1/3, seed invoicing-small-studio-issue-9ed0·8ffcb64d·2026-10-30·r0)
 * nav: slate bar, the wordmark, five sections as a ruled list with a periwinkle dot on the open one, the new-invoice pill and the signed-in person · signature: the overview as the hour: what is owed set on the fog of a dusk photograph with the accounts in smoked glass beside it, the overdue closing the list as an apricot strip; invoices as white cards in bone wells · states: empty, error (apricot alert), loading (the editor), full; the bank page is live · dusk: fog/periwinkle-apricot/glass
 * axes: dark/grotesk-sans/cool · posture: committed · contrast: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H5 E4 S5 R4 V5 · weakest: E, money screens want many figures; they live in rows, one ruled tally and the month strip, never in tiles */
@import url("./tokens.css");
@import url("./base.css");

:root { --key-h: 44px; --strip-h: 140px; }

body { font-size: 0.9688rem; }
.muted { color: var(--color-muted); }
.sub { display: block; font-size: 0.8125rem; color: var(--color-muted); }
.r { text-align: right; }
.num { font-variant-numeric: tabular-nums; }
.amt { font-variant-numeric: tabular-nums; white-space: nowrap; }
.amt__c { color: var(--color-muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: var(--space-md); top: -100px; z-index: var(--z-toast); padding: var(--space-xs) var(--space-sm); border-radius: var(--radius-pill); background: var(--color-accent); color: var(--color-accent-ink); }
.skip:focus { top: var(--space-xs); }
.page { padding-block: var(--space-xl) var(--space-2xl); }
.narrow { max-width: 760px; }
.narrow .lead { margin-top: var(--space-sm); color: var(--color-ink-2); }
/* Blazor moves focus to the page's heading after a navigation, for screen readers; no ring on it. */
h1:focus, [tabindex="-1"]:focus { outline: none; }
a { color: inherit; }

/* The bar ----------------------------------------------------------------- */
.topbar { position: sticky; top: 0; z-index: var(--z-sticky-nav); background: color-mix(in oklab, var(--color-paper) 82%, transparent); -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.35); backdrop-filter: blur(var(--glass-blur)) saturate(1.35); box-shadow: inset 0 -1px 0 var(--color-rule); }
.topbar__inner { display: flex; align-items: center; gap: var(--space-xl); min-height: 64px; }
.wordmark { display: inline-flex; align-items: center; gap: var(--space-xs); margin: 0; font-family: var(--font-display); font-weight: var(--display-weight); font-size: 1.375rem; letter-spacing: var(--tracking-display); text-decoration: none; white-space: nowrap; }
.wordmark__mark { width: 14px; height: 14px; border-radius: 50%; background: var(--color-accent); box-shadow: inset 0 -3px 0 var(--color-accent-2); }
.wordmark__studio { margin-left: var(--space-2xs); font-family: var(--font-body); font-size: var(--text-sm); font-weight: 500; letter-spacing: 0; color: var(--color-muted); }
.wordmark--day { color: var(--color-day-ink); }
.wordmark--day .wordmark__mark { box-shadow: none; background: var(--color-day-ink); }
.nav { display: flex; gap: var(--space-lg); min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav__link { display: inline-flex; align-items: center; gap: var(--space-xs); min-height: 40px; color: var(--color-muted); font-size: var(--text-sm); font-weight: 500; text-decoration: none; white-space: nowrap; transition: color var(--dur-micro) var(--ease-out); }
.nav__link:hover { color: var(--color-ink); }
.nav__dot { width: 6px; height: 6px; border-radius: 50%; background: transparent; }
.nav__link[aria-current="page"] { color: var(--color-ink); }
.nav__link[aria-current="page"] .nav__dot { background: var(--color-accent); }
.topbar__end { margin-left: auto; display: flex; align-items: center; gap: var(--space-md); }
.topbar__end form { margin: 0; }
.who { display: inline-flex; align-items: center; gap: var(--space-xs); font-size: var(--text-sm); font-weight: 500; white-space: nowrap; }
.initial { display: inline-grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 50%; background: color-mix(in oklab, var(--color-light) 8%, transparent); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--color-light) 10%, transparent); color: var(--color-ink-2); font-size: 0.8125rem; font-weight: 600; }
.initial--lg { width: 40px; height: 40px; font-size: var(--text-md); }

/* Keys: one periwinkle pill, ghosts beside it ------------------------------ */
.pill, .ghost { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs); min-height: var(--key-h); padding: 0 var(--space-lg); border: 0; border-radius: var(--radius-pill); font: 600 0.9375rem/1 var(--font-body); text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out), box-shadow var(--dur-micro) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
.pill { background: var(--color-accent); color: var(--color-accent-ink); box-shadow: inset 0 1px 0 color-mix(in oklab, var(--color-light) 35%, transparent); }
.pill:hover { background: var(--color-accent-hi); box-shadow: inset 0 1px 0 color-mix(in oklab, var(--color-light) 35%, transparent), 0 0 0 4px color-mix(in oklab, var(--color-accent) 22%, transparent); }
.ghost { background: color-mix(in oklab, var(--color-light) 5%, transparent); color: var(--color-ink); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--color-light) 9%, transparent); font-weight: 500; }
.ghost:hover { background: color-mix(in oklab, var(--color-light) 9%, transparent); }
.ghost--day { color: var(--color-well-ink); background: var(--color-well-2); box-shadow: none; }
.pill--small, .ghost--small { min-height: 34px; padding: 0 var(--space-md); font-size: 0.8125rem; }
.pill:active, .ghost:active, .signin__person:active { transform: translateY(1px); }
.pill:disabled, .ghost:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; transform: none; }

/* Glass ------------------------------------------------------------------- */
.glass { background: var(--glass); border-radius: var(--radius-card); -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.35); backdrop-filter: blur(var(--glass-blur)) saturate(1.35); box-shadow: var(--glass-hi), var(--shadow-card); }
.glass--table { padding: var(--space-xs) var(--space-lg) var(--space-sm); overflow-x: auto; }
.glass--list { padding: var(--space-xs); }
.chip { display: inline-flex; align-items: center; gap: var(--space-xs); padding: var(--space-2xs) var(--space-sm); border-radius: var(--radius-pill); background: color-mix(in oklab, var(--color-light) 7%, transparent); color: var(--color-ink-2); font-size: 0.8125rem; font-weight: 500; }
.chip__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--color-accent); }

/* The hour: the overview and sign-in, set on a dusk photograph ------------- */
.hour { position: relative; overflow: hidden; isolation: isolate; min-height: 560px; display: grid; align-items: center; padding-block: var(--space-2xl) var(--space-3xl); }
.hour--full { min-height: 100svh; }
.hour__photo { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; filter: contrast(1.04) saturate(1.03); animation: hour-drift 48s var(--ease-in-out) infinite alternate; }
.hour__scrim { position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse 58% 72% at 22% 56%, color-mix(in oklab, var(--color-fog) 80%, transparent), transparent 80%), linear-gradient(to bottom, transparent 66%, var(--color-paper)); }
@keyframes hour-drift { from { transform: scale(1.06) translateX(0); } to { transform: scale(1.06) translateX(-3%); } }
.hour__inner { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: var(--space-2xl); align-items: center; }
.hour__copy { color: var(--color-day-ink); max-width: 560px; }
.hour__copy .lead { margin-top: var(--space-md); color: var(--color-day-muted); font-size: var(--text-lg); max-width: 46ch; }
.hour__copy .amt__c { color: var(--color-day-muted); }
.hour__copy h1 { font-size: clamp(2.4rem, 4.2vw, 3.6rem); line-height: 1.04; max-width: 16ch; }
.hour__date { font-weight: 500; color: var(--color-day-muted); margin-bottom: var(--space-sm); }
.figure-head .amt__c { font-size: 0.6em; }
.hour--full .hour__copy .wordmark { margin-bottom: var(--space-xl); }

.accounts { padding: var(--space-md) var(--space-lg) var(--space-lg); }
.accounts__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); padding-bottom: var(--space-sm); }
.accounts__head h2 { font-size: var(--text-lg); }
.accounts__list { list-style: none; margin: 0; padding: 0; }
.account { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: var(--space-sm); padding: var(--space-sm) 0; box-shadow: inset 0 1px 0 color-mix(in oklab, var(--color-light) 7%, transparent); animation: rise var(--dur-long) var(--ease-out) both; }
.account:nth-child(2) { animation-delay: 60ms; } .account:nth-child(3) { animation-delay: 120ms; } .account:nth-child(4) { animation-delay: 180ms; } .account:nth-child(5) { animation-delay: 240ms; } .account:nth-child(6) { animation-delay: 300ms; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.account__who { display: grid; min-width: 0; }
.account__who a { font-weight: 500; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account__who a:hover { text-decoration: underline; text-underline-offset: 0.16em; }
.account__who .muted { font-size: 0.8125rem; }
.account__sum { min-width: 9ch; text-align: right; font-weight: 500; }
.strip { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-sm); margin-top: var(--space-sm); padding: var(--space-sm) var(--space-md); border-radius: var(--radius-inner); background: color-mix(in oklab, var(--color-accent-2) 12%, transparent); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--color-accent-2) 30%, transparent); font-size: var(--text-sm); }
.strip p { color: var(--color-ink-2); }
.strip strong { color: var(--color-accent-2); font-weight: 600; }
.strip form { margin: 0; }
.strip__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--color-accent-2); animation: breathe 2.8s var(--ease-in-out) infinite; }
@keyframes breathe { 50% { box-shadow: 0 0 0 5px color-mix(in oklab, var(--color-accent-2) 22%, transparent); } }
.strip__action { border: 0; padding: 0; background: none; color: var(--color-accent-2); font: 600 var(--text-sm)/1.2 var(--font-body); cursor: pointer; white-space: nowrap; }
.strip__action:hover { text-decoration: underline; text-underline-offset: 0.16em; }

/* Status: periwinkle is done and matched, apricot is owed and open ---------- */
.state { display: inline-flex; align-items: center; gap: var(--space-xs); color: var(--color-ink-2); font-size: var(--text-sm); font-weight: 500; white-space: nowrap; }
.state__icon { width: 16px; height: 16px; fill: none; stroke: var(--color-accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.state--done { color: var(--color-ink-2); }
.state__dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--color-accent-2); }
.state__dot--half { background: linear-gradient(90deg, var(--color-accent-2) 50%, transparent 50%); box-shadow: inset 0 0 0 1.5px var(--color-accent-2); }
.state--owed { color: var(--color-accent-2); }
.state__ring { width: 8px; height: 8px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--color-muted); }
.state--quiet { color: var(--color-muted); }
.state__bar { width: 8px; height: 2px; background: var(--color-muted); }

/* Sections, the month strip and the tally ---------------------------------- */
.section { margin-top: var(--space-2xl); }
.section:first-child { margin-top: 0; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-md); flex-wrap: wrap; margin-bottom: var(--space-lg); }
.section h2 { font-size: var(--text-xl); }
.nights { margin: 0; }
.nights__strip { list-style: none; margin: 0; padding: var(--space-lg) 0 0; display: grid; grid-template-columns: repeat(31, minmax(0, 1fr)); gap: var(--space-2xs); }
.night { position: relative; display: grid; justify-items: center; gap: var(--space-xs); outline-offset: 2px; border-radius: var(--radius-inner); }
.night__track { display: flex; align-items: flex-end; height: var(--strip-h); width: 100%; justify-content: center; }
.night__bar { width: min(12px, 70%); min-height: 2px; border-radius: 6px 6px 2px 2px; background: var(--color-accent); transform-origin: bottom; animation: grow var(--dur-long) var(--ease-out) both; }
@keyframes grow { from { transform: scaleY(0); } to { transform: none; } }
.night--today .night__bar { background: var(--color-accent-2); }
.night--future .night__bar { background: repeating-linear-gradient(135deg, color-mix(in oklab, var(--color-light) 10%, transparent) 0 2px, transparent 2px 6px); animation: none; }
.night__flag { width: 6px; height: 6px; border-radius: 50%; background: var(--color-accent-2); }
.night__flag--none { background: transparent; }
.night__day { font-size: 0.6875rem; color: var(--color-muted); }
.night--today .night__day { color: var(--color-accent-2); font-weight: 600; }
.night__tip { position: absolute; bottom: calc(100% + var(--space-2xs)); left: 50%; transform: translateX(-50%); z-index: var(--z-tooltip); display: none; width: max-content; max-width: 260px; padding: var(--space-xs) var(--space-sm); border-radius: var(--radius-inner); background: var(--color-paper-3); box-shadow: var(--glass-hi), var(--shadow-card); color: var(--color-ink); font-size: 0.8125rem; text-align: center; pointer-events: none; }
.night:hover .night__tip, .night:focus-visible .night__tip { display: block; }
.night:hover .night__bar, .night:focus-visible .night__bar { background: var(--color-accent-hi); }
.night:nth-child(-n+4) .night__tip { left: 0; transform: none; text-align: left; }
.night:nth-last-child(-n+4) .night__tip { left: auto; right: 0; transform: none; text-align: right; }
.nights__table { margin-top: var(--space-md); font-size: var(--text-sm); }
.nights__table summary { cursor: pointer; color: var(--color-muted); width: max-content; }
.nights__table table { margin-top: var(--space-sm); max-width: 560px; }
.tally { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: var(--space-lg) 0 0; border-top: 1px solid var(--color-rule); }
.tally > div { padding: var(--space-md) var(--space-lg) 0 0; }
.tally > div + div { padding-left: var(--space-lg); box-shadow: inset 1px 0 0 var(--color-rule); }
.tally dt { font-size: var(--text-sm); font-weight: 500; color: var(--color-muted); }
.tally dd { margin: var(--space-2xs) 0 0; font-family: var(--font-display); font-weight: var(--display-weight); font-size: 2rem; letter-spacing: var(--tracking-display); font-variant-numeric: tabular-nums; }
.tally dd .amt__c { font-size: 0.6em; }
.tally dd.is-owed { color: var(--color-accent-2); }
.tally dd.is-owed .amt__c { color: color-mix(in oklab, var(--color-accent-2) 70%, var(--color-paper)); }
.tally--top { margin: 0 0 var(--space-xl); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-2xl); margin-top: var(--space-2xl); }
.split > .section { margin-top: 0; }
.rows { list-style: none; margin: var(--space-md) 0 0; padding: 0; border-top: 1px solid var(--color-rule); }
.row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: var(--space-sm); padding: var(--space-sm) 0; border-bottom: 1px solid var(--color-rule); }
.row__dot { width: 7px; height: 7px; margin-top: var(--space-xs); border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--color-muted); }
.row__dot--owed { box-shadow: none; background: var(--color-accent-2); }
.row__dot--done { box-shadow: none; background: var(--color-accent); }
.row__main { display: grid; gap: var(--space-3xs); min-width: 0; }
.row__main a { font-weight: 500; text-decoration: none; }
.row__main a:hover { text-decoration: underline; text-underline-offset: 0.16em; }
.row__main .muted { font-size: 0.8125rem; }
.row__sum { font-weight: 500; }

/* Pages, tabs and tables -------------------------------------------------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-lg); flex-wrap: wrap; margin-bottom: var(--space-lg); }
.page-head h1 { font-size: var(--text-3xl); }
.page-head .lead { margin-top: var(--space-xs); color: var(--color-ink-2); max-width: 64ch; }
.crumbs { display: flex; gap: var(--space-md); margin-bottom: var(--space-xs); font-size: var(--text-sm); color: var(--color-muted); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--color-ink); text-decoration: underline; }
.tabs { display: flex; flex-wrap: wrap; gap: var(--space-lg); margin-bottom: var(--space-md); padding-bottom: var(--space-xs); border-bottom: 1px solid var(--color-rule); }
.tabs__item { display: inline-flex; align-items: center; gap: var(--space-xs); min-height: 36px; color: var(--color-muted); font-size: var(--text-sm); font-weight: 500; text-decoration: none; }
.tabs__item:hover { color: var(--color-ink); }
.tabs__dot { width: 6px; height: 6px; border-radius: 50%; }
.tabs__item[aria-current="page"] { color: var(--color-ink); }
.tabs__item[aria-current="page"] .tabs__dot { background: var(--color-accent); }
.tabs__count { color: var(--color-muted); font-size: 0.8125rem; }
.ledger { width: 100%; border-collapse: collapse; font-size: 0.9063rem; }
.ledger th { padding: var(--space-sm) var(--space-sm) var(--space-xs); color: var(--color-muted); font-size: 0.8125rem; font-weight: 500; text-align: left; white-space: nowrap; }
.ledger th.r { text-align: right; }
.ledger td { padding: var(--space-sm); box-shadow: inset 0 1px 0 color-mix(in oklab, var(--color-light) 7%, transparent); vertical-align: middle; }
.ledger tbody tr:hover td { background: color-mix(in oklab, var(--color-light) 3%, transparent); }
.ledger tr.is-owed td:first-child { box-shadow: inset 2px 0 0 var(--color-accent-2), inset 0 1px 0 color-mix(in oklab, var(--color-light) 7%, transparent); }
.ledger tr.is-open td { background: color-mix(in oklab, var(--color-accent-2) 6%, transparent); }
.ledger__link { font-weight: 500; text-decoration: none; }
.ledger__link:hover { text-decoration: underline; text-underline-offset: 0.16em; }
.ledger--compact td, .ledger--compact th { padding: var(--space-xs) var(--space-sm); }
.who-cell { display: inline-flex; align-items: center; gap: var(--space-sm); }
.empty { padding: var(--space-xl); text-align: center; color: var(--color-muted); }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-xs); margin-top: var(--space-md); }
.pager p { margin-right: auto; font-size: var(--text-sm); }
.search { display: flex; align-items: flex-end; gap: var(--space-xs); }

/* Fields ------------------------------------------------------------------ */
.field { display: grid; gap: var(--space-2xs); min-width: 0; }
.field__label { font-size: 0.8125rem; font-weight: 500; color: var(--color-muted); }
.field input, .field select, .field textarea { width: 100%; min-height: var(--key-h); padding: 0 var(--space-sm); border: 0; border-radius: var(--radius-inner); background: color-mix(in oklab, var(--color-light) 5%, transparent); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--color-light) 10%, transparent); color: var(--color-ink); font: inherit; color-scheme: dark; }
.field textarea { min-height: 0; padding: var(--space-sm); resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--color-focus); outline-offset: 1px; }
.field select:disabled { background: color-mix(in oklab, var(--color-light) 2%, transparent); color: var(--color-muted); cursor: not-allowed; }
.field select option { background: var(--color-paper-2); color: var(--color-ink); }
.field--inline { gap: var(--space-3xs); }
.field--inline select { min-height: 36px; font-size: 0.8125rem; }
.search .field input { min-width: 260px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-md); }
.stack { display: grid; gap: var(--space-md); justify-items: start; }
.stack > .grid-2, .stack > .field { width: 100%; }
.alert { display: flex; align-items: center; gap: var(--space-xs); padding: var(--space-sm) var(--space-md); border-radius: var(--radius-inner); background: color-mix(in oklab, var(--color-accent-2) 12%, transparent); color: var(--color-ink); font-size: var(--text-sm); list-style: none; margin: 0; }
.alert .state__dot { flex: none; }
ul.alert { display: block; }
.flash { display: flex; align-items: center; gap: var(--space-xs); width: max-content; max-width: 100%; margin: var(--space-lg) 0 0; padding: var(--space-xs) var(--space-md); border-radius: var(--radius-inner); background: color-mix(in oklab, var(--color-accent) 14%, transparent); color: var(--color-ink); font-size: var(--text-sm); font-weight: 500; }
.flash__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--color-accent); }
.main > .container:has(.flash) + .page { padding-top: var(--space-lg); }

/* The invoice: a white card in a bone well --------------------------------- */
.well { padding: var(--space-xl); border-radius: var(--radius-card); background: var(--color-well); }
.well--wide { padding: var(--space-2xl); }
.paper { max-width: 760px; margin: 0 auto; padding: var(--space-xl) 44px; border-radius: var(--radius-inner); background: var(--color-card); color: var(--color-well-ink); box-shadow: 0 1px 2px color-mix(in oklab, var(--color-well-ink) 8%, transparent), 0 24px 48px -28px color-mix(in oklab, var(--color-well-ink) 40%, transparent); font-size: 0.8125rem; line-height: 1.5; }
.paper p { margin: 0; }
.paper__head { display: flex; justify-content: space-between; gap: var(--space-lg); padding-bottom: var(--space-lg); }
.paper__studio { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 1.25rem; letter-spacing: var(--tracking-display); }
.paper__muted { color: var(--color-well-muted); }
.paper__title { text-align: right; }
.paper__kind { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 1.25rem; }
.paper__no { color: var(--color-well-muted); font-variant-numeric: tabular-nums; }
.paper__stamp { display: inline-block; margin-top: var(--space-xs) !important; padding: var(--space-3xs) var(--space-sm); border-radius: var(--radius-inner); background: var(--color-accent-soft); color: var(--color-accent-deep); font-weight: 600; }
.paper__meta { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: var(--space-lg); padding: var(--space-md) 0 var(--space-lg); border-top: 1px solid var(--color-well-rule); }
.paper__label { color: var(--color-well-muted); margin-bottom: var(--space-2xs) !important; }
.paper__strong { font-weight: 600; }
.paper__addr { white-space: pre-line; }
.paper__dates { display: grid; gap: var(--space-2xs); margin: 0; align-content: start; }
.paper__dates div { display: flex; justify-content: space-between; gap: var(--space-sm); }
.paper__dates dt { color: var(--color-well-muted); }
.paper__dates dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.paper__ref { display: grid !important; margin-top: var(--space-xs); }
.paper__ref dd { text-align: left; }
.paper__lines { width: 100%; border-collapse: collapse; }
.paper__lines th { padding: 0 0 var(--space-xs); border-bottom: 1px solid var(--color-well-ink); color: var(--color-well-muted); font-weight: 500; text-align: left; }
.paper__lines td { padding: var(--space-xs) 0; border-bottom: 1px solid var(--color-well-rule); vertical-align: top; }
.paper__lines .r { text-align: right; padding-left: var(--space-sm); white-space: nowrap; }
.paper__totals { display: grid; gap: var(--space-2xs); width: min(300px, 100%); margin: var(--space-md) 0 0 auto; }
.paper__totals div { display: flex; justify-content: space-between; gap: var(--space-md); }
.paper__totals dt { color: var(--color-well-muted); }
.paper__totals dd { margin: 0; }
.paper__totals .paper__total { padding-top: var(--space-2xs); border-top: 1px solid var(--color-well-ink); font-weight: 600; }
.paper__totals .paper__total dt { color: var(--color-well-ink); }
.paper__note { margin-top: var(--space-md) !important; }
.paper__pay { display: grid; gap: var(--space-3xs); margin-top: var(--space-lg); padding: var(--space-md); border-radius: var(--radius-inner); background: var(--color-well); }
.doc { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-xl); align-items: start; }
.doc__side { display: grid; gap: var(--space-md); }
.panel { padding: var(--space-lg); }
.panel__title { font-size: var(--text-lg); margin-bottom: var(--space-sm); }
.panel > .muted { font-size: var(--text-sm); margin-bottom: var(--space-md); }
.figure { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 2.5rem; letter-spacing: var(--tracking-display); line-height: 1.05; font-variant-numeric: tabular-nums; }
.figure .amt__c { font-size: 0.6em; }
.panel__status { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm); margin: var(--space-sm) 0 var(--space-md); font-size: var(--text-sm); }
.panel__keys { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.panel__keys form { margin: 0; }
.panel .alert { margin-bottom: var(--space-md); }
.void-form { margin-top: var(--space-lg); padding-top: var(--space-md); box-shadow: inset 0 1px 0 color-mix(in oklab, var(--color-light) 7%, transparent); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline__item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-sm); padding: var(--space-xs) 0; font-size: var(--text-sm); }
.timeline__item > span:last-child { display: grid; gap: var(--space-3xs); }
.timeline__item .muted { font-size: 0.8125rem; }

/* The editor -------------------------------------------------------------- */
.editor { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: var(--space-xl); align-items: start; }
.editor__form { display: grid; gap: var(--space-lg); padding: var(--space-lg); }
.editor__preview { position: sticky; top: 88px; padding: var(--space-lg); }
.editor__preview .paper { padding: var(--space-lg); font-size: 0.75rem; }
.lines { display: grid; gap: var(--space-xs); margin: 0; padding: 0; border: 0; }
.lines legend { font-family: var(--font-display); font-weight: var(--display-weight); font-size: var(--text-lg); margin-bottom: var(--space-xs); padding: 0; }
.line { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: var(--space-sm); align-items: end; padding: var(--space-md); border-radius: var(--radius-inner); background: color-mix(in oklab, var(--color-light) 3%, transparent); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--color-light) 6%, transparent); }
.line__desc { grid-column: 1 / -1; }
.line__remove { margin-bottom: var(--space-2xs); }
.lines > .ghost { justify-self: start; }
.editor__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--space-xs); padding-top: var(--space-md); box-shadow: inset 0 1px 0 color-mix(in oklab, var(--color-light) 7%, transparent); }
.editor__total { margin-right: auto; font-family: var(--font-display); font-weight: var(--display-weight); font-size: var(--text-xl); }
.editor__total .amt { margin-left: var(--space-xs); }
.editor__total .amt__c { font-size: 0.6em; }

/* Bank -------------------------------------------------------------------- */
.bank__payer { font-weight: 500; }
.bank__mark { width: 32px; }
.mark { width: 20px; height: 20px; display: block; }
.mark--done circle { fill: color-mix(in oklab, var(--color-accent) 22%, transparent); }
.mark--done path { fill: none; stroke: var(--color-accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mark--open circle { fill: none; stroke: var(--color-accent-2); stroke-width: 1.6; }
.suggest { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs); }
.suggest a { font-weight: 500; }
.suggest__strength { padding: var(--space-3xs) var(--space-xs); border-radius: var(--radius-pill); font-size: 0.75rem; font-weight: 600; }
.suggest__strength--exact { background: color-mix(in oklab, var(--color-accent) 22%, transparent); color: var(--color-accent-hi); }
.suggest__strength--likely { background: color-mix(in oklab, var(--color-light) 9%, transparent); color: var(--color-ink); }
.suggest__strength--possible { background: color-mix(in oklab, var(--color-accent-2) 14%, transparent); color: var(--color-accent-2); }
.bank__actions { white-space: nowrap; }
.bank__actions > * + * { margin-left: var(--space-2xs); }

/* Outbox: each email set as the real card on bone -------------------------- */
.outbox { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-lg); align-items: start; }
.mail-list { list-style: none; margin: 0; padding: 0; }
.mail-list__item { display: grid; gap: var(--space-3xs); padding: var(--space-sm) var(--space-md); border-radius: var(--radius-inner); text-decoration: none; }
.mail-list__item:hover { background: color-mix(in oklab, var(--color-light) 4%, transparent); }
.mail-list__item[aria-current="true"] { background: color-mix(in oklab, var(--color-light) 6%, transparent); box-shadow: inset 2px 0 0 var(--color-accent); }
.mail-list__subject { font-weight: 500; font-size: var(--text-sm); }
.mail-list__meta { display: flex; justify-content: space-between; gap: var(--space-sm); color: var(--color-muted); font-size: 0.8125rem; }
.well--letter { position: sticky; top: 88px; }
.letter { padding: var(--space-lg) var(--space-xl); border-radius: var(--radius-inner); background: var(--color-card); color: var(--color-well-ink); box-shadow: 0 24px 48px -28px color-mix(in oklab, var(--color-well-ink) 40%, transparent); }
.letter__head { display: grid; gap: var(--space-2xs); margin: 0 0 var(--space-md); padding-bottom: var(--space-sm); border-bottom: 1px solid var(--color-well-rule); font-size: var(--text-sm); }
.letter__head div { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: var(--space-sm); }
.letter__head dt { color: var(--color-well-muted); }
.letter__head dd { margin: 0; overflow-wrap: anywhere; }
.letter__body { white-space: pre-wrap; line-height: 1.6; margin-bottom: var(--space-lg); overflow-wrap: anywhere; }

/* Sign-in ----------------------------------------------------------------- */
.signin { padding: var(--space-lg); }
.signin h2 { font-size: var(--text-lg); margin-bottom: var(--space-sm); }
.signin__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-xs); }
.signin__list form { margin: 0; }
.signin__person { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-md); align-items: start; width: 100%; padding: var(--space-md); border: 0; border-radius: var(--radius-inner); background: color-mix(in oklab, var(--color-light) 5%, transparent); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--color-light) 8%, transparent); color: var(--color-ink); font: inherit; text-align: left; cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out); }
.signin__person:hover { background: color-mix(in oklab, var(--color-light) 9%, transparent); }
.signin__text { display: grid; gap: var(--space-3xs); }
.signin__title { color: var(--color-accent-hi); font-size: var(--text-sm); font-weight: 500; }
.signin__sees { color: var(--color-muted); font-size: 0.8125rem; }
.signin__note { margin-top: var(--space-md); color: var(--color-muted); font-size: 0.8125rem; }
.public .page-head { align-items: center; }

/* The colophon ------------------------------------------------------------ */
.colophon { margin-top: var(--space-2xl); padding: var(--space-lg) 0 var(--space-xl); box-shadow: inset 0 1px 0 var(--color-rule); color: var(--color-muted); font-size: var(--text-sm); }
.colophon p { max-width: 74ch; }
.colophon__credit { margin-top: var(--space-xs); font-size: 0.8125rem; }
.main--bare + .colophon { margin-top: 0; }

/* Narrower screens -------------------------------------------------------- */
@media (max-width: 75rem) {
  .doc, .editor, .outbox { grid-template-columns: minmax(0, 1fr); }
  .editor__preview, .well--letter { position: static; }
  .hour__inner { grid-template-columns: minmax(0, 1fr); gap: var(--space-xl); }
  .hour { min-height: 0; }
}
@media (max-width: 52rem) {
  .topbar__inner { flex-wrap: wrap; gap: var(--space-xs) var(--space-md); padding-block: var(--space-xs); }
  .nav { order: 3; width: 100%; gap: var(--space-md); }
  .who__name { display: none; }
  .split, .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .tally { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--space-md); }
  .tally > div:nth-child(3) { padding-left: 0; box-shadow: none; }
  .nights__strip { gap: var(--space-3xs); }
  .night__day { font-size: 0.5625rem; }
  .col-wide { display: none; }
  .glass--table { padding-inline: var(--space-xs); }
  .line { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .line__remove { grid-column: 1 / -1; justify-self: start; }
  .night__day--minor { visibility: hidden; }
  .paper { padding: var(--space-md); }
  .paper__meta { grid-template-columns: minmax(0, 1fr); }
  .well, .well--wide { padding: var(--space-sm); }
  .search { width: 100%; }
  .search .field { flex: 1; }
  .search .field input { min-width: 0; }
  .hour__copy h1 { font-size: 2.2rem; }
  .account { grid-template-columns: auto minmax(0, 1fr) auto; }
  .account .state { grid-column: 2; grid-row: 2; }
  .account__sum { grid-row: 1 / span 2; grid-column: 3; }
}
