/* ==========================================================================
   /plan/ — the local-first "My plan" dashboard.

   Reuses the v2 tokens and the .plancard/.stage/.meter/.check components from
   site.css (the same markup that drives the home page tracker teaser) so the
   two stay visually identical without duplicating the palette. Everything in
   this file is page-specific layout: the panel grid, the numbers list, the
   timeline, and the export/import controls.
   ========================================================================== */

.plan-main { padding-block: clamp(2rem, 6vw, 3rem) 4rem; }

.plan-head { max-width: 42rem; }
.plan-head h1 { font-size: var(--text-3xl); font-weight: 800; letter-spacing: -.03em; margin: .6rem 0 .75rem; }
.plan-head__lede { color: var(--ink-soft); font-size: var(--text-md); line-height: 1.65; }

/* ── Privacy badge ── */
.plan-privacy {
  display: inline-flex; align-items: center; gap: .6rem;
  background: var(--mint); color: #24402F;
  border-radius: 10px; padding: .7rem 1rem;
  font-size: var(--text-sm); font-weight: 700;
  margin-bottom: 1.5rem;
}
.plan-privacy__icon { font-size: 1.05rem; line-height: 1; }

.plan-disclaimer { margin: 1.5rem 0 2.5rem; }

/* ── Panel grid ── */
.plan-grid {
  display: grid; gap: 1.5rem;
  grid-template-columns: 1fr 1fr;
}
.plan-panel--full { grid-column: 1 / -1; }
@media (max-width: 860px) {
  .plan-grid { grid-template-columns: 1fr; }
}

.plan-panel {
  background: var(--paper); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.6rem;
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
}
.plan-panel__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.2rem; }
.plan-panel__head h2 { font-size: var(--text-lg); font-weight: 800; margin-top: .35rem; }
.plan-panel__note { font-size: var(--text-xs); color: var(--sage); font-weight: 700; white-space: nowrap; }

/* ── Stage tracker (shares .plancard/.stage/.meter with the home page) ── */
.plan-stage {
  width: 100%; background: none; border: 0; border-bottom: 1px solid #F0EDE3;
  cursor: pointer; text-align: left; font: inherit; color: inherit;
  border-radius: var(--radius-xs);
}
.plan-stage:last-child { border-bottom: 0; }
.plan-stage:hover { background: var(--cream); }
.plan-stage:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.plan-meter-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .5rem; }
.plan-meter-row span { font-size: var(--text-xs); color: var(--sage); font-weight: 700; }

/* ── My numbers ── */
.plan-numbers__empty { color: var(--ink-soft); font-size: var(--text-sm); line-height: 1.6; }
.plan-numbers__list { display: grid; gap: .6rem; margin: 0 0 1rem; }
.plan-numbers__row {
  display: flex; justify-content: space-between; gap: 1rem;
  padding-bottom: .55rem; border-bottom: 1px dashed var(--border);
  font-size: var(--text-sm);
}
.plan-numbers__row:last-child { border-bottom: 0; padding-bottom: 0; }
.plan-numbers__row dt { color: var(--sage); font-weight: 600; }
.plan-numbers__row dd { font-weight: 800; text-align: right; }
.plan-numbers__source { font-size: var(--text-xs); color: var(--sage); margin-top: auto; }

/* ── Document checklist ── */
.plan-toggle {
  display: flex; gap: .6rem; align-items: flex-start;
  background: var(--cream); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: .8rem .9rem;
  margin-bottom: 1rem; font-size: var(--text-sm);
}
.plan-toggle input { width: 1.1rem; height: 1.1rem; accent-color: var(--accent); margin-top: .15rem; flex: 0 0 auto; }
.plan-toggle label { color: var(--sage); line-height: 1.5; }
.plan-check { margin-bottom: .75rem; }
.plan-check:last-child { margin-bottom: 0; }
.plan-check label a { font-weight: 700; }

/* ── Key dates + timeline ── */
.plan-dates { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; margin-bottom: 1.25rem; }
@media (max-width: 520px) { .plan-dates { grid-template-columns: 1fr; } }
.plan-date-field label { display: block; font-weight: 700; font-size: var(--text-sm); margin-bottom: .35rem; }
.plan-date-field input {
  width: 100%; font: inherit; font-size: var(--text-sm);
  padding: .65rem .8rem; color: var(--ink); background: var(--paper);
  border: 1.5px solid var(--border-firm); border-radius: var(--radius-sm);
}
.plan-date-field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(46,94,78,.15); }

.plan-timeline { display: grid; gap: .9rem; }
.plan-timeline__empty { color: var(--sage); font-size: var(--text-sm); }
.plan-timeline__item {
  border-left: 3px solid var(--accent); padding: .1rem 0 .1rem 1rem;
}
.plan-timeline__label { display: block; font-size: var(--text-sm); font-weight: 800; }
.plan-timeline__value { display: block; font-size: var(--text-md); font-weight: 800; color: var(--accent); margin: .15rem 0; }
.plan-timeline__note { display: block; font-size: var(--text-xs); color: var(--sage); line-height: 1.5; }

/* ── FAQ placeholder ── */
.plan-faq-body { color: var(--sage); font-size: var(--text-sm); line-height: 1.6; }

/* ── Export / import ── */
.plan-io { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.plan-io__note { font-size: var(--text-xs); color: var(--sage); margin-top: .9rem; }
.plan-io__status { border-radius: var(--radius-sm); padding: .7rem .9rem; font-size: var(--text-sm); font-weight: 600; margin-top: .9rem; }
.plan-io__status:empty { display: none; }
.plan-io__status[data-tone="error"] { background: var(--negative-bg); border: 1px solid var(--negative); color: var(--negative); }
.plan-io__status[data-tone="ok"] { background: var(--mint); border: 1px solid var(--accent); color: var(--accent); }
