:root {
  --ink: #1B2B4B;
  --ink-soft: #334155;
  --muted: #6B7280;
  --faint: #94a3b8;
  --green: #2D6A4F;
  --green-mid: #52B788;
  --green-bright: #52B788;
  --green-wash: #edf7f2;
  --navy: #1B2B4B;
  --cream: #FAFAF7;
  --surface: #FFFFFF;
  --paper: #fff;
  --border: #E8E8E2;
  --line: #E8E8E2;
  --line-strong: #d9ddd7;
  --text-muted: #6B7280;
  --red: #C0392B;
  --red-light: #FDECEA;
  --amber: #b7791f;
  --shadow: 0 22px 55px rgba(21, 35, 63, .08);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  min-width: 320px;
  background: var(--cream);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}
button, input, select { font: inherit; }
button, select { cursor: pointer; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

.layout { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar { background: var(--navy); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.sidebar-logo { padding: 17.5px 20px; border-bottom: 1px solid rgba(255,255,255,0.08); display: flex; align-items: center; gap: 10px; }
.logo-coin { width: 34px; height: 34px; background: var(--green-mid); border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 18px; }
.logo-name { font-family: Georgia, serif; font-size: 18px; color: #fff; }
.sidebar-nav { padding: 14px; flex: 1; }
.sidebar-nav .nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; font-size: 13.5px; font-weight: 400; color: rgba(255,255,255,0.55); margin-bottom: 4px; transition: var(--transition); }
.sidebar-nav .nav-item:hover { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.85); }
.sidebar-nav .nav-item.on { background: rgba(82,183,136,0.18); color: var(--green-mid); }
.main { display: flex; flex-direction: column; min-height: 100vh; }
.top-navbar { display: flex; align-items: center; padding: 0 40px; height: 70px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
#dynamicNavLinks { display: flex; align-items: center; gap: 16px; height: 100%; margin-left: auto; margin-right: -60px; }
.top-navbar .nav-item { font-size: 14px; font-weight: 500; color: var(--text-muted); transition: var(--transition); display: flex; align-items: center; gap: 5px; height: 70px; padding: 0 8px; cursor: pointer; border-bottom: 3px solid transparent; }
.top-navbar .nav-item.on { color: var(--navy); border-bottom-color: var(--green); }
#dynamicNavLinks:hover .nav-item.on { color: var(--text-muted); border-bottom-color: transparent; }
.top-navbar .nav-item:hover,
.top-navbar .nav-dropdown:hover .nav-item { color: var(--navy) !important; border-bottom-color: var(--green) !important; }
.top-navbar .nav-item i { font-size: 12px; margin-top: 2px; transition: transform 0.2s ease; }
.top-navbar .nav-dropdown { position: relative; height: 70px; display: flex; align-items: center; }
.top-navbar .dropdown-menu { display: none; position: absolute; top: 70px; right: 0; left: auto; background: var(--surface); min-width: 220px; box-shadow: 0 10px 25px rgba(27,43,75,0.08); border: 1px solid var(--border); border-radius: 8px; z-index: 200; padding: 8px 0; }
.top-navbar .nav-dropdown:hover .dropdown-menu { display: block; }
.top-navbar .nav-dropdown:hover .nav-item i { transform: rotate(180deg); }
.top-navbar .dropdown-menu a { color: var(--text-muted); padding: 10px 18px; display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 500; transition: var(--transition); line-height: 1.4; }
.top-navbar .dropdown-menu a:hover { background-color: #F9F9F6; color: var(--navy); }
.top-navbar .dropdown-menu a i { color: var(--green); font-size: 15px; }
.auth-actions { display: flex; align-items: center; gap: 16px; height: 100%; }
.user-tag { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 500; color: var(--text-muted); }
.user-tag i { font-size: 18px; color: var(--text-muted); }
.user-tag .user-email { font-weight: 600; color: var(--text-muted); }
.auth-btn { background: var(--green-wash); color: var(--green); border: none; padding: 8px 18px; border-radius: 20px; font-size: 13px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 6px; transition: var(--transition); white-space: nowrap; }
.auth-btn:hover { background: #dcefe5; }
.icon-button { border: 1px solid var(--line); color: var(--ink-soft); background: #fff; }
.icon-button:hover { border-color: var(--line-strong); background: var(--cream); }

.workspace { width: min(1380px, 100%); margin: 0 auto; padding: 38px 34px 64px; }
.loading-state { min-height: 65vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--muted); text-align: center; }
.loading-state strong { color: var(--ink); font: 24px Georgia, serif; }
.loading-state span:last-child { font-size: 13px; }
.loading-mark { width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 10px; border-radius: 17px; color: var(--green); background: var(--green-wash); }

.page-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 28px; }
.eyebrow, .surface-kicker { color: var(--green); font-size: 10px; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; }
.page-intro h1 { max-width: 720px; margin: 8px 0 9px; font: 400 clamp(32px, 4vw, 50px)/1.04 Georgia, serif; letter-spacing: -.035em; }
.page-intro p { max-width: 720px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.intro-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.privacy-chip, .count-pill, .live-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #d7e9df;
  border-radius: 999px;
  color: var(--green);
  background: var(--green-wash);
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}
.privacy-chip { padding: 9px 12px; }
.count-pill { padding: 6px 10px; }
.live-chip { padding: 5px 9px; }
.live-chip span { width: 6px; height: 6px; border-radius: 50%; background: var(--green-bright); box-shadow: 0 0 0 4px rgba(79,174,128,.12); }
.primary-button {
  min-height: 39px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 14px;
  border: 1px solid var(--green);
  border-radius: 11px;
  color: #fff;
  background: var(--green);
  font-size: 12px;
  font-weight: 680;
  transition: .2s ease;
}
.primary-button:hover { transform: translateY(-1px); background: #174b38; box-shadow: 0 8px 20px rgba(35,99,75,.18); }
.primary-button:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.full-button { width: 100%; }

.surface { border: 1px solid var(--line); border-radius: 20px; background: var(--paper); box-shadow: 0 1px 0 rgba(255,255,255,.8); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, .9fr); gap: 18px; margin-bottom: 42px; }
.synergy-surface { padding: 24px; }
.synergy-layout { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 25px; align-items: center; margin-top: 16px; }
.score-ring {
  --score-angle: 0deg;
  width: 142px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 9px solid var(--green-bright);
  background: var(--green-wash);
  position: relative;
}
.score-ring::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: #fff; }
.score-ring > div { position: relative; z-index: 1; display: grid; text-align: center; }
.score-ring strong { font: 42px/1 Georgia, serif; }
.score-ring span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.grade-row { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 700; }
.grade-badge { min-width: 29px; height: 29px; display: grid; place-items: center; border-radius: 8px; color: #fff; background: var(--green); font: 700 14px Georgia, serif; }
.synergy-copy p { margin: 9px 0 17px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.factor-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.factor { padding: 10px; border: 1px solid var(--line); border-radius: 11px; background: #fbfbf8; }
.factor span { display: block; color: var(--muted); font-size: 9px; line-height: 1.2; text-transform: uppercase; letter-spacing: .06em; }
.factor strong { display: block; margin-top: 5px; font-size: 16px; }
.recommendation-surface { position: relative; overflow: hidden; padding: 24px; background: #f7fbf8; }
.recommendation-surface::after { content: ""; position: absolute; right: -45px; bottom: -65px; width: 170px; height: 170px; border-radius: 50%; background: rgba(79,174,128,.08); }
.recommendation-icon { width: 38px; height: 38px; display: grid; place-items: center; margin: 20px 0 16px; border-radius: 12px; color: var(--green); background: var(--green-wash); }
.recommendation-surface h2 { margin: 0 0 8px; font: 400 21px Georgia, serif; }
.recommendation-surface p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.55; }
.recommendation-meta { position: relative; z-index: 1; display: flex; gap: 7px; flex-wrap: wrap; margin-top: 17px; }
.recommendation-meta span { padding: 5px 8px; border-radius: 7px; color: var(--ink-soft); background: #fff; border: 1px solid var(--line); font-size: 10px; font-weight: 650; }

.section-block { margin-bottom: 44px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section-heading h2 { margin: 6px 0 0; font: 400 25px Georgia, serif; }
.compact-heading { align-items: flex-start; margin-bottom: 0; }
.compact-heading h2 { font-size: 23px; }
.compact-heading h3 { margin: 5px 0 0; font: 400 19px Georgia, serif; }
.section-description { margin: 9px 0 21px; color: var(--muted); font-size: 12.5px; line-height: 1.55; }
.portfolio-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.portfolio-card { position: relative; min-height: 210px; overflow: hidden; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: #fff; transition: .22s ease; }
.portfolio-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.portfolio-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--card-color, var(--green)); }
.card-topline { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.institution-mark { width: 38px; height: 38px; display: grid; place-items: center; overflow: hidden; border-radius: 12px; color: var(--card-color, var(--ink)); background: var(--card-bg, #f5f5f2); font-size: 18px; }
.brand-logo-mark { background: #fff; border: 1px solid rgba(20,33,61,.08); }
.brand-logo-mark img { width: 100%; height: 100%; padding: 6px; object-fit: contain; }
.brand-logo-mark img + i { display: none; }
.brand-logo-mark img[hidden] + i { display: block; }
.card-menu { display: flex; gap: 5px; }
.icon-button { width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border-radius: 10px; }
.icon-button.danger:hover { color: var(--red); border-color: #ecd5d2; background: #fff7f6; }
.portfolio-card h3 { min-height: 42px; margin: 17px 0 4px; font: 400 17px/1.25 Georgia, serif; }
.institution-name { color: var(--muted); font-size: 10.5px; }
.card-stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 18px; }
.card-stat { padding: 8px; border-radius: 9px; background: #f8f8f5; }
.card-stat span { display: block; color: var(--muted); font-size: 8.5px; text-transform: uppercase; letter-spacing: .05em; }
.card-stat strong { display: block; margin-top: 4px; font-size: 12px; }
.empty-surface { grid-column: 1 / -1; padding: 42px; border: 1px dashed var(--line-strong); border-radius: 18px; text-align: center; color: var(--muted); background: rgba(255,255,255,.45); }
.empty-surface i { display: block; margin-bottom: 9px; color: var(--green); font-size: 25px; }
.empty-surface strong { display: block; margin-bottom: 5px; color: var(--ink); font: 18px Georgia, serif; }
.empty-surface p { margin: 0; font-size: 12px; }

.simulator-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, .85fr); gap: 18px; margin-bottom: 44px; align-items: start; }
.simulator-controls { padding: 24px; }
.spend-total { display: flex; align-items: baseline; justify-content: space-between; padding: 13px 0 14px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.spend-total span { color: var(--muted); font-size: 11px; }
.spend-total strong { font: 25px Georgia, serif; }
.slider-list { display: grid; gap: 2px; padding-top: 13px; }
.spend-slider { display: grid; grid-template-columns: minmax(145px, .8fr) minmax(150px, 1.4fr) 76px; align-items: center; gap: 12px; min-height: 48px; }
.spend-label { display: flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 620; }
.spend-label i { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; color: var(--green); background: var(--green-wash); }
input[type="range"] { width: 100%; accent-color: var(--green); }
.spend-number { position: relative; }
.spend-number span { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 10px; }
.spend-number input { width: 100%; height: 32px; padding: 0 7px 0 19px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: #fbfbf8; font-size: 11px; text-align: right; }
.simulator-results { display: grid; gap: 18px; }
.roi-surface { padding: 24px; }
.roi-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.roi-header select { max-width: 245px; margin-top: 6px; padding: 0; border: 0; color: var(--ink); background: transparent; font: 18px Georgia, serif; }
.roi-value { margin-top: 27px; font: 400 44px/1 Georgia, serif; letter-spacing: -.035em; }
.roi-value.negative { color: var(--red); }
.roi-label { margin-top: 5px; color: var(--muted); font-size: 10.5px; }
.roi-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 20px; }
.roi-metric { padding: 10px; border-radius: 10px; background: #f8f8f5; }
.roi-metric span { display: block; color: var(--muted); font-size: 8.5px; text-transform: uppercase; letter-spacing: .05em; }
.roi-metric strong { display: block; margin-top: 5px; font-size: 12px; }
.break-even-panel { margin-top: 18px; padding: 14px; border: 1px solid #dceae2; border-radius: 13px; background: var(--green-wash); }
.break-even-panel > div:first-child { display: flex; justify-content: space-between; color: var(--green); font-size: 10px; }
.break-even-panel strong { font-size: 12px; }
.progress-track { height: 5px; margin: 10px 0 8px; overflow: hidden; border-radius: 999px; background: rgba(35,99,75,.13); }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--green-bright); transition: width .25s ease; }
.break-even-panel p { margin: 0; color: var(--muted); font-size: 9.5px; line-height: 1.45; }
.allocation-surface { padding: 20px 22px; }
.allocation-value { color: var(--green); font-size: 12px; }
.allocation-list { display: grid; margin-top: 14px; }
.allocation-item { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 8px 0; border-top: 1px solid var(--line); }
.allocation-item i { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; color: var(--muted); background: #f7f7f4; font-size: 13px; }
.allocation-item div { min-width: 0; }
.allocation-item strong, .allocation-item span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.allocation-item strong { font-size: 10.5px; }
.allocation-item span { margin-top: 2px; color: var(--muted); font-size: 9px; }
.allocation-rate { color: var(--green); font-size: 10px; font-weight: 750; }

.merchant-surface { padding: 26px; margin-bottom: 24px; }
.merchant-heading { align-items: flex-start; }
.merchant-heading p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.merchant-form { display: grid; grid-template-columns: 160px 180px auto; gap: 8px; align-items: end; }
label > span { display: block; margin: 0 0 5px 2px; color: var(--muted); font-size: 9px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; }
input, select { border: 1px solid var(--line); outline: none; color: var(--ink); background: #fff; }
input:focus, select:focus { border-color: #8ebda5; box-shadow: 0 0 0 3px rgba(79,174,128,.12); }
.merchant-form input, .merchant-form select, .picker-tools select { width: 100%; height: 39px; padding: 0 10px; border-radius: 10px; font-size: 11.5px; }
.rule-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 20px; }
.rule-card { display: flex; align-items: center; gap: 11px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: #fbfbf8; }
.rule-icon { width: 32px; height: 32px; display: grid; place-items: center; flex-shrink: 0; border-radius: 10px; color: var(--green); background: var(--green-wash); }
.rule-card > div:nth-child(2) { min-width: 0; flex: 1; }
.rule-card strong, .rule-card span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rule-card strong { font-size: 11.5px; }
.rule-card span { margin-top: 3px; color: var(--muted); font-size: 9.5px; }
.rule-card .icon-button { width: 29px; height: 29px; }
.methodology-note { display: flex; align-items: flex-start; justify-content: center; gap: 8px; max-width: 800px; margin: 0 auto; color: var(--muted); text-align: center; }
.methodology-note p { margin: 0; font-size: 10px; line-height: 1.5; }

.modal-backdrop { position: fixed; inset: 0; z-index: 500; display: grid; place-items: center; padding: 22px; background: rgba(20,33,61,.42); }
.modal-panel { width: min(860px, 100%); max-height: min(820px, calc(100vh - 44px)); overflow: auto; border: 1px solid rgba(255,255,255,.6); border-radius: 22px; background: #fff; box-shadow: 0 35px 90px rgba(20,33,61,.22); }
.modal-header { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid var(--line); background: #fff; }
.modal-header h2 { margin: 5px 0 0; font: 400 24px Georgia, serif; }
.picker-tools { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 10px; padding: 18px 22px 10px; }
.search-field { position: relative; }
.search-field i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-field input { width: 100%; height: 42px; padding: 0 12px 0 38px; border-radius: 11px; font-size: 12px; }
.picker-tools select { height: 42px; }
.picker-result-meta { padding: 2px 23px 12px; color: var(--muted); font-size: 10px; }
.picker-grid { display: grid; gap: 14px; padding: 0 22px 24px; }
.picker-institution-group { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 15px; background: #fbfbf8; }
.picker-group-heading { display: flex; align-items: center; gap: 10px; min-width: 0; }
.picker-group-heading > div { min-width: 0; }
.picker-group-heading strong { display: block; color: var(--ink); font-size: 13px; }
.picker-group-heading span { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }
.picker-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.picker-card { min-height: 145px; display: flex; flex-direction: column; align-items: stretch; padding: 14px; border: 1px solid var(--line); border-radius: 15px; color: var(--ink); background: var(--picker-bg, #fff); text-align: left; transition: .2s ease; }
.picker-card:hover { transform: translateY(-2px); border-color: var(--picker-color, var(--green)); box-shadow: 0 13px 28px rgba(20,33,61,.09); }
.picker-card-top { display: flex; align-items: center; justify-content: space-between; color: var(--picker-color, var(--ink)); }
.picker-card-top i { font-size: 19px; }
.picker-card-top span { padding: 4px 7px; border-radius: 6px; background: rgba(255,255,255,.7); font-size: 8px; font-weight: 700; }
.picker-card-top .picker-brand-mark { width: 34px; height: 34px; display: grid; place-items: center; overflow: hidden; padding: 0; border-radius: 10px; color: var(--picker-color, var(--ink)); background: #fff; font-size: 17px; }
.picker-card-top .picker-brand-mark img { width: 100%; height: 100%; padding: 6px; object-fit: contain; }
.picker-card strong { margin-top: auto; font: 400 15px/1.25 Georgia, serif; }
.picker-card small { margin-top: 4px; color: var(--muted); font-size: 9.5px; }
.assumptions-panel { width: min(480px, 100%); }
.assumptions-form { display: grid; gap: 15px; padding: 22px; }
.assumptions-form > p { margin: 0 0 3px; color: var(--muted); font-size: 11.5px; line-height: 1.55; }
.input-prefix, .input-suffix { position: relative; }
.input-prefix span, .input-suffix span { position: absolute; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 11px; }
.input-prefix span { left: 12px; }
.input-suffix span { right: 12px; }
.input-prefix input, .input-suffix input { width: 100%; height: 42px; border-radius: 10px; font-size: 12px; }
.input-prefix input { padding: 0 12px 0 27px; }
.input-suffix input { padding: 0 85px 0 12px; }
.source-link { display: flex; align-items: center; gap: 6px; color: var(--green); font-size: 10px; text-decoration: none; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 700; max-width: 340px; padding: 12px 15px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: #fff; box-shadow: var(--shadow); font-size: 11.5px; opacity: 0; transform: translateY(12px); pointer-events: none; transition: .22s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { color: var(--red); border-color: #ecd5d2; }
.reveal-section { opacity: 1; transform: none; }

@media (max-width: 1120px) {
  .portfolio-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .simulator-grid { grid-template-columns: 1fr; }
  .simulator-results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .merchant-heading { display: grid; }
  .merchant-form { width: 100%; margin-top: 8px; grid-template-columns: 1fr 1fr auto; }
}

@media (max-width: 820px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .top-navbar { padding: 0 20px; }
  #dynamicNavLinks { display: none; }
  .workspace { padding: 28px 18px 50px; }
  .page-intro { align-items: flex-start; flex-direction: column; }
  .intro-actions { width: 100%; justify-content: space-between; }
  .hero-grid { grid-template-columns: 1fr; }
  .rule-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .picker-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .page-intro h1 { font-size: 34px; }
  .hero-grid { margin-bottom: 34px; }
  .synergy-layout { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .grade-row { justify-content: center; }
  .factor-list { width: 100%; }
  .portfolio-grid, .simulator-results, .rule-grid { grid-template-columns: 1fr; }
  .spend-slider { grid-template-columns: 1fr 75px; gap: 8px; padding: 7px 0; }
  .spend-label { grid-column: 1 / -1; }
  .merchant-form { grid-template-columns: 1fr; }
  .picker-tools, .picker-card-grid { grid-template-columns: 1fr; }
  .modal-backdrop { padding: 10px; }
  .modal-panel { max-height: calc(100vh - 20px); border-radius: 18px; }
  .intro-actions .privacy-chip { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
  .reveal-section { opacity: 1; transform: none; }
}
