:root {
  color-scheme: dark;
  font-family: "Geist", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg: #090b0f;
  --panel: #11151b;
  --panel-raised: #151b22;
  --text: #f5f7f9;
  --muted: #a2abb6;
  --border: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.19);
  --green: #56d68a;
  --green-soft: rgba(86, 214, 138, 0.12);
  --purple-soft: rgba(110, 91, 255, 0.13);
  background: var(--bg);
  color: var(--text);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.7rem 1rem;
  border-radius: 0.45rem;
  background: var(--text);
  color: var(--bg);
  font-weight: 700;
  transform: translateY(-180%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.page-ambient {
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(70% 38% at 50% -8%, rgba(86, 214, 138, 0.19), transparent 70%),
    radial-gradient(48% 36% at 86% 24%, var(--purple-soft), transparent 74%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 28rem);
}

.site-header {
  position: sticky;
  z-index: 40;
  top: 0;
  border-bottom: 1px solid var(--border);
  background: rgba(9, 11, 15, 0.82);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  width: min(100% - 2rem, 78rem);
  min-height: 4rem;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 1.05rem;
  font-weight: 680;
  text-decoration: none;
}

.brand img {
  border-radius: 0.6rem;
  box-shadow: 0 0 30px rgba(86, 214, 138, 0.16);
}

.header-inner nav,
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.4rem;
}

.header-inner nav a,
.github-link,
.site-footer nav a {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 560;
  text-decoration: none;
  transition: color 150ms ease;
}

.header-inner nav a:hover,
.header-inner nav a:focus-visible,
.header-inner nav a[aria-current="page"],
.github-link:hover,
.github-link:focus-visible,
.site-footer nav a:hover,
.site-footer nav a:focus-visible {
  color: var(--text);
}

.header-inner nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--green);
  text-underline-offset: 0.45rem;
}

.page-hero {
  display: grid;
  width: min(100% - 2rem, 78rem);
  min-height: 36rem;
  margin: 0 auto;
  grid-template-columns: minmax(0, 1.35fr) minmax(17rem, 0.65fr);
  align-items: center;
  gap: clamp(3rem, 8vw, 8rem);
  padding: 7rem 0 6rem;
  animation: page-enter 540ms ease-out both;
}

.page-hero.not-found {
  grid-template-columns: minmax(0, 1fr);
}

.hero-copy {
  max-width: 50rem;
}

.eyebrow {
  margin: 0 0 0.85rem;
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 730;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1,
h2,
p {
  overflow-wrap: break-word;
}

h1 {
  max-width: 50rem;
  margin: 0;
  font-size: clamp(3rem, 6.8vw, 6.3rem);
  font-weight: 635;
  letter-spacing: -0.058em;
  line-height: 0.96;
}

.lede {
  max-width: 43rem;
  margin: 2rem 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.2rem;
}

.button {
  display: inline-flex;
  min-height: 2.8rem;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.72rem 1.05rem;
  border: 1px solid var(--green);
  border-radius: 0.5rem;
  background: var(--green);
  color: #07130c;
  font-size: 0.86rem;
  font-weight: 710;
  text-decoration: none;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease, transform 150ms ease;
}

.button:hover,
.button:focus-visible {
  background: #70e49c;
  transform: translateY(-1px);
}

.button-secondary {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  border-color: rgba(86, 214, 138, 0.52);
  background: var(--green-soft);
}

.hero-mark {
  position: relative;
  display: grid;
  min-height: 20rem;
  align-content: center;
  padding: 2rem;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 0.7rem;
  background:
    linear-gradient(145deg, rgba(86, 214, 138, 0.1), transparent 47%),
    rgba(17, 21, 27, 0.72);
  box-shadow: 0 2rem 7rem rgba(0, 0, 0, 0.33);
}

.hero-mark::before {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 2rem 2rem;
  content: "";
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent 90%);
  opacity: 0.42;
}

.hero-mark > * {
  position: relative;
}

.hero-mark span {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.14em;
}

.hero-mark code,
.hero-mark strong {
  display: block;
  margin-top: 0.42rem;
  font-size: clamp(0.85rem, 1.4vw, 1rem);
  overflow-wrap: anywhere;
}

.hero-mark code {
  color: var(--green);
}

.hero-mark i {
  display: block;
  width: 1px;
  height: 4.2rem;
  margin: 1.3rem 0 1.3rem 0.4rem;
  background: linear-gradient(var(--green), transparent);
  box-shadow: 0 0 18px var(--green);
}

.content-stack {
  border-top: 1px solid var(--border);
}

.content-section {
  width: min(100% - 2rem, 78rem);
  margin: 0 auto;
  padding: clamp(4.5rem, 8vw, 7rem) 0;
  border-bottom: 1px solid var(--border);
}

.content-section:last-child {
  border-bottom: 0;
}

.section-heading {
  max-width: 52rem;
}

.section-heading h2,
.next-step h2,
.source-note h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.8rem);
  font-weight: 620;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

.section-heading > p:last-child,
.content-section > p,
.next-step p,
.source-note p {
  max-width: 48rem;
  margin: 1.3rem 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
}

.terminal {
  max-width: 52rem;
  margin-top: 2.4rem;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  background: rgba(0, 0, 0, 0.42);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.035);
}

.terminal-label {
  display: block;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 720;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.terminal pre {
  margin: 0;
  padding: 1.35rem;
  overflow-x: auto;
  color: var(--green);
  font-size: 0.86rem;
  line-height: 1.8;
}

.content-section > p code,
.aside-panel code,
td code,
.step-list code {
  color: #c8f5d8;
  font-size: 0.88em;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(18rem, 0.85fr);
  align-items: start;
  gap: clamp(3rem, 8vw, 8rem);
}

.aside-panel {
  padding: 1.6rem;
  border-top: 1px solid var(--green);
  background: linear-gradient(180deg, var(--green-soft), rgba(17, 21, 27, 0.45));
}

.aside-panel p {
  margin: 0.75rem 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.aside-panel .aside-title {
  margin: 0;
  color: var(--text);
  font-size: 0.73rem;
  font-weight: 730;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.aside-panel ul {
  margin: 1rem 0 0;
  padding-left: 1.2rem;
  color: var(--muted);
  line-height: 1.9;
}

.code-panel > code {
  display: block;
  margin: 1.4rem 0;
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.text-link {
  display: inline-flex;
  gap: 0.4rem;
  margin-top: 1.35rem;
  color: var(--green);
  font-size: 0.86rem;
  font-weight: 680;
  text-decoration: none;
}

.text-link:hover,
.text-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.25rem;
}

.table-wrap {
  margin-top: 2.4rem;
  overflow-x: auto;
  border-top: 1px solid var(--border-strong);
}

table {
  width: 100%;
  min-width: 48rem;
  border-collapse: collapse;
}

th,
td {
  padding: 1.15rem 1rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 700;
}

td {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.65;
}

.comparison-table th:first-child {
  width: 20%;
}

.comparison-table td {
  width: 40%;
}

.link-list {
  margin-top: 2.4rem;
  border-top: 1px solid var(--border);
}

.link-list > a {
  display: flex;
  min-height: 6rem;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: padding 150ms ease, color 150ms ease;
}

.link-list > a:hover,
.link-list > a:focus-visible {
  padding-right: 0.35rem;
  color: var(--green);
}

.link-list strong,
.link-list small {
  display: block;
}

.link-list strong {
  font-size: 1rem;
}

.link-list small {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 400;
  line-height: 1.55;
}

.step-list {
  margin: 2.5rem 0 0;
  padding: 0;
  border-top: 1px solid var(--border);
  list-style: none;
}

.step-list li {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr);
  gap: 1.25rem;
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--border);
}

.step-list li > span {
  color: var(--green);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.75rem;
}

.step-list strong {
  display: block;
  font-size: 1rem;
}

.step-list p {
  max-width: 50rem;
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

.step-list-large li {
  padding: 2rem 0;
}

.step-list-large strong {
  font-size: 1.25rem;
}

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

.check-list li {
  position: relative;
  padding: 1rem 0 1rem 2rem;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  line-height: 1.6;
}

.check-list li::before {
  position: absolute;
  top: 1.05rem;
  left: 0;
  color: var(--green);
  content: "✓";
  font-weight: 800;
}

.warning-section {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(18rem, 0.85fr);
  gap: clamp(3rem, 8vw, 8rem);
  background:
    linear-gradient(90deg, rgba(255, 181, 71, 0.055), transparent 36%);
}

.warning-section .eyebrow {
  color: #f0b968;
}

.warning-section > p {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(240, 185, 104, 0.38);
}

.boundary-flow {
  display: grid;
  margin-top: 2.5rem;
  grid-template-columns: minmax(0, 1fr) 2rem minmax(0, 1.15fr) 2rem minmax(0, 1fr);
  align-items: stretch;
}

.boundary-flow > div {
  display: grid;
  min-height: 10rem;
  align-content: center;
  padding: 1.4rem;
  border: 1px solid var(--border);
  background: rgba(17, 21, 27, 0.58);
}

.boundary-flow > span {
  display: grid;
  place-items: center;
  color: var(--green);
}

.boundary-flow small,
.boundary-flow strong,
.boundary-flow code {
  display: block;
}

.boundary-flow small {
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 720;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.boundary-flow strong {
  margin-top: 0.5rem;
}

.boundary-flow code {
  margin-top: 0.9rem;
  color: var(--muted);
  font-size: 0.74rem;
  overflow-wrap: anywhere;
}

.boundary-flow .boundary-core {
  border-color: rgba(86, 214, 138, 0.36);
  background: var(--green-soft);
}

.next-step,
.source-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
}

.source-links {
  display: grid;
  min-width: min(100%, 26rem);
  gap: 0.8rem;
}

.source-links a {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
  text-decoration: none;
}

.source-links a:hover,
.source-links a:focus-visible {
  color: var(--green);
}

.site-footer {
  display: flex;
  width: min(100% - 2rem, 78rem);
  margin: 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 3rem;
  padding: 3rem 0;
  border-top: 1px solid var(--border);
}

.site-footer p {
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.footer-brand {
  font-size: 0.92rem;
}

@keyframes page-enter {
  from {
    opacity: 0;
    transform: translateY(0.5rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 860px) {
  .header-inner nav {
    display: none;
  }

  .page-hero {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 3.5rem;
    padding: 6rem 0 4rem;
  }

  .hero-mark {
    min-height: 16rem;
  }

  .split-section,
  .warning-section {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .boundary-flow {
    grid-template-columns: 1fr;
  }

  .boundary-flow > span {
    min-height: 2rem;
    transform: rotate(90deg);
  }

  .next-step,
  .source-note,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 540px) {
  .github-link {
    font-size: 0.76rem;
  }

  h1 {
    font-size: clamp(2.75rem, 13vw, 4rem);
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .content-section {
    padding: 4rem 0;
  }

  .step-list li {
    grid-template-columns: 2.2rem minmax(0, 1fr);
  }

  .site-footer nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.9rem;
  }
}

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

  .page-hero {
    animation: none;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
