:root {
  color-scheme: light;
  --ink: #0b1e38;
  --muted: #607087;
  --line: #dbe4ef;
  --paper: #ffffff;
  --wash: #f4f7fb;
  --blue: #1857b6;
  --blue-deep: #082d5c;
  --blue-soft: #e9f2ff;
  --green: #176c50;
  --green-soft: #e7f6ef;
  --red: #ad3434;
  --shadow: 0 24px 70px rgba(18, 48, 82, .12);
  --radius: 24px;
}

* { box-sizing: border-box; }
html { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif; background: var(--wash); color: var(--ink); }
body { min-width: 320px; min-height: 100vh; margin: 0; background: radial-gradient(circle at 85% 0%, #e6f1ff 0, transparent 30rem), var(--wash); }
button, input { font: inherit; }
button { color: inherit; }
.hidden { display: none !important; }
.skip-link { position: fixed; z-index: 100; top: .75rem; left: .75rem; transform: translateY(-180%); padding: .7rem 1rem; border-radius: .65rem; background: var(--ink); color: white; }
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 3px solid #efad21; outline-offset: 3px; }

.session-header { min-height: 76px; display: flex; align-items: center; gap: 1rem; padding: 0 max(24px, calc((100% - 1240px) / 2)); border-bottom: 1px solid rgba(198, 211, 226, .85); background: rgba(255, 255, 255, .82); backdrop-filter: blur(18px); }
.brand, .dashboard-brand { display: inline-flex; align-items: center; gap: .72rem; color: var(--ink); font-size: 1.28rem; font-weight: 800; letter-spacing: -.025em; text-decoration: none; }
.brand-mark { width: 29px; height: 27px; display: inline-flex; align-items: end; gap: 3px; padding-bottom: 2px; border-bottom: 3px solid currentColor; color: var(--blue); }
.brand-mark i { width: 5px; display: block; border-radius: 5px 5px 1px 1px; background: currentColor; }
.brand-mark i:nth-child(1) { height: 10px; }.brand-mark i:nth-child(2) { height: 17px; }.brand-mark i:nth-child(3) { height: 24px; }
.privacy-status { display: inline-flex; align-items: center; gap: .45rem; margin-left: auto; color: var(--muted); font-size: .9rem; font-weight: 650; }
.privacy-status svg { width: 18px; fill: none; stroke: var(--green); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.quiet-button { min-height: 42px; padding: .6rem .9rem; border: 1px solid #c8d4e2; border-radius: .8rem; background: white; cursor: pointer; font-weight: 720; }
.quiet-button:hover { border-color: #9bb0c8; background: #f9fbfd; }

.pairing-view { width: min(1180px, calc(100% - 48px)); min-height: calc(100vh - 76px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(390px, .78fr); gap: clamp(3rem, 7vw, 7.5rem); align-items: center; margin: 0 auto; padding: 64px 0 84px; }
.eyebrow, .card-kicker { margin: 0 0 .6rem; color: var(--blue); font-size: .78rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.pairing-copy h1 { max-width: 780px; margin: 0; font-size: clamp(3.2rem, 6.2vw, 6.6rem); line-height: .94; letter-spacing: -.065em; }
.lead { max-width: 650px; margin: 1.5rem 0 0; color: #52657e; font-size: clamp(1.08rem, 1.7vw, 1.35rem); line-height: 1.55; }
.pairing-steps { display: grid; gap: .8rem; margin: 2rem 0 0; padding: 0; list-style: none; }
.pairing-steps li { display: grid; grid-template-columns: 38px 1fr; gap: .9rem; align-items: center; }
.pairing-steps li > span { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #c8d9ef; border-radius: 50%; background: white; color: var(--blue); font-size: .82rem; font-weight: 850; }
.pairing-steps div { display: grid; gap: .15rem; }
.pairing-steps strong { font-size: 1rem; }
.pairing-steps small { color: var(--muted); font-size: .88rem; }
.privacy-points { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 2rem; }
.privacy-points span { display: inline-flex; align-items: center; gap: .38rem; padding: .48rem .65rem; border: 1px solid #d8e3ef; border-radius: 999px; background: rgba(255,255,255,.76); color: #4c6078; font-size: .78rem; font-weight: 690; }
.privacy-points svg { width: 15px; fill: none; stroke: var(--green); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.pairing-card { padding: clamp(1.25rem, 3vw, 2rem); border: 1px solid #d7e2ee; border-radius: 28px; background: rgba(255,255,255,.94); box-shadow: var(--shadow); }
.pairing-card-head { display: flex; justify-content: space-between; gap: 1rem; align-items: start; }
.pairing-card h2 { max-width: 320px; margin: 0; font-size: 1.55rem; line-height: 1.12; letter-spacing: -.035em; }
.countdown { flex: none; min-width: 74px; padding: .55rem .7rem; border-radius: 999px; background: var(--blue-soft); color: var(--blue-deep); font-variant-numeric: tabular-nums; font-size: .84rem; font-weight: 800; text-align: center; }
.countdown.is-low { background: #fff0eb; color: #9c351f; }
.qr-frame { position: relative; width: min(100%, 330px); aspect-ratio: 1; display: grid; place-items: center; margin: 1.7rem auto 1.1rem; overflow: hidden; border: 1px solid #d9e3ee; border-radius: 24px; background: white; }
#qr-code { width: 100%; height: 100%; padding: 20px; }
#qr-code svg { width: 100%; height: 100%; display: block; shape-rendering: crispEdges; }
.qr-logo { position: absolute; width: 54px; height: 54px; display: grid; place-items: center; border: 6px solid white; border-radius: 15px; background: var(--blue-soft); box-shadow: 0 5px 18px rgba(0, 28, 68, .16); pointer-events: none; }
.qr-logo .brand-mark { width: 24px; height: 22px; gap: 2px; border-bottom-width: 2px; }
.qr-logo .brand-mark i { width: 4px; }.qr-logo .brand-mark i:nth-child(1) { height: 8px; }.qr-logo .brand-mark i:nth-child(2) { height: 13px; }.qr-logo .brand-mark i:nth-child(3) { height: 19px; }
.qr-skeleton { position: absolute; inset: 20px; border-radius: 10px; background: linear-gradient(100deg, #edf1f6 30%, #f8fafc 45%, #edf1f6 60%); background-size: 250% 100%; animation: shimmer 1.3s linear infinite; }
@keyframes shimmer { to { background-position-x: -250%; } }
.pairing-code { min-height: 1.2em; margin: 0; color: var(--ink); font-size: .82rem; font-weight: 820; letter-spacing: .16em; text-align: center; text-transform: uppercase; }
.status-copy { max-width: 400px; min-height: 2.8em; margin: .7rem auto 0; color: var(--muted); font-size: .9rem; line-height: 1.45; text-align: center; }
.pairing-actions { display: flex; justify-content: center; gap: .8rem; margin-top: .85rem; }
.primary-button { min-height: 48px; padding: .75rem 1rem; border: 0; border-radius: .8rem; background: var(--blue); color: white; cursor: pointer; font-weight: 780; }
.primary-button:hover { background: #104a9f; }
.text-button { min-height: 44px; border: 0; background: transparent; color: var(--blue); cursor: pointer; font-weight: 720; text-decoration: underline; text-underline-offset: .2rem; }
.help-panel { margin-top: .8rem; padding: .8rem 1rem; border-radius: .8rem; background: #eef4fb; color: #52657e; font-size: .84rem; }
.help-panel p { margin: 0; }

.dashboard { min-height: calc(100vh - 76px); display: grid; grid-template-columns: 238px minmax(0, 1fr); }
.dashboard-nav { position: sticky; top: 0; height: calc(100vh - 76px); display: flex; flex-direction: column; padding: 2rem 1.1rem 1.2rem max(18px, calc((100vw - 1440px) / 2)); border-right: 1px solid #d9e3ee; background: rgba(248,250,253,.9); }
.dashboard-brand { padding: 0 .65rem 1.8rem; }
.tab-list { display: grid; gap: .4rem; }
.tab-list button { min-height: 48px; display: flex; align-items: center; gap: .75rem; padding: .72rem .82rem; border: 0; border-radius: .85rem; background: transparent; color: #53657b; cursor: pointer; font-weight: 720; text-align: left; }
.tab-list button:hover { background: #eef3f9; color: var(--ink); }
.tab-list button[aria-selected="true"] { background: var(--blue-deep); color: white; }
.tab-list svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.session-card { display: flex; align-items: start; gap: .65rem; margin-top: auto; padding: .85rem; border: 1px solid #d7e2ee; border-radius: .9rem; background: white; }
.session-card div { display: grid; gap: .18rem; }.session-card strong { font-size: .78rem; }.session-card span:not(.live-dot) { color: var(--muted); font-size: .72rem; font-variant-numeric: tabular-nums; }
.live-dot { width: 9px; height: 9px; flex: none; margin-top: .2rem; border-radius: 50%; background: #2a9b72; box-shadow: 0 0 0 4px #dcf5eb; }
.dashboard-main { min-width: 0; padding: 34px clamp(24px, 4.5vw, 70px) 72px; }
.dashboard-topbar { display: flex; justify-content: space-between; gap: 2rem; align-items: end; max-width: 1180px; margin: 0 auto 1.4rem; }
.dashboard-topbar h1 { margin: 0; font-size: clamp(2.25rem, 4.3vw, 4.5rem); line-height: 1; letter-spacing: -.06em; }
.dashboard-meta { display: flex; align-items: center; gap: 1rem; color: var(--muted); font-size: .82rem; }
.tab-panel { max-width: 1180px; margin: 0 auto; }
.focus-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(310px, .72fr); gap: 1rem; }
.safe-card, .surface-card { border-radius: var(--radius); }
.safe-card { min-height: 390px; display: flex; flex-direction: column; padding: clamp(1.5rem, 3vw, 2.35rem); background: linear-gradient(145deg, #061d3c, #0b417d); color: white; box-shadow: 0 24px 65px rgba(5, 33, 70, .2); }
.card-heading, .section-title, .page-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: start; }
.safe-card .card-kicker { color: #91c4ff; }.safe-card h2, .section-title h2 { margin: 0; font-size: 1.3rem; letter-spacing: -.03em; }
.protected-pill { padding: .42rem .65rem; border: 1px solid rgba(210,235,255,.28); border-radius: 999px; background: rgba(255,255,255,.11); font-size: .74rem; font-weight: 740; }
.hero-money { display: block; margin-top: auto; font-size: clamp(3.6rem, 7vw, 6.7rem); line-height: .98; letter-spacing: -.07em; font-variant-numeric: tabular-nums; }
.safe-card > p { max-width: 600px; margin: .8rem 0 1.2rem; color: #c7d9ef; }
.safe-track { height: 8px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.22); }
.safe-track span { width: 0; height: 100%; display: block; border-radius: inherit; background: #8fc2ff; transition: width .2s ease; }
.safe-stats, .runway-card dl, .cash-story dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1.2rem 0 0; }
dl div { display: grid; gap: .25rem; } dt { color: inherit; opacity: .72; font-size: .78rem; } dd { margin: 0; font-weight: 820; font-variant-numeric: tabular-nums; }
.surface-card { padding: 1.35rem; border: 1px solid #d9e3ee; background: rgba(255,255,255,.95); box-shadow: 0 12px 40px rgba(22, 51, 83, .06); }
.section-title > strong { font-size: 1.28rem; font-variant-numeric: tabular-nums; }.section-title > span { color: var(--blue); font-size: .86rem; font-weight: 780; }
.account-list, .compact-list, .goal-list, .calendar-list { display: grid; gap: .55rem; margin-top: 1rem; }
.account-row, .compact-row, .goal-row, .calendar-row { display: flex; align-items: center; gap: .75rem; padding: .72rem 0; border-top: 1px solid #e5ebf2; }
.account-row:first-child, .compact-row:first-child, .goal-row:first-child, .calendar-row:first-child { border-top: 0; }
.row-icon { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 13px; background: var(--blue-soft); color: var(--blue); font-size: .85rem; font-weight: 850; }
.account-row > div:nth-child(2), .compact-row > div:nth-child(2), .calendar-row > div:nth-child(2) { min-width: 0; display: grid; gap: .14rem; margin-right: auto; }
.account-row strong, .compact-row strong, .calendar-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.account-row small, .compact-row small, .calendar-row small { color: var(--muted); }
.row-amount { flex: none; font-weight: 820; font-variant-numeric: tabular-nums; }.row-amount.expense { color: var(--ink); }.row-amount.income { color: var(--green); }
.goal-row { display: grid; grid-template-columns: 1fr auto; }.goal-row > div:first-child { display: grid; gap: .45rem; }.goal-row small { color: var(--muted); }.goal-track { height: 7px; overflow: hidden; border-radius: 99px; background: #e8edf3; }.goal-track span { height: 100%; display: block; border-radius: inherit; background: var(--blue); }
.empty-card { padding: 1rem; border-radius: .85rem; background: #f2f6fa; color: var(--muted); font-size: .9rem; }

.page-heading { align-items: end; margin: 1.5rem 0 1.25rem; }.page-heading h2 { margin: 0; font-size: clamp(2.2rem, 4.2vw, 4rem); line-height: 1; letter-spacing: -.055em; }.page-heading p:last-child { margin: .7rem 0 0; color: var(--muted); }.summary-number { display: grid; text-align: right; }.summary-number span { color: var(--muted); font-size: .78rem; }.summary-number strong { font-size: 1.4rem; }
.transaction-groups { display: grid; gap: 1rem; }.transaction-group { overflow: hidden; border: 1px solid #d9e3ee; border-radius: var(--radius); background: white; }.transaction-group h3 { margin: 0; padding: .9rem 1.25rem; border-bottom: 1px solid #e4eaf1; background: #f8fafc; font-size: .9rem; }.transaction-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: .85rem; align-items: center; padding: 1rem 1.25rem; border-top: 1px solid #edf1f5; }.transaction-row:first-of-type { border-top: 0; }.transaction-row .row-icon { border-radius: 50%; background: white; border: 1px solid #dfe7ef; }.transaction-main { min-width: 0; display: grid; gap: .2rem; }.transaction-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.transaction-main small { color: var(--muted); }
.insight-grid, .plan-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 1rem; }.cash-story { display: flex; flex-direction: column; min-height: 330px; }.cash-story > strong { margin-top: auto; color: var(--blue); font-size: clamp(3rem, 6vw, 5.4rem); line-height: 1; letter-spacing: -.065em; }.cash-story > p:not(.card-kicker) { color: var(--muted); }.cash-story dl { padding-top: 1rem; border-top: 1px solid var(--line); }.category-list { display: grid; gap: .9rem; margin-top: 1.2rem; }.category-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: .8rem; align-items: center; }.category-row span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 680; }.category-bar { height: 10px; overflow: hidden; border-radius: 99px; background: #edf1f6; }.category-bar i { display: block; height: 100%; border-radius: inherit; background: var(--blue); }.category-row strong { font-size: .82rem; font-variant-numeric: tabular-nums; }
.runway-card { min-height: 315px; display: flex; flex-direction: column; }.runway-line { position: relative; height: 5px; display: flex; justify-content: space-between; margin: auto .7rem 1rem; border-radius: 99px; background: #b9cbe0; }.runway-line i { width: 17px; height: 17px; margin-top: -6px; border-radius: 50%; background: var(--blue); }.runway-card dl { margin-top: 1rem; }.calendar-card { min-height: 315px; }
.toast { position: fixed; z-index: 90; right: 1rem; bottom: 1rem; max-width: min(380px, calc(100% - 2rem)); padding: .8rem 1rem; border-radius: .8rem; background: var(--ink); color: white; box-shadow: 0 14px 40px rgba(0,0,0,.2); opacity: 0; transform: translateY(15px); pointer-events: none; transition: .2s ease; }.toast.visible { opacity: 1; transform: translateY(0); }
.noscript { padding: 1rem; background: #ffe8de; color: #6b2818; text-align: center; }

@media (max-width: 920px) {
  .pairing-view { grid-template-columns: 1fr; gap: 2.5rem; padding-top: 48px; }.pairing-copy h1 { max-width: 720px; }.pairing-card { width: min(100%, 520px); margin: 0 auto; }
  .dashboard { display: block; }.dashboard-nav { z-index: 10; position: fixed; inset: auto 12px 12px; width: auto; height: auto; display: block; padding: .45rem; border: 1px solid #d6e0eb; border-radius: 20px; background: rgba(255,255,255,.94); box-shadow: 0 12px 38px rgba(13,39,70,.18); backdrop-filter: blur(18px); }.dashboard-brand, .session-card { display: none; }.tab-list { grid-template-columns: repeat(4, 1fr); }.tab-list button { min-width: 0; min-height: 58px; display: grid; justify-items: center; gap: .2rem; padding: .45rem; font-size: .7rem; text-align: center; }.tab-list button[aria-selected="true"] { background: var(--blue-soft); color: var(--blue-deep); }.tab-list svg { width: 21px; height: 21px; }.dashboard-main { padding-bottom: 105px; }
  .focus-grid, .insight-grid, .plan-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .session-header { min-height: 64px; padding: 0 16px; }.privacy-status span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }.brand { font-size: 1.08rem; }.brand-mark { transform: scale(.88); }
  .pairing-view { width: min(100% - 32px, 520px); min-height: auto; padding: 42px 0 62px; }.pairing-copy h1 { font-size: clamp(2.8rem, 13vw, 4.2rem); }.lead { font-size: 1rem; }.privacy-points { gap: .4rem; }.privacy-points span { font-size: .72rem; }
  .pairing-card { padding: 1.05rem; border-radius: 22px; }.qr-frame { border-radius: 18px; }
  .dashboard-main { padding: 25px 16px 105px; }.dashboard-topbar { align-items: start; }.dashboard-meta { display: none; }.dashboard-topbar h1 { font-size: 2.65rem; }
  .safe-card { min-height: 360px; padding: 1.3rem; }.hero-money { font-size: clamp(3.35rem, 16vw, 5.4rem); }.safe-stats, .runway-card dl, .cash-story dl { gap: .5rem; }.safe-stats dd, .runway-card dd, .cash-story dd { font-size: .85rem; }
  .page-heading { align-items: start; }.summary-number { display: none; }.transaction-row { grid-template-columns: 42px minmax(0, 1fr) auto; padding: .9rem; }.category-row { grid-template-columns: 92px minmax(0, 1fr); }.category-row strong { grid-column: 2; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media (prefers-contrast: more) {
  :root { --line: #8191a5; }.surface-card, .pairing-card, .transaction-group { border-width: 2px; }.muted, small, dt { opacity: 1; }
}

/* Candy Pop session theme */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/bricolage-grotesque-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --ink: #16121f;
  --muted: #5f5764;
  --line: #16121f;
  --paper: #fffdf7;
  --wash: #fff6ec;
  --blue: #2b44f0;
  --blue-deep: #2138d8;
  --blue-soft: #e9ecff;
  --green: #176c50;
  --green-soft: #e8f8ef;
  --red: #ae2f4e;
  --pink: #ff5fa8;
  --lime: #c6f135;
  --orange: #ff7a1f;
  --yellow: #ffe44d;
  --shadow: 10px 10px 0 var(--ink);
  --radius: 26px;
}

html { background: var(--pink); }
body {
  position: relative;
  background: var(--pink);
  color: var(--ink);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.9'/%3E%3C/svg%3E");
}

.session-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 20;
  width: 100%;
  min-height: 82px;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
.brand, .dashboard-brand {
  color: var(--ink);
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 1.38rem;
  font-weight: 800;
}
.brand-mark { color: var(--blue); }
.privacy-status {
  padding: .55rem .8rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
  font-weight: 800;
}
.privacy-status svg { stroke: var(--ink); }
.quiet-button {
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: white;
  box-shadow: 4px 4px 0 var(--ink);
  font-weight: 800;
}
.quiet-button:hover { border-color: var(--ink); background: var(--yellow); transform: translate(-1px, -1px); }

.pairing-view {
  width: min(1280px, calc(100% - 56px));
  min-height: 100vh;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, .72fr);
  gap: clamp(3rem, 7vw, 7rem);
  padding: 142px 0 92px;
}
.pairing-copy { position: relative; }
.eyebrow, .card-kicker {
  color: var(--ink);
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 800;
}
.pairing-copy > .eyebrow {
  display: inline-flex;
  padding: .5rem .72rem;
  border: 3px solid var(--ink);
  background: var(--yellow);
  transform: rotate(-1.5deg);
}
.pairing-copy h1 {
  max-width: 850px;
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: clamp(4.2rem, 8.5vw, 9rem);
  font-weight: 800;
  line-height: .8;
  letter-spacing: -.078em;
  text-wrap: balance;
}
.ink-pill {
  display: inline-block;
  padding: .01em .16em .08em;
  border: clamp(4px, .055em, 7px) solid var(--ink);
  border-radius: .23em;
  background: var(--lime);
  box-shadow: .075em .075em 0 var(--ink);
  line-height: .76;
  transform: rotate(-1.5deg);
}
.lead { max-width: 650px; color: #3f3943; font-size: clamp(1.05rem, 1.5vw, 1.25rem); font-weight: 620; }
.session-note {
  display: inline-block;
  margin: 1.35rem 0 0;
  padding: .58rem .8rem;
  border: 3px solid var(--ink);
  border-radius: 12px;
  background: white;
  box-shadow: 5px 5px 0 var(--ink);
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 800;
  transform: rotate(1.2deg);
}
.pairing-steps li > span {
  border: 3px solid var(--ink);
  background: var(--orange);
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}
.pairing-steps strong { font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; }
.pairing-steps small { color: #4f4854; font-weight: 600; }
.privacy-points span {
  border: 2px solid var(--ink);
  background: rgba(255, 253, 247, .9);
  color: var(--ink);
  font-weight: 760;
}
.privacy-points svg { stroke: var(--blue); }

.pairing-card {
  border: 4px solid var(--ink);
  border-radius: 32px;
  background: var(--paper);
  box-shadow: 12px 12px 0 var(--ink);
  transform: rotate(.5deg);
}
.pairing-card h2, .section-title h2, .page-heading h2, .dashboard-topbar h1 {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 800;
}
.countdown { border: 2px solid var(--ink); background: var(--yellow); color: var(--ink); }
.qr-frame { border: 3px solid var(--ink); border-radius: 22px; }
.qr-logo { border-color: white; background: var(--lime); box-shadow: 4px 4px 0 var(--ink); }
.pairing-code { color: var(--ink); }
.status-copy { color: #554e59; }
.primary-button {
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--blue);
  box-shadow: 5px 5px 0 var(--ink);
  font-weight: 800;
}
.primary-button:hover { background: var(--orange); color: var(--ink); transform: translate(-1px, -1px); }
.text-button { color: var(--ink); font-weight: 800; }
.help-panel { border: 2px solid var(--ink); background: var(--lime); color: var(--ink); }

.dashboard { background: var(--wash); }
.dashboard-nav {
  border-right: 3px solid var(--ink);
  background: var(--lime);
}
.tab-list button { color: var(--ink); font-weight: 800; }
.tab-list button:hover { background: rgba(255,255,255,.72); color: var(--ink); }
.tab-list button[aria-selected="true"] {
  border: 3px solid var(--ink);
  background: var(--pink);
  color: var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
}
.session-card { border: 3px solid var(--ink); background: white; box-shadow: 4px 4px 0 var(--ink); }
.dashboard-main { background: radial-gradient(circle at 100% 0%, #ffe0ef 0, transparent 32rem), var(--wash); }
.dashboard-topbar .eyebrow, .page-heading .eyebrow {
  display: inline-flex;
  padding: .35rem .55rem;
  border: 2px solid var(--ink);
  background: var(--yellow);
  transform: rotate(-1deg);
}
.safe-card {
  border: 4px solid var(--ink);
  background: var(--blue);
  box-shadow: 9px 9px 0 var(--ink);
}
.safe-card .card-kicker { color: white; }
.safe-card > p { color: #f0f1ff; }
.safe-track span { background: var(--lime); }
.protected-pill { border: 2px solid white; background: var(--lime); color: var(--ink); }
.surface-card {
  border: 3px solid var(--ink);
  background: white;
  box-shadow: 7px 7px 0 var(--ink);
}
.focus-grid .surface-card:nth-child(2) { background: var(--yellow); }
.focus-grid .surface-card:nth-child(3) { background: white; }
.focus-grid .surface-card:nth-child(4) { background: #f1ffd0; }
.row-icon { border: 2px solid var(--ink); background: white; color: var(--blue); }
.goal-track, .category-bar { border: 2px solid var(--ink); background: white; }
.goal-track { height: 10px; }
.goal-track span, .category-bar i { background: var(--blue); }
.empty-card { border: 2px solid var(--ink); background: white; color: var(--ink); }
.transaction-group { border: 3px solid var(--ink); background: white; box-shadow: 7px 7px 0 var(--ink); }
.transaction-group h3 { border-bottom: 2px solid var(--ink); background: var(--yellow); }
.transaction-row { border-top-color: #d9d3dc; }
.transaction-row .row-icon { border: 2px solid var(--ink); }
.cash-story { background: var(--pink); }
.cash-story > strong { color: var(--ink); }
.category-card { background: var(--lime); }
.runway-card { background: var(--orange); }
.runway-line { border: 2px solid var(--ink); background: white; }
.runway-line i { border: 2px solid var(--ink); background: var(--blue); }
.calendar-card { background: var(--yellow); }
.toast { border: 3px solid white; background: var(--ink); box-shadow: 6px 6px 0 var(--blue); }

@media (max-width: 920px) {
  .dashboard-nav {
    border: 3px solid var(--ink);
    background: rgba(255, 253, 247, .95);
    box-shadow: 6px 6px 0 var(--ink);
  }
  .tab-list button[aria-selected="true"] { background: var(--pink); color: var(--ink); }
}

@media (max-width: 620px) {
  .session-header { min-height: 68px; }
  .privacy-status { padding: .45rem; }
  .pairing-view { width: min(100% - 34px, 520px); padding-top: 112px; }
  .pairing-copy h1 { font-size: clamp(3.7rem, 16vw, 5.5rem); }
  .pairing-card { box-shadow: 8px 8px 0 var(--ink); transform: none; }
}

/* Shared light and dark appearance control */
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.glass-theme-toggle { position: relative; display: inline-flex; align-items: center; gap: 7px; flex: none; min-width: 112px; min-height: 48px; padding: 7px 10px; border: 1px solid rgba(255,255,255,.65); border-radius: 999px; background: rgba(255,255,255,.34); color: var(--ink); box-shadow: inset 0 1px 0 rgba(255,255,255,.82), inset 0 -1px 0 rgba(22,18,31,.12), 0 10px 26px rgba(22,18,31,.16); backdrop-filter: blur(18px) saturate(145%); -webkit-backdrop-filter: blur(18px) saturate(145%); cursor: pointer; transition: transform .2s ease, background-color .25s ease, color .25s ease; }
.glass-theme-toggle::after { content: ""; position: absolute; inset: 3px 14px auto; height: 1px; background: rgba(255,255,255,.76); border-radius: 50%; }
.glass-theme-toggle:hover { transform: translateY(-2px); background: rgba(255,255,255,.48); }
.theme-icon { display: grid; place-items: center; width: 20px; height: 20px; }
.theme-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle-track { position: relative; width: 36px; height: 22px; border: 2px solid currentColor; border-radius: 99px; background: rgba(255,255,255,.28); }
.theme-toggle-track i { position: absolute; top: 3px; left: 3px; width: 12px; height: 12px; border-radius: 50%; background: currentColor; transition: transform .25s cubic-bezier(.2,.8,.2,1); }
.glass-theme-toggle[aria-pressed="true"] .theme-toggle-track i { transform: translateX(14px); }

html[data-theme="dark"] body { background: #101015; color: #f7f4ff; }
html[data-theme="dark"] body::before { opacity: .025; filter: invert(1); }
html[data-theme="dark"] .brand,
html[data-theme="dark"] .dashboard-brand { color: #f7f4ff; }
html[data-theme="dark"] .brand-mark { color: #9fa8ff; }
html[data-theme="dark"] .glass-theme-toggle { border-color: rgba(255,255,255,.26); background: rgba(24,24,32,.68); color: #f7f4ff; box-shadow: inset 0 1px 0 rgba(255,255,255,.24), inset 0 -1px 0 rgba(0,0,0,.3), 0 12px 34px rgba(0,0,0,.34); }
html[data-theme="dark"] .glass-theme-toggle:hover { background: rgba(38,38,50,.82); }
html[data-theme="dark"] .privacy-status { border-color: #7483ff; background: #20202a; color: #f7f4ff; }
html[data-theme="dark"] .privacy-status svg { stroke: #9fa8ff; }
html[data-theme="dark"] .pairing-copy > .eyebrow,
html[data-theme="dark"] .session-note { border-color: #7483ff; background: #20202a; color: #f7f4ff; box-shadow: 5px 5px 0 #08080c; }
html[data-theme="dark"] .ink-pill { border-color: #7483ff; background: #20202a; color: #f7f4ff; box-shadow: .075em .075em 0 #7483ff; }
html[data-theme="dark"] .lead,
html[data-theme="dark"] .pairing-steps small,
html[data-theme="dark"] .status-copy,
html[data-theme="dark"] .dashboard-meta,
html[data-theme="dark"] .page-heading p:last-child,
html[data-theme="dark"] .summary-number span { color: #c8c4d0; }
html[data-theme="dark"] .pairing-steps li > span,
html[data-theme="dark"] .privacy-points span { border-color: #4f4f60; background: #20202a; color: #f7f4ff; }
html[data-theme="dark"] .pairing-card { border-color: #4f4f60; background: #20202a; color: #f7f4ff; box-shadow: 10px 10px 0 #08080c; }
html[data-theme="dark"] .countdown { border-color: #7483ff; background: #29293b; color: #f7f4ff; }
html[data-theme="dark"] .pairing-code { color: #f7f4ff; }
html[data-theme="dark"] .text-button { color: #b8beff; }
html[data-theme="dark"] .help-panel { border-color: #4f4f60; background: #15151c; color: #d5d1dc; }
html[data-theme="dark"] .quiet-button { border-color: #5d5d6b; background: #20202a; color: #f7f4ff; box-shadow: 4px 4px 0 #08080c; }
html[data-theme="dark"] .dashboard { background: #101015; }
html[data-theme="dark"] .dashboard-nav { border-color: #4f4f60; background: #17171f; }
html[data-theme="dark"] .dashboard-main { background: #101015; }
html[data-theme="dark"] .tab-list button { color: #c8c4d0; }
html[data-theme="dark"] .tab-list button:hover { background: #252530; color: #f7f4ff; }
html[data-theme="dark"] .tab-list button[aria-selected="true"] { border-color: #7483ff; background: #29293b; color: #f7f4ff; box-shadow: 4px 4px 0 #08080c; }
html[data-theme="dark"] .session-card,
html[data-theme="dark"] .surface-card,
html[data-theme="dark"] .transaction-group,
html[data-theme="dark"] .empty-card { border-color: #4f4f60; background: #20202a !important; color: #f7f4ff; box-shadow: 7px 7px 0 #08080c; }
html[data-theme="dark"] .safe-card { border-color: #4f4f60; background: #1e2457; box-shadow: 8px 8px 0 #08080c; }
html[data-theme="dark"] .transaction-group h3 { border-color: #4f4f60; background: #292936; }
html[data-theme="dark"] .transaction-row,
html[data-theme="dark"] .account-row,
html[data-theme="dark"] .compact-row,
html[data-theme="dark"] .goal-row,
html[data-theme="dark"] .calendar-row { border-color: #3c3c49; }
html[data-theme="dark"] .row-icon,
html[data-theme="dark"] .transaction-row .row-icon { border-color: #5d5d6b; background: #15151c; color: #aab2ff; }
html[data-theme="dark"] .account-row small,
html[data-theme="dark"] .compact-row small,
html[data-theme="dark"] .calendar-row small,
html[data-theme="dark"] .goal-row small,
html[data-theme="dark"] .transaction-main small,
html[data-theme="dark"] .cash-story > p:not(.card-kicker) { color: #aaa5b2; }
html[data-theme="dark"] .row-amount.expense,
html[data-theme="dark"] .cash-story > strong { color: #f7f4ff; }
html[data-theme="dark"] .goal-track,
html[data-theme="dark"] .category-bar,
html[data-theme="dark"] .runway-line { border-color: #5d5d6b; background: #15151c; }

@media (max-width: 620px) {
  .session-header { gap: .55rem; }
  .session-header .glass-theme-toggle { min-width: 84px; min-height: 42px; padding: 5px 7px; gap: 4px; }
  .session-header .theme-icon { width: 16px; height: 16px; }
  .session-header .theme-icon svg { width: 15px; height: 15px; }
  .session-header .theme-toggle-track { width: 28px; height: 18px; }
  .session-header .theme-toggle-track i { width: 8px; height: 8px; }
  .session-header .glass-theme-toggle[aria-pressed="true"] .theme-toggle-track i { transform: translateX(12px); }
}
