/* Second-Income / Childcare Break-Even Calculator — Techofera
   Warm, modern, animated. prefers-reduced-motion respected. */
:root {
  --ink: #1c2b28;
  --ink-soft: #43554f;
  --teal: #0e5f56;
  --teal-deep: #0a463f;
  --teal-tint: #e7f2ef;
  --gold: #f5b841;
  --gold-deep: #b97f0e;
  --gold-tint: #fdf3df;
  --coral: #d95f4b;
  --paper: #fbf9f4;
  --card: #ffffff;
  --line: #e5ddd0;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(28, 43, 40, .08);
  --ease: cubic-bezier(.22, .8, .3, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink); background: var(--paper);
  font-family: "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 17px; line-height: 1.6;
}
.wrap { max-width: 880px; margin: 0 auto; padding: 0 20px; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--teal); color: #fff; padding: 10px 16px; z-index: 99; border-radius: 0 0 8px 0; }
.skip-link:focus { left: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 3px solid var(--gold-deep); outline-offset: 2px; border-radius: 4px; }

/* header */
.site-header { background: var(--teal-deep); color: #fff; }
.header-inner { display: flex; justify-content: space-between; align-items: center; padding-top: 14px; padding-bottom: 14px; gap: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; font-size: 1.15rem; }
.brand em { font-style: normal; font-weight: 400; opacity: .75; }
.tax-badge { margin: 0; font-size: .82rem; background: rgba(255,255,255,.12); padding: 6px 12px; border-radius: 999px; }
.tax-badge strong { color: var(--gold); }

/* steps nav */
.steps-nav { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.steps-list { list-style: none; display: flex; gap: 4px; margin: 0; padding: 10px 0 6px; }
.step-tab { display: flex; align-items: center; gap: 8px; border: 0; background: none; font: inherit; color: var(--ink-soft); padding: 8px 12px; border-radius: 999px; cursor: pointer; transition: background .25s var(--ease), color .25s; }
.step-tab:hover { background: var(--teal-tint); }
.step-tab.is-active { background: var(--teal); color: #fff; font-weight: 600; }
.step-n { width: 24px; height: 24px; border-radius: 50%; background: rgba(0,0,0,.12); display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 700; }
.step-tab.is-active .step-n { background: var(--gold); color: var(--ink); }
.progress { height: 5px; background: var(--line); border-radius: 99px; margin: 2px 0 12px; overflow: hidden; }
.progress-fill { height: 100%; width: 25%; background: linear-gradient(90deg, var(--teal), var(--gold-deep)); border-radius: 99px; transition: width .55s var(--ease); }

/* hero */
.hero { padding: 34px 0 10px; }
.hero h1 { font-size: clamp(1.9rem, 4.5vw, 2.7rem); line-height: 1.15; margin: 0 0 12px; letter-spacing: -.01em; }
.hl { color: var(--teal); position: relative; }
.hl::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 10px; background: var(--gold); opacity: .45; z-index: -1; border-radius: 3px; }
.lede { font-size: 1.08rem; color: var(--ink-soft); max-width: 62ch; }
.hero-points { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 16px 0 6px; }
.hero-points li { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: .88rem; box-shadow: var(--shadow); }
.hero-points li::before { content: "✓ "; color: var(--teal); font-weight: 700; }
.ad-slot[data-monetization="disabled"] { display: none; }

/* steps */
.step { display: none; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(20px, 4vw, 36px); margin: 18px 0 26px; }
.step.is-visible { display: block; animation: stepIn .5s var(--ease); }
@keyframes stepIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.step h2 { margin: 0 0 4px; font-size: 1.5rem; letter-spacing: -.01em; }
.step-sub { margin: 0 0 20px; color: var(--ink-soft); }
.group-h { font-size: 1.05rem; margin: 26px 0 10px; padding-top: 18px; border-top: 1px dashed var(--line); color: var(--teal-deep); }
.group-h .hint { font-weight: 400; font-size: .85rem; color: var(--ink-soft); }
.est-tag { font-size: .7rem; vertical-align: middle; background: var(--gold-tint); color: var(--gold-deep); border: 1px solid var(--gold); padding: 3px 10px; border-radius: 999px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }

/* fields */
.field { margin: 0 0 18px; border: 0; padding: 0; }
.field > label, .field > legend { display: block; font-weight: 600; margin-bottom: 8px; font-size: .98rem; }
.field > legend { padding: 0; }
.hint { font-weight: 400; color: var(--ink-soft); font-size: .85rem; }
.us-only { font-weight: 400; font-size: .8rem; color: var(--ink-soft); }
.note { font-size: .86rem; color: var(--ink-soft); margin: 8px 0 0; }
.note strong { color: var(--ink); }
.cur { font-weight: 400; color: var(--ink-soft); }
input[type="number"], input[type="text"], select {
  font: inherit; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); width: 100%; max-width: 320px;
  transition: border-color .2s;
}
input:focus, select:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 3px rgba(14,95,86,.15); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 20px; }
.radio-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); border-radius: 999px; padding: 8px 16px; cursor: pointer; font-weight: 500; transition: all .2s var(--ease); background: #fff; }
.chip input { accent-color: var(--teal); width: 16px; height: 16px; margin: 0; }
.chip:has(input:checked) { border-color: var(--teal); background: var(--teal-tint); font-weight: 700; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--teal); }

/* sliders */
.slider-row { display: flex; gap: 14px; align-items: center; }
.slider-row input[type="range"] { flex: 1; }
.slider-row input[type="number"] { max-width: 130px; }
input[type="range"] { -webkit-appearance: none; appearance: none; height: 8px; border-radius: 99px; background: linear-gradient(90deg, var(--teal) var(--fill, 25%), var(--line) var(--fill, 25%)); cursor: pointer; padding: 0; border: 0; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 3px solid var(--teal); box-shadow: 0 2px 8px rgba(0,0,0,.2); transition: transform .15s var(--ease); }
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); }
input[type="range"]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 3px solid var(--teal); }
.slider-field output { display: inline-block; font-weight: 700; color: var(--teal-deep); background: var(--teal-tint); padding: 4px 14px; border-radius: 999px; margin-top: 8px; font-size: 1.02rem; }

/* kids */
.kids-list { display: grid; gap: 12px; margin-bottom: 14px; }
.kid-card { border: 1.5px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--paper); animation: stepIn .4s var(--ease); }
.kid-card.removing { opacity: 0; transform: translateX(30px); transition: all .3s var(--ease); }
.kid-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.kid-head strong { color: var(--teal-deep); }
.kid-remove { border: 0; background: none; color: var(--coral); cursor: pointer; font: inherit; font-size: .85rem; font-weight: 600; }
.kid-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.kid-grid .field { margin: 0; }
.kid-checks { display: flex; gap: 16px; grid-column: 1 / -1; }
.kid-checks label { display: flex; align-items: center; gap: 8px; font-size: .9rem; font-weight: 500; cursor: pointer; }
.kid-checks input { width: 17px; height: 17px; accent-color: var(--teal); }
.care-total { font-size: 1.1rem; background: var(--gold-tint); border: 1px solid var(--gold); border-radius: 12px; padding: 12px 18px; margin: 6px 0 20px; }
.fsa-block { background: var(--teal-tint); border-radius: 12px; padding: 18px; margin-top: 8px; }
.fsa-block legend { font-weight: 700; }

/* buttons */
.btn { font: inherit; font-weight: 600; border: 1.5px solid var(--teal); background: #fff; color: var(--teal-deep); border-radius: 999px; padding: 11px 24px; cursor: pointer; transition: all .22s var(--ease); }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn.primary { background: var(--teal); color: #fff; border-color: var(--teal); }
.btn.primary:hover { background: var(--teal-deep); }
.btn.big { font-size: 1.1rem; padding: 14px 32px; }
.btn.ghost { border-color: var(--line); color: var(--ink-soft); }
.step-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 26px; flex-wrap: wrap; }

/* verdict */
.verdict-card { background: linear-gradient(135deg, var(--teal-deep), var(--teal)); color: #fff; border-radius: var(--radius); padding: clamp(22px, 4vw, 36px); margin: 6px 0 8px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.verdict-card::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: rgba(245,184,65,.18); }
.verdict-kicker { margin: 0; opacity: .8; font-size: .95rem; }
.verdict-headline { margin: 4px 0 0; font-size: 1.25rem; font-weight: 500; }
.verdict-number { margin: 8px 0 4px; font-size: clamp(2.6rem, 7vw, 4rem); font-weight: 800; letter-spacing: -.02em; color: var(--gold); font-variant-numeric: tabular-nums; }
.verdict-number .per { font-size: 1.1rem; font-weight: 500; color: #fff; opacity: .8; }
.verdict-sub { margin: 0 0 18px; opacity: .92; max-width: 60ch; }
.stat-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tile { background: rgba(255,255,255,.12); border-radius: 12px; padding: 12px 14px; backdrop-filter: blur(2px); }
.tile-v { display: block; font-size: 1.45rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.tile-l { font-size: .82rem; opacity: .85; }

/* waterfall */
.waterfall { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.wf-bar { display: flex; height: 46px; border-radius: 10px; overflow: hidden; background: var(--line); }
.wf-seg { height: 100%; width: 0; transition: width 1s var(--ease); min-width: 0; }
.wf-seg.taxes { background: var(--coral); }
.wf-seg.childcare { background: var(--gold-deep); }
.wf-seg.costs { background: #8a7f6a; }
.wf-seg.kept { background: var(--teal); }
.wf-legend { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; }
.wf-legend li { display: flex; align-items: center; gap: 10px; font-size: .92rem; }
.wf-legend .dot { width: 14px; height: 14px; border-radius: 4px; flex: none; }
.wf-legend b { margin-left: auto; font-variant-numeric: tabular-nums; }

/* chart */
.chart-wrap { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
#horizon-chart { width: 100%; height: auto; display: block; }
#hz-work-line, #hz-gap-line { transition: stroke-dashoffset 1.6s var(--ease); }
#hz-work-area, #hz-gap-area { opacity: 0; transition: opacity 1.2s ease .5s; }
#hz-work-area.drawn, #hz-gap-area.drawn { opacity: 1; }
.chart-legend { display: flex; gap: 22px; justify-content: center; padding: 10px 0 2px; font-size: .9rem; }
.sw { display: inline-block; width: 22px; height: 4px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }
.sw.work { background: var(--gold-deep); } .sw.gap { background: var(--teal); }
.horizon-headline { font-size: 1.12rem; background: var(--gold-tint); border-left: 4px solid var(--gold-deep); padding: 12px 16px; border-radius: 0 10px 10px 0; }
.horizon-headline strong { color: var(--gold-deep); }

/* scenarios */
.scenario-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.sc-card { border: 1.5px solid var(--line); border-radius: 12px; padding: 18px; background: var(--card); opacity: 0; transform: translateY(18px); transition: opacity .5s var(--ease), transform .5s var(--ease), box-shadow .25s; }
.sc-card.shown { opacity: 1; transform: none; }
.sc-card.winner { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(14,95,86,.15), var(--shadow); }
.sc-card h4 { margin: 0 0 2px; font-size: 1.02rem; }
.sc-card .sc-sub { font-size: .82rem; color: var(--ink-soft); margin: 0 0 10px; }
.sc-card .sc-v { font-size: 1.5rem; font-weight: 800; color: var(--teal-deep); font-variant-numeric: tabular-nums; }
.sc-card .sc-v.neg { color: var(--coral); }
.sc-card dl { margin: 10px 0 0; font-size: .88rem; }
.sc-card dt { color: var(--ink-soft); float: left; clear: left; margin-right: 6px; }
.sc-card dd { margin: 0 0 4px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }

/* tips */
.tips { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tip { border: 1px solid var(--line); border-radius: 12px; padding: 18px; background: var(--paper); }
.tip h4 { margin: 0 0 8px; color: var(--teal-deep); }
.tip p { margin: 0 0 10px; font-size: .94rem; }
.tip .verdict-line { font-weight: 700; color: var(--teal-deep); }

/* share */
.share-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.share-row input[type="text"] { flex: 1; min-width: 220px; font-size: .85rem; }
.disclaimer-box { background: #fff8e8; border: 1.5px solid var(--gold); border-radius: 12px; padding: 14px 18px; margin: 22px 0; font-size: .92rem; }

/* method + faq */
.method, .faq { margin: 30px 0; }
.method h2, .faq h2 { font-size: 1.35rem; }
details { background: var(--card); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; overflow: hidden; }
details[open] { box-shadow: var(--shadow); }
summary { padding: 14px 18px; font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
summary::after { content: "+"; font-size: 1.3rem; color: var(--teal); font-weight: 700; transition: transform .25s var(--ease); flex: none; }
details[open] summary::after { transform: rotate(45deg); }
summary::-webkit-details-marker { display: none; }
details > *:not(summary) { padding: 0 18px; }
details > p:last-child, details > ul:last-child { padding-bottom: 16px; }
details ul { margin: 8px 0; padding-left: 20px; }

/* footer */
.site-footer { background: var(--ink); color: #cfd8d4; margin-top: 40px; }
.site-footer .wrap { padding-top: 26px; padding-bottom: 30px; }
.site-footer p { margin: 6px 0; }
.site-footer .fine { font-size: .82rem; opacity: .75; }

/* responsive */
@media (max-width: 700px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .scenario-cards, .tips { grid-template-columns: 1fr; }
  .stat-tiles { grid-template-columns: 1fr 1fr; }
  .step-label { display: none; }
  .step-tab { padding: 8px 10px; }
  .kid-grid { grid-template-columns: 1fr; }
  .wf-legend { grid-template-columns: 1fr; }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001s !important; transition-duration: .001s !important; }
  .step.is-visible { animation: none; }
  .wf-seg { transition: none; }
  #hz-work-line, #hz-gap-line { transition: none; }
  #hz-work-area, #hz-gap-area { transition: none; opacity: 1; }
}

/* print: verdict summary only */
@media print {
  .site-header, .steps-nav, .hero, .ad-slot, .step[data-step="1"], .step[data-step="2"], .step[data-step="3"],
  .method, .faq, .step-nav, .share-row, .tweaks, #copy-note, .skip-link { display: none !important; }
  body { background: #fff; font-size: 13px; }
  .step { border: 0; box-shadow: none; padding: 0; margin: 0; display: block; }
  .step[data-step="4"] { display: block !important; }
  .verdict-card { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .site-footer { margin-top: 10px; }
}
