:root {
  --sand: #F6EFE4;
  --sand-deep: #E8D9C3;
  --cream: #FBF7F0;
  --ink: #1C2A33;
  --ink-soft: #3D4C55;
  --teal: #2A6F7F;
  --teal-dark: #1A4A56;
  --sunset: #D4693A;
  --gold: #C4A265;
  --sky: #7BA7B5;
  --white: #FFFCFA;
  --rule: rgba(28,42,51,.12);
  --shadow: 0 20px 50px rgba(26,74,86,.12);
}
@font-face {
  font-family: Outfit;
  src: url("../fonts/outfit.woff2") format("woff2-variations"),
       url("../fonts/outfit.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/cormorant-garamond.woff2") format("woff2-variations"),
       url("../fonts/cormorant-garamond.woff2") format("woff2");
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/cormorant-garamond-italic.woff2") format("woff2-variations"),
       url("../fonts/cormorant-garamond-italic.woff2") format("woff2");
  font-weight: 500 700;
  font-style: italic;
  font-display: swap;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body {
  font-family: Outfit, system-ui, sans-serif;
  color: var(--ink);
  background: var(--sand);
  line-height: 1.65;
  font-weight: 400;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.wrap { width: min(1120px, calc(100% - 3rem)); margin: 0 auto; }
.wrap-wide { width: min(1280px, calc(100% - 3rem)); margin: 0 auto; }

header.site {
  background: var(--sand);
  border-bottom: 1px solid var(--rule);
}
header.site .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: .85rem;
  text-decoration: none;
  color: var(--ink);
}
.brand img { width: 96px; height: auto; }
.brand .name {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand .name strong {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
}
.brand .name span {
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--teal);
}
nav.links { display: flex; align-items: center; gap: 1.25rem; font-size: .95rem; }
nav.links a { color: var(--ink-soft); text-decoration: none; }
nav.links a:hover, nav.links a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.langs { font-size: .85rem; color: var(--ink-soft); }
.langs .on { color: var(--ink); font-weight: 600; text-decoration: none; }

.btn, .btn-ghost, .btn-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
  padding: .75rem 1.35rem;
}
.btn { background: var(--sunset); color: #fff; }
.btn:hover { background: #c45c32; }
.btn-ghost {
  background: transparent;
  color: var(--teal-dark);
  box-shadow: inset 0 0 0 1.5px var(--teal);
}
.btn-sm { padding: .4rem .85rem; font-size: .85rem; font-weight: 500; }
.btn-teal { background: var(--teal); color: #fff; }
.pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--gold);
  color: var(--gold);
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: .68rem;
  padding: .2rem .6rem;
  border-radius: 999px;
}
.pill.solid { background: var(--teal); color: #fff; border-color: var(--teal); }
.pill.warn { border-color: var(--sunset); color: var(--sunset); }
.kicker {
  font-size: .75rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--sunset);
  font-weight: 600;
}

/* Landing */
.hero {
  background: linear-gradient(180deg, var(--sand) 0%, var(--cream) 100%);
  padding: 4.5rem 0 3.5rem;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 3rem;
  align-items: center;
}
.hero h1 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 600;
  line-height: 1.12;
  margin: .35rem 0 1rem;
}
.hero .lead { color: var(--ink-soft); font-size: 1.12rem; max-width: 36rem; margin-bottom: 1.6rem; }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; }
.hero-card {
  background: var(--white);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.hero-card img { width: 100%; border-radius: 12px; margin-bottom: 1rem; }
.hero-card h3 { font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.4rem; margin-bottom: .3rem; }
.hero-card p { color: var(--ink-soft); font-size: .95rem; }

.features { padding: 3.5rem 0 4.5rem; background: var(--cream); }
.features h2, .library h2, .page-head h1, .admin h1 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
}
.feat-grid, .lib-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
  margin-top: 1.5rem;
}
.feat, .lib-card {
  background: var(--white);
  border-radius: 16px;
  padding: 1.4rem 1.4rem 1.5rem;
  box-shadow: 0 10px 28px rgba(28,42,51,.06);
  border: 1px solid var(--rule);
}
.feat h3, .lib-card h3 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.45rem;
  margin: .45rem 0 .35rem;
}
.feat p, .lib-card p { color: var(--ink-soft); font-size: .98rem; }
.thumb {
  height: 150px;
  border-radius: 10px;
  background: linear-gradient(160deg, var(--teal-dark), #3d6d7a 50%, var(--sand-deep));
  margin-bottom: .9rem;
  position: relative;
  overflow: hidden;
}
.thumb.book { background: #121820 url("img/book-600.jpg") center/cover no-repeat; }
.thumb.video::after, .player-frame .play {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(255,252,250,.92);
  box-shadow: 0 6px 16px rgba(0,0,0,.2);
}
.thumb.video { display: grid; place-items: center; }
.thumb.video .play-icon, .player-frame .play-icon, .embed .play-icon {
  width: 0; height: 0;
  border-left: 16px solid var(--teal-dark);
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  margin-left: 4px;
  z-index: 1;
}
.thumb.curric { background: linear-gradient(160deg, #1A4A56, #2A6F7F 45%, #C4A265); }

footer.site {
  background: var(--ink);
  color: rgba(251,247,240,.8);
  text-align: center;
  padding: 2.2rem 1rem;
  font-size: .9rem;
}
footer.site .memorial {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: .7rem;
}
footer.site a { color: var(--gold); }

/* Forms */
.page-main { padding: 2.8rem 0 4rem; }
.form-card, .panel {
  background: var(--white);
  border-radius: 20px;
  padding: 2rem 2rem 2.2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--rule);
  max-width: 640px;
  margin: 0 auto;
}
.form-card h1, .page-head h1 { font-family: "Cormorant Garamond", Georgia, serif; font-size: 2.2rem; font-weight: 600; }
.form-card .lead { color: var(--ink-soft); margin: .4rem 0 1.3rem; }
label { display: block; font-size: .85rem; font-weight: 600; margin: .85rem 0 .3rem; }
input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="search"], input[type="datetime-local"], select, textarea {
  width: 100%;
  font: inherit;
  padding: .7rem .85rem;
  border: 1px solid var(--sand-deep);
  border-radius: 10px;
  background: var(--cream);
  color: var(--ink);
}
textarea { min-height: 110px; resize: vertical; }
.hint { font-size: .8rem; color: var(--ink-soft); margin-top: .25rem; }
.optional { font-weight: 400; color: var(--ink-soft); }
.phone-row, .name-grid, .split { display: grid; gap: .8rem; }
.phone-row { grid-template-columns: 200px 1fr; }
.counter { text-align: right; font-size: .8rem; color: var(--teal); margin-top: .2rem; }
.consent { display: flex; gap: .7rem; align-items: flex-start; margin: 1.1rem 0 1.3rem; font-size: .92rem; color: var(--ink-soft); }
.consent input { margin-top: .3rem; }
.form-note { margin-top: 1rem; font-size: .92rem; color: var(--ink-soft); text-align: center; }

/* Library */
.announce {
  background: var(--teal-dark);
  color: var(--cream);
  border-radius: 14px;
  padding: 1rem 1.2rem;
  margin-bottom: 1.6rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.announce strong { display: block; font-weight: 600; }
.announce p { color: rgba(251,247,240,.86); font-size: .95rem; }
.page-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.2rem; }
.filters { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.filters button {
  border: 1px solid var(--rule);
  background: var(--white);
  border-radius: 999px;
  padding: .35rem .9rem;
  font: inherit;
  font-size: .88rem;
  cursor: pointer;
  color: var(--ink-soft);
}
.filters button.on { background: var(--teal-dark); color: #fff; border-color: var(--teal-dark); }
.lib-card { padding: 0 0 1.15rem; overflow: hidden; }
.lib-card .thumb { margin: 0; border-radius: 16px 16px 0 0; height: 160px; }
.lib-card .body { padding: 1rem 1.15rem 0; }
.lib-card .meta { font-size: .78rem; color: var(--ink-soft); letter-spacing: .04em; text-transform: uppercase; }

/* Ebook viewer */
body.viewer { background: #1a2228; color: var(--cream); }
body.viewer header.site { background: #141b20; border-color: rgba(255,255,255,.08); }
body.viewer .brand, body.viewer nav.links a { color: var(--cream); }
body.viewer nav.links a { color: rgba(251,247,240,.78); }
.viewer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: .8rem 0;
  color: rgba(251,247,240,.88);
  font-size: .92rem;
}
.viewer-stage {
  background: #12181d;
  padding: 1.5rem 0 3rem;
}
.spread {
  width: min(900px, calc(100% - 2rem));
  margin: 0 auto;
  background: #f7f1e6;
  color: #1c2a33;
  min-height: 820px;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
  padding: 3.2rem 3.4rem 3.6rem;
}
.spread h2 { font-family: "Cormorant Garamond", Georgia, serif; font-size: 2rem; margin: 0 0 1rem; }
.spread p { font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.22rem; line-height: 1.75; margin-bottom: 1rem; }
.spread .folio { text-align: center; color: #6a5b45; margin-top: 2rem; font-size: .9rem; letter-spacing: .08em; }

/* Video */
.player-wrap { display: grid; grid-template-columns: 1.6fr .8fr; gap: 1.5rem; }
.player-frame {
  position: relative;
  aspect-ratio: 16/9;
  background: linear-gradient(160deg, #0e171b, #1c3a44 50%, #2a2418);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
}
.player-frame .play {
  position: static;
  width: 74px; height: 74px;
  display: grid; place-items: center;
}
.player-ctrl {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: .7rem 1rem 0.85rem;
  background: linear-gradient(transparent, rgba(0,0,0,.65));
  color: #fff;
  font-size: .8rem;
}
.scrub { height: 4px; background: rgba(255,255,255,.3); border-radius: 4px; margin-bottom: .45rem; }
.scrub > span { display: block; width: 28%; height: 100%; background: var(--sunset); border-radius: 4px; }
.ctrl-row { display: flex; justify-content: space-between; }
.vid-side .item { display: flex; gap: .8rem; padding: .7rem 0; border-bottom: 1px solid var(--rule); text-decoration: none; color: inherit; }
.vid-side .mini { width: 96px; height: 60px; border-radius: 8px; background: linear-gradient(160deg, var(--teal-dark), var(--sand-deep)); flex: none; }

/* Curriculum */
.lesson-grid { display: grid; grid-template-columns: 280px 1fr; gap: 2rem; align-items: start; }
.modules { background: var(--white); border: 1px solid var(--rule); border-radius: 16px; padding: 1rem .9rem 1.2rem; }
.modules h2 { font-size: 1rem; margin-bottom: .7rem; }
.modules .mod { margin-top: .7rem; }
.modules .mod strong { display: block; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--teal); margin-bottom: .25rem; }
.modules a { display: block; text-decoration: none; color: var(--ink-soft); padding: .35rem .5rem; border-radius: 8px; font-size: .92rem; }
.modules a.on { background: var(--sand); color: var(--ink); font-weight: 600; }
.lesson { background: var(--white); border: 1px solid var(--rule); border-radius: 16px; padding: 2rem 2.1rem 2.3rem; }
.lesson h1 { font-family: "Cormorant Garamond", Georgia, serif; font-size: 2.2rem; font-weight: 600; margin: .2rem 0 1rem; }
.lesson p { color: var(--ink-soft); margin-bottom: 1rem; font-size: 1.05rem; }
.pull {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: 1.45rem;
  color: var(--teal-dark);
  border-left: 3px solid var(--gold);
  padding: .2rem 0 .2rem 1.1rem;
  margin: 1.3rem 0;
  line-height: 1.4;
}
.embed {
  aspect-ratio: 16/9;
  border-radius: 12px;
  background: linear-gradient(160deg, #1A4A56, #7BA7B5);
  margin: 1.2rem 0;
  display: grid;
  place-items: center;
}

/* Admin */
body.admin { background: #eef3f4; }
body.admin header.site { background: #102328; border-color: transparent; }
body.admin .brand, body.admin .brand .name strong { color: var(--cream); }
body.admin .brand .name span, body.admin nav.links a { color: rgba(251,247,240,.75); }
body.admin nav.links a[aria-current="page"] { color: #fff; }
.admin { padding: 2rem 0 3.5rem; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin: 1.2rem 0 1.6rem; }
.stat { background: var(--white); border-radius: 14px; padding: 1.1rem 1.15rem; border: 1px solid var(--rule); }
.stat b { display: block; font-family: "Cormorant Garamond", Georgia, serif; font-size: 2rem; line-height: 1.1; }
.stat span { color: var(--ink-soft); font-size: .85rem; }
.admin-grid { display: grid; grid-template-columns: 1.3fr .9fr; gap: 1.2rem; }
.panel { max-width: none; }
.panel h2 { font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.4rem; margin-bottom: .8rem; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { text-align: left; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--teal); padding: .45rem .4rem; border-bottom: 1px solid var(--rule); }
td { padding: .65rem .4rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
td.muted, .muted { color: var(--ink-soft); }
.toolbar { display: flex; justify-content: space-between; gap: 1rem; align-items: center; margin-bottom: 1rem; flex-wrap: wrap; }
.drop {
  border: 1.5px dashed var(--sky);
  background: var(--cream);
  border-radius: 12px;
  padding: 1.6rem 1rem;
  text-align: center;
  color: var(--ink-soft);
  margin-top: .4rem;
}
.toggle { display: flex; align-items: center; gap: .6rem; margin-top: .8rem; }
.prayer { max-width: 220px; color: var(--ink-soft); font-size: .85rem; }
.status-on { color: #1f6b3a; font-weight: 600; }
.status-off { color: #9a3b28; font-weight: 600; }

.brand-block { display: flex; flex-direction: column; align-items: flex-start; gap: .2rem; }
.back-home {
  font-size: .82rem;
  font-weight: 600;
  color: var(--teal-dark);
  text-decoration: none;
  white-space: nowrap;
}
.back-home:hover { text-decoration: underline; }
footer.site .back-home { color: var(--gold); display: inline-block; margin: .55rem 0 .2rem; }
@media (max-width: 860px) {
  header.site .bar { flex-wrap: wrap; }
  .brand-block { width: 100%; }
  .back-home { font-size: .8rem; padding: .1rem 0 .25rem; }
}

/* App additions */
.nav-logout { display: inline; }
.nav-user a { color: inherit; text-decoration: none; }
.nav-user a:hover { text-decoration: underline; }
.alert { border-radius: 12px; padding: .85rem 1rem; margin: 0 0 1rem; }
.alert ul { margin: 0; padding-left: 1.1rem; }
.alert-error { background: #f8e6e2; color: #7a2b1d; }
.alert-ok { background: #e5f3ea; color: #1f6b3a; }
.alert-info { background: #e7f1f4; color: #1A4A56; }
.form-card { max-width: 36rem; margin: 2.2rem auto 3rem; background: var(--white); border-radius: 20px; padding: 2rem 1.6rem; box-shadow: var(--shadow); }
.page-main { padding: 2rem 0 3rem; }
.hint, .optional, .muted { color: var(--ink-soft); font-size: .85rem; }
label { display: block; font-weight: 600; margin: .85rem 0 .3rem; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=search], input[type=datetime-local], input[type=file], select, textarea {
  width: 100%; font: inherit; padding: .7rem .8rem; border: 1px solid var(--rule); border-radius: 10px; background: var(--white); color: var(--ink);
}
input[readonly] { background: var(--cream); color: var(--ink-soft); cursor: not-allowed; }
.consent { display: flex; gap: .7rem; align-items: flex-start; font-weight: 400; margin: 1rem 0; }
.consent input { width: auto; margin-top: .3rem; }
.form-note { margin-top: 1rem; color: var(--ink-soft); }
.section-title { font-family: "Cormorant Garamond", Georgia, serif; font-size: 2.1rem; margin-top: .3rem; }
.library { padding: 2.2rem 0 3.5rem; }
.page-head { margin-bottom: 1.4rem; }
.page-head .lead { max-width: 40rem; color: var(--ink-soft); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.2rem; }
.card { background: var(--white); border-radius: 16px; padding: 1rem; border: 1px solid var(--rule); }
.card h3 { font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.4rem; margin: .4rem 0; }
.card h3 a { color: inherit; text-decoration: none; }
.card-cover { display: block; margin-bottom: .7rem; border-radius: 10px; overflow: hidden; background: var(--cream); aspect-ratio: 3/4; }
.card-cover img { width: 100%; height: 100%; object-fit: cover; }
.banner { background: var(--white); border-left: 4px solid var(--gold); padding: 1rem 1.1rem; border-radius: 12px; margin: 0 0 1rem; }
.announce-list h2 { font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.6rem; margin-bottom: .8rem; }
.empty { color: var(--ink-soft); }
.viewer-main { padding: 1.2rem 0 3rem; }
.viewer-head h1 { font-family: "Cormorant Garamond", Georgia, serif; color: var(--cream); }
body.viewer .kicker, body.viewer .hint, body.viewer .back-home { color: var(--gold); }
.viewer-toolbar { display: flex; gap: .6rem; align-items: center; margin: 1rem 0; }
.viewer-stage { display: flex; justify-content: center; padding: 0 1rem 2rem; }
#pdf-canvas { max-width: 100%; height: auto; background: #fff; box-shadow: 0 16px 40px rgba(0,0,0,.35); }
body.no-copy, body.no-copy * { -webkit-user-select: none !important; user-select: none !important; }
.player { margin: 1.2rem 0 2rem; background: #111; border-radius: 16px; overflow: hidden; }
.player video { width: 100%; display: block; max-height: 80vh; background: #000; }
.watch-main, .curriculum { padding: 2rem 0 3.5rem; }
.watch-main h1, .curriculum h1, .lesson-body h1 { font-family: "Cormorant Garamond", Georgia, serif; }
.curriculum-grid { display: grid; grid-template-columns: 0.7fr 1.3fr; gap: 2rem; }
.module-list, .lesson-nav ul { list-style: none; }
.module-list h2, .lesson-nav h2 { font-size: 1.15rem; margin: 1rem 0 .4rem; }
.lesson-nav a[aria-current="page"] { font-weight: 700; }
.rich-text { line-height: 1.7; }
.rich-text img, .rich-text video { max-width: 100%; }
.admin { padding: 2rem 0 3.5rem; }
.admin h1, .admin h2 { font-family: "Cormorant Garamond", Georgia, serif; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin: 1.2rem 0 1.6rem; }
.stat { background: var(--white); border-radius: 14px; padding: 1.1rem; border: 1px solid var(--rule); }
.stat b { display: block; font-family: "Cormorant Garamond", Georgia, serif; font-size: 2rem; }
.admin-grid { display: grid; grid-template-columns: 1.3fr .9fr; gap: 1.2rem; }
.panel { background: var(--white); border-radius: 16px; padding: 1.2rem; border: 1px solid var(--rule); margin-bottom: 1rem; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { text-align: left; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--teal); padding: .45rem .4rem; border-bottom: 1px solid var(--rule); }
td { padding: .65rem .4rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.toolbar { display: flex; justify-content: space-between; gap: 1rem; align-items: center; margin-bottom: 1rem; flex-wrap: wrap; }
.search-form { display: flex; gap: .6rem; align-items: end; margin: 0 0 1rem; }
.search-form input { max-width: 28rem; }
.inline { display: inline; }
.linkish { background: none; border: 0; color: var(--teal-dark); cursor: pointer; font: inherit; text-decoration: underline; padding: 0; }
.status-on { color: #1f6b3a; font-weight: 600; }
.status-off { color: #9a3b28; font-weight: 600; }
.prayer { max-width: 28rem; color: var(--ink-soft); white-space: pre-wrap; }
.nested-form { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--rule); }
.editor-form fieldset { border: 1px solid var(--rule); border-radius: 12px; padding: .8rem 1rem 1rem; margin: 1rem 0; }
.filters { margin-bottom: 1rem; }
@media (max-width: 860px) {
  .hero-grid, .admin-grid, .curriculum-grid, .stats, .phone-row, .split { grid-template-columns: 1fr; }
  .brand-block { width: 100%; }
  header.site .bar { flex-wrap: wrap; }
}

/* ===== Revamp additions ===== */


/* ---- App chrome aliases (PHP layout uses header.site) ---- */
header.site { background: var(--sand); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 40; }
header.site .bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 0; }
header.site .links { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
header.site .links a { text-decoration: none; color: var(--ink-soft); font-size: .92rem; }
header.site .links a[aria-current="page"] { color: var(--ink); font-weight: 600; }
header.site .links .badge {
  display: inline-block; min-width: 1.15rem; padding: 0 .3rem; margin-left: .15rem;
  background: var(--sunset); color: #fff; border-radius: 99px; font-size: .7rem; text-align: center; line-height: 1.3rem;
}
header.site .nav-logout { display: inline; }
.brand .name, .brand .meta { display: flex; flex-direction: column; line-height: 1.15; }
.brand .name strong, .brand .meta strong {
  font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.25rem; font-weight: 600;
}
.brand .name span, .brand .meta span {
  font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft);
}
.back-home { font-size: .78rem; color: var(--teal-dark); }
footer.site { padding: 2.5rem 0 3rem; text-align: center; background: var(--ink); color: var(--sand); }
footer.site a { color: var(--sand); }
footer.site .memorial { font-size: .9rem; margin-bottom: .6rem; color: var(--sand-deep); }
footer.site p { color: rgba(246,239,228,.8); font-size: .85rem; }

.page-main { padding: 2.4rem 0 4rem; }
.lead { color: var(--ink-soft); font-size: 1.08rem; max-width: 38rem; margin: .3rem 0 1.4rem; }
.kicker { letter-spacing: .16em; text-transform: uppercase; font-size: .72rem; color: var(--teal); font-weight: 600; margin-bottom: .35rem; }
.muted { color: var(--ink-soft); }
h1, h2, .page-main h1 { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 600; }
.page-main h1 { font-size: clamp(2rem, 4vw, 3rem); }

.btn, .btn-ghost, .btn-sm {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; padding: .65rem 1.2rem; border: 1px solid transparent;
  text-decoration: none; cursor: pointer; font-weight: 600;
}
.btn { background: var(--sunset); color: #fff; }
.btn:hover { background: #c45c32; color: #fff; }
.btn-ghost { background: transparent; border-color: var(--rule); color: var(--ink); }
.btn-sm { padding: .4rem .85rem; font-size: .85rem; font-weight: 500; }

.form-card, .panel {
  background: var(--white); border: 1px solid var(--rule); border-radius: 18px;
  padding: 1.4rem 1.5rem; box-shadow: var(--shadow-sm, 0 8px 24px rgba(26,74,86,.08));
}
.form-card { max-width: 36rem; margin: 0 auto; }
.form-card h1 { font-size: 2.1rem; }
label { display: block; font-size: .88rem; font-weight: 600; margin: .85rem 0 .3rem; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=tel],
input[type=number], input[type=datetime-local], input[type=file], select, textarea {
  width: 100%; border: 1px solid var(--rule); border-radius: 10px; padding: .65rem .75rem; background: var(--cream);
}
textarea { resize: vertical; min-height: 5rem; }
.hint { font-size: .8rem; color: var(--ink-soft); margin-top: .25rem; }
.optional { font-weight: 400; color: var(--ink-soft); }
.phone-row, .name-grid, .split { display: grid; gap: .8rem; }
.phone-row { grid-template-columns: 200px 1fr; }
.split { grid-template-columns: 1fr 1fr; }
.counter { text-align: right; font-size: .8rem; color: var(--teal); margin-top: .2rem; }
.consent { display: flex; gap: .7rem; align-items: flex-start; margin: 1.1rem 0 1.3rem; font-size: .92rem; color: var(--ink-soft); }
.form-note { margin-top: 1rem; font-size: .92rem; color: var(--ink-soft); text-align: center; }
.alert { padding: .85rem 1rem; border-radius: 12px; margin: 1rem 0; }
.alert-error { background: #FDECEA; border: 1px solid #E8B4A8; }
.alert-ok { background: #E7F3EE; border: 1px solid #B5D4C6; }
.alert-info { background: #EEF3F5; border: 1px solid var(--sand-deep); }

.filters { display: flex; gap: .5rem; flex-wrap: wrap; margin: 1rem 0 1.2rem; }
.filter-btn, .filters button, .filters a.filter-btn {
  border: 1px solid var(--rule); background: var(--white); border-radius: 999px;
  padding: .35rem .9rem; text-decoration: none; color: var(--ink); font-size: .88rem;
}
.filter-btn.on, .filters button.on, .filters a.filter-btn.on { background: var(--teal); color: #fff; border-color: var(--teal); }

.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.1rem; margin: 1rem 0 2rem; }
.lib-card {
  display: block; background: var(--white); border: 1px solid var(--rule); border-radius: 16px;
  overflow: hidden; text-decoration: none; color: inherit; box-shadow: 0 8px 24px rgba(26,74,86,.06);
}
.lib-card h3 { font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.3rem; margin: .2rem 0 .25rem; }
.lib-card .body { padding: 1rem 1.15rem 1.1rem; }
.lib-card .meta, .lib-card p { color: var(--ink-soft); font-size: .92rem; }
.lib-card .thumb { position: relative; height: 150px; background: var(--teal); overflow: hidden; }
.lib-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.lock-flag { position: absolute; top: .6rem; left: .6rem; z-index: 1; }
.pill { display: inline-block; border: 1px solid var(--rule); border-radius: 999px; padding: .12rem .55rem; font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; }
.pill-teal { border-color: var(--teal); color: var(--teal-dark); }
.pill-gold { border-color: var(--gold); color: #8A6A2B; background: #F8F0DE; }
.lib-card.is-locked { opacity: .92; }

.dash-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 1.2rem; margin: 1.4rem 0 2rem; align-items: start; }
.verse-card blockquote { font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.35rem; line-height: 1.45; margin: .6rem 0 1rem; }
.verse-card .version { font-weight: 600; margin-bottom: .2rem; }
.verse-card .attrib { font-size: .8rem; color: var(--ink-soft); }
.announce-card + .announce-card { margin-top: 1.1rem; padding-top: 1.1rem; border-top: 1px solid var(--rule); }
.announce-card h3, .dash-announcements h2, .dash-series h2, .dash-recent h2 { font-family: "Cormorant Garamond", Georgia, serif; }
.rich :where(p,ul,ol,blockquote) { margin: .5rem 0; }
.rich a { color: var(--teal-dark); }
.tour-replay { margin: 0 0 1rem; font-size: .9rem; }

.path-list { list-style: none; display: flex; flex-direction: column; gap: .9rem; margin-top: 1.2rem; }
.path-list li a { display: grid; grid-template-columns: 120px 1fr auto; gap: 1rem; align-items: center; background: var(--white); border: 1px solid var(--rule); border-radius: 16px; padding: .8rem; text-decoration: none; color: inherit; }
.path-list .step-thumb { height: 80px; border-radius: 10px; overflow: hidden; background: var(--teal); }
.path-list .step-thumb img { width: 100%; height: 100%; object-fit: cover; }
.path-list h3 { font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.3rem; }
.path-list li.is-locked { opacity: .85; }
.wrap.narrow { max-width: 720px; }
.pdf-frame iframe { width: 100%; min-height: 70vh; border: 1px solid var(--rule); border-radius: 12px; background: #fff; }
.reading .rich { font-size: 1.05rem; }

.msg-shell { display: grid; grid-template-columns: 280px 1fr; gap: 1rem; margin-top: 1rem; }
.msg-list { background: var(--white); border: 1px solid var(--rule); border-radius: 16px; overflow: auto; max-height: 70vh; }
.msg-item { display: block; padding: .85rem 1rem; border-bottom: 1px solid var(--rule); text-decoration: none; color: inherit; }
.msg-item.on { background: var(--cream); }
.msg-item .meta { display: block; font-size: .78rem; color: var(--ink-soft); }
.msg-thread { background: var(--white); border: 1px solid var(--rule); border-radius: 16px; padding: 1.1rem 1.2rem; }
.bubbles { list-style: none; display: flex; flex-direction: column; gap: .7rem; margin: 1rem 0; }
.bubbles li { max-width: 80%; padding: .7rem .9rem; border-radius: 14px; background: var(--cream); }
.bubbles li.mine { align-self: flex-end; background: #E8F0F2; }
.bubbles .who { font-size: .75rem; color: var(--ink-soft); margin-bottom: .2rem; }
.reply-form { margin-top: 1rem; }

/* Admin console */
.admin-shell { display: grid; grid-template-columns: 230px 1fr; gap: 1.4rem; padding: 1.5rem 0 3rem; align-items: start; }
.admin-side { background: var(--white); border: 1px solid var(--rule); border-radius: 16px; padding: 1rem .8rem; position: sticky; top: 5rem; }
.admin-side a { display: block; padding: .45rem .7rem; border-radius: 8px; text-decoration: none; color: var(--ink-soft); }
.admin-side a[aria-current="page"] { background: var(--cream); color: var(--ink); font-weight: 600; }
.admin-side .side-back { margin-top: .8rem; font-size: .85rem; }
.admin-main h1 { font-size: 2.1rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .8rem; margin: 1rem 0 1.4rem; }
.stat { background: var(--white); border: 1px solid var(--rule); border-radius: 14px; padding: .9rem 1rem; }
.stat b { display: block; font-size: 1.6rem; font-family: "Cormorant Garamond", Georgia, serif; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.toolbar { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1rem; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: .45rem .3rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.status-on { color: #2A6A4A; }
.status-off { color: var(--sunset); }
.dropzone { border: 2px dashed var(--sky); margin-bottom: 1.2rem; }
.dropzone.is-over { background: #F3E8DA; }
.sample-strip { display: flex; justify-content: space-between; gap: 1rem; align-items: center; margin-bottom: 1rem; }
.wysiwyg-bar { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .4rem; }
.wysiwyg-bar button { border: 1px solid var(--rule); background: var(--white); border-radius: 8px; padding: .2rem .55rem; cursor: pointer; }
.wysiwyg-edit { min-height: 10rem; border: 1px solid var(--rule); border-radius: 10px; padding: .7rem .8rem; background: var(--cream); }
.reorder { list-style: none; margin: .5rem 0; }
.reorder li { padding: .4rem .5rem; border: 1px solid var(--rule); border-radius: 8px; margin-bottom: .35rem; background: var(--cream); cursor: grab; }
.search-form { display: flex; gap: .5rem; align-items: end; margin-bottom: 1rem; }
.search-form input { max-width: 28rem; }
.nested-form { margin-top: 1rem; }
fieldset { border: 1px solid var(--rule); border-radius: 12px; padding: .8rem 1rem 1rem; margin: 1rem 0; }
legend { padding: 0 .3rem; font-weight: 600; }
select.multi { min-height: 14rem; }

/* Tour */
.tour-overlay { position: fixed; inset: 0; background: rgba(28,42,51,.35); z-index: 80; }
.tour-card {
  position: absolute; left: 1.5rem; bottom: 1.5rem; max-width: 26rem;
  background: var(--white); border-radius: 16px; padding: 1.1rem 1.2rem; box-shadow: var(--shadow);
}
.tour-card.tour-bottom { bottom: 1.5rem; top: auto; }
.tour-actions { display: flex; gap: .4rem; align-items: center; margin-top: 1rem; }
.tour-actions .spacer { flex: 1; }
.tour-highlight { outline: 3px solid var(--sunset); outline-offset: 4px; position: relative; z-index: 81; border-radius: 12px; }

/* Viewer / video leftovers */
body.viewer { background: #1a2228; color: var(--cream); }
.viewer-head, .watch-main { padding: 1.5rem 0 2rem; }
.player video, #share-video { width: 100%; max-height: 80vh; background: #000; border-radius: 12px; }
.hero, .features { /* landing still uses these */ }

@media (max-width: 900px) {
  .dash-grid, .admin-grid, .msg-shell, .admin-shell, .path-list li a { grid-template-columns: 1fr; }
  .admin-side { position: static; display: flex; flex-wrap: wrap; gap: .2rem; }
  .nav-hide-sm { display: none !important; }
  .split, .phone-row { grid-template-columns: 1fr; }
}


/* Admin chrome stays coastal-light, matching the approved mockups (override v1 dark header). */
body.admin header.site,
body.admin-console header.site {
  background: var(--sand);
  border-bottom: 1px solid var(--rule);
}
body.admin .brand,
body.admin .brand .name strong,
body.admin .brand .meta strong { color: var(--ink); }
body.admin .brand .name span,
body.admin .brand .meta span,
body.admin nav.links a { color: var(--ink-soft); }
body.admin nav.links a[aria-current="page"] { color: var(--ink); }


/* Revamp polish: typographic covers, card rows, series path */
.hello { margin-bottom: .4rem; }
.hello h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: .3rem; }
.hello p.lead { color: var(--ink-soft); margin-bottom: 1.8rem; }
.dash-grid.top-pane { grid-template-columns: 1.15fr .85fr; margin-bottom: 2.4rem; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; margin: .4rem 0 1rem;
}
.section-head h2 { font-size: 1.8rem; }
.section-head a { font-size: .88rem; font-weight: 600; text-decoration: none; }
.card-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.15rem;
  margin-bottom: 2.4rem;
}
.card-row.four { grid-template-columns: repeat(4, 1fr); }
a.media-card, .media-card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 1.15rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
  text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
  padding: 0;
}
.media-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.media-card.lib-card .thumb,
.media-card .thumb {
  position: relative;
  height: auto;
  aspect-ratio: 4 / 3;
  background: var(--sand-deep);
  overflow: hidden;
  margin: 0;
  border-radius: 0;
}
.media-card.series-card .thumb {
  aspect-ratio: 4 / 5;
  height: auto;
}
.media-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-card .body { padding: 1rem 1.05rem 1.15rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.media-card h3 { font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.25rem; margin: .15rem 0 .1rem; }
.media-card p { color: var(--ink-soft); font-size: .9rem; }
.media-card .meta { font-size: .75rem; color: var(--ink-soft); letter-spacing: .04em; margin-top: auto; padding-top: .5rem; text-transform: none; }
.media-card.is-locked, .media-card.locked { opacity: 1; }
.media-card.is-locked .thumb::after,
.media-card.locked .thumb::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(28,42,51,.05), rgba(28,42,51,.28));
  pointer-events: none;
}
.lock-flag { position: absolute; top: .7rem; right: .7rem; left: auto; z-index: 2; }

.series-hero {
  display: grid; grid-template-columns: 200px 1fr; gap: 1.6rem; align-items: center;
  background: var(--white); border: 1px solid var(--rule); border-radius: 1.25rem;
  padding: 1.4rem; margin: 1rem 0 2rem; box-shadow: var(--shadow-sm);
}
.series-hero .cover { border-radius: 1rem; overflow: hidden; aspect-ratio: 4/5; background: var(--sand-deep); }
.series-hero .cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.series-hero h1 { font-size: clamp(2rem, 4vw, 2.7rem); margin: .3rem 0 .6rem; }
.path-title { font-size: 1.8rem; margin: 0 0 1rem; }
.path { list-style: none; display: flex; flex-direction: column; gap: 0; margin: 0; padding: 0; }
.path li { display: grid; grid-template-columns: 56px 1fr; gap: 1rem; }
.path .rail { display: flex; flex-direction: column; align-items: center; }
.path .num {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--white); border: 2px solid var(--gold);
  display: grid; place-items: center; font-weight: 700; color: var(--teal-dark);
  z-index: 1; flex: 0 0 36px;
}
.path .rail::after { content: ""; flex: 1; width: 2px; background: var(--sand-deep); margin: .2rem 0; }
.path li:last-child .rail::after { display: none; }
.path .item {
  background: var(--white); border: 1px solid var(--rule); border-radius: 1.1rem;
  padding: 1rem 1.1rem; display: grid; grid-template-columns: 88px 1fr auto; gap: 1rem;
  align-items: center; margin-bottom: 1rem; text-decoration: none; color: inherit;
  box-shadow: var(--shadow-sm);
}
.path .item img { width: 88px; height: 66px; object-fit: cover; border-radius: .6rem; background: var(--sand-deep); }
.path .item.locked { opacity: .92; background: #f8efdc; border-color: var(--sand-deep); }
.path h3 { font-size: 1.2rem; margin: .2rem 0 .15rem; }
.path p { color: var(--ink-soft); font-size: .88rem; margin: 0; }

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

@media (max-width: 980px) {
  .dash-grid.top-pane, .series-hero, .path .item, .card-row, .card-row.four, .series-grid {
    grid-template-columns: 1fr;
  }
  .path .item { grid-template-columns: 72px 1fr; }
  .path .item .cta { grid-column: 2; }
  .hello h1 { font-size: 1.8rem; }
}
@media (min-width: 700px) and (max-width: 980px) {
  .card-row, .series-grid { grid-template-columns: repeat(2, 1fr); }
  .card-row.four { grid-template-columns: repeat(2, 1fr); }
}
