/* ============================================================================
   Roadmap page — /roadmap
   Builds on styles.css (tokens, header, footer). Status is coded three ways so
   it never rests on color alone: a colored chip, a distinct glyph (dot /
   half-circle / check), and a 3-stage lifecycle track. Planned = indigo,
   In progress = violet, Delivered = pink — all from the app token palette.
   ========================================================================== */

.rm {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(24px, 5vw, 44px) 24px 20px;
}

/* --- Intro ---------------------------------------------------------------- */
.rm-intro { margin-bottom: clamp(28px, 6vw, 44px); }
.rm-intro .eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
}
.rm-intro h1 {
  font-size: clamp(2rem, 6vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-top: 6px;
  text-wrap: balance;
}
.rm-intro__sub {
  margin-top: 12px;
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 52ch;
  text-wrap: pretty;
}
.rm-intro__sub a { color: var(--primary-dark); text-underline-offset: 2px; }
@media (prefers-color-scheme: dark) { .rm-intro__sub a { color: var(--primary); } }
.rm .updated { color: var(--text-tertiary); font-size: 0.9rem; margin-top: 10px; }

/* --- Status accents ------------------------------------------------------- */
/* One place to map status -> color; chips, section glyphs, tracks, and card
   accents all read from these. */
.rm-chip--planned,
.rm-section--planned { --rm-accent: var(--secondary); }
.rm-chip--in-progress,
.rm-section--in-progress { --rm-accent: var(--primary); }
.rm-chip--delivered,
.rm-section--delivered { --rm-accent: var(--accent); }

/* --- Sections ------------------------------------------------------------- */
.rm-section { margin-top: clamp(34px, 6vw, 52px); }
.rm-section__head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.rm-section__glyph {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  background: color-mix(in srgb, var(--rm-accent) 15%, transparent);
  color: var(--rm-accent);
}
.rm-section__head h2 {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.rm-section__count {
  margin-left: auto;
  min-width: 26px;
  padding: 2px 9px;
  text-align: center;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 700;
}
.rm-section__blurb {
  margin: 6px 0 16px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}
.rm-empty {
  color: var(--text-tertiary);
  font-size: 0.95rem;
  padding: 4px 2px;
}

/* --- Cards ---------------------------------------------------------------- */
.rm-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  margin-bottom: 14px;
  overflow: hidden;
}
/* Left accent bar carries the status color as a fourth, redundant cue. */
.rm-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--rm-accent);
}
.rm-card--planned { --rm-accent: var(--secondary); }
.rm-card--in-progress { --rm-accent: var(--primary); }
.rm-card--delivered { --rm-accent: var(--accent); }

.rm-card__summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 20px 18px 22px;
  -webkit-tap-highlight-color: transparent;
}
.rm-card__summary::-webkit-details-marker { display: none; }
.rm-card__summary:focus-visible {
  outline: 2.5px solid var(--primary);
  outline-offset: -3px;
  border-radius: var(--radius);
}

.rm-card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.rm-card__when {
  color: var(--text-tertiary);
  font-size: 0.82rem;
  font-weight: 600;
}
.rm-card__chev {
  margin-left: auto;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--text-tertiary);
  border-bottom: 2px solid var(--text-tertiary);
  transform: rotate(45deg);
  transition: transform 0.22s ease;
}
@media (prefers-reduced-motion: reduce) { .rm-card__chev { transition: none; } }
.rm-card[open] .rm-card__chev { transform: rotate(-135deg); }

.rm-card__title {
  font-size: 1.14rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* Status chip: tinted capsule + glyph, matching the app's TintedCapsule look. */
.rm-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 8px;
  border-radius: var(--radius-chip);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  background: color-mix(in srgb, var(--rm-accent) 15%, transparent);
  color: var(--rm-accent);
}
.rm-chip__glyph { font-size: 0.9em; line-height: 1; }

/* --- Lifecycle track (Planned -> Building -> Shipped) ---------------------
   Lives inside the expanded card body, above the details text. */
.rm-track {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 2px 0 16px;
  padding: 0;
  list-style: none;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-tertiary);
  text-transform: uppercase;
}
.rm-track__step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.rm-track__step:not(:first-child)::before {
  content: "";
  width: clamp(12px, 5vw, 34px);
  height: 2px;
  border-radius: 2px;
  background: var(--border);
}
.rm-track__step.is-done:not(:first-child)::before { background: var(--rm-accent); }
.rm-track__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--surface);
}
.rm-track__step.is-done .rm-track__dot {
  border-color: var(--rm-accent);
  background: var(--rm-accent);
}
.rm-track__step.is-active {
  color: var(--rm-accent);
}
.rm-track__step.is-active .rm-track__dot {
  background: var(--surface);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--rm-accent) 22%, transparent);
}

/* --- Expanded body -------------------------------------------------------- */
.rm-card__body {
  padding: 0 20px 18px 22px;
  color: var(--text-secondary);
}
.rm-card__body > p { margin-bottom: 10px; font-size: 0.96rem; }
.rm-card__body > p:first-child { margin-top: 2px; }

.rm-dates {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.rm-dates dt {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.rm-dates dd {
  margin-top: 2px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}

/* --- Suggest-a-feature form ---------------------------------------------- */
.rm-suggest {
  margin-top: clamp(44px, 8vw, 72px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: clamp(22px, 5vw, 32px);
}
.rm-suggest h2 {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.rm-suggest__sub {
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 0.96rem;
  max-width: 52ch;
}

.rm-form { margin-top: 20px; }
.rm-field { margin-bottom: 16px; }
.rm-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}
.rm-req { color: var(--accent); font-weight: 600; }
.rm-opt { color: var(--text-tertiary); font-weight: 500; }

.rm-field input,
.rm-field textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.rm-field textarea { resize: vertical; min-height: 96px; }
.rm-field input::placeholder,
.rm-field textarea::placeholder { color: var(--text-tertiary); }
.rm-field input:focus,
.rm-field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent);
}

/* Honeypot: kept in the layout flow but invisible and off the tab order. */
.rm-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.rm-form__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 4px;
}
.rm-submit {
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  background: linear-gradient(140deg, var(--primary), var(--primary-dark));
  border: 0;
  border-radius: 999px;
  padding: 13px 28px;
  cursor: pointer;
  box-shadow: var(--shadow-cta);
  transition: transform 0.18s ease, filter 0.18s ease;
}
.rm-submit:hover { transform: translateY(-2px); filter: brightness(1.04); }
.rm-submit:active { transform: translateY(0) scale(0.98); }
.rm-submit:disabled { opacity: 0.6; cursor: default; transform: none; filter: none; }

.rm-form__status {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 0;
}
.rm-form__status.is-ok { color: var(--primary-dark); }
.rm-form__status.is-err { color: var(--accent); }
@media (prefers-color-scheme: dark) { .rm-form__status.is-ok { color: var(--primary); } }

@media (max-width: 420px) {
  .rm-dates { grid-template-columns: 1fr 1fr; }
}
