/*
  BuckBoy at buckboy.app: the family's look (ChefBoy's tokens and components) in money green. Light or
  dark follows the device. Responsive from 320 px: on a phone the sections sit in a bar at the bottom of
  the screen (Today, Transactions, Recurring, Stats, ••• More).
*/
:root {
  color-scheme: light;
  /* BuckBoy's palette (DESIGN.md section 10). */
  --brand: #1f9d55;
  --brand-deep: #0f5c34;
  --brand-tint: #e8f7ee;
  --gold: #f2b630;
  --out: #1f2933;      /* spending: plain, never red (spending isn't bad) */
  --in: #15803d;
  --warn: #b86a05;
  --over: #dc2626;
  --over-soft: #fdecec;
  --move: #64748b;
  --bg: #f7faf8;
  --card: #ffffff;
  --line: #e3ebe6;
  /* The family's component tokens (ChefBoy's names), in BuckBoy's colours. */
  --surface: var(--card);
  --surface-2: #f1f6f3;
  --sunken: #eaf2ed;
  --border: var(--line);
  --border-strong: #c9d8cf;
  --text: #14211a;
  --text-2: #44564b;
  --text-3: #627569;
  --accent: var(--brand);
  --accent-hover: #17803f;
  --accent-soft: var(--brand-tint);
  --accent-contrast: #ffffff;
  --accent-text: var(--brand-deep);
  --good: var(--in);
  --good-soft: #ecfdf3;
  --warn-soft: #fff7e6;
  --bad: var(--over);
  --bad-soft: var(--over-soft);
  --info: #026aa2;
  --info-soft: #f0f9ff;
  --shadow-sm: 0 1px 2px rgba(16, 40, 26, .06);
  --shadow-md: 0 4px 12px rgba(16, 40, 26, .08);
  --shadow-lg: 0 12px 32px rgba(16, 40, 26, .16);
  --radius-sm: 8px;
  --radius: 10px;
  --radius-lg: 14px;
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --bottom-nav: 0px;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --brand: #34c27a;
    --brand-deep: #a7f0c6;
    --brand-tint: #11281c;
    --gold: #f5c75a;
    --out: #e6edf3;
    --in: #4ade80;
    --warn: #fbbf24;
    --over: #f87171;
    --over-soft: rgba(248, 113, 113, .14);
    --move: #94a3b8;
    --bg: #0c1410;
    --card: #132019;
    --line: #1f3328;
    --surface-2: #182a20;
    --sunken: #0f1a14;
    --border-strong: #2d4637;
    --text: #e8f1ec;
    --text-2: #b9c9bf;
    --text-3: #8fa398;
    --accent-hover: #5fd396;
    --accent-contrast: #06110b;
    --good-soft: rgba(74, 222, 128, .12);
    --warn-soft: rgba(251, 191, 36, .12);
    --info: #7cd4fd;
    --info-soft: rgba(124, 212, 253, .12);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, .35);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, .5);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--text); font: 15px/1.45 var(--font); -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body.modal-open { overflow: hidden; }
[hidden] { display: none !important; }
a { color: var(--accent-text); }
h1, h2, h3 { line-height: 1.2; margin: 0; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; }
.muted { color: var(--text-3); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.row { display: flex; align-items: center; gap: .5rem; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: .75rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- top bar --------------------------------------------------------------------- */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: .85rem; padding: .4rem 1rem; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: .5rem; text-decoration: none; color: var(--text); flex: 0 0 auto; }
.brand img { width: 140px; max-width: 32vw; height: auto; image-rendering: auto; }
.brand b { font-size: 1.15rem; letter-spacing: -.01em; }
.brand b span { color: var(--accent); }
.nav { display: flex; gap: .25rem; flex: 1 1 auto; }
.nav-btn { appearance: none; border: 0; background: none; color: var(--text-2); font: inherit; font-size: .95rem; font-weight: 600; padding: .38rem .7rem; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.nav-btn:hover { background: var(--surface-2); color: var(--text); }
.nav-btn[aria-current="page"] { background: var(--accent-soft); color: var(--accent-text); }
.nav-btn .ico { margin-right: .3rem; }
.top-tools { display: flex; gap: .4rem; align-items: center; }
body.logged-out .nav { display: none; }

@media (max-width: 720px) {
  :root { --bottom-nav: calc(60px + env(safe-area-inset-bottom)); }
  .topbar { padding: .5rem .75rem; backdrop-filter: none; background: var(--surface); }
    .nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; justify-content: space-around; gap: 0; padding: .3rem .25rem calc(.3rem + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--border); }
  .nav-btn { display: flex; flex-direction: column; align-items: center; gap: .1rem; font-size: .72rem; padding: .3rem .4rem; border-radius: var(--radius); flex: 1 1 0; }
  .nav-btn .ico { margin: 0; font-size: 1.25rem; }
  body.logged-out { --bottom-nav: 0px; }
}

.view { max-width: 1100px; margin: 0 auto; padding: 1.25rem 1rem calc(2rem + var(--bottom-nav)); }
@media (max-width: 720px) { .view { padding: 1rem .75rem calc(1.5rem + var(--bottom-nav)); } }

/* ---- buttons, chips, inputs --------------------------------------------------------- */
.btn { appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; padding: .55rem .95rem; border-radius: var(--radius); cursor: pointer; text-decoration: none; line-height: 1.2; transition: background .12s, border-color .12s, transform .06s; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-contrast); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.ghost { background: none; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--border)); }
.btn.danger.solid { background: var(--bad); color: #fff; border-color: var(--bad); }
.btn.small { padding: .35rem .65rem; font-size: .85rem; border-radius: var(--radius-sm); }
.btn.big { padding: .8rem 1.3rem; font-size: 1.05rem; }
.btn.icon { padding: .35rem .5rem; min-width: 2.1rem; }
.btn.block { width: 100%; }
.btn-row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.btn-row.right { justify-content: flex-end; }
.chip { display: inline-flex; align-items: center; gap: .3rem; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); border-radius: 999px; padding: .2rem .6rem; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.chip.btn-like { cursor: pointer; font: inherit; font-size: .85rem; font-weight: 600; padding: .35rem .75rem; }
.chip.btn-like:hover { background: var(--surface-2); }
.chip.on, .chip[aria-pressed="true"] { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); color: var(--accent-text); }
.chip.ai { color: var(--info); background: var(--info-soft); border-color: transparent; }
.chip.bad { color: var(--bad); background: var(--bad-soft); border-color: transparent; }
.chip.good { color: var(--good); background: var(--good-soft); border-color: transparent; }
.chips { display: flex; gap: .35rem; flex-wrap: wrap; }

label.field { display: flex; flex-direction: column; gap: .3rem; font-weight: 600; font-size: .88rem; color: var(--text-2); }
label.field .hint { font-weight: 400; color: var(--text-3); font-size: .8rem; }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search], input[type=url], select, textarea {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: .55rem .7rem; width: 100%; min-width: 0;
}
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, .nav-btn:focus-visible, .chip:focus-visible { outline: 2px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 1px; }
input.emoji-in { width: 3.4rem; text-align: center; font-size: 1.2rem; padding: .35rem; }
.check { display: flex; align-items: center; gap: .5rem; font-weight: 500; cursor: pointer; }
.check input { width: 1.1rem; height: 1.1rem; accent-color: var(--accent); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
@media (max-width: 520px) { .grid-2 { grid-template-columns: 1fr; } }
.err { color: var(--bad); font-size: .85rem; min-height: 1em; }

/* ---- panels, cards, lists ------------------------------------------------------------- */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 1rem; }
.panel.flat { box-shadow: none; }
.panel + .panel { margin-top: 1rem; }
.page-head { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-head h2 { flex: 1 1 auto; }
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--border); margin-bottom: 1rem; overflow-x: auto; }
.tab { appearance: none; border: 0; background: none; font: inherit; font-weight: 600; color: var(--text-3); padding: .55rem .8rem; border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; }
.tab[aria-selected="true"] { color: var(--accent-text); border-bottom-color: var(--accent); }
.empty { text-align: center; color: var(--text-3); padding: 1.5rem 1rem; }
.empty .big { font-size: 2rem; display: block; margin-bottom: .3rem; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: .6rem; padding: .55rem .25rem; border-top: 1px solid var(--border); }
.list > li:first-child { border-top: 0; }
.emo { font-size: 1.25rem; width: 1.7rem; text-align: center; flex: 0 0 auto; }
.sub { color: var(--text-3); font-size: .82rem; }
.overdue { color: var(--bad); }
.money { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }

/* ---- modal, toast, dialog --------------------------------------------------------------- */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(12, 10, 8, .5); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 1rem 2rem; overflow-y: auto; }
.modal.hidden { display: none; }
.modal-box { width: 100%; max-width: 560px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 1.1rem; }
.modal-box.wide { max-width: 760px; }
.modal-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .9rem; }
.modal-head h3 { flex: 1 1 auto; font-size: 1.15rem; }
@media (max-width: 600px) { .modal { padding: 0; align-items: flex-end; } .modal-box { border-radius: var(--radius-lg) var(--radius-lg) 0 0; max-height: 92vh; overflow-y: auto; padding-bottom: calc(1.1rem + env(safe-area-inset-bottom)); } }
.dlg-layer { z-index: 90; align-items: center; }
.dlg-box { max-width: 400px; }
.dlg-text { margin: 0 0 1rem; white-space: pre-line; }
.toast { position: fixed; left: 50%; bottom: calc(1.25rem + var(--bottom-nav)); transform: translateX(-50%); z-index: 80; display: flex; align-items: center; gap: .75rem; background: var(--text); color: var(--bg); padding: .65rem .9rem; border-radius: var(--radius); box-shadow: var(--shadow-lg); max-width: calc(100vw - 2rem); font-weight: 500; }
.toast.hidden { display: none; }
.toast button { appearance: none; border: 0; background: none; color: var(--accent); font: inherit; font-weight: 700; cursor: pointer; padding: .1rem .3rem; }
@media (prefers-color-scheme: dark) { .toast button { color: var(--accent-text); } .toast { background: #e8f1ec; color: #0c1410; } .toast button { color: #0f5c34; } }
.menu { position: fixed; z-index: 70; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: .3rem; min-width: 210px; }
.menu button { display: flex; width: 100%; gap: .55rem; align-items: center; appearance: none; border: 0; background: none; font: inherit; color: var(--text); text-align: left; padding: .5rem .65rem; border-radius: var(--radius-sm); cursor: pointer; }
.menu button:hover, .menu button:focus-visible { background: var(--surface-2); outline: none; }
.menu hr { border: 0; border-top: 1px solid var(--border); margin: .25rem 0; }

/* ---- the welcome page (auth.js), like ChoreBoy's and DressBoy's -------------------------
   The logo, headline and line beside the forms (stacked on a phone), then What ChefBoy does (a card
   per feature), the plans and the other Boy apps, both columns wide. */
.login-wrap { padding: 2rem 1rem 4rem; }
.auth { max-width: 1040px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: center; }
.auth-brand { margin: 0 0 .75rem; }
.auth-logo { display: block; width: min(340px, 72vw); height: auto; image-rendering: auto; }
.auth-hero h1 { font-size: clamp(1.85rem, 4.2vw, 2.9rem); line-height: 1.08; letter-spacing: -.035em; margin: 1.1rem 0 .8rem; }
.auth-lede { font-size: 1.05rem; color: var(--text-2); margin: 0 0 1.3rem; max-width: 34rem; }
.auth-card { min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: 1.5rem; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: .25rem; padding: .25rem; background: var(--sunken); border-radius: var(--radius); margin-bottom: 1rem; }
.auth-tabs button { font: 650 .92rem var(--font); color: var(--text-2); background: transparent; border: 0; border-radius: var(--radius-sm); padding: .55rem; cursor: pointer; }
.auth-tabs button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.auth-tabs button:focus-visible { outline: 2px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 1px; }
@media (prefers-color-scheme: dark) { .auth-tabs button.active { background: var(--accent-soft); color: var(--accent-text); } }
.auth-features, .auth-plans, .auth-boys { grid-column: 1 / -1; min-width: 0; }
.auth-features-h { font-size: 1.25rem; letter-spacing: -.015em; margin: 0 0 .9rem; }
.auth-points { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: .75rem; }
.auth-point { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: .3rem .65rem; padding: .85rem .95rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.auth-point h3 { margin: 0; font-size: .98rem; line-height: 1.25; color: var(--text); overflow-wrap: anywhere; }
.auth-point p { grid-column: 1 / -1; margin: 0; font-size: .9rem; line-height: 1.45; color: var(--text-2); overflow-wrap: anywhere; }
.auth-ico { flex-shrink: 0; width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent-text); font-weight: 800; }
.auth-plans-box { padding: 1rem 1.1rem; border-radius: var(--radius-lg); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border)); }
.auth-plans-box .promo-plan-line:first-child { margin-top: 0; }
.boy-apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: .75rem; }
.boy-app { display: flex; align-items: center; gap: .7rem; min-width: 0; padding: .7rem .85rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); color: var(--text); text-decoration: none; }
.boy-app:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.boy-app:focus-visible { outline: 2px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 2px; }
.boy-app img { width: 32px; height: 32px; flex: 0 0 auto; border-radius: var(--radius-sm); }
.boy-app > span { display: flex; flex-direction: column; min-width: 0; }
.boy-app .sub { overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .login-wrap { padding: 1.25rem .75rem 3rem; }
  .auth { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
  .auth-hero h1 { margin-top: .6rem; }
  .auth-lede { margin-bottom: 0; }
  .auth-card { padding: 1.1rem; }
}

/* ---- 👤 the profile chip and menu, ⚙️ segmented buttons, the confirm bar ------------------------- */
#account { gap: .4rem; padding: .25rem .6rem .25rem .3rem; }
#account .avatar { width: 1.7rem; height: 1.7rem; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 800; font-size: .85rem; }
@media (max-width: 720px) { #account .acct-name { display: none; } }
.menu-head { display: flex; flex-direction: column; padding: .55rem .65rem .5rem; border-bottom: 1px solid var(--border); margin-bottom: .25rem; }
.menu-head .sub { overflow: hidden; text-overflow: ellipsis; }
html[data-fx="full"] .menu { animation: menu-in .14s ease-out; transform-origin: top right; }
@keyframes menu-in { from { opacity: 0; transform: scale(.96); } }
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius); overflow: hidden; max-width: 100%; }
.seg-btn { appearance: none; border: 0; background: var(--surface); color: var(--text-2); font: inherit; font-weight: 600; padding: .45rem .9rem; cursor: pointer; white-space: nowrap; }
.seg-btn + .seg-btn { border-left: 1px solid var(--border-strong); }
.seg-btn.on { background: var(--brand-tint); color: var(--brand-deep); }
.confirm-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: center; margin: .5rem auto 0; padding: .45rem .8rem; max-width: 1100px; background: var(--info-soft); color: var(--info); border: 1px solid var(--border); border-radius: var(--radius); }
body.logged-out .confirm-bar { display: none; }
kbd { font: 600 .8rem ui-monospace, monospace; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 5px; padding: .05rem .35rem; background: var(--surface-2); }

/* ---- the wordmark and the nav on a phone ---------------------------------------------------------- */
.wordmark { font: 900 1.45rem/1 ui-rounded, 'SF Pro Rounded', 'Nunito', 'Varela Round', system-ui, sans-serif; letter-spacing: -.02em; color: var(--brand); text-shadow: 0 2px 0 color-mix(in srgb, var(--brand-deep) 35%, transparent); }
.wordmark.big { font-size: 2.6rem; }
.nav-btn.phone { display: none; }
@media (max-width: 720px) {
  .nav-btn.desk { display: none; }
  .nav-btn.phone { display: flex; }
}
.btn.tiny { padding: .15rem .45rem; font-size: .78rem; border-radius: 6px; font-weight: 600; }
.btn.danger.ghost { border-color: transparent; }
.in { color: var(--in); }
.over, .sub.over { color: var(--over); }
.move { color: var(--move); }
.field.compact { gap: .15rem; font-size: .78rem; }
.field.compact select, .field.compact input { padding: .4rem .5rem; }
.num-in { width: 4.5rem !important; }
.sec-h { font-size: 1.05rem; margin: 1.2rem 0 .6rem; }
.sec-row .sec-h { margin: 1.2rem 0 .6rem; }
.totals { margin: .2rem 0 .9rem; color: var(--text-2); }
.totals b { font-variant-numeric: tabular-nums; color: var(--out); }
.totals b.in { color: var(--in); }
.totals b.move { color: var(--move); }

/* ---- ✨ quick add ------------------------------------------------------------------------------- */
.quick { display: flex; align-items: center; gap: .5rem; padding: .45rem .5rem .45rem .8rem; margin-bottom: 1rem; background: var(--surface); border: 1.5px solid color-mix(in srgb, var(--brand) 40%, var(--border)); border-radius: 999px; box-shadow: var(--shadow-sm); }
.quick input { border: 0 !important; background: transparent !important; padding: .35rem .2rem !important; font-size: 1rem; outline: none !important; }
.quick .btn { border-radius: 999px; }
.quick-ico { font-size: 1.2rem; }

/* ---- rows ---------------------------------------------------------------------------------------- */
.rows { list-style: none; margin: 0; padding: 0; }
.row { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: .1rem .4rem; padding: .35rem .15rem; border-top: 1px solid var(--border); }
.rows > .row:first-child { border-top: 0; }
.row-main { appearance: none; border: 0; background: none; font: inherit; color: inherit; text-align: left; display: flex; align-items: center; gap: .6rem; flex: 1 1 0; min-width: 0; padding: .25rem; border-radius: var(--radius-sm); cursor: pointer; }
.row-main:hover { background: var(--surface-2); }
.row .emo { font-size: 1.35rem; width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: 10px; background: var(--brand-tint); flex: 0 0 auto; }
.row-text { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; gap: .1rem; }
.row-line { display: flex; align-items: baseline; gap: .5rem; min-width: 0; }
.row-name { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1 1 auto; min-width: 0; }
.row-sub { display: flex; flex-wrap: wrap; gap: .25rem .35rem; align-items: center; font-size: .78rem; }
.row-sub .chip { font-size: .72rem; padding: .05rem .45rem; }
.chip.cat { border-color: color-mix(in srgb, var(--c) 45%, var(--border)); }
.chip.unsorted { color: var(--warn); border-style: dashed; }
.amt { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; margin-left: auto; }
.amt.out { color: var(--out); }
.amt.in { color: var(--in); }
.amt.move { color: var(--move); font-weight: 600; }
.ai-badge { font-size: .8rem; filter: saturate(.8); }
.more-toggle { appearance: none; border: 0; background: none; color: var(--text-3); cursor: pointer; padding: .3rem .45rem; border-radius: 6px; font-size: .9rem; }
.more-toggle:hover { background: var(--surface-2); color: var(--text); }
.row-more { display: none; flex-basis: 100%; flex-wrap: wrap; gap: .3rem .8rem; align-items: center; padding: .1rem .3rem .35rem 2.95rem; font-size: .82rem; color: var(--text-2); }
.row.open .row-more { display: flex; }
.row.open .more-toggle { transform: rotate(180deg); }
@media (hover: hover) and (min-width: 721px) { .row:hover .row-more, .row:focus-within .row-more { display: flex; } }
.row-acts { display: flex; flex-wrap: wrap; gap: .3rem; margin-left: auto; }
.unsure { color: var(--warn); }
.hint.btn-like, .chip.hint { color: var(--brand-deep); background: var(--brand-tint); border-color: transparent; }
.row.expected .row-name::after { content: ' · upcoming'; font-weight: 500; color: var(--text-3); font-size: .78rem; }
.row.overdue .emo { background: var(--over-soft); }
.row.trashed { opacity: .55; }
.pick { width: 1.1rem; height: 1.1rem; accent-color: var(--brand); }
/* ✓ Book: ChoreBoy's round tick, and the slide-out once it's charged. */
.tick { appearance: none; flex: 0 0 auto; width: 1.9rem; height: 1.9rem; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--brand) 55%, var(--border)); background: var(--surface); color: transparent; font-weight: 900; cursor: pointer; display: grid; place-items: center; }
.tick:hover { color: var(--brand); border-color: var(--brand); }
.row.checking .tick { background: var(--brand); border-color: var(--brand); color: #fff; }
html[data-fx="full"] .row.checking { animation: slide-out .38s ease-in .12s forwards; }
html[data-fx="subtle"] .row.checking { opacity: .4; transition: opacity .2s; }
@keyframes slide-out { to { transform: translateX(40px); opacity: 0; } }
.spawned { position: fixed; left: 50%; bottom: calc(6.2rem + var(--bottom-nav)); transform: translateX(-50%); z-index: 79; background: var(--brand-tint); color: var(--brand-deep); border: 1px solid color-mix(in srgb, var(--brand) 40%, var(--border)); padding: .45rem .8rem; border-radius: 999px; box-shadow: var(--shadow-md); font-size: .9rem; white-space: nowrap; }
html[data-fx="full"] .spawned { animation: pop-in .3s ease-out; }
@keyframes pop-in { from { transform: translate(-50%, 10px) scale(.92); opacity: 0; } }
.day { margin-bottom: .6rem; }
.day-head { display: flex; justify-content: space-between; align-items: baseline; font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); margin: .8rem .2rem .2rem; }

/* ---- 📒 Ledger: ChoreBoy's ☀️ Today layout (its lists in a side nav; one button with a menu on a phone) - */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ledger { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.lists { position: sticky; top: 4.6rem; max-height: calc(100vh - 5.5rem); overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.lists-title { font-size: .76rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); padding: .2rem .65rem .35rem; }
.list-btn { display: flex; align-items: center; gap: .55rem; padding: .5rem .65rem; border-radius: var(--radius-sm); background: none; border: 0; font: 550 .95rem var(--font); color: var(--text-2); cursor: pointer; text-align: left; }
.list-btn:hover { background: var(--surface-2); color: var(--text); }
.list-btn.active { background: var(--accent-soft); color: var(--accent-text); font-weight: 650; }
.list-btn:focus-visible, .list-pick:focus-visible { outline: 2px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 1px; }
.list-ico { width: 1.3rem; text-align: center; flex-shrink: 0; }
.list-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-count { margin-left: auto; font-size: .78rem; font-weight: 650; color: var(--text-3); font-variant-numeric: tabular-nums; }
.list-btn.active .list-count { color: inherit; }
/* Today's small red badge: how many charges are overdue (they're at its top; its count has them). */
.list-late { flex-shrink: 0; margin-left: auto; min-width: 1.3rem; padding: 0 .4rem; border-radius: 999px; background: var(--over); color: #fff; font-size: .74rem; font-weight: 700; line-height: 1.3rem; text-align: center; font-variant-numeric: tabular-nums; }
.list-late + .list-count { margin-left: .45rem; }
.lists .list-trash { position: relative; margin-top: .55rem; }
.lists .list-trash::before { content: ''; position: absolute; left: .65rem; right: .65rem; top: -.3rem; border-top: 1px solid var(--border); }
.list-pick { display: none; align-items: center; gap: .45rem; max-width: 100%; min-height: 2.5rem; padding: .35rem .7rem .35rem .8rem; border: 1px solid transparent; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); font: 650 .95rem var(--font); text-align: left; cursor: pointer; }
.list-pick[aria-expanded="true"] { border-color: var(--accent); }
.list-pick .list-ico { width: auto; }
.list-pick .list-name { flex: 0 1 auto; }
.list-pick-n { flex-shrink: 0; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.list-pick .list-late { margin-left: 0; }
.list-pick-caret { flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
html[data-fx="full"] .list-pick-caret { transition: transform .18s ease; }
.list-pick[aria-expanded="true"] .list-pick-caret { transform: rotate(180deg); }
.list-main { min-width: 0; }
.list-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .8rem; margin-bottom: .8rem; flex-wrap: wrap; }
.list-head-text { min-width: 0; }
.list-title { margin: 0; font-size: 1.45rem; font-weight: 750; letter-spacing: -.02em; }
.list-sum { margin: .15rem 0 0; color: var(--text-2); font-size: .9rem; }
.group-head { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; margin: 1.1rem .2rem .3rem; font-size: .8rem; font-weight: 700; color: var(--text-2); letter-spacing: .03em; text-transform: uppercase; }
.ledger-list > .group-head:first-child { margin-top: .3rem; }
.group-sum { font-weight: 600; color: var(--text-3); text-transform: none; letter-spacing: 0; font-variant-numeric: tabular-nums; text-align: right; }
.group-head.overdue { color: var(--over); }
/* 🔮 Future's sections (Tomorrow, This week, Next week, This month, Later): light dividers over its days. */
.list-sec { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; margin: 1.5rem .2rem .1rem; padding-top: .6rem; border-top: 1px solid var(--border); font-size: .95rem; font-weight: 750; color: var(--text); }
.ledger-list > .list-sec:first-child { margin-top: .4rem; border-top: 0; padding-top: 0; }
.list-sec .group-sum { font-size: .76rem; white-space: nowrap; }
.list-sec + .group-head { margin-top: .45rem; }
.ledger-rows { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: .15rem .55rem; box-shadow: var(--shadow-sm); }
.ledger-clear { margin: .2rem .2rem .4rem; color: var(--in); font-weight: 600; }
.ledger-empty { background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); }
.ledger-empty .btn { margin-top: .6rem; }
.ledger-extras { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; align-items: start; margin-top: 1.4rem; }
.ledger-extras .panel + .panel { margin-top: 0; }
.ledger-more { text-align: center; margin: 1rem 0; }
.ledger-foot { margin: .9rem .2rem; }
.after-panel { margin-bottom: .6rem; padding: .7rem 1rem; }
.after-panel summary { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; cursor: pointer; list-style: none; flex-wrap: wrap; }
.after-panel summary::-webkit-details-marker { display: none; }
.after-panel summary h3::before { content: '▸ '; color: var(--text-3); }
.after-panel[open] summary h3::before { content: '▾ '; }
.after-panel .list { margin-top: .4rem; }
/* A repeat's later charge (planned from its rule, not saved yet): no tick, a lighter row. */
.tick-gap { flex: 0 0 auto; width: 1.9rem; height: 1.9rem; border-radius: 50%; border: 2px dashed var(--border-strong); }
.row.projected .row-main { opacity: .78; }
.row.expected.projected .row-name::after { content: ' · planned'; }
.restore-btn { flex: 0 0 auto; }
.trash-list .row.trashed { opacity: 1; }
.trash-list .row.trashed .row-main { opacity: .7; }
html[data-fx="full"] .row.restoring { animation: fx-later .32s ease-in forwards; }
html[data-fx="subtle"] .row.restoring { opacity: .4; transition: opacity .2s; }
@media (max-width: 1000px) { .ledger-extras { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .ledger { grid-template-columns: minmax(0, 1fr); gap: .7rem; }
  .lists { position: relative; top: auto; max-height: none; overflow: visible; display: block; }
  .lists > .list-btn, .lists-title { display: none; }
  .list-pick { display: inline-flex; }
  /* (The button says which list this is, so the big title would only repeat it.) */
  .ledger .list-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ledger .list-head { align-items: center; }
  .ledger .list-sum { margin: 0; }
}
@media (max-width: 600px) {
  .list-title { font-size: 1.25rem; }
  .list-head .seg { width: 100%; }
  .list-head .seg-btn { flex: 1 1 0; padding: .45rem .5rem; }
  .ledger-rows { padding: .1rem .35rem; }
  .group-head { margin-left: .1rem; margin-right: .1rem; }
  .restore-btn { margin-left: auto; }
}
.glance-body { display: flex; align-items: center; gap: 1.2rem; margin-top: .6rem; flex-wrap: wrap; }
.glance-nums { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem 1.2rem; flex: 1 1 12rem; }
.glance-nums div { display: flex; flex-direction: column; }
.glance-nums b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.pace-line { grid-column: 1 / -1; font-weight: 600; }
.mini-goals { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; gap: .55rem; }
.mini-goals li { display: grid; grid-template-columns: 1fr auto; gap: .2rem .5rem; }
.mini-goals .meter { grid-column: 1 / -1; }
.next-up .rows { margin-top: .3rem; }

/* ---- charts and meters -------------------------------------------------------------------------- */
.chart { display: block; max-width: 100%; }
.chart.bars, .chart.line { width: 100%; height: auto; }
.chart-axis { stroke: var(--line); stroke-width: 1; }
.chart-lbl { fill: var(--text-3); font-size: 11px; font-family: var(--font); }
.donut-big, .ring-big { fill: var(--text); font-weight: 800; font-size: 17px; font-family: var(--font); }
.ring-big { font-size: 15px; }
.bar-hit { cursor: pointer; }
.bar-hit:hover { opacity: .85; }
html[data-fx="full"] .ring-arc { transition: stroke-dasharray .6s ease-out; }
.meter { position: relative; height: 8px; border-radius: 999px; background: var(--line); overflow: visible; }
.meter > i { display: block; height: 100%; border-radius: 999px; background: var(--brand); }
.meter.watch > i { background: var(--warn); }
.meter.over > i { background: var(--over); }
.meter .tick { position: absolute; top: -3px; width: 2px; height: 14px; background: var(--text-2); border-radius: 1px; }
.legend { display: flex; gap: .4rem .9rem; align-items: center; flex-wrap: wrap; color: var(--text-3); margin: .4rem 0 0; }
.legend .key { display: inline-block; width: 12px; height: 4px; border-radius: 2px; vertical-align: middle; margin-right: .25rem; }
.key.brand { background: var(--brand); } .key.move { background: var(--move); } .key.gold { background: var(--gold); } .key.in { background: var(--in); } .key.deep { background: var(--brand-deep); }

/* ---- Transactions -------------------------------------------------------------------------------- */
.period-bar { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .8rem; }
.period-bar h3 { min-width: 9rem; text-align: center; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .6rem; }
.filters input[type=search] { flex: 1 1 14rem; width: auto; }
.filters .field.compact { flex: 0 1 auto; }
.bulk { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .8rem; padding: .6rem .8rem; position: sticky; top: 64px; z-index: 5; }
.bulk select { width: auto; }

/* ---- Accounts ------------------------------------------------------------------------------------ */
.wallet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); gap: .8rem; }
.wallet-grid.one { grid-template-columns: minmax(0, 28rem); margin-bottom: 1rem; }
.wallet-card { appearance: none; font: inherit; color: inherit; text-align: left; display: flex; flex-direction: column; gap: .35rem; padding: .9rem 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); cursor: pointer; min-width: 0; }
.wallet-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.wallet-card.archived { opacity: .6; }
.w-name { display: flex; align-items: center; gap: .45rem; font-weight: 650; }
.w-name .emo { font-size: 1.25rem; }
.w-bal { font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.archived-list { margin-top: 1rem; }

/* ---- Recurring --------------------------------------------------------------------------------- */
.rec-search { margin-bottom: .4rem; }
.rec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); gap: .6rem; }
.rec-card { appearance: none; font: inherit; color: inherit; text-align: left; display: flex; gap: .7rem; align-items: flex-start; padding: .75rem .85rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); cursor: pointer; min-width: 0; }
.rec-card:hover { border-color: var(--border-strong); }
.rec-card .emo { font-size: 1.4rem; width: 2.2rem; height: 2.2rem; display: grid; place-items: center; border-radius: 10px; background: var(--brand-tint); flex: 0 0 auto; }
.rec-card .grow { display: flex; flex-direction: column; gap: .1rem; }
.looks { margin-top: 1rem; }
.looks .list li { flex-wrap: wrap; }
.up-group.overdue .day-head span:first-child { color: var(--over); }

/* ---- Stats -------------------------------------------------------------------------------------- */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; margin-bottom: 1rem; }
@media (max-width: 720px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tile { display: flex; flex-direction: column; gap: .15rem; padding: .8rem .9rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.tile b { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.stats-grid .panel + .panel { margin-top: 0; }
.stats-grid .wide { grid-column: 1 / -1; }
@media (max-width: 900px) { .stats-grid { grid-template-columns: minmax(0, 1fr); } }
.donut-row { display: flex; gap: 1rem; align-items: flex-start; flex-wrap: wrap; margin-top: .5rem; }
.donut-row .chart.donut { flex: 0 0 auto; margin: 0 auto; }
.cat-bars { list-style: none; margin: 0; padding: 0; flex: 1 1 14rem; min-width: 0; display: grid; gap: .45rem; }
.cat-bar { appearance: none; border: 0; background: none; font: inherit; color: inherit; width: 100%; display: flex; gap: .45rem; align-items: center; padding: 0; cursor: pointer; text-align: left; font-size: .88rem; }
.cat-bars .meter { height: 5px; margin-top: .2rem; }
.dot { width: .65rem; height: .65rem; border-radius: 50%; flex: 0 0 auto; display: inline-block; }
.delta { font-size: .75rem; color: var(--text-3); white-space: nowrap; }
.delta.up { color: var(--warn); } .delta.down { color: var(--in); }

/* ---- Targets & Goals ----------------------------------------------------------------------------- */
.target-grid, .goal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: .7rem; }
.target-card, .goal-card { appearance: none; font: inherit; color: inherit; text-align: left; display: flex; gap: .4rem; padding: .85rem .95rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); cursor: pointer; min-width: 0; }
.target-card { flex-direction: column; }
.goal-card { align-items: center; gap: .9rem; }
.goal-card .grow { display: flex; flex-direction: column; gap: .15rem; }
.target-card:hover, .goal-card:hover { border-color: var(--border-strong); }
.t-nums { font-size: .95rem; color: var(--text-2); }
.t-nums b { font-size: 1.3rem; color: var(--text); }
.t-status { font-size: .85rem; font-weight: 600; color: var(--in); }
.target-card.watch .t-status { color: var(--warn); }
.target-card.over .t-status { color: var(--over); }
.goal-card.done { border-color: var(--gold); }

/* ---- the editor ------------------------------------------------------------------------------------ */
.ed .amount-box { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.amount-in { display: flex; align-items: center; gap: .4rem; flex: 1 1 12rem; border-bottom: 2px solid var(--brand); }
.amount-in input { border: 0 !important; font-size: 2rem !important; font-weight: 800; padding: .2rem 0 !important; background: transparent !important; font-variant-numeric: tabular-nums; outline: none !important; }
.amount-in .cur { color: var(--text-3); font-weight: 700; }
.payee-row { align-items: flex-end; }
.emoji-field { flex: 0 0 auto; }
.pills { display: flex; flex-wrap: wrap; gap: .35rem; }
.pill { appearance: none; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font: inherit; font-size: .85rem; font-weight: 600; padding: .3rem .65rem; border-radius: 999px; cursor: pointer; }
.pill.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.pill.new { border-style: dashed; }
.rep { border: 1px solid var(--border); border-radius: var(--radius); padding: .6rem .8rem .8rem; display: flex; flex-direction: column; gap: .6rem; }
.rep legend { font-weight: 700; padding: 0 .3rem; }
.rep-body { display: flex; flex-direction: column; gap: .6rem; }
.rep-next { margin: 0; color: var(--brand-deep); font-weight: 600; }
.rep-next.over { color: var(--over); }
.wd .chip { min-width: 2.1rem; justify-content: center; }
.ed-foot { margin-top: .4rem; }
.foreign summary { cursor: pointer; color: var(--text-3); }
.kvs { display: grid; gap: .1rem; margin: .4rem 0 1rem; }
.kv { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: .6rem; padding: .35rem 0; border-top: 1px solid var(--border); }
.kv span { color: var(--text-3); font-size: .85rem; }
.kv b { font-weight: 550; overflow-wrap: anywhere; }
.view-amt { font-size: 1.6rem; margin: 0; }
.emo.big { font-size: 1.8rem; }

/* ---- the importer ----------------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table.csv { border-collapse: collapse; font-size: .8rem; min-width: 100%; }
table.csv th, table.csv td { padding: .35rem .5rem; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; max-width: 14rem; overflow: hidden; text-overflow: ellipsis; }
table.csv th { background: var(--surface-2); vertical-align: top; }
table.csv th select { display: block; width: auto; font-size: .78rem; padding: .25rem .35rem; margin-bottom: .2rem; }
.imp-opts { margin: .6rem 0; }
.done-card .big-line, .ob-done .big-line { font-size: 1.3rem; font-weight: 800; margin: .3rem 0; }
.progress { display: grid; gap: .35rem; margin: .5rem 0; }

/* ---- Settings ----------------------------------------------------------------------------------- */
.settings { max-width: 720px; }
.cats .emo, .list .emo { font-size: 1.15rem; }

/* ---- the welcome page extras ------------------------------------------------------------------------ */
.auth-brand { display: flex; align-items: center; gap: .8rem; }
.auth-logo { width: 96px; height: auto; }
.auth-one { margin: .2rem 0 0; }
.auth-how, .auth-privacy, .auth-foot { grid-column: 1 / -1; min-width: 0; }
.how-steps { list-style: none; padding: 0; margin: 0 0 .9rem; display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; font-size: 1.02rem; }
.how-steps b { color: var(--brand); }
.auth-privacy p { margin: 0; padding: .9rem 1rem; border-radius: var(--radius-lg); background: var(--brand-tint); color: var(--brand-deep); }
.auth-foot { text-align: center; }
.boy-app.here { border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); background: var(--brand-tint); }
/* A CSS-only row being filled in by Claude: the bank text, then the clean name and its chips. */
.demo-row { display: flex; align-items: center; gap: .7rem; max-width: 30rem; padding: .7rem .9rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.demo-emo { position: relative; width: 2rem; height: 2rem; font-size: 1.3rem; border-radius: 10px; background: var(--brand-tint); display: grid; place-items: center; }
.demo-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.demo-name { position: relative; font-weight: 650; height: 1.3em; }
.demo-sub { font-size: .8rem; color: var(--text-3); height: 1.2em; }
.demo-amt { font-weight: 700; font-variant-numeric: tabular-nums; }
.demo-row i { font-style: normal; }
.demo-emo i, .demo-name i { position: absolute; inset: 0; display: grid; place-items: center start; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-emo i { place-items: center; }
.demo-row .d1 { opacity: 1; }
.demo-row .d0 { opacity: 0; }
html[data-fx="full"] .demo-row .d0 { animation: demo-a 5s infinite; }
html[data-fx="full"] .demo-row .d1 { animation: demo-b 5s infinite; }
@keyframes demo-a { 0%, 40% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes demo-b { 0%, 45% { opacity: 0; } 55%, 100% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { html[data-fx] .demo-row .d0, html[data-fx] .demo-row .d1 { animation: none; } }


/* ---- the top bar between a phone and a wide screen: everything stays on one line -------------------- */
.nav { min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.top-tools { flex: 0 0 auto; }
@media (min-width: 721px) and (max-width: 1180px) {
  .topbar { gap: .5rem; }
  .brand .brand-wordmark { width: 120px; }
  .nav-btn { font-size: .84rem; padding: .35rem .5rem; }
  .nav-btn .ico { margin-right: .15rem; }
}
@media (min-width: 721px) and (max-width: 940px) {
  .nav-btn { font-size: 0; padding: .35rem .55rem; }
  .nav-btn .ico { font-size: 1.15rem; margin: 0; }
}
@media (max-width: 720px) { .row.expected .row-name::after { content: none; } }
/* ⚙️ Settings: a section opened by name (💬 Help, the profile menu) stops clear of the sticky top bar. */
.settings [data-sec] { scroll-margin-top: 76px; }
