/*
 * learn.levees.org
 * Visual language borrowed from the levees.org "levees2023" theme:
 * PT Serif Caption headings with Playfair Display italic accents, PT Sans Caption body,
 * deep-green body text, the light-green gradient nav bar, green pills and rounded cards.
 */

:root {
  --bg: #f3f4f6;            /* gray-100 page background */
  --surface: #ffffff;
  --surface-alt: #f9fafb;   /* gray-50 */
  --ink: #004500;           /* levees.org "text-body" */
  --heading: #111827;       /* gray-900 */
  --text: #1f2937;          /* gray-800, long-form reading */
  --muted: #6b7280;         /* gray-500 */
  --subtle: #9ca3af;        /* gray-400 */
  --line: #e5e7eb;          /* gray-200 */
  --line-strong: #9ca3af;
  --green-50: #f0fdf4;
  --green-100: #dcfce7;
  --green-300: #86efac;
  --green-600: #16a34a;
  --green-700: #15803d;
  --green-800: #166534;
  --green-900: #14532d;
  --nav-top: #d6eea2;       /* navGreen-100 */
  --nav-bottom: #b7d86e;    /* navGreen-900 */
  --nav-border: #93b34e;    /* navGreen-500 */
  --dark: #1f2937;          /* gray-800 band */
  --darker: #111827;        /* gray-900 footer */
  --slate: #475569;         /* slate-600 */
  --warn-bg: #fef3c7;
  --font-body: "PT Sans Caption", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-heading: "PT Serif Caption", Georgia, serif;
  --font-reading: "PT Serif", Georgia, Cambria, "Times New Roman", serif;
  --font-accent: "Playfair Display", Georgia, Cambria, "Times New Roman", serif;
  --radius: 1rem;
  --radius-lg: 1.5rem;
  --shadow: 0 10px 25px -5px rgba(17, 24, 39, .12), 0 8px 10px -6px rgba(17, 24, 39, .08);
  --measure: 42rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-800); }
a:hover { color: var(--green-900); }
h1, h2, h3, h4 { color: var(--heading); font-family: var(--font-heading); line-height: 1.15; margin: 0 0 .5em; }
em, .accent { font-family: var(--font-accent); font-style: italic; }
h1 em, h2 em, .display em { font-weight: 600; }
:focus-visible { outline: 3px solid var(--green-600); outline-offset: 2px; }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--surface); padding: .5rem 1rem; z-index: 100; }
.skip-link:focus { left: 1rem; top: 1rem; }

.frame {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  overflow: hidden;
}
@media (min-width: 1024px) { .frame { margin: 1rem; } }

.container { width: 100%; max-width: 80rem; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 768px) { .container { padding: 0 2rem; } }

/* ---------- Header + nav ---------- */
.book-tab {
  display: none;
  position: absolute; top: 2rem; right: 2rem; z-index: 50;
  padding: .25rem 1rem; border-radius: .375rem;
  background: var(--slate); color: #fff7ed;
  font-size: .875rem; font-weight: 700; text-decoration: none;
}
.book-tab:hover { background: #334155; color: #fff; }
@media (min-width: 768px) { .book-tab { display: block; } }

.site-header { display: flex; justify-content: center; }
.brand { display: flex; align-items: center; padding: 1rem; gap: 1.25rem; }
.brand-logo { flex: 0 0 auto; }
.brand-logo img { width: 120px; height: auto; }
.brand-text strong { font-size: 1.05rem; }
.brand-text p { margin: .15rem 0 0; font-size: .95rem; }
@media (min-width: 640px) { .brand-logo img { width: 150px; } }
@media (max-width: 767px) { .hide-sm { display: none; } }

.site-nav {
  position: relative; z-index: 40;
  border-top: 1px solid var(--nav-border);
  border-bottom: 1px solid var(--nav-border);
  background: linear-gradient(to bottom, var(--nav-top), var(--nav-bottom));
}
.site-nav ul { list-style: none; margin: 0 auto; padding: 0; display: flex; justify-content: center; flex-wrap: wrap; }
.site-nav li { display: inline-block; }
.site-nav a, .nav-toggle {
  display: inline-block; padding: 0 1.1rem; line-height: 2rem;
  font-family: var(--font-body); font-size: .8rem; font-weight: 700;
  color: #1f2937; text-decoration: none;
  border-right: 1px solid var(--line-strong);
  background: none; border-top: 0; border-bottom: 0; border-left: 0; cursor: pointer;
}
.site-nav li:first-child a { border-left: 1px solid var(--line-strong); }
.site-nav a:hover, .site-nav a[aria-current="page"], .nav-toggle:hover {
  background: linear-gradient(to top, var(--nav-top), var(--nav-bottom));
  color: #000;
}
.site-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; }
.site-nav .nav-secondary { display: none; }
@media (min-width: 1024px) {
  .site-nav .nav-secondary { display: inline-block; }
  .site-nav .nav-more { display: none; }
}
@media (max-width: 479px) {
  .site-nav a, .nav-toggle { padding: 0 .6rem; }
}

.drawer[hidden] { display: none; }
.drawer { position: fixed; inset: 0; z-index: 60; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(31, 41, 55, .35); }
.drawer-panel {
  position: relative; height: 100%; width: 83%; max-width: 28rem;
  background: var(--surface); padding: 1.5rem 2rem; overflow-y: auto; border-right: 1px solid var(--line);
}
.drawer-panel ul { list-style: none; margin: 0; padding: 0; }
.drawer-panel a { display: block; padding: .9rem 1.25rem; color: var(--heading); text-decoration: none; border-radius: .5rem; }
.drawer-panel a:hover { background: var(--green-100); }
.drawer-close { float: right; font-size: 2rem; line-height: 1; background: none; border: 0; color: var(--muted); cursor: pointer; }

/* ---------- Shared bits ---------- */
.pill {
  display: inline-block; padding: .2rem .8rem;
  font-size: .78rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  color: var(--green-50); background: var(--green-800); border-radius: 999px;
}
.pill-light { color: #0f172a; background: #f1f5f9; }
.eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin: 0 0 1rem; }
.part-link { font-size: .9rem; font-weight: 700; color: var(--green-800); text-decoration: none; }
.part-link:hover { text-decoration: underline; }

.display {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 700; letter-spacing: -.01em; margin-bottom: 1rem;
}
.display-xl { font-size: clamp(3rem, 9vw, 6.5rem); }
.section-title { font-size: clamp(2.2rem, 5vw, 3.75rem); font-weight: 700; }
.lede { font-size: 1.25rem; color: #4b5563; font-weight: 700; max-width: 40rem; }
.meta { color: var(--subtle); font-size: .9rem; }

.btn {
  position: relative; display: inline-flex; align-items: center; gap: .75rem;
  padding: 1rem 1.5rem; border-radius: .375rem; overflow: hidden;
  background: var(--green-700); color: #fff; font-weight: 700; text-decoration: none;
  isolation: isolate;
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--darker); transform: translateX(-101%); transition: transform .5s ease;
}
.btn:hover { color: #fff; }
.btn:hover::before { transform: translateX(0); }
.btn-sm { padding: .7rem 1.25rem; font-size: .9rem; }
.btn-outline {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .75rem 1.25rem; border-radius: 999px; border: 1px solid var(--green-600);
  color: var(--green-900); font-weight: 700; font-size: .9rem; text-decoration: none; background: var(--surface);
}
.btn-outline:hover { border-color: var(--green-800); background: var(--green-50); }
.btn-row { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }

.section { padding: 4rem 0; }
@media (min-width: 768px) { .section { padding: 5.5rem 0; } }
.section-head { display: grid; gap: 1.5rem; align-items: end; margin-bottom: 3rem; }
@media (min-width: 1024px) { .section-head { grid-template-columns: 3fr 2fr; } }
.section-head p { font-size: 1.125rem; color: var(--muted); margin: 0; max-width: 28rem; }
.section-dark { background: var(--dark); color: #f9fafb; position: relative; overflow: hidden; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark .star { position: absolute; top: 2.5rem; left: 0; opacity: .7; pointer-events: none; }
.section-alt { background: var(--surface-alt); }

/* ---------- Home ---------- */
.hero { padding-top: 3rem; padding-bottom: 4rem; }
@media (min-width: 768px) { .hero { padding-top: 5rem; padding-bottom: 6rem; } }
.hero-grid { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 1024px) { .hero-grid { grid-template-columns: 2fr 3fr; } }
.hero-photo img { width: 100%; max-height: 38rem; object-fit: cover; border-radius: var(--radius-lg); }
.hero-photo figcaption { font-size: .8rem; color: var(--subtle); margin-top: .5rem; }
.hero .lede { margin-bottom: 2rem; }
.banner-link {
  display: block; text-align: center; padding: 1rem 1.25rem; margin-bottom: 3rem;
  border: 1px solid var(--green-600); border-radius: 1rem;
  color: var(--green-900); font-weight: 700; text-decoration: none;
}
.banner-link:hover { background: var(--green-100); border-color: var(--green-800); }

.answer {
  font-family: var(--font-reading); font-size: clamp(1.25rem, 2.4vw, 1.6rem); line-height: 1.5;
  color: var(--heading); max-width: 52rem;
}
.answer strong { color: var(--green-900); }

.stats { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); margin-top: 3rem; }
.stat { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 1.75rem; }
.stat-number { display: block; font-family: var(--font-heading); font-weight: 700; font-size: 2.6rem; color: var(--green-800); line-height: 1.1; }
.stat p { margin: .5rem 0 0; color: #4b5563; font-size: .95rem; }

.part-block { margin-bottom: 3.5rem; scroll-margin-top: 1rem; }
.part-block > h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.part-block > p { color: var(--muted); max-width: 40rem; margin-top: -.25rem; }
.lesson-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); margin-top: 1.5rem; }
.lesson-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; text-decoration: none; color: inherit; transition: box-shadow .2s, transform .2s;
}
.lesson-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); color: inherit; }
.lesson-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--line); }
.lesson-card .card-body { padding: 1.25rem 1.5rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.lesson-card .num { font-size: .78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--green-700); }
.lesson-card h3 { font-size: 1.35rem; margin: .35rem 0 .5rem; }
.lesson-card p { color: #4b5563; font-size: .95rem; margin: 0 0 1rem; }
.lesson-card .go { margin-top: auto; font-weight: 700; color: var(--green-900); font-size: .9rem; }

.feature-grid { display: grid; gap: 1.5rem; }
@media (min-width: 768px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1280px) { .feature-grid { grid-template-columns: repeat(4, 1fr); } }
.feature {
  position: relative; display: block; min-height: 20rem; border-radius: var(--radius-lg); overflow: hidden;
  text-decoration: none; background: var(--green-900);
}
.feature img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .95; transition: opacity .2s; }
.feature::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(17,24,39,.65), rgba(17,24,39,.15) 60%, rgba(17,24,39,.55)); }
.feature:hover img { opacity: 1; }
.feature-body { position: relative; z-index: 1; padding: 2rem; max-width: 22rem; }
.feature-kicker { display: block; color: var(--green-300); font-size: .8rem; font-weight: 700; text-transform: uppercase; margin-bottom: .5rem; }
.feature-body h3 { color: #fff; font-family: var(--font-body); font-size: 1.8rem; font-weight: 700; margin: 0 0 .75rem; }
.feature-body p { color: var(--green-100); font-size: .9rem; margin: 0; }
.feature .arrow { position: absolute; right: 1.25rem; bottom: 1.25rem; z-index: 1; width: 2.75rem; opacity: .85; }

.quote-band { text-align: center; }
.quote-band blockquote { margin: 0 auto; max-width: 48rem; font-family: var(--font-accent); font-style: italic; font-size: clamp(1.4rem, 3vw, 2.2rem); line-height: 1.35; color: #fff; }
.quote-band cite { display: block; margin-top: 1.25rem; font-family: var(--font-body); font-style: normal; font-size: 1rem; color: #d1d5db; }

.resource-grid { display: grid; gap: 2.5rem; }
@media (min-width: 1024px) { .resource-grid { grid-template-columns: repeat(3, 1fr); } }
.resource img { width: 100%; height: 22rem; object-fit: cover; border-radius: var(--radius-lg); margin-bottom: 1.5rem; }
.resource h3 { font-family: var(--font-body); font-size: 1.8rem; margin-bottom: 1rem; }
.resource p { color: #4b5563; }

/* ---------- Lessons ---------- */
.lesson-hero { display: grid; gap: 2.5rem; align-items: center; padding-top: 3rem; padding-bottom: 2.5rem; }
@media (min-width: 1024px) {
  .lesson-hero { grid-template-columns: 3fr 2fr; padding-top: 4.5rem; }
}
.lesson-hero .display { font-size: clamp(2.3rem, 5.5vw, 4rem); }
.lesson-hero-figure { margin: 0; }
.lesson-hero-figure img { width: 100%; max-height: 26rem; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.lesson-hero-figure figcaption { font-size: .8rem; color: var(--muted); margin-top: .5rem; }

.takeaways {
  max-width: calc(var(--measure) + 4rem);
  width: auto;
  margin: 0 1rem 2.5rem;
  background: var(--green-50); border: 1px solid #bbf7d0; border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
}
@media (min-width: 768px) { .takeaways { padding: 1.75rem 2.25rem; margin: 0 auto 2.5rem; } }
.takeaways h2 { font-family: var(--font-body); font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; color: var(--green-800); margin-bottom: .75rem; }
.takeaways ul { margin: 0; padding-left: 1.2rem; color: var(--heading); }
.takeaways li { margin-bottom: .4rem; }

.prose {
  max-width: calc(var(--measure) + 4rem);
  font-family: var(--font-reading); font-size: 1.15rem; line-height: 1.75; color: var(--text);
  padding-bottom: 2rem;
}
.prose > * { max-width: var(--measure); }
.prose h2 { font-size: clamp(1.7rem, 3.5vw, 2.25rem); margin: 2.75rem 0 1rem; scroll-margin-top: 1rem; }
.prose h3 { font-family: var(--font-body); font-size: 1.3rem; margin: 2rem 0 .75rem; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.25rem; }
.prose li { margin-bottom: .4rem; }
.prose strong { color: var(--heading); }
.prose blockquote {
  margin: 1.75rem 0; padding: .25rem 0 .25rem 1.5rem;
  border-left: 4px solid var(--nav-border);
  color: #374151; font-style: italic;
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose blockquote cite, .prose .cite { display: block; font-style: normal; font-family: var(--font-body); font-size: .9rem; color: var(--muted); margin-top: .5rem; }
.prose hr { border: 0; border-top: 2px solid var(--line); margin: 2.5rem 0; }
.prose table { border-collapse: collapse; width: 100%; font-family: var(--font-body); font-size: .95rem; margin: 1.5rem 0; display: block; overflow-x: auto; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: .6rem .75rem; text-align: left; vertical-align: top; }
.prose th { color: var(--heading); background: var(--surface-alt); }

.callout, .prose .callout {
  font-family: var(--font-body); font-size: 1.05rem;
  background: var(--surface-alt); border: 1px solid var(--line); border-left: 6px solid var(--green-700);
  border-radius: .75rem; padding: 1.1rem 1.4rem; margin: 2rem 0; color: var(--heading);
}
.prose .callout p:last-child { margin-bottom: 0; }
.callout-myth { border-left-color: #b45309; background: #fffbeb; }
.callout-label { display: block; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--green-800); margin-bottom: .35rem; }
.callout-myth .callout-label { color: #92400e; }

.pullquote, .prose .pullquote {
  max-width: none; margin: 2.5rem 0; padding: 0; border: 0;
  font-family: var(--font-accent); font-style: italic; font-size: clamp(1.4rem, 3vw, 1.9rem); line-height: 1.35; color: var(--green-900);
}

.figure { margin: 2rem 0; max-width: var(--measure); }
.figure img { width: 100%; border-radius: var(--radius); background: var(--line); }
.figure figcaption { font-family: var(--font-body); font-size: .88rem; line-height: 1.45; color: #4b5563; margin-top: .6rem; }
.figure .credit { color: var(--subtle); white-space: nowrap; }
@media (min-width: 1100px) {
  .prose > .figure-wide { max-width: calc(var(--measure) + 12rem); }
}
@media (min-width: 640px) {
  .figure-half { float: right; width: 46%; margin: .4rem 0 1.25rem 1.75rem; }
  .figure-small { float: right; width: 34%; margin: .4rem 0 1.25rem 1.75rem; }
}
.prose h2, .prose hr, .prose .callout, .prose .figure-wide { clear: both; }

.go-deeper {
  display: grid; gap: 2rem; padding-top: 2.5rem; padding-bottom: 2.5rem;
  border-top: 2px solid var(--line);
  font-family: var(--font-body);
}
@media (min-width: 900px) { .go-deeper { grid-template-columns: 1fr 1fr; } }
.go-deeper h2 { font-size: 1.5rem; }
.link-list, .source-list { list-style: none; margin: 0; padding: 0; }
.link-list li { padding: .75rem 0; border-bottom: 1px solid var(--line); }
.link-list a { font-weight: 700; text-decoration: none; }
.link-list a:hover { text-decoration: underline; }
.link-list span { display: block; font-size: .9rem; color: var(--muted); }
.source-list li { font-size: .92rem; color: #4b5563; padding: .35rem 0 .35rem 1.1rem; position: relative; }
.source-list li::before { content: "§"; position: absolute; left: 0; color: var(--subtle); }

.lesson-pager { display: grid; gap: 1rem; padding-top: 1rem; padding-bottom: 4rem; }
@media (min-width: 768px) { .lesson-pager { grid-template-columns: 1fr 1fr; } }
.lesson-pager a {
  display: block; padding: 1.25rem 1.5rem; border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: var(--heading);
}
.lesson-pager a:hover { border-color: var(--green-600); background: var(--green-50); }
.lesson-pager span { display: block; font-size: .85rem; color: var(--green-800); font-weight: 700; }
.lesson-pager strong { font-family: var(--font-heading); font-size: 1.2rem; }
.pager-next { text-align: right; }

/* ---------- Myths ---------- */
.myth-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); }
.myth-card {
  display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 2rem 2rem 1.75rem;
}
.myth-card h3 { font-family: var(--font-body); font-size: 1.15rem; line-height: 1.35; margin-bottom: .9rem; }
.myth-card h3 .tag, .myth-card .truth .tag { display: block; font-size: .72rem; letter-spacing: .08em; font-weight: 700; margin-bottom: .2rem; }
.myth-card h3 .tag { color: #b45309; }
.myth-card .truth { color: #374151; margin: 0 0 1rem; }
.myth-card .truth .tag { color: var(--green-700); }
.myth-card .links { margin-top: auto; font-size: .8rem; font-weight: 700; display: flex; flex-wrap: wrap; gap: .25rem 1rem; }
.myth-card .links a { text-decoration: none; color: var(--green-900); }
.myth-card .links a:hover { text-decoration: underline; }
.expert { display: flex; gap: 1rem; align-items: center; max-width: 30rem; font-size: .95rem; }
.expert img { width: 6.5rem; height: 6.5rem; border-radius: 999px; object-fit: cover; flex: 0 0 auto; }
.expert blockquote { margin: 0; }
.expert cite { display: block; margin-top: .5rem; font-style: normal; color: var(--muted); font-size: .85rem; }

/* ---------- Timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; max-width: 52rem; }
.timeline::before { content: ""; position: absolute; left: 6.25rem; top: .5rem; bottom: .5rem; width: 2px; background: var(--nav-border); }
.timeline li { display: grid; grid-template-columns: 5.5rem 1fr; gap: 1.5rem; padding: 0 0 1.75rem; position: relative; }
.timeline li::before { content: ""; position: absolute; left: calc(6.25rem - 5px); top: .45rem; width: 12px; height: 12px; border-radius: 999px; background: var(--surface); border: 3px solid var(--green-700); }
.timeline .when { font-family: var(--font-heading); font-weight: 700; color: var(--green-800); text-align: right; line-height: 1.3; }
.timeline .when small { display: block; font-family: var(--font-body); font-weight: 400; font-size: .78rem; color: var(--muted); }
.timeline .what { padding-left: 1rem; }
.timeline .what h3 { font-family: var(--font-body); font-size: 1.1rem; margin: 0 0 .25rem; }
.timeline .what p { margin: 0; color: #374151; }
.timeline .what a { font-size: .9rem; font-weight: 700; }
.timeline .era { display: block; grid-template-columns: none; padding: 1rem 0 1.75rem 7.75rem; }
.timeline .era::before { display: none; }
.timeline .era h2 { font-size: 1.6rem; margin: 0; }
.timeline .key .what h3 { color: var(--green-900); }
.timeline .key::before { background: var(--green-700); }
@media (max-width: 599px) {
  .timeline::before { left: .35rem; }
  .timeline li { grid-template-columns: 1fr; gap: .25rem; padding-left: 1.75rem; }
  .timeline li::before { left: 0; }
  .timeline .when { text-align: left; }
  .timeline .what { padding-left: 0; }
  .timeline .era { padding-left: 1.75rem; }
}

/* ---------- Glossary + library ---------- */
.glossary { max-width: 52rem; }
.glossary dt { font-family: var(--font-heading); font-weight: 700; font-size: 1.2rem; color: var(--heading); margin-top: 1.75rem; scroll-margin-top: 1rem; }
.glossary dt small { font-family: var(--font-body); font-weight: 400; font-size: .85rem; color: var(--muted); }
.glossary dd { margin: .35rem 0 0; color: #374151; font-family: var(--font-reading); font-size: 1.08rem; }
.glossary dd a { font-family: var(--font-body); font-size: .9rem; font-weight: 700; }
.az { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.az a { display: inline-block; min-width: 2.2rem; text-align: center; padding: .25rem .4rem; border: 1px solid var(--line); border-radius: .4rem; text-decoration: none; font-weight: 700; }
.az a:hover { background: var(--green-100); }

.study-list { display: grid; gap: 1.5rem; }
.study {
  display: grid; gap: 1.5rem; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 1.5rem;
}
@media (min-width: 640px) { .study { grid-template-columns: 8rem 1fr; padding: 2rem; } }
.study img { width: 8rem; border-radius: .5rem; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.study h3 { font-size: 1.3rem; margin-bottom: .25rem; }
.study .by { color: var(--muted); font-size: .9rem; margin: 0 0 .75rem; }
.study p { margin: 0 0 .75rem; color: #374151; }
.study .verdict { font-size: .92rem; padding: .6rem .9rem; border-radius: .5rem; background: var(--green-50); color: var(--green-900); }
.study .verdict.caution { background: var(--warn-bg); color: #78350f; }
.study .date { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--green-700); }

/* ---------- Quiz ---------- */
.quiz { max-width: 48rem; }
.quiz-q { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.75rem; margin-bottom: 1.5rem; }
.quiz-q legend { font-family: var(--font-heading); font-weight: 700; font-size: 1.25rem; color: var(--heading); padding: 0; margin-bottom: 1rem; }
.quiz-q fieldset { border: 0; margin: 0; padding: 0; }
.quiz-q .num { display: block; font-family: var(--font-body); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--green-700); margin-bottom: .25rem; }
.quiz-option { display: flex; gap: .75rem; align-items: flex-start; padding: .7rem .9rem; border: 1px solid var(--line); border-radius: .6rem; margin-bottom: .5rem; cursor: pointer; }
.quiz-option:hover { background: var(--surface-alt); }
.quiz-option input { margin-top: .3rem; accent-color: var(--green-700); }
.quiz-option.correct { border-color: var(--green-600); background: var(--green-50); }
.quiz-option.incorrect { border-color: #d97706; background: #fffbeb; }
.quiz-explain { margin-top: 1rem; padding: 1rem 1.1rem; border-radius: .6rem; background: var(--surface-alt); color: #374151; }
.quiz-explain[hidden] { display: none; }
.quiz-explain strong { color: var(--heading); }
.quiz-score { position: sticky; bottom: 1rem; z-index: 5; background: var(--darker); color: #fff; border-radius: 999px; padding: .75rem 1.5rem; display: inline-block; font-weight: 700; box-shadow: var(--shadow); }
.quiz-result { margin-top: 1rem; }

/* ---------- Visit ---------- */
.place-grid { display: grid; gap: 2rem; }
@media (min-width: 900px) { .place-grid { grid-template-columns: repeat(2, 1fr); } }
.place { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.place img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.place-body { padding: 1.5rem 1.75rem 1.75rem; }
.place-body h3 { font-size: 1.5rem; }
.place-body .addr { font-weight: 700; color: var(--green-800); margin: 0 0 .5rem; }
.place-body p { color: #374151; }

/* ---------- Page header (non-lesson pages) ---------- */
.page-head { padding-top: 3rem; padding-bottom: 2rem; }
@media (min-width: 768px) { .page-head { padding-top: 4.5rem; padding-bottom: 2.5rem; } }
.page-head .lede { font-weight: 400; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { background: var(--darker); color: #d1d5db; padding: 4rem 0 3rem; }
.site-footer a { color: #d1d5db; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.5rem; padding-bottom: 2rem; border-bottom: 1px solid #374151; }
.footer-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; color: #fff; }
.site-footer .btn, .site-footer .btn:hover { color: #fff7ed; }
.site-footer .btn::before { background: #fff; }
.site-footer .btn:hover span { color: var(--green-900); position: relative; }
.footer-links { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 2rem; margin: 2.5rem 0; padding: 0; }
.footer-fine { text-align: center; color: var(--muted); font-size: .9rem; max-width: 46rem; margin: 0 auto; }
.footer-fine a { color: var(--subtle); text-decoration: underline; }

@media print {
  .site-nav, .book-tab, .drawer, .lesson-pager, .site-footer { display: none !important; }
  .frame { border: 0; box-shadow: none; margin: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn::before, .lesson-card { transition: none; }
}
