/* =========================================================
   Save KVEC — "public record" theme
   Serious / official tone: muted navy + off-white, serif
   masthead, restrained red used only for warnings/admin marks.
   ========================================================= */

:root {
    --navy: #1b2a3d;
    --navy-dark: #101a26;
    --paper: #f6f4ee;
    --card: #ffffff;
    --ink: #21262c;
    --muted: #5b6470;
    --rule: #d9d3c4;
    --accent: #7a1f2b;
    --accent-soft: #f4e7e7;
    --approve: #2f6b3a;
    --approve-soft: #e7efe8;
    --pending: #8a6a1f;
    --pending-soft: #f5efdf;
    --focus: #2b4a6f;
}

* { box-sizing: border-box; }

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

body, html {
    margin: 0;
    padding: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.65;
}

h1, h2, h3, h4 {
    font-family: 'Merriweather', Georgia, 'Times New Roman', serif;
    color: var(--navy);
    margin: 0 0 0.5em;
}

a { color: var(--focus); text-decoration: none; border-bottom: 1px solid transparent; }
a:hover { border-bottom-color: var(--focus); }

/* ---------- Masthead ---------- */
.masthead {
    background: var(--navy);
    color: #fff;
    text-align: center;
    padding: 2.75rem 1rem 2.25rem;
    border-bottom: 6px solid var(--navy-dark);
}

.masthead-logo {
    display: block;
    max-width: 300px;
    width: 70%;
    height: auto;
    margin: 0 auto 0.85rem;
    /* Source mark is solid red; overlay it to white so it reads cleanly
       against the dark navy masthead instead of clashing with it. */
    filter: brightness(0) invert(1);
    opacity: 0.96;
}

.masthead .eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.75rem;
    color: #b9c3d1;
    margin-bottom: 0.6rem;
}

.masthead h1 {
    color: #fff;
    font-size: 2.75rem;
    letter-spacing: 0.02em;
    margin-bottom: 0.35rem;
}

.masthead .dateline {
    color: #9fb0c4;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255,255,255,0.2);
    border-bottom: 1px solid rgba(255,255,255,0.2);
    display: inline-block;
    padding: 0.4rem 0;
    margin-top: 0.75rem;
}

/* ---------- Site nav (public pages) ---------- */
.site-nav {
    background: var(--navy-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.75rem;
    padding: 0.7rem 1rem;
    position: relative;
}
/* The links live inside a .nav-links wrapper (added for the mobile
   hamburger toggle). Without an explicit flex rule here, that wrapper
   collapses to a single flex item and the <a> tags fall back to default
   inline spacing — which is what made the desktop menu look like one
   long link. Restoring flex + gap here is the actual fix; the divider
   and hover treatment are the redesign on top of it. */
.site-nav .nav-links {
    display: flex;
    align-items: center;
    gap: 0;
}

.site-nav a {
    color: #cdd7e3;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.4rem 1.5rem;
    border-left: 1px solid rgba(255,255,255,0.14);
    border-bottom: 2px solid transparent;
    transition: color 0.15s ease, border-bottom-color 0.15s ease;
}
.site-nav .nav-links a:first-child { border-left: none; }
.site-nav a:hover { color: #fff; border-bottom-color: rgba(255,255,255,0.4); }
.site-nav a.active { color: #fff; border-bottom-color: var(--accent); }

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.4rem;
    margin-left: auto;
}
.nav-toggle .bar {
    display: block;
    width: 24px;
    height: 2px;
    background: #cdd7e3;
    margin: 5px 0;
    border-radius: 1px;
}

@media (max-width: 680px) {
    .site-nav {
        justify-content: space-between;
        flex-wrap: wrap;
    }
    .nav-toggle { display: block; }
    .site-nav .nav-links {
        flex-basis: 100%;
        display: none;
        flex-direction: column;
        gap: 0;
        text-align: center;
    }
    .site-nav.nav-open .nav-links {
        display: flex;
    }
    .site-nav .nav-links a {
        padding: 0.75rem 0;
        border-left: none;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        width: 100%;
    }
}

/* ---------- Page shell ---------- */
.page {
    max-width: 760px;
    margin: 0 auto;
    padding: 2.5rem 1.25rem 4rem;
}

.article p {
    font-size: 1.06rem;
    margin: 0 0 1.15rem;
}

.article .source-link {
    background: var(--card);
    border: 1px solid var(--rule);
    border-left: 4px solid var(--navy);
    padding: 0.9rem 1.1rem;
    margin: 1.5rem 0 2rem;
    font-size: 0.95rem;
}

.article .source-link a { font-weight: 600; }

/* ---------- Dedicated article page ---------- */
.breadcrumb { margin-bottom: 1.5rem; font-size: 0.92rem; }

.notice-box {
    background: var(--accent-soft);
    border: 1px solid #e2b9bd;
    border-left: 4px solid var(--accent);
    color: var(--accent);
    padding: 1rem 1.2rem;
    border-radius: 4px;
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.article-full {
    background: var(--card);
    border: 1px solid var(--rule);
    border-radius: 6px;
    padding: 2rem 2.25rem;
}

.article-headline {
    font-size: 2rem;
    margin-bottom: 0.35rem;
}

.article-byline {
    color: var(--muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--rule);
    padding-bottom: 1.25rem;
    margin-bottom: 1.5rem;
}

.article-full p {
    font-size: 1.06rem;
    margin: 0 0 1.15rem;
}

.article-full h2 {
    font-size: 1.3rem;
    margin-top: 1.75rem;
    border-top: 1px solid var(--rule);
    padding-top: 1.5rem;
}

.article-page .source-link {
    background: var(--card);
    border: 1px solid var(--rule);
    border-left: 4px solid var(--navy);
    padding: 0.9rem 1.1rem;
    margin: 1.5rem 0 2rem;
    font-size: 0.95rem;
    font-weight: 600;
}

hr.rule {
    border: none;
    border-top: 2px solid var(--navy);
    margin: 2.5rem 0 2rem;
}

/* ---------- Flash messages ---------- */
.flash {
    padding: 0.9rem 1.1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    border: 1px solid transparent;
}
.flash.success { background: var(--approve-soft); color: var(--approve); border-color: #bcd6c0; }
.flash.pending { background: var(--pending-soft); color: var(--pending); border-color: #e2d3a4; }
.flash.error   { background: var(--accent-soft); color: var(--accent); border-color: #e2b9bd; }

/* ---------- Comment form ---------- */
.comment-form {
    background: var(--card);
    border: 1px solid var(--rule);
    border-radius: 6px;
    padding: 1.5rem;
    margin-bottom: 2.5rem;
}

.comment-form h2 { font-size: 1.3rem; margin-bottom: 1rem; }

.field { margin-bottom: 1rem; }

.field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 0.3rem;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="number"],
.field input[type="password"],
.field textarea {
    width: 100%;
    padding: 0.6rem 0.7rem;
    border: 1px solid #c7c2b5;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    background: #fff;
    color: var(--ink);
}

.field textarea { min-height: 110px; resize: vertical; }

.field input:focus, .field textarea:focus {
    outline: none;
    border-color: var(--focus);
    box-shadow: 0 0 0 3px rgba(43, 74, 111, 0.15);
}

.captcha-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--paper);
    border: 1px dashed var(--rule);
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.captcha-row label { font-size: 0.9rem; font-weight: 600; margin: 0; white-space: nowrap; }
.captcha-row input { width: 80px; flex: none; }
.captcha-refresh { font-size: 0.8rem; color: var(--muted); margin-left: auto; }

.btn {
    display: inline-block;
    background: var(--navy);
    color: #fff;
    border: none;
    padding: 0.65rem 1.4rem;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}
.btn:hover { background: var(--navy-dark); }
.btn.small { padding: 0.35rem 0.8rem; font-size: 0.82rem; }
.btn.outline { background: transparent; color: var(--navy); border: 1px solid var(--navy); }
.btn.outline:hover { background: var(--navy); color: #fff; }
.btn.danger { background: var(--accent); }
.btn.danger:hover { background: #5c1620; }
.btn.approve { background: var(--approve); }
.btn.approve:hover { background: #234f2b; }

/* ---------- Comments list ---------- */
.comments h2 { font-size: 1.3rem; margin-bottom: 1.25rem; }

.comments-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.comments-heading h2 { margin-bottom: 0; }

.sds-info-link {
    background: none;
    border: 1px solid var(--rule);
    border-radius: 20px;
    color: var(--muted);
    font-family: inherit;
    font-size: 0.78rem;
    padding: 0.3rem 0.75rem;
    cursor: pointer;
    margin-bottom: 1.25rem;
}
.sds-info-link:hover { color: var(--focus); border-color: var(--focus); }

/* ---------- Modal ---------- */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(16, 26, 38, 0.6);
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    z-index: 100;
}
.modal-overlay.open { display: flex; }

.modal-box {
    background: var(--card);
    border-radius: 8px;
    max-width: 560px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 2rem;
    position: relative;
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}
.modal-box h2 { font-size: 1.35rem; margin-bottom: 0.9rem; }
.modal-box p { margin: 0 0 1rem; font-size: 0.98rem; }
.modal-box ul { margin: 0 0 1rem; padding-left: 1.2rem; }
.modal-box li { margin-bottom: 0.5rem; font-size: 0.98rem; }

.modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.9rem;
    background: none;
    border: none;
    font-size: 1.6rem;
    line-height: 1;
    color: var(--muted);
    cursor: pointer;
}
.modal-close:hover { color: var(--accent); }

.comment-thread { border-top: 1px solid var(--rule); }

.comment {
    background: var(--card);
    border: 1px solid var(--rule);
    border-left: 3px solid var(--navy);
    border-radius: 4px;
    padding: 1rem 1.2rem;
    margin: 1rem 0;
}

.comment.admin-reply {
    border-left-color: var(--accent);
    background: #fffaf9;
}

.comment .comment-head {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    margin-bottom: 0.4rem;
    flex-wrap: wrap;
}

.comment .name { font-weight: 700; color: var(--navy); font-size: 0.98rem; }
.comment.admin-reply .name { color: var(--accent); }

.badge {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: var(--accent);
    color: #fff;
    padding: 0.15rem 0.45rem;
    border-radius: 3px;
}

.comment .timestamp { color: var(--muted); font-size: 0.78rem; }

.comment .message { margin: 0 0 0.6rem; color: var(--ink); }

.comment .comment-actions {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
}

.comment .comment-actions button {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    padding: 0;
    font-family: inherit;
    font-size: 0.8rem;
    text-decoration: underline;
}
.comment .comment-actions button:hover { color: var(--accent); }

/* Nesting depth is capped at level-4 so deep reply chains stop narrowing
   the comment column into unreadable slivers — everything past depth 4
   indents by the same fixed amount instead of compounding further. */
.replies {
    margin-left: 1.6rem;
    padding-left: 1rem;
    border-left: 2px solid var(--rule);
}
.replies.level-2 { margin-left: 1.3rem; padding-left: 0.9rem; }
.replies.level-3 { margin-left: 1rem; padding-left: 0.8rem; border-left-color: var(--muted); }
.replies.level-4 { margin-left: 0.75rem; padding-left: 0.7rem; border-left-color: var(--muted); border-left-style: dashed; }

.reply-form, .report-form {
    display: none;
    margin-top: 0.8rem;
    padding-top: 0.8rem;
    border-top: 1px dashed var(--rule);
}

.empty-state {
    color: var(--muted);
    font-style: italic;
    padding: 1rem 0;
}

/* ---------- Footer ---------- */
footer {
    text-align: center;
    padding: 1.5rem;
    background: var(--navy);
    color: #9fb0c4;
    font-size: 0.85rem;
}
footer a { color: #cddaf0; }

/* ---------- Admin ---------- */
.admin-wrap {
    max-width: 980px;
    margin: 0 auto;
    padding: 2rem 1.25rem 4rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-nav {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
}

.admin-nav a {
    padding: 0.5rem 1rem;
    border: 1px solid var(--rule);
    border-radius: 4px;
    background: var(--card);
    color: var(--ink);
    font-size: 0.9rem;
}

.admin-nav a.active { background: var(--navy); color: #fff; border-color: var(--navy); }

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card);
    border: 1px solid var(--rule);
    font-size: 0.92rem;
}

.admin-table th, .admin-table td {
    text-align: left;
    padding: 0.65rem 0.8rem;
    border-bottom: 1px solid var(--rule);
    vertical-align: top;
}

.admin-table th {
    background: var(--paper);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.status-pill {
    font-size: 0.72rem;
    text-transform: uppercase;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    font-weight: 700;
}
.status-pill.approved { background: var(--approve-soft); color: var(--approve); }
.status-pill.pending { background: var(--pending-soft); color: var(--pending); }
.status-pill.rejected { background: var(--accent-soft); color: var(--accent); }

.action-row { display: flex; gap: 0.4rem; flex-wrap: wrap; }

.ua-cell { max-width: 260px; word-break: break-word; }

.sds-flagged-card { border-left-color: var(--accent); }
.sds-reason {
    font-size: 0.82rem;
    color: var(--accent);
    background: var(--accent-soft);
    border-radius: 4px;
    padding: 0.5rem 0.7rem;
    margin: 0 0 0.6rem;
}

.login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--navy);
    padding: 1.5rem;
}

.login-card {
    background: var(--card);
    padding: 2.25rem;
    border-radius: 6px;
    width: 100%;
    max-width: 360px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}

.login-logo {
    display: block;
    max-width: 200px;
    width: 80%;
    height: auto;
    margin: 0 auto 1.1rem;
}

.login-card h2 { text-align: center; }
.login-card .field { margin-bottom: 0.9rem; }

.field-icon {
    position: relative;
}
.field-icon i {
    position: absolute;
    left: 0.75rem;
    top: 2.45rem;
    color: var(--muted);
    font-size: 0.9rem;
    pointer-events: none;
}
.field-icon input {
    padding-left: 2.3rem !important;
}

.field-checkbox label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    font-weight: 400;
    color: var(--muted);
    cursor: pointer;
}
.field-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
}

.login-card .btn i { margin-right: 0.4rem; }

.setup-note {
    background: var(--pending-soft);
    color: var(--pending);
    border: 1px solid #e2d3a4;
    padding: 0.8rem 1rem;
    border-radius: 4px;
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
}

@media (max-width: 600px) {
    .masthead h1 { font-size: 2rem; }
    .replies, .replies.level-2, .replies.level-3, .replies.level-4 {
        margin-left: 0.6rem;
        padding-left: 0.5rem;
    }
}

/* ---------- Live stats counter ---------- */
.stats-counter {
    display: flex;
    gap: 1px;
    background: var(--rule);
    border: 1px solid var(--rule);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 2rem;
}
.stats-counter-item {
    flex: 1;
    background: var(--card);
    text-align: center;
    padding: 1rem 0.5rem;
}
.stats-num {
    display: block;
    font-family: 'Merriweather', Georgia, serif;
    font-weight: 900;
    font-size: 1.8rem;
    color: var(--navy);
    line-height: 1.1;
}
.stats-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    margin-top: 0.25rem;
}

/* ---------- Account pages (register/login/verify) ---------- */
.account-switch {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.9rem;
    color: var(--muted);
}
.account-page h1 { margin-bottom: 0.4rem; }
.account-meta {
    color: var(--muted);
    font-size: 0.92rem;
    margin-bottom: 1.75rem;
}
.posting-as {
    font-size: 0.9rem;
    color: var(--muted);
    margin: -0.25rem 0 1rem;
}
.field-hint {
    font-size: 0.8rem;
    color: var(--muted);
    margin: 0.35rem 0 0;
}
.field select {
    width: 100%;
    padding: 0.6rem 0.7rem;
    border: 1px solid var(--rule);
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.95rem;
    background: #fff;
}

/* ---------- Legal info box (whistleblower page) ---------- */
.legal-box {
    background: var(--card);
    border: 1px solid var(--rule);
    border-left: 4px solid var(--focus);
    padding: 1.1rem 1.3rem;
    border-radius: 4px;
    font-size: 0.93rem;
    margin-bottom: 2rem;
}
.legal-box h3 {
    margin: 0 0 0.6rem;
    font-size: 1.05rem;
}
.legal-box p {
    margin: 0 0 0.75rem;
}
.legal-box p:last-child { margin-bottom: 0; }
.legal-box .fine-print {
    font-size: 0.85rem;
    color: var(--muted);
    font-style: italic;
}

/* ---------- Press / media page ---------- */
.press-pitch p { font-size: 1.02rem; margin: 0 0 1.1rem; }
.press-facts {
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 6px;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0 2rem;
}
.press-facts h3 { margin-top: 0; font-size: 1.05rem; }
.press-facts ul { margin: 0; padding-left: 1.2rem; }
.press-facts li { margin-bottom: 0.5rem; font-size: 0.98rem; }

/* ---------- Staff / roles page ---------- */
.role-card { margin: 1rem 0; }
.permission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.4rem 1rem;
    margin-top: 0.4rem;
}
.permission-check {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--ink);
    cursor: pointer;
    padding: 0.35rem 0;
}
.permission-check input { margin-top: 0.2rem; flex-shrink: 0; }

/* ---------- Admin: mobile-responsive tables ----------
   Below the breakpoint every <tr> becomes a card and each <td> stacks
   its column header (from data-label) above its value, instead of
   forcing the whole table to scroll sideways. */
@media (max-width: 760px) {
    .admin-wrap { padding: 1.25rem 0.85rem 3rem; }

    .admin-header { gap: 0.6rem; }
    .admin-header > div { font-size: 0.85rem; line-height: 1.6; }

    .admin-nav { gap: 0.4rem; }
    .admin-nav a { padding: 0.45rem 0.75rem; font-size: 0.82rem; }

    .admin-table { border: none; background: none; font-size: 0.9rem; }
    .admin-table thead { display: none; }
    .admin-table, .admin-table tbody, .admin-table tr, .admin-table td {
        display: block;
        width: 100%;
    }
    .admin-table tr {
        background: var(--card);
        border: 1px solid var(--rule);
        border-left: 3px solid var(--navy);
        border-radius: 6px;
        padding: 0.9rem 1rem;
        margin-bottom: 0.9rem;
    }
    .admin-table td {
        border: none;
        padding: 0.4rem 0;
        text-align: left;
        word-break: break-word;
    }
    .admin-table td::before {
        content: attr(data-label);
        display: block;
        font-weight: 700;
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: var(--muted);
        margin-bottom: 0.2rem;
    }
    .admin-table td.action-row {
        display: block;
    }
    .admin-table td.action-row > * {
        margin: 0 0.4rem 0.4rem 0;
    }
    .admin-table td.ua-cell { max-width: none; }

    .permission-grid { grid-template-columns: 1fr; }
}

/* ---------- Nav search box (site-wide) ---------- */
.site-search {
    display: flex;
    align-items: center;
    gap: 0;
    margin-left: 0.5rem;
    padding-left: 1rem;
    border-left: 1px solid rgba(255,255,255,0.14);
}
.site-search input[type="search"] {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px 0 0 4px;
    color: #fff;
    font-family: inherit;
    font-size: 0.82rem;
    padding: 0.35rem 0.6rem;
    width: 120px;
}
.site-search input[type="search"]::placeholder { color: #9fb0c4; }
.site-search input[type="search"]:focus { outline: none; border-color: var(--accent); }
.site-search button {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
    padding: 0.35rem 0.7rem;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
}
.site-search button:hover { background: #5c1620; }

@media (max-width: 680px) {
    .site-search {
        flex-basis: 100%;
        justify-content: center;
        margin: 0.6rem 0 0.3rem;
        padding: 0.75rem 1rem 0 0;
        border-left: none;
        border-top: 1px solid rgba(255,255,255,0.1);
        padding-top: 0.75rem;
    }
    .site-search input[type="search"] { flex: 1; width: auto; }
}

/* ---------- News ticker banner ---------- */
.news-ticker {
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
}
.news-ticker-label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    font-size: 0.7rem;
    flex-shrink: 0;
    opacity: 0.85;
}
.news-ticker-track {
    position: relative;
    flex: 1;
    min-height: 1.4em;
    overflow: hidden;
}
.news-ticker-item {
    position: absolute;
    inset: 0;
    color: #fff;
    text-decoration: none;
    border-bottom: none;
    opacity: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity 0.5s ease;
    pointer-events: none;
}
.news-ticker-item.active { opacity: 1; pointer-events: auto; }
.news-ticker-item:hover { text-decoration: underline; }

/* ---------- Blog list / post ---------- */
.blog-list-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}
.rss-link {
    font-size: 0.85rem;
    color: var(--muted);
    white-space: nowrap;
}
.rss-link:hover { color: var(--accent); }
.blog-category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}
.blog-category-filter a {
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.3rem 0.75rem;
    border: 1px solid var(--rule);
    border-radius: 999px;
    color: var(--muted);
}
.blog-category-filter a.active,
.blog-category-filter a:hover {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
}
.blog-list { border-top: 1px solid var(--rule); }
.blog-list-item {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--rule);
}
.blog-list-item h2 { font-size: 1.25rem; margin: 0.3rem 0 0.5rem; }
.blog-list-item .message { margin-bottom: 0.75rem; }

.pagination {
    display: flex;
    gap: 0.4rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}
.pagination a {
    padding: 0.35rem 0.75rem;
    border: 1px solid var(--rule);
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted);
}
.pagination a.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.pagination a:hover:not(.active) { border-color: var(--navy); color: var(--navy); }

/* ---------- Social share buttons ---------- */
.share-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 1.5rem 0;
    padding-top: 1.25rem;
    border-top: 1px solid var(--rule);
}
.share-buttons-label {
    font-weight: 700;
    color: var(--navy);
    font-size: 0.85rem;
    margin-right: 0.25rem;
}
.share-buttons .btn i { margin-right: 0.35rem; }

/* ---------- Comment/reply image attachments + lightbox ---------- */
.comment-images {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0 0.75rem;
}
.comment-image-thumb {
    max-width: 96px;
    max-height: 96px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--rule);
    cursor: pointer;
    transition: opacity 0.15s ease;
}
.comment-image-thumb:hover { opacity: 0.85; }

.comment-image-item {
    position: relative;
    display: inline-flex;
}
.comment-image-delete-form {
    position: absolute;
    top: -8px;
    right: -8px;
    margin: 0;
}
.btn.tiny {
    padding: 0.15rem 0.4rem;
    font-size: 0.72rem;
    line-height: 1;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.lightbox-box {
    background: var(--navy-dark);
    border-radius: 10px;
    padding: 1.25rem;
    max-width: 95vw;
    position: relative;
    text-align: center;
}
.lightbox-image-wrap {
    max-width: 95vw;
    max-height: 85vh;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}
#lightbox-image {
    max-width: 100%;
    max-height: 85vh;
    display: block;
    transition: transform 0.2s ease;
    transform-origin: center center;
}
.lightbox-zoom-controls {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 0.85rem;
}
.lightbox-zoom-controls button {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
    border-radius: 6px;
    padding: 0.45rem 0.75rem;
    cursor: pointer;
    font-size: 0.95rem;
}
.lightbox-zoom-controls button:hover { background: rgba(255,255,255,0.2); }
.lightbox-caption {
    margin-top: 1rem;
    text-align: left;
    color: #e7ebf1;
    font-size: 0.88rem;
    max-width: 60ch;
    margin-left: auto;
    margin-right: auto;
}
.lightbox-caption summary {
    cursor: pointer;
    color: #fff;
    font-size: 0.9rem;
}
.lightbox-summary-hint {
    color: #9fb0c4;
    font-weight: 400;
    font-size: 0.82rem;
}
.lightbox-caption p {
    margin: 0.5rem 0 0;
    white-space: pre-wrap;
}

/* ---------- Admin: comment image thumbnails ---------- */
.admin-wrap .comment-images .comment-image-thumb {
    max-width: 84px;
    max-height: 84px;
    cursor: default;
}

/* Admin/staff "you're logged in" bar on public pages (includes/admin_bar.php) */
.admin-mode-bar {
    background: #1f2933;
    color: #fff;
    text-align: center;
    font-size: 0.82rem;
    padding: 0.45rem 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.admin-mode-bar strong {
    font-weight: 700;
}
.admin-mode-bar a {
    color: #9fd3ff;
    text-decoration: underline;
}
.admin-mode-bar a:hover {
    color: #fff;
}

/* Note shown on a reply whose parent comment was hidden by SDS (see
   fetch_approved_comment_tree()'s parent_hidden re-parenting logic) */
.parent-hidden-note {
    font-size: 0.8rem;
    color: #8a6d1a;
    background: #fff8e6;
    border: 1px solid #f0dfa6;
    border-radius: 4px;
    padding: 0.35rem 0.6rem;
    margin: 0.3rem 0 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
