/* Rocket Money web shell tokens (measured from app.rocketmoney.com) */
:root {
  --red: #DE3341;           /* logo / brand */
  --red-deep: #A3202B;      /* active nav icon stroke */
  --red-grad-a: #B5122A;    /* mobile Goals header gradient */
  --red-grad-b: #E8424F;
  --ink: #111111;
  --ink-2: #4a4a4a;
  --muted: #777777;
  --icon: #949494;
  --line: #e9e9e9;
  --panel: #f7f7f7;         /* main grey panel + active nav pill */
  --card: #ffffff;
  --shadow: rgba(6,26,54,.06) 0 4px 12px 0;
  --green: #138a3b;
  --green-bg: #e7f6ec;
  --blue-pill: #e5eefa;
  --gold: #f2b84b;
  --sidebar-w: 300px;
  --bar-h: 44px;
  --radius: 24px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
/* Rocket Money uses a licensed typeface; the concept deliberately does not reference it. DM Sans is the closest free match. */
body { font-family: "DM Sans", Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: #fff; font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; color: inherit; }
svg { display: block; }
.sr { position: absolute; left: -9999px; }

/* ---------- Demo bar (not part of the product) ---------- */
.demo-bar { position: sticky; top: 0; z-index: 60; height: var(--bar-h); background: #111417; color: #e8eaed; display: flex; align-items: center; gap: 14px; padding: 0 16px; font-size: 13px; }
.demo-bar .brand { font-weight: 600; white-space: nowrap; }
.demo-bar .sub { color: #9aa0a6; white-space: nowrap; }
.demo-bar .spacer { flex: 1; }
.demo-bar .dbtn { border: 1px solid #3a3f46; background: none; color: #c8ccd1; border-radius: 999px; padding: 5px 12px; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.demo-bar .dbtn:hover { background: #24282d; color: #fff; }
.demo-bar .dbtn.on { background: #fff; color: #111417; border-color: #fff; }

/* ---------- App shell ---------- */
.shell { display: flex; min-height: calc(100vh - var(--bar-h)); }
.sidebar { width: var(--sidebar-w); flex: 0 0 var(--sidebar-w); padding: 22px 16px 24px 28px; display: flex; flex-direction: column; }
.sidebar .logo { height: 32px; margin: 0 0 28px 0; }
.nav { list-style: none; margin: 0; padding: 0; }
.nav li a { display: flex; align-items: center; gap: 14px; height: 56px; padding: 0 16px; border-radius: 16px; text-decoration: none; font-size: 16px; color: var(--ink); }
.nav li a svg { color: var(--icon); flex: 0 0 24px; }
.nav li a:hover { background: #fafafa; }
.nav li a.active { background: var(--panel); }
.nav li a.active svg { color: var(--red-deep); }
.nav .pill { margin-left: auto; background: var(--blue-pill); border-radius: 999px; padding: 2px 8px; font-size: 13px; }
.sidebar .bottom { margin-top: auto; }
.sidebar .legal { color: var(--muted); font-size: 13px; margin: 20px 0 0; line-height: 1.4; }
.sidebar .legal a { display: block; margin-top: 6px; font-size: 12px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 18px; height: 80px; padding: 0 24px 0 0; }
.topbar .ico { background: none; border: 0; padding: 6px; cursor: pointer; border-radius: 12px; color: var(--ink); }
.topbar .ico:hover { background: var(--panel); }
.topbar h1 { font-size: 24px; font-weight: 500; margin: 0 0 0 8px; }
.panel { background: var(--panel); border-radius: 40px 0 0 0; padding: 24px; flex: 1; }

/* ---------- Primitives ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--ink); background: #fff; color: var(--ink); font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap; text-decoration: none; }
.btn:hover { background: #f3f3f3; }
.btn.primary { background: var(--ink); color: #fff; }
.btn.primary:hover { background: #2a2a2a; }
.btn.primary:disabled { background: #bdbdbd; border-color: #bdbdbd; cursor: not-allowed; }
.btn.ghost { background: #f2f2f2; border-color: #f2f2f2; }
.btn.ghost:hover { background: #e9e9e9; border-color: #e9e9e9; }
.btn.lg { height: 48px; padding: 0 16px; font-size: 16px; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; }
.eyebrow { font-size: 12px; font-weight: 500; letter-spacing: .72px; text-transform: uppercase; color: var(--icon); }
.muted { color: var(--muted); }
.money { font-variant-numeric: tabular-nums; }
.green { color: var(--green); }
.bar { height: 6px; border-radius: 16px; background: rgba(0,0,0,.1); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 16px; background: var(--red); transition: width .4s ease; }
.bar.green > i { background: var(--green); }
.row { display: flex; align-items: center; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.iconwrap { width: 48px; height: 48px; border-radius: 50%; background: var(--panel); display: grid; place-items: center; color: var(--ink); flex: 0 0 48px; }
.iconwrap.red { background: #fdecee; color: var(--red-deep); }
.iconwrap.sm { width: 40px; height: 40px; flex-basis: 40px; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px); background: #111; color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 14px; opacity: 0; pointer-events: none; transition: all .2s; z-index: 80; }
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Goals: layout ---------- */
.g-head { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 20px; }
.g-head h2 { font-size: 24px; font-weight: 500; margin: 0; }
.g-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 24px; }

/* Empty state (mobile intro carousel, laid out as one screen) */
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: center; padding: 40px; }
.hero h3 { font-size: 32px; line-height: 1.2; font-weight: 500; margin: 0 0 12px; }
.hero p { font-size: 16px; color: var(--ink-2); margin: 0 0 24px; max-width: 460px; }
.hero .art { background: var(--panel); border-radius: 20px; padding: 8px; }
.hero .art img, .prop img { display: block; width: 100%; height: auto; }
.props { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.prop img { background: var(--panel); border-radius: 16px; margin-bottom: 14px; }
.prop { background: #fff; border-radius: 20px; box-shadow: var(--shadow); padding: 20px; }
.prop .iconwrap { margin-bottom: 14px; }
.prop b { display: block; font-weight: 500; font-size: 15px; margin-bottom: 4px; }
.prop span { font-size: 13px; color: var(--muted); line-height: 1.45; display: block; }
.coming { display: inline-flex; align-items: center; gap: 8px; background: var(--blue-pill); border-radius: 999px; padding: 4px 12px; font-size: 13px; margin-bottom: 14px; }

/* Summary header (mobile red header, kept as the page's hero card) */
.summary { background: linear-gradient(135deg, var(--red-grad-a), var(--red-grad-b)); color: #fff; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.summary .piggy { display: flex; align-items: center; gap: 16px; background: #fff; color: var(--ink); border-radius: 16px; padding: 12px 16px; margin-bottom: 18px; font-size: 15px; line-height: 1.4; }
.summary .piggy .art { flex: 0 0 52px; display: block; }
.summary .piggy .art img { display: block; width: 52px; height: 48px; object-fit: contain; }
.summary .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.summary .eyebrow { color: rgba(255,255,255,.8); }
.summary .big { font-size: 40px; font-weight: 500; line-height: 1.1; margin: 6px 0 2px; }
.summary .tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 20px; }
.summary .tile { background: rgba(255,255,255,.14); border-radius: 16px; padding: 14px 16px; }
.summary .tile b { display: block; font-size: 20px; font-weight: 500; }
.summary .tile span { font-size: 13px; opacity: .85; }
.summary .next { margin-top: 16px; background: #fff; color: var(--ink); border-radius: 16px; padding: 12px 16px; display: flex; align-items: center; gap: 12px; cursor: pointer; }
.summary .next .bar { flex: 1; }
.summary .next .star { width: 32px; height: 32px; border-radius: 50%; background: #fff3d6; color: #c98a0a; display: grid; place-items: center; flex: 0 0 32px; }

/* Goal cards */
.goal { padding: 20px 24px; display: grid; grid-template-columns: 48px 1fr auto; gap: 16px; align-items: center; cursor: pointer; }
.goal:hover { box-shadow: rgba(6,26,54,.12) 0 8px 20px 0; }
.goal .name { font-weight: 500; font-size: 16px; }
.goal .amt { font-size: 24px; font-weight: 500; margin: 2px 0; }
.goal .amt small { font-size: 14px; color: var(--muted); font-weight: 400; margin-left: 6px; }
.goal .meta { font-size: 13px; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; }
.goal .bar { margin: 10px 0 8px; }
.goal .side { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.goal .pct { font-size: 13px; color: var(--muted); }
.goal.paused { opacity: .75; }
.badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 500; }
.badge.ok { background: var(--green-bg); color: var(--green); }
.badge.warn { background: #fff3d6; color: #9a6400; }
.badge.grey { background: var(--panel); color: var(--muted); }
.hexes { display: flex; gap: 6px; margin-top: 10px; }
.hex { width: 26px; height: 28px; display: grid; place-items: center; position: relative; color: #c9c9c9; }
.hex svg.shape { position: absolute; inset: 0; width: 26px; height: 28px; }
.hex > span { position: relative; font-size: 11px; font-weight: 600; }
.hex.on { color: #9a6400; }
.hex.on svg.shape path { fill: #fff3d6; stroke: var(--gold); }
.addrow { display: flex; align-items: center; gap: 12px; padding: 16px 24px; cursor: pointer; }
.addrow:hover { background: #fcfcfc; }
.addrow .grow { font-size: 15px; }

/* Right column */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 14px; }
.list li:first-child { border-top: 0; padding-top: 4px; }
.list li .grow b { display: block; font-weight: 500; }
.list li .grow span { color: var(--muted); font-size: 13px; }
.card h4 { margin: 0 0 12px; font-size: 18px; font-weight: 500; }
.feedback { text-align: center; }
.feedback .eyebrow { color: var(--ink); }
.feedback .emojis { display: flex; justify-content: center; gap: 16px; margin: 14px 0 12px; }
.feedback .emojis button { width: 48px; height: 48px; border-radius: 50%; border: 0; background: #fff; box-shadow: var(--shadow); font-size: 24px; line-height: 1; cursor: pointer; transition: transform .12s; }
.feedback .emojis button:hover { transform: scale(1.08); }
.feedback .emojis button.on { box-shadow: 0 0 0 2px var(--ink), var(--shadow); }
.feedback small { color: var(--ink); font-size: 14px; }
.feedback small a { text-decoration: underline; }
.card.feedback { background: transparent; box-shadow: none; padding: 8px 0; }
.feedback a { text-decoration: underline; }

/* Detail view */
.detail-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.detail-head .back { background: none; border: 0; padding: 6px; border-radius: 10px; cursor: pointer; }
.detail-head .back:hover { background: #ececec; }
.detail-head h2 { margin: 0; font-size: 24px; font-weight: 500; }
.stat { display: flex; gap: 32px; flex-wrap: wrap; }
.stat div b { display: block; font-size: 28px; font-weight: 500; }
.stat div span { font-size: 13px; color: var(--muted); }
.chart { width: 100%; height: 220px; margin-top: 16px; }
.ms-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.ms { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 16px; background: var(--panel); font-size: 13px; }
.ms b { display: block; font-weight: 500; font-size: 14px; }
.ms span { color: var(--muted); }
.ms .hex { flex: 0 0 26px; }
table.tx { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tx th { text-align: left; font-weight: 500; color: var(--icon); font-size: 12px; text-transform: uppercase; letter-spacing: .72px; padding: 0 0 10px; border-bottom: 1px solid var(--line); }
table.tx td { padding: 12px 0; border-bottom: 1px solid var(--line); }
table.tx td:last-child, table.tx th:last-child { text-align: right; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 10px 16px; font-size: 14px; }
.kv dt { color: var(--muted); margin: 0; } .kv dd { margin: 0; text-align: right; font-weight: 500; }

/* ---------- Wizard (modal) ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(17,17,17,.45); z-index: 70; display: none; align-items: center; justify-content: center; padding: 72px 24px 24px; }
.modal-bg.on { display: flex; }
.modal { position: relative; background: #fff; border-radius: 24px; width: min(1040px, 100%); max-height: calc(100vh - 96px); display: grid; grid-template-rows: auto 1fr auto; overflow: visible; }
.modal > :not(.xclose) { min-width: 0; }
.modal.narrow { width: min(560px, 100%); }
.modal.mid { width: min(680px, 100%); }
.modal.narrow .confirm { padding: 40px 32px 32px; }
.modal > .mbody, .modal > .form.single { border-radius: 0; }
.modal > :first-child:not(.xclose), .modal > .xclose + * { border-radius: 24px 24px 0 0; }
.modal > :last-child { border-radius: 0 0 24px 24px; }
/* Rocket Money's dialog close: white × in a dark circle, perched on the top-right corner of the card */
.xclose { position: absolute; top: -52px; right: 0; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; display: grid; place-items: center; cursor: pointer; z-index: 2; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.xclose:hover { background: #333; }
.xclose svg { width: 20px; height: 20px; }
.modal .mhead { display: flex; align-items: center; gap: 12px; padding: 22px 32px 0; }
.modal .mhead .progress { flex: 1; height: 4px; background: var(--line); border-radius: 4px; overflow: hidden; }
.modal .mhead .progress i { display: block; height: 100%; background: var(--ink); transition: width .3s; }
.modal .mhead button { background: none; border: 0; padding: 6px; border-radius: 10px; cursor: pointer; }
.modal .mhead button:hover { background: var(--panel); }
.modal .mbody { display: grid; grid-template-columns: 1fr 360px; gap: 0; overflow: auto; }
.modal .form { padding: 20px 32px 24px; }
.modal .form h3 { font-size: 24px; font-weight: 500; margin: 0 0 6px; }
.modal .form > p { color: var(--ink-2); margin: 0 0 20px; font-size: 15px; }
.modal .preview { background: var(--panel); padding: 28px 28px 24px; border-left: 1px solid var(--line); }
.modal .preview h5 { margin: 0 0 14px; font-size: 13px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
.modal .preview .big { font-size: 28px; font-weight: 500; line-height: 1.15; }
.modal .preview .sub { color: var(--muted); font-size: 14px; margin-top: 2px; }
.modal .preview .chart { height: 150px; margin-top: 12px; }
.modal .preview dl { margin: 16px 0 0; }
.modal .mfoot { display: flex; justify-content: space-between; align-items: center; padding: 16px 32px 20px; border-top: 1px solid var(--line); }
.modal .mfoot .left { color: var(--muted); font-size: 13px; }

.opt { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 16px; cursor: pointer; margin-bottom: 10px; background: #fff; }
.opt:hover { border-color: #cfcfcf; }
.opt.on { border-color: var(--ink); }
.opt .t { font-weight: 500; font-size: 15px; }
.opt .d { color: var(--muted); font-size: 13px; }
.opt .radio { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid #bbb; margin-left: auto; flex: 0 0 20px; display: grid; place-items: center; }
.opt.on .radio { border-color: var(--ink); }
.opt.on .radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); }
.opt.rec { border-color: #b9dfc4; background: #f6fcf8; }
.opt.rec.on { border-color: var(--green); }
.opt .rectag { font-size: 11px; font-weight: 600; color: var(--green); background: var(--green-bg); border-radius: 999px; padding: 2px 8px; margin-left: 8px; vertical-align: middle; }
.opt ul { margin: 6px 0 0; padding: 0; list-style: none; font-size: 13px; color: var(--ink-2); }
.opt ul li { display: flex; gap: 8px; align-items: center; margin-top: 4px; }
.opt ul li svg { width: 16px; height: 16px; color: var(--green); }
.group { font-size: 12px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); margin: 16px 0 8px; }
.field { display: block; position: relative; margin-bottom: 12px; background: var(--panel); border-radius: 16px; height: 56px; }
.field > span:not(.pre) { position: absolute; left: 16px; top: 9px; font-size: 12px; color: var(--ink); line-height: 16px; pointer-events: none; }
.field input, .field select { width: 100%; height: 56px; border: 0; border-radius: 16px; padding: 22px 16px 0; font: inherit; font-size: 16px; background: transparent; color: var(--ink); }
.field select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
.field:focus-within { box-shadow: 0 0 0 1.5px var(--ink) inset; }
.field input:focus, .field select:focus { outline: none; }
.field .pre { display: block; position: static; }
.field .pre input { padding-left: 29px; }
.field .pre::before { content: "$"; position: absolute; left: 16px; top: 22px; height: 34px; line-height: 34px; color: var(--ink); font-size: 16px; pointer-events: none; }
/* no native spinners on amount fields */
.field input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.field input[type=number]::-webkit-outer-spin-button, .field input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.field input[type=date] { padding-right: 44px; }
.field input[type=date]::-webkit-calendar-picker-indicator { position: absolute; right: 14px; top: 18px; cursor: pointer; }
.field input::placeholder { color: #b5b5b5; }
.inline { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.slider { margin: 10px 0 0; }
.slider input[type=range] { width: 100%; accent-color: var(--ink); }
.slider .ends { display: flex; justify-content: space-between; font-size: 13px; margin-top: 4px; }
.slider .ends b { display: block; font-weight: 500; } .slider .ends span { color: var(--muted); font-size: 12px; }
.slider .ends .r { text-align: right; }
.pacechip { display: inline-block; background: var(--ink); color: #fff; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 500; margin-bottom: 8px; }
.flow { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin: 6px 0 18px; text-align: center; font-size: 13px; }
.flow .node { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.flow .node .iconwrap { width: 56px; height: 56px; flex-basis: 56px; }
.flow .node .iconwrap.red { background: var(--red); color: #fff; }
.flow .arrow { color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.flow .arrow .chip { background: #3b1f6b; color: #fff; font-size: 11px; border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.facts { list-style: none; margin: 0; padding: 0; }
.facts li { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.facts li:first-child { border-top: 0; }
.facts li .iconwrap.sm { background: var(--panel); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--ink-2); cursor: pointer; margin-top: 16px; }
.check input { margin: 3px 0 0; accent-color: var(--ink); }
.review li { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 14px; align-items: flex-start; }
.review li:first-child { border-top: 0; }
.review li svg { color: var(--green); flex: 0 0 24px; }
.review { list-style: none; margin: 0 0 8px; padding: 0; }

/* Celebration */
.celebrate { text-align: center; padding: 40px 32px; }
.celebrate .bighex { width: 120px; height: 130px; margin: 0 auto 20px; position: relative; display: grid; place-items: center; color: #6a8a2a; animation: pop .5s ease-out; }
.celebrate .bighex img { width: 120px; height: 130px; object-fit: contain; }
.celebrate .bighex svg.shape { position: absolute; inset: 0; width: 120px; height: 130px; }
.celebrate .bighex svg.shape path { fill: #fff6df; stroke: var(--gold); stroke-width: 2; }
.celebrate .bighex .ic { position: relative; }
.celebrate .bighex .ic svg { width: 56px; height: 56px; }
.celebrate h3 { font-size: 26px; font-weight: 500; margin: 0 0 8px; }
.celebrate p { color: var(--ink-2); margin: 0 auto 24px; max-width: 420px; }
.finalizing { text-align: center; padding: 60px 32px; }
.finalizing .bar { width: 240px; margin: 16px auto; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---------- Product notes drawer ---------- */
.notes { position: fixed; right: 16px; top: calc(var(--bar-h) + 16px); width: 320px; max-height: calc(100vh - var(--bar-h) - 32px); overflow: auto; background: #fff; border-radius: 16px; box-shadow: 0 8px 30px rgba(0,0,0,.18); padding: 16px 18px; z-index: 65; font-size: 13px; line-height: 1.45; display: none; }
.notes.on { display: block; }
.notes h5 { margin: 0 0 10px; font-size: 14px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(222,51,65,.7); } 70% { box-shadow: 0 0 0 12px rgba(222,51,65,0); } 100% { box-shadow: 0 0 0 0 rgba(222,51,65,0); } }
@keyframes flash { 0%, 100% { color: inherit; } 50% { color: var(--red); } }
.notes.pulse { animation: ring .8s ease-out 3; }
.demo-bar .dbtn.pulse { animation: ring .7s ease-out 3, flash .7s ease-in-out 3; }
.notes h5 .hb { display: inline-flex; gap: 6px; align-items: center; }
.notes h5 button { border: 0; background: #f1f3f5; border-radius: 999px; height: 26px; padding: 0 10px; cursor: pointer; font: inherit; font-size: 12px; font-weight: 600; }
.notes h5 button.x { width: 26px; padding: 0; border-radius: 50%; font-size: 16px; font-weight: 500; }
/* Collapsed by default so it never covers the product; expands on click or when a badge is clicked */
.notes:not(.open) { width: auto; padding: 10px 14px; }
.notes:not(.open) ol, .notes:not(.open) .foot { display: none; }
.notes:not(.open) h5 { margin: 0; cursor: pointer; }
.notes ol { margin: 0; padding: 0; list-style: none; }
.notes li { display: grid; grid-template-columns: 24px 1fr 16px; gap: 10px; padding: 10px 8px; margin: 0 -8px; border-top: 1px solid #eef0f2; cursor: pointer; border-radius: 10px; align-items: start; }
.notes li:hover { background: #f7f7f7; }
.notes li::after { content: "›"; color: #9aa0a6; font-size: 16px; line-height: 1; margin-top: 2px; }
.notes .hint { font-size: 12px; color: var(--muted); margin: 6px 0 10px; }
.notes .hint .linkbtn { font-size: 12px; }
.co.pulse { animation: ring .7s ease-out 3; }
.notes .n { width: 22px; height: 22px; border-radius: 50%; background: #111417; color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.notes b { display: block; font-weight: 600; margin-bottom: 2px; }
.notes p { margin: 0; color: var(--ink-2); }
.notes .foot { margin-top: 10px; padding-top: 10px; border-top: 1px solid #eef0f2; color: var(--muted); font-size: 12px; }
.co { position: absolute; z-index: 5; width: 24px; height: 24px; border-radius: 50%; background: #111417; color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 3px #fff; top: -10px; left: -10px; cursor: pointer; }
body:not([data-notes="on"]) .co { display: none; }
.rel { position: relative; }

/* When the notes panel is open on a wide screen, give it its own column so it never covers the product */
@media (min-width: 1640px) { body.notes-open .panel { padding-right: 376px; } body.notes-open .topbar { padding-right: 376px; } }
/* ---------- Responsive (tiers measured on app.rocketmoney.com) ----------
   < 460px   : hand-off screen ("Please use the Rocket Money mobile app")
   460–1365  : 80px icon rail, bell/gear in the rail, greeting at 20px, no labels
   ≥ 1366    : full sidebar with labels (240px; 300px on very wide screens) */
.logo-mark, .rail-icons { display: none; }

@media (max-width: 1899px) { :root { --sidebar-w: 240px; } .sidebar { padding: 20px 16px 24px 24px; } }
@media (max-width: 1500px) { .notes { width: 280px; } }
@media (max-width: 1200px) { .g-grid { grid-template-columns: 1fr; } .props { grid-template-columns: repeat(3, 1fr); } .hero { grid-template-columns: 1fr; } .modal .mbody { grid-template-columns: 1fr; } .modal .preview { border-left: 0; border-top: 1px solid var(--line); } }

/* Icon rail */
@media (max-width: 1365px) {
  :root { --sidebar-w: 80px; }
  .sidebar { padding: 20px 0 20px; align-items: center; }
  .sidebar .logo { height: 32px; margin: 0 0 28px; }
  .logo-full { display: none; } .logo-mark { display: block; }
  .rail-icons { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
  .rail-icons .ico { width: 40px; height: 40px; border: 0; background: none; border-radius: 999px; display: grid; place-items: center; cursor: pointer; color: var(--ink); }
  .rail-icons .ico:hover { background: var(--panel); }
  .nav { width: 60px; }
  .nav li { margin: 0 0 4px; }
  .nav li a { width: 60px; height: 44px; padding: 0; justify-content: center; border-radius: 12px; }
  .nav li a span, .nav .pill { display: none; }
  .nav li a.active { background: #fdecee; }
  .nav li a .co { display: none; }
  .sidebar .legal { display: none; }
  .sidebar .bottom .nav li a { width: 48px; }
  .topbar .ico { display: none; }
  .topbar { height: 80px; padding-left: 12px; }
  .topbar h1 { font-size: 20px; margin: 0; }
  .panel { border-radius: 40px 40px 0 0; margin-left: 12px; }
  body.notes-open .panel, body.notes-open .topbar { padding-right: 24px; }
}

@media (max-width: 900px) {
  .notes { position: fixed; left: 12px; right: 12px; top: auto; bottom: 12px; width: auto; max-height: 60vh; }
  .notes:not(.open) { width: auto; }
  .demo-bar { height: auto; min-height: var(--bar-h); flex-wrap: wrap; gap: 8px; padding: 8px 12px; } .demo-bar .sub { display: none; } .demo-bar .dbtn { padding: 4px 10px; }
  .detail-head { flex-wrap: wrap; row-gap: 10px; }
  .detail-head h2 { font-size: 20px; }
}

@media (max-width: 760px) {
  .panel { padding: 16px; }
  .hero { padding: 24px; } .hero h3 { font-size: 26px; }
  .props { grid-template-columns: 1fr; }
  .summary .tiles { grid-template-columns: 1fr; }
  .goal { grid-template-columns: 40px 1fr; } .goal .side { grid-column: 1 / -1; align-items: flex-start; flex-direction: row; }
  .ms-grid { grid-template-columns: 1fr 1fr; }
  .modal-bg { padding: 16px 12px; align-items: flex-end; }
  .modal { border-radius: 20px; max-height: calc(100vh - 32px); } .modal .form { padding: 16px; } .modal .mfoot { padding: 12px 16px; }
  .xclose { top: 10px; right: 10px; width: 36px; height: 36px; box-shadow: none; }   /* inside the card on small screens */
  .modal .mhead, .modal .mshead { padding-right: 56px; }
  .modal > .form.single > h3, .confirm h3 { padding-right: 32px; }
  .confirm { padding: 36px 20px 24px; }
  table.tx th:nth-child(3), table.tx td:nth-child(3) { display: none; }
  .stat { gap: 20px 28px; } .stat div b { font-size: 24px; }
}

/* Hand-off screen (phone widths), unless the viewer chose to continue */
@media (max-width: 459px) {
  /* phone widths: stack the shell like a simple responsive page (the real web app hands off to the mobile app here) */
  .shell { flex-direction: column; }
  .sidebar { width: auto; flex: none; padding: 12px 16px; flex-direction: row; align-items: center; gap: 8px; }
  .sidebar .logo { margin: 0 8px 0 0; }
  .rail-icons { flex-direction: row; margin: 0; }
  .nav { display: flex; flex-wrap: wrap; width: auto; gap: 2px; }
  .nav li { margin: 0; } .nav li a { width: 40px; height: 40px; }
  .sidebar .bottom { display: none; }
  .panel { margin-left: 0; border-radius: 24px 24px 0 0; }
  .topbar { height: 56px; padding-left: 16px; }
}

/* ---------- Edit / delete / amount flows ---------- */
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: 46px; width: 240px; background: #fff; border-radius: 16px; box-shadow: 0 8px 24px rgba(6,26,54,.14); border: 1px solid var(--line); padding: 8px; z-index: 30; display: none; }
.menu.on { display: block; }
.menu .mtitle { font-size: 12px; font-weight: 600; color: var(--muted); padding: 8px 12px 6px; }
.menu button { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none; padding: 10px 12px; border-radius: 10px; font-size: 14px; cursor: pointer; text-align: left; }
.menu button:hover { background: var(--panel); }
.menu button svg { width: 20px; height: 20px; color: var(--ink-2); }
.menu button.danger { color: var(--red); } .menu button.danger svg { color: var(--red); }
.modal .mtitle-lg { font-size: 24px; font-weight: 500; }
.modal > .form.single { grid-column: 1 / -1; max-width: none; overflow: auto; min-height: 0; }
.modal > .form.single > * { max-width: 720px; }
.modal .mhead .btn { height: 36px; }
.modal .form.single h3 { margin-bottom: 14px; }
.modal .form.edit .sec { padding: 18px 0; border-top: 1px solid var(--line); }
.modal .form.edit .sec:first-child { border-top: 0; padding-top: 4px; }
.modal .form.edit h6 { margin: 0 0 12px; font-size: 15px; font-weight: 600; }
.modal .form.edit .opt { margin-bottom: 8px; }
.danger-link { color: var(--ink); font-size: 14px; font-weight: 500; text-decoration: underline; }
.danger-bg { background: #ffbf51 !important; border-color: #c78b23 !important; color: #492800 !important; }
.danger-bg:hover { background: #f5b43f !important; }
.chips { display: flex; gap: 8px; margin: -4px 0 14px; }
.chip { border: 1px solid #f2f2f2; background: #f2f2f2; border-radius: 999px; padding: 8px 12px; font-size: 14px; font-weight: 500; cursor: pointer; }
.chip:hover { background: #e9e9e9; }
.confirm { text-align: center; padding: 44px 40px 36px; }
.confirm h3 { font-size: 24px; font-weight: 500; margin: 0 0 10px; }
.confirm p { color: var(--ink-2); margin: 0 auto 24px; max-width: 460px; }
.stackbtns { display: flex; flex-direction: column; gap: 10px; max-width: 320px; margin: 0 auto; }
.reasons { list-style: none; margin: 0; padding: 0; }
.reasons li button { display: flex; align-items: center; justify-content: space-between; width: 100%; border: 0; border-top: 1px solid var(--line); background: none; padding: 16px 4px; font-size: 15px; cursor: pointer; text-align: left; }
.reasons li:first-child button { border-top: 0; }
.reasons li button:hover { background: var(--panel); }
.reasons li button svg { color: var(--muted); }
.spin { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--ink); margin: 0 auto 14px; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.okcheck { width: 96px; height: 96px; border-radius: 50%; background: #dff3e6; color: #1e8e4a; display: grid; place-items: center; margin: 0 auto 18px; animation: pop .4s ease-out; }
.okcheck svg { width: 48px; height: 48px; }

/* ---------- Milestones (mobile parity) ---------- */
.hex { border: 0; background: none; padding: 0; cursor: pointer; }
.hex .lock { position: absolute; top: -5px; right: -6px; width: 12px; height: 12px; color: #8a8a8a; background: #fff; border-radius: 50%; padding: 1px; }
.hex.big { width: 72px; height: 78px; margin: 0 auto 12px; color: #9a9a9a; }
.hex.big svg.shape { width: 72px; height: 78px; }
.hex.big .ic svg { width: 30px; height: 30px; }
.hex.big.on { color: #6a8a2a; }
.hex.big .lock { width: 18px; height: 18px; top: -2px; right: -2px; }
.ms { border: 0; text-align: left; cursor: pointer; font-family: inherit; }
.ms:hover { background: #efefef; }
.ms.on b { color: var(--ink); }
.unlocked { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; margin-bottom: 14px; }
.unlocked .hex.big { width: 48px; height: 52px; margin: 0; }
.unlocked .hex.big svg.shape { width: 48px; height: 52px; }
.unlocked .hex.big .ic svg { width: 20px; height: 20px; }
.unlocked .bar > i { background: #5b6cff; }
.mshead { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 0; }
.mshead button { background: none; border: 0; padding: 6px; border-radius: 10px; cursor: pointer; }
.goalchip { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; }
.goalchip svg { width: 18px; height: 18px; }
.msheet { padding-top: 20px; }
.msheet h3 { margin-bottom: 14px; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; font-size: 14px; font-weight: 500; color: var(--ink); text-decoration: underline; cursor: pointer; }
.msprog { max-width: 260px; margin: 0 auto 12px; }
.msprog b { display: block; font-weight: 500; margin-bottom: 8px; }
.emptyhist { position: relative; }
.emptyhist .chart { opacity: .35; }
.emptyhist .msg { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 20px; }
.emptyhist .msg b { font-weight: 500; font-size: 16px; }
.emptyhist .msg p { color: var(--ink-2); font-size: 14px; margin: 6px 0 14px; max-width: 360px; }

/* ---------- Guided tour ---------- */
.demo-bar .tour-btn { background: var(--red); border-color: var(--red); color: #fff; }
.demo-bar .tour-btn:hover { background: #c92a37; }
.tour[hidden] { display: none; }
.tour-block { position: fixed; inset: 0; z-index: 95; }
.tour-spot { position: fixed; z-index: 96; border-radius: 18px; box-shadow: 0 0 0 9999px rgba(17,17,17,.55), 0 0 0 3px #fff; pointer-events: none; transition: top .25s, left .25s, width .25s, height .25s; }
.tour-spot.none { box-shadow: 0 0 0 9999px rgba(17,17,17,.55); width: 0; height: 0; }
.tour-card { position: fixed; z-index: 97; width: 320px; max-width: calc(100vw - 32px); background: #fff; border-radius: 16px; box-shadow: 0 16px 48px rgba(0,0,0,.3); padding: 18px 20px 16px; font-size: 14px; line-height: 1.45; color: var(--ink); transition: top .25s, left .25s; }
.tour-card .step { font-size: 12px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.tour-card .step button { border: 0; background: #f1f3f5; border-radius: 50%; width: 24px; height: 24px; cursor: pointer; font-size: 15px; line-height: 1; }
.tour-card h6 { margin: 0 0 6px; font-size: 17px; font-weight: 600; line-height: 1.3; }
.tour-card p { margin: 0; color: var(--ink-2); }
.tour-card .nav { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; gap: 8px; flex-wrap: wrap; }
.tour-card .nav.ends .dots { display: none; }
.tour-card .nav .btn { white-space: nowrap; }
.tour-card .dots { display: flex; gap: 5px; }
.tour-card .dots i { width: 6px; height: 6px; border-radius: 50%; background: #dcdfe3; }
.tour-card .dots i.on { background: var(--ink); }
.tour-card .btn { height: 36px; padding: 0 14px; }
@media (max-width: 760px) { .tour-card { left: 12px !important; right: 12px; width: auto; top: auto !important; bottom: 12px; } .tour-card.top { top: 12px !important; bottom: auto; } }

/* Milestone badge art (cropped from the app). Locked = the app's grey art. Unlocked = the same art given the app's gold treatment; the lock sits outside the hex, so a hex clip removes it. */
.hex .bimg { display: block; width: 100%; height: 100%; object-fit: contain; }
.hex .bimg.on:not(.native) { filter: sepia(1) saturate(1.9) hue-rotate(-10deg) brightness(1.04); clip-path: polygon(50% 3%, 93% 27%, 93% 73%, 50% 97%, 7% 73%, 7% 27%); }
.hex { width: 28px; height: 30px; }
.hex.mid { width: 34px; height: 36px; flex: 0 0 34px; }
.hex.big { width: 84px; height: 90px; }
.unlocked .hex.big { width: 52px; height: 56px; }
.hex > span, .hex .lock, .hex svg.shape { display: none; }
