/* ORION Wizard — modern UI */
/* Poppins — self-hosted (SIL OFL, via @fontsource); Latin + Latin-ext for TR/EN */
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/poppins/poppins-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/poppins/poppins-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
    U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/poppins/poppins-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/poppins/poppins-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
    U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/poppins/poppins-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/poppins/poppins-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
    U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("fonts/poppins/poppins-latin-ext-800-normal.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("fonts/poppins/poppins-latin-800-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
    U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #0c0e14;
  --surface: #141824;
  --surface2: #1c2233;
  --border: #2a3348;
  --text: #e8ecf4;
  --muted: #8b95a8;
  --accent: #3d8bfd;
  --accent-dim: #2563eb;
  --success: #34d399;
  --glow: rgba(61, 139, 253, 0.35);
  --radius: 14px;
  --font: "Poppins", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

:root[data-theme="light"] {
  --bg: #f3f6fb;
  --surface: #ffffff;
  --surface2: #f7f9fd;
  --border: #d6deea;
  --text: #182132;
  --muted: #55627a;
  --accent: #2563eb;
  --accent-dim: #1d4ed8;
  --glow: rgba(37, 99, 235, 0.25);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(61, 139, 253, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(52, 211, 153, 0.06), transparent);
}

.app {
  max-width: 1520px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem 3rem;
}

/* Hero header — compact: brand | mini-map + stats row */
.site-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem 1.25rem;
  align-items: center;
  margin-bottom: 1.25rem;
  padding: 0.75rem 1rem 0.85rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background:
    linear-gradient(135deg, rgba(61, 139, 253, 0.06) 0%, transparent 42%),
    linear-gradient(225deg, rgba(52, 211, 153, 0.04) 0%, transparent 38%),
    var(--surface);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  position: relative;
}

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: 1fr;
    padding: 0.7rem 0.9rem 0.8rem;
    gap: 0.75rem;
  }

  .header-aside {
    order: -1;
    justify-content: center;
    max-width: 100%;
  }
}

.header-brand {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.top-switches {
  position: absolute;
  top: 0.55rem;
  right: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: nowrap;
  margin: 0;
  z-index: 2;
}

.lang-switch,
.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-bottom: 0;
}

.lang-btn {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  border-radius: 6px;
  padding: 0.15rem 0.45rem;
  font-size: 0.68rem;
  line-height: 1.2;
  min-height: 1.6rem;
  cursor: pointer;
  font-family: var(--mono);
}

.lang-btn.active {
  color: #dbe7ff;
  border-color: rgba(61, 139, 253, 0.55);
  background: rgba(61, 139, 253, 0.14);
}

.github-top-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  border-radius: 6px;
  padding: 0.15rem 0.5rem;
  font-size: 0.68rem;
  line-height: 1.2;
  min-height: 1.6rem;
  font-family: var(--mono);
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.github-top-link:hover {
  color: #dbe7ff;
  border-color: rgba(61, 139, 253, 0.55);
  background: rgba(61, 139, 253, 0.14);
}

.header-brand h1 {
  margin: 0;
  font-size: clamp(1.28rem, 2.4vw, 1.52rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
  background: linear-gradient(105deg, #f0f4fc 0%, #c5d7f7 40%, #8eb8fb 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .header-brand h1 {
    background: none;
    color: #e8ecf4;
  }
}

.header-brand .tagline {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
  max-width: 56ch;
  margin: 0;
}

.tagline-acronym {
  color: var(--accent);
  font-weight: 700;
}

.header-brand .tagline em {
  font-style: normal;
  color: #b8c5dc;
}

.header-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.15rem;
}

.header-pill {
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.45rem;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: #a8b4c8;
}

.header-aside {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .header-aside {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .top-switches {
    position: static;
    justify-content: flex-end;
    width: 100%;
    margin-bottom: 0.15rem;
  }
}

.header-visual {
  border-radius: 10px;
  border: 1px solid rgba(61, 139, 253, 0.22);
  background: radial-gradient(ellipse 75% 70% at 50% 45%, rgba(61, 139, 253, 0.1), transparent 62%),
    var(--surface2);
  padding: 0.25rem 0.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-orbit {
  width: 96px;
  height: 96px;
  max-width: none;
  aspect-ratio: 1;
}

.header-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.28rem 0.4rem;
  margin: 0;
  width: min(200px, 42vw);
}

@media (max-width: 900px) {
  .header-stats {
    width: auto;
    flex: 1;
    min-width: 160px;
  }
}

.header-stat {
  margin: 0;
  padding: 0.28rem 0.4rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
}

.header-stat dt {
  margin: 0;
  font-size: 0.58rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.header-stat dd {
  margin: 0.08rem 0 0;
  font-size: 0.68rem;
  font-weight: 600;
  color: #dce2ef;
  font-family: var(--font);
  line-height: 1.2;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  width: fit-content;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: rgba(61, 139, 253, 0.12);
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(61, 139, 253, 0.35);
}

.preset-bar {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem 1.15rem;
  margin-bottom: 1.25rem;
}

.preset-bar-title {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 700;
}

.preset-bar-desc {
  margin: 0 0 0.85rem;
  font-size: 0.85rem;
  color: var(--muted);
  max-width: 62ch;
}

.preset-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

@media (max-width: 900px) {
  .preset-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .preset-buttons {
    grid-template-columns: 1fr;
  }
}

.btn-preset {
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 600;
  text-align: left;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  min-width: 0;
  width: 100%;
}

.btn-preset:hover {
  border-color: var(--accent);
  background: rgba(61, 139, 253, 0.08);
}

.btn-preset.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(61, 139, 253, 0.35);
}

.btn-preset .preset-name {
  display: block;
  font-weight: 700;
}

.btn-preset .preset-short {
  display: block;
  margin-top: 0.2rem;
  font-weight: 400;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.35;
}

.export-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.layout {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(420px, 1fr) minmax(280px, 360px);
  gap: 1.5rem;
  align-items: stretch;
}

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

.overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin-bottom: 1.1rem;
}

@media (max-width: 1024px) {
  .overview-grid {
    grid-template-columns: 1fr;
  }
}

.overview-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.95rem 1rem;
}

.overview-card h3 {
  margin: 0 0 0.4rem;
  font-size: 0.92rem;
}

.overview-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.getting-started {
  margin-bottom: 1.1rem;
  padding: 0.95rem 1rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.getting-started-head h3 {
  margin: 0;
  font-size: 0.95rem;
}

.getting-started-head p {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.getting-started-grid {
  margin-top: 0.75rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

@media (max-width: 960px) {
  .getting-started-grid {
    grid-template-columns: 1fr;
  }
}

.gs-card {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
}

.gs-card h4 {
  margin: 0;
  font-size: 0.8rem;
}

.gs-card p {
  margin: 0.3rem 0 0;
  font-size: 0.76rem;
  color: var(--muted);
}

.gs-note {
  margin: 0.7rem 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.tool-examples {
  margin-top: 0.7rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
}

@media (max-width: 1100px) {
  .tool-examples {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .tool-examples {
    grid-template-columns: 1fr;
  }
}

.tool-chip {
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.18);
  padding: 0.5rem 0.6rem;
  min-width: 0;
}

.tool-chip strong {
  display: block;
  font-size: 0.74rem;
  margin-bottom: 0.18rem;
}

.tool-chip span {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.35;
}

.tool-chip code {
  font-family: var(--mono);
  font-size: 0.66rem;
}

.example-projects {
  margin-bottom: 1.1rem;
  padding: 0.95rem 1rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.example-head h3 {
  margin: 0;
  font-size: 0.95rem;
}

.example-head p {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.example-grid {
  margin-top: 0.75rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

@media (max-width: 1080px) {
  .example-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .example-grid {
    grid-template-columns: 1fr;
  }
}

.example-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.18);
  padding: 0.65rem 0.75rem;
}

.example-card h4 {
  margin: 0;
  font-size: 0.8rem;
}

.example-card p {
  margin: 0.32rem 0 0;
  color: var(--muted);
  font-size: 0.74rem;
}

.example-steps {
  margin: 0.45rem 0 0;
  padding-left: 1rem;
  color: #dce2ef;
  font-size: 0.73rem;
}

.example-steps li {
  margin: 0.14rem 0;
}

.example-link {
  display: inline-flex;
  margin-top: 0.45rem;
  font-size: 0.7rem;
  color: #b8d0ff;
  text-decoration: none;
  border: 1px solid rgba(61, 139, 253, 0.35);
  border-radius: 7px;
  padding: 0.22rem 0.45rem;
  background: rgba(61, 139, 253, 0.08);
}

.example-link:hover {
  color: #d7e6ff;
  border-color: rgba(61, 139, 253, 0.6);
  background: rgba(61, 139, 253, 0.16);
}

.starter-guide {
  margin-bottom: 1.1rem;
  padding: 0.95rem 1rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.starter-head h3 {
  margin: 0;
  font-size: 0.95rem;
}

.starter-head p {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.starter-controls {
  margin-top: 0.65rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.starter-controls label {
  font-size: 0.78rem;
  color: var(--muted);
}

#guide-scenario {
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  border-radius: 8px;
  padding: 0.35rem 0.5rem;
  font-family: var(--font);
  font-size: 0.8rem;
}

.starter-flow {
  margin-top: 0.75rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

@media (max-width: 1080px) {
  .starter-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .starter-flow {
    grid-template-columns: 1fr;
  }
}

.starter-step {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
  padding: 0.58rem 0.62rem;
  display: flex;
  align-items: flex-start;
  gap: 0.52rem;
  transition: border-color 0.2s, background 0.2s;
}

.starter-step:hover {
  border-color: rgba(61, 139, 253, 0.45);
  background: rgba(61, 139, 253, 0.08);
}

.starter-step.done {
  border-color: rgba(52, 211, 153, 0.5);
  background: rgba(52, 211, 153, 0.1);
}

.starter-step-main {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  cursor: pointer;
}

.starter-step-main input {
  margin-top: 0.15rem;
  accent-color: var(--accent);
}

.starter-step-index {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #cfe0ff;
  border: 1px solid rgba(61, 139, 253, 0.45);
  background: rgba(61, 139, 253, 0.16);
  margin-top: 0.05rem;
}

.starter-step-text {
  font-size: 0.76rem;
  color: #dce2ef;
  line-height: 1.42;
}

.starter-progress {
  grid-column: 1 / -1;
  font-size: 0.74rem;
  color: var(--muted);
  margin-bottom: 0.08rem;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}

.panel h2 {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  font-weight: 600;
}

/* Equal-height columns: wizard | map | node insight */
.layout > section.panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: auto;
  align-self: stretch;
}

.wizard-panel {
  min-height: 520px;
}

.wizard-panel .options {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.wizard-panel .nav-row {
  margin-top: auto;
  flex-shrink: 0;
}

.wizard-panel .reset-link {
  flex-shrink: 0;
}

/* Progress */
.progress {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
}

.progress-step {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  transition: background 0.35s ease;
}

.progress-step.active,
.progress-step.done {
  background: linear-gradient(90deg, var(--accent-dim), var(--accent));
}

.step-label {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

/* Options */
.options {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.option-card {
  display: block;
  cursor: pointer;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface2);
  padding: 1rem 1.1rem;
  text-align: left;
  color: inherit;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.option-card:hover {
  border-color: rgba(61, 139, 253, 0.5);
  box-shadow: 0 0 0 1px rgba(61, 139, 253, 0.15);
}

.option-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--glow);
}

.option-card strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.option-card span {
  font-size: 0.82rem;
  color: var(--muted);
}

.nav-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.35rem;
}

.btn {
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.65rem 1.15rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
}

.btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-dim), var(--accent));
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}

.btn:not(:disabled):hover {
  transform: translateY(-1px);
}

/* Graph panel */
.graph-panel {
  min-height: 520px;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

.graph-wrap {
  flex: 1 1 auto;
  position: relative;
  border-radius: var(--radius);
  background: var(--surface2);
  border: 1px solid var(--border);
  overflow: hidden;
  min-height: 420px;
}

#graph-svg {
  width: 100%;
  height: 100%;
  min-height: 420px;
  display: block;
}

.graph-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 1rem;
  font-size: 0.78rem;
  color: var(--muted);
  flex-shrink: 0;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
}

.legend-dot.active {
  background: var(--accent);
  box-shadow: 0 0 8px var(--glow);
}

.legend-dot.interactive {
  background: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.45);
}

/* Full-width path & recommendations (below 3-column layout) */
.results-section {
  margin-top: 1.5rem;
  width: 100%;
}

.results-section .results {
  margin: 0;
  padding: 0;
  border: none;
}

.results-title {
  margin: 0 0 1rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.results-head {
  margin-bottom: 1.25rem;
}

.results-head .readiness-banner {
  max-width: 420px;
}

.results-intro {
  margin: 0.75rem 0 0 !important;
  max-width: 72ch;
}

.chip-row-wrap {
  margin-top: 0.55rem !important;
}

.raci-banner {
  margin-top: 1rem;
  padding: 0.75rem 0.95rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
}

.raci-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.raci-line {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.5;
  color: #dce2ef;
  font-family: var(--mono);
  word-break: break-word;
}

.raci-note {
  margin: 0.5rem 0 0;
  font-size: 0.72rem;
  color: var(--muted);
}

.raci-note code {
  font-family: var(--mono);
  font-size: 0.68rem;
}

.results-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 1fr);
  gap: 1.5rem 2.25rem;
  align-items: start;
}

@media (max-width: 960px) {
  .results-grid {
    grid-template-columns: 1fr;
  }

  .results-col-side {
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
  }
}

.results-col-main,
.results-col-side {
  min-width: 0;
}

.results-col-side {
  position: sticky;
  top: 1rem;
}

@media (max-width: 960px) {
  .results-col-side {
    position: static;
  }
}

/* Legacy .results block (container) */
.results {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.doc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.doc-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  text-decoration: none;
  font-size: 0.85rem;
  font-family: var(--mono);
  border: 1px solid transparent;
  transition: border-color 0.2s, background 0.2s;
}

.doc-list a:hover {
  border-color: var(--border);
  background: rgba(61, 139, 253, 0.08);
}

.doc-list a .hint {
  font-size: 0.72rem;
  color: var(--muted);
  font-family: var(--font);
  flex-shrink: 0;
}

.reset-link {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  font-family: inherit;
}

.reset-link:hover {
  color: var(--accent);
}

.details-panel {
  min-height: 520px;
  display: flex;
  flex-direction: column;
}

.details-panel #node-subtitle {
  flex-shrink: 0;
}

.details-panel .node-detail {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.node-detail {
  margin-top: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface2);
  padding: 1rem;
}

.node-detail h3 {
  margin: 0;
  font-size: 1rem;
}

.node-kicker {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.node-detail p {
  margin: 0.7rem 0 0;
  color: #cad2e2;
  font-size: 0.86rem;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.8rem;
}

.chip {
  font-size: 0.72rem;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
}

.detail-list-title {
  margin: 0.95rem 0 0.4rem;
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.detail-list {
  margin: 0;
  padding-left: 1rem;
  color: #dce2ef;
  font-size: 0.82rem;
}

.detail-list li {
  margin: 0.22rem 0;
}

.detail-docs {
  list-style: none;
  margin: 0.7rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
}

.detail-docs a {
  color: var(--text);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.76rem;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.42rem 0.55rem;
  background: rgba(255, 255, 255, 0.02);
}

.detail-docs a:hover {
  border-color: var(--border);
  background: rgba(61, 139, 253, 0.08);
}

.results-sub {
  margin: 1rem 0 0.4rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #b8c0d4;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.readiness-banner {
  margin-top: 0.65rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(61, 139, 253, 0.35);
  background: rgba(61, 139, 253, 0.08);
}

.readiness-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.readiness-value {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--accent);
}

.readiness-max {
  font-size: 1rem;
  font-weight: 600;
  color: var(--muted);
  margin-left: 0.15rem;
}

.readiness-note {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.readiness-note code {
  font-family: var(--mono);
  font-size: 0.7rem;
}

.doc-list li .doc-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
}

.doc-list li .doc-row a {
  display: block;
  text-decoration: none;
  color: var(--text);
  font-size: 0.82rem;
  font-family: var(--mono);
}

.doc-list li .doc-row .hint {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.72rem;
  color: var(--muted);
  font-family: var(--font);
}

.btn-tiny {
  font-size: 0.68rem !important;
  padding: 0.25rem 0.45rem !important;
  flex-shrink: 0;
}

.btn-small {
  margin-top: 0.65rem;
  font-size: 0.78rem !important;
}

.export-row-wrap {
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  gap: 0.45rem;
  scrollbar-width: thin;
}

.export-row-wrap .btn {
  flex: 0 0 auto;
  white-space: nowrap;
  font-size: 0.78rem;
  padding: 0.55rem 0.75rem;
}

.kpi-list {
  margin: 0;
  padding-left: 1rem;
  font-size: 0.82rem;
  color: #dce2ef;
}

.kpi-list li {
  margin: 0.4rem 0;
}

.kpi-artifact {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--accent);
}

.muted-pack {
  font-size: 0.72rem;
  color: var(--muted);
}

.onboard-day {
  margin-bottom: 0.75rem;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.15);
}

.onboard-day-title {
  font-weight: 700;
  font-size: 0.8rem;
  margin-bottom: 0.45rem;
  color: #c5d0e6;
}

.onboard-task {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  font-size: 0.78rem;
  color: var(--text);
  margin: 0.28rem 0;
  cursor: pointer;
}

.onboard-task input {
  margin-top: 0.2rem;
  accent-color: var(--accent);
}

/* Markdown preview modal */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal.open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  cursor: pointer;
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: min(88vh, 900px);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  margin: 0;
  font-size: 0.95rem;
}

.modal-close {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
}

.modal-close:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.modal-path {
  padding: 0.35rem 1rem 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  word-break: break-all;
}

.modal-body {
  overflow: auto;
  padding: 1rem 1.1rem 1.25rem;
  font-size: 0.86rem;
  line-height: 1.55;
  color: #dce2ef;
}

.modal-hint {
  margin: 0;
  padding: 0.35rem 1rem 0.75rem;
  font-size: 0.72rem;
  color: var(--muted);
}

.md-preview h1,
.md-preview h2,
.md-preview h3 {
  margin: 1rem 0 0.5rem;
  font-size: 1.05rem;
}

.md-preview h1 {
  font-size: 1.15rem;
}

.md-preview pre,
.md-preview code {
  font-family: var(--mono);
  font-size: 0.78rem;
}

.md-preview pre {
  overflow: auto;
  padding: 0.65rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
}

.md-preview a {
  color: var(--accent);
}

.md-preview ul {
  padding-left: 1.2rem;
}

.md-raw {
  white-space: pre-wrap;
  word-break: break-word;
}

/* Light theme contrast fixes */
:root[data-theme="light"] body {
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(37, 99, 235, 0.1), transparent),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(16, 185, 129, 0.06), transparent);
}

:root[data-theme="light"] .header-brand h1 {
  background: linear-gradient(105deg, #0f172a 0%, #1e293b 35%, #1d4ed8 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

:root[data-theme="light"] .header-brand .tagline em,
:root[data-theme="light"] .header-pill,
:root[data-theme="light"] .header-stat dd,
:root[data-theme="light"] .node-detail p,
:root[data-theme="light"] .starter-step-text,
:root[data-theme="light"] .raci-line,
:root[data-theme="light"] .detail-list,
:root[data-theme="light"] .kpi-list,
:root[data-theme="light"] .example-steps,
:root[data-theme="light"] .modal-body {
  color: #1f2937;
}

:root[data-theme="light"] .header-stat,
:root[data-theme="light"] .gs-card,
:root[data-theme="light"] .tool-chip,
:root[data-theme="light"] .example-card,
:root[data-theme="light"] .starter-step,
:root[data-theme="light"] .onboard-day,
:root[data-theme="light"] .raci-banner,
:root[data-theme="light"] .doc-list a,
:root[data-theme="light"] .doc-list li .doc-row,
:root[data-theme="light"] .node-detail,
:root[data-theme="light"] .detail-docs a,
:root[data-theme="light"] .md-preview pre {
  background: #f8fbff;
}

:root[data-theme="light"] .starter-step-index {
  color: #1e3a8a;
  border-color: rgba(37, 99, 235, 0.35);
  background: rgba(37, 99, 235, 0.12);
}

:root[data-theme="light"] .panel,
:root[data-theme="light"] .site-header,
:root[data-theme="light"] .modal-panel {
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

:root[data-theme="light"] .modal-backdrop {
  background: rgba(15, 23, 42, 0.3);
}

:root[data-theme="light"] .lang-btn {
  background: #f4f8ff;
  color: #475569;
}

:root[data-theme="light"] .lang-btn.active {
  color: #0f172a;
  border-color: rgba(37, 99, 235, 0.45);
  background: rgba(37, 99, 235, 0.14);
}

:root[data-theme="light"] .github-top-link {
  background: #f4f8ff;
  color: #475569;
}

:root[data-theme="light"] .github-top-link:hover {
  color: #0f172a;
  border-color: rgba(37, 99, 235, 0.45);
  background: rgba(37, 99, 235, 0.14);
}

:root[data-theme="light"] .step-label,
:root[data-theme="light"] .graph-legend,
:root[data-theme="light"] .node-kicker,
:root[data-theme="light"] .detail-list-title,
:root[data-theme="light"] .readiness-note,
:root[data-theme="light"] .raci-note,
:root[data-theme="light"] .modal-path,
:root[data-theme="light"] .modal-hint,
:root[data-theme="light"] .doc-list a .hint,
:root[data-theme="light"] .doc-list li .doc-row .hint,
:root[data-theme="light"] .muted-pack,
:root[data-theme="light"] .readiness-max,
:root[data-theme="light"] .chip,
:root[data-theme="light"] .results-sub,
:root[data-theme="light"] .onboard-day-title {
  color: #334155;
}

:root[data-theme="light"] .legend-dot {
  background: #94a3b8;
}

:root[data-theme="light"] .legend-dot.active {
  background: #2563eb;
  box-shadow: 0 0 6px rgba(37, 99, 235, 0.28);
}

:root[data-theme="light"] .legend-dot.interactive {
  background: #b45309;
  box-shadow: 0 0 6px rgba(180, 83, 9, 0.25);
}

:root[data-theme="light"] .kpi-artifact {
  color: #1d4ed8;
}

:root[data-theme="light"] .example-link {
  color: #1d4ed8;
  border-color: rgba(29, 78, 216, 0.32);
  background: rgba(29, 78, 216, 0.08);
}

:root[data-theme="light"] .example-link:hover {
  color: #1e3a8a;
  border-color: rgba(29, 78, 216, 0.45);
  background: rgba(29, 78, 216, 0.13);
}

:root[data-theme="light"] .orbit-title {
  fill: #0f172a;
}

:root[data-theme="light"] .graph-label-main {
  fill: #0f172a;
}

:root[data-theme="light"] .graph-label-sub {
  fill: #475569;
}
