:root {
  --bg: #f5f0e8;
  --surface: rgba(255, 252, 248, 0.78);
  --surface-strong: #fbf6ef;
  --text: #16130f;
  --muted: #8a7f70;
  --muted-light: #b0a594;
  --rule: rgba(22, 19, 15, 0.10);
  --rule-strong: rgba(22, 19, 15, 0.18);
  --accent: #2a2520;
  --accent-muted: rgba(245, 240, 232, 0.78);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "DM Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(ellipse 55% 42% at 50% 0%, rgba(255, 255, 255, 0.65), transparent 72%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

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

code,
pre,
.mono {
  font-family: "DM Mono", "SF Mono", "Fira Code", "Consolas", monospace;
}

.page {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 18px;
  padding: 26px 0 12px;
  max-width: 920px;
  margin: 0 auto;
}

.brand {
  font-family: "Bricolage Grotesque", serif;
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.04em;
}

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

.nav a {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 4px;
  border-bottom: 1.5px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--text);
}

.copy-page {
  font-family: "DM Mono", monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  background: none;
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
  padding: 5px 12px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

.copy-page:hover {
  color: var(--text);
  border-color: var(--muted);
}

.copy-page.is-copied {
  color: var(--text);
  border-color: var(--text);
}

.hero {
  padding: clamp(56px, 10vw, 108px) 0 clamp(28px, 4vw, 44px);
  max-width: 920px;
  margin: 0 auto;
}

.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 18px;
}

.eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.title {
  font-family: "Bricolage Grotesque", serif;
  font-size: clamp(2.45rem, 6vw, 5rem);
  font-weight: 600;
  line-height: 0.96;
  letter-spacing: -0.05em;
  text-wrap: balance;
}

.lead {
  margin-top: 22px;
  font-size: clamp(1.08rem, 2vw, 1.28rem);
  line-height: 1.8;
  color: var(--text);
  max-width: 66ch;
}

.lead strong {
  font-weight: 500;
}

.lead em {
  font-style: italic;
}

.section {
  padding: clamp(28px, 6vw, 72px) 0;
}

.section-inner {
  max-width: 920px;
  margin: 0 auto;
}

.section-title {
  font-family: "Bricolage Grotesque", serif;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin-bottom: 18px;
}

.section-copy {
  max-width: 72ch;
  font-size: clamp(1rem, 1.6vw, 1.08rem);
  line-height: 1.78;
  color: var(--text);
}

.section-copy p + p,
.section-copy ul + p,
.section-copy p + ul {
  margin-top: 14px;
}

.section-copy strong {
  font-weight: 500;
}

.section-copy em {
  font-style: italic;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin-top: 26px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 16px 40px rgba(22, 19, 15, 0.05);
}

.card h2,
.card h3 {
  font-family: "Bricolage Grotesque", serif;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}

.compat-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 20px;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(22, 19, 15, 0.05);
}

.compat-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 22px;
}

.compat-row + .compat-row {
  border-top: 1px solid var(--rule);
}

.compat-env {
  font-family: "DM Mono", monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  width: 160px;
  flex-shrink: 0;
}

.compat-pill {
  font-family: "DM Sans", sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  padding: 5px 14px;
  white-space: nowrap;
}

.card p,
.card li {
  font-size: 0.98rem;
  line-height: 1.68;
  color: var(--muted);
}

.card ul {
  padding-left: 18px;
}

.panel {
  background: var(--surface-strong);
  border: 1px solid var(--rule-strong);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 44px rgba(22, 19, 15, 0.06);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--rule);
}

.panel-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.copy-button {
  appearance: none;
  border: 1px solid var(--rule-strong);
  background: transparent;
  border-radius: 999px;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.copy-button:hover {
  background: rgba(22, 19, 15, 0.04);
  color: var(--text);
  border-color: var(--rule-strong);
}

.copy-button.is-copied {
  color: var(--text);
}

.requirements-details {
  margin-top: 22px;
}

.requirements-details summary {
  list-style: none;
}

.requirements-details summary::-webkit-details-marker {
  display: none;
}

.requirements-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "DM Mono", monospace;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-light);
  cursor: pointer;
  transition: color 0.2s ease;
}

.requirements-toggle:hover {
  color: var(--text);
}

.requirements-toggle svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  transition: transform 0.2s ease;
}

.requirements-details[open] .requirements-toggle svg {
  transform: rotate(90deg);
}

.requirements-panel {
  margin-top: 14px;
}

.requirements-list {
  list-style: none;
  margin: 0;
  padding: 18px 20px 20px;
}

.requirements-list li {
  position: relative;
  padding-left: 24px;
  font-family: "DM Mono", "SF Mono", "Fira Code", "Consolas", monospace;
  font-size: 0.94rem;
  line-height: 1.8;
  color: var(--text);
}

.requirements-list li + li {
  margin-top: 4px;
}

.requirements-list li::before {
  content: "\2014";
  position: absolute;
  left: 0;
  top: 0;
  font-size: 0.78rem;
  color: var(--muted-light);
}

.requirements-list li.req-no::before {
  content: "\00D7";
  color: var(--muted);
}

.requirements-list li.req-no {
  color: var(--muted);
}

.panel pre {
  margin: 0;
  padding: 18px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: normal;
  line-height: 1.7;
  font-size: 0.94rem;
  color: var(--text);
}

.panel code {
  font-size: 0.94rem;
}

.panel pre a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.panel pre a:hover {
  color: var(--text);
}

.ops-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 2px;
  margin-top: 26px;
}

.ops-card {
  background: var(--bg);
  padding: clamp(20px, 3vw, 32px);
}

.ops-card h3,
.ops-card h4 {
  font-family: "DM Mono", monospace;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

.ops-card p {
  font-size: 0.94rem;
  line-height: 1.68;
  color: var(--muted);
}

.callout {
  background: var(--accent);
  color: #f5f0e8;
  border-radius: 22px;
  padding: clamp(24px, 4vw, 36px);
  max-width: 920px;
  margin: 0 auto;
}

.callout .section-title {
  color: #f5f0e8;
}

.callout .section-copy {
  color: var(--accent-muted);
}

.callout a {
  color: #f5f0e8;
  border-bottom: 1px solid rgba(245, 240, 232, 0.26);
}

.journey {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 920px;
  margin: 0 auto;
  padding: clamp(28px, 6vw, 56px) 0 0;
  border-top: 1px solid var(--rule);
}

.journey-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-decoration: none;
  transition: color 0.15s ease;
}

.journey-link:hover {
  color: var(--text);
}

.journey-link--next {
  align-items: flex-end;
  margin-left: auto;
}

.journey-dir {
  font-family: "DM Mono", monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-light);
}

.journey-title {
  font-family: "Bricolage Grotesque", serif;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text);
}

.footer {
  padding: 58px 0 30px;
  text-align: center;
}

.footer-brand {
  font-family: "Bricolage Grotesque", serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 600;
  letter-spacing: -0.04em;
}

.footer-sub {
  margin-top: 8px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--muted);
}

@media (max-width: 820px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav {
    justify-content: flex-start;
  }
}

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

  .hero {
    padding-top: 36px;
  }

  .card {
    padding: 18px;
  }

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

  .panel-head,
  .panel pre {
    padding-left: 16px;
    padding-right: 16px;
  }
}
