/* roadmap — the Ideas page (public/ideas.html): the idea form and the Roadmap.
 *
 * Mockup: .tmp/roadmap-hig-mockup.html (approved 2026-10-09).
 * Audit:  docs/design/phase-d-hig-audit.md.
 * Scripts: public/js/ideas.js (form), public/js/roadmap.js (Roadmap).
 *
 * Uses ONLY var(--v2-*) tokens, all defined in /css/canopy-v2.css. No raw
 * colour. The size scale is --v2-font-size-* (the mockup calls it --v2-type-*).
 *
 * This file holds only what is new on this page. The page also loads:
 *   changelog.css        — the shared standalone shell: base resets and
 *                          body.chg-page, .container, the glass top bar, tab
 *                          bar and scroll edge, .page-segment, .section-label,
 *                          .text-btn, .shimmer-line, .screenshot-pick-btn.
 *   glass.css            — the .glass surface, the glass top bar, tab bar and
 *                          the .glass-seg group switch.
 *   standalone-sheet.css — the idea sheet, .type-chip, .field-error,
 *                          .trust-card, .spinner.
 *
 * Two layers, as on the Changelog page:
 *   Glass   — the group switch, which docks under the top bar. Control layer.
 *   Content — the form, project cards, rows, states. Opaque.
 */

/* The group switch is .glass-seg, in glass.css. */

/* ─── 2. Idea form ─── */
.form-card {
  background: var(--v2-bg-card);
  border: 1px solid var(--v2-border-soft);
  border-radius: var(--v2-radius-lg);
  box-shadow: var(--v2-elev-1);
  padding: 18px 16px 16px;
}
.dark .form-card { border-color: var(--v2-edge); }
.form-card h2 { font-family: var(--v2-font-display); font-weight: 600; font-size: var(--v2-font-size-title3); margin: 0 0 14px; color: var(--v2-text-primary); }
.form-card form { margin: 0; }
.field { margin-bottom: 14px; }
.field > label:first-child,
.field > .field-label { display: block; font-size: var(--v2-font-size-footnote); font-weight: 600; color: var(--v2-text-support); margin: 0 0 6px; }
.field textarea {
  display: block;
  width: 100%;
  min-height: 104px;
  resize: none;
  margin: 0;
  padding: 12px 14px;
  border: 1.5px solid var(--v2-edge);
  border-radius: var(--v2-radius-md);
  background: var(--v2-bg-primary);
  color: var(--v2-text-primary);
  font-family: var(--v2-font-body);
  font-size: var(--v2-font-size-body);
  line-height: 1.45;
  outline: none;
  overflow-wrap: anywhere;
}
.field textarea::placeholder { color: var(--v2-text-support); opacity: 1; }
.field textarea:focus-visible { border-color: var(--v2-accent-text); box-shadow: 0 0 0 3px var(--v2-focus-ring); }
.field textarea.is-invalid { border-color: var(--v2-pop-coral); }
.form-card .screenshot-pick-btn { background: var(--v2-bg-primary); }

.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 50px;
  border: none;
  border-radius: var(--v2-radius-full);
  background: var(--v2-accent-terracotta);
  color: var(--v2-text-on-accent);
  font-size: var(--v2-font-size-callout);
  font-weight: 700;
}
.btn-primary[aria-disabled="true"] { background: var(--v2-bg-secondary); color: var(--v2-text-support); cursor: default; }
.btn-primary:active { opacity: 0.8; }
.btn-primary[aria-disabled="true"]:active { opacity: 1; }
.btn-primary:focus-visible { outline: 2px solid var(--v2-accent-text); outline-offset: 2px; }
.form-card .trust-card { margin: 10px 0 0; }
.form-submitter-row {
  margin-top: 10px;
  padding: 10px 14px;
  background: var(--v2-bg-secondary);
  border-radius: var(--v2-radius-md);
  font-size: var(--v2-font-size-footnote);
  color: var(--v2-text-support);
}
.form-submitter-row strong { color: var(--v2-text-primary); font-weight: 600; }

/* ─── 3. Roadmap (rm-*) ─── */
/* The section is at least a screen tall, so the docked switch keeps its place
 * when a short group replaces a long one. */
.rm { margin-top: 36px; min-height: calc(100vh - var(--v2-topbar-height) - var(--v2-tabbar-height)); }
.rm-head { padding: 0 2px; }
.rm-eyebrow { font-size: var(--v2-font-size-caption2); font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--v2-text-support); margin: 0 0 4px; }
.rm-title { font-family: var(--v2-font-display); font-weight: 500; font-size: var(--v2-font-size-title1); line-height: 1.1; letter-spacing: -0.015em; color: var(--v2-text-primary); margin: 0; }
.rm-counts { margin: 8px 0 0; font-size: var(--v2-font-size-subhead); color: var(--v2-text-support); }
.rm-counts b { font-family: var(--v2-font-display); font-weight: 500; font-size: var(--v2-font-size-body); font-variant-numeric: tabular-nums; color: var(--v2-text-primary); }
.rm-counts .sep { margin: 0 8px; }

/* The group switch docks under the top bar and stays there while the list
 * scrolls beneath it. */
.rm-seg-dock { position: sticky; top: calc(var(--v2-safe-top) + var(--v2-topbar-height) + 6px); z-index: 25; margin: 16px 0 14px; }

.rm-sub { margin: 18px 2px 8px; }
.rm-sub:first-child { margin-top: 4px; }
.rm-group-note { margin: 12px 2px 0; font-size: var(--v2-font-size-footnote); text-align: center; color: var(--v2-text-support); }

.rm-epics { display: grid; gap: 8px; }
.rm-epic {
  display: block;
  width: 100%;
  min-height: 72px;
  padding: 14px 16px;
  text-align: left;
  background: var(--v2-bg-card);
  border: 1px solid var(--v2-border-soft);
  border-radius: var(--v2-radius-md);
  box-shadow: var(--v2-elev-1);
  color: inherit;
}
.rm-epic-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-family: var(--v2-font-display);
  font-weight: 500;
  font-size: var(--v2-font-size-body);
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--v2-text-primary);
  overflow-wrap: anywhere;
}
.rm-epic-progress { display: block; margin-top: 4px; font-size: var(--v2-font-size-footnote); color: var(--v2-text-support); }
.rm-epic-progress b { font-family: var(--v2-font-display); font-weight: 500; font-size: var(--v2-font-size-subhead); font-variant-numeric: tabular-nums; color: var(--v2-text-primary); }
.rm-epic-bar { display: block; height: 4px; margin-top: 10px; border-radius: var(--v2-radius-full); background: var(--v2-rail-track); overflow: hidden; }
.rm-epic-bar span { display: block; height: 100%; border-radius: inherit; background: var(--v2-rail-fill); }
.dark .rm-epic-bar { background: var(--v2-edge); }
.dark .rm-list, .dark .rm-epic { border-color: var(--v2-edge); }
.dark .rm-row, .dark .rm-skel-row { border-bottom-color: var(--v2-edge); }

/* Rows open a sheet, they do not push a new screen, so they carry no chevron. */
.rm-list { background: var(--v2-bg-card); border: 1px solid var(--v2-border-soft); border-radius: var(--v2-radius-md); overflow: hidden; }
.rm-row {
  display: block;
  width: 100%;
  min-height: 64px;
  padding: 12px 16px;
  text-align: left;
  background: none;
  border: none;
  border-bottom: 1px solid var(--v2-border-soft);
  color: inherit;
}
.rm-row:last-child { border-bottom: none; }
.rm-row:active, .rm-epic:active { background: var(--v2-press-overlay); }
.rm-row:focus-visible, .rm-epic:focus-visible { outline: 2px solid var(--v2-accent-text); outline-offset: -2px; }
.rm-row-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: var(--v2-font-size-callout);
  font-weight: 500;
  line-height: 1.35;
  color: var(--v2-text-primary);
  overflow-wrap: anywhere;
}
.rm-row-meta { display: flex; align-items: center; gap: 8px; margin-top: 7px; min-width: 0; }
.rm-row-num { font-family: var(--v2-font-display); font-size: var(--v2-font-size-footnote); font-variant-numeric: tabular-nums; color: var(--v2-text-support); }
.rm-row-release { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--v2-font-size-footnote); color: var(--v2-text-support); }

/* ─── 4. States ─── */
.rm-empty { margin: 0; padding: 28px 20px; border: 1px dashed var(--v2-border-strong); border-radius: var(--v2-radius-md); text-align: center; }
.rm-empty b { display: block; font-family: var(--v2-font-display); font-weight: 500; font-size: var(--v2-font-size-body); color: var(--v2-text-primary); }
.rm-empty span { display: block; margin-top: 4px; font-size: var(--v2-font-size-subhead); line-height: 1.45; color: var(--v2-text-support); }
.rm-empty .text-btn { display: inline-flex; align-items: center; justify-content: center; margin-top: 8px; }
.rm-head + .rm-empty, .rm-head + .rm-error, .rm-head + .rm-list { margin-top: 16px; }
.rm-error { display: flex; align-items: center; gap: 12px; padding: 10px 8px 10px 16px; border: 1px solid var(--v2-pop-coral); border-radius: var(--v2-radius-md); background: var(--v2-pop-coral-bg); }
.rm-error-icon { width: 32px; height: 32px; flex: 0 0 32px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--v2-pop-coral); color: var(--v2-text-on-accent); }
.rm-error-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rm-error-text { flex: 1; font-size: var(--v2-font-size-subhead); font-weight: 500; line-height: 1.3; color: var(--v2-text-primary); }
.rm-error .text-btn { color: var(--v2-text-primary); }
.rm-skel-row { padding: 16px; border-bottom: 1px solid var(--v2-border-soft); }
.rm-skel-row:last-child { border-bottom: none; }
.rm-skel-row .shimmer-line:first-child { width: 78%; }
.rm-skel-row .shimmer-line + .shimmer-line { width: 38%; margin-top: 10px; height: 12px; }

