:root {
  color-scheme: dark;
  --black: #000;
  --ink: #080808;
  --panel: #0d0d0d;
  --line: #282828;
  --white: #f7f7f3;
  --muted: #a4a4a4;
  --volt: #ccff00;
  --page: 1180px;
  --article: 720px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--black);
  color: var(--white);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: clip;
  background: var(--black);
}

body.menu-open {
  overflow: hidden;
}

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

a,
button,
summary {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--volt);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  background: var(--volt);
  color: var(--black);
  font-weight: 900;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 160ms var(--ease);
}

.skip-link:focus {
  transform: none;
}

.content-header {
  position: sticky;
  z-index: 100;
  top: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.94);
  backdrop-filter: blur(18px);
}

.content-nav {
  width: min(var(--page), calc(100% - 48px));
  min-height: 76px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
}

.brand {
  width: max-content;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--white);
  font-size: 22px;
  font-weight: 950;
  text-decoration: none;
}

.brand span {
  color: var(--volt);
}

.desktop-links {
  display: flex;
  gap: 22px;
}

.desktop-links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: #999;
  font-size: 11px;
  font-weight: 850;
  text-decoration: none;
  transition: color 160ms ease;
}

.desktop-links a[aria-current="page"],
.desktop-links a:hover {
  color: var(--white);
}

.nav-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.nav-actions > a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid #363636;
  color: var(--white);
  font-size: 10px;
  font-weight: 950;
  text-decoration: none;
}

.nav-actions .play-link {
  border-color: var(--volt);
  background: var(--volt);
  color: var(--black);
}

.menu-button {
  width: 44px;
  height: 44px;
  display: none;
  padding: 12px 9px;
  border: 0;
  background: transparent;
  color: var(--white);
}

.menu-button span {
  width: 100%;
  height: 2px;
  display: block;
  margin: 6px 0;
  background: currentColor;
  transition: transform 180ms var(--ease);
}

.menu-button[aria-expanded="true"] span:first-child {
  transform: translateY(4px) rotate(45deg);
}

.menu-button[aria-expanded="true"] span:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

.content-menu {
  position: fixed;
  z-index: 99;
  inset: 76px 0 0;
  padding: 28px 24px max(28px, env(safe-area-inset-bottom));
  overflow: auto;
  background: var(--black);
}

.content-menu a {
  min-height: 56px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  color: var(--white);
  font-size: 22px;
  font-weight: 900;
  text-decoration: none;
}

.content-menu a:last-child {
  margin-top: 20px;
  justify-content: center;
  border: 1px solid var(--volt);
  background: var(--volt);
  color: var(--black);
  font-size: 11px;
}

.breadcrumbs {
  width: min(var(--page), calc(100% - 48px));
  margin: 0 auto;
  min-height: 52px;
  padding: 8px 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  color: #777;
  font-size: 10px;
  font-weight: 800;
}

.breadcrumbs a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: #aaa;
  text-decoration: none;
}

.breadcrumbs span {
  margin: 0 8px;
}

.article-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.article-hero::before {
  position: absolute;
  inset: 0;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 72px 72px;
  pointer-events: none;
}

.article-hero-inner {
  position: relative;
  width: min(var(--page), calc(100% - 48px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  align-items: end;
  gap: 48px;
  padding: 40px 0 48px;
}

.article-kicker,
.section-kicker {
  margin: 0;
  color: var(--volt);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.article-hero h1 {
  max-width: 14ch;
  margin: 14px 0 16px;
  font-size: clamp(42px, 7vw, 78px);
  font-weight: 950;
  line-height: 0.94;
  letter-spacing: -0.03em;
}

.article-hero-copy > p:not(.article-kicker) {
  max-width: 38rem;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.hero-index {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  min-height: 0;
  padding: 22px;
  border: 1px solid var(--line);
  background: var(--ink);
}

.hero-index > span {
  color: var(--volt);
  font-size: 10px;
  font-weight: 950;
}

.hero-index strong {
  max-width: 18ch;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.hero-index ul {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.hero-index li {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  color: #a8a8a8;
  font-size: 12px;
}

.hero-index li b {
  color: var(--white);
  text-align: right;
}

.article-layout {
  width: min(var(--page), calc(100% - 48px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 180px minmax(0, var(--article));
  justify-content: space-between;
  gap: 56px;
  padding: 48px 0 72px;
}

.toc {
  position: sticky;
  top: 96px;
  align-self: start;
}

.toc > span {
  display: block;
  margin-bottom: 12px;
  color: #858585;
  font-size: 9px;
  font-weight: 950;
}

.toc a {
  min-height: 34px;
  display: flex;
  align-items: center;
  border-top: 1px solid var(--line);
  color: #999;
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
  transition: color 160ms ease;
}

.toc a:last-child {
  border-bottom: 1px solid var(--line);
}

.toc a:hover {
  color: var(--volt);
}

.article-body > section {
  padding: 40px 0;
  border-top: 1px solid var(--line);
}

.article-body > section:first-child {
  padding-top: 0;
  border-top: 0;
}

.article-body h2 {
  margin: 10px 0 18px;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 950;
  line-height: 1;
  letter-spacing: -0.03em;
}

.article-body h3 {
  margin: 24px 0 10px;
  font-size: 20px;
  line-height: 1.15;
}

.article-body p,
.article-body li {
  color: #b1b1b1;
  font-size: 15px;
  line-height: 1.65;
}

.article-body p {
  margin: 0 0 14px;
}

.article-body a {
  color: var(--white);
  text-underline-offset: 3px;
}

.article-body strong {
  color: var(--white);
}

.article-body ul,
.article-body ol {
  margin: 14px 0 0;
  padding-left: 1.15em;
}

.article-body li + li {
  margin-top: 8px;
}

.key-answer {
  margin: 18px 0 20px;
  padding: 16px 18px;
  border-left: 3px solid var(--volt);
  background: var(--panel);
}

.key-answer span {
  display: block;
  margin-bottom: 6px;
  color: var(--volt);
  font-size: 9px;
  font-weight: 950;
}

.key-answer p {
  margin: 0;
  color: var(--white);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.4;
}

.rule-grid,
.related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 18px 0 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.rule-grid article,
.related-grid a {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: flex-start;
  padding: 18px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--ink);
}

.related-grid a {
  color: inherit;
  text-decoration: none;
  transition: background 160ms ease;
}

.related-grid a:hover {
  background: #0f0f0f;
}

.rule-grid span,
.related-grid span {
  color: var(--volt);
  font-size: 9px;
  font-weight: 950;
}

.rule-grid h3,
.related-grid h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.15;
}

.rule-grid p,
.related-grid p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.faq-list {
  margin-top: 16px;
  border-top: 1px solid var(--line);
}

.faq-list details {
  border-bottom: 1px solid var(--line);
}

.faq-list summary {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  color: var(--white);
  cursor: pointer;
  font-size: 15px;
  font-weight: 850;
  list-style: none;
}

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

.faq-list summary::after {
  flex: none;
  color: var(--volt);
  content: "+";
  font-size: 20px;
}

.faq-list details[open] summary::after {
  content: "−";
}

.faq-list details p {
  margin: 0;
  padding: 0 36px 16px 0;
  font-size: 14px;
}

.article-cta {
  padding: 56px 0;
  background: var(--volt);
  color: var(--black);
}

.article-cta-inner {
  width: min(var(--page), calc(100% - 48px));
  margin: 0 auto;
}

.article-cta .section-kicker {
  color: #3d4d00;
}

.article-cta h2 {
  max-width: 14ch;
  margin: 10px 0 14px;
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 950;
  line-height: 0.94;
  letter-spacing: -0.03em;
}

.article-cta p {
  max-width: 36rem;
  margin: 0 0 24px;
  color: #2a3300;
  font-size: 15px;
}

.cta-row {
  max-width: 420px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.cta-row a {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid var(--black);
  color: var(--black);
  font-size: 10px;
  font-weight: 950;
  text-decoration: none;
}

.cta-row a:first-child {
  background: var(--black);
  color: var(--volt);
}

.content-footer {
  width: min(var(--page), calc(100% - 48px));
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px 32px;
  padding: 36px 0 calc(36px + env(safe-area-inset-bottom));
}

.content-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 18px;
}

.content-footer nav a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding-inline: 1px;
  color: #8f8f8f;
  font-size: 10px;
  font-weight: 800;
  text-decoration: none;
}

.content-footer > p {
  width: 100%;
  margin: 0;
  color: #858585;
  font-size: 11px;
  line-height: 1.45;
}

.content-footer .lang-toggle {
  order: 3;
}

@media (max-width: 980px) {
  .content-nav {
    grid-template-columns: 1fr auto;
    width: min(var(--page), calc(100% - 32px));
  }

  .desktop-links {
    display: none;
  }

  .menu-button {
    display: block;
  }

  .breadcrumbs,
  .article-hero-inner,
  .article-layout,
  .article-cta-inner,
  .content-footer {
    width: min(var(--page), calc(100% - 32px));
  }

  .article-hero-inner {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 28px 0 32px;
  }

  .article-layout {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 32px 0 56px;
  }

  .toc {
    position: static;
    display: flex;
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-bottom: 1px solid var(--line);
  }

  .toc::-webkit-scrollbar {
    display: none;
  }

  .toc > span {
    display: none;
  }

  .toc a {
    flex: none;
    min-height: 40px;
    padding: 0 12px;
    border: 0;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
  }

  .toc a:last-child {
    border-bottom: 2px solid transparent;
  }

  .rule-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .article-cta {
    padding: 40px 0;
  }
}

@media (max-width: 600px) {
  .content-nav,
  .breadcrumbs,
  .article-hero-inner,
  .article-layout,
  .article-cta-inner,
  .content-footer {
    width: calc(100% - 28px);
  }

  .content-nav {
    min-height: 64px;
    gap: 12px;
  }

  .brand {
    font-size: 20px;
  }

  .nav-actions .play-link {
    padding: 0 14px;
  }

  .article-hero h1 {
    max-width: none;
    margin: 12px 0 12px;
    font-size: clamp(36px, 11vw, 48px);
  }

  .article-hero-copy > p:not(.article-kicker) {
    font-size: 14px;
  }

  .hero-index {
    padding: 16px;
  }

  .hero-index strong {
    font-size: 22px;
  }

  .article-body > section {
    padding: 28px 0;
  }

  .article-body h2 {
    font-size: clamp(26px, 8vw, 34px);
  }

  .article-body p,
  .article-body li {
    font-size: 14px;
  }

  .key-answer {
    padding: 14px;
  }

  .key-answer p {
    font-size: 15px;
  }

  .rule-grid article,
  .related-grid a {
    padding: 16px;
  }

  .cta-row {
    max-width: none;
    grid-template-columns: 1fr;
  }

  .content-footer {
    padding-top: 28px;
  }

  .content-footer nav {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
