:root {
  color-scheme: light dark;
  --background: #f7f6f2;
  --background-glow: rgba(111, 175, 123, 0.18);
  --surface: rgba(255, 255, 255, 0.76);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --surface-muted: rgba(244, 242, 238, 0.76);
  --text: #1c1c22;
  --text-secondary: #5e5a63;
  --border: rgba(28, 28, 34, 0.1);
  --brand: #e84e6a;
  --brand-strong: #c83b56;
  --positive: #6faf7b;
  --plum: #2a2332;
  --warning: #9a5a20;
  --warning-surface: #fff3df;
  --shadow: 0 22px 60px rgba(49, 37, 43, 0.1);
  --small-shadow: 0 10px 28px rgba(49, 37, 43, 0.08);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --shell: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--background);
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(circle at 12% 4%, var(--background-glow), transparent 26rem),
    radial-gradient(circle at 92% 16%, rgba(232, 78, 106, 0.08), transparent 24rem),
    var(--background);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.62;
  margin: 0;
  min-height: 100vh;
  text-rendering: optimizeLegibility;
}

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

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

a:focus-visible,
button:focus-visible {
  border-radius: 8px;
  outline: 3px solid rgba(232, 78, 106, 0.3);
  outline-offset: 4px;
}

.shell {
  margin: 0 auto;
  max-width: var(--shell);
  padding-left: 28px;
  padding-right: 28px;
  width: 100%;
}

.sr-only {
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.draft-banner {
  background: var(--warning-surface);
  border-bottom: 1px solid rgba(154, 90, 32, 0.2);
  color: var(--warning);
  font-size: 14px;
  font-weight: 680;
  letter-spacing: 0.01em;
  padding: 9px 20px;
  text-align: center;
}

.header {
  backdrop-filter: blur(24px) saturate(135%);
  background: color-mix(in srgb, var(--background) 78%, transparent);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header__inner {
  align-items: center;
  display: grid;
  gap: 24px;
  grid-template-columns: auto 1fr auto;
  min-height: 74px;
}

.brand {
  color: var(--text);
  display: inline-flex;
  font-size: 27px;
  font-weight: 760;
  letter-spacing: -0.045em;
  line-height: 1;
  position: relative;
  text-decoration: none;
}

.brand:hover {
  color: var(--text);
}

.brand__go {
  color: var(--brand);
  position: relative;
}

.brand__leaf {
  fill: currentColor;
  height: 10px;
  overflow: visible;
  position: absolute;
  right: 0;
  top: -10px;
  width: 16px;
}

.brand--small {
  font-size: 22px;
}

.brand--small .brand__leaf {
  height: 8px;
  top: -8px;
  width: 13px;
}

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

.nav a,
.language {
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 650;
  padding: 9px 13px;
  text-decoration: none;
}

.nav a[aria-current='page'] {
  background: var(--surface-strong);
  box-shadow: var(--small-shadow);
  color: var(--brand-strong);
}

.nav a:hover,
.language:hover {
  background: var(--surface);
  color: var(--text);
}

.language {
  align-items: center;
  border: 1px solid var(--border);
  display: inline-flex;
  justify-content: center;
  min-width: 44px;
}

.hero {
  padding-bottom: 42px;
  padding-top: 76px;
}

.hero--home {
  padding-bottom: 28px;
  text-align: center;
}

.eyebrow {
  color: var(--brand-strong);
  font-size: 13px;
  font-weight: 760;
  letter-spacing: 0.12em;
  margin: 0 0 14px;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  letter-spacing: -0.035em;
  line-height: 1.14;
}

h1 {
  font-size: clamp(42px, 7vw, 70px);
  margin: 0;
  max-width: 900px;
}

.hero--home h1 {
  margin-left: auto;
  margin-right: auto;
}

.hero__intro {
  color: var(--text-secondary);
  font-size: clamp(18px, 2.6vw, 22px);
  margin: 22px 0 0;
  max-width: 760px;
}

.hero--home .hero__intro {
  margin-left: auto;
  margin-right: auto;
}

.meta-row {
  color: var(--text-secondary);
  display: flex;
  flex-wrap: wrap;
  font-size: 14px;
  gap: 10px 18px;
  margin-top: 26px;
}

.meta-row span {
  align-items: center;
  display: inline-flex;
  gap: 7px;
}

.meta-row span::before {
  background: var(--positive);
  border-radius: 999px;
  content: '';
  height: 7px;
  width: 7px;
}

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

.toc {
  backdrop-filter: blur(20px) saturate(130%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--small-shadow);
  padding: 20px;
  position: sticky;
  top: 98px;
}

.toc strong {
  display: block;
  font-size: 13px;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.toc a {
  border-radius: 9px;
  color: var(--text-secondary);
  display: block;
  font-size: 14px;
  padding: 7px 9px;
  text-decoration: none;
}

.toc a:hover {
  background: var(--surface-strong);
  color: var(--text);
}

.document {
  min-width: 0;
}

.section,
.glass-card {
  backdrop-filter: blur(26px) saturate(125%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.section {
  margin-bottom: 22px;
  padding: clamp(26px, 5vw, 48px);
}

.section h2 {
  font-size: clamp(27px, 4vw, 36px);
  margin: 0 0 20px;
  scroll-margin-top: 110px;
}

.section h3 {
  font-size: 21px;
  margin: 30px 0 10px;
}

.section p,
.section li {
  color: var(--text-secondary);
}

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

.section li + li {
  margin-top: 9px;
}

.section strong {
  color: var(--text);
}

.callout {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin: 24px 0;
  padding: 18px 20px;
}

.callout--important {
  background: color-mix(in srgb, var(--brand) 8%, var(--surface-strong));
  border-color: color-mix(in srgb, var(--brand) 25%, var(--border));
}

.callout--positive {
  background: color-mix(in srgb, var(--positive) 12%, var(--surface-strong));
  border-color: color-mix(in srgb, var(--positive) 28%, var(--border));
}

.data-table {
  border-collapse: separate;
  border-spacing: 0;
  font-size: 15px;
  margin: 24px 0;
  overflow: hidden;
  width: 100%;
}

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

.data-table th {
  background: var(--surface-muted);
  color: var(--text);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.data-table td {
  color: var(--text-secondary);
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.cards {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-bottom: 76px;
}

.glass-card {
  color: var(--text);
  min-height: 220px;
  padding: 30px;
  position: relative;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.glass-card:hover {
  box-shadow: 0 28px 76px rgba(49, 37, 43, 0.14);
  color: var(--text);
  transform: translateY(-3px);
}

.glass-card__icon {
  align-items: center;
  background: color-mix(in srgb, var(--brand) 11%, var(--surface-strong));
  border-radius: 16px;
  color: var(--brand-strong);
  display: inline-flex;
  font-size: 22px;
  height: 48px;
  justify-content: center;
  margin-bottom: 28px;
  width: 48px;
}

.glass-card h2 {
  font-size: 28px;
  margin: 0 0 10px;
}

.glass-card p {
  color: var(--text-secondary);
  margin: 0;
}

.glass-card__arrow {
  bottom: 26px;
  color: var(--brand);
  font-size: 24px;
  position: absolute;
  right: 28px;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button {
  align-items: center;
  background: var(--brand);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 12px 28px rgba(200, 59, 86, 0.22);
  color: white;
  display: inline-flex;
  font-size: 15px;
  font-weight: 700;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  text-decoration: none;
}

.button:hover {
  background: var(--brand-strong);
  color: white;
}

.button--secondary {
  background: var(--surface-strong);
  border: 1px solid var(--border);
  box-shadow: none;
  color: var(--text);
}

.button--secondary:hover {
  background: var(--surface-muted);
  color: var(--text);
}

.button[aria-disabled='true'],
a[aria-disabled='true'] {
  cursor: not-allowed;
}

.footer {
  border-top: 1px solid var(--border);
  padding: 44px 0 54px;
}

.footer__inner {
  align-items: start;
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr auto;
}

.footer p {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 10px 0 0;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  justify-content: flex-end;
}

.footer__links a {
  color: var(--text-secondary);
  font-size: 14px;
  text-decoration: none;
}

.footer__owner {
  grid-column: 1 / -1;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #1c1c22;
    --background-glow: rgba(111, 175, 123, 0.1);
    --surface: rgba(47, 45, 52, 0.72);
    --surface-strong: rgba(55, 52, 60, 0.94);
    --surface-muted: rgba(62, 58, 66, 0.68);
    --text: #f7f6f2;
    --text-secondary: #c6c1c9;
    --border: rgba(255, 255, 255, 0.11);
    --brand: #f15c77;
    --brand-strong: #ff8198;
    --warning: #ffd49a;
    --warning-surface: #3a2d20;
    --shadow: 0 22px 65px rgba(0, 0, 0, 0.24);
    --small-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
  }
}

@media (max-width: 850px) {
  .header__inner {
    grid-template-columns: 1fr auto;
    min-height: 68px;
  }

  .nav {
    display: none;
  }

  .page-grid {
    grid-template-columns: 1fr;
  }

  .toc {
    display: none;
  }
}

@media (max-width: 660px) {
  body {
    font-size: 16px;
  }

  .shell {
    padding-left: 18px;
    padding-right: 18px;
  }

  .hero {
    padding-bottom: 30px;
    padding-top: 48px;
  }

  h1 {
    font-size: 42px;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .section {
    border-radius: 24px;
    padding: 24px 20px;
  }

  .data-table {
    display: block;
    overflow-x: auto;
  }

  .footer__inner {
    grid-template-columns: 1fr;
  }

  .footer__links {
    justify-content: flex-start;
  }

  .footer__owner {
    grid-column: auto;
  }
}

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

  .glass-card {
    transition: none;
  }
}
