:root {
  --ink: #242724;
  --muted: #686a64;
  --cream: #f5f0e7;
  --paper: #fffdf9;
  --sage: #6f8068;
  --sage-deep: #4f6250;
  --sage-pale: #dfe7dc;
  --terracotta: #b66d54;
  --terracotta-pale: #f1dfd7;
  --line: #d8d5ca;
  --shadow: 0 12px 34px rgba(52, 57, 49, 0.08);
  --shadow-small: 0 5px 16px rgba(52, 57, 49, 0.07);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 11px;
  --max: 1180px;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.24;
  background-image: radial-gradient(rgba(77, 83, 72, 0.14) 0.55px, transparent 0.55px);
  background-size: 7px 7px;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

:focus-visible {
  outline: 3px solid rgba(182, 109, 84, 0.45);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  transform: translateY(-180%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0.75rem max(1.25rem, calc((100vw - var(--max)) / 2));
  border-bottom: 1px solid rgba(111, 128, 104, 0.18);
  background: rgba(245, 240, 231, 0.92);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--sage-deep);
  font-family: var(--serif);
  font-size: 1.03rem;
  font-weight: 700;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 2.15rem;
  height: 2.15rem;
  place-items: center;
  border: 1px solid rgba(111, 128, 104, 0.35);
  border-radius: 50%;
  color: var(--terracotta);
  font-family: var(--sans);
  font-size: 0.85rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.main-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 42px;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  color: #4f554e;
  font-size: 0.92rem;
  font-weight: 650;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  background: rgba(111, 128, 104, 0.11);
  color: var(--sage-deep);
}

.main-nav .saved-link {
  margin-left: 0.45rem;
  border: 1px solid rgba(111, 128, 104, 0.3);
  background: var(--paper);
}

.saved-count {
  display: inline-grid;
  min-width: 1.45rem;
  height: 1.45rem;
  padding: 0 0.3rem;
  place-items: center;
  border-radius: 999px;
  background: var(--sage);
  color: white;
  font-size: 0.74rem;
}

.icon-button,
.menu-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  cursor: pointer;
}

.menu-button {
  display: none;
}

#app {
  min-height: 75vh;
}

.page-shell,
.home-shell {
  width: min(calc(100% - 2.5rem), var(--max));
  margin: 0 auto;
}

.hero {
  display: grid;
  min-height: min(620px, calc(100vh - 72px));
  grid-template-columns: minmax(0, 1.45fr) minmax(310px, 0.7fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
  padding: clamp(3.25rem, 7vw, 6.5rem) 0 3rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1rem;
  color: var(--terracotta);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 1.8rem;
  height: 1px;
  background: currentColor;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1,
h2,
h3,
h4 {
  text-wrap: balance;
}

h1,
h2 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.035em;
}

h1 {
  max-width: 760px;
  margin-bottom: 1.3rem;
  font-size: clamp(2.85rem, 6.2vw, 5.7rem);
}

h2 {
  margin-bottom: 1rem;
  font-size: clamp(2.15rem, 4vw, 3.8rem);
}

h3 {
  margin-bottom: 0.65rem;
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  line-height: 1.23;
}

.hero-copy {
  max-width: 640px;
  margin-bottom: 1.75rem;
  color: #575c56;
  font-size: clamp(1.05rem, 1.5vw, 1.22rem);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.button,
.button-secondary,
.text-link {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border-radius: 999px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.button {
  padding: 0.72rem 1.3rem;
  border: 1px solid var(--sage-deep);
  background: var(--sage-deep);
  color: white;
  box-shadow: var(--shadow-small);
  transition: transform 160ms ease, background 160ms ease;
}

.button:hover {
  background: #405342;
  transform: translateY(-1px);
}

.button-secondary {
  padding: 0.72rem 1.3rem;
  border: 1px solid rgba(79, 98, 80, 0.45);
  background: transparent;
  color: var(--sage-deep);
}

.button-secondary:hover {
  background: rgba(111, 128, 104, 0.08);
}

.hero-note {
  position: relative;
  padding: clamp(1.4rem, 3vw, 2rem);
  border: 1px solid rgba(182, 109, 84, 0.25);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow);
  transform: rotate(1.2deg);
}

.hero-note::before {
  content: "";
  position: absolute;
  top: -1px;
  right: 2rem;
  left: 2rem;
  height: 4px;
  border-radius: 0 0 99px 99px;
  background: var(--terracotta);
}

.note-number {
  display: grid;
  width: 2.7rem;
  height: 2.7rem;
  margin-bottom: 1.2rem;
  place-items: center;
  border-radius: 50%;
  background: var(--terracotta-pale);
  color: #914d38;
  font-family: var(--serif);
  font-size: 1.15rem;
}

.note-label,
.meta-label {
  margin-bottom: 0.45rem;
  color: var(--terracotta);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.hero-note h2 {
  margin-bottom: 0.75rem;
  font-size: clamp(1.65rem, 3vw, 2.25rem);
}

.hero-note p:not(.note-label) {
  color: #595c57;
}

.note-source {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.25rem;
  color: var(--sage-deep);
  font-size: 0.8rem;
  font-weight: 700;
}

.section {
  padding: clamp(4rem, 8vw, 7.2rem) 0;
}

.section-tight {
  padding: 3.25rem 0;
}

.section-sage {
  position: relative;
  border-block: 1px solid rgba(111, 128, 104, 0.18);
  background: rgba(223, 231, 220, 0.48);
}

.section-inner {
  width: min(calc(100% - 2.5rem), var(--max));
  margin: 0 auto;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
}

.section-heading > div {
  max-width: 690px;
}

.section-heading p,
.page-intro,
.chapter-intro {
  color: var(--muted);
  font-size: 1.04rem;
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.theme-card {
  position: relative;
  display: flex;
  min-height: 255px;
  flex-direction: column;
  padding: 1.35rem;
  overflow: hidden;
  border: 1px solid rgba(111, 128, 104, 0.24);
  border-radius: var(--radius-md);
  background: var(--paper);
  box-shadow: 0 1px 0 rgba(52, 57, 49, 0.03);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.theme-card:hover {
  border-color: rgba(111, 128, 104, 0.48);
  box-shadow: var(--shadow-small);
  transform: translateY(-3px);
}

.theme-card-top,
.theme-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.chapter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--sage-deep);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.card-index {
  color: #8d8f87;
  font-family: var(--serif);
  font-size: 0.95rem;
}

.theme-card h3 {
  margin: 1.55rem 0 0.65rem;
}

.theme-card p {
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.55;
}

.theme-card-bottom {
  margin-top: auto;
  padding-top: 1rem;
}

.theme-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--sage-deep);
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
}

.theme-link::after {
  content: "↗";
  font-size: 0.95rem;
  transition: transform 160ms ease;
}

.theme-card:hover .theme-link::after {
  transform: translate(2px, -2px);
}

.favorite-button {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: #686c66;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.favorite-button:hover,
.favorite-button[aria-pressed="true"] {
  border-color: rgba(182, 109, 84, 0.4);
  background: var(--terracotta-pale);
  color: #934e37;
}

.favorite-button[aria-pressed="true"] svg {
  fill: currentColor;
}

.duration {
  color: #777a73;
  font-size: 0.78rem;
}

.chapter-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin-top: 2rem;
  overflow: hidden;
  border: 1px solid rgba(111, 128, 104, 0.28);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-small);
}

.chapter-step {
  position: relative;
  min-height: 255px;
  padding: 1.4rem 1.2rem;
  border-right: 1px solid var(--line);
}

.chapter-step:last-child {
  border-right: 0;
}

.chapter-step::before {
  content: "";
  position: absolute;
  top: 2.35rem;
  right: -0.32rem;
  z-index: 1;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--terracotta);
}

.chapter-step:last-child::before {
  display: none;
}

.step-number {
  display: block;
  margin-bottom: 1.6rem;
  color: var(--terracotta);
  font-size: 0.75rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chapter-step h3 {
  min-height: 3.1em;
  font-size: 1.15rem;
}

.chapter-step p {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.55;
}

.chapter-step a {
  color: var(--sage-deep);
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: rgba(79, 98, 80, 0.35);
  text-underline-offset: 0.25rem;
}

.book-note {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(2rem, 7vw, 6rem);
  align-items: center;
}

.book-quote {
  padding: clamp(1.5rem, 4vw, 2.7rem);
  border-left: 5px solid var(--terracotta);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: var(--paper);
  box-shadow: var(--shadow-small);
}

.book-quote blockquote {
  margin: 0 0 1rem;
  font-family: var(--serif);
  font-size: clamp(1.45rem, 2.7vw, 2.2rem);
  line-height: 1.25;
}

.book-quote cite {
  color: var(--muted);
  font-size: 0.82rem;
  font-style: normal;
}

.page-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: end;
  padding: clamp(3.5rem, 7vw, 6.5rem) 0 2.5rem;
  border-bottom: 1px solid var(--line);
}

.page-header h1 {
  margin-bottom: 0.75rem;
  font-size: clamp(2.65rem, 6vw, 5.15rem);
}

.page-header .page-intro {
  max-width: 700px;
  margin-bottom: 0;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 2rem 0;
}

.filter-button {
  min-height: 42px;
  padding: 0.55rem 0.95rem;
  border: 1px solid rgba(111, 128, 104, 0.3);
  border-radius: 999px;
  background: transparent;
  color: var(--sage-deep);
  font-size: 0.86rem;
  font-weight: 750;
  cursor: pointer;
}

.filter-button[aria-pressed="true"],
.filter-button:hover {
  background: var(--sage-deep);
  color: white;
}

.detail-shell {
  width: min(calc(100% - 2.5rem), 1060px);
  margin: 0 auto;
  padding-bottom: 6rem;
}

.detail-top {
  padding: 2rem 0 1rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--sage-deep);
  font-size: 0.9rem;
  font-weight: 750;
  text-decoration: none;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: start;
  padding: clamp(2rem, 5vw, 4.5rem) 0 2.5rem;
  border-bottom: 1px solid var(--line);
}

.detail-hero h1 {
  max-width: 760px;
  margin: 0.5rem 0 1rem;
  font-size: clamp(2.55rem, 6vw, 5rem);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1.1rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.detail-actions {
  display: flex;
  gap: 0.55rem;
}

.essential-card {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 2rem;
  margin: 2.5rem 0;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px solid rgba(111, 128, 104, 0.24);
  border-radius: var(--radius-lg);
  background: var(--sage-pale);
}

.essential-card h2 {
  margin: 0;
  color: var(--sage-deep);
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  line-height: 1.5;
  text-transform: uppercase;
}

.essential-card p {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.35;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.47fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.content-block {
  padding: 2rem 0;
  border-bottom: 1px solid var(--line);
}

.content-block h2 {
  margin-bottom: 1.4rem;
  font-size: clamp(1.75rem, 3vw, 2.55rem);
}

.mini-section + .mini-section {
  margin-top: 1.7rem;
}

.mini-section h3 {
  margin-bottom: 0.45rem;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 800;
}

.mini-section p,
.daily-card p,
.accordion-content p {
  color: #50544f;
}

.daily-card {
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  box-shadow: var(--shadow-small);
}

.daily-card p:last-child {
  margin-bottom: 0;
}

.practice-card {
  position: sticky;
  top: 96px;
  padding: 1.45rem;
  border: 1px solid rgba(182, 109, 84, 0.3);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.practice-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: var(--terracotta-pale);
  color: #884b38;
  font-size: 0.75rem;
  font-weight: 800;
}

.practice-card h2 {
  margin-bottom: 0.65rem;
  font-size: 1.65rem;
}

.practice-intro {
  margin-bottom: 1.2rem;
  color: var(--muted);
  font-size: 0.91rem;
}

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

.practice-step {
  display: none;
  min-height: 150px;
  padding: 1rem;
  border-radius: var(--radius-sm);
  background: #faf7f1;
}

.practice-step.is-active {
  display: block;
  animation: soft-in 180ms ease;
}

.practice-step-count {
  display: block;
  margin-bottom: 0.65rem;
  color: var(--terracotta);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.practice-controls {
  display: flex;
  gap: 0.55rem;
  margin-top: 1rem;
}

.small-button {
  min-height: 42px;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--sage-deep);
  border-radius: 999px;
  background: var(--sage-deep);
  color: white;
  font-size: 0.85rem;
  font-weight: 750;
  cursor: pointer;
}

.small-button.secondary {
  background: transparent;
  color: var(--sage-deep);
}

.practice-done {
  display: none;
  padding: 1.25rem;
  border-radius: var(--radius-sm);
  background: var(--sage-pale);
  text-align: center;
}

.practice-done.is-visible {
  display: block;
}

.practice-done p {
  margin-bottom: 0.8rem;
  font-family: var(--serif);
  font-size: 1.3rem;
}

.accordion {
  margin-top: 2rem;
  border-block: 1px solid var(--line);
}

.accordion summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 0;
  color: var(--sage-deep);
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

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

.accordion summary::after {
  content: "+";
  font-size: 1.35rem;
  font-weight: 400;
}

.accordion[open] summary::after {
  content: "−";
}

.accordion-content {
  padding: 0 0 1.3rem;
}

.next-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 3.5rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: var(--radius-lg);
  background: var(--sage-deep);
  color: white;
}

.next-card p {
  margin-bottom: 0.35rem;
  color: rgba(255,255,255,0.72);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.next-card h2 {
  margin: 0;
  color: white;
  font-size: clamp(1.65rem, 3.5vw, 2.5rem);
}

.next-card a {
  flex: 0 0 auto;
  background: var(--paper);
  color: var(--sage-deep);
}

.saved-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 2rem 0;
}

.saved-box {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
}

.saved-box h2 {
  margin-bottom: 0.75rem;
  font-size: 1.65rem;
}

.saved-box p {
  color: var(--muted);
  font-size: 0.91rem;
}

.local-note {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin: 2rem 0;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(111, 128, 104, 0.22);
  border-radius: var(--radius-sm);
  background: rgba(223, 231, 220, 0.45);
  color: #4d574c;
  font-size: 0.88rem;
}

.local-note p {
  margin: 0;
}

.link-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(79, 98, 80, 0.4);
  text-underline-offset: 0.23rem;
  cursor: pointer;
}

.empty-state {
  padding: 3rem 1.5rem;
  border: 1px dashed rgba(111, 128, 104, 0.45);
  border-radius: var(--radius-lg);
  text-align: center;
}

.empty-state h2 {
  font-size: 1.8rem;
}

.empty-state p {
  max-width: 520px;
  margin-inline: auto;
  color: var(--muted);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 7vw, 6rem);
  padding: 3rem 0 6rem;
}

.about-card {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
}

.about-card + .about-card {
  margin-top: 1rem;
}

.about-card h2 {
  font-size: 1.8rem;
}

.about-card p:last-child {
  margin-bottom: 0;
}

.site-footer {
  position: relative;
  display: flex;
  width: min(calc(100% - 2.5rem), var(--max));
  margin: 0 auto;
  padding: 2.4rem 0 3rem;
  border-top: 1px solid var(--line);
  justify-content: space-between;
  gap: 2rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.footer-title {
  margin-bottom: 0.2rem;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 700;
}

.site-footer p {
  margin-bottom: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1rem;
}

.toast {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 100;
  max-width: min(360px, calc(100vw - 2.5rem));
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: white;
  font-size: 0.88rem;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes soft-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 960px) {
  .theme-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chapter-strip {
    grid-template-columns: 1fr;
  }

  .chapter-step {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .chapter-step:last-child {
    border-bottom: 0;
  }

  .chapter-step::before {
    top: auto;
    right: auto;
    bottom: -0.31rem;
    left: 2rem;
  }

  .chapter-step h3 {
    min-height: 0;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .practice-card {
    position: static;
  }
}

@media (max-width: 780px) {
  .site-header {
    min-height: 64px;
  }

  .menu-button {
    display: grid;
  }

  .main-nav {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 1rem;
    left: 1rem;
    display: none;
    align-items: stretch;
    flex-direction: column;
    padding: 0.7rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--paper);
    box-shadow: var(--shadow);
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav a {
    justify-content: space-between;
  }

  .main-nav .saved-link {
    margin-left: 0;
  }

  .hero {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 2.25rem;
    padding-top: 3.2rem;
  }

  h1 {
    font-size: clamp(2.7rem, 13vw, 4rem);
  }

  .hero-note {
    transform: none;
  }

  .section-heading,
  .page-header,
  .detail-hero {
    align-items: start;
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .book-note,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .essential-card {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .saved-panel {
    grid-template-columns: 1fr;
  }

  .site-footer {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .page-shell,
  .home-shell,
  .section-inner,
  .detail-shell,
  .site-footer {
    width: min(calc(100% - 1.5rem), var(--max));
  }

  .brand span:last-child {
    max-width: 160px;
    line-height: 1.15;
  }

  .theme-grid {
    grid-template-columns: 1fr;
  }

  .theme-card {
    min-height: 225px;
  }

  .button-row,
  .button-row .button,
  .button-row .button-secondary {
    width: 100%;
  }

  .detail-actions {
    justify-self: start;
  }

  .next-card {
    align-items: stretch;
    flex-direction: column;
  }

  .next-card a {
    width: 100%;
  }
}

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

/* Filtrage des cartes, sans remplacer leur contenu HTML. */
[hidden] { display: none !important; }
