:root {
  --void: #050508;
  --panel: #101018;
  --panel-2: #161622;
  --accent: #b2f701;
  --accent-dim: rgba(178, 247, 1, 0.14);
  --cyan: #5eead4;
  --magenta: #e07aa8;
  --text: #f7f7f4;
  --muted: #b0b0a4;
  --line: rgba(178, 247, 1, 0.22);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --side-w: 280px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--void);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 45% at 90% -5%, rgba(178, 247, 1, 0.18), transparent 55%),
    radial-gradient(ellipse 45% 40% at -5% 40%, rgba(94, 234, 212, 0.12), transparent 60%),
    radial-gradient(ellipse 50% 35% at 50% 100%, rgba(224, 122, 168, 0.14), transparent 55%),
    var(--void);
}

.shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--side-w) 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  padding: 1.25rem 1rem 2rem;
  border-right: 1px solid var(--line);
  background: rgba(8, 8, 14, 0.72);
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  margin-bottom: 1.25rem;
}

.brand:hover {
  text-decoration: none;
}

.progress-wrap {
  margin-bottom: 1.25rem;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.progress-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  transition: width 0.35s var(--ease);
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.side-nav a {
  display: block;
  padding: 0.7rem 0.75rem;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}

.side-nav a:hover,
.side-nav a.is-active {
  background: var(--accent-dim);
  border-color: var(--line);
  text-decoration: none;
}

.side-nav .tag {
  display: inline-block;
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.side-nav .tag.adv {
  color: var(--cyan);
}

.side-nav strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.95rem;
}

.side-nav span.desc {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.content {
  padding: 1.5rem 1.75rem 4rem;
  max-width: 860px;
}

.hero {
  margin-bottom: 2rem;
  padding: 1.5rem 0 0.5rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  line-height: 1.15;
  margin: 0 0 0.75rem;
  font-weight: 700;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero p {
  margin: 0;
  color: var(--muted);
  max-width: 42rem;
}

.stage-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.65rem;
  margin: 1.5rem 0 2.5rem;
}

.stage-cards a {
  display: block;
  padding: 0.85rem 0.8rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(16, 16, 24, 0.85);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.2s var(--ease), border-color 0.2s;
}

.stage-cards a:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  text-decoration: none;
}

.stage-cards .num {
  font-family: var(--font-display);
  font-size: 0.75rem;
  color: var(--accent);
}

.stage-cards strong {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.9rem;
}

section.block {
  margin-bottom: 2.75rem;
  scroll-margin-top: 1.25rem;
}

section.block h2 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  margin: 0 0 0.4rem;
}

section.block > .lede {
  color: var(--muted);
  margin: 0 0 1.1rem;
}

h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 1.4rem 0 0.55rem;
}

h4 {
  font-size: 0.95rem;
  margin: 1rem 0 0.4rem;
  color: var(--cyan);
}

ol.steps,
ul.bullets {
  margin: 0.4rem 0 0.8rem;
  padding-left: 1.2rem;
}

ol.steps li,
ul.bullets li {
  margin: 0.35rem 0;
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.checklist label {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--panel);
  cursor: pointer;
}

.checklist input {
  margin-top: 0.2rem;
  accent-color: var(--accent);
}

.tip {
  margin: 1rem 0;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border-left: 3px solid var(--accent);
  background: var(--accent-dim);
  color: var(--text);
  font-size: 0.92rem;
}

.tip.warn {
  border-left-color: var(--magenta);
  background: rgba(224, 122, 168, 0.12);
}

.ip-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0.75rem 0 1rem;
}

.ip-row input {
  flex: 1;
  min-width: 180px;
  padding: 0.65rem 0.8rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  font-family: ui-monospace, monospace;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #0a0a0c;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--accent-dim);
}

.ex-card {
  margin: 0.85rem 0;
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--panel);
}

.addr-row {
  display: flex;
  gap: 0.45rem;
  margin: 0.4rem 0 0.75rem;
}

.addr-row input {
  flex: 1;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--panel-2);
  color: var(--text);
  font-family: ui-monospace, monospace;
  font-size: 0.85rem;
}

.addr-row button {
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 0.8rem;
}

.addr-row button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.route-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.85rem;
  margin: 0.35rem 0 0.9rem;
}

.route-grid label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.88rem;
  cursor: pointer;
}

.route-grid input {
  accent-color: var(--accent);
}

.cta-box {
  margin-top: 1.5rem;
  padding: 1.25rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(178, 247, 1, 0.1), rgba(94, 234, 212, 0.06));
  text-align: center;
}

.cta-box h3 {
  margin-top: 0;
}

.footer-note {
  margin-top: 3rem;
  color: var(--muted);
  font-size: 0.82rem;
}

@media (max-width: 900px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .side-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .content {
    padding: 1.25rem 1rem 3rem;
  }
}

@media (max-width: 560px) {
  .side-nav {
    grid-template-columns: 1fr;
  }
}
