/* ── AadiFit Performance Tools — Shared Styles ───────────────── */

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

:root {
  --bg:        #0a0a0a;
  --surface:   #111;
  --surface-2: #1a1a1a;
  --border:    rgba(255,255,255,0.07);
  --gold:      #c8a96e;
  --gold-2:    #dab87c;
  --gold-glow: rgba(200,169,110,0.15);
  --text:      #f0f0f0;
  --muted:     #888;
  --green:     #22c55e;
  --orange:    #f59e0b;
  --red:       #ef4444;
  --purple:    #a855f7;
  --blue:      #3b82f6;
  --radius:    14px;
  --radius-sm: 8px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding: 0 0 60px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Tool Header ───────────────────────────────────────────── */
.tool-header {
  text-align: center;
  padding: 60px 20px 40px;
  position: relative;
}
.tool-header::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 70% 50% at 50% 0%, var(--gold-glow) 0%, transparent 70%);
}
.tool-header .tool-icon {
  font-size: 48px;
  margin-bottom: 12px;
}
.tool-header h1 {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.15;
  color: #fff;
  margin-bottom: 10px;
}
.tool-header h1 span {
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.tool-header p {
  max-width: 540px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 1rem;
}

/* ── Tool Container ────────────────────────────────────────── */
.tool-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Form Card ─────────────────────────────────────────────── */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  margin-top: 100px;
  margin-bottom: 100px;
  position: relative;
}
.form-card::before {
  content: '';
  position: absolute;
  top: -50px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  box-shadow: 0 0 12px rgba(200,169,110,0.4), 0 0 24px rgba(200,169,110,0.15);
}
.form-card::after {
  content: '';
  position: absolute;
  bottom: -50px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  box-shadow: 0 0 12px rgba(200,169,110,0.4), 0 0 24px rgba(200,169,110,0.15);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.form-group {
  margin-bottom: 18px;
}
.form-group.full-width {
  grid-column: 1 / -1;
}
.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #bbb;
  margin-bottom: 7px;
}
.form-group label .unit {
  color: var(--muted);
  font-weight: 400;
}

.form-group input[type="number"],
.form-group input[type="text"],
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  padding: 11px 14px;
  outline: none;
  transition: border-color .2s;
  -moz-appearance: textfield;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--gold);
}
.form-group input[type="number"]::-webkit-inner-spin-button,
.form-group input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; }

.form-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23888' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.form-group textarea {
  resize: vertical;
  min-height: 70px;
}

/* ── Range Slider ──────────────────────────────────────────── */
.range-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}
.range-wrap input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: var(--surface-2);
  border-radius: 100px;
  outline: none;
}
.range-wrap input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gold);
  cursor: pointer;
  border: 2px solid var(--bg);
  box-shadow: 0 0 8px var(--gold-glow);
}
.range-wrap input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gold);
  cursor: pointer;
  border: 2px solid var(--bg);
}
.range-val {
  min-width: 28px;
  text-align: center;
  font-weight: 700;
  color: var(--gold);
  font-size: 0.95rem;
}

/* ── File Upload ───────────────────────────────────────────── */
.file-upload {
  position: relative;
  border: 2px dashed rgba(200,169,110,0.25);
  border-radius: var(--radius-sm);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .3s, background .3s;
}
.file-upload:hover {
  border-color: var(--gold);
  background: rgba(200,169,110,0.04);
}
.file-upload input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.file-upload .file-label {
  font-size: 0.85rem;
  color: var(--muted);
}
.file-upload .file-label strong {
  color: var(--gold);
}
.file-upload.has-file {
  border-color: var(--green);
  background: rgba(34,197,94,0.04);
}
.file-upload.has-file .file-label { color: var(--green); }

/* ── Buttons ───────────────────────────────────────────────── */
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 8px;
  padding: 16px;
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-2) 100%);
  color: #0a0a0a;
  font-size: 1rem;
  font-weight: 800;
  font-family: inherit;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: opacity .2s, transform .15s;
}
.btn-primary:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-primary .spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(10,10,10,0.3);
  border-top-color: #0a0a0a;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.btn-primary.loading .btn-label { display: none; }
.btn-primary.loading .spinner { display: block; }

@keyframes spin { to { transform: rotate(360deg); } }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 2px solid rgba(200,169,110,0.3);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--gold);
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all .2s;
}
.btn-secondary:hover { border-color: var(--gold); background: rgba(200,169,110,0.06); }

/* ── Science Chip ──────────────────────────────────────────── */
.science-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(200,169,110,0.06);
  border: 1px solid rgba(200,169,110,0.15);
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 20px;
}

/* ── Error Box ─────────────────────────────────────────────── */
.error-box {
  display: none;
  background: rgba(239,68,68,0.10);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: var(--radius-sm);
  color: #fca5a5;
  font-size: 0.85rem;
  padding: 12px 16px;
  margin-top: 14px;
}
.error-box.visible { display: block; }

/* ── Results Section ───────────────────────────────────────── */
.results-section {
  display: none;
}
.results-section.visible {
  display: block;
  animation: fadeUp .4s ease both;
}

/* ── Result Card ───────────────────────────────────────────── */
.result-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}
.result-card-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}

/* ── Score Gauge (SVG) ─────────────────────────────────────── */
.score-gauge-wrap {
  text-align: center;
  padding: 20px;
}

/* ── KV Grid ───────────────────────────────────────────────── */
.kv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}
.kv-item {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
}
.kv-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.kv-value {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
}
.kv-value.gold { color: var(--gold); }

/* ── Progress Bar ──────────────────────────────────────────── */
.progress-bar-wrap {
  margin-bottom: 12px;
}
.progress-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  margin-bottom: 6px;
}
.progress-bar-label span:first-child { color: #ccc; }
.progress-bar-label span:last-child { font-weight: 700; }
.progress-bar-track {
  height: 8px;
  background: var(--surface-2);
  border-radius: 100px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 100px;
  transition: width .8s cubic-bezier(.22,1,.36,1);
  background: var(--gold);
}

/* ── Risk Badge ────────────────────────────────────────────── */
.risk-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.risk-badge.low    { background: rgba(34,197,94,0.12); color: var(--green); }
.risk-badge.medium { background: rgba(245,158,11,0.12); color: var(--orange); }
.risk-badge.high   { background: rgba(239,68,68,0.12); color: var(--red); }
.risk-badge.critical { background: rgba(168,85,247,0.12); color: var(--purple); }

/* ── Result List ───────────────────────────────────────────── */
.result-list {
  list-style: none;
  padding: 0;
}
.result-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  color: #ccc;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.result-list li:last-child { border-bottom: none; }
.result-list li::before {
  content: attr(data-icon);
  flex-shrink: 0;
}
.result-list.gold li::before {
  content: "\25C6";
  color: var(--gold);
  font-size: 0.7rem;
  margin-top: 5px;
}

/* ── Highlight Box ─────────────────────────────────────────── */
.highlight-box {
  background: linear-gradient(135deg, rgba(200,169,110,0.06) 0%, rgba(200,169,110,0.02) 100%);
  border: 1px solid rgba(200,169,110,0.2);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 20px;
}
.highlight-box-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}

/* ── Traffic Light ─────────────────────────────────────────── */
.traffic-light {
  display: flex;
  gap: 14px;
  justify-content: center;
  align-items: center;
  margin: 20px 0;
}
.traffic-dot {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.1);
  opacity: 0.2;
  transition: all .4s;
}
.traffic-dot.green  { background: var(--green); }
.traffic-dot.yellow { background: var(--orange); }
.traffic-dot.red    { background: var(--red); }
.traffic-dot.active {
  opacity: 1;
  box-shadow: 0 0 20px currentColor;
  border-color: transparent;
}

/* ── Result Table ──────────────────────────────────────────── */
.result-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.result-table th {
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--muted);
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
.result-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: #ccc;
}
.result-table tr:last-child td { border-bottom: none; }
.result-table tr:hover td { background: rgba(255,255,255,0.02); }

/* ── Warning / Disclaimer ──────────────────────────────────── */
.disclaimer {
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
  margin-top: 24px;
  font-style: italic;
}

.warning-box {
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.25);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 20px;
  font-size: 0.85rem;
  color: #fbbf24;
}

/* ── Fade Animation ────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-in { animation: fadeUp .4s ease both; }
.animate-in:nth-child(2) { animation-delay: .06s; }
.animate-in:nth-child(3) { animation-delay: .12s; }
.animate-in:nth-child(4) { animation-delay: .18s; }
.animate-in:nth-child(5) { animation-delay: .24s; }

/* ── Volume Bar (Tool 8) ──────────────────────────────────── */
.vol-bar-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 18px;
}
.vol-bar-range {
  flex: 1;
  height: 8px;
  background: var(--surface-2);
  border-radius: 4px;
  position: relative;
  overflow: visible;
}
.vol-bar-segment {
  position: absolute;
  top: 0;
  height: 100%;
  border-radius: 4px;
  opacity: 0.3;
}
.vol-bar-dot {
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--bg);
  transform: translate(-50%, -50%);
  z-index: 2;
}

/* ── Longevity Mantra (Tool 12) ────────────────────────────── */
.longevity-mantra {
  text-align: center;
  font-size: 1.3rem;
  font-weight: 600;
  font-style: italic;
  color: var(--gold);
  padding: 28px 20px;
  margin-top: 20px;
  border-top: 1px solid var(--border);
}

/* ── Energy Donut (Tool 11) ────────────────────────────────── */
.energy-chart-wrap {
  display: flex;
  justify-content: center;
  padding: 20px;
}
.energy-chart-wrap canvas {
  max-width: 280px;
  max-height: 280px;
}

/* ── Share Bar ─────────────────────────────────────────────── */
.share-bar-result {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  margin-top: 20px;
}

/* ── Footer ────────────────────────────────────────────────── */
.tool-footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.75rem;
  margin-top: 40px;
  opacity: 0.6;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .kv-grid { grid-template-columns: 1fr; }
  .tool-header { padding: 40px 16px 28px; }
  .tool-header h1 { font-size: 1.5rem; }
  .form-card { padding: 24px 18px; }
  .result-card { padding: 18px 16px; }
  .traffic-dot { width: 36px; height: 36px; }
  .result-table { font-size: 0.78rem; }
  .result-table th, .result-table td { padding: 8px 8px; }
}

/* Score Cards */
.score-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px; margin: 20px 0;
}
.score-card-item {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px; text-align: center;
}
.sc-score { font-size: 2rem; font-weight: 800; line-height: 1; }
.sc-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 4px 0 8px; }
.sc-bar-track { height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; margin-bottom: 6px; }
.sc-bar-fill { height: 100%; border-radius: 2px; transition: width .8s ease; }
.sc-note { font-size: 11px; color: var(--muted); line-height: 1.4; }

/* Action Block */
.action-block {
  background: linear-gradient(135deg, rgba(200,169,110,0.08), rgba(200,169,110,0.02));
  border: 1px solid rgba(200,169,110,0.2);
  border-radius: var(--radius); padding: 20px 24px; margin: 20px 0;
}
.action-block-title { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
.action-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.action-item { display: flex; align-items: flex-start; gap: 12px; }
.action-num { width: 24px; height: 24px; border-radius: 50%; background: var(--gold); color: #000; font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.action-text { font-size: 14px; color: var(--text); line-height: 1.6; }

/* Top Disclaimer */
.result-disclaimer-top { display: flex; align-items: flex-start; gap: 10px; background: rgba(245,158,11,0.06); border: 1px solid rgba(245,158,11,0.2); border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 20px; font-size: 0.82rem; color: #ccc; line-height: 1.6; }
.disclaimer-icon { font-size: 14px; flex-shrink: 0; margin-top: 1px; color: var(--orange); }

/* Methodology Card (always visible) */
.methodology-card { background: var(--surface); border: 1px solid var(--border); border-top: 2px solid rgba(200,169,110,0.3); border-radius: var(--radius); padding: 20px 24px; margin: 20px 0; }
.methodology-card-header { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.methodology-icon { font-size: 16px; }
.methodology-title { font-size: 0.72rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--gold); }
.methodology-grid { display: flex; flex-direction: column; gap: 10px; }
.methodology-row { display: grid; grid-template-columns: 130px 1fr; gap: 12px; align-items: baseline; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.methodology-row:last-child { border-bottom: none; padding-bottom: 0; }
.methodology-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); flex-shrink: 0; }
.methodology-value { font-size: 0.88rem; font-weight: 600; color: var(--text); line-height: 1.5; }
.methodology-value.muted { font-weight: 400; color: #bbb; }
.methodology-value.citation { font-weight: 400; color: var(--gold); font-style: italic; font-size: 0.82rem; }
@media (max-width: 640px) { .methodology-row { grid-template-columns: 1fr; gap: 4px; } }

/* Journey System Cards */
.journey-section { padding: 60px 0 40px; }
.journey-header { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.journey-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.journey-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 14px; transition: border-color .2s, transform .2s; }
.journey-card:hover { border-color: var(--gold); transform: translateY(-3px); }
.journey-num { font-size: 48px; font-weight: 900; color: var(--gold); opacity: .2; line-height: 1; }
.journey-icon { font-size: 36px; }
.journey-tag { font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.journey-card h3 { font-size: 1.2rem; font-weight: 800; }
.journey-card > p { font-size: 13px; color: var(--muted); line-height: 1.7; }
.journey-steps { display: flex; flex-direction: column; gap: 8px; margin: 4px 0; }
.journey-step { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.step-num { width: 22px; height: 22px; border-radius: 50%; background: var(--gold); color: #000; font-weight: 800; font-size: 11px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.step-label { flex: 1; color: var(--text); }
.step-tag { font-size: 10px; color: var(--muted); background: var(--surface-2); padding: 2px 8px; border-radius: 10px; white-space: nowrap; }
.journey-cta { margin-top: 8px; font-size: 14px; padding: 12px; text-decoration: none; text-align: center; border-radius: var(--radius-sm); }
.journey-outcome { font-size: 11px; color: var(--muted); text-align: center; font-style: italic; }

/* Weekly Check-in */
.checkin-alert { border-color: var(--red) !important; }
.pill-selector { display: flex; gap: 8px; flex-wrap: wrap; }
.pill-option { padding: 8px 16px; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); color: var(--muted); cursor: pointer; font-size: 13px; transition: all .2s; }
.pill-option.active { background: var(--gold); color: #000; border-color: var(--gold); font-weight: 700; }
.win-card { border-left: 3px solid var(--green); }
.focus-card { border-left: 3px solid var(--gold); }

/* Women's Cycle Phases */
.phase-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 32px 0; }
.phase-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; text-align: center; }
.phase-card h3 { font-size: 14px; font-weight: 700; margin: 8px 0 4px; }
.phase-card .phase-days { font-size: 11px; color: var(--muted); }
.phase-card .phase-energy { font-size: 12px; margin: 8px 0; }
.phase-card .phase-training { font-size: 12px; color: var(--muted); line-height: 1.5; }
.phase-tabs { display: flex; gap: 0; margin: 24px 0 0; }
.phase-tab { flex: 1; padding: 12px; text-align: center; background: var(--surface); border: 1px solid var(--border); cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); transition: all .2s; }
.phase-tab:first-child { border-radius: var(--radius-sm) 0 0 0; }
.phase-tab:last-child { border-radius: 0 var(--radius-sm) 0 0; }
.phase-tab.active { background: var(--gold); color: #000; border-color: var(--gold); }
.phase-panel { display: none; background: var(--surface); border: 1px solid var(--border); border-top: none; border-radius: 0 0 var(--radius-sm) var(--radius-sm); padding: 24px; }
.phase-panel.active { display: block; }
.today-card { background: linear-gradient(135deg, rgba(200,169,110,0.08), rgba(200,169,110,0.02)); border: 2px solid var(--gold); border-radius: var(--radius); padding: 24px; margin-bottom: 24px; }

/* Journey Progress Tracker */
.journey-progress { display: flex; align-items: center; gap: 0; margin: 24px 0 32px; }
.jp-step { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; }
.jp-dot { width: 32px; height: 32px; border-radius: 50%; background: var(--surface); border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--muted); z-index: 1; transition: all .3s; }
.jp-step.completed .jp-dot { background: var(--gold); border-color: var(--gold); color: #000; }
.jp-step.active .jp-dot { border-color: var(--gold); color: var(--gold); box-shadow: 0 0 12px rgba(200,169,110,0.3); }
.jp-label { font-size: 10px; color: var(--muted); text-align: center; max-width: 80px; }
.jp-line { flex: 1; height: 2px; background: var(--border); }
.jp-line.completed { background: var(--gold); }

/* Disclaimer upgrade */
.result-disclaimer { font-size: 11px; color: var(--muted); text-align: center; margin-top: 20px; font-style: italic; }

@media (max-width: 900px) {
  .journey-grid { grid-template-columns: 1fr; }
  .phase-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .phase-grid { grid-template-columns: 1fr; }
  .phase-tabs { flex-wrap: wrap; }
  .jp-label { font-size: 9px; }
}

/* ── Small mobile fixes (touch targets, overflow, stacking) ── */
@media (max-width: 480px) {
  .form-card input, .form-card select, .form-card textarea {
    min-height: 44px;
    font-size: 16px; /* prevents iOS zoom on focus */
  }
  .result-card { word-wrap: break-word; overflow-wrap: break-word; }
  .tool-header h1 { font-size: 1.4rem; }
  .tool-header h1 span { display: block; }
  .prescribed-chips { flex-wrap: wrap; }
  .set-row { gap: 4px; }
  .set-input { min-width: 0; font-size: 14px; }
  .trust-bar { flex-direction: column; align-items: center; gap: 10px; }
  .trust-item { font-size: 12px; }
}
