/* Roadmap page: two scrollable columns and a detail dialog. */

.rm-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 3vw, 2rem);
  align-items: start;
}
.rm-col {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow:
    var(--shadow-md),
    inset 0 0 0 1px var(--line);
  overflow: hidden;
}
.rm-col__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--line);
}
.rm-col__head h2 {
  font-size: 1.35rem;
}
.rm-badge {
  padding: 0.15rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}
.rm-badge--now {
  background: rgb(22 163 74 / 0.12);
  color: #166534;
}
.rm-badge--next {
  background: rgb(59 51 213 / 0.1);
  color: var(--indigo);
}
.rm-list {
  list-style: none;
  margin: 0;
  padding: 0.75rem;
  display: grid;
  gap: 0.5rem;
  max-height: min(70vh, 38rem);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.rm-list:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: -2px;
}
.rm-item {
  display: grid;
  gap: 0.3rem;
  width: 100%;
  padding: 1rem 1.15rem;
  border: 0;
  border-radius: 16px;
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--line);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    background 0.2s var(--ease),
    box-shadow 0.2s var(--ease),
    transform 0.2s var(--ease);
}
.rm-item:hover {
  background: rgb(59 51 213 / 0.04);
  box-shadow: inset 0 0 0 1px rgb(59 51 213 / 0.35);
}
.rm-item:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
.rm-item__title {
  font-weight: 800;
  font-size: 1.05rem;
}
.rm-item__sum {
  color: var(--ink-2);
  font-size: 0.95rem;
}
.rm-item__more {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.2rem;
  color: var(--blue);
  font-weight: 800;
  font-size: 0.88rem;
}
.rm-item__more svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s var(--ease);
}
.rm-item:hover .rm-item__more svg {
  transform: translateX(3px);
}

/* Dialog */
.rm-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(36rem, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  padding: clamp(1.5rem, 4vw, 2.25rem);
  border: 0;
  border-radius: 28px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
}
.rm-dialog::backdrop {
  background: rgb(11 17 64 / 0.5);
  backdrop-filter: blur(3px);
}
.rm-dialog[open] {
  animation: rm-pop 0.25s var(--ease);
}
@keyframes rm-pop {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
}
.rm-dialog__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 50%;
  background: rgb(11 17 64 / 0.06);
  color: var(--ink);
  cursor: pointer;
}
.rm-dialog__close:hover {
  background: rgb(11 17 64 / 0.12);
}
.rm-dialog__close svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
.rm-dialog__status {
  display: inline-block;
  margin-bottom: 0.9rem;
  padding: 0.15rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}
.rm-dialog__status[data-kind='now'] {
  background: rgb(22 163 74 / 0.12);
  color: #166534;
}
.rm-dialog__status[data-kind='next'] {
  background: rgb(59 51 213 / 0.1);
  color: var(--indigo);
}
.rm-dialog__body h2 {
  padding-right: 2.5rem;
  font-size: 1.6rem;
}
.rm-dialog__body p {
  margin-top: 0.75rem;
  color: var(--ink-2);
}
.rm-dialog__body .rm-lead {
  color: var(--ink);
  font-weight: 800;
  font-size: 1.1rem;
}
.rm-dialog__body .ticks {
  margin-top: 1.1rem;
}

@media (max-width: 760px) {
  .rm-cols {
    grid-template-columns: 1fr;
  }
  .rm-list {
    max-height: 28rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .rm-dialog[open] {
    animation: none;
  }
  .rm-item,
  .rm-item__more svg {
    transition: none;
  }
}
