/* lemonope: calm neutrals, one sharp dark-green brand. Mobile first. */
:root {
  --bg: #F6F5F0;
  --surface: #FFFFFF;
  --ink: #1F1F1B;
  --muted: #6B6A62;
  --line: #E6E4DA;
  --brand: #166534;        /* fills: progress bars, logo */
  --brand-soft: #E8F5EC;   /* tints: cards, flashes, selected rows */
  --brand-line: #C6E3CF;   /* borders on tinted surfaces */
  --brand-deep: #14532D;   /* buttons (white text), links, focus, dark surfaces */
  --brand-hover: #052E16;  /* button hover, text on tints */
  --brand-bright: #22C55E; /* crisp accent on dark-green surfaces (chart, ring) */
  --brand-on-dark: #A9CDB4;/* muted text on dark-green surfaces */
  --ok: var(--brand);
  --expense: #991B1B;      /* money out: deep red (sharper on white) */
  --income: #15803D;       /* money in */
  --warn: #E08A00;
  --over: #B91C1C;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(31,31,27,.05), 0 4px 16px rgba(31,31,27,.04);
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 var(--font); }
a { color: inherit; text-decoration-color: var(--brand-deep); text-underline-offset: 3px; }
h1, h2 { line-height: 1.2; margin: 0 0 .5rem; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.05rem; }
p { margin: 0 0 .75rem; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; }
:focus-visible { outline: 3px solid var(--brand-deep); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .5rem 1rem; z-index: 99; }
.skip:focus { left: .5rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.block { display: block; }
.grow { flex: 1; min-width: 0; }
.mt { margin-top: 1rem; }
.center { justify-content: center; }

/* layout */
.container { max-width: 980px; margin: 0 auto; padding: 1rem 1rem calc(88px + env(safe-area-inset-bottom)); }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 1rem; padding: .7rem 1rem; background: rgba(246,245,240,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: .45rem; font-weight: 800; font-size: 1.2rem; letter-spacing: -.02em; text-decoration: none; }
.logo-mark { width: 28px; height: 28px; }
.brand-lg { font-size: 1.5rem; margin-bottom: 1.25rem; }
.brand-lg .logo-mark { width: 36px; height: 36px; }
.topnav { display: none; gap: .25rem; margin-inline-start: 1rem; }
.topnav a { text-decoration: none; padding: .45rem .8rem; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: .95rem; }
.topnav a[aria-current="page"] { background: var(--brand-deep); color: #fff; }
.topnav a:hover { color: var(--ink); }
.bell { margin-inline-start: auto; position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--ink); }
.bell:hover { background: var(--line); }
.badge { position: absolute; top: 3px; inset-inline-end: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--over); color: #fff; font-size: .7rem; font-weight: 700; display: grid; place-items: center; }
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 10; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--surface); border-top: 1px solid var(--line); padding: .35rem 0 calc(.35rem + env(safe-area-inset-bottom)); }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .7rem; font-weight: 600; color: var(--muted); text-decoration: none; padding: .25rem 0; }
.tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; padding: 2px 10px; box-sizing: content-box; border-radius: 999px; }
.tabbar a[aria-current="page"] { color: var(--brand-hover); }
.tabbar a[aria-current="page"] svg { background: var(--brand-soft); }
@media (min-width: 760px) {
  .topnav { display: flex; }
  .tabbar { display: none; }
  .container { padding: 1.5rem 1.5rem 3rem; }
}

/* cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.1rem; margin-bottom: 1rem; }
.card.flush { padding: 0; overflow: hidden; }
.card.narrow { max-width: 480px; }
.card-tint { background: var(--brand-soft); border-color: var(--brand-line); }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .6rem; }
.card-head h2 { margin: 0; }
.card-head a { font-size: .85rem; color: var(--muted); }
.grid-2 { display: grid; gap: 0 1rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .grid-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.page-title { margin: .25rem 0 1rem; }
.page-head { display: flex; align-items: center; justify-content: space-between; }
.greet { margin: .25rem 0 1rem; }
.greet p { margin: 0; font-size: .9rem; }
.label { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 .15rem; font-weight: 600; }
.big { font-size: 2.2rem; font-weight: 800; letter-spacing: -.03em; margin: 0; }
.mid { font-size: 1.25rem; font-weight: 750; margin: 0; }
.hero-card { background: var(--brand-deep); color: #fff; border: 0; }
.hero-card .label { color: var(--brand-on-dark); }
.hero-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.hero-sub { color: #D5E8DA; margin: .6rem 0 .8rem; }
.hero-sub a { color: #fff; text-decoration-color: var(--brand-bright); }
.hero-card .over-txt { color: #FF8A8A; }
.ring { --p: 0; width: 72px; height: 72px; border-radius: 50%; background: conic-gradient(var(--brand-bright) calc(var(--p) * 1%), rgba(255,255,255,.16) 0); display: grid; place-items: center; flex: none; }
.ring span { width: 56px; height: 56px; border-radius: 50%; background: var(--brand-deep); display: grid; place-items: center; font-weight: 750; font-size: .95rem; }
.chart-wrap { margin: 0 -.2rem; }
.chart { width: 100%; height: auto; display: block; }
.chart .cbar { fill: var(--brand-bright); }
.chart .cbar.future { fill: rgba(255,255,255,.14); }
.chart .cum { stroke: #fff; stroke-width: 1.6; opacity: .7; }
.chart text { fill: var(--brand-on-dark); font-size: 9px; }
.chart-legend { font-size: .75rem; color: var(--brand-on-dark); margin: .3rem 0 0; display: flex; align-items: center; gap: .4rem; }
.lg-bar { width: 10px; height: 10px; background: var(--brand-bright); border-radius: 2px; display: inline-block; }
.lg-line { width: 14px; height: 2px; background: #fff; opacity: .7; display: inline-block; margin-inline-start: .6rem; }
.summary-strip { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; }

/* budget bars */
.bline { padding: .65rem 0; border-bottom: 1px solid var(--line); }
.bline:last-child { border-bottom: 0; }
.bline-head, .bline-foot { display: flex; justify-content: space-between; gap: .5rem; align-items: baseline; }
.bline-name { font-weight: 650; display: inline-flex; align-items: center; }
.bline-foot { font-size: .82rem; margin-top: .3rem; }
.b-ic { display: inline-block; width: 1.6em; }
.bar { height: 10px; background: #EFEDE4; border-radius: 99px; overflow: hidden; margin-top: .4rem; }
.bar span { display: block; height: 100%; border-radius: 99px; background: var(--ok); transition: width .4s; }
.status-warn .bar span { background: var(--warn); }
.status-over .bar span { background: var(--over); }
.status-full .bar span { background: var(--brand-deep); }
.over-txt, .status-over .bline-foot .over-txt { color: var(--over); font-weight: 650; }
.month-nav { display: flex; align-items: center; justify-content: center; gap: 1.25rem; margin-bottom: 1rem; }
.month-nav a, .month-nav .disabled { font-size: 1.5rem; text-decoration: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; }
.month-nav a:hover { background: var(--line); }
.month-nav .disabled { color: var(--line); }
.bedit-row { display: flex; align-items: center; gap: .75rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.money-in { display: inline-flex; align-items: center; gap: .2rem; color: var(--muted); }
.money-in input { width: 6.5rem; text-align: end; }
.sticky-actions { position: sticky; bottom: calc(70px + env(safe-area-inset-bottom)); background: var(--surface); padding: .75rem 0 .25rem; }
@media (min-width: 760px) { .sticky-actions { bottom: 0; } }

/* lists */
.txns, .acctlist, .toplist, .rulelist, .notes, .menu, .codes { list-style: none; margin: 0; padding: 0; }
.txn { display: flex; align-items: center; gap: .75rem; padding: .6rem 0; }
.txns-edit .txn { padding: .7rem 1rem; cursor: pointer; }
.txns-edit li { border-bottom: 1px solid var(--line); }
.txns-edit li:last-child { border-bottom: 0; }
.txn-d summary { list-style: none; }
.txn-d summary::-webkit-details-marker { display: none; }
.txn-d[open] summary { background: var(--brand-soft); }
.txn-ic { width: 38px; height: 38px; flex: none; border-radius: 12px; display: grid; place-items: center; font-size: 1.1rem; background: color-mix(in srgb, var(--c) 16%, white); }
.txn-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.txn-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.txn-sub { font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.txn-acct { display: flex; align-items: center; gap: .3rem; margin-top: .15rem; min-width: 0; font-size: .75rem; line-height: 1.2; color: #3F4A42; }
.txn-acct-ic { flex: none; font-size: .8rem; }
.txn-acct-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.txn-acct-mask { flex: none; font-variant-numeric: tabular-nums; letter-spacing: .02em; color: var(--muted); }
.txn-amt { font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.txn-amt { color: var(--expense); }
.txn-amt.in { color: var(--income); }
.day-sep { padding: .9rem 1rem .3rem; font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; background: #FBFAF6; }
.recat { padding: .5rem 1rem 1rem; background: var(--brand-soft); display: grid; gap: .6rem; }
.recat .field { margin: 0; }
.hint { font-size: .8rem; color: var(--muted); padding: .7rem 1rem 0; margin: 0; }
.acctlist li, .toplist li, .rulelist li { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .75rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.acctlist li:last-child, .toplist li:last-child, .rulelist li:last-child { border-bottom: 0; }
.rulelist li > .grow { flex: 1 1 12rem; }
.acct-name { display: block; font-weight: 600; }
.acctlist .muted { display: block; }
.owed { color: var(--ink); }
.acct-sum { display: flex; flex-wrap: wrap; gap: .2rem 1rem; justify-content: space-between; font-size: .85rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: .6rem; margin-top: .2rem; }
.menu a { display: flex; align-items: center; gap: .9rem; padding: 1rem 1.1rem; text-decoration: none; border-bottom: 1px solid var(--line); font-weight: 600; }
.menu li:last-child a { border-bottom: 0; }
.menu a:hover { background: #FBFAF6; }
.notes .note { display: flex; gap: .8rem; padding: .9rem 1.1rem; border-bottom: 1px solid var(--line); }
.note-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: .4rem; flex: none; background: var(--line); }
.note.unread .note-dot { background: var(--brand-deep); }
.note-budget_100 .note-dot { background: var(--over) !important; }
.empty { padding: 2rem 1rem; text-align: center; color: var(--muted); }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: .4rem; margin-top: .5rem; }
.codes code { background: #fff; padding: .35rem .6rem; border-radius: 8px; display: block; text-align: center; border: 1px solid var(--line); }
.steps { padding-inline-start: 1.2rem; }
.steps li { margin-bottom: .6rem; }
.qr { background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-top: .4rem; padding: 6px; }
.secret { word-break: break-all; background: #F1EFE6; padding: .1rem .35rem; border-radius: 6px; }

/* alerts & flash */
.alert { display: block; text-decoration: none; border-radius: 14px; padding: .8rem 1rem; margin-bottom: .75rem; border: 1px solid; }
.alert strong { display: block; }
.alert span { font-size: .88rem; }
.alert-more { display: block; font-size: .85rem; margin: -.3rem 0 .9rem; margin-inline-start: .2rem; color: var(--muted); }
.alert-warn { background: #FFF4DE; border-color: #F6D9A0; }
.alert-over { background: #FDECEC; border-color: #F3C0C0; }
.flash-stack { margin-bottom: 1rem; }
.flash { padding: .75rem 1rem; border-radius: 12px; background: var(--brand-soft); border: 1px solid var(--brand-line); margin-bottom: .5rem; font-size: .95rem; }
.flash-error { background: #FDECEC; border-color: #F3C0C0; }
.flash-info { background: var(--brand-soft); border-color: var(--brand-line); }
.pill { display: inline-block; font-size: .72rem; font-weight: 700; padding: .12rem .5rem; border-radius: 99px; background: #EFEDE4; color: var(--muted); vertical-align: middle; }
.pill-ok { background: var(--brand-soft); color: var(--brand-deep); }
.pill-over { background: #FBDADA; color: #A42F2F; }

/* forms & buttons */
.field { display: block; margin-bottom: .9rem; }
.field > span { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .3rem; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=tel], input[type=date], input:not([type]), select {
  width: 100%; font: inherit; font-size: 16px; padding: .7rem .8rem; border: 1px solid #D9D6CA; border-radius: 12px; background: #fff; color: var(--ink); }
input:focus, select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--brand-line); }
.err { color: var(--over); display: block; margin-top: .25rem; }
.check { display: flex; gap: .5rem; align-items: center; font-size: .9rem; }
.check input { width: 18px; height: 18px; accent-color: var(--ink); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; font: inherit; font-weight: 650; font-size: .95rem; padding: .65rem 1.1rem; border-radius: 999px; border: 1px solid #D9D6CA; background: #fff; color: var(--ink); cursor: pointer; text-decoration: none; min-height: 44px; }
.btn:hover { border-color: var(--ink); }
.btn-primary { background: var(--brand-deep); border-color: var(--brand-deep); color: #fff; }
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn-ink { background: var(--brand-deep); color: #fff; border-color: var(--brand-deep); }
.btn-ink:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-danger { background: var(--over); color: #fff; border-color: var(--over); }
.danger-txt { color: var(--over); }
.btn-sm { min-height: 34px; padding: .3rem .8rem; font-size: .85rem; }
.btn-lg { padding: .9rem 1.6rem; font-size: 1.05rem; }
.btn-block { width: 100%; margin-top: .4rem; }
.btn-row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.inline { display: inline; }
.row-form { display: flex; gap: .5rem; }
.row-form input { max-width: 10rem; letter-spacing: .2em; }
.filters { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-bottom: 1rem; }
.filters input[type=search] { grid-column: 1 / -1; }
.filters select[name=account] { grid-column: 1 / -1; }
.filters select { min-width: 0; }
@media (min-width: 760px) { .filters { grid-template-columns: 2fr 1fr 1fr 1.3fr; } .filters input[type=search], .filters select[name=account] { grid-column: auto; } }
.pager { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.rule-form { display: grid; gap: 0; }
@media (min-width: 760px) { .rule-form { grid-template-columns: 2fr 1.4fr auto; gap: .75rem; align-items: end; } .rule-form .btn { margin-bottom: .9rem; } }
details summary { cursor: pointer; }
.empty-hero { text-align: start; }

/* auth */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem 1rem; }
.auth-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 1.75rem 1.4rem; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 1.45rem; }
.auth-alt { text-align: center; font-size: .9rem; color: var(--muted); margin-top: 1.1rem; }

/* landing */
.landing-wrap { max-width: 1040px; margin: 0 auto; padding: 1rem 1.25rem 2rem; }
.land-top { display: flex; justify-content: space-between; align-items: center; }
.hero { text-align: center; padding: 3.5rem 0 2.5rem; }
.hero h1 { font-size: clamp(2.1rem, 7vw, 3.6rem); letter-spacing: -.035em; max-width: 14ch; margin: 0 auto 1rem; }
.hero p { font-size: 1.1rem; color: var(--muted); max-width: 34rem; margin: 0 auto 1.5rem; }
.hl { background: linear-gradient(transparent 58%, var(--brand-line) 58%); padding: 0 .1em; }
.features { display: grid; gap: .9rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; }
.feature p { color: var(--muted); margin: 0; font-size: .95rem; }
.f-ic { font-size: 1.6rem; display: block; margin-bottom: .4rem; }
.land-foot { text-align: center; color: var(--muted); font-size: .85rem; padding: 2.5rem 0 0; }

/* tappable categories + category detail */
a.bline-link { display: block; color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
a.bline-link:hover .bline-name, a.bline-link:focus-visible .bline-name { color: var(--brand); }
a.bline-link:active { background: var(--brand-soft); }
.chev { color: var(--muted); margin-inline-start: .35rem; font-weight: 600; }
.toplist li { padding: 0; }
.toplink { display: flex; flex: 1; align-items: center; gap: .75rem; padding: .6rem 0; color: inherit; text-decoration: none; }
.toplink:active { background: var(--brand-soft); }
.catlink { color: inherit; text-decoration: none; }
.cat-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .25rem; }
.cat-head .page-title { margin: 0; display: flex; align-items: center; gap: .6rem; }
.back { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 50%; font-size: 1.4rem; text-decoration: none; color: var(--brand); margin-inline-start: -.5rem; }
.back:hover { background: var(--line); }
.cat-emoji { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-size: 1.3rem; background: color-mix(in srgb, var(--c) 16%, white); }
.cat-sum .bline { padding: 0; border: 0; }
.cat-sum .label { display: block; }
.big-num { display: block; font-size: 1.7rem; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.cat-sum .bar { height: 12px; margin-top: .6rem; }
.cat-sum .bline-foot { font-size: .9rem; margin-top: .5rem; }

/* line icons (Lucide, ISC) drawn from the inline sprite; stroke takes the category colour */
.ic { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; }
.cat-chip { width: 34px; height: 34px; flex: none; border-radius: 11px; display: inline-grid; place-items: center; color: var(--c); background: #F2F1EB; margin-inline-end: .6rem; }
.cat-chip .ic { width: 19px; height: 19px; }
.cat-chip.sm { width: 28px; height: 28px; border-radius: 9px; margin-inline-end: .55rem; }
.cat-chip.sm .ic { width: 16px; height: 16px; }
.toplink .cat-chip { margin-inline-end: 0; }
.txn-ic { color: var(--c); background: #F2F1EB; }
.txn-ic .ic { width: 20px; height: 20px; }
.txn-acct-ic { display: inline-flex; color: #5B665E; }
.txn-acct-ic .ic { width: 13px; height: 13px; stroke-width: 2; }
.cat-emoji { color: var(--c); background: #F2F1EB; }
.cat-emoji .ic { width: 23px; height: 23px; }
.cat-head .cat-edit { margin-inline-start: auto; }
.inline-ic { color: var(--c); display: inline-flex; }
.menu-ic { display: inline-flex; color: var(--brand-deep); }
.catlist li { align-items: center; }
.catlist .catlink { display: flex; align-items: center; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* category form pickers */
.pick { border: 0; padding: 0; margin: 0 0 1rem; min-width: 0; }
.pick legend { font-size: .9rem; font-weight: 600; margin-bottom: .45rem; padding: 0; }
.swatches { display: grid; grid-template-columns: repeat(7, 1fr); gap: .5rem; }
.swatch, .icon-opt { position: relative; display: block; cursor: pointer; }
.swatch input[type=radio], .icon-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.swatch > span { display: block; aspect-ratio: 1; max-width: 40px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); position: relative; }
.swatch input:checked + span { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--c); }
.swatch input:focus-visible + span, .icon-opt input:focus-visible + span { outline: 2px solid var(--brand-deep); outline-offset: 3px; }
.swatch input:checked + span::after { content: ""; position: absolute; left: 50%; top: 46%; width: 30%; height: 16%; border: solid #fff; border-width: 0 0 2.5px 2.5px; transform: translate(-50%, -50%) rotate(-45deg); }
.swatch-custom > span { background: conic-gradient(#C2410C, #B45309, #4D7C0F, #059669, #0369A1, #4338CA, #7E22CE, #BE185D, #C2410C); }
.swatch-custom input:checked + span { background: var(--c); }
.swatch-custom input[type=color] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: .35rem; }
.icon-opt > span { display: grid; place-items: center; height: 44px; border-radius: 12px; color: var(--ink); border: 1px solid var(--line); background: var(--surface); }
.icon-opt .ic { width: 21px; height: 21px; }
.icon-opt input:checked + span { color: var(--c); border-color: var(--c); background: color-mix(in srgb, var(--c) 12%, white); box-shadow: inset 0 0 0 1px var(--c); }
.del-form { display: block; margin-top: 1rem; }
.cat-name { color: var(--c); }
.txn-sub .cat-name { font-weight: 600; }
.exp-amt { color: var(--expense); }
.bline-nums .exp-amt { font-weight: 600; }   /* red amounts never in normal weight */
.inc-amt { color: var(--income); }
.hero-card .big.exp-amt { color: #FF7A70; }
.catlist .cat-name, .toplink .cat-name, .bline-name .cat-name { font-weight: 600; }

/* ---- Language switch & settings ---- */
.lang-form .field { margin: 0; }
.lang-form select { width: 100%; }
.lang-compact { display: inline-block; }
.lang-compact .field { display: inline-block; }
.lang-compact select { width: auto; min-width: 9rem; padding: .35rem .6rem; font-size: .85rem; background: transparent; }
.auth-lang { text-align: center; margin-top: 1rem; }
.land-foot { display: flex; flex-direction: column; align-items: center; gap: .6rem; }
.setting-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-top: .8rem; margin-top: .8rem; border-top: 1px solid var(--line); font-size: .95rem; }
.chart-wrap { direction: ltr; } /* time runs left to right in every language */

/* ---- Right-to-left (Hebrew) ---- */
.dir-arrow { display: inline-block; }
/* ← → are not mirrored by the browser, so flip them; ‹ › are Unicode-mirrored automatically in RTL. */
[dir=rtl] .dir-arrow { transform: scaleX(-1); }
[dir=rtl] .skip { left: auto; right: -999px; }
[dir=rtl] .skip:focus { right: .5rem; }
[dir=rtl] .money-in input, [dir=rtl] input[type=email], [dir=rtl] input[type=password], [dir=rtl] .secret, [dir=rtl] .codes code { direction: ltr; }
[dir=rtl] .money-in input { text-align: left; }
[dir=rtl] .swatch input:checked + span::after { transform: translate(-50%, -50%) rotate(-45deg); }
[dir=rtl] .txn-amt, [dir=rtl] .exp-amt, [dir=rtl] .inc-amt { unicode-bidi: isolate; }
.tabbar a { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
[dir=rtl] .txn-acct-mask { direction: ltr; unicode-bidi: isolate; } /* ••1177 stays readable */

/* --- Add income/expense, transaction detail, receipts ---------------------------------------- */
.fab { position: fixed; z-index: 11; inset-inline-end: 1rem; bottom: calc(78px + env(safe-area-inset-bottom)); width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-deep); color: #fff; box-shadow: 0 6px 18px rgba(20,83,45,.35), 0 2px 4px rgba(0,0,0,.12); text-decoration: none; }
.fab:hover, .fab:active { background: var(--brand-hover); }
.fab .ic { width: 28px; height: 28px; stroke-width: 2.2; }
@media (min-width: 760px) { .fab { bottom: 1.5rem; inset-inline-end: 1.5rem; } }
.tag-manual { display: inline-block; font-size: .66rem; font-weight: 700; letter-spacing: .02em; text-transform: lowercase; padding: .05rem .4rem; border-radius: 99px; background: #EFEDE4; color: #5B665E; vertical-align: 1px; }
.tag-receipt { display: inline-flex; vertical-align: -2px; color: #5B665E; }
.tag-receipt .ic { width: 13px; height: 13px; stroke-width: 2; }
.txn-tap { position: relative; }
.txn-open { text-decoration: none; color: inherit; }
.txn-open::after { content: ""; position: absolute; inset: 0; }
.txn-more { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: 0 1rem 1rem; }
.txn-more .btn .ic, .rc-actions .btn .ic, .del-form .btn .ic, .cat-edit .ic, .rc-up .btn .ic, .rc-pick .ic { width: 16px; height: 16px; }
.rc-thumb { display: block; flex: none; width: 76px; height: 96px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #F2F1EB; }
.rc-thumb.sm { width: 44px; height: 44px; border-radius: 8px; }
.rc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rc-pdf { display: grid; place-items: center; align-content: center; gap: 2px; width: 100%; height: 100%; color: var(--expense); font-size: .7rem; font-weight: 600; }
.rc-pdf .ic { width: 22px; height: 22px; }
.rc-list { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .75rem; }
.rc-list li { display: flex; gap: .85rem; align-items: center; }
.rc-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.rc-up { margin: 0; }
.rc-up label.btn, .rc-pick { cursor: pointer; position: relative; }
.rc-full { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem; text-align: center; }
.rc-full img { max-width: 100%; height: auto; display: block; margin: 0 auto; border-radius: 8px; }
.rc-pdf-view { width: 100%; height: 70vh; border: 0; }
.txd-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.txd-top { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .75rem; }
.txd-amt { font-size: 1.9rem; letter-spacing: -.01em; }
.txd-facts { margin: 0 0 .5rem; display: grid; gap: .55rem; }
.txd-facts div { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: .5rem; align-items: baseline; }
.txd-facts dt { color: var(--muted); font-size: .85rem; }
.txd-facts dd { margin: 0; min-width: 0; }
.txd-facts .txn-acct { margin: 0; font-size: .95rem; color: var(--ink); }
.txd-note { white-space: normal; overflow-wrap: anywhere; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 999px; background: #EFEDE4; margin-bottom: 1rem; }
.seg-opt { position: relative; }
.seg-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.seg-opt span { display: block; text-align: center; padding: .55rem .5rem; border-radius: 999px; font-weight: 700; color: var(--muted); }
.seg-expense input:checked + span { background: #fff; color: var(--expense); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.seg-income input:checked + span { background: #fff; color: var(--income); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.seg-opt input:focus-visible + span { outline: 2px solid var(--brand-deep); outline-offset: 1px; }
.field > .amt-wrap { display: flex; align-items: center; gap: .35rem; direction: ltr; font-size: inherit; font-weight: inherit; margin: 0; }
.amt-wrap input { flex: 1; min-width: 0; }
.amt-field input { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--expense); }
.mform[data-kind=income] .amt-field input { color: var(--income); }
.amt-sign { font-size: 1.6rem; font-weight: 700; color: var(--expense); min-width: .7ch; }
.amt-sign::before { content: "−"; }
.mform[data-kind=income] .amt-sign { color: var(--income); }
.mform[data-kind=income] .amt-sign::before { content: "+"; }
.cat-opts { display: flex; flex-wrap: wrap; gap: .4rem; }
.cat-opt { position: relative; }
.cat-opt[hidden] { display: none; }
.cat-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.cat-opt > span { display: inline-flex; align-items: center; padding: .25rem .7rem .25rem .3rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: .88rem; font-weight: 600; }
.cat-opt .cat-chip.sm { width: 26px; height: 26px; border-radius: 50%; margin-inline-end: .4rem; }
.cat-opt input:checked + span { border-color: var(--brand-deep); box-shadow: inset 0 0 0 1px var(--brand-deep); background: var(--brand-soft); }
.cat-opt input:focus-visible + span { outline: 2px solid var(--brand-deep); outline-offset: 1px; }
.mform textarea { width: 100%; box-sizing: border-box; font: inherit; padding: .65rem .8rem; border: 1px solid #D9D6CA; border-radius: 12px; background: #fff; resize: vertical; }
.mform input[type=date] { width: 100%; box-sizing: border-box; font: inherit; padding: .62rem .8rem; border: 1px solid #D9D6CA; border-radius: 12px; background: #fff; min-height: 2.9rem; }
@media (min-width: 420px) { .mform-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.rc-pick { justify-content: center; border-style: dashed; color: var(--brand-deep); }
.rc-pick.has-file { border-style: solid; background: var(--brand-soft); }
.rc-pick-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 80%; }
.rc-field > span:first-child { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .3rem; }
[dir=rtl] .txd-amt, [dir=rtl] .amt-wrap { unicode-bidi: isolate; }
main:has(.fab) { padding-bottom: 6.5rem; } /* last row can scroll clear of the + button */

/* Category screen: this month vs your average */
.avg-card { padding-bottom: .9rem; }
.avg-now { display: flex; align-items: baseline; gap: .5rem; margin: 0; flex-wrap: wrap; }
.avg-now .big-num { display: inline; }
.avg-cmp { margin: .3rem 0 .2rem; font-weight: 650; display: flex; align-items: center; gap: .45rem; color: var(--muted); }
.avg-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: currentColor; }
.avg-bad .avg-cmp { color: var(--expense); }
.avg-good .avg-cmp { color: var(--income); }
.avg-chart-wrap { margin: .55rem 0 .2rem; }
.avg-chart { width: 100%; height: auto; display: block; overflow: visible; }
.avg-chart .abar { fill: #E2DFD3; }
.avg-chart .abar.now { fill: #8F8D84; }
.avg-chart .abar.now.bad { fill: var(--expense); }
.avg-chart .abar.now.good { fill: var(--income); }
.avg-chart .aline { stroke: var(--ink); stroke-width: 1.2; stroke-dasharray: 3 3; opacity: .55; }
.avg-chart text { font-size: 10px; fill: var(--muted); }
.avg-note { margin: .2rem 0 0; }
.seg-3 { grid-template-columns: repeat(3, 1fr); margin: .7rem 0 0; }
.seg-btn { appearance: none; border: 0; background: transparent; font: inherit; font-weight: 700; color: var(--muted); padding: .45rem .4rem; border-radius: 999px; cursor: pointer; min-height: 36px; }
.seg-btn.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.seg-btn:focus-visible { outline: 2px solid var(--brand-deep); outline-offset: 1px; }
.seg-4 { grid-template-columns: 1fr 1fr 1fr auto; margin: .7rem 0 0; }
.seg-4.has-custom { grid-template-columns: 1fr 1fr 1fr 1.25fr; }
.seg-4 .seg-btn { white-space: nowrap; padding-inline: .3rem; }
.seg-4 .seg-plus { min-width: 44px; padding-inline: .75rem; display: inline-flex; align-items: center; justify-content: center; gap: .3rem; white-space: nowrap; }
.seg-plus .plus-ic { font-size: 1.25rem; line-height: 1; font-weight: 600; }
.seg-plus.on { color: var(--brand-deep); }
.seg-plus.on .plus-ic { font-size: 1rem; opacity: .7; }
/* bottom sheet (period picker) */
dialog.sheet { position: fixed; inset: auto 0 0 0; margin: 0 auto; width: 100%; max-width: 480px; max-height: 90vh; overflow: auto; border: 0; padding: 0; border-radius: 20px 20px 0 0; background: #fff; color: var(--ink); box-shadow: 0 -8px 30px rgba(0,0,0,.18); }
dialog.sheet::backdrop { background: rgba(24,24,20,.45); }
.sheet-body { padding: .55rem 1.1rem calc(1.1rem + env(safe-area-inset-bottom)); }
.sheet-grab { width: 40px; height: 4px; border-radius: 2px; background: #D9D6CA; margin: 0 auto .9rem; }
.sheet-title { font-size: 1.1rem; margin: 0 0 .2rem; }
.chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: .9rem 0 1.1rem; }
.chip { appearance: none; font: inherit; font-weight: 650; min-height: 44px; border-radius: 999px; border: 1px solid #D9D6CA; background: #fff; color: var(--ink); cursor: pointer; }
.chip.on { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand-hover); }
.chip:focus-visible, .step-btn:focus-visible { outline: 2px solid var(--brand-deep); outline-offset: 1px; }
.step-label { display: block; text-align: center; font-weight: 650; color: var(--muted); font-size: .9rem; }
.stepper { display: flex; align-items: center; justify-content: center; gap: 1.1rem; margin: .5rem 0 1.1rem; }
.step-btn { appearance: none; width: 48px; height: 48px; border-radius: 50%; border: 1px solid #D9D6CA; background: #fff; color: var(--ink); font: inherit; font-size: 1.5rem; line-height: 1; cursor: pointer; }
.step-btn:disabled { opacity: .35; cursor: default; }
.step-val { width: 3.2ch; text-align: center; font: inherit; font-size: 2.1rem; font-weight: 700; border: 0; border-bottom: 2px solid var(--brand-line); background: transparent; color: var(--ink); padding: 0 .1rem; -moz-appearance: textfield; appearance: textfield; }
.step-val::-webkit-outer-spin-button, .step-val::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.step-val:focus { outline: none; border-bottom-color: var(--brand-deep); }
.sheet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }

/* Savings goals */
.goal-state { display: block; border-radius: 14px; padding: .8rem 1rem; margin-bottom: .75rem; border: 1px solid; }
.goal-state strong { display: block; }
.goal-state span { display: block; font-size: .88rem; }
.goal-state .gs-nums { color: var(--muted); margin-top: .15rem; font-variant-numeric: tabular-nums; }
.gs-short { background: #FDECEC; border-color: #F3C0C0; }
.gs-short strong { color: var(--expense); }
.gs-ok { background: var(--brand-soft); border-color: var(--brand-line); }
.gs-ok strong { color: var(--income); }
.alert-ok { background: var(--brand-soft); border-color: var(--brand-line); }
.note-goals_short .note-dot { background: var(--over) !important; }
.goal-list { padding-top: .3rem; padding-bottom: .3rem; }
.goal-row { display: block; text-decoration: none; color: inherit; padding: .75rem 0; border-bottom: 1px solid var(--line); }
.goal-row:last-child { border-bottom: 0; }
.goal-head { display: flex; align-items: center; gap: .2rem; }
.goal-name { font-weight: 650; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.goal-bar span { background: var(--c, var(--ok)); }
.goal-foot { display: flex; justify-content: space-between; gap: .5rem; font-size: .84rem; margin-top: .35rem; font-variant-numeric: tabular-nums; flex-wrap: wrap; }
.goals-card .goal-state { margin-bottom: .3rem; }
.goal-help { margin: .2rem .3rem 1rem; }
.goal-sum .bar { height: 12px; margin-top: .6rem; }
.goal-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; margin: .9rem 0 .4rem; }
.goal-facts div { background: #F6F5F0; border-radius: 12px; padding: .5rem .6rem; }
.goal-facts dt { font-size: .74rem; color: var(--muted); font-weight: 600; }
.goal-facts dd { margin: .1rem 0 0; font-weight: 750; font-variant-numeric: tabular-nums; }
.ok-txt { color: var(--income); font-weight: 650; }
.money-amt input { color: var(--ink); }
.money-amt .amt-sign { color: var(--muted); font-size: 1.3rem; }
.money-amt .amt-sign::before { content: none; }
.card-pad { padding: 1rem 1.1rem 0; margin: 0; }
.contribs li { display: flex; align-items: center; gap: .6rem; padding: .7rem 1.1rem; border-bottom: 1px solid var(--line); }
.contribs li:last-child { border-bottom: 0; }
.icon-btn { appearance: none; border: 0; background: transparent; color: var(--muted); padding: .4rem; border-radius: 10px; cursor: pointer; display: inline-grid; place-items: center; }
.icon-btn:hover { background: #F2F1EB; color: var(--expense); }
.icon-btn .ic { width: 18px; height: 18px; }

/* Merchant dropdown on the add/edit form */
.merch-label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .3rem; }
.merch-wrap { position: relative; }
.merch-wrap input { width: 100%; box-sizing: border-box; }
.merch-list { position: absolute; z-index: 20; inset-inline: 0; top: calc(100% + 4px); margin: 0; padding: .3rem; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 8px 28px rgba(31,31,27,.14); max-height: 280px; overflow-y: auto; }
.merch-list[hidden] { display: none; }
.merch-opt { display: flex; align-items: center; gap: .55rem; padding: .5rem .55rem; border-radius: 10px; cursor: pointer; }
.merch-opt:hover, .merch-opt.on { background: var(--brand-soft); }
.merch-opt .cat-chip.xs { width: 26px; height: 26px; border-radius: 50%; margin: 0; }
.merch-opt .cat-chip.xs .ic { width: 15px; height: 15px; }
.merch-opt .cat-chip.blank { background: #F2F1EB; }
.merch-name { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.merch-cat { font-size: .78rem; flex: none; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- Tags: chips on rows, chip input, Settings → Tags, tag detail ------------------------------- */
.tchip { --c: #475569; display: inline-flex; align-items: center; gap: .1rem; max-width: 10rem; padding: .02rem .42rem; border-radius: 99px;
  font-size: .68rem; font-weight: 650; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none;
  color: var(--c); background: color-mix(in srgb, var(--c) 11%, #fff); border: 1px solid color-mix(in srgb, var(--c) 24%, #fff); }
.tchip::before { content: "#"; opacity: .55; font-weight: 600; }
a.tchip:hover { background: color-mix(in srgb, var(--c) 18%, #fff); }
.tchip-lg { font-size: .9rem; padding: .2rem .7rem; max-width: 100%; }
.txn-tags { display: flex; flex-wrap: nowrap; gap: .25rem; margin-top: .2rem; min-width: 0; overflow: hidden; }
.txn-tags .tchip { flex: none; max-width: 8.5rem; }
.ti-wrap { position: relative; }
.tag-opt { font-weight: 400; }
.ti-box { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; min-height: 48px; padding: .35rem .45rem; border: 1px solid #D9D6CA;
  border-radius: 12px; background: #fff; cursor: text; }
.ti-box:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px var(--brand-line); }
.ti-box .ti-text { flex: 1 1 7rem; min-width: 6rem; width: auto; border: 0; box-shadow: none; padding: .35rem .25rem; background: transparent; }
.ti-box .ti-text:focus { box-shadow: none; }
.tchip-x-on { font-size: .85rem; padding-block: .12rem; padding-inline: .6rem .15rem; max-width: 100%; }
.tchip-t { overflow: hidden; text-overflow: ellipsis; }
.tchip-x { flex: none; width: 24px; height: 24px; margin: 0; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit;
  font: inherit; font-size: 1.05rem; line-height: 1; cursor: pointer; }
.tchip-x:hover, .tchip-x:focus-visible { background: color-mix(in srgb, var(--c) 18%, #fff); outline: none; }
.tchip-new { border-style: dashed; }
.ti-help { display: block; margin-top: .3rem; font-size: .76rem; }
.ti-dot { flex: none; width: 14px; height: 14px; border-radius: 50%; background: var(--c, #475569); margin-inline: 6px; }
.ti-create .ti-dot { width: 18px; height: 18px; margin-inline: 4px; background: transparent; border: 1.5px dashed var(--muted); display: grid; place-items: center;
  font-size: .8rem; font-weight: 700; line-height: 1; color: var(--muted); }
.ti-create .merch-name { font-weight: 500; }
.tag-form { display: grid; gap: .5rem; margin-top: 1rem; padding-top: .9rem; border-top: 1px solid var(--line); }
.tag-form .field { margin: 0; }
.tag-form .ti-save { justify-self: start; }
.txd-taglinks { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; margin: .6rem 0 0; }
.txd-taglinks .tchip { font-size: .78rem; padding: .1rem .55rem; }
.page-lead { margin: -.25rem 0 1rem; }
.taglist li { display: flex; align-items: center; gap: .5rem; }
.taglink { display: flex; align-items: center; gap: .6rem; min-width: 0; color: inherit; text-decoration: none; }
.taglink .tchip { flex: 0 1 auto; min-width: 0; }
.tag-n { flex: none; }
.tag-active { display: flex; align-items: center; gap: .45rem; margin: -.25rem 0 .8rem; min-width: 0; }
.tag-active .tchip { min-width: 0; flex: 0 1 auto; }
.tag-clear { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #EFEDE4; color: var(--ink); text-decoration: none; font-size: 1.1rem; line-height: 1; }
.tag-total { margin-inline-start: auto; flex: none; }
.tag-sum .bline-head { align-items: flex-end; }
.tag-in { display: flex; flex-direction: column; align-items: flex-end; font-weight: 650; }
.tag-sum p { margin: .6rem 0 0; }
.filters select[name=tag] + select[name=account] { grid-column: auto; }
@media (min-width: 760px) { .filters:has(select[name=tag]) { grid-template-columns: 2fr 1fr 1fr 1fr 1.3fr; } }

/* profile */
.me { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; text-decoration: none; flex: none; }
.me:hover .avatar { box-shadow: 0 0 0 3px var(--line); }
.avatar { display: inline-grid; place-items: center; flex: none; border-radius: 50%; overflow: hidden; background: var(--brand-soft); color: var(--brand-deep); font-weight: 750; border: 1px solid var(--brand-line); line-height: 1; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-sm { width: 32px; height: 32px; font-size: .78rem; }
.avatar-md { width: 48px; height: 48px; font-size: 1rem; }
.avatar-lg { width: 88px; height: 88px; font-size: 1.7rem; }
.pf-card { display: flex; align-items: center; gap: .9rem; padding: .95rem 1.1rem; text-decoration: none; }
.pf-card:hover { background: #FBFAF6; }
.pf-card-name { font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-hero { display: flex; align-items: center; gap: 1rem; }
.pf-who { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: .2rem; }
.pf-name { font-size: 1.25rem; line-height: 1.25; overflow-wrap: anywhere; }
.pf-mail { font-size: .92rem; overflow-wrap: anywhere; }
.pf-sec { margin: 0; padding: .9rem 1.1rem .2rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.pf-list { margin: 0; }
.pf-list > div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .75rem 1.1rem; border-bottom: 1px solid var(--line); }
.pf-list > div:last-child { border-bottom: 0; }
.pf-list dt { color: var(--muted); font-size: .92rem; flex: none; }
.pf-list dd { margin: 0; text-align: end; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.pf-list dd .muted { font-weight: 400; }
.pf-private { text-align: center; margin: .2rem 0 1.5rem; }
.pf-photo { display: flex; align-items: center; gap: 1rem; }
.pf-photo-ctl { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; }
.pf-pick { position: relative; overflow: hidden; cursor: pointer; }
.pf-pick input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.pf-pick:focus-within { outline: 3px solid var(--brand-deep); outline-offset: 2px; }
.pf-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 .7rem; }
.pf-form .card h2 { font-size: 1rem; margin: 0 0 .8rem; }
.field .hint { display: block; margin-top: .3rem; font-size: .8rem; padding: 0; }
.req { color: var(--over); }
.field:has(.err) input, .field:has(.err) select { border-color: var(--over); }
input[type=date] { min-height: 46px; -webkit-appearance: none; appearance: none; }
[dir=rtl] input[dir=ltr] { text-align: right; }
.pf-actions { display: flex; gap: .6rem; justify-content: flex-end; margin: 0 0 1.5rem; }
.pf-actions .btn-primary { flex: 1; max-width: 16rem; }
.setting-link { text-decoration: none; color: inherit; }
.pf-opt { font-weight: 500; text-transform: none; letter-spacing: 0; }
.pf-why { margin: -.4rem 0 .9rem; }
input[type=number] { width: 100%; font: inherit; font-size: 16px; padding: .7rem .8rem; border: 1px solid #D9D6CA; border-radius: 12px; background: #fff; color: var(--ink); }
.pf-form .money-amt .amt-wrap { border: 1px solid #D9D6CA; border-radius: 12px; background: #fff; padding: 0 0 0 .8rem; }
.pf-form .money-amt .amt-wrap input { border: 0; box-shadow: none; padding-left: .3rem; font-size: 16px; font-weight: 400; color: var(--ink); }
.pf-form .money-amt .amt-sign { font-size: 16px; font-weight: 600; color: var(--muted); min-width: 0; }
.pf-form .money-amt .amt-sign::before { content: none; }
.pf-form .money-amt:focus-within .amt-wrap { border-color: var(--ink); box-shadow: 0 0 0 3px var(--brand-line); }
.pf-list dd > .block { text-align: right; }
[dir=rtl] .pf-list dd > .block { text-align: left; }

/* cards (credit card catalog) */
.menu-sub { font-weight: 500; margin-top: .1rem; }
.seg-links { display: grid; grid-template-columns: 1fr 1fr; }
.seg-links a { display: flex; align-items: center; justify-content: center; gap: .35rem; padding: .55rem .5rem; border-radius: 999px; font-weight: 700; color: var(--muted); text-decoration: none; min-height: 40px; }
.seg-links a[aria-current="page"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.seg-n { font-size: .75rem; font-weight: 700; padding: .05rem .45rem; border-radius: 99px; background: rgba(31,31,27,.07); }
.seg-links a[aria-current="page"] .seg-n { background: var(--brand-soft); color: var(--brand-deep); }
.cc-filters { margin-bottom: .6rem; }
.cc-filters input[type=search] { grid-column: 1 / -1; }
@media (min-width: 760px) { .cc-filters { grid-template-columns: 2fr 1fr 1fr 1fr 1fr; } .cc-filters input[type=search] { grid-column: auto; } }
.cc-cats { display: flex; gap: .4rem; overflow-x: auto; padding: .1rem .1rem .5rem; margin: 0 -.1rem .2rem; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.cc-cats::-webkit-scrollbar { display: none; }
.cc-cat { flex: none; padding: .38rem .8rem; border-radius: 99px; border: 1px solid #D9D6CA; background: #fff; color: var(--ink); font-size: .85rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.cc-cat[aria-current="true"] { background: var(--brand-deep); border-color: var(--brand-deep); color: #fff; }
.cc-count { margin: 0 0 .5rem; }
.cc-list { list-style: none; margin: 0; padding: 0; }
.cc-row { border-bottom: 1px solid var(--line); }
.cc-row:last-child { border-bottom: 0; }
.cc-link { display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem; text-decoration: none; color: inherit; min-height: 60px; }
.cc-link:hover { background: #FBFAF6; }
.cc-mini { flex: none; width: 46px; height: 30px; border-radius: 5px; display: flex; align-items: flex-end; justify-content: flex-end; padding: 0 4px 2px; font-size: .52rem; font-weight: 800; letter-spacing: .03em; color: #fff; background: #57534E; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); direction: ltr; }
.cc-net-visa { background: linear-gradient(135deg, #1E3A8A, #2563EB); }
.cc-net-mc { background: linear-gradient(135deg, #7C2D12, #EA580C); }
.cc-net-amex { background: linear-gradient(135deg, #0E7490, #38BDF8); }
.cc-net-disc { background: linear-gradient(135deg, #9A3412, #F59E0B); }
.cc-net-store { background: linear-gradient(135deg, #44403C, #78716C); }
.cc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.cc-name { font-weight: 650; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
[dir=rtl] .cc-name, [dir=rtl] .cc-sub { text-align: right; }
.cc-have { color: var(--brand); font-weight: 800; }
.cc-sub { color: var(--muted); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-issuer { color: var(--ink); font-weight: 600; }
.cc-fee { flex: none; text-align: end; font-weight: 700; font-size: .9rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cc-fee-0 { color: var(--brand); font-size: .8rem; }
.cc-per { color: var(--muted); font-weight: 500; font-size: .75rem; }
.cc-total .big-num { margin: .1rem 0 .2rem; }
.cc-total .empty { padding: 1rem .5rem; }
.cc-disclaimer { margin: .5rem .2rem 1.5rem; }
.cc-title { font-size: 1.25rem; line-height: 1.25; }
.cc-hero { position: relative; aspect-ratio: 1.586; max-width: 250px; margin: 0 auto 1rem; border-radius: 16px; padding: 1rem 1.1rem; color: #fff; display: grid; grid-template-rows: auto 1fr auto auto; box-shadow: 0 10px 24px rgba(31,31,27,.18); direction: ltr; text-align: left; overflow: hidden; }
.cc-hero::after { content: ""; position: absolute; inset: -40% -20% auto auto; width: 70%; aspect-ratio: 1; border-radius: 50%; background: rgba(255,255,255,.09); }
.cc-hero-issuer { font-weight: 700; font-size: .95rem; opacity: .95; }
.cc-hero-chip { width: 38px; height: 28px; border-radius: 6px; background: linear-gradient(135deg, #F5DEB3, #C9A86A); align-self: center; }
.cc-hero-name { font-weight: 700; font-size: .95rem; line-height: 1.25; }
.cc-hero-net { justify-self: end; font-weight: 800; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; opacity: .9; }
.cc-have-form { margin: 0 0 1rem; }
.cc-switch { width: 100%; display: flex; align-items: center; gap: .8rem; font: inherit; font-weight: 650; font-size: 1rem; color: var(--ink); background: #FBFAF6; border: 1px solid var(--line); border-radius: 14px; padding: .75rem .9rem; cursor: pointer; text-align: start; min-height: 52px; }
.cc-switch[aria-checked="true"] { background: var(--brand-soft); border-color: var(--brand-line); }
.cc-knob { flex: none; position: relative; width: 46px; height: 28px; border-radius: 99px; background: #D6D3C7; transition: background .15s; }
.cc-knob::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: inset-inline-start .15s; }
.cc-switch[aria-checked="true"] .cc-knob { background: var(--brand); }
.cc-switch[aria-checked="true"] .cc-knob::after { inset-inline-start: 21px; }
.cc-switch:focus-visible { outline: 2px solid var(--brand-deep); outline-offset: 2px; }
.cc-facts div { grid-template-columns: 7.5rem minmax(0, 1fr); }
.cc-facts dd { overflow-wrap: anywhere; }
.cc-strong { font-weight: 700; }
.cc-apply { margin: 0 0 .75rem; }

/* ---- Bills & reminders (v18) ---- */
.bill-ic { --c: #475569; flex: none; width: 40px; height: 40px; border-radius: 12px; display: inline-grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); }
.bill-ic .ic { width: 21px; height: 21px; }
.page-title .bill-ic { width: 34px; height: 34px; margin-inline-end: .5rem; vertical-align: middle; }
.bill-sum { display: grid; gap: .1rem; }
.bill-list { list-style: none; margin: 0; padding: 0; }
.bill-row { display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.bill-row:last-child { border-bottom: 0; }
.bill-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: .7rem; padding: .85rem .5rem .85rem .9rem; text-decoration: none; color: inherit; }
[dir=rtl] .bill-link { padding: .85rem .9rem .85rem .5rem; }
.bill-main { flex: 1; min-width: 0; display: grid; gap: .1rem; }
.bill-name { font-weight: 650; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.bill-sub { font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bill-alert { font-size: .78rem; color: var(--muted); line-height: 1.3; }
.bill-alert .ic { width: 12px; height: 12px; vertical-align: -1px; }
.bill-top { display: flex; align-items: baseline; gap: .6rem; }
.bill-top .bill-name { flex: 1; min-width: 0; }
.bill-when { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; margin: .1rem 0; }
.bill-amt { font-weight: 700; font-variant-numeric: tabular-nums; flex: none; }
.bill-date { font-size: .78rem; color: var(--muted); }
.bill-pay { flex: none; padding-inline-end: .75rem; }
.pay-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid #D9D6CA; background: #fff; color: var(--brand-deep); font: inherit; font-weight: 800; font-size: 1rem; cursor: pointer; display: grid; place-items: center; }
.pay-btn:hover { background: var(--brand-soft); border-color: var(--brand-line); }
.pay-btn:focus-visible { outline: 2px solid var(--brand-deep); outline-offset: 2px; }
.bp:focus { outline: none; }
.due-badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: .08rem .45rem; border-radius: 99px; background: #F1F0EA; color: var(--muted); white-space: nowrap; }
.due-soon { background: #FEF3C7; color: #92400E; }
.due-now { background: #FDE68A; color: #78350F; }
.due-late { background: #FEE2E2; color: var(--over); }
.is-late .bill-name { color: var(--over); }
.push-cta { display: flex; align-items: center; gap: .8rem; text-decoration: none; color: inherit; background: var(--brand-soft); border-color: var(--brand-line); }
.push-cta[hidden] { display: none; }
.quick-cards { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .5rem; }
.quick-cards li { display: flex; align-items: center; gap: .7rem; font-weight: 600; font-size: .92rem; }
.quick-cards .bill-ic { width: 32px; height: 32px; border-radius: 9px; }
.h-sm { font-size: 1.02rem; margin: 0 0 .4rem; }
.bill-hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: .8rem; }
.bill-hero-date { display: block; font-size: 1.15rem; margin-bottom: .25rem; }
.bill-hero .btn-row { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.bill-next-alerts { margin: .8rem 0 0; color: var(--muted); }
.bill-next-alerts .ic, .bill-perm .ic { width: 14px; height: 14px; vertical-align: -2px; }
.bill-autopay { display: flex; gap: .6rem; align-items: flex-start; margin: .2rem 0 1rem; }
.bill-autopay input { margin-top: .25rem; width: 20px; height: 20px; accent-color: var(--brand-deep); }
.bill-alerts { border: 1px solid var(--line); border-radius: 14px; padding: .8rem .9rem .5rem; margin: 0 0 1rem; }
.bill-alerts legend { font-weight: 700; padding: 0 .3rem; display: inline-flex; gap: .35rem; align-items: center; }
.bill-alerts legend .ic { width: 16px; height: 16px; }
.alert-mode { display: flex; gap: .6rem; align-items: flex-start; padding: .45rem 0; cursor: pointer; font-weight: 600; }
.alert-mode input { margin-top: .2rem; width: 19px; height: 19px; accent-color: var(--brand-deep); flex: none; }
.custom-alerts { padding: .3rem 0 .2rem; }
.custom-alerts[hidden] { display: none; }
.day-chips { display: flex; flex-wrap: wrap; gap: 7px; margin: .55rem 0 .8rem; }
.day-chip { position: relative; }
.day-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.day-chip span { display: inline-flex; align-items: center; min-height: 38px; padding: 0 .8rem; border-radius: 999px; border: 1px solid #D9D6CA; background: #fff; font-weight: 600; font-size: .86rem; }
.day-chip input:checked + span { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-hover); }
.day-chip input:checked + span::before { content: "✓ "; white-space: pre; }
.day-chip input:focus-visible + span { outline: 2px solid var(--brand-deep); outline-offset: 1px; }
.time-field input { max-width: 10rem; }
.bill-perm { margin: .5rem 0 .3rem; }
.type-list { list-style: none; margin: 0; padding: 0; }
.type-list > li { border-top: 1px solid var(--line); }
.type-list summary { display: flex; align-items: center; gap: .75rem; padding: .8rem 1.1rem; cursor: pointer; list-style: none; }
.type-list summary::-webkit-details-marker { display: none; }
.type-list details[open] summary .chev { transform: rotate(90deg); }
.type-list .bill-ic { width: 34px; height: 34px; border-radius: 10px; }
.type-form { padding: 0 1.1rem 1rem; }
.type-form .btn-row { display: flex; gap: .5rem; flex-wrap: wrap; }
.push-box { margin: .8rem 0 .4rem; }
.push-status { margin: .5rem .2rem .3rem; color: var(--muted); min-height: 1.2em; }
.push-box[data-state="on"] .push-status { color: var(--brand-hover); }
.push-box[data-state="blocked"] .push-status, .push-box[data-state="error"] .push-status { color: var(--over); }
.push-box [data-push-test][hidden] { display: none; }
.push-box .cc-switch:disabled { opacity: .6; cursor: default; }
.setting-push { border-top: 1px solid var(--line); }
.ios-hint { color: var(--muted); margin: .4rem 0 .8rem; }
.ios-hint.hl { color: var(--ink); background: #FEF9C3; border-radius: 10px; padding: .55rem .7rem; }
.ios-hint .ic { width: 15px; height: 15px; vertical-align: -2px; }
.perm-card { text-align: center; padding: 1.5rem 1.2rem 1.2rem; }
.perm-card .push-box, .perm-card .perm-points, .perm-card .ios-hint { text-align: start; }
.perm-step { text-transform: uppercase; letter-spacing: .06em; font-weight: 700; margin: 0 0 .6rem; }
.perm-ic { width: 64px; height: 64px; margin: 0 auto .8rem; border-radius: 20px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-deep); }
.perm-ic .ic { width: 32px; height: 32px; }
.perm-title { font-size: 1.3rem; line-height: 1.25; margin: 0 0 .6rem; }
.perm-points { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: .55rem; font-size: .93rem; }
.perm-points li { display: flex; gap: .6rem; align-items: flex-start; }
.perm-points .ic { width: 18px; height: 18px; flex: none; color: var(--brand-deep); margin-top: .1rem; }
.bill-badge { position: static; display: inline-block; vertical-align: 1px; margin-inline-start: .3rem; }
.note-link { color: inherit; text-decoration: none; }
.bp { border: 0; border-radius: 22px; padding: 1.1rem 1rem 1rem; width: min(26rem, calc(100vw - 24px)); box-shadow: 0 20px 60px rgba(0,0,0,.25); color: var(--ink); }
.bp:not([open]) { display: none; }
.bp[open]:not(:modal) { position: fixed; inset: auto 12px 84px; margin: 0 auto; z-index: 60; }
.bp::backdrop { background: rgba(20, 30, 20, .45); }
.bp-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .6rem; }
.bp-head h2 { flex: 1; font-size: 1.1rem; margin: 0; }
.bp-bell { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: #FEF3C7; color: #92400E; }
.bp-bell .ic { width: 19px; height: 19px; }
.bp-x { font-size: 1.5rem; line-height: 1; background: none; border: 0; cursor: pointer; color: var(--muted); min-width: 40px; min-height: 40px; }
.bp-list { list-style: none; margin: 0; padding: 0; }
.bp-row { display: grid; grid-template-columns: auto 1fr; gap: .25rem .7rem; align-items: center; padding: .7rem 0; border-top: 1px solid var(--line); }
.bp-row .bill-ic { grid-row: span 2; align-self: start; }
.bp-acts { grid-column: 2; display: flex; gap: .5rem; }
.bp-acts .btn { min-height: 36px; padding: .35rem .85rem; font-size: .85rem; }
.bp-amt { font-weight: 700; }
.bp-foot { display: flex; justify-content: space-between; gap: .5rem; margin-top: .6rem; padding-top: .6rem; border-top: 1px solid var(--line); }

/* Subscriptions, price changes, credit left */
.sec-title { margin: 1.2rem .2rem .3rem; }
.plain-list { list-style: none; margin: .3rem 0 0; padding: 0; }
.plain-list li { display: flex; align-items: center; gap: .6rem; padding: .45rem 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.plain-list li:last-child { border-bottom: 0; }
.warn-txt { color: #92400E; font-weight: 600; }
.sub-sum .sub-totals { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-bottom: .2rem; }
.sub-year { font-size: 1.35rem; }
.sub-per { font-weight: 500; font-size: .78rem; color: var(--muted); }
.sub-hint { margin: .2rem .3rem .6rem; }
.sub-hint .ic, .sub-chip .ic { width: 13px; height: 13px; vertical-align: -2px; }
.sub-chip { justify-self: start; display: inline-block; font-size: .74rem; font-weight: 700; padding: .1rem .5rem; border-radius: 99px; margin-top: .15rem; line-height: 1.4; }
.chip-up { background: #FEE2E2; color: var(--over); }
.chip-down { background: var(--brand-soft); color: var(--brand-deep); }
.chip-unused { background: #FEF3C7; color: #92400E; }
.chip-cancel { background: #EDE9FE; color: #5B21B6; }
.due-trial { background: #E0F2FE; color: #075985; }
.sub-new { font-size: .76rem; color: var(--brand-deep); font-weight: 600; }
.sub-row .bill-link { padding-inline-end: .9rem; }
.sub-hero-amt { text-align: end; }
.sub-facts { margin: .2rem 0 0; }
.sub-review { margin-top: .9rem; padding-top: .8rem; border-top: 1px solid var(--line); display: grid; gap: .5rem; }
.sub-review .btn-row, .sub-use .btn-row { display: flex; gap: .6rem; flex-wrap: wrap; }
.sub-use.is-flagged { background: #FFFBEB; border-color: #FDE68A; }
.sub-dismissed summary { cursor: pointer; font-weight: 600; }
.sub-dismissed li form { margin: 0; }
.sub-foot { margin: .8rem .3rem 0; }
.price-card .h-sm .ic { width: 17px; height: 17px; vertical-align: -3px; }
.price-alerts { list-style: none; margin: .4rem 0 .6rem; padding: 0; display: grid; gap: .5rem; }
.price-alerts li { display: flex; gap: .6rem; align-items: flex-start; padding: .65rem .75rem; border-radius: 12px; }
.pa-up { background: #FEF2F2; }
.pa-down { background: var(--brand-soft); }
.pa-arrow { font-size: .8rem; line-height: 1.6; }
.pa-up .pa-arrow { color: var(--over); }
.pa-down .pa-arrow { color: var(--brand-deep); }
.credit { display: grid; gap: .3rem; }
.credit-top { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.credit-pct { font-size: .8rem; font-weight: 700; color: var(--muted); }
.credit-bar { height: 8px; border-radius: 99px; background: #EEECE4; overflow: hidden; }
.credit-bar span { display: block; height: 100%; border-radius: inherit; background: var(--brand); }
.credit-amber .credit-bar span { background: var(--warn); }
.credit-amber .credit-pct { color: #92400E; }
.credit-red .credit-bar span { background: var(--over); }
.credit-red .credit-pct { color: var(--over); }
.credit-missing { margin: 0; }
.cc-credit-row { padding: .1rem 1rem .85rem 3.4rem; border-bottom: 1px solid var(--line); display: grid; gap: .3rem; }
[dir=rtl] .cc-credit-row { padding: .1rem 3.4rem .85rem 1rem; }
.cc-credit-row:last-child { border-bottom: 0; }
.cc-credit-edit { justify-self: start; }
.cc-acct { padding: .85rem 1rem; border-bottom: 1px solid var(--line); display: grid; gap: .4rem; }
.cc-acct:last-child { border-bottom: 0; }
.cc-credit-box { margin: .9rem 0 .4rem; padding: .8rem .9rem; border: 1px solid var(--line); border-radius: 14px; display: grid; gap: .45rem; }
.sub-trial summary { cursor: pointer; margin: 0; }
.sub-trial[open] summary { margin-bottom: .4rem; }
.cc-row:has(+ .cc-credit-row) { border-bottom: 0; }

/* Card rows: the whole row opens the card (stretched link); the Apply pill sits above it and opens the issuer site. */
.cc-row { position: relative; display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem; min-height: 60px; }
.cc-row:hover { background: #FBFAF6; }
.cc-row .cc-link { display: block; padding: 0; min-height: 0; color: inherit; text-decoration: none; }
.cc-row .cc-link::after { content: ""; position: absolute; inset: 0; }
.cc-row .cc-link:hover { background: none; }
.cc-row .cc-link:focus-visible { outline: none; }
.cc-row .cc-link:focus-visible::after { outline: 3px solid var(--brand-deep); outline-offset: -3px; border-radius: 8px; }
.cc-end { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: .35rem; }
.cc-apply-sm { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: .2rem; padding: .3rem .7rem; min-height: 30px; border-radius: 999px; background: var(--brand-deep); color: #fff; font-size: .78rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.cc-apply-sm:hover { background: var(--brand-hover); }

/* Transactions grouped into cards: one card per day, or per account/card used. */
.txg-list { display: flex; flex-direction: column; gap: .75rem; margin-bottom: 1rem; }
.txg { margin-bottom: 0; }
.txg-head { display: flex; align-items: center; gap: .65rem; padding: .8rem 1rem .7rem; background: #FBFAF6; border-bottom: 1px solid var(--line); }
.txg-ic { width: 32px; height: 32px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-deep); }
.txg-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.txg-name { font-weight: 700; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.txg-sub { font-size: .75rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.txg-total { flex: none; font-size: .95rem; }
.txg-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem .75rem; margin: 0 0 .6rem; }
.txg-bar .hint, .txg-count { margin: 0; padding: 0 .2rem; }
.txg-hint { margin: 0 .2rem .6rem; padding: 0; }
.seg-links { display: inline-grid; grid-template-columns: auto auto; margin: 0; }
.seg-links .seg-btn { display: block; text-align: center; text-decoration: none; padding: .4rem .9rem; font-size: .85rem; line-height: 1.4; min-height: 0; }
.txn-acct-in { display: flex; align-items: center; gap: .3rem; min-width: 0; }

/* Payment type chip on each row (card, check, wire, Zelle, ACH…). */
.pm-chip { flex: none; display: inline-block; padding: .05rem .4rem; border-radius: 6px; font-size: .68rem; font-weight: 700; letter-spacing: .02em; line-height: 1.45; background: #EFEDE4; color: #3F4A42; white-space: nowrap; }
.pm-card { background: #E8EEF9; color: #1E3A8A; }
.pm-check { background: #FEF3C7; color: #92400E; }
.pm-wire { background: #EDE9FE; color: #5B21B6; }
.pm-zelle { background: #F3E8FF; color: #6B21A8; }
.pm-ach { background: var(--brand-soft); color: var(--brand-hover); }
.pm-cash { background: #ECFDF5; color: #065F46; }
.pm-venmo { background: #E0F2FE; color: #075985; }
.pm-paypal { background: #DBEAFE; color: #1E40AF; }
.pm-apple_pay { background: #F1F5F9; color: #111827; }
.pm-other { background: #F1F0EA; color: var(--muted); }
.txg-more { display: block; padding: .7rem 1rem; border-top: 1px solid var(--line); font-size: .85rem; font-weight: 650; color: var(--brand-deep); text-decoration: none; text-align: center; }
.txg-more:hover { background: var(--brand-soft); }
.txn-sub .pm-chip { margin-inline-end: .35rem; vertical-align: 1px; }
.txg-name { white-space: normal; overflow: visible; line-height: 1.25; overflow-wrap: anywhere; }
.txg-name .txn-acct-mask { white-space: nowrap; }

/* Similar transactions: "Apply to N similar?" sheet and the undo toast */
dialog.sim { max-height: 86vh; display: flex; flex-direction: column; }
dialog.sim:not([open]) { display: none; }
.sim .sheet-body { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.sim-what { margin: .15rem 0 .7rem; color: var(--muted); font-size: .9rem; line-height: 1.7; }
.sim-cat { --c: #475569; display: inline-flex; align-items: center; gap: .3rem; padding: .12rem .6rem .12rem .3rem; border-radius: 99px; font-weight: 650; font-size: .9rem; color: var(--c); background: color-mix(in srgb, var(--c) 10%, #fff); border: 1px solid color-mix(in srgb, var(--c) 30%, #fff); vertical-align: middle; }
.sim-cat-ic { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--c); color: #fff; }
.sim-cat-ic svg { width: 12px; height: 12px; }
.sim-all { display: flex; align-items: center; gap: .5rem; padding: .45rem .1rem; font-weight: 650; font-size: .9rem; border-bottom: 1px solid var(--line); }
.sim-all[hidden] { display: none; }
.sim-all input, .sim-row input { width: 20px; height: 20px; flex: none; accent-color: var(--brand-deep); margin: 0; }
.sim-list { list-style: none; margin: 0 0 .6rem; padding: 0; overflow-y: auto; min-height: 3.5rem; flex: 1 1 auto; overscroll-behavior: contain; }
.sim-list li { border-bottom: 1px solid var(--line); }
.sim-list li.off .sim-main, .sim-list li.off .sim-amt { opacity: .45; }
.sim-row { display: flex; align-items: center; gap: .7rem; padding: .55rem .1rem; cursor: pointer; min-height: 44px; }
.sim-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sim-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sim-sub { font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sim-sub .tchip { font-size: .72rem; vertical-align: 1px; }
.sim-amt { font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sim-rule { margin: .1rem 0 .3rem; }
.sim-rule input { accent-color: var(--brand-deep); }
.sim-actions { margin-top: .6rem; grid-template-columns: 1fr auto; }
.sim-actions .btn { white-space: nowrap; padding-inline: .9rem; }
dialog.sim:focus, .sim-list:focus { outline: none; }
.sim-n { display: inline-grid; place-items: center; min-width: 1.5rem; height: 1.5rem; padding: 0 .35rem; border-radius: 99px; background: var(--brand-soft); color: var(--brand-deep); font-size: .8rem; }
.sim-actions .btn:disabled { opacity: .45; cursor: default; }
.sim-toast { position: fixed; z-index: 30; left: 50%; transform: translateX(-50%); bottom: calc(150px + env(safe-area-inset-bottom)); width: min(92vw, 440px); display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .6rem .6rem .6rem 1rem; border-radius: 14px; background: var(--brand-deep); color: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.22); font-size: .92rem; font-weight: 600; transition: opacity .4s, visibility .4s; }
.sim-toast form { margin: 0; }
.sim-toast .sim-undo { background: #fff; color: var(--brand-deep); border-color: #fff; }
.sim-toast.gone { opacity: 0; visibility: hidden; }

/* Nicknames for banks, accounts and cards */
.card-head .nick-edit { margin-inline-start: auto; }
.acctlist .nick-edit { margin-inline-start: -.3rem; }
.acctlist .nick-edit .ic, .card-head .nick-edit .ic { width: 16px; height: 16px; }
.nick-sub { font-weight: 500; }
h2 .nick-sub { font-size: .8rem; }
.nick-official { margin: 0 0 .8rem; font-weight: 650; }
.nick-link { color: var(--brand-deep); }

/* Approval odds */
.odds { position: relative; z-index: 1; align-self: flex-start; display: inline-flex; align-items: center; gap: .25rem; margin-top: .2rem; padding: .12rem .55rem; min-height: 24px; border-radius: 999px; border: 1px solid; font: inherit; font-size: .74rem; font-weight: 700; cursor: pointer; white-space: nowrap; background: #fff; }
button.odds::after { content: "ⓘ"; font-weight: 500; opacity: .7; }
.odds-excellent { color: #166534; border-color: #A7D7B5; background: #EAF7EE; }
.odds-good { color: #0F766E; border-color: #A5DAD3; background: #E8F6F4; }
.odds-fair { color: #92400E; border-color: #F1CF9A; background: #FDF4E4; }
.odds-low { color: #991B1B; border-color: #F3C0C0; background: #FDECEC; }
.odds-unknown { color: var(--muted); border-color: #D9D6CA; background: #F6F5F0; }
.odds-static { cursor: default; margin: 0; font-size: .85rem; }
.odds-box { margin: 0 0 .9rem; padding: .8rem .9rem; border: 1px solid var(--line); border-radius: 14px; }
.odds-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.odds-head .label { font-weight: 650; }
.odds-box p { margin: .35rem 0 0; }
.odds-more summary { cursor: pointer; color: var(--brand-deep); font-weight: 650; font-size: .9rem; margin-top: .4rem; }
.odds-card { margin: .2rem 0 .6rem; font-weight: 650; }
.odds-card .odds { margin-inline-start: .3rem; cursor: default; }
.odds-reason { color: var(--expense); }
.odds-based { margin: .4rem 0 .3rem; font-weight: 600; }
.odds-factors, .odds-tips { margin: 0 0 .6rem; padding: 0; list-style: none; font-size: .9rem; }
.odds-factors li { display: flex; gap: .5rem; padding: .3rem 0; border-bottom: 1px solid var(--line); }
.odds-factors li:last-child { border-bottom: 0; }
.odds-mark { flex: none; width: 1.2rem; text-align: center; font-weight: 700; }
.odds-factors .ok .odds-mark { color: var(--income); }
.odds-factors .bad .odds-mark { color: #B45309; }
.odds-factors .mid .odds-mark { color: var(--muted); }
.odds-tips li { position: relative; padding: .2rem 0; padding-inline-start: 1rem; }
.odds-tips li::before { content: "→"; position: absolute; inset-inline-start: 0; color: var(--brand-deep); }
[dir=rtl] .odds-tips li::before { content: "←"; }
.odds-h { margin: .4rem 0 .2rem; }
.odds-disc { margin-top: .4rem; }
.cc-prequal { margin-bottom: .2rem; border-color: var(--brand-deep); color: var(--brand-deep); }
.cc-prequal-note { margin: 0 0 .7rem; }

/* Continue with Google / Facebook (shown only when the keys are set) */
.social-auth { margin: .8rem 0 .2rem; display: grid; gap: .55rem; }
.btn-social { margin: 0; gap: .6rem; font-weight: 600; }
.btn-social .sa-ic { flex: none; }
.btn-google { background: #fff; color: #1F1F1F; border-color: #747775; }
.btn-google:hover { border-color: #1F1F1F; }
.btn-facebook { background: #1877F2; color: #fff; border-color: #1877F2; }
.btn-facebook:hover { background: #166FE5; border-color: #166FE5; }
.social-or { display: flex; align-items: center; gap: .7rem; color: var(--muted); font-size: .85rem; margin: .3rem 0 0; }
.social-or::before, .social-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* What's new slider */
dialog.wn { width: min(94vw, 420px); max-height: 92vh; padding: 0; border: 0; border-radius: 22px; background: #fff; color: var(--ink); box-shadow: 0 20px 50px rgba(0,0,0,.28); overflow: hidden; }
dialog.wn::backdrop { background: rgba(24,24,20,.5); }
.wn-form { display: flex; flex-direction: column; max-height: 92vh; }
.wn-top { display: flex; align-items: center; justify-content: space-between; padding: .7rem .7rem 0 1.1rem; }
.wn-kicker { margin: 0; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-deep); }
.wn-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; flex: 1 1 auto; min-height: 0; }
.wn-track::-webkit-scrollbar { display: none; }
.wn-track:focus { outline: none; }
.wn-slide { flex: 0 0 100%; scroll-snap-align: start; padding: .5rem 1.1rem .2rem; box-sizing: border-box; overflow-y: auto; }
.wn-shot { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #F6F5F0; aspect-ratio: 4 / 3.3; }
.wn-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.wn-slide h3 { margin: .8rem 0 .25rem; font-size: 1.15rem; }
.wn-slide p { margin: 0; color: var(--muted); font-size: .93rem; line-height: 1.45; }
.wn-foot { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .8rem 1.1rem calc(1rem + env(safe-area-inset-bottom)); }
.wn-dots { display: flex; gap: 6px; }
.wn-dots span { width: 7px; height: 7px; border-radius: 50%; background: #D9D6CA; transition: width .2s, background .2s; }
.wn-dots span.on { width: 18px; border-radius: 4px; background: var(--brand-deep); }
.wn-next { min-width: 6.5rem; }
.wn-item .wn-shot { margin-bottom: .6rem; }
.wn-item h2 { margin: .1rem 0 .3rem; }
.wn-item p { margin: 0; }

/* --- Onboarding: welcome slides, Get started checklist, sample-data banner --- */
.ob-hero { display: flex; align-items: center; justify-content: center; gap: 1rem; background: linear-gradient(160deg, #F3F7E8, #E4EFD9); aspect-ratio: 16 / 10; }
.ob-hero-2 { background: linear-gradient(160deg, #FFF6DD, #F7E9C2); }
.ob-hero-3 { background: linear-gradient(160deg, #EAF1FB, #D9E6F7); }
.ob-hero-ic { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 24px; background: #fff; color: var(--brand-deep); box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.ob-hero-ic .ic { width: 44px; height: 44px; }
.ob-hero-ic.sm { width: 52px; height: 52px; border-radius: 16px; }
.ob-hero-ic.sm .ic { width: 26px; height: 26px; }
.ob-card .card-head { margin-bottom: .2rem; }
.ob-count { margin: 0 0 .4rem; font-size: .92rem; }
.ob-progress { height: 8px; border-radius: 6px; background: #ECEAE0; overflow: hidden; margin-bottom: .6rem; }
.ob-progress span { display: block; height: 100%; width: var(--p, 0%); background: var(--brand-deep); border-radius: 6px; transition: width .3s; }
.ob-steps { list-style: none; margin: 0; padding: 0; }
.ob-steps li { border-top: 1px solid var(--line); }
.ob-steps li:first-child { border-top: 0; }
.ob-steps a { display: flex; align-items: flex-start; gap: .7rem; padding: .6rem 0; color: inherit; text-decoration: none; }
.ob-check { flex: 0 0 24px; height: 24px; border-radius: 50%; border: 2px solid #D9D6CA; display: grid; place-items: center; font-size: .75rem; font-weight: 700; color: var(--muted); box-sizing: border-box; }
.ob-done .ob-check { background: var(--brand-deep); border-color: var(--brand-deep); color: #fff; }
.ob-done .ob-title { color: var(--muted); text-decoration: line-through; }
.ob-title { font-weight: 600; }
.ob-demo { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; margin: 0 0 .7rem 2.2rem; }
[dir="rtl"] .ob-demo { margin: 0 2.2rem .7rem 0; }
.ob-sample, .sample-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem .8rem; background: #FFF4D6; border: 1px solid #F1DB9B; border-radius: 12px; padding: .55rem .8rem; font-size: .88rem; margin: .2rem 0 .6rem; }
.ob-budget { list-style: none; margin: 0 0 1rem; padding: 0; }
.ob-budget li { display: flex; align-items: center; gap: .6rem; padding: .5rem 0; border-top: 1px solid var(--line); }
.ob-budget li:first-child { border-top: 0; }
.ob-budget .amt-wrap { flex: 0 0 7.2rem; }
.ob-amt { width: 100%; text-align: end; }
.pf-reauth { border: 1px dashed var(--line); border-radius: 12px; padding: .6rem .8rem; margin: .2rem 0 .8rem; }
.pf-reauth[hidden] { display: none; }
label.check.remember { margin: .2rem 0 .9rem; }
.ob-budget .amt-wrap { display: flex; align-items: center; gap: .35rem; direction: ltr; }

/* --- Legal pages (/privacy/, /terms/, /disclosure/) and signup agreement --- */
.legal { background: #fff; border-radius: 18px; padding: 1.2rem 1.1rem 1.4rem; margin: .4rem 0 1.2rem; line-height: 1.6; font-size: .96rem; overflow-wrap: anywhere; text-align: left; }
.legal h1 { font-size: 1.45rem; line-height: 1.25; margin: 0 0 .6rem; color: var(--brand-deep); }
.legal h2 { font-size: 1.12rem; margin: 1.6rem 0 .5rem; padding-top: .4rem; border-top: 1px solid var(--line); scroll-margin-top: 4.5rem; }
.legal h3 { font-size: 1rem; margin: 1.1rem 0 .3rem; scroll-margin-top: 4.5rem; }
.legal p { margin: .5rem 0; }
.legal ul { margin: .4rem 0 .6rem; padding-left: 1.2rem; }
.legal li { margin: .25rem 0; }
.legal blockquote { margin: .6rem 0; padding: .4rem .8rem; border-left: 3px solid var(--brand-deep); background: #F6F5F0; border-radius: 6px; }
.legal a { color: var(--brand-deep); }
.legal em { color: var(--muted); }
.legal-note { display: inline-block; margin: 0 0 .7rem; padding: .25rem .6rem; border-radius: 8px; background: #FFF4D6; font-size: .85rem; }
.legal-toc { margin: .3rem 0 .8rem; padding: .5rem .8rem; border: 1px solid var(--line); border-radius: 12px; }
.legal-toc summary { cursor: pointer; font-weight: 600; }
.legal-toc ol { margin: .4rem 0 0; padding-left: 1.3rem; }
.legal-links, .auth-legal { font-size: .85rem; color: var(--muted); }
.legal-links { margin-top: 1.6rem; padding-top: .8rem; border-top: 1px solid var(--line); }
.legal-links a, .auth-legal a { color: inherit; }
.auth-legal { text-align: center; margin: 1rem 0 0; }
.auth-legal .legal-links { margin: 0; padding: 0; border: 0; }
label.check.agree { display: flex; gap: .5rem; align-items: flex-start; margin: .7rem 0 .4rem; font-size: .92rem; }
label.check.agree input { margin-top: .2rem; flex: 0 0 auto; }
label.check.agree.has-err span { color: #B42318; }
.social-agree { margin: .2rem 0 .8rem; text-align: center; }

/* Statement upload (finance/upload_views.py) */
.upl-new { border: 0; padding: 0; margin: 0 0 .4rem; min-width: 0; }
.upl-new legend { padding: 0; margin-bottom: .5rem; font-weight: 600; }
.upl-new[hidden] { display: none; }
.upl-file input[type=file] { display: block; width: 100%; max-width: 100%; padding: .7rem; border: 1.5px dashed #CFCBBE; border-radius: 12px; background: var(--bg); font: inherit; font-size: .9rem; }
.upl-kinds { margin: 0 0 .8rem; padding-inline-start: 1.1rem; display: grid; gap: .3rem; }
.upl-item { align-items: center; }
.upl-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 10px; }
.upl-table { border-collapse: collapse; font-size: .78rem; min-width: 100%; white-space: nowrap; }
.upl-table th, .upl-table td { padding: .35rem .5rem; border-bottom: 1px solid var(--line); text-align: start; }
.upl-table th { background: var(--bg); font-weight: 650; }
.upl-letter { display: inline-grid; place-items: center; min-width: 18px; height: 18px; border-radius: 5px; background: var(--brand-deep); color: #fff; font-size: .7rem; }
.upl-or { margin: -.5rem 0 .9rem; }
.upl-summary p { margin: 0 0 .35rem; }
.upl-out { color: var(--ink); } .upl-in { color: var(--brand-deep); font-weight: 650; }
.note-beta { background: #FFF7E0; border: 1px solid #F1DFA6; border-radius: 12px; padding: .65rem .8rem; font-size: .88rem; }
.upl-rows { list-style: none; margin: 0 0 .75rem; padding: 0; display: grid; gap: .5rem; }
.upl-row { display: grid; grid-template-columns: 28px minmax(0, 1.25fr) minmax(0, 1fr) 64px; gap: .4rem; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .5rem; }
.upl-row input, .upl-row select { padding: .4rem .45rem; font-size: .88rem; min-height: 38px; width: 100%; min-width: 0; }
.upl-row .upl-desc { grid-column: 2 / -1; }
.upl-on { grid-row: 1 / span 2; display: grid; place-items: center; }
.upl-on input { width: 20px; height: 20px; min-height: 0; accent-color: var(--brand-deep); }
.upl-row .upl-dup, .upl-row .upl-err { grid-column: 2 / -1; justify-self: start; }
.upl-row.is-dup { background: #F3F2EC; }
.upl-row.is-dup .upl-desc, .upl-row.is-dup .upl-amt { color: var(--muted); }
.upl-row.has-err { border-color: var(--over); }
.upl-row:has(.upl-on input:not(:checked)) { opacity: .6; }
.upl-actions { position: sticky; bottom: calc(64px + env(safe-area-inset-bottom)); background: var(--bg); padding: .5rem 0; display: grid; gap: .3rem; }
.ob-upload { margin: .35rem 0 0; }

/* Safe to spend (finance/safe_to_spend.py) */
.sts-card .card-head { align-items: center; }
.sts-big { font-size: 2.1rem; font-weight: 780; letter-spacing: -.02em; margin: .1rem 0 0; color: var(--brand-deep); }
.sts-day { margin: .1rem 0 .35rem; font-weight: 650; }
.sts-math { margin: 0 0 .6rem; }
.sts-h { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: .4rem 0 .2rem; }
.sts-list { list-style: none; margin: 0 0 .5rem; padding: 0; }
.sts-list li a, .sts-list li.muted { display: flex; align-items: center; gap: .5rem; padding: .45rem 0; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.sts-list .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sts-paid { color: var(--muted); }
.sts-paid strong { font-weight: 500; text-decoration: line-through; }
.sts-tick { color: var(--brand-deep); font-weight: 800; }
.sts-note { margin: .3rem 0 0; }
.bline-commit { color: var(--muted); margin-top: .2rem; }
.sts-paid-box summary { cursor: pointer; color: var(--brand-deep); font-weight: 650; padding: .3rem 0; }

/* Public card finder (cards/public_views.py) */
.pc-wrap { max-width: 640px; }
.pc-hero h1 { font-size: 2rem; }
.pc-points { list-style: none; padding: 0; margin: 1rem auto; max-width: 480px; display: grid; gap: .5rem; color: var(--ink); }
.pc-q { max-width: 520px; margin: 0 auto; }
.pc-nav { display: flex; align-items: center; gap: .8rem; margin: .5rem 0 1.2rem; }
.pc-dots { display: flex; gap: .4rem; list-style: none; margin: 0; padding: 0; flex: 1; justify-content: center; }
.pc-dots li { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.pc-dots li.done { background: var(--brand-line); }
.pc-dots li.now { background: var(--brand-deep); transform: scale(1.25); }
.pc-form fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.pc-form legend { padding: 0; }
.pc-title { font-size: 1.45rem; margin: 0 0 .3rem; }
.pc-opts { display: grid; gap: .55rem; margin: 1rem 0; }
.pc-opt { font: inherit; font-weight: 600; text-align: start; padding: .9rem 1rem; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; min-height: 52px; }
.pc-opt:hover { border-color: var(--ink); }
.pc-opt.is-on { border-color: var(--brand-deep); background: var(--brand-soft); }
.pc-rtitle { font-size: 1.5rem; margin: .3rem 0; }
.pc-note { background: #FFF7E0; border: 1px solid #F1DFA6; border-radius: 12px; padding: .55rem .75rem; }
.pc-summary { margin: .5rem 0 1rem; }
.pc-summary summary { cursor: pointer; font-weight: 650; color: var(--brand-deep); }
.pc-summary ul { padding-inline-start: 1.1rem; }
.pc-list { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .75rem; }
.pc-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem; box-shadow: var(--shadow); }
.pc-card-top { display: flex; align-items: flex-start; gap: .6rem; }
.pc-card-name { flex: 1; min-width: 0; }
.pc-card .odds { flex: none; white-space: nowrap; }
.pc-perk { margin: .5rem 0; font-size: .92rem; }
.pc-terms { display: grid; gap: .25rem; margin: 0 0 .6rem; }
.pc-terms div { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: .5rem; }
.pc-terms dt { color: var(--muted); }
.pc-terms dd { margin: 0; overflow-wrap: anywhere; }
.pc-cta { margin-top: 1.2rem; }
.pc-foot p { max-width: 520px; margin: 0 auto; }
