/* Ganbitera blog — same visual language as the app (apps/web/src/styles.css tokens).
   One external stylesheet: the CSP allows style-src 'self' only, so no inline styles anywhere. */

@font-face {
  font-family: "Outfit Variable";
  src: url("fonts/outfit.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Syne Variable";
  src: url("fonts/syne.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/plex-mono.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --background: #14121f;
  --surface-1: #181623;
  --surface-2: #1c1a29;
  --surface-3: #242233;
  --text-primary: #ededf0;
  --text-secondary: #9b9eb0;
  --text-tertiary: #878ba4;
  --violet: #8b5cf6;
  --violet-action: #7c3aed;
  --violet-text: #a783f8;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.16);
  --shadow-card: 0 6px 24px -10px rgba(0, 0, 0, 0.55);
  --radius: 0.5rem;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --font-sans: "Outfit Variable", system-ui, sans-serif;
  --font-display: "Syne Variable", "Outfit Variable", sans-serif;
  --font-mono: "IBM Plex Mono", "SF Mono", monospace;
  --page: 72rem;
  --read: 42rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text-primary);
  font: 400 1rem/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

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

h1,
h2,
h3 {
  margin: 0;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: 1rem;
}

.mono {
  font-family: var(--font-mono);
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  padding: 0.5rem 0.75rem;
  background: var(--violet-action);
  color: #fff;
  border-radius: var(--radius);
}
.skip:focus {
  top: 0.75rem;
}

/* ── Header: one bar, same as the app's (height, blur, bottom border, wordmark) ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(20, 18, 31, 0.8);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.bar {
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.pill {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  /* Same wordmark as the app header: Outfit bold, 18px, 0.05em tracking, uppercase. */
  font: 700 1.125rem/1.55 var(--font-sans);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
}
.nav a {
  color: var(--text-secondary);
  transition: color 0.15s;
}
.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--text-primary);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  min-height: 2.25rem;
  padding: 0.5rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--violet-action);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  transition: opacity 0.15s, border-color 0.15s, transform 0.15s var(--ease);
}
.btn:hover {
  opacity: 0.9;
}
.btn:active {
  transform: scale(0.97);
}
/* Secondary, as the app's Button variant="secondary": bordered, no fill. */
.btn.alt,
.btn.ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text-primary);
  font-weight: 500;
}
.btn.alt:hover,
.btn.ghost:hover {
  opacity: 1;
  border-color: var(--border-hover);
}

/* ── Hero (index) ── */
.hero {
  padding-block: 4rem 2.5rem;
}
.eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--violet-text);
}
.hero h1 {
  font: 700 clamp(2.25rem, 5vw, 3.75rem) / 1.05 var(--font-display);
  letter-spacing: -0.02em;
  max-width: 18ch;
}
.lede {
  margin: 1rem 0 0;
  max-width: 38rem;
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--text-secondary);
}
.empty {
  color: var(--text-secondary);
}

.section-label {
  margin: 3.5rem 0 1.25rem;
  font: 600 0.6875rem/1 var(--font-sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

/* ── Cards ── */
.card {
  display: flex;
  flex-direction: column;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: border-color 0.2s, transform 0.25s var(--ease);
}
.card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}
.card-media {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--surface-3);
  aspect-ratio: 16 / 9;
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.card:hover .card-media img {
  transform: scale(1.03);
}
/* 1px inset outline so a cover never melts into the card edge (DESIGN.md media rule). */
.card-media::after,
.post-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  pointer-events: none;
}
.card-body {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  padding: 1.25rem 1.25rem 1.5rem;
}
.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-tertiary);
}
.card h2,
.card h3 {
  font: 600 1.25rem/1.3 var(--font-sans);
  letter-spacing: -0.01em;
}
/* The whole card is the hit area: the title link stretches over it. */
.card h2 a::after,
.card h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
}
.card {
  position: relative;
}
.excerpt {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card.featured .card-body {
  justify-content: center;
  gap: 0.875rem;
}
.card.featured h2 {
  font: 700 clamp(1.5rem, 3vw, 2.25rem) / 1.15 var(--font-display);
  letter-spacing: -0.02em;
}
.card.featured .excerpt {
  font-size: 1.0625rem;
  -webkit-line-clamp: 4;
  line-clamp: 4;
}
@media (min-width: 900px) {
  .card.featured {
    flex-direction: row;
  }
  .card.featured .card-media {
    flex: 0 0 58%;
    aspect-ratio: auto;
    min-height: 22rem;
  }
  .card.featured .card-body {
    padding: 2.5rem;
  }
}

.grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 600px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 960px) {
  .grid:not(.two) {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ── Post ── */
.post {
  padding-top: 2.5rem;
}
.back {
  display: inline-block;
  margin-bottom: 2rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: color 0.15s;
}
.back:hover {
  color: var(--text-primary);
}
.post-head {
  max-width: 48rem;
}
.post-head h1 {
  font: 700 clamp(2rem, 4.5vw, 3.25rem) / 1.1 var(--font-display);
  letter-spacing: -0.02em;
}
.post-head .meta {
  margin-top: 1.25rem;
}
.post-cover {
  position: relative;
  margin: 2.5rem 0 0;
  border-radius: 0.75rem;
  overflow: hidden;
  background: var(--surface-3);
  aspect-ratio: 16 / 9;
}
.post-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.prose {
  max-width: var(--read);
  margin: 3rem 0 0;
  font-size: 1.125rem;
  line-height: 1.75;
  color: #c9cbd6;
}
.prose > :first-child {
  margin-top: 0;
}
.prose p {
  margin: 1.25rem 0;
}
.prose h2,
.prose h3 {
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-weight: 600;
  line-height: 1.25;
}
.prose h2 {
  margin: 3rem 0 1rem;
  font-size: 1.75rem;
  letter-spacing: -0.02em;
}
.prose h3 {
  margin: 2.25rem 0 0.75rem;
  font-size: 1.3125rem;
  letter-spacing: -0.01em;
}
.prose a {
  color: var(--violet-text);
  text-decoration: underline;
  text-decoration-color: rgba(167, 131, 248, 0.4);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s;
}
.prose a:hover {
  text-decoration-color: currentColor;
}
.prose strong {
  color: var(--text-primary);
  font-weight: 600;
}
.prose ul,
.prose ol {
  margin: 1.25rem 0;
  padding-left: 1.5rem;
}
.prose li {
  margin: 0.4rem 0;
}
.prose li::marker {
  color: var(--text-tertiary);
}
.prose blockquote {
  margin: 2rem 0;
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 3px solid var(--violet);
  color: var(--text-primary);
  font-size: 1.1875rem;
}
.prose blockquote p {
  margin: 0.5rem 0;
}
.prose code {
  padding: 0.125em 0.375em;
  border-radius: 0.375rem;
  background: var(--surface-3);
  font: 0.875em var(--font-mono);
  color: var(--text-primary);
}
.prose img {
  margin: 2rem 0;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
}

/* ── Footer ── */
.site-footer {
  margin-top: 5.5rem;
  border-top: 1px solid var(--border);
  background: var(--surface-1);
}
.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  padding-block: 3rem 2rem;
}
.foot-brand p {
  margin: 0.875rem 0 0;
  max-width: 20rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-secondary);
}
.foot-links {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
  color: var(--text-tertiary);
}
.foot-links a {
  transition: color 0.15s;
}
.foot-links a:hover {
  color: var(--text-secondary);
}
.legal {
  padding-block: 1.5rem 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  .card:hover,
  .card:hover .card-media img {
    transform: none;
  }
}

@media (max-width: 599px) {
  .hero {
    padding-block: 2.5rem 1.5rem;
  }
  .nav {
    display: none;
  }
  .pill {
    gap: 0.75rem;
  }
  .brand {
    font-size: 1rem;
  }
  .btn {
    padding-inline: 0.75rem;
  }
  .prose {
    font-size: 1.0625rem;
  }
}

/* ── Cards: topic and kind labels ── */
.card-top {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0;
  font-size: 0.75rem;
}
.topic {
  color: var(--text-tertiary);
}
.kind {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--violet-text);
}
.kind::before {
  content: "";
  width: 0.375rem;
  height: 0.375rem;
  background: currentColor;
}
.card .excerpt {
  margin-bottom: 0.25rem;
}

/* ── Index: topic sections as list rows ── */
.topics {
  display: grid;
  gap: 3.5rem 4rem;
  margin-top: 4rem;
}
@media (min-width: 960px) {
  .topics {
    grid-template-columns: repeat(2, 1fr);
  }
}
.topic-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.topic-head .eyebrow {
  margin-bottom: 0.375rem;
  color: var(--text-tertiary);
}
.topic-head h2 {
  font: 700 1.75rem/1.15 var(--font-display);
  letter-spacing: -0.02em;
}
.all {
  font-size: 0.875rem;
  color: var(--violet-text);
}
.all:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.rows {
  margin: 0;
  padding: 0;
  list-style: none;
}
.row {
  display: grid;
  grid-template-columns: 8.5rem 1fr auto;
  gap: 1rem;
  align-items: baseline;
  padding-block: 1rem;
  border-bottom: 1px solid var(--border);
}
.row-date,
.row-kind {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-tertiary);
}
.row-title {
  font-weight: 500;
  line-height: 1.35;
}
.row-title:hover {
  color: var(--violet-text);
}
@media (max-width: 599px) {
  .row {
    grid-template-columns: 1fr auto;
  }
  .row-date {
    grid-column: 1 / -1;
  }
}

.crumbs {
  margin: 0 0 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.crumbs a:hover {
  color: var(--text-primary);
}

/* ── Post: three columns (contents · text · call to action) ── */
.post {
  padding-top: 2rem;
}
.post-head .crumbs {
  margin-bottom: 1.5rem;
}
.kind-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--violet-text);
}
.square {
  width: 0.5rem;
  height: 0.5rem;
  background: currentColor;
}
.byline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 1rem;
  margin: 1.5rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.9375rem;
}
.byline .meta {
  margin: 0;
}
.post-layout {
  display: grid;
  gap: 2rem;
  margin-top: 3rem;
  align-items: start;
}
.post-layout .prose {
  margin: 0;
}
.toc summary {
  cursor: pointer;
  margin-bottom: 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.toc ol {
  margin: 0;
  padding: 0 0 0 1rem;
  list-style: none;
  border-left: 1px solid var(--border);
}
.toc li + li {
  margin-top: 0.75rem;
}
.toc a {
  display: block;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--text-secondary);
  transition: color 0.15s;
}
.toc a:hover {
  color: var(--text-primary);
}
.cta-card {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--surface-1);
  box-shadow: var(--shadow-card);
}
.cta-card .eyebrow {
  margin-bottom: 0.75rem;
}
.cta-title {
  margin: 0;
  font: 700 1.375rem/1.2 var(--font-display);
  letter-spacing: -0.01em;
}
.cta-text {
  margin: 0.75rem 0 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text-secondary);
}
@media (max-width: 1099px) {
  .toc details:not([open]) ol {
    display: none;
  }
}
@media (min-width: 1100px) {
  .post-layout {
    grid-template-columns: 13rem minmax(0, var(--read)) 17rem;
    justify-content: space-between;
  }
  .toc,
  .cta-card {
    position: sticky;
    top: 5.5rem;
  }
  .toc summary {
    pointer-events: none;
  }
}

@media (min-width: 1100px) {
  .toc summary {
    list-style: none;
  }
  .toc summary::-webkit-details-marker {
    display: none;
  }
}

/* ── Guides (hub + guide page) ── */
.g-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.g-head .eyebrow {
  margin-bottom: 0.375rem;
  color: var(--text-tertiary);
}
.g-head h2,
.g-chapters h2 {
  font: 700 clamp(1.75rem, 3vw, 2.25rem) / 1.1 var(--font-display);
  letter-spacing: -0.02em;
}
.g-paths,
.g-group {
  margin-top: 4rem;
}
.g-path-grid,
.g-card-grid {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 900px) {
  .g-path-grid,
  .g-card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.g-path,
.g-card {
  display: flex;
  flex-direction: column;
  padding: 0.75rem 0.75rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--surface-1);
  transition: border-color 0.15s;
}
.g-path:hover,
.g-card:hover {
  border-color: var(--border-hover);
}
.g-path > :not(.g-path-art),
.g-card > :not(.g-card-media) {
  margin-inline: 0.75rem;
}
.g-path-art,
.g-card-media,
.g-ch-art {
  display: block;
  overflow: hidden;
  border-radius: 0.5rem;
  background: var(--background);
  aspect-ratio: 16 / 9;
}
.g-path-art img,
.g-card-media img,
.g-ch-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease);
}
.g-card:hover .g-card-media img,
.g-path:hover .g-path-art img {
  transform: scale(1.02);
}
.g-path-n,
.g-ch-n,
.g-card-top {
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--violet-text);
}
.g-card-top {
  color: var(--text-tertiary);
}
.g-path h3,
.g-card h3,
.g-ch-card h3 {
  font: 600 1.25rem/1.25 var(--font-sans);
}
.g-card h3 a:hover {
  color: var(--violet-text);
}
.g-path-blurb,
.g-card-text,
.g-ch-card p:not(.g-ch-n) {
  margin-top: 0.5rem;
  color: var(--text-secondary);
  line-height: 1.55;
}
.g-links {
  margin-top: 1rem;
  padding: 0;
  list-style: none;
}
.g-links a {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.75rem;
  align-items: baseline;
  padding-block: 0.875rem;
  border-top: 1px solid var(--border);
  line-height: 1.35;
}
.g-links a:hover {
  color: var(--violet-text);
}
.g-ch {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
}

.g-featured {
  display: grid;
  gap: 2rem;
  margin-top: 4rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--surface-1);
  align-items: center;
}
@media (min-width: 900px) {
  .g-featured {
    grid-template-columns: 1.1fr 1fr;
    padding: 1.5rem 2.5rem 1.5rem 1.5rem;
  }
}
.g-featured-media {
  display: block;
  overflow: hidden;
  border-radius: 0.75rem;
  aspect-ratio: 16 / 9;
}
.g-featured-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.g-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.g-pill {
  padding: 0.375rem 0.75rem;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.1);
  color: var(--violet-text);
}
.g-featured h2 {
  font: 700 clamp(1.75rem, 3vw, 2.5rem) / 1.1 var(--font-display);
  letter-spacing: -0.02em;
}
.g-featured h2 a:hover {
  color: var(--violet-text);
}
.g-featured-text {
  margin-top: 1rem;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text-secondary);
}
.g-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 1.5rem 0;
  border-block: 1px solid var(--border);
}
.g-stats div {
  padding: 1rem 1rem 1rem 0;
}
.g-stats div + div {
  padding-left: 1rem;
  border-left: 1px solid var(--border);
}
.g-stats dd {
  margin: 0;
  font-size: 1.375rem;
  font-variant-numeric: tabular-nums;
}
.g-stats dt {
  order: 2;
  margin-top: 0.25rem;
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.g-stats div {
  display: flex;
  flex-direction: column-reverse;
}
.g-az {
  margin-top: 2rem;
}
.g-az-row {
  grid-template-columns: 1fr auto;
}
.soon {
  color: var(--text-tertiary);
}

/* Guide page */
.guide {
  padding-top: 2rem;
}
.g-hero {
  display: grid;
  gap: 2rem;
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--surface-1);
  align-items: center;
}
@media (min-width: 1000px) {
  .g-hero {
    grid-template-columns: 1.15fr 1fr;
    padding: 3rem;
  }
}
.g-hero h1 {
  font: 700 clamp(2.25rem, 4.5vw, 3.5rem) / 1.05 var(--font-display);
  letter-spacing: -0.02em;
}
.g-tldr {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: rgba(20, 18, 31, 0.6);
}
.g-tldr p:first-child {
  margin: 0 0 0.5rem;
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  color: var(--violet-text);
}
.g-tldr p:last-child {
  margin: 0;
  line-height: 1.6;
}
.g-meta {
  margin-top: 1.25rem;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.g-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.g-hero-art {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: var(--background);
  aspect-ratio: 1200 / 673;
}
.g-loop,
.g-still {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.g-still {
  visibility: hidden;
}
@media (prefers-reduced-motion: reduce) {
  .g-loop {
    display: none;
  }
  .g-still {
    visibility: visible;
  }
}

.g-chapters {
  margin-top: 4rem;
}
.g-chapters .eyebrow {
  color: var(--text-tertiary);
}
.g-ch-grid {
  display: grid;
  gap: 1.25rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 700px) {
  .g-ch-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1000px) {
  .g-ch-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.g-ch-card {
  display: flex;
  flex-direction: column;
  padding: 0.75rem 0.75rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--surface-1);
}
.g-ch-card > :not(.g-ch-art) {
  margin-inline: 0.5rem;
}
.g-jump {
  margin-top: auto;
  padding-top: 1rem;
  font-size: 0.875rem;
  color: var(--violet-text);
}
.g-jump:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.toc a .mono {
  color: var(--text-tertiary);
  margin-right: 0.25rem;
}
.g-chapter + .g-chapter,
.g-doing,
.g-faq {
  margin-top: 3.5rem;
}
.g-chapter .eyebrow {
  margin-bottom: 0.25rem;
  color: var(--text-tertiary);
}
.g-chapter h2 {
  margin-top: 0;
}
.g-chapter-art {
  width: 100%;
  margin: 1.25rem 0 0.5rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
}
.g-readnext-label {
  margin-top: 1.5rem;
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.g-prose .g-readnext {
  display: grid;
  gap: 0.75rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 700px) {
  .g-prose .g-readnext {
    grid-template-columns: repeat(2, 1fr);
  }
}
.g-readnext li {
  margin: 0;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--surface-1);
  font-size: 1rem;
  line-height: 1.4;
}
.g-readnext li::before {
  content: none;
}
.g-readnext a {
  color: var(--text-primary);
  text-decoration: none;
}
.g-readnext li:has(a):hover {
  border-color: var(--border-hover);
}
.g-readnext .soon .mono {
  display: block;
  margin-top: 0.375rem;
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.g-doing {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--surface-1);
}
.g-doing h2 {
  margin-top: 0;
}
.g-faq details {
  border-bottom: 1px solid var(--border);
}
.g-faq summary {
  cursor: pointer;
  padding-block: 1rem;
  font-weight: 600;
}
.g-faq details p {
  margin-top: 0;
  color: var(--text-secondary);
}
.prose a.btn {
  color: #fff;
  text-decoration: none;
}
.prose a.btn.alt,
.prose a.btn.ghost {
  color: var(--text-primary);
}
