/* === Base === */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: #1a1a2e;
  background: #f5f6fa;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: #d62839; text-decoration: none; }
a:hover { text-decoration: underline; }
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* === Header === */
.site-header {
  background: #14142b;
  position: relative;
  z-index: 100;
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo img {
  height: 48px;
  width: auto;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}
.main-nav ul {
  list-style: none;
  display: flex;
  gap: 24px;
  margin: 0;
  padding: 0;
}
.main-nav a {
  color: #e6e6f0;
  font-weight: 600;
  font-size: 15px;
}
.main-nav a:hover,
.main-nav a.active {
  color: #ffc94d;
  text-decoration: none;
}

.header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  order: 2;
}
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: bold;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}
.btn-login {
  background: transparent;
  color: #fff;
  border: 2px solid #ffc94d;
}
.btn-login:hover {
  background: #ffc94d;
  color: #14142b;
  text-decoration: none;
}
.btn-register {
  background: #d62839;
  color: #fff;
  border: 2px solid #d62839;
}
.btn-register:hover {
  background: #ff3b4e;
  border-color: #ff3b4e;
  text-decoration: none;
}

/* Burger checkbox hack */
.burger-toggle { display: none; }
.burger-label {
  display: none;
  width: 32px;
  height: 26px;
  position: relative;
  cursor: pointer;
  z-index: 200;
}
.burger-label span,
.burger-label span::before,
.burger-label span::after {
  content: "";
  display: block;
  position: absolute;
  width: 100%;
  height: 3px;
  background: #fff;
  border-radius: 2px;
  left: 0;
  transition: transform 0.2s ease;
}
.burger-label span { top: 11px; }
.burger-label span::before { top: -10px; }
.burger-label span::after { top: 10px; }

@media (max-width: 880px) {
  .burger-label { display: block; order: 3; }
  .header-actions { order: 2; }
  .header-actions .btn {
    padding: 8px 12px;
    font-size: 13px;
  }
  .main-nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: #14142b;
    flex-direction: column;
    align-items: stretch;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    border-top: 0 solid #2a2a4a;
    gap: 0;
  }
  .main-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 10px 0;
  }
  .main-nav ul li a {
    display: block;
    padding: 14px 20px;
    border-bottom: 1px solid #23233f;
  }
  .burger-toggle:checked ~ .main-nav {
    max-height: 600px;
    border-top-width: 1px;
  }
  .burger-toggle:checked ~ .burger-label span {
    background: transparent;
  }
  .burger-toggle:checked ~ .burger-label span::before {
    transform: translateY(10px) rotate(45deg);
  }
  .burger-toggle:checked ~ .burger-label span::after {
    transform: translateY(-10px) rotate(-45deg);
  }
}

@media (min-width: 881px) {
  .main-nav { position: static; max-height: none; overflow: visible; }
}

/* === Hero / Banner === */
.hero {
  position: relative;
  background: #0d0d1f;
}
.hero img {
  width: 100%;
  height: clamp(180px, 38vw, 420px);
  object-fit: cover;
  opacity: 0.85;
}
.hero-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  background: linear-gradient(180deg, rgba(13,13,31,0.2), rgba(13,13,31,0.75));
}
.hero-text h1 {
  color: #fff;
  font-size: clamp(22px, 4vw, 38px);
  margin: 0 0 10px;
  max-width: 900px;
}
.hero-text p {
  color: #f0f0f5;
  max-width: 700px;
  margin: 0;
  font-size: clamp(14px, 2vw, 18px);
}

/* === Breadcrumbs === */
.breadcrumbs {
  background: #e9eaf2;
  padding: 12px 0;
  font-size: 14px;
}
.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
}
.breadcrumbs li:not(:last-child)::after {
  content: "›";
  margin-left: 6px;
  color: #888;
}
.breadcrumbs a { color: #555; }
.breadcrumbs li[aria-current] { color: #14142b; font-weight: 600; }

/* === Article content === */
main { padding: 30px 0 50px; }
article h1 { font-size: clamp(26px, 4vw, 36px); }
article h2 {
  margin-top: 40px;
  font-size: clamp(20px, 3vw, 26px);
  border-left: 5px solid #d62839;
  padding-left: 12px;
}
article h3 { font-size: 19px; color: #14142b; }
table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  background: #fff;
}
table th, table td {
  border: 1px solid #ddd;
  padding: 10px 12px;
  text-align: left;
  font-size: 15px;
}
table th { background: #14142b; color: #fff; }
table tr:nth-child(even) { background: #f5f6fa; }

/* === TOC accordion === */
.toc-accordion {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin: 24px 0;
  padding: 0;
}
.toc-accordion summary {
  cursor: pointer;
  font-weight: bold;
  font-size: 18px;
  padding: 16px 20px;
  list-style: none;
  position: relative;
}
.toc-accordion summary::-webkit-details-marker { display: none; }
.toc-accordion summary::after {
  content: "+";
  position: absolute;
  right: 20px;
  top: 14px;
  font-size: 22px;
  color: #d62839;
}
.toc-accordion[open] summary::after { content: "–"; }
.toc-accordion ol {
  margin: 0;
  padding: 0 20px 18px 38px;
}
.toc-accordion ol li { margin-bottom: 6px; }

/* === Footer === */
.site-footer {
  background: #14142b;
  color: #cfcfe0;
  padding: 40px 0 20px;
  font-size: 14px;
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: space-between;
}
.footer-col h3 {
  color: #fff;
  font-size: 16px;
  margin-top: 0;
}
.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: #cfcfe0; }
.footer-col a:hover { color: #ffc94d; }
.footer-bottom {
  border-top: 1px solid #2a2a4a;
  margin-top: 30px;
  padding-top: 18px;
  text-align: center;
  color: #8888a0;
  font-size: 13px;
}
