/* The Stream Church: shared dark foundation, 1.19.0.
 * Home content keeps its approved HOME V2 rules in site.css.
 * Page-specific overrides belong in dark-pages.css / dark-discipulado.css.
 */

/* Menu, bottom bar and giving button on every dark page */
body.tsc-dark .isle-pill::before { background: rgba(27, 26, 24, 0.94); border-color: rgba(255, 255, 255, 0.08); }
body.tsc-dark .isle-link { color: #e9e9e9; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; }
body.tsc-dark .isle-link:hover { background: rgba(255, 255, 255, 0.08); color: #ffffff; }
body.tsc-dark .isle-item.open > .isle-toggle { background: rgba(200, 255, 46, 0.16); color: var(--hv-lime); }
body.tsc-dark .isle-dot { background: var(--hv-lime); }
body.tsc-dark a.isle-link.active, body.tsc-dark .isle-item.has-current > .isle-toggle { color: var(--hv-lime); }
body.tsc-dark .isle-btn { background: var(--hv-lime); color: #111111; box-shadow: none; font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; }
body.tsc-dark .isle-btn:hover { box-shadow: 0 10px 24px rgba(200, 255, 46, 0.28); }
body.tsc-dark .isle-logo img { box-shadow: 0 0 0 3px var(--hv-lime); }
body.tsc-dark .tabbar { background: rgba(27, 26, 24, 0.96); border-color: rgba(255, 255, 255, 0.08); }
body.tsc-dark .tabbar-link { color: #d4d4d4; }
body.tsc-dark .tabbar-link.active, body.tsc-dark .tabbar-menu.active { background: var(--hv-lime); color: #111111; }
body.tsc-dark .floating-cta a { background: var(--hv-lime); color: #111111; }

/* Shared tokens also supply the existing .hv-foot outside the home page. */
body.tsc-dark {
    --hv-lime: #C8FF2E; --hv-dark: #1B1A18; --hv-black: #0E0E0D; --hv-cream: #F3EBDD; --hv-ivory: #FAF6ED;
    --hv-muted: #6b6b6b; --hv-muted-d: #a3a3a3; --hv-line: rgba(255, 255, 255, 0.12);
    --tsc-accent: #C8FF2E; --tsc-link: #3d4c08;
    background: #ffffff; font-family: 'Onest', 'Nunito Sans', system-ui, sans-serif; color: #222222;
}
/* Site chrome stays identical to the approved home page. */
@media (min-width: 960px) {
    body.tsc-dark .isle-item.open > .isle-toggle { color: #C8FF2E; }
}
@media (max-width: 959px) {
    body.tsc-dark .hv-foot { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
}

/* All content rules exclude .home: its layout, colors and typography are unchanged. */
body.tsc-dark:not(.home) main {
    --tsc-text: #222222; --tsc-muted: #61615c; --tsc-card: #ffffff; --tsc-soft: #FAF6ED; --tsc-line: #e6e0d4;
    --ink-900: #1B1A18; --ink-700: #454540; --ink-600: #61615c;
    --surface-ivory: #FAF6ED; --surface-cream: #F3EBDD; --surface-sky: #F3EBDD;
    --stream-700: var(--tsc-link); --stream-500: var(--tsc-link);
    color: var(--tsc-text);
}
body.tsc-dark:not(.home) main :is(h1, h2, h3, h4) {
    font-family: 'Rammetto One', 'Nunito Sans', sans-serif; font-weight: 400;
    text-transform: uppercase; letter-spacing: -0.04em; line-height: 1.12;
    overflow-wrap: anywhere;
}
body.tsc-dark:not(.home) :is(main a, main button, main summary, main input):focus-visible {
    outline: 3px solid var(--tsc-link); outline-offset: 4px;
}
body.tsc-dark:not(.home) :is(.page-hero, .band-sky, .band-mint, .versiculo-band) {
    --tsc-text: #ffffff; --tsc-muted: #c4c4be; --tsc-card: #262522; --tsc-soft: #302f2a; --tsc-line: rgba(255, 255, 255, 0.16);
    --ink-900: #ffffff; --ink-700: #deded7; --ink-600: #c4c4be;
    --surface-white: #262522; --surface-ivory: #302f2a; --surface-cream: #302f2a; --surface-sky: #302f2a;
    --stream-700: var(--tsc-accent); --stream-500: var(--tsc-accent);
    --gold-700: var(--tsc-accent); --border-light: rgba(255, 255, 255, 0.16);
    --tsc-link: var(--tsc-accent);
    background: var(--hv-dark); color: var(--tsc-text);
}
body.tsc-dark:not(.home) .band { padding-block: 90px; }
body.tsc-dark:not(.home) .band-white { background: #ffffff; }
body.tsc-dark:not(.home) .band-cream { background: var(--hv-cream); }
body.tsc-dark:not(.home) .band-ivory { background: var(--hv-ivory); }
body.tsc-dark:not(.home) :is(.band-sky, .band-mint, .page-hero, .versiculo-band) :focus-visible { outline-color: var(--tsc-accent); }

/* Framed inner hero. Keep all existing $args and their content, including `after`. */
body.tsc-dark:not(.home) .page-hero {
    padding: var(--nav-safe) 10px 0; background: #ffffff; overflow: visible;
}
body.tsc-dark:not(.home) .page-hero-frame {
    position: relative; isolation: isolate; overflow: hidden; display: grid; align-items: center;
    min-height: 530px; border-radius: 28px; background: var(--hv-dark);
}
/* Pastores still owns a copy of the old hero markup. Support it until its page pass. */
body.tsc-dark:not(.home) .page-hero:not(:has(> .page-hero-frame)) {
    isolation: isolate; overflow: hidden; display: grid; align-items: center;
    width: calc(100% - 20px); min-height: 530px; margin: var(--nav-safe) 10px 0;
    padding: 0; border-radius: 28px; background: var(--hv-dark);
}
body.tsc-dark:not(.home) .page-hero-frame::before,
body.tsc-dark:not(.home) .page-hero:not(:has(> .page-hero-frame))::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(90deg, rgba(14, 14, 13, 0.75), rgba(14, 14, 13, 0.55) 50%, rgba(14, 14, 13, 0.65)),
        linear-gradient(0deg, rgba(14, 14, 13, 0.6), transparent 60%);
}
body.tsc-dark:not(.home) .page-hero .hero-bg-soft { z-index: -2; opacity: 1; filter: none; }
body.tsc-dark:not(.home) .page-hero :is(.hero-svg-streams, .hero-wave-bottom) { display: none; }
body.tsc-dark:not(.home) .page-hero-inner { max-width: 1060px; padding-block: 72px; }
body.tsc-dark:not(.home) .page-hero h1 {
    max-width: 20ch; margin: 0 auto 24px; color: #ffffff; font-size: clamp(2.2rem, 5.8vw, 5.2rem); line-height: 1;
}
body.tsc-dark:not(.home) .page-hero h1 span { color: var(--tsc-accent); background: none; -webkit-text-fill-color: currentColor; }
body.tsc-dark:not(.home) .page-hero .hero-eyebrow {
    padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none;
    color: #ffffff; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
}
body.tsc-dark:not(.home) .page-hero .hero-eyebrow .dot { flex: none; background: var(--tsc-accent); }
body.tsc-dark:not(.home) .page-hero-subtitle { color: #ebebe6; font-style: normal; font-size: clamp(1rem, 1.6vw, 1.2rem); }
body.tsc-dark:not(.home) :is(.page-hero-cite, .page-hero-cite a, .page-hero-place) { color: var(--tsc-accent); }
body.tsc-dark:not(.home) .page-hero :is(.page-hero-verse, .memory-card, .hero-stat) {
    background: rgba(14, 14, 13, 0.78); border: 1px solid var(--tsc-line); color: #ffffff; box-shadow: none;
}
body.tsc-dark:not(.home) .page-hero :is(.page-hero-verse blockquote, .hero-stat strong, .memory-card-text strong) { color: #ffffff; }
body.tsc-dark:not(.home) .page-hero :is(.page-hero-verse cite, .memory-card-kicker, .hero-stat svg) { color: var(--tsc-accent); }
body.tsc-dark:not(.home) .page-hero .memory-card-text > span:last-child { color: #deded7; }

/* Section labels and display headings. */
body.tsc-dark:not(.home) .section-kicker {
    gap: 8px; padding: 0; border: 0; background: none; box-shadow: none; color: var(--tsc-muted);
    font-size: 0.72rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
}
body.tsc-dark:not(.home) .section-kicker svg {
    width: 14px !important; height: 14px !important; padding: 3px; box-sizing: content-box;
    border-radius: 50%; background: var(--tsc-accent); color: #111111 !important;
}
body.tsc-dark:not(.home) .section-title { font-size: clamp(2rem, 4.2vw, 3.2rem); color: var(--ink-900); line-height: 1.05; }
body.tsc-dark:not(.home) .section-title span {
    position: relative; display: inline; isolation: isolate; color: inherit; background: none; -webkit-text-fill-color: currentColor;
    box-decoration-break: clone; -webkit-box-decoration-break: clone;
    background-image: linear-gradient(var(--tsc-accent), var(--tsc-accent)); background-size: 100% 0.18em; background-position: 0 95%; background-repeat: no-repeat;
}
body.tsc-dark:not(.home) .section-subtitle { color: var(--tsc-muted); }

/* Pill buttons; the decorative arrow does not change the accessible label. */
body.tsc-dark:not(.home) .btn {
    gap: 12px; padding: 7px 7px 7px 20px; min-height: 48px; max-width: 100%;
    border-radius: 9999px; font-family: 'Onest', sans-serif; font-weight: 800;
    text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.8rem; box-shadow: none;
}
body.tsc-dark:not(.home) .btn::after {
    content: ""; flex: none; width: 32px; height: 32px; border-radius: 50%;
    background-color: #111111;
    background-image: url('../img/dark-arrow.svg'); background-repeat: no-repeat; background-position: center; background-size: 14px;
}
body.tsc-dark:not(.home) .btn-gold { background: var(--tsc-accent); color: #111111; border-color: var(--tsc-accent); }
body.tsc-dark:not(.home) .btn-stream { background: #111111; color: #ffffff; border-color: #111111; }
body.tsc-dark:not(.home) .btn-outline { background: transparent; color: var(--ink-900); border: 2px solid var(--ink-900); }
body.tsc-dark:not(.home) :is(.btn-stream, .btn-outline)::after { background-color: var(--tsc-accent); background-image: url('../img/dark-arrow-ink.svg'); }
body.tsc-dark:not(.home) .btn:hover { transform: translateY(-2px); box-shadow: none; }

/* Cards adapt to the band they are in; text and inline var(--ink-*) styles follow it. */
body.tsc-dark:not(.home) :is(.story-card, .icon-card, .step-body, .chapter-card, .stat-card, .pillar-item, .doc-card, .grace-card,
    .leader-intro, .leader-note, .servicio-card, .doc-chapter, .qa-item, .pastor-card, .artes-caption-badge) {
    border-radius: 22px; border: 1px solid var(--tsc-line); background: var(--tsc-card); color: var(--tsc-text); box-shadow: none;
}
body.tsc-dark:not(.home) :is(.story-card-icon, .pillar-icon, .grace-card-icon, .step .step-icon, .chapter .chapter-marker,
    .doc-chapter-number, .qa-number, .moment-icon, .servicio-badge-icon) {
    background: var(--tsc-accent); color: #111111; border: 0; box-shadow: none;
}
body.tsc-dark:not(.home) .pastor-role-chip { background: #111111; color: var(--tsc-accent); border: 0; }
body.tsc-dark:not(.home) .pastor-body h3 { font-size: 1.05rem; }
body.tsc-dark:not(.home) :is(.podcast-link-icon, .doc-chapter[open] .doc-chapter-number) { background: var(--tsc-accent); color: #111111; }
body.tsc-dark:not(.home) .podcast-links a:hover { background: var(--tsc-card); }
body.tsc-dark:not(.home) :is(.story-block p, .story-card p, .step-body p, .chapter-card p, .grace-card p, .stat-card-label) { color: var(--tsc-muted); }
body.tsc-dark:not(.home) :is(.story-block, .chapter-card, .faq-answer) a:not(.btn) {
    color: var(--tsc-link); text-decoration: underline; text-decoration-color: var(--tsc-accent); text-underline-offset: 3px; text-decoration-thickness: 2px;
}
body.tsc-dark:not(.home) :is(.pillar-label, .doc-date, .chapter-tag, .album-date) { color: var(--tsc-link); }
body.tsc-dark:not(.home) .stat-card-number { font-family: 'Rammetto One', sans-serif; font-weight: 400; color: var(--ink-900); background: none; -webkit-text-fill-color: currentColor; letter-spacing: -0.04em; }
body.tsc-dark:not(.home) :is(.steps, .chapters)::before { background: var(--tsc-accent); opacity: 0.6; }
body.tsc-dark:not(.home) .chapter-year { background: var(--tsc-accent); color: #111111; }
body.tsc-dark:not(.home) .chapter-list li { background: var(--tsc-soft); }
body.tsc-dark:not(.home) .chapter-list li svg { color: var(--tsc-link); }
body.tsc-dark:not(.home) :is(.moment-link, .servicio-time-pill) { background: var(--tsc-soft); color: var(--ink-900); border-color: var(--tsc-line); }
body.tsc-dark:not(.home) .servicio-time-pill svg { color: var(--tsc-link) !important; }
body.tsc-dark:not(.home) .artes-verse { background: var(--tsc-card); border-left-color: var(--tsc-accent); box-shadow: none; }
body.tsc-dark:not(.home) .artes-verse cite { color: var(--tsc-link); }
body.tsc-dark:not(.home) :is(.artes-frame, .video-frame, .doc-portrait, .gallery-box) { border-radius: 22px; border-color: var(--tsc-line); box-shadow: none; }
body.tsc-dark:not(.home) .video-frame { background: var(--hv-black); }
body.tsc-dark:not(.home) :is(.video-cover, .welcome-video video) { background: var(--hv-black); }
body.tsc-dark:not(.home) .video-play { background: var(--tsc-accent); color: #111111; box-shadow: none; max-width: calc(100% - 24px); white-space: normal; }
body.tsc-dark:not(.home) .cta-panel {
    --ink-900: #ffffff; --ink-700: #deded7; --tsc-muted: #c4c4be;
    background: var(--hv-dark); border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 22px; color: #ffffff; box-shadow: none;
}
body.tsc-dark:not(.home) .cta-panel :is(h2, h3, p) { color: inherit; }
body.tsc-dark:not(.home) .cta-panel p { color: var(--tsc-muted); }
body.tsc-dark:not(.home) .cta-panel .calendar-status-pill { background: #111111; color: var(--tsc-accent); border: 0; }
body.tsc-dark:not(.home) .versiculo-bg-soft { opacity: 0.2; filter: grayscale(0.4); }
body.tsc-dark:not(.home) .versiculo-card { --tsc-muted: #c4c4be; --ink-900: #ffffff; background: rgba(14, 14, 13, 0.8); border: 1px solid var(--tsc-line); border-radius: 22px; box-shadow: none; }
body.tsc-dark:not(.home) .versiculo-card blockquote { color: #ffffff; }
body.tsc-dark:not(.home) .versiculo-cite { color: var(--tsc-accent); }
body.tsc-dark:not(.home) .versiculo-cite::before, body.tsc-dark:not(.home) .versiculo-cite::after { background: var(--tsc-accent); }

/* FAQ, albums and photo viewer retain their controls and behavior. */
body.tsc-dark:not(.home) .faq-item { border-radius: 16px; border: 1px solid var(--tsc-line); background: var(--tsc-card); box-shadow: none; }
body.tsc-dark:not(.home) .faq-item[open] { border-color: var(--ink-900); }
body.tsc-dark:not(.home) .faq-item summary { color: var(--ink-900); font-weight: 700; }
body.tsc-dark:not(.home) .faq-answer { color: var(--tsc-muted); }
body.tsc-dark:not(.home) .faq-item .faq-toggle-icon { background: var(--tsc-accent); color: #111111; border: 0; }
body.tsc-dark:not(.home) .album { background: var(--tsc-soft); border: 1px solid var(--tsc-line); border-radius: 22px; }
body.tsc-dark:not(.home) .album-item { border-radius: 14px; background: var(--hv-black); }
body.tsc-dark:not(.home) .lightbox-modal { background: rgba(14, 14, 13, 0.97); }
body.tsc-dark:not(.home) .lightbox-content img { border-radius: 16px; }
body.tsc-dark:not(.home) .lightbox-close { background: var(--tsc-accent); color: #111111; }
body.tsc-dark:not(.home) .lightbox-caption { color: #ffffff; }

/* Match the river bank to the final section, ignoring the hidden lightbox after it.
 * Page overrides may also set --tsc-footer-edge explicitly. No change to the home footer. */
body.tsc-dark:not(.home) .hv-foot { --hv-bank-top: var(--tsc-footer-edge, #ffffff); }
body.tsc-dark:not(.home):has(main > .band-cream:nth-last-child(1 of section)) { --tsc-footer-edge: #F3EBDD; }
body.tsc-dark:not(.home):has(main > .band-ivory:nth-last-child(1 of section)) { --tsc-footer-edge: #FAF6ED; }
body.tsc-dark:not(.home):has(main > :is(.band-sky, .band-mint, .versiculo-band):nth-last-child(1 of section)) { --tsc-footer-edge: #1B1A18; }

/* A sober gold accent for the memorial; the shared navigation keeps the church brand. */
body.tsc-dark.page-template-templatestributo-php { --tsc-accent: #f5b942; --tsc-link: #8a5607; }
body.tsc-dark .tribute-page { --tsc-accent: #f5b942; --tsc-link: #8a5607; }
body.tsc-dark .tribute-page .page-hero h1 .accent-stream { color: var(--tsc-accent); }

@media (max-width: 600px) {
    body.tsc-dark:not(.home) .band { padding-block: 64px; }
    body.tsc-dark:not(.home) .page-hero-frame,
    body.tsc-dark:not(.home) .page-hero:not(:has(> .page-hero-frame)) { min-height: 460px; border-radius: 22px; }
    body.tsc-dark:not(.home) .page-hero-inner { padding: 48px 20px; }
    body.tsc-dark:not(.home) :is(.step-body, .chapter-card, .cta-panel, .grace-card) { min-width: 0; padding: 24px 20px; }
    body.tsc-dark:not(.home) .step { gap: 12px; }
    body.tsc-dark:not(.home) .step-icon { width: 40px; height: 40px; }
    body.tsc-dark:not(.home) .steps::before { left: 19px; }
    body.tsc-dark:not(.home) .doc-card { flex-wrap: wrap; }
    body.tsc-dark:not(.home) .doc-card > div { min-width: 0; }
    body.tsc-dark:not(.home) .stat-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    body.tsc-dark:not(.home) .stat-card { padding: 24px 12px; overflow-wrap: anywhere; }
    body.tsc-dark:not(.home) .stat-card-number { font-size: clamp(1.6rem, 7vw, 2.2rem); }
    body.tsc-dark:not(.home) .btn { overflow-wrap: anywhere; }
    body.tsc-dark:not(.home) .versiculo-cite { gap: 8px; }
    body.tsc-dark:not(.home) .versiculo-cite::before, body.tsc-dark:not(.home) .versiculo-cite::after { width: 18px; flex: none; }
}
@media (prefers-reduced-motion: reduce) {
    body.tsc-dark:not(.home) *, body.tsc-dark:not(.home) *::before, body.tsc-dark:not(.home) *::after { animation: none !important; transition: none !important; }
    body.tsc-dark:not(.home) :is(.btn, .icon-card):hover { transform: none; }
}
/* Loaded after site.css: keep lesson printing neutral, including template inline colors. */
@media print {
    body.tsc-dark:not(.home), body.tsc-dark:not(.home) main, body.tsc-dark:not(.home) main * {
        color: #000000 !important; -webkit-text-fill-color: #000000 !important;
        background: transparent !important; box-shadow: none !important; text-shadow: none !important;
        border-color: #888888 !important;
    }
    body.tsc-dark:not(.home) .page-hero { padding: 0; }
    body.tsc-dark:not(.home) .page-hero:not(:has(> .page-hero-frame)) { min-height: 0; margin: 0; width: 100%; border-radius: 0; }
    body.tsc-dark:not(.home) .page-hero-frame { min-height: 0; border-radius: 0; }
    body.tsc-dark:not(.home) .page-hero-inner { padding: 12px 0; }
    body.tsc-dark:not(.home) .page-hero h1 { color: #000000; font-size: 24pt; }
    body.tsc-dark:not(.home) :is(.hero-bg-soft, .lightbox-modal),
    body.tsc-dark:not(.home) .page-hero-frame::before,
    body.tsc-dark:not(.home) .page-hero::before, body.tsc-dark:not(.home) .btn::after { display: none !important; }
    body.tsc-dark:not(.home) .band { padding-block: 20px; }
}
