/* The roadmap page (/roadmap.html): a timeline, not a docs article.
   Built on the site's tokens only, so both themes come from site.css's two
   dark blocks (D-574) and nothing here needs a dark copy. The rail runs
   unbroken from the first shipped item to the last planned one: every row
   draws its own segment, so the rows carry padding and never margin. */

.rm-intro { max-width: 760px; }
.rm-kicker {
  display: inline-flex; align-items: center; min-height: 28px; padding: 0 12px;
  border: 1px solid var(--h-line); border-radius: var(--radius-pill); background: var(--h-surface);
  color: var(--h-ink-2); font-size: 13px; font-weight: 600; letter-spacing: .02em;
}
.rm-intro h1 { margin-top: 18px; }

/* The four statuses, counted, each a door to its part of the timeline. */
.rm-sum { margin-top: 40px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 900px) { .rm-sum { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 56px; } }
.rm-sum a {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 18px 20px 20px;
  border: 1px solid var(--h-line); border-radius: var(--radius-win); background: var(--h-surface); box-shadow: var(--shadow-soft);
  transition: border-color var(--dur-ctl) ease, transform var(--dur-ctl) var(--ease-out);
}
.rm-sum a:hover { border-color: var(--control); transform: translateY(-1px); }
.rm-sum b { font-size: 34px; line-height: 1; font-weight: 600; color: var(--h-ink); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.rm-sum small { font-size: 14px; line-height: 1.45; color: var(--h-muted); }

/* A status, said as a pill. */
.rm-badge {
  display: inline-flex; align-items: center; min-height: 24px; padding: 0 10px;
  border: 1px solid var(--h-line); border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 600; line-height: 1; white-space: nowrap; color: var(--h-muted); background: transparent;
}
.rm-badge[data-status="shipped"] { background: var(--h-fill); border-color: var(--h-fill); color: #fff; }
.rm-badge[data-status="building"] { background: var(--h-tint); border-color: var(--h-tint-line); color: var(--h-brand); }
.rm-badge[data-status="waiting"] { background: var(--h-well); color: var(--h-ink-2); }

/* The timeline. */
.rm-board { --rail: 40px; --gap: 20px; padding: 16px 0 96px; }
@media (min-width: 900px) { .rm-board { --rail: 44px; --gap: 24px; padding: 32px 0 128px; } }
.rm-board > .wrap > * { max-width: 760px; margin-left: auto; margin-right: auto; }
.rm-phase { --rail-c: var(--h-line); }
.rm-phase[data-status="shipped"] { --rail-c: var(--h-brand); }

.rm-phase-h, .rm-items > li, .rm-today { position: relative; }
.rm-phase-h::before, .rm-items > li::before, .rm-today::before {
  content: ''; position: absolute; top: 0; bottom: 0; left: calc(var(--rail) / 2 - 1px); width: 2px; background: var(--rail-c);
}
.rm-phase:first-child .rm-phase-h::before { top: 50%; }
.rm-phase:last-child .rm-items > li:last-child::before { bottom: auto; height: calc(var(--rail) / 2); }

.rm-phase-h { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); gap: var(--gap); align-items: center; padding: 8px 0 28px; }
.rm-node {
  position: relative; z-index: 1; justify-self: center; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--control); background: var(--h-canvas);
}
.rm-phase[data-status="shipped"] .rm-node { border-color: var(--h-brand); background: var(--h-brand); }
.rm-phase[data-status="building"] .rm-node { border-color: var(--h-brand); }
.rm-phase-h h2 { font-size: 22px; line-height: 1.2; letter-spacing: -0.015em; }
.rm-phase-h p { margin-top: 4px; font-size: 14px; color: var(--h-muted); }

.rm-items { list-style: none; margin: 0; padding: 0; }
.rm-items > li { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); gap: var(--gap); padding-bottom: 36px; }
.rm-rail { position: relative; z-index: 1; display: flex; justify-content: center; }
.rm-ico {
  display: flex; align-items: center; justify-content: center; width: var(--rail); height: var(--rail); border-radius: 12px;
  border: 1px solid var(--h-line); background: var(--h-surface); color: var(--h-muted);
}
.rm-ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.rm-phase[data-status="shipped"] .rm-ico { background: var(--h-fill); border-color: var(--h-fill); color: #fff; }
.rm-phase[data-status="building"] .rm-ico { background: var(--h-tint); border-color: var(--h-tint-line); color: var(--h-brand); }
.rm-phase[data-status="waiting"] .rm-ico { background: var(--h-well); color: var(--h-ink-2); }

.rm-body { padding-top: 2px; min-width: 0; }
.rm-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.rm-meta time, .rm-when {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 12px; letter-spacing: .02em;
  color: var(--h-muted); font-variant-numeric: tabular-nums;
}
.rm-body h3 { margin-top: 10px; font-size: 18px; line-height: 1.3; }
.rm-body p { margin-top: 6px; font-size: 15px; line-height: 1.65; color: var(--h-muted); max-width: 60ch; }

/* Where the shipped rail ends and the rest begins. */
.rm-today { --rail-c: var(--h-line); display: flex; align-items: center; padding: 4px 0 36px; }
.rm-today::before { background: linear-gradient(var(--h-brand) 0 30%, var(--h-line) 30% 100%); }
.rm-today::after { content: ''; position: absolute; top: calc(50% - 16px); left: calc(var(--rail) + var(--gap)); right: 0; height: 1px; background: var(--h-line); }
.rm-today-mark {
  position: relative; z-index: 1; margin-left: calc(var(--rail) / 2); transform: translateX(-50%);
  display: inline-flex; align-items: center; min-height: 26px; padding: 0 12px; border-radius: var(--radius-pill);
  background: var(--h-ink); color: var(--h-canvas); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
}

@media (max-width: 599px) { .rm-today-mark { margin-left: 0; transform: none; } }

/* What stays with a person. */
.rm-never { display: grid; gap: 28px; }
@media (min-width: 1000px) { .rm-never { grid-template-columns: auto minmax(0, 1fr); column-gap: 32px; } .rm-never-list { grid-column: 2; } }
.rm-never-ico {
  display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 14px;
  background: var(--h-surface); border: 1px solid var(--h-line); color: var(--h-ink);
}
.rm-never-ico svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.rm-never-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
@media (min-width: 700px) { .rm-never-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rm-never-list li { padding: 20px 22px; border: 1px solid var(--h-line); border-radius: var(--radius-win); background: var(--h-surface); }
.rm-never-list h3 { font-size: 17px; line-height: 1.3; }
.rm-never-list p { margin-top: 6px; font-size: 15px; line-height: 1.6; color: var(--h-muted); }

@media (prefers-reduced-motion: reduce) {
  .rm-sum a { transition: none; }
  .rm-sum a:hover { transform: none; }
}
