:root {
  --background: #111213;
  --surface: #1a1b21;
  --border: #343641;
  --font-color: #ffffff;
  --headers: #ffffff;
  --link: #5aef9f;
  --link-hover: #5dffc9;
  --button: #51fe9e;
  --button-hover: #9affd5;
  --button-text: #1f2028;
  --accent: #22d6e4;
  --muted: rgba(255, 255, 255, 0.72);
  --font-family: Poppins, sans-serif;
  --radius: 14px;
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  margin: 0;
  background: var(--background);
  color: var(--font-color);
  font-family: var(--font-family);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--link); text-decoration: none; }
a:hover, a:focus-visible { color: var(--link-hover); text-decoration: underline; }

h1, h2, h3 { color: var(--headers); font-weight: 700; line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1.1em; }
strong { color: var(--headers); }
code {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: .08em .38em;
  font-size: .92em;
}

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }

.skip-link {
  position: absolute;
  left: -9999px;
  background: var(--button);
  color: var(--button-text);
  padding: .6rem 1rem;
  border-radius: var(--radius);
}
.skip-link:focus { left: 1rem; top: 1rem; z-index: 20; }

.btn {
  display: inline-block;
  border-radius: 999px;
  padding: .72rem 1.5rem;
  font-weight: 600;
  text-align: center;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.btn:hover, .btn:focus-visible { text-decoration: none; }
.btn-primary { background: var(--button); color: var(--button-text); }
.btn-primary:hover, .btn-primary:focus-visible { background: var(--button-hover); color: var(--button-text); }
.btn-secondary { border: 1px solid var(--border); color: var(--headers); }
.btn-secondary:hover, .btn-secondary:focus-visible { border-color: var(--accent); color: var(--headers); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(17, 18, 19, .94);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}
.site-header .wrap { width: min(100% - 2rem, 1280px); }
.header-inner {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: .8rem 0;
  flex-wrap: wrap;
}
.brand { flex: 0 0 auto; }
.site-nav { flex: 1 1 auto; }
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem .95rem;
  list-style: none;
  margin: 0;
  padding: 0;
  justify-content: center;
}
.site-nav a { color: var(--font-color); font-size: .88rem; white-space: nowrap; }
.site-nav a:hover, .site-nav a:focus-visible { color: var(--link-hover); }
.site-nav a[aria-current="page"] { color: var(--accent); }
.header-actions { display: flex; gap: .6rem; flex: 0 0 auto; }
.header-actions .btn { padding: .5rem 1rem; font-size: .85rem; white-space: nowrap; }
.nav-toggle {
  display: none;
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--headers);
  font: inherit;
  font-size: .9rem;
  padding: .45rem 1rem;
  cursor: pointer;
}

.hero { padding: 3rem 0 1.5rem; text-align: center; }
.hero h1 { margin: 0 auto; max-width: 22ch; max-width: 28ch; }

.promo { padding: 1rem 0 2.5rem; }
.promo-inner {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 1.5rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  overflow: hidden;
  padding: 2rem 0 2rem 2rem;
}
.promo-copy h2 { font-size: clamp(1.3rem, 2.4vw, 1.9rem); }
.promo-image { width: 100%; height: 100%; object-fit: cover; border-radius: 16px 0 0 16px; }

.badge {
  display: inline-block;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .3rem .85rem;
  font-size: .82rem;
  color: var(--muted);
  margin: 0 0 .9rem;
}
.badge-accent { border-color: var(--accent); color: var(--accent); }

.intro { padding: 1rem 0 2rem; }
.intro .prose { max-width: 72ch; }
.intro-action { margin-top: 1.4rem; text-align: center; }

.toc { padding: 0 0 2.5rem; }
.toc .wrap > h2 { font-size: 1.1rem; margin-bottom: .8rem; }
.toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.toc li + li { border-top: 1px solid var(--border); }
.toc a { display: block; padding: .8rem 1.1rem; color: var(--font-color); font-size: .96rem; }
.toc a:hover, .toc a:focus-visible { color: var(--link-hover); }

.section-bar {
  background: linear-gradient(90deg, var(--surface), rgba(34, 214, 228, .18));
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: .7rem 1.1rem;
  margin-bottom: 1.2rem;
}

.content-section, .showcase, .faq, .colophon { padding: 0 0 2.6rem; }
.prose { max-width: 78ch; }
.prose-list { margin: 0 0 1.2em; padding-left: 1.25rem; }
.prose-list li { margin-bottom: .55em; }

.table-scroll { overflow-x: auto; margin: 0 0 1.4em; border: 1px solid var(--border); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; min-width: 34rem; font-size: .95rem; }
th, td { text-align: left; padding: .75rem 1rem; border-bottom: 1px solid var(--border); vertical-align: top; }
thead th { background: var(--surface); color: var(--headers); font-weight: 600; white-space: nowrap; }
tbody th { color: var(--headers); font-weight: 600; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }

.section-figure { margin: 1.6rem 0 0; }
.section-figure img { border: 1px solid var(--border); border-radius: var(--radius); width: 100%; }
.section-figure figcaption { color: var(--muted); font-size: .85rem; padding-top: .55rem; }

.card-grid {
  list-style: none;
  margin: 1.4rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .18s ease;
}
.card:hover { border-color: var(--accent); }
.card a { display: block; color: var(--font-color); height: 100%; }
.card a:hover, .card a:focus-visible { text-decoration: none; }
.card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.card h3 { margin: 0; padding: .9rem 1rem .3rem; font-size: 1rem; color: var(--link); }
.card p { margin: 0; padding: 0 1rem 1.1rem; font-size: .9rem; color: var(--muted); }

.faq-list { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.faq-item + .faq-item { border-top: 1px solid var(--border); }
.faq-item summary {
  cursor: pointer;
  padding: 1rem 1.2rem;
  font-weight: 600;
  color: var(--headers);
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--accent); font-weight: 700; }
.faq-item[open] summary::after { content: "–"; }
.faq-answer { padding: 0 1.2rem .4rem; }
.faq-answer p:last-child { margin-bottom: 1rem; }

.colophon-list { margin: 0; }
.colophon-row {
  display: grid;
  grid-template-columns: 10rem 1fr;
  gap: 1rem;
  padding: .9rem 0;
  border-bottom: 1px solid var(--border);
}
.colophon-row:last-child { border-bottom: 0; }
.colophon-row dt { color: var(--headers); font-weight: 600; }
.colophon-row dd { margin: 0; color: var(--muted); }

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 2.5rem 0 3rem;
  text-align: center;
}
.footer-logo { margin: 0 auto 1.2rem; }
.badges, .footer-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem .9rem;
  justify-content: center;
  margin: 0 0 1.2rem;
  padding: 0;
}
.footer-nav a { color: var(--font-color); font-size: .93rem; }
.footer-note { color: var(--muted); font-size: .88rem; max-width: 70ch; margin: 0 auto 1rem; }
.copyright { color: var(--muted); font-size: .85rem; margin: 0; }

@media (min-width: 761px) {
  .header-inner { flex-wrap: nowrap; }
}

@media (max-width: 1150px) and (min-width: 761px) {
  .header-actions .btn-secondary { display: none; }
}

@media (max-width: 900px) {
  .promo-inner { grid-template-columns: 1fr; padding: 1.5rem; }
  .promo-image { border-radius: var(--radius); }
  .colophon-row { grid-template-columns: 1fr; gap: .2rem; }
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-block; order: 2; }
  .site-nav { flex: 1 0 100%; display: none; order: 4; }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; justify-content: flex-start; gap: 0; }
  .site-nav li + li { border-top: 1px solid var(--border); }
  .site-nav a { display: block; padding: .7rem 0; }
  .header-actions { order: 3; flex: 1 0 100%; }
  .header-actions .btn { flex: 1 1 0; }
  body { font-size: 16px; }
}
