.narrow { max-width: 28rem; margin: 3rem auto; }
.error { color: var(--pico-del-color); }
form.inline { margin: 0; display: inline; }
form.inline button { margin: 0; padding: 0.25rem 0.75rem; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.muted td { opacity: 0.55; }
ul.tree, ul.tree ul { list-style: none; padding-left: 1rem; }
ul.tree li { margin: 0.25rem 0; }
.cat { border-left: 4px solid transparent; padding-left: 0.4rem; }
.actions { float: right; display: inline-flex; gap: 0.25rem; }
.actions button { font-size: 0.75rem; }
.neg { color: var(--pico-del-color); }
.pos { color: var(--pico-ins-color); }
.muted { opacity: 0.7; }
mark.tag { font-size: 0.7rem; padding: 0 0.35rem; margin-left: 0.25rem; border-radius: 0.5rem; }
.row-actions { white-space: nowrap; text-align: right; }
.row-actions a { text-decoration: none; }
button.link { background: none; border: none; padding: 0 0.25rem; margin: 0; cursor: pointer; }
article.wide { max-width: 40rem; }
.filters { margin-top: 1rem; }
.filters summary { font-weight: 600; }
.hello { overflow-wrap: anywhere; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; margin-bottom: 1rem; }
.stats article { margin: 0; padding: 0.75rem 1rem; }
.stats p { font-size: 1.4rem; margin: 0; font-variant-numeric: tabular-nums; }
.month-nav { display: flex; align-items: center; justify-content: space-between; }
.month-nav h2 { margin: 0; }
.bar-row { display: grid; grid-template-columns: 1fr auto; column-gap: 0.5rem; }
.bar-row progress { grid-column: 1 / -1; margin-bottom: 0.5rem; }

/* ---- PWA / mobile ---- */
.brand { display: inline-flex; align-items: center; gap: 0.4rem; text-decoration: none; }
.offline-banner { display: none; position: sticky; top: 0; z-index: 20; padding: 0.4rem 1rem;
  text-align: center; font-size: 0.85rem; background: #b45309; color: #fff; }
html.is-offline .offline-banner { display: block; }
.bottom-nav { display: none; }
.d-short, .show-mobile { display: none; }
td.date { white-space: nowrap; }
.more-links { display: grid; gap: 0.5rem; margin-bottom: 1.5rem; }

@media (max-width: 768px) {
  .top-links { display: none; }
  body.has-bottom-nav main { padding-bottom: calc(5rem + env(safe-area-inset-bottom)); }
  .bottom-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 10;
    left: 0; right: 0; bottom: 0; padding: 0.35rem 0.25rem calc(0.35rem + env(safe-area-inset-bottom));
    background: var(--pico-background-color); border-top: 1px solid var(--pico-muted-border-color); }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; font-size: 0.7rem;
    text-decoration: none; color: var(--pico-muted-color); }
  .bottom-nav a span { font-size: 1.25rem; line-height: 1.4; }
  .bottom-nav a[aria-current="page"] { color: var(--pico-primary); font-weight: 600; }
  .bottom-nav a.add span { display: grid; place-items: center; width: 3rem; height: 3rem; margin-top: -1.1rem;
    border-radius: 50%; background: #1f7a5a; color: #fff; font-size: 1.6rem;
    box-shadow: 0 2px 8px rgb(0 0 0 / 0.25); }
  .stats article { padding: 0.5rem 0.6rem; }
  .stats p { font-size: 0.95rem; }
  .stats small { font-size: 0.7rem; }
  .hello { font-size: 1.4rem; }
  .row-actions { font-size: 0.9rem; }
  table { font-size: 0.9rem; }
  .actions { float: none; display: block; margin-top: 0.25rem; }
  .col-account, .d-full { display: none; }
  .d-short, .show-mobile { display: inline; }
  td, th { padding-left: 0.35rem; padding-right: 0.35rem; }
}

/* ---- loans ---- */
.tabs { display: flex; gap: 1rem; margin-bottom: 1rem; }
.tabs a[aria-current="page"] { font-weight: 700; text-decoration: underline; }
.loan-card { padding: 0.75rem 1rem; }
.loan-card header { margin-bottom: 0.5rem; padding: 0 0 0.5rem; }
mark.overdue { background: #b45309; color: #fff; }
label.check { display: flex; align-items: center; gap: 0.5rem; }

/* ---- recurring ---- */
.upcoming header form.inline button { font-size: 0.75rem; padding: 0.15rem 0.5rem; margin-left: 0.5rem; }
tr.overdue-row td { color: var(--pico-del-color); }

/* budgets */
.budget-warning progress { --pico-progress-color: #d97706; }
.budget-over progress { --pico-progress-color: var(--pico-del-color); }
.budget-over .num { color: var(--pico-del-color); }
mark.tag.warn { background: #d97706; color: #fff; }
mark.tag.over { background: var(--pico-del-color); color: #fff; }
small.carried { display: block; margin: -0.4rem 0 0.6rem; }

/* import */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); column-gap: 1rem; }
.import-rows tr.import-duplicate td,
.import-rows tr.import-skipped td { opacity: 0.5; }
.import-rows tr.import-error td { color: var(--pico-del-color); }
.import-rows tr.import-possible_duplicate td { background: rgba(217, 119, 6, 0.12); }

/* amounts never wrap between number and currency */
.num { white-space: nowrap; }

/* public pages */
.site-header nav, .site-footer nav { flex-wrap: wrap; }
.site-footer { text-align: center; padding-block: 2rem; border-top: 1px solid var(--pico-muted-border-color); }
.site-footer nav { display: flex; justify-content: center; gap: 1rem; margin-bottom: 0.5rem; }
.hero { display: grid; gap: 2rem; align-items: center; grid-template-columns: 1fr; padding-block: 2rem; }
@media (min-width: 900px) { .hero { grid-template-columns: 3fr 2fr; } }
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.1; }
.hero .lead { font-size: 1.15rem; }
.mock article { box-shadow: 0 10px 30px rgba(0,0,0,0.12); }
.mock .big { font-size: 1.8rem; margin: 0 0 0.75rem; }
.signup .consent { font-size: 0.9rem; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem; padding-block: 1rem; opacity: 0.85; }
.features { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.features h3 { font-size: 1.1rem; }
section { padding-block: 1.5rem; }
.pricing article.plus { border: 2px solid var(--pico-primary); }
.pricing .price { font-size: 1.8rem; margin: 0; }
.center { text-align: center; }
.faq details { border-bottom: 1px solid var(--pico-muted-border-color); padding-block: 0.5rem; }
.cta { text-align: center; }
.cta .signup { max-width: 32rem; margin: 0 auto; text-align: left; }
.legal { max-width: 46rem; }
.legal dt { font-weight: bold; margin-top: 0.75rem; }
mark.to-fill { background: #fde68a; color: #7c2d12; }
.checklist ul { list-style: none; padding: 0; }
.checklist li.done { opacity: 0.6; }
.checklist header { display: flex; justify-content: space-between; align-items: center; }
.danger { border: 1px solid var(--pico-del-color); }
.quick-account { align-items: center; }
@media (max-width: 700px) { .hide-mobile { display: none; } }

/* Feedback: always reachable, also on phones where the other top links are hidden */
.feedback-nav { margin-left: auto; }
.feedback-btn { padding: 0.3rem 0.8rem; font-size: 0.9rem; white-space: nowrap; }
@media (max-width: 768px) { .feedback-nav { display: flex; } }
fieldset.kinds { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
fieldset.kinds label { margin: 0; }

