/* Hallmark · macrostructure: maker story + workbench · tone: lively market · anchor hue: teal
 * theme: custom · vibe: colorful stalls on crisp white · white surfaces explicitly requested by owner
 * type: Manrope hero/body + upright Fraunces section headings · axes: white / geometric-sans / teal-coral
 * Existing routes, information architecture, calculations and motion controls retained.
 * Hallmark · pre-emit critique: P4 H4 E4 S4 R4 V3 (bounded visual trial, existing page structure preserved).
 */
@import url('tokens.css');
html, body { overflow-x: clip; background: var(--color-paper); color: var(--color-ink); font-family: var(--font-body); }
h1,h2,h3 { min-width: 0; overflow-wrap: anywhere; }
h1,h2 { font-family: var(--font-display); }
h3 { font-family: var(--font-body); }
h1 em,h2 em,h3 em { font-style: normal; }
button, .button, input, summary, a { transition-timing-function: var(--ease-out); }
button,.button { border-color: var(--color-control); background: var(--color-surface); color: var(--color-brand); }
button:hover,.button:hover { background: var(--color-sage); border-color: var(--color-brand); box-shadow: none; }
button:active,.button:active { transform: translateY(1px); }
.primary,.button.primary { background: var(--color-brand); color: var(--color-on-brand); border-color: var(--color-brand); }
.primary:hover,.button.primary:hover { background: var(--color-brand-hover); }
input { background: var(--color-surface); border-color: var(--color-control); }
input:hover { border-color: var(--color-brand); }
:is(a,button,input,summary,[tabindex]):focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; transition: none; }
input[aria-invalid=true] { border-color: var(--color-danger); }
.site-header { background: var(--color-paper); backdrop-filter: none; }
.site-header.scrolled { box-shadow: 0 3px 15px var(--color-shadow); }
.brand-mark { background: var(--color-brand); color: var(--color-on-brand); border-radius: var(--radius-input); }
.site-header .brand,.eyebrow,.step,.card-index { font-family: var(--font-body); }
.site-header .nav-cta,.button,button,.footer-top a { white-space: nowrap; }
.motion-toggle,.motion-toggle:hover,.tips-toggle,.tips-toggle:hover,.text-button,.remove-product,.guide-button,.guide-button:hover,.guide-dismiss { background: var(--color-clear); }
.hero-copy h1 { font-family: var(--font-body); font-weight: 800; font-size: var(--text-display); letter-spacing: -.065em; line-height: 1.06; color: var(--color-brand); }
.hero-copy h1 em { color: var(--color-stall-b); text-decoration: underline; text-decoration-color: var(--color-rose); text-decoration-thickness: .065em; text-underline-offset: .09em; }
.hero-copy .eyebrow { letter-spacing: .055em; }
.hero-sub { max-width: 450px; }
.hero-art { background: var(--color-clear); border-radius: 0; padding: 40px 16px 10px; }
.hero-visual,.cost-card img,.persona-card img,.ambient-scene { filter: contrast(1.1) brightness(1.08); }
.hero-visual { mix-blend-mode: normal; }
.art-note { font-family: var(--font-display); font-style: normal; transform: rotate(0); color: var(--color-brand); }
.chapter-caption { font-family: var(--font-body); font-size: 1.3rem; font-weight: 750; border-color: var(--color-control); }
.chapter-index { font-family: var(--font-body); }
.story-progress { background: var(--color-rule); }
.cost-card,.cost-card:nth-child(2),.cost-card:nth-child(3) { background: var(--color-paper); border: 0; border-top: 2px solid var(--color-brand); border-radius: 0; }
.cost-card:nth-child(2) { border-top-color: var(--color-stall-b); }
.cost-card:nth-child(3) { border-top-color: var(--color-control); }
.cost-card:hover { transform: none; }
.planner-section { background: var(--color-paper); border-top: 3px solid var(--color-brand); }
.planner-heading h2 { color: var(--color-brand); }
.panel { background: var(--color-surface); border-color: var(--color-rule); box-shadow: 0 4px 20px var(--color-shadow); }
.panel h2,.legal-page h2 { font-family: var(--font-body); }
.cost-choice { background: var(--color-paper); border-color: var(--color-control); }
.cost-choice:has(input:checked) { background: var(--color-sage); border-color: var(--color-brand); }
.small-button { background: var(--color-rose); color: var(--color-ink); border-color: var(--color-control); }
.small-button:hover { background: var(--color-rose-light); }
.event-editor { border-color: var(--color-stall-a); }
.event-editor:nth-child(2) { border-color: var(--color-stall-b); }
.event-editor:nth-child(2) .event-tag { color: var(--color-stall-b); }
.results-sticky { background: var(--color-brand); color: var(--color-on-brand); box-shadow: 0 8px 25px var(--color-shadow); }
.results-head h2 { font-family: var(--font-display); }
.results-head label,.range-labels,.results-head .small,.result-footnote,.omitted-costs { color: var(--color-muted-on-brand); }
.results-head label strong { color: var(--color-on-brand); }
.results-head .step,.edit-jump,.omitted-costs a,.mobile-summary span { color: var(--color-on-brand); }
.results-sticky :is(a,input,[tabindex]):focus-visible { outline-color: var(--color-rose); }
.result-card,.live-total { background: var(--color-surface); border-top-color: var(--color-stall-a); }
.result-card.event-b,.live-total:nth-child(2) { border-top-color: var(--color-stall-b); }
.metric-row { border-color: var(--color-rule); }
.insight { background: var(--color-rose); color: var(--color-ink); }
.field-help p { background: var(--color-rose-light); }
.result-card .field-help summary { color: var(--color-brand); }
.result-card :is(summary,a):focus-visible { outline-color: var(--color-focus); }
#errors { background: var(--color-error-paper); color: var(--color-danger); }
.results-scroll { scrollbar-color: var(--color-control) var(--color-clear); }
.guide-art img { filter: none; }
.guide-question { background: var(--color-surface); color: var(--color-brand); border-color: var(--color-brand); font-family: var(--font-body); box-shadow: none; }
.guide-popup { background: var(--color-surface); border-color: var(--color-control); box-shadow: 0 8px 25px var(--color-shadow); }
.guide-dismiss:hover { background: var(--color-rose-light); }
.result-sparkle { color: var(--color-stall-b); }
@keyframes result-glow { 0% { box-shadow: inset 0 0 0 2px var(--color-rose); background: var(--color-rose-light); } 100% { box-shadow: inset 0 0 0 2px var(--color-clear); background: var(--color-surface); } }
.worked-example { background: var(--color-paper); border: 2px solid var(--color-brand); border-radius: var(--radius-card); }
.worked-example h3,.footer-top>p { font-family: var(--font-display); }
.final-cta { background: var(--color-paper); border-top: 3px solid var(--color-stall-b); }
.site-footer,.mobile-summary { background: var(--color-brand); }
.footer-bottom { border-color: var(--color-control); }
.footer-bottom,.footer-bottom p { color: var(--color-muted-on-brand); }
.skip { background: var(--color-surface); }
.noscript { background: var(--color-rose-light); color: var(--color-ink); }
@media(max-width:900px) {
  .hero-copy h1 { font-size: clamp(2.65rem, 9.5vw, 4.3rem); }
  .hero-art { padding: 10px 8px 0; border-radius: var(--radius-card); max-width: 470px; }
  .chapter-caption { font-size: 1.1rem; }
  .motion-toggle { max-width: none; white-space: nowrap; }
  .site-header { flex-wrap: wrap; row-gap: 0; }
  .section-heading,.planner-heading { display: block; }
  .site-header nav { gap: 12px; }
}
@media(max-width:420px) {
  .site-header .brand { font-size: 1.15rem; }
  .site-header .brand-mark { display: none; }
  .site-header .nav-cta { font-size: .7rem; padding-inline: 8px; }
  .motion-toggle { font-size: .65rem; }
  .site-header nav { gap: 8px; }
  .hero-copy h1 { font-size: 2.6rem; }
}
@media(prefers-reduced-motion:reduce) { .hero-pin { height: auto!important; min-height: 0!important; } }
@media print {
  body,.planner-section,.panel,.results-sticky,.result-card,.worked-example,.insight { background: var(--color-surface); color: var(--color-ink); box-shadow: none; }
  .results-head label,.results-head label strong,.results-head .step,.result-footnote,.omitted-costs,.omitted-costs a { color: var(--color-ink); }
}
