:root { --bg: #f7f7f5; --fg: #1d1d1b; --muted: #6b6b66; --ok: #1f7a3a; --bad: #b42318; --line: #e2e2dc; }
@media (prefers-color-scheme: dark) { :root { --bg: #161615; --fg: #ecece8; --muted: #a3a39c; --ok: #4ccf74; --bad: #ff7a6b; --line: #33332f; } }
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--bg); color: var(--fg); }
.top { display: flex; gap: 10px; align-items: baseline; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; }
.tag { color: var(--muted); font-size: 13px; }
main { max-width: 720px; margin: 24px auto; padding: 0 16px; }
.card { border: 1px solid var(--line); border-radius: 8px; padding: 16px; }
.ok { color: var(--ok); } .bad { color: var(--bad); } .muted { color: var(--muted); }
.login { display: grid; gap: 12px; max-width: 380px; }
.login label.check { display: flex; gap: 8px; align-items: center; }
.login label.check input { width: auto; }
.login h1 { font-size: 20px; margin: 0; }
.login label { display: grid; gap: 4px; font-size: 14px; }
.login input { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--fg); }
button { font: inherit; padding: 8px 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--fg); color: var(--bg); cursor: pointer; }
button:disabled { opacity: .6; cursor: default; }
#login-error:empty { display: none; }
main { max-width: 1000px; }
.menu { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.menu a { color: var(--fg); text-decoration: none; padding: 4px 2px; border-bottom: 2px solid transparent; }
.menu a.on { border-bottom-color: var(--fg); font-weight: 600; }
/* (FV-072) the Setup menu: a dropdown under its name; More sits at the right */
.menu details.setup { position: relative; margin: 0; }
.menu details.setup > summary { display: block; cursor: pointer; padding: 4px 2px; border-bottom: 2px solid transparent; list-style: none; color: var(--fg); }
.menu details.setup > summary::-webkit-details-marker { display: none; }
.menu details.setup > summary::after { content: " \25BE"; color: var(--muted); }
.menu details.setup > summary.on { border-bottom-color: var(--fg); font-weight: 600; }
.menu .setup-list { position: absolute; left: 0; top: calc(100% + 4px); z-index: 20; min-width: 170px; display: grid; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 6px; box-shadow: 0 4px 14px rgba(0, 0, 0, .15); }
.menu .setup-list a { padding: 8px 10px; border-bottom: 0; border-radius: 6px; }
.menu .setup-list a.on { background: var(--line); }
.menu > a[href="#/more"] { margin-left: auto; }
h1 { font-size: 20px; margin: 0 0 12px; } h2 { font-size: 16px; margin: 18px 0 6px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; color: var(--muted); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.out { color: var(--fg); } td.in { color: var(--ok); }
/* (FV-024) savings in view: an account per fold, its endings as small labels, ties as a short list */
span.in { color: var(--ok); }
details.saving { border-top: 1px solid var(--line); padding: 8px 0; margin: 0; }
details.saving > summary { cursor: pointer; display: flex; justify-content: space-between; gap: 10px; }
details.saving > summary .num { margin-left: auto; }
.ending { display: inline-block; border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; margin-right: 6px; }
ul.ties { padding-left: 18px; }
ul.ties li { margin-bottom: 8px; }
ul.ties select { margin: 4px 4px 0 0; }
#savings h3 { font-size: 1em; }
.ending button { padding: 0 4px; min-height: 0; border: 0; }
tr.closed td, tr.transfer td { color: var(--muted); }
.pill { font-size: 11px; border: 1px solid var(--line); border-radius: 10px; padding: 0 6px; color: var(--muted); }
.filters { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.filters label { display: grid; gap: 2px; font-size: 13px; color: var(--muted); }
.filters label[hidden] { display: none; }
/* (FV-069) a dropdown is never wider than its card: a long option is cut, not the card's edge */
select { max-width: 100%; }
.filters label { grid-template-columns: minmax(0, 1fr); max-width: 100%; min-width: 0; }
form.edit, form.edit label { grid-template-columns: minmax(0, 1fr); }
.filters select { font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--fg); }
.totals span { margin-right: 14px; }
a { color: inherit; }
details { margin-top: 14px; } details summary { cursor: pointer; color: var(--muted); }
.facts { width: auto; } .facts th { padding-right: 18px; white-space: nowrap; }
.pill.warn { color: var(--fg); border-color: var(--fg); }
/* FV-045 Benefits page */
.benefit, .overlap { border-top: 1px solid var(--line); padding: 10px 0; }
.benefit h3, .overlap h3 { font-size: 15px; margin: 0 0 4px; }
.benefit.ended { opacity: .7; }
.benefit .pill, .overlap .pill { margin-right: 4px; }
.held { border-left: 3px solid var(--fg); padding-left: 10px; margin: 8px 0; }
form.edit { display: grid; gap: 8px; max-width: 640px; }
form.edit label { display: grid; gap: 2px; font-size: 13px; color: var(--muted); }
form.edit input, form.edit select, form.edit textarea { font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--fg); }
.actions button { margin-right: 6px; }
/* FV-061: the phone layout (below 700px) and the Android app */
.tabbar, .in-app { display: none; }
.app .in-app { display: inline; }
.app #connect-bank { display: none; }
.more-list { list-style: none; padding: 0; margin: 0 0 12px; }
.more-list a { display: block; padding: 12px 4px; border-bottom: 1px solid var(--line); text-decoration: none; }
@media (max-width: 699px) {
  body { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
  .top { padding-top: calc(14px + env(safe-area-inset-top)); }
  main { margin: 12px auto; padding: 0 10px calc(76px + env(safe-area-inset-bottom)); }
  .menu { display: none; }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--bg); border-top: 1px solid var(--line);
    padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
  .tabbar a { flex: 1; min-height: 56px; display: flex; align-items: center; justify-content: center; font-size: 13px; text-decoration: none; color: var(--muted); border-top: 2px solid transparent; }
  .tabbar a.on { color: var(--fg); font-weight: 600; border-top-color: var(--fg); }
  .card { padding: 12px; overflow-x: auto; }
  button, select, input, textarea { min-height: 44px; }
  input[type="checkbox"], input[type="radio"] { min-height: 0; width: 22px; height: 22px; }
  .filters select, .filters input { max-width: 100%; }
}
/* FV-056 Home: still to come this month */
.home .figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 6px 0 14px; }
.home .figures div { display: grid; gap: 2px; }
.home .figures b { font-size: 18px; font-variant-numeric: tabular-nums; }
.small { font-size: 12px; }
.home ul.lines { list-style: none; padding: 0; margin: 0; }
.home ul.lines li { border-bottom: 1px solid var(--line); padding: 8px 0; }
.home ul.lines li > a { display: grid; grid-template-columns: 7em minmax(0, 1fr) auto; gap: 8px; text-decoration: none; overflow-wrap: anywhere; }
.home ul.lines li.late .when { color: var(--bad); font-weight: 600; }
.home .maybe { margin: 6px 0 0 7em; font-size: 14px; }
.home .maybe .acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; } /* (FV-066) the buttons on their own line */
@media (max-width: 699px) { .home .figures { gap: 6px; } .home .figures b { font-size: 15px; overflow-wrap: anywhere; } .home ul.lines li > a { grid-template-columns: 6.2em minmax(0, 1fr) auto; } .home .maybe { margin-left: 0; } }
.nowrap { white-space: nowrap; } /* (FV-066) */
/* FV-060 phone polish (Ian's picks, 18 Nov). The page name in the top bar on a phone; on a computer "FinVault" stays. */
.top .pagename { display: none; }
@media (max-width: 699px) {
  .top .pagename { display: inline; font-weight: 700; }
  .top.named .brand { display: none; }
  /* tighter spacing */
  main { margin: 8px auto; }
  .card { padding: 10px; }
  .card + .card, section + section { margin-top: 10px; }
  h1 { font-size: 18px; margin-bottom: 8px; } h2 { font-size: 15px; margin: 14px 0 4px; }
  th, td { padding: 5px 6px; }
  /* touch: 44px tick boxes (the whole label) and small links */
  .tick { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; justify-content: center; }
  table.txlist a { display: inline-flex; align-items: center; min-height: 44px; }
  .starts a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; }
  /* tables as stacked cards: the first cell (and a lead cell) on the first line, the rest below, each named */
  table.stack thead { display: none; }
  table.stack, table.stack tbody { display: block; }
  table.stack tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  table.stack td { display: block; grid-column: 1 / -1; border: 0; padding: 0; text-align: left; white-space: normal; overflow-wrap: anywhere; }
  table.stack td:empty { display: none; }
  table.stack td:nth-child(1) { grid-column: 1; grid-row: 1; font-weight: 600; }
  table.stack .nowrap { white-space: normal; }
  /* Commitments: name | amount, then how often, next due, paid from, method, payments */
  table.commits td:nth-child(2) { grid-column: 2; grid-row: 1; text-align: right; }
  table.commits td:nth-child(3)::before { content: "How often: "; color: var(--muted); }
  table.commits td:nth-child(4)::before { content: "Next due: "; color: var(--muted); }
  table.commits td:nth-child(5)::before { content: "Paid from: "; color: var(--muted); }
  table.commits td:nth-child(6)::before { content: "Method: "; color: var(--muted); }
  table.commits td:nth-child(7)::before { content: "Payments: "; color: var(--muted); }
  table.commits td:nth-child(1) { font-weight: 400; }
  /* Accounts: name | total (or balance), then type, transactions (or as of), the dates and the buttons */
  table.accts td:nth-child(4) { grid-column: 2; grid-row: 1; text-align: right; }
  table.accts td:nth-child(2)::before { content: "Type: "; color: var(--muted); }
  table.accts:not(.manual) td:nth-child(3)::before { content: "Transactions: "; color: var(--muted); }
  table.accts.manual td:nth-child(3) { grid-column: 2; grid-row: 1; text-align: right; }
  table.accts.manual td:nth-child(4) { grid-column: 1 / -1; grid-row: auto; text-align: left; }
  table.accts.manual td:nth-child(4)::before { content: "As of "; color: var(--muted); }
  table.accts td:nth-child(5) button { margin-top: 6px; }
  /* Forecast cards: name, set to, suggested, the statement form, then the setting form */
  table.cardset td:nth-child(2)::before { content: "Set to: "; color: var(--muted); }
  table.cardset td:nth-child(3)::before { content: "Suggested: "; color: var(--muted); }
  table.cardset td:nth-child(4), table.cardset td:nth-child(5) { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
  table.cardset td:nth-child(4) input[data-f="bamount"] { flex: 1 1 7em; min-width: 0; }
}

@media (max-width: 699px) { table.commits td:nth-child(1) > a { display: inline-block; padding: 10px 0; margin: -10px 0; } } /* (FV-060) a 44px tap on the name */
/* FV-060 page polish (Ian, 17 and 19 Nov) */
/* native controls (a select's list, a date picker) follow the light or dark theme */
:root { color-scheme: light dark; }
/* every select and text box dark in dark mode, as the filters' already were: the Transactions rows' Category and
   Commitment lists had no style of their own and showed white. Nothing used the white as a cue. :where() keeps it at
   no specificity, so a page's own rule (the sign-in form's boxes) still wins. */
:where(select, textarea, input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"])) { font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--fg); }
/* the filters' text boxes (Benefits' Search) as tall as their dropdowns */
.filters input:not([type="checkbox"]):not([type="radio"]), .filters select { line-height: 1.5; height: calc(1.5em + 14px); }
/* a radio button or tick box sits on the line with its label (the Register card's Same as / New / Skip) */
.filters label.choice { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--fg); font-size: 14px; }
.filters label.choice input { margin: 0; }
@media (max-width: 699px) {
  .filters input:not([type="checkbox"]):not([type="radio"]), .filters select { height: auto; min-height: 44px; }
  /* the page's own heading repeats the top bar's name: kept for screen readers, not shown */
  .top.named ~ main h1.pagehead { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
}
/* FV-070 (Ian, 19 Nov): buttons in three weights, everywhere. Secondary (outlined) is the default; main (solid) is a
   form's submit and the page's one main action; quiet (text only) is for Not this, Cancel, Close, Clear and Sign out. */
button { background: transparent; color: var(--fg); border: 1px solid var(--muted); }
button[type="submit"], button.primary, #accept-clear, #accept-links, #fp-unlock { background: var(--fg); color: var(--bg); border-color: var(--fg); }
button.quiet, button[data-cnot], button[data-lnot], button[data-not], button[data-leave], #plan-cancel, #acct-clear, button[data-a="clear"] {
  background: transparent; border-color: transparent; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
/* FV-070 Transactions as a list at every width: each row a summary (payee | amount, then date, account | chip); a tap
   opens its editor below it. Cells: 1 date, 2 description, 3 account, 4 category, 5 commitment, 6 amount, 7 transfer,
   8 one-off, 9 chip (and, while open, Next and Close). The header row stays for screen readers only. */
table.txlist thead { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
table.txlist, table.txlist tbody { display: block; }
table.txlist tr.txrow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
table.txlist tr.txrow.open { cursor: default; background: color-mix(in srgb, var(--fg) 5%, transparent); padding: 8px 8px 12px; border-radius: 6px; }
table.txlist td { display: block; border: 0; padding: 0; overflow-wrap: anywhere; }
table.txlist td:nth-child(2) { grid-column: 1 / 3; grid-row: 1; }
table.txlist td:nth-child(6) { grid-column: 3; grid-row: 1; }
table.txlist td:nth-child(1) { grid-column: 1; grid-row: 2; color: var(--muted); font-size: 13px; white-space: nowrap; }
table.txlist td:nth-child(3) { grid-column: 2; grid-row: 2; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
table.txlist td:nth-child(9) { grid-column: 3; grid-row: 2; text-align: right; }
table.txlist td:nth-child(4), table.txlist td:nth-child(5), table.txlist td:nth-child(7), table.txlist td:nth-child(8) { display: none; }
table.txlist tr.open td:nth-child(4) { display: block; grid-column: 1 / -1; grid-row: 3; margin-top: 8px; }
table.txlist tr.open td:nth-child(5) { display: block; grid-column: 1 / -1; grid-row: 4; margin-top: 6px; }
table.txlist tr.open td:nth-child(7) { display: flex; flex-wrap: wrap; align-items: center; grid-column: 1 / 3; grid-row: 5; }
table.txlist tr.open td:nth-child(8) { display: flex; align-items: center; justify-content: flex-end; grid-column: 3; grid-row: 5; }
table.txlist tr.open td:nth-child(9) { grid-column: 1 / -1; grid-row: 6; text-align: left; margin-top: 6px; }
table.txlist td:nth-child(4)::before { content: "Category"; display: block; color: var(--muted); font-size: 13px; }
table.txlist td:nth-child(5)::before { content: "Commitment"; display: block; color: var(--muted); font-size: 13px; }
table.txlist td:nth-child(7) .tick::before { content: "Transfer"; color: var(--muted); margin-right: 8px; }
table.txlist td:nth-child(8) .tick::before { content: "One-off"; color: var(--muted); margin-right: 8px; }
table.txlist .tick { display: inline-flex; align-items: center; gap: 0; }
table.txlist select { width: 100%; max-width: 520px; }
table.txlist .suggest { margin-top: 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
table.txlist button.rowopen { background: none; border: 0; padding: 0; min-height: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; font-weight: 600; overflow-wrap: anywhere; }
table.txlist .chip { font-size: 13px; padding: 3px 10px; min-height: 0; border-radius: 999px; white-space: nowrap; max-width: 12em; overflow: hidden; text-overflow: ellipsis; }
table.txlist .chip.sugg { border-color: var(--ok); color: var(--ok); }
table.txlist .chip.muted { color: var(--muted); border-color: var(--line); }
table.txlist .edact { display: none; gap: 8px; }
table.txlist tr.open .chip { display: none; }
table.txlist tr.open .edact { display: flex; }
.undo { position: fixed; z-index: 11; left: 50%; transform: translateX(-50%); bottom: 16px; width: min(560px, calc(100% - 20px)); margin: 0;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 8px; background: var(--fg); color: var(--bg); }
.undo button { color: var(--bg); border-color: var(--bg); min-height: 0; padding: 4px 12px; }
.undo button.quiet { color: var(--bg); border-color: transparent; }
details.help { margin-top: 8px; }
/* (FV-072) the forecast: a heading with its action on one line; forms shut until asked for; on a phone the month list
   keeps Month, Closing and Lowest (an opened month shows the rest) */
.head-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.head-row h2 { margin-bottom: 4px; }
form.filters[hidden] { display: none; }
table.months td:first-child { white-space: nowrap; }
details#settings { margin-top: 0; }
details#settings > summary.h2 { cursor: pointer; color: var(--fg); font-size: 1.2em; font-weight: 700; }
#plan-note:empty { display: none; }
@media (max-width: 699px) {
  table.months .wide, table.monthdays .wide { display: none; }
  table.months .lowday { display: block; font-size: 12px; }
  /* (FV-072, U8) Categories on a phone: the kind is left out so "In forecast" and Change fit */
  table.cats th:nth-child(2), table.cats td:nth-child(2) { display: none; }
  table.cats th { white-space: normal; }
  table.cats td, table.cats th { padding-left: 4px; padding-right: 4px; }
  .facts th { white-space: normal; }
  details.days td, details.days th { padding-left: 4px; padding-right: 4px; }
  /* (FV-072) a planned item on a phone: its name and amount on one line, then how and when, then its buttons */
  table.planlist td:nth-child(3) { grid-column: 2; grid-row: 1; text-align: right; }
  table.planlist td:nth-child(2), table.planlist td:nth-child(4), table.planlist td:nth-child(5) { color: var(--muted); font-size: 13px; }
  table.planlist td:nth-child(6) { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
  table.months td, table.months th { padding-left: 4px; padding-right: 4px; }
}
#cat-bar .muted, #link-bar .muted { font-size: 13px; }
@media (max-width: 699px) {
  #tx-filter { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
  #tx-filter label:nth-child(3) { grid-column: 1 / -1; }
  #tx-filter select { width: 100%; }
  table.txlist .chip { min-height: 44px; }
  .undo button { min-height: 44px; }
  table.txlist button.rowopen { min-height: 28px; }
  .undo { bottom: calc(64px + env(safe-area-inset-bottom)); }
}
/* FV-071 Commitments as a work list (Ian, 20 Nov): views as a row of pills; each commitment one tappable summary (name |
   amount, then how often and next due), a chip per problem, and its editor below it while open */
nav.segs { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
nav.segs a.seg { border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 13px; text-decoration: none; color: var(--fg); }
nav.segs a.seg.on { background: var(--fg); color: var(--bg); border-color: var(--fg); }
ul.cwork { list-style: none; margin: 0; padding: 0; }
ul.cwork li.cw { border-bottom: 1px solid var(--line); padding: 8px 0; }
ul.cwork li.cw.open { background: color-mix(in srgb, var(--fg) 5%, transparent); padding: 8px; border-radius: 6px; }
ul.cwork button.cw-open { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; width: 100%; background: none; border: 0; padding: 0; min-height: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
ul.cwork .cw-name { font-weight: 600; overflow-wrap: anywhere; }
ul.cwork .cw-amt { text-align: right; white-space: nowrap; }
ul.cwork .cw-when { grid-column: 1 / -1; font-size: 13px; }
ul.cwork .cw-chips { display: block; margin-top: 4px; }
ul.cwork .cw-form { margin-top: 8px; display: grid; gap: 8px; }
ul.cwork .cw-form label { display: grid; gap: 2px; }
ul.cwork .cw-form input[name="name"], ul.cwork .cw-form select { width: 100%; max-width: 520px; }
ul.cwork fieldset.cw-status { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; }
ul.cwork fieldset.cw-status legend { color: var(--muted); font-size: 13px; padding: 0; }
ul.cwork fieldset.cw-status label.choice { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 699px) {
  nav.segs a.seg { min-height: 36px; display: inline-flex; align-items: center; }
  ul.cwork button.cw-open { min-height: 44px; }
}
/* FV-071: the plain Save is secondary beside Save and next; five tabs with two long names fit a 360px phone */
ul.cwork .cw-form button[value="0"] { background: transparent; color: var(--fg); border-color: var(--muted); }
@media (max-width: 699px) {
  .tabbar a { flex: 1 1 auto; min-width: 0; font-size: 12px; padding: 0 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
/* (FV-047) what the payments say: a band above the editor and on a commitment's page; Home's "to check" line */
.learned { border-left: 3px solid var(--fg); padding: 4px 0 4px 10px; margin: 8px 0; }
.learned ul { margin: 4px 0; padding-left: 1.2em; }
.learned li { margin: 6px 0; }
.learned li button { margin: 4px 6px 0 0; }
/* (FV-048) the To do card, the renewal band and the diary */
.todo ul.lines { list-style: none; padding: 0; margin: 0; }
.todo ul.lines li { border-bottom: 1px solid var(--line); padding: 8px 0; }
.todo ul.lines li > a { display: block; text-decoration: none; overflow-wrap: anywhere; }
.todo ul.lines li.late .what { color: var(--bad); font-weight: 600; }
.learned.renew p { margin: 4px 0; }
.learned.renew button { margin: 4px 6px 0 0; }
.diary ul.lines { list-style: none; padding: 0; margin: 0; }
.diary li.dr { border-bottom: 1px solid var(--line); padding: 8px 0; overflow-wrap: anywhere; }
.diary li.dr .when { display: inline-block; min-width: 6.5em; }
.diary li.dr .num { float: right; font-variant-numeric: tabular-nums; }
.diary li.dr.late .when { color: var(--bad); font-weight: 600; }
.diary li.dr button { margin: 4px 6px 0 0; }
.audit ul.lines { list-style: none; padding: 0; margin: 0; }
.audit li.ar, .audit li.dg { border-bottom: 1px solid var(--line); padding: 8px 0; overflow-wrap: anywhere; }
.audit li.dg button { margin-top: 4px; }
.audit .totals span { margin-right: 12px; font-variant-numeric: tabular-nums; }
/* (FV-074) For approval: a line per payment sorted by FinVault; one opened shows its field rows under a band */
.approvals ul.aplist { list-style: none; padding: 0; margin: 0; }
.approvals li.ap { border-bottom: 1px solid var(--line); padding: 8px 0; overflow-wrap: anywhere; }
.approvals li.ap > button.rowopen { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; font-weight: 600; display: flex; justify-content: space-between; gap: 8px; width: 100%; text-align: left; }
.approvals li.ap .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.approvals li.ap p.sorted { margin: 4px 0; }
.approvals li.ap p.sorted .chip { display: inline-block; font-size: 13px; padding: 2px 10px; border: 1px solid var(--line); border-radius: 999px; margin: 0 4px 2px 0; }
.approvals li.ap p.sorted .chip.set { border-color: var(--fg); font-weight: 600; }
.approvals li.ap.open > button[data-approve] { display: none; }
.approvals dl.fields { margin: 8px 0; }
.approvals dl.fields > div { display: flex; justify-content: space-between; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding: 6px 0; }
.approvals dl.fields dt { color: var(--muted); }
.approvals dl.fields dd { margin: 0; text-align: right; }
.approvals dl.fields button.field { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; }
.approvals dl.fields select { max-width: 100%; }
@media (max-width: 699px) {
  .approvals li.ap button, .approvals dl.fields button.field { min-height: 44px; }
}
/* FV-058 Reports by category: a grid on a computer (categories down, months across), one month at a time on a phone
   with a bar per category; only one of the two shows */
.reports .rgrid { overflow-x: auto; }
.reports .rgrid table th[scope="row"] { text-align: left; font-weight: normal; overflow-wrap: anywhere; }
.reports .rgrid tr.total th, .reports .rgrid tr.total td { font-weight: 600; border-top: 2px solid var(--line); }
.reports .rgrid tr.sub th { text-align: left; padding-top: 14px; font-size: 13px; color: var(--muted); }
.reports .rphone { display: none; }
.reports .rstep { align-items: center; gap: 10px; }
.reports .seg.off { opacity: 0.35; }
.reports ul.rl { list-style: none; margin: 0; padding: 0; }
.reports ul.rl li a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 8px 0; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.reports ul.rl .rl-name { overflow-wrap: anywhere; }
.reports ul.rl meter { grid-column: 1 / -1; width: 100%; height: 8px; }
p.note { border-left: 3px solid var(--line); padding: 4px 8px; margin: 6px 0; }
@media (max-width: 699px) {
  .reports .rgrid { display: none; }
  .reports .rphone { display: block; }
  .reports ul.rl li a { min-height: 44px; }
  #rp-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
  #rp-form label.choice { grid-column: 1 / -1; }
  #rp-form select { width: 100%; }
}
