/*
Theme Name: Spirit Meat
Theme URI: https://spiritmeat.net/
Author: Sola Areogun Ministries
Description: A blue, calm, reading-first daily devotional theme for Spirit Meat. Features a "Today's Devotional" home page, automatic styling of Thought to Ponder / Prayer / Bible in One Year sections, scripture links, listen-aloud, dark mode, text-size controls, reading progress, share buttons, a date-jump archive, YouTube live section, app links and a mobile bottom bar.
Version: 1.10.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: spiritmeat
Tags: blog, one-column, two-columns, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, accessibility-ready
*/

/* ==========================================================================
   1. Design tokens
   ========================================================================== */
:root {
  --paper: #F7F9FB;
  --paper-2: #EDF1F8;
  --card: #FFFFFF;
  --ink: #0E1A2B;
  --ink-2: #4A5668;
  --ink-3: #7B8798;
  --line: #DAE2EC;
  --wine: #2453A6;
  --wine-2: #1D4489;
  --wine-soft: #E9EEF8;
  --gold: #C9520F;
  --gold-soft: #FDEEE3;
  --green-soft: #E7F2EE;
  --green: #217A5B;
  --link: #1D4489;
  --on-wine: #FFFFFF;
  --flame: #E8631A;

  --f-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --f-read: "Source Serif 4", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --f-ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --read-size: 1.1875rem;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(0, 30, 70, .05), 0 8px 28px rgba(0, 30, 70, .07);
  --shadow-lg: 0 2px 6px rgba(0, 30, 70, .06), 0 24px 60px rgba(0, 30, 70, .13);
  --wrap: 1180px;
  --measure: 690px;
  --header-h: 72px;
  color-scheme: light;
}

html[data-theme="dark"] {
  --paper: #08111D;
  --paper-2: #0E1827;
  --card: #132033;
  --ink: #E8EEF6;
  --ink-2: #A8B5C7;
  --ink-3: #7C8A9E;
  --line: #223247;
  --wine: #3A6BC4;
  --wine-2: #9DB8EC;
  --wine-soft: #10243B;
  --gold: #FF8A3D;
  --gold-soft: #2A1D16;
  --green-soft: #12241F;
  --green: #7FD0AE;
  --link: #A8C1F0;
  --flame: #FF8A3D;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 28px rgba(0,0,0,.35);
  --shadow-lg: 0 2px 6px rgba(0,0,0,.35), 0 24px 60px rgba(0,0,0,.5);
  color-scheme: dark;
}

html.sm-system-fonts {
  --f-display: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --f-read: "Iowan Old Style", Georgia, "Times New Roman", serif;
  --f-ui: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ==========================================================================
   2. Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-ui);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .25s ease, color .25s ease;
}
img, svg, video, iframe { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--wine); }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 600; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .5em; color: var(--ink); }
p { margin: 0 0 1.1em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--gold-soft); color: var(--ink); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 10px; left: 10px; z-index: 1000; width: auto; height: auto; clip: auto; padding: 12px 18px; background: var(--ink); color: var(--paper); border-radius: 8px; }

.sm-wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.sm-narrow { width: min(100% - 40px, var(--measure)); margin-inline: auto; }

.sm-eyebrow { font: 600 .75rem/1.2 var(--f-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); display: inline-flex; align-items: center; gap: .6em; }
.sm-eyebrow::before { content: ""; width: 22px; height: 1.5px; background: currentColor; }
.sm-section-title { font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin: .35em 0 0; }
.sm-section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.sm-link-more { font: 600 .9rem var(--f-ui); text-decoration: none; display: inline-flex; gap: .4em; align-items: center; white-space: nowrap; transition: gap .2s; }
.sm-link-more svg { width: 18px; height: 18px; }
.sm-link-more:hover { gap: .65em; }

/* Buttons */
.sm-btn { display: inline-flex; align-items: center; justify-content: center; gap: .55em; padding: .8em 1.35em; border-radius: 999px; border: 1.5px solid transparent; font: 600 .95rem/1 var(--f-ui); text-decoration: none; cursor: pointer; transition: transform .15s ease, background-color .2s, border-color .2s, color .2s; white-space: nowrap; }
.sm-btn:active { transform: translateY(1px); }
.sm-btn--primary { background: var(--wine); color: var(--on-wine); }
.sm-btn--primary:hover { background: var(--wine-2); color: var(--on-wine); }
html[data-theme="dark"] .sm-btn--primary:hover { background: #4A7BD4; }
.sm-btn--ghost { border-color: var(--line); background: transparent; color: var(--ink); }
.sm-btn--ghost:hover { border-color: var(--ink-3); color: var(--ink); }
.sm-btn--gold { background: var(--flame); color: #fff; }
.sm-btn--gold:hover { filter: brightness(1.08); color: #fff; }
.sm-btn svg { width: 18px; height: 18px; flex: none; }

.sm-chip { display: inline-flex; align-items: center; gap: .4em; padding: .38em .8em; border-radius: 999px; background: var(--gold-soft); color: var(--ink); font: 500 .85rem/1.2 var(--f-ui); text-decoration: none; border: 1px solid transparent; }
a.sm-chip:hover { border-color: var(--gold); color: var(--ink); }
.sm-chip svg { width: 14px; height: 14px; color: var(--gold); }
.sm-chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* ==========================================================================
   3. Header
   ========================================================================== */
.sm-progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60; background: transparent; pointer-events: none; }
.sm-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--flame), #F4B13E); }

.sm-topbar { background: var(--wine); color: var(--on-wine); font: 500 .82rem/1.2 var(--f-ui); }
.sm-topbar .sm-wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 38px; }
.sm-topbar a { color: var(--on-wine); text-decoration: none; opacity: .92; }
.sm-topbar a:hover { opacity: 1; text-decoration: underline; color: var(--on-wine); }
.sm-topbar__date { opacity: .85; }
.sm-topbar__links { display: flex; gap: 18px; align-items: center; }
@media (max-width: 640px) { .sm-topbar__links a:not(.sm-keep) { display: none; } .sm-topbar__links a { white-space: nowrap; } }
@media (max-width: 480px) { .sm-topbar__date { display: none; } .sm-topbar .sm-wrap { justify-content: center; } }

.sm-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--paper) 86%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; }
.sm-header.is-stuck { border-bottom-color: var(--line); }
.sm-header .sm-wrap { display: flex; align-items: center; gap: 24px; min-height: var(--header-h); }
.admin-bar .sm-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .sm-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .sm-header { top: 0; } }

.sm-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); margin-right: auto; min-width: 0; flex-shrink: 0; }
.sm-brand img, .sm-brand .custom-logo { max-height: 46px; width: auto; }
.sm-logo { height: 56px; width: auto; max-width: 240px; object-fit: contain; }
.sm-logo--light { display: none; }
html[data-theme="dark"] .sm-header .sm-logo--dark, html[data-theme="dark"] .sm-drawer .sm-logo--dark { display: none; }
html[data-theme="dark"] .sm-header .sm-logo--light, html[data-theme="dark"] .sm-drawer .sm-logo--light { display: block; }
.sm-footer .sm-logo--dark { display: none; }
.sm-footer .sm-logo--light { display: block; height: 58px; max-width: 260px; }
@media (max-width: 440px) { .sm-logo { height: 40px; max-width: 170px; } }
.sm-brand__mark { width: 42px; height: 42px; border-radius: 12px; background: var(--wine); color: var(--on-wine); display: grid; place-items: center; flex: none; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.sm-brand__mark svg { width: 24px; height: 24px; }
.sm-brand__text { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
.sm-brand__name { font: 650 1.35rem var(--f-display); letter-spacing: -.01em; }
.sm-brand__tag { font: 500 .7rem var(--f-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-top: 3px; white-space: nowrap; }
@media (max-width: 440px) { .sm-brand__tag { letter-spacing: .08em; font-size: .62rem; } .sm-header .sm-wrap { gap: 10px; } }

.sm-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.sm-nav li { position: relative; }
.sm-nav a { display: block; white-space: nowrap; padding: 10px 14px; border-radius: 999px; text-decoration: none; color: var(--ink); font: 500 .94rem var(--f-ui); }
.sm-nav a:hover, .sm-nav .current-menu-item > a, .sm-nav .current-menu-ancestor > a { background: var(--paper-2); color: var(--ink); }
.sm-nav .menu-item-has-children > a::after { content: ""; display: inline-block; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-3px) rotate(45deg); margin-left: 8px; opacity: .6; }
.sm-nav .sub-menu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 250px; padding: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); flex-direction: column; gap: 2px; opacity: 0; visibility: hidden; transform: translateY(6px); transition: .18s ease; z-index: 5; }
.sm-nav .sub-menu a { border-radius: 8px; }
.sm-nav li:hover > .sub-menu, .sm-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }

.sm-tools { display: flex; align-items: center; gap: 6px; }
.sm-icon-btn { width: 42px; height: 42px; border-radius: 999px; display: inline-grid; place-items: center; background: transparent; border: 1px solid transparent; color: var(--ink); cursor: pointer; text-decoration: none; }
.sm-icon-btn:hover { background: var(--paper-2); color: var(--ink); }
.sm-icon-btn svg { width: 20px; height: 20px; }
.sm-icon-moon { display: none; }
html[data-theme="dark"] .sm-icon-sun { display: none; }
html[data-theme="dark"] .sm-icon-moon { display: block; }
.sm-menu-toggle { display: none; }

@media (max-width: 1180px) {
  .sm-nav { display: none; }
  .sm-menu-toggle { display: inline-grid; }
}

/* Drawer */
.sm-drawer { position: fixed; inset: 0; z-index: 100; visibility: hidden; }
.sm-drawer.is-open { visibility: visible; }
.sm-drawer__scrim { position: absolute; inset: 0; background: rgba(0,12,30,.55); opacity: 0; transition: opacity .25s; }
.sm-drawer.is-open .sm-drawer__scrim { opacity: 1; }
.sm-drawer__panel { position: absolute; inset: 0 0 0 auto; width: min(88vw, 380px); background: var(--paper); padding: 20px 22px 40px; overflow-y: auto; transform: translateX(100%); transition: transform .3s cubic-bezier(.2,.8,.2,1); box-shadow: var(--shadow-lg); }
.sm-drawer.is-open .sm-drawer__panel { transform: none; }
.sm-drawer__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.sm-drawer ul { list-style: none; margin: 0; padding: 0; }
.sm-drawer li a { display: block; padding: 13px 4px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); font: 500 1.05rem var(--f-ui); }
.sm-drawer .sub-menu a { padding-left: 18px; font-size: .95rem; color: var(--ink-2); }
.sm-drawer__apps { margin-top: 26px; display: grid; gap: 10px; }

/* Search overlay */
.sm-search { position: fixed; inset: 0; z-index: 110; display: none; align-items: flex-start; justify-content: center; padding: 12vh 20px 20px; background: rgba(0,12,30,.6); }
.sm-search.is-open { display: flex; }
.sm-search__box { width: min(100%, 640px); background: var(--card); border-radius: 22px; padding: 22px; box-shadow: var(--shadow-lg); }
.sm-search__hint { font: .85rem var(--f-ui); color: var(--ink-3); margin: 14px 2px 0; }

.sm-searchform { display: flex; gap: 8px; }
.sm-searchform input[type="search"] { flex: 1; min-width: 0; padding: .85em 1.1em; border-radius: 999px; border: 1.5px solid var(--line); background: var(--paper); outline: none; }
.sm-searchform input[type="search"]:focus { border-color: var(--gold); }

/* ==========================================================================
   4. Home
   ========================================================================== */
.sm-hero { position: relative; padding: 48px 0 64px; overflow: hidden; }
.sm-hero::before { content: ""; position: absolute; inset: -40% -10% auto auto; width: 720px; height: 720px; border-radius: 50%; background: radial-gradient(closest-side, var(--wine-soft), transparent 70%); opacity: .9; pointer-events: none; }
.sm-hero__grid { position: relative; display: grid; grid-template-columns: 1.08fr .92fr; gap: 56px; align-items: center; }
.sm-hero__date { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.sm-datebadge { width: 64px; height: 70px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow); display: grid; grid-template-rows: 22px 1fr; overflow: hidden; text-align: center; flex: none; }
.sm-datebadge__m { background: var(--wine); color: var(--on-wine); font: 700 .66rem/22px var(--f-ui); letter-spacing: .12em; text-transform: uppercase; }
.sm-datebadge__d { font: 650 1.65rem/46px var(--f-display); color: var(--ink); }
.sm-hero__datetext { font: 500 .95rem var(--f-ui); color: var(--ink-2); }
.sm-hero__datetext strong { display: block; color: var(--gold); font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; }
.sm-hero__title { font-size: clamp(2.3rem, 5vw, 4.1rem); line-height: 1.02; letter-spacing: -.025em; margin-bottom: 20px; font-weight: 600; }
.sm-hero__title a { color: inherit; text-decoration: none; }
.sm-hero__excerpt { font: 400 1.18rem/1.65 var(--f-read); color: var(--ink-2); max-width: 36em; margin: 20px 0 28px; }
.sm-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.sm-hero__media { position: relative; }
.sm-hero__img { aspect-ratio: 1/1.08; border-radius: 28px; overflow: hidden; box-shadow: var(--shadow-lg); background: var(--paper-2); transform: rotate(1.2deg); }
.sm-hero__img img { width: 100%; height: 100%; object-fit: cover; }
.sm-hero__verse { position: absolute; left: -36px; bottom: 34px; max-width: 340px; background: var(--card); border-radius: 18px; padding: 18px 20px; box-shadow: var(--shadow-lg); transform: rotate(-1.5deg); }
.sm-hero__verse p { font: italic 400 1.02rem/1.5 var(--f-read); margin: 0 0 6px; }
.sm-hero__verse span { font: 600 .78rem var(--f-ui); color: var(--gold); letter-spacing: .06em; text-transform: uppercase; }
.sm-hero__placeholder { width: 100%; height: 100%; display: grid; place-items: center; background: radial-gradient(circle at 30% 20%, #3A6CC2, #2453A6 50%, #15336B); color: var(--on-wine); }
.sm-hero__placeholder svg { width: 38%; height: auto; opacity: .9; }
@media (max-width: 900px) {
  .sm-hero { padding: 28px 0 44px; }
  .sm-hero__grid { grid-template-columns: 1fr; gap: 36px; }
  .sm-hero__media { order: -1; max-width: 520px; }
  .sm-hero__img { aspect-ratio: 16/11; transform: none; border-radius: 22px; }
  .sm-hero__verse { display: none; }
}

/* App strip */
.sm-strip { border-block: 1px solid var(--line); background: var(--paper-2); }
.sm-strip .sm-wrap { display: grid; grid-template-columns: repeat(4, 1fr); }
.sm-strip a { display: flex; align-items: center; gap: 14px; padding: 22px 18px; text-decoration: none; color: var(--ink); border-right: 1px solid var(--line); transition: background-color .2s; }
.sm-strip a:last-child { border-right: 0; }
.sm-strip a:hover { background: var(--card); color: var(--ink); }
.sm-strip__ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--card); box-shadow: var(--shadow); flex: none; color: var(--wine-2); }
.sm-strip__ic svg { width: 22px; height: 22px; }
.sm-strip b { display: block; font: 600 .97rem var(--f-ui); }
.sm-strip small { color: var(--ink-3); font-size: .83rem; }
@media (max-width: 900px) { .sm-strip .sm-wrap { grid-template-columns: 1fr 1fr; } .sm-strip a:nth-child(2) { border-right: 0; } .sm-strip a:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }
@media (max-width: 480px) { .sm-strip a { padding: 16px 10px; gap: 10px; } .sm-strip small { display: none; } }

.sm-section { padding: 80px 0; }
.sm-section--alt { background: var(--paper-2); }
@media (max-width: 700px) { .sm-section { padding: 56px 0; } }

/* Cards */
.sm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 960px) { .sm-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .sm-grid { grid-template-columns: 1fr; gap: 18px; } }
.sm-card { position: relative; display: flex; flex-direction: column; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .25s ease, box-shadow .25s ease; }
.sm-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.sm-card__img { aspect-ratio: 16/10; background: var(--paper-2); overflow: hidden; }
.sm-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.sm-card:hover .sm-card__img img { transform: scale(1.04); }
.sm-card__img--empty { display: grid; place-items: center; background: linear-gradient(135deg, #2D5DB3, #132D5E); color: var(--on-wine); }
.sm-card__img--empty span { font: 600 2.4rem var(--f-display); opacity: .9; }
.sm-card__body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.sm-card__date { font: 600 .74rem var(--f-ui); letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.sm-card__title { font-size: 1.32rem; line-height: 1.2; margin: 0 0 10px; }
.sm-card__title a { color: var(--ink); text-decoration: none; }
.sm-card__title a::after { content: ""; position: absolute; inset: 0; }
.sm-card__refs { font: 500 .86rem/1.4 var(--f-ui); color: var(--ink-2); margin-top: auto; display: flex; gap: 6px; align-items: flex-start; }
.sm-card__refs svg { width: 15px; height: 15px; margin-top: 2px; color: var(--gold); flex: none; }

/* Row list (popular / compact) */
.sm-list { list-style: none; margin: 0; padding: 0; counter-reset: sm; }
.sm-list li { counter-increment: sm; display: grid; grid-template-columns: 38px 1fr; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.sm-list li:last-child { border-bottom: 0; }
.sm-list li::before { content: counter(sm, decimal-leading-zero); font: 600 1.25rem var(--f-display); color: var(--gold); }
.sm-list a { color: var(--ink); text-decoration: none; font: 600 1.05rem/1.3 var(--f-display); }
.sm-list a:hover { color: var(--wine-2); }
.sm-list small { display: block; color: var(--ink-3); font: 500 .8rem var(--f-ui); margin-top: 4px; }

.sm-split { display: grid; grid-template-columns: 1.35fr 1fr; gap: 48px; align-items: start; }
@media (max-width: 900px) { .sm-split { grid-template-columns: 1fr; } }

/* Watch live */
.sm-live { background: #08142B; color: #EAF0FA; position: relative; overflow: hidden; }
.sm-live::before { content: ""; position: absolute; inset: auto -20% -60% auto; width: 800px; height: 800px; background: radial-gradient(closest-side, rgba(232,99,26,.22), transparent); pointer-events: none; }
.sm-live h2, .sm-live .sm-section-title { color: #FFFFFF; }
.sm-live__grid { position: relative; display: grid; grid-template-columns: .85fr 1.15fr; gap: 56px; align-items: center; }
@media (max-width: 900px) { .sm-live__grid { grid-template-columns: 1fr; gap: 32px; } }
.sm-live p { color: #B6C2D6; font-size: 1.06rem; }
.sm-live__badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: rgba(220,50,50,.16); color: #FF9C9C; font: 700 .75rem var(--f-ui); letter-spacing: .12em; text-transform: uppercase; }
.sm-live__badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #FF4D4D; box-shadow: 0 0 0 0 rgba(255,77,77,.6); animation: sm-pulse 1.8s infinite; }
@keyframes sm-pulse { 70% { box-shadow: 0 0 0 10px rgba(255,77,77,0); } 100% { box-shadow: 0 0 0 0 rgba(255,77,77,0); } }
.sm-video { position: relative; aspect-ratio: 16/9; border-radius: 20px; overflow: hidden; background: #000; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.sm-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.sm-video__facade { position: absolute; inset: 0; width: 100%; border: 0; cursor: pointer; display: grid; place-items: center; background: radial-gradient(circle at 30% 30%, #1D3F7E, #040A16 70%); color: #fff; }
.sm-video__facade span { width: 84px; height: 84px; border-radius: 50%; background: var(--flame); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 40px rgba(232,99,26,.45); transition: transform .2s; }
.sm-video__facade:hover span { transform: scale(1.06); }
.sm-video__facade svg { width: 30px; height: 30px; margin-left: 4px; }
.sm-video__facade em { position: absolute; bottom: 18px; left: 22px; font: 500 .9rem var(--f-ui); font-style: normal; opacity: .75; }
.sm-live .sm-btn--ghost { color: #EAF0FA; border-color: rgba(255,255,255,.2); }
.sm-live .sm-btn--ghost:hover { border-color: rgba(255,255,255,.5); }

/* Ministry */
.sm-ministry { display: grid; grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: center; }
.sm-ministry__img { border-radius: 26px; overflow: hidden; aspect-ratio: 5/4; box-shadow: var(--shadow-lg); background: var(--paper-2); }
.sm-ministry__img img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.sm-ministry blockquote { margin: 0 0 22px; font: italic 400 1.3rem/1.55 var(--f-read); color: var(--ink); border-left: 3px solid var(--gold); padding-left: 20px; }
.sm-ministry__links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
@media (max-width: 900px) { .sm-ministry { grid-template-columns: 1fr; gap: 32px; } }

/* Subscribe / CTA card */
.sm-subscribe { background: var(--wine); color: var(--on-wine); border-radius: 24px; padding: 34px; position: relative; overflow: hidden; }
.sm-subscribe::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; border: 36px solid rgba(255,255,255,.06); }
.sm-subscribe h2, .sm-subscribe h3 { color: #FFFFFF; font-size: 1.7rem; }
.sm-subscribe p { color: rgba(255,255,255,.82); }
.sm-subscribe a:not(.sm-btn) { color: #FFFFFF; }
.sm-subscribe input[type="email"], .sm-subscribe input[type="text"] { width: 100%; padding: .9em 1.1em; border-radius: 999px; border: 0; background: rgba(255,255,255,.95); color: #1D1B18; margin-bottom: 10px; }
.sm-subscribe input[type="submit"], .sm-subscribe button[type="submit"] { width: 100%; padding: .9em 1.1em; border-radius: 999px; border: 0; background: var(--flame); color: #fff; font-weight: 700; cursor: pointer; }
.sm-subscribe__alt { display: grid; gap: 10px; position: relative; z-index: 1; }
.sm-subscribe__alt .sm-btn { justify-content: flex-start; background: rgba(255,255,255,.12); color: #FFFFFF; }
.sm-subscribe__alt .sm-btn:hover { background: rgba(255,255,255,.18); }

/* Find by date */
.sm-finder { background: var(--card); border-radius: 24px; padding: 34px; box-shadow: var(--shadow); display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.sm-finder form { display: flex; gap: 8px; flex-wrap: wrap; }
.sm-finder input[type="date"] { flex: 1; min-width: 170px; padding: .78em 1em; border-radius: 999px; border: 1.5px solid var(--line); background: var(--paper); }
.sm-finder__row + .sm-finder__row { margin-top: 12px; }
.sm-finder__lbl { display: block; font: 600 .8rem var(--f-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
@media (max-width: 800px) { .sm-finder { grid-template-columns: 1fr; gap: 20px; padding: 24px; } }

/* ==========================================================================
   5. Single devotional
   ========================================================================== */
.sm-article-head { padding: 52px 0 28px; text-align: center; }
.sm-article-head .sm-eyebrow { justify-content: center; }
.sm-article-head .sm-eyebrow::after { content: ""; width: 22px; height: 1.5px; background: currentColor; }
.sm-article-title { font-size: clamp(2.1rem, 5.2vw, 3.6rem); line-height: 1.05; letter-spacing: -.025em; margin: 18px auto 22px; max-width: 16em; }
.sm-article-head .sm-chips { justify-content: center; }
.sm-meta { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 18px; margin-top: 22px; font: 500 .88rem var(--f-ui); color: var(--ink-3); }
.sm-meta span { display: inline-flex; align-items: center; gap: 6px; }
.sm-meta svg { width: 15px; height: 15px; }
.sm-meta a { color: inherit; }

.sm-feature { width: min(100% - 40px, 980px); margin: 8px auto 0; border-radius: 26px; overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 16/8.5; background: var(--paper-2); }
.sm-feature img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 640px) { .sm-feature { width: 100%; border-radius: 0; aspect-ratio: 16/10; } }

/* Reader toolbar */
.sm-reader { position: sticky; top: calc(var(--header-h) + 10px); z-index: 20; width: min(100% - 40px, var(--measure)); margin: 30px auto 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 8px 8px 16px; background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow); }
.admin-bar .sm-reader { top: calc(var(--header-h) + 42px); }
.sm-reader__group { display: flex; align-items: center; gap: 4px; }
.sm-reader__label { font: 600 .78rem var(--f-ui); color: var(--ink-3); letter-spacing: .06em; text-transform: uppercase; margin-right: 6px; }
.sm-reader button { height: 38px; min-width: 38px; padding: 0 12px; border-radius: 999px; border: 0; background: transparent; cursor: pointer; font: 600 .9rem var(--f-ui); display: inline-flex; align-items: center; gap: 7px; color: var(--ink); }
.sm-reader button:hover { background: var(--paper-2); }
.sm-reader button[hidden] { display: none; }
.sm-reader button[aria-pressed="true"] { background: var(--wine); color: var(--on-wine); }
.sm-reader button svg { width: 18px; height: 18px; }
.sm-reader .sm-listen { background: var(--gold-soft); }
@media (max-width: 560px) { .sm-reader__label, .sm-reader .sm-hide-sm { display: none; } .sm-reader { padding-left: 8px; } }

.sm-entry { width: min(100% - 40px, var(--measure)); margin: 40px auto 0; font-family: var(--f-read); font-size: var(--read-size); line-height: 1.78; color: var(--ink); }
.sm-entry > p:first-of-type::first-letter { float: left; font: 600 4.3em/.82 var(--f-display); margin: .06em .1em 0 0; color: var(--wine-2); }
.sm-entry h2 { font-size: 1.6em; margin: 1.6em 0 .6em; }
.sm-entry h3 { font-size: 1.25em; margin: 1.6em 0 .6em; }
.sm-entry a { color: var(--link); }
.sm-entry blockquote { margin: 1.6em 0; padding: 1.1em 1.4em; border-left: 3px solid var(--gold); background: var(--gold-soft); border-radius: 0 14px 14px 0; font-style: italic; }
.sm-entry blockquote p:last-child { margin: 0; }
.sm-entry ul, .sm-entry ol { padding-left: 1.3em; }
.sm-entry li { margin-bottom: .35em; }
.sm-entry img { border-radius: 14px; }
.sm-entry figure { margin: 1.8em 0; }
.sm-entry figcaption { font: .85rem var(--f-ui); color: var(--ink-3); text-align: center; margin-top: 8px; }
.sm-entry hr { border: 0; height: 1px; background: var(--line); margin: 2.4em 0; }
.sm-entry .alignwide { width: min(100vw - 40px, 980px); margin-left: 50%; transform: translateX(-50%); }
.sm-entry .alignfull { width: 100vw; margin-left: 50%; transform: translateX(-50%); }
.sm-entry .wp-block-button__link { background: var(--wine); color: var(--on-wine); border-radius: 999px; font-family: var(--f-ui); }
.sm-entry .sm-speaking { background: var(--gold-soft); border-radius: 6px; box-shadow: 0 0 0 6px var(--gold-soft); }

/* Devotional callouts (auto-wrapped) */
.sm-callout { position: relative; margin: 2.2em 0; padding: 26px 28px 24px; border-radius: 20px; background: var(--paper-2); border: 1px solid var(--line); font-size: .96em; }
.sm-callout > h2:first-child, .sm-callout > h3:first-child, .sm-callout > h4:first-child { font: 700 .78rem/1.2 var(--f-ui); letter-spacing: .16em; text-transform: uppercase; margin: 0 0 14px; display: flex; align-items: center; gap: 10px; color: var(--ink-2); }
.sm-callout > :first-child::before { content: ""; width: 30px; height: 30px; border-radius: 10px; flex: none; background: var(--card) center/16px no-repeat; box-shadow: var(--shadow); }
.sm-callout > :last-child { margin-bottom: 0; }
.sm-callout--ponder { background: var(--gold-soft); border-color: transparent; }
.sm-callout--ponder p { font: italic 500 1.15em/1.55 var(--f-display); }
.sm-callout--ponder > :first-child::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23E8631A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6M10 22h4M12 2a7 7 0 0 0-4 12.7c.6.5 1 1.3 1 2.3h6c0-1 .4-1.8 1-2.3A7 7 0 0 0 12 2z'/%3E%3C/svg%3E"); }
.sm-callout--prayer { background: linear-gradient(135deg, #2453A6, #1A3F82); border-color: transparent; color: #FFFFFF; }
.sm-callout--prayer > :first-child { color: rgba(255,255,255,.75) !important; }
.sm-callout--prayer p { font-size: 1.05em; }
.sm-callout--prayer a { color: #FFC9A3; }
.sm-callout--prayer > :first-child::before { background-color: rgba(255,255,255,.12); box-shadow: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFB27A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v18M5 9h14'/%3E%3C/svg%3E"); }
.sm-callout--bible { background: var(--green-soft); border-color: transparent; }
.sm-callout--bible ul, .sm-callout--bible ol { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sm-callout--bible li { margin: 0; }
.sm-callout--bible li a, .sm-callout--bible li span.sm-ref { display: flex; align-items: center; gap: 8px; padding: 12px 14px; background: var(--card); border-radius: 12px; text-decoration: none; color: var(--ink); font: 600 .92rem/1.3 var(--f-ui); box-shadow: var(--shadow); }
.sm-callout--bible li a::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex: none; }
.sm-callout--bible li a:hover { color: var(--green); }
.sm-callout--bible > :first-child::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23217A5B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19.5A2.5 2.5 0 0 1 6.5 17H20V3H6.5A2.5 2.5 0 0 0 4 5.5v14zM20 17v4H6.5A2.5 2.5 0 0 1 4 18.5'/%3E%3C/svg%3E"); }
@media (max-width: 520px) { .sm-callout--bible ul, .sm-callout--bible ol { grid-template-columns: 1fr; } .sm-callout { padding: 22px 20px; } }
.sm-callout--memory, .sm-callout--confession, .sm-callout--action { background: var(--card); box-shadow: var(--shadow); }
.sm-callout--memory > :first-child::before, .sm-callout--confession > :first-child::before, .sm-callout--action > :first-child::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232453A6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4z'/%3E%3C/svg%3E"); }

/* Share */
.sm-share { width: min(100% - 40px, var(--measure)); margin: 48px auto 0; padding: 26px 0; border-block: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.sm-share__label { font: 600 1.05rem var(--f-display); }
.sm-share__btns { display: flex; gap: 8px; flex-wrap: wrap; }
.sm-share__btns a, .sm-share__btns button { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-2); border: 0; color: var(--ink); cursor: pointer; text-decoration: none; transition: transform .15s, background-color .2s; }
.sm-share__btns a:hover, .sm-share__btns button:hover { transform: translateY(-2px); background: var(--wine); color: var(--on-wine); }
.sm-share__btns svg { width: 19px; height: 19px; }
.sm-toast { position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 20px); background: var(--ink); color: var(--paper); padding: 11px 18px; border-radius: 999px; font: 500 .9rem var(--f-ui); opacity: 0; pointer-events: none; transition: .25s; z-index: 120; }
.sm-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* Post nav */
.sm-postnav { width: min(100% - 40px, 980px); margin: 56px auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.sm-postnav a { display: block; padding: 22px 24px; border-radius: 18px; background: var(--card); box-shadow: var(--shadow); text-decoration: none; color: var(--ink); transition: transform .2s; }
.sm-postnav a:hover { transform: translateY(-3px); color: var(--ink); }
.sm-postnav small { display: block; font: 600 .75rem var(--f-ui); letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; }
.sm-postnav strong { font: 600 1.12rem/1.3 var(--f-display); }
.sm-postnav .sm-next { text-align: right; grid-column: 2; }
@media (max-width: 620px) { .sm-postnav { grid-template-columns: 1fr; } .sm-postnav .sm-next { grid-column: auto; } }

/* Apps CTA inside single */
.sm-apps-cta { width: min(100% - 40px, 980px); margin: 56px auto 0; display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: stretch; }
.sm-apps-cta__card { border-radius: 24px; padding: 32px; background: var(--paper-2); }
.sm-apps-cta__card h3 { font-size: 1.6rem; }
.sm-apps-cta__btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
@media (max-width: 800px) { .sm-apps-cta { grid-template-columns: 1fr; } }

/* Comments */
.sm-comments { width: min(100% - 40px, var(--measure)); margin: 64px auto 0; }
.sm-comments__title { font-size: 1.6rem; }
.comment-list { list-style: none; margin: 0 0 40px; padding: 0; }
.comment-list .children { list-style: none; padding-left: 28px; border-left: 2px solid var(--line); margin-left: 10px; }
.comment-body { padding: 20px 0; border-bottom: 1px solid var(--line); }
.comment-author { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.comment-author img { border-radius: 50%; width: 40px; height: 40px; }
.comment-author .says { display: none; }
.comment-metadata { font-size: .8rem; margin: 2px 0 10px 50px; }
.comment-metadata a { color: var(--ink-3); text-decoration: none; }
.comment-content { font-family: var(--f-read); font-size: 1.05rem; padding-left: 50px; }
.reply { padding-left: 50px; font-size: .85rem; font-weight: 600; }
.comment-respond { background: var(--card); border-radius: 22px; padding: 28px; box-shadow: var(--shadow); }
.comment-respond label { display: block; font: 600 .85rem var(--f-ui); margin-bottom: 6px; }
.comment-respond input[type="text"], .comment-respond input[type="email"], .comment-respond input[type="url"], .comment-respond textarea { width: 100%; padding: .8em 1em; border: 1.5px solid var(--line); border-radius: 12px; background: var(--paper); }
.comment-respond textarea { min-height: 140px; }
.comment-respond .submit { background: var(--wine); color: var(--on-wine); border: 0; border-radius: 999px; padding: .85em 1.6em; font-weight: 600; cursor: pointer; }
.comment-form-cookies-consent { display: flex; gap: 8px; align-items: flex-start; font-size: .85rem; }
.comment-form-cookies-consent label { font-weight: 400; display: inline; }

/* ==========================================================================
   6. Archive / pages
   ========================================================================== */
.sm-page-head { padding: 64px 0 40px; background: var(--paper-2); border-bottom: 1px solid var(--line); margin-bottom: 52px; }
.sm-page-head h1 { font-size: clamp(2.1rem, 4.6vw, 3.3rem); margin: 12px 0 10px; }
.sm-page-head p { color: var(--ink-2); max-width: 40em; margin: 0; font-size: 1.08rem; }
.sm-page-head__tools { margin-top: 26px; max-width: 560px; }
.sm-pagination { margin: 56px 0 0; display: flex; justify-content: center; }
.sm-pagination .nav-links { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.sm-pagination .page-numbers { min-width: 44px; height: 44px; padding: 0 14px; border-radius: 999px; display: grid; place-items: center; background: var(--card); box-shadow: var(--shadow); text-decoration: none; color: var(--ink); font-weight: 600; }
.sm-pagination .page-numbers.current { background: var(--wine); color: var(--on-wine); }
.sm-pagination .dots { background: transparent; box-shadow: none; }

.sm-page-content { width: min(100% - 40px, 780px); margin: 0 auto; font-family: var(--f-read); font-size: 1.125rem; line-height: 1.75; }
.sm-page-content h2 { font-size: 1.8rem; margin-top: 1.6em; }
.sm-page-content img { border-radius: 16px; }
.sm-page-content .alignwide { width: min(100vw - 40px, 1100px); margin-left: 50%; transform: translateX(-50%); }
.sm-page-content .alignfull { width: 100vw; margin-left: 50%; transform: translateX(-50%); }
.sm-page-content .sm-entry > p:first-of-type::first-letter { all: unset; }

/* Archive template */
.sm-years { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.sm-years a { padding: .5em 1em; border-radius: 999px; background: var(--card); box-shadow: var(--shadow); text-decoration: none; color: var(--ink); font-weight: 600; font-size: .92rem; }
.sm-years a.is-active, .sm-years a:hover { background: var(--wine); color: var(--on-wine); }
.sm-months { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 56px; }
.sm-months a, .sm-months span { display: block; padding: 18px; border-radius: 16px; background: var(--card); box-shadow: var(--shadow); text-decoration: none; color: var(--ink); }
.sm-months span { opacity: .45; box-shadow: none; border: 1px dashed var(--line); background: transparent; }
.sm-months a:hover { outline: 2px solid var(--gold); }
.sm-months b { display: block; font: 600 1.1rem var(--f-display); }
.sm-months small { color: var(--ink-3); font-size: .82rem; }
@media (max-width: 760px) { .sm-months { grid-template-columns: repeat(2, 1fr); } }

.sm-empty { text-align: center; padding: 60px 20px; }
.sm-empty h1, .sm-empty h2 { font-size: clamp(2rem, 5vw, 3rem); }

/* ==========================================================================
   7. Footer + mobile bar
   ========================================================================== */
.sm-footer { margin-top: 48px; background: #0B1F42; color: #B3C1D9; padding: 72px 0 0; }
.sm-footer a { color: #E4EDF7; text-decoration: none; }
.sm-footer a:hover { color: #fff; text-decoration: underline; }
.sm-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 44px; }
.sm-footer h3 { color: #FFFFFF; font: 600 .78rem var(--f-ui); letter-spacing: .16em; text-transform: uppercase; margin-bottom: 18px; }
.sm-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.sm-footer .sm-brand { color: #FFFFFF; }
.sm-footer .sm-brand__tag { color: #86A0BD; }
.sm-footer__about { margin: 18px 0 22px; max-width: 30em; font-size: .95rem; }
.sm-social { display: flex; gap: 8px; flex-wrap: wrap; }
.sm-social a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.07); }
.sm-social a:hover { background: var(--flame); color: #fff; }
.sm-social svg { width: 18px; height: 18px; }
.sm-footer__apps { display: grid; gap: 10px; }
.sm-footer__apps a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.06); }
.sm-footer__apps a:hover { background: rgba(255,255,255,.12); text-decoration: none; }
.sm-footer__apps svg { width: 22px; height: 22px; color: var(--flame); flex: none; }
.sm-footer__apps small { display: block; color: #86A0BD; font-size: .75rem; }
.sm-footer__bottom { margin-top: 56px; padding: 22px 0; border-top: 1px solid rgba(255,255,255,.08); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .85rem; color: #8283A0; }
@media (max-width: 980px) { .sm-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .sm-footer__grid { grid-template-columns: 1fr; gap: 34px; } }

.sm-bottombar { display: none; }
@media (max-width: 760px) {
  body { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  .sm-bottombar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; inset: auto 0 0 0; z-index: 55; background: color-mix(in srgb, var(--card) 94%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .sm-bottombar a, .sm-bottombar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 62px; background: none; border: 0; color: var(--ink-2); font: 600 .68rem var(--f-ui); text-decoration: none; cursor: pointer; }
  .sm-bottombar svg { width: 22px; height: 22px; }
  .sm-bottombar .is-current { color: var(--wine-2); }
  .sm-toast { bottom: 90px; }
}

/* Widgets fallback */
.widget { margin-bottom: 32px; }
.widget-title { font: 600 .8rem var(--f-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }

/* WP core alignment helpers */
.alignleft { float: left; margin: .3em 1.4em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.4em; }
.aligncenter { margin-inline: auto; }
.wp-caption-text, .gallery-caption { font-size: .85rem; color: var(--ink-3); }
.sticky, .bypostauthor { }

@media print {
  .sm-topbar, .sm-header, .sm-reader, .sm-share, .sm-postnav, .sm-apps-cta, .sm-comments, .sm-footer, .sm-bottombar, .sm-progress { display: none !important; }
  body { background: #fff; color: #000; padding: 0; }
  .sm-callout--prayer { background: #f3f3f3; color: #000; }
}

/* ==========================================================================
   8. Sharing & reader extras
   ========================================================================== */
.sm-sh { --c: var(--ink); width: 42px; height: 42px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--card); border: 1px solid var(--line); color: var(--c); cursor: pointer; text-decoration: none; transition: transform .15s, background-color .2s, color .2s, border-color .2s; }
.sm-sh svg { width: 18px; height: 18px; }
.sm-sh:hover, .sm-sh:focus-visible { transform: translateY(-2px); background: var(--c); border-color: var(--c); color: #fff; }
.sm-sh--whatsapp { --c: #1EB257; } .sm-sh--facebook { --c: #1877F2; } .sm-sh--x { --c: #111; } .sm-sh--telegram { --c: #229ED9; } .sm-sh--linkedin { --c: #0A66C2; } .sm-sh--email { --c: #5B6472; } .sm-sh--sms { --c: #2FA84F; } .sm-sh--img { --c: var(--flame); }
html[data-theme="dark"] .sm-sh--x { --c: #E8EEF6; }
html[data-theme="dark"] .sm-sh--x:hover { color: #000; }
.sm-sh[aria-pressed="true"] { background: var(--wine); border-color: var(--wine); color: #fff; }
.sm-sh[aria-pressed="true"] svg { fill: currentColor; }

.sm-sharebar { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
@media (min-width: 761px) { .sm-sharebar .sm-sh--sms { display: none; } }
@media (max-width: 600px) { .sm-sharebar .sm-sh--linkedin, .sm-sharebar .sm-sh--email { display: none; } .sm-sharebar { gap: 6px; } }

.sm-rail { position: fixed; z-index: 30; top: 50%; left: max(18px, calc(50% - 345px - 110px)); transform: translate(-12px, -50%); display: none; flex-direction: column; gap: 8px; padding: 10px; background: color-mix(in srgb, var(--card) 90%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; }
.sm-rail.is-on { opacity: 1; pointer-events: auto; transform: translate(0, -50%); }
.sm-rail .sm-sh { width: 40px; height: 40px; border-color: transparent; background: transparent; }
.sm-rail .sm-sh:hover { background: var(--c); }
.sm-rail__sep { height: 1px; background: var(--line); margin: 2px 6px; }
@media (min-width: 1180px) { .sm-rail { display: flex; } }

.sm-readmark { width: min(100% - 40px, var(--measure)); margin: 36px auto 0; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px; background: var(--green-soft); color: var(--green); font: 600 .92rem var(--f-ui); }
.sm-readmark svg { width: 20px; height: 20px; flex: none; }
.sm-readmark[hidden] { display: none; }

.sm-sharepanel { width: min(100% - 40px, 820px); margin: 48px auto 0; padding: 40px; border-radius: 28px; background: var(--card); box-shadow: var(--shadow-lg); text-align: center; position: relative; overflow: hidden; }
.sm-sharepanel::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: linear-gradient(90deg, var(--wine), var(--flame)); }
.sm-sharepanel__title { font-size: clamp(1.45rem, 3vw, 1.9rem); margin: 0 0 6px; }
.sm-sharepanel__sub { color: var(--ink-2); margin: 0 0 24px; }
.sm-sharepanel__nets { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.sm-sharepanel__nets .sm-sh { width: auto; height: 46px; padding: 0 18px 0 14px; gap: 8px; border-radius: 999px; display: inline-flex; font: 600 .9rem var(--f-ui); background: var(--c); border-color: var(--c); color: #fff; }
.sm-sharepanel__nets .sm-sh:hover { filter: brightness(1.08); }
html[data-theme="dark"] .sm-sharepanel__nets .sm-sh--x { color: #000; }
@media (min-width: 761px) { .sm-sharepanel__nets .sm-sh--sms { display: none; } }
@media (max-width: 560px) { .sm-sharepanel { padding: 30px 18px; border-radius: 22px; } .sm-sharepanel__nets .sm-sh { padding: 0; width: 48px; justify-content: center; } .sm-sharepanel__nets .sm-sh span { display: none; } }
.sm-sharepanel__tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 28px; text-align: left; }
@media (max-width: 760px) { .sm-sharepanel__tools { grid-template-columns: 1fr 1fr; } }
.sm-tool { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--paper); cursor: pointer; color: var(--ink); text-align: left; transition: border-color .2s, transform .15s; }
.sm-tool:hover { border-color: var(--wine-2); transform: translateY(-2px); }
.sm-tool svg { width: 22px; height: 22px; color: var(--wine-2); flex: none; }
.sm-tool b { display: block; font: 600 .9rem/1.25 var(--f-ui); }
.sm-tool small { display: block; font: .76rem/1.3 var(--f-ui); color: var(--ink-3); margin-top: 2px; }
.sm-tool[aria-pressed="true"] { border-color: var(--wine); background: var(--wine-soft); }
.sm-tool[aria-pressed="true"] svg { fill: currentColor; }
@media (max-width: 420px) { .sm-tool small { display: none; } }

.sm-amen { display: flex; flex-direction: column; align-items: center; gap: 8px; padding-bottom: 28px; margin-bottom: 28px; border-bottom: 1px dashed var(--line); }
.sm-amen__btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 30px; border-radius: 999px; border: 2px solid var(--flame); background: transparent; color: var(--flame); font: 700 1.1rem var(--f-ui); cursor: pointer; transition: background-color .2s, color .2s, transform .15s; }
.sm-amen__btn svg { width: 24px; height: 24px; }
.sm-amen__btn:hover { background: var(--flame); color: #fff; }
.sm-amen__btn[aria-pressed="true"] { background: var(--flame); color: #fff; }
.sm-amen__btn.is-pop { animation: sm-pop .5s ease; }
@keyframes sm-pop { 40% { transform: scale(1.12); } }
.sm-amen__count { margin: 0; font: 500 .88rem var(--f-ui); color: var(--ink-3); }

/* Related + on this day */
.sm-related { width: min(100% - 40px, var(--wrap)); margin: 72px auto 0; }
.sm-otd { width: min(100% - 40px, var(--measure)); margin: 48px auto 0; padding: 24px 26px; border-radius: 20px; border: 1px solid var(--line); background: var(--card); }
.sm-otd h2 { display: flex; align-items: center; gap: 10px; font: 700 .8rem var(--f-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 12px; }
.sm-otd h2 svg { width: 18px; height: 18px; color: var(--flame); }
.sm-otd ul { list-style: none; margin: 0; padding: 0; }
.sm-otd li a { display: flex; gap: 14px; align-items: baseline; padding: 10px 0; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); font: 600 1.05rem/1.3 var(--f-display); }
.sm-otd li:first-child a { border-top: 0; }
.sm-otd li a span { font: 700 .8rem var(--f-ui); color: var(--flame); min-width: 40px; }
.sm-otd li a:hover { color: var(--wine-2); }

/* Modal (share as image) */
.sm-modal { position: fixed; inset: 0; z-index: 130; display: grid; place-items: center; padding: 16px; }
.sm-modal[hidden] { display: none; }
.sm-modal__scrim { position: absolute; inset: 0; background: rgba(0,12,30,.65); }
.sm-modal__box { position: relative; width: min(100%, 520px); max-height: calc(100vh - 32px); overflow: auto; background: var(--card); border-radius: 24px; padding: 20px; box-shadow: var(--shadow-lg); }
.sm-modal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sm-modal__head h2 { font-size: 1.35rem; margin: 0; }
.sm-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 999px; background: var(--paper-2); margin-bottom: 14px; }
.sm-seg button { border: 0; background: transparent; padding: 9px; border-radius: 999px; font: 600 .88rem var(--f-ui); cursor: pointer; color: var(--ink-2); }
.sm-seg button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.sm-card-preview { display: grid; place-items: center; background: var(--paper-2); border-radius: 16px; padding: 12px; }
.sm-card-preview canvas { width: auto; max-width: 100%; max-height: 52vh; border-radius: 10px; box-shadow: var(--shadow); }
.sm-modal__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }

/* Highlight-to-share */
.sm-quotepop { position: fixed; z-index: 125; display: flex; gap: 2px; padding: 5px; border-radius: 999px; background: #0E1A2B; box-shadow: var(--shadow-lg); }
.sm-quotepop[hidden] { display: none; }
.sm-quotepop button { width: 38px; height: 38px; border-radius: 50%; border: 0; background: transparent; color: #fff; cursor: pointer; display: grid; place-items: center; }
.sm-quotepop button:hover { background: rgba(255,255,255,.15); }
.sm-quotepop svg { width: 18px; height: 18px; }

/* Scripture pop-up */
.sm-scripture { position: fixed; z-index: 126; width: min(420px, calc(100vw - 24px)); max-height: 320px; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; }
.sm-scripture[hidden] { display: none; }
.sm-scripture__head { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 8px 18px; border-bottom: 1px solid var(--line); background: var(--paper-2); }
.sm-scripture__head strong { font: 700 .92rem var(--f-ui); color: var(--wine-2); }
.sm-scripture__body { padding: 14px 18px; overflow-y: auto; font: 400 1.02rem/1.65 var(--f-read); color: var(--ink); }
.sm-scripture__body p { margin: 0 0 .5em; }
.sm-scripture__body sup { font: 700 .7rem var(--f-ui); color: var(--flame); margin-right: 3px; }
.sm-scripture__more { padding: 10px 18px; border-top: 1px solid var(--line); font: 600 .85rem var(--f-ui); text-decoration: none; }
@media (max-width: 640px) { .sm-scripture { left: 8px !important; right: 8px; top: auto !important; bottom: calc(76px + env(safe-area-inset-bottom)); width: auto; max-height: 55vh; } }

/* Drawer: my reading */
.sm-mine { margin-top: 24px; padding: 18px; border-radius: 18px; background: var(--paper-2); }
.sm-mine__title { display: flex; align-items: center; gap: 8px; font: 700 .78rem var(--f-ui); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 8px; }
.sm-mine__title svg { width: 16px; height: 16px; }
.sm-streak { display: flex; align-items: center; gap: 10px; padding: 12px 14px; margin-bottom: 14px; border-radius: 14px; background: linear-gradient(135deg, #FF8A3D, #E8631A); color: #fff; font: 700 .95rem var(--f-ui); }
.sm-streak[hidden] { display: none; }
.sm-streak svg { width: 22px; height: 22px; }
.sm-drawer .sm-saved li { display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--line); }
.sm-drawer .sm-saved li:last-child { border-bottom: 0; }
.sm-drawer .sm-saved li a { flex: 1; border: 0; padding: 10px 0; }
.sm-drawer .sm-saved b { display: block; font: 600 .95rem/1.3 var(--f-display); }
.sm-drawer .sm-saved small { display: block; color: var(--ink-3); font-size: .78rem; font-weight: 500; }
.sm-saved button { border: 0; background: transparent; font-size: 1.4rem; line-height: 1; color: var(--ink-3); cursor: pointer; padding: 4px 8px; }
.sm-saved__empty { font-size: .88rem; color: var(--ink-3); padding: 4px 0; }
.sm-install { width: 100%; margin-top: 16px; }
.sm-install[hidden] { display: none; }

@media print {
  .sm-sharebar, .sm-rail, .sm-sharepanel, .sm-related, .sm-otd, .sm-readmark, .sm-modal, .sm-quotepop, .sm-scripture, .sm-drawer, .sm-search, .sm-toast { display: none !important; }
  .sm-entry { font-size: 12pt; width: 100%; }
  .sm-callout { break-inside: avoid; border: 1px solid #ccc; background: #fff !important; color: #000 !important; }
  .sm-callout--prayer > :first-child { color: #333 !important; }
  .sm-entry a { color: #000; text-decoration: none; }
  .sm-article-head::after { content: "spiritmeat.net"; display: block; margin-top: 8px; font: 10pt var(--f-ui); color: #555; }
}

/* Devotional graphics: show the whole picture over a soft blurred copy of itself */
.sm-fit { position: relative; overflow: hidden; background: var(--paper-2); }
.sm-fit::before { content: ""; position: absolute; inset: -40px; background: var(--sm-bg) center/cover no-repeat; filter: blur(24px) saturate(1.2); opacity: .55; transform: scale(1.1); }
.sm-fit > img { position: relative; width: 100%; height: 100%; object-fit: contain !important; }
.sm-card:hover .sm-fit > img { transform: none; }
.sm-card__img.sm-fit { aspect-ratio: 4/3; }
.sm-feature.sm-fit { aspect-ratio: 16/10; max-height: 78vh; }
@media (max-width: 640px) { .sm-feature.sm-fit { aspect-ratio: 1/1; } }

/* Comments: keep any comments box (theme's or a plugin's) centred and tidy */
.sm-comments-wrap { width: min(100% - 40px, var(--measure)); margin: 64px auto 0; }
.sm-comments-wrap .sm-comments { width: 100%; margin: 0; }
.sm-comments-wrap > *:not(.sm-comments) { max-width: 100%; }
.sm-comments-wrap #comments, .sm-comments-wrap .comments-area, .sm-comments-wrap [class*="epoch"] { width: 100% !important; max-width: 100% !important; margin-left: 0 !important; position: static !important; float: none !important; min-height: 0 !important; height: auto !important; background: transparent !important; }
.sm-comments-wrap textarea { width: 100%; min-height: 140px; max-height: 320px; padding: .8em 1em; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font: inherit; }
.sm-comments-wrap input[type="submit"], .sm-comments-wrap button[type="submit"] { background: var(--wine); color: #fff; border: 0; border-radius: 999px; padding: .8em 1.6em; font: 600 .95rem var(--f-ui); cursor: pointer; }
.sm-comments-wrap h2, .sm-comments-wrap h3 { font-size: 1.4rem; }

/* Phones: devotional cards become compact rows (small picture + text) */
@media (max-width: 620px) {
  .sm-grid { gap: 12px; }
  .sm-grid .sm-card { flex-direction: row; align-items: stretch; border-radius: 16px; }
  .sm-grid .sm-card:hover { transform: none; }
  .sm-grid .sm-card__img, .sm-grid .sm-card__img.sm-fit { aspect-ratio: 1/1; width: 104px; flex: none; }
  .sm-grid .sm-card__img--empty span { font-size: 1.15rem; }
  .sm-grid .sm-card__body { padding: 12px 14px; justify-content: center; }
  .sm-grid .sm-card__date { font-size: .66rem; margin-bottom: 4px; }
  .sm-grid .sm-card__title { font-size: 1.05rem; margin-bottom: 6px; }
  .sm-grid .sm-card__refs { font-size: .78rem; margin-top: 0; }
  .sm-hero__img, .sm-hero__img.sm-fit { aspect-ratio: 1/1; }
  .sm-hero__media { max-width: 420px; margin-inline: auto; width: 100%; }
}
