/*
 * The D.I.M.E. calculator's styles, and the quote page's.
 *
 * LIFTED OUT OF dimeneedscalculator.html UNCHANGED -- QBP-544. The bytes
 * between <style> and </style> are what is below, and the <link> that
 * replaced them sits where they sat, so the cascade order against
 * quotebot-apply.css is the order it always was.
 *
 * WHY IT LEFT THE PAGE. /q/<token> shows somebody the analysis they
 * already saw, and Scott asked for the same screen rather than one that
 * resembles it: "if it is possible to show them the same beautiful quote
 * screen they saw their quote on initially that is my first choice."
 * Two copies of a design are the same design for about a month -- QBP-537
 * renamed a card label in quotetool.html and not in this calculator, and
 * the suite stayed green because every test asserted the absence of the
 * old word rather than the presence of the new one.
 *
 * So the backend page links this file instead of reproducing it. The four
 * category colours below are the ones the email's badges carry too, by
 * way of the record rather than by retyping:
 *
 *   --cat-d  Debt            --cat-m  Mortgage
 *   --cat-i  Income          --cat-e  Education & everything else
 *
 * Served from tools.quote-bot.com by Amplify, which publishes site/ on
 * push. Anything that changes here changes both surfaces, which is the
 * point of it being here.
 */
:root {
  --primary: #1a3d6b; --primary-dark: #0f2540; --primary-mid: #1e4d85;
  --accent: #4a90d9; --accent-light: #e8f2fb;
  --teal: #0d9488; --teal-light: #ccfbf1;
  --gold: #b45309; --gold-mid: #d97706; --gold-light: #fef3c7; --gold-bright: #f59e0b;
  --green: #16a34a; --green-light: #dcfce7; --green-bright: #22c55e;
  --red: #dc2626; --red-light: #fee2e2;
  --white: #ffffff; --off-white: #f7f9fc; --gray-light: #eef1f6;
  --gray-mid: #8a9ab5; --gray-dark: #2c3e58; --text: #1c2a3a; --border: #d8e2f0;
  --shadow: 0 4px 24px rgba(26,61,107,0.10); --shadow-lg: 0 16px 56px rgba(26,61,107,0.16);
  --radius: 12px; --radius-lg: 20px; --radius-xl: 28px; --transition: 0.2s ease;
  /* category colors */
  --cat-d: #dc2626; --cat-i: #4a90d9; --cat-m: #d97706; --cat-e: #0d9488;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Plus Jakarta Sans', sans-serif; color: var(--text); background: var(--off-white); line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* TOPBAR */





/* HERO */
.calc-hero { background: var(--primary-dark); padding: 40px 32px 44px; position: relative; overflow: hidden; }
.calc-hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 55% 80% at 15% 50%, rgba(74,144,217,0.22) 0%, transparent 65%), radial-gradient(ellipse 40% 60% at 82% 20%, rgba(26,61,107,0.6) 0%, transparent 60%); }
.calc-hero::after { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px); background-size: 48px 48px; }
.calc-hero-inner { max-width: 1180px; margin: 0 auto; position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.calc-hero-eyebrow { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.18); color: rgba(255,255,255,0.9); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; padding: 5px 14px; border-radius: 100px; margin-bottom: 16px; }
.calc-hero h1 { font-family: 'Fraunces', serif; font-size: clamp(24px, 3.4vw, 36px); font-weight: 700; color: var(--white); line-height: 1.14; letter-spacing: -0.3px; margin-bottom: 12px; }
.calc-hero h1 em { font-style: italic; color: #93c5fd; }
.calc-hero p { font-size: 15px; color: rgba(255,255,255,0.68); line-height: 1.7; max-width: 560px; }
.hero-letters { display: flex; gap: 10px; flex-shrink: 0; }
.hero-letter { width: 58px; height: 58px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: 'Fraunces', serif; font-size: 26px; font-weight: 700; color: #fff; box-shadow: 0 8px 24px rgba(0,0,0,0.25); }
.hero-letter small { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.85; margin-top: 1px; }
.hero-letter.d { background: linear-gradient(155deg,#ef4444,#b91c1c); }
.hero-letter.i { background: linear-gradient(155deg,#60a5fa,#2563eb); }
.hero-letter.m { background: linear-gradient(155deg,#f59e0b,#b45309); }
.hero-letter.e { background: linear-gradient(155deg,#2dd4bf,#0d9488); }

/* PAGE */
body.results-active .calc-hero { display: none; }
.page { max-width: 1180px; margin: 0 auto; padding: 36px 24px 64px; }
.calc-grid { display: grid; grid-template-columns: 380px 1fr; gap: 28px; align-items: start; }
.calc-grid.results-mode { grid-template-columns: 1fr; }
.calc-grid.results-mode .left-col { display: none; }

/* ============ INPUT PANEL ============ */
.left-col { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 24px; }
.inputs-panel { background: var(--white); border: 1.5px solid var(--border); border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow); }
.inputs-header { background: var(--primary-dark); padding: 20px 26px; position: relative; overflow: hidden; }
.inputs-header::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 60% 80% at 85% 20%, rgba(74,144,217,0.28) 0%, transparent 62%); }
.inputs-header h2 { font-family: 'Fraunces', serif; font-size: 18px; font-weight: 700; color: var(--white); margin-bottom: 3px; position: relative; }
.inputs-header p { font-size: 12.5px; color: rgba(255,255,255,0.6); position: relative; }
.inputs-body { padding: 22px 24px; display: flex; flex-direction: column; gap: 16px; }

/* section divider with label */
.input-section { display: flex; align-items: center; gap: 10px; margin: 6px 0 -2px; }
.input-section .badge { width: 26px; height: 26px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-family: 'Fraunces', serif; font-size: 15px; font-weight: 700; color: #fff; flex-shrink: 0; }
.input-section .badge.d { background: var(--cat-d); }
.input-section .badge.i { background: var(--cat-i); }
.input-section .badge.m { background: var(--cat-m); }
.input-section .badge.e { background: var(--cat-e); }
.input-section .badge.plus { background: var(--gray-dark); font-size: 13px; }
.input-section h3 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--gray-dark); }
.input-section .line { flex: 1; height: 1px; background: var(--gray-light); }

.field { display: flex; flex-direction: column; gap: 7px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-row.align-fields .input-wrap { margin-top: auto; }
.field label { font-size: 11.5px; font-weight: 700; color: var(--gray-dark); text-transform: uppercase; letter-spacing: 0.06em; display: flex; align-items: center; gap: 5px; }
.field label .req { color: var(--accent); }
.field label .age-pill { margin-left: auto; font-size: 11px; font-weight: 700; text-transform: none; letter-spacing: 0; color: var(--primary); background: var(--accent-light); padding: 2px 10px; border-radius: 100px; }
.field label .tip { margin-left: auto; font-size: 10.5px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--gray-mid); background: var(--gray-light); padding: 2px 8px; border-radius: 100px; }
.field label .tip.sm { font-size: 9px; padding: 2px 6px; }
.input-wrap { position: relative; }
.input-prefix { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 15px; font-weight: 700; color: var(--gray-mid); pointer-events: none; }
.input-suffix { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 13px; font-weight: 700; color: var(--gray-mid); pointer-events: none; }
input[type="text"], input[type="email"], input[type="tel"], input[type="date"], input[type="number"], select {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: var(--radius);
  font-family: 'Plus Jakarta Sans', sans-serif; font-size: 14.5px; font-weight: 500; color: var(--text);
  background: var(--off-white); transition: border-color var(--transition), box-shadow var(--transition); outline: none; -moz-appearance: textfield;
}
input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; }
input.has-prefix { padding-left: 28px; font-weight: 700; }
input.has-suffix { padding-right: 40px; font-weight: 700; }
input::placeholder { color: var(--gray-mid); font-weight: 400; }
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(74,144,217,0.15); background: var(--white); }
select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238a9ab5' d='M6 8L0 0h12z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 34px; }
.phone-wrap { position: relative; }
.phone-flag { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 15px; pointer-events: none; }
.phone-wrap input { padding-left: 38px; }

/* SEGMENTED TOGGLE */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1.5px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--off-white); }
.seg button { padding: 11px; border: none; background: transparent; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 14px; font-weight: 600; color: var(--gray-mid); cursor: pointer; transition: all var(--transition); }
.seg button + button { border-left: 1.5px solid var(--border); }
.seg button.active { background: var(--primary); color: var(--white); }
.seg.danger button.active { background: var(--gold-mid); }

.cta-btn { width: 100%; padding: 16px; border-radius: var(--radius-lg); background: var(--green); color: var(--white); font-family: 'Plus Jakarta Sans', sans-serif; font-size: 15.5px; font-weight: 700; border: none; cursor: pointer; transition: background var(--transition), box-shadow var(--transition), transform var(--transition); display: flex; align-items: center; justify-content: center; gap: 9px; margin-top: 6px; }
.cta-btn:hover { background: #138a3e; box-shadow: 0 8px 26px rgba(22,163,74,0.32); transform: translateY(-1px); }
.cta-btn:active { transform: translateY(0); }
.reset-btn { width: 100%; padding: 11px; border-radius: var(--radius); background: transparent; color: var(--gray-mid); font-family: 'Plus Jakarta Sans', sans-serif; font-size: 13px; font-weight: 600; border: 1.5px solid var(--border); cursor: pointer; transition: all var(--transition); }
.reset-btn:hover { border-color: var(--gray-dark); color: var(--gray-dark); }
.privacy-note { font-size: 11px; color: var(--gray-mid); text-align: center; line-height: 1.5; }
.privacy-note a { color: var(--accent); font-weight: 600; }

/* ============ RESULTS PANEL ============ */
.results-panel { min-height: 420px; }
.empty-state { background: var(--white); border: 1.5px dashed var(--border); border-radius: var(--radius-xl); padding: 72px 44px; text-align: center; }
.empty-icon { width: 84px; height: 84px; margin: 0 auto 22px; border-radius: 50%; background: var(--accent-light); display: flex; align-items: center; justify-content: center; font-size: 38px; }
.empty-title { font-family: 'Fraunces', serif; font-size: 23px; font-weight: 700; color: var(--primary-dark); margin-bottom: 10px; }
.empty-sub { font-size: 14.5px; color: var(--gray-mid); max-width: 400px; margin: 0 auto; line-height: 1.65; }

.results-content { display: none; flex-direction: column; gap: 22px; animation: fadeUp 0.45s ease; }
.results-content.show { display: flex; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* summary chip */
.analysis-for { background: var(--white); border: 1.5px solid var(--border); border-radius: var(--radius-lg); padding: 14px 22px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 22px; box-shadow: var(--shadow); }
.analysis-for-name { font-family: 'Fraunces', serif; font-size: 16px; font-weight: 700; color: var(--primary-dark); margin-right: 4px; }
.analysis-for-item { font-size: 13px; color: var(--gray-dark); }
.analysis-for-item b { color: var(--primary); font-weight: 700; }
.risk-tag { margin-left: auto; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 4px 12px; border-radius: 100px; background: var(--accent-light); color: var(--primary); }
.edit-inputs-btn { display: inline-flex; align-items: center; gap: 6px; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 12.5px; font-weight: 700; color: var(--accent); background: var(--white); border: 1.5px solid var(--border); border-radius: 100px; padding: 6px 14px; cursor: pointer; transition: border-color var(--transition), color var(--transition), background var(--transition); }
.edit-inputs-btn:hover { border-color: var(--accent); background: var(--accent-light); }

/* HEADLINE NEED CARD */
.headline-card { background: linear-gradient(150deg,var(--primary-dark) 0%,var(--primary-mid) 100%); border-radius: var(--radius-xl); padding: 30px 32px; position: relative; overflow: hidden; box-shadow: var(--shadow-lg); }
.headline-card::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 70% 70% at 88% 18%, rgba(74,144,217,0.3) 0%, transparent 60%); pointer-events: none; }
.headline-card::after { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px); background-size: 40px 40px; pointer-events: none; }
.headline-inner { position: relative; z-index: 1; display: flex; align-items: flex-end; justify-content: space-between; gap: 26px; flex-wrap: wrap; }
.headline-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255,255,255,0.6); margin-bottom: 6px; }
.headline-value { font-family: 'Fraunces', serif; font-size: clamp(38px, 6vw, 56px); font-weight: 700; color: var(--white); line-height: 1; letter-spacing: -1px; }
.headline-sub { font-size: 13px; color: rgba(255,255,255,0.65); margin-top: 8px; max-width: 360px; line-height: 1.55; }
.headline-mini { display: flex; gap: 22px; flex-wrap: wrap; }
.headline-mini-item { text-align: right; }
.headline-mini-item .v { font-family: 'Fraunces', serif; font-size: 20px; font-weight: 700; color: #93c5fd; line-height: 1; }
.headline-mini-item .v.minus { color: var(--green-bright); }
.headline-mini-item .l { font-size: 10.5px; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 5px; }

/* QUOTE CARDS (sample rates for the computed need) */
.quote-block { margin-top: 2px; }
.quote-block-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 6px; }
.quote-block-title { font-family: 'Fraunces', serif; font-size: clamp(19px, 2.4vw, 24px); font-weight: 700; color: var(--primary); }
.quote-block-sub { font-size: 13px; color: var(--gray-mid); margin-top: 3px; max-width: 470px; line-height: 1.5; }
.quote-block-title-row { display: flex; align-items: center; gap: 10px; }
.reset-cov-btn { width: 27px; height: 27px; border-radius: 8px; border: 1.5px solid var(--border); background: var(--white); color: var(--gray-mid); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-size: 15px; line-height: 1; transition: border-color var(--transition), color var(--transition), background var(--transition); flex-shrink: 0; }
.reset-cov-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.quote-controls { display: flex; gap: 14px; flex-shrink: 0; align-items: flex-end; flex-wrap: wrap; }
.quote-controls .qc-field { display: flex; flex-direction: column; gap: 6px; }
.quote-controls label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gray-dark); display: flex; align-items: center; }
.quote-controls #coverageInput { width: 152px; font-weight: 700; }
.quote-controls #termSelect { width: 172px; font-weight: 700; color: var(--accent); background: var(--white); }
.quote-controls #termSelect:focus { color: var(--primary); }
.info-tip { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; border-radius: 50%; background: var(--gray-light); color: var(--gray-mid); font-size: 10px; font-weight: 700; font-style: italic; cursor: help; margin-left: 6px; font-family: 'Fraunces', serif; }
.info-tip:hover { background: var(--accent-light); color: var(--accent); }
.info-tip .tip-bubble { position: absolute; bottom: calc(100% + 9px); right: -7px; width: 212px; background: var(--primary-dark); color: #fff; font-size: 11.5px; font-weight: 500; line-height: 1.45; padding: 10px 13px; border-radius: 8px; opacity: 0; visibility: hidden; transition: opacity var(--transition); z-index: 30; box-shadow: 0 8px 24px rgba(0,0,0,0.25); text-transform: none; letter-spacing: 0; pointer-events: none; }
.info-tip .tip-bubble::after { content: ''; position: absolute; top: 100%; right: 11px; border: 5px solid transparent; border-top-color: var(--primary-dark); }
.info-tip:hover .tip-bubble, .info-tip:focus .tip-bubble { opacity: 1; visibility: visible; }
.best-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 44px; }
/* The states with no cards in them -- pricing, unreachable, no offers -- put
   one message in this row. Left as a grid child it sits in the first column
   with two empty thirds beside it, which reads as a failed render. */
.best-row > .no-need-card { grid-column: 1 / -1; margin-top: 0; }
.best-card { background: var(--white); border: 1.5px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow); position: relative; padding-top: 16px; transition: box-shadow var(--transition), transform var(--transition); display: flex; flex-direction: column; }
.best-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.best-card.recommended { border-color: var(--accent); }
.best-card.agentless { border-color: var(--red); }
.best-badge { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); padding: 6px 22px; border-radius: 100px; font-size: 13px; font-weight: 700; color: #fff; white-space: nowrap; box-shadow: 0 4px 14px rgba(0,0,0,0.16); }
.best-badge.affordable { background: var(--gold-bright); }
.best-badge.recommended { background: var(--accent); }
.best-badge.agentless { background: var(--red); }
.best-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 24px; border-bottom: 1px solid var(--gray-light); }
.best-price .mo { font-family: 'Fraunces', serif; font-size: 30px; font-weight: 700; color: var(--accent); line-height: 1; }
.best-price .mo small, .best-price .yr small { font-size: 13px; color: var(--gray-mid); font-weight: 600; font-family: 'Plus Jakarta Sans', sans-serif; }
.best-price .yr { font-family: 'Fraunces', serif; font-size: 24px; font-weight: 700; color: var(--accent); line-height: 1.1; margin-top: 4px; }
.best-mid { padding: 18px 24px; text-align: center; border-bottom: 1px solid var(--gray-light); }
/* A carrier nobody curated gets no reasons, which leaves this empty. Without
   this it stays as a tall blank panel, and the card reads as broken rather
   than as deliberately saying less. */
.best-mid:empty { display: none; }
.best-mid .trophy { font-size: 16px; font-weight: 700; color: var(--primary); display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 8px; }
.best-mid p { font-size: 13.5px; color: var(--gray-dark); line-height: 1.55; }
.best-mid ul { list-style: none; font-size: 13px; color: var(--gray-dark); display: flex; flex-direction: column; gap: 6px; align-items: center; }
.best-mid ul li { display: flex; align-items: center; gap: 7px; }
.best-mid ul li::before { content: '✓'; color: var(--green); font-weight: 800; }
.best-bottom { padding: 16px 24px 18px; flex: 1; display: flex; flex-direction: column; }
.best-carrier { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.best-carrier-name { font-size: 14.5px; font-weight: 700; color: var(--text); line-height: 1.3; }
.best-carrier-prod { font-size: 12.5px; color: var(--gray-mid); margin-top: 2px; }
.best-rating { font-size: 13px; color: var(--gray-dark); white-space: nowrap; }
.best-rating b { color: var(--primary); }
.select-btn { width: 100%; padding: 12px; border-radius: var(--radius); background: var(--green-bright); color: #fff; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 14.5px; font-weight: 700; border: none; cursor: pointer; transition: background var(--transition), box-shadow var(--transition); margin-top: auto; text-align: center; text-decoration: none; display: block; }
.select-btn:hover { background: var(--green); box-shadow: 0 4px 16px rgba(22,163,74,0.3); }
.no-need-card { background: var(--green-light); border: 1.5px solid rgba(22,163,74,0.3); border-radius: var(--radius-lg); padding: 20px 24px; display: flex; gap: 14px; align-items: center; margin-top: 20px; }
.no-need-card .ic { font-size: 24px; }
.no-need-card p { font-size: 13.5px; color: var(--gray-dark); line-height: 1.6; }
.no-need-card b { color: var(--green); }
/* The same card, for the two states that are not good news and the one that
   is neither. Green would be the page congratulating itself. */
.no-need-card.wait { background: var(--off-white); border-color: var(--border); }
.no-need-card.warn { background: #fef2f2; border-color: rgba(220,38,38,0.32); }
.no-need-card.warn b, .no-need-card.warn a { color: #b91c1c; }
.no-need-card a { color: var(--green); font-weight: 700; }
.quote-estimate-note { margin-top: 14px; padding: 11px 14px; border-radius: var(--radius); background: var(--gold-light); border: 1px solid rgba(217,119,6,0.3); font-size: 12.5px; line-height: 1.55; color: var(--gold); }

/* CARRIER LOGO (text wordmark treatments) */
/* Carrier names now arrive with the quote, so this is a real style rather
   than a wrapper for seven hand-drawn wordmarks. A logoUrl from the admin
   console renders as an <img>; this is what it falls back to. */
.logo { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; line-height: 1.15; font-weight: 800; font-size: 12.5px; color: var(--primary); }
.logo-tri { width: 0; height: 0; border-left: 9px solid transparent; border-right: 9px solid transparent; border-bottom: 15px solid #1a1a1a; margin: 0 auto 3px; }
@media(max-width: 760px){ .best-row { grid-template-columns: 1fr; } }

/* COMPOSITION BAR */
.comp-card { background: var(--white); border: 1.5px solid var(--border); border-radius: var(--radius-xl); padding: 22px 26px; box-shadow: var(--shadow); }
.comp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 8px; }
.comp-title { font-family: 'Fraunces', serif; font-size: 16px; font-weight: 700; color: var(--primary-dark); }
.comp-total { font-size: 13px; color: var(--gray-mid); }
.comp-total b { font-family: 'Fraunces', serif; font-size: 15px; color: var(--primary); }
.comp-bar { display: flex; height: 22px; border-radius: 8px; overflow: hidden; background: var(--gray-light); }
.comp-seg { height: 100%; transition: width 0.5s ease; position: relative; min-width: 2px; }
.comp-seg.d { background: var(--cat-d); }
.comp-seg.i { background: var(--cat-i); }
.comp-seg.m { background: var(--cat-m); }
.comp-seg.e { background: var(--cat-e); }
.comp-legend { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 16px; }
.comp-leg-item { display: flex; flex-direction: column; gap: 2px; }
.comp-leg-top { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--gray-dark); }
.comp-leg-dot { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; }
.comp-leg-val { font-family: 'Fraunces', serif; font-size: 16px; font-weight: 700; color: var(--primary-dark); }
.comp-leg-pct { font-size: 11px; color: var(--gray-mid); }
@media(max-width: 560px){ .comp-legend { grid-template-columns: 1fr 1fr; } }

/* CATEGORY CARDS (collapsible) */
.cat-card { background: var(--white); border: 1.5px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow); overflow: hidden; border-left-width: 5px; }
.cat-card.d { border-left-color: var(--cat-d); }
.cat-card.i { border-left-color: var(--cat-i); }
.cat-card.m { border-left-color: var(--cat-m); }
.cat-card.e { border-left-color: var(--cat-e); }
.cat-header { display: flex; align-items: center; gap: 16px; padding: 18px 22px; cursor: pointer; user-select: none; transition: background var(--transition); }
.cat-header:hover { background: var(--off-white); }
.cat-badge { width: 42px; height: 42px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-family: 'Fraunces', serif; font-size: 22px; font-weight: 700; color: #fff; flex-shrink: 0; }
.cat-card.d .cat-badge { background: var(--cat-d); }
.cat-card.i .cat-badge { background: var(--cat-i); }
.cat-card.m .cat-badge { background: var(--cat-m); }
.cat-card.e .cat-badge { background: var(--cat-e); }
.cat-titlewrap { flex: 1; min-width: 0; }
.cat-name { font-family: 'Fraunces', serif; font-size: 17px; font-weight: 700; color: var(--primary-dark); }
.cat-desc { font-size: 12px; color: var(--gray-mid); margin-top: 1px; }
.cat-amount { font-family: 'Fraunces', serif; font-size: 24px; font-weight: 700; color: var(--primary-dark); text-align: right; line-height: 1; white-space: nowrap; }
.cat-amount small { display: block; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 10.5px; font-weight: 600; color: var(--gray-mid); margin-top: 5px; text-transform: uppercase; letter-spacing: 0.05em; }
.cat-chevron { flex-shrink: 0; width: 28px; height: 28px; border-radius: 8px; background: var(--off-white); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--gray-mid); transition: transform var(--transition), background var(--transition), color var(--transition); }
.cat-card.open .cat-chevron { transform: rotate(180deg); background: var(--accent-light); color: var(--primary); border-color: var(--accent); }
.cat-detail { display: none; padding: 4px 22px 24px; border-top: 1px solid var(--gray-light); }
.cat-card.open .cat-detail { display: block; animation: fadeUp 0.3s ease; }
.cat-detail-intro { font-size: 13px; color: var(--gray-dark); line-height: 1.6; margin: 16px 0 18px; }

/* stat strip */
.stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat-box { background: var(--off-white); border: 1px solid var(--border); border-radius: var(--radius); padding: 13px 15px; }
.stat-box .l { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--gray-mid); margin-bottom: 5px; }
.stat-box .v { font-family: 'Fraunces', serif; font-size: 19px; font-weight: 700; color: var(--primary-dark); line-height: 1; }
.stat-box .v.accent { color: var(--accent); }
.stat-box .v.gold { color: var(--gold-mid); }

/* mini itemized bars (debt) */
.item-row { display: grid; grid-template-columns: 150px 1fr auto; align-items: center; gap: 14px; padding: 9px 0; }
.item-row + .item-row { border-top: 1px solid var(--gray-light); }
.item-label { font-size: 13px; font-weight: 600; color: var(--gray-dark); }
.item-track { height: 9px; background: var(--gray-light); border-radius: 100px; overflow: hidden; }
.item-fill { height: 100%; border-radius: 100px; background: var(--cat-d); transition: width 0.5s ease; }
.item-val { font-family: 'Fraunces', serif; font-size: 14px; font-weight: 700; color: var(--primary-dark); text-align: right; white-space: nowrap; }
@media(max-width: 560px){ .item-row { grid-template-columns: 1fr auto; } .item-track { display: none; } }

/* education child grid */
.child-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.child-box { background: var(--off-white); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.child-box .who { font-size: 12px; font-weight: 700; color: var(--teal); margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.child-box .amt { font-family: 'Fraunces', serif; font-size: 20px; font-weight: 700; color: var(--primary-dark); line-height: 1; }
.child-box .meta { font-size: 11px; color: var(--gray-mid); margin-top: 5px; }

/* charts */
.chart-frame { background: var(--off-white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px 18px 10px; margin-bottom: 16px; }
.chart-frame-title { font-size: 12px; font-weight: 700; color: var(--gray-dark); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.chart-frame-title .legend { display: flex; gap: 14px; }
.chart-frame-title .legend span { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--gray-dark); }
.chart-frame-title .legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.chart-svg { width: 100%; height: auto; display: block; overflow: visible; }

/* detail table */
.detail-table-wrap { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.detail-table-scroll { max-height: 280px; overflow-y: auto; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.detail { width: 100%; min-width: 440px; border-collapse: collapse; font-size: 12.5px; }
table.detail thead th { position: sticky; top: 0; padding: 10px 14px; background: var(--primary-dark); color: rgba(255,255,255,0.85); font-weight: 700; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em; text-align: right; z-index: 1; }
table.detail thead th:first-child { text-align: left; }
table.detail tbody td { padding: 8px 14px; border-bottom: 1px solid var(--gray-light); color: var(--gray-dark); text-align: right; }
table.detail tbody td:first-child { text-align: left; font-weight: 600; color: var(--primary-dark); }
table.detail tbody tr:nth-child(even) { background: var(--off-white); }
table.detail tfoot td { padding: 10px 14px; font-weight: 700; color: var(--primary-dark); background: var(--gray-light); text-align: right; border-top: 1.5px solid var(--border); }
table.detail tfoot td:first-child { text-align: left; }
.pv-cell { color: var(--accent); font-weight: 700; }

.toggle-schedule { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 12.5px; font-weight: 700; color: var(--accent); cursor: pointer; user-select: none; }
.toggle-schedule:hover { text-decoration: underline; }
.schedule-wrap { display: none; margin-top: 12px; }
.schedule-wrap.show { display: block; animation: fadeUp 0.3s ease; }

/* insight box */
.insight-box { background: var(--teal-light); border: 1.5px solid rgba(13,148,136,0.25); border-radius: var(--radius-lg); padding: 16px 18px; display: flex; gap: 12px; align-items: flex-start; margin-top: 16px; }
.insight-box.blue { background: var(--accent-light); border-color: rgba(74,144,217,0.3); }
.insight-box.gold { background: var(--gold-light); border-color: rgba(217,119,6,0.3); }
.insight-icon { font-size: 19px; flex-shrink: 0; line-height: 1; margin-top: 1px; }
.insight-text h4 { font-size: 13px; font-weight: 700; color: var(--teal); margin-bottom: 4px; }
.insight-box.blue .insight-text h4 { color: var(--primary); }
.insight-box.gold .insight-text h4 { color: var(--gold); }
.insight-text p { font-size: 12.5px; color: var(--gray-dark); line-height: 1.6; }

/* offset / net section */
.offset-card { background: var(--white); border: 1.5px solid var(--border); border-radius: var(--radius-xl); padding: 24px 26px; box-shadow: var(--shadow); }
.offset-title { font-family: 'Fraunces', serif; font-size: 16px; font-weight: 700; color: var(--primary-dark); margin-bottom: 16px; }
.offset-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; font-size: 14px; }
.offset-row + .offset-row { border-top: 1px solid var(--gray-light); }
.offset-row .lbl { color: var(--gray-dark); font-weight: 600; display: flex; align-items: center; gap: 9px; }
.offset-row .lbl .dot { width: 8px; height: 8px; border-radius: 50%; }
.offset-row .amt { font-family: 'Fraunces', serif; font-size: 17px; font-weight: 700; color: var(--primary-dark); }
.offset-row.subtract .amt { color: var(--green); }
.offset-row.total { border-top: 2px solid var(--border); margin-top: 6px; padding-top: 16px; }
.offset-row.total .lbl { font-family: 'Fraunces', serif; font-size: 16px; color: var(--primary-dark); font-weight: 700; }
.offset-row.total .amt { font-size: 26px; color: var(--primary); }

/* CTA card */
.cta-card { background: linear-gradient(145deg,var(--primary-dark) 0%,var(--primary-mid) 100%); border-radius: var(--radius-xl); padding: 38px 40px; position: relative; overflow: hidden; box-shadow: var(--shadow-lg); }
.cta-card::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 70% 60% at 85% 20%, rgba(74,144,217,0.25) 0%, transparent 60%); pointer-events: none; }
.cta-card::after { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px); background-size: 40px 40px; pointer-events: none; }
.cta-inner { position: relative; z-index: 1; }
.cta-eyebrow { display: inline-flex; align-items: center; gap: 7px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.18); color: rgba(255,255,255,0.85); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; padding: 4px 12px; border-radius: 100px; margin-bottom: 20px; }
.cta-card h3 { font-family: 'Fraunces', serif; font-size: 22px; font-weight: 700; color: var(--white); line-height: 1.3; margin-bottom: 14px; }
.cta-card h3 em { font-style: italic; color: #93c5fd; }
.cta-card p { font-size: 14px; color: rgba(255,255,255,0.65); line-height: 1.7; margin-bottom: 28px; max-width: 520px; }
.cta-feats { display: flex; gap: 14px 30px; flex-wrap: wrap; margin-bottom: 30px; }
.cta-feat { display: flex; align-items: center; gap: 9px; font-size: 13px; color: rgba(255,255,255,0.82); }
.cta-feat .ck { width: 22px; height: 22px; background: rgba(74,144,217,0.25); border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; }
.cta-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.cta-primary { flex: 1; min-width: 200px; padding: 14px; background: var(--white); color: var(--primary); border-radius: var(--radius); font-size: 14.5px; font-weight: 700; text-align: center; transition: box-shadow var(--transition), transform var(--transition); }
.cta-primary:hover { box-shadow: 0 6px 24px rgba(0,0,0,0.22); transform: translateY(-1px); }
.cta-secondary { padding: 14px 22px; background: transparent; color: rgba(255,255,255,0.85); border-radius: var(--radius); font-size: 13.5px; font-weight: 600; text-align: center; border: 1.5px solid rgba(255,255,255,0.25); transition: border-color var(--transition), color var(--transition); }
.cta-secondary:hover { border-color: rgba(255,255,255,0.6); color: #fff; }

/* disclaimer */
.disclaimer { background: var(--off-white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px 20px; }
.disclaimer p { font-size: 11px; color: var(--gray-mid); line-height: 1.6; }
.disclaimer strong { color: var(--gray-dark); }

/* FOOTER */
















/* RESPONSIVE */
@media(max-width: 960px) {
  .calc-grid { grid-template-columns: 1fr; }
  .left-col { position: static; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media(max-width: 760px) {
  /* quote controls stack full-width under the heading */
  .quote-block-head { flex-direction: column; align-items: stretch; gap: 16px; }
  .quote-controls { width: 100%; }
  .quote-controls .qc-field { flex: 1; }
  .quote-controls #coverageInput, .quote-controls #termSelect { width: 100%; }
  .best-row { margin-top: 34px; }
  /* keep tooltips inside the viewport: anchor coverage tip left, term tip right */
  .qc-field { position: relative; }
  .info-tip { position: static; }
  .info-tip .tip-bubble { width: 210px; max-width: calc(100vw - 48px); }
  .qc-field:first-child .info-tip .tip-bubble { left: 0; right: auto; }
  .qc-field:first-child .info-tip .tip-bubble::after { left: 18px; right: auto; }
  .qc-field:last-child .info-tip .tip-bubble { right: 0; left: auto; }
  .qc-field:last-child .info-tip .tip-bubble::after { right: 18px; left: auto; }
}
@media(max-width: 600px) {
  .calc-hero { padding: 28px 20px 32px; }
  .calc-hero-inner { gap: 22px; }
  .page { padding: 24px 16px 48px; }
  .analysis-for { gap: 8px 14px; padding: 14px 18px; }
  .analysis-for .risk-tag { margin-left: 0; }
  .headline-card { padding: 24px 22px; }
  .headline-inner { flex-direction: column; align-items: flex-start; gap: 18px; }
  .headline-value { font-size: 40px; }
  .headline-mini { width: 100%; justify-content: space-between; }
  .headline-mini-item { text-align: left; }
  .comp-card { padding: 20px 18px; }
  .cat-header { gap: 12px; padding: 16px 16px; }
  .cat-badge { width: 36px; height: 36px; font-size: 18px; }
  .cat-name { font-size: 15.5px; }
  .cat-amount { font-size: 20px; }
  .cat-detail { padding: 4px 16px 20px; }
  .offset-card { padding: 20px 18px; }
  .offset-row.total .amt { font-size: 23px; }
  .cta-card { padding: 26px 22px; }
  .cta-card h3 { font-size: 19px; }
  .cta-primary { min-width: 100%; }
  .footer-top { grid-template-columns: 1fr; gap: 28px; }
  footer { padding: 48px 22px 0; }
}
@media(max-width: 420px) {
  .hero-letters { gap: 8px; }
  .hero-letter { width: 50px; height: 50px; font-size: 22px; }
  .headline-value { font-size: 34px; }
  .field-row { gap: 10px; }
}

/* Header and footer — matched to the marketing site.
   Kept in step by tools/apply-chrome.mjs. */



















/* A button, not a link: it changes a setting rather than going anywhere, and an
   <a> with no destination is still announced as a link. The colour comes from
   the row's anchors rather than `inherit`, which on a dark footer picks up the
   body colour and renders the control as a smudge beside five legible links. */



@media (max-width: 760px) {
  .topbar { padding: 7px 20px; }
  .topbar-inner { flex-wrap: wrap; row-gap: 6px; justify-content: center; text-align: center; }
  .brand-header { padding: 12px 20px; }
  footer { padding: 32px 20px; }
  .footer-inner { flex-direction: column; gap: 24px; }
  .footer-links { align-items: flex-start; }
  .footer-links-row { justify-content: flex-start; }
}

/* qb:chrome-css:start */
/* Header and footer — matched to the marketing site.
   Kept in step by tools/apply-chrome.mjs. */
.topbar { background: var(--primary-dark); color: rgba(255,255,255,0.8); font-size: 12.5px; padding: 7px 32px; position: static; display: block; }
.topbar-inner { max-width: 1240px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.topbar-phone { color: #ff6b6b; }
.topbar a { color: #9ec9f0; font-weight: 600; }
.topbar strong { color: #fff; }
.brand-header { background: var(--accent-light, #e8f2fb); padding: 14px 32px; }
.brand-header-inner { max-width: 1240px; margin: 0 auto; display: flex; align-items: center; }
.brand-logo-img { height: 46px; width: auto; display: block; }
footer { background: var(--primary-dark); padding: 40px 32px; margin-top: 48px; }
.footer-inner { max-width: 1280px; margin: 0 auto; display: flex; align-items: flex-start; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; }
.footer-logo-img { height: 42px; width: auto; display: block; }
.footer-copy { font-size: 12.5px; color: rgba(255,255,255,0.55); margin-top: 12px; line-height: 1.6; }
.footer-platform { font-size: 11.5px; color: rgba(255,255,255,0.55); margin-top: 10px; letter-spacing: .03em; }
.footer-links { display: flex; flex-direction: column; gap: 12px; align-items: flex-end; }
.footer-links-row { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; font-size: 12.5px; }
.footer-links-row a { color: rgba(255,255,255,0.7); transition: color 0.2s; }
.footer-links-row a:hover { color: #fff; }
.footer-links-row span { color: rgba(255,255,255,0.3); }
/* A button, not a link: it changes a setting rather than going anywhere, and an
   <a> with no destination is still announced as a link. The colour comes from
   the row's anchors rather than `inherit`, which on a dark footer picks up the
   body colour and renders the control as a smudge beside five legible links. */
.footer-consent-link { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-decoration: none; color: rgba(255,255,255,0.7); transition: color 0.2s; }
.footer-consent-link:hover { color: #fff; text-decoration: underline; }
.footer-consent-link:focus-visible { outline: 2px solid #9ec9f0; outline-offset: 2px; }
@media (max-width: 760px) {
  .topbar { padding: 7px 20px; }
  .topbar-inner { flex-wrap: wrap; row-gap: 6px; justify-content: center; text-align: center; }
  .brand-header { padding: 12px 20px; }
  footer { padding: 32px 20px; }
  .footer-inner { flex-direction: column; gap: 24px; }
  .footer-links { align-items: flex-start; }
  .footer-links-row { justify-content: flex-start; }
}

/* ── ONE LEFT EDGE FOR EVERY PAGE ─────────────────────────────────────────
   Measured across all thirteen before this existed: the top bar and the
   logo agreed at 88, and almost nothing else did. Hero text came in at 88,
   118, 128, 182 or 278 depending on the page; content containers at 0, 14,
   56, 68, 92 or 158. The eye followed a different staircase down the left
   of each calculator.

   THE ARITHMETIC, not just the number. The bands above are a full-width
   element with 32px of side padding holding a plain 1240 inner, so their
   content sits at 32 + (available - 1240) / 2. Anything that wants to line
   up with them has to reproduce that at EVERY width, not only at the one
   somebody happened to be looking at:

     an inner inside a 32px-padded band  ->  max-width 1240, no side padding
     a container with no band around it  ->  max-width 1304 (1240 + 2x32)
                                             with the 32px padding inside it

   Only the sides are set. Vertical padding belongs to each page and is left
   alone.

   The footer was 1280 while the bar directly above it was 1240 -- 20px out
   on all thirteen pages, which is the same bug this block exists to stop. */
.footer-inner { max-width: 1240px; }

.calc-hero, .masthead, .tool-hero { padding-left: 32px; padding-right: 32px; }
.calc-hero-inner, .masthead-inner, .hero-inner, .tool-hero-inner {
  max-width: 1240px; margin-left: auto; margin-right: auto;
  padding-left: 0; padding-right: 0; }

.page-layout, .calc-grid, .page, .calc-wrapper, .main-layout {
  max-width: 1304px; margin-left: auto; margin-right: auto;
  padding-left: 32px; padding-right: 32px; }

/* ── THE BUTTON IS ALWAYS REACHABLE ───────────────────────────────────────
   .left-panel is height:100vh with overflow-y:auto, so it scrolls INSIDE
   itself. The Calculate button is the last thing in it, which meant you
   had to scroll a panel you may not have realised was scrollable before
   you could press the only button on the page. Measured: 589px of hidden
   scrolling on income floor, 989 on retirement distribution and 1312 on
   MYGA -- on the page that sells annuities, the call to action was more
   than a screen and a half below the fold of its own column.

   Sticky to the bottom of the scrollport, so the fields move behind it and
   it never leaves. The first shadow is a solid band of the panel's own
   colour under the button, so a half-visible form row cannot peer out from
   beneath it; the second is an ordinary lift. */
.left-panel .run-btn {
  position: sticky; bottom: 0; z-index: 5; margin-top: 10px;
  box-shadow: 0 10px 0 10px var(--off-white), 0 -8px 16px -8px rgba(26,61,107,.22);
}

/* ── RESULTS-HEADER CTA ──────────────────────────────────────────────────
   The ask, placed against the number instead of three scroll-lengths below
   it. The results header is a dark band on every page that has one, so the
   button takes the same white treatment as the band CTA at the foot.

   Anchored on the header's FIRST CHILD rather than .results-header-inner:
   M.U.G. has no such element, it nests an inline flex row holding Edit
   Inputs. A rule naming the class would have silently skipped that page. */
.results-header {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 14px 18px;
}
.results-header > :first-child { flex: 1 1 320px; min-width: 0; }

.qb-result-cta {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; min-height: 42px;
  background: var(--white, #ffffff); color: var(--primary, #1a3d6b);
  border: none; border-radius: 10px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13.5px; font-weight: 700; line-height: 1.2; cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.qb-result-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0,0,0,0.22); }
.qb-result-cta:focus-visible { outline: 3px solid var(--gold-bright, #f59e0b); outline-offset: 2px; }

/* Phone: the header stacks, so the button spans it at a thumb-sized target.
   It stays inside the dark band rather than landing between the heading and
   the figures, where a full-width solid bar reads as a second gate on the
   pages that just unlocked their results. */
@media (max-width: 680px) {
  .results-header { flex-direction: column; align-items: stretch; }
  /*
   * In a COLUMN, flex-basis is height.
   *
   * The 320px basis above was written for the row, where it is the width the
   * text block wants before the button takes its share. Turning the
   * container on its side turned it into a height, so the block was pinned
   * to 320px against about 156px of copy and the projection card carried
   * ~164px of empty navy under the last line, on all five pages with a
   * results header. Nothing overflowed and nothing clipped, so only the
   * white space said anything was wrong.
   */
  .results-header > :first-child { flex: 0 1 auto; }
  .qb-result-cta { width: 100%; justify-content: center; min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .qb-result-cta, .qb-result-cta:hover { transition: none; transform: none; }
}


/* Only a header that actually carries the button becomes a row. The
   strategy card's header is display:block, so without this the button
   dropped onto a line of its own underneath -- and :has keeps the
   collapsible cards' headers exactly as they were. */
.chart-card-header:has(> .qb-result-cta) {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
}

/* Sequence of Returns anchors its CTA in the insight box, which is a flex
   row whose text takes the whole width. Same shape as the card header
   above, so the same treatment: cap the measure to make the room, and let
   the row wrap so the button drops under the text on a phone rather than
   squeezing it. :has keeps every other insight box on the site untouched. */
.insight-box:has(> .qb-result-cta) { flex-wrap: wrap; }
.insight-box:has(> .qb-result-cta) > .insight-text {
  flex: 1 1 auto; min-width: 0; max-width: 68ch;
}
/* Capping the text leaves slack between it and the edge, and this row has
   no justify-content to spend it. Without this the button floated mid-row,
   out of line with the flush-right button on the other five pages. */
.insight-box:has(> .qb-result-cta) > .qb-result-cta { margin-left: auto; }

/* A card header whose text block would otherwise run the full row. Capping
   the measure is what makes room for the button beside it; without the cap
   the paragraph simply takes the space back. */
.qb-card-head-text { flex: 1 1 auto; min-width: 0; max-width: 68ch; }

/* The same button on a light card. The white treatment above assumes the
   dark results band and disappears on anything pale. */
.qb-result-cta--onlight {
  background: var(--primary, #1a3d6b); color: var(--white, #ffffff);
}

/* qb:chrome-css:end */
