/* ============================================================
   Pastor Keith Park – shared design system + page styles
   Ported verbatim from mockup CSS. No Tailwind utilities used.
   ============================================================ */

:root {
  --paper: #fbfaf7;
  --paper-2: #f4f1ea;
  --surface: #ffffff;
  --surface-2: #f6f4ee;
  --surface-3: #efece4;
  --ink: #16161a;
  --ink-2: #54525c;
  --ink-3: #736f6a;
  --line: #e9e6dd;
  --line-2: #d9d4c8;
  --accent: #2f54eb;
  --accent-deep: #2741c4;
  --accent-text: #2741c4;
  --accent-tint: #e9edfd;
  --accent-tint-2: #d8e0fb;
  --accent-soft: #eef1fe;
  --accent-glow: rgba(47, 84, 235, .18);
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;
  --sh-1: 0 1px 2px rgba(22, 22, 26, .05);
  --sh-2: 0 4px 14px rgba(22, 22, 26, .07);
  --sh-3: 0 24px 64px rgba(22, 22, 26, .16);
  --sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --content: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 32px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 14.5px;
  font-weight: 600;
  border-radius: var(--r-md);
  padding: 12px 20px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: .18s var(--ease);
}
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 20px var(--accent-glow); }
.btn-primary:hover { background: var(--accent-deep); transform: translateY(-1px); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-text); }

/* ——— HEADER ——— */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 30; color: #fff; transition: .3s var(--ease); }
.site-header .bar { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand .mark {
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 20px var(--accent-glow);
}
.brand .mark svg { width: 19px; height: 19px; }
.brand .bt { font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.brand .bt small {
  display: block; font-size: 10.5px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; opacity: .82; margin-top: 2px;
}
nav.links { display: flex; align-items: center; gap: 24px; font-size: 14.5px; font-weight: 500; }
nav.links a { opacity: .86; }
nav.links a:hover { opacity: 1; }
nav.links a[aria-current="page"] { opacity: 1; font-weight: 600; }
.bar-right { display: flex; align-items: center; gap: 18px; }

.site-header.solid {
  color: var(--ink);
  background: rgba(251, 250, 247, .86);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header.solid .brand .bt small { opacity: 1; color: var(--ink-3); }
.site-header.solid nav.links a { opacity: 1; color: var(--ink-2); }
.site-header.solid nav.links a:hover,
.site-header.solid nav.links a[aria-current="page"] { color: var(--accent-text); }

/* ——— HOME: HERO ——— */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  overflow: hidden;
}
.hero .bg { position: absolute; inset: 0; }
.hero .bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.hero .bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(15,17,22,.6) 0%, rgba(15,17,22,.28) 32%, rgba(15,17,22,.42) 66%, rgba(20,22,28,.92) 100%),
    radial-gradient(78% 60% at 50% 36%, rgba(47,84,235,.24), transparent 62%);
}
.hero .inner { position: relative; width: 100%; max-width: 1000px; padding: 0 26px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .04em;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.24);
  border-radius: var(--r-pill); padding: 7px 15px; margin: 0 0 24px;
  backdrop-filter: blur(4px);
}
.eyebrow .pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,.22);
}

.hero h1 {
  font-weight: 800;
  font-size: clamp(34px, 4.7vw, 56px);
  line-height: 1.03;
  letter-spacing: -.035em;
  margin: 0 0 18px;
  text-shadow: 0 2px 40px rgba(0,0,0,.32);
}
.hero .sub {
  font-size: clamp(16px, 2.2vw, 20px);
  color: rgba(255,255,255,.9);
  margin: 0 auto 32px;
  max-width: 40ch;
}

/* search bar */
.search {
  max-width: 600px; margin: 0 auto;
  display: flex; align-items: center; gap: 11px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: var(--r-pill);
  padding: 8px 8px 8px 20px;
  backdrop-filter: blur(12px);
  box-shadow: 0 16px 50px rgba(0,0,0,.34);
  transition: .22s var(--ease);
}
.search:focus-within {
  background: rgba(255,255,255,.18);
  border-color: #fff;
  box-shadow: 0 16px 50px rgba(0,0,0,.34), 0 0 0 4px rgba(255,255,255,.16);
}
.search .s-ico { width: 20px; height: 20px; color: #fff; flex: none; }
.search input {
  flex: 1; border: 0; outline: 0; background: transparent;
  font-family: var(--sans); font-size: 16.5px; color: #fff;
  padding: 12px 0; min-width: 0;
}
.search input::placeholder { color: rgba(255,255,255,.7); transition: color .5s var(--ease); }
.search input.ph-fading::placeholder { color: transparent; }
.send {
  width: 48px; height: 48px; border: 0; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex: none;
  box-shadow: 0 8px 22px var(--accent-glow);
  transition: .2s var(--ease);
}
.send svg { width: 21px; height: 21px; }
.send:hover { background: #3a60ff; transform: translateY(-1px); }

.suggest {
  display: flex; flex-wrap: wrap; gap: 9px;
  justify-content: center; margin-top: 18px;
}
.suggest a {
  font-size: 13px; font-weight: 500; color: #fff;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.24);
  border-radius: var(--r-pill); padding: 8px 15px;
  transition: .16s var(--ease); backdrop-filter: blur(4px);
}
.suggest a:hover { background: rgba(255,255,255,.2); border-color: #fff; transform: translateY(-1px); }

.scrollcue {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  color: rgba(255,255,255,.72);
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
}
.scrollcue svg { width: 18px; height: 18px; animation: bob 1.8s var(--ease) infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

/* ——— HOME: FEATURED (most asked) ——— */
.feat { padding: 58px 0 6px; scroll-margin-top: 86px; }
.feat .flabel {
  font-size: 12.5px; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--accent-text); margin: 0 0 18px;
}
.feat .fgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.door {
  position: relative; border-radius: var(--r-lg); overflow: hidden;
  aspect-ratio: 16/9; cursor: pointer; border: 0; padding: 0;
  background: var(--paper-2); font-family: var(--sans); text-align: left;
  box-shadow: var(--sh-1); display: block; width: 100%;
}
.door img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: .5s var(--ease); }
.door::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(16,18,24,0) 0%, rgba(16,18,24,.12) 60%, rgba(16,18,24,.30) 100%);
  transition: .3s var(--ease);
}
.door .lab {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
  background: rgba(16,18,24,.75); padding: 14px 18px;
}
.door .lab .t { font-size: 18px; font-weight: 700; letter-spacing: -.015em; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.3); }
.door .lab .t small {
  display: block; font-size: 11.5px; font-weight: 500;
  color: rgba(255,255,255,.82); text-transform: uppercase; letter-spacing: .09em; margin-top: 4px;
}
.door .lab .arrow {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.34);
  display: flex; align-items: center; justify-content: center;
  color: #fff; flex: none; backdrop-filter: blur(4px); transition: .2s var(--ease);
}
.door .lab .arrow svg { width: 16px; height: 16px; }
.door:hover img { transform: scale(1.06); }
.door:hover .lab .arrow { background: var(--accent); border-color: transparent; }

/* ——— HOME: BROWSE SECTIONS ——— */
.browse-intro { text-align: left; padding: 66px 0 6px; }
.browse-intro .seclabel {
  font-size: 12.5px; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--accent-text); margin: 0 0 12px;
}
.browse-intro h2 { font-weight: 800; font-size: clamp(26px, 3.4vw, 38px); letter-spacing: -.03em; margin: 0; }
.browse-intro p { font-size: 16.5px; color: var(--ink-2); margin: 12px 0 0; max-width: 56ch; }

section.block { padding: 34px 0; scroll-margin-top: 86px; }
section.block + section.block { border-top: 1px solid var(--line); }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.head-row h3 { font-weight: 800; font-size: 20px; letter-spacing: -.025em; margin: 0; }
.head-row .aside { font-size: 13px; color: var(--ink-3); }

.seg {
  display: inline-flex; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: var(--r-pill);
  padding: 3px; font-size: 13px;
}
.seg button {
  border: 0; background: transparent; color: var(--ink-2);
  font-weight: 600; font-family: var(--sans);
  padding: 7px 15px; border-radius: var(--r-pill);
  cursor: pointer; transition: .2s var(--ease);
}
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); }

.books { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.book {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 11px 14px;
  font-size: 14px; font-weight: 500;
  box-shadow: var(--sh-1); transition: .18s var(--ease);
}
.book:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: var(--sh-2); }
.book .n { font-size: 12px; color: var(--ink-3); font-weight: 400; font-variant-numeric: tabular-nums; }
.book.featured { border: 1.5px solid var(--accent); background: var(--accent-soft); }
.book.featured .n { color: var(--accent-text); font-weight: 600; }
.book.all { color: var(--accent-text); font-weight: 600; cursor: pointer; }
.book.all svg { width: 15px; height: 15px; }
.hidden { display: none; }

.topics { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.topic {
  font-size: 14px; font-weight: 500;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-pill); padding: 8px 15px;
  color: var(--ink); transition: .18s var(--ease);
}
.topic:hover { border-color: var(--accent); color: var(--accent-text); }
.topic .n { color: var(--ink-3); font-weight: 400; margin-left: 5px; font-size: 13px; }
.topic.more { background: var(--accent-tint); border-color: transparent; color: var(--accent-text); font-weight: 600; }
.topic.t-lg { font-size: 17px; font-weight: 600; padding: 11px 20px; }
.topic.t-md { font-size: 15px; padding: 10px 17px; }
.topic.t-sm { font-size: 13px; padding: 8px 14px; }

.occasions { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 12px; }
.occ {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 20px 12px; text-align: center;
  box-shadow: var(--sh-1); transition: .18s var(--ease);
}
.occ:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--sh-2); }
.occ .oico {
  width: 40px; height: 40px; margin: 0 auto 11px; border-radius: 12px;
  background: var(--accent-tint); color: var(--accent-text);
  display: flex; align-items: center; justify-content: center;
}
.occ .oico svg { width: 19px; height: 19px; }
.occ .name { font-size: 14px; font-weight: 600; margin-bottom: 3px; }
.occ .n { font-size: 12px; color: var(--ink-3); }
.occ.more {
  border-style: dashed; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: var(--accent-text); font-weight: 600;
}

.series { display: grid; grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); gap: 14px; }
.arc {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); overflow: hidden;
  box-shadow: var(--sh-1); transition: .18s var(--ease);
}
.arc:hover { transform: translateY(-2px); box-shadow: var(--sh-2); }
.arc .cover {
  height: 130px;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  display: flex; align-items: center; justify-content: center;
  color: #fff; position: relative;
}
.arc .cover img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; transition: .5s var(--ease); z-index: 0;
}
.arc:hover .cover img { transform: scale(1.06); }
.arc .cover::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(16,18,24,.12), rgba(16,18,24,.5));
}
.arc .cover .badge {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  font-size: 11px; font-weight: 600;
  background: rgba(255,255,255,.92); color: var(--accent-text);
  padding: 3px 9px; border-radius: var(--r-pill);
}
.arc .cover .playdot {
  position: relative; z-index: 2;
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(255,255,255,.94); color: var(--accent-text);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(0,0,0,.32);
}
.arc .cover .playdot svg { width: 18px; height: 18px; }
.arc .meta { padding: 13px 14px; }
.arc .meta .t { font-size: 15px; font-weight: 700; letter-spacing: -.01em; margin: 0 0 3px; }
.arc .meta .c { font-size: 12px; color: var(--ink-3); margin: 0; }

/* ——— FOOTER ——— */
footer {
  border-top: 1px solid var(--line);
  padding: 44px 0 40px;
  margin-top: 26px;
  background: var(--surface-2);
}
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 30px; }
.foot-brand .bt { font-weight: 700; font-size: 16px; }
.foot-brand p { font-size: 13.5px; color: var(--ink-3); margin: 12px 0 0; max-width: 40ch; line-height: 1.6; }
.foot h4 {
  font-size: 12px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-3); margin: 0 0 14px;
}
.foot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.foot a { font-size: 14px; color: var(--ink-2); }
.foot a:hover { color: var(--accent-text); }
.foot-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px;
  margin-top: 34px; padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--ink-3);
}
.foot-bottom .credit a {
  color: var(--accent-text); text-decoration: none; transition: color .15s var(--ease);
}
.foot-bottom .credit a:hover { color: #5b7ff5; }

/* ——— ABOUT: HERO (compact) ——— */
.about-hero {
  position: relative; min-height: 54vh;
  display: flex; align-items: flex-end; overflow: hidden; color: #fff;
}
.about-hero .bg { position: absolute; inset: 0; }
.about-hero .bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 26%; }
.about-hero .bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,17,22,.5) 0%, rgba(15,17,22,.14) 42%, rgba(15,17,22,.52) 78%, rgba(15,17,22,.9) 100%);
}
.about-hero .inner {
  position: relative; width: 100%; max-width: 1160px;
  margin: 0 auto; padding: 120px 32px 50px;
}
.about-hero .eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.26);
  border-radius: var(--r-pill); padding: 7px 15px; margin: 0 0 20px; backdrop-filter: blur(4px);
}
.about-hero h1 {
  font-weight: 800; font-size: clamp(40px, 6vw, 72px);
  line-height: 1; letter-spacing: -.04em; margin: 0 0 16px;
  text-shadow: 0 2px 40px rgba(0,0,0,.3);
}
.about-hero .sub {
  font-size: clamp(16px, 2vw, 20px);
  color: rgba(255,255,255,.92); margin: 0; max-width: 56ch; line-height: 1.5;
}

/* ——— ABOUT: CHAPTER GRAMMAR ——— */
.feature { max-width: var(--content); margin: 0 auto; padding: 0 32px; }
.chapter { display: grid; grid-template-columns: 266px minmax(0, 1fr); gap: 56px; padding: 66px 0; }
.chapter + .chapter { border-top: 1px solid var(--line); }
.rail { display: flex; flex-direction: column; gap: 9px; position: sticky; top: 100px; align-self: start; }
.rail .num { font-size: 13px; font-weight: 800; letter-spacing: .06em; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.rail .lbl { font-size: 13px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; color: var(--ink-3); line-height: 1.35; }
.rail .rule { width: 34px; height: 2px; background: var(--line-2); margin: 3px 0 4px; }
.rail .dek { font-size: 15.5px; line-height: 1.5; color: var(--ink-2); font-weight: 500; max-width: 22ch; }
.body { min-width: 0; max-width: 760px; }
.body h2 { font-weight: 800; font-size: clamp(26px, 3.3vw, 36px); line-height: 1.1; letter-spacing: -.032em; margin: 0 0 20px; }
.body .lead { font-size: clamp(18px, 2vw, 21px); line-height: 1.55; letter-spacing: -.015em; color: var(--ink); font-weight: 600; margin: 0 0 20px; }
.body p { font-size: 16.5px; line-height: 1.8; color: var(--ink-2); margin: 0 0 18px; }
.body p:last-child { margin-bottom: 0; }
.body p strong { color: var(--ink); font-weight: 600; }
.body .drop::first-letter { font-weight: 800; font-size: 3em; line-height: .86; float: left; padding: 8px 12px 0 0; color: var(--accent-text); }

/* image band */
.band { margin: 0 40px; }
.band img { width: 100%; height: clamp(280px, 44vw, 480px); object-fit: cover; object-position: 50% 28%; }
.band figcaption { padding: 12px 2px 0; font-size: 13px; color: var(--ink-3); }

/* quote band */
.qband { background: var(--ink); color: #fff; padding: clamp(52px, 7vw, 84px) 0; }
.qband .in { max-width: 900px; margin: 0 auto; padding: 0 32px; text-align: center; }
.qband svg { width: 38px; height: 38px; color: rgba(255,255,255,.3); margin: 0 auto 20px; }
.qband blockquote { font-weight: 700; font-size: clamp(23px, 3.1vw, 36px); line-height: 1.26; letter-spacing: -.03em; margin: 0; }
.qband cite { display: block; margin-top: 22px; font-size: 12.5px; font-weight: 700; font-style: normal; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.6); }

/* timeline */
.ml-label { font-size: 12px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; color: var(--accent-text); margin: 34px 0 0; }
.timeline { list-style: none; margin: 16px 0 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 2px; background: var(--line-2); }
.timeline li { position: relative; padding: 0 0 24px 42px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline .dot { position: absolute; left: 2px; top: 1px; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); display: flex; align-items: center; justify-content: center; }
.timeline .dot i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.timeline .yr { font-size: 13px; font-weight: 700; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.timeline .ev { font-size: 17px; font-weight: 800; letter-spacing: -.02em; margin: 2px 0 3px; }
.timeline .de { font-size: 15px; color: var(--ink-2); margin: 0; line-height: 1.6; }

/* teaching themes */
.themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 6px; }
.theme { border-top: 2px solid var(--accent); padding-top: 15px; }
.theme .tico { width: 38px; height: 38px; border-radius: 11px; background: var(--accent-tint); color: var(--accent-text); display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.theme .tico svg { width: 19px; height: 19px; }
.theme h3 { font-weight: 800; font-size: 17px; letter-spacing: -.02em; margin: 0 0 6px; }
.theme p { font-size: 14.5px; color: var(--ink-2); margin: 0; line-height: 1.6; }

/* road-ahead panel */
.panel {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff; border-radius: var(--r-lg); padding: 26px 28px;
  margin-top: 22px; position: relative; overflow: hidden;
}
.panel::after { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 120% at 90% 0%, rgba(255,255,255,.16), transparent 58%); pointer-events: none; }
.panel .ph { position: relative; font-size: 12px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; color: rgba(255,255,255,.82); margin: 0 0 14px; }
.panel ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 13px; position: relative; }
.panel ul li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.5; color: #fff; }
.panel ul .ck { width: 27px; height: 27px; flex: none; border-radius: 8px; background: rgba(255,255,255,.16); display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.panel ul .ck svg { width: 15px; height: 15px; color: #fff; }

/* family photo */
.body figure.inl { margin: 22px 0 0; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--sh-2); }
.body figure.inl img { width: 100%; height: auto; aspect-ratio: 16/10; object-fit: cover; }

/* closing */
.closing { max-width: var(--content); margin: 0 auto; padding: 70px 32px 84px; text-align: center; border-top: 1px solid var(--line); }
.closing h2 { font-weight: 800; font-size: clamp(26px, 3.3vw, 36px); line-height: 1.12; letter-spacing: -.032em; margin: 0 0 12px; }
.closing p { font-size: 16.5px; color: var(--ink-2); max-width: 56ch; margin: 0 auto 26px; }
.closing .cta-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ——— CATALOG STUB ——— */
.catalog-stub {
  min-height: 80vh; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 120px 32px 80px;
}
.catalog-stub .inner { max-width: 520px; }
.catalog-stub .mark {
  width: 56px; height: 56px; border-radius: 16px;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px; box-shadow: 0 12px 30px var(--accent-glow);
}
.catalog-stub .mark svg { width: 26px; height: 26px; }
.catalog-stub h1 { font-weight: 800; font-size: clamp(28px, 4vw, 40px); letter-spacing: -.03em; margin: 0 0 14px; }
.catalog-stub p { font-size: 17px; color: var(--ink-2); margin: 0 0 28px; max-width: 42ch; margin-left: auto; margin-right: auto; }
.catalog-stub .q-tag {
  display: inline-block; font-size: 13px; font-weight: 600;
  background: var(--accent-tint); color: var(--accent-text);
  border-radius: var(--r-pill); padding: 6px 14px; margin-bottom: 28px;
}

/* ============================================================
   RESULTS PAGE — chat shell (ported from comp, full-page layout)
   No mini-player, no answer cards, no AI prose.
   ============================================================ */

/* Full-height page shell */
.results-page {
  display: flex;
  height: 100dvh;
  overflow: hidden;
  background: var(--paper);
}

/* ── Sidebar ── */
.cside {
  width: 272px;
  flex: none;
  background: #f3f0e8;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cs-head { display: flex; align-items: center; padding: 16px 14px 8px; }
.cs-brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink);
  background: none; border: 0; padding: 0; cursor: pointer;
  font-family: var(--sans);
}
.cs-brand .mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 18px var(--accent-glow); flex: none;
}
.cs-brand .mark svg { width: 16px; height: 16px; }
.cs-brand .bt { font-weight: 700; font-size: 14px; line-height: 1.1; }
.cs-brand .bt small { display: block; font-size: 9px; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-3); margin-top: 2px; }

.cs-new {
  margin: 6px 12px 8px;
  display: flex; align-items: center; gap: 9px;
  font-size: 14px; font-weight: 600; color: var(--ink);
  background: var(--paper-2); border: 1px solid var(--line-2);
  border-radius: 11px; padding: 10px 13px;
  text-decoration: none;
  box-shadow: var(--sh-1); transition: .15s var(--ease);
}
.cs-new:hover { background: var(--surface-3); border-color: var(--line-2); color: var(--ink); transform: translateY(-1px); }
.cs-new svg { width: 16px; height: 16px; }
.cs-new .kbd-hint {
  margin-left: auto;
  font-size: 10px; font-weight: 500; font-family: system-ui, sans-serif;
  color: var(--ink-3);
  background: var(--surface-2, rgba(0,0,0,.06));
  border: 1px solid var(--line-1, rgba(0,0,0,.08));
  border-radius: 5px;
  padding: 2px 6px;
  line-height: 1;
  letter-spacing: .02em;
}

.cs-scroll { flex: 1; overflow-y: auto; padding: 4px 8px 16px; }
.cs-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-3); padding: 12px 10px 6px;
  margin: 0;
}

.cs-item {
  display: flex; align-items: center; gap: 9px;
  width: 100%; text-align: left;
  border-radius: 9px; padding: 8px 10px;
  font-size: 13.5px; font-weight: 500; color: var(--ink-2);
  text-decoration: none;
  transition: .14s var(--ease); line-height: 1.3;
}
.cs-item:hover { background: #eae6db; color: var(--ink); }
.cs-item .n { margin-left: auto; font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

details.cs-acc > summary {
  list-style: none;
  display: flex; align-items: center; gap: 8px;
  padding: 9px 10px;
  font-size: 12.5px; font-weight: 700; color: var(--ink-2);
  cursor: pointer; border-radius: 9px;
}
details.cs-acc > summary::-webkit-details-marker { display: none; }
details.cs-acc > summary:hover { background: #eae6db; }
details.cs-acc > summary .chv { width: 14px; height: 14px; color: var(--ink-3); transition: transform .2s var(--ease); margin-left: auto; }
details.cs-acc[open] > summary .chv { transform: rotate(90deg); }
.cs-sub { padding: 2px 0 6px 6px; }

/* ── Main column ── */
.cmain { flex: 1; display: flex; flex-direction: column; min-width: 0; position: relative; }

.cmain-bar {
  flex: none; display: flex; align-items: center; gap: 10px;
  height: 50px; padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.cmain-bar .hamb {
  display: none; width: 34px; height: 34px; border: 0;
  border-radius: 8px; background: var(--surface-2); color: var(--ink-2);
  cursor: pointer; align-items: center; justify-content: center; flex: none;
}
.cmain-bar .hamb svg { width: 17px; height: 17px; }

.ctitle {
  flex: 1; font-size: 13px; font-weight: 600; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ctitle small { color: var(--ink-3); font-weight: 500; }

.cm-x {
  width: 38px; height: 38px; border: 0; border-radius: 11px;
  background: var(--surface-2); color: var(--ink-2);
  display: flex; align-items: center; justify-content: center;
  text-decoration: none;
  transition: .15s var(--ease); flex: none;
}
.cm-x:hover { background: var(--paper-2); color: var(--ink); }
.cm-x svg { width: 19px; height: 19px; }

/* ── Thread ── */
.cthread { flex: 1; overflow-y: auto; }
.cthread-in { max-width: 760px; margin: 0 auto; padding: 28px 26px 22px; }

/* Messages */
.msg { display: flex; gap: 13px; margin-bottom: 24px; }
.msg.user { justify-content: flex-end; }
.msg.user .bubble {
  background: var(--accent); color: #fff;
  padding: 11px 16px; border-radius: 18px 18px 5px 18px;
  max-width: 80%; font-size: 15px; font-weight: 500;
  box-shadow: 0 8px 18px var(--accent-glow);
}
.msg.ai .av {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--accent); color: #fff; flex: none;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 18px var(--accent-glow);
}
.msg.ai .av svg { width: 18px; height: 18px; }
.msg.ai .content { flex: 1; min-width: 0; }
.who2 { font-size: 12.5px; font-weight: 700; color: var(--ink); margin: 4px 0 10px; }

/* Streamed answer */
.answer-lead { margin: 0 0 12px; }
.answer-lead p.lead {
  font-size: 15.5px; line-height: 1.72; margin: 0 0 12px; color: var(--ink);
}
.answer-lead .cite {
  color: var(--accent-text); font-weight: 600; font-size: 12px;
  text-decoration: none;
}
.answer-lead .cite:hover { text-decoration: underline; }
.answer-lead .cite-link {
  color: var(--accent-text); font-weight: 600; font-size: inherit;
  text-decoration: none;
}
.answer-lead .cite-link:hover { text-decoration: underline; }
.note {
  font-size: 11.5px; color: var(--ink-3); margin: 0 0 18px;
  display: flex; align-items: center; gap: 6px;
}
.note svg { width: 13px; height: 13px; flex: none; color: var(--accent-text); }

/* Typing indicator */
.typing { display: flex; gap: 5px; align-items: center; height: 22px; }
.typing i {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ink-3); opacity: .5;
  animation: blink 1s infinite;
}
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink {
  0%, 100% { opacity: .3; transform: translateY(0); }
  50%      { opacity: 1;  transform: translateY(-3px); }
}

/* Source cards (inline YouTube players for cited passages) */
.sources-label {
  font-size: 12px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-3); margin: 18px 0 10px;
}

/* Unified source card — visual state driven by .src-large / .src-small */
.src-card {
  border-radius: var(--r-lg); background: var(--surface);
  margin-bottom: 12px; overflow: hidden;
  transition: border .25s var(--ease), box-shadow .25s var(--ease), padding .25s var(--ease),
              opacity .3s var(--ease), transform .3s var(--ease);
}
/* Collapsed state for height-grow reveal (JS drives max-height/opacity per frame) */
.src-card.src-collapsed { max-height: 0; overflow: hidden; opacity: 0; }
.src-head {
  display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap;
}
.src-num {
  width: 24px; height: 24px; border-radius: 8px;
  background: var(--accent-tint); color: var(--accent-text);
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex: none;
  margin-top: 2px;
}
.src-meta {
  display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0;
}
.src-title {
  font-size: 14px; font-weight: 700; color: var(--ink);
  line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.src-sub {
  font-size: 12px; color: var(--ink-3); line-height: 1.4;
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
}
.src-badge {
  font-size: 10px; font-weight: 700; letter-spacing: .03em;
  color: var(--ink-3); background: var(--line);
  padding: 1px 7px; border-radius: var(--r-pill); white-space: nowrap;
}
.src-ts {
  font-size: 11px; font-weight: 600; color: var(--accent-text);
  background: var(--accent-tint); padding: 1px 7px; border-radius: var(--r-pill);
}
.src-link {
  font-size: 12px; font-weight: 600; color: var(--accent-text);
  text-decoration: none; margin-left: auto; white-space: nowrap;
}
.src-link:hover { text-decoration: underline; }

/* Player area */
.src-player {
  position: relative; border-radius: var(--r-md); overflow: hidden;
  background: #15171d; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: height .3s var(--ease), opacity .25s var(--ease), margin .25s var(--ease);
}
.src-poster {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  z-index: 2; transition: opacity .25s var(--ease);
}
.src-play {
  position: relative; z-index: 3; border-radius: 50%;
  background: rgba(255,255,255,.92); color: var(--accent-text);
  border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 22px rgba(0,0,0,.3);
  transition: width .25s var(--ease), height .25s var(--ease), opacity .25s var(--ease);
}
.src-play:hover { background: #fff; transform: scale(1.06); }
.src-iframe, .src-yt-container, .src-yt-container iframe {
  width: 100%; height: 100%; position: absolute; inset: 0; border: 0; z-index: 1;
}

/* When a card is playing (src-playing), hide poster + play button to reveal the YT player */
.src-playing .src-poster { opacity: 0; pointer-events: none; }
.src-playing .src-play { opacity: 0; pointer-events: none; }

/* When a card is NOT playing but has a mounted player, poster covers it */
.src-card:not(.src-playing) .src-poster { opacity: 1; }
.src-card:not(.src-playing) .src-play { opacity: 1; }
.src-text {
  font-size: 13px; line-height: 1.6; color: var(--ink-2);
  transition: margin .25s var(--ease), font-size .25s var(--ease);
}

/* ── Large state ── */
.src-large {
  border: 1.5px solid var(--accent); padding: 14px; box-shadow: var(--sh-2);
}
.src-large .src-head { margin-bottom: 10px; }
.src-large .src-player { aspect-ratio: 16/9; margin-bottom: 0; }
.src-large .src-play { width: 56px; height: 56px; }
.src-large .src-play svg { width: 24px; height: 24px; }
.src-large .src-text { margin: 10px 0 0; font-size: 13px; }
.src-large .src-link { font-size: 12px; }

/* ── Small state ── */
.src-small {
  border: 1px solid var(--line); padding: 12px; box-shadow: var(--sh-1);
  cursor: pointer;
  display: flex; align-items: center; gap: 11px;
}
.src-small:hover { border-color: var(--accent); box-shadow: var(--sh-2); }
.src-small .src-player {
  flex: none; width: 128px; height: 72px;
  border-radius: 8px;
}
.src-small .src-play { width: 30px; height: 30px; }
.src-small .src-play svg { width: 14px; height: 14px; }
.src-small .src-body {
  flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column; gap: 4px;
}
.src-small .src-head { align-items: center; }
.src-small .src-meta { min-width: 0; }
.src-small .src-title { font-size: 13px; }
.src-small .src-sub { font-size: 11px; }
.src-small .src-link { display: none; }
.src-small .src-text {
  margin: 0; font-size: 12px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Manuscript card variant ── */
.src-manuscript { border-left: 3px solid var(--accent); }
.src-manuscript.src-large { padding: 16px 14px; }
.src-manuscript.src-small { padding: 12px; }
.src-manuscript .src-text {
  display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical;
  overflow: hidden;
}
.src-manuscript.src-large .src-text {
  -webkit-line-clamp: unset; display: block; overflow: visible;
}
.src-badge-ms {
  font-size: 10px; font-weight: 700; letter-spacing: .03em;
  color: var(--accent-text); background: var(--accent-tint);
  padding: 1px 7px; border-radius: var(--r-pill); white-space: nowrap;
}

/* Results count */
.results-count { font-size: 12px; color: var(--ink-3); margin: 0 0 14px; }

/* Result rows */
.result-row {
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 14px 16px; margin-bottom: 10px;
  background: var(--surface); box-shadow: var(--sh-1);
}
.result-row:hover { border-color: var(--accent); box-shadow: var(--sh-2); }
.result-meta {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap; margin-bottom: 8px;
}
.result-num {
  width: 22px; height: 22px; border-radius: 7px;
  background: var(--accent-tint); color: var(--accent-text);
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex: none;
}
.result-vid { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.result-ts {
  font-size: 12px; font-weight: 600; color: var(--accent-text);
  text-decoration: none; background: var(--accent-tint);
  padding: 2px 8px; border-radius: var(--r-pill);
}
.result-ts:hover { background: var(--accent-tint-2); }
.result-score { font-size: 11.5px; color: var(--ink-3); margin-left: auto; }
.result-scripture-tag {
  font-size: 10.5px; font-weight: 600; letter-spacing: .03em;
  color: #6b4f12; background: #fdf3dc;
  border: 1px solid #e8d89a;
  border-radius: 4px; padding: 1px 6px;
  white-space: nowrap;
}
.result-text { font-size: 14px; line-height: 1.65; color: var(--ink); margin: 0 0 10px; }
.result-yt-link {
  font-size: 12px; font-weight: 600; color: var(--accent-text);
  text-decoration: none;
}
.result-yt-link:hover { text-decoration: underline; }

/* Empty state */
.cempty { max-width: 560px; margin: 6vh auto 0; text-align: center; padding: 0 16px; }
.cempty h2 { font-size: clamp(22px, 3vw, 28px); font-weight: 800; letter-spacing: -.03em; margin: 0 0 10px; }
.cempty p { font-size: 15px; color: var(--ink-2); margin: 0 auto 22px; max-width: 42ch; }
.exs { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; }
.ex-btn {
  font-size: 13.5px; font-weight: 500; color: var(--ink-2);
  background: var(--surface); border: 1px solid var(--line-2);
  border-radius: var(--r-pill); padding: 9px 15px;
  text-decoration: none; transition: .15s var(--ease);
}
.ex-btn:hover { border-color: var(--accent); color: var(--accent-text); }

/* Related pills (after source cards) — staggered fade+slide-up */
.related-pills { margin-top: 16px; }
.related-label {
  font-size: 12px; font-weight: 600; color: var(--ink-3);
  letter-spacing: .04em; text-transform: uppercase;
  margin: 0 0 8px;
  opacity: 0; transform: translateY(6px);
}
.related-list { display: flex; flex-wrap: wrap; gap: 8px; }
.related-list > a {
  opacity: 0; transform: translateY(6px);
}

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

.related-pills.is-in .related-label {
  animation: relatedIn .3s var(--ease) forwards;
}
.related-pills.is-in .related-list > a {
  animation: relatedIn .3s var(--ease) forwards;
}
.related-pills.is-in .related-list > a:nth-child(1) { animation-delay: .06s; }
.related-pills.is-in .related-list > a:nth-child(2) { animation-delay: .12s; }
.related-pills.is-in .related-list > a:nth-child(3) { animation-delay: .18s; }

/* Scroll-to-bottom button */
.scroll-btm {
  position: absolute; bottom: 80px; left: 50%; transform: translateX(-50%) translateY(6px);
  z-index: 10; width: 36px; height: 36px; border: 1px solid var(--line-2);
  border-radius: 50%; background: var(--surface); color: var(--ink-2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: var(--sh-2);
  opacity: 0; pointer-events: none;
  transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.scroll-btm svg { width: 18px; height: 18px; }
.scroll-btm.visible {
  opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0);
}
.scroll-btm:hover {
  background: var(--accent); color: #fff; border-color: var(--accent);
}

/* Composer */
.ccomposer { flex: none; padding: 12px 0 18px; border-top: 1px solid var(--line); background: var(--paper); }
.ccomposer-in { max-width: 760px; margin: 0 auto; padding: 0 26px; }
.cbar {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--line-2);
  border-radius: 24px; padding: 8px 8px 8px 18px; box-shadow: var(--sh-2);
}
.cbar input[type="text"] {
  flex: 1; border: 0; outline: 0; background: transparent;
  font-family: var(--sans); font-size: 15px; color: var(--ink);
  padding: 6px 0; min-width: 0;
}
.cbar input[type="text"]::placeholder { color: var(--ink-3); }
.cbar:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.cbar .send {
  width: 38px; height: 38px; border: 0; border-radius: 50%;
  background: var(--accent); color: #fff; flex: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: .15s var(--ease);
}
.cbar .send:hover { background: var(--accent-deep); }
.cbar .send svg { width: 17px; height: 17px; }
.hint { text-align: center; font-size: 11px; color: var(--ink-3); margin: 8px 0 0; }

/* ── Mobile: drawer sidebar ── */
@media (max-width: 820px) {
  .cmain-bar .hamb { display: flex; }
  .cside {
    position: fixed; inset: 0 auto 0 0; z-index: 50;
    transform: translateX(-101%);
    transition: transform .3s var(--ease);
    box-shadow: 24px 0 60px rgba(15, 17, 22, .22);
  }
  .results-page.nav-open .cside { transform: none; }
}

/* ——— ACCESSIBILITY ——— */
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px;
}
.hero :focus-visible, .qband :focus-visible, .panel :focus-visible { outline-color: #fff; }
.skip { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 0 0 var(--r-md) 0; font-size: 14px; font-weight: 600; }
.skip:focus { left: 0; }

/* ——— RESPONSIVE ——— */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media (max-width: 900px) {
  .chapter { grid-template-columns: 200px minmax(0, 1fr); gap: 36px; }
  .rail .dek { display: none; }
}
@media (max-width: 860px) {
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .feat .fgrid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .chapter { grid-template-columns: 1fr; gap: 14px; padding: 46px 0; }
  .rail { flex-direction: row; align-items: baseline; gap: 10px; flex-wrap: wrap; position: static; }
  .rail .rule { display: none; }
  .rail .dek { display: none; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 18px; }
  nav.links { display: none; }
  .foot-grid { grid-template-columns: 1fr; }
  .feat .fgrid { grid-template-columns: 1fr; }
  .hero { min-height: 92vh; }
  .about-hero { min-height: 64vh; }
  .wrap, .hero .inner { padding-left: 18px; padding-right: 18px; }
  .feature, .closing { padding-left: 18px; padding-right: 18px; }
  .band { margin-left: 18px; margin-right: 18px; }
  .themes { grid-template-columns: 1fr; gap: 20px; }
}

/* ============================================================
   RESULTS OVERLAY — Turbo Frame modal
   ============================================================ */
.results-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  background: var(--paper);
}
.results-overlay.is-open { display: block; }
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }
.results-overlay.is-open { animation: overlayIn .25s var(--ease); }
body.modal-open { overflow: hidden; }

/* The turbo-frame inside the overlay should fill it */
.results-overlay turbo-frame { display: block; height: 100%; }

/* ============================================================
   RECENT CONVERSATIONS — sidebar (current conversation)
   ============================================================ */
.cs-recent { margin-bottom: 2px; }
.cs-rlist { display: flex; flex-direction: column; gap: 1px; }
.cs-recent-item { position: relative; }
.cs-recent-item .cs-rlbl {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex: 1; min-width: 0;
}
.cs-recent-item.on {
  background: var(--accent-soft); color: var(--accent-text); font-weight: 600;
}
.cs-recent-item.on:hover { background: var(--accent-tint); }
.cs-recent-item.on::before {
  content: ""; position: absolute; left: 2px; top: 7px; bottom: 7px;
  width: 3px; border-radius: 3px; background: var(--accent);
}
.cs-recent-item.on .ic { color: var(--accent-text) !important; }

/* Bubble flash highlight (when jumping to a Recent item) */
@keyframes bubbleFlash {
  0%   { box-shadow: 0 0 0 0 rgba(47, 84, 235, .5); }
  40%  { box-shadow: 0 0 0 8px rgba(47, 84, 235, .18); }
  100% { box-shadow: 0 8px 18px var(--accent-glow); }
}
.msg.user .bubble.flash {
  animation: bubbleFlash .8s var(--ease);
}

/* ============================================================
   RESUME CONVERSATION PILL — floating on homepage
   ============================================================ */
.resume-pill {
  position: fixed; right: 22px; bottom: 22px; z-index: 40;
  display: flex; align-items: stretch;
  background: var(--surface); border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  box-shadow: 0 14px 40px rgba(15, 17, 22, .20), 0 3px 10px rgba(15, 17, 22, .10);
  overflow: hidden;
  animation: rpIn .32s var(--ease);
}
.resume-pill[hidden] { display: none; }
@keyframes rpIn {
  from { opacity: 0; transform: translateY(12px) scale(.96); }
  to   { opacity: 1; transform: none; }
}
.resume-pill .rp-main {
  display: flex; align-items: center; gap: 11px;
  background: none; border: 0; cursor: pointer;
  padding: 10px 8px 10px 15px; font-family: var(--sans);
  text-align: left; color: var(--ink);
  max-width: min(72vw, 320px);
}
.resume-pill .rp-ic {
  width: 34px; height: 34px; flex: none; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px var(--accent-glow);
}
.resume-pill .rp-ic svg { width: 16px; height: 16px; }
.resume-pill .rp-tx {
  display: flex; flex-direction: column; min-width: 0; line-height: 1.25;
}
.resume-pill .rp-tx b { font-size: 13.5px; font-weight: 650; }
.resume-pill .rp-tx small {
  font-size: 12px; color: var(--ink-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 230px;
}
.resume-pill .rp-main:hover .rp-tx b { color: var(--accent-text); }
.resume-pill .rp-x {
  flex: none; width: 38px; border: 0;
  border-left: 1px solid var(--line);
  background: var(--surface-2); color: var(--ink-3);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: .15s var(--ease);
}
.resume-pill .rp-x:hover { background: var(--paper-2); color: var(--ink); }
.resume-pill .rp-x svg { width: 16px; height: 16px; }
.resume-pill .rp-main:focus-visible,
.resume-pill .rp-x:focus-visible,
.cs-recent-item:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
@media (max-width: 520px) {
  .resume-pill { right: 12px; bottom: 12px; left: 12px; }
  .resume-pill .rp-main { flex: 1; max-width: none; }
  .resume-pill .rp-tx small { max-width: none; }
}
/* Resume pill — active/pulsing notification state */
@keyframes pillPulse {
  0%   { box-shadow: 0 14px 40px rgba(15, 17, 22, .20), 0 3px 10px rgba(15, 17, 22, .10), 0 0 0 0 rgba(47, 84, 235, .35); }
  50%  { box-shadow: 0 14px 40px rgba(15, 17, 22, .20), 0 3px 10px rgba(15, 17, 22, .10), 0 0 0 8px rgba(47, 84, 235, .08); }
  100% { box-shadow: 0 14px 40px rgba(15, 17, 22, .20), 0 3px 10px rgba(15, 17, 22, .10), 0 0 0 0 rgba(47, 84, 235, .35); }
}
.resume-pill.is-active {
  animation: pillPulse 2s var(--ease) infinite;
  border-color: var(--accent);
}

@media (prefers-reduced-motion: reduce) {
  .resume-pill { animation: none; }
  .resume-pill.is-active { animation: none; border-color: var(--accent); }
  .results-overlay.is-open { animation: none; }
}

/* ============================================================
   CATALOG — browse + filter + detail (Phase 4a)
   ============================================================ */

/* ── Page shell ── */
.cat-page { padding: 100px 0 40px; }
.cat-head { margin-bottom: 24px; }
.cat-head h1 { font-weight: 800; font-size: clamp(28px, 4vw, 40px); letter-spacing: -.03em; margin: 0; }
.cat-sub { font-size: 14px; color: var(--ink-3); margin: 6px 0 0; }

/* ── Search ── */
.cat-search {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--line-2);
  border-radius: var(--r-pill); padding: 8px 14px 8px 18px;
  margin-bottom: 16px; box-shadow: var(--sh-1);
  transition: .18s var(--ease);
}
.cat-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.cat-search .s-ico { width: 18px; height: 18px; color: var(--ink-3); flex: none; }
.cat-input {
  flex: 1; border: 0; outline: 0; background: transparent;
  font-family: var(--sans); font-size: 15px; color: var(--ink);
  padding: 8px 0; min-width: 0;
}
.cat-input::placeholder { color: var(--ink-3); }
.cat-clear {
  width: 28px; height: 28px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-3); transition: .15s var(--ease);
}
.cat-clear:hover { background: var(--surface-2); color: var(--ink); }
.cat-clear svg { width: 16px; height: 16px; }

/* ── Filters ── */
.cat-filters { margin-bottom: 20px; }
.cat-active-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.cat-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px; font-weight: 600;
  background: var(--accent-tint); color: var(--accent-text);
  border: 1px solid var(--accent-tint-2);
  border-radius: var(--r-pill); padding: 5px 12px;
  transition: .15s var(--ease);
}
.cat-chip:hover { background: var(--accent-tint-2); }
.cat-chip svg { width: 13px; height: 13px; }
.cat-chip-clear { font-size: 12px; color: var(--ink-3); padding: 5px 8px; align-self: center; }
.cat-chip-clear:hover { color: var(--accent-text); }

.cat-filter-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.cat-filter-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--sans); font-size: 13.5px; font-weight: 600;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-pill); padding: 8px 14px;
  color: var(--ink-2); cursor: pointer;
  transition: .15s var(--ease);
}
.cat-filter-btn:hover { border-color: var(--accent); color: var(--accent-text); }
.cat-filter-btn.on { background: var(--accent-tint); border-color: var(--accent-tint-2); color: var(--accent-text); }
.cat-filter-btn svg { width: 14px; height: 14px; transition: transform .2s var(--ease); }

/* Dropdown */
.cat-dropdown { position: relative; }
.cat-dropdown-menu {
  display: none; position: absolute; top: calc(100% + 6px); left: 0;
  min-width: 180px; max-height: 320px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 6px;
  box-shadow: var(--sh-3); z-index: 20;
}
.cat-dropdown-scroll { overflow-y: auto; }
.cat-dropdown.open .cat-dropdown-menu { display: block; }
.cat-dropdown.open .cat-filter-btn svg { transform: rotate(90deg); }

.cat-dropdown-item {
  display: block; width: 100%; text-align: left;
  font-size: 13.5px; font-weight: 500; color: var(--ink-2);
  padding: 8px 12px; border-radius: 8px;
  transition: .12s var(--ease);
}
.cat-dropdown-item:hover { background: var(--surface-2); color: var(--ink); }
.cat-dropdown-item.on { background: var(--accent-tint); color: var(--accent-text); font-weight: 600; }

/* ── Results ── */
.cat-count { font-size: 13px; color: var(--ink-3); margin: 0 0 14px; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }

/* ── Card ── */
.cat-card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 18px 20px;
  box-shadow: var(--sh-1); transition: .18s var(--ease);
  text-decoration: none; color: var(--ink);
}
.cat-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--sh-2); }

.cat-card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.cat-type-badge {
  font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 3px 9px; border-radius: var(--r-pill);
}
.cat-type-sermon { background: var(--accent-tint); color: var(--accent-text); }
.cat-type-occasion { background: #fdf3dc; color: #6b4f12; }
.cat-type-ask_pk { background: #e8f5e9; color: #2e7d32; }
.cat-type-misc { background: var(--surface-2); color: var(--ink-3); }

.cat-video-badge {
  width: 16px; height: 16px; border-radius: 4px;
  background: #ff0000; color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.cat-video-badge svg { width: 8px; height: 8px; }

.cat-card-title { font-size: 16px; font-weight: 600; letter-spacing: -.015em; margin: 0 0 6px; line-height: 1.3; }
.cat-card-scripture { font-size: 13px; color: var(--ink-3); margin: 0 0 auto; padding-bottom: 10px; }

.cat-card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
.cat-year-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.cat-year {
  font-size: 11px; font-weight: 600; color: var(--ink-3);
  background: var(--surface-2); border-radius: var(--r-pill);
  padding: 2px 8px; font-variant-numeric: tabular-nums;
}
.cat-asset-badges { display: flex; gap: 8px; align-items: center; }
.cat-asset-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; color: var(--ink-3);
}

/* ── Pagination ── */
.cat-pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; margin-top: 28px; padding-top: 20px;
  border-top: 1px solid var(--line);
}
.cat-page-btn {
  font-family: var(--sans); font-size: 13px; font-weight: 600;
  padding: 7px 13px; border-radius: 8px;
  color: var(--ink-2); background: var(--surface);
  border: 1px solid var(--line);
  transition: .15s var(--ease); cursor: pointer;
  text-decoration: none;
}
.cat-page-btn:hover { border-color: var(--accent); color: var(--accent-text); }
.cat-page-btn.on { background: var(--accent); color: #fff; border-color: var(--accent); cursor: default; }
.cat-page-dots { font-size: 14px; color: var(--ink-3); padding: 0 4px; }

/* ── Empty state ── */
.cat-empty { text-align: center; padding: 60px 20px; }
.cat-empty h2 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 8px; }
.cat-empty p { font-size: 15px; color: var(--ink-2); margin: 0 0 20px; }

/* ── Browse mode (category sections) ── */
.cat-browse { margin-bottom: 28px; }
.cat-browse .block { padding: 28px 0; scroll-margin-top: 86px; }
.cat-browse .block + .block { border-top: 1px solid var(--line); }
.cat-browse .head-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.cat-browse .head-row h3 {
  font-weight: 800; font-size: 20px; letter-spacing: -.025em; margin: 0;
  display: flex; align-items: center; gap: 8px;
}
.cat-browse .head-row .aside { font-size: 13px; color: var(--ink-3); }
.cat-sec-icon { width: 18px; height: 18px; color: var(--accent-text); flex: none; }

/* Reuse homepage browse CSS classes (.books, .topics, .occasions, .series, etc.)
   which are already defined above. The catalog browse sections use those same
   classes so all styling is inherited. Only catalog-specific overrides go here. */

/* ============================================================
   TEACHING DETAIL — show page
   ============================================================ */

.tch-page { padding: 90px 0 40px; }

/* Back link */
.tch-back { margin-bottom: 20px; }
.tch-back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px; font-weight: 600; color: var(--ink-2);
  transition: .15s var(--ease);
}
.tch-back-link:hover { color: var(--accent-text); }
.tch-back-link svg { width: 16px; height: 16px; }

/* Header */
.tch-header { margin-bottom: 32px; }
.tch-title {
  font-weight: 800; font-size: clamp(26px, 3.8vw, 38px);
  letter-spacing: -.03em; line-height: 1.1; margin: 10px 0 0;
}
.tch-scripture { font-size: 16px; color: var(--ink-2); margin: 10px 0 0; }
.tch-summary, .tch-theme { font-size: 15px; color: var(--ink-2); margin: 8px 0 0; line-height: 1.6; }

/* Facet chips */
.tch-facets { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.tch-facet-chip {
  font-size: 12.5px; font-weight: 600;
  padding: 4px 12px; border-radius: var(--r-pill);
  transition: .15s var(--ease);
}
.tch-facet-chip:hover { transform: translateY(-1px); }
.tch-facet-label { font-weight: 700; font-size: 0.82em; text-transform: uppercase; letter-spacing: 0.04em; opacity: 0.7; }
.tch-facet-chip.small { font-size: 11px; padding: 3px 9px; }
.tch-facet-scripture { background: #fdf3dc; color: #6b4f12; border: 1px solid #e8d89a; }
.tch-facet-topic { background: var(--accent-tint); color: var(--accent-text); border: 1px solid var(--accent-tint-2); }
.tch-facet-occasion { background: #fce4ec; color: #ad1457; border: 1px solid #f8bbd0; }
.tch-facet-series { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }

/* Multi-delivery note */
.tch-multi-note {
  font-size: 13px; font-weight: 600; color: var(--accent-text);
  background: var(--accent-tint); border: 1px solid var(--accent-tint-2);
  border-radius: var(--r-sm); padding: 10px 16px;
  margin-bottom: 24px;
}

/* Delivery sections */
.tch-deliveries { display: flex; flex-direction: column; gap: 32px; }
.tch-delivery {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 24px;
  box-shadow: var(--sh-1);
}

.tch-del-header { margin-bottom: 16px; }
.tch-del-title { font-size: 20px; font-weight: 800; letter-spacing: -.02em; margin: 0; }
.tch-del-num { font-size: 14px; font-weight: 500; color: var(--ink-3); }
.tch-del-scripture { font-size: 14px; color: var(--ink-2); margin: 4px 0 0; }
.tch-del-facets { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 14px; }

/* Video player */
.tch-video { margin-bottom: 16px; max-width: 960px; }
.tch-video-player {
  position: relative; aspect-ratio: 16/9;
  border-radius: var(--r-md); overflow: hidden;
  background: #15171d;
}
.tch-video-poster {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.tch-video-poster::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(0,0,0,.35);
}
.tch-play-btn {
  position: relative; z-index: 2;
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(255,255,255,.92); color: var(--accent-text);
  border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 22px rgba(0,0,0,.3);
  transition: .2s var(--ease);
}
.tch-play-btn:hover { background: #fff; transform: scale(1.06); }
.tch-play-btn svg { width: 26px; height: 26px; }
.tch-yt-container { position: absolute; inset: 0; }

/* Assets section */
.tch-assets { display: flex; flex-direction: column; gap: 10px; }

/* Text panel (collapsible manuscript notes) */
.tch-text-panel { border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.tch-text-panel[open] { border-color: var(--accent-tint-2); }
.tch-text-toggle {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; cursor: pointer;
  font-size: 14px; font-weight: 600; color: var(--ink);
  background: var(--surface-2);
  list-style: none;
}
.tch-text-toggle::-webkit-details-marker { display: none; }
.tch-text-toggle:hover { background: var(--surface-3); }
.tch-text-toggle svg { color: var(--ink-3); flex: none; }
.tch-filename { font-size: 12px; font-weight: 400; color: var(--ink-3); margin-left: auto; }
.tch-chev { width: 16px; height: 16px; margin-left: 4px; transition: transform .2s var(--ease); }
.tch-text-panel[open] .tch-chev { transform: rotate(90deg); }

.tch-text-content { padding: 20px 24px; background: var(--surface); max-height: 700px; overflow-y: auto; }
.tch-text {
  font-family: var(--sans); font-size: 14px; line-height: 1.7;
  color: var(--ink-2); white-space: pre-wrap; word-wrap: break-word;
  margin: 0;
}

/* Formatted sermon prose (from extracted_html) */
.tch-prose { font-family: var(--sans); font-size: 15px; line-height: 1.75; color: var(--ink); }
.tch-prose p { margin: 0 0 12px; }
.tch-prose p:last-child { margin-bottom: 0; }
.tch-prose p.spacer { margin: 0 0 4px; font-size: 6px; }
.tch-prose h4 {
  font-weight: 800; font-size: 16px; letter-spacing: -.01em;
  color: var(--ink); margin: 24px 0 10px; padding-top: 8px;
  border-top: 1px solid var(--line);
}
.tch-prose h4:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
.tch-prose strong { font-weight: 700; color: var(--ink); }
.tch-prose em { font-style: italic; }

/* Video + slides (stacked, capped width) */

/* Slide viewer */
.tch-slides {
  border-radius: var(--r-md); overflow: hidden;
  background: #15171d; outline: none;
}
.tch-slides-stage {
  position: relative; aspect-ratio: 16/9;
  display: flex; align-items: center; justify-content: center;
  background: #0e1017;
}
.tch-slides-img {
  width: 100%; height: 100%; object-fit: contain;
  display: block;
}

/* Nav arrows */
.tch-slides-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.85); color: var(--ink);
  border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
  opacity: 0; transition: opacity .2s var(--ease);
  z-index: 2;
}
.tch-slides-nav svg { width: 18px; height: 18px; }
.tch-slides:hover .tch-slides-nav,
.tch-slides:focus-within .tch-slides-nav { opacity: 1; }
.tch-slides-nav:hover { background: #fff; }
.tch-slides-nav--prev { left: 8px; }
.tch-slides-nav--next { right: 8px; }

/* Counter badge */
.tch-slides-counter {
  position: absolute; bottom: 8px; right: 10px;
  background: rgba(0,0,0,.6); color: #fff;
  font-size: 11px; font-weight: 600; letter-spacing: .04em;
  padding: 3px 9px; border-radius: var(--r-pill);
  pointer-events: none; z-index: 2;
}

/* Thumbnail rail */
.tch-slides-rail {
  display: flex; gap: 4px; padding: 6px 6px;
  overflow-x: auto; overflow-y: hidden;
  background: #1a1d26;
  scrollbar-width: thin;
}
.tch-slides-rail::-webkit-scrollbar { height: 4px; }
.tch-slides-rail::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 2px; }

.tch-slides-thumb {
  flex: none; width: 64px; height: 48px;
  border: 2px solid transparent; border-radius: 4px;
  overflow: hidden; cursor: pointer; padding: 0;
  background: transparent;
  opacity: .5; transition: opacity .15s var(--ease), border-color .15s var(--ease);
}
.tch-slides-thumb:hover { opacity: .8; }
.tch-slides-thumb.active {
  opacity: 1; border-color: var(--accent);
}
.tch-slides-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  display: block; pointer-events: none;
}

/* Deck switcher toggle */
.tch-slides-wrap { display: flex; flex-direction: column; max-width: 960px; }
.tch-media:not(.tch-media--dual) .tch-slides-wrap,
.tch-media:not(.tch-media--dual) .tch-slides:not(.tch-deck-panel) { max-width: 960px; }
.tch-deck-toggle {
  display: flex; gap: 2px; padding: 4px;
  background: #1a1d26; border-radius: var(--r-sm) var(--r-sm) 0 0;
}
.tch-deck-btn {
  flex: 1; padding: 6px 12px; border: 0; border-radius: 6px;
  background: transparent; color: rgba(255,255,255,.5);
  font-size: 12px; font-weight: 600; cursor: pointer;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.tch-deck-btn:hover { color: rgba(255,255,255,.8); }
.tch-deck-btn.active { background: rgba(255,255,255,.12); color: #fff; }
.tch-deck-hidden { display: none !important; }
.tch-deck-toggle + .tch-slides { border-radius: 0 0 var(--r-md) var(--r-md); }

/* PDF notes reader */
.tch-notes { margin-top: 16px; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.tch-notes-list {
  display: flex; flex-direction: column; gap: 0;
  border-bottom: 1px solid var(--line); background: var(--surface-2);
}
.tch-notes-tab {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; border: 0; background: transparent;
  font-size: 13px; color: var(--ink-2); cursor: pointer;
  text-align: left;
  transition: background .12s var(--ease), color .12s var(--ease);
}
.tch-notes-tab:not(:last-child) { border-bottom: 1px solid var(--line); }
.tch-notes-tab:hover { background: var(--surface-3); }
.tch-notes-tab.active {
  background: var(--accent-soft); color: var(--accent-text); font-weight: 600;
  border-left: 3px solid var(--accent);
}
.tch-notes-tab svg { color: var(--ink-3); flex: none; }
.tch-notes-name {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 320px;
}
.tch-notes-pane { display: flex; flex-direction: column; }
.tch-notes-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px; background: var(--surface-2);
  font-size: 12px; color: var(--ink-3);
  border-bottom: 1px solid var(--line);
}
.tch-notes-toolbar .tch-notes-name { font-weight: 600; color: var(--ink-2); }
.tch-notes-newtab {
  font-size: 12px; color: var(--accent-text); text-decoration: none;
  white-space: nowrap;
}
.tch-notes-newtab:hover { text-decoration: underline; }
.tch-notes-iframe {
  width: 100%; height: 720px; border: 0; background: var(--surface);
}

/* ── Catalog responsive ── */
@media (max-width: 640px) {
  .cat-page { padding: 80px 0 30px; }
  .cat-grid { grid-template-columns: 1fr; }
  .cat-filter-row { gap: 6px; }
  .tch-page { padding: 76px 0 30px; }
  .tch-delivery { padding: 16px; }
  .tch-slides-nav { width: 30px; height: 30px; }
  .tch-slides-nav svg { width: 14px; height: 14px; }
  .tch-slides-thumb { width: 48px; height: 36px; }
  .tch-notes-iframe { height: 480px; }
  .tch-notes-name { max-width: 180px; }
  .tch-notes-list { flex-direction: row; overflow-x: auto; border-bottom: 1px solid var(--line); }
  .tch-notes-tab { white-space: nowrap; border-bottom: 0 !important; }
  .tch-notes-tab:not(:last-child) { border-right: 1px solid var(--line); }
  .tch-notes-tab.active { border-left: 0; border-bottom: 3px solid var(--accent) !important; }
}
