:root {
  color-scheme: light;
  --ink: #111827;
  --muted: #4b5563;
  --subtle: #6b7280;
  --line: #d9e2ec;
  --line-strong: #b7c4d3;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --soft: #f6f8fb;
  --soft-blue: #eef5ff;
  --soft-green: #eefbf6;
  --soft-amber: #fff7ed;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --green: #047857;
  --amber: #b45309;
  --night: #0b1220;
  --night-2: #101827;
  --code-line: #243145;
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.06);
  --shadow-md: 0 14px 34px rgba(17, 24, 39, 0.1);
  --shadow-lg: 0 24px 60px rgba(17, 24, 39, 0.16);
  --radius: 8px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--soft);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(246, 248, 251, 0.96) 40%, #f6f8fb),
    repeating-linear-gradient(90deg, rgba(17, 24, 39, 0.035) 0, rgba(17, 24, 39, 0.035) 1px, transparent 1px, transparent 96px);
}

a {
  color: inherit;
}

a:not(.button):not(.brand):not(.text-link):not(.shortcut-card) {
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 24px;
  font-size: 5rem;
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  letter-spacing: 0;
}

p {
  margin-bottom: 0;
}

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 30;
  background: var(--night);
  color: #ffffff;
  padding: 10px 14px;
  border-radius: var(--radius);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(217, 226, 236, 0.86);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(var(--container), calc(100% - 40px));
  min-height: 72px;
  margin: 0 auto;
}

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

.brand-mark {
  width: 40px;
  height: 40px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
}

.nav-links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a:focus {
  color: var(--ink);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  box-shadow: var(--shadow-sm);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
  touch-action: manipulation;
}

.button:hover,
.button:focus {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  background: #f9fbfd;
}

.button.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #ffffff;
}

.button.primary:hover,
.button.primary:focus {
  background: var(--blue-dark);
  color: #ffffff;
}

.hero {
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(360px, 0.82fr);
  gap: 56px;
  align-items: center;
  width: min(var(--container), calc(100% - 40px));
  min-height: calc(100dvh - 72px);
  margin: 0 auto;
  padding: 72px 0 84px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  margin: 0 0 18px;
  padding: 0 10px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: var(--soft-blue);
  color: #1e40af;
  font-size: 0.84rem;
  font-weight: 850;
}

.hero-copy {
  max-width: 690px;
  color: var(--muted);
  font-size: 1.16rem;
}

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

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
  color: var(--subtle);
  font-size: 0.92rem;
  font-weight: 700;
}

.hero-meta span {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.hero-panel {
  border: 1px solid #233044;
  border-radius: var(--radius);
  background: var(--night);
  color: #dbeafe;
  box-shadow: var(--shadow-lg);
  padding: 22px;
}

.panel-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 36px;
  margin-bottom: 18px;
  border-bottom: 1px solid #1f2b3e;
  color: #93c5fd;
  font-size: 0.86rem;
  font-weight: 850;
}

.flow-card {
  display: grid;
  gap: 0;
}

.flow-node {
  padding: 18px;
  border: 1px solid #26354c;
  border-radius: var(--radius);
  background: var(--night-2);
}

.flow-node span,
.shortcut-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 28px;
  margin-bottom: 12px;
  border-radius: var(--radius);
  background: #1e3a8a;
  color: #dbeafe;
  font-size: 0.78rem;
  font-weight: 900;
}

.flow-node strong {
  display: block;
  margin-bottom: 6px;
  color: #ffffff;
  font-size: 1.05rem;
}

.flow-node p {
  color: #cbd5e1;
  font-size: 0.95rem;
}

.primary-node {
  border-color: #3b82f6;
  background: #122344;
}

.flow-connector {
  width: 1px;
  height: 22px;
  margin-left: 29px;
  background: #3b82f6;
}

.panel-links {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.panel-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #26354c;
  border-radius: var(--radius);
  color: #eff6ff;
  text-decoration: none;
  font-weight: 780;
}

.panel-links a::after {
  content: "->";
  color: #93c5fd;
}

.panel-links a:hover,
.panel-links a:focus {
  border-color: #60a5fa;
  background: #111d32;
}

.hero-visual {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.hero-visual img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}

.doc-shortcuts {
  padding: 44px 0;
  border-bottom: 1px solid var(--line);
  background: #f9fbfd;
}

.shortcut-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.34fr) minmax(0, 0.66fr);
  gap: 24px;
  align-items: end;
  margin-bottom: 22px;
}

.shortcut-heading .eyebrow {
  margin-bottom: 0;
  width: fit-content;
}

.shortcut-heading h2 {
  max-width: 780px;
  margin-bottom: 0;
  font-size: 2rem;
  line-height: 1.12;
}

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

.shortcut-card {
  display: block;
  min-height: 190px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.shortcut-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.08rem;
}

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

.shortcut-card:hover,
.shortcut-card:focus {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.page-hero {
  padding: 78px 0 66px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.page-hero-inner {
  width: min(980px, calc(100% - 40px));
  margin: 0 auto;
}

.page-hero h1 {
  margin-bottom: 18px;
  font-size: 4.25rem;
}

.page-hero p {
  max-width: 780px;
  color: var(--muted);
  font-size: 1.12rem;
}

.section {
  padding: 82px 0;
}

.section.alt {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

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

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.64fr) minmax(280px, 0.36fr);
  gap: 32px;
  align-items: end;
  margin-bottom: 30px;
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: 3.1rem;
  line-height: 1.06;
}

.section-heading p {
  max-width: 560px;
  color: var(--muted);
}

.platform-grid,
.feature-grid,
.status-grid,
.link-grid,
.article-grid {
  display: grid;
  gap: 14px;
}

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

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

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

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

.tile {
  min-height: 132px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-raised);
  box-shadow: var(--shadow-sm);
}

.tile strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 1.04rem;
}

.tile p,
.status-list {
  color: var(--muted);
}

.tile .text-link {
  margin-top: 16px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--blue-dark);
  font-weight: 850;
  text-decoration: none;
}

.text-link:hover,
.text-link:focus {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-card {
  min-height: 220px;
  scroll-margin-top: 92px;
}

.article-card h2 {
  margin-bottom: 8px;
  font-size: 1.35rem;
  line-height: 1.2;
}

.article-card ul,
.detail-list {
  margin: 16px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.article-card li + li,
.detail-list li + li {
  margin-top: 8px;
}

.platform-name {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.tag {
  flex: none;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--soft-green);
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 850;
}

.tag.neutral {
  background: #f1f5f9;
  color: #334155;
}

.code-panel {
  overflow: hidden;
  border: 1px solid #1f2937;
  border-radius: var(--radius);
  background: var(--night);
  box-shadow: var(--shadow-lg);
}

.code-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  padding: 0 16px;
  border-bottom: 1px solid #1f2937;
  color: #cbd5e1;
  font-size: 0.9rem;
  font-weight: 800;
}

pre {
  margin: 0;
  overflow-x: auto;
  padding: 24px;
  color: #dbeafe;
  font-size: 0.95rem;
  line-height: 1.7;
}

.keyword {
  color: #93c5fd;
}

.string {
  color: #86efac;
}

.comment {
  color: #94a3b8;
}

.architecture {
  display: grid;
  grid-template-columns: minmax(280px, 0.42fr) minmax(0, 0.58fr);
  gap: 32px;
  align-items: start;
}

.architecture > div:first-child {
  position: sticky;
  top: 104px;
}

.architecture h2 {
  margin-bottom: 16px;
  font-size: 2.6rem;
  line-height: 1.08;
}

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

.steps {
  display: grid;
  gap: 12px;
}

.step {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.step-number {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  background: var(--soft-blue);
  color: var(--blue-dark);
  font-weight: 900;
}

.step h3 {
  margin-bottom: 4px;
  font-size: 1rem;
}

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

.status-list {
  margin: 0;
  padding-left: 18px;
}

.status-list li + li {
  margin-top: 8px;
}

.cta {
  padding: 72px 0;
  background: var(--night);
  color: #ffffff;
}

.cta-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) auto;
  gap: 24px;
  align-items: center;
  width: min(var(--container), calc(100% - 40px));
  margin: 0 auto;
}

.cta p {
  max-width: 720px;
  color: #cbd5e1;
}

.cta a:not(.button) {
  color: #bfdbfe;
}

.cta .button {
  border-color: #334155;
  background: #ffffff;
  color: var(--night);
}

.site-footer {
  padding: 32px 0;
  background: #080d17;
  color: #cbd5e1;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(var(--container), calc(100% - 40px));
  margin: 0 auto;
  font-size: 0.94rem;
}

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

.footer-inner a,
.footer-links a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 780;
}

.footer-inner a:hover,
.footer-inner a:focus {
  text-decoration: underline;
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 3px solid #f59e0b;
  outline-offset: 3px;
}

@media (max-width: 1040px) {
  h1 {
    font-size: 4rem;
  }

  .nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }

  .nav-links {
    flex-wrap: wrap;
  }

  .hero-inner,
  .section-heading,
  .shortcut-heading,
  .architecture,
  .cta-inner {
    grid-template-columns: 1fr;
  }

  .hero-inner {
    min-height: auto;
  }

  .architecture > div:first-child {
    position: static;
  }

  .platform-grid,
  .feature-grid,
  .status-grid,
  .link-grid,
  .article-grid,
  .shortcut-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  h1,
  .page-hero h1 {
    font-size: 3rem;
    line-height: 1.04;
  }

  .nav,
  .container,
  .hero-inner,
  .footer-inner,
  .cta-inner,
  .page-hero-inner {
    width: min(100% - 28px, var(--container));
  }

  .nav-links {
    gap: 10px;
    font-size: 0.9rem;
  }

  .hero-inner {
    padding: 46px 0 56px;
  }

  .page-hero {
    padding: 54px 0 48px;
  }

  .hero-actions,
  .footer-inner,
  .footer-links {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .platform-grid,
  .feature-grid,
  .status-grid,
  .link-grid,
  .article-grid,
  .shortcut-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 58px 0;
  }

  .section-heading h2,
  .architecture h2 {
    font-size: 2.25rem;
  }

  .shortcut-heading h2 {
    font-size: 1.65rem;
  }

  .tile,
  .shortcut-card {
    min-height: auto;
  }

  .platform-name {
    display: block;
  }

  .platform-name .tag {
    margin-top: 8px;
  }

  pre {
    padding: 18px;
    font-size: 0.86rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
