@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap");

:root {
  color-scheme: dark;
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  --ink: #e0e4ee;
  --ink-strong: #f5f7fc;
  --muted: #a5aec3;
  --subtle: #79849c;
  --teal: #5bd3c7;
  --teal-bright: #82e7de;
  --teal-dark: #123c3d;
  --night: #090d18;
  --surface: #101624;
  --surface-raised: #151c2c;
  --surface-soft: #1a2233;
  --line: rgba(181, 199, 224, 0.13);
  --line-strong: rgba(91, 211, 199, 0.3);
  --purple: #35205b;
  --berry: #782b59;
  --content-width: 1180px;
  --page-gutter: clamp(1.25rem, 4vw, 3rem);
  --radius: 1.25rem;
  --shadow: 0 24px 70px rgba(1, 4, 12, 0.34);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  scroll-padding-top: 6.5rem;
  background: var(--night);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--night);
  font-size: 1rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

p,
h1,
h2,
h3 {
  margin-top: 0;
}

::selection {
  color: #071514;
  background: var(--teal);
}

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--teal-bright);
  outline-offset: 4px;
}

.glory-site {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
  overflow: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 90% 38%, rgba(63, 45, 110, 0.09), transparent 32rem),
    var(--night);
}

.glory-site > main {
  flex: 1;
  min-width: 0;
}

.home-page {
  min-width: 0;
}

.section-container,
.header-inner,
.footer-inner,
.footer-bottom,
.docs-page {
  width: min(100%, calc(var(--content-width) + 2 * var(--page-gutter)));
  margin-inline: auto;
  padding-inline: var(--page-gutter);
}

.section-container {
  padding-block: clamp(5rem, 9vw, 8.5rem);
}

.eyebrow,
.preview-kicker,
.docs-kicker {
  color: var(--teal);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.section-title {
  max-width: 18ch;
  margin-bottom: 1.25rem;
  color: var(--ink-strong);
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.section-copy {
  max-width: 42rem;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  line-height: 1.8;
}

.centered-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 47rem;
  margin: 0 auto clamp(2.75rem, 6vw, 4.75rem);
  text-align: center;
}

.centered-heading .section-title {
  max-width: 20ch;
  margin-top: 0.9rem;
}

.centered-heading .eyebrow {
  margin-bottom: 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.85rem 1.45rem;
  border: 1px solid transparent;
  border-radius: 0.7rem;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: #092523;
  background: var(--teal);
  box-shadow: 0 10px 30px rgba(44, 190, 178, 0.17);
}

.button-primary:hover {
  color: #061d1b;
  background: var(--teal-bright);
  box-shadow: 0 14px 35px rgba(44, 190, 178, 0.26);
}

.button-secondary {
  color: var(--ink-strong);
  border-color: rgba(224, 228, 238, 0.25);
  background: rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(8px);
}

.button-secondary:hover {
  border-color: rgba(91, 211, 199, 0.65);
  background: rgba(91, 211, 199, 0.09);
}

.text-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: var(--teal);
  font-weight: 600;
  line-height: 1.5;
  text-decoration: underline;
  text-decoration-color: rgba(91, 211, 199, 0.35);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.35rem;
  transition: color 160ms ease, text-decoration-color 160ms ease;
}

.text-link:hover {
  color: var(--teal-bright);
  text-decoration-color: currentColor;
}

/* Header */
.site-header {
  position: absolute;
  z-index: 20;
  top: 0;
  right: 0;
  left: 0;
  color: var(--ink-strong);
}

.header-inner {
  display: flex;
  align-items: center;
  min-height: 5.75rem;
  gap: clamp(1.25rem, 4vw, 3.5rem);
  border-bottom: 1px solid rgba(235, 228, 246, 0.12);
}

.brand-wrap {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.7rem;
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  filter: drop-shadow(0 4px 12px rgba(91, 211, 199, 0.2));
}

.brand {
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.035em;
}

.desktop-nav {
  display: flex;
  align-items: center;
  align-self: stretch;
  gap: 0.35rem;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.65rem;
  padding: 0.55rem 0.85rem;
  border-radius: 0.5rem;
  color: rgba(245, 247, 252, 0.74);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 160ms ease, background-color 160ms ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.075);
}

.nav-link.is-active {
  box-shadow: inset 0 -2px var(--teal);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin-left: auto;
}

.version {
  color: rgba(245, 247, 252, 0.55);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
}

.github-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  color: var(--ink-strong);
  font-size: 0.875rem;
  font-weight: 600;
}

.github-link:hover {
  color: var(--teal-bright);
}

.menu-button {
  display: none;
  min-width: 4.5rem;
  min-height: 2.75rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 0.55rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
}

.menu-button:hover {
  border-color: var(--teal);
  background: rgba(91, 211, 199, 0.1);
}

.mobile-nav {
  display: none;
}

/* Hero */
.hero {
  position: relative;
  isolation: isolate;
  min-width: 0;
  padding: clamp(8.5rem, 13vw, 11.5rem) 0 clamp(8rem, 12vw, 11rem);
  overflow: hidden;
  background:
    radial-gradient(circle at 74% 38%, rgba(91, 211, 199, 0.16), transparent 23rem),
    radial-gradient(circle at 10% 100%, rgba(162, 57, 103, 0.3), transparent 35rem),
    linear-gradient(122deg, #211737 0%, var(--purple) 43%, #5a2857 73%, var(--berry) 110%);
}

.hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 56px 56px;
  content: "";
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}

.hero::after {
  position: absolute;
  z-index: 2;
  right: -2%;
  bottom: -1px;
  left: -2%;
  height: clamp(2.5rem, 6vw, 5.5rem);
  background: var(--night);
  clip-path: polygon(0 72%, 8% 54%, 18% 38%, 31% 28%, 44% 39%, 56% 63%, 69% 74%, 82% 62%, 92% 35%, 100% 14%, 100% 100%, 0 100%);
  content: "";
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(19rem, 0.85fr);
  align-items: center;
  width: min(100%, calc(var(--content-width) + 2 * var(--page-gutter)));
  margin-inline: auto;
  padding-inline: var(--page-gutter);
  gap: clamp(2rem, 6vw, 6rem);
}

.hero-copy {
  position: relative;
  z-index: 3;
  min-width: 0;
}

.hero-eyebrow {
  margin-bottom: 1.35rem;
  color: var(--teal-bright);
}

.hero-title {
  max-width: 12ch;
  margin-bottom: 1.6rem;
  color: #fff;
  font-size: clamp(3.25rem, 6.4vw, 5.7rem);
  font-weight: 600;
  line-height: 0.99;
  letter-spacing: -0.065em;
  white-space: pre-line;
  text-wrap: balance;
  overflow-wrap: break-word;
}

.hero-lead {
  max-width: 36rem;
  margin-bottom: 2.15rem;
  color: rgba(239, 235, 247, 0.77);
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 1.75rem;
  gap: 0.55rem;
  color: rgba(239, 235, 247, 0.56);
  font-size: 0.8rem;
}

.fact-dot {
  color: var(--teal);
}

.hero-art {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 27rem;
}

.hero-logo {
  position: relative;
  z-index: 2;
  width: clamp(12rem, 23vw, 19rem);
  max-height: 22rem;
  filter: drop-shadow(0 25px 40px rgba(4, 8, 19, 0.4)) drop-shadow(0 0 35px rgba(91, 211, 199, 0.14));
  animation: logo-float 7s ease-in-out infinite;
}

.logo-orbit {
  position: absolute;
  border: 1px solid rgba(127, 229, 219, 0.21);
  border-radius: 50%;
  transform: rotate(-24deg);
  pointer-events: none;
}

.orbit-one {
  width: min(29rem, 110%);
  aspect-ratio: 1;
  box-shadow: inset 0 0 60px rgba(91, 211, 199, 0.025);
}

.orbit-two {
  width: min(22rem, 83%);
  aspect-ratio: 1;
  border-color: rgba(224, 228, 238, 0.12);
  transform: rotate(36deg) scaleY(0.72);
}

.hero-art-caption {
  position: absolute;
  z-index: 3;
  bottom: 0;
  padding: 0.45rem 0.9rem;
  border: 1px solid rgba(224, 228, 238, 0.14);
  border-radius: 999px;
  color: rgba(245, 247, 252, 0.67);
  background: rgba(18, 15, 34, 0.45);
  backdrop-filter: blur(8px);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

@keyframes logo-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Home sections */
.intro {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(3rem, 8vw, 7rem);
}

.intro-copy .eyebrow {
  margin-bottom: 1rem;
}

.feature-list {
  display: grid;
  align-content: center;
  gap: 0;
}

.feature-item {
  display: grid;
  grid-template-columns: 1.75rem minmax(0, 1fr);
  padding-block: 1.05rem;
  gap: 0.85rem;
  border-bottom: 1px solid var(--line);
}

.feature-item:first-child {
  padding-top: 0;
}

.feature-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.feature-check {
  display: grid;
  place-items: center;
  align-self: start;
  width: 1.55rem;
  height: 1.55rem;
  margin-top: 0.15rem;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--teal);
  background: rgba(91, 211, 199, 0.06);
  font-size: 0.8rem;
}

.feature-copy {
  color: #c1c8d8;
  line-height: 1.7;
}

.showcase-section {
  padding-top: 2rem;
}

.example-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: stretch;
  min-width: 0;
  gap: clamp(1.25rem, 3vw, 2.25rem);
}

.example-grid > * {
  min-width: 0;
}

.code-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0b111d;
  box-shadow: var(--shadow);
}

.code-header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  min-height: 3.5rem;
  padding: 0.65rem 1rem 0.65rem 1.25rem;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.022);
}

.code-file {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.code-content {
  display: block;
  flex: 1;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-color: #35435a #0b111d;
  scrollbar-width: thin;
}

.code-content pre,
.code-content code,
.code-panel > pre {
  max-width: none;
  margin: 0;
  tab-size: 4;
  white-space: pre;
}

.code-content pre,
.code-panel > pre {
  width: max-content;
  min-width: 100%;
  overflow: visible;
}

.code-content code {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
}

.browser-preview {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-raised);
  box-shadow: var(--shadow);
}

.browser-chrome {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 3.5rem;
  padding: 0.7rem 1rem;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  background: #111827;
}

.browser-dots {
  display: flex;
  flex: 0 0 auto;
  gap: 0.38rem;
  color: #556076;
  font-size: 0.65rem;
}

.browser-dots > :first-child { color: #d87387; }
.browser-dots > :nth-child(2) { color: #d7b66a; }
.browser-dots > :nth-child(3) { color: var(--teal); }

.browser-address {
  min-width: 0;
  flex: 1;
  padding: 0.35rem 0.8rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 0.4rem;
  color: var(--subtle);
  background: rgba(4, 8, 16, 0.35);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.browser-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: clamp(1.5rem, 4vw, 2.75rem);
  background: radial-gradient(circle at 100% 0, rgba(91, 211, 199, 0.075), transparent 18rem);
}

.preview-kicker {
  margin-bottom: 0.9rem;
  font-size: 0.65rem;
}

.preview-title {
  margin-bottom: 0.75rem;
  color: var(--ink-strong);
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.preview-copy {
  margin-bottom: 1.75rem;
  color: var(--muted);
  font-size: 0.925rem;
  line-height: 1.7;
}

.live-counter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  padding-top: 1.25rem;
  gap: 1rem;
  border-top: 1px solid var(--line);
}

.counter-label {
  min-width: 6rem;
  color: var(--teal-bright);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  font-weight: 500;
}

.counter-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.example-footnote {
  max-width: 48rem;
  margin: 1.5rem auto 0;
  color: var(--subtle);
  font-size: 0.8rem;
  text-align: center;
}

.language-section {
  position: relative;
  min-width: 0;
  border-block: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(42, 30, 67, 0.45), rgba(16, 22, 36, 0.82) 52%, rgba(20, 53, 56, 0.23));
}

.architecture-card,
.sapid-preview {
  min-width: 0;
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(16, 22, 36, 0.82);
  box-shadow: var(--shadow);
}

.architecture-card .preview-kicker {
  margin-bottom: 1rem;
}

.host-row {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  padding-block: 1.1rem;
  gap: 0.85rem;
  border-top: 1px solid var(--line);
}

.host-number {
  padding-top: 0.15rem;
  color: var(--teal);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
}

.host-title {
  margin-bottom: 0.25rem;
  color: var(--ink-strong);
  font-size: 1.05rem;
  font-weight: 600;
}

.host-copy {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.65;
}

.tools-section {
  padding-bottom: clamp(5rem, 9vw, 8rem);
}

.sapid-preview {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: radial-gradient(circle at 20% 0, rgba(91, 211, 199, 0.11), transparent 17rem), var(--surface);
}

.sapid-glyph {
  display: grid;
  place-items: center;
  width: 3.2rem;
  height: 3.2rem;
  margin-bottom: 1.4rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.9rem;
  color: var(--teal);
  background: rgba(91, 211, 199, 0.07);
  font-size: 1.4rem;
}

.sapid-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1.6rem;
  gap: 0.55rem;
}

.cta {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: clamp(5rem, 10vw, 8.5rem);
  padding: clamp(2.5rem, 6vw, 4.5rem) var(--page-gutter);
  overflow: hidden;
  border: 1px solid rgba(91, 211, 199, 0.18);
  border-radius: calc(var(--radius) * 1.25);
  background: radial-gradient(circle at 50% 120%, rgba(91, 211, 199, 0.16), transparent 55%), linear-gradient(120deg, rgba(53, 32, 91, 0.55), rgba(90, 40, 87, 0.4));
  text-align: center;
}

.cta-title {
  margin: 0.85rem 0 1.75rem;
  color: #fff;
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.045em;
}

/* Documentation */
.docs-page {
  display: grid;
  grid-template-columns: 13.5rem minmax(0, 1fr);
  align-items: start;
  min-width: 0;
  padding-top: clamp(8rem, 12vw, 10rem);
  padding-bottom: clamp(5rem, 9vw, 8rem);
  gap: clamp(2.5rem, 7vw, 6.5rem);
}

.docs-sidebar {
  position: sticky;
  top: 2rem;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 1.25rem 0;
}

.docs-sidebar-title {
  margin: 1.25rem 0.85rem 0.45rem;
  color: var(--subtle);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.docs-sidebar-title:first-child {
  margin-top: 0;
}

.docs-sidebar .nav-link {
  width: 100%;
  min-height: 2.75rem;
  color: var(--muted);
}

.docs-sidebar .nav-link:hover,
.docs-sidebar .nav-link.is-active {
  color: var(--ink-strong);
  background: rgba(91, 211, 199, 0.065);
}

.docs-sidebar .nav-link.is-active {
  box-shadow: inset 2px 0 var(--teal);
}

.docs-external-link {
  margin: 1.4rem 0.85rem 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--subtle);
  font-size: 0.8rem;
}

.docs-external-link:hover {
  color: var(--teal);
}

.docs-article {
  width: 100%;
  max-width: 52rem;
  min-width: 0;
}

.docs-kicker {
  margin-bottom: 1rem;
}

.docs-title {
  margin-bottom: 1.4rem;
  color: var(--ink-strong);
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.055em;
  text-wrap: balance;
  overflow-wrap: break-word;
}

.docs-lead {
  max-width: 46rem;
  margin-bottom: 2.5rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  line-height: 1.8;
}

.docs-heading {
  margin: clamp(3.25rem, 6vw, 4.75rem) 0 1rem;
  color: var(--ink-strong);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.03em;
  scroll-margin-top: 2rem;
}

.docs-paragraph {
  margin-bottom: 1.4rem;
  color: #b6bfd0;
  line-height: 1.85;
}

.docs-callout {
  margin-block: 2rem 3rem;
  padding: 1.2rem 1.35rem;
  border: 1px solid rgba(91, 211, 199, 0.18);
  border-left: 3px solid var(--teal);
  border-radius: 0.65rem;
  color: var(--muted);
  background: rgba(91, 211, 199, 0.045);
  font-size: 0.9rem;
  line-height: 1.75;
}

.docs-callout-title {
  margin-bottom: 0.25rem;
  color: var(--teal-bright);
  font-weight: 600;
}

.docs-code {
  margin-block: 1.5rem 2rem;
  box-shadow: 0 14px 40px rgba(1, 4, 12, 0.2);
}

.docs-code .code-content {
  max-height: 34rem;
  overflow: auto;
}

.docs-host-grid,
.reactive-concepts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-block: 1.5rem;
  gap: 1rem;
}

.docs-host-card,
.concept-card {
  min-width: 0;
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  color: var(--muted);
  background: var(--surface);
  font-size: 0.875rem;
  line-height: 1.75;
  transition: border-color 180ms ease, transform 180ms ease;
}

.docs-host-card:hover,
.concept-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.docs-card-title,
.concept-title {
  margin-bottom: 0.55rem;
  color: var(--ink-strong);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
}

.concept-symbol {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-bottom: 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.55rem;
  color: var(--teal);
  background: rgba(91, 211, 199, 0.06);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
}

.docs-playground {
  margin-block: 1.5rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: radial-gradient(circle at 100% 0, rgba(91, 211, 199, 0.07), transparent 20rem), var(--surface);
}

.docs-playground .live-counter {
  padding-top: 0;
  border-top: 0;
}

.sapid-live-card {
  display: grid;
  gap: 1.5rem;
  margin-block: 2rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: radial-gradient(circle at 100% 0, rgba(91, 211, 199, 0.09), transparent 25rem), var(--surface);
}

.sapid-live-card .preview-copy {
  margin-bottom: 0;
}

.sapid-control-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.sapid-live-card .sapid-tags {
  margin-bottom: 0;
}

.docs-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 1.5rem;
  gap: 1.25rem;
}

.not-found {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  width: min(100%, 54rem);
  min-height: 70vh;
  margin-inline: auto;
  padding: 5rem var(--page-gutter);
}

.not-found-code {
  margin-bottom: 0.5rem;
  color: var(--teal);
  font-family: "JetBrains Mono", monospace;
  font-size: clamp(4rem, 12vw, 8rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.08em;
}

/* Footer */
.site-footer {
  position: relative;
  min-width: 0;
  border-top: 1px solid var(--line);
  background: #080c15;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  padding-top: 4rem;
  padding-bottom: 3.5rem;
  gap: 3rem;
}

.footer-brand {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.footer-mark {
  width: 2.5rem;
  height: 2.5rem;
}

.footer-title {
  margin-bottom: 0.15rem;
  color: var(--ink-strong);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.footer-tagline {
  color: var(--subtle);
  font-size: 0.85rem;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(7rem, 1fr));
  gap: clamp(2rem, 6vw, 5rem);
}

.footer-links > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
}

.footer-heading {
  margin-bottom: 0.35rem;
  color: var(--ink-strong);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.footer-link {
  color: var(--subtle);
  font-size: 0.85rem;
  transition: color 160ms ease;
}

.footer-link:hover {
  color: var(--teal);
}

.footer-bottom {
  padding-top: 1.35rem;
  padding-bottom: 1.5rem;
  border-top: 1px solid var(--line);
  color: #667187;
  font-size: 0.75rem;
}

/* Learning guide */
.learning-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-block: 1.5rem 3rem;
}

.learning-grid-home {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 3rem;
}

.learning-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(91, 211, 199, 0.045), rgba(21, 28, 44, 0.8));
}

.learning-card .docs-paragraph {
  flex: 1;
  font-size: 0.92rem;
}

.docs-pagination {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.docs-prev,
.docs-next {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  padding: 1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
}

.docs-next {
  grid-column: 2;
  align-items: flex-end;
  text-align: right;
}

.docs-nav-kicker {
  color: var(--subtle);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.docs-nav-link {
  color: var(--teal);
  font-size: 0.9rem;
  font-weight: 600;
}

.counter-button {
  padding: 0.7rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  color: var(--ink);
  background: var(--surface-raised);
  cursor: pointer;
}

.counter-button:hover {
  border-color: var(--teal);
}

.counter-primary {
  color: #071514;
  background: var(--teal);
}

.docs-choice-table {
  margin-block: 1.5rem 2.5rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
}

.docs-choice-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1.2fr;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}

.docs-choice-row:last-child {
  border-bottom: 0;
}

.docs-choice-header,
.docs-choice-label {
  color: var(--ink-strong);
  font-weight: 600;
}

.docs-choice-header {
  background: rgba(91, 211, 199, 0.05);
}

.docs-pitfalls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-block: 1.5rem 2.5rem;
}

.docs-pitfall {
  min-width: 0;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: rgba(21, 28, 44, 0.55);
}

.docs-pitfall .docs-paragraph {
  margin-bottom: 0;
  font-size: 0.88rem;
}

/* Tablet */
@media (max-width: 960px) {
  .desktop-nav {
    display: none;
  }

  .menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-nav {
    display: grid;
    padding: 0.65rem var(--page-gutter) 1rem;
    border-bottom: 1px solid rgba(235, 228, 246, 0.12);
    background: linear-gradient(115deg, rgba(33, 23, 55, 0.98), rgba(74, 35, 78, 0.98));
    box-shadow: 0 18px 35px rgba(5, 5, 15, 0.2);
    backdrop-filter: blur(16px);
  }

  .mobile-nav-link {
    display: flex;
    align-items: center;
    min-height: 3rem;
    padding: 0.65rem 0.8rem;
    border-radius: 0.45rem;
    color: rgba(245, 247, 252, 0.78);
    font-size: 0.9rem;
  }

  .mobile-nav-link:hover,
  .mobile-nav-link.is-active {
    color: #fff;
    background: rgba(91, 211, 199, 0.1);
  }

  .mobile-nav-link.is-active {
    box-shadow: inset 2px 0 var(--teal);
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1.15fr) minmax(14rem, 0.85fr);
    gap: 1.5rem;
  }

  .hero-art {
    min-height: 22rem;
  }

  .hero-title {
    font-size: clamp(3rem, 7.5vw, 4.5rem);
  }

  .intro {
    gap: 3rem;
  }

  .example-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .code-content {
    max-height: 36rem;
    overflow: auto;
  }

  .browser-content {
    min-height: 22rem;
  }

  .learning-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .docs-page {
    grid-template-columns: 11rem minmax(0, 1fr);
    gap: 2.5rem;
  }

  .docs-host-grid,
  .reactive-concepts {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 700px) {
  .header-inner {
    min-height: 4.75rem;
  }

  .version {
    display: none;
  }

  .hero {
    padding-top: 7.75rem;
    padding-bottom: 7.5rem;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    text-align: center;
  }

  .hero-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-title {
    max-width: 100%;
    font-size: clamp(2.9rem, 13vw, 4.25rem);
  }

  .hero-lead {
    max-width: 32rem;
  }

  .hero-facts,
  .hero-actions {
    justify-content: center;
  }

  .hero-art {
    min-height: 18rem;
    margin-top: 1rem;
  }

  .hero-logo {
    width: clamp(10rem, 45vw, 14rem);
  }

  .orbit-one {
    width: min(21rem, 90vw);
  }

  .orbit-two {
    width: min(16rem, 70vw);
  }

  .intro {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.75rem;
  }

  .learning-grid,
  .learning-grid-home,
  .docs-pitfalls {
    grid-template-columns: minmax(0, 1fr);
  }

  .docs-choice-header {
    display: none;
  }

  .docs-choice-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.35rem;
  }

  .docs-pagination {
    grid-template-columns: minmax(0, 1fr);
  }

  .docs-next {
    grid-column: 1;
    align-items: flex-start;
    text-align: left;
  }

  .docs-page {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 7rem;
    gap: 1.5rem;
  }

  .docs-sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0 0 1.5rem;
    gap: 0.25rem;
    border-bottom: 1px solid var(--line);
  }

  .docs-sidebar-title {
    grid-column: 1 / -1;
    margin: 0.75rem 0.25rem 0.2rem;
  }

  .docs-sidebar .nav-link {
    padding-inline: 0.65rem;
    font-size: 0.82rem;
  }

  .docs-external-link {
    grid-column: 1 / -1;
    margin: 0.75rem 0.25rem 0;
  }

  .docs-article {
    max-width: none;
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.5rem;
  }
}

/* Small phones */
@media (max-width: 480px) {
  :root {
    --page-gutter: 1.25rem;
    --radius: 0.9rem;
  }

  .section-container {
    padding-block: 4.5rem;
  }

  .header-actions {
    gap: 0.65rem;
  }

  .github-link {
    display: none;
  }

  .hero {
    padding-top: 7rem;
    padding-bottom: 6.5rem;
  }

  .hero-title {
    font-size: clamp(2.65rem, 13.5vw, 3.6rem);
    letter-spacing: -0.055em;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  .hero-actions .button {
    width: 100%;
  }

  .hero-facts {
    gap: 0.4rem;
    font-size: 0.72rem;
  }

  .hero-art {
    min-height: 15rem;
  }

  .hero-art-caption {
    bottom: -0.5rem;
    font-size: 0.68rem;
  }

  .showcase-section {
    padding-top: 0.5rem;
  }

  .centered-heading {
    margin-bottom: 2.5rem;
  }

  .browser-content,
  .architecture-card,
  .sapid-preview {
    padding: 1.35rem;
  }

  .browser-content {
    min-height: 20rem;
  }

  .live-counter {
    align-items: flex-start;
    flex-direction: column;
  }

  .counter-actions {
    width: 100%;
  }

  .code-header,
  .browser-chrome {
    padding-inline: 0.85rem;
  }

  .docs-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .docs-sidebar-title,
  .docs-external-link {
    grid-column: 1 / -1;
  }

  .docs-title {
    font-size: clamp(2.25rem, 11vw, 3.25rem);
  }

  .docs-callout {
    padding: 1rem;
  }

  .sapid-control-row {
    align-items: flex-start;
  }

  .docs-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-inner {
    padding-top: 3rem;
    padding-bottom: 2.5rem;
  }

  .footer-links {
    gap: 1.5rem;
  }

  .footer-bottom {
    line-height: 1.7;
  }
}

@media (max-width: 350px) {
  :root {
    --page-gutter: 1rem;
  }

  .brand-wrap {
    gap: 0.5rem;
  }

  .brand-mark {
    width: 1.75rem;
    height: 1.75rem;
  }

  .brand {
    font-size: 1.25rem;
  }

  .menu-button {
    min-width: 4rem;
    padding-inline: 0.6rem;
  }

  .hero-title {
    font-size: 2.55rem;
  }

  .hero-facts {
    font-size: 0.68rem;
  }

  .browser-dots {
    display: none;
  }

  .footer-links {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .button:hover,
  .docs-host-card:hover,
  .concept-card:hover {
    transform: none;
  }
}

.language-picker { flex-shrink: 0; }
.language-picker .sapid-menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.2rem;
  border: 0;
  color: #19a7ff;
  background: transparent;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.language-picker .sapid-menu-trigger::after {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
.language-picker .sapid-menu-trigger[aria-expanded="true"]::after {
  transform: translateY(2px) rotate(225deg);
}
.language-picker .sapid-menu-trigger:focus-visible {
  outline: 2px solid #19a7ff;
  outline-offset: 3px;
  border-radius: 0.25rem;
}
.language-options {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  width: 8rem;
  max-width: calc(100vw - 1rem);
  padding: 0.5rem;
  border: 1px solid #363636;
  border-radius: 0.55rem;
  background: #111;
  color: #e8e8e8;
  box-shadow: 0 8px 24px #0006;
}
.language-options .language-option {
  width: 100%;
  padding: 0.5rem;
  border: 0;
  border-radius: 0.25rem;
  color: inherit;
  background: transparent;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.5;
  text-align: start;
  cursor: pointer;
}
.language-options .is-current { color: #19a7ff; }
.language-options .language-option:hover,
.language-options .language-option:focus-visible { background: #232323; outline: none; }
.i18n-demo { gap: 1rem; }
.i18n-demo-message { font-size: 1.125rem; }
.i18n-demo-actions { flex-wrap: wrap; gap: 0.65rem; }
html[lang="zh-CN"] .hero-title { font-size: clamp(3rem, 6vw, 5.75rem); line-height: 1.25; }
html[lang="zh-CN"] .docs-paragraph,
html[lang="zh-CN"] .docs-lead { line-height: 1.9; }
@media (max-width: 600px) {
  .header-actions { gap: 0.55rem; }
  .header-actions .version, .header-actions .github-link { display: none; }
  html[lang="zh-CN"] .hero-title { font-size: clamp(2.3rem, 10vw, 3.5rem); }
}
