:root {
  color-scheme: dark;
  --bg: #0b100d;
  --surface: #121a15;
  --surface-raised: #18231c;
  --surface-soft: #101713;
  --ink: #f8f1d8;
  --muted: #aab5a7;
  --line: #344238;
  --line-soft: #273229;
  --gold: #e7b950;
  --green: #66c77c;
  --blue: #72aee8;
  --orange: #d98b42;
  --red: #d76c5c;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
dialog {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header,
main,
footer {
  width: min(1320px, calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line-soft);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
}

.brand img {
  width: 36px;
  height: 36px;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.top-nav a {
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.top-nav a:hover,
.top-nav a.current {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

main {
  padding: 58px 0 44px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 48px;
  align-items: end;
  padding-bottom: 38px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 900px;
  margin-bottom: 18px;
  font-size: clamp(46px, 7vw, 88px);
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.lead {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.6;
}

.hero-status {
  min-width: 250px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.hero-status div {
  display: grid;
  gap: 3px;
}

.hero-status span:not(.live-dot) {
  color: var(--muted);
  font-size: 12px;
}

.live-dot {
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(102, 199, 124, 0.12);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 28px 0 64px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}

.summary-grid article {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding: 22px;
  border-right: 1px solid var(--line);
}

.summary-grid article:last-child {
  border-right: 0;
}

.summary-label,
.summary-grid small {
  color: var(--muted);
}

.summary-label {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.summary-grid strong {
  margin: 8px 0 3px;
  color: var(--ink);
  font-size: 42px;
  line-height: 1;
}

.roadmap-panel,
.playbook,
.quote-strip {
  margin-top: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  box-shadow: var(--shadow);
}

.roadmap-panel {
  padding: clamp(20px, 4vw, 38px);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: -0.04em;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 10px 16px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.legend i.active {
  background: var(--green);
}

.legend i.locked {
  background: var(--orange);
}

.legend i.completed {
  background: var(--blue);
}

.map-scroll {
  overflow-x: auto;
  padding: 8px 4px 22px;
  scrollbar-color: var(--line) transparent;
}

.goal-map {
  position: relative;
  min-width: 760px;
  display: grid;
  grid-template-columns: repeat(var(--tier-count, 1), minmax(280px, 1fr));
  gap: 100px;
  align-items: start;
  padding: 24px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #0d140f;
}

.connections {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.connections path.connection {
  fill: none;
  stroke: #526557;
  stroke-width: 2;
  marker-end: url("#arrow");
}

.connections marker path {
  fill: #526557;
}

.goal-tier {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
}

.tier-label {
  margin: 0 0 2px;
  color: #7f8f82;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.goal-card {
  width: 100%;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 20px;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 8px;
  background: var(--surface-raised);
  color: var(--ink);
  text-align: left;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.goal-card:hover,
.goal-card:focus-visible {
  transform: translateY(-3px);
  border-color: #607465;
  background: #1d2a21;
  outline: 0;
}

.goal-card[data-status="active"] {
  border-left-color: var(--green);
}

.goal-card[data-status="locked"] {
  border-left-color: var(--orange);
}

.goal-card[data-status="completed"] {
  border-left-color: var(--blue);
}

.goal-status {
  width: fit-content;
  margin-bottom: 14px;
  padding: 5px 8px;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.goal-card[data-status="active"] .goal-status {
  color: var(--green);
}

.goal-card[data-status="locked"] .goal-status {
  color: var(--orange);
}

.goal-card[data-status="completed"] .goal-status {
  color: var(--blue);
}

.goal-title {
  font-size: 21px;
  font-weight: 950;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.goal-description {
  min-height: 42px;
  margin: 9px 0 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.progress-track {
  height: 8px;
  margin-top: auto;
  overflow: hidden;
  border-radius: 999px;
  background: #29342b;
}

.progress-track i {
  display: block;
  width: var(--progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: var(--gold);
}

.goal-card[data-status="completed"] .progress-track i {
  background: var(--blue);
}

.goal-progress {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.goal-unlock {
  min-height: 18px;
  margin-top: 10px;
  color: #caa671;
  font-size: 11px;
  line-height: 1.4;
}

.map-hint {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.loading-card,
.error-card {
  position: relative;
  z-index: 2;
  grid-column: 1 / -1;
  padding: 36px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.error-card {
  color: #ef9b8d;
}

.playbook {
  padding: clamp(20px, 4vw, 38px);
}

.playbook-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.playbook-grid article {
  padding: 26px 26px 8px 0;
  border-right: 1px solid var(--line);
}

.playbook-grid article:not(:first-child) {
  padding-left: 26px;
}

.playbook-grid article:last-child {
  border-right: 0;
}

.step-number {
  display: block;
  margin-bottom: 28px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 950;
}

.playbook h3 {
  margin-bottom: 10px;
  font-size: 21px;
}

.playbook p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

code {
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-raised);
  color: var(--gold);
}

.quote-strip {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  padding: clamp(26px, 5vw, 54px);
  border-color: #67552e;
}

blockquote {
  max-width: 820px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(24px, 4vw, 42px);
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: -0.035em;
}

.quote-strip > span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

footer {
  min-height: 94px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 13px;
}

footer strong {
  color: var(--ink);
}

dialog {
  width: min(680px, calc(100% - 28px));
  max-height: min(780px, calc(100vh - 28px));
  padding: 0;
  overflow: auto;
  border: 1px solid #526557;
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.62);
}

dialog::backdrop {
  background: rgba(3, 6, 4, 0.78);
}

.dialog-close {
  position: sticky;
  z-index: 2;
  top: 14px;
  float: right;
  width: 38px;
  height: 38px;
  margin: 14px 14px 0 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-raised);
  color: var(--ink);
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.dialog-body {
  padding: 34px;
}

.dialog-body h2 {
  max-width: 560px;
  margin: 8px 52px 10px 0;
  font-size: clamp(30px, 6vw, 48px);
  line-height: 1;
  overflow-wrap: anywhere;
}

.dialog-description {
  color: var(--muted);
  line-height: 1.6;
}

.dialog-section {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.dialog-section h3 {
  margin-bottom: 14px;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.requirement-list,
.dependency-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.requirement-list li,
.dependency-list li {
  padding: 13px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--surface-raised);
}

.requirement-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.requirement-row strong {
  overflow-wrap: anywhere;
}

.requirement-row span {
  color: var(--muted);
  white-space: nowrap;
}

.mini-track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #29342b;
}

.mini-track i {
  display: block;
  width: var(--progress, 0%);
  height: 100%;
  background: var(--gold);
}

@media (max-width: 850px) {
  .hero {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .hero-status {
    width: 100%;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .summary-grid article:nth-child(2) {
    border-right: 0;
  }

  .summary-grid article:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .playbook-grid {
    grid-template-columns: 1fr;
  }

  .playbook-grid article,
  .playbook-grid article:not(:first-child) {
    padding: 22px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .playbook-grid article:last-child {
    border-bottom: 0;
  }

  .step-number {
    margin-bottom: 10px;
  }

  .quote-strip {
    align-items: start;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }

  .top-nav {
    width: 100%;
    overflow-x: auto;
  }

  main {
    padding-top: 36px;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

  .legend {
    justify-content: start;
  }

  .summary-grid strong {
    font-size: 34px;
  }

  .goal-map {
    min-width: max(700px, calc(var(--tier-count, 1) * 300px));
    gap: 70px;
    padding: 18px;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
  }

  .dialog-body {
    padding: 24px;
  }
}
