/* =========================================================================
   Content pages + cozy pixel scenery
   ========================================================================= */

/* ---------- pixel landscape (CTA band) ---------- */
.cta-band {
  position: relative;
  overflow: hidden;
  padding-bottom: 0;
}

.cta-band__inner {
  position: relative;
  z-index: 1;
  padding-bottom: var(--section);
}

.pixel-scene {
  height: clamp(110px, 20.8vw, 300px);
  margin-top: auto;
  pointer-events: none;
}

.pixel-scene svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* ---------- subpage hero ---------- */
.page-hero {
  background: var(--surface-soft);
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--hairline);
}

.page-hero__eyebrow {
  color: var(--primary);
}

.page-hero h1 {
  margin-top: var(--sp-sm);
  color: var(--ink);
}

.page-hero__lede {
  margin-top: var(--sp-md);
  max-width: 62ch;
  color: var(--body);
}

.page-hero__meta {
  margin-top: var(--sp-lg);
  color: var(--muted-soft);
}

/* ---------- layout ---------- */
.page-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 64px;
  align-items: start;
  padding-top: 56px;
  padding-bottom: 96px;
}

.page-layout--single {
  max-width: 840px;
  padding-top: 56px;
  padding-bottom: 96px;
}

/* ---------- table of contents ---------- */
.toc {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  display: grid;
  gap: 2px;
}

.toc__title {
  margin-bottom: var(--sp-xs);
  color: var(--muted-soft);
  font-size: 11px;
}

.toc a {
  display: block;
  padding: 8px 0 8px 12px;
  border-left: 2px solid var(--hairline);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.toc a:hover {
  color: var(--ink);
  border-color: var(--primary);
}

/* ---------- prose ---------- */
.prose {
  max-width: 74ch;
  color: var(--body);
}

.prose h2 {
  margin: 44px 0 12px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
  scroll-margin-top: calc(var(--nav-h) + 24px);
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h3 {
  margin: 28px 0 8px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink);
  scroll-margin-top: calc(var(--nav-h) + 24px);
}

.prose p {
  margin-bottom: 14px;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.65;
}

.prose strong {
  font-weight: 700;
  color: var(--body-strong);
}

.prose ul {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
}

.prose ul li {
  position: relative;
  padding-left: 18px;
  font-size: 15px;
  font-weight: 300;
  line-height: 1.6;
}

.prose ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 5px;
  height: 5px;
  background: var(--grass);
}

.prose a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--hairline-strong);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.prose a:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.prose code {
  padding: 1px 5px;
  background: var(--surface-soft);
  border: 1px solid var(--hairline);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  color: var(--ink);
}

.prose hr {
  margin: 36px 0;
  border: 0;
  border-top: 1px solid var(--hairline);
}

.prose table {
  width: 100%;
  margin: 22px 0;
  border-collapse: collapse;
  font-size: 14px;
  font-weight: 300;
}

.prose th {
  padding: 10px 12px;
  border-bottom: 1px solid var(--hairline-strong);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-align: left;
  color: var(--muted);
}

.prose td {
  padding: 12px;
  border-bottom: 1px solid var(--hairline);
  vertical-align: top;
  line-height: 1.55;
}

.prose td:first-child {
  color: var(--ink);
  font-weight: 700;
}

/* ---------- callout + card grid ---------- */
.callout {
  margin: 26px 0;
  padding: 16px 20px;
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--grass);
}

.callout p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}

.callout .label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
}

.page-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-md);
  margin: 26px 0;
}

.page-card {
  padding: var(--sp-lg);
  background: var(--surface-card);
  border: 1px solid var(--hairline);
}

.page-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink);
}

.page-card p {
  margin: 0;
  font-size: 14px;
  font-weight: 300;
  line-height: 1.55;
}

.page-card a {
  display: inline-block;
  margin-top: var(--sp-sm);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}

.page-card a:hover {
  color: var(--primary);
}

/* ---------- compact footer for subpages ---------- */
.footer__slim {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-lg);
  flex-wrap: wrap;
}

.footer__inline {
  display: flex;
  gap: var(--sp-lg);
  flex-wrap: wrap;
}

.footer__inline a {
  font-size: 14px;
  font-weight: 300;
  color: var(--body);
  text-decoration: none;
}

.footer__inline a:hover {
  color: var(--primary);
}

/* ---------- no-JS mobile menu for subpages ---------- */
.mobile-nav {
  display: none;
  position: relative;
}

.mobile-nav > summary {
  list-style: none;
  cursor: pointer;
}

.mobile-nav > summary::-webkit-details-marker {
  display: none;
}

.mobile-nav__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 18px);
  z-index: 70;
  width: min(280px, calc(100vw - 32px));
  padding: 4px 20px 16px;
  background: var(--surface-card);
  border: 1px solid var(--hairline-strong);
}

.mobile-nav__panel a {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}

.mobile-nav__panel a:last-child {
  border-bottom: 0;
  color: var(--primary);
}

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .page-layout {
    grid-template-columns: 1fr;
    gap: var(--sp-lg);
    padding-top: 40px;
  }

  .toc {
    position: static;
    display: none;
  }

  .mobile-nav {
    display: block;
  }
}

@media (max-width: 768px) {
  .page-hero {
    padding: 48px 0 40px;
  }

  .page-layout,
  .page-layout--single {
    padding-top: 32px;
    padding-bottom: 64px;
  }

  .page-cards {
    grid-template-columns: 1fr;
  }

  .prose h2 {
    font-size: 21px;
  }
}
