/* ============================================================
   FirePath — Shared Design System
   /css/main.css
   ============================================================ */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Design tokens ── */
:root {
  /* Colour */
  --fire-orange: var(--ember, #F4622A);
  --fire-amber:  var(--amber, #F9A825);
  --warm-cream:  var(--bg, #FDF6EE);
  --warm-brown:  var(--ink, #2B1D14);
  --dark-bg:     var(--espresso, #241910);
  --soft-grey:   var(--ink-2, #65544A);
  --mid-grey:    var(--ink-3, #9A8A80);
  --card-bg:     var(--surface, #FFFFFF);
  --border:      var(--line, #EDE3DA);
  --border-soft: rgba(237,227,218,0.6);
  --pro-gold:    #C9962A;

  /* Type scale — real hierarchy */
  --text-xs:   11px;
  --text-sm:   13px;
  --text-base: 15px;
  --text-md:   17px;
  --text-lg:   20px;
  --text-xl:   24px;
  --text-2xl:  32px;

  /* Spacing — generous and intentional */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  24px;
  --space-6:  32px;
  --space-7:  48px;
  --space-8:  64px;

  /* Shadows — three tiers of depth */
  --shadow-sm:   0 1px 4px rgba(61,43,31,0.05), 0 2px 12px rgba(61,43,31,0.04);
  --shadow-md:   0 2px 8px rgba(61,43,31,0.06), 0 8px 32px rgba(61,43,31,0.08);
  --shadow-lg:   0 4px 16px rgba(61,43,31,0.08), 0 16px 56px rgba(61,43,31,0.12);
  --shadow-glow: 0 4px 24px rgba(244,98,42,0.25), 0 8px 48px rgba(244,98,42,0.12);

  /* Radius */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 24px;
}

/* ── Base ── */
html { -webkit-font-smoothing: antialiased; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--warm-cream);
  color: var(--warm-brown);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px 80px;
}

/* Subtle ambient glow — top right only */
body::before {
  content: '';
  position: fixed;
  top: -160px; right: -160px;
  width: 560px; height: 560px;
  background: radial-gradient(circle, rgba(244,98,42,0.07) 0%, transparent 68%);
  pointer-events: none;
  z-index: 0;
}

/* ── Layout ── */
.container {
  width: 100%;
  max-width: 520px;
  position: relative;
  z-index: 1;
}

/* ── Typography hierarchy ── */

/* Eyebrow — whispers */
.eyebrow {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--fire-orange);
  display: block;
  margin-bottom: var(--space-3);
}

/* Card title — speaks */
.card-title {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-2);
  color: var(--warm-brown);
}

/* Card subtitle — supports */
.card-sub {
  font-size: var(--text-base);
  color: var(--soft-grey);
  font-weight: 300;
  margin-bottom: var(--space-7);
  line-height: 1.65;
}

/* Section label — guides */
.section-label {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--soft-grey);
  margin-bottom: var(--space-3);
}

/* Disclaimer — recedes */
.disclaimer {
  text-align: center;
  font-size: var(--text-xs);
  color: var(--mid-grey);
  margin-top: var(--space-5);
  line-height: 1.7;
  font-weight: 300;
}

/* ── Logo ── */
.header {
  text-align: center;
  margin-bottom: var(--space-7);
  animation: fadeUp 0.5s ease both;
}
.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
  text-decoration: none;
}
.logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--warm-brown);
  letter-spacing: -0.3px;
}
.logo-text span { color: var(--fire-orange); }
.tagline {
  font-size: var(--text-xs);
  color: var(--soft-grey);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
}
.pro-badge {
  background: linear-gradient(135deg, var(--fire-orange), var(--pro-gold));
  color: white;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-left: 4px;
  vertical-align: middle;
}

/* ── Card — the primary surface ── */
.card {
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  padding: var(--space-7) var(--space-6);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

/* ── Primary button — sings ── */
.cta-btn {
  width: 100%;
  padding: 17px;
  background: linear-gradient(135deg, var(--fire-orange), var(--fire-amber));
  border: none;
  border-radius: var(--radius-md);
  font-family: 'DM Sans', sans-serif;
  font-size: var(--text-md);
  font-weight: 500;
  color: white;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: var(--shadow-glow);
  letter-spacing: 0.01em;
}
.cta-btn:hover  { transform: translateY(-2px); box-shadow: 0 8px 40px rgba(244,98,42,0.35); }
.cta-btn:active { transform: translateY(0); }
.cta-btn:disabled { opacity: 0.38; cursor: not-allowed; transform: none; box-shadow: none; }

/* Back button — steps back */
.back-btn {
  background: none;
  border: none;
  font-family: 'DM Sans', sans-serif;
  font-size: var(--text-sm);
  color: var(--mid-grey);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: var(--space-5);
  padding: 0;
  transition: color 0.2s;
  font-weight: 300;
}
.back-btn:hover { color: var(--warm-brown); }

/* ── Toggle buttons (cycle, housing) ── */
.cycle-group  { display: flex; gap: 8px; margin-bottom: var(--space-5); }
.housing-group { display: flex; gap: 8px; margin-bottom: var(--space-4); }

.cycle-btn, .housing-btn {
  flex: 1;
  padding: 11px 8px;
  border: 1.5px solid var(--border);
  background: white;
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--soft-grey);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  line-height: 1.4;
}
.cycle-btn:hover, .housing-btn:hover {
  border-color: rgba(244,98,42,0.4);
  color: var(--warm-brown);
}
.cycle-btn.active, .housing-btn.active {
  background: var(--fire-orange);
  border-color: var(--fire-orange);
  color: white;
}

/* ── Inputs ── */
.input-group  { margin-bottom: var(--space-4); }
.input-label  {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  margin-bottom: var(--space-2);
  color: var(--warm-brown);
}
.input-hint   {
  font-size: var(--text-xs);
  color: var(--soft-grey);
  font-weight: 300;
  margin-bottom: var(--space-3);
  line-height: 1.6;
}
.input-wrapper { position: relative; }
.input-prefix {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  color: var(--mid-grey);
  font-weight: 500;
  pointer-events: none;
}

input[type="number"],
input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 14px 14px 14px 34px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  color: var(--warm-brown);
  background: white;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  -moz-appearance: textfield;
}
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; appearance: none; }
input[type="number"]:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
  border-color: var(--fire-orange);
  box-shadow: 0 0 0 3px rgba(244,98,42,0.08);
}
input[type="text"],
input[type="email"],
input[type="password"] { padding-left: 14px; }

.divider { height: 1px; background: var(--border); margin: var(--space-5) 0; }
.error-msg { color: #E53935; font-size: var(--text-sm); margin-bottom: var(--space-3); display: none; font-weight: 300; }

/* ── Super note ── */
.super-note {
  font-size: var(--text-sm);
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  margin-top: var(--space-2);
  line-height: 1.6;
  font-weight: 300;
}
.super-note.locked     { background: #FFF3E0; color: #E65100; border: 1px solid #FFE0B2; }
.super-note.soon       { background: #FFF8E1; color: #F57F17; border: 1px solid #FFF176; }
.super-note.accessible { background: #E8F5E9; color: #2E7D32; border: 1px solid #A5D6A7; }

/* ── Context textarea ── */
.context-wrapper  { position: relative; }
.context-textarea {
  width: 100%;
  padding: 14px 44px 14px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: var(--text-base);
  color: var(--warm-brown);
  background: white;
  outline: none;
  resize: none;
  height: 96px;
  line-height: 1.6;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.context-textarea:focus {
  border-color: var(--fire-orange);
  box-shadow: 0 0 0 3px rgba(244,98,42,0.08);
}
.context-textarea::placeholder { color: var(--mid-grey); font-weight: 300; }
.context-mic-btn {
  position: absolute; right: 12px; bottom: 12px;
  background: none; border: none; cursor: pointer;
  font-size: 20px; color: var(--mid-grey);
  transition: color 0.2s; padding: 4px;
}
.context-mic-btn:hover    { color: var(--fire-orange); }
.context-mic-btn.listening { color: #E53935; animation: pulse-small 1s ease infinite; }
.context-label { font-size: var(--text-sm); font-weight: 500; margin-bottom: 4px; display: block; }
.context-sub   { font-size: var(--text-sm); color: var(--soft-grey); font-weight: 300; margin-bottom: var(--space-3); line-height: 1.6; }

/* ── Loading sequence ── */
.ai-loading { text-align: center; padding: var(--space-7) 0; display: none; }
.ai-loading.visible { display: block; }
.loading-dots { display: flex; justify-content: center; gap: 8px; margin-bottom: var(--space-4); }
.loading-dots span {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--fire-orange);
  animation: bounce 1.2s ease infinite;
}
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }
.loading-text { font-size: var(--text-sm); color: var(--soft-grey); font-weight: 300; }

/* ── Result card — the moment that matters ── */
.result-card {
  background: linear-gradient(145deg, #2A1E15, #4A2F1E);
  border-radius: var(--radius-xl);
  padding: var(--space-7) var(--space-6) var(--space-6);
  color: white;
  margin-bottom: var(--space-3);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

/* Ambient glow inside result card */
.result-card::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(244,98,42,0.15) 0%, transparent 65%);
  pointer-events: none;
}

.result-label {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  opacity: 0.4;
  margin-bottom: var(--space-3);
  display: block;
}
.result-headline {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: var(--space-2);
}
.result-headline span {
  color: var(--fire-amber);
  font-weight: 700;
  font-size: 32px;
}
.result-sub {
  font-size: var(--text-sm);
  opacity: 0.5;
  margin-bottom: var(--space-6);
  font-weight: 300;
  line-height: 1.6;
}
.result-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.stat-box {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-sm);
  padding: 14px 10px;
  text-align: center;
}
.stat-value {
  font-family: 'Playfair Display', serif;
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--fire-amber);
  display: block;
  line-height: 1;
  margin-bottom: var(--space-2);
}
.stat-name {
  font-size: var(--text-xs);
  opacity: 0.45;
  display: block;
  line-height: 1.4;
  font-weight: 400;
}

/* ── Compare card ── */
.compare-card  { background: white; border: 1.5px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-5) var(--space-5); margin-bottom: var(--space-3); box-shadow: var(--shadow-sm); }
.compare-title { font-size: var(--text-sm); font-weight: 500; margin-bottom: var(--space-4); }
.compare-row   { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: var(--text-sm); }
.compare-row:last-child { border-bottom: none; }
.compare-label { color: var(--soft-grey); font-weight: 300; }
.compare-value { font-weight: 500; }
.compare-value.highlight { color: var(--fire-orange); font-weight: 600; }

/* ── Tooltip ── */
.info-icon { display: inline-block; position: relative; cursor: pointer; margin-left: 5px; font-size: 13px; vertical-align: middle; }
.tooltip {
  display: none; position: absolute; bottom: 130%; left: 50%;
  transform: translateX(-50%);
  background: white; color: var(--warm-brown);
  font-size: var(--text-sm); font-weight: 300; line-height: 1.6;
  padding: 12px 16px; border-radius: var(--radius-sm);
  width: 240px; z-index: 10;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}
.tooltip::after {
  content: ''; position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: white;
}
.info-icon.active .tooltip, .info-icon:hover .tooltip { display: block; }

/* ── Scenario blocks ── */
.scenarios-wrapper { margin-top: var(--space-4); display: flex; flex-direction: column; gap: 10px; }
.scenario-block    { background: var(--warm-cream); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: var(--space-4) var(--space-4); }
.scenario-title    { font-size: var(--text-xs); font-weight: 700; color: var(--fire-orange); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: var(--space-2); }
.scenario-body     { font-size: var(--text-sm); color: var(--warm-brown); line-height: 1.65; font-weight: 300; }
.scenario-body strong { font-weight: 500; }

/* ── AI insight card — elevated surface ── */
.ai-insight-card {
  background: var(--dark-bg);
  border-radius: var(--radius-lg);
  padding: var(--space-6) var(--space-5);
  margin-bottom: var(--space-3);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.ai-insight-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(244,98,42,0.12) 0%, transparent 65%);
  pointer-events: none;
}
.ai-insight-label {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fire-amber);
  margin-bottom: var(--space-4);
  display: flex; align-items: center; gap: 6px;
  opacity: 0.8;
}
.ai-insight-text {
  font-size: var(--text-base);
  color: rgba(255,255,255,0.75);
  line-height: 1.8;
  font-weight: 300;
}
.ai-insight-text strong {
  font-weight: 500;
  color: rgba(255,255,255,0.92);
}

/* ── Screens ── */
.screen        { display: none; }
.screen.active { display: block; animation: fadeUp 0.45s ease both; }

/* ── Persona cards ── */
.persona-list { display: flex; flex-direction: column; gap: 10px; }
.persona-card {
  display: flex; align-items: center; gap: var(--space-4);
  padding: var(--space-5) var(--space-5);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.2s ease;
  background: white;
  box-shadow: var(--shadow-sm);
  -webkit-tap-highlight-color: transparent;
}
.persona-card:hover {
  border-color: rgba(244,98,42,0.35);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.persona-card.selected {
  border-color: var(--fire-orange);
  background: #FFF7F3;
  box-shadow: 0 4px 20px rgba(244,98,42,0.12);
}
.persona-icon { font-size: 26px; line-height: 1; flex-shrink: 0; }
.persona-info { flex: 1; }
.persona-name { font-size: var(--text-base); font-weight: 500; margin-bottom: 2px; }
.persona-desc { font-size: var(--text-sm); color: var(--soft-grey); font-weight: 300; line-height: 1.5; }
.persona-check {
  width: 22px; height: 22px;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: white;
  transition: all 0.2s; flex-shrink: 0;
  background: transparent;
}
.persona-card.selected .persona-check {
  background: var(--fire-orange);
  border-color: var(--fire-orange);
}
.persona-card.selected .persona-check::after { content: '✓'; }

/* ── Voice mode ── */
.voice-area        { text-align: center; padding: var(--space-4) 0; display: none; }
.voice-area.visible { display: block; }
.mic-btn {
  width: 80px; height: 80px; border-radius: 50%; border: none;
  background: linear-gradient(135deg, var(--fire-orange), var(--fire-amber));
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  margin: 0 auto var(--space-4); font-size: 32px;
  box-shadow: var(--shadow-glow);
  transition: all 0.2s ease;
}
.mic-btn:hover     { transform: scale(1.05); }
.mic-btn.listening { animation: pulse 1.2s ease infinite; background: linear-gradient(135deg, #E53935, #F4622A); }
.mic-label { font-size: var(--text-sm); color: var(--soft-grey); font-weight: 300; }
.transcript-box {
  margin-top: var(--space-4);
  background: var(--warm-cream);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-4) var(--space-4);
  font-size: var(--text-base);
  color: var(--warm-brown);
  min-height: 60px; line-height: 1.6;
  text-align: left; font-style: italic; display: none;
}
.transcript-box.visible { display: block; }

/* ── Navigation ── */
nav:not([class]) { position:fixed;top:0;left:0;right:0;background:rgba(253,246,238,0.92);backdrop-filter:blur(12px);border-bottom:1px solid rgba(237,227,218,0.6);padding:0 24px;height:64px;display:flex;align-items:center;justify-content:space-between;z-index:100; }
.nav-logo { font-family:'Playfair Display',serif;font-size:20px;font-weight:700;color:var(--warm-brown);text-decoration:none;word-spacing:0; }
.nav-logo span { color:var(--fire-orange); }
.nav-link { font-size:13px;color:var(--soft-grey);text-decoration:none;font-weight:400; }
.nav-cta { background:var(--warm-brown);color:white;padding:9px 20px;border-radius:10px;font-size:13px;font-weight:500;text-decoration:none; }
.nav-links { display:flex;align-items:center;gap:24px; }
.container { padding-top:80px; }

/* ── Tabs ── */
.tab-nav {
  display: flex; gap: 0; margin-bottom: var(--space-5);
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  overflow: hidden; background: white;
  box-shadow: var(--shadow-sm);
}
.tab-btn {
  flex: 1; padding: 12px 8px; background: white; border: none;
  font-family: 'DM Sans', sans-serif; font-size: var(--text-sm);
  font-weight: 400; color: var(--soft-grey); cursor: pointer; transition: all 0.2s;
}
.tab-btn.active { background: var(--fire-orange); color: white; font-weight: 500; }
.tab-btn:not(:last-child) { border-right: 1.5px solid var(--border); }
.tab-content        { display: none; }
.tab-content.active { display: block; animation: fadeUp 0.3s ease both; }

/* ── Accountability ── */
.accountability-card { background: white; border: 1.5px solid var(--border); border-radius: var(--radius-xl); padding: var(--space-6); margin-bottom: var(--space-3); box-shadow: var(--shadow-sm); }
.acc-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-5); }
.acc-title  { font-family: 'Playfair Display', serif; font-size: var(--text-lg); font-weight: 700; }
.status-dot { display: flex; align-items: center; gap: 6px; font-size: var(--text-sm); font-weight: 500; }
.dot       { width: 9px; height: 9px; border-radius: 50%; }
.dot.green { background: #4CAF50; }
.dot.amber { background: var(--fire-amber); }
.dot.red   { background: #E53935; }
.progress-path { margin-bottom: var(--space-6); }
.path-label { font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--soft-grey); margin-bottom: var(--space-3); }
.path-track { position: relative; height: 6px; background: var(--border); border-radius: 6px; margin-bottom: var(--space-2); }
.path-fill  { height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--fire-orange), var(--fire-amber)); transition: width 0.8s ease; }
.path-markers { display: flex; justify-content: space-between; font-size: var(--text-xs); color: var(--mid-grey); }
.checkin-section { border-top: 1px solid var(--border); padding-top: var(--space-5); }
.checkin-title { font-size: var(--text-base); font-weight: 500; margin-bottom: 4px; }
.checkin-sub   { font-size: var(--text-sm); color: var(--soft-grey); font-weight: 300; margin-bottom: var(--space-4); line-height: 1.5; }
.checkin-inputs { display: flex; flex-direction: column; gap: var(--space-3); margin-bottom: var(--space-4); }
.checkin-row    { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.checkin-label  { font-size: var(--text-sm); color: var(--soft-grey); flex: 1; font-weight: 300; }
.checkin-input-wrap { position: relative; width: 140px; }
.checkin-prefix { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-size: var(--text-sm); color: var(--mid-grey); }
.checkin-input  { width: 100%; padding: 9px 10px 9px 22px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-family: 'DM Sans', sans-serif; font-size: 14px; color: var(--warm-brown); background: white; outline: none; -moz-appearance: textfield; }
.checkin-input::-webkit-inner-spin-button,
.checkin-input::-webkit-outer-spin-button { -webkit-appearance: none; appearance: none; }
.checkin-input:focus { border-color: var(--fire-orange); }

/* ── Milestone ── */
.milestone {
  background: linear-gradient(135deg, #FFF7F3, #FFF3E0);
  border: 1.5px solid rgba(244,98,42,0.15);
  border-radius: var(--radius-md);
  padding: var(--space-5) var(--space-5);
  margin-bottom: var(--space-3); display: none;
}
.milestone.visible { display: block; animation: fadeUp 0.4s ease both; }
.milestone-emoji { font-size: 22px; margin-bottom: var(--space-2); display: block; }
.milestone-text  { font-size: var(--text-base); color: var(--warm-brown); line-height: 1.65; font-weight: 300; }
.milestone-text strong { color: var(--fire-orange); font-weight: 500; }

/* ── History ── */
.history-title { font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--soft-grey); margin-bottom: var(--space-3); }
.history-item  { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: var(--text-sm); }
.history-item:last-child { border-bottom: none; }
.history-date   { color: var(--soft-grey); font-weight: 300; }
.history-change { font-weight: 500; }
.history-change.positive { color: #4CAF50; }
.history-change.negative { color: #E53935; }

/* ── Super result card ── */
.super-result-card { background: white; border: 1.5px solid #A5D6A7; border-radius: var(--radius-lg); padding: var(--space-4) var(--space-5); margin-bottom: var(--space-3); display: none; box-shadow: var(--shadow-sm); }
.super-result-card.visible { display: block; }
.super-result-label { font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: #2E7D32; margin-bottom: var(--space-2); }
.super-result-text  { font-size: var(--text-sm); color: var(--warm-brown); line-height: 1.7; font-weight: 300; }

/* ── Savings hint ── */
.savings-hint { font-size: var(--text-sm); color: var(--soft-grey); font-weight: 300; margin-top: var(--space-2); }

/* ── Section divider ── */
.section-divider {
  display: flex; align-items: center; gap: var(--space-3);
  margin: var(--space-5) 0 var(--space-4);
}
.section-divider span {
  font-size: var(--text-xs); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--mid-grey); white-space: nowrap;
}
.section-divider::before, .section-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ── Dependants counter ── */
.counter-row { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); }
.counter-label { flex: 1; font-size: var(--text-sm); font-weight: 500; color: var(--warm-brown); }
.counter-controls { display: flex; align-items: center; gap: var(--space-2); }
.counter-btn {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1.5px solid var(--border); background: white;
  font-size: 18px; color: var(--soft-grey); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; line-height: 1;
}
.counter-btn:hover { border-color: var(--fire-orange); color: var(--fire-orange); }
.counter-val {
  font-family: 'Playfair Display', serif;
  font-size: var(--text-lg); font-weight: 700;
  color: var(--warm-brown); min-width: 28px; text-align: center;
}

/* ── Input mode toggle ── */
.input-toggle { display: flex; gap: 0; margin-bottom: var(--space-5); border: 1.5px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.toggle-btn { flex: 1; padding: 12px; background: white; border: none; font-family: 'DM Sans', sans-serif; font-size: var(--text-base); font-weight: 500; color: var(--soft-grey); cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; gap: 8px; }
.toggle-btn.active { background: var(--fire-orange); color: white; }
.toggle-btn:first-child { border-right: 1.5px solid var(--border); }

/* ── Context summary tags ── */
.context-summary { background: var(--warm-cream); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-4) var(--space-5); margin-bottom: var(--space-3); display: flex; flex-wrap: wrap; gap: var(--space-2); }
.context-tag { font-size: var(--text-xs); font-weight: 500; color: var(--warm-brown); background: white; border: 1px solid var(--border); border-radius: 20px; padding: 4px 12px; }
.context-tag.highlight { border-color: rgba(244,98,42,0.4); color: var(--fire-orange); background: #FFF7F3; }

/* ── Optional badge ── */
.optional-badge {
  display: inline-block;
  font-size: 10px; font-weight: 500;
  color: var(--mid-grey);
  background: var(--warm-cream);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1px 8px;
  margin-left: 6px;
  vertical-align: middle;
}

/* ── Animations ── */
@keyframes fadeUp  { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse   { 0%, 100% { box-shadow: var(--shadow-glow); } 50% { box-shadow: 0 4px 40px rgba(244,98,42,0.6), 0 0 0 14px rgba(244,98,42,0.08); } }
@keyframes pulse-small { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes bounce  { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
