/* ==========================================================================
   Darshniks — Site-wide Stylesheet
   Single source of styling for every page: palette, typography, header/nav,
   footer, and shared content components.
   ========================================================================== */

/* Self-hosted fonts — EB Garamond (serif voice, content/headings) is not
   preinstalled on most non-Windows systems, so without hosting it ourselves
   most visitors silently fall back to a generic serif and never see the
   intended type. Inter covers UI chrome (nav, buttons, badges) for a
   deliberate serif/sans contrast. Both ship as variable fonts. */
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/EBGaramond-Variable.woff2") format('woff2');
}

@font-face {
  font-family: 'EB Garamond';
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/EBGaramond-Italic-Variable.woff2") format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/Inter-Variable.woff2") format('woff2');
}

:root {
  /* Mystic Philosophy redesign, turquoise variant: converted from the gray
     palette after homepage experimentation. Every card border, kicker,
     hover glow, and button already keys off these variables (see the old
     realm-mystic override below), so retuning them here recolors the
     whole site for free — no per-component rewrites needed. */
  --navy: #052422;           /* near-black teal — header, hero overlay, ink-on-light spots */
  --navy-deep: #6fd8cc;      /* bright turquoise — readable accent text/borders on dark surfaces */
  --gold: #e2c47e;           /* warm gold — accent colour site-wide (titles, labels, borders) */
  --gold-bright: #f3dfa6;    /* pale gold — brighter accent, the same gold used in all the artwork */
  --parchment: #0f4d47;      /* primary background — vivid blue-green turquoise */
  --parchment-dark: #072e2a; /* accent / card-highlight background — darker still */
  --ink: #eafbf8;            /* body text — pale cyan-white, not flat white */
  --font-serif: 'EB Garamond', Garamond, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

/* Base Styles */
body {
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1.6;
  background-color: var(--parchment);
  /* Nebula glow + base gradient. The star dot layers used to live here too,
     but they've moved to body::before/::after (see below) so each can twinkle
     with its own animation — a single background-image can't animate one
     layer's opacity independently of the others. */
  background-image:
    radial-gradient(ellipse 1200px 700px at 50% -10%, rgba(95, 212, 200, 0.16), transparent 60%),
    linear-gradient(180deg, var(--parchment-dark) 0%, var(--parchment) 40%);
  background-repeat: no-repeat, no-repeat;
  background-position: center top, center top;
  background-size: cover, cover;
  background-attachment: fixed, fixed;
  color: var(--ink);
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  transition: background-color 0.4s ease, color 0.4s ease;
  min-height: 100vh;
}

/* Twinkling starfield: the two dot layers from the old single background-image
   now live on ::before/::after so each can pulse opacity independently.
   z-index: -1 keeps them behind all normal-flow page content (sections,
   footer) while still painting above body's own background — position:fixed
   so they don't scroll with the page. */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-repeat: repeat;
}

body::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cg fill='%23ffffff'%3E%3Ccircle cx='20' cy='30' r='1.4' opacity='0.8'/%3E%3Ccircle cx='90' cy='80' r='1' opacity='0.5'/%3E%3Ccircle cx='150' cy='40' r='1.6' opacity='0.7'/%3E%3Ccircle cx='210' cy='110' r='1' opacity='0.4'/%3E%3Ccircle cx='60' cy='160' r='1.2' opacity='0.6'/%3E%3Ccircle cx='130' cy='200' r='1' opacity='0.5'/%3E%3Ccircle cx='230' cy='220' r='1.4' opacity='0.7'/%3E%3Ccircle cx='10' cy='230' r='1' opacity='0.4'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 260px 260px;
  animation: twinkle-gold 0.9s ease-in-out infinite;
}

body::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cg fill='%23ece4d8'%3E%3Ccircle cx='15' cy='20' r='0.8' opacity='0.5'/%3E%3Ccircle cx='70' cy='60' r='0.6' opacity='0.35'/%3E%3Ccircle cx='110' cy='30' r='0.9' opacity='0.45'/%3E%3Ccircle cx='40' cy='100' r='0.6' opacity='0.3'/%3E%3Ccircle cx='120' cy='120' r='0.8' opacity='0.4'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 140px 140px;
  animation: twinkle-cream 1.3s ease-in-out infinite;
  animation-delay: 0.3s;
}

@keyframes twinkle-gold {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

@keyframes twinkle-cream {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.8; }
}

@media (prefers-reduced-motion: reduce) {
  body::before,
  body::after {
    animation: none;
    opacity: 0.7;
  }
}

main, body > section:not(.hero) {
  flex: 1;
}


/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(15, 77, 71, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(201, 164, 76, 0.4);
  color: var(--ink);
  padding: 15px 40px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 25px;
  transition: background-color 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

header.header-scrolled {
  background-color: rgba(15, 77, 71, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 15px;
}

header .logo img {
  height: 45px;
  width: auto;
  display: block;
}

header h1 {
  margin: 0;
  font-size: 1.5em;
  text-align: left;
}

header nav {
  margin-top: 0;
  margin-left: auto;
}

@media (min-width: 1220px) {
  header nav {
    flex-basis: 100%;
    justify-content: flex-end;
    margin-top: 12px;
  }
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 15px;
}

nav a {
  color: var(--gold);
  margin: 0 10px;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s;
}

nav a:hover {
  color: var(--gold-bright);
}

/* Hamburger icon hidden on desktop */
.menu-toggle {
  display: none;
  font-size: 1.8em;
  cursor: pointer;
  color: var(--gold);
}

/* Header icon buttons: search + theme toggle */
.header-icons {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-left: 15px;
}

.search-toggle,
.theme-toggle,
.music-toggle {
  font-size: 1.3em;
  line-height: 1;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--gold);
  padding: 0;
}

.search-toggle:hover,
.theme-toggle:hover,
.music-toggle:hover {
  color: var(--gold-bright);
}

/* Search dropdown */
.site-search {
  display: none;
  position: absolute;
  top: 100%;
  right: 40px;
  margin-top: 8px;
  background: var(--parchment);
  border: 1px solid var(--gold);
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  padding: 12px;
  width: 280px;
  z-index: 50;
  text-align: left;
}

.site-search.show {
  display: block;
}

.site-search input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--gold);
  border-radius: 5px;
  font-family: inherit;
  font-size: 1em;
  box-sizing: border-box;
  color: var(--ink);
}

.search-results {
  margin-top: 8px;
  max-height: 260px;
  overflow-y: auto;
}

.search-results a {
  display: block;
  padding: 8px 10px;
  color: var(--ink);
  text-decoration: none;
  border-radius: 5px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.search-results a:hover {
  background: var(--parchment-dark);
  color: var(--gold-bright);
}

.search-results .no-results {
  margin: 6px 2px;
  color: var(--ink);
  opacity: 0.7;
  font-size: 0.9em;
}

/* Hero Section (used by home + full-bleed feature pages) — cinematic, bottom-aligned */
.hero {
  position: relative;
  background: url("../images/hero-bg.jpg") no-repeat center center;
  background-size: cover;
  background-attachment: fixed;
  height: 60vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  text-align: left;
  color: var(--ink);
  margin: 0;
  padding: 50px 60px;
  box-sizing: border-box;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(201, 164, 76, 0.22), transparent 70%),
    linear-gradient(to top, rgba(5, 36, 34, 0.92) 0%, rgba(5, 36, 34, 0.35) 55%, rgba(5, 36, 34, 0.05) 100%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  border-bottom: 2px solid rgba(201, 164, 76, 0.5);
  pointer-events: none;
}

.hero.hero-light::before {
  background: linear-gradient(to top, rgba(5, 36, 34, 0.78) 0%, rgba(5, 36, 34, 0.4) 55%, rgba(5, 36, 34, 0.12) 100%);
}

.hero > * {
  position: relative;
  z-index: 1;
}

/* Decorative homepage quote. It sits in the normal flow with auto margins above
   and below, so it is centred in the empty space above the title block (the hero
   is a bottom-aligned flex column) and can never collide with that block. It used to float at
   the hero's exact centre, which overlapped the title on phones and came within
   ~35px of it on desktop. */
.hero .hero-overlay-quote {
  position: relative;
  z-index: 2;
  align-self: center;
  color: var(--gold-bright);
  font-family: var(--font-serif);
  font-style: normal;
  font-weight: bold;
  font-size: 2em;
  text-align: center;
  max-width: 640px;
  margin: auto 0;
  padding: 0 20px 24px;
  box-sizing: border-box;
  border-left: none; /* the generic blockquote rule's bar looked like a stray line here */
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.75), 0 4px 14px rgba(0, 0, 0, 0.55);
}

.hero-kicker {
  color: var(--gold-bright, var(--gold));
  font-size: 0.85em;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: bold;
  margin-bottom: 10px;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
}

.hero blockquote {
  font-family: var(--font-serif);
  font-size: 2em;
  color: var(--ink);
  text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.6);
  background: none;
  padding: 0;
  border-radius: 0;
  margin: 0 0 16px;
  max-width: 700px;
  transition: background-color 0.4s ease, color 0.4s ease;
}

.hero-subtitle-text {
  max-width: 600px;
  font-size: 1.05em;
  opacity: 0.9;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
  margin: 0 0 18px;
}

/* Full-bleed image hero used on bio/theory/feature pages */
.hero.hero-feature,
div.hero {
  height: 55vh;
  color: var(--ink);
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.6);
}

.hero.hero-full {
  height: 100vh;
}

.hero h2 {
  font-size: 2.2em;
  background: none;
  color: var(--gold-bright);
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
  border-bottom: none;
  padding: 0;
  border-radius: 0;
  margin: 0 0 16px;
  max-width: 700px;
}

/* Buttons */
button {
  background-color: var(--parchment);
  color: var(--ink);
  border: none;
  padding: 11px 24px;
  margin-top: 20px;
  cursor: pointer;
  font-weight: bold;
  border-radius: 30px;
  font-size: 1em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.3s ease, color 0.3s ease;
}

button:hover {
  background-color: var(--gold);
  color: var(--navy);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
}

button:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Generic content wrapper (bio pages, theory pages, quiz, dialogues, etc.) */
section {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px;
  font-size: 1.1em;
  line-height: 1.8;
  box-sizing: border-box;
}

section h2 {
  color: var(--gold);
  border-bottom: 2px solid var(--gold);
  padding-bottom: 5px;
}

section p {
  margin-bottom: 20px;
}

section ul {
  line-height: 1.8;
  margin-bottom: 20px;
}

section .visual {
  text-align: center;
}

section .visual img {
  max-width: 100%;
  border-radius: 8px;
  margin: 15px 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

section .visual .visual-credit {
  display: block;
  font-size: 0.7em;
  color: var(--gold-bright);
  opacity: 0.6;
  margin-top: -8px;
  margin-bottom: 12px;
}

section .visual .visual-credit a {
  color: inherit;
}

.quote {
  font-style: italic;
  color: var(--ink);
  border-left: 4px solid var(--gold);
  padding-left: 12px;
  margin: 20px 0;
}

blockquote {
  font-style: italic;
  color: var(--ink);
  border-left: 4px solid var(--gold);
  padding-left: 12px;
  margin: 20px 0;
}

.quotes-link {
  display: inline-block;
  margin-top: 15px;
  font-weight: bold;
  color: var(--gold-bright);
  text-decoration: none;
}

.quotes-link:hover {
  color: var(--gold);
}

/* Plain bold in brighter ink. It used to sit in a dark background chip, which in the
   middle of a paragraph read like highlighter or code rather than emphasis. */
strong {
  color: var(--gold-bright);
}

/* Highlighted info box (Ajivikas, Carvaka, comparisons, etc.) */
.highlight-box {
  background-color: #3a3620;
  border: 1px solid var(--gold);
  border-radius: 8px;
  padding: 15px;
  margin: 20px 0;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.35);
  transition: background-color 0.4s ease;
}

.highlight-box p {
  margin: 8px 0;
  font-weight: bold;
  color: var(--ink);
}

/* Subtopic labels (Yoga, Deep Meditations) */
.subtopic,
.subtopic2 {
  font-size: 1.1em;
  color: var(--gold-bright);
  margin: 25px 0 15px;
  padding: 8px 12px;
  background-color: #3a3620;
  display: inline-block;
}

.subtopic {
  font-weight: bold;
  border-left: 4px solid var(--gold);
}

.subtopic2 {
  font-weight: normal;
}

/* Captioned image blocks (Mystics Arts, Yoga, Deep Meditations) */
.chakra-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 30px auto;
  text-align: center;
}

.chakra-container img {
  max-width: 100%;
  border: 2px solid var(--gold);
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  margin-bottom: 10px;
}

.chakra-caption {
  font-style: italic;
  color: var(--ink);
  font-size: 1.05em;
}

/* Great Thinkers / grid cards (home, philosophers, philosophies) */
.hero,
.thinkers,
.themes,
.quote-day,
.philosophers-list,
.themes-list {
  max-width: none;
}

.thinkers,
.themes,
.philosophers-list,
.themes-list {
  padding: 40px 20px;
  text-align: center;
}

.thinkers {
  padding-top: 80px;
}

.thinkers h2 {
  font-size: 1.6em;
}

.grid,
.philosophers-grid,
.themes-grid {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}

.card,
.philosopher-card,
.theme-card {
  background-color: var(--parchment);
  border: 1px solid var(--gold);
  padding: 20px;
  width: 220px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.thinkers .card {
  width: 140px;
  padding: 10px;
}

.thinkers .card-img {
  height: 100px;
  margin-bottom: 8px;
}

.thinkers .card h3 {
  font-size: 0.9em;
  margin: 8px 0 4px;
}

.thinkers .card p {
  font-size: 0.8em;
  line-height: 1.4;
}

.philosopher-card,
.theme-card {
  width: 160px;
  padding: 15px;
}

.theme-card {
  height: 300px;
  display: flex;
  flex-direction: column;
}

.theme-card p {
  font-size: 0.8em;
  line-height: 1.4;
}

/* Descriptive hub grid (Philosophers / Philosophies / Mystics) —
   icon + title + one-line description per entry, replacing the
   plain image-only nx-row for these three pages. */
.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 20px;
  padding: 10px 40px 50px;
}

.topic-card {
  display: block;
  background-color: var(--parchment);
  border: 1px solid var(--gold);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.4s ease;
}

.topic-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
}

.topic-card img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 14px;
}

.topic-card h3 {
  color: var(--gold-bright);
  font-size: 1.05em;
  margin: 0 0 10px;
}

.topic-card p {
  color: var(--navy-deep);
  font-size: 0.85em;
  line-height: 1.5;
  margin: 0;
}

body.dark-mode .topic-card {
  background-color: #2a2d34;
}

body.dark-mode .topic-card h3 {
  color: #d9b56a;
}

body.dark-mode .topic-card p {
  color: var(--ink);
}

.card-img,
.philosopher-card img,
.theme-card img {
  display: block;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 15px;
  border: 3px solid var(--navy-deep);
}

.philosopher-card img {
  width: 80px;
  height: 80px;
  margin-bottom: 10px;
}

.theme-card img {
  width: 60px;
  height: 60px;
  border-radius: 0;
  border: none;
}

.card h3 {
  font-family: 'Baskerville', serif;
  color: var(--navy-deep);
}

.card a,
.philosopher-card a,
.theme-card a {
  display: inline-block;
  margin-top: 10px;
  color: var(--gold-bright);
  text-decoration: none;
  font-weight: bold;
}

.card a:hover,
.philosopher-card a:hover,
.theme-card a:hover {
  color: var(--gold);
}

/* Themes / icon row (home) */
.icons {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.icons div {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 1.1em;
  color: var(--navy-deep);
}

.icons img {
  width: 60px;
  height: 60px;
  margin-bottom: 10px;
  border-radius: 12px;
  border: 2px solid var(--gold);
  background-color: var(--parchment);
  transition: background-color 0.4s ease;
  padding: 5px;
}

/* Quote of the Day (home) */
.quote-day {
  padding: 40px 20px;
  text-align: center;
  background-color: var(--parchment-dark);
  border-top: 3px solid var(--gold);
  border-bottom: 3px solid var(--gold);
  transition: background-color 0.4s ease;
}

.quote-day blockquote {
  font-family: var(--font-serif);
  font-size: 1.5em;
  color: var(--navy-deep);
  margin: 20px auto;
  max-width: 600px;
  border-left: none;
  padding-left: 0;
}

.quote-day blockquote a {
  color: inherit;
  text-decoration: none;
}

.quote-day blockquote a:hover {
  text-decoration: underline;
}

.on-this-day {
  padding: 20px 20px;
  text-align: center;
}

.on-this-day .otd-date {
  margin: 2px 0 10px;
  color: var(--navy-deep);
  font-size: 1.2em;
}

.otd-card {
  max-width: 480px;
  margin: 0 auto;
}

.otd-card p {
  margin: 0;
  font-size: 0.9em;
  line-height: 1.4;
}

.otd-card a.otd-link {
  color: var(--gold-bright);
  font-weight: bold;
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
}

.otd-card a.otd-link:hover {
  color: var(--gold);
}

/* Card-style panels shared by interactive pages
   (debate questions, dialogue prompts, community stories) */
.question-card,
.prompt,
.story {
  background: var(--parchment);
  border: 1px solid var(--gold);
  border-radius: 8px;
  padding: 15px 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.question-card h3,
.prompt h3 {
  margin-top: 0;
}

.prompt textarea {
  width: 100%;
  height: 80px;
  margin-top: 10px;
  padding: 10px;
  font-family: inherit;
  box-sizing: border-box;
}

.response {
  margin-top: 15px;
  padding: 10px;
  background: var(--parchment-dark);
  border-left: 3px solid var(--gold);
  transition: background-color 0.4s ease;
}

#progress,
#result {
  margin: 20px 0;
  font-weight: bold;
  color: var(--gold-bright);
  text-align: center;
}

.question-form {
  margin-bottom: 30px;
}

.question-form input,
.question-form button {
  padding: 10px;
  font-size: 16px;
}

.question-form input {
  width: 70%;
  margin-right: 10px;
}

.vote-buttons button {
  margin-right: 10px;
  margin-top: 0;
  padding: 5px 10px;
  cursor: pointer;
}

.comments {
  margin-top: 10px;
}

.comments input {
  width: 70%;
  padding: 5px;
}

.comments button {
  padding: 5px 10px;
  margin-top: 0;
  margin-left: 5px;
}

/* Forms (story submission, quiz) */
form {
  margin-bottom: 30px;
  background: var(--parchment);
  padding: 20px;
  border-radius: 8px;
  border: 1px solid var(--gold);
}

form input,
form textarea {
  width: 100%;
  padding: 10px;
  margin: 10px 0;
  border: 1px solid var(--gold);
  border-radius: 5px;
  font-family: inherit;
  box-sizing: border-box;
}

.question {
  margin-bottom: 20px;
}

.question h3 {
  margin-bottom: 10px;
}

.question label {
  display: block;
  margin: 5px 0;
}

/* Collapsible entries (Mystics in History, Stories) */
.search-box {
  margin: 20px 0;
  text-align: center;
}

.search-box input {
  padding: 10px;
  width: 60%;
  border: 1px solid var(--gold);
  border-radius: 5px;
  font-family: inherit;
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  align-items: start;
}

details {
  background: var(--parchment);
  border: 1px solid var(--gold);
  border-radius: 10px;
  margin: 14px 0;
  padding: 16px 20px;
  transition: background-color 0.3s ease;
}

.story-grid details {
  margin: 0;
}

details summary {
  cursor: pointer;
  font-weight: bold;
  font-size: 1.05em;
  color: var(--gold-bright);
  line-height: 1.4;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

details summary::after {
  content: "+";
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--gold);
  font-size: 1em;
  font-weight: bold;
}

details[open] summary::after {
  content: "\2013";
}

details[open] {
  background: #2a2c1f;
}

details[open] summary {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--gold);
}

details p {
  max-width: 68ch;
  margin: 0 auto 18px;
  font-size: 1.05em;
  line-height: 1.9;
  color: var(--ink);
}

details p:last-child {
  margin-bottom: 0;
}

/* Reflections textarea */
.reflections-content textarea {
  width: 100%;
  max-width: 600px;
  padding: 10px;
  font-family: inherit;
  box-sizing: border-box;
}

/* Explore-more link grids (Journey, Mystics Arts) */
section ul.link-grid,
section ul.explore-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

section ul.link-grid li a,
section ul.explore-list li a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 90px;
  background: var(--parchment);
  border: 1px solid var(--gold);
  border-radius: 14px;
  padding: 20px;
  text-align: center;
  text-decoration: none;
  color: var(--navy-deep);
  font-weight: bold;
  font-size: 18px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s, box-shadow 0.3s;
}

section ul.link-grid li a:hover,
section ul.explore-list li a:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  color: var(--gold);
}

.explore-icon {
  font-size: 1.3em;
  margin-right: 10px;
  line-height: 1;
}

/* Footer */
footer {
  background-color: var(--parchment);
  color: var(--ink);
  text-align: center;
  padding: 20px;
  margin-top: auto;
}

.footer-icon {
  margin-top: 10px;
  font-size: 1.3em;
}

.footer-icon img {
  height: 40px;
  width: auto;
}

footer .copyright {
  margin-top: 8px;
  font-size: 0.85em;
  opacity: 0.8;
}

/* Header and menu: hamburger layout up to 1219px. Between 769px and ~1220px the
   eight-item menu and the icons wrapped onto extra lines and the sticky header grew
   to 179px, so tablets and small laptops now get the same one-row header as phones;
   the full menu needs ~1220px to sit on one line beside the icons. */
@media (max-width: 1219px) {
  header {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    text-align: left;
    padding: 10px 24px;
    gap: 0 12px;
  }

  .header-brand {
    width: auto;
    justify-content: flex-start;
  }

  nav {
    display: flex;
    flex-direction: column;
    background-color: var(--navy);
    padding: 0 10px;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: max-height 0.35s ease, opacity 0.3s ease, transform 0.3s ease, padding 0.35s ease;
  }

  nav a {
    margin: 10px 0;
    color: var(--ink);
  }

  .menu-toggle {
    display: block;
  }

  nav.show {
    max-height: 600px;
    opacity: 1;
    transform: translateY(0);
    padding: 10px;
  }
}

/* ------------------- */
/* Mobile Responsiveness */
/* ------------------- */
@media (max-width: 768px) {
  body {
    background-attachment: scroll, scroll;
  }

  .grid,
  .philosophers-grid,
  .themes-grid {
    flex-direction: column;
    align-items: center;
  }

  .card,
  .philosopher-card,
  .theme-card {
    width: 90%;
    margin-bottom: 20px;
  }

  .icons {
    flex-direction: column;
    gap: 15px;
  }

  .icons img {
    width: 50px;
    height: 50px;
  }

  .quote-day blockquote {
    font-size: 1.2em;
    padding: 0 10px;
  }
}

@media (max-width: 480px) {
  header h1 {
    font-size: 1.3em;
  }

  .hero blockquote,
  .hero h2 {
    font-size: 1.3em;
  }

  button {
    width: 100%;
    padding: 12px;
  }

  .card-img {
    height: 140px;
  }

  .icons img {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 480px) {
  .site-search {
    right: 20px;
    left: 20px;
    width: auto;
  }
}

/* ------------------- */
/* Wisdom Finder (Journey.html) */
/* ------------------- */
/* Hero subtitle + scroll cue (Journey.html) */
.hero-subtitle {
  margin-top: 12px;
  font-size: 1.1em;
  font-style: italic;
  color: var(--ink);
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
  animation: fadeInUp 1s ease 0.3s both;
}

.scroll-cue {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--gold-bright);
  font-size: 1.8em;
  text-decoration: none;
  animation: bounce 2s infinite;
}

/* Section kicker label */
.section-kicker {
  display: block;
  color: var(--gold);
  letter-spacing: 3px;
  text-transform: uppercase;
  font-size: 0.75em;
  font-weight: bold;
  margin-bottom: 8px;
}

.wisdom-finder,
.explore-section {
  text-align: center;
  background: radial-gradient(ellipse at center, rgba(201, 164, 76, 0.1) 0%, rgba(201, 164, 76, 0) 70%);
}

.wisdom-finder {
  animation: fadeInUp 0.8s ease both;
}

.explore-section {
  animation: fadeInUp 0.8s ease 0.1s both;
}

.mood-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin: 20px 0 10px;
}

.mood-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--parchment);
  color: var(--gold-bright);
  border: 2px solid var(--gold);
  padding: 12px 22px;
  border-radius: 30px;
  font-weight: bold;
  font-size: 1em;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  margin-top: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}

.mood-icon {
  font-size: 1.2em;
  line-height: 1;
}

.mood-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.mood-btn:hover,
.mood-btn.active {
  background-color: var(--gold);
  color: var(--navy);
}

.mood-btn.active {
  box-shadow: 0 0 0 3px rgba(201, 164, 76, 0.35), 0 8px 18px rgba(0, 0, 0, 0.18);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 10px); }
}

.wisdom-results {
  margin-top: 30px;
  text-align: left;
  min-height: 1px;
}

.wisdom-results-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
  position: relative;
}

.wisdom-results h3 {
  color: var(--gold);
  text-align: center;
  border-bottom: none;
  margin: 0;
  font-size: 1.7em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
}

.reset-btn {
  background: none;
  border: 1px solid var(--gold);
  border-radius: 20px;
  color: var(--gold-bright);
  font-family: inherit;
  font-size: 0.85em;
  font-weight: bold;
  padding: 6px 14px;
  margin-top: 0;
  cursor: pointer;
  white-space: nowrap;
}

.reset-btn:hover {
  background-color: var(--gold);
  color: var(--navy);
}

@media (min-width: 601px) {
  .wisdom-results-header {
    justify-content: center;
  }

  .reset-btn {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
  }
}

.wisdom-results > p {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 20px;
}

.wisdom-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  counter-reset: wisdom-counter;
}

/* Scoped to the Journey page's .wisdom-cards list: Wisdom_Cards.html uses the same
   class name for its deck, and these styles were leaking onto it. */
.wisdom-cards .wisdom-card {
  position: relative;
  display: block;
  background: linear-gradient(160deg, var(--parchment) 0%, var(--parchment-dark) 100%);
  border: 1px solid var(--gold);
  border-top: 4px solid var(--gold);
  border-radius: 14px;
  padding: 26px 20px 20px;
  width: 230px;
  text-decoration: none;
  color: var(--ink);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
  counter-increment: wisdom-counter;
  animation: fadeInUp 0.5s ease both;
}

.wisdom-cards a:nth-child(1) { animation-delay: 0.05s; }
.wisdom-cards a:nth-child(2) { animation-delay: 0.1s; }
.wisdom-cards a:nth-child(3) { animation-delay: 0.15s; }
.wisdom-cards a:nth-child(4) { animation-delay: 0.2s; }
.wisdom-cards a:nth-child(5) { animation-delay: 0.25s; }
.wisdom-cards a:nth-child(6) { animation-delay: 0.3s; }
.wisdom-cards a:nth-child(7) { animation-delay: 0.35s; }
.wisdom-cards a:nth-child(8) { animation-delay: 0.4s; }

.wisdom-cards .wisdom-card::before {
  content: counter(wisdom-counter);
  position: absolute;
  top: -14px;
  left: 18px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--gold-bright);
  font-weight: bold;
  font-size: 0.85em;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.wisdom-cards .wisdom-card:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.22);
  border-color: var(--gold-bright);
}

.wisdom-cards .wisdom-card h4 {
  margin: 4px 0 10px;
  color: var(--gold-bright);
  font-size: 1.15em;
}

.wisdom-cards .wisdom-card p {
  margin: 0 0 14px;
  font-size: 0.88em;
  line-height: 1.55;
}

.wisdom-cards .wisdom-card::after {
  content: "Explore \2192";
  display: inline-block;
  font-size: 0.8em;
  font-weight: bold;
  letter-spacing: 0.3px;
  color: var(--gold);
  transition: color 0.3s ease, transform 0.3s ease;
}

.wisdom-cards .wisdom-card:hover::after {
  color: var(--gold-bright);
  transform: translateX(4px);
}

.book-recs {
  margin-top: 40px;
  padding: 25px 20px 20px;
  background: rgba(201, 164, 76, 0.08);
  border: 1px dashed var(--gold);
  border-radius: 16px;
  text-align: center;
}

.book-recs h4 {
  color: var(--gold);
  font-size: 1.2em;
  margin: 0 0 20px;
}

.book-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
}

.book-item {
  background: var(--parchment);
  border: 1px solid var(--gold);
  border-radius: 8px;
  padding: 20px 18px;
  width: 210px;
  box-shadow: -5px 0 0 var(--navy), 0 4px 10px rgba(0, 0, 0, 0.12);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.book-item:hover {
  transform: translateY(-6px) rotate(-1deg);
  box-shadow: -5px 0 0 var(--gold), 0 12px 22px rgba(0, 0, 0, 0.2);
}

.book-title {
  font-weight: bold;
  color: var(--gold-bright);
  font-size: 1.05em;
  margin: 0 0 6px;
}

.book-title::before {
  content: "\1F4D6  ";
}

.book-author {
  font-style: italic;
  font-size: 0.85em;
  margin: 0 0 16px;
  color: var(--ink);
  opacity: 0.8;
}

.book-link {
  display: inline-block;
  background: var(--navy);
  color: var(--ink);
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 0.8em;
  font-weight: bold;
  text-decoration: none;
  border-bottom: none;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.book-link:hover {
  background: var(--gold);
  color: var(--navy);
  transform: translateY(-2px);
}

/* Mood-based mantra generator (Journey.html) */
.mantra-card {
  max-width: 560px;
  margin: 0 auto 30px;
  padding: 24px 28px;
  text-align: center;
  background: rgba(201, 164, 76, 0.08);
  border: 1px dashed var(--gold);
  border-radius: 16px;
  animation: fadeInUp 0.4s ease both;
}

.mantra-text {
  font-size: 1.3em;
  font-style: italic;
  color: var(--navy-deep);
  margin: 0 0 8px;
}

.mantra-author {
  margin: 0 0 16px;
  color: var(--gold);
  font-weight: bold;
  font-size: 0.85em;
}

.mantra-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.mantra-btn {
  background-color: var(--parchment);
  color: var(--gold-bright);
  border: 2px solid var(--gold);
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 0.85em;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.mantra-btn:hover {
  background-color: var(--gold);
  color: var(--navy);
  transform: translateY(-2px);
}

/* ------------------- */
/* Philosophical Quiz */
/* ------------------- */
.quiz-progress-wrap {
  max-width: 500px;
  margin: 20px auto 8px;
  height: 10px;
  background: var(--parchment-dark);
  border: 1px solid var(--gold);
  border-radius: 10px;
  overflow: hidden;
}

.quiz-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright));
  transition: width 0.4s ease;
}

.quiz-progress-label {
  text-align: center;
  font-size: 0.9em;
  font-weight: bold;
  color: var(--gold-bright);
  margin: 0 0 20px;
}

.quiz-container {
  max-width: 600px;
  margin: 0 auto;
}

.quiz-fade-in {
  animation: fadeInUp 0.4s ease both;
}

.quiz-question {
  background: var(--parchment);
  border: 1px solid var(--gold);
  border-radius: 14px;
  padding: 26px 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.quiz-question h3 {
  margin: 0 0 20px;
  color: var(--gold-bright);
  font-size: 1.2em;
  line-height: 1.5;
  text-align: center;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quiz-option {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--parchment-dark);
  border: 2px solid var(--gold);
  border-radius: 10px;
  padding: 12px 18px;
  font-family: inherit;
  font-size: 1em;
  font-weight: bold;
  color: var(--gold-bright);
  cursor: pointer;
  margin-top: 0;
  box-sizing: border-box;
  transition: background-color 0.25s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.quiz-option:hover:not(:disabled) {
  background: var(--gold);
  color: var(--navy);
  transform: translateX(4px);
}

.quiz-option:disabled {
  cursor: default;
  opacity: 0.6;
}

.quiz-option.quiz-correct {
  background: #d7ecd3;
  border-color: #4a8f3c;
  color: #2b5c22;
  opacity: 1;
}

.quiz-option.quiz-incorrect {
  background: #f3d6d6;
  border-color: #b23b3b;
  color: #7a2424;
  opacity: 1;
}

.quiz-feedback {
  display: none;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px dashed var(--gold);
  text-align: center;
}

.quiz-feedback-show {
  display: block;
  animation: fadeInUp 0.35s ease both;
}

.quiz-feedback-verdict {
  font-size: 1.15em;
  font-weight: bold;
  color: var(--gold-bright);
  margin: 0 0 8px;
}

.quiz-feedback-explanation {
  font-size: 0.95em;
  line-height: 1.6;
  margin: 0 0 18px;
  color: var(--ink);
}

.quiz-result {
  text-align: center;
  background: linear-gradient(160deg, var(--parchment) 0%, var(--parchment-dark) 100%);
  border: 1px solid var(--gold);
  border-radius: 16px;
  padding: 40px 24px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.quiz-result-badge {
  font-size: 3em;
  line-height: 1;
  margin-bottom: 10px;
}

.quiz-result-score {
  font-size: 1.3em;
  font-weight: bold;
  color: var(--gold);
  margin: 0 0 6px;
}

.quiz-result-title {
  font-size: 1.6em;
  color: var(--gold-bright);
  margin: 0 0 14px;
  border-bottom: none;
}

.quiz-result-note {
  max-width: 440px;
  margin: 0 auto 26px;
  line-height: 1.6;
}

.quiz-result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

.quiz-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.quiz-category-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: linear-gradient(160deg, var(--parchment) 0%, var(--parchment-dark) 100%);
  border: 2px solid var(--gold);
  border-radius: 16px;
  padding: 32px 22px 24px;
  cursor: pointer;
  font-family: inherit;
  color: var(--ink);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  animation: fadeInUp 0.5s ease both;
}

.quiz-category-card:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.22);
  border-color: var(--gold-bright);
}

.quiz-category-icon {
  font-size: 2.4em;
  margin-bottom: 10px;
}

.quiz-category-card h3 {
  margin: 0 0 10px;
  color: var(--gold-bright);
  font-size: 1.2em;
  border-bottom: none;
}

.quiz-category-card p {
  margin: 0 0 16px;
  font-size: 0.88em;
  line-height: 1.5;
}

.quiz-category-count {
  display: inline-block;
  background: var(--navy);
  color: var(--gold-bright);
  font-size: 0.75em;
  font-weight: bold;
  padding: 5px 14px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}

.quiz-back-link {
  text-align: center;
  margin-top: 20px;
}

.quiz-back-link a {
  color: var(--gold-bright);
  font-weight: bold;
  font-size: 0.9em;
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
}

.quiz-back-link a:hover {
  color: var(--gold);
}

@media (max-width: 480px) {
  .quiz-question {
    padding: 20px 16px;
  }

  .quiz-result {
    padding: 30px 18px;
  }
}

/* ------------------- */
/* Reflection Journal */
/* ------------------- */
.journal-auth-error {
  min-height: 1.2em;
  color: #b23b3b;
  font-size: 0.85em;
  font-weight: bold;
  text-align: center;
  margin: 0;
}

.journal-user-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 16px 20px;
  max-width: 600px;
  margin: 0 auto 10px;
  background: rgba(201, 164, 76, 0.1);
  border: 1px solid var(--gold);
  border-radius: 12px;
  text-align: center;
}

.journal-user-bar p {
  margin: 0;
}

.journal-import-banner {
  max-width: 600px;
  margin: 0 auto 20px;
  padding: 20px 22px;
  background: rgba(201, 164, 76, 0.12);
  border: 1px dashed var(--gold);
  border-radius: 14px;
  text-align: center;
  animation: fadeInUp 0.4s ease both;
}

.journal-import-banner p {
  margin: 0 0 14px;
  line-height: 1.5;
}

.journal-write-section {
  text-align: center;
  animation: fadeInUp 0.4s ease both;
}

.journal-form {
  max-width: 600px;
  margin: 0 auto;
  background: var(--parchment);
  border: 1px solid var(--gold);
  border-radius: 14px;
  padding: 26px 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.journal-form input,
.journal-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--gold);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1em;
  color: var(--ink);
  box-sizing: border-box;
  resize: vertical;
}

.journal-form button {
  align-self: center;
  margin-top: 4px;
}

.journal-entries-section {
  text-align: center;
}

.journal-filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 20px 0 10px;
}

.journal-filter {
  background: var(--parchment);
  border: 1px solid var(--gold);
  border-radius: 20px;
  padding: 7px 16px;
  font-family: inherit;
  font-size: 0.85em;
  font-weight: bold;
  color: var(--gold-bright);
  cursor: pointer;
  margin-top: 0;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.journal-filter:hover,
.journal-filter.active {
  background: var(--gold);
  color: var(--navy);
}

.journal-empty {
  max-width: 500px;
  margin: 30px auto;
  text-align: center;
  opacity: 0.75;
  font-style: italic;
}

.journal-entries {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  max-width: 900px;
  margin: 20px auto 0;
  text-align: left;
}

.journal-entry {
  background: linear-gradient(160deg, var(--parchment) 0%, var(--parchment-dark) 100%);
  border: 1px solid var(--gold);
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
  animation: fadeInUp 0.4s ease both;
}

.journal-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.journal-entry-category {
  background: var(--navy);
  color: var(--gold-bright);
  font-size: 0.75em;
  font-weight: bold;
  padding: 4px 12px;
  border-radius: 14px;
}

.journal-entry-date {
  font-size: 0.8em;
  opacity: 0.7;
}

.journal-entry-author {
  margin: 0 0 8px;
  font-size: 0.8em;
  font-weight: bold;
  color: var(--gold-bright);
  opacity: 0.85;
}

.journal-entry-title {
  margin: 0 0 8px;
  color: var(--gold-bright);
  font-size: 1.1em;
}

.journal-entry-content {
  font-size: 0.92em;
  line-height: 1.6;
  margin: 0 0 14px;
  white-space: pre-wrap;
}

.journal-delete-btn {
  background: none;
  border: 1px solid #b23b3b;
  color: #7a2424;
  border-radius: 16px;
  padding: 5px 14px;
  font-family: inherit;
  font-size: 0.78em;
  font-weight: bold;
  cursor: pointer;
  margin-top: 0;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.journal-delete-btn:hover {
  background: #b23b3b;
  color: var(--ink);
}

/* ------------------- */
/* Related content links (rendered as a Netflix-style scrolling row) */
/* ------------------- */
.related-links {
  max-width: 900px;
  margin: 40px auto 0;
  padding: 24px 20px 10px;
  border-top: 1px solid var(--gold);
}

.related-links h3 {
  color: var(--gold);
  font-size: 1.2em;
  margin-bottom: 14px;
}

/* ------------------- */
/* Site tagline banner */
/* ------------------- */
.site-tagline {
  text-align: center;
  max-width: 1100px;
  margin: 30px auto 0;
  padding: 0 20px 18px;
  border-bottom: 1px solid var(--gold);
}

.site-tagline h2 {
  color: var(--gold);
  font-size: 1.4em;
  font-weight: bold;
  margin: 0;
  letter-spacing: 0.5px;
}

.tagline-star {
  display: inline-block;
  font-size: 0.75em;
  opacity: 0.8;
  margin: 0 8px;
  vertical-align: middle;
}

/* ------------------- */
/* Netflix-style browsing rows (homepage + related-content rows) */
/* ------------------- */
.nx-row {
  max-width: 1500px;
  margin: 0 auto;
  padding: 34px 20px 10px;
}

.nx-row-title {
  color: var(--gold);
  font-size: 1.3em;
  margin-bottom: 14px;
}

.nx-row-track,
.related-links ul {
  list-style: none;
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 4px 4px 14px;
  margin: 0;
  scroll-snap-type: x proximity;
}

.nx-row-track::-webkit-scrollbar,
.related-links ul::-webkit-scrollbar {
  height: 8px;
}

.nx-row-track::-webkit-scrollbar-thumb,
.related-links ul::-webkit-scrollbar-thumb {
  background: var(--gold);
  border-radius: 4px;
}

/* Wrap threshold: once a row grows past 8 cards, switch from a single
   scrolling line to a wrapping grid instead of scrolling forever.
   The homepage is exempt — its rows stay curated and always scroll. */
body:not(.home) .nx-row-track:has(> :nth-child(9)),
.related-links ul:has(> :nth-child(9)) {
  flex-wrap: wrap;
  overflow-x: visible;
  scroll-snap-type: none;
  padding-bottom: 4px;
}

body:not(.home) .nx-row-track:has(> :nth-child(9)) .nx-card,
.related-links ul:has(> :nth-child(9)) li a {
  scroll-snap-align: none;
}

.nx-card,
.related-links li a {
  position: relative;
  flex: 0 0 200px;
  height: 130px;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: flex-end;
  padding: 12px;
  box-sizing: border-box;
  scroll-snap-align: start;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  font-weight: bold;
  font-size: 0.95em;
  border-bottom: none;
}

.related-links li {
  list-style: none;
}

.nx-card:hover,
.related-links li a:hover {
  transform: scale(1.07) translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  z-index: 2;
  color: var(--ink);
}

.nx-card.nx-card-img {
  background-size: cover;
  background-position: center;
}

.nx-card.nx-card-img::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(5, 36, 34, 0.9) 0%, rgba(5, 36, 34, 0.1) 60%);
}

.nx-card span {
  position: relative;
  z-index: 1;
}

/* ------------------- */
/* Symbol badges (ancient-symbols.html and similar illustrated pages) */
/* ------------------- */
.symbol-row {
  display: flex;
  align-items: center;
  gap: 34px;
  margin-bottom: 8px;
}

.symbol-row.symbol-row-reverse {
  flex-direction: row-reverse;
}

.symbol-row .symbol-text {
  flex: 1;
  min-width: 0;
}

.symbol-badge-col {
  flex: 0 0 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.symbol-badge {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: var(--navy);
  border: 3px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.symbol-badge svg {
  width: 75%;
  height: 75%;
}

.symbol-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.symbol-credit {
  font-size: 0.7em;
  color: var(--gold-bright);
  opacity: 0.6;
  text-align: center;
  max-width: 150px;
  line-height: 1.3;
}

.symbol-credit a {
  color: inherit;
}

@media (max-width: 700px) {
  .symbol-row,
  .symbol-row.symbol-row-reverse {
    flex-direction: column;
    text-align: center;
  }
}

/* ------------------- */
/* Wisdom Timeline (interactive clickable timeline) */
/* ------------------- */
.timeline-scroll {
  overflow-x: auto;
  padding: 10px 4px 24px;
  margin: 0 auto;
  max-width: 1100px;
}

.timeline-scroll::-webkit-scrollbar {
  height: 8px;
}

.timeline-scroll::-webkit-scrollbar-thumb {
  background: var(--gold);
  border-radius: 4px;
}

.timeline-track {
  position: relative;
  height: 260px;
}

.timeline-line {
  position: absolute;
  top: 130px;
  left: 0;
  height: 3px;
  background: var(--gold);
}

.timeline-era-band {
  position: absolute;
  top: 0;
  height: 260px;
  border-right: 1px dashed rgba(201, 164, 76, 0.35);
}

.timeline-era-label {
  position: absolute;
  top: 6px;
  left: 10px;
  font-size: 0.72em;
  font-weight: bold;
  color: var(--gold-bright);
  opacity: 0.55;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.timeline-node {
  position: absolute;
  top: 130px;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  margin-left: -10px;
  border-radius: 50%;
  background: var(--navy);
  border: 3px solid var(--gold);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 2;
}

.timeline-node:hover {
  transform: scale(1.3);
}

.timeline-node.active {
  background: var(--gold);
  box-shadow: 0 0 0 5px rgba(201, 164, 76, 0.3);
  transform: scale(1.3);
}

.timeline-node-label {
  position: absolute;
  width: 110px;
  left: -45px;
  font-size: 0.78em;
  font-weight: bold;
  text-align: center;
  color: var(--gold-bright);
  line-height: 1.3;
  pointer-events: none;
}

.timeline-node-label .timeline-node-year {
  display: block;
  font-weight: normal;
  font-size: 0.85em;
  opacity: 0.7;
}

.timeline-node-label.above {
  top: -58px;
}

.timeline-node-label.below {
  top: 18px;
}

.timeline-detail {
  max-width: 900px;
  margin: 0 auto;
  background: linear-gradient(160deg, var(--parchment) 0%, var(--parchment-dark) 100%);
  border: 1px solid var(--gold);
  border-radius: 12px;
  padding: 24px 28px;
  display: flex;
  gap: 24px;
  align-items: center;
  transition: opacity 0.2s ease;
}

.timeline-detail-badge {
  flex: 0 0 90px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  border: 3px solid var(--gold);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.timeline-detail-text h3 {
  margin: 0 0 4px;
  color: var(--gold-bright);
}

.timeline-detail-text .timeline-detail-meta {
  font-size: 0.85em;
  color: var(--gold);
  font-weight: bold;
  margin-bottom: 8px;
}

.timeline-detail-text p {
  margin: 0 0 10px;
}

@media (max-width: 700px) {
  .timeline-detail {
    flex-direction: column;
    text-align: center;
  }
}

/* ------------------- */
/* Dark mode */
/* ------------------- */
body.dark-mode {
  --navy-deep: #7b90bd;
  --parchment: #23262d;
  --parchment-dark: #1a1c22;
  --ink: #e8e3d8;
  background-image: none !important;
}

body.dark-mode .highlight-box,
body.dark-mode .subtopic,
body.dark-mode .subtopic2 {
  background-color: #3a3620;
}

body.dark-mode .response,
body.dark-mode details[open] {
  background: #2a2c1f;
}

body.dark-mode .search-results a:hover {
  background: var(--parchment-dark);
  color: var(--gold-bright);
}

body.dark-mode .hero blockquote {
  background-color: rgba(20, 20, 25, 0.75);
  color: var(--ink);
}

/* The old homepage.html once needed its own hardcoded dark-mode overrides
   here, back when its component classes (.thinkers, .quote-day, .icons)
   used literal colors. They're variable-driven now (see .quote-day,
   .card, .icons img above), so they already follow whatever the site's
   current theme is without needing a separate dark-mode block. */

body.dark-mode .quote-day blockquote,
body.dark-mode .quote-day h2,
body.dark-mode .icons div,
body.dark-mode .on-this-day .otd-date,
body.dark-mode .otd-card p {
  color: #e8e3d8 !important;
}

/* ==========================================================================
   Modernization pass: UI-chrome sans-serif, constellation texture,
   the "mystic realm" accent, and alternating/scroll-reveal section rhythm.
   ========================================================================== */

/* Sans-serif for UI chrome — deliberate contrast with the serif reading
   voice used for body copy, headings, and quotes. */
nav#nav-links a,
.menu-toggle,
button,
input[type="text"],
select,
.hero-kicker,
.section-kicker,
.card-tag,
.nx-row-title,
.mood-btn {
  font-family: var(--font-sans);
}

/* Constellation texture — a low-opacity dot-and-line pattern shared by
   heroes and the flat home-page bands, tying Philosophy/Mystics/Cosmology/
   Esoteric History together under one visual motif. Gold is constant
   across light/dark mode, so one hardcoded-color asset works in both. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cg fill='none' stroke='%23e0e0e0' stroke-width='1'%3E%3Cline x1='18' y1='24' x2='96' y2='70'/%3E%3Cline x1='96' y1='70' x2='176' y2='34'/%3E%3Cline x1='96' y1='70' x2='70' y2='168'/%3E%3Cline x1='70' y1='168' x2='158' y2='190'/%3E%3Cline x1='158' y1='190' x2='202' y2='120'/%3E%3C/g%3E%3Cg fill='%23e0e0e0'%3E%3Ccircle cx='18' cy='24' r='2.4'/%3E%3Ccircle cx='96' cy='70' r='3'/%3E%3Ccircle cx='176' cy='34' r='2.2'/%3E%3Ccircle cx='70' cy='168' r='2.6'/%3E%3Ccircle cx='158' cy='190' r='2.2'/%3E%3Ccircle cx='202' cy='120' r='2'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 220px 220px;
  opacity: 0.4;
  mix-blend-mode: screen;
  pointer-events: none;
}

.quote-day,
.on-this-day,
.themes {
  position: relative;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cg fill='none' stroke='%23e0e0e0' stroke-width='1' opacity='0.28'%3E%3Cline x1='18' y1='24' x2='96' y2='70'/%3E%3Cline x1='96' y1='70' x2='176' y2='34'/%3E%3Cline x1='96' y1='70' x2='70' y2='168'/%3E%3Cline x1='70' y1='168' x2='158' y2='190'/%3E%3Cline x1='158' y1='190' x2='202' y2='120'/%3E%3C/g%3E%3Cg fill='%23e0e0e0' opacity='0.4'%3E%3Ccircle cx='18' cy='24' r='2.4'/%3E%3Ccircle cx='96' cy='70' r='3'/%3E%3Ccircle cx='176' cy='34' r='2.2'/%3E%3Ccircle cx='70' cy='168' r='2.6'/%3E%3Ccircle cx='158' cy='190' r='2.2'/%3E%3Ccircle cx='202' cy='120' r='2'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 220px 220px;
}

/* The "mystic realm" violet accent override (Mystics, Cosmology, science, and
   esoteric-history pages) has been removed so every page uses the same gold
   accent consistently. The body.realm-mystic class is still present in the
   HTML on those pages but no longer does anything. */

/* scripts.js still adds .nx-row-alt to every other row, but it no longer
   tints the background — every row now stays fully transparent so the
   page's cosmic starfield background shows through consistently. */
.nx-row-alt {
  background-color: transparent;
}

.reveal-on-scroll {
  opacity: 0;
}

.reveal-on-scroll.is-visible {
  animation: fadeInUp 0.7s ease both;
}

/* Anyone with reduced-motion set gets content immediately, no animation —
   scripts.js also skips the IntersectionObserver/timeout dance entirely
   when this is set, this is just a CSS-level guarantee on top of that. */
@media (prefers-reduced-motion: reduce) {
  .reveal-on-scroll,
  .reveal-on-scroll.is-visible {
    opacity: 1;
    animation: none !important;
  }
}

/* Homepage hero crossfade between rotating featured entries */
#heroKicker,
#heroTitle,
#heroSubtitle {
  transition: opacity 0.4s ease;
}

#heroKicker.hero-text-fade,
#heroTitle.hero-text-fade,
#heroSubtitle.hero-text-fade {
  opacity: 0;
}

/* Reading-progress bar — injected by scripts.js, present on every page */
#reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(to right, var(--gold), var(--gold-bright));
  z-index: 1100;
  transition: width 0.1s ease-out;
}

@media (prefers-reduced-motion: reduce) {
  #reading-progress-bar {
    transition: none;
  }
}

/* Topic-card image hover zoom — nx-card already scales the whole card on
   hover; topic-card's img is a small fixed icon that only had the card's
   lift, with no motion of its own. */
.topic-card img {
  transition: transform 0.4s ease;
}

.topic-card:hover img {
  transform: scale(1.12);
}

@media (prefers-reduced-motion: reduce) {
  .topic-card img {
    transition: none;
  }

  .topic-card:hover img {
    transform: none;
  }
}

/* Body-text link color — every other link on the site (nav, cards, buttons)
   has its own class-based color rule. That rule is a plain class selector
   with no :hover/:visited pseudo-class, so a bare `a:visited` here would
   actually OUT-specificity it once a link has been visited (a class +
   pseudo-class beats two plain type selectors like "nav a"), silently
   overriding e.g. the header nav to navy-on-navy. Wrapping everything in
   :where() pins this whole rule set to zero specificity so it can never
   win against a real component rule — it only ever reaches genuinely
   unstyled inline links (cross-references inside paragraph copy), which
   were previously falling through to the browser's raw default blue. */
:where(a) {
  color: var(--gold-bright);
  text-decoration-color: var(--gold);
  text-underline-offset: 2px;
  transition: color 0.3s ease;
}

:where(a:hover) {
  color: var(--gold);
}

:where(a:visited) {
  color: var(--navy-deep);
}

:where(body.dark-mode a) {
  color: var(--gold-bright);
  text-decoration-color: var(--gold);
}

:where(body.dark-mode a:hover) {
  color: var(--ink);
}

:where(body.dark-mode a:visited) {
  color: var(--gold);
}

/* ------------------- */
/* Ask the Philosopher widget */
/* ------------------- */
.ask-philosopher-widget {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--gold);
  border-radius: 10px;
  background: var(--parchment-dark);
}

.ask-philosopher-widget h3 {
  margin-top: 0;
  color: var(--navy-deep);
  font-family: var(--font-serif);
}

.ap-log {
  max-height: 320px;
  overflow-y: auto;
  margin-bottom: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ap-bubble {
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  font-family: var(--font-serif);
  line-height: 1.5;
  max-width: 90%;
  white-space: pre-wrap;
}

.ap-bubble.ap-user {
  align-self: flex-end;
  background: var(--gold);
  color: var(--navy);
}

.ap-bubble.ap-assistant {
  align-self: flex-start;
  background: var(--parchment);
  color: var(--ink);
  border: 1px solid var(--gold);
}

.ap-bubble.ap-error {
  border-color: #b33333;
  color: #b33333;
}

.ap-form {
  display: flex;
  gap: 0.5rem;
}

.ap-input {
  flex: 1;
  resize: vertical;
  font-family: var(--font-serif);
  font-size: 1rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--gold);
  background: var(--parchment);
  color: var(--ink);
}

.ap-submit {
  padding: 0 1.1rem;
  border: none;
  border-radius: 6px;
  background: var(--navy-deep);
  color: var(--navy);
  font-weight: 700;
  font-family: var(--font-sans);
  cursor: pointer;
  align-self: flex-end;
}

.ap-submit:disabled {
  opacity: 0.6;
  cursor: default;
}

/* ------------------- */
/* Recommended Reading widget */
/* ------------------- */
.book-recommendations {
  margin: 2rem 0;
}

.book-recommendations h3 {
  color: var(--navy-deep);
  font-family: var(--font-serif);
  margin-bottom: 1rem;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.book-card {
  padding: 1rem 1.1rem;
  border: 1px solid var(--gold);
  border-radius: 10px;
  background: var(--parchment-dark);
  display: flex;
  flex-direction: column;
}

.book-title {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 0.25rem;
}

.book-author {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--navy-deep);
  margin: 0 0 0.75rem;
}

.book-links {
  margin-top: auto;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.book-link {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  text-decoration: none;
  border: 1px solid var(--gold);
}

.book-link-amazon {
  background: var(--navy-deep);
  color: var(--navy);
  border-color: var(--navy-deep);
}

.book-link-ol {
  background: transparent;
  color: var(--navy-deep);
}

body.dark-mode .book-link-ol {
  color: var(--gold-bright);
}


/* ==========================================================================
   Header brand + page label
   The sticky header always shows the site name, linked home. Each page's own
   title sits just below the header as .page-label and scrolls away with the
   content, so the sticky bar stays one compact row on phones.
   ========================================================================== */
.brand-link {
  display: flex;
  align-items: center;
  gap: 15px;
  color: inherit;
  text-decoration: none;
}

.site-name {
  margin: 0;
  color: var(--gold-bright);
  font-family: var(--font-serif);
  font-size: 1.5em;
  font-weight: bold;
  line-height: 1.2;
  text-align: left;
}

.page-label {
  text-align: center;
  padding: 26px 20px 14px;
}

.page-label h1 {
  margin: 0 auto;
  max-width: 900px;
  font-family: var(--font-serif);
  font-size: 2em;
  line-height: 1.25;
  color: var(--gold-bright);
}

/* Private, browser-only notebooks (Debate Corner, Write Your Own Philosophy) */
.private-note {
  background: rgba(201, 164, 76, 0.12);
  border: 1px solid rgba(201, 164, 76, 0.45);
  border-radius: 10px;
  padding: 12px 16px;
  line-height: 1.5;
}

.empty-note {
  opacity: 0.75;
  font-style: italic;
}

.delete-btn {
  font-size: 0.85em;
  opacity: 0.8;
}

@media (max-width: 768px) {
  /* One-row sticky header: brand on the left, hamburger on the right. The
     collapsed nav wraps onto its own full-width line below. */
  header {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    text-align: left;
    padding: 10px 16px;
    gap: 0 12px;
  }

  .header-brand {
    width: auto;
    justify-content: flex-start;
  }

  .brand-link {
    gap: 10px;
  }

  header .logo img {
    height: 38px;
  }

  .site-name {
    font-size: 1.35em;
  }

  .page-label {
    padding: 20px 16px 10px;
  }

  .page-label h1 {
    font-size: 1.5em;
  }

  /* Heroes grow to fit their text instead of clipping it, with phone-sized
     side padding (desktop's 60px left only ~255px of text width). */
  .hero,
  div.hero,
  .hero.hero-feature {
    height: auto;
    min-height: 55vh;
    padding: 32px 22px;
  }

  .hero.hero-full {
    min-height: 100vh;
  }

  .hero .hero-overlay-quote {
    padding: 0 0 24px;
    font-size: 1.6em;
  }
}

/* ==========================================================================
   Start Here path (Start_Here.html + the bar/card on each stop page,
   all drawn by assets/js/start-here.js). Colours key off the theme
   variables so light/dark mode both work.
   ========================================================================== */
.sh-intro {
  font-size: 1.05em;
}

.sh-progress {
  margin: 10px 0 18px;
}

.sh-progress-label {
  margin: 0 0 8px;
  font-family: var(--font-sans);
  font-size: 0.8em;
  letter-spacing: 0.5px;
  opacity: 0.85;
}

.sh-progress-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(234, 251, 248, 0.15);
  overflow: hidden;
}

.sh-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--navy-deep);
  transition: width 0.4s ease;
}

.sh-begin {
  display: inline-block;
  margin: 6px 0 22px;
  padding: 10px 22px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--navy);
  font-family: var(--font-sans);
  font-weight: bold;
  font-size: 0.9em;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sh-begin:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.sh-stops {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: none;
}

.sh-stop {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 4px 14px;
  align-items: start;
  padding: 16px 0;
  border-bottom: 1px solid rgba(234, 251, 248, 0.12);
}

.sh-num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-weight: bold;
  font-size: 0.8em;
  margin-top: 4px;
}

.sh-stop.is-next .sh-num {
  background: var(--navy-deep);
  border-color: var(--navy-deep);
  color: var(--navy);
}

.sh-stop.is-done .sh-num {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy);
}

.sh-stop.is-done .sh-text h3,
.sh-stop.is-done .sh-text p {
  opacity: 0.65;
}

.sh-stop-link {
  display: flex;
  gap: 14px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}

.sh-stop-link:hover h3 {
  text-decoration: underline;
}

.sh-thumb {
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(234, 251, 248, 0.2);
}

.sh-text {
  min-width: 0;
}

.sh-text h3 {
  margin: 0 0 2px;
  font-size: 1.15em;
  line-height: 1.3;
}

.sh-text p {
  margin: 0 0 4px;
  font-size: 0.85em;
  line-height: 1.5;
}

.sh-theme,
.sh-meta {
  font-family: var(--font-sans);
  font-size: 0.68em;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.75;
}

.sh-meta {
  text-transform: none;
  letter-spacing: 0;
}

.sh-toggle {
  grid-column: 2;
  justify-self: start;
  width: auto;
  margin-top: 6px;
  padding: 4px 12px;
  font-size: 0.72em;
  background: transparent;
  color: var(--ink);
  border: 1px solid rgba(234, 251, 248, 0.35);
  border-radius: 999px;
  cursor: pointer;
}

.sh-reset {
  width: auto;
  margin-top: 18px;
  padding: 0;
  background: none;
  border: none;
  color: var(--ink);
  opacity: 0.7;
  font-size: 0.75em;
  text-decoration: underline;
  cursor: pointer;
}

.sh-after li {
  margin-bottom: 6px;
}

/* Stop pages: slim bar under the page title, and a next-step card at the end. */
.sh-bar {
  max-width: 900px;
  margin: 0 auto 6px;
  padding: 0 20px;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  font-family: var(--font-sans);
  font-size: 0.72em;
}

.sh-bar-where {
  color: var(--navy-deep);
  text-decoration: none;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: bold;
}

.sh-bar-hide {
  width: auto;
  padding: 2px 10px;
  font-size: 1em;
  background: transparent;
  color: var(--ink);
  border: 1px solid rgba(234, 251, 248, 0.3);
  border-radius: 999px;
  cursor: pointer;
}

.sh-next-card {
  width: auto; /* the generic section rule sets 100%, which plus side margins overflowed on phones */
  max-width: 860px;
  margin: 10px auto 30px;
  padding: 22px 24px;
  border: 1px solid var(--navy-deep);
  border-radius: 14px;
  background: rgba(5, 36, 34, 0.45);
}

.sh-next-card h3 {
  margin: 4px 0 6px;
}

.sh-next-card p {
  margin: 0 0 14px;
  font-size: 0.95em;
}

.sh-next-card .sh-begin {
  margin: 0 14px 0 0;
}

.sh-back {
  font-family: var(--font-sans);
  font-size: 0.8em;
  color: var(--ink);
  opacity: 0.8;
}

@media (max-width: 480px) {
  /* Override the site-wide full-width mobile buttons — these are small pills. */
  .sh-toggle,
  .sh-reset,
  .sh-bar-hide {
    width: auto;
  }

  .sh-thumb {
    flex-basis: 56px;
    width: 56px;
    height: 56px;
  }

  .sh-next-card {
    margin: 10px 16px 30px;
    padding: 18px;
  }

  .sh-next-card .sh-begin {
    display: block;
    text-align: center;
    margin: 0 0 12px;
  }
}

/* Homepage "New here?" band pointing at the Start Here path */
.start-here-band {
  text-align: center;
  padding: 30px 20px 10px;
}

.start-here-band h2 {
  border-bottom: none;
  margin: 0 0 8px;
}

.start-here-band p {
  max-width: 560px;
  margin: 0 auto 16px;
  font-size: 0.95em;
}

.start-here-band .sh-begin {
  margin-bottom: 0;
}

/* ==========================================================================
   Quote pages: sourced quotes with a one-line lesson, plus a box correcting
   lines that circulate under the thinker's name but aren't theirs.
   ========================================================================== */
.quote-source-note {
  font-size: 0.85em;
  opacity: 0.85;
  border-left: 3px solid var(--navy-deep);
  padding-left: 12px;
}

.quote-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.quote-item {
  padding: 14px 0 16px;
  border-bottom: 1px solid rgba(234, 251, 248, 0.12);
}

.quote-item blockquote {
  margin: 0 0 6px;
  font-size: 1.08em;
  line-height: 1.55;
}

.quote-item cite {
  display: block;
  padding-left: 16px;
  font-family: var(--font-sans);
  font-size: 0.72em;
  font-style: normal;
  letter-spacing: 0.3px;
  color: var(--navy-deep);
}

.quote-lesson {
  margin: 6px 0 0;
  padding-left: 16px;
  font-size: 0.88em;
  line-height: 1.55;
  opacity: 0.85;
}

.misattributed {
  margin: 30px 0 10px;
  padding: 4px 20px 12px;
  border: 1px dashed rgba(234, 251, 248, 0.4);
  border-radius: 12px;
  background: rgba(5, 36, 34, 0.35);
}

.misattributed h2 {
  font-size: 1.2em;
}

.misattributed p,
.misattributed li {
  font-size: 0.9em;
  line-height: 1.6;
}

.misattributed li {
  margin-bottom: 10px;
}

.mis-quote {
  display: block;
  font-style: italic;
  text-decoration: line-through;
  text-decoration-color: rgba(234, 251, 248, 0.45);
}

/* Footer links: Contact (mailto) and Share this page */
.footer-links a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-links a:hover {
  color: var(--gold-bright);
}

/* ==========================================================================
   Sign in (signin.html, plus the Google button on the Reflection Journal)
   ========================================================================== */
.signin-card {
  max-width: 440px;
  margin: 0 auto;
  text-align: center;
}

.signin-card[hidden],
.signin-loading[hidden] {
  display: none;
}

.signin-card h2 {
  border-bottom: none;
}

.signin-card p {
  font-size: 0.95em;
}

/* Google's guidelines: white button, full-colour G, dark grey text. */
.google-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: 320px;
  margin: 10px auto 0;
  padding: 11px 16px;
  background: #ffffff;
  color: #1f1f1f;
  border: 1px solid #747775;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 0.85em;
  font-weight: 600;
  cursor: pointer;
  transition: box-shadow 0.2s ease;
}

.google-btn:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.google-btn:disabled {
  opacity: 0.6;
  cursor: progress;
}

.google-g {
  display: inline-flex;
}

.signin-error,
.journal-auth-error:not(:empty) {
  min-height: 1em;
  color: #ffb4a8;
  font-size: 0.85em;
}

.signin-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 14px;
  font-family: var(--font-sans);
  font-size: 0.7em;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.7;
}

.signin-divider::before,
.signin-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(234, 251, 248, 0.25);
}

.signin-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}

.signin-tab {
  width: auto;
  padding: 6px 16px;
  background: transparent;
  color: var(--ink);
  border: 1px solid rgba(234, 251, 248, 0.3);
  border-radius: 999px;
  font-size: 0.75em;
  cursor: pointer;
}

.signin-tab.active {
  background: var(--navy-deep);
  border-color: var(--navy-deep);
  color: var(--navy);
}

.signin-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 320px;
  margin: 0 auto;
}

.signin-form input {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(234, 251, 248, 0.3);
  font-size: 0.85em;
}

.signin-privacy {
  margin-top: 22px;
  font-size: 0.75em !important;
  line-height: 1.6;
  opacity: 0.75;
}

.signin-avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--navy-deep);
}

.signin-email {
  margin-top: -8px;
  opacity: 0.8;
}

.signin-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.signin-signout {
  width: auto;
  padding: 6px 18px;
  background: transparent;
  color: var(--ink);
  border: 1px solid rgba(234, 251, 248, 0.35);
  border-radius: 999px;
  font-size: 0.8em;
  cursor: pointer;
}

.signin-loading {
  text-align: center;
  opacity: 0.7;
}

/* Header account icon (all pages), styled like the search/theme/music icons */
.account-link {
  font-size: 1.3em;
  line-height: 1;
  color: var(--gold);
  text-decoration: none;
}

.account-link:hover {
  color: var(--gold-bright);
}

@media (max-width: 480px) {
  .google-btn,
  .signin-form button {
    width: 100%;
  }
}

/* The hamburger is a real <button> (keyboard- and screen-reader-reachable);
   strip the site-wide button styling so it still looks like a bare icon. */
button.menu-toggle {
  width: auto;
  padding: 0 4px;
  background: none;
  border: none;
  box-shadow: none;
  line-height: 1;
  color: var(--gold);
}

button.menu-toggle:focus-visible {
  outline: 2px solid var(--navy-deep);
  outline-offset: 4px;
  border-radius: 6px;
}

/* ==========================================================================
   Top-level hubs (Thinkers, Traditions, History, Tools) and the restructured
   homepage (tools showcase + section doors).
   ========================================================================== */
.az-index {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2 300px;
  column-gap: 40px;
}

.az-index li {
  break-inside: avoid;
  padding: 7px 0;
  border-bottom: 1px solid rgba(234, 251, 248, 0.1);
  line-height: 1.4;
}

.az-index a {
  font-weight: bold;
  color: var(--ink);
}

.az-index span {
  display: block;
  font-size: 0.78em;
  opacity: 0.75;
}

.tool-group {
  padding-top: 16px;
  padding-bottom: 16px;
}

.tool-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}

.tool-list a {
  display: block;
  height: 100%;
  box-sizing: border-box;
  padding: 14px 16px;
  border: 1px solid rgba(234, 251, 248, 0.18);
  border-radius: 12px;
  background: rgba(5, 36, 34, 0.35);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.tool-list a:hover {
  border-color: var(--navy-deep);
  transform: translateY(-2px);
}

.tool-list strong {
  display: block;
  margin-bottom: 4px;
}

.tool-list span {
  display: block;
  font-size: 0.8em;
  line-height: 1.5;
  opacity: 0.85;
}

/* Homepage: "Think with us" tools showcase */
.home-section {
  text-align: center;
}

.home-section h2 {
  border-bottom: none;
  margin: 0 0 6px;
}

.home-section > p {
  max-width: 600px;
  margin: 0 auto 22px;
  font-size: 0.95em;
}

.home-tools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  text-align: left;
}

.home-tool {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px;
  border: 1px solid rgba(234, 251, 248, 0.18);
  border-radius: 14px;
  background: rgba(5, 36, 34, 0.35);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.home-tool:hover {
  border-color: var(--navy-deep);
  transform: translateY(-2px);
}

.home-tool svg {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  color: var(--navy-deep);
}

.home-tool h3 {
  margin: 0 0 4px;
  font-size: 1.05em;
}

.home-tool p {
  margin: 0;
  font-size: 0.82em;
  line-height: 1.5;
  opacity: 0.85;
}

.home-more {
  display: inline-block;
  margin-top: 18px;
  font-family: var(--font-sans);
  font-size: 0.85em;
  color: var(--navy-deep);
}

/* Homepage: six doors into the sections */
.home-doors {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.home-door {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 190px;
  padding: 18px;
  border-radius: 14px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  color: #fff;
  text-align: left;
  text-decoration: none;
  isolation: isolate;
  transition: transform 0.25s ease;
}

.home-door::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top, rgba(5, 36, 34, 0.95) 0%, rgba(5, 36, 34, 0.55) 55%, rgba(5, 36, 34, 0.15) 100%);
}

.home-door:hover {
  transform: translateY(-3px);
}

.home-door h3 {
  margin: 0 0 4px;
  font-size: 1.35em;
  color: #fff;
}

.home-door p {
  margin: 0;
  font-size: 0.82em;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.88);
}

/* Menu: mark the page you are on */
nav#nav-links a[aria-current="page"] {
  color: var(--gold-bright);
  text-decoration: underline;
  text-underline-offset: 6px;
}

/* Homepage tools: picture cards (illustration on top, title and one short line below) */
.home-tool {
  flex-direction: column;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.home-tool img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.home-tool:hover img {
  transform: scale(1.05);
}

.home-tool > div {
  padding: 14px 16px 16px;
}

/* A–Z indexes as picture grids (Thinkers, Traditions, History) */
.az-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}

.az-grid a {
  display: block;
  height: 100%;
  border: 1px solid rgba(234, 251, 248, 0.15);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(5, 36, 34, 0.35);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.az-grid a:hover {
  transform: translateY(-3px);
  border-color: var(--navy-deep);
}

.az-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* People: taller crop, aimed at the face */
.az-grid-people img {
  aspect-ratio: 1 / 1;
  object-position: center 20%;
}

.az-name {
  display: block;
  padding: 9px 10px 2px;
  font-weight: bold;
  font-size: 0.85em;
  line-height: 1.3;
}

.az-note {
  display: block;
  padding: 0 10px 10px;
  font-size: 0.68em;
  line-height: 1.4;
  opacity: 0.75;
}

@media (max-width: 480px) {
  .az-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

/* Tools hub: picture cards (illustration on top, title and one line below) */
.tool-list {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.tool-list a {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.tool-list img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.tool-list strong {
  margin: 12px 14px 4px;
}

.tool-list span {
  margin: 0 14px 14px;
}

@media (max-width: 480px) {
  .tool-list {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .tool-list strong {
    margin: 10px 10px 4px;
    font-size: 0.9em;
  }

  .tool-list span {
    margin: 0 10px 10px;
    font-size: 0.72em;
  }
}

/* Homepage "New here?" band: the seven Start Here stops as a trail of pictures */
.sh-trail {
  list-style: none;
  display: flex;
  justify-content: space-between;
  max-width: 760px;
  margin: 8px auto 26px;
  padding: 0;
  position: relative;
}

.sh-trail::before {
  content: "";
  position: absolute;
  left: 7%;
  right: 7%;
  top: 38px;
  border-top: 2px dashed rgba(243, 223, 166, 0.45);
}

.sh-trail li {
  flex: 1 1 0;
  min-width: 0;
  position: relative;
}

.sh-trail a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
}

.sh-trail-pic {
  position: relative;
  width: 76px;
  height: 76px;
}

.sh-trail-pic img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
  border: 2px solid var(--gold-bright);
  background: #0b2a27;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease;
}

.sh-trail a:hover .sh-trail-pic img {
  transform: scale(1.08);
}

.sh-trail-num {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #6fd8cc;
  color: #0a2420;
  font: bold 13px/24px sans-serif;
  text-align: center;
}

.sh-trail-name {
  font-size: 0.78em;
  line-height: 1.2;
  text-align: center;
}

@media (max-width: 600px) {
  .sh-trail {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 16px;
    margin-bottom: 20px;
  }

  .sh-trail::before {
    display: none;
  }

  .sh-trail li {
    flex: 0 0 25%;
  }

  .sh-trail-pic {
    width: 58px;
    height: 58px;
  }

  .sh-trail-num {
    width: 20px;
    height: 20px;
    font-size: 11px;
    line-height: 20px;
  }

  .sh-trail-name {
    font-size: 0.68em;
  }
}

/* Homepage tagline: emblem beside the words */
.site-tagline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.tagline-emblem {
  flex: none;
  width: 84px;
  height: 84px;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.35));
}

@media (max-width: 480px) {
  .site-tagline {
    gap: 12px;
    text-align: left;
  }

  .tagline-emblem {
    width: 56px;
    height: 56px;
  }

  .site-tagline .tagline-star {
    display: none;
  }
}

/* Darshanas: founding-sutra quote, back link, comparison table */
.darshana-back {
  font-size: 0.85em;
  margin: 0 0 6px;
}

blockquote.darshana-sutra {
  font-size: 1.15em;
  margin: 18px 0;
  padding: 10px 0 10px 16px;
}

blockquote.darshana-sutra cite {
  display: block;
  margin-top: 6px;
  font-size: 0.7em;
  font-style: normal;
  opacity: 0.75;
}

.darshana-table-wrap {
  overflow-x: auto;
  margin: 16px 0;
  border: 1px solid rgba(234, 251, 248, 0.18);
  border-radius: 12px;
}

.darshana-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  font-size: 0.82em;
  line-height: 1.45;
}

.darshana-table th,
.darshana-table td {
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(234, 251, 248, 0.12);
}

.darshana-table thead th {
  background: rgba(5, 36, 34, 0.55);
  color: var(--gold-bright);
  white-space: nowrap;
}

.darshana-table tbody th a {
  color: var(--gold-bright);
}

.darshana-table tbody tr:nth-child(6) th,
.darshana-table tbody tr:nth-child(6) td {
  border-bottom: 2px solid var(--gold);
}

.darshana-grid img {
  aspect-ratio: 16 / 9;
}

.az-grid.darshana-grid {
  grid-template-columns: repeat(3, 1fr);
}

.az-grid.darshana-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 760px) {
  .az-grid.darshana-grid,
  .az-grid.darshana-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Image credits page */
.credit-list {
  font-size: 0.82em;
  line-height: 1.55;
  padding-left: 18px;
}

.credit-list li {
  margin-bottom: 4px;
  overflow-wrap: anywhere;
}

/* Note under a portrait banner when the picture is an imagined likeness */
.hero-note {
  max-width: 900px;
  margin: 8px auto 0;
  padding: 0 20px;
  font-size: 0.72em;
  font-style: italic;
  text-align: center;
  opacity: 0.7;
}

/* Wide screens: the homepage quote sits at the exact centre of the hero.
   A script on index.html measures it against the title block: if they would
   touch, it nudges the quote right (--quote-nudge) by just enough, and only
   if there is no room beside the title does it add .quote-in-flow, which
   drops the quote back into the flow above the title. */
@media (min-width: 1100px) {
  .hero .hero-overlay-quote:not(.quote-in-flow) {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(calc(-50% + var(--quote-nudge, 0px)), -50%);
    width: max-content;
    max-width: 520px;
    margin: 0;
    padding: 0;
  }
}

/* Homepage banner: the featured name was 46px, bigger than the 42px
   "Know thyself" beside it, so the two competed. Phones keep the 1.3em
   rule from the 480px block. */
@media (min-width: 481px) {
  #featuredHero h2 {
    font-size: 1.3em;
  }

  #featuredHero .hero-kicker {
    font-size: 0.72em;
  }

  #featuredHero .hero-subtitle-text {
    font-size: 0.92em;
  }

  #featuredHero #heroCta {
    font-size: 0.78em;
    padding: 8px 18px;
    margin-top: 12px;
  }
}

/* ==========================================================================
   Motion: small, consistent animations across the site. Only opacity and
   transform are animated. Everything here is switched off for visitors
   who ask their device to reduce motion (block at the end).
   ========================================================================== */

/* 1. Banner entrance: the text in every page banner rises in on load. */
.hero > h2,
.hero > .hero-kicker,
.hero > .hero-subtitle-text,
.hero > div,
.hero > a {
  animation: fadeInUp 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero > .hero-kicker { animation-delay: 0.05s; }
.hero > h2 { animation-delay: 0.15s; }
.hero > .hero-subtitle-text { animation-delay: 0.3s; }
.hero > div,
.hero > a { animation-delay: 0.45s; }

/* "Know thyself" fades in out of a soft blur (no movement, so the
   centring script measures its final position). */
.hero .hero-overlay-quote {
  animation: quoteIn 1.4s ease 0.4s both;
}

@keyframes quoteIn {
  from { opacity: 0; filter: blur(6px); }
  to { opacity: 1; filter: blur(0); }
}

/* 2. Scroll reveal: scripts.js adds .rv to cards, tiles, pictures and boxes
   that start below the first screen, then .rv-in when they scroll into view.
   --rv-i staggers siblings. The classes are removed once the reveal ends,
   so each element's own hover transitions work normally afterwards. */
.rv {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s ease, transform 0.65s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: calc(var(--rv-i, 0) * 70ms);
}

.rv.rv-in {
  opacity: 1;
  transform: none;
}

/* 3. Hover: pictures in cards zoom slightly; arrow links nudge forward. */
.home-tool,
.home-door,
.az-grid a,
.tool-list a {
  overflow: hidden;
}

.home-tool img,
.az-grid img,
.tool-list img {
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.home-tool:hover img,
.az-grid a:hover img,
.tool-list a:hover img {
  transform: scale(1.06);
}

.home-door {
  transition: transform 0.25s ease, box-shadow 0.25s ease, background-size 0.6s ease;
}

.sh-begin,
.home-more,
.quotes-link,
#heroCta {
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.sh-begin:hover,
.home-more:hover,
.quotes-link:hover,
#heroCta:hover {
  transform: translateX(4px);
}

/* 4. Start Here trail: the dashed path draws across, then the stops pop in. */
.sh-trail::before {
  transform-origin: left center;
  animation: trailDraw 1.2s ease 0.2s both;
}

.sh-trail li {
  animation: stopPop 0.5s cubic-bezier(0.3, 1.4, 0.5, 1) both;
}

.sh-trail li:nth-child(1) { animation-delay: 0.3s; }
.sh-trail li:nth-child(2) { animation-delay: 0.42s; }
.sh-trail li:nth-child(3) { animation-delay: 0.54s; }
.sh-trail li:nth-child(4) { animation-delay: 0.66s; }
.sh-trail li:nth-child(5) { animation-delay: 0.78s; }
.sh-trail li:nth-child(6) { animation-delay: 0.9s; }
.sh-trail li:nth-child(7) { animation-delay: 1.02s; }

@keyframes trailDraw {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes stopPop {
  from { opacity: 0; transform: scale(0.6); }
  to { opacity: 1; transform: none; }
}

/* The tagline emblem breathes very gently. */
.tagline-emblem {
  animation: emblemGlow 5s ease-in-out infinite;
}

@keyframes emblemGlow {
  0%, 100% { filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.35)); }
  50% { filter: drop-shadow(0 0 16px rgba(243, 213, 138, 0.45)); }
}

@media (prefers-reduced-motion: reduce) {
  .hero > h2,
  .hero > .hero-kicker,
  .hero > .hero-subtitle-text,
  .hero > div,
  .hero > a,
  .hero .hero-overlay-quote,
  .sh-trail::before,
  .sh-trail li,
  .tagline-emblem {
    animation: none;
  }

  .rv {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .home-tool:hover img,
  .az-grid a:hover img,
  .tool-list a:hover img,
  .sh-begin:hover,
  .home-more:hover,
  .quotes-link:hover,
  #heroCta:hover {
    transform: none;
  }
}

/* ==========================================================================
   Today (Daily.html) and the homepage Today band
   ========================================================================== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.today-band {
  text-align: center;
  max-width: 760px;
  margin: 26px auto 0;
  padding: 26px 22px 22px;
  border: 1px solid rgba(243, 213, 138, 0.35);
  border-radius: 16px;
  background: radial-gradient(ellipse at 50% 0%, rgba(243, 213, 138, 0.12), transparent 70%), rgba(5, 36, 34, 0.35);
}

.today-quote {
  margin: 6px auto 10px;
  max-width: 620px;
  padding: 0;
  border: none;
  font-size: 1.35em;
  font-style: normal;
  font-weight: 600;
  color: var(--gold-bright);
}

.today-quote cite {
  display: block;
  margin-top: 6px;
  font-size: 0.62em;
  font-style: normal;
  font-weight: 400;
  color: var(--ink);
  opacity: 0.85;
}

.today-question {
  max-width: 560px;
  margin: 0 auto 16px;
  font-style: italic;
}

.today-status {
  min-height: 1.2em;
  margin: 10px 0 0;
  font-size: 0.82em;
  color: #6fd8cc;
}

.daily {
  max-width: 760px;
  margin: 0 auto;
}

.daily-date {
  text-align: center;
  margin: 0 0 12px;
  font-size: 0.9em;
  letter-spacing: 1px;
  opacity: 0.8;
}

.daily-card {
  text-align: center;
  padding: 30px 26px 26px;
  border: 1px solid rgba(243, 213, 138, 0.45);
  border-radius: 18px;
  background: radial-gradient(ellipse at 50% 0%, rgba(243, 213, 138, 0.14), transparent 65%), rgba(5, 36, 34, 0.45);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.daily-quote {
  margin: 10px auto 8px;
  padding: 0;
  border: none;
  font-size: 1.6em;
  font-style: normal;
  font-weight: 600;
  line-height: 1.3;
  color: var(--gold-bright);
}

.daily-cite {
  margin: 0 0 14px;
  font-size: 0.85em;
}

.daily-cite a {
  color: var(--gold-bright);
}

.daily-lesson {
  margin: 0 auto 6px;
  max-width: 560px;
  font-style: italic;
  opacity: 0.9;
}

.daily-block {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(243, 213, 138, 0.25);
}

.daily-question {
  font-size: 1.15em;
  margin: 4px 0 12px;
}

.daily-practice {
  margin: 4px 0 12px;
}

.daily-card textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(243, 213, 138, 0.35);
  background: rgba(0, 0, 0, 0.2);
  color: var(--ink);
  font: inherit;
  font-size: 0.95em;
  resize: vertical;
}

.daily-saved {
  display: block;
  min-height: 1.1em;
  margin-top: 4px;
  font-size: 0.75em;
  color: #6fd8cc;
}

.daily-secondary {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--gold-bright);
  font: 600 0.9em var(--font-sans);
  cursor: pointer;
}

.daily-secondary:hover {
  background: rgba(243, 213, 138, 0.12);
}

.daily-done {
  margin-top: 24px;
  padding: 13px 26px;
  border: none;
  border-radius: 999px;
  background: #6fd8cc;
  color: #06201d;
  font: 700 1em var(--font-sans);
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.daily-done:hover {
  transform: translateY(-2px);
}

.daily-done.is-done {
  background: var(--gold-bright);
}

.daily-streak {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 14px 30px;
  margin: 22px 0;
}

.daily-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.8em;
}

.daily-num {
  font-family: var(--font-serif);
  font-size: 2.2em;
  font-weight: 700;
  line-height: 1;
  color: var(--gold-bright);
}

.daily-week {
  display: flex;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.daily-week li {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(243, 213, 138, 0.45);
  font-size: 0.7em;
  line-height: 26px;
  text-align: center;
}

.daily-week li.on {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
  color: #06201d;
  font-weight: 700;
}

.daily-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.daily-action {
  padding: 18px;
  border: 1px solid rgba(234, 251, 248, 0.18);
  border-radius: 14px;
  background: rgba(5, 36, 34, 0.35);
}

.daily-action h2 {
  margin: 0 0 6px;
  font-size: 1.1em;
  border-bottom: none;
}

.daily-action p {
  font-size: 0.85em;
  margin: 0 0 12px;
}

.daily-time {
  display: block;
  margin-bottom: 10px;
  font-size: 0.85em;
}

.daily-time input {
  margin-left: 6px;
  padding: 4px 6px;
  border-radius: 6px;
  border: 1px solid rgba(243, 213, 138, 0.4);
  background: rgba(0, 0, 0, 0.2);
  color: var(--ink);
  font: inherit;
}

.daily-note {
  margin: 10px 0 0 !important;
  color: #6fd8cc;
}

.daily-privacy {
  margin: 18px 0 0;
  font-size: 0.75em;
  text-align: center;
  opacity: 0.7;
}

.share-result {
  margin-top: 14px;
}

@media (max-width: 600px) {
  .daily-actions {
    grid-template-columns: 1fr;
  }

  .daily-quote {
    font-size: 1.3em;
  }

  .today-quote {
    font-size: 1.15em;
  }
}


/* Today page pictures */
.daily-portrait {
  display: inline-block;
  margin: -70px auto 10px;
}

.daily-portrait img {
  display: block;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
  border: 3px solid var(--gold-bright);
  background: #0b2a27;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease;
}

.daily-portrait:hover img {
  transform: scale(1.05);
}

.daily-card {
  margin-top: 70px;
}

.daily-practice-img {
  display: block;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  margin: 0 auto 14px;
  border-radius: 12px;
  border: 1px solid rgba(243, 213, 138, 0.3);
}

.daily-action-img {
  display: block;
  width: calc(100% + 36px);
  margin: -18px -18px 14px;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  border-radius: 14px 14px 0 0;
}

.daily-action {
  overflow: hidden;
}

/* Desktop menu links: smaller than body text so the header reads as
   navigation rather than headlines. The phone menu keeps its larger size. */
@media (min-width: 1220px) {
  nav#nav-links > a {
    font-size: 0.82em;
    margin: 0 6px;
  }
}

/* Picture at the top of tool and plain pages (straight after the title) */
.page-art {
  max-width: 640px;
  margin: 6px auto 4px;
  padding: 0 16px;
  text-align: center;
}

.page-art img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(243, 213, 138, 0.3);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.page-art .visual-credit {
  display: block;
  margin-top: 6px;
  font-size: 0.7em;
  color: var(--gold-bright);
  opacity: 0.6;
}


/* Gold accents on turquoise: primary buttons and the bright-aqua highlights
   follow the gold instead of white/aqua. */
#featuredHero #heroCta,
.daily-done {
  background-color: var(--gold);
  color: var(--navy);
}

.daily-done.is-done,
.sh-trail-num,
.daily-week li.on {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
}

.today-status,
.daily-saved,
.daily-note {
  color: var(--gold-bright);
}


/* Quote Explorer */
.qe {
  max-width: 900px;
  margin: 0 auto;
}

.qe-intro {
  text-align: center;
  font-size: 0.9em;
  opacity: 0.85;
}

.qe-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 16px 0 12px;
}

.qe-controls input,
.qe-controls select {
  flex: 1 1 220px;
  min-width: 0;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(243, 213, 138, 0.4);
  background: rgba(0, 0, 0, 0.2);
  color: var(--ink);
  font: inherit;
  font-size: 0.9em;
}

.qe-controls select option {
  color: #111;
}

.qe-themes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.qe-theme {
  margin: 0;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(243, 213, 138, 0.35);
  background: transparent;
  color: var(--ink);
  font: 600 0.8em var(--font-sans);
  text-transform: capitalize;
  box-shadow: none;
}

.qe-theme span {
  opacity: 0.6;
  font-weight: 400;
}

.qe-theme[aria-pressed="true"] {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy);
}

.qe-theme:hover {
  transform: none;
}

.qe-count {
  text-align: center;
  font-size: 0.8em;
  opacity: 0.75;
  margin: 14px 0 6px;
}

.qe-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.qe-card {
  display: flex;
  flex-direction: column;
  padding: 18px 18px 12px;
  border: 1px solid rgba(243, 213, 138, 0.3);
  border-radius: 14px;
  background: rgba(5, 36, 34, 0.4);
}

.qe-card blockquote {
  margin: 0 0 10px;
  padding: 0;
  border: none;
  font-size: 1.05em;
  font-style: normal;
  font-weight: 600;
  color: var(--gold-bright);
}

.qe-by {
  margin: 0 0 6px;
  font-size: 0.8em;
}

.qe-by a {
  color: var(--gold);
}

.qe-lesson {
  margin: 0 0 8px;
  font-size: 0.82em;
  font-style: italic;
  opacity: 0.85;
}

.qe-actions {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(243, 213, 138, 0.15);
}

.qe-tags {
  font-size: 0.68em;
  opacity: 0.6;
  text-transform: capitalize;
}

.qe-share {
  margin: 0;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(243, 213, 138, 0.4);
  background: transparent;
  color: var(--gold-bright);
  font: 600 0.72em var(--font-sans);
  box-shadow: none;
  white-space: nowrap;
}

.qe-more {
  display: block;
  margin: 18px auto 0;
}


/* Maps: intro line, popups and legend */
.map-intro {
  max-width: 760px;
  margin: 0 auto 12px;
  padding: 0 16px;
  text-align: center;
  font-size: 0.9em;
  opacity: 0.85;
}

.map-pop {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-family: var(--font-serif);
  color: #1d2b29;
}

.map-pop img {
  width: 64px;
  height: 64px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
}

.map-pop strong {
  display: block;
  font-size: 1.1em;
  color: #0f4d47; /* the site-wide gold for <strong> is unreadable on the white popup */
}

.map-pop-meta,
.map-pop-place {
  display: block;
  font-size: 0.82em;
  opacity: 0.75;
}

.map-pop p {
  margin: 6px 0;
  font-size: 0.9em;
  line-height: 1.4;
}

.map-pop a {
  color: #0f4d47;
  font-weight: 700;
}

.map-legend {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(5, 36, 34, 0.85);
  color: #f1ece0;
  font: 12px/1.3 var(--font-sans);
}

.map-legend i {
  display: inline-block;
  width: 11px;
  height: 11px;
  margin-right: 6px;
  border-radius: 50%;
  vertical-align: -1px;
}


/* 404 page */
.notfound {
  text-align: center;
}

.notfound-emblem {
  display: block;
  margin: 0 auto 12px;
}

.notfound-lead {
  font-size: 1.3em;
  color: var(--gold-bright);
}

.notfound-quote {
  max-width: 520px;
  margin: 18px auto;
  font-style: italic;
}

.notfound-quote cite {
  display: block;
  margin-top: 6px;
  font-size: 0.8em;
  font-style: normal;
  opacity: 0.75;
}

.notfound-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.notfound-links a {
  padding: 7px 16px;
  border: 1px solid var(--gold);
  border-radius: 20px;
  text-decoration: none;
}


/* Contradiction Engine: Thinkers / Schools / Mystics tabs */
.ce-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 18px 0 6px;
  flex-wrap: wrap;
}

.ce-tabs button {
  padding: 8px 18px;
  border: 1px solid var(--gold);
  border-radius: 20px;
  background: transparent;
  color: var(--gold-bright);
  font-family: var(--font-sans);
  font-size: 0.95em;
  cursor: pointer;
}

.ce-tabs button.active {
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
}

.ce-intro {
  max-width: 640px;
  margin: 10px auto 0;
  opacity: 0.9;
}


/* ==========================================================================
   Tool pages: Socratic Dialogue, Ask the Council, Moral Dilemmas
   ========================================================================== */
.tool-hero {
  text-align: center;
}

.tool-hero-img {
  display: block;
  width: 100%;
  max-width: 520px;
  height: auto;
  margin: 0 auto 14px;
  border-radius: 12px;
}

.tool-hero p {
  max-width: 680px;
  margin: 0 auto;
}

.ai-note {
  margin: 18px 0 0;
  font-size: 0.82em;
  opacity: 0.75;
  text-align: center;
}

.so-label {
  display: block;
  margin: 0 0 8px;
  font-weight: 700;
  color: var(--gold-bright);
}

.so-starters,
.co-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.so-starters button,
.co-examples button {
  padding: 7px 14px;
  border: 1px solid var(--gold);
  border-radius: 20px;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.95em;
  cursor: pointer;
}

.so-starters button:hover,
.co-examples button:hover {
  background: rgba(226, 196, 126, 0.15);
}

.so-chat {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
}

.so-msg {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 14px;
  line-height: 1.5;
}

.so-msg p {
  margin: 0 0 8px;
}

.so-msg p:last-child {
  margin-bottom: 0;
}

.so-user {
  align-self: flex-end;
  background: rgba(111, 216, 204, 0.16);
  border: 1px solid rgba(111, 216, 204, 0.4);
}

.so-assistant {
  align-self: flex-start;
  background: rgba(3, 25, 22, 0.55);
  border: 1px solid rgba(226, 196, 126, 0.45);
}

.so-who {
  display: block;
  margin-bottom: 4px;
  font-size: 0.8em;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--gold);
  text-transform: uppercase;
}

.so-thinking p {
  opacity: 0.7;
  font-style: italic;
}

.so-error,
.so-error p {
  color: #ffb4a8;
}

.so-form textarea,
.council textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid var(--gold);
  border-radius: 8px;
  background: rgba(3, 25, 22, 0.45);
  color: var(--ink);
  font: inherit;
  resize: vertical;
}

.so-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

.so-actions .ap-submit {
  align-self: auto;
  padding: 9px 20px;
}

.so-count {
  margin-right: auto;
  font-size: 0.85em;
  opacity: 0.75;
}

/* Council */
.co-pick-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
}

.co-pick-head #coPicked {
  font-weight: 400;
  opacity: 0.75;
}

.co-thinkers {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.co-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 5px 5px;
  border: 1px solid rgba(226, 196, 126, 0.4);
  border-radius: 30px;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.9em;
  text-align: left;
  cursor: pointer;
}

.co-chip img {
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
}

.co-chip.on {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
}

.co-chip:disabled {
  opacity: 0.62;
  cursor: default;
}

.co-asked {
  margin: 26px 0 12px;
  font-size: 1.2em;
  font-style: italic;
  text-align: center;
  color: var(--gold-bright);
}

.co-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.co-card {
  padding: 16px;
  border: 1px solid rgba(226, 196, 126, 0.45);
  border-radius: 12px;
  background: rgba(3, 25, 22, 0.5);
}

.co-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.co-card-head img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
}

.co-card h3 {
  margin: 0;
  font-size: 1.1em;
  color: var(--gold-bright);
}

.co-card p {
  margin: 0 0 8px;
  line-height: 1.55;
}

.co-failed p {
  opacity: 0.7;
  font-style: italic;
}

.co-more {
  font-size: 0.88em;
}

/* Dilemmas */
.dl-summary {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  border: 1px solid var(--gold);
  border-radius: 12px;
  background: rgba(3, 25, 22, 0.45);
}

.dl-summary h2 {
  margin-top: 0;
}

.dl-progress,
.dl-far {
  font-size: 0.9em;
  opacity: 0.8;
}

.dl-top li {
  margin-bottom: 4px;
}

.dl-card {
  margin: 0 0 22px;
  padding: 18px;
  border: 1px solid rgba(226, 196, 126, 0.4);
  border-radius: 12px;
  background: rgba(3, 25, 22, 0.35);
}

.dl-num {
  font-size: 0.78em;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--navy-deep);
}

.dl-card h3 {
  margin: 4px 0 2px;
  color: var(--gold-bright);
}

.dl-origin {
  margin: 0 0 10px;
  font-size: 0.85em;
  font-style: italic;
  opacity: 0.75;
}

.dl-scenario {
  font-size: 1.05em;
  line-height: 1.55;
}

.dl-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.dl-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--gold);
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.dl-option:hover {
  background: rgba(226, 196, 126, 0.12);
}

.dl-option.chosen {
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
}

.dl-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex: none;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 0.85em;
}

.dl-views {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.dl-view {
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(3, 25, 22, 0.5);
  animation: dl-in 0.35s ease both;
}

.dl-view p {
  margin: 6px 0 0;
  line-height: 1.5;
}

.dl-view-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.dl-badge {
  padding: 2px 9px;
  border-radius: 12px;
  font-family: var(--font-sans);
  font-size: 0.72em;
  font-weight: 700;
}

.dl-agree {
  background: var(--navy-deep);
  color: var(--navy);
}

.dl-disagree {
  background: #e0795a;
  color: #1a0d08;
}

.dl-mixed {
  background: var(--gold);
  color: var(--navy);
}

.dl-source {
  font-size: 0.82em;
  opacity: 0.8;
}

@keyframes dl-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .dl-view { animation: none; }
}


/* ==========================================================================
   Journeys (Journey.html)
   ========================================================================== */
.jr-moods,
.jr-all {
  text-align: center;
}

.jr-mood-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.jr-mood {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid var(--gold);
  border-radius: 24px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.jr-mood:hover {
  background: rgba(226, 196, 126, 0.15);
}

.jr-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
  text-align: left;
}

.jr-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(226, 196, 126, 0.45);
  border-radius: 12px;
  background: rgba(3, 25, 22, 0.45);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.jr-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
}

.jr-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  object-position: center 25%;
}

.jr-card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px 14px;
}

.jr-card-body strong {
  font-size: 1.1em;
  color: var(--gold-bright);
}

.jr-card-tag {
  opacity: 0.85;
}

.jr-card-status {
  margin-top: 4px;
  font-family: var(--font-sans);
  font-size: 0.8em;
  font-weight: 700;
  color: var(--navy-deep);
}

.jr-bar {
  height: 5px;
  overflow: hidden;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.12);
}

.jr-bar span {
  display: block;
  height: 100%;
  background: var(--gold);
}

.jr-council {
  margin-top: 18px;
}

.jr-active {
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
  border: 1px solid var(--gold);
  border-radius: 14px;
  background: rgba(3, 25, 22, 0.5);
  scroll-margin-top: 90px;
}

.jr-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding-right: 34px;
}

.jr-head img {
  width: 96px;
  height: 96px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 25%;
  border: 2px solid var(--gold);
}

.jr-head h2 {
  margin: 0 0 4px;
}

.jr-head p {
  margin: 0;
}

.jr-close {
  position: absolute;
  top: -6px;
  right: -4px;
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  color: var(--gold-bright);
  font-size: 1.6em;
  line-height: 1;
  cursor: pointer;
}

.jr-note {
  margin: 14px 0 0;
  padding: 10px 14px;
  border-left: 3px solid var(--navy-deep);
  font-size: 0.92em;
  background: rgba(111, 216, 204, 0.08);
}

.jr-days {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.jr-day {
  width: 38px;
  height: 38px;
  flex: none;
  padding: 0;
  border: 1px solid var(--gold);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 700;
  cursor: pointer;
}

.jr-day.done {
  background: rgba(226, 196, 126, 0.3);
}

.jr-day.current {
  background: var(--gold);
  color: var(--navy);
  box-shadow: 0 0 0 3px rgba(226, 196, 126, 0.3);
}

.jr-daynum {
  font-family: var(--font-sans);
  font-size: 0.78em;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--navy-deep);
}

.jr-panel h3 {
  margin: 4px 0 14px;
  font-size: 1.5em;
  color: var(--gold-bright);
}

.jr-step {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-sans);
  font-size: 0.75em;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gold);
}

.jr-read {
  display: block;
  padding: 12px 14px;
  border: 1px solid rgba(226, 196, 126, 0.45);
  border-radius: 10px;
  text-decoration: none;
  font-size: 1.1em;
}

.jr-read:hover {
  background: rgba(226, 196, 126, 0.1);
}

.jr-quote {
  margin: 18px 0;
  padding: 4px 0 4px 18px;
  border-left: 3px solid var(--gold);
}

.jr-quote p {
  margin: 0 0 6px;
  font-size: 1.2em;
  font-style: italic;
  line-height: 1.5;
}

.jr-quote cite {
  font-size: 0.85em;
  font-style: normal;
  opacity: 0.8;
}

.jr-block {
  margin-bottom: 16px;
}

.jr-block p {
  margin: 0;
  line-height: 1.55;
}

.jr-question {
  font-weight: 700;
}

.jr-notes {
  width: 100%;
  box-sizing: border-box;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(226, 196, 126, 0.6);
  border-radius: 8px;
  background: rgba(3, 25, 22, 0.45);
  color: var(--ink);
  font: inherit;
  resize: vertical;
}

.jr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.jr-actions .ap-submit {
  align-self: auto;
  padding: 10px 20px;
}

.jr-pace,
.jr-finish {
  margin: 14px 0 0;
  font-size: 0.92em;
}

.jr-finish strong {
  color: var(--gold-bright);
}

@media (max-width: 520px) {
  .jr-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .jr-head img {
    width: 72px;
    height: 72px;
  }
}

/* Square icon art (virtue-*.svg) is shown whole rather than cropped. */
.jr-card img[src*="virtue-"] {
  box-sizing: border-box;
  padding: 12px;
  object-fit: contain;
  background: rgba(3, 25, 22, 0.6);
}

/* Stories: where each story comes from */
.story-note {
  max-width: 640px;
  margin: 18px auto 0;
  font-size: 0.9em;
  text-align: center;
  opacity: 0.8;
}

.story-source {
  font-size: 0.88em;
  opacity: 0.85;
}

/* Deep Meditations: at-a-glance summary for each practice */
.med-glance {
  padding: 12px 16px 12px 32px;
  border-left: 3px solid var(--gold);
  border-radius: 6px;
  background: rgba(3, 25, 22, 0.35);
}

.med-glance li {
  margin-bottom: 4px;
}

/* Today: the "right now" step for practices carried through the day */
.daily-practice-plan {
  max-width: 520px;
  margin: 10px auto 0;
  padding: 10px 14px;
  border-left: 3px solid var(--navy-deep);
  border-radius: 6px;
  background: rgba(111, 216, 204, 0.08);
  font-size: 0.95em;
  text-align: left;
}


/* ==========================================================================
   Darshniks Daily: Who Said It? and the Dilemma of the Day
   ========================================================================== */
.daily-no {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.85em;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-align: center;
  color: var(--gold);
}

.ws-card h2,
.dl-daily > h2 {
  margin: 4px 0 6px;
  text-align: center;
}

.ws-intro {
  max-width: 560px;
  margin: 0 auto 14px;
  text-align: center;
  opacity: 0.9;
}

.ws-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 6px;
}

.ws-dot {
  width: 12px;
  height: 12px;
  border: 1px solid var(--gold);
  border-radius: 50%;
}

.ws-dot.current {
  background: var(--gold);
}

.ws-dot.right {
  border-color: #5fc98a;
  background: #5fc98a;
}

.ws-dot.wrong {
  border-color: #e0795a;
  background: #e0795a;
}

.ws-count {
  margin: 0;
  font-size: 0.85em;
  text-align: center;
  opacity: 0.75;
}

.ws-quote {
  margin: 14px auto 18px;
  max-width: 600px;
  font-size: 1.35em;
  font-style: italic;
  line-height: 1.45;
  text-align: center;
  color: var(--gold-bright);
}

.ws-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
  max-width: 620px;
  margin: 0 auto;
}

.ws-option {
  padding: 11px 14px;
  border: 1px solid var(--gold);
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.ws-option:hover:not(:disabled) {
  background: rgba(226, 196, 126, 0.14);
}

.ws-option.ws-fake {
  grid-column: 1 / -1;
  border-style: dashed;
  border-color: var(--navy-deep);
  color: var(--navy-deep);
}

.ws-option.correct {
  border-color: #5fc98a;
  border-style: solid;
  background: #5fc98a;
  color: #08231a;
  font-weight: 700;
}

.ws-option.chosen-wrong {
  border-color: #e0795a;
  border-style: solid;
  background: #e0795a;
  color: #1a0d08;
}

.ws-option:disabled {
  cursor: default;
}

.ws-after {
  max-width: 620px;
  margin: 12px auto 0;
  text-align: center;
}

.ws-verdict {
  margin: 6px 0;
  font-size: 1.15em;
  font-weight: 700;
}

.ws-right {
  color: #7fe0a6;
}

.ws-wrong {
  color: #ffb4a8;
}

.ws-source {
  margin: 0 0 12px;
  font-size: 0.92em;
  opacity: 0.9;
}

.ws-next {
  padding: 10px 22px;
}

.ws-score {
  margin: 4px 0 0;
  font-size: 3em;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  color: var(--gold-bright);
}

.ws-title {
  margin: 4px 0;
  text-align: center;
  font-style: italic;
}

.ws-squares {
  margin: 6px 0 14px;
  font-size: 1.6em;
  letter-spacing: 4px;
  text-align: center;
}

.ws-review {
  max-width: 620px;
  margin: 0 auto;
  padding-left: 20px;
}

.ws-review li {
  margin-bottom: 10px;
}

.ws-review li::marker {
  color: #5fc98a;
}

.ws-review li.wrong::marker {
  color: #e0795a;
}

.ws-review-q {
  display: block;
  font-style: italic;
}

.ws-review-a {
  display: block;
  font-size: 0.85em;
  opacity: 0.8;
}

.ws-next-day {
  margin: 14px 0 0;
  font-size: 0.9em;
  text-align: center;
  opacity: 0.8;
}

.dl-daily .dl-option:disabled {
  cursor: default;
}

.dl-bars {
  max-width: 560px;
  margin: 14px auto 0;
}

.dl-bar {
  display: grid;
  grid-template-columns: 130px 1fr 48px;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-family: var(--font-sans);
  font-size: 0.9em;
}

.dl-bar-track {
  height: 14px;
  overflow: hidden;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.1);
}

.dl-bar-fill {
  display: block;
  height: 100%;
  background: var(--navy-deep);
  transition: width 0.6s ease;
}

.dl-bar.mine .dl-bar-fill {
  background: var(--gold);
}

.dl-bar-pct {
  text-align: right;
  font-weight: 700;
}

.dl-note {
  margin: 6px 0 0;
  font-size: 0.85em;
  text-align: center;
  opacity: 0.75;
}

.dl-more {
  margin: 14px 0 0;
  text-align: center;
}

.today-title {
  margin: 6px 0;
}


/* Private journal (reflections.html) */
.jn-prompt {
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 1px solid var(--gold);
  border-radius: 12px;
  background: rgba(3, 25, 22, 0.45);
  text-align: center;
}

.jn-prompt-q {
  margin: 6px 0 2px;
  font-size: 1.25em;
  font-style: italic;
  color: var(--gold-bright);
}

.jn-prompt-from {
  margin: 0 0 10px;
  font-size: 0.85em;
  opacity: 0.75;
}

.jn-prompt-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.jn-form textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid var(--gold);
  border-radius: 10px;
  background: rgba(3, 25, 22, 0.45);
  color: var(--ink);
  font: inherit;
  line-height: 1.6;
  resize: vertical;
}

.jn-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.jn-tag {
  padding: 5px 12px;
  border: 1px solid rgba(226, 196, 126, 0.5);
  border-radius: 16px;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.85em;
  cursor: pointer;
}

.jn-tag.on {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
}

.jn-useprompt {
  display: block;
  margin-top: 6px;
  font-size: 0.88em;
  opacity: 0.85;
}

.jn-list-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 26px;
}

.jn-list-head h2 {
  margin: 0;
}

.jn-list-head #jnCount {
  font-size: 0.6em;
  font-weight: 400;
  opacity: 0.7;
}

.jn-list-head input {
  padding: 8px 12px;
  border: 1px solid rgba(226, 196, 126, 0.6);
  border-radius: 8px;
  background: rgba(3, 25, 22, 0.45);
  color: var(--ink);
  font: inherit;
}

.jn-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.jn-entry {
  padding: 14px 16px;
  border: 1px solid rgba(226, 196, 126, 0.35);
  border-radius: 10px;
  background: rgba(3, 25, 22, 0.35);
}

.jn-entry p {
  margin: 6px 0;
  line-height: 1.6;
  white-space: pre-wrap;
}

.jn-entry-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85em;
}

.jn-date {
  opacity: 0.8;
}

.jn-chip {
  padding: 2px 10px;
  border-radius: 12px;
  background: rgba(226, 196, 126, 0.2);
  color: var(--gold-bright);
  font-family: var(--font-sans);
  font-size: 0.85em;
  text-decoration: none;
}

.jn-entry-prompt {
  font-style: italic;
  opacity: 0.8;
}

.jn-entry-actions {
  display: flex;
  gap: 8px;
}

.jn-empty {
  opacity: 0.7;
  text-align: center;
}

.jn-export {
  text-align: center;
}


/* Old Wisdom for Modern Problems */
.mp-page h3 {
  margin-top: 26px;
  color: var(--gold-bright);
}

.mp-cite {
  margin-top: -6px;
  font-size: 0.85em;
  font-style: italic;
  opacity: 0.75;
}

.mp-practice {
  margin: 28px 0 14px;
  padding: 18px 20px;
  border: 1px solid var(--gold);
  border-radius: 12px;
  background: rgba(3, 25, 22, 0.45);
}

.mp-practice h2 {
  margin: 4px 0 8px;
}

.mp-practice li {
  margin-bottom: 6px;
  line-height: 1.55;
}

.mp-journey {
  font-size: 1.02em;
}

.mp-help {
  padding: 10px 14px;
  border-left: 3px solid var(--navy-deep);
  background: rgba(111, 216, 204, 0.08);
  font-size: 0.92em;
}

.modern-band {
  text-align: center;
}

.modern-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.modern-chips a {
  padding: 8px 16px;
  border: 1px solid var(--gold);
  border-radius: 22px;
  text-decoration: none;
}

.modern-chips a:hover {
  background: rgba(226, 196, 126, 0.15);
}


/* Rise and Fall (Ancient_Empires.html) */
.emp-tl-note {
  margin-top: -6px;
  font-size: 0.85em;
  opacity: 0.75;
}

.emp-tl {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.emp-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.92em;
}

.emp-row:hover .emp-row-name {
  color: var(--gold-bright);
}

.emp-row-track {
  position: relative;
  height: 14px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.07);
}

.emp-row-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 7px;
  background: linear-gradient(90deg, var(--gold), var(--navy-deep));
}

.emp-axis {
  position: relative;
  height: 18px;
  margin: 6px 0 0 160px;
  font-family: var(--font-sans);
  font-size: 0.75em;
  opacity: 0.7;
}

.emp-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid rgba(226, 196, 126, 0.35);
  border-radius: 12px;
  background: rgba(3, 25, 22, 0.35);
  scroll-margin-top: 90px;
}

.emp-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 8px;
}

.emp-card h3 {
  margin: 0;
  color: var(--gold-bright);
}

.emp-dates {
  margin: 2px 0 8px;
  font-family: var(--font-sans);
  font-size: 0.82em;
  opacity: 0.8;
}

.emp-card p {
  line-height: 1.55;
}

.emp-credit {
  font-size: 0.75em;
  opacity: 0.65;
}

.emp-lessons h3 {
  margin-top: 26px;
  color: var(--gold-bright);
}

@media (max-width: 600px) {
  .emp-row {
    grid-template-columns: 100px 1fr;
  }

  .emp-axis {
    margin-left: 110px;
  }

  .emp-card {
    grid-template-columns: 1fr;
  }
}

.emp-axis span {
  position: absolute;
  transform: translateX(-50%);
  white-space: nowrap;
}

/* Warrior Philosophies */
.war-lesson {
  padding: 8px 12px;
  border-left: 3px solid var(--gold);
  background: rgba(226, 196, 126, 0.08);
}

.war-map {
  display: block;
  width: 100%;
  max-width: 420px;
  margin: 10px 0 2px;
  border-radius: 8px;
}
