:root {
  color-scheme: dark;
  --bg: #07111f;
  --bg-soft: #0b192b;
  --panel: rgba(14, 31, 52, 0.78);
  --panel-solid: #0e1f34;
  --line: rgba(147, 197, 253, 0.16);
  --line-strong: rgba(105, 214, 255, 0.34);
  --text: #f4f8ff;
  --muted: #a9bad0;
  --cyan: #55d6ff;
  --cyan-deep: #0ea5e9;
  --purple: #a78bfa;
  --green: #71e5b4;
  --amber: #ffd479;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  --radius: 22px;
  --max: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 82% 4%, rgba(79, 70, 229, 0.17), transparent 27rem),
    radial-gradient(circle at 12% 18%, rgba(14, 165, 233, 0.13), transparent 25rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: linear-gradient(to bottom, black, transparent 68%);
  content: "";
  opacity: 0.46;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

button,
input {
  font: inherit;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 50;
  padding: 0.65rem 0.9rem;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  transform: translateY(-160%);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(7, 17, 31, 0.78);
  backdrop-filter: blur(18px);
}

.nav {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.68rem;
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: linear-gradient(145deg, rgba(85, 214, 255, 0.2), rgba(167, 139, 250, 0.2));
  box-shadow: inset 0 0 22px rgba(85, 214, 255, 0.08);
}

.brand-mark::before {
  width: 13px;
  height: 7px;
  border-right: 2px solid var(--cyan);
  border-bottom: 2px solid var(--cyan);
  content: "";
  transform: rotate(-45deg);
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.2rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.nav-links a {
  text-decoration: none;
}

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

.nav-star {
  padding: 0.5rem 0.78rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text) !important;
  background: rgba(85, 214, 255, 0.08);
}

.hero {
  display: grid;
  min-height: 720px;
  align-items: center;
  gap: 4rem;
  grid-template-columns: 1.12fr 0.88fr;
  padding: 7rem 0 5rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1.2rem;
  color: var(--cyan);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 28px;
  height: 1px;
  background: var(--cyan);
  content: "";
}

h1,
h2,
h3 {
  margin-top: 0;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

h1 {
  max-width: 820px;
  margin-bottom: 1.4rem;
  font-size: clamp(3.2rem, 7vw, 6.2rem);
  text-wrap: balance;
}

.gradient-text {
  background: linear-gradient(95deg, #ffffff 10%, var(--cyan) 58%, #c4b5fd 100%);
  background-clip: text;
  color: transparent;
}

.hero-copy {
  max-width: 690px;
  margin: 0 0 2rem;
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.3rem);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0.76rem 1.15rem;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--text);
  font-weight: 750;
  text-decoration: none;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.button:hover,
.button:focus-visible {
  border-color: var(--cyan);
  transform: translateY(-2px);
}

.button-primary {
  border-color: transparent;
  background: linear-gradient(110deg, #0ea5e9, #6366f1);
  box-shadow: 0 14px 40px rgba(14, 165, 233, 0.2);
}

.button-quiet {
  background: rgba(255, 255, 255, 0.035);
}

.proof-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.35rem;
  margin-top: 2.1rem;
  color: #c4d2e5;
  font-size: 0.88rem;
}

.proof-row span::before {
  margin-right: 0.45rem;
  color: var(--green);
  content: "✓";
}

.memory-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 26px;
  background: linear-gradient(155deg, rgba(17, 44, 72, 0.92), rgba(11, 25, 43, 0.92));
  box-shadow: var(--shadow);
}

.memory-card::after {
  position: absolute;
  top: -90px;
  right: -70px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(167, 139, 250, 0.14);
  filter: blur(6px);
  content: "";
}

.card-bar {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.74rem;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef6a6a;
}

.dot:nth-child(2) { background: var(--amber); }
.dot:nth-child(3) { background: var(--green); }
.bar-title { margin-left: 0.45rem; }

.memory-body {
  position: relative;
  z-index: 1;
  padding: 1.5rem 1.65rem 1.75rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86rem;
}

.memory-body p {
  margin: 0.42rem 0;
}

.code-muted { color: #7890ac; }
.code-key { color: #c4b5fd; }
.code-value { color: #8fe7ff; }
.code-heading { color: #ffffff; font-weight: 800; }
.code-evidence { color: var(--green); }

.flow-line {
  display: grid;
  margin-top: 1.2rem;
  gap: 0.8rem;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  color: var(--muted);
  font-size: 0.72rem;
  text-align: center;
}

.flow-node {
  padding: 0.52rem 0.35rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
}

.flow-arrow { color: var(--cyan); }

.section {
  padding: 6rem 0;
}

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

.section-kicker {
  margin: 0 0 0.75rem;
  color: var(--cyan);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

h2 {
  max-width: 760px;
  margin-bottom: 1.2rem;
  font-size: clamp(2.1rem, 4vw, 3.55rem);
  text-wrap: balance;
}

.section-lede {
  max-width: 720px;
  margin: 0 0 2.6rem;
  color: var(--muted);
  font-size: 1.08rem;
}

.grid-3 {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, 1fr);
}

.feature,
.comparison-card,
.step,
.stat {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025);
}

.feature {
  min-height: 250px;
  padding: 1.55rem;
}

.feature-number {
  display: inline-grid;
  width: 35px;
  height: 35px;
  margin-bottom: 2.6rem;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--cyan);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.76rem;
}

.feature h3,
.step h3,
.comparison-card h3 {
  margin-bottom: 0.7rem;
  font-size: 1.2rem;
}

.feature p,
.step p,
.comparison-card p {
  margin: 0;
  color: var(--muted);
}

.timeline {
  display: grid;
  position: relative;
  gap: 1rem;
  grid-template-columns: repeat(3, 1fr);
}

.step {
  position: relative;
  padding: 1.55rem;
}

.step-label {
  display: block;
  margin-bottom: 2rem;
  color: var(--purple);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.split-panel {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 26px;
  background: var(--panel-solid);
  grid-template-columns: 1fr 1fr;
  box-shadow: var(--shadow);
}

.split-panel > div {
  padding: clamp(1.6rem, 4vw, 3rem);
}

.split-panel > div + div {
  border-left: 1px solid var(--line);
}

.check-list {
  display: grid;
  margin: 1.5rem 0 0;
  padding: 0;
  gap: 0.85rem;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 1.65rem;
  color: #d7e4f4;
}

.check-list li::before {
  position: absolute;
  left: 0;
  color: var(--green);
  content: "✓";
}

.terminal {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #050b14;
}

.terminal pre {
  overflow-x: auto;
  margin: 0;
  padding: 1.25rem;
  color: #d9e7f7;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.75;
  white-space: pre;
}

.terminal-head {
  display: flex;
  min-height: 43px;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.7rem 0.55rem 1rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.74rem;
}

.copy-button {
  padding: 0.35rem 0.62rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  cursor: pointer;
}

.copy-button:hover,
.copy-button:focus-visible {
  border-color: var(--cyan);
  color: var(--text);
}

.compare-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, 1fr);
}

.comparison-card {
  display: flex;
  min-height: 265px;
  flex-direction: column;
  padding: 1.55rem;
  text-decoration: none;
  transition: border-color 150ms ease, transform 150ms ease;
}

.comparison-card:hover,
.comparison-card:focus-visible {
  border-color: var(--line-strong);
  transform: translateY(-3px);
}

.comparison-card .tag {
  align-self: flex-start;
  margin-bottom: 2.2rem;
}

.comparison-link {
  margin-top: auto;
  padding-top: 1.5rem;
  color: var(--cyan);
  font-weight: 700;
}

.tag {
  display: inline-flex;
  padding: 0.34rem 0.62rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #c8d7e9;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
}

.stats {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, 1fr);
}

.stat {
  padding: 1.3rem;
}

.stat strong {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--text);
  font-size: 1.05rem;
}

.stat span {
  color: var(--muted);
  font-size: 0.85rem;
}

.cta {
  display: grid;
  overflow: hidden;
  position: relative;
  min-height: 360px;
  place-items: center;
  padding: 3rem;
  border: 1px solid var(--line-strong);
  border-radius: 30px;
  background:
    radial-gradient(circle at 25% 20%, rgba(85, 214, 255, 0.17), transparent 35%),
    radial-gradient(circle at 80% 75%, rgba(167, 139, 250, 0.18), transparent 38%),
    var(--panel-solid);
  text-align: center;
  box-shadow: var(--shadow);
}

.cta h2 {
  margin-right: auto;
  margin-left: auto;
}

.cta p {
  max-width: 650px;
  margin: 0 auto 1.7rem;
  color: var(--muted);
}

.cta .actions {
  justify-content: center;
}

.site-footer {
  margin-top: 5rem;
  padding: 2.2rem 0 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links a {
  text-decoration: none;
}

.footer-links a:hover { color: var(--text); }

/* Article and comparison pages */
.article-hero {
  padding: 7rem 0 3.5rem;
}

.article-hero h1 {
  max-width: 980px;
  font-size: clamp(2.7rem, 6vw, 5.2rem);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.6rem;
}

.article-layout {
  display: grid;
  align-items: start;
  gap: 4rem;
  grid-template-columns: minmax(0, 1fr) 250px;
}

.article {
  max-width: 790px;
}

.article h2 {
  margin-top: 4.5rem;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
}

.article h3 {
  margin-top: 2.5rem;
  font-size: 1.35rem;
}

.article p,
.article li {
  color: #c4d2e4;
  font-size: 1.03rem;
}

.article a {
  color: var(--cyan);
}

.article ul,
.article ol {
  padding-left: 1.35rem;
}

.article li + li {
  margin-top: 0.5rem;
}

.article blockquote {
  margin: 2rem 0;
  padding: 1.1rem 1.25rem;
  border-left: 3px solid var(--cyan);
  border-radius: 0 12px 12px 0;
  background: rgba(85, 214, 255, 0.06);
}

.article blockquote p {
  margin: 0;
  color: var(--text);
}

.table-wrap {
  overflow-x: auto;
  margin: 2rem 0;
  border: 1px solid var(--line);
  border-radius: 15px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(11, 25, 43, 0.7);
}

th,
td {
  padding: 0.95rem 1rem;
  border-bottom: 1px solid var(--line);
  color: #c7d5e6;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--text);
  font-size: 0.83rem;
  letter-spacing: 0.04em;
}

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

.article-aside {
  position: sticky;
  top: 96px;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(11, 25, 43, 0.75);
}

.article-aside strong {
  display: block;
  margin-bottom: 0.7rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-aside a {
  display: block;
  padding: 0.36rem 0;
  color: var(--muted);
  font-size: 0.86rem;
  text-decoration: none;
}

.article-aside a:hover { color: var(--cyan); }

.callout {
  margin: 2rem 0;
  padding: 1.2rem;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(85, 214, 255, 0.055);
}

.callout strong {
  display: block;
  margin-bottom: 0.45rem;
}

.callout p { margin: 0; }

.answer {
  margin: 1.2rem 0 2.5rem;
  padding: 1.4rem;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: linear-gradient(120deg, rgba(85, 214, 255, 0.08), rgba(167, 139, 250, 0.07));
}

.answer p {
  margin: 0;
  color: var(--text);
  font-size: 1.08rem;
}

@media (max-width: 900px) {
  .hero,
  .split-panel,
  .article-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 5rem;
  }

  .grid-3,
  .timeline,
  .compare-grid {
    grid-template-columns: 1fr;
  }

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

  .split-panel > div + div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .article-aside {
    display: none;
  }
}

@media (max-width: 680px) {
  .shell {
    width: min(calc(100% - 28px), var(--max));
  }

  .nav {
    min-height: 62px;
  }

  .nav-links a:not(.nav-star):not(.language-link) {
    display: none;
  }

  .hero {
    gap: 2.8rem;
    padding: 4.2rem 0 3.5rem;
  }

  h1 {
    font-size: clamp(2.75rem, 14vw, 4.2rem);
  }

  .section {
    padding: 4.5rem 0;
  }

  .memory-body {
    padding: 1.15rem;
    font-size: 0.74rem;
  }

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

  .flow-arrow { transform: rotate(90deg); }

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

  .cta {
    min-height: 330px;
    padding: 2rem 1.2rem;
  }

  .footer-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .article-hero {
    padding-top: 5rem;
  }
}

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