/* /roadmap */
/* ===== Hero ===== */
  .rm-hero { padding: 64px 0 8px; }
  .rm-hero .inner { max-width: 720px; }
  .rm-hero h1 { letter-spacing: -0.03em; margin-top: 24px; }
  .rm-hero h1 .accent { color: var(--primary-strong); font-style: italic; }
  [data-theme="dark"] .rm-hero h1 .accent { color: var(--primary); }
  .rm-hero .lede { margin-top: 28px; max-width: 54ch; }

  /* legend + scroll hint row */
  .rm-bar {
    margin-top: 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
  }
  .rm-legend { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
  .rm-legend .key {
    display: inline-flex; align-items: center; gap: 9px;
    font-family: var(--font-mono);
    font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--text-soft); font-weight: 600;
  }
  .rm-legend .swatch { width: 13px; height: 13px; border-radius: 999px; flex: 0 0 auto; }
  .rm-legend .swatch.shipped {
    background: color-mix(in oklab, var(--primary-strong) 22%, transparent);
    border: 2px solid var(--primary-strong);
  }
  [data-theme="dark"] .rm-legend .swatch.shipped { border-color: var(--primary); background: color-mix(in oklab, var(--primary) 22%, transparent); }
  .rm-legend .swatch.progress { background: var(--primary-strong); }
  [data-theme="dark"] .rm-legend .swatch.progress { background: var(--primary); }
  .rm-legend .swatch.planned { background: var(--surface); border: 2px dashed var(--border-strong); }
  .rm-hint {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--font-mono);
    font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--muted);
  }
  .rm-hint i { font-size: 14px; }
  @media (max-width: 760px) { .rm-hint { display: none; } }

  /* ===== Rail ===== */
  .rm-rail-wrap { position: relative; margin-top: 8px; }
  .rm-rail {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scroll-padding: 0 24px;
    padding: 40px 24px 40px;
    cursor: grab;
    scrollbar-width: thin;
    scrollbar-color: var(--border-strong) transparent;
  }
  .rm-rail.dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; -webkit-user-select: none; }
  .rm-rail::-webkit-scrollbar { height: 8px; }
  .rm-rail::-webkit-scrollbar-track { background: transparent; }
  .rm-rail::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; }

  .ms {
    flex: 0 0 300px;
    position: relative;
    height: 580px;
    scroll-snap-align: center;
  }
  /* the horizontal axis line, drawn per-segment so it can go solid -> dashed */
  .ms::before {
    content: "";
    position: absolute;
    top: 50%; left: 0; right: 0;
    border-top: 2px solid var(--primary-strong);
    transform: translateY(-1px);
  }
  [data-theme="dark"] .ms::before { border-top-color: var(--primary); }
  .ms.planned::before {
    border-top: 2px dashed var(--border-strong);
  }
  /* node dot */
  .ms .node {
    position: absolute;
    top: 50%; left: 50%;
    width: 18px; height: 18px;
    border-radius: 999px;
    transform: translate(-50%, -50%);
    z-index: 2;
    background: var(--primary-strong);
    box-shadow: 0 0 0 5px var(--bg);
  }
  [data-theme="dark"] .ms .node { background: var(--primary); }
  .ms.shipped .node {
    background: color-mix(in oklab, var(--primary-strong) 20%, var(--bg));
    border: 3px solid var(--primary-strong);
  }
  [data-theme="dark"] .ms.shipped .node { border-color: var(--primary); background: color-mix(in oklab, var(--primary) 22%, var(--bg)); }
  .ms.planned .node {
    background: var(--bg);
    border: 2px solid var(--border-strong);
  }
  /* stem connecting node to card */
  .ms .stem {
    position: absolute;
    left: 50%; transform: translateX(-50%);
    width: 2px; height: 40px;
    background: var(--primary-strong);
    z-index: 1;
  }
  [data-theme="dark"] .ms .stem { background: var(--primary); }
  .ms.planned .stem { background: var(--border-strong); }
  .ms.pos-up .stem { bottom: 50%; }
  .ms.pos-down .stem { top: 50%; }

  /* card */
  .ms .card {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 250px;
  }
  .ms.pos-up .card { bottom: 50%; margin-bottom: 56px; }
  .ms.pos-down .card { top: 50%; margin-top: 56px; }

  .ms .m-meta {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 10px;
  }
  .ms .date {
    font-family: var(--font-mono);
    font-size: 12px; letter-spacing: 0.06em;
    color: var(--text-soft); font-weight: 600;
  }
  .ms .tag {
    font-family: var(--font-mono);
    font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
    font-weight: 600;
    padding: 3px 8px; border-radius: 999px;
    white-space: nowrap;
  }
  .ms.progress .tag {
    color: var(--primary-fg);
    background: var(--primary-strong);
  }
  [data-theme="dark"] .ms.progress .tag { color: #10160f; background: var(--primary); }
  .ms.shipped .tag {
    color: var(--primary-strong);
    background: color-mix(in oklab, var(--primary-strong) 12%, transparent);
  }
  [data-theme="dark"] .ms.shipped .tag { color: var(--primary); background: color-mix(in oklab, var(--primary) 16%, transparent); }
  .ms.planned .tag {
    color: var(--muted);
    background: color-mix(in oklab, var(--text) 7%, transparent);
  }
  .ms h3 {
    font-size: 21px; line-height: 1.2; letter-spacing: -0.018em;
    margin: 0; max-width: 22ch;
  }
  .ms.planned h3 { color: var(--text-soft); }
  .ms .desc {
    margin: 8px 0 0;
    font-size: 14px; line-height: 1.5; color: var(--muted);
    max-width: 30ch;
  }

  /* fade edges */
  .rm-rail-wrap .fade {
    position: absolute; top: 0; bottom: 0; width: 64px;
    pointer-events: none; z-index: 3;
    opacity: 0; transition: opacity 0.2s ease;
  }
  .rm-rail-wrap .fade.show { opacity: 1; }
  .rm-rail-wrap .fade.left { left: 0; background: linear-gradient(to right, var(--bg), transparent); }
  .rm-rail-wrap .fade.right { right: 0; background: linear-gradient(to left, var(--bg), transparent); }

  /* arrow buttons */
  .rm-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    z-index: 4;
    width: 44px; height: 44px; border-radius: 999px;
    display: grid; place-items: center;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    color: var(--text);
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: opacity 0.2s ease, transform 0.15s ease, background 0.15s ease;
  }
  .rm-arrow:hover { background: var(--surface-2); }
  .rm-arrow:active { transform: translateY(-50%) scale(0.94); }
  .rm-arrow.left { left: 8px; }
  .rm-arrow.right { right: 8px; }
  .rm-arrow[disabled] { opacity: 0; pointer-events: none; }
  .rm-arrow i { font-size: 18px; }
  @media (max-width: 760px) { .rm-arrow { display: none; } }

  /* closing line */
  .rm-foot {
    margin-top: 72px;
    font-family: var(--font-mono);
    font-size: 12px; letter-spacing: 0.04em;
    color: var(--muted);
    display: inline-flex; align-items: center; gap: 10px;
  }
  .rm-foot::before { content: ""; width: 28px; height: 1px; background: var(--border-strong); }

  /* ===== Mobile: rotate to vertical ===== */
  @media (max-width: 760px) {
    .rm-rail {
      flex-direction: column;
      overflow-x: hidden;
      scroll-snap-type: none;
      padding: 8px 4px 8px;
      cursor: default;
    }
    .ms {
      flex: none;
      width: 100%;
      height: auto;
      display: grid;
      grid-template-columns: 40px 1fr;
      column-gap: 8px;
      padding-bottom: 28px;
    }
    .ms::before {
      top: 0; bottom: 0; left: 19px; right: auto;
      border-top: none;
      border-left: 2px solid var(--primary-strong);
      transform: none;
    }
    [data-theme="dark"] .ms::before { border-left-color: var(--primary); border-top-color: transparent; }
    .ms.planned::before { border-top: none; border-left: 2px dashed var(--border-strong); }
    .ms:last-child::before { bottom: auto; height: 28px; }
    .ms .node { top: 9px; left: 19px; transform: translate(-50%, 0); }
    .ms .stem { display: none; }
    .ms .card {
      position: static;
      transform: none;
      width: auto;
      grid-column: 2;
      margin: 0 !important;
      padding-top: 0;
    }
    .ms .desc { max-width: 46ch; }
    .ms h3 { max-width: none; }
  }
