/*
Theme Name: Acts of Gord
Theme URI: https://actsofgord.alsonkaw.com/
Description: The Acts of Gord child theme for Bricks.
Author: Acts of Gord
Template: bricks
Version: 0.2.0
*/

:root {
  --aog-ink: #180f2e;
  --aog-surface: #241a42;
  --aog-paper: #f2ecff;
  --aog-copy: #dcd2f5;
  --aog-muted: #a998cc;
  --aog-deep-muted: #6f5f94;
  --aog-cyan: #2de2e6;
  --aog-pink: #ff3d9a;
  --aog-red: #ff2d55;
  --aog-amber: #ffb020;
  --aog-yellow: #f5d90a;
  --aog-green: #7cf25a;
  --aog-orange: #ff6b35;
  --aog-blue: #2d7ff9;
  --aog-violet: #b28dff;
  --aog-rail-width: 230px;
  --aog-reading-width: 660px;
}

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

html {
  background: var(--aog-ink);
  scroll-behavior: smooth;
}

body.aog-page {
  overflow-x: hidden;
  background: var(--aog-ink);
  color: var(--aog-paper);
  font-family: "Source Serif 4", Georgia, serif;
}

body.aog-page::before {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  content: "";
  opacity: 0.22;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 2px,
    rgba(0, 0, 0, 0.22) 2px,
    rgba(0, 0, 0, 0.22) 3px
  );
}

body.aog-page :is(a, button) {
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease,
    transform 180ms ease, opacity 180ms ease;
}

body.aog-page a {
  color: var(--aog-cyan);
  text-decoration: none;
}

body.aog-page a:hover,
body.aog-page a:focus-visible {
  color: #7cf0f2;
}

body.aog-page :is(h1, h2, h3, h4, p) {
  margin-top: 0;
}

body.aog-page .brxe-section {
  width: 100%;
}

.aog-art-placeholder {
  position: relative;
  min-height: 10rem;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 1.25rem;
  border: 2px dashed currentColor;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.07), transparent 48%),
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(0, 0, 0, 0.2) 3px 4px),
    radial-gradient(circle at 75% 25%, rgba(255, 61, 154, 0.17), transparent 28%),
    var(--aog-surface);
  color: var(--aog-muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  line-height: 1.55;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.aog-art-placeholder::before,
.aog-art-placeholder::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.aog-art-placeholder::before {
  inset: 0.55rem;
  border: 1px solid currentColor;
  opacity: 0.2;
}

.aog-art-placeholder::after {
  width: 28%;
  height: 1px;
  right: 8%;
  bottom: 12%;
  background: currentColor;
  box-shadow: -42px -8px 0 currentColor, -78px 5px 0 currentColor;
  opacity: 0.42;
}

.aog-art-placeholder > * {
  position: relative;
  z-index: 1;
  max-width: 28rem;
}

.aog-kicker {
  color: var(--aog-amber) !important;
  font-family: "Press Start 2P", monospace !important;
  font-size: 0.58rem !important;
  font-weight: 400 !important;
  line-height: 1.6 !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.aog-display {
  color: var(--aog-paper) !important;
  font-family: Newsreader, Georgia, serif !important;
  font-weight: 800 !important;
  letter-spacing: -0.035em;
}

.aog-section-rule {
  border-top: 2px solid rgba(242, 236, 255, 0.14);
}

/* Home: the design's sticky archive header and full-viewport title card. */
.aog-home-nav {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  min-height: 3.7rem;
  padding: 1rem 1.75rem !important;
  background: rgba(24, 15, 46, 0.78);
  border-bottom: 2px solid var(--aog-cyan);
  backdrop-filter: blur(6px);
}

.aog-home-nav > .brxe-container {
  width: 100% !important;
  max-width: none !important;
  min-height: 1.7rem;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.aog-home-nav .aog-home-brand {
  color: var(--aog-paper) !important;
  font-family: Bungee, sans-serif !important;
  font-size: 1rem !important;
  line-height: 1;
  letter-spacing: 0.03em;
}

.aog-home-nav .aog-home-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.aog-home-nav .aog-home-links a {
  color: var(--aog-muted) !important;
  font-family: "Press Start 2P", monospace !important;
  font-size: 0.52rem !important;
  letter-spacing: 0.04em;
}

.aog-home-nav .aog-home-links a:hover,
.aog-home-nav .aog-home-links a:focus-visible {
  color: var(--aog-yellow) !important;
}

.aog-home-hero {
  position: relative;
  isolation: isolate;
  height: 100svh;
  min-height: 40rem !important;
  padding: 0 1.75rem !important;
  overflow: hidden;
  background: var(--aog-ink);
}

.aog-home-hero::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  pointer-events: none;
  background: linear-gradient(180deg, rgba(24, 15, 46, 0.62), rgba(24, 15, 46, 0.14) 42%, rgba(24, 15, 46, 0.94));
}

.aog-home-hero .aog-hero-art {
  position: absolute !important;
  inset: -4vh -3vw !important;
  z-index: 0;
  min-height: 110% !important;
  border: 0;
  opacity: 0.78;
  color: #d6c8ef;
  background-image:
    linear-gradient(90deg, rgba(24, 15, 46, 0.42), transparent 46%, rgba(24, 15, 46, 0.25)),
    repeating-linear-gradient(90deg, rgba(255, 176, 32, 0.06) 0 1px, transparent 1px 7.5rem),
    repeating-linear-gradient(0deg, rgba(45, 226, 230, 0.04) 0 1px, transparent 1px 5rem) !important;
  background-color: #30204e;
  transform: translate3d(0, var(--aog-parallax-y, 0), 0) scale(1.04);
  transition: opacity 220ms ease;
}

.aog-home-hero .aog-hero-art > * {
  max-width: 32rem;
  padding: 1rem 1.25rem;
  color: #f2ecff;
  border: 1px solid rgba(242, 236, 255, 0.45);
  background: rgba(24, 15, 46, 0.55);
}

.aog-home-hero .aog-hero-content {
  position: absolute !important;
  inset: 0 !important;
  z-index: 2;
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  padding: 6rem 1.75rem 5.5rem !important;
  display: flex !important;
  justify-content: flex-end;
  align-items: flex-start;
}

.aog-home-hero .aog-hero-content > .aog-kicker:first-child {
  position: absolute;
  top: 6rem;
  left: 1.75rem;
  color: var(--aog-yellow) !important;
}

.aog-hero-title {
  position: relative;
  z-index: 2;
  margin: 0 !important;
  font-family: Bungee, sans-serif !important;
  font-size: clamp(4.8rem, 14vw, 11.25rem) !important;
  font-weight: 400 !important;
  line-height: 0.83 !important;
  letter-spacing: -0.045em;
  text-shadow: 4px 4px 0 var(--aog-pink), 8px 8px 0 rgba(0, 0, 0, 0.32);
  transform: translate3d(0, var(--aog-parallax-y, 0), 0);
}

.aog-hero-word {
  width: max-content;
  align-self: flex-start;
}

.aog-hero-word:nth-of-type(2) {
  margin-left: clamp(4rem, 21vw, 20rem) !important;
}

.aog-hero-of {
  color: var(--aog-cyan) !important;
  text-shadow: 4px 4px 0 var(--aog-red), 8px 8px 0 rgba(0, 0, 0, 0.32);
}

.aog-hero-gord {
  margin-left: clamp(1rem, 8vw, 8rem) !important;
  color: var(--aog-paper) !important;
}

.aog-home-hero .aog-hero-subtitle {
  position: absolute;
  right: 1.75rem;
  bottom: 1.3rem;
  max-width: 18rem;
  color: var(--aog-muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  line-height: 1.5;
  text-align: right;
}

.aog-home-hero .aog-book-link {
  position: absolute;
  bottom: 1.3rem;
  left: 1.75rem;
}

.aog-dropcap:first-letter {
  float: left;
  margin: 0.04em 0.12em 0 0;
  color: var(--aog-red);
  font-family: Newsreader, serif;
  font-size: 5.2em;
  font-weight: 800;
  line-height: 0.7;
}

#aog-who {
  position: relative;
  padding: clamp(6rem, 10vw, 9rem) 1.75rem !important;
  background: var(--aog-surface);
  border-top-color: var(--aog-cyan);
  border-bottom: 2px solid var(--aog-cyan);
}

#aog-who > .brxe-container {
  max-width: 67.5rem;
  display: flex !important;
  align-items: center;
  gap: clamp(2.5rem, 6vw, 4rem);
}

#aog-who > .brxe-container > .brxe-block {
  flex: 1 1 0;
  width: auto !important;
}

#aog-who .aog-display {
  margin-bottom: 1.25rem !important;
  font-size: clamp(2.6rem, 6vw, 4.2rem) !important;
  line-height: 0.88 !important;
}

#aog-who .aog-dropcap,
#aog-who .brxe-text-basic:not(.aog-kicker) {
  color: var(--aog-copy);
  font-size: 1.1rem;
  line-height: 1.7;
}

#aog-who .brxe-block:last-child {
  align-self: center;
}

#aog-who .aog-art-placeholder {
  min-height: 23.75rem;
  border: 3px solid var(--aog-cyan);
}

/* Home book wall: dense rows stay text-first, while the art block is the changing context. */
#aog-books {
  position: relative;
  padding: 6rem 1.75rem 2.5rem !important;
  overflow: hidden;
}

#aog-books::before {
  position: absolute;
  top: 1rem;
  left: 0;
  content: "THE BOOKS · THE BOOKS · THE BOOKS · THE BOOKS ·";
  white-space: nowrap;
  color: rgba(45, 226, 230, 0.06);
  font-family: "Press Start 2P", monospace;
  font-size: clamp(3rem, 11vw, 9rem);
  line-height: 1;
  pointer-events: none;
  animation: aog-marquee 40s linear infinite;
}

#aog-books > .brxe-container {
  position: relative;
  z-index: 1;
  max-width: 67.5rem;
}

#aog-books .aog-display {
  margin-bottom: 2rem !important;
  font-size: clamp(2.6rem, 5vw, 3.4rem) !important;
}

.aog-book-list {
  width: 100%;
}

.aog-book-row {
  position: relative;
  display: grid !important;
  grid-template-columns: 2.4rem minmax(0, 1fr) minmax(12rem, 18rem);
  gap: 1.25rem;
  align-items: baseline;
  padding: 1.1rem 0.65rem !important;
  border-bottom: 2px dashed rgba(242, 236, 255, 0.15);
}

.aog-book-row:hover,
.aog-book-row:focus-within {
  background: rgba(45, 226, 230, 0.06);
}

.aog-book-row .aog-kicker {
  color: var(--aog-book-accent, var(--aog-amber)) !important;
}

.aog-book-title {
  display: block;
  color: var(--aog-paper) !important;
  font-family: Newsreader, serif !important;
  font-size: clamp(1.45rem, 2.6vw, 1.9rem) !important;
  font-weight: 700 !important;
  line-height: 1 !important;
}

.aog-book-row:hover .aog-book-title,
.aog-book-row:focus-within .aog-book-title {
  color: var(--aog-book-accent, var(--aog-cyan)) !important;
}

.aog-book-reveal {
  color: var(--aog-muted) !important;
  font-family: "IBM Plex Mono", monospace !important;
  font-size: 0.64rem !important;
  line-height: 1.45 !important;
}

#aog-books > .brxe-container > .brxe-container {
  display: flex !important;
  align-items: flex-start;
  gap: 3rem;
}

#aog-books .aog-book-list {
  width: 62% !important;
}

#aog-books .aog-book-preview {
  position: sticky;
  top: 6rem;
  width: 38% !important;
  min-height: 20rem;
  border-color: var(--aog-active-book-accent, rgba(242, 236, 255, 0.24));
}

/* Home's machine and preservation beats. */
#aog-tempt {
  padding: 7rem 1.75rem !important;
  background: radial-gradient(ellipse 43.75rem 25rem at 50% 50%, rgba(255, 61, 154, 0.14), transparent 70%);
}

#aog-tempt > .brxe-container,
#aog-preserved > .brxe-container {
  max-width: 56rem;
  display: flex !important;
  align-items: center;
  gap: 2.5rem;
}

#aog-tempt .aog-display {
  font-size: clamp(3rem, 8vw, 5.6rem) !important;
  text-shadow: 4px 4px 0 var(--aog-red);
}

.aog-home .aog-random-machine {
  min-height: 20rem;
  flex: 0 0 18rem;
  display: grid;
  place-items: center;
  border: 2px solid var(--aog-pink);
  background:
    radial-gradient(circle at center, rgba(255, 61, 154, 0.24), transparent 58%),
    var(--aog-surface);
  box-shadow: 0.75rem 0.75rem 0 var(--aog-cyan);
}

.aog-home .aog-random-machine:hover {
  background:
    radial-gradient(circle at center, rgba(245, 217, 10, 0.28), transparent 58%),
    var(--aog-surface);
}

#aog-preserved {
  padding: 4.5rem 1.75rem !important;
  border-top: 2px solid rgba(242, 236, 255, 0.12);
}

#aog-preserved > .brxe-container > .brxe-block {
  flex: 1 1 0;
  width: auto !important;
}

#aog-preserved .aog-display {
  font-size: clamp(2.6rem, 5vw, 4rem) !important;
}

/* Book and chapter archive rail. */
.aog-books-rail {
  position: fixed !important;
  inset: 0 auto 0 0;
  z-index: 30;
  width: var(--aog-rail-width) !important;
  height: 100vh;
  display: flex !important;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.15rem;
  overflow-y: auto;
  padding: 1.5rem 1.125rem !important;
  background: var(--aog-ink);
  border-right: 2px solid var(--aog-cyan);
}

.aog-books-rail > .aog-kicker:first-child {
  margin-bottom: 1.25rem;
  color: var(--aog-paper) !important;
  font-family: Bungee, sans-serif !important;
  font-size: 0.88rem !important;
  letter-spacing: 0.02em;
}

.aog-rail-link {
  display: flex !important;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.1rem;
  padding: 0.55rem 0.5rem !important;
  color: #8f7fb8 !important;
  font-family: "IBM Plex Mono", monospace !important;
  font-size: 0.68rem !important;
  line-height: 1.2 !important;
  writing-mode: horizontal-tb;
  transform: none;
}

.aog-rail-link:hover,
.aog-rail-link:focus-visible,
.aog-rail-link.is-current {
  color: var(--aog-paper) !important;
  background: rgba(255, 176, 32, 0.16);
  border-left: 3px solid var(--aog-amber);
}

.aog-book-main {
  position: relative;
  z-index: 1;
  width: min(100%, 820px) !important;
  margin-left: var(--aog-rail-width) !important;
}

.aog-book-hero {
  position: relative;
  min-height: 0 !important;
  padding: 5rem 2.5rem 3.5rem !important;
  overflow: hidden;
  border-bottom: 2px solid var(--aog-amber);
}

.aog-book-hero .aog-book-main {
  display: flex !important;
  align-items: flex-end;
  gap: 2.5rem;
  max-width: 820px !important;
}

.aog-book-hero .aog-book-main > .brxe-block:first-child {
  flex: 1 1 auto;
  width: auto !important;
}

.aog-book-hero .aog-book-main > .brxe-block:last-child {
  flex: 0 0 220px;
  width: 220px !important;
  min-height: 220px !important;
}

.aog-book-hero .aog-kinetic {
  position: absolute;
  top: -6vw;
  right: -2vw;
  z-index: 0;
  color: rgba(255, 176, 32, 0.08) !important;
  font-family: "Press Start 2P", monospace !important;
  font-size: clamp(5rem, 14vw, 12rem) !important;
  line-height: 1 !important;
  white-space: nowrap;
  pointer-events: none;
  animation: none;
}

.aog-book-hero .aog-display {
  position: relative;
  z-index: 1;
  margin-bottom: 0.15rem !important;
  font-size: clamp(2.8rem, 6.5vw, 4.25rem) !important;
  line-height: 0.9 !important;
}

.aog-book-hero .aog-book-title-hero {
  color: var(--aog-amber) !important;
}

.aog-book-hero .aog-book-main > .brxe-block:first-child > .brxe-text-basic:not(.aog-kicker) {
  max-width: 30rem;
  margin: 1.25rem 0 1rem;
  color: var(--aog-copy);
  font-size: 1.1rem;
  line-height: 1.6;
}

.aog-book-hero .aog-art-placeholder {
  min-height: 220px !important;
  height: 220px;
  border: 3px solid var(--aog-amber);
}

.aog-book-page .aog-section-rule:not(.aog-book-hero) {
  margin-left: var(--aog-rail-width);
  padding: 2.5rem 2.5rem 5rem !important;
}

.aog-book-page .aog-section-rule:not(.aog-book-hero) > .aog-kicker,
.aog-book-page .aog-section-rule:not(.aog-book-hero) > .aog-display,
.aog-book-page .aog-chapter-list {
  width: min(100%, 820px);
}

.aog-book-page .aog-section-rule:not(.aog-book-hero) > .aog-display {
  margin-bottom: 2rem !important;
  font-size: clamp(2.5rem, 5vw, 3.4rem) !important;
}

.aog-chapter-list {
  display: block;
}

.aog-chapter-row {
  display: grid !important;
  grid-template-columns: 2.2rem 9.4rem minmax(0, 1fr) 6.5rem;
  gap: 1rem;
  align-items: baseline;
  padding: 1.1rem 0.5rem !important;
  border-bottom: 2px dashed rgba(242, 236, 255, 0.15);
}

.aog-chapter-row:hover,
.aog-chapter-row:focus-within {
  background: rgba(255, 176, 32, 0.06);
  transform: translateX(0.25rem);
}

.aog-chapter-title {
  color: var(--aog-paper) !important;
  font-family: Newsreader, serif !important;
  font-size: 1.2rem !important;
  font-style: italic;
  font-weight: 700 !important;
  line-height: 1 !important;
}

.aog-chapter-title:hover,
.aog-chapter-title:focus-visible {
  color: var(--aog-amber) !important;
}

.aog-chapter-description,
.aog-chapter-stories {
  color: var(--aog-muted) !important;
  font-family: "IBM Plex Mono", monospace !important;
  font-size: 0.64rem !important;
  line-height: 1.5 !important;
}

.aog-chapter-count {
  justify-self: end;
  color: var(--aog-amber) !important;
}

.aog-chapter-stories {
  grid-column: 2 / -1;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-0.35rem);
  transition: max-height 250ms ease, opacity 250ms ease, transform 250ms ease;
}

.aog-chapter-row:hover .aog-chapter-stories,
.aog-chapter-row:focus-within .aog-chapter-stories {
  max-height: 5rem;
  opacity: 1;
  transform: translateY(0);
}

/* Chapter reader: the opening composition, pinned progress and prose rhythm. */
.aog-chapter-hero {
  position: relative;
  min-height: 90vh !important;
  padding: 3.75rem 3rem !important;
}

.aog-chapter-hero .aog-book-main {
  display: flex !important;
  align-items: center;
  gap: 2.5rem;
  max-width: none !important;
  margin-left: var(--aog-rail-width) !important;
}

.aog-chapter-hero .aog-book-main > .brxe-block:first-child {
  flex: 1 1 0;
  width: auto !important;
}

.aog-chapter-hero .aog-book-main > .brxe-block:last-child {
  flex: 0.8 1 0;
  width: auto !important;
}

.aog-chapter-hero .aog-book-main > .brxe-block:first-child > .aog-display:not(.aog-chapter-number) {
  margin: 0 0 0.2rem !important;
  font-size: clamp(2rem, 5vw, 3.15rem) !important;
  line-height: 0.9 !important;
}

.aog-chapter-number {
  display: block;
  margin-bottom: 1rem !important;
  color: rgba(255, 176, 32, 0.2) !important;
  font-family: "Press Start 2P", monospace !important;
  font-size: clamp(6rem, 11vw, 8.75rem) !important;
  font-weight: 400 !important;
  line-height: 0.8 !important;
  letter-spacing: -0.08em;
}

.aog-chapter-deck {
  max-width: 28rem;
  margin: 1rem 0 0;
  color: #c9bde6;
  font-family: Newsreader, serif;
  font-size: 1.18rem;
  font-style: italic;
  line-height: 1.35;
}

.aog-chapter-hero .aog-art-placeholder {
  min-height: 20rem !important;
  height: 20rem;
  border: 3px solid var(--aog-amber);
}

.aog-chapter-page .aog-story-progress {
  position: sticky;
  top: 0;
  z-index: 29;
  height: 4px;
  margin-left: var(--aog-rail-width);
  display: flex;
  background: var(--aog-ink);
}

.aog-story-progress .aog-progress-fill {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--aog-amber);
  transform: scaleX(var(--aog-progress, 0));
  transform-origin: left center;
}

.aog-story-beat {
  position: relative;
  padding: 0 3rem 4rem !important;
  margin-left: var(--aog-rail-width);
}

.aog-story-beat > .aog-story-marker {
  display: block;
  width: min(100%, var(--aog-reading-width));
  margin: 0 auto 1.5rem;
  padding-top: 2.25rem;
  color: var(--aog-deep-muted) !important;
  border-top: 2px solid rgba(242, 236, 255, 0.16);
}

.aog-story-layout {
  width: min(100%, var(--aog-reading-width)) !important;
  max-width: var(--aog-reading-width) !important;
  margin: 0 auto;
}

.aog-story-layout > .brxe-block:first-child {
  width: 100% !important;
}

.aog-story-heading {
  margin: 0 0 1.5rem !important;
  color: var(--aog-paper) !important;
  font-family: Newsreader, serif !important;
  font-size: clamp(2rem, 4vw, 2.15rem) !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  text-wrap: balance;
}

.aog-story-body {
  max-width: var(--aog-reading-width);
  color: var(--aog-copy);
  font-size: 1.18rem;
  line-height: 1.75;
}

.aog-story-body .brxe-text {
  margin-bottom: 1.25rem;
}

.aog-story-body em,
.aog-story-body i {
  color: #c9bde6;
}

.aog-story-strip {
  width: calc(100% + 6rem) !important;
  min-height: 13.75rem !important;
  height: 13.75rem;
  margin: 0 auto 3rem -3rem !important;
  border-top: 3px solid var(--aog-pink);
  border-bottom: 3px solid var(--aog-pink);
}

.aog-story-beat:nth-of-type(6) .aog-story-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(11rem, 0.62fr);
  gap: 2rem;
  align-items: start;
}

.aog-story-beat:nth-of-type(6) .aog-story-layout > .brxe-block:first-child {
  width: auto !important;
}

.aog-story-beat:nth-of-type(6) .aog-story-layout > .brxe-block:last-child {
  width: auto !important;
  order: -1;
}

.aog-story-beat:nth-of-type(6) .aog-story-layout > .brxe-block:last-child .aog-art-placeholder {
  min-height: 11.25rem;
  border: 2px solid var(--aog-red);
}

.aog-chapter-nav {
  padding: 2rem 3rem 4rem !important;
  margin-left: var(--aog-rail-width);
  border-top: 2px solid rgba(242, 236, 255, 0.14);
}

.aog-chapter-nav > .aog-kicker,
.aog-chapter-nav > .aog-display,
.aog-chapter-nav > .brxe-text-basic {
  width: min(100%, var(--aog-reading-width));
  margin-right: auto;
  margin-left: auto;
}

.aog-chapter-nav > .aog-display {
  margin-bottom: 1rem !important;
  font-size: clamp(2.4rem, 5vw, 3.8rem) !important;
}

.aog-chapter-nav > .brxe-container {
  width: min(100%, var(--aog-reading-width));
  margin: 1.5rem auto 0;
  display: flex !important;
  justify-content: space-between;
  gap: 1rem;
}

.aog-gord-comment {
  margin-left: var(--aog-rail-width);
  padding: 3.25rem 3rem 2.75rem !important;
}

.aog-gord-comment > .brxe-container {
  width: min(100%, var(--aog-reading-width));
  padding: 1.5rem 3rem !important;
  border-top: 2px dashed rgba(242, 236, 255, 0.2);
  border-bottom: 2px dashed rgba(242, 236, 255, 0.2);
}

.aog-comment-quote {
  margin: 0;
  color: #c9bde6;
  font-family: Newsreader, Georgia, serif;
  font-size: 1.15rem;
  font-style: italic;
  line-height: 1.6;
}

/* Apocalypse intentionally breaks the archive system. */
.aog-apocalypse-page {
  --aog-apoc-red: #ff2d55;
  background: #08050e !important;
}

.aog-apocalypse-page::before {
  opacity: 0.5;
  background-image: repeating-linear-gradient(to bottom, transparent 0 1px, rgba(255, 45, 85, 0.19) 1px 3px);
}

.aog-apocalypse-page .aog-books-rail {
  display: none !important;
}

.aog-apocalypse-page .aog-book-main,
.aog-apocalypse-page .aog-book-page .aog-section-rule:not(.aog-book-hero) {
  margin-left: 0 !important;
}

.aog-apocalypse-page .aog-book-hero {
  min-height: 70vh !important;
  background: #08050e;
  border-bottom-color: var(--aog-apoc-red);
}

.aog-apocalypse-page .aog-book-hero .aog-book-main {
  max-width: 960px !important;
  margin: 0 auto !important;
}

.aog-apocalypse-page .aog-book-title-hero {
  color: var(--aog-apoc-red) !important;
  font-family: Bungee, sans-serif !important;
  text-shadow: 5px 0 var(--aog-cyan), -5px 0 var(--aog-pink);
  animation: aog-glitch 1.8s steps(2, end) infinite;
}

.aog-apocalypse-page .aog-art-placeholder {
  color: var(--aog-apoc-red);
  border-color: var(--aog-apoc-red);
  background:
    repeating-linear-gradient(0deg, rgba(255, 45, 85, 0.1) 0 2px, transparent 2px 5px),
    #120811;
}

.aog-apocalypse-page .aog-section-rule:not(.aog-book-hero) {
  border-top-color: rgba(255, 45, 85, 0.35);
}

.aog-apocalypse-page .aog-chapter-title,
.aog-apocalypse-page .aog-display {
  color: #f7dbe5 !important;
}

@keyframes aog-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-35%); }
}

@keyframes aog-glitch {
  0%, 92%, 100% { transform: translate(0); }
  93% { transform: translate(3px, -2px); }
  95% { transform: translate(-4px, 1px); }
  97% { transform: translate(2px, 2px); }
}

.aog-parallax {
  transform: translate3d(0, var(--aog-parallax-y, 0), 0);
  will-change: transform;
}

.aog-chapter-hero .aog-book-main {
  animation: aog-enter 700ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.aog-chapter-hero .aog-art {
  animation: aog-art-reveal 900ms 120ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

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

@keyframes aog-art-reveal {
  from { opacity: 0; clip-path: inset(0 100% 0 0); }
  to { opacity: 1; clip-path: inset(0 0 0 0); }
}

@media (max-width: 991px) {
  .aog-home-nav {
    padding-inline: 1rem !important;
  }

  .aog-home-nav .aog-home-links {
    gap: 0.75rem;
  }

  .aog-home-nav .aog-home-links a {
    font-size: 0.45rem !important;
  }

  #aog-who > .brxe-container,
  #aog-tempt > .brxe-container,
  #aog-preserved > .brxe-container {
    flex-direction: column !important;
    align-items: stretch;
  }

  #aog-who > .brxe-container > .brxe-block,
  #aog-preserved > .brxe-container > .brxe-block {
    width: 100% !important;
  }

  .aog-home .aog-random-machine {
    width: 100%;
    min-height: 14rem;
    flex-basis: auto;
  }

  .aog-books-rail {
    position: sticky !important;
    inset: 0 0 auto;
    width: 100% !important;
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: 0.1rem;
    padding: 0.75rem 1rem !important;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 2px solid var(--aog-cyan);
  }

  .aog-books-rail > .aog-kicker:first-child {
    flex: 0 0 auto;
    margin: 0 0.5rem 0 0;
  }

  .aog-rail-link {
    flex: 0 0 auto;
    min-height: 1.8rem;
    padding: 0.45rem 0.5rem !important;
    white-space: nowrap;
  }

  .aog-book-main,
  .aog-book-page .aog-section-rule:not(.aog-book-hero),
  .aog-chapter-page .aog-story-beat,
  .aog-chapter-page .aog-chapter-nav,
  .aog-chapter-page .aog-story-progress,
  .aog-chapter-page .aog-gord-comment {
    margin-left: 0 !important;
  }

  .aog-book-hero .aog-book-main,
  .aog-chapter-hero .aog-book-main {
    flex-direction: column !important;
    align-items: stretch;
    margin-left: 0 !important;
  }

  .aog-book-hero .aog-book-main > .brxe-block:last-child {
    width: 100% !important;
    max-width: 24rem;
    min-height: 14rem !important;
  }

  .aog-chapter-hero .aog-book-main > .brxe-block:last-child {
    width: 100% !important;
  }

  .aog-chapter-hero .aog-art-placeholder {
    height: 16rem;
    min-height: 16rem !important;
  }

  .aog-chapter-number {
    font-size: 6rem !important;
  }

  .aog-chapter-row {
    grid-template-columns: 2rem minmax(0, 1fr) auto;
  }

  .aog-chapter-description {
    grid-column: 2 / -1;
  }

  .aog-chapter-count {
    grid-column: 3;
  }
}

@media (max-width: 767px) {
  .aog-home-nav .aog-home-brand {
    font-size: 0.8rem !important;
  }

  .aog-home-nav .aog-home-links a:first-child,
  .aog-home-nav .aog-home-links a:last-child {
    display: none;
  }

  .aog-home-hero {
    min-height: 38rem !important;
  }

  .aog-hero-title {
    font-size: clamp(4rem, 21vw, 7rem) !important;
  }

  .aog-hero-word:nth-of-type(2) {
    margin-left: 20vw !important;
  }

  #aog-books {
    padding-inline: 1rem !important;
  }

  .aog-book-row {
    grid-template-columns: 2rem minmax(0, 1fr);
    gap: 0.75rem;
  }

  .aog-book-reveal {
    grid-column: 2;
  }

  #aog-books .aog-book-preview {
    display: none;
  }

  #aog-books > .brxe-container > .brxe-container {
    display: block !important;
  }

  #aog-books .aog-book-list {
    width: 100% !important;
  }

  .aog-book-page .aog-section-rule:not(.aog-book-hero),
  .aog-chapter-hero,
  .aog-story-beat,
  .aog-chapter-nav,
  .aog-gord-comment {
    padding-inline: 1.25rem !important;
  }

  .aog-gord-comment > .brxe-container {
    padding-inline: 0 !important;
  }

  .aog-chapter-row {
    padding-inline: 0 !important;
  }

  .aog-story-body {
    font-size: 1.08rem;
  }

  .aog-story-strip {
    width: calc(100% + 2.5rem) !important;
    margin-left: -1.25rem !important;
  }

  .aog-story-beat:nth-of-type(6) .aog-story-layout {
    display: flex !important;
    flex-direction: column !important;
  }

  .aog-story-beat:nth-of-type(6) .aog-story-layout > .brxe-block:last-child {
    order: 0;
    width: 100% !important;
  }

  .aog-chapter-nav > .brxe-container {
    flex-direction: column !important;
  }
}

/* Book navigation: every book carries its own accent through the rail. */
.aog-book-page .aog-books-rail > .aog-rail-link::before {
  color: var(--aog-rail-accent, var(--aog-deep-muted)) !important;
}

.aog-book-page .aog-books-rail > .aog-rail-link:hover,
.aog-book-page .aog-books-rail > .aog-rail-link:focus-visible,
.aog-book-page .aog-books-rail > .aog-rail-link.is-current {
  border-left-color: var(--aog-rail-accent, var(--aog-amber)) !important;
  background: color-mix(
    in srgb,
    var(--aog-rail-accent, var(--aog-amber)) 16%,
    transparent
  );
}

.aog-book-page .aog-chapter-row > .aog-kicker {
  color: var(--aog-page-book-accent, var(--aog-amber)) !important;
}

.aog-book-page .aog-chapter-row[role="link"] {
  cursor: pointer;
}

.aog-book-page .aog-chapter-row[role="link"]:hover,
.aog-book-page .aog-chapter-row[role="link"]:focus-within {
  background: color-mix(
    in srgb,
    var(--aog-page-book-accent, var(--aog-amber)) 10%,
    transparent
  );
}

.aog-book-page .aog-chapter-title:hover,
.aog-book-page .aog-chapter-title:focus-visible {
  color: var(--aog-page-book-accent, var(--aog-amber)) !important;
}

.aog-book-page .aog-chapter-row[role="link"]:focus-visible {
  outline: 2px solid var(--aog-page-book-accent, var(--aog-amber));
  outline-offset: 4px;
}

@media (max-width: 478px) {
  .aog-books-rail > .aog-kicker:first-child {
    font-size: 0.7rem !important;
  }

  .aog-rail-link {
    font-size: 0.58rem !important;
  }

  .aog-home-hero .aog-hero-subtitle {
    display: none;
  }

  .aog-home-hero .aog-book-link {
    left: 0;
  }

  .aog-chapter-number {
    font-size: 4.75rem !important;
  }
}

/* Claude reference type and motion values. */
.aog-home-nav .aog-home-links a {
  font-size: 9px !important;
}

.aog-home .aog-kicker {
  font-size: 10px !important;
  line-height: normal !important;
}

.aog-home-hero .aog-hero-art {
  transform: translate3d(0, var(--aog-hero-image-y, 0), 0);
  transition: none;
}

.aog-home-hero .aog-hero-word {
  transform: translate3d(var(--aog-hero-line-x, 0), var(--aog-hero-text-y, 0), 0);
  letter-spacing: normal;
  will-change: transform;
}

.aog-home-hero .aog-hero-subtitle {
  color: #b6a8d8;
  font-family: "Press Start 2P", monospace;
  font-size: 9px;
  line-height: normal;
  letter-spacing: 0.1em;
}

.aog-scroll-arrow {
  animation: aog-blink 1.1s steps(1) infinite;
}

#aog-who .aog-dropcap:first-letter {
  margin: 0;
  padding: 6px 10px 0 0;
  font-size: 88px;
  line-height: 0.7;
}

#aog-books .aog-kicker,
#aog-tempt .aog-kicker {
  font-size: 10px !important;
  line-height: normal !important;
}

#aog-books .aog-display {
  font-size: clamp(36px, 5vw, 54px) !important;
  letter-spacing: normal;
}

#aog-books .aog-book-row > .aog-kicker {
  font-size: 12px !important;
}

#aog-books .aog-book-row .aog-book-title {
  font-size: 30px !important;
  line-height: normal !important;
  letter-spacing: normal;
}

#aog-books .aog-book-row .aog-book-reveal {
  color: #6f5f94 !important;
  font-size: 11px !important;
}

#aog-books .aog-book-row {
  transition: background-color 180ms ease;
}

#aog-books .aog-book-row.is-active {
  background: rgba(255, 255, 255, 0.04);
}

#aog-books .aog-book-row.is-active .aog-book-title {
  color: var(--aog-book-accent, var(--aog-paper)) !important;
}

#aog-tempt .aog-display {
  font-size: clamp(44px, 8vw, 90px) !important;
  letter-spacing: normal;
}

#aog-tempt #brxe-a004b0 {
  font-size: 10px !important;
  transition: transform 0.6s ease;
}

#aog-tempt #brxe-a004b0:hover,
#aog-tempt #brxe-a004b0:focus-visible {
  transform: rotate(360deg);
}

#aog-tempt #brxe-a004af {
  margin: 28px 0 0;
  color: #6f5f94;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
}

#aog-preserved .aog-kicker {
  font-size: 9px !important;
}

#aog-preserved .brxe-text-basic:not(.aog-kicker) {
  font-size: 16px;
  line-height: 1.7;
}

.aog-book-hero .aog-book-main > .brxe-block:first-child > .aog-kicker {
  font-size: 10px !important;
}

.aog-book-hero .aog-book-main > .brxe-block:first-child > .aog-display {
  font-size: clamp(40px, 6vw, 68px) !important;
  line-height: 1.02 !important;
  letter-spacing: normal;
}

.aog-book-hero .aog-kinetic {
  font-size: 14vw !important;
}

.aog-chapter-row > .aog-kicker {
  font-size: 11px !important;
}

.aog-chapter-row .aog-chapter-title {
  line-height: normal !important;
}

.aog-chapter-row .aog-chapter-description {
  line-height: 1.2 !important;
}

.aog-chapter-hero .aog-book-main > .brxe-block:first-child > .aog-kicker {
  font-size: 9px !important;
}

.aog-chapter-hero .aog-book-main > .brxe-block:first-child > .aog-display:not(.aog-chapter-number) {
  font-size: clamp(32px, 5vw, 50px) !important;
  line-height: 1.05 !important;
  letter-spacing: normal;
}

.aog-chapter-number {
  font-size: 140px !important;
  line-height: 0.8 !important;
  letter-spacing: normal;
}

.aog-chapter-deck {
  font-size: 19px;
  line-height: normal;
}

.aog-chapter-hero .aog-book-main,
.aog-chapter-hero .aog-art {
  animation: none !important;
}

.aog-chapter-page .aog-story-progress {
  display: grid !important;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  gap: 2px;
}

.aog-chapter-page .aog-story-progress > span {
  display: block;
  height: 4px;
  background: var(--aog-surface);
}

.aog-chapter-page .aog-story-progress > span.is-filled {
  background: var(--aog-amber);
}

.aog-story-marker {
  font-size: 10px !important;
}

.aog-story-heading {
  line-height: normal !important;
  letter-spacing: normal;
}

.aog-gord-comment .aog-kicker {
  font-size: 9px !important;
}

.aog-chapter-nav .aog-kicker {
  font-size: 8px !important;
}

@keyframes aog-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes aog-blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* Claude reference parity: keep the Bricks tree, but use the source geometry. */
body.aog-home::before {
  opacity: 0.5;
}

.aog-home-hero {
  height: 100vh !important;
  min-height: 40rem !important;
  padding: 0 !important;
}

.aog-home-hero .aog-hero-art {
  inset: 0 !important;
  min-height: 100% !important;
}

.aog-home-hero .aog-hero-content {
  inset: 0 !important;
  height: 100% !important;
  padding: 0 0 8vh !important;
  flex-direction: column !important;
  justify-content: flex-end !important;
  align-items: stretch !important;
}

.aog-home-hero .aog-hero-content > .aog-kicker:first-child {
  top: 96px;
  left: 28px;
}

.aog-home-hero .aog-hero-word,
.aog-home-hero .aog-hero-title {
  width: 100% !important;
  align-self: stretch !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  text-align: center !important;
  font-size: clamp(60px, 14vw, 180px) !important;
  line-height: 0.86 !important;
}

.aog-home-hero .aog-hero-subtitle {
  right: 0;
  bottom: 28px;
  left: 0;
  max-width: none;
  text-align: center;
}

#aog-who {
  min-height: 0 !important;
  padding: 100px 28px !important;
}

#aog-who > .brxe-container {
  max-width: 1080px !important;
  gap: 64px;
}

#aog-who .aog-dropcap {
  font-size: 20px;
  line-height: 1.7;
}

#brxe-a002b1 {
  margin: 20px 0 0;
  color: var(--aog-muted);
  font-size: 18px;
  line-height: 1.7;
}

#aog-who .aog-art-placeholder {
  height: 380px;
  min-height: 380px;
}

#aog-books {
  padding: 96px 0 40px !important;
}

#aog-books::before {
  display: none;
}

#brxe-a003ab {
  position: absolute;
  top: 24px;
  left: 0;
  z-index: 0;
  white-space: nowrap;
  color: rgba(45, 226, 230, 0.06) !important;
  font-family: "Press Start 2P", monospace !important;
  font-size: 11vw !important;
  line-height: 1 !important;
  pointer-events: none;
  animation: aog-marquee 40s linear infinite;
}

#aog-books > .brxe-container {
  max-width: 1080px !important;
  padding: 0 28px !important;
}

#aog-books > .brxe-container > .brxe-container {
  gap: 48px;
}

#aog-books .aog-book-list {
  flex: 1.3 1 0;
  width: auto !important;
}

#aog-books .aog-book-preview {
  flex: 1 1 0;
  width: auto !important;
  min-height: 400px;
  padding: 24px;
  border-width: 3px;
}

#aog-books .aog-book-preview::before {
  position: absolute;
  top: 24px;
  left: 24px;
  content: attr(data-meta);
  color: var(--aog-active-book-accent, var(--aog-amber));
  font-family: "Press Start 2P", monospace;
  font-size: 9px;
  letter-spacing: 0.04em;
}

#aog-books .aog-book-preview::after {
  position: absolute;
  right: 24px;
  bottom: 24px;
  left: 24px;
  content: attr(data-opens);
  color: var(--aog-deep-muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
}

#aog-books .aog-book-preview > .brxe-text-basic {
  position: absolute;
  top: 68px;
  right: 24px;
  left: 24px;
  height: 190px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 24px !important;
  border: 2px solid rgba(242, 236, 255, 0.2);
  background: rgba(24, 15, 46, 0.32);
  font-size: 0 !important;
  text-align: left;
}

#aog-books .aog-book-preview > .brxe-text-basic::before {
  display: block;
  content: attr(data-name);
  color: var(--aog-active-book-accent, var(--aog-amber));
  font-family: Newsreader, Georgia, serif;
  font-size: 38px;
  font-weight: 800;
  line-height: 1.05;
}

#aog-books .aog-book-preview > .brxe-text-basic::after {
  display: block;
  max-width: 18rem;
  margin-top: 16px;
  content: attr(data-desc);
  color: #c9bde6;
  font-family: Newsreader, Georgia, serif;
  font-size: 16px;
  font-style: italic;
  line-height: 1.35;
}

.aog-book-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 10px !important;
}

.aog-book-row > .aog-kicker {
  flex: 0 0 auto;
}

.aog-book-row .aog-book-title {
  flex: 1 1 auto;
  width: auto !important;
  font-size: 30px !important;
  line-height: 1.05 !important;
}

.aog-book-row .aog-book-reveal {
  flex: 0 0 auto;
  font-size: 11px !important;
  white-space: nowrap;
}

#aog-tempt {
  padding: 100px 28px !important;
  text-align: center;
}

#aog-tempt > .brxe-container {
  max-width: none !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
}

#aog-tempt > .brxe-container > .brxe-block {
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
}

#brxe-a004ac {
  width: 100% !important;
  text-align: center;
}

#brxe-a004b0 {
  display: inline-flex !important;
  width: 130px !important;
  height: 130px !important;
  align-items: center;
  justify-content: center;
  padding: 18px !important;
  border: 3px solid var(--aog-ink) !important;
  border-radius: 50% !important;
  background: var(--aog-yellow) !important;
  box-shadow: 5px 5px 0 var(--aog-red);
  color: var(--aog-ink) !important;
  text-align: center;
  white-space: normal;
}

/* Book index: one fixed typographic hierarchy, matching the dense source rows. */
.aog-books-rail {
  counter-reset: aog-book;
  padding: 24px 18px !important;
}

.aog-books-rail > .aog-kicker:first-child {
  margin-bottom: 28px;
  font-size: 14px !important;
}

.aog-books-rail > .aog-rail-link {
  min-height: 0;
  padding: 9px 8px !important;
  font-size: 12px !important;
}

.aog-books-rail > .aog-rail-link::before {
  counter-increment: aog-book;
  content: counter(aog-book, decimal-leading-zero);
  flex: 0 0 18px;
  color: var(--aog-deep-muted);
}

.aog-books-rail > #brxe-b001ad {
  display: none !important;
}

.aog-books-rail > #brxe-c00103 {
  display: none !important;
}

.aog-book-hero {
  min-height: 0 !important;
  padding: 80px 40px 56px !important;
}

.aog-book-hero .aog-book-main {
  width: min(100%, 820px) !important;
  max-width: 820px !important;
  gap: 40px;
}

.aog-book-hero .aog-book-title-hero,
.aog-book-hero #brxe-b001b2,
.aog-book-hero #brxe-b001b3 {
  color: var(--aog-paper) !important;
}

.aog-book-hero .aog-book-main > .brxe-block:first-child > .aog-display {
  font-size: clamp(40px, 6vw, 68px) !important;
  line-height: 0.92 !important;
}

.aog-book-hero .aog-book-main > .brxe-block:last-child {
  flex: 0 0 220px;
  width: 220px !important;
  min-height: 220px !important;
}

.aog-book-page .aog-section-rule:not(.aog-book-hero) {
  max-width: 900px;
  margin-left: var(--aog-rail-width);
  padding: 40px 40px 80px !important;
  border-top: 0;
}

.aog-book-page .aog-section-rule:not(.aog-book-hero) > .aog-kicker,
.aog-book-page .aog-section-rule:not(.aog-book-hero) > .aog-display {
  display: none !important;
}

.aog-book-page .aog-chapter-list {
  width: 100% !important;
  max-width: none !important;
}

.aog-chapter-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: baseline;
  gap: 20px;
  padding: 16px 6px !important;
}

.aog-chapter-row > .aog-kicker {
  flex: 0 0 34px;
}

.aog-chapter-row .aog-chapter-title {
  flex: 0 0 150px;
  width: 150px !important;
  font-size: 19px !important;
  font-style: italic;
  line-height: 1.15 !important;
}

.aog-chapter-row .aog-chapter-description {
  flex: 1 1 auto;
  color: var(--aog-copy) !important;
  font-family: "Source Serif 4", Georgia, serif !important;
  font-size: 16px !important;
  line-height: 1.35 !important;
}

.aog-chapter-row .aog-chapter-count {
  flex: 0 0 auto;
  color: var(--aog-deep-muted) !important;
  font-size: 11px !important;
  white-space: nowrap;
}

.aog-chapter-row:hover,
.aog-chapter-row:focus-within {
  transform: none;
}

/* Chapter reader: the hero and prose use the source's 90vh / 660px rhythm. */
.aog-chapter-hero {
  min-height: 90vh !important;
  padding: 60px 48px !important;
}

.aog-chapter-hero .aog-book-main {
  width: auto !important;
  max-width: none !important;
  min-height: calc(90vh - 120px) !important;
  margin-left: var(--aog-rail-width) !important;
  gap: 40px;
}

.aog-chapter-hero .aog-book-main > .brxe-block:first-child {
  flex: 1 1 0;
}

.aog-chapter-hero .aog-book-main > .brxe-block:last-child {
  flex: 0.8 1 0;
}

#brxe-c00200 {
  position: fixed !important;
  top: 0;
  right: 0;
  left: var(--aog-rail-width);
  z-index: 29;
  height: 4px !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: var(--aog-ink);
}

#brxe-c00202 {
  width: 100% !important;
  max-width: none !important;
  height: 4px !important;
  margin: 0 !important;
  padding: 0 !important;
}

#brxe-c00205 {
  width: 100% !important;
  height: 4px !important;
  margin: 0 !important;
}

#brxe-c00207 {
  display: none !important;
}

.aog-story-beat {
  margin-left: var(--aog-rail-width);
  padding: 0 48px 40px !important;
}

.aog-story-beat > .aog-story-marker {
  width: min(100%, var(--aog-reading-width));
  margin: 0 auto 24px;
  padding-top: 36px;
  border-top: 2px solid rgba(242, 236, 255, 0.16);
}

#brxe-c02001 {
  padding-top: 0;
  border-top: 0;
}

#brxe-c03001,
#brxe-c05001 {
  padding-top: 8px;
  border-top: 2px dashed rgba(242, 236, 255, 0.16);
}

.aog-story-layout {
  display: flex !important;
  flex-direction: column !important;
  width: min(100%, var(--aog-reading-width)) !important;
  max-width: var(--aog-reading-width) !important;
}

.aog-story-body {
  max-width: var(--aog-reading-width);
  font-size: 19px;
  line-height: 1.75;
}

#brxe-c01004,
#brxe-c02004 {
  font-size: 34px !important;
}

#brxe-c03004 {
  font-size: 26px !important;
}

#brxe-c04001 {
  display: none !important;
}

#brxe-c04002 {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(11rem, 0.62fr);
  gap: 32px;
  align-items: start;
}

#brxe-c04003,
#brxe-c04005 {
  width: auto !important;
}

#brxe-c04003 {
  grid-column: 1;
}

#brxe-c04005 {
  grid-column: 2;
}

#brxe-c04003 .aog-art-placeholder {
  min-height: 180px;
  height: 180px;
  border: 2px solid var(--aog-red);
}

#brxe-c04006 {
  padding-top: 36px;
  border-top: 2px solid rgba(242, 236, 255, 0.16);
}

#brxe-c04006::before {
  display: block;
  margin-bottom: 16px;
  content: "04 / 05";
  color: var(--aog-deep-muted);
  font-family: "Press Start 2P", monospace;
  font-size: 10px;
}

#brxe-c05004 {
  font-size: 30px !important;
}

.aog-story-strip {
  width: calc(100% + 96px) !important;
  height: 220px;
  min-height: 220px !important;
  margin: 0 -48px 48px !important;
}

.aog-gord-comment {
  margin-left: var(--aog-rail-width);
  padding: 52px 0 44px !important;
}

.aog-gord-comment > .brxe-container {
  width: min(100%, var(--aog-reading-width));
  padding: 26px 48px !important;
}

.aog-chapter-nav {
  margin-left: var(--aog-rail-width);
  padding: 0 !important;
  border-top: 0;
}

.aog-chapter-nav > .brxe-container {
  width: min(100%, var(--aog-reading-width));
  margin: 0 auto;
  padding: 12px 48px 64px;
  border-top: 2px solid rgba(242, 236, 255, 0.14);
}

@media (max-width: 860px) {
  .aog-books-rail {
    display: none !important;
  }

  .aog-book-main,
  .aog-book-page .aog-section-rule:not(.aog-book-hero),
  .aog-chapter-page .aog-story-beat,
  .aog-chapter-page .aog-chapter-nav,
  .aog-chapter-page .aog-gord-comment {
    margin-left: 0 !important;
  }

  .aog-chapter-hero {
    padding: 48px 24px !important;
  }

  .aog-chapter-hero .aog-book-main {
    min-height: 0 !important;
    margin-left: 0 !important;
  }

  #brxe-c00200 {
    left: 0;
  }

  .aog-story-beat {
    padding: 0 24px 40px !important;
  }

  .aog-story-strip {
    width: calc(100% + 48px) !important;
    margin-left: -24px !important;
  }

  #brxe-c04002 {
    display: flex !important;
    flex-direction: column !important;
  }

  #brxe-c04003,
  #brxe-c04005 {
    width: 100% !important;
  }

  .aog-gord-comment > .brxe-container,
  .aog-chapter-nav > .brxe-container {
    width: calc(100% - 48px);
    padding-right: 24px;
    padding-left: 24px;
  }

  .aog-chapter-row {
    flex-wrap: wrap;
    gap: 8px 14px;
  }

  .aog-chapter-row .aog-chapter-title {
    flex: 1 1 calc(100% - 48px);
    width: auto !important;
  }

  .aog-chapter-row .aog-chapter-description {
    flex: 1 1 100%;
    padding-left: 48px;
  }

  .aog-chapter-row .aog-chapter-count {
    margin-left: 48px;
  }
}

/* Keep the source values authoritative after the responsive Bricks rules. */
.aog-book-hero .aog-book-main > .brxe-block:first-child > .aog-display {
  line-height: 1.02 !important;
}

@media (max-width: 860px) {
  .aog-chapter-number {
    font-size: 80px !important;
  }
}

@media (max-width: 767px) {
  .aog-home-hero .aog-hero-title {
    font-size: clamp(60px, 14vw, 180px) !important;
  }

  .aog-home-hero .aog-hero-word:nth-of-type(2) {
    margin-left: 0 !important;
  }
}

@media (max-width: 760px) {
  #aog-books .aog-book-reveal {
    display: none !important;
  }
}

@media (max-width: 478px) {
  .aog-home-hero .aog-hero-subtitle {
    display: block;
  }
}

/* Small source-rhythm corrections that otherwise fall back to Bricks defaults. */
#aog-who .aog-kicker {
  margin-bottom: 20px !important;
}

#aog-who .aog-dropcap {
  margin: 0;
}

#aog-books .aog-book-list > .aog-kicker {
  margin-bottom: 12px !important;
}

#aog-books .aog-book-list > .aog-display {
  margin: 0 0 36px !important;
}

#aog-tempt .aog-kicker {
  margin-bottom: 20px !important;
}

#aog-tempt .aog-display {
  margin: 0 0 32px !important;
}

#aog-tempt #brxe-a004b0 {
  margin: 0;
}

.aog-book-hero .aog-book-main > .brxe-block:first-child > .aog-kicker {
  margin-bottom: 16px !important;
}

.aog-chapter-hero .aog-book-main > .brxe-block:first-child > .aog-kicker {
  margin-bottom: 22px !important;
}

.aog-chapter-number {
  margin-bottom: 0 !important;
}

.aog-chapter-hero .aog-book-main > .brxe-block:first-child > .aog-display:not(.aog-chapter-number) {
  margin: 0 0 18px !important;
}

.aog-chapter-deck {
  margin: 0;
}

#brxe-c04006 {
  font-size: 30px !important;
}

.aog-comment-quote {
  font-size: 18px !important;
}

/* Latest reference review: reduce the hero on narrower screens and open up the home rhythm. */
@media (max-width: 1440px) {
  .aog-home-hero .aog-hero-word,
  .aog-home-hero .aog-hero-title {
    font-size: clamp(52px, 10vw, 140px) !important;
  }
}

@media (max-width: 767px) {
  .aog-home-hero .aog-hero-word,
  .aog-home-hero .aog-hero-title {
    font-size: clamp(46px, 12vw, 100px) !important;
  }
}

@media (max-width: 478px) {
  .aog-home-hero .aog-hero-word,
  .aog-home-hero .aog-hero-title {
    font-size: clamp(42px, 14vw, 82px) !important;
  }
}

/* Tablet hero: keep the desktop composition, but give the next section a chance to enter the viewport. */
@media (min-width: 761px) and (max-width: 1280px) {
  .aog-home-hero {
    height: 70vh !important;
    min-height: 480px !important;
  }

  .aog-home-hero .aog-hero-word,
  .aog-home-hero .aog-hero-title {
    font-size: clamp(34px, 8vw, 84px) !important;
  }
}

#aog-who .aog-dropcap {
  font-size: clamp(21px, 1.55vw, 24px) !important;
  line-height: 1.65;
}

#brxe-a002b1 {
  font-size: clamp(19px, 1.35vw, 21px) !important;
  line-height: 1.65;
}

#brxe-a003ab {
  font-size: clamp(96px, 15vw, 260px) !important;
  animation-duration: 24s !important;
}

#aog-preserved > .brxe-container {
  width: 100% !important;
  max-width: none !important;
}

#aog-preserved > .brxe-container:first-child {
  gap: clamp(2.5rem, 6vw, 6rem);
}

#aog-preserved > .brxe-container:first-child > .brxe-block {
  flex: 1 1 0;
  width: auto !important;
}

@media (max-width: 991px) {
  #aog-preserved > .brxe-container:first-child,
  #aog-preserved > .brxe-container:last-child {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 2rem;
  }
}

@media (max-width: 767px) {
  #brxe-a003ab {
    font-size: clamp(72px, 18vw, 160px) !important;
    animation-duration: 18s !important;
  }
}

/* Homepage masthead refinement: center the title wrapper and keep the archive cue readable over art. */
.aog-home-nav {
  position: sticky !important;
  top: 0;
  z-index: 40;
  width: 100% !important;
  min-height: 0;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 28px !important;
  background: rgba(24, 15, 46, 0.75);
  border: 0 !important;
  border-bottom: 2px solid var(--aog-cyan) !important;
  box-shadow: 0 0 8px rgba(45, 226, 230, 0.45);
  backdrop-filter: blur(6px);
}

.aog-home-nav > .brxe-container {
  flex: 1 1 auto;
  gap: 16px;
  margin: 0;
}

.aog-home-nav .aog-home-brand {
  flex: 0 0 auto;
  white-space: nowrap;
  font-size: 16px !important;
}

.aog-home-nav .aog-home-links {
  margin-left: auto;
  width: max-content !important;
  max-width: none !important;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 22px;
}

.aog-home-nav .aog-home-links a {
  flex: 0 0 auto;
  white-space: nowrap;
  color: #b6a8d8 !important;
  font-size: 11px !important;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.aog-home-nav .aog-home-links a:nth-child(2) {
  color: var(--aog-yellow) !important;
}

.aog-home-hero .aog-hero-content {
  inset: auto 0 auto 0 !important;
  top: 50% !important;
  height: 100% !important;
  padding: 0 !important;
  transform: translateY(-50%);
  z-index: 5 !important;
  justify-content: center !important;
  isolation: isolate;
}

.aog-home-hero .aog-hero-content::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  background: radial-gradient(
    ellipse 70% 90% at 50% 50%,
    rgba(24, 15, 46, 0.75),
    transparent 75%
  );
}

.aog-home-hero .aog-hero-subtitle {
  display: block !important;
}

/* Home content gutter: every readable section follows the Who Is This Gord? container. */
#aog-who,
#aog-books,
#aog-tempt,
#aog-preserved {
  padding-left: 28px !important;
  padding-right: 28px !important;
}

#aog-who > .brxe-container,
#aog-books > .brxe-container,
#aog-tempt > .brxe-container,
#aog-preserved > .brxe-container {
  width: 100% !important;
  max-width: 1080px !important;
  margin-right: auto !important;
  margin-left: auto !important;
  padding-right: 0 !important;
  padding-left: 0 !important;
}

/* Book wall: the row is one target, and the preview keeps one clean art frame. */
#aog-books .aog-book-row[role="link"] {
  cursor: pointer;
}

#aog-books .aog-book-row[role="link"]:focus-visible {
  outline: 2px solid var(--aog-book-accent, var(--aog-amber));
  outline-offset: 4px;
}

#aog-books .aog-book-preview {
  border: 3px solid var(--aog-active-book-accent, var(--aog-amber)) !important;
  box-shadow: 8px 8px 0 rgba(15, 10, 31, 0.82);
}

#aog-books .aog-book-preview::before {
  top: 24px !important;
  right: auto !important;
  bottom: auto !important;
  left: 24px !important;
  width: auto !important;
  height: auto !important;
  border: 0 !important;
  background: none !important;
  box-shadow: none !important;
  opacity: 1 !important;
}

#aog-books .aog-book-preview::after {
  right: 24px !important;
  bottom: 24px !important;
  left: 24px !important;
  width: auto !important;
  height: auto !important;
  background: none !important;
  box-shadow: none !important;
  opacity: 1 !important;
}

#aog-books .aog-book-preview > .brxe-text-basic {
  top: 116px;
  height: 170px;
  display: block;
  padding: 0 !important;
  border: 2px dashed rgba(201, 189, 230, 0.42);
  background:
    linear-gradient(rgba(24, 15, 46, 0.22), rgba(24, 15, 46, 0.22)),
    var(--aog-book-preview-image, none),
    rgba(36, 26, 66, 0.38);
  background-position: center;
  background-size: cover;
}

#aog-books .aog-book-preview > .brxe-text-basic::before,
#aog-books .aog-book-preview > .brxe-text-basic::after {
  display: none !important;
  content: none !important;
}

#aog-books .aog-book-preview-title {
  position: absolute;
  top: 68px;
  right: 24px;
  left: 24px;
  margin: 0;
  color: var(--aog-active-book-accent, var(--aog-amber));
  font-family: Newsreader, Georgia, serif;
  font-size: 38px;
  font-weight: 800;
  line-height: 1.05;
}

#aog-books .aog-book-preview-description {
  position: absolute;
  right: 24px;
  bottom: 54px;
  left: 24px;
  margin: 0;
  color: #c9bde6;
  font-family: Newsreader, Georgia, serif;
  font-size: 16px;
  font-style: italic;
  line-height: 1.35;
}

/* Native story-post reader. The post data stays editable in WordPress; this is presentation only. */
body.aog-story-single {
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--aog-ink);
  color: var(--aog-copy);
}

body.aog-story-single::before {
  opacity: 0.4;
}

.aog-story-site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.7rem;
  padding: 1rem 2.4rem;
  background: rgba(24, 15, 46, 0.9);
  border-bottom: 2px solid var(--aog-amber);
  backdrop-filter: blur(8px);
}

.aog-story-brand {
  color: var(--aog-paper) !important;
  font-family: Bungee, sans-serif;
  font-size: 14px;
  line-height: 1;
  letter-spacing: 0.03em;
}

.aog-story-site-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.aog-story-site-nav a,
.aog-story-label,
.aog-story-breadcrumb,
.aog-story-navigation-meta,
.aog-story-neighbor > span,
.aog-story-archive > summary,
.aog-story-random-cta a {
  color: var(--aog-muted);
  font-family: "Press Start 2P", monospace;
  font-size: 9px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.aog-story-site-nav a:hover,
.aog-story-site-nav a:focus-visible,
.aog-story-breadcrumb:hover,
.aog-story-breadcrumb:focus-visible {
  color: var(--aog-yellow);
}

.aog-story-progressbar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 90;
  width: 100%;
  height: 4px;
  background: transparent;
  pointer-events: none;
}

.aog-story-progress-fill {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--aog-story-accent, var(--aog-amber));
  transform: scaleX(var(--aog-reader-progress, 0));
  transform-origin: left center;
}

.aog-story-reader {
  min-height: 100vh;
  padding: 10.5rem 0 4rem;
  background: var(--aog-ink);
}

.aog-story-article {
  width: min(62rem, calc(100vw - 3rem));
  margin-left: clamp(1.5rem, 9.6vw, 9rem);
}

.aog-story-intro h1 {
  margin: 2.5rem 0 2rem;
  color: var(--aog-paper);
  font-family: Bungee, sans-serif;
  font-size: clamp(34px, 6vw, 58px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: 0.01em;
  text-shadow: 3px 3px 0 var(--aog-red);
}

.aog-story-breadcrumb {
  color: var(--aog-story-accent, var(--aog-amber));
}

.aog-story-chapter-description {
  max-width: 54rem;
  margin: 0;
  color: #c9bde6;
  font-family: Newsreader, Georgia, serif;
  font-size: 17px;
  font-style: italic;
  line-height: 1.45;
}

.aog-story-divider {
  height: 2px;
  margin: 4rem 0 4.25rem;
  background: repeating-linear-gradient(
    90deg,
    var(--aog-story-accent, var(--aog-amber)) 0 1.2rem,
    transparent 1.2rem 1.6rem
  );
}

.aog-story-body {
  max-width: 60rem;
  color: var(--aog-copy);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 19px;
  line-height: 1.75;
}

.aog-story-body p {
  margin: 0 0 1.45rem;
}

.aog-story-body em,
.aog-story-body i {
  color: #c9bde6;
}

.aog-story-body strong,
.aog-story-body b {
  color: var(--aog-paper);
}

.aog-story-body a {
  color: var(--aog-story-accent, var(--aog-cyan));
}

.aog-story-comment {
  margin: 4.5rem 0 4rem;
  padding: 2rem 2.5rem 2.15rem;
  background: var(--aog-surface);
  border: 2px solid var(--aog-pink);
  box-shadow: 5px 5px 0 #0f0a1f;
}

.aog-story-comment .aog-story-label {
  margin: 0 0 1.5rem;
  color: var(--aog-pink);
}

.aog-story-comment blockquote {
  margin: 0;
  color: #c9bde6;
  font-family: Newsreader, Georgia, serif;
  font-size: 18px;
  font-style: italic;
  line-height: 1.55;
}

.aog-story-comment blockquote + blockquote {
  margin-top: 1rem;
}

.aog-story-archive {
  margin: 0 0 4.5rem;
  border-top: 1px solid rgba(242, 236, 255, 0.14);
  border-bottom: 1px solid rgba(242, 236, 255, 0.14);
}

.aog-story-archive > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem 0;
  color: var(--aog-deep-muted);
  cursor: pointer;
  list-style: none;
}

.aog-story-archive > summary::-webkit-details-marker {
  display: none;
}

.aog-story-archive > summary::after {
  content: "◇";
  color: var(--aog-deep-muted);
  transition: transform 180ms ease;
}

.aog-story-archive[open] > summary::after {
  transform: rotate(45deg);
}

.aog-story-archive-panel {
  margin-bottom: 1rem;
  padding: 1.4rem 1.5rem;
  background: #0f0a1f;
  color: var(--aog-muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  line-height: 1.7;
}

.aog-story-archive-panel p {
  margin: 0 0 0.55rem;
  overflow-wrap: anywhere;
}

.aog-story-archive-panel p:last-child {
  margin-bottom: 0;
}

.aog-story-archive-panel strong {
  display: inline-block;
  min-width: 5rem;
  color: var(--aog-paper);
  font-weight: 500;
}

.aog-story-archive-panel a {
  color: var(--aog-story-accent, var(--aog-cyan));
}

.aog-story-navigation {
  padding-top: 2rem;
  border-top: 2px solid rgba(242, 236, 255, 0.14);
}

.aog-story-navigation-meta {
  margin: 0 0 2rem;
  color: var(--aog-deep-muted);
  text-align: center;
}

.aog-story-navigation-links {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
}

.aog-story-neighbor {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  gap: 0.65rem;
}

.aog-story-neighbor-next {
  align-items: flex-end;
  text-align: right;
}

.aog-story-neighbor > span {
  color: var(--aog-deep-muted);
  font-size: 8px;
}

.aog-story-neighbor > strong {
  color: var(--aog-paper);
  font-family: Newsreader, Georgia, serif;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.25;
}

.aog-story-neighbor:hover > strong,
.aog-story-neighbor:focus-visible > strong {
  color: var(--aog-story-accent, var(--aog-cyan));
}

.aog-story-neighbor-empty {
  color: var(--aog-deep-muted);
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
}

.aog-story-random-cta {
  display: flex;
  justify-content: center;
  margin: 4rem 0;
}

.aog-story-random-cta a {
  padding: 1rem 1.35rem;
  border: 2px solid #0f0a1f;
  border-radius: 999px;
  background: var(--aog-yellow);
  box-shadow: 4px 4px 0 var(--aog-red);
  color: #0f0a1f;
}

.aog-story-random-cta a:hover,
.aog-story-random-cta a:focus-visible {
  color: #0f0a1f;
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--aog-red);
}

.aog-story-footer-credit {
  padding-top: 2rem;
  border-top: 1px solid rgba(242, 236, 255, 0.12);
  color: var(--aog-deep-muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
}

@media (prefers-reduced-motion: reduce) {
  body.aog-story-single::before {
    display: none;
  }
}

@media (max-width: 767px) {
  .aog-story-site-header {
    min-height: 4.1rem;
    padding: 0.9rem 1.25rem;
  }

  .aog-story-brand {
    font-size: 12px;
  }

  .aog-story-site-nav {
    gap: 0.8rem;
  }

  .aog-story-site-nav a {
    font-size: 7px;
  }

  .aog-story-reader {
    padding-top: 8.5rem;
  }

  .aog-story-article {
    width: auto;
    margin: 0 1.25rem;
  }

  .aog-story-intro h1 {
    margin-top: 2rem;
    font-size: clamp(34px, 11vw, 50px);
  }

  .aog-story-divider {
    margin: 3rem 0;
  }

  .aog-story-body {
    font-size: 18px;
  }

  .aog-story-comment {
    padding: 1.5rem;
  }

  .aog-story-navigation-links {
    flex-direction: column;
    gap: 1.75rem;
  }

  .aog-story-neighbor-next {
    align-items: flex-start;
    text-align: left;
  }
}

/* Book artwork and preview frame refinements. */
.aog-book-hero .aog-kinetic {
  position: absolute !important;
  top: -6vw !important;
  right: -2vw !important;
}

.aog-book-hero .aog-art-placeholder.has-book-art {
  border-style: solid;
  border-color: var(--aog-page-book-accent, var(--aog-amber));
  color: transparent;
  background:
    linear-gradient(rgba(24, 15, 46, 0.24), rgba(24, 15, 46, 0.24)),
    var(--aog-book-art-image);
  background-position: center;
  background-size: cover;
}

.aog-book-hero .aog-art-placeholder.has-book-art > p {
  display: none !important;
}

#aog-books .aog-book-preview {
  min-height: clamp(560px, 38vw, 720px) !important;
}

#aog-books .aog-book-preview > .brxe-text-basic {
  top: 116px !important;
  right: 24px !important;
  left: 24px !important;
  width: auto !important;
  max-width: none !important;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: 1 / 1;
  border: 2px solid rgba(201, 189, 230, 0.55) !important;
  background-repeat: no-repeat;
  background-size: contain;
}

/* Keep the preview composition in a predictable vertical flow. */
#aog-books .aog-book-preview {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  min-height: 0 !important;
  box-sizing: border-box;
}

#aog-books .aog-book-preview::after {
  display: none !important;
  content: none !important;
}

#aog-books .aog-book-preview-title {
  position: relative !important;
  inset: auto !important;
  flex: 0 0 auto;
  width: auto !important;
  margin: 44px 0 28px !important;
}

#aog-books .aog-book-preview > .brxe-text-basic {
  position: relative !important;
  inset: auto !important;
  align-self: stretch !important;
  flex: 0 0 auto;
  width: 100% !important;
  margin: 0 !important;
  border: 2px solid rgba(201, 189, 230, 0.55) !important;
  background-position: center;
  background-size: contain;
}

#aog-books .aog-book-preview-description {
  position: relative !important;
  inset: auto !important;
  flex: 0 0 auto;
  width: auto !important;
  max-width: none !important;
  margin: 18px 0 0 !important;
  color: rgb(201, 189, 230) !important;
  font-family: "Newsreader", Georgia, serif !important;
  font-size: 16px !important;
  font-style: italic !important;
  font-weight: 400 !important;
  line-height: 1.35 !important;
}

#aog-books .aog-book-preview-title,
#aog-books .aog-book-preview-description {
  align-self: stretch !important;
  width: 100% !important;
  max-width: none !important;
  text-align: left !important;
}

@media (min-width: 992px) {
  .aog-chapter-hero .aog-book-main {
    width: min(calc(100% - var(--aog-rail-width)), 1200px) !important;
    margin-right: auto !important;
  }

  .aog-chapter-hero .aog-book-main > .brxe-block:first-child {
    min-width: 0;
  }

  .aog-chapter-hero .aog-book-main > .brxe-block:last-child {
    flex: 0 0 clamp(260px, 24vw, 380px);
    width: clamp(260px, 24vw, 380px) !important;
    min-width: 0;
  }

  .aog-chapter-hero .aog-art-placeholder {
    height: clamp(300px, 38vw, 460px) !important;
    min-height: 0 !important;
    aspect-ratio: auto;
  }
}

/* Chapter reading rhythm and archive rail navigation. */
.aog-books-rail > .aog-kicker:first-child,
.aog-books-rail > .aog-rail-brand {
  display: block !important;
  flex: 0 0 auto;
  margin-bottom: 28px !important;
  color: var(--aog-paper) !important;
  font-size: 16px !important;
  line-height: 1.2 !important;
  white-space: nowrap;
}

.aog-books-rail > .aog-rail-brand {
  color: var(--aog-page-book-accent, var(--aog-amber)) !important;
}

.aog-books-rail > .aog-rail-link::before {
  color: var(--aog-rail-accent, var(--aog-deep-muted)) !important;
}

.aog-books-rail > .aog-rail-link:hover,
.aog-books-rail > .aog-rail-link:focus-visible {
  color: var(--aog-paper) !important;
  background: transparent !important;
  border-left: 0 !important;
}

.aog-books-rail > .aog-rail-link.is-current {
  color: var(--aog-paper) !important;
  background: color-mix(
    in srgb,
    var(--aog-rail-accent, var(--aog-amber)) 16%,
    transparent
  ) !important;
  border-left: 3px solid var(--aog-rail-accent, var(--aog-amber)) !important;
}

@media (min-width: 992px) {
  .aog-books-rail > .aog-rail-link {
    align-self: stretch;
    width: 100% !important;
    box-sizing: border-box;
  }
}

.aog-rail-chapter-nav {
  width: 100%;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 2px solid rgba(242, 236, 255, 0.16);
}

.aog-rail-chapter-label {
  margin: 0 0 12px;
  color: var(--aog-deep-muted);
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  line-height: 1.5;
  text-transform: uppercase;
}

.aog-rail-chapter-divider {
  margin: 22px 0 24px;
  border-top: 1px solid rgba(242, 236, 255, 0.16);
}

.aog-rail-chapter-pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.aog-rail-chapter-link {
  display: block;
  padding: 7px 0;
  color: #8f7fb8 !important;
  font-family: "IBM Plex Mono", monospace !important;
  font-size: 13px !important;
  line-height: 1.35 !important;
}

.aog-rail-chapter-link:hover,
.aog-rail-chapter-link:focus-visible {
  color: var(--aog-paper) !important;
}

.aog-rail-chapter-link.is-disabled {
  color: var(--aog-deep-muted) !important;
  pointer-events: none;
}

.aog-chapter-page .aog-story-beat {
  border-top: 0 !important;
  align-items: flex-start !important;
  padding: 0 48px 80px !important;
}

.aog-chapter-page .aog-story-beat > .aog-story-marker {
  position: absolute !important;
  top: 0 !important;
  left: 48px !important;
  width: min(660px, calc(100% - 96px)) !important;
  height: 80px !important;
  margin: 0 !important;
  padding: 0 !important;
  color: transparent !important;
  border-top: 2px solid rgba(242, 236, 255, 0.16) !important;
  pointer-events: none;
}

#brxe-c02001,
#brxe-c03001,
#brxe-c04001,
#brxe-c05001 {
  display: block !important;
  padding: 0 !important;
  color: transparent !important;
  border-top: 2px solid rgba(242, 236, 255, 0.16) !important;
}

.aog-chapter-page .aog-story-layout {
  width: min(100%, 660px) !important;
  max-width: 660px !important;
  margin: 0 !important;
  padding-top: 80px !important;
  box-sizing: border-box;
}

.aog-chapter-page .aog-story-layout:not(#brxe-c04002) {
  display: flex !important;
  flex-direction: column !important;
}

.aog-chapter-page .aog-story-heading {
  display: flex !important;
  align-items: baseline;
  gap: 24px;
  text-align: left !important;
}

.aog-story-heading-marker {
  flex: 0 0 auto;
  color: var(--aog-deep-muted);
  font-family: "Press Start 2P", monospace;
  font-size: 10px;
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 1.2;
  white-space: nowrap;
}

.aog-story-heading-title {
  min-width: 0;
}

.aog-chapter-page .aog-story-body {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  text-align: left !important;
}

#brxe-c04006::before {
  display: none !important;
  content: none !important;
}

#brxe-c04002 {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(14rem, 0.7fr) !important;
  column-gap: 32px;
  row-gap: 0;
  align-items: start;
}

#brxe-c04003 {
  grid-column: 2;
  grid-row: 1;
  width: 100% !important;
  height: 220px !important;
  min-height: 220px !important;
  margin: 0 !important;
}

#brxe-c04005 {
  display: contents !important;
}

#brxe-c04006 {
  grid-column: 1;
  grid-row: 1;
  width: auto !important;
  margin: 0 0 32px !important;
}

#brxe-c04014,
#brxe-c04015,
#brxe-c04016,
#brxe-c04017,
#brxe-c04018,
#brxe-c04019,
#brxe-c0401a,
#brxe-c0401b,
#brxe-c0401c,
#brxe-c0401d,
#brxe-c0401e,
#brxe-c0401f,
#brxe-c04020,
#brxe-c04021,
#brxe-c04022 {
  grid-column: 1 / -1;
  width: 100% !important;
}

@media (max-width: 860px) {
  .aog-chapter-page .aog-story-beat {
    padding: 0 24px 64px !important;
  }

  .aog-chapter-page .aog-story-beat > .aog-story-marker {
    left: 24px !important;
    width: calc(100% - 48px) !important;
  }

  .aog-chapter-page .aog-story-layout {
    width: 100% !important;
    max-width: none !important;
    padding-top: 64px !important;
  }

  .aog-chapter-page .aog-story-heading {
    gap: 12px;
  }

  #brxe-c04002 {
    display: flex !important;
    flex-direction: column !important;
    gap: 0;
  }

  #brxe-c04003 {
    order: 2;
    width: 100% !important;
    height: 220px !important;
    min-height: 220px !important;
    margin-top: 24px !important;
  }

  #brxe-c04005 {
    display: flex !important;
    flex-direction: column !important;
  }

  #brxe-c04006 {
    order: 1;
  }
}

/* Final chapter-story media cleanup. */
body.aog-chapter-page::before {
  display: none !important;
}

.aog-chapter-page .aog-story-strip {
  width: min(100%, 660px) !important;
  max-width: 660px !important;
  margin: 0 0 48px !important;
  border-right: 0 !important;
  border-left: 0 !important;
}

.aog-chapter-page .aog-art-placeholder::before,
.aog-chapter-page .aog-art-placeholder::after {
  display: none !important;
}

.aog-chapter-page .aog-story-beat .aog-art-placeholder {
  border-style: solid !important;
  border-color: var(--aog-pink) !important;
}

.aog-chapter-page .aog-story-strip > * {
  display: none !important;
}

.aog-chapter-page .aog-story-heading {
  font-size: clamp(32px, 4vw, 34px) !important;
}

#brxe-c01004,
#brxe-c02004,
#brxe-c03004,
#brxe-c04006,
#brxe-c05004 {
  font-size: clamp(32px, 4vw, 34px) !important;
}

#brxe-c04001 {
  display: block !important;
  border-top: 0 !important;
}

#brxe-c04006 {
	padding-top: 48px !important;
	border-top: 2px solid rgba(242, 236, 255, 0.16) !important;
}

#brxe-c04014 {
	margin-top: 48px !important;
}

#brxe-c04014,
#brxe-c04015,
#brxe-c04016,
#brxe-c04017,
#brxe-c04018,
#brxe-c04019,
#brxe-c0401a,
#brxe-c0401b,
#brxe-c0401c,
#brxe-c0401d,
#brxe-c0401e,
#brxe-c0401f,
#brxe-c04020,
#brxe-c04021,
#brxe-c04022 {
	color: var(--aog-copy);
	font-family: "Source Serif 4", Georgia, serif;
	font-size: 19px !important;
	line-height: 1.75 !important;
	margin-bottom: 1.45rem !important;
}

@media (max-width: 860px) {
	#brxe-c04014,
	#brxe-c04015,
	#brxe-c04016,
	#brxe-c04017,
	#brxe-c04018,
	#brxe-c04019,
	#brxe-c0401a,
	#brxe-c0401b,
	#brxe-c0401c,
	#brxe-c0401d,
	#brxe-c0401e,
	#brxe-c0401f,
	#brxe-c04020,
	#brxe-c04021,
	#brxe-c04022 {
		font-size: 18px !important;
	}
}

@media (max-width: 860px) {
  .aog-chapter-page .aog-story-strip {
    width: 100% !important;
    max-width: none !important;
    margin: 0 0 48px !important;
  }
}

/* Keep every chapter masthead image at the supplied 237:157 ratio. */
.aog-chapter-hero .aog-art-placeholder {
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: 237 / 157 !important;
  box-sizing: border-box;
}

/* Render chapter stories from their WordPress posts. */
body.aog-chapter-page .aog-dynamic-stories .aog-story-layout-long:not(#brxe-c04002) {
  display: flex !important;
  flex-direction: column !important;
}

body.aog-chapter-page .aog-dynamic-stories .aog-story-layout-square:not(#brxe-c04002) {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(14rem, 0.7fr);
  column-gap: 32px;
  row-gap: 0;
  align-items: start;
}

.aog-dynamic-stories .aog-story-heading-wrap,
.aog-dynamic-stories .aog-story-body {
  width: 100% !important;
}

.aog-dynamic-stories .aog-story-layout-square .aog-story-heading-wrap {
  grid-column: 1;
  grid-row: 1;
}

.aog-dynamic-stories .aog-story-layout-square .aog-story-art-square {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  aspect-ratio: 1;
  margin: 0;
  border: 3px solid var(--aog-pink);
  box-sizing: border-box;
}

.aog-dynamic-stories .aog-story-layout-square .aog-story-body {
  grid-column: 1 / -1;
  grid-row: 2;
  margin-top: 48px;
}

.aog-dynamic-stories .aog-story-art-long {
  width: 100%;
  margin: 48px 0 0;
  border-top: 3px solid var(--aog-pink);
  border-bottom: 3px solid var(--aog-pink);
}

.aog-dynamic-stories .aog-story-art-image {
  display: block;
  width: 100%;
  height: auto;
}

.aog-dynamic-stories .aog-story-art-square .aog-story-art-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 860px) {
  body.aog-chapter-page .aog-dynamic-stories .aog-story-layout-square:not(#brxe-c04002) {
    display: flex !important;
    flex-direction: column !important;
  }

  .aog-dynamic-stories .aog-story-layout-square .aog-story-art-square {
    order: 2;
    margin-top: 24px;
  }

  .aog-dynamic-stories .aog-story-layout-square .aog-story-body {
    order: 3;
  }
}

/* All chapter readers share one shell; the book supplies the accent. */
.aog-chapter-reader {
  --aog-chapter-accent: var(--aog-page-book-accent, var(--aog-amber));
  width: 100%;
}

body.aog-chapter-page .aog-chapter-hero {
  border-bottom-color: var(--aog-chapter-accent) !important;
}

body.aog-chapter-page .aog-chapter-hero .aog-chapter-copy > .aog-kicker,
body.aog-chapter-page .aog-chapter-nav .aog-kicker {
  color: var(--aog-chapter-accent) !important;
}

body.aog-chapter-page .aog-chapter-number {
  color: var(--aog-chapter-accent) !important;
  opacity: 0.22;
}

body.aog-chapter-page .aog-chapter-hero .aog-art-placeholder {
  border-color: var(--aog-chapter-accent) !important;
}

body.aog-chapter-page .aog-story-progress {
  border-top: 0 !important;
}

body.aog-chapter-page .aog-story-progress > span.is-filled {
  background: var(--aog-chapter-accent) !important;
}

body.aog-chapter-page .aog-books-rail > .aog-rail-link.is-current {
  background: color-mix(in srgb, var(--aog-chapter-accent) 16%, transparent) !important;
  border-left-color: var(--aog-chapter-accent) !important;
}

body.aog-chapter-page .aog-rail-chapter-label {
  color: var(--aog-deep-muted) !important;
  font-size: 8px !important;
}

body.aog-chapter-page .aog-dynamic-stories .aog-story-art-square,
body.aog-chapter-page .aog-dynamic-stories .aog-story-art-long {
  border-color: var(--aog-chapter-accent) !important;
}

body.aog-chapter-page .aog-chapter-nav > .brxe-container {
  display: flex !important;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

@media (min-width: 601px) {
  body.aog-chapter-page .aog-chapter-hero .aog-book-main {
    flex-direction: row !important;
  }

  body.aog-chapter-page .aog-chapter-hero .aog-book-main > .aog-chapter-copy {
    flex: 1 1 0;
    width: auto !important;
  }

  body.aog-chapter-page .aog-chapter-hero .aog-book-main > .aog-art-placeholder {
    flex: 0 0 clamp(260px, 24vw, 380px);
    width: clamp(260px, 24vw, 380px) !important;
  }
}

@media (max-width: 600px) {
  body.aog-chapter-page .aog-chapter-hero .aog-book-main {
    flex-direction: column !important;
  }

  body.aog-chapter-page .aog-chapter-nav > .brxe-container {
    align-items: flex-start;
    flex-direction: column !important;
  }
}

/* Keep the reader progress visible at the page top and align the footer with the story column. */
body.aog-chapter-page .aog-story-progress {
  position: fixed !important;
  top: 0;
  right: 0;
  left: 0;
  z-index: 90;
  width: 100% !important;
  height: 4px !important;
  min-height: 4px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: var(--aog-ink);
  pointer-events: none;
}

body.aog-chapter-page .aog-chapter-nav {
  display: block !important;
  margin-left: var(--aog-rail-width) !important;
  padding: 0 !important;
  border-top: 0 !important;
}

body.aog-chapter-page .aog-gord-comment {
  display: block !important;
  margin-left: var(--aog-rail-width) !important;
}

body.aog-chapter-page .aog-gord-comment > .brxe-container {
  margin: 0 !important;
}

body.aog-chapter-page .aog-gord-comment .aog-kicker {
  color: var(--aog-chapter-accent) !important;
}

@media (min-width: 992px) {
  body.aog-chapter-page .aog-chapter-hero .aog-book-main > .aog-art-placeholder {
    flex-basis: clamp(360px, 44vw, 620px);
    width: clamp(360px, 44vw, 620px) !important;
  }
}

body.aog-chapter-page .aog-chapter-nav > .brxe-container {
  width: min(100%, var(--aog-reading-width)) !important;
  margin: 0 !important;
  padding: 12px 48px 64px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: start;
  gap: 1rem;
  border-top: 2px solid rgba(242, 236, 255, 0.14);
}

body.aog-chapter-page .aog-chapter-nav-item {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

body.aog-chapter-page .aog-chapter-nav-prev {
  justify-self: start;
}

body.aog-chapter-page .aog-chapter-nav-index {
  justify-self: center;
}

body.aog-chapter-page .aog-chapter-nav-next {
  justify-self: end;
  text-align: right;
}

body.aog-chapter-page .aog-chapter-nav-title {
  display: block;
  font-size: clamp(1.65rem, 3vw, 2rem) !important;
  line-height: 1.05 !important;
}

@media (max-width: 600px) {
  body.aog-chapter-page .aog-chapter-nav > .brxe-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  body.aog-chapter-page .aog-chapter-nav-item,
  body.aog-chapter-page .aog-chapter-nav-prev,
  body.aog-chapter-page .aog-chapter-nav-index,
  body.aog-chapter-page .aog-chapter-nav-next {
    justify-self: start;
    text-align: left;
  }
}

/* Keep book and chapter separators on the active book accent. */
.aog-book-page .aog-book-hero {
  border-bottom-color: var(--aog-page-book-accent, var(--aog-amber)) !important;
}

.aog-book-page .aog-book-hero .aog-kicker,
.aog-book-page .aog-book-hero .aog-book-title-hero {
  color: var(--aog-page-book-accent, var(--aog-amber)) !important;
}

.aog-book-page .aog-section-rule:not(.aog-book-hero) {
  border-top: 2px solid color-mix(
    in srgb,
    var(--aog-page-book-accent, var(--aog-amber)) 42%,
    transparent
  ) !important;
}

body.aog-chapter-page .aog-story-beat > .aog-story-marker,
body.aog-chapter-page .aog-chapter-nav > .brxe-container {
  border-top-color: color-mix(in srgb, var(--aog-chapter-accent) 42%, transparent) !important;
}

body.aog-chapter-page .aog-rail-chapter-nav {
  padding-top: 10px;
}

body.aog-chapter-page .aog-rail-chapter-divider {
  margin: 10px 0;
}

body.aog-chapter-page .aog-rail-chapter-pager .aog-rail-chapter-link {
  font-family: "IBM Plex Mono", monospace !important;
  font-size: 1.1rem !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  text-transform: uppercase;
}
