
@font-face {
  font-family: "Figtree";
  src: url("/app/assets/4ba7d3d09669/figtree.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  /* Colour, by role (docs/design-system.md) */
  --ink: #16181D;
  --ink-2: #3F4550;
  --muted: #5B616E;
  --control: #80868F;
  --line: #E2E4E8;
  --line-soft: #EDEEF0;
  --line-strong: #C9CDD3;
  --surface: #FFFFFF;
  --surface-2: #F1F2F4;
  --rail: #FBFBFC;
  --accent: #0F766E;
  --accent-hover: #115E59;
  --accent-wash: #E6F2F1;
  --accent-ink: #0B4F4A;
  --on-accent: #FFFFFF;
  --on-accent-muted: #D7EEEB;
  --on-ink: #FFFFFF;
  --on-bad: #FFFFFF;
  --on-bad-muted: #FBE7E6;
  --good-ink: #0B6B52;
  --warn: #B45309;
  --warn-wash: #FDF0E1;
  --warn-ink: #7A3E06;
  --warn-track: #F5D3AC;
  --bad-wash: #FBE7E6;
  --bad-ink: #8A1C17;
  --danger: #B42318;
  --track: #E9EBEE;
  --scrim: rgba(22, 24, 29, .55);
  /* Charts (Informes) */
  --viz-base: #C9CED6;
  --viz-up: #E0A35E;
  --viz-heat-1: #E6F2F1;
  --viz-heat-2: #B9DCD8;
  --viz-heat-3: #5FA8A1;
  /* Type */
  --t-caps: 12px;
  --t-meta: 13px;
  --t-small: 15px;
  --t-body: 16px;
  --t-title: 20px;
  --t-question: 22px;
  --t-page: 26px;
  --t-amount: 40px;
  --w-regular: 400;
  --w-medium: 500;
  --w-semi: 600;
  --w-bold: 700;
  --w-heavy: 800;
  /* Spacing */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-7: 32px;
  --s-8: 48px;
  /* Radius */
  --r-s: 6px;
  --r-m: 10px;
  --r-l: 20px;
  --r-pill: 999px;
  /* Elevation */
  --e-1: 0 1px 3px rgba(22, 24, 29, .15);
  --e-2: 0 8px 24px rgba(22, 24, 29, .14);
  /* Touch */
  --tap: 44px;
  --tap-l: 48px;
  --font: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--t-body);
  line-height: 1.5;
  color: var(--ink);
  background: var(--surface);
}
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
/* Cycle 372: a title focused by the script (a panel with no field) shows no ring. */
h1[tabindex="-1"]:focus { outline: none; }
h1, h2, h3, p { margin: 0; }
.vh {
  position: absolute !important;
  /* Cycle 432-2: a field rule ('.field select { width: 100% }') must not size it. */
  width: 1px !important; height: 1px !important;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
svg { flex: none; }

/* ---------- Buttons and links that look like buttons ---------- */
.btn, .btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  width: 100%;
  min-height: var(--tap-l);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-m);
  font: inherit;
  font-size: var(--t-body);
  font-weight: var(--w-semi);
  text-decoration: none;
  cursor: pointer;
}
.btn { border: 1px solid var(--control); background: var(--surface); color: var(--ink); }
.btn:hover { background: var(--surface-2); color: var(--ink); }
.btn-primary { border: 0; background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
/* Cycle 353: a disabled primary reads as not available yet. */
.btn-primary:disabled, .btn-primary:disabled:hover { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
.link-quiet {
  border: 0;
  background: none;
  font: inherit;
  font-size: var(--t-small);
  color: var(--muted);
  padding: var(--s-2) 0;
  min-height: var(--tap);
  cursor: pointer;
}
.link-quiet:hover { color: var(--ink); }

/* ---------- Single-column screens (sign-in, consent, reading) ---------- */
.solo {
  min-height: 100vh;
  max-width: 440px;
  margin: 0 auto;
  padding: var(--s-6) var(--s-6) var(--s-7);
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}
.solo-top { display: flex; justify-content: space-between; align-items: center; min-height: var(--tap); }
.spacer { flex: 1; }
.brand { font-size: var(--t-amount); font-weight: var(--w-heavy); letter-spacing: -.02em; color: var(--accent); line-height: 1; }
.solo h1 { font-size: var(--t-page); line-height: 1.2; font-weight: var(--w-bold); }
.lead { font-size: var(--t-body); color: var(--muted); }
.fine { font-size: var(--t-small); color: var(--muted); text-align: center; line-height: 1.45; }
/* Cycle 290: shown by the installed app with no network. */
.offline { max-width: 420px; margin: 0 auto; padding: calc(var(--s-1) * 18) var(--s-4); text-align: center; }
.offline h1 { font-size: var(--t-title); margin: 0 0 var(--s-2); }
.offline p { color: var(--muted); margin: 0 0 var(--s-6); }
.offline .btn-primary { display: inline-flex; }

.notice {
  padding: var(--s-3) var(--s-3);
  border-radius: var(--r-m);
  background: var(--bad-wash);
  color: var(--bad-ink);
  font-size: var(--t-small);
}
/* Cycle 380 (BL-NN-953): the answer to a button press. One at a time, at
   the bottom of the column the button is in (the page script sets left and
   width; without it, the bottom of the window). Green leaves after 4 s, red
   stays until closed or sent again. */
.toast {
  position: fixed;
  z-index: 15; /* over the + button (.fab, 10), under the open menu (20) */
  left: 50%;
  bottom: calc(var(--s-4) + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  box-sizing: border-box;
  width: min(440px, calc(100vw - 2 * var(--s-4)));
  margin: 0;
  display: flex;
  align-items: flex-start;
  gap: var(--s-2);
  padding: var(--s-3);
  border-radius: var(--r-m);
  background: var(--ink);
  color: var(--on-ink);
  box-shadow: var(--e-2);
  font-size: var(--t-small);
  line-height: 1.4;
  animation: toast-in .2s ease-out;
}
.toast[data-placed] { transform: none; }
.toast::before {
  flex: none;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: var(--r-pill);
  color: var(--on-ink);
  font-size: var(--t-meta);
  font-weight: var(--w-bold);
  line-height: 1;
}
.toast.ok::before { content: "✓" / ""; background: var(--accent); }
.toast.bad::before { content: "!" / ""; background: var(--danger); }
.toast-t { flex: 1; min-width: 0; padding-top: 1px; }
/* 44px to tap, taking the toast's --s-3 padding above and below, so the toast keeps its height. */
.toast-act, .toast-x {
  flex: none;
  min-height: var(--tap);
  margin: calc(-1 * var(--s-3)) 0;
  padding: 0 var(--s-1);
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.toast-act { font-weight: var(--w-semi); text-decoration: underline; }
.toast-x { min-width: var(--tap); font-size: var(--t-title); line-height: 1; opacity: .75; }
.toast-x:hover { opacity: 1; }
.toast.toast-demo { position: static; transform: none; width: auto; animation: none; }
.toast.leaving { animation: toast-out .2s ease-in forwards; }
@keyframes toast-in { from { opacity: 0; translate: 0 8px; } }
@keyframes toast-out { to { opacity: 0; translate: 0 4px; } }
@media (prefers-reduced-motion: reduce) { .toast, .toast.leaving { animation: none; } }
.points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-3); }
.points li { display: flex; gap: var(--s-3); font-size: var(--t-small); line-height: 1.45; }
.points svg { margin-top: 2px; color: var(--accent); }
.docs { display: flex; flex-direction: column; gap: var(--s-2); }
.doc {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--s-3) var(--s-4);
  min-height: var(--tap-l);
  border: 1px solid var(--control);
  border-radius: var(--r-m);
  color: var(--ink);
  text-decoration: none;
  font-weight: var(--w-semi);
}
.doc:hover { background: var(--surface-2); color: var(--ink); }
.doc svg { color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: var(--s-3); }
/* Antes de empezar's boxes keep the fine-print size the long consent label had (cycle 463). */
.solo .check-row { font-size: var(--t-small); line-height: 1.45; }
/* Long text (privacy, terms) reads in the 640px no-list column, not the
   440px sign-in one: about 70 characters a line on desktop (cycle 421). */
.solo.reading { max-width: 640px; }
.reading h1 { font-size: var(--t-page); }
.reading h2 { font-size: var(--t-title); margin-top: var(--s-2); }
.reading p { font-size: var(--t-body); }
.version { font-size: var(--t-meta); color: var(--muted); }

/* On a wider screen the single-column screens stay one group in the middle;
   the phone layout pushes the action down to the thumb instead. */
@media (min-width: 768px) {
  .solo { justify-content: center; padding-top: var(--s-8); padding-bottom: var(--s-8); }
  .solo > .spacer { flex: 0 0 8px; }
}

/* ---------- The app frame ---------- */
.frame { min-height: 100vh; }
/* Not ".top": a budget row's first line is ".cat .top" and would inherit this (BL-NN-846). */
.appbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 56px;
  padding: var(--s-1) var(--s-3);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
/* C294: the install card, at the end of Presupuesto; the script shows it. */
.install-card { margin: var(--s-6) 0 var(--s-2); padding: var(--s-3) var(--s-4); border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); font-size: var(--t-small); line-height: 1.45; }
.install-card p { margin: 0 0 var(--s-2); }
.install-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-1); }
.install-actions .btn, .install-actions .btn-primary { width: auto; min-height: var(--tap); padding: 0 var(--s-4); }
.share-icon { display: inline-flex; vertical-align: -3px; color: var(--accent-ink); }
.install-text { margin: var(--s-1) 0 var(--s-2); font-size: var(--t-small); line-height: 1.45; }
.install-card[hidden], .install-card [hidden], .install-page [hidden] { display: none; }
.appbar-title { font-size: var(--t-body); font-weight: var(--w-bold); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: var(--r-m);
  background: none;
  font: inherit;
  color: var(--ink-2);
  text-decoration: none;
  cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }

.drawer { display: none; }
.drawer:target {
  display: flex;
  position: fixed;
  inset: 0;
  z-index: 20;
}
.scrim { flex: 1; background: var(--scrim); }
.menu {
  width: 300px;
  max-width: 85vw;
  height: 100%;
  overflow-y: auto;
  padding: var(--s-4) var(--s-3) var(--s-6);
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--surface);
}
.menu-close { align-self: flex-end; }
.menu-toggle { display: none; }
.budget { padding: var(--s-1) var(--s-2) var(--s-3); margin-bottom: var(--s-1); border-bottom: 1px solid var(--line-soft); }
.budget-name { display: block; font-size: var(--t-body); font-weight: var(--w-bold); }
.budget-switch { display: inline-block; font-size: var(--t-small); padding: var(--s-1) 0; }
.budget-initial { display: none; }
.item {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  width: 100%;
  min-height: var(--tap);
  padding: var(--s-2) var(--s-2);
  border: 0;
  border-radius: var(--r-m);
  background: none;
  font: inherit;
  font-size: var(--t-body);
  font-weight: var(--w-medium);
  color: var(--ink);
  text-decoration: none;
  text-align: left;
  cursor: pointer;
}
.item:hover { background: var(--surface-2); color: var(--ink); }
.item[aria-current="page"] { background: var(--accent-wash); color: var(--accent-ink); font-weight: var(--w-bold); }
.cap {
  margin: var(--s-3) var(--s-2) var(--s-1);
  font-size: var(--t-caps);
  font-weight: var(--w-bold);
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.cap.email { text-transform: none; letter-spacing: 0; font-weight: var(--w-semi); }
.menu-end { margin-top: auto; padding-top: var(--s-3); }
.menu-end form { margin: 0; }

.content { padding: var(--s-6) var(--s-5) var(--s-7); max-width: 760px; }
.content h1 { font-size: var(--t-page); line-height: 1.2; font-weight: var(--w-bold); }
.panel {
  margin-top: var(--s-4);
  padding: var(--s-4);
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.panel .btn-primary { width: auto; align-self: flex-start; }

/* ---------- Mi presupuesto (3.1) and a category (3.3) ---------- */
.page-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s-2); min-height: var(--tap); flex-wrap: wrap; }
.page-head h1 { font-size: var(--t-page); }
.chip[hidden] { display: none; }
.months { display: flex; align-items: center; gap: 2px; margin-right: calc(-1 * var(--s-2)); }
.month-name { min-width: 84px; text-align: center; font-size: var(--t-small); font-weight: var(--w-semi); }
.icon-btn.off, .icon-btn.off:hover { background: none; color: var(--line); cursor: default; }
.back { display: inline-flex; align-items: center; gap: var(--s-1); min-height: var(--tap); font-weight: var(--w-semi); font-size: var(--t-small); text-decoration: none; }
.ed-danger { margin-top: var(--s-7); padding-top: var(--s-5); border-top: 1px solid var(--line); }
.ready {
  margin-top: var(--s-2);
  padding: var(--s-5);
  border-radius: var(--r-l);
  background: var(--accent);
  color: var(--on-accent);
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
}
.ready.neg { background: var(--bad-ink); color: var(--on-bad); }
.ready h2 { font-size: var(--t-small); font-weight: var(--w-semi); color: var(--on-accent-muted); }
.ready-amt { font-size: var(--t-amount); font-weight: var(--w-heavy); letter-spacing: -.01em; line-height: 1.15; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ready-also { font-size: var(--t-body); font-weight: var(--w-bold); font-variant-numeric: tabular-nums; }
.ready p { font-size: var(--t-small); color: var(--on-accent-muted); line-height: 1.4; }
.ready.neg h2, .ready.neg p { color: var(--on-bad-muted); }
.ready-btn {
  margin-top: var(--s-2);
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-m);
  background: var(--surface);
  color: var(--accent-ink);
  font-size: var(--t-body);
  font-weight: var(--w-bold);
  text-decoration: none;
}
.ready-btn:hover { background: var(--accent-wash); color: var(--accent-ink); }
.ready.neg .ready-btn { color: var(--bad-ink); }
.banner {
  margin-top: var(--s-3);
  display: flex;
  align-items: center;
  gap: var(--s-2);
  min-height: var(--tap);
  padding: var(--s-3) var(--s-3);
  border-radius: var(--r-m);
  background: var(--warn-wash);
  color: var(--warn-ink);
  font-size: var(--t-small);
  font-weight: var(--w-semi);
  text-decoration: none;
}
.banner:hover { color: var(--warn-ink); filter: brightness(.97); }
/* Cycle 494: the Section link, the Bandeja's quiet banner: grey, no dot, a little apart from the rows above. */
.banner.quiet { margin-top: var(--s-4); background: var(--surface-2); color: var(--ink-2); font-weight: var(--w-regular); }
.banner.quiet:hover { color: var(--ink); filter: none; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); flex: none; }
/* Cycle 401: the menu's dot on an item that waits for the person (Cuentas),
   and on the phone's ☰ so a closed menu still shows it. */
.nav-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); flex: none; }
.item.marked .nav-dot { margin-left: auto; }
.icon-btn.marked, .item.marked { position: relative; }
.icon-btn.marked .nav-dot { position: absolute; top: var(--s-2); right: var(--s-2); }
.banner-go { margin-left: auto; display: flex; align-items: center; gap: var(--s-1); white-space: nowrap; }

.group { margin-top: var(--s-1); }
.grp { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-2); margin: var(--s-5) 0 var(--s-1); }
.grp h2 { min-width: 0; overflow-wrap: anywhere; font-size: var(--t-meta); font-weight: var(--w-bold); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.spent, .amt { text-align: right; }
/* Cycle 350: on the phone a row is the name and Disponible, the bar under
   them. Gastado, the column names and the warning show only in the table. */
.gcols, .bhead, .spent, .cat .note { display: none; }
/* A card row opens nothing: its "Te falta apartar …" is the only place it is said. */
.cat.card.over .note { display: block; }
.amt { flex: none; }
.cat {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  padding: var(--s-3) 0;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink);
  text-decoration: none;
}
a.cat:hover { background: var(--rail); color: var(--ink); }
.cat .top { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-2); }
.cat strong { flex: 1; min-width: 0; font-size: var(--t-body); font-weight: var(--w-semi); overflow-wrap: anywhere; }
.spent { font-size: var(--t-small); color: var(--muted); font-variant-numeric: tabular-nums; }
.amt { font-size: var(--t-body); font-weight: var(--w-bold); font-variant-numeric: tabular-nums; }
.bar { height: 6px; border-radius: var(--r-s); background: var(--track); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: var(--r-s); background: var(--accent); }
.note { font-size: var(--t-meta); color: var(--muted); }
/* A short row's empty track is orange too, so 0% still reads as "needs you" (cycle 415). */
.cat.short .bar { background: var(--warn-track); }
.cat.short .bar i { background: var(--warn); }
.cat.short .note { color: var(--warn-ink); }
.cat.over .amt { color: var(--danger); }
.cat.over .bar i { background: var(--danger); }
.cat.over .note { color: var(--bad-ink); font-weight: var(--w-semi); }
/* The category page says what its row no longer does (cycle 350). */
.cat-state { margin-top: var(--s-3); font-size: var(--t-small); font-weight: var(--w-semi); color: var(--ink-2); }
.cat-state.t-short { color: var(--warn-ink); }
.cat-state.t-over { color: var(--bad-ink); }
.cat-state + .cat-state { margin-top: var(--s-1); }
/* Cycle 469: a budget group folds. Its row: the chevron (left, so the amounts
   stay in their column), the name, and its totals, one line per currency;
   red when anything in it is below zero. */
.bgroup > summary { list-style: none; cursor: pointer; }
.bgroup > summary::-webkit-details-marker { display: none; }
.bgroup > .grp { align-items: center; min-height: var(--tap); margin: var(--s-2) 0 0; padding: var(--s-2) 0; border-bottom: 1px solid var(--line); }
.bgroup > .grp svg { flex: none; color: var(--muted); }
.bgroup[open] > .grp svg { transform: rotate(90deg); }
.bgroup > .grp h2 { flex: 1; font-size: var(--t-small); color: var(--ink-2); }
.bgroup > .grp .amt { color: var(--ink); }
.bgroup > .grp.over .amt { color: var(--danger); }
.gl { display: block; }
.empty-group { padding: var(--s-3) 0; font-size: var(--t-small); color: var(--muted); }

.cap-line { margin-top: var(--s-3); font-size: var(--t-meta); font-weight: var(--w-bold); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.cat-title { margin-top: 2px; font-size: var(--t-page); }
.nums { margin-top: var(--s-3); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-2); }
.n { padding: var(--s-3); border-radius: var(--r-m); background: var(--surface-2); display: flex; flex-direction: column; gap: var(--s-1); min-width: 0; }
.n span { font-size: var(--t-caps); font-weight: var(--w-semi); color: var(--muted); }
.n strong { font-size: var(--t-body); font-weight: var(--w-heavy); font-variant-numeric: tabular-nums; white-space: nowrap; }
.amt, .spent, .m { white-space: nowrap; }
.n.bad { background: var(--bad-wash); }
.n.bad span, .n.bad strong { color: var(--bad-ink); }
.explain { margin-top: var(--s-3); font-size: var(--t-meta); color: var(--muted); line-height: 1.45; }
.actions { margin-top: var(--s-3); display: flex; gap: var(--s-2); }
.actions .btn, .actions .btn-primary { flex: 1; min-height: var(--tap); font-size: var(--t-small); padding: var(--s-3); }
.sub { margin-top: var(--s-5); font-size: var(--t-meta); font-weight: var(--w-bold); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.mvs { list-style: none; margin: 0; padding: 0; }
.mv { display: flex; justify-content: space-between; align-items: center; gap: var(--s-2); padding: var(--s-3) 0; border-bottom: 1px solid var(--line-soft); }
.mv strong { display: block; font-size: var(--t-body); font-weight: var(--w-semi); overflow-wrap: anywhere; }
.mv small { display: block; font-size: var(--t-meta); color: var(--muted); }
.mv b { font-size: var(--t-body); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mv-empty { padding: var(--s-3) 0; font-size: var(--t-small); color: var(--muted); }
/* Cycle 503: Categorizar with nothing left to group, a finish with a way on. */
.cz-done { display: flex; flex-direction: column; align-items: center; gap: var(--s-3); margin-top: var(--s-7); text-align: center; }
.cz-done-mark { display: flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: var(--r-pill); background: var(--accent-wash); color: var(--accent); }
.cz-done h2 { font-size: var(--t-question); font-weight: var(--w-heavy); }
.cz-done p { max-width: 300px; font-size: var(--t-body); line-height: 1.5; color: var(--ink-2); }
.cz-done-acts { display: flex; flex-direction: column; gap: var(--s-3); align-self: stretch; margin-top: var(--s-4); }
.help-link { margin: var(--s-6) 0 var(--s-3); font-size: var(--t-small); }
.help-link a { display: inline-flex; align-items: center; gap: var(--s-2); min-height: var(--tap); color: var(--muted); text-decoration: none; }
.help-link a:hover span { text-decoration: underline; }
.all { display: inline-flex; align-items: center; min-height: var(--tap); margin-top: var(--s-2); font-size: var(--t-small); }
.w0 { width: 0%; }
.w5 { width: 5%; }
.w10 { width: 10%; }
.w15 { width: 15%; }
.w20 { width: 20%; }
.w25 { width: 25%; }
.w30 { width: 30%; }
.w35 { width: 35%; }
.w40 { width: 40%; }
.w45 { width: 45%; }
.w50 { width: 50%; }
.w55 { width: 55%; }
.w60 { width: 60%; }
.w65 { width: 65%; }
.w70 { width: 70%; }
.w75 { width: 75%; }
.w80 { width: 80%; }
.w85 { width: 85%; }
.w90 { width: 90%; }
.w95 { width: 95%; }
.w100 { width: 100%; }

/* ---------- Movimientos (4.1) and editing one (4.5) ---------- */
.tools { margin-top: var(--s-3); display: flex; flex-direction: column; gap: var(--s-2); }
.search { display: flex; align-items: center; gap: var(--s-2); padding: 0 var(--s-3); border: 1px solid var(--control); border-radius: var(--r-m); min-height: var(--tap); color: var(--muted); }
.search:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }
.search input { flex: 1; align-self: stretch; min-width: 0; margin-block: -1px; border: 0; background: none; outline: none; font: inherit; font-size: var(--t-body); color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin-top: 2px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  min-height: var(--tap);
  padding: var(--s-2) var(--s-3);
  border: 1px solid var(--control);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: var(--t-small);
  font-weight: var(--w-semi);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
a.chip:hover { color: var(--on-ink); background: var(--ink); }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.chip.go { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.chip.go:hover { background: var(--accent-hover); }
.chip input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
/* Cycle 392: a fill chip fills the field above it; tinted, never a filter's outline. */
.fills { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-2); margin-top: 2px; }
.fill {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: var(--s-2) var(--s-4);
  border: 0;
  border-radius: var(--r-pill);
  background: var(--accent-wash);
  color: var(--accent-ink);
  font: inherit;
  font-size: var(--t-small);
  font-weight: var(--w-semi);
  white-space: nowrap;
  cursor: pointer;
}
.fill:hover { background: var(--accent); color: var(--on-accent); }
.fill:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
/* Cycle 357: our own ▾, 12px in like the text; the browser's sits on the curve.
   --s-7 (32px) = 12px in + the 12px ▾ + 8px to the text. */
select.chip { max-width: 100%; appearance: none; -webkit-appearance: none; padding-right: var(--s-7); background: var(--surface) url("/app/assets/83a84a8f8a96/chevron.svg") no-repeat right var(--s-3) center / 12px; }
/* Cycle 345: the list pieces (views/ui/list.ts; docs/design-system.md, "Lists, filters, selection"). */
.chip-x { display: inline-flex; align-items: center; justify-content: center; }
.chip-pick { gap: 0; padding-block: 0; padding-right: var(--s-1); }
.chip-pick select { align-self: stretch; max-width: 220px; min-height: 0; height: auto; margin: -1px 0; padding: 0; border: 0; background: none; appearance: none; -webkit-appearance: none; color: inherit; font: inherit; cursor: pointer; }
.chip-pick select option { color: var(--ink); background: var(--surface); }
/* The × fills the chip's 44px (over its border); the hover pill sits inside it. */
.chip-pick .chip-x { position: relative; isolation: isolate; align-self: stretch; width: var(--tap); margin-block: -1px; color: inherit; }
.chip-pick .chip-x::before { content: ""; position: absolute; z-index: -1; inset: var(--s-1) 0; border-radius: var(--r-pill); }
.chip-pick .chip-x:hover::before { background: var(--ink-2); }
/* Cycle 346: a day of "Elegir fechas"; the label is the chip, the date field sits inside it. */
.chip-date { padding-block: 0; }
.chip-date input { align-self: stretch; width: auto; height: auto; margin: -1px 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; }
.tools .go { align-self: center; color: var(--accent); font-weight: var(--w-semi); }
/* Cycle 503 (A2): Movimientos filters on a phone fold behind one "Filtros"
   button; the row keeps only what is on. The button opens the same chips as
   a bottom sheet (#filtros:target, as Informes' Periodo). From 768 px the
   row is as before. */
.mv-fopen, .mv-fhead, .mv-ffoot, .mv-fscrim { display: none; }
@media (max-width: 767px) {
  .mv-fopen { display: inline-flex; }
  .mv-filters:not(:target) .chips > .chip:not(.on):not(.mv-fopen),
  .mv-filters:not(:target) .chips > .go { display: none; }
  .mv-filters:target { position: fixed; inset: 0; z-index: 30; display: flex; flex-direction: column; justify-content: flex-end; }
  .mv-filters:target .mv-fscrim { display: block; position: absolute; inset: 0; background: var(--scrim); }
  .mv-filters:target .mv-fbody { position: relative; display: flex; flex-direction: column; gap: var(--s-2); max-height: 92vh; overflow-y: auto; padding: var(--s-3) var(--s-4) calc(var(--s-6) + env(safe-area-inset-bottom, 0px)); border-radius: var(--r-l) var(--r-l) 0 0; background: var(--surface); }
  .mv-filters:target .mv-fhead { display: flex; align-items: center; justify-content: space-between; min-height: var(--tap); }
  .mv-filters:target .mv-fhead h2 { font-size: var(--t-title); }
  .mv-filters:target .chips { flex-direction: column; align-items: stretch; }
  .mv-filters:target .chips > .chip { width: 100%; justify-content: space-between; }
  .mv-filters:target .chips > .mv-fopen, .mv-filters:target .chips > .go { display: none; }
  .mv-filters:target .mv-ffoot { display: flex; gap: var(--s-3); margin-top: var(--s-3); }
  .mv-filters:target .mv-ffoot > * { flex: 1; }
}
.list-head { display: flex; align-items: center; justify-content: flex-end; gap: var(--s-3); min-height: var(--tap); margin-top: var(--s-1); }
.list-head.has-lead { justify-content: space-between; }
.sel-head { justify-content: space-between; }
.sel-count { font-weight: var(--w-semi); }
.text-act { display: inline-flex; align-items: center; min-height: var(--tap); font-size: var(--t-small); font-weight: var(--w-semi); color: var(--accent); text-decoration: none; }
.text-act:hover { color: var(--accent-hover); }
button.text-act { padding: 0; border: 0; background: none; font-family: inherit; cursor: pointer; }
.fab {
  position: fixed;
  right: calc(var(--s-5) + env(safe-area-inset-right, 0px));
  bottom: calc(var(--s-6) + env(safe-area-inset-bottom, 0px));
  z-index: 10; /* under the open menu (.drawer, 20) */
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: var(--on-ink);
  box-shadow: var(--e-2);
  transition: transform 200ms ease-out;
}
.fab:hover { background: var(--ink-2); }
/* Cycle 495: out of the way while scrolling down (appScript), so it never sits on an amount.
   Focus brings it back: a keyboard never lands on a control it cannot see. */
.fab.away:not(:focus-visible) { transform: translateY(calc(100% + var(--s-6) + env(safe-area-inset-bottom, 0px))); }
@media (prefers-reduced-motion: reduce) {
  .fab { transition: none; }
}
@media (max-width: 767px) {
  .content:has(> .fab) { padding-bottom: calc(var(--s-1) * 24); }
}
@media (min-width: 768px) {
  .fab { display: none; }
}
.day { margin: var(--s-4) 0 2px; font-size: var(--t-meta); font-weight: var(--w-bold); color: var(--muted); }
.mrow { display: flex; align-items: center; gap: var(--s-3); min-height: var(--tap); padding: var(--s-3) 0; border-bottom: 1px solid var(--line-soft); color: var(--ink); text-decoration: none; }
a.mrow:hover { background: var(--rail); color: var(--ink); }
/* Cycle 376: on Sin categoría the saved movement slides out as a card and
   the next one slides in. Only the panel's content moves; clip keeps it from
   widening the page while it does. */
@keyframes card-out { to { opacity: 0; transform: translateX(-24px); } }
@keyframes card-in { from { opacity: 0; transform: translateX(24px); } }
.split-panel.card-out, .split-panel.card-in { overflow-x: clip; }
.split-panel.card-out > * { animation: card-out .14s ease-in forwards; }
.split-panel.card-in > * { animation: card-in .2s ease-out; }
/* Cycle 374: a row a save took out of the list closes up, then goes. */
.mlist .mrow.leaving, .content.wide .mtable .mrow.leaving { overflow: hidden; min-height: 0; padding-block: 0; border-bottom-width: 0; opacity: 0; pointer-events: none; transition: height .16s ease, padding .16s ease, opacity .12s ease; }
.mrow .t { flex: 1; min-width: 0; }
.mrow strong { display: block; font-size: var(--t-body); font-weight: var(--w-semi); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mrow small { display: block; margin-top: 2px; font-size: var(--t-meta); color: var(--muted); overflow-wrap: anywhere; }
.mrow b { font-size: var(--t-body); font-weight: var(--w-bold); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mrow b.in { color: var(--good-ink); }
.tag { display: inline-block; margin-right: var(--s-1); padding: 2px var(--s-2); border-radius: var(--r-pill); background: var(--warn-wash); color: var(--warn-ink); font-size: var(--t-caps); font-weight: var(--w-bold); }
.tag.tr { background: var(--surface-2); color: var(--ink-2); }
.tag.ac { background: var(--accent-wash); color: var(--accent-ink); }

.mv-title { margin-top: var(--s-1); font-size: var(--t-title); overflow-wrap: anywhere; }
.big-amt { margin: var(--s-2) 0 var(--s-3); font-size: clamp(var(--t-page), 10vw, var(--t-amount)); font-weight: var(--w-heavy); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.src { display: flex; align-items: flex-start; gap: var(--s-2); margin-bottom: var(--s-3); padding: var(--s-2) var(--s-3); border-radius: var(--r-m); background: var(--surface-2); color: var(--ink-2); font-size: var(--t-small); line-height: 1.4; }
.src svg { margin-top: 2px; }
.edit { display: flex; flex-direction: column; gap: var(--s-4); }
.fields { display: flex; flex-direction: column; }
.fld { display: flex; align-items: center; gap: var(--s-3); min-height: var(--tap); padding: var(--s-3) 0; border-bottom: 1px solid var(--line-soft); color: var(--ink); text-decoration: none; }
.fld > span { width: 92px; flex: none; font-size: var(--t-small); color: var(--muted); }
.fld > b { flex: 1; min-width: 0; font-size: var(--t-body); font-weight: var(--w-semi); overflow-wrap: anywhere; }
.fld.lock > b { color: var(--ink-2); font-weight: var(--w-medium); }
/* C438: a locked row among rows that change carries the lock before its value. */
.fld.lock > b.lk { display: flex; align-items: center; gap: var(--s-2); }
.fld.lock > b.lk > svg { flex: none; }
.fld input, .fld select { flex: 1; min-width: 0; min-height: var(--tap); border: 0; background: none; outline: none; font: inherit; font-size: var(--t-body); font-weight: var(--w-semi); color: var(--ink); padding: 0; }
.fld:focus-within { outline: 3px solid var(--accent); outline-offset: -3px; border-radius: var(--r-s); }
/* Cycle 503: a date reads from the left like every other value (iOS centres it). */
.fld input[type="date"] { text-align: left; }
.fld input[type="date"]::-webkit-date-and-time-value { text-align: left; }
/* Cycle 503: an account not chosen yet reads as a prompt, as "Elegi..." does on Categoria.
   Only the account selects: elsewhere an empty value can be a real choice (Sin categoria). */
.fld select:is([name="account"], [name="toAccount"]):has(> option[value=""]:checked) { color: var(--muted); font-weight: var(--w-regular); }
.fld select option { color: var(--ink); }
.fld small { font-size: var(--t-meta); color: var(--muted); }
.fld.link { color: var(--accent); font-size: var(--t-small); font-weight: var(--w-semi); }
/* C347: a text action on a row (Dividir). */
.fld > .text-act { flex: none; }
/* C432: Dividir hides while Destino has an account or a card picked. */
.fld > .text-act[hidden] { display: none; }
/* Cycle 411: Anular as a button of the movement form, so it sends what was typed with it. */
button.danger { width: 100%; border: 0; background: none; font-family: inherit; cursor: pointer; }
.sheet-x-form { display: contents; }
.nc-actions > .btn, .nc-actions > .btn-danger { flex: 1; min-height: var(--tap); font-size: var(--t-small); padding: var(--s-3); }
/* Cycle 389: the category picker. A button stands in for the category select
   (which stays in the form, hidden) and opens a sheet (phone) or a popover
   under the field (computer) with a search, recents and every group. */
.cat-pick { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); width: 100%; min-height: var(--tap); padding: 0; border: 0; background: none; font: inherit; font-size: var(--t-body); font-weight: var(--w-semi); color: var(--ink); text-align: left; cursor: pointer; }
.cat-pick-v { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-pick > svg { flex: none; color: var(--muted); }
.cat-pick.empty .cat-pick-v { color: var(--muted); font-weight: var(--w-regular); }
.cat-pick.bad .cat-pick-v { color: var(--bad-ink); }
.fld .cat-pick { flex: 1; min-width: 0; outline: none; } /* the row's ring stands in, as for its inputs (389-2) */
.cpk { display: flex; flex-direction: column; width: 100%; max-width: 100%; height: 88%; max-height: 88%; margin: auto 0 0; padding: 0; border: 0; border-radius: var(--r-l) var(--r-l) 0 0; background: var(--surface); color: var(--ink); }
.cpk:not([open]) { display: none; }
html.cpk-lock body { position: fixed; inset-inline: 0; overflow: hidden; }
.cpk::backdrop { background: var(--scrim); }
.cpk-head { display: flex; align-items: center; justify-content: space-between; padding: var(--s-3) var(--s-5) 0; }
.cpk-head h2 { font-size: var(--t-title); }
.cpk-head .icon-btn { flex: none; margin-right: calc(-1 * var(--s-3)); } /* the ×, its glyph on the gutter like a sheet's */
.cpk-search { margin: var(--s-2) var(--s-5) var(--s-3); }
.cpk-list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-bottom: calc(var(--s-6) + env(safe-area-inset-bottom, 0px)); }
.cpk-group { position: sticky; top: 0; z-index: 1; padding: var(--s-1) var(--s-5); background: var(--surface-2); font-size: var(--t-caps); font-weight: var(--w-bold); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.cpk-opt { display: flex; flex-direction: column; justify-content: center; min-height: var(--tap-l); padding: var(--s-2) var(--s-5); border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.cpk-opt small { font-size: var(--t-meta); color: var(--muted); }
.cpk-opt:hover, .cpk-opt.kb { background: var(--rail); }
.cpk-opt.sel { background: var(--accent-wash); color: var(--accent-ink); font-weight: var(--w-semi); }
.cpk-opt mark { background: none; color: var(--accent); font-weight: var(--w-bold); }
.cpk-none { color: var(--muted); }
.cpk-new { color: var(--accent); font-weight: var(--w-semi); }
.cpk-empty { padding: var(--s-4) var(--s-5); color: var(--muted); }
/* Cycle 432: the Destino picker. Categorías is one group with each category
   group named under it; an account or card says its kind under its name, and
   a card what it owes on the right. */
.cpk-sub { padding: var(--s-2) var(--s-5) 2px; font-size: var(--t-meta); font-weight: var(--w-semi); color: var(--muted); }
.cpk-main { display: flex; flex-direction: column; min-width: 0; }
.cpk-opt.cpk-row { flex-direction: row; align-items: center; justify-content: space-between; gap: var(--s-3); }
.cpk-amt { flex: none; font-size: var(--t-small); font-weight: var(--w-regular); font-variant-numeric: tabular-nums; color: var(--ink-2); }
.cpk-opt.sel .cpk-amt { color: inherit; }
@media (min-width: 768px) {
  .cpk.cpk-pop { position: fixed; inset: auto; margin: 0; height: auto; border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--e-2); }
  .cpk.cpk-pop::backdrop { background: none; }
  .cpk-pop .cpk-head { display: none; }
  .cpk-pop .cpk-search { margin: var(--s-2); }
  .cpk-pop .cpk-list { padding-bottom: var(--s-2); }
  .cpk-pop .cpk-group, .cpk-pop .cpk-sub, .cpk-pop .cpk-opt { padding-inline: var(--s-3); }
  .cpk-pop .cpk-opt { min-height: var(--tap); }
}
/* BL-NN-948: one header row: the h1 left, the × on its first line at the right
   (its icon's edge on the content's edge); a Detail's ⋯ sits before the ×. */
.sheet-head { display: flex; align-items: flex-start; gap: var(--s-1); }
.sheet-head h1 { flex: 1; min-width: 0; margin-right: var(--s-2); }
.sheet-head > .icon-btn, .sheet-head > .cg-more { flex: none; margin-top: calc(-1 * var(--s-2)); }
.sheet-head > .sheet-count { flex: none; align-self: center; }
.sheet-x { flex: none; margin-right: calc(-1 * var(--s-3)); }
/* A category's group and month under its name (BL-NN-948). */
.cat-sub { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); min-height: var(--tap); }
.cat-sub .cap-line { margin: 0; }
/* A confirm question fits one line beside the × on a 360px phone (owner, cycle 363). */
.content .sheet-head h1.cf-q { font-size: var(--t-question); }
.cf-name { margin: var(--s-1) 0 0; font-size: var(--t-body); font-weight: var(--w-semi); color: var(--ink); overflow-wrap: anywhere; }
/* C347: the Tipo picker; the current kind is shown chosen, the others open their step. */
.kinds { display: flex; flex-direction: column; gap: var(--s-2); margin: var(--s-4) 0 0; padding: 0; list-style: none; }
.kinds form { margin: 0; }
.kinds .choice { justify-content: space-between; width: 100%; background: none; font: inherit; font-size: var(--t-body); color: var(--ink); text-align: left; text-decoration: none; }
.kinds .choice svg { flex: none; color: var(--muted); }
.kinds .choice.on { border-color: var(--accent); background: var(--accent-wash); cursor: default; }
.kinds .choice.on svg { color: var(--accent); }
.field-error { padding: var(--s-1) 0 0 calc(var(--s-1) * 26); font-size: var(--t-meta); font-weight: var(--w-semi); color: var(--bad-ink); }
.danger { display: block; margin-top: var(--s-2); padding: var(--s-2); min-height: var(--tap); text-align: center; font-size: var(--t-small); font-weight: var(--w-semi); color: var(--danger); }
.danger:hover { color: var(--bad-ink); }

/* ---------- Asignar (3.2) ---------- */
.asign-title { margin-top: 2px; font-size: var(--t-page); text-transform: none; }
.asign-title::first-letter { text-transform: uppercase; }
.notice { margin-top: var(--s-2); }
/* Cycle 436: the head (title and ×) and the card stay put while the list scrolls. */
.asign-top { position: sticky; top: calc(var(--s-1) * 14); z-index: 5; background: var(--surface); padding-bottom: var(--s-2); }
.ready.stick { padding: var(--s-3) var(--s-5); gap: 2px; }
.ready.stick .ready-amt { font-size: var(--t-page); }
.arow { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-2) 0; border-bottom: 1px solid var(--line-soft); }
.arow .t { flex: 1; min-width: 0; }
.arow strong { display: block; font-size: var(--t-body); font-weight: var(--w-semi); overflow-wrap: anywhere; }
.hint { display: block; margin-top: 2px; font-size: var(--t-meta); color: var(--muted); }
.hint.short { color: var(--warn-ink); font-weight: var(--w-semi); }
.hint.over { color: var(--bad-ink); font-weight: var(--w-semi); }
.hint.ok { color: var(--accent-ink); }
.amt-in {
  width: 140px;
  flex: none;
  min-height: var(--tap);
  padding: var(--s-2) var(--s-3);
  border: 1px solid var(--control);
  border-radius: var(--r-m);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: var(--t-body);
  font-weight: var(--w-semi);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.amt-in:focus { outline: 3px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
/* An empty envelope on Asignar: a grey 0, gone as soon as you type (BL-NN-815). */
.amt-in::placeholder { color: var(--muted); font-weight: var(--w-regular); opacity: 1; }
.arow.bad .amt-in { border: 2px solid var(--danger); }
/* Cycle 436: a row being saved dims its box, as a busy button dims (is-busy). */
.arow.saving .amt-in { opacity: .7; cursor: progress; }
/* Cycle 436: Disponible is the link to the category's movements (a computer); a history icon ends the row where Disponible isn't shown. */
.av-link { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 var(--s-2); margin: 0 calc(-1 * var(--s-2)); color: inherit; text-decoration: underline dotted; text-decoration-color: var(--muted); text-underline-offset: 4px; }
.av-link:hover { text-decoration-style: solid; }
.hist-phone { flex: none; margin-right: calc(-1 * var(--s-2)); color: var(--muted); }
.hist-phone:hover { color: var(--ink); }
.arow.sel { background: var(--accent-wash); }
/* Cycle 427: a minus inside the box's left edge, for keypads that have none (touch screens only;
   the script shows it and adds .has-sign). A --tap target covering the box's own left border. */
.amt-wrap { position: relative; flex: none; display: inline-flex; }
.sign-in { position: absolute; left: 0; top: 0; bottom: 0; width: var(--tap); display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 1px solid var(--control); border-right-color: var(--line-soft); border-radius: var(--r-m) 0 0 var(--r-m); background: none; color: var(--ink-2); font: inherit; cursor: pointer; }
.sign-in[hidden] { display: none; }
.sign-in[aria-pressed="true"] { background: var(--accent-wash); color: var(--accent-ink); }
.sign-in:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.arow.bad .sign-in { border: 2px solid var(--danger); border-right: 1px solid var(--line-soft); }
.amt-wrap.has-sign .amt-in { padding-left: var(--s-8); }
.amt-read { flex: none; font-size: var(--t-body); font-variant-numeric: tabular-nums; white-space: nowrap; }
.arow-error { padding: var(--s-1) 0 0; }
.asign .btn-primary { width: 100%; margin-top: var(--s-4); }
/* Cycle 413-2: "…: cubrilo" at the end of a row's hint, inline in the
   hint's size. Its 44px tap area is an ::after centred on the word (about
   12px above and below the line, into the row's padding beside the name),
   so the line doesn't move. */
.hint-act .text-act { position: relative; display: inline; font-size: inherit; text-decoration: underline; text-underline-offset: 2px; }
.hint-act .text-act::after { content: ""; position: absolute; left: calc(-1 * var(--s-1)); right: calc(-1 * var(--s-1)); top: 50%; height: var(--tap); transform: translateY(-50%); }
.asign-foot { margin-top: var(--s-5); text-align: left; }

/* ---------- Cuentas (5.1) ---------- */
.acc-h { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-2); margin: var(--s-5) 0 2px; font-size: var(--t-meta); font-weight: var(--w-bold); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.acc-h .tot { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: var(--t-small); letter-spacing: 0; text-transform: none; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tot-line.neg { color: var(--bad-ink); }
.acc-q { margin-top: var(--s-2); }
.acc-acts { display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--s-5); margin-top: var(--s-1); }
[data-acc-empty] { margin-top: var(--s-5); }
/* The search hides rows, lines of cards and sections with the hidden attribute; their own display must not win. */
.acc[hidden], .acc-line[hidden], .group[hidden] { display: none; }
.sec-note { font-size: var(--t-meta); color: var(--muted); }
.acc-line { margin-top: var(--s-3); }
.acc-line-h { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-2); margin: 0; padding: var(--s-2) 0 0; font-size: var(--t-small); font-weight: var(--w-semi); color: var(--ink); }
.acc-line-h .m { flex: none; font-weight: var(--w-regular); color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.acc-line-h .m.bad { color: var(--bad-ink); }
.acc-line .acc { padding-left: var(--s-3); }
.acc { display: flex; align-items: center; gap: var(--s-3); min-height: var(--tap); padding: var(--s-3) 0; border-bottom: 1px solid var(--line-soft); color: var(--ink); text-decoration: none; }
.acc:hover { color: var(--ink); background: var(--surface-2); }
.acc .t { flex: 1; min-width: 0; }
.acc strong { display: block; font-size: var(--t-body); font-weight: var(--w-semi); overflow-wrap: anywhere; }
.acc small { display: flex; align-items: flex-start; gap: var(--s-1); margin-top: var(--s-1); font-size: var(--t-meta); color: var(--muted); }
.acc b { flex: none; font-size: var(--t-body); font-weight: var(--w-bold); font-variant-numeric: tabular-nums; white-space: nowrap; }
.d { flex: none; width: 8px; height: 8px; margin-top: var(--s-1); border-radius: 50%; background: var(--control); }
.d.ok { background: var(--accent); }
.d.warn { background: var(--warn); }
.add-note { margin-top: var(--s-2); text-align: left; }

/* Phones: tiles stack as label and amount; amount columns shrink. */
@media (max-width: 767px) {
  .nums { grid-template-columns: 1fr; }
  .n { flex-direction: row; align-items: baseline; justify-content: space-between; }
  .amt-in { width: 132px; padding: var(--s-2); }
  .amt-wrap.has-sign .amt-in { width: 172px; }
}


/* ---------- Onboarding (cycle 270, canvas rows 1-2 and 6.8) ---------- */
.onb { gap: var(--s-5); }
.onb .solo-top { gap: var(--s-3); }
.onb .center { display: flex; align-items: center; justify-content: center; text-align: center; text-decoration: none; }
/* Not .left: that is Dividir's "what is left" box (moneySheet.ts). */
.onb .fine-start { text-align: left; }
/* Cycle 461: Cambiar de cuenta and Salir, before the first budget. */
.onb .exits { gap: var(--s-6); }
.onb .exits a { text-decoration: none; }
.stack-tight { display: flex; flex-direction: column; gap: var(--s-2); }
.cap-label { font-size: var(--t-meta); font-weight: var(--w-semi); color: var(--ink-2); }
.spacer-sm { height: 32px; flex: none; }
.onb .lead { line-height: 1.45; }

/* Step indicator: current step is a wide pill, done steps teal, next grey. */
.steps { display: flex; align-items: center; gap: var(--s-2); margin-left: auto; font-size: var(--t-meta); font-weight: var(--w-semi); color: var(--ink-2); }
.steps ol { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: var(--s-1); }
.steps li { width: 8px; height: 8px; border-radius: var(--r-s); background: var(--line-strong); }
.steps li.on { background: var(--accent); }
.steps li.now { width: 22px; }

/* The budget's name and its "Cambiar nombre" (cycle 462: a text action, no pencil). */
.onb-budget { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--s-2); min-width: 0; font-size: var(--t-small); }
.onb-budget strong { font-weight: var(--w-semi); overflow-wrap: anywhere; }

/* 1.4 origin options */
.opts { display: flex; flex-direction: column; gap: var(--s-3); }
.opt { display: flex; align-items: center; gap: var(--s-3); min-height: var(--tap); padding: var(--s-4) var(--s-4); border: 1px solid var(--control); border-radius: var(--r-l); background: var(--surface); color: var(--ink); text-decoration: none; }
.opt:hover { background: var(--surface-2); color: var(--ink); }
.opt strong { display: block; font-size: var(--t-body); font-weight: var(--w-semi); }
.opt span span { display: block; margin-top: 2px; font-size: var(--t-small); color: var(--muted); }
.opt-ico { width: 40px; height: 40px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: var(--r-m); background: var(--accent-wash); color: var(--accent); }

/* 1.5 connect */
.onb-tag { font-size: var(--t-caps); font-weight: var(--w-bold); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.onb .points svg { color: var(--accent); }
.onb .notice { margin-top: 0; line-height: 1.4; }
.onb .notice.warn { background: var(--warn-wash); color: var(--warn-ink); }
.onb .notice.ok { display: flex; align-items: center; gap: var(--s-2); background: var(--accent-wash); color: var(--accent-ink); }
.onb .notice.ok svg { color: var(--accent); }

/* 1.8 sources */
.onb-srcs { display: flex; flex-direction: column; gap: var(--s-2); }
.onb-src { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-3) var(--s-4); border: 1px solid var(--line); border-radius: var(--r-m); }
.onb-src strong { display: block; font-size: var(--t-body); font-weight: var(--w-semi); overflow-wrap: anywhere; }
.onb-src > div > span { display: block; margin-top: 2px; font-size: var(--t-small); color: var(--muted); }
.onb-src > .tag, .onb-src > .text-act { flex: none; }

/* Form fields, shared by the manual account, target and name screens */
.field { display: flex; flex-direction: column; gap: var(--s-1); min-width: 0; margin: 0; padding: 0; border: 0; font-size: var(--t-small); font-weight: var(--w-semi); }
.field legend { padding: 0; margin-bottom: var(--s-1); font-size: var(--t-small); font-weight: var(--w-semi); }
.field input:not([type="radio"]):not([type="checkbox"]) {
  width: 100%;
  min-height: var(--tap);
  padding: var(--s-3) var(--s-3);
  border: 1px solid var(--control);
  border-radius: var(--r-m);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: var(--t-body);
  font-weight: var(--w-regular);
}
.field input:not([type="radio"]):not([type="checkbox"]):focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.field input[aria-invalid="true"] { border: 2px solid var(--danger); }
.field small, .choices > small { font-size: var(--t-meta); font-weight: var(--w-regular); color: var(--muted); line-height: 1.4; }
.field > .field-error { padding-left: 0; }
.onb .field-error { padding: 0; font-size: var(--t-meta); font-weight: var(--w-semi); color: var(--bad-ink); }

/* Radio cards */
.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); }
.choices.col { grid-template-columns: 1fr; }
.choice {
  display: flex;
  align-items: flex-start;
  gap: var(--s-2);
  min-height: var(--tap);
  padding: var(--s-3) var(--s-3);
  border: 1px solid var(--control);
  border-radius: var(--r-m);
  background: var(--surface);
  color: var(--ink);
  font-size: var(--t-small);
  font-weight: var(--w-medium);
  line-height: 1.4;
  cursor: pointer;
}
.choice { align-items: center; }
.choice input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--accent); }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-wash); color: var(--accent-ink); }
.choice:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.choice:has(input:checked) > span > small { color: var(--accent-ink); }
.choice:has(input:disabled) { cursor: default; }

/* 2.1 categories: chips toggled by a hidden checkbox; each group ends with
   its box and "Agregar" (cycle 462), which the script answers in place. */
.grp-chips { min-width: 0; margin: 0; padding: 0; border: 0; }
.grp-chips legend { padding: 0; margin-bottom: var(--s-2); font-size: var(--t-meta); font-weight: var(--w-bold); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.onb-chips { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin-top: 0; }
.onb-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  min-height: var(--tap);
  padding: var(--s-2) var(--s-3);
  border: 1px solid var(--control);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--ink);
  font-size: var(--t-small);
  font-weight: var(--w-medium);
  cursor: pointer;
}
.onb-chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.onb-chip svg { display: none; }
.onb-chip:has(input:checked) { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.onb-chip:has(input:checked) svg { display: block; stroke-width: 3; }
.onb-chip:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.onb-chip:has(input:disabled) { cursor: default; }
.onb-chip:has(input:disabled:checked) { background: var(--accent-wash); border-color: var(--accent); color: var(--accent-ink); }
.onb-chip:has(input:disabled:checked) svg { stroke-width: 2.4; }
.onb-chips:not(:empty) { margin-bottom: var(--s-2); }
.onb-add { display: flex; gap: var(--s-2); }
.onb-add input { flex: 1; min-width: 0; min-height: var(--tap); padding: var(--s-2) var(--s-3); border: 1px solid var(--control); border-radius: var(--r-m); background: var(--surface); color: var(--ink); font: inherit; font-size: var(--t-body); }
.onb-add input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.onb-add button.cg-new { flex: none; width: auto; min-height: var(--tap); margin-top: 0; padding: 0 var(--s-4); }

/* Categorizar por comercio (cycle 270 as 2.4; in /app since cycle 462) */
.cz-list { display: flex; flex-direction: column; }
.cz-row { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) 0; border-bottom: 1px solid var(--line-soft); white-space: normal; }
.cz-t { flex: 1; min-width: 0; }
.cz-t strong { display: block; font-size: var(--t-body); font-weight: var(--w-semi); overflow-wrap: anywhere; }
.cz-t > span { display: block; font-size: var(--t-meta); color: var(--muted); }
.cz-row .cz-ok { flex: none; width: 24px; height: 24px; margin: 0; accent-color: var(--accent); }
.cz-sel { flex: none; width: 150px; max-width: 45%; min-height: var(--tap); padding: var(--s-2) var(--s-2); border: 1px solid var(--control); border-radius: var(--r-m); background: var(--surface); color: var(--ink); font: inherit; font-size: var(--t-small); }
.cz-note { font-size: var(--t-small); color: var(--muted); line-height: 1.45; }
/* Cycle 494: a Viewer's Por categorizar row shows the suggestion as text. */
.cz-cat { flex: none; max-width: 45%; font-size: var(--t-small); color: var(--ink-2); overflow-wrap: anywhere; }
/* Cycle 475, v2 (494): "¿Quién es?", one line per place: its name and the x. */
.qe-list { display: flex; flex-direction: column; }
.qe-row { display: flex; align-items: center; gap: var(--s-2); min-height: var(--tap); padding: var(--s-2) 0; border-bottom: 1px solid var(--line-soft); }
.qe-t { flex: 1; min-width: 0; font-size: var(--t-body); font-weight: var(--w-semi); overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow-wrap: anywhere; }
/* Cycle 471: the Bandeja. Its actions stack under the rows, full width. */
.ib-sec + .ib-sec { margin-top: var(--s-6); }
.ib-acts { display: flex; flex-direction: column; gap: var(--s-2); margin-top: var(--s-3); }
.ib-acts > * { width: 100%; margin: 0; }
/* Cycle 478, v2 (494): "Esta semana" and "Para mejorar": name and hint, what is still to pay, the x. */
.ob-list { display: flex; flex-direction: column; }
.ob-row { display: flex; align-items: center; gap: var(--s-2); min-height: var(--tap); padding: var(--s-2) 0; border-bottom: 1px solid var(--line-soft); }
.ob-t { flex: 1; min-width: 0; }
.ob-t strong { display: block; font-size: var(--t-body); font-weight: var(--w-semi); overflow-wrap: anywhere; }
.ob-amt { flex: none; font-weight: var(--w-semi); font-variant-numeric: tabular-nums; }
/* Cycle 486: Objetivos. The name and its goal open Editar categoría; the
   chevron sits in the x's column so both line up. */
a.ob-go { align-self: stretch; display: flex; flex-direction: column; justify-content: center; color: var(--ink); text-decoration: none; }
a.ob-go:hover strong { color: var(--accent); }
.ob-chev { flex: none; width: var(--tap); text-align: center; font-size: var(--t-small); color: var(--muted); }

/* 2.8 done */
.done-badge { width: 56px; height: 56px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--accent-wash); color: var(--accent); }
.sum { display: flex; flex-direction: column; }
.onb-s { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); padding: var(--s-3) 0; border-bottom: 1px solid var(--line-soft); font-size: var(--t-body); }
.onb-s span { font-size: var(--t-small); color: var(--muted); text-align: right; }

/* 6.8 import status strip. Also sits at the top of the app pages. */
.strip { display: flex; align-items: center; gap: var(--s-2); min-height: var(--tap); margin-bottom: var(--s-3); padding: var(--s-2) var(--s-3); border-radius: var(--r-m); background: var(--surface-2); color: var(--ink-2); font-size: var(--t-small); line-height: 1.35; }
.solo > .strip { margin-bottom: 0; }
.strip-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--control); }
.strip.done, .strip.action { background: var(--accent-wash); color: var(--accent-ink); }
.strip.done .strip-dot, .strip.action .strip-dot { background: var(--accent); }
.strip.error { background: var(--warn-wash); color: var(--warn-ink); }
.strip.error .strip-dot { background: var(--warn); }
.strip-form { margin: 0 0 0 auto; display: flex; }
.strip-go { margin-left: auto; display: inline-flex; align-items: center; justify-content: center; min-height: var(--tap); padding: 0 var(--s-1); border: 0; background: none; font: inherit; font-size: var(--t-small); font-weight: var(--w-bold); color: inherit; text-decoration: underline; white-space: nowrap; cursor: pointer; }
.strip-form .strip-go { margin-left: 0; }
.strip-go:focus-visible { outline: 3px solid var(--accent); outline-offset: 0; border-radius: var(--r-s); }

/* ---------- 768 px and up: a fixed rail of icons ---------- */
@media (min-width: 768px) {
  .frame { display: grid; grid-template-columns: 72px minmax(0, 1fr); }
  .appbar { display: none; }
  .drawer, .drawer:target {
    display: block;
    position: sticky;
    /* inset first: it resets top, which sticky needs (cycle 420). */
    inset: auto;
    top: 0;
    z-index: auto;
    height: 100vh;
    border-right: 1px solid var(--line);
    background: var(--rail);
  }
  .scrim, .menu-close { display: none; }
  .menu { width: 100%; max-width: none; padding: var(--s-4) var(--s-2); align-items: center; gap: var(--s-1); background: transparent; }
  .budget { padding: 0 0 var(--s-2); margin: 0; border: 0; }
  .budget-name, .budget-switch .label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .budget-switch { padding: 0; }
  .budget-initial {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--r-m);
    background: var(--accent);
    color: var(--on-accent);
    font-weight: var(--w-heavy);
  }
  .item { width: 44px; height: 44px; padding: 0; justify-content: center; }
  .item.marked .nav-dot { position: absolute; top: var(--s-2); right: var(--s-2); margin: 0; }
  .item .label, .cap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; margin: 0; }
  .content { padding: var(--s-7) var(--s-7) var(--s-8); }
  .asign-top { top: 0; padding-top: var(--s-2); }
}

/* ---------- 1200 px and up: the full sidebar ---------- */
/* Unless the user collapsed it (« in the menu, cycle 283): then the rail stays. */
@media (min-width: 1200px) {
  html:not(.menu-min) .frame { grid-template-columns: 248px minmax(0, 1fr); }
  html:not(.menu-min) .menu { align-items: stretch; padding: var(--s-5) var(--s-3); gap: 2px; }
  html:not(.menu-min) .budget { padding: var(--s-1) var(--s-2) var(--s-3); margin-bottom: var(--s-1); border-bottom: 1px solid var(--line-soft); }
  html:not(.menu-min) .budget-name,
  html:not(.menu-min) .budget-switch .label,
  html:not(.menu-min) .item .label,
  html:not(.menu-min) .cap {
    position: static; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal;
  }
  html:not(.menu-min) .cap { margin: var(--s-3) var(--s-2) var(--s-1); }
  html:not(.menu-min) .budget-switch { padding: var(--s-1) 0; }
  html:not(.menu-min) .budget-initial { display: none; }
  html:not(.menu-min) .item { width: 100%; height: auto; padding: var(--s-2) var(--s-3); justify-content: flex-start; }
  html:not(.menu-min) .item.marked .nav-dot { position: static; margin-left: auto; }

  /* The toggle needs the script; without it the menu follows the width. */
  html.js .menu-toggle { display: inline-flex; border: 1px solid var(--line); }
  html:not(.menu-min) .menu-toggle { align-self: flex-end; margin-bottom: var(--s-1); }
  html.menu-min .menu-toggle .when-full,
  html:not(.menu-min) .menu-toggle .when-min { display: none; }

  /* Table pages (7.1–7.4) use the whole width. */
  .content.wide { max-width: none; }
}

/* ---------- Cycle 283: on a computer (design row 7) ----------
   Below 1200 px a detail page is the panel alone, and tables are the phone
   rows; from 1200 px the list sits left and the open item right. */
.asg, .c-asg, .split-list { display: none; }
.mc, .mhead { display: none; }
.a-avail, .a-cols { display: none; }

@media (min-width: 1200px) {
  .content.wide { padding: var(--s-6) var(--s-7) var(--s-8); }
  .split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 380px); gap: var(--s-6); align-items: start; }
  .split-list { display: block; min-width: 0; }
  .split-panel {
    position: sticky;
    top: 0;
    box-sizing: border-box;
    height: 100vh;
    overflow-y: auto;
    margin: calc(-1 * var(--s-6)) 0 calc(-1 * var(--s-8));
    padding: var(--s-6) 0 var(--s-7) var(--s-6);
    border-left: 1px solid var(--line);
  }
  .split-panel .cat-sub .months { display: none; }
  .split-panel .cat-sub { min-height: 0; margin-top: var(--s-1); }
  /* The panel scrolls and has no right padding: the × stays inside it. */
  .split-panel .sheet-x { margin-right: 0; }
  .split-detail { grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); gap: 0; }
  /* The narrow list scrolls on its own and stays on screen, so the item (where
     you work) keeps the page and its top is always in view (cycle 417-2). */
  .split-detail .split-list { position: sticky; top: 0; height: 100vh; overflow-y: auto; overscroll-behavior: contain; margin: calc(-1 * var(--s-6)) 0 calc(-1 * var(--s-8)) calc(-1 * var(--s-7)); padding: var(--s-6) var(--s-4) var(--s-8) var(--s-5); border-right: 1px solid var(--line); box-sizing: border-box; }
  .split-detail .split-panel { position: static; height: auto; overflow: visible; margin: 0; padding: 0 0 0 var(--s-7); border-left: 0; }
  .split-detail .acc { padding-left: var(--s-2); padding-right: var(--s-2); border-radius: var(--r-m); }
  .content.wide .acc.sel { background: var(--accent-wash); }
  /* Cycle 378: a settings screen beside the list it opened from (compact). */
  .split-settings .split-panel > * { max-width: 640px; }
  .side-list { display: flex; flex-direction: column; }
  .side-title { padding: var(--s-2); font-size: var(--t-body); font-weight: var(--w-bold); color: var(--ink); text-decoration: none; }
  .side-title:hover { color: var(--accent); }
  .side-cap { margin: var(--s-4) 0 var(--s-1); padding: 0 var(--s-2); }
  .side-cap-link { color: inherit; text-decoration: none; border-radius: var(--r-m); }
  .side-cap-link:hover, .side-cap-link.on { color: var(--accent-ink); }
  .side-rows { margin: 0; padding: 0; list-style: none; }
  .side-row { display: block; padding: var(--s-2); border-radius: var(--r-m); color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
  a.side-row:hover { background: var(--surface-2); }
  .side-row.on { background: var(--accent-wash); color: var(--accent-ink); font-weight: var(--w-semi); }
  .side-row.bad { color: var(--bad-ink); }
  .side-row.quiet { color: var(--muted); }
  .content.wide > .cuentas-solo { max-width: 760px; }
  .split-panel .n strong { font-size: var(--t-small); white-space: normal; overflow-wrap: anywhere; }

  /* 7.1: the budget as a table. The row's cells are grid columns. */
  .content.wide .group { margin-top: 0; }
  .content.wide .grp { margin: var(--s-4) 0 0; padding: var(--s-2) var(--s-3); border-radius: var(--r-m); background: var(--surface-2); }
  .content.wide .grp h2 { color: var(--ink-2); font-size: var(--t-caps); }
  /* One head for the whole table, kept in view while scrolling (cycle 350). */
  .content.wide .bhead {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 130px 130px 150px;
    column-gap: var(--s-2);
    position: sticky;
    top: 0;
    z-index: 1;
    padding: var(--s-2) var(--s-3);
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    font-size: var(--t-caps); font-weight: var(--w-bold); letter-spacing: .04em; text-transform: uppercase; color: var(--muted);
  }
  .content.wide .bhead span + span { text-align: right; }
  .content.wide .bgroup > .grp { display: grid; grid-template-columns: auto minmax(0, 1fr) 130px 130px 150px; column-gap: var(--s-2); margin: var(--s-2) 0 0; border-bottom: 0; }
  .content.wide .bgroup > .grp .asg, .content.wide .bgroup > .grp .spent { width: auto; font-weight: var(--w-semi); color: var(--ink-2); }
  .content.wide .bgroup > .grp .amt { width: auto; }
  /* The cards' own column names, on the open group's first line. */
  .content.wide .gcols { display: flex; justify-content: flex-end; gap: var(--s-2); padding: var(--s-2) var(--s-3) 0; color: var(--muted); font-size: var(--t-caps); font-weight: var(--w-bold); letter-spacing: .04em; text-transform: uppercase; }
  .content.wide .gcols span { width: 130px; text-align: right; }
  .content.wide .gcols span:last-child { width: 150px; }
  .content.wide .c-asg, .content.wide .asg { display: block; width: 130px; flex: none; text-align: right; }
  .content.wide .c-spent, .content.wide .spent { display: block; width: 130px; flex: none; }
  .content.wide .c-avail, .content.wide .amt { width: 150px; }
  .content.wide .asg { font-size: var(--t-small); font-variant-numeric: tabular-nums; white-space: nowrap; }
  .content.wide .spent { font-size: var(--t-small); color: var(--ink); }
  /* Name and bar share the first cell; a second line only for a warning. */
  .content.wide .cat {
    display: grid;
    /* The bar gives way first, so the row fits the list beside an open category. */
    grid-template-columns: minmax(0, 260px) minmax(0, 1fr) 130px 130px 150px;
    grid-template-areas: "name bar asg spent amt";
    column-gap: var(--s-2);
    row-gap: var(--s-1);
    align-items: center;
    padding: var(--s-2) var(--s-3);
  }
  .content.wide .cat .top { display: contents; }
  .content.wide .cat strong { grid-area: name; }
  .content.wide .cat .asg { grid-area: asg; }
  .content.wide .cat .spent { grid-area: spent; }
  .content.wide .cat .amt { grid-area: amt; }
  .content.wide .cat .bar { grid-area: bar; height: 5px; }
  .content.wide .cat .note { grid-column: 1 / 3; display: block; }
  .content.wide .cat.sel { background: var(--accent-wash); }
  .content.wide .page-head { margin-bottom: var(--s-3); }
}

/* Cycle 350: below 1600 px the list beside an open category is too narrow
   for the four columns and a bar, so its rows are the phone's: name and
   Disponible, the bar under them. */
@media (min-width: 1200px) and (max-width: 1599px) {
  .content.wide .split-list .cat { display: flex; flex-direction: column; align-items: stretch; gap: var(--s-2); }
  .content.wide .split-list .cat .top { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-2); }
  .content.wide .split-list .cat .amt { width: auto; }
  .content.wide .split-list .bgroup > .grp { display: flex; }
  .content.wide .split-list .bhead, .content.wide .split-list .gcols, .content.wide .split-list .asg,
  .content.wide .split-list .spent, .content.wide .split-list .cat .note { display: none; }
  .content.wide .split-list .cat.card.over .note { display: block; }
}

@media (min-width: 1200px) {

  /* 7.3: the movements list as a table (only Movimientos: an account's
     latest movements keep their rows); the day headings become Fecha. */
  .content.wide .mtable .day { display: none; }
  .content.wide .mtable .mhead, .content.wide .mtable .mrow {
    display: grid;
    grid-template-columns: 76px minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr) 140px;
    grid-template-areas: "date title cat acc amt";
    column-gap: var(--s-3);
    align-items: center;
    padding: var(--s-2) var(--s-3);
  }
  .content.wide .mtable .mhead { padding-top: var(--s-2); padding-bottom: var(--s-2); border-bottom: 1px solid var(--line); font-size: var(--t-caps); font-weight: var(--w-bold); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
  .content.wide .mtable .mhead span:last-child { text-align: right; }
  .content.wide .mtable .mc { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--t-small); color: var(--ink-2); }
  .content.wide .mtable .mc-date { grid-area: date; }
  .content.wide .mtable .mc-cat { grid-area: cat; }
  .content.wide .mtable .mc-acc { grid-area: acc; }
  .content.wide .mtable .mrow .t { grid-area: title; }
  .content.wide .mtable .mrow strong { font-size: var(--t-small); }
  .content.wide .mtable .mrow small { display: none; }
  .content.wide .mtable .mrow b { grid-area: amt; text-align: right; font-size: var(--t-small); }
  .content.wide .mtable .mrow:hover { background: var(--rail); }
  .content.wide .mtable .mrow.sel { background: var(--accent-wash); }
  /* Cycle 320: picking adds a column for the tick. */
  .content.wide .mtable.picking .mhead, .content.wide .mtable.picking .mrow {
    grid-template-columns: 24px 76px minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr) 140px;
    grid-template-areas: "pick date title cat acc amt";
  }
  .content.wide .mtable.picking .mhead span:first-child, .content.wide .mtable.picking .mrow input[type="checkbox"] { grid-area: pick; }
  .content.wide .mtable.picking .mrow.pick:has(input:checked) { background: var(--accent-wash); }

  /* 7.2: Asignar as a table; Tab goes input to input in the page's order. */
  .content.wide .asign, .content.wide .asign-top { max-width: 1040px; }
  .content.wide .asign .grp { display: grid; grid-template-columns: minmax(0, 1fr) 240px 170px 150px; column-gap: var(--s-3); }
  .content.wide .a-cols { display: contents; font-size: var(--t-caps); font-weight: var(--w-bold); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
  .content.wide .a-cols span:nth-child(n+2) { text-align: right; }
  .content.wide .arow { display: grid; grid-template-columns: minmax(0, 1fr) 170px 150px; column-gap: var(--s-3); padding: var(--s-2) var(--s-3); }
  .content.wide .arow .t { display: grid; grid-template-columns: minmax(0, 1fr) 240px; column-gap: var(--s-3); align-items: baseline; }
  .content.wide .arow strong { font-size: var(--t-small); }
  .content.wide .arow .hint { margin: 0; }
  .content.wide .amt-wrap, .content.wide .amt-in, .content.wide .amt-read { justify-self: end; }
  .content.wide .amt-in { width: 170px; box-sizing: border-box; }
  .content.wide .a-avail { display: block; text-align: right; font-size: var(--t-small); font-variant-numeric: tabular-nums; white-space: nowrap; }
  .content.wide .a-avail.neg { color: var(--danger); font-weight: var(--w-bold); }
  .content.wide .arow-error { padding-left: var(--s-3); }
  .content.wide .asign .btn-primary { width: auto; min-width: 220px; }
  .content.wide .hist-phone { display: none; }
  .content.wide .a-avail { display: flex; justify-content: flex-end; }
  /* The category open beside Asignar leaves the list ~480px: the hint goes under the name. */
  .content.wide .split-list .asign .grp { grid-template-columns: minmax(0, 1fr) 140px 130px; }
  .content.wide .split-list .a-cols span:nth-child(1) { display: none; }
  .content.wide .split-list .arow { grid-template-columns: minmax(0, 1fr) 140px 130px; }
  .content.wide .split-list .amt-in { width: 140px; }
  .content.wide .split-list .arow .t { display: block; padding-right: var(--s-2); }
  .content.wide .split-list .arow .hint { margin-top: 2px; white-space: normal; overflow-wrap: anywhere; }
}

/* Cycle 355: the fold-out and the add row, <details> without the browser's triangle. */
.fold > summary, .add-row > summary { display: flex; align-items: center; min-height: var(--tap); padding: var(--s-2) 0; font-weight: var(--w-semi); list-style: none; cursor: pointer; }
.fold > summary::-webkit-details-marker, .add-row > summary::-webkit-details-marker { display: none; }
.fold > summary { justify-content: space-between; gap: var(--s-2); font-size: var(--t-small); color: var(--ink-2); }
.fold > summary svg { flex: none; color: var(--muted); transform: rotate(90deg); }
.fold[open] > summary svg { transform: rotate(-90deg); }
.add-row > summary { font-size: var(--t-body); color: var(--accent); }

/* Cycle 353: the component catalog (/app/sistema, never in production). */
.ds-sec { margin-top: var(--s-7); }
.ds-sec > h2 { font-size: var(--t-title); }
.ds-job { margin-top: var(--s-1); font-size: var(--t-small); color: var(--muted); }
.ds-state { margin-top: var(--s-4); font-size: var(--t-caps); font-weight: var(--w-bold); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.ds-demo { margin-top: var(--s-2); }
.ds-demo .fab { position: static; }
.ds-demo .solo { min-height: 0; margin: 0; padding: 0; }
.ds-menu { max-width: 300px; }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .mlist .mrow.leaving, .content.wide .mtable .mrow.leaving { transition: none; }
  .split-panel.card-out > *, .split-panel.card-in > * { animation: none; }
}

/* ---------- Money operations (3.4, 4.2-4.4, 4.6, 4.7) ---------- */
.op-lead { margin-top: var(--s-1); font-size: var(--t-small); }
.op-cancel { align-self: center; }
.btn-danger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: var(--tap-l);
  padding: var(--s-3) var(--s-4);
  border: 0;
  border-radius: var(--r-m);
  background: var(--danger);
  color: var(--on-bad);
  font: inherit;
  font-size: var(--t-body);
  font-weight: var(--w-semi);
  cursor: pointer;
}
.btn-danger:hover { background: var(--bad-ink); }
.choices { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-2); min-width: 0; }
.choices legend { padding: 0; margin-bottom: var(--s-1); font-size: var(--t-small); font-weight: var(--w-semi); }
.choice {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  min-height: var(--tap);
  padding: var(--s-3) var(--s-3);
  border: 1px solid var(--control);
  border-radius: var(--r-m);
  font-size: var(--t-body);
  cursor: pointer;
}
.choice input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); flex: none; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-wash); }
.big-in { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: var(--s-1) 0; }
.big-in span { font-size: var(--t-meta); font-weight: var(--w-semi); color: var(--muted); }
.big-in input {
  width: 100%;
  min-height: 56px;
  border: 0;
  border-bottom: 2px solid var(--line);
  background: none;
  text-align: center;
  font: inherit;
  font-size: var(--t-amount);
  font-weight: var(--w-heavy);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.big-in input:focus { outline: none; border-bottom-color: var(--accent); }
.big-in input[aria-invalid="true"] { border-bottom-color: var(--danger); }
.big-in.in input { color: var(--good-ink); }
.op-note { padding: var(--s-2) 0 var(--s-1); font-size: var(--t-meta); color: var(--muted); line-height: 1.4; }
.seg { margin-top: var(--s-3); display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: var(--s-1); padding: var(--s-1); border-radius: var(--r-m); background: var(--surface-2); }
.seg-item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 0 var(--s-1);
  border-radius: var(--r-m);
  text-align: center;
  line-height: 1.2;
  font-size: var(--t-small);
  font-weight: var(--w-semi);
  color: var(--ink-2);
  text-decoration: none;
}
/* Four kinds don't fit one row on a phone: two by two. */
@media (max-width: 480px) { .seg:has(> :nth-child(4)) { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.seg-item:hover { color: var(--ink); }
.seg-item[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: var(--e-1); }
.head-add { display: inline-flex; width: auto; margin-top: var(--s-2); min-height: var(--tap); padding: var(--s-2) var(--s-4); font-size: var(--t-small); }
/* Cycle 345: on the phone the floating + creates instead. */
@media (max-width: 767px) { .head-add { display: none; } }
.fld > small { flex: none; white-space: nowrap; }
.sps { display: flex; flex-direction: column; }
.sp { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-2) 0; border-bottom: 1px solid var(--line-soft); }
.sp-cat {
  flex: 1;
  min-width: 0;
  min-height: var(--tap);
  padding: var(--s-2) var(--s-2);
  border: 1px solid var(--control);
  border-radius: var(--r-m);
  background: var(--surface);
  font: inherit;
  font-size: var(--t-body);
  font-weight: var(--w-semi);
  color: var(--ink);
}
.sp .amt-in { width: 128px; }
.sp.bad .amt-in, .sp.bad .sp-cat { border: 2px solid var(--danger); }
.sp-error { padding: var(--s-1) 0 0; }
.left { display: flex; justify-content: space-between; align-items: center; padding: var(--s-3) var(--s-3); border-radius: var(--r-m); background: var(--warn-wash); color: var(--warn-ink); font-size: var(--t-small); font-weight: var(--w-semi); font-variant-numeric: tabular-nums; }
.left.ok { background: var(--accent-wash); color: var(--accent-ink); }
.left.over { background: var(--bad-wash); color: var(--bad-ink); }
.left[hidden] { display: none; }
.pick { cursor: pointer; }
.pick input[type="checkbox"] { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--accent); }
.list-note { margin-top: var(--s-2); text-align: left; }
.pick:has(input:checked) { background: var(--accent-wash); }
.notice.ok { background: var(--accent-wash); color: var(--accent-ink); }
/* Cycle 320: the Movimientos list as a selection. */
.mrow.off { opacity: .45; }
.pick-count { flex: 1; align-self: center; font-size: var(--t-small); font-weight: var(--w-semi); color: var(--ink-2); }
.picking-form[data-busy="1"] .mlist, .picking-form[data-busy="1"] .pick-all { opacity: .5; pointer-events: none; }
.pick-all { display: flex; align-items: center; gap: var(--s-2); min-height: var(--tap); padding: 0 var(--s-1); font-weight: var(--w-semi); cursor: pointer; }
.pick-all[hidden] { display: none; }
.pick-all input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); }
.bulk-bar {
  position: sticky;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin: var(--s-4) calc(-1 * var(--s-5)) 0;
  padding: var(--s-3) var(--s-5) var(--s-4);
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.bulk-bar .btn-primary { width: auto; flex: none; min-height: var(--tap); font-size: var(--t-small); }
/* Cycle 441: why the ticked ones share less (two currencies, nothing in common), a line above the field. */
.bulk-hint { flex: 1 1 100%; margin: 0; text-align: left; }
.bulk-hint[hidden] { display: none; }
@media (max-width: 767px) {
  .bulk-bar { flex-direction: column; }
  .bulk-bar .btn-primary { width: 100%; }
  .sp { flex-wrap: wrap; }
  .sp-cat { flex: 1 1 100%; }
  .sp .amt-in { flex: 1; width: auto; }
}
/* 4.8 El banco cambió un movimiento que editaste (cycle 288) */
.vs-opt { align-items: flex-start; }
div.vs-opt { padding: var(--s-3) var(--s-3); border: 1px solid var(--line); border-radius: var(--r-m); }
.vs-opt > span { display: flex; flex-direction: column; gap: var(--s-1); flex: 1; min-width: 0; }
.vs-title { font-size: var(--t-body); }
.vs-opt .fine { text-align: left; }
.vs { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: var(--s-1) var(--s-3); font-size: var(--t-small); }
.vs dt { color: var(--muted); }
.vs dd { margin: 0; font-weight: var(--w-semi); text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.diff { background: var(--warn-wash); color: var(--warn-ink); border-radius: var(--r-s); padding: 0 var(--s-1); }
.conflict-notice { display: block; margin-bottom: var(--s-3); background: var(--warn-wash); color: var(--warn-ink); text-decoration: none; font-weight: var(--w-semi); }
/* Cycle 432: Destino's review, before a transfer joins the other account's copy or creates one (canvas board 5). */
.rv-form { margin-top: var(--s-4); }
.rv-card { display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-3) var(--s-4); border-radius: var(--r-m); background: var(--surface-2); }
.rv-card.warn { background: var(--warn-wash); }
.rv-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); margin: 0; font-size: var(--t-small); font-weight: var(--w-semi); font-variant-numeric: tabular-nums; }
.rv-top .tag { margin-right: 0; }
/* Tags on the card's own wash: the quiet one, and Revisar (warn on warn), on the surface. */
.rv-card .tag.tr, .rv-card.warn .rv-none .tag { background: var(--surface); }
.rv-what { margin: 0; font-size: var(--t-small); color: var(--ink-2); }
/* Cambiar is a text action (.text-act); only the marker goes. */
.rv-change > summary { list-style: none; cursor: pointer; }
.rv-change > summary::-webkit-details-marker { display: none; }
.rv-left { display: none; margin: 0; font-size: var(--t-meta); font-weight: var(--w-semi); color: var(--warn-ink); }
/* A choice to make: the hint shows and the primary looks off only while it
   also says so (aria-disabled, kept in step by the page script); the
   browser's own required check keeps the form from sending. */
.rv-form:invalid .rv-left { display: block; }
.rv-form:invalid .btn-primary[aria-disabled="true"], .rv-form:invalid .btn-primary[aria-disabled="true"]:hover { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
/* The tag and sentence say what the checked option does: none yet, a
   candidate, or Ninguno (NO_JOIN). Hidden first, shown by :has, so without
   it the card reads as drawn: Se une on one candidate, Revisar on several. */
.rv-new, .rv-card.warn .rv-join { display: none; }
.rv-card:has(input:checked) .rv-none,
.rv-card:has(input[value="no"]:checked) .rv-join { display: none; }
.rv-card:has(input[value="no"]:checked) .rv-new,
.rv-card.warn:has(input:not([value="no"]):checked) .rv-join { display: revert; }

/* ---------- Una cuenta (5.2) and Agregar una tarjeta (5.8) ---------- */
.ac-name { margin-top: 2px; font-size: var(--t-page); overflow-wrap: anywhere; }
.ac-bal { margin-top: var(--s-1); font-size: clamp(var(--t-page), 10vw, var(--t-amount)); font-weight: var(--w-heavy); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ac-bal.neg { color: var(--bad-ink); }
.ac-kind { font-size: var(--t-meta); color: var(--muted); }
.ac-stat { display: flex; align-items: flex-start; gap: var(--s-2); margin-top: var(--s-3); padding: var(--s-3) var(--s-3); border-radius: var(--r-m); background: var(--surface-2); color: var(--ink-2); font-size: var(--t-small); line-height: 1.35; }
.ac-stat.warn { background: var(--warn-wash); color: var(--warn-ink); }
.ac-docs { list-style: none; margin: var(--s-1) 0 0; padding: 0; }
.ac-docs li { padding: var(--s-2) 0; border-bottom: 1px solid var(--line-soft); font-size: var(--t-small); overflow-wrap: anywhere; }
.ac-docs li:last-child { border-bottom: 0; }
.rec { display: flex; flex-direction: column; gap: var(--s-2); margin-top: var(--s-3); padding: var(--s-3); border: 1px solid var(--control); border-radius: var(--r-l); }
.rec > strong { font-size: var(--t-body); }
.rec > span, .rec > p { margin: 0; font-size: var(--t-small); color: var(--muted); line-height: 1.4; }
.diff { display: flex; flex-direction: column; margin-top: var(--s-1); }
.diff > div { display: flex; justify-content: space-between; gap: var(--s-3); padding: var(--s-3) 0; border-bottom: 1px solid var(--line-soft); font-variant-numeric: tabular-nums; }
.diff > div[hidden] { display: none; }
/* Cycle 456: one primary per screen. With "Actualizar saldo" open, its Guardar is the one; "Cargar un movimiento" steps back to the secondary look. */
.cd-btns:has(~ details.fold[open] #balance-fold) .btn-primary { border: 1px solid var(--control); background: var(--surface); color: var(--ink); }
.cd-btns:has(~ details.fold[open] #balance-fold) .btn-primary:hover { background: var(--surface-2); color: var(--ink); }
.diff > div > span { color: var(--muted); font-size: var(--t-small); }
.diff > div > b { font-size: var(--t-body); white-space: nowrap; }
.diff > div.total > b { font-size: var(--t-title); }
.ac-form { display: flex; flex-direction: column; gap: var(--s-4); margin-top: var(--s-2); }
/* Cycle 510: a hidden form (Bandeja's Aceptar leaving at once) is not drawn; the flex above beat [hidden]. */
.ac-form[hidden] { display: none; }
.ac-form .field-error { padding: 0; font-size: var(--t-meta); font-weight: var(--w-semi); color: var(--bad-ink); }
/* Cycle 432: Agregar una tarjeta's Línea de crédito, boxed like the inputs around it: its picker button, or its select without the script. */
.ln-field .cat-pick, .ln-field select:not(.vh) { width: 100%; min-height: var(--tap); padding: var(--s-3); border: 1px solid var(--control); border-radius: var(--r-m); background: var(--surface); color: var(--ink); font: inherit; font-size: var(--t-body); font-weight: var(--w-regular); }
.ln-field select[aria-invalid="true"]:not(.vh), .ln-field select[aria-invalid="true"] + .cat-pick { border: 2px solid var(--danger); }

/* ---------- Una tarjeta (5.5), un plan en cuotas (5.6), pagar (5.7) ---------- */
.cd-note { margin-top: var(--s-3); font-size: var(--t-small); color: var(--ink-2); line-height: 1.45; }
.cd-btns { display: flex; gap: var(--s-2); margin-top: var(--s-3); }
.cd-btns .btn, .cd-btns .btn-primary { flex: 1; min-height: var(--tap); font-size: var(--t-small); padding: var(--s-3); }
.plan { display: block; padding: var(--s-3) 0; border-bottom: 1px solid var(--line-soft); color: var(--ink); text-decoration: none; }
.plan:hover { background: var(--surface-2); color: var(--ink); }
.plan .top { display: flex; justify-content: space-between; gap: var(--s-2); }
.plan .top strong { font-size: var(--t-body); font-weight: var(--w-semi); overflow-wrap: anywhere; }
.plan small { font-size: var(--t-meta); color: var(--muted); }
.pbar { height: 6px; margin: var(--s-2) 0 var(--s-1); border-radius: var(--r-s); background: var(--line); overflow: hidden; }
.pbar i { display: block; height: 100%; background: var(--accent); }
.q { display: flex; align-items: baseline; gap: var(--s-2); padding: var(--s-3) var(--s-2); border-bottom: 1px solid var(--line-soft); font-variant-numeric: tabular-nums; }
.q .m { flex: none; width: 110px; font-weight: var(--w-semi); }
.q .s { flex: 1; font-size: var(--t-meta); color: var(--muted); }
.q b { font-size: var(--t-body); white-space: nowrap; }
.q.done .m, .q.done b { color: var(--muted); }
.q.now { background: var(--accent-wash); border-radius: var(--r-m); }
.q.now .s { color: var(--accent-ink); font-weight: var(--w-semi); }
.q.off .m, .q.off b { text-decoration: line-through; color: var(--muted); }
.fee-row { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: var(--s-2); }
.fee-row select, .fee-row input { min-height: var(--tap); padding: var(--s-2) var(--s-2); border: 1px solid var(--control); border-radius: var(--r-m); background: var(--surface); font: inherit; font-size: var(--t-body); color: var(--ink); min-width: 0; }
.fee-row input { text-align: right; }
.fee-row .cat-pick { padding: var(--s-2); border: 1px solid var(--control); border-radius: var(--r-m); background: var(--surface); font-weight: var(--w-regular); min-width: 0; }
.pay-h { font-size: var(--t-small); font-weight: var(--w-semi); }
.ac-stat.bad { background: var(--bad-wash); color: var(--bad-ink); }
.ac-stat a { margin-left: auto; font-weight: var(--w-semi); white-space: nowrap; color: inherit; }
.ac-gap > div { flex: 1; min-width: 0; }
.ac-gap-acts { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-4); margin-top: var(--s-2); }
.ac-gap-acts a { margin-left: 0; min-height: var(--tap); display: inline-flex; align-items: center; text-decoration: underline; text-underline-offset: 2px; }
.d.bad { background: var(--bad-ink); }
.cmp { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-2) var(--s-3); margin: var(--s-4) 0 0; padding: var(--s-3); border: 1px solid var(--control); border-radius: var(--r-l); font-size: var(--t-small); }
.cmp dt, .cmp dd { margin: 0; }
.cmp dd { text-align: right; font-weight: var(--w-bold); font-variant-numeric: tabular-nums; }
.cmp .diff { color: var(--bad-ink); font-weight: var(--w-bold); }
.causes { margin: var(--s-1) 0 var(--s-4); padding-left: var(--s-5); font-size: var(--t-small); line-height: 1.45; }
.causes li { padding: var(--s-1) 0; }

/* ---------- Ajustes, Configuración, presupuestos (6.2–6.5) ---------- */
.st-title { margin-top: var(--s-1); font-size: var(--t-page); overflow-wrap: anywhere; }
.st-lead { margin: var(--s-1) 0 0; font-size: var(--t-small); color: var(--muted); line-height: 1.45; }
/* Cycle 405: a stacked field over several lines, and a yes/no with its line. */
.field textarea { width: 100%; min-height: 200px; padding: var(--s-3); border: 1px solid var(--control); border-radius: var(--r-m); background: var(--surface); color: var(--ink); font: inherit; font-size: var(--t-body); font-weight: var(--w-regular); line-height: 1.45; resize: vertical; }
.field textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.field textarea[aria-invalid="true"] { border: 2px solid var(--danger); }
.check-row { display: flex; align-items: flex-start; gap: var(--s-3); min-height: var(--tap); font-size: var(--t-body); cursor: pointer; }
.check-row input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--accent); }
.check-row > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.check-row small { font-size: var(--t-meta); color: var(--muted); line-height: 1.4; overflow-wrap: anywhere; }
.fb-fallback { margin: var(--s-5) 0 0; font-size: var(--t-meta); color: var(--muted); line-height: 1.5; overflow-wrap: anywhere; }
.st-row { display: flex; align-items: center; gap: var(--s-2); width: 100%; min-height: var(--tap); padding: var(--s-3) 0; border: 0; border-bottom: 1px solid var(--line-soft); background: none; font: inherit; font-size: var(--t-body); color: var(--ink); text-align: left; text-decoration: none; cursor: pointer; }
div.st-row { cursor: default; }
.st-row > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.st-row > small { font-size: var(--t-small); color: var(--muted); text-align: right; }
a.st-row:hover, button.st-row:hover { background: var(--surface-2); color: var(--ink); }
.st-row.bad, .st-row.bad:hover { color: var(--bad-ink); font-weight: var(--w-semi); }
.st-block { display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-3) 0; border-bottom: 1px solid var(--line-soft); font-size: var(--t-body); line-height: 1.4; }
.st-block small { font-size: var(--t-small); color: var(--muted); line-height: 1.4; }
.st-block form { display: flex; }
.st-block .btn { flex: 1; min-height: var(--tap); font-size: var(--t-small); padding: var(--s-3); border-color: var(--accent); color: var(--accent); }
.st-split { display: flex; justify-content: space-between; gap: var(--s-2); }
.st-link { display: inline-flex; align-items: center; min-height: var(--tap); margin-top: var(--s-2); font-size: var(--t-small); }
.notice.warn { background: var(--warn-wash); color: var(--warn-ink); }
.notice.ok { background: var(--accent-wash); color: var(--accent-ink); }
.btn-danger { display: block; width: 100%; min-height: var(--tap-l); padding: var(--s-3); border: 0; border-radius: var(--r-m); background: var(--bad-ink); color: var(--on-bad); font: inherit; font-size: var(--t-body); font-weight: var(--w-semi); cursor: pointer; }
.btn-danger:hover { filter: brightness(0.92); }
/* ---------- Personas en este presupuesto (cycle 307) ---------- */
.pp-link { width: 100%; min-height: var(--tap); padding: var(--s-2) var(--s-3); border: 1px solid var(--control); border-radius: var(--r-m); background: var(--surface); color: var(--ink); font: inherit; font-size: var(--t-small); }
.pp-link:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.pp-actions { display: flex; gap: var(--s-2); }
.pp-actions form { flex: 1; }
.st-block a.btn { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.bd-list { margin-top: var(--s-2); }
.bd-pick { margin: 0; }
.bd-row { display: flex; align-items: center; gap: var(--s-3); width: 100%; min-height: var(--tap); padding: var(--s-3) 0; border: 0; border-bottom: 1px solid var(--line-soft); background: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
div.bd-row { cursor: default; }
button.bd-row:hover { background: var(--surface-2); }
.bd-row .t { flex: 1; min-width: 0; }
.bd-row strong { display: block; font-size: var(--t-body); font-weight: var(--w-semi); overflow-wrap: anywhere; }
.bd-row small { display: block; margin-top: 2px; font-size: var(--t-meta); color: var(--muted); }
.bd-on { display: flex; color: var(--accent); }
/* ---------- Categorías y grupos, Archivados, Comercios ---------- */
.field select { width: 100%; min-height: var(--tap); padding: var(--s-2) var(--s-3); border: 1px solid var(--control); border-radius: var(--r-m); background: var(--surface); color: var(--ink); font: inherit; font-size: var(--t-body); font-weight: var(--w-regular); }
.field select:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.cg-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); margin: var(--s-5) 0 var(--s-1); }
.cg-head h2 { min-width: 0; overflow-wrap: anywhere; font-size: var(--t-meta); font-weight: var(--w-bold); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.cg-row { display: flex; align-items: center; gap: var(--s-1); border-bottom: 1px solid var(--line-soft); }
.cg-name { flex: 1; min-width: 0; display: flex; align-items: center; min-height: var(--tap); padding: var(--s-2) 0; font-size: var(--t-body); color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
a.cg-name:hover { color: var(--accent); }
.cg-name small { margin-left: var(--s-2); font-size: var(--t-meta); color: var(--muted); }
.cg-mv { display: flex; gap: 2px; flex: none; }
.cg-mv form { margin: 0; }
.cg-arrow { display: inline-flex; align-items: center; justify-content: center; width: 44px; min-height: var(--tap); border: 0; border-radius: var(--r-m); background: none; font: inherit; font-size: var(--t-small); color: var(--accent); cursor: pointer; }
.cg-arrow:hover { background: var(--surface-2); }
.cg-gap { display: inline-block; width: 44px; }
.cg-new { display: flex; align-items: center; justify-content: center; min-height: var(--tap-l); margin-top: var(--s-5); border: 1px dashed var(--control); border-radius: var(--r-m); font-size: var(--t-body); font-weight: var(--w-semi); text-decoration: none; }
button.cg-new { width: 100%; background: none; font: inherit; font-size: var(--t-body); font-weight: var(--w-semi); color: var(--accent); cursor: pointer; }
button.cg-new:hover { color: var(--accent-hover); }
.cg-bottom { display: flex; flex-direction: column; gap: var(--s-1); margin-top: var(--s-3); }
.ar-row { display: flex; align-items: center; gap: var(--s-2); min-height: var(--tap); padding: var(--s-2) 0; border-bottom: 1px solid var(--line-soft); }
.ar-row .t { flex: 1; min-width: 0; }
.ar-row strong { display: block; font-size: var(--t-body); font-weight: var(--w-semi); overflow-wrap: anywhere; }
.ar-row small { display: block; margin-top: 2px; font-size: var(--t-meta); color: var(--muted); }
.ar-row small.warn { color: var(--warn-ink); font-weight: var(--w-semi); }
.ar-row form { margin: 0; }
.ar-row .btn { width: auto; min-height: var(--tap); padding: var(--s-2) var(--s-3); font-size: var(--t-small); border-color: var(--accent); color: var(--accent); }
/* ---------- Unir (cycle 430) ---------- */
.un-pick .cat-pick { min-height: var(--tap); padding: var(--s-2) var(--s-3); border: 1px solid var(--control); border-radius: var(--r-m); background: var(--surface); font-weight: var(--w-regular); }
.un-lbl { margin: var(--s-4) 0 var(--s-2); font-size: var(--t-small); color: var(--ink-2); }
.un-chip { display: flex; }
.st-join { margin-top: var(--s-4); }
.un-cards { margin-top: var(--s-5); }
.un-card { padding: var(--s-3) var(--s-4); border: 2px solid var(--line); border-radius: var(--r-m); background: var(--surface-2); }
.un-card.keep { border-color: var(--accent); background: var(--accent-wash); }
.un-k { margin: 0; font-size: var(--t-caps); font-weight: var(--w-bold); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.un-card.keep .un-k { color: var(--accent-ink); }
.un-n { margin: var(--s-1) 0 0; font-size: var(--t-title); font-weight: var(--w-bold); overflow-wrap: anywhere; }
.un-card.drop .un-n { color: var(--ink-2); }
.un-m { margin: 0; font-size: var(--t-small); }
.un-m a { display: inline-flex; align-items: center; min-height: var(--tap); margin-block: calc(-1 * var(--s-3)); font-weight: var(--w-semi); color: var(--accent); text-decoration: none; }
.un-swap { display: flex; align-items: center; justify-content: center; min-height: var(--tap); margin-block: var(--s-1); font-size: var(--t-small); font-weight: var(--w-semi); color: var(--accent); text-decoration: none; }
.un-sent { margin: var(--s-4) 0 0; }
.un-sent b { font-weight: var(--w-bold); }
.un-sent em { font-style: normal; font-weight: var(--w-semi); color: var(--danger); }
.un-h { margin: var(--s-7) 0 var(--s-2); font-size: var(--t-title); font-weight: var(--w-bold); }
[data-live-rows] .st-row[hidden], [data-live-count][hidden], [data-live-empty][hidden], [data-live-go][hidden] { display: none; }
.q-form { display: flex; gap: var(--s-2); margin-top: var(--s-3); }
.q-form input { flex: 1; min-width: 0; min-height: var(--tap); padding: var(--s-2) var(--s-3); border: 1px solid var(--control); border-radius: var(--r-m); background: var(--surface); color: var(--ink); font: inherit; font-size: var(--t-body); }
.q-form .btn { width: auto; min-height: var(--tap); padding: var(--s-2) var(--s-3); font-size: var(--t-small); }
/* ---------- "+ Nueva categoría" inside a movement form (2.5) ---------- */
.nc { display: flex; flex-direction: column; margin: var(--s-2) 0; padding: var(--s-1) var(--s-3) var(--s-3); border: 1px solid var(--accent); border-radius: var(--r-l); background: var(--accent-wash); }
.nc-title { font-size: var(--t-small); font-weight: var(--w-bold); color: var(--accent-ink); }
.nc .fld input, .nc .fld select { flex: 1; min-width: 0; }
.nc .field-error { padding: var(--s-1) 0 0; }
.nc-actions { display: flex; gap: var(--s-2); margin-top: var(--s-3); }
.nc-actions .btn-primary { flex: 1; min-height: var(--tap); font-size: var(--t-small); padding: var(--s-3); }
/* ---------- Cycle 279: the script's states ---------- */
button.is-busy { opacity: .7; cursor: progress; }
/* ---------- Cycle 279: Categorías with drag and drop ---------- */
.if-js { display: none; }
.js .if-js { display: inline; }
.js .no-js { display: none; }
.cg-handle { display: none; flex: none; align-items: center; justify-content: center; width: 36px; min-height: var(--tap); color: var(--muted); cursor: grab; touch-action: none; -webkit-user-select: none; user-select: none; }
.js .cg-handle { display: inline-flex; }
/* Arrows stay for keyboards: hidden until focused when the script runs. */
.js .cg-mv { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.js .cg-mv:focus-within { position: static; width: auto; height: auto; clip: auto; overflow: visible; }
.cg-head h2 { flex: 1; }
.cg-add { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: var(--r-m); font-size: var(--t-title); font-weight: var(--w-semi); color: var(--accent); text-decoration: none; }
.cg-add:hover { background: var(--surface-2); }
.cg-more { position: relative; }
.cg-more > summary { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: var(--r-m); font-size: var(--t-title); color: var(--ink-2); cursor: pointer; list-style: none; }
.cg-more > summary::-webkit-details-marker { display: none; }
.cg-more > summary:hover, .cg-more[open] > summary { background: var(--surface-2); }
.cg-menu { position: absolute; right: 0; top: var(--s-8); z-index: 6; display: flex; flex-direction: column; min-width: 160px; padding: var(--s-1); border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); box-shadow: var(--e-2); }
.cg-menu a { display: flex; align-items: center; min-height: var(--tap); padding: 0 var(--s-3); border-radius: var(--r-m); color: var(--ink); text-decoration: none; font-size: var(--t-small); }
.cg-menu a:hover { background: var(--surface-2); }
.cg-list { min-height: 8px; padding-left: var(--s-5); }
.cg-dragging { z-index: 30; pointer-events: none; background: var(--surface); border: 1px solid var(--accent); border-radius: var(--r-m); box-shadow: var(--e-2); }
.cg-placeholder { margin: 2px 0; border: 2px dashed var(--accent); border-radius: var(--r-m); background: var(--accent-wash); }
.cg-system .cg-head h2 { color: var(--muted); }
.cg-system .cg-name { color: var(--muted); }
/* The shared new-category fields: the new group's name only while "+ Nuevo grupo…" is chosen. */
.nc-fields { display: flex; flex-direction: column; gap: var(--s-3); }
.nc-newgroup { display: none; }
.nc-fields:has(select[name="nc_group"] option[value="__nuevo__"]:checked) .nc-newgroup { display: flex; }
.nc .nc-fields { margin-top: var(--s-1); }
/* The popup: a sheet from the bottom on a phone. */
.nc-dialog { width: min(480px, 100vw); max-width: 100vw; margin: auto auto 0; padding: var(--s-4) var(--s-5) var(--s-6); border: 0; border-radius: var(--r-l) var(--r-l) 0 0; background: var(--surface); color: var(--ink); }
.nc-dialog::backdrop { background: var(--scrim); }
.nc-dialog h2 { margin: 0; font-size: var(--t-title); }
.nc-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); margin-bottom: var(--s-1); }
@media (min-width: 768px) { .nc-dialog { margin: auto; border-radius: var(--r-l); } }
/* Cycle 432-2: "Nueva tarjeta", taller than a phone: the popup scrolls inside, its head (title and ×) stays on top. */
.nt-dialog { max-height: calc(100dvh - var(--s-6)); overflow-y: auto; overscroll-behavior: contain; padding-top: 0; }
/* The head spans the popup's full width, so a focused field's ring scrolled under it does not show at its sides. */
.nt-dialog .nc-head { position: sticky; top: 0; z-index: 1; margin-inline: calc(-1 * var(--s-5)); padding: var(--s-4) var(--s-5) 0; background: var(--surface); }
.nt-fields { display: contents; }
/* 2.7 Objetivo: the amount unless "Sin objetivo", the date only for savings. */
.tg { display: flex; flex-direction: column; gap: var(--s-2); }
.tg .kind { display: flex; align-items: center; gap: var(--s-2); min-height: var(--tap); padding: var(--s-2) var(--s-3); border: 1px solid var(--control); border-radius: var(--r-m); font-weight: var(--w-medium); }
.tg .kind:has(input:checked) { border-color: var(--accent); background: var(--accent-wash); color: var(--accent-ink); }
.tg .kind input { accent-color: var(--accent); }
/* Cycle 355: the amount sits under the options, tied to them by a line, and names its kind. */
.tg-detail { display: flex; flex-direction: column; gap: var(--s-2); margin-left: var(--s-4); padding-left: var(--s-3); border-left: 2px solid var(--accent); }
.tg:has(input[value="NONE"]:checked) .tg-detail { display: none; }
.tg-amount, .tg-due, .tg-day, .tg-m, .tg-s { display: none; }
.tg-day input { max-width: calc(var(--s-1) * 24); }
.tg:has(input[value="MONTHLY_SPENDING"]:checked) .tg-amount,
.tg:has(input[value="MONTHLY_SPENDING"]:checked) .tg-day,
.tg:has(input[value="SAVINGS_BALANCE_BY_DATE"]:checked) .tg-day,
.tg:has(input[value="SAVINGS_BALANCE_BY_DATE"]:checked) .tg-amount,
.tg:has(input[value="SAVINGS_BALANCE_BY_DATE"]:checked) .tg-due { display: flex; }
.tg:has(input[value="MONTHLY_SPENDING"]:checked) .tg-m,
.tg:has(input[value="SAVINGS_BALANCE_BY_DATE"]:checked) .tg-s { display: inline; }
/* Cycle 414: one Objetivo per currency the category is kept in (Avanzado → Moneda),
   named by its currency only beside another; leaving one says its target goes. */
.ac-form:has(input[name="moneda"][value="ARS"]:checked) .tg[data-currency="USD"],
.ac-form:has(input[name="moneda"][value="USD"]:checked) .tg[data-currency="ARS"] { display: none; }
.tg .tg-two { display: none; }
.ac-form:has(input[name="moneda"][value*=","]:checked) .tg .tg-one { display: none; }
.ac-form:has(input[name="moneda"][value*=","]:checked) .tg .tg-two { display: inline; }
.notice.tg-loss { display: none; }
.ac-form:has(input[name="moneda"][value="ARS"]:checked) .notice.tg-loss[data-currency="USD"],
.ac-form:has(input[name="moneda"][value="USD"]:checked) .notice.tg-loss[data-currency="ARS"] { display: block; }

/* ---------- Subir y revisar un resumen ---------- */
.st-file input[type="file"] { width: 100%; min-height: var(--tap); padding: var(--s-3); border: 1.5px dashed var(--control); border-radius: var(--r-m); background: var(--surface); font: inherit; font-size: var(--t-small); font-weight: var(--w-medium); color: var(--ink); box-sizing: border-box; }
.st-file input[type="file"]:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.choice > span:has(> small), .st-opt > span { display: flex; flex-direction: column; font-weight: var(--w-medium); overflow-wrap: anywhere; }
.choice > span > small, .st-opt small { font-size: var(--t-meta); font-weight: var(--w-regular); color: var(--muted); margin-top: 2px; }
.choice.off { color: var(--muted); background: var(--rail); border-color: var(--line); }
.st-note { margin: var(--s-1) 0 0; font-size: var(--t-meta); color: var(--muted); line-height: 1.45; text-align: left; }
.st-file-name { overflow-wrap: anywhere; }
/* Cycle 534: only the destinations the statement's kind and currencies need; a new one shows its name. */
.st-up .st-of-cuenta, .st-up .st-of-tarjeta, .st-up .st-pick, .st-up .st-new, .st-up .st-both { display: none; }
.st-up:has(input[name="es"][value="cuenta"]:checked) .st-of-cuenta,
.st-up:has(input[name="es"][value="tarjeta"]:checked) .st-of-tarjeta { display: flex; flex-direction: column; gap: var(--s-4); }
.st-up:has(input[name="moneda"][value="ARS"]:checked) .st-ars,
.st-up:has(input[name="moneda"][value="USD"]:checked) .st-usd,
.st-up:has(input[name="moneda"][value="BOTH"]:checked) .st-pick { display: flex; flex-direction: column; gap: var(--s-4); }
.st-up:has(input[name="moneda"][value="BOTH"]:checked) .st-both { display: inline; }
.st-up:has(input[name="moneda"][value="BOTH"]:checked) p.st-both { display: block; }
.st-up:has(input[name="moneda"][value="BOTH"]:checked) .st-one { display: none; }
.st-pick:has(option[value="nueva"]:checked) .st-new { display: flex; flex-direction: column; gap: var(--s-4); }
.st-upload { margin-top: var(--s-3); }
.st-form { display: flex; flex-direction: column; gap: var(--s-1); }
.st-sec { margin-top: var(--s-4); }
.st-sec > h2 { margin: 0 0 var(--s-1); font-size: var(--t-body); }
.st-fix { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-2); }
.st-row { display: flex; align-items: center; gap: var(--s-3); min-height: var(--tap); padding: var(--s-3) 0; border-bottom: 1px solid var(--line-soft); }
.st-row .t { flex: 1; min-width: 0; }
.st-row strong { display: block; font-size: var(--t-body); font-weight: var(--w-semi); overflow-wrap: anywhere; }
.st-row small { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1); margin-top: 2px; font-size: var(--t-meta); color: var(--muted); }
.st-row.quiet strong { font-weight: var(--w-medium); color: var(--ink-2); }
/* A row that needs an answer, in place in the list (cycle 284-2). */
.st-row.attn { flex-direction: column; align-items: stretch; gap: var(--s-2); margin: var(--s-1) 0; padding: var(--s-3); border: 0; border-left: 4px solid var(--warn-ink); border-radius: var(--r-m); background: var(--warn-wash); scroll-margin-top: 72px; }
.st-row.attn:target { outline: 2px solid var(--warn-ink); outline-offset: 2px; }
.st-top { display: flex; align-items: center; gap: var(--s-3); min-width: 0; }
.st-ask { display: flex; flex-direction: column; gap: var(--s-2); min-width: 0; }
.st-q { margin: 0; font-size: var(--t-small); font-weight: var(--w-bold); color: var(--warn-ink); }
.st-ask .choice, .st-ask input:not([type="checkbox"]):not([type="radio"]), .st-ask select { background: var(--surface); }
.st-ask .st-cat { width: 100%; min-height: var(--tap); font-size: var(--t-small); }
.st-next { align-self: flex-start; min-height: var(--tap); display: inline-flex; align-items: center; font-size: var(--t-small); font-weight: var(--w-semi); color: var(--warn-ink); }
.st-attn-sum { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-1) var(--s-2); margin: var(--s-3) 0 0; padding: var(--s-2) var(--s-3); border-radius: var(--r-m); background: var(--warn-wash); color: var(--warn-ink); font-size: var(--t-small); }
.st-attn-sum a { font-weight: var(--w-bold); color: inherit; }
.st-ok { flex: none; width: 24px; height: 24px; margin: 0; accent-color: var(--accent); }
.st-cat { max-width: 100%; min-height: var(--tap); padding: var(--s-1) var(--s-2); border: 1px solid var(--control); border-radius: var(--r-m); background: var(--surface); font: inherit; font-size: var(--t-small); color: var(--ink); }
.st-cat:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.st-amt { flex: none; font-size: var(--t-body); font-weight: var(--w-bold); font-variant-numeric: tabular-nums; white-space: nowrap; }
.st-amt.in { color: var(--accent-ink); }
.st-go { margin-top: var(--s-5); width: 100%; }
.st-opening { margin-top: var(--s-3); padding: var(--s-3) var(--s-3); border: 1px solid var(--control); border-radius: var(--r-m); }
.st-opening input { text-align: right; font-variant-numeric: tabular-nums; }
.st-opening .field-error { font-size: var(--t-meta); font-weight: var(--w-semi); color: var(--bad-ink); }
.cd-btns > form { flex: 1; display: flex; }
.cd-btns > form > button { flex: 1; min-height: var(--tap); }
.st-discard { margin-top: var(--s-2); text-align: center; }

/* ---------- Informes ---------- */
.rp-h0 { height: 0%; }
.rp-h2 { height: 2%; }
.rp-h4 { height: 4%; }
.rp-h6 { height: 6%; }
.rp-h8 { height: 8%; }
.rp-h10 { height: 10%; }
.rp-h12 { height: 12%; }
.rp-h14 { height: 14%; }
.rp-h16 { height: 16%; }
.rp-h18 { height: 18%; }
.rp-h20 { height: 20%; }
.rp-h22 { height: 22%; }
.rp-h24 { height: 24%; }
.rp-h26 { height: 26%; }
.rp-h28 { height: 28%; }
.rp-h30 { height: 30%; }
.rp-h32 { height: 32%; }
.rp-h34 { height: 34%; }
.rp-h36 { height: 36%; }
.rp-h38 { height: 38%; }
.rp-h40 { height: 40%; }
.rp-h42 { height: 42%; }
.rp-h44 { height: 44%; }
.rp-h46 { height: 46%; }
.rp-h48 { height: 48%; }
.rp-h50 { height: 50%; }
.rp-h52 { height: 52%; }
.rp-h54 { height: 54%; }
.rp-h56 { height: 56%; }
.rp-h58 { height: 58%; }
.rp-h60 { height: 60%; }
.rp-h62 { height: 62%; }
.rp-h64 { height: 64%; }
.rp-h66 { height: 66%; }
.rp-h68 { height: 68%; }
.rp-h70 { height: 70%; }
.rp-h72 { height: 72%; }
.rp-h74 { height: 74%; }
.rp-h76 { height: 76%; }
.rp-h78 { height: 78%; }
.rp-h80 { height: 80%; }
.rp-h82 { height: 82%; }
.rp-h84 { height: 84%; }
.rp-h86 { height: 86%; }
.rp-h88 { height: 88%; }
.rp-h90 { height: 90%; }
.rp-h92 { height: 92%; }
.rp-h94 { height: 94%; }
.rp-h96 { height: 96%; }
.rp-h98 { height: 98%; }
.rp-h100 { height: 100%; }
.rp-b0 { bottom: 0%; }
.rp-b2 { bottom: 2%; }
.rp-b4 { bottom: 4%; }
.rp-b6 { bottom: 6%; }
.rp-b8 { bottom: 8%; }
.rp-b10 { bottom: 10%; }
.rp-b12 { bottom: 12%; }
.rp-b14 { bottom: 14%; }
.rp-b16 { bottom: 16%; }
.rp-b18 { bottom: 18%; }
.rp-b20 { bottom: 20%; }
.rp-b22 { bottom: 22%; }
.rp-b24 { bottom: 24%; }
.rp-b26 { bottom: 26%; }
.rp-b28 { bottom: 28%; }
.rp-b30 { bottom: 30%; }
.rp-b32 { bottom: 32%; }
.rp-b34 { bottom: 34%; }
.rp-b36 { bottom: 36%; }
.rp-b38 { bottom: 38%; }
.rp-b40 { bottom: 40%; }
.rp-b42 { bottom: 42%; }
.rp-b44 { bottom: 44%; }
.rp-b46 { bottom: 46%; }
.rp-b48 { bottom: 48%; }
.rp-b50 { bottom: 50%; }
.rp-b52 { bottom: 52%; }
.rp-b54 { bottom: 54%; }
.rp-b56 { bottom: 56%; }
.rp-b58 { bottom: 58%; }
.rp-b60 { bottom: 60%; }
.rp-b62 { bottom: 62%; }
.rp-b64 { bottom: 64%; }
.rp-b66 { bottom: 66%; }
.rp-b68 { bottom: 68%; }
.rp-b70 { bottom: 70%; }
.rp-b72 { bottom: 72%; }
.rp-b74 { bottom: 74%; }
.rp-b76 { bottom: 76%; }
.rp-b78 { bottom: 78%; }
.rp-b80 { bottom: 80%; }
.rp-b82 { bottom: 82%; }
.rp-b84 { bottom: 84%; }
.rp-b86 { bottom: 86%; }
.rp-b88 { bottom: 88%; }
.rp-b90 { bottom: 90%; }
.rp-b92 { bottom: 92%; }
.rp-b94 { bottom: 94%; }
.rp-b96 { bottom: 96%; }
.rp-b98 { bottom: 98%; }
.rp-b100 { bottom: 100%; }

.rp-head .seg { margin-top: 0; }
.rp-period { display: flex; flex-direction: column; gap: var(--s-2); margin-top: var(--s-2); }
.rp-step { display: flex; align-items: center; gap: var(--s-1); }
.rp-pick { flex: 1; min-width: 0; min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); padding: var(--s-1) var(--s-3); border: 1px solid var(--line); border-radius: var(--r-m); color: var(--ink); text-decoration: none; }
.rp-pick:hover { color: var(--ink); background: var(--rail); }
.rp-pick svg { transform: rotate(90deg); color: var(--muted); }
.rp-pick-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.rp-pick-t small { font-size: var(--t-caps); color: var(--muted); }
.rp-pick-t strong { font-size: var(--t-body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-live { font-weight: var(--w-regular); color: var(--muted); }

.rp-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-6); margin-top: var(--s-5); align-items: start; }
.rp-card { display: flex; flex-direction: column; gap: var(--s-5); }
.rp-cols + .rp-card { margin-top: var(--s-7); }
.rp-card h2, .rp-cats h2, .rp-weeks h2 { font-size: var(--t-title); }
.rp-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; }
.rp-key { display: inline-flex; align-items: center; gap: var(--s-1); margin: 0; font-size: var(--t-meta); color: var(--muted); }
.rp-key-avg { width: 14px; border-top: 1.5px dashed var(--control); }
.rp-key-typ { width: 14px; height: 12px; border: 1.5px dashed var(--control); border-bottom: 0; border-radius: var(--r-s) var(--r-s) 0 0; }
.rp-fine { margin: 0; font-size: var(--t-small); color: var(--muted); line-height: 1.45; }

.rp-hero { display: flex; flex-direction: column; gap: var(--s-1); }
.rp-lead { font-size: var(--t-small); color: var(--muted); }
.rp-total { font-size: var(--t-amount); font-weight: var(--w-bold); letter-spacing: -0.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.rp-compare { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); font-size: var(--t-small); }
.rp-pill { padding: var(--s-1) var(--s-2); border-radius: var(--r-pill); font-weight: var(--w-semi); background: var(--surface-2); color: var(--ink-2); }
.rp-pill.up { background: var(--warn-wash); color: var(--warn-ink); }
.rp-pill.down { background: var(--accent-wash); color: var(--accent-ink); }
.rp-why summary { list-style: none; cursor: pointer; color: var(--muted); text-decoration: underline dotted; text-underline-offset: 4px; min-height: var(--tap); display: flex; align-items: center; }
.rp-why summary::-webkit-details-marker { display: none; }
.rp-why p { margin-top: var(--s-1); max-width: 420px; padding: var(--s-2) var(--s-3); border-radius: var(--r-m); background: var(--ink); color: var(--on-ink); font-size: var(--t-meta); line-height: 1.45; }

/* Cycle 503: amounts carry cents, so on a phone the three figures are rows
   (label left, amount right) and never squeeze into thirds. */
.rp-tiles { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-2); margin: 0; }
.rp-tiles > div { display: flex; flex-direction: row; justify-content: space-between; align-items: baseline; gap: var(--s-3); padding: var(--s-2) var(--s-3); border-radius: var(--r-m); background: var(--surface-2); min-width: 0; }
.rp-tiles dt { font-size: var(--t-meta); color: var(--muted); }
.rp-tiles dd { flex: none; margin: 0; font-size: var(--t-small); font-weight: var(--w-bold); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rp-tiles > .neg { background: var(--warn-wash); }
.rp-tiles > .neg dt, .rp-tiles > .neg dd { color: var(--warn-ink); }

.rp-weeks { display: flex; flex-direction: column; gap: var(--s-2); }
.rp-wchart { position: relative; height: 170px; display: flex; align-items: flex-end; gap: var(--s-2); border-bottom: 1px solid var(--line); }
.rp-wcol { position: relative; flex: 1; height: 150px; }
.rp-wcol .rp-typ { position: absolute; left: 0; right: 0; bottom: 0; border: 1.5px dashed var(--control); border-bottom: 0; border-radius: var(--r-s) var(--r-s) 0 0; }
.rp-wcol .rp-bar { position: absolute; left: 18%; right: 18%; bottom: 0; border-radius: var(--r-s) var(--r-s) 0 0; background: var(--accent); }
.rp-bar.over { background: var(--viz-up); }
.rp-amt { position: absolute; left: calc(-1 * var(--s-2)); right: calc(-1 * var(--s-2)); margin-bottom: var(--s-1); text-align: center; font-size: var(--t-caps); font-weight: var(--w-semi); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rp-wlabels { display: flex; gap: var(--s-2); }
.rp-wlab { flex: 1; display: flex; flex-direction: column; align-items: center; font-size: var(--t-caps); color: var(--muted); }
.rp-wlab.now { color: var(--ink); font-weight: var(--w-bold); }
.rp-wlab small { font-size: var(--t-caps); font-weight: var(--w-regular); color: var(--muted); }

.rp-scroll { overflow-x: auto; }
.rp-grid { width: 100%; border-collapse: separate; border-spacing: 3px; font-variant-numeric: tabular-nums; }
.rp-grid th { font-size: var(--t-meta); font-weight: var(--w-semi); color: var(--muted); }
.rp-grid tbody th { text-align: left; color: var(--ink); font-size: var(--t-small); padding-right: var(--s-1); white-space: nowrap; }
.rp-grid abbr { text-decoration: none; }
.rp-grid td { height: 44px; border-radius: var(--r-m); text-align: center; font-size: var(--t-caps); font-weight: var(--w-medium); white-space: nowrap; padding: 0 2px; }
.rp-heat0 { background: var(--surface-2); }
.rp-heat1 { background: var(--viz-heat-1); }
.rp-heat2 { background: var(--viz-heat-2); }
.rp-heat3 { background: var(--viz-heat-3); color: var(--on-accent); font-weight: var(--w-bold); }
.rp-heat4 { background: var(--accent); color: var(--on-accent); font-weight: var(--w-bold); }
.rp-heat-none { background: none; }

.rp-months-card .rp-mchart { position: relative; height: 168px; display: flex; align-items: flex-end; gap: var(--s-2); border-bottom: 1px solid var(--line); }
.rp-mcol { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; }
.rp-mcol .rp-bar { width: 70%; max-width: 44px; border-radius: var(--r-s) var(--r-s) 0 0; }
.rp-bar.earlier { background: var(--track); }
.rp-bar.baseline { background: var(--viz-base); }
.rp-bar.period { background: var(--accent); }
.rp-avg { position: absolute; left: 0; right: 0; border-top: 1.5px dashed var(--control); z-index: 1; }
.rp-mlabels { display: flex; gap: var(--s-2); }
.rp-mlabels > span { flex: 1; text-align: center; font-size: var(--t-caps); color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-mlabels > .now { color: var(--ink); font-weight: var(--w-bold); }
.rp-mlabels > .neg { color: var(--warn-ink); }
.rp-kept { display: flex; flex-direction: column; gap: var(--s-1); padding-top: var(--s-2); border-top: 1px solid var(--line-soft); }
.rp-kept-t { font-size: var(--t-meta); font-weight: var(--w-semi); color: var(--muted); }

.rp-cats { display: flex; flex-direction: column; gap: var(--s-3); margin-top: var(--s-7); }
.rp-clist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.rp-crow { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name amt" "viz viz"; gap: var(--s-1) var(--s-3); padding: var(--s-3) 0; border-top: 1px solid var(--line-soft); }
.rp-crow.uncat { margin: 0 calc(-1 * var(--s-3)); padding: var(--s-3); border-radius: var(--r-m); background: var(--rail); border-top: 0; }
.rp-crow.archived { color: var(--muted); }
.rp-chead { display: none; }
.rp-cname { grid-area: name; display: flex; flex-direction: column; font-weight: var(--w-medium); min-width: 0; overflow-wrap: anywhere; }
.rp-cname a { color: inherit; text-decoration: none; }
.rp-cname a:hover { text-decoration: underline; }
.rp-cname small { font-size: var(--t-caps); font-weight: var(--w-regular); color: var(--muted); }
.rp-cviz { grid-area: viz; display: flex; align-items: center; }
.rp-cviz .chip { width: 100%; justify-content: center; min-height: var(--tap); }
.rp-cnum { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.rp-casg { display: none; }
/* Cycle 477: "de $X asignado" under the spent amount, on a phone only. */
.rp-of { font-size: var(--t-caps); color: var(--muted); }
.rp-camt { grid-area: amt; display: flex; flex-direction: column; align-items: flex-end; }
.rp-camt strong { font-weight: var(--w-semi); }
.rp-delta { font-size: var(--t-caps); font-weight: var(--w-semi); color: var(--muted); }
.rp-delta.up { color: var(--warn-ink); }
.rp-delta.down { color: var(--accent-ink); }
.rp-cbar { position: relative; display: block; width: 100%; height: 8px; border-radius: var(--r-s); background: var(--surface-2); }
.rp-cfill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: var(--r-s); background: var(--accent); }
.rp-cfill.up { background: var(--viz-up); }
.archived .rp-cfill { background: var(--viz-base); }
/* Cycle 443: a group is a folded row; its categories sit indented under it. */
.rp-group { list-style: none; border-top: 1px solid var(--line-soft); }
.rp-group .rp-crow { border-top: 0; }
.rp-grow { list-style: none; cursor: pointer; min-height: var(--tap); }
.rp-grow::-webkit-details-marker { display: none; }
.rp-grow .rp-cname { font-weight: var(--w-semi); }
.rp-grow .rp-cname small::after { content: " ▸"; }
details[open] > .rp-grow .rp-cname small::after { content: " ▾"; }
.rp-gkids { padding-bottom: var(--s-2); }
.rp-gkids .rp-cname { padding-left: var(--s-4); }
.rp-gkids .rp-crow { border-top: 1px solid var(--line-soft); }
.rp-csep { padding: var(--s-4) 0 var(--s-1); font-size: var(--t-meta); font-weight: var(--w-semi); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

/* The period sheet: a bottom sheet on a phone, a dialog on a computer. */
.rp-sheet { display: none; }
.rp-sheet:target { display: flex; position: fixed; inset: 0; z-index: 30; flex-direction: column; justify-content: flex-end; }
.rp-scrim { position: absolute; inset: 0; background: var(--scrim); }
.rp-sheet-body { position: relative; display: flex; flex-direction: column; gap: 2px; max-height: 92vh; overflow-y: auto; padding: var(--s-3) var(--s-4) var(--s-6); border-radius: var(--r-l) var(--r-l) 0 0; background: var(--surface); }
.rp-sheet-head { display: flex; align-items: center; justify-content: space-between; min-height: var(--tap); }
.rp-sheet-head h2 { font-size: var(--t-title); }
.rp-sheet-head a { font-weight: var(--w-semi); text-decoration: none; min-height: var(--tap); display: flex; align-items: center; }
.rp-opt { display: flex; align-items: center; gap: var(--s-3); min-height: 56px; border-bottom: 1px solid var(--line-soft); color: var(--ink); text-decoration: none; }
.rp-opt:hover { color: var(--ink); background: var(--rail); }
.rp-dot { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--control); }
.rp-opt.on .rp-dot { border: 6px solid var(--accent); }
.rp-opt.on strong { font-weight: var(--w-bold); }
.rp-choose { display: flex; flex-direction: column; gap: var(--s-1); padding: var(--s-3) 0 var(--s-1); }
.rp-choose-t { display: flex; flex-direction: column; line-height: 1.25; }
.rp-choose-t strong { font-weight: var(--w-medium); }
.rp-choose.on .rp-choose-t strong { font-weight: var(--w-bold); }
.rp-choose-t small { font-size: var(--t-meta); color: var(--muted); }
.rp-opt span { display: flex; flex-direction: column; line-height: 1.25; }
.rp-opt strong { font-weight: var(--w-medium); }
.rp-opt small { font-size: var(--t-meta); color: var(--muted); }
.rp-months { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); padding: var(--s-3) 0 var(--s-1); }
.rp-months label { display: flex; flex-direction: column; gap: var(--s-1); font-size: var(--t-meta); color: var(--muted); }
.rp-months select { min-height: var(--tap); padding: 0 var(--s-2); border: 1px solid var(--control); border-radius: var(--r-m); background: var(--surface); font: inherit; font-size: var(--t-small); color: var(--ink); }
.rp-sheet-body .rp-fine { margin: var(--s-3) 0 0; font-size: var(--t-meta); }

@media (min-width: 768px) {
  .rp-pick { flex: 0 1 360px; }
  .rp-card { padding: var(--s-6); border: 1px solid var(--line); border-radius: var(--r-m); }
  .rp-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rp-tiles > div { flex-direction: column; justify-content: flex-start; align-items: stretch; gap: var(--s-1); padding: var(--s-3); }
  .rp-tiles dd { font-size: var(--t-body); }
  .rp-cols + .rp-card { margin-top: var(--s-6); }
  .rp-grid { border-spacing: 4px; }
  .rp-grid td { height: 48px; font-size: var(--t-small); padding: 0 var(--s-1); }
  .rp-sheet:target { justify-content: center; align-items: center; }
  .rp-sheet-body { width: 440px; border-radius: var(--r-l); }
  /* Cycle 503: amounts carry cents; the number columns keep room for
     "$12.345.678,90" and stay the same width in every row, so they line up. */
  .rp-crow { grid-template-columns: minmax(0, 1.4fr) minmax(0, 2fr) minmax(8.5em, 1fr) minmax(8.5em, 1.2fr); grid-template-areas: none; align-items: center; }
  .rp-crow > * { grid-area: auto; }
  .rp-chead { display: grid; padding: var(--s-2) 0; border-top: 0; font-size: var(--t-meta); font-weight: var(--w-semi); color: var(--muted); }
  .rp-chead .rp-camt { align-items: flex-end; }
  .rp-casg { display: block; color: var(--muted); }
  .rp-of { display: none; }
  .rp-cviz .chip { width: auto; }
}
@media (min-width: 1200px) {
  .rp-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

/* ---------- Cycle 316: Ocultar montos ---------- */
/* The switch needs the script; without it, amounts simply show. */
.privacy-toggle { display: none; }
html.js .appbar .privacy-toggle { display: inline-flex; margin-left: auto; flex: none; border: 0; background: none; font: inherit; cursor: pointer; }
html.js .menu .privacy-toggle { display: flex; }
html.privado .privacy-toggle .when-shown,
html:not(.privado) .privacy-toggle .when-hidden { display: none; }
/* Amount fields show what they hold only while you're in one (Asignar comes
   prefilled). A dropdown listing balances waits for app.js to mask them. */
html.privado input[inputmode="decimal"]:not(:focus) { -webkit-text-fill-color: transparent; }
html.privado:not(.privado-listo) select:has(option[data-mask]) { -webkit-text-fill-color: transparent; }
/* Every amount becomes **** of one width, so its size doesn't show either.
   The digits stay in the box (transparent, clipped) to keep the baseline. */
html.privado .monto {
  display: inline-block;
  position: relative;
  width: 2.15em;
  overflow: clip;
  white-space: nowrap;
  -webkit-text-fill-color: transparent;
  user-select: none;
}
html.privado .monto::after {
  content: "****";
  position: absolute;
  inset: 0;
  /* Follows the text around it: right in a column of amounts. */
  text-align: inherit;
  -webkit-text-fill-color: currentColor;
  letter-spacing: .04em;
}
