/* ==========================================================================
   Das Pendel der Lebendigkeit — Design tokens & base styles
   ========================================================================== */

/* Self-hosted variable fonts (Fraunces + Source Serif 4).
   Replaces the earlier Google Fonts @import — no external request,
   nothing sent to Google. Files under /assets/fonts/, OFL-licensed
   (see LICENSE-fraunces.txt / LICENSE-source-serif-4.txt in that folder). */
@font-face {
  font-family: 'Fraunces Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('assets/fonts/fraunces-latin-opsz-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Fraunces Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('assets/fonts/fraunces-latin-ext-opsz-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Fraunces Variable';
  font-style: italic;
  font-display: swap;
  font-weight: 100 900;
  src: url('assets/fonts/fraunces-latin-opsz-italic.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Fraunces Variable';
  font-style: italic;
  font-display: swap;
  font-weight: 100 900;
  src: url('assets/fonts/fraunces-latin-ext-opsz-italic.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Source Serif 4 Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 900;
  src: url('assets/fonts/source-serif-4-latin-opsz-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Source Serif 4 Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 900;
  src: url('assets/fonts/source-serif-4-latin-ext-opsz-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Source Serif 4 Variable';
  font-style: italic;
  font-display: swap;
  font-weight: 200 900;
  src: url('assets/fonts/source-serif-4-latin-opsz-italic.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Source Serif 4 Variable';
  font-style: italic;
  font-display: swap;
  font-weight: 200 900;
  src: url('assets/fonts/source-serif-4-latin-ext-opsz-italic.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

:root {
  /* Colors — drawn from the book cover itself */
  --cream: #f7ead2;
  --cream-light: #fbf4e6;
  --cream-deep: #efdfbd;
  --ink: #2a231d;
  --ink-soft: #5a4d40;
  --teal: #37504a;
  --teal-dark: #1f302c;
  --teal-tint: #e4e9e2;
  --rust: #b3591b;
  --rust-dark: #8c4514;
  --rust-tint: #f0dcc7;
  --sage: #6d7350;
  --line: rgba(42, 35, 29, 0.16);
  --line-soft: rgba(42, 35, 29, 0.09);
  --shadow: 0 20px 48px rgba(31, 25, 18, 0.14);

  /* Type */
  --font-display: 'Fraunces Variable', 'Iowan Old Style', serif;
  --font-body: 'Source Serif 4 Variable', 'Iowan Old Style', Georgia, serif;

  /* Layout */
  --wrap: 1160px;
  --measure: 680px;
  --radius: 3px;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 560;
  line-height: 1.14;
  margin: 0 0 0.5em;
  color: var(--teal-dark);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 4.6vw, 3.6rem); font-weight: 560; }
h2 { font-size: clamp(1.7rem, 3vw, 2.35rem); }
h3 { font-size: 1.28rem; font-weight: 650; margin-top: 1.7em; }

p { margin: 0 0 1.15em; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 32px;
}

.measure { max-width: var(--measure); }

:focus-visible {
  outline: 2px solid var(--rust);
  outline-offset: 3px;
}

::selection { background: var(--rust-tint); color: var(--teal-dark); }

/* ---- Eyebrow / kicker (used sparingly, only where it labels a section) ---- */
.kicker {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.98rem;
  color: var(--sage);
  margin: 0 0 0.6em;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  padding: 13px 26px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.btn-primary {
  background: var(--rust);
  color: var(--cream-light);
}
.btn-primary:hover { background: var(--rust-dark); }
.btn-secondary {
  background: transparent;
  color: var(--teal-dark);
  border-color: var(--teal-dark);
}
.btn-secondary:hover { background: var(--teal-dark); color: var(--cream-light); }
.btn-ghost {
  background: transparent;
  color: var(--teal-dark);
  padding: 13px 4px;
  border-bottom: 1px solid var(--teal-dark);
  border-radius: 0;
}
.btn-ghost:hover { color: var(--rust); border-color: var(--rust); }
.btn:active { transform: translateY(1px); }

/* ==========================================================================
   Pendulum motif — the recurring visual device (arc + swinging dot)
   ========================================================================== */
.pendulum-mark { display: block; }
.pendulum-mark .arc { fill: none; stroke: var(--teal); stroke-width: 1.4; opacity: 0.55; }
.pendulum-mark .dot { fill: var(--rust); }

.divider-pendulum {
  display: flex;
  justify-content: center;
  margin: 4px 0 8px;
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(247, 234, 210, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--teal-dark);
  flex-shrink: 0;
}
.brand-text {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 560;
  line-height: 1.1;
}
.brand-text em { font-style: normal; color: var(--rust); }

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.nav a, .nav-toplevel {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.97rem;
  padding: 6px 10px;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
  white-space: nowrap;
}
.nav a:hover, .nav a[aria-current="page"],
.nav-toplevel:hover, .nav-toplevel.current-group { color: var(--teal-dark); border-color: var(--rust); }
.nav .btn { margin-left: 4px; }

.nav-toplevel {
  background: none;
  border: none;
  border-bottom: 1px solid transparent;
  font-family: var(--font-body);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.nav-caret-glyph { font-size: 0.7em; transform: translateY(1px); display: inline-block; transition: transform 0.15s ease; }
.nav-item.open .nav-caret-glyph, .nav-item:hover .nav-caret-glyph { transform: translateY(1px) rotate(180deg); }

.nav-item { position: relative; display: flex; align-items: center; }

.nav-dropdown {
  display: flex;
  flex-direction: column;
  min-width: 210px;
}
.nav-dropdown-wide { min-width: 260px; }
.nav-dropdown a.overview-link { font-weight: 700; }
@media (min-width: 861px) {
  .nav-dropdown a.overview-link { border-bottom: 1px solid var(--line); margin-bottom: 4px; padding-bottom: 12px; }
}

@media (min-width: 861px) {
  .nav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--cream-light);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
    z-index: 50;
  }
  .nav-item:hover .nav-dropdown,
  .nav-item:focus-within .nav-dropdown,
  .nav-item.open .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  .nav-dropdown a {
    padding: 9px 18px;
    border-bottom: none;
    display: block;
  }
  .nav-dropdown a:hover, .nav-dropdown a[aria-current="page"] {
    background: var(--teal-tint);
    color: var(--teal-dark);
  }
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  width: 42px;
  height: 38px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  background: var(--teal-dark);
  position: relative;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }

@media (max-width: 860px) {
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--cream-light);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    padding: 10px 22px 26px;
    gap: 2px;
    max-height: 80vh;
    overflow-y: auto;
  }
  .nav.open { display: flex; }
  .nav-toggle { display: flex; }

  .nav > a, .nav > .nav-item { width: 100%; }
  .nav a, .nav-toplevel { padding: 12px 10px; width: 100%; text-align: left; }
  .nav-item { flex-wrap: wrap; }
  .nav-item.has-dropdown { align-items: stretch; }

  .nav-dropdown {
    display: none;
    width: 100%;
    padding-left: 14px;
    border-left: 2px solid var(--line);
    margin-left: 10px;
  }
  .nav-item.open .nav-dropdown { display: flex; }
  .nav-dropdown a { padding: 10px; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  padding: 76px 0 90px;
  position: relative;
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.75fr;
  gap: 64px;
  align-items: center;
}
.hero-eyebrow {
  font-style: italic;
  color: var(--sage);
  margin-bottom: 14px;
  font-size: 1.02rem;
}
.hero h1 { margin-bottom: 0.32em; }
.hero-sub {
  font-size: 1.2rem;
  color: var(--ink-soft);
  max-width: 46ch;
  margin-bottom: 1.6em;
}
.hero-free-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--teal-dark);
  background: var(--teal-tint);
  border: 1px solid var(--sage);
  border-radius: 20px;
  padding: 7px 16px;
  margin: 0 0 20px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 30px;
}
.hero-meta {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.hero-meta strong { color: var(--teal-dark); display: block; font-family: var(--font-display); font-size: 1.3rem; font-weight: 560; }

.hero-cover {
  position: relative;
  justify-self: center;
  width: 100%;
  max-width: 340px;
}
.hero-cover img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 339 / 480;
  object-fit: cover;
  box-shadow: var(--shadow);
  border-radius: 2px;
}
.hero-cover::after {
  content: "";
  position: absolute;
  inset: 18px -18px -18px 18px;
  border: 1px solid var(--line);
  z-index: -1;
}

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-cover { order: -1; max-width: 260px; margin: 0 auto 12px; }
}

/* ==========================================================================
   Sections
   ========================================================================== */
section { padding: 76px 0; }
.section-tight { padding: 52px 0; }
.section-alt { background: var(--cream-light); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.section-teal {
  background: var(--teal-dark);
  color: var(--cream-light);
}
.section-teal h2, .section-teal h3 { color: var(--cream-light); }
.section-teal .kicker { color: #b9c9c1; }

.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head p { color: var(--ink-soft); font-size: 1.08rem; }

/* Pull quote */
.pull-quote {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  font-weight: 440;
  font-style: italic;
  color: var(--teal-dark);
  max-width: 780px;
  line-height: 1.4;
  margin: 0 auto;
  text-align: center;
  padding: 0 12px;
}
.pull-quote cite {
  display: block;
  font-style: normal;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--sage);
  margin-top: 20px;
}

/* Two-column reading blocks */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 32px; } }

/* Numbered / lettered dimension list (content genuinely is enumerated in the book) */
.dim-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.dim-list li {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.dim-letter {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--rust);
  font-weight: 560;
}
.dim-list h4 { margin: 0 0 4px; font-family: var(--font-body); font-weight: 700; font-size: 1.05rem; color: var(--teal-dark); }
.dim-list p { margin: 0; color: var(--ink-soft); font-size: 0.98rem; }

/* Simple feature rows (three ways to read) */
.ways {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.way {
  background: var(--cream-light);
  padding: 34px 30px;
  position: relative;
}
.way-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--teal);
  background: var(--teal-tint);
  border-radius: 20px;
  padding: 3px 11px;
  margin-bottom: 12px;
}
.way h3 { margin-top: 0; }
.way p { color: var(--ink-soft); font-size: 0.98rem; }
@media (max-width: 860px) { .ways { grid-template-columns: 1fr; } }

/* Book facts strip */
.facts {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.fact { padding: 26px 20px; border-left: 1px solid var(--line); text-align: left; }
.fact:first-child { border-left: none; }
.fact strong { display: block; font-family: var(--font-display); font-size: 1.6rem; font-weight: 560; color: var(--teal-dark); }
.fact span { font-size: 0.86rem; color: var(--ink-soft); }
@media (max-width: 860px) {
  .facts { grid-template-columns: repeat(2, 1fr); }
  .fact { border-left: none; border-top: 1px solid var(--line); }
  .fact:nth-child(odd) { border-right: 1px solid var(--line); }
}

/* Table of contents (parts + chapters) */
.toc-part { margin-bottom: 34px; }
.toc-part h3 {
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 500;
  color: var(--sage);
  font-size: 1.02rem;
  margin-top: 0;
  margin-bottom: 10px;
}
.toc-chapters { list-style: none; margin: 0; padding: 0; }
.toc-chapters li {
  display: flex;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.98rem;
}
.toc-num { color: var(--rust); font-family: var(--font-display); min-width: 1.6em; }
.toc-tool-link { margin-left: auto; font-size: 0.85rem; color: var(--rust); text-decoration: none; border-bottom: 1px solid var(--rust); white-space: nowrap; padding-left: 12px; }
.toc-tool-link:hover { color: var(--rust-dark); border-color: var(--rust-dark); }

/* Author teaser / bio */
.author-card {
  display: grid;
  grid-template-columns: minmax(0, 200px) 1fr;
  gap: 40px;
  align-items: start;
}
.author-card img { width: 100%; height: auto; border-radius: 3px; box-shadow: var(--shadow); }
@media (max-width: 700px) { .author-card { grid-template-columns: 1fr; } .author-card img { max-width: 180px; } }

/* Cards used only where content genuinely is a small set of parallel items */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
@media (max-width: 860px) { .card-grid { grid-template-columns: 1fr; } }
.card {
  background: var(--cream-light);
  border: 1px solid var(--line);
  padding: 30px;
}
.card h3 { margin-top: 0; }
.card p { color: var(--ink-soft); font-size: 0.98rem; margin-bottom: 0; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--teal-dark);
  color: #cfd9d4;
  padding: 60px 0 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-grid h4 {
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  margin-bottom: 14px;
  font-weight: 600;
}
.site-footer .brand-text { color: #fff; }
.site-footer .brand-text em { color: #e2a06a; }
.footer-blurb { color: #a9b8b2; font-size: 0.95rem; max-width: 34ch; margin-top: 14px; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 9px; }
.footer-links a { color: #cfd9d4; text-decoration: none; font-size: 0.95rem; }
.footer-links a:hover { color: #fff; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 24px;
  font-size: 0.85rem;
  color: #8ea099;
}
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   Utility
   ========================================================================== */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.small { font-size: 0.9rem; color: var(--ink-soft); }
.tag {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--sage);
  border: 1px solid var(--line);
  padding: 3px 10px;
  border-radius: 20px;
  margin: 0 8px 8px 0;
}

/* Reusable "scientific framing" callout — used in the reader and on exercise pages */
.science-note {
  background: var(--cream-light);
  border-left: 3px solid var(--sage);
  padding: 18px 22px;
  margin: 2em 0;
  font-size: 0.92rem;
  line-height: 1.6;
}
.science-note p { margin: 0; color: var(--ink-soft); }
.science-label {
  display: block;
  font-family: var(--font-body);
  font-weight: 700;
  font-style: normal;
  color: var(--teal);
  font-size: 0.82em;
  letter-spacing: 0.02em;
  margin-bottom: 6px;
}

/* Small persistent safety/ground-rule reminder, used on exercise pages */
.rule-reminder {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--teal-tint);
  border: 1px solid var(--sage);
  padding: 14px 18px;
  font-size: 0.9rem;
  color: #2d4436;
  margin-bottom: 30px;
}
.rule-reminder strong { color: #223a2d; }

/* Exercise prev/next footer navigation */
.exercise-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 50px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  max-width: var(--measure);
}
.exercise-nav-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  max-width: 46%;
}
.exercise-nav-link.next { text-align: right; align-items: flex-end; margin-left: auto; }
.exercise-nav-label { font-size: 0.78rem; font-style: italic; color: var(--sage); margin-bottom: 4px; }
.exercise-nav-title { font-family: var(--font-display); font-weight: 600; color: var(--teal-dark); font-size: 1.02rem; }
.exercise-nav-link:hover .exercise-nav-title { color: var(--rust); }

/* Exercise index list on the Erleben hub page */
.exercise-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.exercise-list li { border-bottom: 1px solid var(--line); }
.exercise-list a {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 18px 4px;
  text-decoration: none;
}
.exercise-list .ex-num {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 560;
  color: var(--rust);
}
.exercise-list .ex-name { font-family: var(--font-body); font-weight: 700; color: var(--ink); font-size: 1rem; margin-bottom: 3px; }
.exercise-list .ex-teaser { color: var(--ink-soft); font-size: 0.92rem; }
.exercise-list .ex-arrow { color: var(--sage); font-size: 1.1rem; }
.exercise-list a:hover .ex-name { color: var(--rust); }
.exercise-list li.ex-praxis { border-top: 2px solid var(--teal); margin-top: 6px; }
.exercise-list li.ex-praxis .ex-num { color: var(--teal); }

/* Mirror comparison box used on the Lukas / Sarah character pages */
.mirror-box {
  border: 1px solid var(--line);
  background: var(--cream-light);
  margin: 36px 0;
}
.mirror-box-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 2px solid var(--teal);
}
.mirror-box-head div {
  padding: 18px 20px;
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 1.1rem;
}
.mirror-box-head .side-lukas { color: var(--rust); border-right: 1px solid var(--line); }
.mirror-box-head .side-sarah { color: var(--teal); }
.mirror-row { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
.mirror-row:last-child { border-bottom: none; }
.mirror-row .cell { padding: 14px 20px; font-size: 0.92rem; color: var(--ink-soft); }
.mirror-row .cell.lukas { border-right: 1px solid var(--line); }
.mirror-row .label {
  grid-column: 1 / -1;
  background: var(--cream-deep);
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.78rem;
  color: var(--sage);
  padding: 7px 20px;
}

.cross-link-box {
  display: flex;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--line);
  background: var(--teal-tint);
  padding: 22px 24px;
  margin: 40px 0;
  text-decoration: none;
}
.cross-link-box:hover { border-color: var(--rust); }
.cross-link-box .cl-label { font-size: 0.82rem; font-style: italic; color: var(--sage); display: block; margin-bottom: 4px; }
.cross-link-box .cl-title { font-family: var(--font-display); font-weight: 650; font-size: 1.15rem; color: var(--teal-dark); }
.cross-link-box .cl-arrow { margin-left: auto; font-size: 1.4rem; color: var(--sage); }

@media (max-width: 640px) {
  .mirror-box-head, .mirror-row { grid-template-columns: 1fr; }
  .mirror-box-head .side-lukas, .mirror-row .cell.lukas { border-right: none; border-bottom: 1px solid var(--line); }
}

/* Exercise illustrations — all source images are a fixed 1448x1086 (4:3) */
.exercise-illustration {
  width: 100%;
  max-width: var(--measure);
  margin: 0 0 36px;
}
.exercise-illustration img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.exercise-illustration figcaption {
  font-size: 0.82rem;
  font-style: italic;
  color: var(--sage);
  margin-top: 10px;
}

/* Small thumbnails inside the exercise index list on the hub page */
.exercise-list a { grid-template-columns: 64px 44px 1fr auto; }
.exercise-list .ex-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  display: block;
}
.exercise-list .ex-thumb-empty { width: 64px; height: 64px; }
@media (max-width: 560px) {
  .exercise-list a { grid-template-columns: 48px 32px 1fr auto; }
  .exercise-list .ex-thumb, .exercise-list .ex-thumb-empty { width: 48px; height: 48px; }
}

/* Part-illustration gallery (scroll-snap, works with or without JS) */
.part-gallery { position: relative; }
.part-gallery-track {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: 10px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.part-slide {
  flex: 0 0 auto;
  width: 190px;
  scroll-snap-align: start;
  text-decoration: none;
  display: block;
}
.part-slide img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1086 / 1448;
  object-fit: cover;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}
.part-slide:hover img { transform: translateY(-3px); }
.part-slide-label {
  display: block;
  margin-top: 10px;
  font-size: 0.86rem;
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--teal-dark);
  line-height: 1.4;
}
.part-slide:hover .part-slide-label { color: var(--rust); }
.part-gallery-nav { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }
.part-gallery-btn {
  width: 36px; height: 36px;
  border: 1px solid var(--line);
  background: var(--cream-light);
  color: var(--teal-dark);
  cursor: pointer;
  border-radius: var(--radius);
  font-size: 1rem;
}
.part-gallery-btn:hover { border-color: var(--rust); color: var(--rust); }
@media (max-width: 640px) {
  .part-slide { width: 130px; }
  .part-gallery-nav { display: none; }
}

/* Shared with selbsttest.css — form helper text used across pages */
.optional-tag { font-family: var(--font-body); font-style: italic; font-size: 0.78rem; color: var(--sage); margin-left: 8px; }
.privacy-note { background: var(--cream); border: 1px solid var(--line); border-radius: 4px; padding: 15px 17px; font-size: 0.88rem; color: var(--ink-soft); margin-bottom: 24px; }
