/* ============================================================================
   THEHIGHWRLD - ROADMAP
   Built on the site's own tokens (--radius-*, --glass-*, --mbn-h) and the same
   card / panel / chip language as The Vault and Community.
   Mobile-first: the <=767px kill-switch in player-settings.css already drops
   backdrop-filter, transitions and animations site-wide, so everything here
   degrades to flat, fast, touch-friendly surfaces on phones on its own.
   ========================================================================== */

#page-section-roadmap {
  --rm-cyan: #22d3ee;
  --rm-cyan-soft: #67e8f9;
  --rm-violet: #a855f7;
  --rm-violet-soft: #a78bfa;
  --rm-line: rgba(255, 255, 255, 0.1);
  --rm-line-soft: rgba(255, 255, 255, 0.07);
  --rm-card: linear-gradient(135deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.018));
  --rm-muted: rgba(156, 163, 175, 0.85);
  --rm-dim: rgba(156, 163, 175, 0.72);
}

/* --------------------------------------------------------------- page frame */
/* Top padding clears the fixed site nav: 56px tall on phones, 84px from 1024,
   and 123px in the tablet range where the nav wraps. (Other pages use py-24.) */
.rm-page {
  box-sizing: border-box;
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 96px 16px 40px;
}

@media (min-width: 768px) {
  .rm-page {
    padding: 140px 28px 60px;
  }
}

@media (min-width: 1024px) {
  .rm-page {
    padding: 104px 36px 72px;
  }
}

/* Clear the fixed mobile bottom bar (55px + safe area) so the last card is
   always reachable. --mbn-h already includes env(safe-area-inset-bottom). */
@media (max-width: 767px) {
  #page-section-roadmap .rm-page {
    padding-top: 88px;
    padding-bottom: calc(var(--mbn-h, 55px) + 26px);
  }
}

/* ------------------------------------------------------------------- header */
/* The site's .brand-text wordmark is deliberately hidden below 768px, so the
   Roadmap uses its own eyebrow (same mono/cyan treatment as the Vault and Track
   Info eyebrows) which stays visible on every screen. */
.rm-eyebrow {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--rm-cyan-soft);
}

.rm-header {
  text-align: center;
  margin-bottom: 26px;
}

.rm-title {
  margin: 10px auto 0;
  max-width: 22ch;
  font-size: clamp(1.35rem, 5.2vw, 2.1rem);
  line-height: 1.22;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.95);
}

@media (min-width: 768px) {
  .rm-title {
    max-width: 30ch;
  }
}

/* Status summary: every number is calculated from the roadmap data. */
.rm-summary {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.rm-sum {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--rm-line);
  background: rgba(255, 255, 255, 0.05);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.72);
  white-space: nowrap;
}

.rm-sum i {
  font-size: 10px;
}

.rm-sum b {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  color: #fff;
}

.rm-sum[data-rm-status="completed"] i { color: #4ade80; }
.rm-sum[data-rm-status="in-progress"] i { color: var(--rm-cyan); }
.rm-sum[data-rm-status="planned"] i { color: #fbbf24; }
.rm-sum[data-rm-status="considering"] i { color: var(--rm-violet-soft); }

/* ------------------------------------------------------------- what's next */
.rm-featured {
  margin-bottom: 24px;
}

.rm-next {
  position: relative;
  padding: 20px 18px;
  border-radius: var(--radius-lg);
}

.rm-next::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(120% 140% at 0% 0%, rgba(34, 211, 238, 0.12), transparent 55%),
    radial-gradient(120% 140% at 100% 100%, rgba(168, 85, 247, 0.1), transparent 55%);
  pointer-events: none;
}

.rm-next > * {
  position: relative;
}

.rm-next-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.rm-next h3 {
  margin: 0 0 8px;
  font-size: clamp(1.15rem, 4vw, 1.55rem);
  font-weight: 800;
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.96);
  overflow-wrap: anywhere;
}

.rm-next p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--rm-muted);
  max-width: 68ch;
}

.rm-next-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.rm-next-foot .rm-prog {
  flex: 1 1 220px;
  min-width: 0;
}

.rm-next-cta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, 0.3);
  background: rgba(34, 211, 238, 0.1);
  color: var(--rm-cyan-soft);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.rm-next-cta:hover {
  background: rgba(34, 211, 238, 0.18);
  border-color: rgba(34, 211, 238, 0.5);
  color: #cffafe;
}

.rm-next-cta i {
  font-size: 11px;
}

/* --------------------------------------------------------------- controls */
.rm-controls {
  position: relative;
  margin-bottom: 26px;
  padding: 14px;
  border-radius: var(--radius-md);
}

.rm-controls-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.rm-controls-row + .rm-controls-row {
  margin-top: 10px;
}

.rm-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--rm-line);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.66);
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.rm-chip i {
  font-size: 10px;
}

.rm-chip .rm-chip-n {
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.45);
  font-weight: 800;
}

.rm-chip:hover {
  background: rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.9);
}

.rm-chip[aria-pressed="true"] {
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.2), rgba(59, 130, 246, 0.18));
  border-color: rgba(34, 211, 238, 0.32);
  color: var(--rm-cyan-soft);
}

.rm-chip[aria-pressed="true"] .rm-chip-n {
  color: rgba(207, 250, 254, 0.8);
}

.rm-chip:focus-visible,
.rm-next-cta:focus-visible,
.rm-search input:focus-visible {
  outline: 2px solid var(--rm-cyan);
  outline-offset: 2px;
}

/* category row */
.rm-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.rm-cat {
  min-height: 32px;
  padding: 6px 11px;
  font-size: 10px;
}

.rm-cat[aria-pressed="true"] {
  background: rgba(168, 85, 247, 0.18);
  border-color: rgba(168, 85, 247, 0.34);
  color: #e9d5ff;
}

.rm-cat[aria-pressed="true"] .rm-chip-n {
  color: rgba(233, 213, 255, 0.75);
}

/* search */
.rm-search {
  flex: 1 1 220px;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid var(--rm-line);
  background: rgba(255, 255, 255, 0.05);
}

.rm-search i {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
}

.rm-search input {
  flex: 1;
  min-width: 0;
  width: 100%;
  min-height: 42px;
  border: none;
  background: none;
  outline: none;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
}

.rm-search input::placeholder {
  color: rgba(156, 163, 175, 0.6);
}

.rm-search input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.rm-count {
  margin: 12px 0 0;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
}

/* ---------------------------------------------------------------- sections */
.rm-sec {
  margin-bottom: 30px;
}

.rm-sec[hidden],
.rm-empty[hidden],
.rm-featured[hidden] {
  display: none !important;
}

.rm-sec-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
}

.rm-sec-head .rm-bar {
  display: block;
  width: 3px;
  height: 21px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--rm-cyan), var(--rm-violet));
  flex: 0 0 3px;
}

.rm-sec-head h2 {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
}

.rm-sec-head .rm-sec-emoji {
  font-size: 13px;
  line-height: 1;
}

.rm-sec-count {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.35);
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------------- grid */
.rm-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 768px) {
  .rm-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
}

@media (min-width: 1200px) {
  .rm-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
}

.rm-card[hidden] {
  display: none !important;
}

/* ------------------------------------------------------------------- card */
.rm-card {
  position: relative;
  box-sizing: border-box;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 15px;
  border-radius: 14px;
  border: 1px solid var(--rm-line);
  background: var(--rm-card);
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.rm-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 14px;
  right: 14px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(103, 232, 249, 0.22), transparent);
  opacity: 0.55;
}

/* Hover is decoration only - never required to read a card. Touch devices and
   reduced-motion users get the same information without it. */
@media (hover: hover) {
  .rm-card:hover {
    border-color: rgba(34, 211, 238, 0.28);
    background: rgba(255, 255, 255, 0.075);
    transform: translateY(-2px);
  }
}

.rm-card-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.94);
  overflow-wrap: anywhere;
}

.rm-card-desc {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--rm-muted);
  overflow-wrap: anywhere;
}

/* status badge - icon + text, so status never depends on colour alone */
.rm-badge {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 6px;
  border: 1px solid;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.3;
  white-space: nowrap;
}

.rm-badge i {
  font-size: 8px;
}

.rm-badge[data-rm-status="completed"] {
  color: #4ade80;
  border-color: rgba(74, 222, 128, 0.3);
  background: rgba(74, 222, 128, 0.12);
}

.rm-badge[data-rm-status="in-progress"] {
  color: var(--rm-cyan);
  border-color: rgba(34, 211, 238, 0.3);
  background: rgba(34, 211, 238, 0.12);
}

.rm-badge[data-rm-status="planned"] {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.28);
  background: rgba(251, 191, 36, 0.1);
}

.rm-badge[data-rm-status="considering"] {
  color: var(--rm-violet-soft);
  border-color: rgba(167, 139, 250, 0.3);
  background: rgba(167, 139, 250, 0.12);
}

/* category chips */
.rm-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 4px;
}

.rm-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 5px;
  border: 1px solid rgba(34, 211, 238, 0.16);
  background: rgba(34, 211, 238, 0.09);
  color: #8eeaf5;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.rm-tag i {
  font-size: 8px;
}

.rm-updated {
  margin-left: auto;
  font-size: 9px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.3);
  white-space: nowrap;
}

/* ---------------------------------------------------------------- progress */
.rm-prog {
  display: flex;
  align-items: center;
  gap: 9px;
}

.rm-prog-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  white-space: nowrap;
}

.rm-prog-track {
  flex: 1;
  min-width: 40px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.rm-prog-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--rm-cyan), var(--rm-violet));
}

.rm-prog-val {
  font-size: 10px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.72);
  font-variant-numeric: tabular-nums;
  min-width: 30px;
  text-align: right;
}

/* ------------------------------------------------------------ empty states */
.rm-empty {
  margin: 0;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px dashed var(--rm-line-soft);
  background: rgba(255, 255, 255, 0.02);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.42);
}

.rm-nos {
  margin: 0 0 26px;
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px dashed var(--rm-line-soft);
  background: rgba(255, 255, 255, 0.02);
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}

/* --------------------------------------------------------------- a11y/util */
.rm-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .rm-card,
  .rm-chip,
  .rm-next-cta {
    transition: none !important;
  }

  @media (hover: hover) {
    .rm-card:hover {
      transform: none;
    }
  }
}
/* ---- per-item deep links ---- */
.rm-linkbtn {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.rm-linkbtn:hover, .rm-linkbtn:focus-visible {
  color: #22d3ee;
  border-color: rgba(34, 211, 238, 0.45);
  background: rgba(34, 211, 238, 0.08);
}
.rm-linkbtn:focus-visible { outline: 2px solid #22d3ee; outline-offset: 2px; }
.rm-linkbtn.rm-link-done { color: #4ade80; border-color: rgba(74, 222, 128, 0.45); background: rgba(74, 222, 128, 0.08); }
/* a card reached by deep link says so for a moment */
.rm-card.rm-flash { animation: rmFlash 1.6s ease; }
@keyframes rmFlash {
  0%, 100% { box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2); }
  15%, 60% { box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.75), 0 18px 46px rgba(34, 211, 238, 0.18); }
}
.rm-fresh {
  margin: 6px 0 0;
  font-size: 10px;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.28);
}
@media (prefers-reduced-motion: reduce) {
  .rm-card.rm-flash { animation: none; outline: 2px solid rgba(34, 211, 238, 0.75); outline-offset: 2px; }
}
