/* Phase 67 — First Dollar journey */
.fd-page {
  --fd-bg: #f6f8fb;
  --fd-surface: #fff;
  --fd-ink: #0f172a;
  --fd-muted: #64748b;
  --fd-border: #e2e8f0;
  --fd-accent: #2563eb;
  --fd-accent-ink: #fff;
  --fd-ok: #0f766e;
  --fd-radius: 14px;
  --fd-shadow: 0 1px 2px rgba(15,23,42,.05), 0 10px 24px rgba(15,23,42,.05);
  min-height: 100%;
  background: var(--fd-bg);
  color: var(--fd-ink);
  padding: 1.5rem 1.25rem 3rem;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

@media (prefers-color-scheme: dark) {
  html:not([data-fo-theme]) .fd-page {
    --fd-bg: #0b1220; --fd-surface: #111827; --fd-ink: #e5e7eb;
    --fd-muted: #94a3b8; --fd-border: #1f2937; --fd-accent: #3b82f6; --fd-accent-ink: #fff;
  }
}
html[data-fo-theme="dark"] .fd-page,
[data-bs-theme="dark"] .fd-page,
html.dark .fd-page,
body.dark-mode .fd-page {
  --fd-bg: #0b1220; --fd-surface: #111827; --fd-ink: #e5e7eb;
  --fd-muted: #94a3b8; --fd-border: #1f2937; --fd-accent: #3b82f6;
}

.fd-loading { min-height: 40vh; display: grid; place-content: center; gap: .75rem; color: var(--fd-muted); text-align: center; }
.fd-shell, .fd-header, .fd-roadmap, .fd-ops, .fd-help, .fd-celebrate-import, .fd-hero-celebration, .fd-card, .fd-micro {
  max-width: 840px; margin: 0 auto 1.25rem;
}
.fd-header { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: flex-start; }
.fd-title { font-size: clamp(1.65rem, 3vw, 2.2rem); letter-spacing: -.03em; font-weight: 700; margin: .2rem 0 .5rem; line-height: 1.15; }
.fd-lede, .fd-muted { color: var(--fd-muted); }
.fd-eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; font-weight: 600; color: var(--fd-muted); margin: 0; }
.fd-score-ring {
  width: 92px; height: 92px; border-radius: 50%; border: 4px solid var(--fd-accent);
  display: grid; place-content: center; text-align: center; background: var(--fd-surface);
  box-shadow: var(--fd-shadow);
}
.fd-score-num { font-weight: 700; font-size: 1.25rem; color: var(--fd-accent); }
.fd-score-lbl { font-size: .65rem; color: var(--fd-muted); }

.fd-roadmap, .fd-ops, .fd-help, .fd-celebrate-import, .fd-hero-celebration, .fd-card {
  background: var(--fd-surface); border: 1px solid var(--fd-border); border-radius: var(--fd-radius);
  box-shadow: var(--fd-shadow); padding: 1.35rem 1.4rem;
}
.fd-steps { list-style: none; margin: 0; padding: 0; }
.fd-steps li {
  display: grid; grid-template-columns: 36px 1fr; gap: .75rem; padding: .85rem 0;
  border-bottom: 1px solid var(--fd-border);
}
.fd-steps li:last-child { border-bottom: 0; }
.fd-step-marker {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-content: center;
  background: var(--fd-border); font-size: .85rem; font-weight: 700;
}
.fd-steps li.is-done .fd-step-marker { background: var(--fd-ok); color: #fff; }
.fd-steps li.is-current .fd-step-marker { background: var(--fd-accent); color: var(--fd-accent-ink); }
.fd-reward { margin: 1rem 0 0; color: var(--fd-muted); }

.fd-ops-head { display: flex; justify-content: space-between; align-items: baseline; }
.fd-ops-pct { font-size: 1.5rem; font-weight: 700; color: var(--fd-accent); }
.fd-health { margin: .35rem 0 1rem; }
.fd-ops-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .65rem;
}
.fd-ops-grid div {
  border: 1px solid var(--fd-border); border-radius: 10px; padding: .55rem .65rem;
  display: flex; flex-direction: column; gap: .15rem;
}
.fd-ops-grid span { font-size: .75rem; color: var(--fd-muted); }
.fd-ops-grid strong { font-size: 1.1rem; }
.fd-h3 { font-size: 1rem; margin: 1rem 0 .4rem; }
.fd-remaining { margin: 0; padding-left: 1.1rem; color: var(--fd-muted); }

.fd-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .3rem;
  border-radius: 999px; border: 1px solid transparent; padding: .55rem 1.1rem;
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; background: transparent; color: inherit;
}
.fd-btn--primary { background: var(--fd-accent); color: var(--fd-accent-ink); }
.fd-btn--ghost { border-color: var(--fd-border); }
.fd-btn--sm { padding: .4rem .85rem; font-size: .9rem; }
.fd-actions { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1rem; }
.fd-actions--footer { max-width: 840px; margin: 1.5rem auto 0; }

.fd-input {
  width: 100%; border: 1px solid var(--fd-border); border-radius: 10px; padding: .6rem .75rem;
  background: var(--fd-surface); color: var(--fd-ink); font: inherit; margin-top: .5rem;
}
.fd-help-hits, .fd-import-stats { list-style: none; padding: 0; margin: .65rem 0 0; }
.fd-import-stats li { padding: .35rem 0; border-bottom: 1px solid var(--fd-border); }
.fd-micro {
  display: flex; align-items: center; gap: .55rem; flex-wrap: wrap;
  background: color-mix(in srgb, var(--fd-ok) 12%, var(--fd-surface));
  border: 1px solid color-mix(in srgb, var(--fd-ok) 30%, var(--fd-border));
  border-radius: var(--fd-radius); padding: .7rem 1rem;
  animation: fd-fade .35s ease;
}
.fd-check {
  width: 22px; height: 22px; border-radius: 50%; background: var(--fd-ok); color: #fff;
  display: grid; place-content: center; font-size: .75rem; font-weight: 700;
}
.fd-link { background: none; border: 0; color: var(--fd-accent); text-decoration: underline; cursor: pointer; font: inherit; }
.fd-hero-celebration { text-align: center; border-color: color-mix(in srgb, var(--fd-accent) 35%, var(--fd-border)); }
.fd-hero-celebration h2 { color: var(--fd-accent); margin-top: 0; }

@keyframes fd-fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.fd-guided {
  max-width: 840px; margin: 0 auto 1rem; padding: 1rem 1.15rem;
  background: var(--fd-surface); border: 1px solid var(--fd-border); border-radius: var(--fd-radius);
  box-shadow: var(--fd-shadow); display: flex; flex-wrap: wrap; gap: .85rem; justify-content: space-between; align-items: center;
}
.fd-guided h3 { margin: 0 0 .25rem; font-size: 1.05rem; }
.fd-ops-badge {
  display: inline-flex; align-items: center; gap: .35rem; font-size: .85rem; font-weight: 600;
  padding: .25rem .65rem; border-radius: 999px; background: color-mix(in srgb, var(--fd-accent) 12%, transparent);
  color: var(--fd-accent);
}
@media (max-width: 640px) {
  .fd-page { padding: 1rem; }
}
