:root {
  --purple: #6543ce;
  --teal: #087b6d;
  --bg: #0d1017;
  --bg2: #12161f;
  --card: #171b26;
  --card2: #1c212e;
  --line: #262c3a;
  --text: #e6e9f0;
  --muted: #9aa0ae;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Bricolage Grotesque", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.rr-root {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 60px;
  position: relative;
}

.rr-glow {
  position: fixed;
  top: -180px; left: 50%;
  transform: translateX(-50%);
  width: 900px; height: 500px;
  background: radial-gradient(closest-side, rgba(101,67,206,.28), transparent 70%),
              radial-gradient(closest-side at 70% 40%, rgba(8,123,109,.22), transparent 70%);
  filter: blur(20px);
  pointer-events: none;
  z-index: 0;
}
.rr-root > * { position: relative; z-index: 1; }

/* ---------- Hero ---------- */
.rr-hero {
  padding: 48px 0 28px;
  animation: rise .6s ease both;
}
.rr-brand { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
.rr-logo {
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  font-size: 26px;
  width: 58px; height: 58px;
  display: grid; place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--purple), var(--teal));
  color: #fff;
  box-shadow: 0 8px 30px rgba(101,67,206,.4);
}
.rr-h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 56px);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: .95;
  background: linear-gradient(90deg, #fff, #cbb8ff 60%, #7fe6d3);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.rr-tag { margin: 6px 0 0; color: var(--muted); font-family: "JetBrains Mono", monospace; font-size: 13px; }

.rr-hero-progress {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px 22px;
  animation: rise .6s .1s ease both;
}
.rr-hero-progress-top {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 12px;
  font-weight: 700; font-size: 18px;
}
.rr-hero-stat-min { font-size: 12px; color: var(--muted); font-weight: 500; font-family: "JetBrains Mono", monospace; }

.rr-stats { display: flex; gap: 28px; margin-top: 18px; flex-wrap: wrap; }
.rr-stat-n { font-family: "JetBrains Mono", monospace; font-size: 24px; font-weight: 700; }
.rr-stat-l { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }

.rr-celebrate {
  margin-top: 16px; padding: 14px 18px;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(8,123,109,.25), rgba(101,67,206,.25));
  border: 1px solid rgba(127,230,211,.4);
  font-weight: 600;
  animation: pop .5s ease both;
}

/* ---------- Progress bar ---------- */
.rr-bar { background: #2a2f3d; border-radius: 99px; overflow: hidden; }
.rr-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--purple), var(--teal));
  border-radius: 99px;
  transition: width .5s cubic-bezier(.2,.8,.2,1);
  display: flex; align-items: center; justify-content: flex-end;
  padding-right: 8px;
  min-width: 2px;
}
.rr-bar-txt { font-size: 10px; color: #fff; font-family: "JetBrains Mono", monospace; }

/* ---------- Controls ---------- */
.rr-controls {
  position: sticky; top: 0; z-index: 20;
  display: flex; gap: 12px; flex-wrap: wrap; align-items: center;
  padding: 14px 0;
  margin-bottom: 12px;
  background: rgba(13,16,23,.85);
  backdrop-filter: blur(10px);
}
.rr-search-wrap { position: relative; flex: 1; min-width: 220px; }
.rr-search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 18px; }
.rr-search {
  width: 100%;
  padding: 11px 40px 11px 40px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color .2s;
}
.rr-search:focus { border-color: var(--purple); }
.rr-search-clear {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--muted); font-size: 20px; cursor: pointer;
}

.rr-filters { display: flex; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.rr-filter {
  border: none; background: none; color: var(--muted);
  padding: 7px 12px; border-radius: 8px; cursor: pointer;
  font-family: inherit; font-size: 13px; font-weight: 600; white-space: nowrap;
  transition: all .15s;
}
.rr-filter:hover { color: var(--text); }
.rr-filter.active { background: linear-gradient(135deg, var(--purple), var(--teal)); color: #fff; }

.rr-actions { display: flex; gap: 6px; }
.rr-act {
  width: 40px; height: 40px;
  border: 1px solid var(--line); background: var(--card);
  color: var(--muted); border-radius: 10px; cursor: pointer;
  font-size: 18px; transition: all .15s;
}
.rr-act:hover { color: var(--text); border-color: var(--purple); }
.rr-act.danger:hover { color: #ff7a7a; border-color: #ff7a7a55; }

/* ---------- Main layout ---------- */
.rr-main { display: grid; grid-template-columns: 1fr 320px; gap: 22px; align-items: start; }
.rr-roadmap { display: flex; flex-direction: column; gap: 16px; }

/* ---------- Phase card ---------- */
.rr-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
  animation: rise .5s ease both;
}
.rr-card[data-status="completed"] { border-color: rgba(8,123,109,.5); }
.rr-card:hover { box-shadow: 0 10px 40px rgba(0,0,0,.35); }

.rr-card-head {
  width: 100%; text-align: left;
  display: flex; align-items: center; gap: 16px;
  padding: 18px 20px;
  background: none; border: none; cursor: pointer;
  color: inherit; font-family: inherit;
}
.rr-num {
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center;
  font-family: "JetBrains Mono", monospace; font-weight: 700; font-size: 18px;
  color: #fff; flex-shrink: 0;
}
.rr-card-title { margin: 0; font-size: 18px; font-weight: 700; }
.rr-card-sub { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.rr-chevron { font-size: 26px; color: var(--muted); transition: transform .25s; line-height: 1; }

.rr-pill {
  font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 99px;
  border: 1px solid; white-space: nowrap;
  font-family: "JetBrains Mono", monospace;
}

.rr-card-body { padding: 4px 22px 24px; border-top: 1px solid var(--line); animation: reveal .35s ease both; }
.rr-intro { color: #c9cdd6; font-size: 15px; line-height: 1.6; margin: 18px 0 4px; }

.rr-section { margin-top: 22px; }
.rr-section-title {
  margin: 0 0 12px; font-size: 12px; text-transform: uppercase; letter-spacing: .1em;
  color: var(--muted); font-weight: 700;
}

.rr-goals { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.rr-goals li { color: #cdd2dc; font-size: 14px; }

.rr-tasks { list-style: none; margin: 0; padding: 0; counter-reset: t; display: flex; flex-direction: column; gap: 8px; }
.rr-task {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px;
  background: var(--card2); cursor: pointer;
  transition: background .15s;
  counter-increment: t;
}
.rr-task::before {
  content: counter(t, decimal-leading-zero);
  font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--muted);
}
.rr-task:hover { background: #232937; }
.rr-check {
  width: 22px; height: 22px; border-radius: 6px;
  border: 2px solid var(--line); flex-shrink: 0;
  display: grid; place-items: center; color: #fff; font-size: 13px; font-weight: 700;
  transition: all .2s;
}
.rr-task-txt { font-size: 14px; }
.rr-task.done .rr-task-txt { color: var(--muted); text-decoration: line-through; }

.rr-res { display: flex; flex-direction: column; gap: 8px; }
.rr-res-row {
  display: flex; flex-direction: column; gap: 2px;
  padding: 12px 14px; border-radius: 10px;
  background: var(--card2); border: 1px solid transparent;
  text-decoration: none; transition: all .15s;
}
.rr-res-row:hover { border-color: var(--teal); background: #1e2532; }
.rr-res-title { color: var(--text); font-weight: 600; font-size: 14px; }
.rr-res-arrow { color: var(--teal); margin-left: 6px; }
.rr-res-desc { color: var(--muted); font-size: 13px; }

.rr-callout {
  margin-top: 18px; padding: 14px 16px; border-radius: 12px;
  border-left: 3px solid;
}
.rr-callout.mentor { background: rgba(8,123,109,.1); border-color: var(--teal); }
.rr-callout.gate { background: rgba(101,67,206,.1); border-color: var(--purple); }
.rr-callout-label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 6px; }
.rr-callout p { margin: 0; font-size: 14px; line-height: 1.55; color: #d3d7e0; }

.rr-reflect-q { font-style: italic; color: #cdd2dc; margin: 0 0 10px; font-size: 14px; }
.rr-note {
  width: 100%; resize: vertical;
  background: var(--card2); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px;
  color: var(--text); font-family: inherit; font-size: 14px; outline: none;
  transition: border-color .2s;
}
.rr-note:focus { border-color: var(--purple); }

.rr-empty { padding: 40px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 16px; }

/* ---------- Aside panels ---------- */
.rr-aside { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 78px; }
.rr-panel { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.rr-panel-title { margin: 0; font-size: 16px; font-weight: 700; }
.rr-panel-sub { margin: 4px 0 16px; font-size: 12px; color: var(--muted); }

.rr-loop { display: flex; flex-direction: column; gap: 10px; }
.rr-loop-step { display: flex; gap: 12px; align-items: flex-start; }
.rr-loop-n { font-family: "JetBrains Mono", monospace; font-size: 12px; font-weight: 700; color: var(--purple); padding-top: 2px; }
.rr-loop-t { font-weight: 700; font-size: 14px; }
.rr-loop-d { font-size: 12px; color: var(--muted); }

.rr-compass { display: flex; flex-direction: column; gap: 12px; }
.rr-compass-item { padding-left: 12px; border-left: 2px solid var(--teal); }
.rr-compass-t { font-weight: 700; font-size: 14px; }
.rr-compass-d { font-size: 12px; color: var(--muted); line-height: 1.4; }

/* ---------- Footer ---------- */
.rr-footer {
  margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
  color: var(--muted); font-size: 13px;
}
.rr-remix {
  color: var(--teal); text-decoration: none; font-weight: 700;
  padding: 8px 16px; border: 1px solid var(--teal); border-radius: 99px;
  transition: all .2s;
}
.rr-remix:hover { background: var(--teal); color: #fff; }

/* ---------- Animations ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes reveal { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { 0% { transform: scale(.96); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .rr-main { grid-template-columns: 1fr; }
  .rr-aside { position: static; flex-direction: row; flex-wrap: wrap; }
  .rr-aside > * { flex: 1; min-width: 260px; }
}
@media (max-width: 640px) {
  .rr-hero { padding: 32px 0 20px; }
  .rr-controls { flex-direction: column; align-items: stretch; }
  .rr-filters { overflow-x: auto; }
  .rr-actions { justify-content: space-between; }
  .rr-card-head { flex-wrap: wrap; }
  .rr-card-head .rr-num { order: 0; }
  .rr-card-body { padding-left: 16px; padding-right: 16px; }
}