:root {
  color-scheme: dark;

  --bg: #0d1117;
  --bg-alt: #121821;
  --surface: #151c26;
  --text: #d5dce6;
  --muted: #9ba6b6;
  --heading: #ffffff;
  --border: #253041;
  --accent: #34d399;
  --link: #5eead4;
  --link-hover: #99f6e4;
  --focus: #fbbf24;

  --cta: #34d399;
  --cta-hover: #6ee7b7;
  --cta-text: #052e1f;

  --header-bg: #0d1117;
  --header-text: #ffffff;
  --header-muted: #b7c0cd;
  --header-hover: #1b2431;
  --header-border: #1f2835;
  --header-border-width: 1px;

  --hero-bg: #0d1117;
  --hero-text: #e6ebf2;
  --hero-heading: #ffffff;
  --hero-muted: #a9b3c2;

  --th-bg: #1b2431;
  --th-text: #6ee7b7;
  --row-alt: #18202b;

  --info-bg: #11261f;
  --info-text: #c9f2e1;
  --warn-bg: #2a2110;
  --warn-text: #fde3a7;
  --warn-border: #fbbf24;

  --footer-bg: #090c11;
  --footer-text: #c3cbd6;
  --footer-heading: #ffffff;
  --footer-muted: #8792a3;
  --footer-border: #1f2835;

  --font-body: "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-heading: ui-rounded, "SF Pro Rounded", "Segoe UI Variable Display", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
  --heading-weight: 800;
  --fs-base: 1.0625rem;

  --container: 1280px;
  --content: 1280px;
  --gutter: clamp(12px, 3vw, 40px);
  --radius: 12px;
  --radius-lg: 16px;
  --nav-radius: 999px;
  --btn-radius: 999px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--link-hover);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

h1,
h2,
h3 {
  margin: 0 0 1rem;
  font-family: var(--font-heading);
  font-weight: var(--heading-weight);
  line-height: 1.2;
  color: var(--heading);
  text-wrap: balance;
}

h1 {
  font-size: clamp(1.9rem, 1.3rem + 2.6vw, 3.1rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.5rem, 1.2rem + 1.1vw, 2.1rem);
  letter-spacing: -0.01em;
}

h3 {
  margin-top: 2rem;
  font-size: clamp(1.15rem, 1.05rem + 0.45vw, 1.4rem);
}

p {
  margin: 0 0 1.1rem;
}

ul,
ol {
  margin: 0 0 1.25rem;
  padding-left: 1.35rem;
}

li {
  margin-bottom: 0.5rem;
  padding-left: 0.2rem;
}

li::marker {
  color: var(--accent);
  font-weight: 700;
}

strong {
  color: var(--heading);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 0;
  left: -9999px;
  z-index: 1000;
  padding: 0.75rem 1rem;
  background: var(--cta);
  color: var(--cta-text);
  font-weight: 700;
}

.skip-link:focus {
  left: 0;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.site-header {
  background: var(--header-bg);
  border-bottom: var(--header-border-width) solid var(--header-border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 72px;
}

.site-logo {
  display: inline-flex;
  flex-shrink: 0;
  line-height: 0;
}

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

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

.site-nav__list {
  display: flex;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav__list li {
  margin: 0;
  padding: 0;
}

.site-nav__list a {
  display: block;
  padding: 0.55rem 0.95rem;
  border-radius: var(--nav-radius);
  color: var(--header-muted);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.site-nav__list a:hover,
.site-nav__list a.is-active {
  background: var(--header-hover);
  color: var(--header-text);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 0;
  border: 1px solid var(--header-border);
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
}

.nav-toggle__icon,
.nav-toggle__icon::before,
.nav-toggle__icon::after {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--header-text);
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.nav-toggle__icon {
  position: relative;
}

.nav-toggle__icon::before,
.nav-toggle__icon::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle__icon::before {
  top: -6px;
}

.nav-toggle__icon::after {
  top: 6px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__icon {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__icon::before {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__icon::after {
  transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 880px) {
  .site-header__inner {
    flex-wrap: wrap;
    gap: 0 1rem;
    min-height: 64px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    order: 3;
    width: 100%;
    margin: 0;
    border-top: 1px solid var(--header-border);
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav__list {
    flex-direction: column;
    gap: 0;
    padding-block: 0.5rem;
  }

  .site-nav__list a {
    padding: 0.8rem 0.5rem;
    font-size: 1rem;
  }
}

.hero {
  background: var(--hero-bg);
  color: var(--hero-text);
  padding-block: clamp(2.5rem, 2rem + 4vw, 5rem);
}

.hero h1 {
  color: var(--hero-heading);
}

.hero__eyebrow {
  display: inline-block;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero__subtitle {
  max-width: 50rem;
  margin-bottom: 1.25rem;
  color: var(--hero-muted);
  font-size: clamp(1.05rem, 1rem + 0.35vw, 1.25rem);
}

.post-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0 0 1.75rem;
  color: var(--hero-muted);
  font-size: 0.9rem;
}

.post-dates time {
  color: var(--hero-text);
  font-weight: 700;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 50px;
  padding: 0.75rem 1.6rem;
  border: 0;
  border-radius: var(--btn-radius);
  background: var(--cta);
  color: var(--cta-text);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.btn:hover {
  background: var(--cta-hover);
  color: var(--cta-text);
}

.btn:active {
  transform: translateY(1px);
}

.page {
  padding-block: clamp(2rem, 1.5rem + 2.5vw, 3.5rem) 0;
}

.content {
  min-width: 0;
  max-width: var(--content);
}

.section > :last-child {
  margin-bottom: 0;
}

.toc__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.toc__title::-webkit-details-marker {
  display: none;
}

.toc__title::after {
  content: "";
  flex-shrink: 0;
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-3px) rotate(45deg);
  transition: transform 0.2s ease;
}

.toc__details[open] > .toc__title::after {
  transform: translateY(2px) rotate(-135deg);
}

.toc ol {
  margin: 0;
}

.toc li {
  margin-bottom: 0.35rem;
}

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

.toc a:hover,
.toc a.is-active {
  color: var(--link);
}

.toc a.is-active {
  font-weight: 700;
}

.toplist {
  margin-block: 1.75rem 0;
}

.toplist:empty {
  display: none;
}

.callout {
  margin-block: 1.75rem;
  padding: 1.25rem 1.5rem;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--info-bg);
  color: var(--info-text);
}

.callout__title {
  margin: 0 0 0.4rem;
  color: inherit;
  font-weight: 700;
}

.callout p:last-child,
.callout ul:last-child {
  margin-bottom: 0;
}

.callout--warning {
  border-left-color: var(--warn-border);
  background: var(--warn-bg);
  color: var(--warn-text);
}

.table-wrap {
  margin-block: 1.75rem;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  line-height: 1.5;
}

.data-table caption {
  padding: 0.9rem 1.1rem;
  color: var(--muted);
  font-size: 0.875rem;
  text-align: left;
}

.data-table th,
.data-table td {
  padding: 0.85rem 1.1rem;
  border-top: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.data-table thead th {
  border-top: 0;
  background: var(--th-bg);
  color: var(--th-text);
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
}

.data-table tbody tr:nth-child(even) {
  background: var(--row-alt);
}

.data-table td:first-child {
  color: var(--heading);
  font-weight: 700;
}

@media (max-width: 640px) {
  .table-wrap {
    overflow: hidden;
  }

  .data-table,
  .data-table tbody,
  .data-table tr,
  .data-table td,
  .data-table caption {
    display: block;
    width: 100%;
  }

  .data-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .data-table tr {
    padding-block: 0.6rem;
    border-top: 1px solid var(--border);
  }

  .data-table td {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.3rem 1rem;
    border: 0;
    text-align: right;
  }

  .data-table td::before {
    content: attr(data-label);
    flex: 0 0 42%;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 600;
    text-align: left;
  }

  .data-table td:first-child {
    justify-content: flex-start;
    padding-block: 0.35rem 0.5rem;
    font-size: 1.05rem;
    text-align: left;
  }

  .data-table td:first-child::before {
    display: none;
  }
}

.glossary {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 1rem;
  margin: 1.5rem 0 0;
}

.glossary > div {
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.glossary dt {
  margin-bottom: 0.25rem;
  color: var(--heading);
  font-weight: 700;
}

.glossary dd {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.faq {
  margin-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 0;
  color: var(--heading);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  list-style: none;
  cursor: pointer;
}

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

.faq-item summary::after {
  content: "";
  flex: 0 0 22px;
  height: 22px;
  background:
    linear-gradient(var(--accent), var(--accent)) center / 14px 2px no-repeat,
    linear-gradient(var(--accent), var(--accent)) center / 2px 14px no-repeat;
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  background: linear-gradient(var(--accent), var(--accent)) center / 14px 2px no-repeat;
}

.faq-item summary:hover {
  color: var(--link);
}

.faq-item__answer {
  padding-bottom: 1.15rem;
  color: var(--muted);
}

.faq-item__answer p:last-child {
  margin-bottom: 0;
}

.site-footer {
  margin-top: clamp(2.5rem, 2rem + 3vw, 4.5rem);
  padding-block: clamp(2.5rem, 2rem + 2vw, 3.5rem) 2rem;
  background: var(--footer-bg);
  color: var(--footer-text);
  font-size: 0.95rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer-brand__name {
  margin-bottom: 0.5rem;
  color: var(--footer-heading);
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
}

.footer-brand p:last-child {
  color: var(--footer-muted);
  font-size: 0.9rem;
}

.footer-grid__title {
  margin: 0 0 0.75rem;
  color: var(--footer-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.footer-grid li {
  margin: 0;
  padding: 0;
}

.footer-grid a {
  display: inline-block;
  padding-block: 0.3rem;
  color: var(--footer-text);
  text-decoration: none;
}

.footer-grid a:hover {
  color: var(--footer-heading);
  text-decoration: underline;
}

.site-footer__bottom {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--footer-border);
  color: var(--footer-muted);
  font-size: 0.85rem;
}

.site-footer__bottom p:last-child {
  margin-bottom: 0;
}

.footer-slogan {
  margin-bottom: 0.5rem;
  color: var(--footer-heading);
  font-size: 0.95rem;
  font-weight: 700;
}

.footer-age-badge {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 2px solid var(--footer-heading);
  border-radius: 50%;
  color: var(--footer-heading);
  font-size: 0.8rem;
  font-weight: 800;
}

@media (max-width: 560px) {
  .site-footer__bottom {
    flex-direction: column;
  }
}

@media print {
  .site-header,
  .toc,
  .site-footer,
  .btn {
    display: none;
  }
}

main [id] {
  scroll-margin-top: 84px;
}

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(42rem 24rem at 12% 0%, rgba(52, 211, 153, 0.18), transparent 65%),
    radial-gradient(40rem 26rem at 95% 20%, rgba(99, 102, 241, 0.2), transparent 65%),
    #0d1117;
}

.hero__eyebrow {
  padding: 0.35rem 0.85rem;
  border: 1px solid rgba(52, 211, 153, 0.4);
  border-radius: 999px;
  color: #6ee7b7;
}

.hero h1 {
  max-width: 22ch;
  font-size: clamp(2.1rem, 1.3rem + 3.4vw, 3.75rem);
  line-height: 1.08;
}

.hero h1 span {
  background: linear-gradient(90deg, #34d399, #5eead4 60%, #a5b4fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin: 2.25rem 0 0;
  padding: 0;
  list-style: none;
}

.hero__facts li {
  margin: 0;
  padding: 1rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(21, 28, 38, 0.7);
}

@media (min-width: 720px) {
  .hero__facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.hero__facts strong {
  display: block;
  color: #6ee7b7;
  font-family: var(--font-heading);
  font-size: 1.3rem;
}

.hero__facts span {
  color: var(--hero-muted);
  font-size: 0.92rem;
}

.toc {
  position: sticky;
  top: 0;
  z-index: 40;
  border-block: 1px solid var(--border);
  background: rgba(13, 17, 23, 0.94);
}

@supports (backdrop-filter: blur(8px)) {
  .toc {
    background: rgba(13, 17, 23, 0.8);
    backdrop-filter: blur(10px);
  }
}

.toc ol {
  position: relative;
  display: flex;
  gap: 0.5rem;
  padding: 0.7rem 48px 0.7rem 0;
  overflow-x: auto;
  list-style: none;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.toc .container {
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent);
}

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

.toc li {
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
}

.toc a {
  display: block;
  padding: 0.5rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
}

.toc a:hover {
  border-color: #3a4a60;
  color: var(--heading);
}

.toc a.is-active {
  border-color: var(--accent);
  background: rgba(52, 211, 153, 0.12);
  color: #6ee7b7;
  font-weight: 600;
}

.section {
  margin-bottom: 1.25rem;
  padding: clamp(1.25rem, 0.75rem + 2.5vw, 2.75rem);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.section h2 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section h2::before {
  content: "";
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(52, 211, 153, 0.15);
}

.table-wrap {
  background: var(--bg-alt);
}

.glossary > div {
  background: var(--bg-alt);
}

.callout {
  border-radius: var(--radius);
  border-left-width: 3px;
}

.faq-item summary:hover {
  color: #6ee7b7;
}
