:root {
  color-scheme: light dark;
  --bg: #fbfbfa;
  --fg: #1f1f1f;
  --muted: #5d5d5d;
  --surface: #ffffff;
  --surface-soft: #f3f5f3;
  --accent: #0f766e;
  --accent-strong: #0b5f59;
  --border: rgba(0, 0, 0, 0.1);
  --shadow: rgba(0, 0, 0, 0.12);
  --code-bg: #eef2f1;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141414;
    --fg: #f2f2f2;
    --muted: #bcbcbc;
    --surface: #1d1d1d;
    --surface-soft: #242826;
    --accent: #5eead4;
    --accent-strong: #99f6e4;
    --border: rgba(255, 255, 255, 0.12);
    --shadow: rgba(0, 0, 0, 0.38);
    --code-bg: #232a28;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.65;
}

a {
  color: var(--accent-strong);
  text-underline-offset: 0.16em;
}

a:hover {
  text-decoration-thickness: 2px;
}

code,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

code {
  background: var(--code-bg);
  border-radius: 4px;
  font-size: 0.92em;
  padding: 0.08em 0.28em;
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow-x: auto;
  padding: 16px;
}

pre code {
  background: transparent;
  padding: 0;
}

.skip-link {
  background: var(--accent);
  color: var(--bg);
  left: 16px;
  padding: 8px 12px;
  position: fixed;
  top: -64px;
  z-index: 10;
}

.skip-link:focus {
  top: 16px;
}

.site-header {
  border-bottom: 1px solid var(--border);
}

.site-nav,
.site-footer,
.page {
  margin: 0 auto;
  max-width: 1080px;
  padding-left: 20px;
  padding-right: 20px;
}

.site-nav {
  align-items: center;
  display: flex;
  gap: 22px;
  justify-content: space-between;
  min-height: 72px;
}

.brand {
  align-items: center;
  color: var(--fg);
  display: inline-flex;
  font-weight: 750;
  gap: 10px;
  text-decoration: none;
}

.brand img {
  border-radius: 8px;
  box-shadow: 0 6px 16px var(--shadow);
  height: 34px;
  width: 34px;
}

.nav-links {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: flex-end;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.94rem;
  text-decoration: none;
}

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

.page {
  padding-bottom: 72px;
  padding-top: 38px;
}

.breadcrumbs {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 26px;
}

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

.breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin-left: 8px;
}

.breadcrumbs a {
  color: inherit;
}

.hero {
  align-items: center;
  display: grid;
  gap: 42px;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  margin: 22px 0 64px;
}

.hero-copy {
  min-width: 0;
}

.hero-visual {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 22px 60px var(--shadow);
  overflow: hidden;
}

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

.kicker {
  color: var(--accent-strong);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 0 0 10px;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  line-height: 1.15;
}

h1 {
  font-size: clamp(2.25rem, 6vw, 4.35rem);
  letter-spacing: -0.025em;
  margin: 0 0 18px;
}

.article-header h1 {
  font-size: clamp(2.1rem, 5vw, 3.5rem);
  max-width: 820px;
}

h2 {
  font-size: clamp(1.55rem, 3vw, 2rem);
  margin: 48px 0 14px;
}

h3 {
  font-size: 1.08rem;
  margin: 0 0 8px;
}

.lede {
  color: var(--muted);
  font-size: 1.16rem;
  margin: 0 0 24px;
  max-width: 760px;
}

.actions,
.facts {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.actions {
  margin: 24px 0 18px;
}

.button {
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  text-decoration: none;
}

.button.primary {
  background: var(--accent);
  border-color: transparent;
  color: var(--bg);
}

.button.secondary {
  background: var(--surface);
  color: var(--fg);
}

.facts {
  color: var(--muted);
  font-size: 0.92rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.facts li {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 10px;
}

.section-intro {
  color: var(--muted);
  margin: 0 0 20px;
  max-width: 780px;
}

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card,
.band,
.document,
.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.card {
  padding: 20px;
}

.card p,
.card li {
  color: var(--muted);
}

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

.card-link {
  color: var(--fg);
  display: block;
  text-decoration: none;
}

.card-link h3 {
  color: var(--accent-strong);
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.band {
  background: var(--surface-soft);
  margin-top: 48px;
  padding: 24px;
}

.split {
  align-items: start;
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 380px);
}

.split h2 {
  margin-top: 0;
}

.article-layout {
  align-items: start;
  display: grid;
  gap: 34px;
  grid-template-columns: minmax(0, 1fr) 250px;
}

.document {
  padding: 30px;
}

.document > :first-child,
.document section > :first-child {
  margin-top: 0;
}

.document p,
.document li {
  color: var(--muted);
}

.document strong {
  color: var(--fg);
}

.document section {
  scroll-margin-top: 24px;
}

.toc {
  padding: 18px;
  position: sticky;
  top: 20px;
}

.toc h2 {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  margin: 0 0 10px;
  text-transform: uppercase;
}

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

.toc li + li {
  margin-top: 7px;
}

.toc a {
  color: var(--muted);
  font-size: 0.92rem;
}

.note {
  background: var(--surface-soft);
  border-left: 3px solid var(--accent);
  margin: 20px 0;
  padding: 14px 16px;
}

.note p {
  margin: 0;
}

.table-wrap {
  overflow-x: auto;
}

.shortcut-table {
  border-collapse: collapse;
  margin: 0 0 20px;
  width: 100%;
}

.shortcut-table th,
.shortcut-table td {
  border-bottom: 1px solid var(--border);
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

.shortcut-table th {
  color: var(--fg);
  font-size: 0.86rem;
}

.shortcut-table td:first-child {
  color: var(--fg);
  font-weight: 650;
  white-space: nowrap;
  width: 34%;
}

.step-list {
  counter-reset: steps;
  list-style: none;
  padding: 0;
}

.step-list > li {
  counter-increment: steps;
  padding-left: 42px;
  position: relative;
}

.step-list > li + li {
  margin-top: 18px;
}

.step-list > li::before {
  align-items: center;
  background: var(--accent);
  border-radius: 50%;
  color: var(--bg);
  content: counter(steps);
  display: flex;
  font-size: 0.84rem;
  font-weight: 800;
  height: 28px;
  justify-content: center;
  left: 0;
  position: absolute;
  top: 0;
  width: 28px;
}

.site-footer-wrap {
  border-top: 1px solid var(--border);
}

.site-footer {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.92rem;
  gap: 14px;
  justify-content: space-between;
  padding-bottom: 28px;
  padding-top: 24px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links a {
  color: inherit;
}

@media (max-width: 820px) {
  .hero,
  .split,
  .article-layout {
    grid-template-columns: 1fr;
  }

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

  .toc {
    position: static;
  }
}

@media (max-width: 620px) {
  .site-nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 16px;
    padding-top: 16px;
  }

  .nav-links {
    gap: 12px 16px;
    justify-content: flex-start;
  }

  .page {
    padding-top: 28px;
  }

  .document {
    border-left: 0;
    border-radius: 0;
    border-right: 0;
    margin-left: -20px;
    margin-right: -20px;
    padding: 24px 20px;
  }
}

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