:root {
  --bg: #090c24;
  --panel: #12163a;
  --panel-soft: rgba(18, 22, 58, 0.78);
  --text: #f7f8ff;
  --muted: #c7c9e7;
  --line: rgba(255, 255, 255, 0.14);
  --accent: #ffb32c;
  --accent-2: #ff3fa4;
  --link: #80e9ff;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.65;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 8%, rgba(255, 63, 164, 0.18), transparent 30%),
    radial-gradient(circle at 78% 18%, rgba(0, 209, 255, 0.14), transparent 32%),
    var(--bg);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(9, 12, 36, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.header-inner,
.breadcrumbs,
.hero,
main > article,
.site-footer-inner {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.logo img {
  width: 140px;
  height: 40px;
  object-fit: contain;
  object-position: left center;
  display: block;
}

.menu-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.burger {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
  flex: 0 0 auto;
}

.burger span,
.burger span::before,
.burger span::after {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 99px;
  content: "";
}

.burger span {
  position: relative;
}

.burger span::before,
.burger span::after {
  position: absolute;
  left: 0;
}

.burger span::before {
  top: -7px;
}

.burger span::after {
  top: 7px;
}

.main-nav {
  margin-left: auto;
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  flex-wrap: wrap;
}

.main-nav a,
.footer-nav a {
  color: var(--text);
  display: inline-block;
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 0.95rem;
}

.main-nav a:hover,
.footer-nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
}

.main-nav a[aria-current="page"] {
  color: var(--accent);
  font-weight: 700;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  border-color: transparent;
  color: #1b1025;
  background: linear-gradient(135deg, var(--accent), #ffd86b);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
}

/* ---------- Breadcrumbs ---------- */

.breadcrumbs {
  padding: 16px 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.breadcrumbs ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.breadcrumbs li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumbs li + li::before {
  content: "/";
  color: rgba(255, 255, 255, 0.4);
}

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

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

/* ---------- Hero ---------- */

.hero {
  margin-bottom: 34px;
}

.hero-frame {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #080a20;
}

.hero-frame img {
  display: block;
  width: 100%;
  aspect-ratio: 1600 / 700;
  object-fit: cover;
}

.hero-copy {
  position: absolute;
  inset: 0 auto 0 0;
  width: min(58%, 660px);
  padding: clamp(24px, 4vw, 52px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  background: linear-gradient(90deg, rgba(7, 9, 30, 0.9), rgba(7, 9, 30, 0.62) 68%, transparent);
}

.hero-copy h1 {
  margin: 0 0 12px;
  font-size: clamp(1.9rem, 3.4vw, 3.1rem);
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.hero-copy .updated-date {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

.hero-copy p {
  margin: 0 0 20px;
  max-width: 460px;
  color: var(--muted);
  font-size: 1.02rem;
}

.hero-copy .btn {
  align-self: flex-start;
}

/* ---------- Content ---------- */

main {
  padding-bottom: 20px;
}

article {
  min-width: 0;
}

article > p:first-child {
  font-size: 1.08rem;
}

section,
details {
  padding: 24px;
  margin: 0 0 22px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
}

h2 {
  margin: 0 0 14px;
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  line-height: 1.2;
}

h3 {
  margin: 22px 0 10px;
  font-size: 1.15rem;
}

p {
  margin: 0 0 16px;
}

p:last-child {
  margin-bottom: 0;
}

ul,
ol {
  margin: 0 0 16px;
  padding-left: 22px;
}

ul:last-child,
ol:last-child {
  margin-bottom: 0;
}

li {
  margin-bottom: 6px;
}

/* Table of contents accordion */

details.toc summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 1.1rem;
  list-style: none;
}

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

details.toc summary::before {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-right: 10px;
  border-radius: 6px;
  border: 1px solid var(--line);
  color: var(--accent);
  font-weight: 700;
}

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

details.toc ul {
  margin: 18px 0 0;
  padding-left: 20px;
}

details.toc a {
  color: var(--text);
}

/* Article CTA links that stand alone */

article > a.btn,
section > a.btn {
  margin-top: 4px;
}

/* ---------- Footer ---------- */

.site-footer {
  margin-top: 44px;
  border-top: 1px solid var(--line);
  background: rgba(6, 8, 26, 0.72);
}

.site-footer-inner {
  padding: 30px 0;
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 4px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---------- Mobile ---------- */

@media (max-width: 820px) {
  .header-inner,
  .breadcrumbs,
  .hero,
  main > article,
  .site-footer-inner {
    width: min(100% - 24px, var(--max));
  }

  .header-inner {
    min-height: 64px;
    display: grid;
    grid-template-columns: minmax(96px, 1fr) 38px auto;
    gap: 8px;
  }

  .logo img {
    width: 116px;
    height: 34px;
  }

  .burger {
    display: inline-flex;
    order: 1;
    justify-self: center;
  }

  .header-actions {
    order: 2;
    gap: 4px;
    justify-self: end;
  }

  .header-actions .btn {
    min-width: 70px;
    min-height: 34px;
    padding: 6px 5px;
    font-size: 0.7rem;
  }

  .header-actions .btn-primary {
    min-width: 82px;
  }

  .main-nav {
    display: none;
    order: 3;
    grid-column: 1 / -1;
    margin: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #10143a;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .main-nav a {
    padding: 12px 10px;
  }

  .menu-toggle:checked ~ .main-nav {
    display: block;
  }

  .breadcrumbs {
    padding: 12px 0;
  }

  .hero-frame {
    background: var(--panel);
  }

  .hero-frame img {
    aspect-ratio: auto;
    height: auto;
  }

  .hero-copy {
    position: static;
    width: 100%;
    padding: 22px;
    background: var(--panel);
  }

  .hero-copy h1 {
    font-size: clamp(1.4rem, 6.2vw, 1.9rem);
  }

  .hero-copy p {
    max-width: none;
  }

  section,
  details {
    padding: 18px;
  }

  .site-footer-inner {
    text-align: left;
  }
}

@media (max-width: 430px) {
  .header-inner {
    grid-template-columns: minmax(84px, 1fr) 34px auto;
    gap: 5px;
  }

  .logo img {
    width: 98px;
    height: 30px;
  }

  .burger {
    width: 34px;
    height: 34px;
  }

  .header-actions .btn {
    min-width: 56px;
    padding: 6px 3px;
    font-size: 0.62rem;
  }

  .header-actions .btn-primary {
    min-width: 68px;
  }

  .hero-copy {
    padding: 18px;
  }
}
