:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #eef4ff;
  --surface-dark: #111827;
  --text: #172033;
  --muted: #667085;
  --border: #d9e2f1;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #16a34a;
  --code-bg: #0f172a;
  --code-text: #dbeafe;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
}

body {
  margin: 0;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Arial, "Noto Sans", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 32rem),
    radial-gradient(circle at top right, rgba(22, 163, 74, 0.10), transparent 28rem),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.container {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(244, 247, 251, 0.82);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(217, 226, 241, 0.8);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-weight: 750;
  letter-spacing: -0.02em;
}

.logo:hover {
  text-decoration: none;
}

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #0f766e);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.25);
}

.logo-text {
  font-size: 18px;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.top-nav a {
  color: #344054;
  font-size: 14px;
  font-weight: 600;
  padding: 9px 12px;
  border-radius: 999px;
}

.top-nav a:hover {
  color: var(--primary);
  background: #eaf1ff;
  text-decoration: none;
}

.hero {
  padding: 76px 0 44px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.75fr);
  gap: 36px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--primary);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.14em;
  font-weight: 800;
}

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.035em;
}

h1 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(40px, 6vw, 68px);
}

h2 {
  margin: 0;
  font-size: clamp(28px, 3vw, 38px);
}

h3 {
  margin: 0 0 12px;
  font-size: 22px;
}

.hero-text {
  max-width: 720px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.hero-actions {
  margin-top: 32px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 700;
  border: 1px solid transparent;
}

.button:hover {
  text-decoration: none;
}

.button-primary {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.24);
}

.button-primary:hover {
  color: #fff;
  background: var(--primary-dark);
}

.button-secondary {
  color: var(--text);
  background: #fff;
  border-color: var(--border);
}

.button-secondary:hover {
  color: var(--primary);
  background: #f8fbff;
}

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

.code-window {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--code-bg);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,0.08);
}

.code-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  background: rgba(255,255,255,0.06);
  color: #cbd5e1;
  font-size: 13px;
}

.code-title span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
  background: #ef4444;
}

.code-title span:nth-child(2) {
  background: #f59e0b;
}

.code-title span:nth-child(3) {
  background: #22c55e;
  margin-right: 8px;
}

.code-window pre,
.inline-code {
  margin: 0;
  padding: 22px;
  overflow-x: auto;
  color: var(--code-text);
  font-size: 14px;
  line-height: 1.6;
}

code {
  font-family:
    "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.search-panel {
  margin-top: 12px;
  padding: 24px;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: center;
  gap: 24px;
  background: rgba(255,255,255,0.82);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.search-panel h2 {
  font-size: 24px;
}

.search-panel p {
  margin: 8px 0 0;
  color: var(--muted);
}

.fake-search {
  display: flex;
  gap: 10px;
  padding: 8px;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.fake-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 0 14px;
  font: inherit;
  color: var(--text);
}

.fake-search button {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  background: var(--surface-dark);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.section-heading {
  margin: 72px 0 24px;
}

.section-heading.compact {
  margin: 0 0 18px;
}

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

.card,
.content-block {
  background: rgba(255,255,255,0.88);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.card {
  padding: 24px;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: rgba(37, 99, 235, 0.32);
  box-shadow: 0 20px 52px rgba(15, 23, 42, 0.11);
}

.card-icon {
  width: 46px;
  height: 46px;
  margin-bottom: 18px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: var(--surface-soft);
  color: var(--primary);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.card ul {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.card li {
  padding: 7px 0;
  border-top: 1px solid #edf2f7;
}

.two-columns {
  margin-top: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 18px;
}

.content-block {
  padding: 28px;
}

.content-block p {
  color: var(--muted);
}

.inline-code {
  margin: 20px 0;
  border-radius: var(--radius-md);
  background: var(--code-bg);
}

.text-link {
  font-weight: 750;
}

.muted-block {
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(22, 163, 74, 0.08)),
    rgba(255,255,255,0.88);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-cloud a {
  display: inline-flex;
  padding: 8px 11px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  color: #344054;
  font-size: 14px;
  font-weight: 700;
}

.tag-cloud a:hover {
  color: var(--primary);
  text-decoration: none;
  border-color: rgba(37, 99, 235, 0.35);
}

.index-table {
  overflow: hidden;
  margin-bottom: 74px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow);
}

.index-row {
  display: grid;
  grid-template-columns: 0.6fr 1.7fr 0.45fr;
  gap: 18px;
  align-items: center;
  padding: 16px 20px;
  border-top: 1px solid #edf2f7;
}

.index-row:first-child {
  border-top: 0;
}

.index-head {
  color: #475467;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: #f8fafc;
}

.status {
  display: inline-flex;
  justify-content: center;
  min-width: 92px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #ecfdf3;
  color: #027a48;
  font-size: 13px;
  font-weight: 800;
}

.site-footer {
  padding: 30px 0;
  border-top: 1px solid var(--border);
  background: rgba(255,255,255,0.62);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 14px;
}

.footer-inner p {
  margin: 0;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 920px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px 0;
  }

  .hero {
    padding-top: 48px;
  }

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

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

  .index-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 28px, 1180px);
  }

  h1 {
    font-size: 38px;
  }

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

  .search-panel {
    padding: 18px;
  }

  .fake-search {
    border-radius: var(--radius-md);
    align-items: stretch;
    flex-direction: column;
  }

  .fake-search input {
    min-height: 42px;
  }

  .footer-inner {
    flex-direction: column;
  }
}

.page-hero {
  padding: 64px 0 34px;
}

.page-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.65fr);
  gap: 28px;
  align-items: stretch;
}

.info-panel {
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(22, 163, 74, 0.08)),
    rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.info-panel h2 {
  margin-bottom: 18px;
  font-size: 24px;
}

.fact-list {
  margin: 0;
}

.fact-list div {
  padding: 14px 0;
  border-top: 1px solid rgba(217, 226, 241, 0.9);
}

.fact-list div:first-child {
  border-top: 0;
  padding-top: 0;
}

.fact-list dt {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.fact-list dd {
  margin: 4px 0 0;
  color: var(--muted);
}

.doc-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
  padding-bottom: 72px;
}

.doc-sidebar {
  position: sticky;
  top: 94px;
}

.sidebar-card {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.sidebar-card h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.toc {
  display: grid;
  gap: 6px;
}

.toc a {
  padding: 9px 10px;
  border-radius: 10px;
  color: #344054;
  font-size: 14px;
  font-weight: 650;
}

.toc a:hover {
  color: var(--primary);
  background: #eaf1ff;
  text-decoration: none;
}

.doc-content {
  min-width: 0;
}

.doc-section {
  margin-bottom: 22px;
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.doc-section h2 {
  margin-bottom: 16px;
}

.doc-section p {
  color: var(--muted);
}

.note {
  margin: 22px 0;
  padding: 18px 20px;
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-md);
  background: #eff6ff;
  color: #1e3a8a;
}

.note strong {
  color: #1e40af;
}

.note.warning {
  border-left-color: #f59e0b;
  background: #fffbeb;
  color: #92400e;
}

.note.warning strong {
  color: #92400e;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.mini-grid article {
  padding: 18px;
  border: 1px solid #e6edf7;
  border-radius: var(--radius-md);
  background: #f8fafc;
}

.mini-grid h3 {
  font-size: 18px;
}

.mini-grid p {
  margin-bottom: 0;
}

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

.reference-card {
  display: block;
  padding: 18px;
  border: 1px solid #e6edf7;
  border-radius: var(--radius-md);
  background: #f8fafc;
  color: var(--text);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.reference-card:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.32);
  background: #ffffff;
  text-decoration: none;
}

.reference-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--primary);
  font-weight: 850;
  letter-spacing: -0.02em;
}

.reference-card p {
  margin: 0;
  color: var(--muted);
}

.definition-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.definition-list div {
  padding: 18px;
  border: 1px solid #e6edf7;
  border-radius: var(--radius-md);
  background: #f8fafc;
}

.definition-list h3 {
  font-size: 18px;
}

.definition-list p {
  margin-bottom: 0;
}

.compact-table {
  margin: 20px 0;
  box-shadow: none;
}

.standard-badge {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--primary);
  font-size: 13px;
  font-weight: 850;
}

.code-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.code-pair article {
  min-width: 0;
}

.code-pair h3 {
  font-size: 18px;
}

@media (max-width: 980px) {
  .page-hero-grid,
  .doc-layout,
  .mini-grid,
  .definition-list,
  .code-pair {
    grid-template-columns: 1fr;
  }

  .doc-sidebar {
    position: static;
  }

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

@media (max-width: 680px) {
  .reference-grid {
    grid-template-columns: 1fr;
  }

  .doc-section {
    padding: 22px;
  }

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