/* Hallmark · page styles for this route; stamp and tokens live in site.css · hero: Settled */
.hero--settled { padding-block: var(--space-2xl); }
.hero-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--space-xl) var(--gap-columns); align-items: start; }
.hero--settled .hero__text { grid-column: 1 / span 6; display: grid; gap: var(--space-lg); }
.hero--settled h1 { font-size: clamp(2.5rem, 2.9vw + 1rem, 4.25rem); max-width: 15ch; text-wrap: balance; }
.hero--settled .lead { max-width: 38ch; }
.hero--settled .actions { margin-top: var(--space-xs); gap: var(--space-sm) var(--space-lg); }


.stage-split { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--space-xl) var(--gap-columns); align-items: center; }
.stage-split__text { display: grid; gap: var(--space-lg); align-content: center; }
.stage-split__text .lead { max-width: 46ch; }
.stage-split__text h2 { font-size: var(--text-section); max-width: 19ch; text-wrap: balance; }
.stage-split--a .stage-split__text { grid-column: 1 / span 5; }
.stage-split--a .stage-split__panel { grid-column: 7 / -1; }
.stage-split--b .stage-split__panel { grid-column: 1 / span 7; }
.stage-split--b .stage-split__text { grid-column: 9 / -1; }
.facts-list { list-style: none; display: grid; border-top: 1px solid var(--color-rule-strong); }
.facts-list li { padding-block: var(--space-sm); border-bottom: 1px solid var(--color-rule); color: var(--color-ink); font-weight: 500; }





@media (max-width: 60rem) {
  .hero--settled .hero__text { grid-column: 1 / -1; }
  .stage-split--a .stage-split__text, .stage-split--a .stage-split__panel, .stage-split--b .stage-split__text, .stage-split--b .stage-split__panel { grid-column: 1 / -1; }
  .stage-split--b .stage-split__text { order: -1; }
  .stage-split__text h2 { max-width: 20ch; }
}



.hero-proof { grid-column: 7 / -1; margin: 0 0 0 var(--space-xl); align-self: center; display: grid; gap: var(--space-lg); justify-items: start; padding: var(--space-xl); border: 1px solid var(--color-rule-strong); border-radius: var(--radius-card); background: var(--color-paper); }
.hero-proof__figs { display: flex; flex-wrap: wrap; gap: var(--space-lg) var(--space-2xl); align-items: center; width: 100%; padding-bottom: var(--space-lg); border-bottom: 1px solid var(--color-rule); }
.hero-proof__figs .case-fig { flex-direction: column; align-items: flex-start; gap: var(--space-2xs); }
.hero-proof__figs .case-fig b { font-size: clamp(2.75rem, 2.4vw + 1.5rem, 4.5rem); }
.hero-proof__gains { flex: 1 1 15rem; list-style: none; display: grid; gap: var(--space-sm); }
.hero-proof__gains li { display: flex; align-items: center; gap: var(--space-sm); font-weight: 500; color: var(--color-ink); }
.hero-proof__gains .icon { flex: none; width: 20px; height: 20px; color: var(--color-accent); }
.hero-proof .quote p { text-wrap: pretty; }
.hero-proof .case-meta { font-size: var(--text-lg); }
@media (max-width: 60rem) { .hero-proof { grid-column: 1 / -1; margin-left: 0; } }
@media (max-width: 40rem) { .hero-proof { padding: var(--space-lg); } }

.results { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-xl) var(--gap-columns); }
.results li { display: grid; grid-template-rows: auto auto 1fr auto; gap: var(--space-md); justify-items: start; padding-top: var(--space-lg); border-top: 1px solid var(--color-rule-strong); }
.results .case-fig { flex-direction: column; align-items: flex-start; gap: var(--space-2xs); }
.results li > p:not([class]) { max-width: 38ch; color: var(--color-ink-2); }
@media (max-width: 60rem) { .results { grid-template-columns: minmax(0, 1fr); } }

/* the stage panels run example cases while seen: a step waits as an empty ring, works as a pulsing one and ends on its check */




.ask { margin: 0; display: grid; gap: var(--space-sm); justify-items: start; }
.ask .wa { position: relative; width: 100%; height: auto; border: 1px solid var(--app-border); }
.ask .wa__body { flex: none; }
.ask .wa__body > :first-child { margin-top: 0; }
.ask .wa-choice__opt { width: 100%; font: inherit; text-align: left; background: none; color: inherit; cursor: pointer; }
.ask .wa-choice__opt:hover:not(:disabled) { border-color: var(--app-primary); }
.ask .wa-choice__opt:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.ask .wa-choice__opt:disabled { opacity: 1; cursor: default; }
.ask .wa-choice__opt.is-on { color: var(--app-primary); }
.ask .wa-choice__opt:disabled:not(.is-on) { opacity: 0.5; }
.js [data-ask]:not(.is-answered) [data-ask-reply] { display: none; }
.ask__again { display: inline-flex; align-items: center; gap: var(--space-xs); padding: var(--space-xs) 0; border: 0; background: none; color: var(--color-ink-2); font: 500 var(--text-sm) var(--font-body); cursor: pointer; }
.ask__again:hover { color: var(--color-ink); }
.ask__again .icon { width: 16px; height: 16px; }

#day .head--split > h2 { max-width: none; }
.day-board { margin-top: var(--space-3xl); }
.day-board > .head { margin-bottom: var(--space-lg); }
.day-board > .head > h3 { font: 600 var(--text-2xl)/1.15 var(--font-display); letter-spacing: -0.02em; }
@media (max-width: 40rem) { .day-board { margin-top: var(--space-2xl); } .day-board > .head { margin-bottom: var(--space-md); } .day-board > .head > h3 { font-size: var(--text-xl); } }
@media (min-width: 60.0625rem) { #day .head--split > h2 { grid-column: 1 / span 7; } }

/* deviations board, as the web client draws it: status lanes on the canvas with white cards, tone chips for the status */
.dv { --dv-danger: oklch(0.444 0.177 26.899); --dv-warning: oklch(0.473 0.137 46.201); --dv-info: oklch(0.443 0.11 240.79); margin: 0; display: grid; gap: var(--space-md); padding: var(--space-lg); border: 1px solid var(--app-border); border-radius: var(--radius-card); background: var(--app-bg); color: var(--app-fg); font: 400 14px/1.5 var(--app-font); box-shadow: var(--app-elev-panel); }
[data-mode="dark"] .dv { --dv-danger: oklch(0.808 0.114 19.571); --dv-warning: oklch(0.879 0.169 91.605); --dv-info: oklch(0.828 0.111 230.318); }
@media (prefers-color-scheme: dark) { :root:not([data-mode]) .dv { --dv-danger: oklch(0.808 0.114 19.571); --dv-warning: oklch(0.879 0.169 91.605); --dv-info: oklch(0.828 0.111 230.318); } }
.dv__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-xs) var(--space-lg); }
.dv__head > div { display: grid; gap: 2px; }
.dv__title { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.dv__need { display: flex; align-items: center; gap: 8px; color: var(--app-muted-fg); font-variant-numeric: tabular-nums; }
.dv__need::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--app-warning); }
.dv__meta { display: flex; align-items: center; gap: 12px; font-size: 12px; font-weight: 500; color: var(--app-muted-fg); font-variant-numeric: tabular-nums; }
.dv__meta i { width: 1px; height: 14px; background: var(--app-border); }
.dv__tabs { display: flex; gap: 20px; height: 40px; border-bottom: 1px solid var(--app-border); overflow-x: auto; scrollbar-width: none; }
.dv__tabs button { position: relative; flex: none; padding: 0 2px; border: 0; background: none; color: var(--app-muted-fg); font: 500 14px var(--app-font); cursor: pointer; transition: color var(--dur-short) var(--ease-out); }
.dv__tabs button:hover, .dv__tabs button[aria-pressed="true"] { color: var(--app-fg); }
.dv__tabs button::after { content: ""; position: absolute; inset: auto 0 0; height: 2px; background: var(--app-primary); opacity: 0; transition: opacity var(--dur-short) var(--ease-out); }
.dv__tabs button[aria-pressed="true"]::after { opacity: 1; }
.dv__tabs button:focus-visible { outline: 2px solid var(--color-focus); outline-offset: -2px; border-radius: 4px; }
.dv__cols { display: grid; grid-template-columns: repeat(3, minmax(264px, 1fr)); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.dv__col { display: flex; flex-direction: column; min-height: 420px; border-radius: 12px; background: var(--app-canvas); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--app-border) 70%, transparent); scroll-snap-align: start; }
.dv__col h3 { display: flex; align-items: center; gap: 8px; height: 44px; max-width: none; padding: 0 16px; font: 600 14px var(--app-font); letter-spacing: 0; color: var(--app-fg); }
.dv__col h3 > span:last-child { font-size: 12px; color: var(--app-muted-fg); font-variant-numeric: tabular-nums; }
.dv__col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; padding: 0 10px 10px; }
.dv__empty { margin: 0 10px; padding: 24px 12px; border: 1px dashed var(--app-border); border-radius: 8px; color: var(--app-muted-fg); font-size: 12px; text-align: center; }
.dv-tone { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font: 500 12px var(--app-font); color: var(--dv-tone); background: color-mix(in oklab, var(--dv-tone) 9%, transparent); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--dv-tone) 28%, transparent); }
.dv-tone--danger { --dv-tone: var(--dv-danger); }
.dv-tone--warning { --dv-tone: var(--dv-warning); }
.dv-tone--info { --dv-tone: var(--dv-info); }
.dv-card { display: flex; flex-direction: column; width: 100%; padding: 12px 14px; border: 0; border-radius: 12px; background: var(--app-card); color: var(--app-fg); font: inherit; text-align: left; cursor: pointer; box-shadow: var(--app-elev-card), 0 0 0 1px color-mix(in oklab, var(--app-fg) 10%, transparent); transition: box-shadow var(--dur-short) var(--ease-out); }
.dv-card:hover { box-shadow: var(--app-elev-card), 0 0 0 1px color-mix(in oklab, var(--app-fg) 20%, transparent); }
.dv-card:focus-visible { outline: 2px solid var(--app-primary); outline-offset: 2px; }
.dv-card__ref { display: flex; align-items: center; gap: 8px; height: 24px; margin-right: -6px; font-size: 12px; font-weight: 500; color: var(--app-muted-fg); }
.dv-card__tools { display: flex; margin-left: auto; }
.dv-card__tools svg { width: 24px; height: 24px; padding: 5px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dv-card > b { margin-top: 10px; font-size: 14px; font-weight: 600; line-height: 1.35; }
.dv-card__text { margin-top: 4px; color: var(--app-muted-fg); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.dv-card__foot { display: flex; flex-direction: column; gap: 2px; margin-top: 12px; padding-top: 10px; border-top: 1px solid color-mix(in oklab, var(--app-border) 60%, transparent); font-size: 12px; color: var(--app-muted-fg); font-variant-numeric: tabular-nums; }

.dv-dlg { width: min(36rem, calc(100vw - 32px)); max-height: 85vh; padding: 0; border: 0; border-radius: 14px; background: var(--app-bg); color: var(--app-fg); font: 400 14px/1.5 var(--app-font); box-shadow: var(--app-elev-float), 0 0 0 1px var(--app-border); }
.dv-dlg::backdrop { background: oklch(0.2 0.02 268 / 0.45); }
.dv-dlg__in { display: grid; gap: 12px; padding: 20px 24px 24px; }
.dv-dlg header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dv-dlg header b { font-size: 16px; font-weight: 600; }
.dv-dlg__x { display: grid; place-items: center; width: 32px; height: 32px; margin-right: -8px; border: 0; border-radius: 8px; background: none; color: var(--app-muted-fg); cursor: pointer; }
.dv-dlg__x:hover { background: var(--app-muted); color: var(--app-fg); }
.dv-dlg__x svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.dv-dlg__state { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--app-muted-fg); font-variant-numeric: tabular-nums; }
.dv-dlg h4 { margin: 0; font: 600 16px/1.35 var(--app-font); letter-spacing: 0; color: var(--app-fg); }
.dv-dlg__sec { margin-top: 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--app-muted-fg); }
.dv-dlg dl { display: grid; grid-template-columns: 140px minmax(0, 1fr); margin-top: -8px; }
.dv-dlg dt, .dv-dlg dd { margin: 0; padding: 8px 4px; border-bottom: 1px solid var(--app-border); }
.dv-dlg dt { font-size: 12px; font-weight: 500; color: var(--app-muted-fg); }
.dv-dlg__ask { display: inline-flex; align-items: center; gap: 6px; justify-self: start; color: var(--app-primary); font-weight: 500; }
.dv-dlg__ask svg { width: 18px; height: 18px; }
.dv-dlg footer { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.dv-dlg__btn { height: 36px; padding: 0 14px; border: 1px solid var(--app-input); border-radius: var(--app-radius); background: var(--app-bg); color: var(--app-fg); font: 500 14px var(--app-font); cursor: pointer; }
.dv-dlg__btn:hover { background: var(--app-muted); }
.dv-dlg__btn.is-primary { border-color: var(--app-primary-solid); background: var(--app-primary-solid); color: var(--app-primary-fg); }
.dv-dlg__btn.is-primary:hover { filter: brightness(1.08); }
.dv-dlg :focus-visible { outline: 2px solid var(--app-primary); outline-offset: 2px; }
@media (max-width: 40rem) {
  .dv { padding: var(--space-sm); }
  .dv__cols { margin-inline: calc(-1 * var(--space-sm)); padding-inline: var(--space-sm); scroll-padding-inline: var(--space-sm); }
  .dv-dlg dl { grid-template-columns: 110px minmax(0, 1fr); }
}

/* billing cycle: four stages for one customer; with script the panes share one grid cell, so the panel keeps the height of the tallest */
.cycle__steps { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--color-panel-rule); }
.cycle__steps button { position: relative; display: flex; align-items: center; gap: var(--space-xs); width: 100%; min-height: 52px; padding: var(--space-sm) var(--space-md); border: 0; background: none; color: var(--color-panel-ink-2); font: 500 13px/1.25 var(--app-font); text-align: left; cursor: pointer; transition: color var(--dur-short) var(--ease-out); }
.cycle__steps button:hover, .cycle__steps [aria-pressed="true"] { color: var(--color-panel-ink); }
.cycle__steps button:focus-visible { outline: 2px solid var(--color-focus); outline-offset: -2px; border-radius: 6px; }
.cycle__steps button > span { display: grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--color-panel-rule); font-size: 11px; font-variant-numeric: tabular-nums; transition: background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out); }
.cycle__steps .is-done button > span { background: color-mix(in oklab, var(--color-panel-ok) 14%, transparent); box-shadow: none; color: var(--color-panel-ok); }
.cycle__steps [aria-pressed="true"] > span { background: var(--color-panel-accent-fill); box-shadow: none; color: var(--color-panel-on-accent); }
.cycle__steps i { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; }
.cycle__steps i::after { content: ""; display: block; height: 100%; background: var(--color-panel-accent); transform: scaleX(0); transform-origin: left; }
.cycle__steps [aria-pressed="true"] i::after { transform: none; }
@media (prefers-reduced-motion: no-preference) {
  .js .cycle:not(.is-manual) .cycle__steps [aria-pressed="true"] i::after { animation: cycle-fill 5s linear both; animation-play-state: paused; }
  .js .cycle.is-running:not(.is-manual) .cycle__steps [aria-pressed="true"] i::after { animation-play-state: running; }
  @keyframes cycle-fill { from { transform: scaleX(0); } to { transform: none; } }
}
.cycle__panes { display: grid; padding: var(--space-lg); }
.cycle__pane { display: grid; gap: var(--space-md); align-content: start; }
.js .cycle__pane { grid-area: 1 / 1; }
.js .cycle__pane:not(.is-on) { visibility: hidden; }
.js .cycle__pane [data-row] { opacity: 0; transform: translateY(6px); }
.js .cycle__pane.is-on [data-row] { opacity: 1; transform: none; transition: opacity var(--dur-long) var(--ease-out), transform var(--dur-long) var(--ease-out); transition-delay: calc(var(--i, 0) * 110ms); }
@media (prefers-reduced-motion: reduce) { .js .cycle__pane [data-row] { opacity: 1; transform: none; } }
.cycle__row { display: grid; gap: var(--space-xs); }
.cycle__label { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-2xs) var(--space-sm); font-size: 13px; font-weight: 500; color: var(--color-panel-ink); }
.cycle__label span { font-size: 12px; font-weight: 400; color: var(--color-panel-ink-2); }
.cycle__days { list-style: none; display: grid; grid-template-columns: repeat(31, minmax(0, 1fr)); gap: 2px; align-items: end; height: 56px; }
/* a day's bar fills its column from the bottom, so the whole column height answers the pointer */
.cycle__days li { position: relative; height: 100%; }
.cycle__days li::before { content: ""; position: absolute; inset: auto 0 0; height: var(--h); border-radius: 2px 2px 0 0; background: color-mix(in oklab, var(--app-chart-1) 45%, var(--app-card)); transition: background-color var(--dur-short) var(--ease-out); }
.cycle__days li:hover::before { background: var(--app-chart-1); }
.cycle__days li::after { content: attr(data-v); position: absolute; z-index: 2; bottom: calc(var(--h) + 6px); left: 50%; translate: -50% 4px; padding: 2px var(--space-xs); border-radius: 6px; background: var(--color-panel-ink); color: var(--color-panel); font: 500 11px/1.4 var(--app-font); font-variant-numeric: tabular-nums; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity var(--dur-short) var(--ease-out), translate var(--dur-short) var(--ease-out); }
.cycle__days li:hover::after { opacity: 1; translate: -50% 0; }
.cycle__days li:nth-child(-n+4)::after { left: 0; translate: 0 4px; }
.cycle__days li:nth-child(-n+4):hover::after { translate: 0 0; }
.cycle__days li:nth-last-child(-n+4)::after { left: auto; right: 0; translate: 0 4px; }
.cycle__days li:nth-last-child(-n+4):hover::after { translate: 0 0; }
.cycle__sum { font-size: 12px; color: var(--color-panel-ink-2); }
.cycle__sum b { font-weight: 600; color: var(--color-panel-ink); font-variant-numeric: tabular-nums; }
.cycle__formula { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs); color: var(--color-panel-ink-2); }
.cycle__formula span { padding: 4px 8px; border-radius: 6px; background: var(--color-panel-2); color: var(--color-panel-ink); font: 12px var(--font-mono); }
.cycle__lines td:first-child, .cycle__review td:first-child { font-family: var(--app-font); }
.cycle .ui-table .c { text-align: center; }
.cycle__note { font-size: 13px; color: var(--color-panel-ink-2); }
.coll { border: 1px solid var(--color-panel-rule); border-radius: 10px; }
.coll__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-sm); padding: var(--space-sm) var(--space-md); border-bottom: 1px solid var(--color-panel-rule); }
.coll__head b { font-weight: 600; color: var(--color-panel-ink); }
.coll__head span { font-size: 12px; color: var(--color-panel-ink-2); }
.coll ul { list-style: none; }
.coll li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: var(--space-md); align-items: center; padding: var(--space-sm) var(--space-md); border-bottom: 1px solid var(--color-panel-rule); font-size: 13px; color: var(--color-panel-ink); }
.coll li:last-child { border-bottom: 0; }
.coll li > span:first-child { display: grid; }
.coll small { font-size: 12px; color: var(--color-panel-ink-2); }
.coll li > b { min-width: 4.5em; font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.cycle__review .ok { color: var(--color-panel-ok); }
.cycle__review .hold { color: var(--color-panel-warn); font-weight: 600; }
.cycle__verdicts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-sm); }
.cycle__verdicts p { display: grid; gap: 2px; padding: var(--space-sm) var(--space-md); border-radius: 8px; font-size: 13px; color: var(--color-panel-ink); }
.cycle__verdicts b { font-size: 12px; font-weight: 600; }
.cycle__verdicts .is-ok { background: color-mix(in oklab, var(--color-panel-ok) 11%, transparent); }
.cycle__verdicts .is-ok b { color: var(--color-panel-ok); }
.cycle__verdicts .is-hold { background: color-mix(in oklab, var(--color-panel-warn) 13%, transparent); }
.cycle__verdicts .is-hold b { color: var(--color-panel-warn); }
.cycle__inv { display: grid; gap: 2px; padding-bottom: var(--space-md); border-bottom: 1px solid var(--color-panel-rule); }
.cycle__inv p { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-sm); }
.cycle__inv p > * { font-size: 24px; font-weight: 600; letter-spacing: -0.01em; color: var(--color-panel-ink); font-variant-numeric: tabular-nums; }
.cycle__inv small { font-size: 12px; color: var(--color-panel-ink-2); }
.cycle__time { list-style: none; display: grid; }
.cycle__time li { position: relative; display: flex; justify-content: space-between; gap: var(--space-sm); padding: var(--space-xs) 0 var(--space-xs) 26px; font-size: 13px; color: var(--color-panel-ink-2); }
.cycle__time li::before { content: ""; position: absolute; left: 4px; top: calc(var(--space-xs) + 0.35em); width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--color-panel-rule); background: var(--color-panel); }
.cycle__time li:not(:last-child)::after { content: ""; position: absolute; left: 8.5px; top: calc(var(--space-xs) + 0.35em + 12px); bottom: calc(-1 * var(--space-xs) - 0.35em + 2px); width: 1px; background: var(--color-panel-rule); }
.cycle__time li.is-done { color: var(--color-panel-ink); }
.cycle__time li.is-done::before { background: var(--color-panel-ok); box-shadow: none; }
.cycle__time b { font-weight: 500; }
.cycle__time span { font-variant-numeric: tabular-nums; }
@media (max-width: 40rem) {
  .cycle__steps button { flex-direction: column; align-items: flex-start; gap: 4px; min-height: 0; padding: var(--space-sm) var(--space-xs); font-size: 11px; }
  .cycle__panes { padding: var(--space-md); }
  .cycle__verdicts { grid-template-columns: minmax(0, 1fr); }
  .coll li { grid-template-columns: minmax(0, 1fr) auto; }
  .coll li .ui-pill { display: none; }
}
.cycle p { max-width: none; }

/* incoming payments: the bank file's payments are matched row by row; the unmatched one opens its suggested matches beside the table */
.pay-tone { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font: 500 12px var(--app-font); white-space: nowrap; color: var(--pay-tone, var(--color-panel-ink-2)); background: color-mix(in oklab, var(--pay-tone, var(--color-panel-ink-2)) 10%, transparent); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--pay-tone, var(--color-panel-ink-2)) 26%, transparent); }
.pay-tone--ok { --pay-tone: var(--color-panel-ok); }
.pay-tone--warn { --pay-tone: var(--color-panel-warn); }
.pay-tone--info { --pay-tone: var(--app-chart-1); }
.pay-tone--danger { --pay-tone: var(--app-destructive); }
.pay__body { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; }
.pay__table { align-self: start; margin: var(--space-sm) 0; }
.pay__table th, .pay__table td { padding: var(--space-sm) var(--space-md); }
.pay__table th:first-child, .pay__table td:first-child { padding-left: var(--space-lg); }
.pay__table td:first-child { font-family: var(--app-font); }
.pay__table .pay__ref { color: var(--color-panel-ink-2); }
.pay__how { font: 500 12px var(--app-font); color: var(--color-panel-ink-2); }
.pay__inv { display: inline-flex; align-items: center; gap: var(--space-sm); }
.pay__table tr { transition: background-color var(--dur-short) var(--ease-out); }
.pay__table td { transition: opacity var(--dur-short) var(--ease-out); }
.pay__table td:nth-child(n+4) { position: relative; }
.pay__table td:nth-child(n+4) > * { transition: opacity 0.2s var(--ease-out), transform 0.3s var(--ease-out); }
.pay__table tr.is-wait td:nth-child(-n+3) { opacity: 0.4; }
.pay__table tr.is-wait td:nth-child(n+4) > *, .pay__table tr.is-busy td:nth-child(n+4) > * { opacity: 0; transform: scale(0.92); }
.pay__table tr.is-busy td:nth-child(4)::before { content: "matching…"; position: absolute; left: var(--space-md); top: 50%; translate: 0 -50%; font: 12px var(--app-font); color: var(--color-panel-ink-2); animation: match-blink 0.7s var(--ease-in-out) infinite alternate; }
@keyframes match-blink { to { opacity: 0.35; } }
.pay__miss.is-sel { background: color-mix(in oklab, var(--color-panel-warn) 9%, transparent); }
.pay__miss .pay__how { color: var(--color-panel-warn); }
.pay__miss.is-matched { background: none; }
.pay__miss.is-matched .pay__how { color: var(--color-panel-ink-2); }
/* the side shows a payment's suggested matches only while that payment is selected; the empty note and the
   details share one grid cell, so the panel keeps its height either way */
.pay__side { display: grid; padding: var(--space-lg); border-left: 1px solid var(--color-panel-rule); background: var(--color-panel-2); }
.pay__empty, .pay__detail { grid-area: 1 / 1; }
.pay__detail { display: grid; align-content: start; gap: var(--space-sm); }
.pay__empty { align-self: center; justify-self: center; max-width: 22ch; font-size: 13px; color: var(--color-panel-ink-2); text-align: center; }
html:not(.js) .pay__empty, .js .pay__side:not(.is-open) .pay__detail, .js .pay__side.is-open .pay__empty { visibility: hidden; }
.js .pay__side.is-open .pay__detail { animation: pay-open 0.35s var(--ease-out); }
@keyframes pay-open { from { opacity: 0; transform: translateY(6px); } }
.pay__miss { cursor: pointer; }
.pay__what { display: grid; gap: 2px; font-size: 13px; color: var(--color-panel-ink-2); max-width: none; }
.pay__what b { font-weight: 600; color: var(--color-panel-ink); }
.pay__sec { margin-top: var(--space-xs); font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-panel-ink-2); }
.pay__sugg { list-style: none; display: grid; gap: var(--space-xs); }
.pay__sugg li { display: grid; gap: var(--space-sm); padding: var(--space-sm); border: 1px solid var(--color-panel-rule); border-radius: 10px; background: var(--color-panel); }
.pay__sugg li > div { display: grid; gap: 2px; font-size: 13px; }
.pay__sugg b { font-weight: 600; color: var(--color-panel-ink); }
.pay__sugg span { color: var(--color-panel-ink); font-variant-numeric: tabular-nums; }
.pay__sugg small { font-size: 12px; color: var(--color-panel-ink-2); }
.pay__btn { justify-self: start; height: 30px; padding: 0 12px; border: 1px solid var(--color-panel-accent-fill); border-radius: 8px; background: var(--color-panel-accent-fill); color: var(--color-panel-on-accent); font: 500 12px var(--app-font); cursor: pointer; transition: filter var(--dur-short) var(--ease-out); }
.pay__btn:hover { filter: brightness(1.1); }
.pay__btn--quiet { border-color: var(--color-panel-rule); background: transparent; color: var(--color-panel-ink); }
.pay__btn--quiet:hover { filter: none; background: var(--color-panel-2); }
.pay__btn:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.pay__btn:disabled { opacity: 0.5; cursor: default; }
.pay__done { display: flex; gap: var(--space-xs); padding: var(--space-sm); border-radius: 8px; background: color-mix(in oklab, var(--color-panel-ok) 11%, transparent); font-size: 13px; color: var(--color-panel-ink); max-width: none; }
.pay__other { font-size: 12px; color: var(--color-panel-ink-2); max-width: none; }
.pay__foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs) var(--space-lg); padding: var(--space-sm) var(--space-lg); border-top: 1px solid var(--color-panel-rule); font-size: 13px; color: var(--color-panel-ink-2); }
.pay__foot b { font-weight: 600; color: var(--color-panel-ink); font-variant-numeric: tabular-nums; }

/* overdue rules: the steps as a timeline, the two small-balance rules, and where today's overdue invoices stand */
.follow { margin-top: var(--space-3xl); }
.follow__h { font-size: var(--text-title); }
.follow .stage-split__text > p { max-width: 46ch; color: var(--color-ink-2); }
.dun__body { display: grid; gap: var(--space-lg); padding: var(--space-lg); }
.dun__steps { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.dun__steps li { position: relative; display: grid; align-content: start; gap: 2px; padding: 18px var(--space-xs) 0 0; font-size: 13px; color: var(--color-panel-ink); }
.dun__steps li::before { content: ""; position: absolute; left: 0; top: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--color-panel-accent-fill); }
.dun__steps li::after { content: ""; position: absolute; left: 14px; right: 4px; top: 4.5px; height: 1px; background: var(--color-panel-rule); }
.dun__steps li:last-child::after { display: none; }
.dun__steps li:first-child::before { background: var(--color-panel); box-shadow: inset 0 0 0 1.5px var(--color-panel-ink-2); }
.dun__steps li:last-child::before { background: var(--app-destructive); }
.dun__steps span { font: 12px var(--font-mono); color: var(--color-panel-ink-2); }
.dun__steps b { font-weight: 600; }
.dun__steps small { font-size: 12px; color: var(--color-panel-ink-2); }
.dun__rules { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-sm); }
.dun__rules li { display: grid; gap: 2px; padding: var(--space-sm) var(--space-md); border-radius: 8px; background: var(--color-panel-2); font-size: 13px; color: var(--color-panel-ink); }
.dun__rules b { font-weight: 600; }
.dun__rules span { font-size: 12px; color: var(--color-panel-ink-2); }
.dun__now td:first-child { font-family: var(--app-font); }
.dun__now th, .dun__now td { padding-right: var(--space-md); }
.dun__now th:last-child, .dun__now td:last-child { padding-right: 0; }
/* stacked under the table, the suggestions stay in view: hiding them would move the page on every pass */
@media (max-width: 60rem) {
  .js .pay__side:not(.is-open) .pay__detail { visibility: visible; }
  .js .pay__side .pay__empty { display: none; }
  .pay__body { grid-template-columns: minmax(0, 1fr); }
  .pay__side { border-left: 0; border-top: 1px solid var(--color-panel-rule); }
}
@media (max-width: 40rem) {
  /* each payment becomes two lines: payer and amount, then what it matched on and the invoice */
  .pay__table { margin: 0; }
  .pay__table thead, .pay__table .pay__ref { display: none; }
  .pay__table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px var(--space-md); align-items: center; padding: var(--space-sm) var(--space-md); border-bottom: 1px solid var(--color-panel-rule); }
  .pay__table tr:last-child { border-bottom: 0; }
  .pay__table td, .pay__table td:first-child { padding: 0; border: 0; }
  .pay__table td:nth-child(3) { grid-area: 1 / 2; }
  .pay__table td:nth-child(4) { grid-area: 2 / 1; min-height: 22px; }
  .pay__table td:nth-child(5) { grid-area: 2 / 2; justify-self: end; }
  .pay__table tr.is-busy td:nth-child(4)::before { left: 0; }
  .pay__side { padding: var(--space-md); }
  .dun__steps { grid-template-columns: minmax(0, 1fr); gap: var(--space-sm); }
  .dun__steps li { padding: 0 0 0 22px; }
  .dun__steps li::before { top: 4px; }
  .dun__steps li::after { left: 4.5px; right: auto; top: 18px; bottom: calc(-1 * var(--space-sm) + 2px); width: 1px; height: auto; }
  .dun__rules { grid-template-columns: minmax(0, 1fr); }
  .dun__body { padding: var(--space-md); }
}
.coll__banks { justify-self: start; }

/* new contract: the order's steps tick off in minutes, then the contract turns active days later on the start date */
.sgn__sum { display: grid; gap: var(--space-md); padding: var(--space-lg); border-bottom: 1px solid var(--color-panel-rule); }
.sgn__who { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); }
.sgn__who b { font-size: 16px; font-weight: 600; color: var(--color-panel-ink); }
.sgn__facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-sm) var(--space-md); }
.sgn__facts dt { font-size: 12px; color: var(--color-panel-ink-2); }
.sgn__facts dd { margin: 0; font-size: 13px; color: var(--color-panel-ink); overflow-wrap: anywhere; }
.sgn__facts div:nth-child(4) { grid-column: span 2; }
.sgn [data-f] { transition: opacity var(--dur-short) var(--ease-out); }
.sgn.is-swap [data-f] { opacity: 0; }
.sgn__log { list-style: none; display: grid; padding: var(--space-sm) var(--space-lg) var(--space-md); }
.sgn__log li { display: grid; grid-template-columns: 6.5rem auto minmax(0, 1fr); gap: var(--space-md); align-items: center; padding-block: var(--space-xs); }
.sgn__log time { font: 12px var(--font-mono); color: var(--color-panel-ink-2); white-space: nowrap; }
.sgn__log b { display: block; font-size: 13px; font-weight: 500; color: var(--color-panel-ink); }
.sgn__log small { font-size: 12px; color: var(--color-panel-ink-2); }
.sgn__log li > .icon { border-radius: 50%; transition: color var(--dur-short) var(--ease-out), box-shadow var(--dur-short) var(--ease-out); }
.sgn__log li > :not(.icon) { transition: opacity var(--dur-short) var(--ease-out); }
.sgn__log li.is-wait > .icon, .sgn__log li.is-busy > .icon { color: transparent; box-shadow: inset 0 0 0 1.5px var(--color-panel-rule); }
.sgn__log li.is-busy > .icon { box-shadow: inset 0 0 0 1.5px var(--color-panel-accent); animation: sgn-busy 0.65s var(--ease-out) infinite; }
.sgn__log li.is-wait > :not(.icon) { opacity: 0.4; }
@keyframes sgn-busy { 50% { box-shadow: inset 0 0 0 1.5px var(--color-panel-accent), 0 0 0 4px color-mix(in oklab, var(--color-panel-accent) 20%, transparent); } }
.sgn__log .sgn__gap { display: block; position: relative; margin: var(--space-2xs) 0; padding: var(--space-xs) 0 var(--space-xs) calc(6.5rem + var(--space-md) + 24px); font: 12px var(--font-mono); color: var(--color-panel-ink-2); transition: opacity var(--dur-long) var(--ease-out); }
.sgn__log .sgn__gap::before { content: ""; position: absolute; left: calc(6.5rem + var(--space-md) + 7.5px); top: 0; bottom: 0; border-left: 1.5px dashed var(--color-panel-rule); }
.sgn__log .sgn__gap.is-wait, .sgn__log .sgn__gap.is-busy { opacity: 0; }
.sgn [data-sgn-status] { transition: opacity var(--dur-short) var(--ease-out); }
.sgn [data-sgn-status].is-off { opacity: 0; }
@media (max-width: 40rem) {
  .sgn__sum { padding: var(--space-md); }
  .sgn__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sgn__facts div:nth-child(4) { grid-column: auto; }
  .sgn__facts div:nth-child(5) { grid-column: span 2; }
  .sgn__log { padding-inline: var(--space-md); }
  .sgn__log li { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "icon time" "icon text"; column-gap: var(--space-sm); row-gap: 0; }
  .sgn__log li > .icon { grid-area: icon; align-self: start; margin-top: 2px; }
  .sgn__log time { grid-area: time; }
  .sgn__log li > div { grid-area: text; }
  .sgn__log .sgn__gap { padding-left: calc(24px + var(--space-sm)); }
  .sgn__log .sgn__gap::before { left: 7.5px; }
}
