/* We Budget: white pages, a dollar-green menu, evergreen words, marigold for the pop, eucalyptus as the calm second color,
   mint wash for soft backgrounds. Folded-paper corners and chunky lettering carry the fun. Red is only for over-budget warnings. */
:root {
  --dollar: #8BC46A;
  --dollar-tile: #B4DA9C;
  --dollar-deep: #2C6B1F;
  --ever: #0F2E25;
  --mari: #F5B83D;
  --mari-deep: #DCA537;
  --mari-tint: #FDF0D2;
  --euca: #86B9A5;
  --euca-tint: #E3EFEA;
  --wash: #EEF6E8;
  --wash-flap: #D3E5C7;

  --bg: #FFFFFF;
  --sage: var(--wash);
  --sage-2: #F5FAF1;
  --menu: var(--dollar);
  --menu-hover: rgba(255, 255, 255, 0.3);
  --logo-ink: var(--ever);
  --card: #FFFFFF;
  --line: #E0EBDA;
  --line-2: #EDF3E8;
  --track: #EAF0E5;
  --ink: var(--ever);
  --ink-2: #3E5047;
  --muted: #55665D;
  --brand: var(--ever);
  --brand-ink: #061A14;
  --brand-tint: var(--wash);
  --link: var(--dollar-deep);
  --butter: var(--mari-tint);
  --butter-ink: #6B4A00;
  --yellow: var(--mari);
  --coral: #EE6C5B;
  --coral-tint: #FDE3DE;
  --coral-ink: #A8321F;
  --ok-ink: var(--dollar-deep);
  --warn-ink: #8A5700;
  --over-ink: #B3361F;
  --input-border: #C9DBC0;
  --input-bg: #FBFDF9;
  --radius: 20px;
  --radius-s: 12px;
  --shadow: 0 1px 0 rgba(15, 46, 37, 0.04), 0 8px 24px rgba(15, 46, 37, 0.07);
  --rail: 236px;
  --display: 'Bricolage Grotesque', 'Nunito', system-ui, sans-serif;
  font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; background: var(--bg); }
body { font-size: 15px; line-height: 1.45; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--link); }
a:hover { color: var(--ever); }
h1, h2, h3 { margin: 0; letter-spacing: -0.01em; }
h1 { font-family: var(--display); font-size: 30px; font-weight: 800; letter-spacing: -0.03em; }
h2 { font-family: var(--display); font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
h3 { font-size: 16px; font-weight: 800; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
.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; }
.ico { flex: none; }
:focus-visible { outline: 3px solid var(--ever); outline-offset: 2px; border-radius: 6px; }

/* Folded paper: the top-right corner folds down. Set --paper (the sheet), --flap (the folded-back corner) and --f (fold size). */
.folded { --f: 14px; --paper: #FFFFFF; --flap: #DCE7D6; }
.folded, .hero, .tile, .bottom-nav .on .pill, .rail nav a.on, .auth .card {
  background: linear-gradient(225deg, transparent 50%, var(--flap) 50%) top right / var(--f) var(--f) no-repeat,
              linear-gradient(225deg, transparent calc(var(--f) * 0.7071), var(--paper) calc(var(--f) * 0.7071));
  border-top-right-radius: 0 !important; }

/* ---------------------------------------------------------------- shell */
.shell { min-height: 100vh; }
.rail { display: none; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line-2); }
.logo { display: inline-block; font-family: var(--display); font-size: 23px; font-weight: 800; color: var(--logo-ink); letter-spacing: -0.035em;
  line-height: 1; text-decoration: none; white-space: nowrap; }
.logo:hover { color: var(--logo-ink); }
.logo .mark { display: inline-block; width: 0.64em; height: 0.64em; margin: 0 0.015em; transform: translateY(0.05em); }
.logo .mark.mid { width: 0.76em; height: 0.76em; margin: 0 0.15em 0 0.13em; transform: translateY(0.1em); }
.logo .mark.lead { width: 0.8em; height: 0.8em; margin: 0 0.18em 0 0; transform: translateY(0.1em); }
.mark path { stroke-width: 2.5; stroke-linejoin: round; }
.mark .a { fill: var(--dollar); stroke: var(--dollar); }
.mark .b { fill: #7AAE5D; stroke: #7AAE5D; }
.mark .c { fill: var(--mari); stroke: var(--mari); }
.mark .d { fill: var(--mari-deep); stroke: var(--mari-deep); }
main { padding: 4px 16px 110px; max-width: 1080px; margin: 0 auto; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 6px 0 16px; }
.page-head .sub { color: var(--muted); font-size: 14px; margin-top: 2px; }

.tile { width: 30px; height: 30px; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px;
  --f: 9px; --paper: var(--dollar-tile); --flap: #93C27A; color: var(--ever); }
.on > .tile, .on .tile { --paper: var(--mari); --flap: var(--mari-deep); }

.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: calc(70px + env(safe-area-inset-bottom));
  padding: 0 6px env(safe-area-inset-bottom); background: var(--menu);
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: center; }
.bottom-nav a, .bottom-nav button { display: flex; flex-direction: column; align-items: center; gap: 3px; text-decoration: none;
  color: var(--ever); font-size: 11px; font-weight: 800; position: relative; border: 0; background: none; cursor: pointer; padding: 6px 0; min-height: 52px; justify-content: center; }
.bottom-nav .on { color: var(--ever); font-weight: 900; }
.bottom-nav .pill { border-radius: 10px; padding: 3px 14px; display: flex; color: var(--ever); }
.bottom-nav .on .pill { --f: 10px; --paper: var(--mari); --flap: var(--mari-deep); }
.badge { background: var(--ever); color: #FFFFFF; font-size: 10px; font-weight: 900; border-radius: 999px; padding: 1px 6px; min-width: 18px; text-align: center; }
.bottom-nav .badge { position: absolute; top: 2px; right: calc(50% - 26px); }

@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); }
  .rail { display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; height: 100vh; padding: 22px 14px 18px;
    background: var(--menu); color: var(--ever); }
  .rail .logo { padding: 2px 12px 20px; font-size: 26px; }
  .rail .mark .a { fill: #FFFFFF; stroke: #FFFFFF; }
  .rail .mark .b { fill: #E4EDDF; stroke: #E4EDDF; }
  .rail nav { display: flex; flex-direction: column; gap: 2px; }
  .rail nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 14px; text-decoration: none;
    color: var(--ever); font-weight: 800; font-size: 15px; }
  .rail nav a:not(.on):hover { background: var(--menu-hover); color: var(--ever); }
  .rail nav a.on { --f: 14px; --paper: #FFFFFF; --flap: #D9E6D2; font-weight: 900; }
  .rail .avatar { border-color: var(--menu); }
  .rail .avatar .dot { background: var(--mari); border-color: var(--menu); }
  .rail .here { color: var(--ever); }
  .rail .here::before { background: var(--mari); }
  .rail .btn.quiet { color: var(--ever); }
  .rail .btn.quiet:hover { background: var(--menu-hover); color: var(--ever); }
  .rail :focus-visible { outline-color: var(--ever); }
  .rail nav a .badge { margin-left: auto; }
  .rail .rail-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
  .topbar, .bottom-nav { display: none; }
  main { padding: 28px 36px 60px; }
}

/* ---------------------------------------------------------------- people */
.people { display: flex; align-items: center; gap: 8px; }
.avatars { display: flex; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 13px; border: 2px solid var(--bg); position: relative; flex: none; }
.avatars .avatar + .avatar { margin-left: -9px; }
.avatar.small { width: 24px; height: 24px; font-size: 11px; border-width: 1.5px; }
.avatar .dot { position: absolute; right: -2px; bottom: -2px; width: 10px; height: 10px; border-radius: 50%; background: var(--mari); border: 2px solid var(--bg); }
.here { font-size: 12px; font-weight: 800; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; }
.here::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--mari); }

/* ---------------------------------------------------------------- basics */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: 14px; border: 0; background: var(--brand); color: #FFFFFF; font-weight: 800; font-size: 15px; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--brand-ink); color: #FFFFFF; }
.btn.soft { background: var(--brand-tint); color: var(--brand-ink); }
.btn.soft:hover { background: #E1EED8; }
.btn.white { background: #FFFFFF; color: var(--brand); }
.btn.white:hover { background: #F7FBF4; }
.btn.quiet { background: transparent; color: var(--brand); padding: 0 10px; }
.btn.quiet:hover { background: var(--line-2); }
.btn.danger { background: var(--coral-tint); color: var(--coral-ink); }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn[disabled] { opacity: 0.55; cursor: default; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; color: var(--brand); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; }
.icon-btn:hover { background: var(--line-2); }
.tag { display: inline-block; font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: var(--wash); color: var(--ever);
  border: 0; cursor: default; white-space: nowrap; }
button.tag { cursor: pointer; }
button.tag:hover { filter: brightness(0.96); }
.tag.saving { background: var(--butter); color: var(--butter-ink); }
.tag.reimbursed { background: var(--euca-tint); color: #2C5A4B; }
.tag.personal { background: #E4F1DA; color: var(--dollar-deep); }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; padding: 7px 12px; border-radius: 999px; }
.chip.butter { background: var(--butter); color: var(--butter-ink); }
.chip.sun { background: var(--mari); color: var(--ever); font-weight: 900; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search], select, textarea {
  height: 44px; border: 1.5px solid var(--input-border); border-radius: 12px; padding: 0 12px; background: var(--input-bg); font-size: 15px; width: 100%; }
textarea { height: auto; min-height: 88px; padding: 10px 12px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px rgba(139, 196, 106, 0.35); }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 800; color: var(--ink-2); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.section { margin-top: 22px; }
.empty { text-align: center; color: var(--muted); padding: 34px 16px; }
.empty h3 { color: var(--ink); margin-bottom: 6px; }

/* ---------------------------------------------------------------- budget */
.month-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.month-pick { display: flex; align-items: center; gap: 2px; }
.month-pick h1 { min-width: 0; }
.hero { --f: 30px; --paper: var(--wash); --flap: var(--wash-flap); border-radius: 24px; padding: 18px; display: grid; gap: 6px; }
.hero .label { font-size: 14px; font-weight: 900; color: var(--ever); }
.hero .big { font-family: var(--display); font-size: 42px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; }
.hero.neg .big { color: var(--over-ink); }
.hero .note { font-size: 13px; color: var(--ink-2); }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.stat { background: var(--wash); border: 0; border-radius: 16px; padding: 12px 14px; }
.stat .k { font-size: 12px; font-weight: 800; color: var(--muted); }
.stat .v { font-size: 20px; font-weight: 900; }
@media (min-width: 900px) {
  .budget-top { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 14px; align-items: stretch; }
  .stats { grid-template-columns: 1fr; }
}

/* The frozen header row. On a phone it shows the two things each card leads with (the line and what's available),
   sitting just under the top bar; on a computer it spans every column (see below). */
.colhead { display: grid; grid-template-columns: minmax(0, 1fr) auto; position: sticky; top: var(--topbar-h, 57px); z-index: 20;
  background: var(--bg); padding: 12px 16px 10px; margin: 14px -16px 0; font-family: var(--display); font-size: 19px; font-weight: 800;
  letter-spacing: -0.02em; color: var(--ever); border-bottom: 2px solid var(--dollar); box-shadow: 0 6px 10px -8px rgba(15, 46, 37, 0.25); }
.colhead span:nth-child(2), .colhead span:nth-child(3), .colhead span:nth-child(4) { display: none; }
.colhead span:last-child { text-align: right; }
.group { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.group-head { display: flex; justify-content: space-between; align-items: center; gap: 10px;
  border-radius: 16px; padding: 12px 14px; font-weight: 900; }
.group-head .gname { display: flex; align-items: center; gap: 8px; font-size: 17px; }
.group-head .dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.group-head .gtot { font-size: 13px; font-weight: 800; color: var(--ink-2); text-align: right; }
.group-head .gtot .left { display: none; }
@media (min-width: 900px) { .group-head .gtot .left { display: inline; } }
.lines { display: flex; flex-direction: column; gap: 10px; }
.bline { background: #FFFFFF; border: 1px solid var(--line); border-radius: 20px; padding: 14px 16px; display: grid; gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name avail" "meter meter" "nums nums"; }
.bline.flash { animation: flash 1.6s ease-out; }
@keyframes flash { 0% { box-shadow: 0 0 0 3px rgba(245, 184, 61, 0.9); } 100% { box-shadow: 0 0 0 3px rgba(245, 184, 61, 0); } }
.bline .nm { grid-area: name; display: flex; flex-direction: column; gap: 5px; align-items: flex-start; min-width: 0; }
.bline .nm .title { font-size: 16px; font-weight: 800; overflow-wrap: anywhere; }
.bline .av { grid-area: avail; text-align: right; }
.bline .av .amt { font-size: 22px; font-weight: 900; }
.bline .av .amt.neg { color: var(--over-ink); }
.bline .av .cap { font-size: 12px; color: var(--muted); font-weight: 700; }
.bline .meter { grid-area: meter; display: flex; flex-direction: column; gap: 7px; }
.bline .nums { grid-area: nums; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: end; }
.bline .nums .k { font-size: 12px; color: var(--muted); font-weight: 700; display: block; margin-bottom: 3px; }
.bline .nums .v { font-size: 15px; font-weight: 700; height: 38px; display: flex; align-items: center; }
.bline .nums .v.goal { color: var(--ink-2); }
.bud-input { height: 38px !important; font-weight: 800 !important; padding: 0 10px !important; text-align: left; }
.bud-input::placeholder { color: #9AAA9F; font-weight: 700; }
.bar { position: relative; height: 12px; border-radius: 999px; background: var(--track); }
.bar .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; transition: width 0.4s ease; }
.bar .fill.over { background: repeating-linear-gradient(-45deg, #D9473A 0 6px, #E8705D 6px 12px); }
.bar .today { position: absolute; top: -4px; bottom: -4px; width: 3px; border-radius: 2px; background: var(--ink); }
.bar-text { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 22px; font-size: 13px; font-weight: 800; }
.jar { display: flex; align-items: center; gap: 12px; }
.jar .msg { font-size: 15px; font-weight: 900; }
.jar .sub { font-size: 13px; color: var(--ink-2); font-weight: 600; }
/* The month's total, under all the groups. */
.grand-total { margin-top: 18px; background: var(--ever); color: #FFFFFF; border-radius: 18px; padding: 14px 16px;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.grand-total .gt-name { grid-column: 1 / -1; font-family: var(--display); font-size: 20px; font-weight: 800; letter-spacing: -0.02em;
  display: flex; align-items: baseline; gap: 8px; }
.grand-total .gt-name span { font-family: 'Nunito', system-ui, sans-serif; font-size: 13px; font-weight: 700; color: #CFE6C1; letter-spacing: 0; }
.grand-total .gt-cell { display: flex; flex-direction: column; gap: 2px; font-size: 17px; font-weight: 900; }
.grand-total .k { font-size: 12px; font-weight: 800; color: #CFE6C1; }
.grand-total .gt-avail .num { color: var(--mari); }
.grand-total .neg { color: #FFB4A6 !important; }
.goal-edit { display: inline-flex; align-items: center; gap: 6px; flex-wrap: nowrap; }
input.unsaved { border-color: var(--mari) !important; background: var(--mari-tint) !important; }
.owed { font-size: 13px; color: var(--ink-2); background: var(--euca-tint); border-radius: 12px; padding: 10px 12px; }

@media (min-width: 900px) {
  /* The one frozen row: it stays at the top while the groups and lines scroll under it. */
  .colhead { top: 0; padding: 14px 18px 12px; margin: 4px 0 0;
    grid-template-columns: minmax(0, 1fr) 96px 132px 104px 128px; gap: 16px; font-family: var(--display); font-size: 19px; font-weight: 800;
    letter-spacing: -0.02em; color: var(--ever); border-bottom: 2px solid var(--dollar); box-shadow: 0 6px 10px -8px rgba(15, 46, 37, 0.25); }
  .colhead span { display: block !important; }
  .colhead span:not(:first-child) { text-align: right; }
  .bline { grid-template-columns: minmax(0, 1fr) 96px 132px 104px 128px; grid-template-areas: "name goal bud spent avail" "meter meter meter meter meter";
    column-gap: 16px; row-gap: 8px; align-items: center; padding: 12px 18px; border-radius: 16px; }
  .bline .nums { display: contents; }
  .bline .nums > div:nth-child(1) { grid-area: goal; }
  .bline .nums > div:nth-child(2) { grid-area: bud; }
  .bline .nums > div:nth-child(3) { grid-area: spent; }
  .bline .nums .k { display: none; }
  .bline .nums .v { justify-content: flex-end; height: auto; }
  .bline .nm { flex-direction: row; align-items: center; gap: 10px; }
  .bline .av .cap { display: none; }
  .bline .av .amt { font-size: 19px; }
  .bud-input { text-align: right; }
  .lines { gap: 8px; }
  .grand-total { grid-template-columns: minmax(0, 1fr) 96px 132px 104px 128px; column-gap: 16px; align-items: center; padding: 16px 18px; }
  .grand-total .gt-name { grid-column: auto; }
  .grand-total .gt-cell { text-align: right; align-items: flex-end; font-size: 18px; }
  .grand-total .k { display: none; }
}
/* On a phone, the three totals under "Ready to assign" sit in one card, one per row, so nothing squeezes or overlaps. */
@media (max-width: 899px) {
  .budget-top .stats { grid-template-columns: 1fr; gap: 0; background: var(--wash); border-radius: 18px; padding: 2px 16px; margin-top: 10px; }
  .budget-top .stat { background: none; border-radius: 0; padding: 11px 0; display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
    border-bottom: 1px solid #D7E6CD; }
  .budget-top .stat:last-child { border-bottom: 0; }
  .budget-top .stat .k { font-size: 14px; }
  .budget-top .stat .v { font-size: 18px; white-space: nowrap; }
}

/* ---------------------------------------------------------------- toasts, dialogs */
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(86px + env(safe-area-inset-bottom)); z-index: 80;
  display: flex; flex-direction: column; gap: 8px; width: min(92vw, 440px); pointer-events: none; }
.toast { background: var(--ever); color: #FFFFFF; border-radius: 14px; padding: 12px 14px; font-weight: 700; font-size: 14px;
  box-shadow: var(--shadow); display: flex; gap: 10px; align-items: center; pointer-events: auto; animation: up 0.25s ease-out; }
.toast.bad { background: #8F2A18; }
.toast .act { margin-left: auto; color: var(--mari); font-weight: 900; background: none; border: 0; cursor: pointer; }
@keyframes up { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 900px) { .toasts { bottom: 24px; left: calc(50% + var(--rail) / 2); } }
dialog { border: 0; border-radius: 24px; padding: 0; width: min(94vw, 520px); color: var(--ink); background: #FFFFFF; box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(15, 46, 37, 0.35); }
.dlg { padding: 20px; display: flex; flex-direction: column; gap: 14px; max-height: 86vh; overflow: auto; }
.dlg-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.sheet-list { display: flex; flex-direction: column; }
.sheet-list a, .sheet-list button { display: flex; align-items: center; gap: 12px; padding: 14px 6px; border: 0; background: none;
  border-bottom: 1px solid var(--line-2); text-decoration: none; color: var(--ink); font-weight: 800; font-size: 16px; cursor: pointer; text-align: left; }

/* ---------------------------------------------------------------- sign in */
.auth-flap { position: absolute; left: 0; right: 0; top: 0; height: 420px; background: var(--dollar);
  clip-path: polygon(0 0, 100% 0, 100% 78%, 50% 100%, 0 78%); pointer-events: none; }
.auth-flap.welcome { height: 316px; } /* no big heart on the welcome page, so a shorter flap */
.auth { position: relative; max-width: 420px; margin: 0 auto; padding: 60px 16px 40px; }
.auth-top { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 26px; }
.auth-heart { display: block; width: 92px; height: 92px; }
.auth-heart .mark { width: 100%; height: 100%; display: block; }
.auth-heart .mark .a, .auth .logo .mark .a { fill: #FFFFFF; stroke: #FFFFFF; }
.auth-heart .mark .b, .auth .logo .mark .b { fill: #E4EDDF; stroke: #E4EDDF; }
.auth .logo { font-size: 40px; display: block; text-align: center; }
.auth .tagline { margin: 0; text-align: center; color: var(--ever); font-weight: 800; text-wrap: balance; max-width: 300px; }
.auth .card { --f: 26px; --paper: #FFFFFF; --flap: #DCE7D6; padding: 24px; display: flex; flex-direction: column; gap: 14px;
  border: 0; border-radius: 26px; box-shadow: 0 10px 30px rgba(15, 46, 37, 0.14); }
.choice { display: grid; gap: 10px; }
.choice label { display: flex; gap: 12px; align-items: flex-start; border: 1.5px solid var(--line); border-radius: 16px; padding: 12px 14px; cursor: pointer; background: #FFFFFF; }
.choice input { margin-top: 4px; accent-color: var(--brand); }
.choice label:has(input:checked) { border-color: var(--ever); background: var(--sage-2); }
.boot { display: flex; align-items: center; justify-content: center; min-height: 70vh; color: var(--muted); font-weight: 800; }
.err-box { background: var(--coral-tint); color: var(--coral-ink); border-radius: 12px; padding: 10px 12px; font-size: 14px; font-weight: 700; }
.ok-box { background: var(--brand-tint); color: var(--brand-ink); border-radius: 12px; padding: 10px 12px; font-size: 14px; font-weight: 700; }

/* ---------------------------------------------------------------- tables and lists */
.list { background: #FFFFFF; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.list .item { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
.list .item:last-child { border-bottom: 0; }
.progress-strip { height: 6px; background: var(--track); border-radius: 999px; overflow: hidden; }
.progress-strip > i { display: block; height: 100%; background: var(--brand); }

/* ---------------------------------------------------------------- Face ID lock */
.lock-screen { position: fixed; inset: 0; z-index: 200; background: var(--bg); overflow: auto; }
.lock-screen .lock-inner { position: relative; max-width: 420px; margin: 0 auto; padding: 70px 24px 40px; display: flex; flex-direction: column;
  align-items: center; gap: 14px; text-align: center; }
.lock-screen h1 { font-size: 28px; }
.lock-screen .tagline { margin: 0; color: var(--ever); font-weight: 800; }
.lock-screen .lock-go { margin-top: 150px; min-width: 260px; min-height: 52px; font-size: 17px; }
.lock-screen .lock-msg { min-height: 20px; margin: 0; color: var(--ink-2); font-weight: 700; }

/* Partner invite (Settings > Household): the code big, the link as plain text, then Share and Copy. */
.invite-box { background: var(--wash); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.invite-code { display: block; font-family: var(--display); font-size: 30px; font-weight: 800; letter-spacing: .12em; color: var(--ever); line-height: 1.15; }
.invite-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.invite-box .btn.soft { background: #FFFFFF; border: 1.5px solid var(--ever); color: var(--ever); }
@media (max-width: 899px) {
  .invite-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .invite-actions .btn { padding: 0 10px; white-space: nowrap; }
  .invite-actions .btn.quiet { grid-column: 1 / -1; justify-self: start; }
}
.invite-link { width: 100%; font-size: 14px; color: var(--ink-2); background: #FFFFFF; text-overflow: ellipsis; }

/* Net worth: what the plan on screen has changed from your saved plan, with a way back. */
.plan-changes { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap;
  background: var(--mari-tint); border: 1px solid #F3DDA4; border-radius: 14px; padding: 12px 14px; margin: 0 0 16px; font-size: 14px; }
.plan-changes ul { margin: 4px 0 0; padding-left: 18px; }
.plan-changes li { margin: 2px 0; }

/* Automatic bank sync (Settings → Bank accounts) */
.bank-card .bank-link { border-top: 1px solid var(--line-2); padding-top: 12px; }
.bank-warn { color: var(--warn-ink); font-weight: 800; }
.bank-tip { background: var(--mari-tint); border-radius: 10px; padding: 8px 10px; }
.match-row { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: grid; gap: 8px; }
.pending-tag { background: var(--mari-tint); color: var(--mari-deep); margin-left: 4px; font-size: 11px; padding: 2px 8px; }
