/* ── Regional landing pages ──────────────────────────────────────────────── */
.local-regions {
    display:grid; grid-template-columns:repeat(auto-fit, minmax(260px, 1fr));
    gap:16px; margin-bottom:8px;
}
.local-region-card {
    display:block; padding:22px 22px 18px;
    background:var(--bg-1); border:1px solid var(--border); border-radius:10px;
    color:inherit; text-decoration:none;
    transition:border-color 120ms ease, transform 100ms ease;
}
.local-region-card:hover {
    border-color:var(--accent); transform:translateY(-2px); text-decoration:none;
}
.local-region-state { font-size:1.3rem; font-weight:700; margin-bottom:6px; }
.local-region-cities { font-size:.85rem; color:var(--text-2); margin-bottom:10px; line-height:1.5; }
.local-region-hotline {
    font-size:.82rem; font-weight:600; color:var(--accent);
    border-top:1px solid var(--border); padding-top:10px; margin-top:4px;
}
.region-footer {
    margin-top:40px; font-size:.88rem; color:var(--text-2);
    border-top:1px solid var(--border); padding-top:20px;
}
.region-intro {
    max-width:680px; line-height:1.7; margin-bottom:32px;
}
.region-intro p { margin-bottom:14px; }
.region-section { margin-bottom:36px; }
.region-section h2 { margin-bottom:14px; font-size:1.1rem; color:var(--text-1); }

/* ── Shared admin components ─────────────────────────────────────────────── */
.detail-section {
    background:var(--bg-1); border:1px solid var(--border); border-radius:10px;
    padding:22px 24px; margin-bottom:18px;
}
.tabs { display:flex; gap:4px; border-bottom:1px solid var(--border); margin:14px 0 4px; }
.tab { padding:8px 14px; color:var(--text-2); border-bottom:2px solid transparent; }
.tab:hover { color:var(--text-1); text-decoration:none; }
.tab-active { color:var(--text-1); border-bottom-color:var(--accent); }

table { width:100%; border-collapse:collapse; }
th, td { text-align:left; padding:10px 12px; border-bottom:1px solid var(--border); font-size:.93rem; }
th { color:var(--text-2); font-weight:500; }

.status-badge {
    display:inline-block; padding:2px 8px; border-radius:999px; font-size:.78rem;
    border:1px solid var(--border); background:var(--bg-2);
}
.status-badge.status-ok { border-color:var(--success); color:var(--success); }
.status-badge.status-warn { border-color:var(--warning); color:var(--warning); }
.status-badge.status-error { border-color:var(--danger); color:var(--danger); }

.grav-row { display:flex; align-items:center; gap:16px; margin-bottom:10px; }
.avatar-lg { width:72px; height:72px; border-radius:50%; background:var(--bg-2); }

/* ── Chat widget ─────────────────────────────────────────────────────────── */
.chat-widget { position:fixed; right:18px; bottom:18px; z-index:100; }
.chat-toggle {
    width:44px; height:44px; border-radius:50%;
    border:1px solid var(--border); background:var(--bg-1); color:var(--text-2);
    font-size:1.1rem; cursor:pointer;
    box-shadow:0 4px 12px rgba(0,0,0,.15);
    transition:background 120ms ease, color 120ms ease, transform 120ms ease;
}
.chat-toggle:hover {
    background:var(--accent); color:#fff; transform:scale(1.05);
}
.chat-panel {
    position:absolute; right:0; bottom:64px; width:360px; height:480px;
    background:var(--bg-1); border:1px solid var(--border); border-radius:12px;
    display:flex; flex-direction:column;
    box-shadow:0 12px 36px rgba(0,0,0,.15);
    animation:chat-pop 160ms ease-out;
}
.chat-panel[hidden] { display:none; }
@keyframes chat-pop { from { transform:translateY(8px) scale(.97); opacity:0; } to { transform:none; opacity:1; } }
.chat-header { padding:12px 14px; border-bottom:1px solid var(--border); display:flex; justify-content:space-between; align-items:center; font-weight:500; }
.chat-close { background:none; border:none; color:var(--text-2); font-size:1.3rem; cursor:pointer; }
.chat-messages { flex:1; overflow-y:auto; padding:12px 14px; display:flex; flex-direction:column; gap:8px; }
.chat-msg {
    max-width:86%; padding:8px 12px; border-radius:12px; font-size:.92rem;
    line-height:1.45; white-space:pre-wrap; word-wrap:break-word;
}
.chat-msg.user { align-self:flex-end; background:var(--accent); color:#fff; }
.chat-msg.assistant { align-self:flex-start; background:var(--bg-2); border:1px solid var(--border); }
.chat-msg.error { align-self:flex-start; background:#fdf0f0; border:1px solid var(--danger); color:var(--danger); }
.chat-typing { align-self:flex-start; color:var(--text-2); font-size:.85rem; font-style:italic; }
.chat-form { display:flex; gap:6px; padding:10px; border-top:1px solid var(--border); }
.chat-input { flex:1; }
.chat-send { padding:8px 14px; background:var(--accent); border:none; color:#fff; border-radius:6px; cursor:pointer; }
[data-theme="dark"] .chat-msg.error { background:#2a1414; color:#f0b6b6; }

/* ── Public: landing hero with dawn art ──────────────────────────────────── */
.pub-hero {
    position:relative; text-align:center;
    padding:96px 24px 72px;
    border-radius:16px; overflow:hidden;
    margin-bottom:8px;
    color:#1c2333;
    background:#e8b27e; /* fallback under the SVG */
}
.pub-hero::before {
    content:""; position:absolute; inset:0; z-index:0;
    background:url("../img/dawn-hero.svg") center/cover no-repeat;
}
/* Legibility scrim — keeps text readable over the bright horizon */
.pub-hero::after {
    content:""; position:absolute; inset:0; z-index:1;
    background:linear-gradient(180deg, rgba(20,26,40,.28) 0%, rgba(20,26,40,.05) 45%, rgba(255,243,218,.35) 100%);
}
.pub-hero > * { position:relative; z-index:2; }
.pub-hero h1 {
    font-size:2.3rem; font-weight:700; line-height:1.2; margin-bottom:16px;
    color:#fff; text-shadow:0 1px 18px rgba(20,26,40,.45);
}
.pub-hero p {
    font-size:1.08rem; color:#f4efe6; max-width:560px; margin:0 auto 32px;
    line-height:1.65; text-shadow:0 1px 10px rgba(20,26,40,.4);
}

/* Warm horizon band used as a section header on inner pages */
.section-band {
    border-radius:12px; overflow:hidden; margin-bottom:28px;
    background:url("../img/calm-band.svg") center/cover no-repeat, #e3bf9b;
    padding:36px 28px;
}
.section-band h1 { color:#3a2c1d; }
.section-band p { color:#5a4632; margin-top:6px; max-width:620px; }
.pub-cta-row {
    display:flex; gap:12px; justify-content:center; flex-wrap:wrap;
}
.pub-cta {
    display:inline-block; padding:12px 24px; border-radius:7px;
    font-weight:600; font-size:.95rem; cursor:pointer; border:none;
    text-decoration:none;
}
.pub-cta-primary { background:var(--accent); color:#fff; }
.pub-cta-primary:hover { filter:brightness(1.08); text-decoration:none; }
.pub-cta-secondary { background:var(--bg-1); border:1px solid var(--border); color:var(--text-1); }
.pub-cta-secondary:hover { background:var(--bg-2); text-decoration:none; }

.pub-cards {
    display:grid; grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
    gap:16px; margin-top:48px;
}
.pub-card {
    background:var(--bg-1); border:1px solid var(--border); border-radius:10px;
    padding:20px 20px 18px;
}
.pub-card h3 { margin-bottom:8px; font-size:1rem; }
.pub-card p { font-size:.88rem; color:var(--text-2); line-height:1.5; }
.pub-card a { font-size:.88rem; font-weight:600; }

/* ── Public: hotlines page ───────────────────────────────────────────────── */
.hotline-grid {
    display:grid; grid-template-columns:repeat(auto-fit, minmax(280px, 1fr));
    gap:16px; margin-top:24px;
}
.hotline-card {
    background:var(--bg-1); border:1px solid var(--border); border-radius:10px;
    padding:20px 22px;
}
.hotline-card h3 { font-size:1rem; margin-bottom:6px; }
.hotline-card .hotline-number {
    font-size:1.25rem; font-weight:700; color:var(--accent); margin-bottom:4px;
}
.hotline-card .hotline-meta { font-size:.82rem; color:var(--text-2); margin-bottom:8px; }
.hotline-card p { font-size:.88rem; color:var(--text-2); line-height:1.5; }
.hotline-tag {
    display:inline-block; padding:2px 8px; border-radius:999px; font-size:.75rem;
    border:1px solid var(--border); color:var(--text-2); margin-right:4px;
}

/* ── Public: resources page ──────────────────────────────────────────────── */
.filter-bar {
    display:flex; flex-wrap:wrap; gap:8px; margin-bottom:24px;
}
.filter-btn {
    padding:6px 14px; border-radius:999px; font-size:.85rem;
    border:1px solid var(--border); background:var(--bg-1); color:var(--text-2);
    cursor:pointer; transition:all 100ms ease;
}
.filter-btn:hover, .filter-btn.active {
    background:var(--accent); border-color:var(--accent); color:#fff;
}
.resource-grid {
    display:grid; grid-template-columns:repeat(auto-fill, minmax(280px, 1fr));
    gap:16px;
}
.resource-card {
    background:var(--bg-1); border:1px solid var(--border); border-radius:10px;
    padding:18px 20px; display:flex; flex-direction:column; gap:8px;
}
.resource-card h3 { font-size:.98rem; font-weight:600; }
.resource-card p { font-size:.86rem; color:var(--text-2); line-height:1.5; flex:1; }
.resource-card-footer {
    display:flex; align-items:center; justify-content:space-between;
    margin-top:4px; gap:8px;
}
.topic-tag {
    display:inline-block; padding:2px 9px; border-radius:999px; font-size:.74rem;
    border:1px solid var(--border); color:var(--text-2); background:var(--bg-2);
}
.resource-verified {
    font-size:.74rem; color:var(--text-2);
}
/* ── Tools / platforms cards ─────────────────────────────────────────────── */
.tools-section { margin-top:40px; }
.tools-section-heading {
    font-size:1rem; font-weight:600; color:var(--text-2);
    text-transform:uppercase; letter-spacing:.06em;
    margin-bottom:16px; padding-bottom:10px;
    border-bottom:1px solid var(--border);
}
.tool-card {
    background:var(--bg-1); border:1px solid var(--border); border-radius:10px;
    padding:22px 24px; margin-bottom:16px;
}
.tool-card h3 { font-size:1.05rem; font-weight:600; margin-bottom:12px; }
.tool-card-body p {
    font-size:.92rem; color:var(--text-2); line-height:1.65; margin-bottom:12px;
}
.tool-card-body p:last-child { margin-bottom:0; }
.tool-card-footer {
    display:flex; align-items:center; gap:12px; flex-wrap:wrap;
    margin-top:18px; padding-top:14px; border-top:1px solid var(--border);
}

.resource-empty {
    grid-column:1/-1; text-align:center; padding:48px 0;
    color:var(--text-2); font-size:.95rem;
}

/* ── Public: Rebuild / self-worth section ─────────────────────────────────── */
.rebuild-hero {
    position:relative; border-radius:16px; overflow:hidden;
    margin-bottom:28px; padding:88px 32px 40px;
    background:#6b7d6a;
}
.rebuild-hero::before {
    content:""; position:absolute; inset:0; z-index:0;
    background:url("../img/rebuild-dawn.jpg") center 38%/cover no-repeat;
}
.rebuild-hero::after {
    content:""; position:absolute; inset:0; z-index:1;
    background:linear-gradient(180deg, rgba(20,26,40,.15) 0%, rgba(20,26,40,.05) 40%, rgba(20,26,40,.55) 100%);
}
.rebuild-hero > * { position:relative; z-index:2; }
.rebuild-hero h1 { color:#fff; font-size:2.2rem; text-shadow:0 1px 16px rgba(20,26,40,.5); }
.rebuild-hero p {
    color:#f1ede4; max-width:620px; margin-top:8px; line-height:1.6;
    text-shadow:0 1px 10px rgba(20,26,40,.5);
}
.rebuild-intro {
    max-width:640px; line-height:1.7; margin-bottom:8px;
}
.rebuild-intro p { margin-bottom:16px; color:var(--text-1); }
.rebuild-pillars {
    display:grid; grid-template-columns:repeat(auto-fit, minmax(230px, 1fr));
    gap:16px; margin:32px 0 8px;
}
.pillar {
    background:var(--bg-1); border:1px solid var(--border); border-radius:10px;
    padding:20px 22px;
}
.pillar-icon { font-size:1.5rem; margin-bottom:8px; }
.pillar h3 { font-size:.98rem; margin-bottom:6px; }
.pillar p { font-size:.88rem; color:var(--text-2); line-height:1.55; }

.affirm {
    border-left:3px solid var(--accent); padding:14px 20px; margin:32px 0;
    background:var(--bg-1); border-radius:0 8px 8px 0;
    font-size:1.05rem; line-height:1.6; color:var(--text-1);
}

/* Survivor stories */
.stories { display:flex; flex-direction:column; gap:18px; margin-top:24px; }
.story {
    background:var(--bg-1); border:1px solid var(--border); border-radius:10px;
    padding:22px 24px;
}
.story-quote {
    font-size:1.02rem; line-height:1.65; color:var(--text-1);
    font-style:italic; margin-bottom:12px;
}
.story-byline { font-size:.85rem; color:var(--text-2); font-weight:600; }
.story-note {
    font-size:.78rem; color:var(--text-2); margin-top:6px;
}
.composite-banner {
    font-size:.83rem; color:var(--text-2); background:var(--bg-2);
    border:1px solid var(--border); border-radius:8px;
    padding:12px 16px; margin:8px 0 24px; line-height:1.55;
}

.share-cta {
    margin-top:40px; padding:24px 26px;
    background:var(--bg-1); border:1px solid var(--border); border-radius:12px;
    border-left:3px solid var(--accent);
}
.share-cta h3 { margin-bottom:8px; }
.share-cta p { color:var(--text-2); line-height:1.6; margin-bottom:16px; max-width:580px; }

.safety-box {
    background:var(--bg-1); border:1px solid var(--warning); border-radius:10px;
    padding:18px 22px; margin-bottom:24px;
}
.safety-box h3 { margin-bottom:10px; font-size:.98rem; }
.safety-box ul { margin:0; padding-left:20px; }
.safety-box li { font-size:.9rem; color:var(--text-1); line-height:1.55; margin-bottom:8px; }

.region-bar {
    display:flex; align-items:center; gap:10px; margin:-12px 0 24px;
}
.region-bar select { width:auto; min-width:180px; }

/* ── Admin resource management ───────────────────────────────────────────── */
.page-header {
    display:flex; align-items:baseline; justify-content:space-between;
    margin-bottom:22px;
}
