/* ============================================================
   MinkNote Roadmap Page
   ============================================================ */

.rm-header {
  padding-top: calc(var(--nav-h) + var(--s20));
  padding-bottom: var(--s12);
  text-align: center;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.rm-header h1 {
  font-size: clamp(var(--t-4xl), 6vw, var(--t-6xl));
  margin: var(--s3) 0 var(--s4);
  letter-spacing: -0.02em;
}

.rm-header p {
  font-size: var(--t-lg);
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
}

.rm-body {
  background: var(--surface-2);
  padding: var(--s12) 0 var(--s32);
}

.rm-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: var(--s8);
  align-items: start;
}

.rm-main {
  display: flex;
  flex-direction: column;
  gap: var(--s5);
}

.rm-card {
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: var(--s8) var(--s10);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 4px 16px rgba(0, 0, 0, 0.04);
  scroll-margin-top: calc(var(--nav-h) + var(--s6));
}

.rm-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s4);
  margin-bottom: var(--s5);
  padding-bottom: var(--s4);
  border-bottom: 1px solid var(--border);
}

.rm-card-head h2 {
  font-family: var(--font-body);
  font-size: var(--t-2xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.rm-progress {
  white-space: nowrap;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--text-muted);
  background: var(--surface-2);
}

.rm-progress--good {
  color: #166534;
  background: #dcfce7;
}

.rm-progress--none {
  color: #1e3a8a;
  background: #dbeafe;
}

.rm-list {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

.rm-item {
  display: flex;
  align-items: flex-start;
  gap: var(--s3);
  font-size: var(--t-sm);
  line-height: 1.75;
  color: var(--text-muted);
}

.rm-item > span:last-child {
  flex: 1;
}

.rm-mark {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.rm-item.is-done {
  color: var(--text);
}

.rm-item.is-done .rm-mark {
  background: #dcfce7;
  border: 1px solid #86efac;
  color: #15803d;
}

.rm-item.is-done .rm-mark::before {
  content: '\2713';
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
}

.rm-item.is-planned .rm-mark {
  background: var(--surface);
  border: 1px solid var(--border-hi);
}

.rm-item.is-planned .rm-mark::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-dim);
}

.rm-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + var(--s6));
}

.rm-panel {
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: var(--s5);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 4px 16px rgba(0, 0, 0, 0.04);
}

.rm-panel + .rm-panel {
  margin-top: var(--s4);
}

.rm-panel-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: var(--s2);
}

.rm-total {
  font-family: var(--font-body);
  font-size: var(--t-4xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--text);
}

.rm-meta {
  margin-top: var(--s2);
  font-size: var(--t-xs);
  color: var(--text-dim);
  line-height: 1.6;
}

.rm-bar {
  margin-top: var(--s4);
  height: 8px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}

.rm-bar-fill {
  height: 100%;
  width: 16.28%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hi));
}

.rm-toc ul {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rm-toc a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s2);
  padding: 7px var(--s2);
  border-radius: var(--r-sm);
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
}

.rm-toc a:hover {
  background: var(--surface-2);
  color: var(--text);
}

.rm-toc a.is-active {
  color: var(--accent);
}

.rm-count {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-dim);
  white-space: nowrap;
}

@media (max-width: 980px) {
  .rm-layout {
    grid-template-columns: 1fr;
  }

  .rm-sidebar {
    position: static;
    order: -1;
  }
}

@media (max-width: 640px) {
  .rm-card {
    padding: var(--s6);
  }

  .rm-card-head {
    flex-direction: column;
    align-items: flex-start;
  }
}
