/* Profit Leak Detector — matches jubilee-solutions.com (palette, type, header, footer).
   Gold (#c9a961) only on things people tap; deep gold (#7a5f2a) for gold text. */

*, *::before, *::after { box-sizing: border-box; }
:root {
  --ivory: #f4f1ea;
  --cream: #ede8df;
  --cream-deep: #e4ddcc;
  --espresso: #181410;
  --warm: #2c2520;
  --gold: #c9a961;
  --gold-deep: #7a5f2a;
  --tan: #c8bfaf;
  --muted: #5f564a;
  --serif: 'Libre Baskerville', Georgia, serif;
  --sans: 'Mulish', system-ui, -apple-system, sans-serif;
  --bar-h: 84px;
  color-scheme: light;
}
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body { margin: 0; background: var(--ivory); color: var(--espresso); font: 17px/1.6 var(--sans); min-width: 320px; overflow-x: hidden; }
body.has-bar { padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom, 0px)); }
img, svg { max-width: 100%; }
a { color: var(--gold-deep); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.2; margin: 0; }
h1 { font-size: clamp(28px, 7vw, 40px); max-width: 16ch; }
h2 { font-size: clamp(22px, 5vw, 30px); }
h3 { font-size: 18px; }
p { margin: 0; }
b, strong { font-weight: 700; }
.rule { width: 48px; height: 3px; background: var(--gold); border: 0; margin: 16px 0; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-deep); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
h1:focus, h2:focus { outline: none; }

/* header + footer (same as the site) */
header { position: sticky; top: 0; z-index: 10; background: rgba(244,241,234,.92); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-bottom: 1px solid var(--tan); }
header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 12px; }
.wordmark { font-family: var(--serif); font-weight: 700; font-size: 20px; color: var(--espresso); text-decoration: none; white-space: nowrap; }
.head-cta { font-size: 14px; font-weight: 700; color: var(--espresso); text-decoration: none; border: 1.5px solid var(--espresso); border-radius: 6px; padding: 10px 14px; white-space: nowrap; min-height: 44px; display: inline-flex; align-items: center; }
.head-cta:hover { background: var(--espresso); color: var(--ivory); }
.mock-badge { font: 700 11px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; background: var(--cream-deep); color: var(--muted); padding: 5px 7px; border-radius: 4px; margin-left: auto; }
footer { padding: 36px 0 48px; font-size: 15px; color: var(--muted); border-top: 1px solid var(--tan); margin-top: 40px; }
footer .wordmark { font-size: 18px; }
footer .lines { display: grid; gap: 4px; margin-top: 10px; }
footer a { color: var(--espresso); }
/* Rating step: the sticky total bar carries Continue; the site footer only competes with it. */
body.has-bar footer { display: none; }
.step-end { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--tan); }
.step-end .btn { width: 100%; padding: 16px 20px; font-size: 17px; }
.step-end .fineprint { margin: 12px 0 0; font-size: 13px; color: var(--muted); text-align: center; }
.step-end .fineprint a { color: var(--muted); }

/* app shell */
.app { max-width: 720px; padding-top: 24px; padding-bottom: 24px; min-height: 60vh; }
.screen[hidden] { display: none; }
.lede { font-size: 18px; color: var(--warm); max-width: 36em; }
.note { margin-top: 14px; font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--gold-deep); }
.invite-welcome { margin: 0 0 14px; }
.invite-welcome[hidden] { display: none; }
.sub { color: var(--muted); font-size: 15px; margin-top: 6px; }
.block { margin-top: 32px; }
.h-section { font-size: 22px; }
.status { min-height: 1.5em; margin-top: 12px; font-weight: 600; color: var(--gold-deep); font-size: 15px; }
.status.err { color: #8a2d22; }
.status.loading { margin-top: 40px; text-align: center; }

/* progress */
.progress { margin-bottom: 22px; }
.progress-label { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.progress-bar { margin-top: 8px; height: 6px; background: var(--cream-deep); border-radius: 999px; overflow: hidden; }
.progress-bar span { display: block; height: 100%; background: var(--espresso); border-radius: 999px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 700 16px/1.2 var(--sans); text-decoration: none; text-align: center; border-radius: 8px; padding: 14px 20px; border: 0; cursor: pointer; min-height: 48px; width: 100%; color: var(--espresso); background: var(--cream-deep); }
.btn-gold { background: var(--gold); color: var(--espresso); }
.btn-dark { background: var(--espresso); color: var(--ivory); }
.btn-line { background: transparent; color: var(--espresso); border: 1.5px solid var(--espresso); }
.btn-small { width: auto; padding: 10px 14px; font-size: 15px; min-height: 44px; }
.btn[disabled], .btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-auto { width: auto; }
.link-btn { background: none; border: 0; padding: 10px 0; min-height: 44px; font: 600 15px/1.3 var(--sans); color: var(--gold-deep); text-decoration: underline; cursor: pointer; text-align: left; }
.icon-btn { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--tan); background: var(--ivory); color: var(--muted); font: 400 24px/1 var(--sans); cursor: pointer; display: grid; place-items: center; }
.icon-btn:hover { border-color: var(--espresso); color: var(--espresso); }

/* forms */
form { margin-top: 24px; display: grid; gap: 4px; }
.field { margin-top: 14px; min-width: 0; }
fieldset.field { border: 0; padding: 0; margin: 14px 0 0; min-width: 0; }
label, legend { display: block; font-size: 15px; font-weight: 700; margin-bottom: 6px; color: var(--espresso); padding: 0; }
label .opt, legend .opt { font-weight: 400; color: var(--muted); }
input[type="text"], input[type="email"], input[type="tel"], input[type="number"], textarea, select { width: 100%; max-width: 100%; font: 17px/1.4 var(--sans); color: var(--espresso); background: #fff; border: 1px solid var(--tan); border-radius: 8px; padding: 12px 14px; min-height: 48px; }
textarea { min-height: 88px; resize: vertical; }
select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M3 6l5 5 5-5' fill='none' stroke='%23181410' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
form .btn { margin-top: 20px; }
.check { display: flex; gap: 12px; align-items: flex-start; margin-top: 18px; font-weight: 400; font-size: 15px; line-height: 1.5; color: var(--warm); cursor: pointer; min-height: 44px; }
.check input { flex: none; width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--espresso); }

/* segmented choice (team size) */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg label { margin: 0; display: flex; align-items: center; justify-content: center; text-align: center; min-height: 48px; padding: 8px 10px; border: 1.5px solid var(--tan); border-radius: 8px; background: #fff; font-weight: 600; font-size: 15px; cursor: pointer; }
.seg input:checked + label { background: var(--gold); border-color: var(--gold); color: var(--espresso); font-weight: 700; }
.seg input:focus-visible + label { outline: 3px solid var(--gold); outline-offset: 2px; }

/* chips / toggles (tappable: gold when active) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip { min-height: 44px; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--tan); background: #fff; color: var(--espresso); font: 600 15px/1.2 var(--sans); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.chip[aria-pressed="true"], .chip.on { background: var(--gold); border-color: var(--gold); font-weight: 700; }
.chip .tick { display: none; }
.chip[aria-pressed="true"] .tick { display: inline; }
.pill { display: inline-block; padding: 3px 9px; border-radius: 999px; background: var(--cream); border: 1px solid var(--tan); font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .02em; }

/* sliders */
.slider-row { margin-top: 10px; }
.slider-row label { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.slider-row output { font-family: var(--serif); font-size: 18px; color: var(--espresso); white-space: nowrap; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: transparent; margin: 0; padding: 0; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 6px; background: var(--cream-deep); border-radius: 999px; border: 1px solid var(--tan); }
input[type="range"]::-moz-range-track { height: 6px; background: var(--cream-deep); border-radius: 999px; border: 1px solid var(--tan); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; border-radius: 50%; background: var(--gold); border: 2px solid var(--espresso); margin-top: -12px; box-shadow: 0 2px 6px rgba(24,20,16,.2); }
input[type="range"]::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: var(--gold); border: 2px solid var(--espresso); box-shadow: 0 2px 6px rgba(24,20,16,.2); }
input[type="range"]:focus-visible { outline: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { outline: 3px solid var(--gold); outline-offset: 2px; }
.hint { font-size: 14px; color: var(--muted); margin-top: -4px; }
.bench { background: none; border: 0; padding: 8px 0; min-height: 44px; font: 600 14px/1.3 var(--sans); color: var(--gold-deep); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; text-align: left; }

/* roles */
.role { background: var(--cream); border: 1px solid var(--tan); border-radius: 12px; padding: 14px 16px 6px; margin-top: 12px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 10px; align-items: start; }
.role .slider-row { margin-top: 0; min-width: 0; }
.role .icon-btn { margin-top: 2px; }
.role-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.role input.role-name { flex: 1; min-width: 0; width: auto; min-height: 0; font: 700 15px/1.4 var(--sans); color: var(--espresso); background: transparent; border: 0; border-bottom: 1.5px dashed var(--tan); border-radius: 0; padding: 2px 0; }
.role input.role-name:hover { border-bottom-color: var(--gold-deep, #7a5f2a); }
.role input.role-name:focus { outline: none; border-bottom: 1.5px solid var(--espresso); }
.role-name::placeholder { color: var(--muted, #5f564a); font-weight: 400; }
.add-role { margin-top: 12px; }

/* task cards */
.tasks { display: grid; gap: 14px; margin-top: 16px; }
.card { background: #fff; border: 1px solid var(--tan); border-radius: 12px; padding: 16px; min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.card-head h3 { font-size: 18px; line-height: 1.3; padding-top: 8px; overflow-wrap: anywhere; }
.card .field { margin-top: 12px; }
.card fieldset.field legend { margin-bottom: 8px; }
.card .tags { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 0; }
.card .tags .chip { justify-content: center; padding: 8px 6px; font-size: 13px; border-radius: 8px; }
.card .mistake[hidden] { display: none; }
.suggest-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.suggest-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--cream); border: 1px dashed var(--tan); border-radius: 10px; padding: 8px 8px 8px 14px; font-size: 15px; font-weight: 600; }
.suggest-list .btn-small { flex: none; background: #fff; }
.addtask { margin-top: 10px; }
.addtask-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.addtask-row .btn { margin-top: 0; width: auto; padding: 12px 18px; }
.empty { color: var(--muted); font-style: italic; margin-top: 12px; }

/* sticky running total */
.total-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--espresso); color: var(--ivory); padding: 10px 0 calc(10px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -8px 24px rgba(24,20,16,.18); }
.total-bar[hidden] { display: none; }
.total-bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 720px; }
.total { display: grid; line-height: 1.15; min-width: 0; }
.total-label { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--tan); font-weight: 700; }
.total-money { font-family: var(--serif); font-size: 24px; color: var(--ivory); white-space: nowrap; }
.total-hours { font-size: 13px; color: var(--tan); white-space: nowrap; }
.total-bar .btn { width: auto; flex: none; padding: 12px 20px; }

/* results */
.results-head { margin-top: 0; }
.big { margin-top: 20px; font-family: var(--serif); font-size: clamp(22px, 5.6vw, 32px); line-height: 1.3; }
.big strong { font-size: 1.25em; color: var(--espresso); white-space: nowrap; }
.reinvest { margin-top: 14px; font-size: 18px; color: var(--gold-deep); font-weight: 700; }
details.receipts { margin-top: 16px; border: 1px solid var(--tan); border-radius: 12px; background: #fff; }
details.receipts summary { list-style: none; cursor: pointer; padding: 12px 16px; min-height: 48px; display: flex; align-items: center; justify-content: space-between; font-weight: 700; color: var(--gold-deep); }
details.receipts summary::-webkit-details-marker { display: none; }
details.receipts summary::after { content: "+"; font-size: 22px; line-height: 1; }
details.receipts[open] summary::after { content: "–"; }
.receipt-list { list-style: none; margin: 0; padding: 0 16px 12px; border-top: 1px solid var(--cream-deep); }
.receipt-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid var(--cream); font-size: 15px; }
.receipt-list li .nm { font-weight: 700; overflow-wrap: anywhere; }
.receipt-list li .mth { grid-column: 1; color: var(--muted); font-size: 13px; }
.receipt-list li .amt { grid-row: span 2; align-self: center; font-family: var(--serif); white-space: nowrap; }
.receipt-list li.out { color: var(--muted); }
.receipt-list li.out .amt { text-decoration: line-through; }
.receipt-list li.sum { border-bottom: 0; font-weight: 700; padding-top: 12px; }
.receipt-list li.sum .amt { font-size: 18px; }
.receipt-note { padding: 0 16px 14px; font-size: 13px; color: var(--muted); }

.rsec { margin-top: 40px; }
.rsec h2 { font-size: 22px; }
.rsec .sub { margin-top: 4px; }

/* quad chart */
.chart { margin: 14px 0 0; }
.chart svg { display: block; width: 100%; height: auto; max-width: 520px; margin: 0 auto; font-family: var(--sans); }
.chart .q-rect { stroke: none; }
.chart .q-split { stroke: var(--tan); stroke-width: 1; stroke-dasharray: 4 4; }
.chart .q-label { font-size: 9.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; fill: var(--muted); }
.chart .axis { font-size: 10px; fill: var(--muted); font-weight: 600; }
.chart .tick { font-size: 9px; fill: var(--muted); }
.chart .bubble { cursor: pointer; }
.chart .bubble .ring { fill: var(--ivory); }
.chart .bubble .dot { fill: rgba(24,20,16,.16); stroke: var(--espresso); stroke-width: 1.5; }
.chart .bubble:hover .dot { fill: rgba(24,20,16,.28); }
.chart .bubble.on .dot { fill: rgba(201,169,97,.65); stroke: var(--gold-deep); stroke-width: 2.5; }
.chart .bubble:focus-visible { outline: none; }
.chart .bubble:focus-visible .dot { stroke: var(--gold); stroke-width: 3; }
.chart .bubble .num { font-size: 10px; font-weight: 700; fill: var(--espresso); pointer-events: none; }
.chart figcaption { margin-top: 10px; text-align: center; font-size: 15px; color: var(--warm); min-height: 3em; }
.chart figcaption b { font-family: var(--serif); }
.chart-key { text-align: center; font-size: 13px; color: var(--muted); margin-top: 6px; }

/* top 5 */
.top5 { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; counter-reset: rank; }
.top5 li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 2px 12px; background: #fff; border: 1px solid var(--tan); border-radius: 12px; padding: 14px 14px 12px; }
.top5 .rank { grid-row: span 3; width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--gold-deep); color: var(--gold-deep); display: grid; place-items: center; font-family: var(--serif); font-weight: 700; }
.top5 .nm { font-weight: 700; overflow-wrap: anywhere; }
.top5 .cost { font-family: var(--serif); font-size: 18px; }
.top5 .meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
.top5 .why { grid-column: 2; font-size: 14px; color: var(--muted); margin-top: 4px; }

/* fix-it */
.fixit { background: var(--cream); border: 1px solid var(--tan); border-radius: 14px; padding: 20px 16px; margin-top: 14px; }
.fixit .target { font-family: var(--serif); font-size: 20px; margin-top: 4px; }
.fixit .tools-q { margin-top: 16px; }
.fixit .other-tool { margin-top: 10px; }
.fixit .btn { margin-top: 16px; }
.steps { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; counter-reset: step; }
.steps li { background: #fff; border: 1px solid var(--tan); border-radius: 10px; padding: 14px 14px 12px 14px; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 2px 12px; }
.steps li::before { counter-increment: step; content: counter(step); grid-row: span 2; width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid var(--gold-deep); color: var(--gold-deep); display: grid; place-items: center; font-family: var(--serif); font-weight: 700; font-size: 15px; }
.steps .act { overflow-wrap: anywhere; }
.steps .meta { font-size: 13px; color: var(--muted); font-weight: 700; }
.saves { margin-top: 16px; font-family: var(--serif); font-size: 19px; }
.fixit-foot { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-top: 12px; font-size: 14px; color: var(--muted); }
.bigproj { margin-top: 14px; padding: 12px 14px; border-left: 3px solid var(--tan); font-size: 15px; color: var(--warm); }

/* tonight's win */
.win { border: 1px solid var(--tan); border-radius: 14px; background: #fff; padding: 20px 16px; margin-top: 14px; }
.win h3 { font-size: 20px; }
.win .body { margin-top: 12px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 16px; line-height: 1.55; background: var(--ivory); border: 1px solid var(--cream-deep); border-radius: 10px; padding: 14px; }
.win .btn { margin-top: 14px; }
.win .kind { margin-top: 8px; }

/* leave it alone */
.leave { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.leave li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--tan); border-radius: 10px; background: var(--cream); font-size: 15px; }
.leave li span:last-child { white-space: nowrap; color: var(--muted); }

/* CTA: the build-session block (screen 4, under Fix-It and at the bottom).
   State-driven: headline + capacity + button, or a plain confirmation /
   not-qualified / invited line in the same card. #book is the first one. */
.cta { margin-top: 40px; background: var(--espresso); color: var(--ivory); border-radius: 14px; padding: 26px 20px; scroll-margin-top: 84px; }
.cta .eyebrow { color: var(--gold); }
.cta h2 { color: var(--ivory); font-size: 24px; margin-top: 6px; }
.cta p { color: var(--tan); margin-top: 10px; font-size: 16px; }
.cta .btn { margin-top: 18px; background: var(--gold); color: var(--espresso); }
.cta .line { color: var(--ivory); font-size: 18px; line-height: 1.5; }
.cta .line:focus { outline: none; }
.cta .cap { color: var(--ivory); font-weight: 700; font-size: 15px; }
.cta .cap.pending { color: var(--tan); font-weight: 400; }
.cta .price { margin-top: 10px; font-size: 14px; color: var(--tan); text-align: center; }
.cta .link-btn { color: var(--gold); margin-top: 6px; }
.cta label { color: var(--ivory); }
.cta .status { color: var(--tan); }
.cta .status.err { color: #e8b4ab; }
.cta a:not(.btn) { color: var(--gold); }

/* booking: note field + confirmation (shared by the CTA and the lock panel) */
.book-note { margin-top: 6px; }
.book-note[hidden] { display: none; }
.book-note .opt { font-weight: 400; }
.book-note input { font-size: 16px; }
.book-note .count { font-size: 12px; margin-top: 4px; text-align: right; }
.cta .book-note .count { color: var(--tan); }
.confirm { font-size: 17px; line-height: 1.55; }
.confirm .pick { display: inline-block; margin-top: 8px; font-weight: 700; }

/* lock panel */
.lock { background: var(--cream); border: 1.5px solid var(--tan); border-radius: 14px; padding: 20px 16px; margin-top: 16px; scroll-margin-top: 84px; }
.lock h2 { font-size: 22px; }
.lock p { margin-top: 8px; color: var(--warm); }
.lock .lock-actions { display: grid; gap: 10px; margin-top: 16px; }
.lock .lock-book { display: grid; gap: 4px; }
.lock .cap { font-size: 14px; color: var(--muted); font-weight: 700; margin: 0 0 4px; }
.lock .cap.pending { font-weight: 400; }
.lock .confirm, .lock .line { margin: 0; color: var(--espresso); }
.lock .status { margin-top: 6px; }
.lock .soon { font-size: 13px; color: var(--muted); text-align: center; }

.results-foot { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 15px; color: var(--muted); align-items: center; }

/* toast */
.toast { pointer-events: none; position: fixed; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 30; background: var(--espresso); color: var(--ivory); padding: 12px 16px; border-radius: 10px; font-size: 15px; font-weight: 600; text-align: center; box-shadow: 0 8px 24px rgba(24,20,16,.25); }
.toast[hidden] { display: none; }
body.has-bar .toast { bottom: calc(var(--bar-h) + 12px + env(safe-area-inset-bottom, 0px)); }

/* motion, only when allowed */
@media (prefers-reduced-motion: no-preference) {
  .btn, .chip, .head-cta, .icon-btn { transition: background-color .2s, color .2s, border-color .2s, transform .15s; }
  .btn:not(:disabled):active { transform: translateY(1px); }
  .progress-bar span { transition: width .4s ease; }
  .chart .bubble .dot { transition: fill .2s, stroke-width .2s; }
  .screen { animation: rise .35s ease both; }
  @keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}

@media (min-width: 720px) {
  .wrap { padding: 0 20px; }
  .app { padding-top: 40px; }
  h1 { font-size: 40px; }
  .seg { grid-template-columns: repeat(4, 1fr); }
  .btn { width: auto; min-width: 240px; }
  form .btn { justify-self: start; }
  .total-bar .btn { min-width: 0; }
  .card .tags .chip { font-size: 14px; }
  .lock .lock-actions { grid-template-columns: 1fr 1fr; align-items: start; }
  .lock .lock-actions .btn { width: 100%; min-width: 0; }
  .cta { padding: 32px 28px; }
  .chart svg { max-width: 560px; }
  .chart figcaption { font-size: 16px; }
  .win .btn, .fixit .btn { min-width: 220px; }
}

/* Narrow phones: the header must never be wider than the screen (a wide header
   widens the layout viewport and pushes the pinned Continue button off-edge). */
header .wrap { min-width: 0; }
.wordmark { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.head-cta, .mock-badge { flex: none; }
@media (max-width: 400px) {
  header .wrap { gap: 8px; }
  .wordmark { font-size: 16px; }
  .head-cta { font-size: 13px; padding: 8px 10px; }
  .mock-badge { display: none; }
}
@media (max-width: 340px) {
  .wordmark { font-size: 14px; }
  .head-cta { font-size: 12px; padding: 8px 8px; }
}
