:root {
  /* Warm Sacred Palette: Parchment, Incense, River Stone, Gold */
  --bg: #F4EFE6;
  --surface: #FAF6F0;
  --surface-lift: #FFFFFF;
  --surface-alt: #F0E8DC;
  --ink: #26211C;
  --ink-secondary: #3D352E;
  --muted: #6B6256;
  --line: #D8CEBE;
  --line-subtle: #E8E0D2;
  --accent: #5F5E3C;
  --accent-ink: #FAF6F0;
  --accent-hover: #4F4E30;
  --gold: #C29342;
  --gold-ink: #2B2110;
  --gold-soft: rgba(194, 147, 66, 0.1);
  --veil: rgba(244, 239, 230, 0.88);
  --panel: rgba(250, 246, 240, 0.88);

  /* Typographic Superfamilies */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;

  /* Shadows for Depth */
  --shadow-sm: 0 1px 3px rgba(38, 33, 28, 0.04), 0 2px 6px -1px rgba(38, 33, 28, 0.04);
  --shadow-md: 0 4px 14px -2px rgba(38, 33, 28, 0.06), 0 12px 28px -4px rgba(38, 33, 28, 0.06);
  --shadow-lg: 0 10px 30px -4px rgba(38, 33, 28, 0.09), 0 24px 48px -8px rgba(38, 33, 28, 0.1);

  /* Border Radii (Cairn & Pebble Rhymes) */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  /* Easing */
  --ease-calm: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.3s var(--ease-calm);

  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1A1714;
    --surface: #24201C;
    --surface-lift: #2E2924;
    --surface-alt: #1F1B18;
    --ink: #EDE5D8;
    --ink-secondary: #D4C9B8;
    --muted: #A89D8E;
    --line: #3D352B;
    --line-subtle: #2C261F;
    --accent: #B8B57F;
    --accent-ink: #1A1714;
    --accent-hover: #CAC792;
    --gold: #DDB166;
    --gold-ink: #1A1714;
    --gold-soft: rgba(221, 177, 102, 0.14);
    --veil: rgba(26, 23, 20, 0.88);
    --panel: rgba(36, 32, 28, 0.88);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 4px 18px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 10px 32px rgba(0, 0, 0, 0.55);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #1A1714;
  --surface: #24201C;
  --surface-lift: #2E2924;
  --surface-alt: #1F1B18;
  --ink: #EDE5D8;
  --ink-secondary: #D4C9B8;
  --muted: #A89D8E;
  --line: #3D352B;
  --line-subtle: #2C261F;
  --accent: #B8B57F;
  --accent-ink: #1A1714;
  --accent-hover: #CAC792;
  --gold: #DDB166;
  --gold-ink: #1A1714;
  --gold-soft: rgba(221, 177, 102, 0.14);
  --veil: rgba(26, 23, 20, 0.88);
  --panel: rgba(36, 32, 28, 0.88);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 4px 18px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 10px 32px rgba(0, 0, 0, 0.55);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-padding-top: calc(4.8rem + env(safe-area-inset-top, 0px));
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 1.15rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration-color: var(--line); }
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* Pilgrim's Thread Scroll Progress Indicator */
.pilgrim-thread {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--gold);
  z-index: 100;
  pointer-events: none;
  transition: width 0.08s linear;
  opacity: 0.85;
}

/* Layout Wrappers */
.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 2.5rem);
}

/* Header & Navigation (Depth + Typography) */
header.top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  color: #FAF6F0;
  padding: calc(1.1rem + env(safe-area-inset-top, 0px)) clamp(1.25rem, 5vw, 2.5rem) 1.1rem;
  transition: background 0.4s var(--ease-calm), color 0.4s, box-shadow 0.4s, backdrop-filter 0.4s;
}
header.top:not(.solid) {
  background: linear-gradient(rgba(18, 15, 12, 0.65), transparent);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.6);
}
header.top .in {
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.logo {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 500;
  text-decoration: none;
  letter-spacing: -0.015em;
  display: inline-block;
}
nav {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}
nav a {
  text-decoration: none;
  color: rgba(250, 246, 240, 0.85);
  transition: color 0.25s, transform 0.25s;
  position: relative;
  padding: 0.2rem 0;
}
nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s var(--ease-calm);
}
nav a:hover {
  color: #FFFFFF;
}
nav a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

header.top.solid {
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--line-subtle), 0 8px 24px -6px rgba(38, 33, 28, 0.06);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
}
header.top.solid nav a {
  color: var(--muted);
}
header.top.solid nav a:hover {
  color: var(--ink);
}

/* Hero Cover Section */
.cover {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  color: #FAF6F0;
  isolation: isolate;
  overflow: hidden;
}
.cover .inner {
  padding: 7.5rem clamp(1.25rem, 5vw, 2.5rem) 6rem;
  max-width: 66rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5), 0 4px 30px rgba(0, 0, 0, 0.65);
}
.kicker {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #E2D3B3;
  margin: 0 0 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.kicker::before, .kicker::after {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}
.cover h1 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(3.5rem, 11vw, 8.5rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin: 0;
}
.cover h1 em {
  font-style: italic;
  font-weight: 300;
  color: #E6CE9F;
  text-shadow: 0 0 40px rgba(230, 206, 159, 0.3);
}
.cover .route {
  width: min(100%, 460px);
  margin: 1.8rem auto 0;
  color: #E6CE9F;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}
.route path {
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  animation: draw 3.2s cubic-bezier(0.2, 0.8, 0.2, 1) 0.4s forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

.cover .sub {
  margin: 1.8rem auto 0;
  max-width: 44ch;
  color: #F5EFE6;
  font-size: clamp(1.15rem, 2.2vw, 1.35rem);
  line-height: 1.5;
  font-weight: 400;
}
.cover .cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2.2rem;
}

/* Button System (Cairn Pill Rhymes & Depth) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.8rem 1.7rem;
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 0.96rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition: all 0.3s var(--ease-calm);
}
.btn:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}
.btn:active {
  transform: translateY(0);
}
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
}
.btn.ghost:hover {
  background: var(--surface-lift);
  border-color: var(--muted);
  box-shadow: var(--shadow-sm);
}
.cover .btn {
  background: #FAF6F0;
  color: #26211C;
  border-color: #FAF6F0;
}
.cover .btn:hover {
  background: #FFFFFF;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}
.cover .btn.ghost {
  background: rgba(24, 20, 16, 0.3);
  color: #FAF6F0;
  border: 1px solid rgba(250, 246, 240, 0.6);
  backdrop-filter: blur(8px);
}
.cover .btn.ghost:hover {
  background: rgba(24, 20, 16, 0.55);
  border-color: #FAF6F0;
}

/* Hero Background & Dissolve Layers */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: linear-gradient(165deg, #4A4A38 0%, #2A2720 50%, #151310 100%);
}
.bg div {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.8s ease;
  transform: scale(1.03);
  will-change: opacity, transform;
}
.bg div.on {
  opacity: 1;
  animation: drift 16s ease-out forwards;
}
@keyframes drift { to { transform: scale(1.12); } }
.bg div i {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
}
.bg div.on i { will-change: opacity; }
.bg > .shade {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: radial-gradient(ellipse 70% 55% at 50% 50%, rgba(15, 13, 10, 0.45), transparent 75%),
              linear-gradient(rgba(15, 13, 10, 0.55), rgba(15, 13, 10, 0.4) 45%, rgba(15, 13, 10, 0.88));
}
.bg > .veil {
  position: absolute;
  inset: 0;
  z-index: 6;
  background: var(--veil);
  opacity: 0;
}
.bg.done div { background-image: none !important; }
.bg.done div i:not(:last-child) { display: none; }

/* Scroll Cue (Animated Breathing) */
.cue {
  position: absolute;
  bottom: calc(2rem + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: rgba(250, 246, 240, 0.85);
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color 0.3s, transform 0.3s;
}
.cue svg {
  animation: bob 2.2s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translateY(0); opacity: 0.8; }
  50% { transform: translateY(6px); opacity: 1; }
}
.cue:hover {
  color: #FFFFFF;
}

.bridge { height: 50vh; }

/* Sacred Visual Rhyme Divider */
.sacred-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: clamp(2rem, 6vw, 4.5rem) auto;
  color: var(--line);
  max-width: 420px;
}
.sacred-divider svg {
  width: 100%;
  height: 24px;
  color: var(--gold);
  opacity: 0.65;
}

/* Sections Global */
section {
  padding: clamp(3rem, 7vw, 5.5rem) 0;
}
h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: -0.018em;
}
h3 {
  font-size: clamp(1.8rem, 3.6vw, 2.4rem);
  font-weight: 400;
  line-height: 1.15;
  margin: 0;
}

/* Thesis Section (The Spiritual Heart) */
.thesis {
  padding-bottom: 1rem;
  text-align: center;
}
.thesis-line {
  width: 48px;
  height: 1px;
  background: var(--gold);
  margin: 0 auto 1.5rem;
  opacity: 0.6;
}
.thesis .q {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.6rem, 3.8vw, 2.5rem);
  line-height: 1.32;
  letter-spacing: -0.015em;
  max-width: 36ch;
  margin: 0 auto;
  color: var(--ink);
}
.thesis .q em {
  font-style: italic;
  color: var(--gold);
  font-weight: 400;
}
.thesis > .note {
  max-width: 54ch;
  margin: 1.4rem auto 0;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.68;
}

/* 4 Thesis Pillars / Paths Grid (Rhyme & Depth) */
.paths {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-top: 3.5rem;
  text-align: left;
}
.paths a {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 1.6rem 1.4rem;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line-subtle);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease-calm), box-shadow 0.35s var(--ease-calm), border-color 0.35s;
  position: relative;
  overflow: hidden;
}
.paths a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), transparent);
  opacity: 0;
  transition: opacity 0.35s;
}
.paths a:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--line);
  background: var(--surface-lift);
}
.paths a:hover::before {
  opacity: 1;
}
.path-step {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
  font-style: italic;
  color: var(--gold);
  margin-bottom: 0.65rem;
  display: inline-block;
  line-height: 1;
}
.paths h4 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.3rem;
  line-height: 1.2;
  margin: 0 0 0.6rem;
  color: var(--ink);
}
.paths p {
  margin: 0;
  color: var(--muted);
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.55;
}

/* Featured Pilgrimage Centerpiece (The Star / Story) */
.featured-pilgrimage {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-subtle);
  padding: clamp(2rem, 5vw, 3.2rem);
  box-shadow: var(--shadow-md);
  margin-bottom: 3.5rem;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-alt) 100%);
}
.featured-pilgrimage::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--gold) 60%, transparent 100%);
}
.featured-kicker {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--gold);
  margin-bottom: 0.85rem;
}
.featured-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 0.8rem;
  flex-wrap: wrap;
}
.featured-pilgrimage h3 {
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  line-height: 1.15;
  margin: 0 0 1rem;
}
.featured-excerpt {
  margin: 0 0 1.6rem;
  font-style: italic;
  color: var(--ink-secondary);
  max-width: 65ch;
  font-size: 1.15rem;
  line-height: 1.7;
}
.featured-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

/* Story Filters & Purpose Tabs */
.bar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.tabs {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.tabs button {
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 500;
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-pill);
  padding: 0.42rem 1.15rem;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s var(--ease-calm);
}
.tabs button:hover {
  color: var(--ink);
  border-color: var(--line);
  background: var(--surface-lift);
}
.tabs button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.16);
}

.purposes {
  margin: 0 0 2rem;
}
.purposes button {
  font-size: 0.85rem;
  padding: 0.32rem 0.95rem;
  background: transparent;
  box-shadow: none;
  border-color: var(--line-subtle);
}
.purposes button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

/* Stories List & Cards (Depth, Hierarchy & Reading Comfort) */
#list {
  display: grid;
  gap: 1.4rem;
}

details.post {
  display: block;
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--line-subtle);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.35s var(--ease-calm), border-color 0.35s, transform 0.35s;
  overflow: hidden;
}
details.post:hover {
  border-color: var(--line);
  box-shadow: var(--shadow-md);
}
details.post[open] {
  box-shadow: var(--shadow-md);
  border-color: var(--line);
  background: var(--surface-lift);
}

details.post summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: minmax(130px, 180px) minmax(0, 1fr) auto;
  gap: 1.6rem;
  padding: 1.6rem clamp(1.2rem, 3.5vw, 2rem);
  align-items: baseline;
  user-select: none;
  outline: none;
}
details.post summary::-webkit-details-marker { display: none; }

.post-meta {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  line-height: 1.4;
}
.post-type-badge {
  display: inline-block;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-size: 0.76rem;
}
.post-date {
  color: var(--muted);
}
.post-place {
  font-weight: 500;
  color: var(--ink-secondary);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.post-read-time {
  font-size: 0.78rem;
  color: var(--gold);
}

.post-header {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.post h4 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.35rem, 2.5vw, 1.7rem);
  line-height: 1.22;
  margin: 0;
  color: var(--ink);
  transition: color 0.25s;
}
details.post:hover h4 {
  color: var(--accent);
}
.post-summary-preview {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
details.post[open] .post-summary-preview {
  display: none;
}

.post-chevron {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: transform 0.35s var(--ease-calm), color 0.35s, background 0.35s;
}
details.post summary:hover .post-chevron {
  color: var(--ink);
  background: var(--gold-soft);
}
details.post[open] .post-chevron {
  transform: rotate(90deg);
  color: var(--gold);
}

/* Story Unfolded Prose (Optimal Reading Measure & Typography) */
.story-content {
  padding: 0 clamp(1.2rem, 3.5vw, 2rem) 2rem;
  border-top: 1px dashed var(--line-subtle);
  margin-top: 0.5rem;
  animation: fadeIn 0.4s var(--ease-calm);
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.body {
  white-space: pre-wrap;
  max-width: 66ch;
  margin: 1.5rem 0 0;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 1.15rem;
  line-height: 1.78;
}
.plabel {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

/* Inner Path Sanctuary (Illuminated Marginalia Depth) */
.inpath {
  background: var(--gold-soft);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 1.4rem 1.6rem;
  margin-top: 1.8rem;
  max-width: 66ch;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.02);
}
.inpath .plabel {
  color: var(--gold);
}
.inpath > div {
  font-style: italic;
  color: var(--ink-secondary);
}

/* Purpose Pill */
.purpose-pill {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  background: var(--surface-alt);
  border: 1px solid var(--line-subtle);
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-pill);
  letter-spacing: 0.02em;
}

/* Media in Stories */
.media {
  display: grid;
  gap: 1.2rem;
  max-width: 66ch;
  margin: 1.6rem 0 0;
}
.media img, .media video {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  display: block;
  background: var(--surface-alt);
  box-shadow: var(--shadow-sm);
}
.media audio, .thumb audio {
  width: 100%;
  display: block;
  border-radius: var(--radius-pill);
}

/* Admin Acts */
.acts {
  display: flex;
  gap: 1rem;
  margin: 1.5rem 0 0;
}
.acts .del, .del {
  background: none;
  border: 0;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}
.acts .del:hover, .del:hover {
  color: var(--ink);
}

/* Glimpses Strip */
#glimpses {
  margin-top: 2rem;
}
.strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.8rem;
}
.strip a {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease-calm), box-shadow 0.3s;
}
.strip a:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--shadow-md);
}
.strip img, .strip video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* About & Philosophy */
.about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.about h3 {
  position: sticky;
  top: 6rem;
}
.about p {
  margin: 0 0 1.4em;
  max-width: 64ch;
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--ink-secondary);
}

/* Letter (Dispatch Subscription Form) */
.letter {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-subtle);
  padding: clamp(2rem, 6vw, 4rem);
  text-align: center;
  box-shadow: var(--shadow-md);
  margin-top: 3rem;
  position: relative;
  overflow: hidden;
}
.letter::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.letter h3 {
  margin: 0 0 0.8rem;
}
.letter p {
  color: var(--muted);
  margin: 0 auto 1.8rem;
  max-width: 48ch;
  font-size: 1.1rem;
}
.letter form {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}
.letter input {
  font-family: var(--font-sans);
  font-size: 0.98rem;
  padding: 0.8rem 1.4rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--surface-lift);
  color: var(--ink);
  min-width: min(100%, 20rem);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}
.letter input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-soft);
}
.thanks {
  color: var(--accent);
  margin: 1.2rem 0 0;
  font-style: italic;
}

/* Editor Form */
.editor {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
  max-width: 46rem;
}
.editor .row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.editor input, .editor select, .editor textarea {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  width: 100%;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
}
.editor input:focus, .editor select:focus, .editor textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-soft);
}
.editor .row > * {
  flex: 1 1 12rem;
  width: auto;
}
.editor textarea {
  line-height: 1.65;
  resize: vertical;
}

/* Footer */
footer {
  padding: 3.5rem 0 4rem;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--line-subtle);
  margin-top: 4rem;
}
footer a {
  text-decoration: none;
  color: inherit;
}
footer a:hover {
  color: var(--ink);
  text-decoration: underline;
}

/* Gallery & Lightbox */
.gal { padding-top: 1rem; }
.grid {
  columns: 3 240px;
  column-gap: 1.25rem;
  margin-top: 2rem;
}
.tile {
  margin: 0 0 1.25rem;
  break-inside: avoid;
}
.tile > button:first-child {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  overflow: hidden;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease-calm), box-shadow 0.3s;
}
.tile > button:first-child:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.tile img, .tile video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
}
.tile figcaption {
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  margin-top: 0.5rem;
}
dialog {
  border: 0;
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--ink);
  padding: 1.5rem;
  max-width: min(94vw, 1100px);
  max-height: 94vh;
  box-shadow: var(--shadow-lg);
}
dialog::backdrop {
  background: rgba(15, 12, 10, 0.75);
  backdrop-filter: blur(8px);
}
#lbc img, #lbc video {
  max-width: 100%;
  max-height: 75vh;
  display: block;
  margin: 1rem auto 0;
  border-radius: var(--radius-xs);
}

/* Scroll-triggered Reveal Animations */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.75s var(--ease-calm), transform 0.75s var(--ease-calm);
  will-change: opacity, transform;
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Reduced Motion Safeguards */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .route path { animation: none; stroke-dashoffset: 0; }
  .bg div.on, .cue svg { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .paths a, details.post, .btn { transition: none; transform: none !important; }
}

/* Responsive Breakpoints */
@media (max-width: 760px) {
  header.top nav { gap: 1rem; font-size: 0.88rem; }
  .about { grid-template-columns: 1fr; gap: 1.5rem; }
  .about h3 { position: static; }
  details.post summary {
    grid-template-columns: 1fr auto;
    gap: 0.8rem;
  }
  .post-meta {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  .grid { columns: 2 160px; }
}

@media (max-width: 480px) {
  .grid { columns: 1 100%; }
}
