/* === Reset & base === */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

:root {
  --bg-dark: #0c0e14;
  --bg-darker: #07080c;
  --panel: #12141d;
  --gold: #d4af37;
  --gold-light: #f0d27a;
  --teal: #1fd6b0;
  --text-light: #e9e6dc;
  --text-muted: #9a9aa8;
}

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, Arial, Helvetica, sans-serif;
  color: #1c1c22;
  background: #f6f5f2;
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: #0f8f74;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* === Header === */
.site-header {
  background: linear-gradient(180deg, var(--bg-dark), var(--bg-darker));
  border-bottom: 1px solid #2a2410;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 12px;
  padding-bottom: 12px;
  flex-wrap: wrap;
}

.site-header .logo {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.site-header .logo img {
  height: 84px;
  width: auto;
}

.site-nav {
  flex: 1 1 auto;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--gold-light);
  font-weight: 600;
}

.header-actions {
  display: flex;
  gap: 10px;
  flex: 0 0 auto;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}

.btn-login {
  background: transparent;
  color: var(--gold-light);
  border: 2px solid var(--gold);
}

.btn-login:hover {
  background: rgba(212, 175, 55, 0.12);
  text-decoration: none;
}

.btn-register {
  background: linear-gradient(180deg, var(--teal), #169c81);
  color: #06251e;
  border: 2px solid var(--teal);
}

.btn-register:hover {
  background: #169c81;
  text-decoration: none;
}

/* === Breadcrumbs === */
.breadcrumbs {
  background: var(--panel);
  border-bottom: 1px solid #232636;
}

.breadcrumbs ol {
  list-style: none;
  margin: 0;
  padding: 10px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 14px;
  color: var(--text-muted);
}

.breadcrumbs li + li::before {
  content: "/";
  margin-right: 6px;
  color: #4a4d5e;
}

.breadcrumbs a {
  color: var(--gold-light);
}

.breadcrumbs [aria-current="page"] {
  color: var(--text-muted);
  font-weight: 600;
}

/* === Hero === */
.hero {
  background: var(--bg-darker);
}

.hero-inner {
  position: relative;
}

.hero-inner img {
  width: 100%;
  height: auto;
  display: block;
}

.hero-text {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 48%;
  display: flex;
  align-items: center;
  padding: 0 5% 0 4%;
}

.hero-text h1 {
  margin: 0;
  font-size: 1.9rem;
  line-height: 1.25;
  color: var(--gold-light);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

/* === Article content === */
main {
  background: #fff;
}

article {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 20px 56px;
}

article h1 {
  font-size: 2rem;
  color: #14161f;
  margin-top: 0;
}

article h2 {
  font-size: 1.5rem;
  color: #14161f;
  margin-top: 2.2em;
  border-bottom: 2px solid var(--gold);
  display: inline-block;
  padding-bottom: 4px;
}

article h3 {
  font-size: 1.2rem;
  color: #25293a;
}

article strong {
  color: #14161f;
}

article table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
  font-size: 15px;
}

article table th,
article table td {
  border: 1px solid #e2e0d8;
  padding: 8px 12px;
  text-align: left;
}

article table th {
  background: var(--bg-darker);
  color: var(--gold-light);
}

/* === TOC accordion === */
.toc {
  background: var(--panel);
  border: 1px solid #2a2e40;
  border-radius: 8px;
  margin: 1.5em 0;
  padding: 0;
}

.toc summary {
  cursor: pointer;
  padding: 14px 18px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--gold-light);
  list-style: none;
  position: relative;
}

.toc summary::-webkit-details-marker {
  display: none;
}

.toc summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 14px;
  font-size: 1.2rem;
  color: var(--teal);
}

.toc[open] summary::after {
  content: "\2212";
}

.toc ol {
  margin: 0;
  padding: 0 18px 16px 36px;
}

.toc li {
  margin-bottom: 6px;
}

.toc a {
  color: #cfd4e6;
}

/* === Footer === */
.site-footer {
  background: linear-gradient(180deg, var(--bg-dark), var(--bg-darker));
  color: var(--text-muted);
  margin-top: 40px;
  border-top: 1px solid #2a2410;
}

.site-footer .wrap {
  padding: 32px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
}

.footer-nav h2 {
  font-size: 1rem;
  color: var(--gold-light);
  margin: 0 0 10px;
}

.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-nav li {
  margin-bottom: 6px;
}

.footer-nav a {
  color: var(--text-muted);
}

.footer-disclaimer {
  flex: 1 1 280px;
  font-size: 13px;
  color: #6f7180;
}

.footer-bottom {
  text-align: center;
  font-size: 13px;
  color: #6f7180;
  padding: 16px 20px;
  border-top: 1px solid #1d2030;
}

/* === Responsive === */
@media (max-width: 768px) {
  .site-header .wrap {
    flex-wrap: nowrap;
    gap: 6px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .site-header .logo img {
    height: 50px;
  }

  .site-nav ul {
    gap: 10px;
  }

  .site-nav a {
    font-size: 13px;
  }

  .header-actions {
    gap: 6px;
  }

  .hero-text {
    width: 56%;
    padding: 0 4% 0 3%;
  }

  .hero-text h1 {
    font-size: 1.05rem;
    line-height: 1.2;
  }

  article h1 {
    font-size: 1.5rem;
  }

  article h2 {
    font-size: 1.25rem;
  }

  .site-footer .wrap {
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .btn {
    padding: 7px 10px;
    font-size: 11px;
  }

  .site-header .logo img {
    height: 34px;
  }

  .site-nav a {
    font-size: 12px;
  }

  .hero-text {
    width: 60%;
  }

  .hero-text h1 {
    font-size: 0.85rem;
  }
}
