:root {
  --bg: #0b1220;
  --surface: #101a2e;
  --s2: #16233a;
  --border: #2c3d5d;
  --gold: #f1c40f;
  --accent: #f0883e;
  --blue: #58a6ff;
  --green: #3fb950;
  --red: #f85149;
  --purple: #bc8cff;
  --yellow: #e3b341;
  --muted: #93a4bd;
  --text: #d8e2f1;
  --white: #f7fbff;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
*::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
*::-webkit-scrollbar-track {
  background: transparent;
}
*::-webkit-scrollbar-thumb {
  background: #344765;
  border-radius: 999px;
}
body {
  font-family: Tahoma, Arial, sans-serif;
  background:
    radial-gradient(
      circle at 18% 0%,
      rgba(241, 196, 15, 0.09),
      transparent 32%
    ),
    linear-gradient(180deg, #08101e, var(--bg));
  color: var(--text);
  min-height: 100vh;
  line-height: 1.9;
}
code,
pre,
.mono {
  font-family: Consolas, Monaco, monospace;
  direction: ltr;
  text-align: left;
}
.toolbar {
  height: 88px;
  background: rgba(8, 16, 30, 0.96);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  padding: 0 18px;
}
.toolbar-inner {
  width: 100%;
  max-width: 1280px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo {
  width: auto;
  height: 64px;
  max-width: 90px;
  object-fit: contain;
  border: 1px solid rgba(255, 215, 0, 0.6);
  border-radius: 16px;
  background: rgba(11, 26, 54, 0.6);
  display: block;
}
.brand-name {
  font-weight: 900;
  color: var(--gold);
  font-size: 1.05rem;
}
.brand-tag {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 2px;
}
.back-link {
  color: var(--gold);
  text-decoration: none;
  border: 1px solid rgba(241, 196, 15, 0.25);
  padding: 7px 13px;
  border-radius: 9px;
  font-size: 0.82rem;
  font-weight: 800;
  background: rgba(241, 196, 15, 0.04);
}
.page {
  max-width: 1280px;
  margin: auto;
  padding: 16px 14px 70px;
}
.hero {
  background:
    linear-gradient(
      135deg,
      rgba(241, 196, 15, 0.1),
      rgba(88, 166, 255, 0.045) 45%,
      transparent
    ),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 14px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}
.hero-intro {
  display: flex;
  align-items: center;
  gap: 16px;
}
.hero-icon {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: linear-gradient(
    135deg,
    rgba(241, 196, 15, 0.18),
    rgba(88, 166, 255, 0.12)
  );
  border: 1px solid rgba(241, 196, 15, 0.24);
  display: grid;
  place-items: center;
  font-size: 2rem;
}
.hero h1 {
  font-size: clamp(1.35rem, 3vw, 2.1rem);
  color: var(--gold);
  margin-bottom: 6px;
}
.hero p {
  font-size: 0.9rem;
  color: var(--muted);
}
.hero-stats {
  display: grid;
  gap: 7px;
  min-width: 250px;
}
.hs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(22, 35, 58, 0.8);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 11px;
  font-size: 0.8rem;
  color: var(--muted);
}
.hs strong {
  color: var(--accent);
  font-family: Consolas, monospace;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.card,
.panel {
  background: rgba(16, 26, 46, 0.96);
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 14px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
}
a.card {
  display: flex;
  flex-direction: column;
  min-height: 190px;
  text-decoration: none;
  color: inherit;
  transition: 0.15s;
}
.card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}
.card__icon {
  font-size: 2rem;
  margin-bottom: 8px;
}
.card__title {
  color: var(--gold);
  font-size: 1rem;
  margin-bottom: 6px;
}
.card__text {
  color: var(--muted);
  font-size: 0.82rem;
  flex: 1;
}
.card__hint {
  color: var(--blue);
  font-size: 0.74rem;
  margin-top: 8px;
}
.card__route {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--gold);
  font-weight: 900;
  font-size: 0.8rem;
  margin-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 9px;
}
.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  font-weight: 900;
  font-size: 1rem;
  margin: 18px 0 10px;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 14px rgba(241, 196, 15, 0.7);
}
.lesson-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 12px;
}
.side-nav {
  position: sticky;
  top: 80px;
  align-self: start;
}
.side-nav a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 0.78rem;
  border: 1px solid transparent;
}
.side-nav a:hover,
.side-nav a.active {
  color: var(--gold);
  background: rgba(241, 196, 15, 0.07);
  border-color: rgba(241, 196, 15, 0.18);
}
.lesson {
  background: rgba(16, 26, 46, 0.96);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
}
.lesson h2 {
  color: var(--gold);
  font-size: 1.45rem;
  margin-bottom: 8px;
}
.lesson h3 {
  color: var(--white);
  font-size: 1.02rem;
  margin: 18px 0 8px;
}
.lesson p,
.lesson li {
  color: var(--text);
  font-size: 0.9rem;
}
.lesson ul,
.lesson ol {
  padding-right: 22px;
  margin: 8px 0;
}
.note {
  border: 1px solid rgba(88, 166, 255, 0.25);
  background: rgba(88, 166, 255, 0.07);
  border-radius: 12px;
  padding: 12px;
  color: var(--muted);
  font-size: 0.84rem;
  margin: 12px 0;
}
.warn {
  border-color: rgba(227, 179, 65, 0.3);
  background: rgba(227, 179, 65, 0.07);
}
pre {
  background: #050b14;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  overflow: auto;
  color: var(--text);
  font-size: 0.82rem;
  margin: 10px 0;
}
.diagram {
  direction: ltr;
  text-align: left;
  white-space: pre;
  background: #08101e;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  color: var(--green);
  font-family: Consolas, monospace;
  overflow: auto;
}
.quiz {
  display: grid;
  gap: 10px;
}
.q {
  background: #08101e;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
}
.q strong {
  color: var(--gold);
}
.nav-next {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 20px;
}
.nav-next a {
  color: var(--gold);
  text-decoration: none;
  border: 1px solid rgba(241, 196, 15, 0.22);
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(241, 196, 15, 0.04);
  font-weight: 900;
  font-size: 0.8rem;
}
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .lesson-layout {
    grid-template-columns: 1fr;
  }
  .side-nav {
    position: static;
  }
  .hero-stats {
    min-width: unset;
  }
}
