/* funnel-display-latin-ext-wght-normal */
@font-face {
  font-family: 'Funnel Display';
  font-style: normal;
  font-display: swap;
  font-weight: 300 800;
  src: url(/fonts/funnel-display/funnel-display-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* funnel-display-latin-wght-normal */
@font-face {
  font-family: 'Funnel Display';
  font-style: normal;
  font-display: swap;
  font-weight: 300 800;
  src: url(/fonts/funnel-display/funnel-display-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}/* funnel-sans-latin-ext-wght-normal */
@font-face {
  font-family: 'Funnel Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 300 800;
  src: url(/fonts/funnel-sans/funnel-sans-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* funnel-sans-latin-wght-normal */
@font-face {
  font-family: 'Funnel Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 300 800;
  src: url(/fonts/funnel-sans/funnel-sans-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}/* sometype-mono-latin-ext-wght-normal */
@font-face {
  font-family: 'Sometype Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
  src: url(/fonts/sometype-mono/sometype-mono-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* sometype-mono-latin-wght-normal */
@font-face {
  font-family: 'Sometype Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
  src: url(/fonts/sometype-mono/sometype-mono-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}/* onest-cyrillic-wght-normal */
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/onest/onest-cyrillic-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

/* onest-latin-wght-normal */
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/onest/onest-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}/* API Balance.
   Ledger paper and ink. Neutrals lean toward ledger green. Money out is ink, money in is green.
   Red and amber are kept for things that need attention, and nothing else. */
:root {
  color-scheme: light dark;
  --paper: light-dark(#f2f5f2, #101713);
  --surface: light-dark(#ffffff, #161e19);
  --sunken: light-dark(#ebefeb, #1d2721);
  --raised: light-dark(#ffffff, #1e2923);
  --ink: light-dark(#0f1a15, #e8eee9);
  --ink-2: light-dark(#434f49, #b4bfb8);
  --ink-3: light-dark(#5f6a64, #909c95);
  --rule: light-dark(#dde3de, #29342e);
  --rule-2: light-dark(#bfc9c2, #3d4b43);
  --in: light-dark(#1f8a55, #5fd08f);
  --in-ink: light-dark(#17703f, #72d99d);
  --in-on-ink: light-dark(#63d596, #17703f);
  --out: light-dark(#16231d, #c7d1ca);
  --warn: light-dark(#d2921a, #e7b552);
  --warn-ink: light-dark(#7a5000, #ecc06a);
  --crit: light-dark(#c8372d, #ff8f80);
  --crit-ink: light-dark(#ad2a21, #ff9e90);
  --focus: light-dark(#17703f, #72d99d);
  --shade: light-dark(rgb(15 26 21 / .16), rgb(0 0 0 / .55));
  /* series colours for the optional split: five slots and "Other". No green and no red here: green means money in, red means trouble. */
  --s1: light-dark(#2a78d6, #3987e5); --s2: light-dark(#eb6834, #d95926); --s3: light-dark(#6250d6, #9085e9); --s4: light-dark(#eda100, #c98500);
  --s5: light-dark(#e87ba4, #d55181); --s-other: light-dark(#9aa19a, #6f776f);
  --display: 'Funnel Display', 'Funnel Sans', system-ui, sans-serif;
  --text: 'Funnel Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Sometype Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --rail: 224px; --bar-h: 68px; --gut: 40px;
  --top: 0px;   /* the height of the administrator bar, when an administrator is inside someone's cabinet */
}
/* The three faces of the design have no Cyrillic. Russian is set in Onest, a grotesque of the same build with both alphabets, for the
   whole text, so a sentence that mixes the two is one face; the name of the product and the large figures, which are Latin and digits,
   keep the display face. Onest is fetched only when a page is shown in Russian. */
:root:lang(ru) { --display: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; --text: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; }
:root:lang(ru) :is(.brand, .big) { font-family: 'Funnel Display', 'Funnel Sans', system-ui, sans-serif; }
/* Russian words are longer and the system face is wider. A group's name keeps its words whole and lets the count drop under it. */
:root:lang(ru) .gshare .nm { flex-wrap: wrap; gap: 0 10px; } :root:lang(ru) .gshare .nm .lnk { overflow-wrap: normal; text-align: left; } :root:lang(ru) .gshare .g-n { margin-left: 0; padding-left: 0; }
/* ...and where English cuts a long name short with an ellipsis, Russian lets it take a second line: half a name says too little */
:root:lang(ru) .tbl.runs td { height: auto; padding-top: 9px; padding-bottom: 9px; } :root:lang(ru) .tbl.runs .c-name { white-space: normal; overflow-wrap: anywhere; }
/* the accounts list: the name takes the whole width of its column and the provider with the key's tail goes under it */
@container page (min-width: 761px) {
  :root:lang(ru) .acc .row-btn { flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; padding: 5px 0; }
  :root:lang(ru) .acc .row-btn :is(b, .meta) { max-width: 100%; flex: none; }
  :root:lang(ru) .acc tr.grp th { padding-top: 6px; padding-bottom: 6px; } :root:lang(ru) .acc tr.grp .meta { display: block; margin: 2px 0 0; }
}
@container page (min-width: 761px) { :root:lang(ru) .filters .search { flex-basis: 300px; max-width: 400px; } }
:root:lang(ru) .gshare :is(th, td).c-first { white-space: normal; overflow: visible; overflow-wrap: anywhere; } :root:lang(ru) .gshare .c-first .lasts { display: block; margin-left: 0; }
:root[data-theme=light] { color-scheme: light; }
:root[data-theme=dark] { color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 15px/1.45 var(--text); font-optical-sizing: auto; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body:has(dialog[open]) { overflow: hidden; }
h1, h2, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
table { border-collapse: collapse; width: 100%; }
::selection { background: color-mix(in srgb, var(--in) 30%, transparent); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.mute { color: var(--ink-3); }
.neg { color: var(--crit-ink); }
.strong { font-weight: 600; }
.warn-t { color: var(--warn-ink); font-weight: 600; }
.in { color: var(--in-ink); }
.nw { white-space: nowrap; }
.r { text-align: right; }
.grow { flex: 1; }
.hint { color: var(--ink-3); font-size: 13px; line-height: 1.45; text-wrap: pretty; }
.meta { display: block; color: var(--ink-3); font-size: 13px; }
kbd { font: 500 11px/1 var(--mono); color: var(--ink-3); border: 1px solid var(--rule-2); border-radius: 4px; padding: 3px 5px; background: var(--surface); }
code.key, .mono { font-family: var(--mono); font-size: .88em; letter-spacing: -.01em; }
code.key { color: var(--ink-2); }
.ico { flex: none; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 0 16px; border: 1px solid var(--ink); border-radius: 8px; background: var(--ink); color: var(--surface); font-weight: 600; font-size: 14px; white-space: nowrap; text-decoration: none; transition: background .16s, border-color .16s, transform .16s var(--ease); }
.btn:hover { background: color-mix(in oklch, var(--ink) 86%, var(--in)); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { background: var(--sunken); border-color: var(--rule); color: var(--ink-3); cursor: not-allowed; }
.btn[aria-busy=true] { opacity: .7; cursor: progress; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--rule-2); font-weight: 500; }
.btn.ghost:hover { background: var(--sunken); border-color: var(--ink-3); }
.btn.ghost.danger, .danger { color: var(--crit-ink); }
.btn.danger-b { background: var(--crit); border-color: var(--crit); color: light-dark(#fff, #2a0d09); }
.btn.sm { min-height: 32px; padding: 0 12px; font-size: 13px; }
.btn.full { width: 100%; min-height: 42px; }
.lnk { background: none; border: 0; padding: 0; color: var(--ink); text-decoration: underline; text-decoration-color: var(--rule-2); text-underline-offset: 3px; text-decoration-thickness: 1px; font-weight: 500; text-align: left; }
.lnk:hover { text-decoration-color: var(--in); }
.ib { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 1px solid transparent; border-radius: 8px; background: none; color: var(--ink-2); font-size: 20px; line-height: 1; }
.ib:hover { background: var(--sunken); color: var(--ink); }
.chip { min-height: 32px; padding: 0 12px; border: 1px solid var(--rule-2); border-radius: 999px; background: transparent; font-size: 13px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip[aria-pressed=true] { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.seg { display: inline-flex; padding: 3px; border-radius: 9px; background: var(--sunken); gap: 2px; }
.seg button { min-height: 28px; padding: 0 11px; border: 0; border-radius: 6px; background: none; color: var(--ink-2); font-size: 13px; font-weight: 500; white-space: nowrap; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed=true] { background: var(--raised); color: var(--ink); box-shadow: 0 0 0 1px var(--rule), 0 1px 2px var(--shade); }
.seg [data-name=preset][aria-pressed=true] { view-transition-name: seg-preset; }
.seg [data-name=gran][aria-pressed=true] { view-transition-name: seg-gran; }
.seg [data-name=dim][aria-pressed=true] { view-transition-name: seg-dim; }
.sel select, .fld input, .fld select, .fld textarea, .search input, .dates input { min-height: 38px; width: 100%; padding: 0 12px; border: 1px solid var(--rule-2); border-radius: 8px; background: var(--surface); color: var(--ink); }
.sel select { min-height: 34px; max-width: min(240px, 100%); text-overflow: ellipsis; padding-right: 30px; font-size: 13.5px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 15px) 55%, calc(100% - 10px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.sel select:hover, .fld input:hover, .fld select:hover, .fld textarea:hover, .search input:hover { border-color: var(--ink-3); }
.fld textarea { padding: 9px 12px; min-height: 64px; resize: vertical; field-sizing: content; line-height: 1.4; }
.fld input[readonly] { background: var(--sunken); color: var(--ink-2); }
.fld select { appearance: none; padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 17px) 55%, calc(100% - 12px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.fld input.secret { font-family: var(--mono); font-size: 13.5px; -webkit-text-security: disc; }
.search { position: relative; display: block; min-width: 0; flex: 1 1 240px; max-width: 340px; color: var(--ink-3); }
.search .ico { position: absolute; left: 11px; top: 11px; pointer-events: none; }
.search input { min-height: 34px; padding: 0 38px 0 34px; font-size: 13.5px; }
.search kbd { position: absolute; right: 8px; top: 8px; }
.search:focus-within kbd { display: none; }
.ctl { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.tag { font-size: 12px; font-weight: 500; color: var(--ink-2); border: 1px solid var(--rule-2); border-radius: 999px; padding: 1px 9px; white-space: nowrap; }
.count { font-size: 14px; color: var(--ink-2); }
.count b { color: var(--ink); font-weight: 600; }
.count-b { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--ink); color: var(--surface); font-size: 12px; font-weight: 600; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }

/* where a number comes from: exact, estimate, manual, none, unconfirmed */
.pm { display: inline-block; width: 8px; height: 8px; flex: none; border: 1.5px solid currentColor; border-radius: 50%; }
.pm-exact { background: currentColor; }
.pm-est { background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
.pm-manual { border-radius: 1.5px; }
.pm-none { height: 0; border-width: 1.5px 0 0; border-radius: 0; align-self: center; }
.pm-unk { border-style: dotted; }
.prec { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.pi { display: inline-flex; margin-right: 7px; color: var(--ink-2); vertical-align: 1px; }
/* an amount keeps a fixed slot, so the source marks in a column stand under one another */
.amt { display: inline-block; min-width: 9.2ch; text-align: right; }
.mix { display: flex; flex-wrap: wrap; gap: 2px 14px; }
.st { position: relative; display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; white-space: nowrap; }
.st i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.st-ok, .st-pend { color: var(--ink-2); } .st-ok i { background: var(--in); } .st-pend i { background: none; border: 1.5px dotted currentColor; }
.st-crit { color: var(--crit-ink); } .st-warn { color: var(--warn-ink); } .st-mute { color: var(--ink-3); }
.st-crit i { border-radius: 1px; } .st-warn i { border-radius: 0; clip-path: polygon(50% 0, 100% 100%, 0 100%); width: 8px; height: 8px; } .st-mute i { background: none; border: 1.5px solid currentColor; }
.k { display: inline-block; width: 9px; height: 9px; margin-right: 8px; border-radius: 2px; }
.k-out { background: var(--out); } .k-in { background: var(--in); border-radius: 0; transform: rotate(45deg) scale(.86); }
.k-blind, .beam .b-blind { background: repeating-linear-gradient(135deg, var(--out) 0 2px, transparent 2px 4.5px); }
.prec:has(.pm-none) { color: var(--ink-3); }
.delta b { font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* ---------- frame ---------- */
.skip { position: fixed; left: 12px; top: -60px; z-index: 50; padding: 9px 14px; border: 0; border-radius: 8px; background: var(--ink); color: var(--surface); font-weight: 600; }
.skip:focus { top: 12px; }
.app { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); min-height: calc(100dvh - var(--top)); }
.rail { position: sticky; top: var(--top); height: calc(100dvh - var(--top)); display: flex; flex-direction: column; gap: 18px; padding: 22px 14px 16px; }
.brand-a { text-decoration: none; padding: 0 8px; border-radius: 8px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 600 17px/1 var(--display); letter-spacing: -.01em; white-space: nowrap; }
.mark { flex: none; }
.jump { display: flex; align-items: center; gap: 9px; min-height: 34px; padding: 0 8px 0 10px; border: 1px solid var(--rule-2); border-radius: 8px; background: transparent; color: var(--ink-3); font-size: 13.5px; text-align: left; }
.jump span { flex: 1; }
.jump:hover { border-color: var(--ink-3); color: var(--ink-2); }
.jump kbd { background: transparent; }
.nav { display: grid; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 11px; min-height: 36px; padding: 0 10px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-size: 14.5px; font-weight: 500; }
.nav a:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink); }
.nav a[aria-current] { color: var(--ink); }
.nav a[aria-current] .ico { color: var(--in-ink); }
.rail-foot { margin-top: auto; padding: 14px 8px 0; border-top: 1px solid var(--rule); display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; }
.who { font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role { grid-column: 1; font-size: 12.5px; color: var(--ink-3); }
.rail-acts { grid-column: 2; grid-row: 1 / 3; display: flex; align-items: center; }
.tabbar { display: none; }
.page { container: page / inline-size; background: var(--surface); border-left: 1px solid var(--rule); min-width: 0; display: flex; flex-direction: column; min-height: calc(100dvh - var(--top)); }
.bar { position: sticky; top: var(--top); z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; min-height: var(--bar-h); padding: 12px max(var(--gut), calc((100cqi - 1360px) / 2)); background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid transparent; }
@supports (animation-timeline: scroll()) {
  .bar { animation: bar-rule linear both; animation-timeline: scroll(root); animation-range: 0 48px; }
  @keyframes bar-rule { to { border-bottom-color: var(--rule); } }
}
@supports not (animation-timeline: scroll()) { .bar { border-bottom-color: var(--rule); } }
/* an administrator inside someone else's cabinet: said in ink across the top of every screen, with the way back */
#actbar { position: sticky; top: 0; z-index: 45; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 18px; padding: 7px 18px; background: var(--ink); color: var(--surface); font-size: 13.5px; }
#actbar p { min-width: 0; overflow-wrap: anywhere; text-wrap: balance; }
#actbar b { font-weight: 600; }
#actbar .btn { min-height: 30px; background: transparent; border-color: color-mix(in srgb, var(--surface) 50%, transparent); color: var(--surface); }
#actbar .btn:hover { background: color-mix(in srgb, var(--surface) 16%, transparent); }
#actbar :focus-visible { outline-color: var(--in-on-ink); }
.bar-l { display: flex; align-items: baseline; gap: 12px; min-width: 0; flex-wrap: wrap; }
.bar-r { display: flex; align-items: center; gap: 10px; min-width: 0; margin-left: auto; }
.bar h1 { font: 600 24px/1.15 var(--display); letter-spacing: -.015em; overflow-wrap: anywhere; }
.crumb { font-size: 14px; color: var(--ink-3); text-decoration: none; }
.crumb::after { content: '/'; margin-left: 12px; color: var(--rule-2); }
.crumb:hover { color: var(--ink); }

.period { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.period .span { display: inline-flex; align-items: baseline; gap: 7px; min-width: 0; padding: 0 4px; font-size: 13px; color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.period .span b { font-weight: 600; color: var(--ink); }
/* the dates stand between two arrows that step whole months; the pair reads as one control, on the same paper as the presets */
.step { display: inline-flex; align-items: center; gap: 2px; min-width: 0; }
.step .ib { width: 30px; height: 30px; border-color: var(--rule-2); color: var(--ink-2); }
.step .ib[disabled] { color: var(--rule-2); border-color: var(--rule); cursor: default; background: none; }
.sel.narrow { display: none; }
.dates { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); }
.dates input { min-height: 34px; padding: 0 8px; font-size: 13px; width: auto; }
#main { flex: 1; padding: 8px max(var(--gut), calc((100cqi - 1360px) / 2)) 56px; outline: none; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 24px; padding: 16px max(var(--gut), calc((100cqi - 1360px) / 2)) 22px; border-top: 1px solid var(--rule); color: var(--ink-3); font-size: 12.5px; }

/* ---------- sections ---------- */
.block { padding: 26px 0 30px; border-top: 1px solid var(--rule); }
.block-h { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; margin-bottom: 16px; min-height: 34px; }
.block-h h2, .first h2 { font: 600 17px/1.2 var(--display); letter-spacing: -.01em; }
.block-h:has(.count-b) { justify-content: flex-start; }
.pad { padding-top: 12px; }
.lead { margin: -6px 0 16px; max-width: 70ch; }
.empty { padding: 22px 0; color: var(--ink-3); font-size: 14px; max-width: 60ch; }
.empty.calm { padding: 4px 0 0; }
.first { max-width: 560px; padding: 72px 0 96px; display: grid; gap: 14px; justify-items: start; }
.first h2 { font-size: 30px; letter-spacing: -.02em; }
.first p { color: var(--ink-2); font-size: 16px; text-wrap: pretty; }
.tools { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 20px; padding: 14px 0 18px; }
.tools > .ctl { flex: 1 1 0; justify-content: flex-end; min-width: 0; }
.tools .search { flex: 1 1 150px; min-width: 130px; }
@container page (min-width: 901px) { .tools > .ctl { flex-wrap: nowrap; } .tools .count { white-space: nowrap; } }
.tools > .ctl:first-child:not(:only-child) { justify-content: flex-start; }
/* accounts: what can be done sits on the first line, how the list is found and arranged on the second */
.tools:has(+ .filters) { padding-bottom: 10px; }
.filters { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding-bottom: 14px; }
.filters .search { flex: 1 1 200px; max-width: 360px; }
.filt { display: contents; }
.filt-t { display: none; align-items: center; gap: 7px; }
.filt-t .count-b { min-width: 18px; height: 18px; font-size: 11px; }
.filt [data-act=grouped] { margin-left: auto; }
.sheet { border-top: 1px solid var(--rule); }
.tip-line { padding: 14px 0 0; max-width: 84ch; }
.keyline { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.keyline .prec { font-size: 13px; color: var(--ink-3); white-space: normal; align-items: baseline; }
.keyline .pm { align-self: center; }
.pad { max-width: 84ch; }
.intro { display: grid; gap: 14px; padding: 12px 0 26px; max-width: 78ch; }
.intro > p:first-child { font-size: 17px; color: var(--ink-2); text-wrap: pretty; }
.legend-p { display: grid; gap: 6px; }
.legend-p li { display: grid; grid-template-columns: 120px 1fr; gap: 12px; font-size: 13px; align-items: baseline; }

/* the totals for the period: two figures, and what is left between them */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(300px, .92fr); gap: 26px 40px; padding: 26px 0 30px; align-items: start; }
.lbl { display: flex; align-items: center; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.big { font: 500 clamp(38px, 5.3cqi, 66px)/1.02 var(--display); letter-spacing: -.035em; font-variant-numeric: tabular-nums; margin: 10px 0 12px; white-space: nowrap; }
.fig .sub { font-size: 13px; color: var(--ink-3); min-height: 19px; text-wrap: balance; }
.fig .sub + .sub { margin-top: 2px; }
.beam-row { grid-column: 1 / 3; display: grid; gap: 10px; }
.beam-row .hint { display: flex; gap: 4px 14px; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.beam-row .hint span { display: inline-flex; align-items: center; }
.hero .attn { grid-column: 3; grid-row: 1 / span 3; align-self: stretch; border-left: 1px solid var(--rule); padding-left: 28px; }
.hero .attn .block-h { margin-bottom: 6px; min-height: 0; justify-content: flex-start; }
.side { grid-column: 1 / 3; display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); gap: 16px 28px; padding-top: 20px; border-top: 1px solid var(--rule); }
.side dt, .facts dt { display: flex; align-items: center; font-size: 13px; color: var(--ink-2); }
.side dd:not(.hint) { font: 500 21px/1.25 var(--display); letter-spacing: -.015em; font-variant-numeric: tabular-nums; }
.side .hint { text-wrap: balance; }
.fresh { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: flex-end; gap: 2px 14px; margin-left: auto; text-align: right; font-variant-numeric: tabular-nums; }
.tools.scope { padding: 12px 0 0; align-items: center; }
.tools.scope > .ctl { flex: 0 1 auto; justify-content: flex-start; }
.synced { padding: 0 0 12px; max-width: 96ch; }
.side .of, .side dd .mute { font: 400 14px/1 var(--text); letter-spacing: 0; color: var(--ink-3); }
.side dd.warn-t { font-weight: 500; }
.side .hint + .hint { margin-top: 3px; }
.side .hint .meter { margin: 5px 0 7px; max-width: 220px; }
/* two short lists side by side: what moved, and what runs out */
.duo { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 0 48px; border-top: 1px solid var(--rule); }
.duo > .block { border-top: 0; min-width: 0; }
.block-h > .hint { margin-left: auto; text-align: right; }
.block-h .ctl > .hint { margin-right: 6px; }
.chgs .chg { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: 14px; }
.chgs .chg:last-child { border-bottom: 0; }
.chg-m { align-self: baseline; font: 600 14px/1 var(--mono); color: var(--ink-3); text-align: center; }
.chg-m .k { margin: 0; }
.chg .al-t { color: var(--ink-2); } .chg .al-t b { color: var(--ink); margin-right: 4px; }
.sub-h { margin: 16px 0 2px; font: 500 12.5px/1.3 var(--text); color: var(--ink-3); }
.tbl.runs td { height: 40px; padding-top: 0; padding-bottom: 0; white-space: nowrap; }
.tbl.runs .c-name { width: 99%; max-width: 0; overflow: hidden; text-overflow: ellipsis; }
.tbl.runs .lnk { text-decoration-color: transparent; font-weight: 500; } .tbl.runs .lnk:hover { text-decoration-color: var(--in); }
.c-left .lasts, .c-first .lasts { display: inline-block; min-width: 34px; margin-left: 10px; font-size: 12.5px; color: var(--ink-3); }
.c-left .lasts.warn-t, .c-first .lasts.warn-t { color: var(--warn-ink); } .c-left .lasts.neg, .c-first .lasts.neg { color: var(--crit-ink); }
/* a change: the amount in ink, the percentage after it in a quieter voice. More spend is not an alarm, so there is no colour in it. */
.c-chg { white-space: nowrap; font-variant-numeric: tabular-nums; }
/* all time has no earlier period: the column of changes is not shown at all */
.tbl.nocmp :is(th, td).c-chg { display: none; }
.c-chg .pc { display: inline-block; min-width: 54px; margin-left: 8px; font-size: 12.5px; color: var(--ink-3); text-align: right; }
.tagm { display: inline-block; padding: 1px 7px; border: 1px solid var(--rule-2); border-radius: 999px; font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.th-b { padding: 0; border: 0; background: none; font: inherit; color: inherit; white-space: nowrap; }
.th-b:hover { color: var(--ink); }
.th-t { display: none; }
th[aria-sort=ascending] > .th-b:first-child, th[aria-sort=descending] > .th-b:first-child, .th-b[aria-pressed=true] { color: var(--ink); font-weight: 600; }
th[aria-sort=ascending] > .th-b:first-child::after, .th-left[aria-pressed=true]::after { content: '↑'; margin-left: 4px; font-weight: 400; }
th[aria-sort=descending] > .th-b:first-child::after { content: '↓'; margin-left: 4px; font-weight: 400; }
.tbl tr.rest td { padding-top: 12px; border-bottom: 0; }
/* the balance movement is a statement: one line per step, the sum ruled off above the expected figure, the difference last */
.move { display: grid; grid-template-columns: minmax(280px, 440px) minmax(0, 1fr); gap: 8px 56px; align-items: start; }
.stmt { display: grid; }
.stmt > div { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding: 7px 0; font-size: 14.5px; }
.stmt dt { color: var(--ink-2); } .stmt dd { font-variant-numeric: tabular-nums; white-space: nowrap; }
.stmt .sum { margin-top: 5px; padding-top: 11px; border-top: 1px solid var(--ink-3); }
.stmt .sum dt, .stmt .diff dt { color: var(--ink); }
.stmt .diff { margin-top: 5px; padding-top: 11px; border-top: 1px solid var(--rule); font-weight: 600; }
.move-n { display: grid; gap: 8px; max-width: 62ch; padding-top: 7px; font-size: 14.5px; }
.move-n .pi { margin-right: 6px; }
.hint.moved { margin-top: -6px; padding-left: 10px; border-left: 2px solid var(--rule-2); }
.beam { position: relative; display: flex; gap: 3px; height: 10px; }
.beam i { height: 100%; min-width: 3px; }
.beam .b-out { background: var(--out); border-radius: 3px 0 0 3px; }
.beam .b-blind { margin-left: -1px; }
.beam .b-in { background: var(--in); border-radius: 0 3px 3px 0; }
.beam b { position: absolute; top: -5px; bottom: -5px; width: 2px; margin-left: -1px; background: var(--ink); box-shadow: 0 0 0 2px var(--surface); border-radius: 1px; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--rule); }
.facts.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.facts.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }   /* an account kept by hand has no balance to show */
.facts > div { padding: 18px 24px 18px 0; display: grid; align-content: start; gap: 3px; }
.facts > div + div { border-left: 1px solid var(--rule); padding-left: 24px; }
.facts dd:not(.hint) { font: 500 28px/1.15 var(--display); letter-spacing: -.025em; font-variant-numeric: tabular-nums; margin: 4px 0 3px; white-space: nowrap; }

.tools + .facts { border-top: 1px solid var(--rule); }

/* ---------- charts ---------- */
.chart { position: relative; min-height: 120px; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-bottom: 8px; font-size: 13px; color: var(--ink-2); }
.legend li { display: inline-flex; align-items: center; gap: 7px; }
.sw { width: 10px; height: 10px; border-radius: 2px; flex: none; display: inline-block; }
.sw-in { background: var(--in); border-radius: 0; transform: rotate(45deg) scale(.82); }
.sw-part { background: repeating-linear-gradient(135deg, var(--out) 0 2px, var(--surface) 2px 4px); }
.plot { position: relative; border-radius: 6px; }
.plot svg { display: block; }
.plot .grid { stroke: var(--rule); stroke-width: 1; }
.plot .base { stroke: var(--ink-3); stroke-width: 1; }
.plot .lane, .lg-chart .lane { stroke: var(--rule-2); stroke-width: 1; stroke-dasharray: 2 4; }
.plot .tick { fill: var(--ink-3); font: 11.5px var(--text); font-variant-numeric: tabular-nums; }
.plot .inm path { fill: var(--in); stroke: var(--surface); stroke-width: 2; paint-order: stroke; }
.lg-chart .inm { fill: var(--in); }
/* the running total: top-ups as a stepped line beside the bars, and the budget they are heading for */
.plot .cumin { fill: none; stroke: var(--in); stroke-width: 2; stroke-linejoin: round; }
.plot .bline { stroke: var(--ink-2); stroke-width: 1.5; stroke-dasharray: 5 4; } .plot .bline-l { fill: var(--ink-2); font: 500 11.5px var(--text); font-variant-numeric: tabular-nums; paint-order: stroke; stroke: var(--surface); stroke-width: 4px; }
.sw-inl { background: none; height: 0; border-top: 2px solid var(--in); border-radius: 0; align-self: center; } .sw-bl { background: none; height: 0; border-top: 2px dashed var(--ink-2); border-radius: 0; align-self: center; }
.gshare .meta.tb, .acc .meta.tb { display: block; margin-top: 2px; font-size: 12px; }
.plot .in-l { fill: var(--in-ink); font: 600 11.5px var(--text); font-variant-numeric: tabular-nums; }
.plot .hit { fill: transparent; }
.plot .cursor { fill: color-mix(in srgb, var(--ink) 6%, transparent); }
.tip { position: absolute; top: 34px; z-index: 5; min-width: 180px; max-width: min(320px, 90%); padding: 10px 12px; border: 1px solid var(--rule); border-radius: 8px; background: var(--raised); box-shadow: 0 10px 28px -10px var(--shade); font-size: 13px; pointer-events: none; display: grid; gap: 4px; }
.tip b { font-weight: 600; margin-bottom: 2px; }
.tip .row { display: grid; grid-template-columns: 10px 1fr auto; gap: 8px; align-items: center; font-variant-numeric: tabular-nums; }
.tip .row.sub { color: var(--ink-2); padding-left: 12px; grid-template-columns: 8px 1fr auto; }
.tip .row.sub .sw { width: 8px; height: 8px; }
.tview { margin-top: 10px; font-size: 13px; }
.tview summary, .fold summary, tr.more summary { cursor: pointer; color: var(--ink-2); width: fit-content; border-radius: 4px; }
.tview summary:hover, .fold summary:hover, tr.more summary:hover { color: var(--ink); }
.tview[open] summary { margin-bottom: 8px; }
.mini { display: block; }
.mini .m-out { fill: var(--out); opacity: .82; }
.mini .m-in { fill: var(--in); transform-box: fill-box; transform-origin: center; transform: rotate(45deg) scale(.8); }
@keyframes grow { from { transform: scaleY(0); } }
@keyframes appear { from { opacity: 0; } }
@media (prefers-reduced-motion: no-preference) {
  .plot.grow .bar, .lg-chart .bar { transform-box: fill-box; transform-origin: 50% 100%; animation: grow .8s var(--ease) backwards; animation-delay: calc(var(--i) * 14ms + 60ms); }
  .plot.grow .inm, .lg-chart .inm { animation: appear .5s ease-out backwards; animation-delay: calc(var(--i) * 14ms + 420ms); }
}

/* ---------- tables ---------- */
.scroll { overflow-x: auto; }
.tbl { font-size: 14px; font-variant-numeric: tabular-nums; }
.tbl th { text-align: left; font-weight: 500; font-size: 12.5px; color: var(--ink-3); padding: 10px 12px; border-bottom: 1px solid var(--rule); white-space: nowrap; background: var(--surface); }
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--rule); vertical-align: middle; height: 46px; }
.tbl th.r, .tbl td.r { text-align: right; }
.tbl th:first-child, .tbl td:first-child { padding-left: 0; }
.tbl th:last-child, .tbl td:last-child { padding-right: 0; }
.tbl td.r { white-space: nowrap; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl.acc tbody tr:not(.grp):hover, .tbl.usr tbody tr:hover { background: color-mix(in srgb, var(--paper) 70%, transparent); }
.row-btn { display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; }
.row-btn b { font-weight: 600; font-size: 14.5px; }
.row-btn:hover b { text-decoration: underline; text-decoration-color: var(--in); text-underline-offset: 3px; }
/* Accounts: one account, one line of 40px. The name column takes what is left and truncates, so it never pushes the table wider than the sheet;
   every other column is as wide as its content. The amounts stand in fixed slots, so the figures of a column end on one line. */
.acc th, .acc td { padding: 0 10px; white-space: nowrap; }
.acc thead th { height: 34px; }
.acc td, .acc tr.grp th { height: 40px; }
.acc .c-name { width: 99%; max-width: 0; }
.acc .row-btn { display: flex; align-items: center; gap: 10px; min-height: 40px; min-width: 0; }
.acc .row-btn b { flex: 0 1 auto; min-width: 5ch; font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.acc .row-btn .meta { flex: 0 1000 auto; min-width: 0; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; }
.acc .c-mail { display: none; width: 16%; max-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); font-size: 13.5px; }
.acc .c-mini .mini { margin: 0 auto 0 0; }
.acc .lasts { display: inline-block; width: 34px; margin-left: 8px; font-size: 12.5px; color: var(--ink-3); text-align: left; }
.acc .lasts.warn-t { color: var(--warn-ink); } .acc .lasts.neg { color: var(--crit-ink); }
.acc th.c-bal { padding-right: 52px; }
.acc .only-c { display: none; }
.acc .c-chk .meta { display: inline; margin-left: 7px; font-size: 12.5px; }
@container page (min-width: 1500px) { .acc .c-mail { display: table-cell; } }
@container page (max-width: 1180px) { .acc .c-chk { display: none; } }
@container page (max-width: 1300px) { .acc .c-mini { display: none; } }
@container page (max-width: 900px) { .acc th.c-chg, .acc td.c-chg { display: none; } }
/* grouped: each group opens with a line of its own that stands in the columns it totals */
.acc.grouped tbody + tbody::before { content: ''; display: table-row; height: 14px; }
.acc tr.grp th, .acc tr.grp td { background: var(--paper); border-bottom: 1px solid var(--rule); font-weight: 600; }
.acc tr.grp th { color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.acc.grouped :is(th, td):first-child { padding-left: 12px; } .acc.grouped :is(th, td):last-child { padding-right: 12px; }
.acc tr.grp th:first-child { border-radius: 8px 0 0 8px; } .acc tr.grp td:last-child { border-radius: 0 8px 8px 0; }
.acc .g-name { font: 600 14.5px/1.2 var(--display); letter-spacing: -.005em; }
.acc .g-name .lnk { font-weight: 600; text-decoration-color: transparent; } .acc .g-name .lnk:hover { text-decoration-color: var(--in); }
.acc tr.grp .meta { display: inline; margin-left: 10px; font-weight: 400; font-size: 12.5px; }
.acc tr.grp .lim-set, .acc tr.grp .lim-n .mute { font-weight: 400; }
.c-name .meta { margin-top: 1px; }
/* a name is the owner's own text: however long, it wraps inside its place and never widens the page */
.share .nm, .gshare .nm, .led .c-acc, .c-op, .legend li, .d-in > p, .al-t, .tip .row > span, .kv dd, #toast, #palList li > span, .banner > span, .first h2, .usr .row-btn b, .count { overflow-wrap: anywhere; min-width: 0; }
.share .nm, .gshare .nm { display: flex; align-items: center; gap: 8px; }
.share .lnk, .gshare .lnk { text-decoration-color: transparent; font-weight: 500; }
.share .lnk:hover, .gshare .lnk:hover { text-decoration-color: var(--in); }
.share td:first-child { width: 58%; }
.track { display: block; height: 3px; margin-top: 7px; background: var(--sunken); border-radius: 2px; overflow: hidden; }
.track i { display: block; height: 100%; background: var(--out); border-radius: 2px; }
.gshare td:first-child { width: 30%; } .gshare th, .gshare td { white-space: nowrap; } .gshare td:first-child { white-space: normal; }
.gshare .c-first { max-width: 0; width: 17%; overflow: hidden; text-overflow: ellipsis; } .gshare .c-first .lnk { font-weight: 400; }
@container page (max-width: 1180px) { .gshare .c-gbal, .gshare .c-first { display: none; } }
@container page (max-width: 900px) { .gshare .c-fc, .gshare .c-chg .pc { display: none; } .gshare td:first-child { width: auto; } .duo { grid-template-columns: minmax(0, 1fr); } .duo > .block + .block { border-top: 1px solid var(--rule); } .move { grid-template-columns: minmax(0, 1fr); } }
@container page (max-width: 640px) { .gshare .c-chg .pc, .share.cmp .c-chg .pc { display: none; } .wgrid.three { grid-template-columns: minmax(0, 1fr); } .fresh { justify-content: flex-start; text-align: left; margin-left: 0; } }
.gshare .g-n { margin-left: auto; padding-left: 10px; font-size: 12.5px; white-space: nowrap; }
.led tr.day th { padding-top: 22px; font: 600 13.5px var(--text); color: var(--ink); }
.led tr.day td { height: auto; padding-top: 22px; padding-bottom: 10px; font-size: 13px; color: var(--ink-2); }
.led tbody tr.day:first-child th, .led tbody tr.day:first-child td { padding-top: 14px; }
.led .c-op .meta { display: inline; margin-left: 8px; }
.led .rm { margin-left: 10px; font-size: 13px; color: var(--ink-3); font-weight: 400; }
.led .rm:hover { color: var(--crit-ink); text-decoration-color: var(--crit); }
.led .c-acc .meta { display: inline; margin-left: 8px; }
/* by day: the day line, then each amount that came in */
.byday td:first-child { width: 170px; }
.byday .c-prec { width: 130px; }
.byday tr.day .lnk { font-weight: 600; text-decoration-color: transparent; }
.byday tr.day .lnk:hover { text-decoration-color: var(--in); }
.byday tr.day:has(+ tr.ev) td { border-bottom: 0; }
.byday tr.ev td { height: auto; padding-top: 2px; padding-bottom: 12px; border-bottom: 0; }
.byday tr.ev:has(+ tr.day) td, .byday tr.ev:last-child td { border-bottom: 1px solid var(--rule); }
.byday tr.ev b { font-weight: 600; }
.sub-t { color: var(--ink-3); }
.byday .c-op .meta { display: inline; margin-left: 8px; }
.byday .rm { margin-left: 10px; font-size: 13px; color: var(--ink-3); font-weight: 400; }
.byday .rm:hover { color: var(--crit-ink); text-decoration-color: var(--crit); }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 14px; padding-top: 16px; font-size: 13px; color: var(--ink-3); }
.pv td:first-child { width: 30%; }
.pv tr.more td { height: auto; padding: 0 0 16px; font-size: 13.5px; color: var(--ink-2); }
.pv tr.open td { border-bottom: 0; }
.pv tr.more p { margin-top: 6px; max-width: 86ch; }
.pv .row-btn b::after { content: ''; display: inline-block; width: 6px; height: 6px; margin-left: 9px; border: solid var(--ink-3); border-width: 0 1.5px 1.5px 0; transform: translateY(-3px) rotate(45deg); transition: transform .25s var(--ease); }
.pv .row-btn[aria-expanded=true] b::after { transform: translateY(0) rotate(-135deg); }
.pv tr.more b { color: var(--ink); font-weight: 600; }
.pv a { text-decoration-color: var(--rule-2); text-underline-offset: 3px; }
.pv a:hover { text-decoration-color: var(--in); }

/* ---------- needs attention ---------- */
.alerts { display: grid; }
.al { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--rule); font-size: 14px; }
.al:last-child { border-bottom: 0; }
.al b { font-weight: 600; }
.al-i { width: 8px; height: 8px; align-self: center; }
.al-crit .al-i { background: var(--crit); border-radius: 1px; }
.al-warn .al-i { background: var(--warn); clip-path: polygon(50% 0, 100% 100%, 0 100%); width: 10px; height: 9px; }
.banner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 20px; margin: 4px 0 18px; padding: 12px 16px; border: 1px solid var(--rule); border-left: 3px solid var(--ink-3); border-radius: 8px; background: var(--paper); font-size: 14px; }
.banner.crit { border-color: color-mix(in oklch, var(--crit) 40%, var(--surface)); border-left-color: var(--crit); background: color-mix(in oklch, var(--crit) 7%, var(--surface)); }
.banner.warn { border-color: color-mix(in oklch, var(--warn) 50%, var(--surface)); border-left-color: var(--warn); background: color-mix(in oklch, var(--warn) 9%, var(--surface)); }

/* ---------- one account ---------- */
.acc-head { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 16px 32px; padding: 8px 0 22px; }
.acc-id { display: grid; gap: 14px; min-width: 0; flex: 1 1 380px; }
.acc-id > .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; color: var(--ink-2); font-size: 14px; }
.who-what { display: flex; flex-wrap: wrap; gap: 10px 36px; }
.who-what dt { font-size: 12.5px; color: var(--ink-3); }
.who-what dd { font-size: 14.5px; overflow-wrap: anywhere; max-width: 64ch; text-wrap: pretty; white-space: pre-line; }
.who-what > div { min-width: 0; } .who-what > div:last-child { flex: 1 1 260px; }
details.menu { position: relative; }
details.menu > summary { list-style: none; cursor: pointer; }
details.menu > summary::-webkit-details-marker { display: none; }
.menu-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 210px; padding: 6px; border: 1px solid var(--rule); border-radius: 10px; background: var(--raised); box-shadow: 0 16px 40px -12px var(--shade); display: grid; }
.menu-list button { border: 0; background: none; text-align: left; padding: 9px 10px; border-radius: 6px; font-size: 14px; }
.menu-list button:hover { background: var(--sunken); }
.meter { display: block; height: 4px; margin: 2px 0 7px; background: var(--sunken); border-radius: 2px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--out); }
.meter.over i { background: var(--warn); }
.life { padding: 0 0 22px; max-width: 86ch; }
.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--rule); margin-bottom: 6px; }
.tabs [role=tab] { position: relative; padding: 0 0 12px; border: 0; background: none; font: 600 17px/1.2 var(--display); letter-spacing: -.01em; color: var(--ink-3); }
.tabs [role=tab]:hover { color: var(--ink-2); }
.tabs [role=tab][aria-selected=true] { color: var(--ink); }
.tabs [role=tab][aria-selected=true]::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--ink); view-transition-name: tab-rule; }
#tabpanel { outline-offset: 4px; }
.caps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.caps li { display: grid; gap: 5px; padding: 12px 12px 12px 0; font-size: 13px; }
.caps li + li { padding-left: 16px; border-left: 1px solid var(--rule); }
.caps li > span:first-child { color: var(--ink-3); }
.caps.tight { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 10px 0; }
.caps .hint { font-size: 12px; }

/* ---------- forms ---------- */
.form { display: grid; gap: 14px; max-width: 520px; }
.fld { display: grid; gap: 6px; font-size: 14px; }
.fld > span { font-weight: 500; }
.fld > span i { font-style: normal; font-weight: 400; color: var(--ink-3); margin-left: 6px; font-size: 13px; }
.fld small { color: var(--ink-3); font-size: 12.5px; line-height: 1.4; }
.fld:has([aria-invalid=true]) input, .fld:has([aria-invalid=true]) select, .fld:has([aria-invalid=true]) textarea { border-color: var(--crit); }
.fld .seg { width: fit-content; }
.fld > .unit { display: flex; align-items: center; gap: 10px; font-weight: 400; color: var(--ink-2); }
.unit input { width: 92px; }
.chk { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; cursor: pointer; }
.chk input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--in); flex: none; }
.chk small { display: block; color: var(--ink-3); font-size: 12.5px; line-height: 1.4; }
.pick { gap: 10px; }
/* what may be entered by hand for the chosen account; the line for the chosen kind is the one in ink */
.rule { display: grid; gap: 5px; padding: 10px 12px; border-radius: 8px; background: var(--sunken); color: var(--ink-2); font-size: 13px; line-height: 1.4; text-wrap: pretty; }
.rule li { padding-left: 10px; border-left: 2px solid transparent; } .rule li.on { color: var(--ink); border-left-color: var(--ink); } .rule b { font-weight: 600; }
.glist { display: grid; border-top: 1px solid var(--rule); }
.glist li { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.glist .g-id { flex: 1; min-width: 0; display: grid; gap: 1px; overflow-wrap: anywhere; } .glist b { font-weight: 600; }
.forgot { justify-self: center; font-size: 13.5px; font-weight: 400; color: var(--ink-2); }
/* the language, under the sign-in form: quiet, each name in its own language; the one in use is plain text weight, not a link */
.lang-pick { display: flex; justify-content: center; gap: 6px 18px; flex-wrap: wrap; margin-top: 18px; font-size: 13px; }
.lang-pick .lnk { font-weight: 400; color: var(--ink-3); min-height: 24px; padding: 2px 4px; }
.lang-pick .lnk[aria-pressed=true] { color: var(--ink); font-weight: 600; text-decoration: none; cursor: default; }
.err { color: var(--crit-ink); font-size: 13.5px; font-weight: 500; padding: 9px 12px; border-radius: 8px; background: color-mix(in oklch, var(--crit) 8%, var(--surface)); border: 1px solid color-mix(in oklch, var(--crit) 35%, var(--surface)); }
.two-f { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fold summary { font-size: 13.5px; }
.fold[open] summary { margin-bottom: 10px; }
.opts { display: grid; }
.opts > .block:first-child { border-top: 0; }
.opts .block { display: grid; grid-template-columns: minmax(180px, 260px) minmax(0, 1fr); gap: 12px 40px; }
.opts .block-h { margin: 0; align-items: flex-start; min-height: 0; }
.prose { display: grid; gap: 10px; max-width: 66ch; color: var(--ink-2); font-size: 14.5px; text-wrap: pretty; }
.hl { list-style: none; display: grid; gap: 10px; max-width: 80ch; }
.hl li { display: grid; grid-template-columns: 7.5rem 5.75rem minmax(0, 1fr); gap: 2px 14px; align-items: baseline; font-size: 13.5px; }
.hl b { font-weight: 500; } .hl li > span:last-child { color: var(--ink-2); overflow-wrap: anywhere; white-space: normal; }
@media (max-width: 620px) { .hl li { grid-template-columns: minmax(0, 1fr) auto; } .hl li > span:last-child { grid-column: 1 / -1; } }
.rv { list-style: decimal; padding-left: 20px; display: grid; gap: 6px; font-size: 13.5px; color: var(--ink-2); max-width: 70ch; }
:root[data-review] [data-verify] { outline: 1.5px dashed var(--warn); outline-offset: 4px; border-radius: 3px; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; margin: 4px 0 16px; }
.kv dt { font-size: 12.5px; color: var(--ink-3); }
.kv dd { font-size: 14.5px; }
.acts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.det { font-size: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.det.warn { padding: 10px 12px; border-radius: 8px; border: 1px solid color-mix(in oklch, var(--warn) 50%, var(--surface)); background: color-mix(in oklch, var(--warn) 9%, var(--surface)); display: block; }
.det b { font-weight: 600; }
.pinfo { padding: 12px 14px; border: 1px solid var(--rule); border-radius: 10px; background: var(--paper); display: grid; gap: 6px; }
.pinfo.ok { border-color: color-mix(in oklch, var(--in) 45%, var(--surface)); }
.pinfo .caps { background: none; }
.pinfo .hint b { font-weight: 600; color: var(--ink-2); }
#addDyn { display: grid; gap: 10px; }
#addDyn:empty { display: none; }

/* ---------- dialogs ---------- */
dialog { width: min(540px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); padding: 0; border: 1px solid var(--rule); border-radius: 14px; background: var(--raised); color: var(--ink); box-shadow: 0 32px 80px -20px var(--shade), 0 2px 6px var(--shade); overflow: auto; opacity: 1; transform: none; transition: opacity .22s ease-out, transform .32s var(--ease), overlay .22s allow-discrete, display .22s allow-discrete; }
dialog::backdrop { background: light-dark(rgb(15 26 21 / .42), rgb(0 0 0 / .64)); transition: opacity .22s ease-out, overlay .22s allow-discrete, display .22s allow-discrete; }
dialog:not([open]) { opacity: 0; transform: translateY(10px) scale(.985); }
@starting-style { dialog[open] { opacity: 0; transform: translateY(10px) scale(.985); } dialog[open]::backdrop { opacity: 0; } }
.d-in { padding: 22px 24px 24px; display: grid; gap: 14px; }
dialog.settle .d-in { pointer-events: none; }
.d-in .form { max-width: none; }
.d-in > p { font-size: 14.5px; color: var(--ink-2); text-wrap: pretty; }
.d-in > p b { color: var(--ink); font-weight: 600; }
.d-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.d-h h2 { font: 600 20px/1.2 var(--display); letter-spacing: -.015em; overflow-wrap: anywhere; }
.d-f { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
/* in a long form the actions stay in view; the fields scroll under them */
form .d-f { position: sticky; bottom: 0; margin: 6px -24px -24px; padding: 14px 24px 20px; background: var(--raised); border-top: 1px solid var(--rule); z-index: 2; }
.csv { width: 100%; padding: 10px 12px; border: 1px solid var(--rule-2); border-radius: 8px; background: var(--surface); font: 12.5px/1.5 var(--mono); resize: vertical; }
dialog.palette { width: min(620px, calc(100vw - 24px)); margin-top: 12vh; }
dialog.palette .d-in { padding: 0; gap: 0; }
.pal { display: grid; }
.pal-in { display: flex; align-items: center; gap: 12px; padding: 0 18px; border-bottom: 1px solid var(--rule); color: var(--ink-3); }
.pal-in input { flex: 1; min-width: 0; height: 54px; border: 0; background: none; outline: none; font-size: 16px; color: var(--ink); }
#palList { max-height: min(46dvh, 400px); overflow: auto; padding: 6px; scroll-padding-block: 6px; }
#palList li[role=option] { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 9px 12px; border-radius: 8px; font-size: 14.5px; cursor: pointer; }
#palList li[role=option] .mute { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 0 1 auto; max-width: 50%; }
#palList li[aria-selected=true] { background: var(--sunken); }
.pal-g { padding: 10px 12px 4px; font-size: 12.5px; color: var(--ink-3); }
.pal-none { padding: 22px 12px; color: var(--ink-3); font-size: 14px; }
.pal-foot { display: flex; gap: 18px; padding: 10px 18px; border-top: 1px solid var(--rule); font-size: 12.5px; color: var(--ink-3); }
.pal-foot kbd { margin-right: 4px; }
#toast { position: fixed; left: 50%; bottom: 28px; z-index: 60; max-width: min(520px, calc(100vw - 32px)); padding: 11px 16px; border-radius: 10px; background: var(--ink); color: var(--surface); font-size: 14px; font-weight: 500; box-shadow: 0 16px 40px -12px var(--shade); opacity: 0; transform: translate(-50%, 12px); pointer-events: none; transition: opacity .2s, transform .35s var(--ease); }
#toast.on { opacity: 1; transform: translate(-50%, 0); }
.skel { display: grid; gap: 16px; padding: 28px 0; }
.skel i { display: block; height: 76px; border-radius: 8px; background: var(--sunken); }
.skel i:nth-child(2) { height: 260px; } .skel i:nth-child(3) { height: 150px; }

/* ---------- signed out ---------- */
.login { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(380px, .88fr); min-height: 100dvh; }
.lg-a { display: flex; flex-direction: column; justify-content: space-between; gap: 40px; padding: 30px clamp(28px, 5vw, 76px) 44px; }
.lg-pitch { display: grid; gap: 22px; max-width: 640px; }
.lg-pitch h1 { font: 500 clamp(36px, 4.5vw, 64px)/1.02 var(--display); letter-spacing: -.04em; text-wrap: balance; }
.lg-pitch .lead { margin: 0; font-size: 17px; line-height: 1.5; color: var(--ink-2); max-width: 54ch; text-wrap: pretty; }
.lg-demo { max-width: 640px; padding: 22px 0 0; border-top: 1px solid var(--rule-2); display: grid; gap: 16px; }
.lg-figs { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.lg-figs .big { font-size: clamp(28px, 3.4vw, 46px); margin: 6px 0 0; }
.lg-chart { width: 100%; height: auto; display: block; }
.lg-chart .bar { fill: var(--out); }
.lg-demo figcaption { display: flex; flex-wrap: wrap; gap: 4px 18px; padding-top: 12px; border-top: 1px solid var(--rule); font-size: 12.5px; color: var(--ink-3); }
.lg-demo figcaption > span:first-child { margin-right: auto; }
.lg-demo .prec { font-size: 12.5px; }
.lg-b { display: grid; place-content: center; padding: 32px 24px; background: var(--surface); border-left: 1px solid var(--rule); }
.lg-brand { display: none; margin-bottom: 26px; }
.card { width: min(380px, calc(100vw - 48px)); max-width: none; gap: 16px; }
.card h2 { font: 600 26px/1.15 var(--display); letter-spacing: -.02em; margin-bottom: 2px; }
.card > p:not(.hint):not(.err) { color: var(--ink-2); }

/* ---------- view transitions ---------- */
#main { view-transition-name: main; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .2s; }
::view-transition-old(main) { animation: .14s ease-in both vt-out; }
::view-transition-new(main) { animation: .3s var(--ease) both vt-in; }
::view-transition-group(seg-preset), ::view-transition-group(seg-gran), ::view-transition-group(seg-dim), ::view-transition-group(tab-rule) { animation-duration: .32s; animation-timing-function: var(--ease); }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-delay: 0s !important; transition: none !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* ---------- content adapts to the room it has, not to the window ---------- */

/* ---------- checks, levels and limits ---------- */
.fset { display: grid; gap: 14px; margin: 4px 0 0; padding: 16px 0 0; border: 0; border-top: 1px solid var(--rule); min-width: 0; }
.fset legend { padding: 0 10px 0 0; font: 600 14px/1.2 var(--display); letter-spacing: -.005em; float: left; width: 100%; }
.fset legend + * { clear: both; }
.fold .fset { border-top: 0; padding-top: 0; } .fold .fset legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.dur { display: flex; gap: 14px; flex-wrap: wrap; }
.dur .unit, .lim-f .unit { display: flex; align-items: center; gap: 8px; color: var(--ink-2); }
.dur .unit input { width: 76px; font-variant-numeric: tabular-nums; }
.fld input[type=number], .lim-f input, .unit input { appearance: textfield; -moz-appearance: textfield; }
.fld input[type=number]::-webkit-inner-spin-button, .fld input[type=number]::-webkit-outer-spin-button, .lim-f input::-webkit-inner-spin-button, .lim-f input::-webkit-outer-spin-button, .unit input::-webkit-inner-spin-button, .unit input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip.sm { min-height: 28px; padding: 0 10px; font-size: 12.5px; }
.ro { padding: 10px 12px; border-radius: 8px; background: var(--sunken); color: var(--ink-2); font-size: 13.5px; text-wrap: pretty; }
.meter.near i { background: var(--warn); } .meter.over i { background: var(--crit); }
.muted-m { display: inline-block; padding: 0 7px; border: 1px solid var(--rule-2); border-radius: 999px; font-size: 11.5px; font-weight: 500; color: var(--ink-3); vertical-align: 1px; }
/* the Limit column */
.acc th.c-lim, .acc td.c-lim { min-width: 172px; text-align: right; }
.lim-n .amt { min-width: 0; }
.lim-b { display: inline-flex; align-items: center; justify-content: flex-end; gap: 9px; max-width: 100%; padding: 0; border: 0; background: none; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lim-b .meter { flex: none; width: 40px; margin: 0; }
button.lim-b, .lim-set { min-height: 40px; }
.lim-n { min-width: 15ch; font-size: 14px; text-align: right; }
button.lim-b { border-radius: 4px; } button.lim-b:hover .lim-n .amt { text-decoration: underline; text-decoration-color: var(--in); text-underline-offset: 3px; }
.lim-set { color: var(--ink-3); font-weight: 400; font-size: 13.5px; } .lim-set:hover { color: var(--ink); }
.lim-f { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px; }
.money-in { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 8px; border: 1px solid var(--rule-2); border-radius: 7px; background: var(--surface); color: var(--ink-3); }
.money-in:focus-within { border-color: var(--focus); outline: 2px solid var(--focus); outline-offset: 1px; }
.money-in input { width: 52px; height: 28px; padding: 0; border: 0; outline: 0; background: none; color: var(--ink); font-variant-numeric: tabular-nums; }
.lim-f .ib { width: 28px; height: 32px; } .lim-f .ib[type=submit] { color: var(--ink); }
.lim-f .err { flex-basis: 100%; font-size: 12.5px; margin: 2px 0 0; text-align: right; }
/* the block on the account page */
.watch .ctl { gap: 14px; }
.wgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--rule); }
.wgrid > div { display: grid; align-content: start; gap: 3px; padding: 16px 24px 4px 0; min-width: 0; }
.wgrid > div + div { border-left: 1px solid var(--rule); padding-left: 24px; }
.wgrid dt { font-size: 13px; color: var(--ink-3); }
.wgrid .v { font: 500 20px/1.2 var(--display); letter-spacing: -.015em; font-variant-numeric: tabular-nums; margin: 3px 0 2px; overflow-wrap: anywhere; }
.wgrid .v .of { font: 400 14px/1 var(--text); letter-spacing: 0; color: var(--ink-3); }
.wgrid .v.mute { color: var(--ink-3); } .wgrid .v.neg { color: var(--crit-ink); } .wgrid .v.warn-t { color: var(--warn-ink); }
.wgrid .hint .meter { margin: 3px 0 7px; max-width: 220px; }
.wgrid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* three cells side by side need room: on a narrow page they stand one under another (this rule has to come after the one above to win) */
@container page (max-width: 700px) { .wgrid.three { grid-template-columns: minmax(0, 1fr); } .wgrid.three > div + div { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); } }
.plan .wgrid { border-top: 0; } .plan .block-h { margin-bottom: 4px; }
/* a provider's own limit stands under the owner's budget in the same cell, in a smaller voice: a second thing, not a second figure of the first */
.plim { display: block; margin-top: 1px; font-size: 11.5px; line-height: 1.25; color: var(--ink-3); white-space: nowrap; }
.plim.near { color: var(--warn-ink); } .plim.over { color: var(--crit-ink); }
.plim-l { margin-right: 6px; font-weight: 500; }
.acc td.c-lim:has(.plim) { line-height: 1.2; } .acc td.c-lim:has(.plim) :is(button.lim-b, .lim-set) { min-height: 24px; vertical-align: top; }
.acc .c-chg .amt { min-width: 7.2ch; }
.acc .c-chg .pc { min-width: 46px; margin-left: 6px; }
@container page (max-width: 1400px) { .acc .c-chg .pc { display: none; } }
.acc .th-left { display: inline-block; width: 34px; margin-left: 8px; font-weight: 400; text-align: left; }
.acc th.c-bal:has(.th-left) { padding-right: 10px; }
.acc .c-chk { font-size: 13px; }
.alerts.in-block { margin: -4px 0 14px; }
.next { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ring { width: 22px; height: 22px; flex: none; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 4; }
.ring .r-bg { stroke: var(--rule-2); } .ring .r-fg { stroke: var(--ink); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--p, 0) * 100); transition: stroke-dashoffset 1s linear; }
/* a switch: the same checkbox, drawn as what it is */
.tgl { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap; flex: none; }
.tgl input { appearance: none; position: relative; width: 42px; height: 24px; margin: 0; border-radius: 999px; background: var(--rule-2); flex: none; cursor: pointer; transition: background .25s var(--ease); }
.tgl input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 2px var(--shade); transition: transform .3s var(--ease); }
.tgl input:checked { background: var(--ink); } .tgl input:checked::after { transform: translateX(18px); }
.tgl input:disabled { opacity: .5; cursor: not-allowed; } .tgl:has(input:disabled) { cursor: default; color: var(--ink-3); }
.klim td.c-meter { width: 22%; min-width: 110px; } .klim .c-meter .meter { margin: 0 0 3px; } .klim .c-meter .meta { font-size: 12px; }
.klim tr.off { color: var(--ink-3); }
/* OpenRouter's key list: nine columns, so the meter gives way and the name keeps its line */
.klim.rich td.c-meter { width: 10%; min-width: 84px; } .klim.rich th:first-child { min-width: 250px; } .klim.rich .c-name .meta { white-space: nowrap; } .klim.rich .c-name .st { margin-left: 10px; font-size: 12px; } .klim.rich .c-name .meta, .klim.rich .c-exp .meta, .klim.rich td.r .meta { display: block; } .klim.rich .c-exp { white-space: nowrap; }
.klim-sum { margin: 18px 0 8px; } .klim-sum + .scroll { margin-top: 0; } .tbl + .scroll .klim, .scroll + .scroll { margin-top: 18px; }

/* ---------- notifications ---------- */
.lead-s { color: var(--ink-2); font-size: 14.5px; text-wrap: pretty; }
.chan { display: grid; gap: 12px; padding: 16px 0 4px; border-top: 1px solid var(--rule); }
.chan-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 26px; }
.chan-b { display: grid; gap: 12px; min-width: 0; }
.chan-to { font-size: 14.5px; overflow-wrap: anywhere; }
.sent { display: grid; gap: 10px; max-width: 760px; min-width: 0; }
.ntc td { vertical-align: top; } .ntc .c-op { color: var(--ink-2); font-size: 13.5px; } .ntc td.c-name { width: 24%; } .ntc td.c-to { width: 22%; font-size: 13.5px; }
.tg { display: grid; gap: 16px; }
.steps { display: grid; gap: 14px; padding-left: 22px; margin: 0; list-style: decimal; } .steps li { padding-left: 4px; } .steps li::marker { font-weight: 600; font-variant-numeric: tabular-nums; }
.copy-row { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.copy-row input { flex: 1 1 200px; min-width: 0; min-height: 32px; padding: 0 10px; border: 1px solid var(--rule-2); border-radius: 8px; background: var(--sunken); color: var(--ink-2); font: 12.5px var(--mono); }
.copy-row a.btn { text-decoration: none; }
.wait { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; background: var(--sunken); color: var(--ink-2); font-size: 13.5px; }
.dots { display: inline-flex; gap: 4px; flex: none; } .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); }
.done { display: flex; align-items: center; gap: 14px; padding: 8px 0 4px; font-size: 15px; }
.okmark { width: 44px; height: 44px; flex: none; fill: none; stroke: var(--in); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.okmark circle { stroke: color-mix(in srgb, var(--in) 30%, transparent); }
/* the bell */
.bell { position: relative; }
.badge { position: absolute; top: 5px; right: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--crit); box-shadow: 0 0 0 2px var(--surface); }
#bellPop { position: fixed; inset: calc(var(--bar-h) - 6px) max(16px, calc((100vw - var(--rail) - 1360px) / 2 + var(--gut) - 8px)) auto auto; margin: 0; width: min(380px, calc(100vw - 24px)); max-height: min(520px, calc(100dvh - 96px)); padding: 6px; border: 1px solid var(--rule); border-radius: 12px; background: var(--raised); color: var(--ink); box-shadow: 0 24px 60px -18px var(--shade), 0 2px 6px var(--shade); overflow: auto; }
.bell-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 10px 10px; font-size: 14px; } .bell-h .lnk { font-size: 13px; font-weight: 400; }
#bellList { display: grid; }
#bellList button { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 2px 10px; align-items: baseline; width: 100%; padding: 10px; border: 0; border-radius: 8px; background: none; text-align: left; font-size: 13.5px; color: var(--ink-2); }
#bellList button:hover { background: var(--sunken); }
#bellList .al-i { align-self: start; margin-top: 6px; width: 8px; height: 8px; } #bellList .al-i.c { background: var(--crit); border-radius: 1px; } #bellList .al-i.w { background: var(--warn); clip-path: polygon(50% 0, 100% 100%, 0 100%); width: 10px; height: 9px; margin-left: -1px; }
#bellList b { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
#bellList li.new b { text-decoration: underline; text-decoration-color: var(--in); text-underline-offset: 3px; text-decoration-thickness: 2px; }
#bellList .b-w { font-size: 12px; white-space: nowrap; }
#bellList .b-x { grid-column: 2 / 4; overflow-wrap: anywhere; }
#bellList .none { padding: 14px 10px 16px; color: var(--ink-3); font-size: 13.5px; }
/* what the demo would have sent */
#note { position: fixed; right: 20px; bottom: 88px; z-index: 70; width: min(380px, calc(100vw - 32px)); display: grid; gap: 5px; padding: 14px 16px 13px; border: 1px solid var(--rule); border-radius: 14px; background: var(--raised); color: var(--ink); box-shadow: 0 28px 70px -20px var(--shade), 0 2px 6px var(--shade); font-size: 14px; opacity: 0; visibility: hidden; transform: translateX(24px); transition: opacity .25s ease-in, transform .25s ease-in, visibility 0s .25s; pointer-events: none; }
#note.on { opacity: 1; visibility: visible; transform: none; transition: opacity .5s var(--ease), transform .7s var(--ease); pointer-events: auto; }
.note-ch { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; } .note-ch .mute { font-weight: 400; margin-left: auto; } .note-ch .ib { width: 26px; height: 26px; margin: -4px -6px -4px 0; } .note-ch .mark { border-radius: 5px; }
.note-b { color: var(--ink-2); overflow-wrap: anywhere; } .note-f { margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--rule); font-size: 12px; color: var(--ink-3); }

/* ---------- things that move ---------- */
/* a figure rolling to its value: one column per digit */
.od { display: inline-flex; height: 1lh; overflow: hidden; vertical-align: bottom; user-select: none; }
.od-s, .od-d { display: block; height: 1lh; }
.od-d > span { display: block; white-space: pre-line; transform: translateY(calc(var(--to) * -10%)); animation: od 1s var(--ease) backwards; animation-delay: calc(var(--i) * 45ms); }
@keyframes od { from { transform: translateY(calc(var(--from) * -10%)); } }
@keyframes settle-out { from { transform: scaleX(0); } }
@keyframes tick-in { 0% { transform: scaleY(0); } 55% { transform: scaleY(1.35); } 100% { transform: scaleY(1); } }
@keyframes fill { from { transform: scaleX(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes dot { 0%, 60%, 100% { opacity: .25; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
@keyframes draw { from { stroke-dashoffset: var(--len); } }
@keyframes pop { 0% { transform: scale(0); } 70% { transform: scale(1.18); } }
@keyframes theme-in { from { clip-path: circle(0 at var(--tx) var(--ty)); } to { clip-path: circle(var(--tr) at var(--tx) var(--ty)); } }
@media (prefers-reduced-motion: no-preference) {
  /* the beam finds its balance: both arms grow out from where they meet, then the pointer drops in */
  .beam .b-out, .beam .b-blind { transform-origin: 100% 50%; animation: settle-out .9s var(--ease) backwards; }
  .beam .b-in { transform-origin: 0 50%; animation: settle-out .9s var(--ease) .08s backwards; }
  .beam b { animation: tick-in .6s var(--ease) .55s backwards; }
  .meter i { transform-origin: 0 50%; animation: fill .9s var(--ease) .1s backwards; }
  .btn.spin .ico { animation: spin .9s linear infinite; }
  .dots i { animation: dot 1.2s ease-in-out infinite; } .dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
  .okmark circle { --len: 132; stroke-dasharray: 132; animation: draw .6s var(--ease) backwards; }
  .okmark path { --len: 30; stroke-dasharray: 30; animation: draw .45s var(--ease) .35s backwards; }
  .badge:not([hidden]) { animation: pop .45s var(--ease) backwards; }
  #bellPop { transition: opacity .2s ease, transform .3s var(--ease), overlay .2s allow-discrete, display .2s allow-discrete; opacity: 0; transform: translateY(-6px); }
  #bellPop:popover-open { opacity: 1; transform: none; }
  @starting-style { #bellPop:popover-open { opacity: 0; transform: translateY(-6px); } }
}
/* the lit item of the menu travels to the next item as one piece, plate and label together, so the label is never covered on the way; the account's name travels between its row and the page title */
.nav a { position: relative; isolation: isolate; }
.nav a[aria-current]::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: 8px; background: var(--surface); box-shadow: 0 0 0 1px var(--rule); }
.nav a[aria-current] { view-transition-name: nav-plate; }
.morph { view-transition-name: acc-title; }
::view-transition-group(nav-plate) { animation-duration: .45s; animation-timing-function: var(--ease); }
::view-transition-old(nav-plate), ::view-transition-new(nav-plate) { height: 100%; width: auto; object-fit: none; object-position: left center; }
::view-transition-old(nav-plate) { animation-duration: .12s; }
::view-transition-group(acc-title) { animation-duration: .5s; animation-timing-function: var(--ease); }
::view-transition-old(acc-title), ::view-transition-new(acc-title) { height: 100%; width: auto; object-fit: contain; object-position: left center; }
/* a change of theme is one circle opening over the old page */
:root[data-vt=theme] * { view-transition-name: none !important; }
:root[data-vt=theme]::view-transition-old(root) { animation: none; }
:root[data-vt=theme]::view-transition-new(root) { animation: theme-in .75s var(--ease) both; mix-blend-mode: normal; }
:root[data-vt=theme]::view-transition-image-pair(root) { isolation: auto; }

/* where a full table fits, its header stays in view under the bar */
@container page (min-width: 1100px) {
  .sheet > .scroll, #accList > .scroll { overflow: visible; }
  .sheet .tbl thead th { position: sticky; top: calc(var(--top) + var(--bar-h)); z-index: 3; border-bottom: 0; box-shadow: inset 0 -1px 0 var(--rule); }
}
@container page (max-width: 1100px) {
  .hide-m { display: none; }
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .beam-row, .side, .fresh { grid-column: 1 / -1; }
  .hero .attn { grid-column: 1 / -1; grid-row: auto; border-left: 0; padding: 20px 0 0; border-top: 1px solid var(--rule); }
  .facts.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts.four > div:nth-child(3) { border-left: 0; padding-left: 0; }
  .facts.four > div:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .facts.three > div:nth-child(3) { grid-column: 1 / -1; }
}
@container page (max-width: 900px) {
  .seg.wide { display: none; } .sel.narrow { display: block; }
  .tools { align-items: stretch; }
  .tools > .ctl, .tools > .ctl:first-child:not(:only-child) { flex: 1 1 100%; justify-content: flex-start; }
  .tools:has(+ .filters) > .ctl { flex: 1 1 0; justify-content: flex-end; }
  .tools .search { max-width: none; }
}
@container page (max-width: 760px) {
  .opts .block { grid-template-columns: minmax(0, 1fr); }
  .caps { grid-template-columns: repeat(2, minmax(0, 1fr)); border-bottom: 0; }
  .caps li { border-bottom: 1px solid var(--rule); }
  .caps li + li { border-left: 0; padding-left: 0; }
  .caps li:nth-child(even) { border-left: 1px solid var(--rule); padding-left: 16px; }
  .caps li:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .caps.tight { grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--rule); }
  .caps.tight li { border-bottom: 0; }
  .caps.tight li + li { border-left: 1px solid var(--rule); padding-left: 12px; }
  .caps.tight li:last-child:nth-child(odd) { grid-column: auto; }
  .who-what { flex-direction: column; gap: 12px; } .who-what > div:last-child { flex: none; }
}
@container page (max-width: 640px) {
  .hide-s { display: none; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .beam-row, .side, .fresh, .hero .attn { grid-column: 1; }
  .big { font-size: clamp(38px, 12cqi, 52px); }
  .side { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .side > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 0 12px; }
  .side .hint { grid-column: 1 / -1; }
  /* totals stay one compact strip, so the first record is on the first screen */
  .facts:not(.four, .wide) > div { padding: 12px 10px 12px 0; }
  .facts:not(.four, .wide) > div + div { padding-left: 10px; }
  .facts:not(.four, .wide) dt { font-size: 12px; } .facts:not(.four, .wide) dt .k { margin-right: 5px; }
  .facts:not(.four, .wide) dd:not(.hint) { font-size: clamp(15px, 5cqi, 19px); letter-spacing: -.02em; margin: 2px 0; }
  .facts:not(.four, .wide) .hint { font-size: 11.5px; line-height: 1.3; }
  .facts:not(.four, .wide) .dt-w { display: none; }   /* three figures abreast have no room for the dates: the bar above carries them */
  /* a row of figures that each come with their source and what they are compared with: on a narrow page one under another, nothing dropped */
  .facts.wide { grid-template-columns: minmax(0, 1fr); } .facts.wide > div { padding: 14px 0; } .facts.wide > div + div { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); }
  .facts.wide dd:not(.hint) { font-size: 24px; }
  .facts.four > div { padding: 14px 12px 14px 0; }
  .facts.four > div:nth-child(even) { padding-left: 12px; }
  .facts.four dd:not(.hint) { font-size: 22px; }
  .legend-p li { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .tabs { gap: 20px; }
  .tools .search { max-width: none; flex-basis: 100%; }
  .tools .sel { flex: 1 1 140px; }
  .tools .btn { flex: 1 1 auto; }
  /* accounts on a phone: three actions on one line, the search with the filters folded beside it */
  .tools:has(+ .filters) { padding-top: 10px; } .tools:has(+ .filters) .count { display: none; }
  .tools:has(+ .filters) > .ctl { flex: 1 1 100%; flex-wrap: nowrap; } .tools:has(+ .filters) .btn { padding: 0 12px; }
  /* in Russian the three do not fit one line: they wrap, and each line is filled, not cut at the edge */
  :root:lang(ru) .tools:has(+ .filters) > .ctl { flex-wrap: wrap; } :root:lang(ru) .tools:has(+ .filters) > .ctl > * { flex: 1 1 auto; justify-content: center; }
  .btn .long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .filters { padding-bottom: 10px; } .filters .search { max-width: none; flex: 1 1 0; }
  .filt-t { display: inline-flex; }
  .filt { display: none; } .filt.open { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 100%; }
  .filt .sel { flex: 1 1 140px; } .filt .sel select { max-width: none; } .filt [data-act=grouped] { margin-left: 0; }
  .acc-head .ctl { width: 100%; }
  .acc-head .ctl > .btn { flex: 1 1 auto; }
  .menu-list { right: auto; left: 0; }
  /* in Russian the row of buttons breaks elsewhere and "More" can end at the right edge: its list opens under the whole row, from the left */
  :root:lang(ru) .acc-head .ctl { position: relative; } :root:lang(ru) .acc-head details.menu { position: static; }
  .share td:first-child { width: auto; }
  .share td.r:nth-last-child(2), .share th.r:nth-last-child(2) { padding-right: 0; }
  .amt { min-width: 0; }
  /* a table becomes a list of records */
  .tbl.cards thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .tbl.cards, .tbl.cards tbody { display: block; }
  .tbl.cards tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
  .tbl.cards tbody tr:last-child { border-bottom: 0; }
  .tbl.cards td, .tbl.cards th, .tbl.cards td.r { display: block; height: auto; padding: 0; border: 0; text-align: left; background: none; }
  .tbl.cards td.hide-m, .tbl.cards td.hide-s, .tbl.cards th.hide-s { display: none; }
  .tbl.cards td[data-l]::before { content: attr(data-l); display: block; font-size: 12px; color: var(--ink-3); margin-bottom: 1px; }
  .tbl.cards td.c-name { grid-column: 1 / 3; min-width: 0; width: auto; max-width: none; }
  .tbl.cards .row-btn b { white-space: normal; overflow-wrap: anywhere; }
  .tbl.cards td.c-status { grid-column: 3; justify-self: end; text-align: right; width: auto; }
  /* accounts: a record is two short lines, the name with its status and then the three figures, under one line of labels; the whole record opens the account */
  .tbl.acc.cards thead { position: static; display: block; width: auto; height: auto; overflow: visible; clip-path: none; }
  .tbl.acc.cards tr { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; padding: 9px 0 10px; }
  .tbl.acc.cards tbody tr::before { content: ''; order: 2; flex: 0 0 100%; height: 3px; }   /* the line break between the name and the figures */
  .tbl.acc.cards thead tr { padding: 0 0 5px; }
  .tbl.acc.cards th, .tbl.acc.cards td { white-space: nowrap; }
  .tbl.acc.cards thead th { height: auto; font-size: 11.5px; }
  .tbl.acc.cards thead th:not(.c-spend, .c-top, .c-bal), .tbl.acc.cards td:is(.c-mail, .c-mini, .c-lim, .c-chk, .c-chg), .tbl.acc.cards .c-bal .lasts, .tbl.acc.cards .th-b, .tbl.acc.cards tr.grp .c-status { display: none; }
  .tbl.acc.cards .th-t { display: inline; }   /* the records are ordered from the Sort list here, so the headings are labels and nothing else */
  .tbl.acc.cards :is(th, td):is(.c-spend, .c-top, .c-bal) { order: 3; flex: 0 0 calc((100% - 20px) / 3); min-width: 0; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; }
  .tbl.acc.cards td[data-l]::before { content: none; }
  .tbl.acc.cards .c-name { flex: 1 1 0; width: auto; max-width: none; min-width: 0; }
  .tbl.acc.cards .c-status { order: 1; flex: none; display: flex; align-items: center; gap: 8px; width: auto; }
  .tbl.acc.cards .row-btn { min-height: 22px; } .tbl.acc.cards .row-btn b { white-space: nowrap; }
  .tbl.acc.cards .row-btn::after { content: ''; position: absolute; inset: 0; }
  .tbl.acc.cards .only-c { display: inline; width: auto; margin: 0; }
  .tbl.acc.cards .pi { margin-right: 5px; }
  .acc.grouped tbody + tbody::before { content: none; } .tbl.acc.cards.grouped :is(th, td) { padding: 0; }
  .tbl.acc.cards tr.grp { padding: 20px 0 9px; border-bottom-color: var(--rule-2); } .tbl.acc.cards tbody:first-of-type tr.grp { padding-top: 12px; }
  .tbl.acc.cards tr.grp th, .tbl.acc.cards tr.grp td { height: auto; border: 0; border-radius: 0; background: none; }
  .tbl.acc.cards tr.grp td.c-lim:has(.meter) { order: 4; display: flex; align-items: center; gap: 10px; flex: 1 1 100%; min-width: 0; padding-top: 3px; font-weight: 400; font-size: 13px; color: var(--ink-3); }
  .tbl.acc.cards tr.grp td.c-lim:has(.meta.tb) { flex-wrap: wrap; } .tbl.acc.cards tr.grp .meta.tb { flex: 1 1 100%; margin: 0; white-space: normal; }
  .tbl.acc.cards tr.grp td.c-lim::before { content: attr(data-l); } .tbl.acc.cards tr.grp .lim-n { min-width: 0; font-size: 13px; color: var(--ink); }
  /* groups on the overview: the name with what it spent, then its month against the budget */
  .gshare thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .gshare, .gshare tbody { display: block; }
  .gshare tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 4px 14px; padding: 11px 0; border-bottom: 1px solid var(--rule); }
  .gshare tbody tr:last-child { border-bottom: 0; }
  .gshare td, .gshare td.r { display: block; height: auto; padding: 0; border: 0; }
  .gshare td:first-child, .gshare .c-bud { width: auto; } .gshare td.hide-s { display: none; }
  /* a group is a short record here: name and spend; budget and change; forecast and balance; the first key to run out. The last three carry their labels. */
  .gshare td.c-bud { grid-column: 1; grid-row: 2; text-align: left; font-size: 13px; } .gshare .lim-n { min-width: 0; font-size: 13px; }
  .gshare td.c-chg { grid-column: 2; grid-row: 2; font-size: 13px; } .gshare .c-chg .amt, .gshare td:is(.c-fc, .c-gbal) .amt { min-width: 0; }
  .gshare td.c-fc { grid-column: 1; grid-row: 3; text-align: left; } .gshare td.c-gbal { grid-column: 2; grid-row: 3; }
  .gshare td.c-first { display: block; grid-column: 1 / -1; grid-row: 4; width: auto; max-width: none; }
  .gshare .nm { flex-wrap: wrap; gap: 0 10px; } .gshare .g-n { margin-left: 0; padding-left: 0; } .gshare .nm .lnk { min-height: 32px; }
  .gshare td:is(.c-fc, .c-gbal, .c-first) { font-size: 13px; color: var(--ink-2); }
  .gshare td:is(.c-fc, .c-gbal, .c-first)::before { content: attr(data-l); margin-right: 7px; color: var(--ink-3); }
  .tbl.usr .c-role { grid-column: 1 / 3; color: var(--ink-2); font-size: 13.5px; }
  .tbl.usr .c-status { grid-row: 1; }
  .tbl.usr .c-n { grid-column: 3; justify-self: end; }
  .tbl.pv tr { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px 6px; }
  .tbl.pv td[data-l]::before { font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px; }
  .tbl.pv td[data-l] .prec > span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .tbl.pv td[data-l] .pm { width: 10px; height: 10px; }
  .tbl.pv td[data-l] .pm-none { height: 0; }
  .tbl.pv tr:has(+ tr.more) { border-bottom: 0; padding-bottom: 4px; }
  .tbl.pv td.c-name { grid-column: 1 / -1; }
  .tbl.pv tr.more { padding-top: 0; }
  .tbl.pv tr.more td { grid-column: 1 / -1; padding: 0; }
  .tbl.led tr { grid-template-columns: minmax(0, 1fr) auto; gap: 3px 14px; padding: 12px 0; }
  .tbl.led td:empty { display: none; }
  .tbl.led tr.day { padding: 18px 0 8px; align-items: baseline; }
  .tbl.led tr.day th { padding: 0; grid-column: 1; }
  .tbl.led tr.day td { padding: 0; grid-column: 2; }
  .tbl.led tr.day .c-out:not(:empty)::before { content: 'Spent '; color: var(--ink-3); }
  .tbl.led .c-acc, .tbl.led .c-date { grid-column: 1; font-weight: 600; }
  .tbl.led .c-acc .meta { font-weight: 400; }
  .tbl.led .c-out, .tbl.led .c-in { grid-column: 2; grid-row: 1; text-align: right; font-weight: 600; }
  .tbl.led tr.day .c-out, .tbl.led tr.day .c-in { grid-row: auto; font-weight: 400; }
  .tbl.led .c-op { grid-column: 1; color: var(--ink-2); font-size: 13.5px; }
  .tbl.led .c-op .meta { display: block; margin: 0; }
  .tbl.led .c-prec { grid-column: 2; justify-self: end; }
  .tbl.byday tr { grid-template-columns: minmax(0, 1fr) auto auto; gap: 1px 18px; padding: 12px 0; }
  .tbl.byday tr.day td, .tbl.byday tr.ev td, .tbl.byday tr.ev:has(+ tr.day) td, .tbl.byday tr.ev:last-child td { padding: 0; border: 0; height: auto; }
  .tbl.byday td:empty { display: none; }
  .tbl.byday td:first-child, .tbl.byday .c-prec { width: auto; }
  .tbl.byday .c-date, .tbl.byday .c-op { grid-column: 1; }
  .tbl.byday tr.day .c-op { font-size: 13px; }
  .tbl.byday tr.day .c-out { grid-column: 2; grid-row: 1 / span 2; text-align: right; }
  .tbl.byday tr.day .c-in { grid-column: 3; grid-row: 1 / span 2; text-align: right; }
  .tbl.byday tr.day .c-out:has(+ .c-in:empty) { grid-column: 2 / 4; }
  .tbl.byday tr.day:has(+ tr.ev) { border-bottom: 0; padding-bottom: 4px; }
  .tbl.byday tr.ev { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 14px; padding: 2px 0 2px 12px; border-left: 2px solid var(--in); border-bottom: 0; margin: 0 0 10px; }
  .tbl.byday tr.ev:has(+ tr.day) { margin-bottom: 14px; }
  .tbl.byday tr.ev .c-op { grid-row: 1 / span 2; }
  .tbl.byday tr.ev .c-in { grid-column: 2; grid-row: 1; text-align: right; font-weight: 600; }
  .tbl.byday tr.ev .c-prec { grid-column: 2; grid-row: 2; justify-self: end; }
  .tbl.byday .c-op .meta { display: block; margin: 0; }
}

/* ---------- phones: the rail becomes a tab bar ---------- */
@media (max-width: 767px) {
  :root { --gut: 18px; --bar-h: 60px; }
  .app { grid-template-columns: minmax(0, 1fr); }
  .rail { display: none; }
  .page { border-left: 0; padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
  .bar { padding-top: 10px; padding-bottom: 10px; gap: 6px 12px; }
  .bar h1 { font-size: 21px; }
  .bar-r { flex: 0 1 auto; margin-left: auto; }
  /* one account: the way back, the tag and the period share the first line; the name has the second to itself */
  .bar:has(.crumb) .bar-l { display: contents; }
  .bar:has(.crumb) .crumb { order: 1; }
  .bar:has(.crumb) .tag { order: 2; align-self: center; }
  .bar:has(.crumb) .bar-r { order: 3; }
  .bar:has(.crumb) h1 { order: 4; flex: 1 1 100%; }
  .crumb::after { content: none; }
  .period { gap: 8px; flex-wrap: wrap; }
  .dates { flex: 1 1 100%; justify-content: flex-end; min-width: 0; }
  .dates label { flex: 0 1 150px; min-width: 0; }
  .dates input { width: 100%; min-width: 0; padding: 0 6px; }
  .period .span { display: none; }
  .seg.wide { display: none; }
  .sel.narrow { display: block; }
  /* everything that is pressed is at least 40px tall */
  .btn, .seg button, .chip, .sel select, .search input, .dates input, .fld input, .fld select { min-height: 40px; }
  .ib { width: 40px; height: 40px; }
  .search .ico { top: 12px; } .search kbd { display: none; }
  .tview summary, .fold summary { padding: 11px 0; }
  .tabs [role=tab] { padding-top: 11px; }
  .tgl, .chk { min-height: 40px; align-items: center; } .chk:has(small) { align-items: flex-start; padding: 2px 0; }
  .d-f .lnk, .rm, .forgot, .bell-h .lnk, .hint .lnk, .gshare .lnk, .g-name .lnk, .crumb, .usr .row-btn, .pv .row-btn { display: inline-flex; align-items: center; min-height: 40px; }
  .menu-list button { padding: 11px 10px; }
  .al .lnk { padding: 10px 0 10px 12px; }
  #actbar { justify-content: space-between; padding: 8px 14px; font-size: 13px; } #actbar p { flex: 1 1 180px; text-wrap: pretty; } #actbar .btn { min-height: 40px; }
  .tabbar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; inset: auto 0 0 0; z-index: 25; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 93%, transparent); backdrop-filter: blur(14px); border-top: 1px solid var(--rule); }
  .tabbar a { display: grid; justify-items: center; gap: 3px; padding: 6px 2px 4px; border-radius: 8px; color: var(--ink-3); text-decoration: none; font-size: 11px; font-weight: 500; min-width: 0; }
  .tabbar a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
  .tabbar a[aria-current] { color: var(--ink); }
  .tabbar a[aria-current] .ico { color: var(--in-ink); }
  #toast { bottom: calc(78px + env(safe-area-inset-bottom)); }
  .foot { padding-bottom: 18px; }
  .first { padding: 40px 0 56px; }
  dialog:not(.palette) { margin: auto auto 0; width: 100vw; max-width: 100vw; max-height: 92dvh; border-radius: 16px 16px 0 0; border-width: 1px 0 0; }
  dialog:not(.palette):not([open]) { transform: translateY(24px); }
  .d-in { padding: 20px 18px calc(22px + env(safe-area-inset-bottom)); }
  form .d-f { margin: 6px -18px calc(-22px - env(safe-area-inset-bottom)); padding: 12px 18px calc(16px + env(safe-area-inset-bottom)); }
  .d-f .btn { flex: 1 1 auto; }
  dialog.palette { margin-top: 12px; }
  .pal-foot { display: none; }
  .two-f { grid-template-columns: minmax(0, 1fr); }
  .kv { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) { @starting-style { dialog[open]:not(.palette) { transform: translateY(24px); } } }
@media (min-width: 768px) and (max-width: 1023px) {
  /* the provider matrix: a long provider name wraps instead of pushing the table past the screen */
  .pv .row-btn b, .pv td:first-child, .pv td:first-child * { overflow-wrap: anywhere; min-width: 0; } .pv td:first-child { width: 20%; }
  .tbl.pv th, .tbl.pv td { padding-left: 4px; padding-right: 4px; }
  :root { --rail: 64px; --gut: 24px; }
  .rail { padding: 18px 10px 14px; align-items: center; }
  .brand > span, .jump span, .jump kbd, .nav a span, .who, .role { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .brand-a { padding: 0; }
  .jump { width: 42px; min-height: 40px; padding: 0; justify-content: center; }
  .nav { width: 100%; justify-items: center; gap: 4px; }
  .nav a { width: 42px; min-height: 40px; padding: 0; justify-content: center; }
  .rail-foot { display: block; padding: 12px 0 0; }
  .rail-acts { flex-direction: column; gap: 2px; }
}
@media (max-width: 900px) {
  .login { grid-template-columns: minmax(0, 1fr); }
  .lg-b { order: -1; border-left: 0; border-bottom: 1px solid var(--rule); padding: 36px 24px 44px; place-content: start center; }
  .lg-brand { display: block; }
  .lg-a > header { display: none; }
  .lg-a { padding: 36px 24px 48px; }
}
@media (max-width: 480px) { .lg-demo figcaption > span:first-child { flex-basis: 100%; } }
@media (forced-colors: active) {
  .beam .b-out, .track i, .meter i, .k-out, .sw { forced-color-adjust: none; }
  .seg button[aria-pressed=true], .chip[aria-pressed=true], .nav a[aria-current] { outline: 2px solid CanvasText; }
}
@media print {
  .rail, .tabbar, .bar-r, .ctl, .skip, #toast, #actbar { display: none !important; }
  .app { display: block; } .page { border: 0; } .bar { position: static; }
}

/* ---------- v6 components on narrow pages ---------- */
@container page (max-width: 1100px) {
  .wgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wgrid:not(.three) > div:nth-child(3) { border-left: 0; padding-left: 0; }
  .wgrid:not(.three) > div:nth-child(n+3) { border-top: 1px solid var(--rule); }
}
@container page (max-width: 640px) {
  .wgrid { grid-template-columns: minmax(0, 1fr); }
  .wgrid > div + div { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); }
  .chan { grid-template-columns: minmax(0, 1fr); }
  .watch .block-h .ctl { width: 100%; justify-content: space-between; }
}
@media (max-width: 767px) {
  #bellPop { inset: auto 8px calc(72px + env(safe-area-inset-bottom)) 8px; width: auto; max-height: 60dvh; }
  #note { right: 12px; left: 12px; width: auto; bottom: calc(78px + env(safe-area-inset-bottom)); }
}
@container page (max-width: 640px) {
  .tbl.ntc td.c-date, .tbl.ntc td.c-name, .tbl.ntc td.c-op, .tbl.ntc td.c-to, .tbl.klim td.c-name { grid-column: 1 / -1; width: auto; }
  .tbl.klim td.c-meter { width: auto; min-width: 0; }
}
/* a tablet-width accounts table keeps the name readable: the status shrinks to its mark, the limit to its figures */
@container page (min-width: 641px) and (max-width: 900px) {
  .acc td.c-status .st { font-size: 0; gap: 0; }
  .acc th.c-status { font-size: 0; }
  .acc th, .acc td { padding: 0 7px; }
  .acc th.c-lim, .acc td.c-lim { min-width: 0; }
  .acc .lim-b .meter, .acc .c-bal .lasts { display: none; } .acc th.c-bal { padding-right: 7px; }
}
@media (max-width: 767px) {
  /* a phone has no room for the arrows beside the title: the months are in the period list itself, by name */
  .period .sel.narrow select { width: 124px; }   /* as wide as "This month": a longer month name is cut in the closed list, never in the open one */
  .step .ib { display: none; } .step:not(:has(.dates)) { display: none; } .step:has(.dates) { flex: 1 1 100%; } .step .dates { flex: 1 1 auto; }
  .th-b { display: inline-flex; align-items: center; min-height: 40px; }
  .tbl.runs th:nth-child(3), .tbl.runs td:nth-child(3) { display: none; } .tbl.runs td { white-space: normal; height: auto; padding-top: 9px; padding-bottom: 9px; } .tbl.runs .c-left { white-space: normal; } .tbl.runs .c-left .lasts { margin-left: 6px; min-width: 0; } .tbl.runs .c-name { white-space: normal; overflow: visible; }
  .share.cmp th:nth-child(3), .share.cmp td:nth-child(3) { display: none; }
  .btn.sm, .chip.sm { min-height: 40px; }
  .lim-f .ib { width: 40px; height: 40px; } .money-in { height: 40px; } .money-in input { width: 96px; height: 36px; }
  #note { bottom: calc(136px + env(safe-area-inset-bottom)); }
}
