/* FindMyPlan — mobile-first, scoped to .fmp, built on the site design tokens (page-style/design-tokens.css, DESIGN.md). */
.fmp {
  --f-primary: var(--mp-primary, #0b5394); --f-primary-strong: var(--mp-primary-strong, #002e59); --f-primary-soft: var(--mp-primary-soft, #e0f2fe);
  --f-accent: var(--mp-accent, #2e7d44); --f-accent-soft: var(--mp-accent-soft, #e8f3ec); --f-ink: var(--mp-ink, #111111); --f-ink2: var(--mp-ink-2, #475569);
  --f-ink3: var(--mp-ink-3, #64748b); --f-line: var(--mp-line, #dce5ec); --f-line-strong: #cbd5e1; --f-surface: var(--mp-surface, #ffffff);
  --f-base: var(--mp-base, #f9f9f9); --f-success: var(--mp-success, #15803d); --f-warning: var(--mp-warning, #b45309); --f-error: var(--mp-error, #b91c1c);
  --f-r-sm: 6px; --f-r-md: 12px; --f-shadow: 0 1px 3px rgba(15, 23, 42, .08);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 16px; line-height: 1.6; color: var(--f-ink);
  max-width: 920px; margin: 0 auto; padding: 0 0 32px;
}
.fmp *, .fmp *::before, .fmp *::after { box-sizing: border-box; }
.fmp [hidden], .fmp-dialog [hidden] { display: none !important; }
.fmp p { margin: 0; }
.fmp-stack { display: flex; flex-direction: column; gap: 16px; }
.fmp-row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.fmp-grid2, .fmp-grid3 { display: grid; grid-template-columns: 1fr; gap: 12px 16px; }
.fmp-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Type */
.fmp-h, .fmp-h2 { font-family: Cardo, Georgia, serif; font-weight: 400; font-size: 28px; line-height: 1.2; margin: 0; color: var(--f-ink); }
.fmp-h3 { font-family: Cardo, Georgia, serif; font-weight: 400; font-size: 22px; line-height: 1.25; margin: 0; }
.fmp-h4 { font-size: 18px; font-weight: 600; line-height: 1.3; margin: 0; }
.fmp-h5 { font-size: 15px; font-weight: 600; margin: 8px 0 0; }
.fmp-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--f-primary); }
.fmp-lead { font-size: 18px; color: var(--f-ink2); }
.fmp-lead-sm { color: var(--f-ink2); }
.fmp-help, .fmp-meta { font-size: 14px; color: var(--f-ink2); }
.fmp-source { font-size: 12px; color: var(--f-ink2); font-style: italic; }
.fmp-strong { font-weight: 600; }
.fmp-mono { font-family: ui-monospace, Menlo, monospace; font-size: 12px; word-break: break-all; }
.fmp [tabindex="-1"]:focus { outline: none; }

/* Landing + disclaimer */
.fmp-landing { padding: 8px 0 20px; display: flex; flex-direction: column; gap: 10px; }
.fmp-points { margin: 4px 0 0; padding-left: 20px; color: var(--f-ink2); }
.fmp-points li { margin: 4px 0; }
.fmp-disclaimer { margin-top: 24px !important; font-size: 12px; color: var(--f-ink2); }

/* Cards */
.fmp-card { background: var(--f-surface); border: 1px solid var(--f-line); border-radius: var(--f-r-md); padding: 20px 16px; box-shadow: var(--f-shadow); }
.fmp-card--flat { box-shadow: none; background: transparent; border-style: dashed; }
.fmp-card--accent { border-left: 4px solid var(--f-accent); }
.fmp-center { text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.fmp-next { border: 2px solid var(--f-primary); display: flex; flex-direction: column; gap: 10px; }
.fmp-callout { background: var(--f-primary-soft); border-radius: var(--f-r-sm); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.fmp-hr { border: 0; border-top: 1px solid var(--f-line); margin: 8px 0; }

/* Buttons (DESIGN.md §6) */
.fmp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 10px 20px; border-radius: var(--f-r-sm);
  font: 600 15px/1.2 Inter, system-ui, sans-serif; text-decoration: none !important; cursor: pointer; border: 1.5px solid transparent; text-align: center;
  transition: background-color .15s, border-color .15s, box-shadow .15s; }
.fmp-btn:focus-visible, .fmp a:focus-visible, .fmp-input:focus-visible, .fmp summary:focus-visible, .fmp-tab:focus-visible { outline: 2px solid var(--f-primary); outline-offset: 2px; }
.fmp-btn--primary { background: var(--f-primary); color: #fff !important; }
.fmp-btn--primary:hover { background: var(--f-primary-strong); }
.fmp-btn--secondary { background: #fff; color: var(--f-primary) !important; border-color: var(--f-primary); }
.fmp-btn--secondary:hover { background: var(--f-primary-soft); }
.fmp-btn--accent { background: var(--f-accent); color: #fff !important; }
.fmp-btn--accent:hover { background: #256638; }
.fmp-btn--link { background: transparent; color: var(--f-primary) !important; padding-left: 8px; padding-right: 8px; }
.fmp-btn--link:hover { text-decoration: underline !important; }
.fmp-btn--danger { background: #fff; color: var(--f-error) !important; border-color: var(--f-error); }
.fmp-btn--danger:hover { background: #fef2f2; }
.fmp-btn--lg { min-height: 52px; font-size: 16px; }
.fmp-btn:disabled { opacity: .55; cursor: not-allowed; }
.fmp-link { color: var(--f-primary); text-decoration: underline; }

/* Inputs */
.fmp-label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.fmp-field { display: flex; flex-direction: column; }
.fmp-input { width: 100%; min-height: 44px; padding: 10px 14px; font: 16px/1.4 Inter, system-ui, sans-serif; color: var(--f-ink); background: var(--f-surface);
  border: 1px solid var(--f-line-strong); border-radius: var(--f-r-sm); }
.fmp-input:focus { border-color: var(--f-primary); box-shadow: 0 0 0 3px var(--f-primary-soft); outline: none; }
.fmp-input[aria-invalid="true"] { border-color: var(--f-error); }
.fmp-input--lg { min-height: 52px; font-size: 17px; }
.fmp-input--sm { width: auto; min-width: 160px; }
.fmp-textarea { min-height: 220px; font-size: 15px; line-height: 1.5; }
.fmp-field-error { color: var(--f-error); font-size: 14px; margin-top: 4px !important; }
.fmp-inputgroup { display: flex; flex-direction: column; gap: 8px; }
.fmp-radios { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.fmp-radio { display: flex; gap: 10px; align-items: flex-start; min-height: 44px; padding: 10px 12px; border: 1px solid var(--f-line); border-radius: var(--f-r-sm); cursor: pointer; }
.fmp-radio input { margin-top: 4px; width: 18px; height: 18px; flex: none; }
.fmp-radio:has(input:checked) { border-color: var(--f-primary); background: var(--f-primary-soft); }
.fmp-more > summary { cursor: pointer; color: var(--f-primary); font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.fmp-more[open] > summary { margin-bottom: 8px; }
.fmp-search { display: flex; flex-direction: column; gap: 10px; }
.fmp-alt { font-size: 15px; }

/* Chips + alerts */
.fmp-chip { display: inline-block; font-size: 12px; font-weight: 500; line-height: 1.4; padding: 2px 10px; border-radius: 999px; margin: 2px 6px 2px 0;
  border: 1px solid var(--f-line-strong); color: var(--f-ink2); background: #fff; white-space: nowrap; }
.fmp-chip--ok { border-color: #86efac; background: #f0fdf4; color: var(--f-success); }
.fmp-chip--warn { border-color: #fcd34d; background: #fffbeb; color: var(--f-warning); }
.fmp-chip--bad { border-color: #fca5a5; background: #fef2f2; color: var(--f-error); }
.fmp-chip--muted { background: var(--f-base); }
.fmp-alert { border-radius: var(--f-r-sm); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; border: 1px solid; }
.fmp-alert--error { background: #fef2f2; border-color: #fca5a5; color: #7f1d1d; }
.fmp-alert--info { background: var(--f-primary-soft); border-color: #bae6fd; color: #0c4a6e; }
.fmp-alert--warn { background: #fffbeb; border-color: #fcd34d; color: #78350f; }
.fmp-alert--success { background: #f0fdf4; border-color: #86efac; color: #14532d; }
.fmp-toast { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 100000; background: var(--f-ink, #111); color: #fff; padding: 12px 16px;
  border-radius: 8px; font: 15px/1.4 Inter, system-ui, sans-serif; box-shadow: 0 8px 24px rgba(15, 23, 42, .25); text-align: center; }

/* Loading */
.fmp-loading { display: flex; align-items: center; gap: 10px; color: var(--f-ink2); }
.fmp-spinner { width: 18px; height: 18px; border: 2px solid var(--f-line-strong); border-top-color: var(--f-primary); border-radius: 50%; animation: fmp-spin .8s linear infinite; }
@keyframes fmp-spin { to { transform: rotate(360deg); } }
.fmp-skeleton div { height: 56px; border-radius: var(--f-r-md); background: linear-gradient(90deg, #eef2f6, #f8fafc, #eef2f6); background-size: 200% 100%; animation: fmp-sk 1.2s infinite; margin-bottom: 12px; }
@keyframes fmp-sk { to { background-position: -200% 0; } }

/* Results */
.fmp-moved { margin-top: 6px; padding: 10px 12px; border-left: 3px solid var(--f-accent); background: var(--f-accent-soft); border-radius: 0 var(--f-r-sm) var(--f-r-sm) 0; }
.fmp-moved-list { margin: 4px 0; padding-left: 18px; font-size: 15px; overflow-wrap: anywhere; }
.fmp-emp { display: flex; flex-direction: column; gap: 8px; }
.fmp-emp-head { display: flex; flex-direction: column; gap: 2px; }
.fmp-plans { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.fmp-plan { display: flex; flex-direction: column; gap: 10px; padding: 14px 0; border-top: 1px solid var(--f-line); }
.fmp-plan:first-child { border-top: 0; }
.fmp-plan-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fmp-plan-name { font-weight: 600; overflow-wrap: anywhere; }
.fmp-plan-cta .fmp-btn { width: 100%; }
.fmp-cov { font-size: 14px; color: var(--f-ink2); }
.fmp-cov summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.fmp-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.fmp-upsell { border-left: 4px solid var(--f-accent); display: flex; flex-direction: column; gap: 12px; }

/* Case list */
.fmp-caselist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.fmp-caserow { display: flex; flex-direction: column; gap: 4px; padding: 16px; border: 1px solid var(--f-line); border-radius: var(--f-r-md); background: var(--f-surface);
  text-decoration: none !important; color: var(--f-ink) !important; box-shadow: var(--f-shadow); min-height: 44px; }
.fmp-caserow:hover { border-color: var(--f-primary); }
.fmp-caserow-title { font-weight: 600; color: var(--f-primary); }
.fmp-caserow-next { font-size: 14px; font-weight: 500; }

/* Case page */
.fmp-crumbs { font-size: 15px; }
.fmp-case-head { display: flex; flex-direction: column; gap: 10px; }
.fmp-status2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fmp-status { background: var(--f-surface); border: 1px solid var(--f-line); border-radius: var(--f-r-md); padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.fmp-status-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--f-ink2); }
.fmp-status-value { font-weight: 600; font-size: 16px; line-height: 1.3; }
.fmp-tabs { display: flex; gap: 4px; overflow-x: auto; -webkit-overflow-scrolling: touch; border-bottom: 1px solid var(--f-line); scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.fmp-tabs::-webkit-scrollbar { display: none; }
.fmp-tab { flex: none; padding: 12px 12px 10px; min-height: 44px; font-weight: 600; font-size: 15px; color: var(--f-ink2) !important; text-decoration: none !important;
  border-bottom: 3px solid transparent; white-space: nowrap; }
.fmp-tab[aria-current="page"] { color: var(--f-primary) !important; border-bottom-color: var(--f-primary); }
.fmp-facts { margin: 8px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; }
.fmp-facts li span { display: block; }
.fmp-secondary { border-top: 1px solid var(--f-line); padding-top: 10px; margin-top: 6px; display: flex; flex-direction: column; gap: 6px; }
.fmp-contact { display: flex; flex-direction: column; gap: 8px; }
.fmp-contact--dim { opacity: .7; }
.fmp-kv { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 15px; overflow-wrap: anywhere; }
.fmp-timeline { list-style: none; margin: 8px 0 0; padding: 0 0 0 14px; border-left: 2px solid var(--f-line); display: flex; flex-direction: column; gap: 12px; }
.fmp-timeline li { position: relative; }
.fmp-timeline li::before { content: ""; position: absolute; left: -20px; top: 8px; width: 10px; height: 10px; border-radius: 50%; background: var(--f-primary); }
.fmp-evidence, .fmp-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.fmp-evidence li { border-top: 1px solid var(--f-line); padding-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.fmp-scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.fmp-table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 14px; }
.fmp-table th, .fmp-table td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--f-line); vertical-align: top; }
.fmp-supp { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--f-line); padding-top: 10px; }
.fmp-footer { display: flex; flex-direction: column; gap: 10px; }

/* Dialog: full-screen sheet on phones */
.fmp-dialog { border: 0; padding: 0; width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; border-radius: 0; color: var(--f-ink, #111);
  font: 16px/1.55 Inter, system-ui, sans-serif; background: #fff; }
.fmp-dialog::backdrop { background: rgba(15, 23, 42, .5); }
.fmp-dialog-head { position: sticky; top: 0; background: #fff; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px;
  border-bottom: 1px solid #dce5ec; z-index: 1; }
.fmp-dialog-x { min-width: 44px; min-height: 44px; font-size: 26px; line-height: 1; background: none; border: 0; cursor: pointer; color: #475569; }
.fmp-dialog-body { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.fmp-dialog .fmp-btn, .fmp-dialog .fmp-input, .fmp-dialog .fmp-label, .fmp-dialog .fmp-help, .fmp-dialog .fmp-radio { font-family: Inter, system-ui, sans-serif; }
.fmp-dialog .fmp-field { display: flex; flex-direction: column; }
.fmp-plan-cta-wrap, .fmp-plan-cta { margin: 0; }

/* Phones: full-width actions */
@media (max-width: 599px) {
  .fmp-row > .fmp-btn { flex: 1 1 100%; }
  .fmp-row > .fmp-btn--link { flex: 0 1 auto; }
  .fmp-h, .fmp-h2 { font-size: 26px; }
}
/* Tablet / desktop */
@media (min-width: 600px) {
  .fmp-card { padding: 24px; }
  .fmp-inputgroup { flex-direction: row; }
  .fmp-inputgroup .fmp-input { flex: 1; }
  .fmp-grid2 { grid-template-columns: 1fr 1fr; }
  .fmp-grid3 { grid-template-columns: 2fr 1fr 1fr; }
  .fmp-plan { flex-direction: row; align-items: center; justify-content: space-between; }
  .fmp-plan-cta .fmp-btn { width: auto; }
  .fmp-emp-head { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
  .fmp-supp { flex-direction: row; justify-content: space-between; align-items: center; }
  .fmp-tabs { margin: 0; padding: 0; }
  .fmp-h, .fmp-h2 { font-size: 36px; }
  .fmp-h3 { font-size: 26px; }
  .fmp-dialog { width: min(680px, calc(100% - 32px)); height: auto; max-height: calc(100% - 48px); margin: auto; border-radius: 12px; }
  .fmp-toast { left: auto; right: 24px; max-width: 420px; }
}
@media (prefers-reduced-motion: reduce) {
  .fmp *, .fmp-dialog * { animation: none !important; transition: none !important; }
}
@media print {
  .fmp-tabs, .fmp-footer, .fmp-next .fmp-row, .fmp-crumbs { display: none !important; }
}
/* "Follow this plan" links, successor trail, plan page */
.fmp-follow { display: inline-block; font-weight: 600; white-space: nowrap; color: var(--f-primary); text-decoration: underline; text-underline-offset: 2px; }
.fmp-plan-name a { color: inherit; text-decoration: underline; text-decoration-color: var(--f-line); text-underline-offset: 3px; }
.fmp-plan-cta .fmp-follow { margin-top: 4px; padding: 10px 0; }
.fmp-linklist { margin: 4px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; overflow-wrap: anywhere; }
.fmp-successor { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--f-line); }
.fmp-successor .fmp-timeline li::before { background: var(--f-accent); }
.fmp-timeline li li::before { content: none; }

/* "What this means for you" */
.fmp-answer-item + .fmp-answer-item { border-top: 1px solid var(--f-line); padding-top: 14px; }
.fmp-h5 { font-size: 1rem; font-weight: 700; margin: 0; overflow-wrap: anywhere; }
.fmp-path { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; overflow-wrap: anywhere; }
.fmp-answer .fmp-callout .fmp-row { gap: 8px; }
.fmp-chip { white-space: normal; max-width: 100%; overflow-wrap: anywhere; }
.fmp-follow { overflow-wrap: anywhere; }
