/* ====================================================================
   NEOhio.news — single site stylesheet (no frameworks, no CDNs)
   Palette: navy #0B2545 (header/footer) · off-white #F7F5F0 (page)
            ink #1B1B1F (text) · accent #1D70B8 (links)
   Type:    Georgia serif display for headlines, system sans for UI.
   Mobile-first; sidebar collapses under content on small screens.
   ==================================================================== */

:root {
    --navy: #0B2545;
    --navy-soft: #123561;
    --paper: #F7F5F0;
    --ink: #1B1B1F;
    --accent: #1D70B8;
    --accent-dark: #155a95;
    --muted: #6d6d76;
    --line: #e3dfd6;
    --card: #ffffff;
    --danger: #b02a2a;
    --ok: #1f7a3d;
    --serif: Georgia, "Times New Roman", Times, serif;
    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        Helvetica, Arial, sans-serif;
    --shadow: 0 1px 2px rgba(11, 37, 69, 0.06), 0 4px 14px rgba(11, 37, 69, 0.07);
    --shadow-lift: 0 2px 4px rgba(11, 37, 69, 0.08), 0 10px 26px rgba(11, 37, 69, 0.12);
    --radius: 8px;
}

/* ---------- Reset-lite & base ---------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.6;
}

img,
video {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover,
a:focus {
    color: var(--accent-dark);
    text-decoration: underline;
}

h1, h2, h3, h4 {
    font-family: var(--serif);
    line-height: 1.2;
    color: var(--ink);
    margin: 0 0 0.5em;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }

.container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 16px;
}

.site-main {
    padding: 24px 0 48px;
    min-height: 55vh;
}

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

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--navy);
    color: #fff;
    padding: 8px 14px;
    z-index: 100;
}

.skip-link:focus {
    left: 8px;
    top: 8px;
    color: #fff;
}

/* ---------- Masthead ---------- */

.site-header {
    background: var(--navy);
    color: #fff;
    border-bottom: 3px solid var(--accent);
}

.masthead {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-top: 14px;
    padding-bottom: 14px;
    flex-wrap: wrap;
}

.masthead-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-decoration: none;
    min-width: 0;
}

.masthead-brand:hover,
.masthead-brand:focus {
    color: #fff;
    text-decoration: none;
}

.masthead-logo {
    height: 46px;
    width: auto;
    flex: 0 0 auto;
    box-sizing: content-box;
    padding: 6px 11px;
    background: #f6f3ec;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
}

.masthead-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.masthead-wordmark {
    font-family: var(--serif);
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: #fff;
}

.wordmark-dot {
    color: #9ec3e8;
    font-weight: 400;
}

.masthead-tagline {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 1.6px;
    color: #b9c9e0;
}

.masthead-search {
    display: flex;
    margin-left: auto;
    gap: 0;
}

.masthead-search input[type="search"] {
    border: 1px solid var(--navy-soft);
    border-radius: 4px 0 0 4px;
    padding: 8px 12px;
    font-size: 0.9rem;
    min-width: 170px;
    background: #fff;
    color: var(--ink);
}

.masthead-search button {
    border: 0;
    background: var(--accent);
    color: #fff;
    padding: 8px 14px;
    border-radius: 0 4px 4px 0;
    font-size: 0.9rem;
    cursor: pointer;
}

.masthead-search button:hover {
    background: var(--accent-dark);
}

/* ---------- Mobile nav toggle ---------- */

.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 6px;
    padding: 9px 10px;
    cursor: pointer;
}

.nav-toggle-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    margin: 4px 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle.open .nav-toggle-bar:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.nav-toggle.open .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle.open .nav-toggle-bar:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* ---------- Category nav ---------- */

.site-nav {
    background: var(--navy-soft);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}

.nav-list > li {
    position: relative;
}

.nav-link {
    display: block;
    padding: 10px 14px;
    color: #dbe6f5;
    font-size: 0.86rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    text-decoration: none;
    background: transparent;
    border: 0;
    cursor: pointer;
    font-family: var(--sans);
}

.nav-link:hover,
.nav-link:focus {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    text-decoration: none;
}

.nav-home {
    color: #fff;
}

.nav-more-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 210px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--shadow-lift);
    list-style: none;
    margin: 0;
    padding: 6px 0;
    z-index: 60;
}

.nav-more.open .nav-more-menu {
    display: block;
}

.nav-more-menu a {
    display: block;
    padding: 8px 16px;
    color: var(--ink);
    font-size: 0.9rem;
}

.nav-more-menu a:hover {
    background: var(--paper);
    text-decoration: none;
}

.caret {
    font-size: 0.7em;
}

/* ---------- Layout with sidebar ---------- */

.layout-with-sidebar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
}

@media (min-width: 900px) {
    .layout-with-sidebar {
        grid-template-columns: minmax(0, 1fr) 320px;
        align-items: start;
    }
}

.content-col {
    min-width: 0;
}

/* Square ad occupying a cell of the article card grid. */
.grid-ad {
    display: flex;
    align-items: center;
    justify-content: center;
}

.grid-ad .ad {
    margin: 0;
}

/* "Source: example.com" attribution under an article body. */
.source-note {
    margin-top: 18px;
    font-size: 0.85rem;
}

/* Search page's own query form. */
.search-page-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
}

.search-page-form input[type="search"] {
    flex: 1 1 240px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    font-size: 0.95rem;
}

.sidebar > * + * {
    margin-top: 24px;
}

.sidebar-box {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px 18px;
}

.sidebar-box h3 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: var(--sans);
    color: var(--muted);
    border-bottom: 2px solid var(--navy);
    padding-bottom: 8px;
    margin-bottom: 12px;
}

/* ---------- Hero ---------- */

.hero {
    position: relative;
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lift);
    margin-bottom: 28px;
    background: var(--navy);
    color: #fff;
}

.hero img {
    display: block;
    width: 100%;
    height: 420px;
    object-fit: cover;
    opacity: 0.85;
}

.hero-overlay {
    position: absolute;
    inset: auto 0 0 0;
    padding: 28px 24px 22px;
    background: linear-gradient(to top, rgba(11, 37, 69, 0.94), rgba(11, 37, 69, 0.55) 65%, transparent);
}

.hero-overlay h2,
.hero-overlay h1 {
    color: #fff;
    font-size: 1.8rem;
    margin: 6px 0;
}

.hero-overlay .card-category {
    background: var(--accent);
    color: #fff;
}

.hero-overlay p {
    color: #d7e1ef;
    margin: 4px 0 0;
    font-size: 0.95rem;
}

.hero:hover {
    text-decoration: none;
}

.hero:hover h2 {
    text-decoration: underline;
}

@media (max-width: 640px) {
    .hero img { height: 260px; }
    .hero-overlay h2 { font-size: 1.3rem; }
}

/* ---------- Cards & article grid ---------- */

.card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 22px;
}

@media (min-width: 560px) {
    .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
    .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.card:hover {
    box-shadow: var(--shadow-lift);
    transform: translateY(-2px);
}

.card-img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #e8e4db;
}

.card-body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1 1 auto;
}

.card-category {
    align-self: flex-start;
    display: inline-block;
    background: #e7f0f9;
    color: var(--accent-dark);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 3px 8px;
    border-radius: 3px;
}

.card-title {
    font-family: var(--serif);
    font-size: 1.12rem;
    line-height: 1.3;
    margin: 0;
}

.card-title a {
    color: var(--ink);
}

.card-title a:hover {
    color: var(--accent-dark);
}

.card-excerpt {
    color: var(--muted);
    font-size: 0.9rem;
    margin: 0;
}

.card-meta {
    margin-top: auto;
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ---------- Section headings ---------- */

.section-heading {
    display: flex;
    align-items: baseline;
    gap: 12px;
    border-bottom: 3px solid var(--navy);
    margin: 0 0 20px;
    padding-bottom: 8px;
}

.section-heading h1,
.section-heading h2 {
    margin: 0;
    font-size: 1.4rem;
}

.section-heading .count {
    color: var(--muted);
    font-size: 0.9rem;
}

/* ---------- Article page ---------- */

.article-header {
    margin-bottom: 18px;
}

.article-header h1 {
    font-size: 2.1rem;
    margin-bottom: 8px;
}

.article-meta {
    color: var(--muted);
    font-size: 0.88rem;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    align-items: center;
}

.article-meta .sep {
    color: var(--line);
}

.article-hero {
    margin: 0 0 22px;
}

.article-hero img {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.article-hero figcaption {
    color: var(--muted);
    font-size: 0.82rem;
    margin-top: 8px;
    font-style: italic;
}

.prose {
    max-width: 72ch;
    font-size: 1.05rem;
    line-height: 1.75;
}

.prose p {
    margin: 0 0 1.1em;
}

.prose img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
}

.prose h2, .prose h3 {
    margin-top: 1.6em;
}

.prose blockquote {
    margin: 1.4em 0;
    padding: 8px 20px;
    border-left: 4px solid var(--accent);
    background: #fff;
    border-radius: 0 var(--radius) var(--radius) 0;
    color: #3c3c44;
}

.prose table {
    border-collapse: collapse;
    width: 100%;
    display: block;
    overflow-x: auto;
}

.prose td, .prose th {
    border: 1px solid var(--line);
    padding: 6px 10px;
}

/* ---------- FAQ accordion ---------- */

.faq {
    margin: 28px 0;
    max-width: 72ch;
}

.faq h2 {
    font-size: 1.3rem;
}

.faq-item {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: 10px;
    overflow: hidden;
}

.faq-question {
    display: block;
    width: 100%;
    text-align: left;
    background: transparent;
    border: 0;
    padding: 14px 44px 14px 16px;
    font-family: var(--sans);
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--ink);
    cursor: pointer;
    position: relative;
}

.faq-question::after {
    content: "+";
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.3rem;
    color: var(--accent);
    transition: transform 0.15s ease;
}

.faq-item.open .faq-question::after {
    content: "\2212"; /* minus */
}

.faq-answer {
    display: none;
    padding: 0 16px 14px;
    color: #3c3c44;
    font-size: 0.95rem;
}

.faq-item.open .faq-answer {
    display: block;
}

/* ---------- Gallery ---------- */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 24px 0;
}

@media (min-width: 700px) {
    .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.gallery-grid figure {
    margin: 0;
}

.gallery-grid img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.gallery-grid figcaption {
    font-size: 0.78rem;
    color: var(--muted);
    margin-top: 4px;
}

/* ---------- Ads ---------- */

.ad {
    margin: 22px 0;
    text-align: center;
}

.ad-label {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #9a9aa2;
    margin-bottom: 6px;
}

.ad a {
    display: inline-block;
    line-height: 0;
}

.ad img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    border: 1px solid var(--line);
    background: #fff;
}

.ad-banner img {
    width: 100%;
    max-width: 728px;
}

.ad-square img {
    max-width: 300px;
}

/* ---------- Pagination ---------- */

.pagination-wrap {
    margin: 0;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin: 34px 0 8px;
    padding: 0;
    list-style: none;
}

.pagination a,
.pagination span,
.pagination .page-link {
    display: inline-block;
    min-width: 38px;
    text-align: center;
    padding: 7px 11px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: var(--accent-dark);
    font-size: 0.9rem;
    text-decoration: none;
}

.pagination a:hover {
    background: var(--paper);
    text-decoration: none;
}

.pagination .active a,
.pagination .active span,
.pagination span.current {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
}

/* ---------- Buttons & forms ---------- */

.btn {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    border: 1px solid var(--accent);
    border-radius: 6px;
    padding: 9px 18px;
    font-size: 0.92rem;
    font-family: var(--sans);
    cursor: pointer;
    text-decoration: none;
}

.btn:hover,
.btn:focus {
    background: var(--accent-dark);
    color: #fff;
    text-decoration: none;
}

.btn-secondary {
    background: #fff;
    color: var(--accent-dark);
}

.btn-secondary:hover {
    background: var(--paper);
    color: var(--accent-dark);
}

.btn-danger {
    background: var(--danger);
    border-color: var(--danger);
}

.btn-danger:hover {
    background: #8f2222;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.8rem;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.88rem;
    margin-bottom: 5px;
}

.form-control,
input[type="text"],
input[type="search"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="number"],
input[type="datetime-local"],
select,
textarea {
    width: 100%;
    max-width: 100%;
    padding: 9px 12px;
    border: 1px solid #cfcabf;
    border-radius: 6px;
    background: #fff;
    color: var(--ink);
    font-family: var(--sans);
    font-size: 0.95rem;
}

.form-inline input,
.form-inline select {
    width: auto;
}

textarea {
    line-height: 1.5;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.88rem;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-check input {
    width: auto;
}

.form-help {
    color: var(--muted);
    font-size: 0.8rem;
    margin-top: 4px;
}

/* ---------- Alerts ---------- */

.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin: 0 0 18px;
    font-size: 0.92rem;
    border: 1px solid transparent;
}

.alert-success {
    background: #e8f5ec;
    border-color: #bfe3cb;
    color: var(--ok);
}

.alert-error,
.alert-danger {
    background: #faeaea;
    border-color: #ecc7c7;
    color: var(--danger);
}

.alert-info {
    background: #e7f0f9;
    border-color: #c8ddf0;
    color: var(--accent-dark);
}

/* ---------- Tables (admin & data) ---------- */

.table-wrap {
    overflow-x: auto;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.table th {
    text-align: left;
    background: var(--navy);
    color: #fff;
    padding: 10px 12px;
    font-weight: 600;
    white-space: nowrap;
}

.table td {
    padding: 9px 12px;
    border-top: 1px solid var(--line);
    vertical-align: top;
}

.table tbody tr:nth-child(even) {
    background: #faf8f4;
}

.table tbody tr:hover {
    background: #f1ede4;
}

/* ---------- Admin chrome ---------- */

.admin-topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 22px;
}

.admin-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 18px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 26px;
}

.stat-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 14px 16px;
}

.stat-card .stat-value {
    font-family: var(--serif);
    font-size: 1.7rem;
    font-weight: 700;
    display: block;
}

.stat-card .stat-label {
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ---------- Badges ---------- */

.badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 3px 8px;
    border-radius: 3px;
    background: #e4e1d9;
    color: #57575e;
}

.badge-dev {
    background: #f2c94c;
    color: #5c4400;
}

.badge-published { background: #e8f5ec; color: var(--ok); }
.badge-draft     { background: #f4e9d7; color: #8a6100; }
.badge-wp        { background: #e7f0f9; color: var(--accent-dark); }
.badge-replit    { background: #efe7f9; color: #5d3a9b; }
.badge-manual    { background: #e4e1d9; color: #57575e; }

/* ---------- Footer ---------- */

.site-footer {
    background: var(--navy);
    color: #c6d3e5;
    margin-top: 40px;
    border-top: 3px solid var(--accent);
    font-size: 0.9rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 26px;
    padding-top: 34px;
    padding-bottom: 34px;
}

@media (min-width: 780px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1.2fr;
    }
}

.footer-wordmark {
    font-family: var(--serif);
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    display: block;
    margin-bottom: 8px;
}

.footer-about p {
    margin: 0;
    line-height: 1.65;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-links a,
.footer-meta a {
    color: #9ec3e8;
}

.footer-links a:hover,
.footer-meta a:hover {
    color: #fff;
}

.footer-meta p {
    margin: 0 0 8px;
}

.footer-credit {
    margin-top: 10px !important;
    font-size: 0.82rem;
}

/* ---------- Mobile nav behavior ---------- */

@media (max-width: 820px) {
    .nav-toggle {
        display: block;
        margin-left: auto;
    }

    .masthead-search {
        order: 3;
        width: 100%;
        margin-left: 0;
    }

    .masthead-search input[type="search"] {
        flex: 1 1 auto;
    }

    .site-nav {
        display: none;
    }

    .site-nav.open {
        display: block;
    }

    .nav-list {
        flex-direction: column;
        padding: 6px 0;
    }

    .nav-link {
        padding: 12px 16px;
        width: 100%;
        text-align: left;
    }

    .nav-more-menu {
        position: static;
        box-shadow: none;
        border: 0;
        border-radius: 0;
        background: rgba(255, 255, 255, 0.06);
    }

    .nav-more-menu a {
        color: #dbe6f5;
        padding-left: 30px;
    }

    .nav-more-menu a:hover {
        background: rgba(255, 255, 255, 0.1);
    }
}

@media (max-width: 480px) {
    .masthead-logo { height: 38px; padding: 5px 8px; }
    .masthead-wordmark { font-size: 1.35rem; }
    .masthead-tagline { letter-spacing: 1px; font-size: 0.68rem; }
    h1 { font-size: 1.55rem; }
    .article-header h1 { font-size: 1.55rem; }
}

/* ---------- Utility ---------- */

.text-muted { color: var(--muted); }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.nowrap { white-space: nowrap; }

/* ---------- Admin shell (admin module: topbar + side nav + forms) ---------- */

.admin-body {
    background: var(--paper);
}

.admin-header {
    background: var(--navy);
    border-bottom: 3px solid var(--accent);
}

.admin-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.admin-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-family: var(--serif);
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
}

.admin-brand:hover,
.admin-brand:focus {
    color: #fff;
    text-decoration: none;
}

.admin-header-links {
    display: flex;
    gap: 18px;
}

.admin-header-links a {
    color: #dbe6f5;
    font-size: 0.9rem;
    text-decoration: none;
}

.admin-header-links a:hover {
    color: #fff;
    text-decoration: underline;
}

.admin-shell {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px 48px;
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.admin-sidenav nav {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.admin-sidenav a {
    padding: 11px 14px;
    color: var(--ink);
    font-size: 0.92rem;
    text-decoration: none;
    border-left: 3px solid transparent;
}

.admin-sidenav a:hover {
    background: var(--paper);
    text-decoration: none;
}

.admin-sidenav a.active {
    border-left-color: var(--accent);
    background: var(--paper);
    color: var(--accent-dark);
    font-weight: 600;
}

.admin-main {
    min-width: 0;
}

.admin-main h1 {
    font-size: 1.5rem;
}

.admin-main h2 {
    font-size: 1.15rem;
    margin: 28px 0 12px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 18px;
    margin-bottom: 8px;
}

.form-grid .form-span-2 {
    grid-column: 1 / -1;
}

.inline-form {
    display: inline;
}

.admin-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

@media (max-width: 860px) {
    .admin-shell {
        grid-template-columns: 1fr;
    }

    .admin-sidenav nav {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .admin-sidenav a {
        border-left: 0;
        border-bottom: 3px solid transparent;
    }

    .admin-sidenav a.active {
        border-bottom-color: var(--accent);
    }

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

/* ---- Audio "Listen" (Kokoro TTS) ---- */
.audio-listen { display:flex; flex-wrap:wrap; align-items:center; gap:.6rem 1rem; margin:1.1rem 0 1.4rem; padding:.8rem 1rem; background:#fff; border:1px solid #e3e0d8; border-left:4px solid #1D70B8; border-radius:8px; }
.audio-listen .audio-label { font-weight:600; font-size:.95rem; color:#0B2545; }
.audio-listen audio { flex:1 1 260px; min-width:220px; height:38px; }
.audio-listen .audio-sponsor { flex-basis:100%; font-size:.78rem; color:#6b6b70; }
.audio-listen .audio-sponsor a { color:#1D70B8; text-decoration:none; }

/* ====================================================================
   Portals — contributor / advertiser / superadmin (2026-07-24)
   ==================================================================== */

/* ---- Portal header (top-bar chrome, no sidenav) ---- */

.portal-header {
    background: var(--navy);
    border-bottom: 3px solid var(--accent);
}

.portal-header-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.portal-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

.portal-nav a {
    color: #dbe6f5;
    font-size: 0.9rem;
    text-decoration: none;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
}

.portal-nav a:hover {
    color: #fff;
    text-decoration: underline;
}

.portal-nav a.active {
    color: #fff;
    font-weight: 600;
    border-bottom-color: var(--accent);
    text-decoration: none;
}

.portal-main {
    max-width: 1000px;
    margin: 0 auto;
    padding: 24px 20px 48px;
    min-width: 0;
}

/* ---- Impersonation banner (sticky, amber) ---- */

.impersonation-banner {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px 16px;
    padding: 8px 16px;
    background: #B45309;
    color: #fff;
    font-size: 0.9rem;
}

.impersonation-banner-form {
    display: inline;
    margin: 0;
}

.impersonation-banner-btn {
    background: #fff;
    color: #B45309;
    border: 0;
    border-radius: 3px;
    padding: 4px 12px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
}

.impersonation-banner-btn:hover {
    background: #fde8d4;
}

/* ---- Nav count + status badges ---- */

.badge-count {
    display: inline-block;
    min-width: 20px;
    padding: 1px 6px;
    border-radius: 10px;
    background: var(--accent);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.5;
}

.badge-pending  { background: #f4e9d7; color: #8a6100; }
.badge-rejected { background: #f7e0e0; color: var(--danger); }

.sidenav-divider {
    display: block;
    padding: 10px 14px 4px;
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-top: 1px solid var(--line);
    margin-top: 6px;
}

/* ---- Ad stats mini bar chart (advertiser dashboard) ---- */

.bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--muted);
    line-height: 1.9;
}

.bar-row .bar-label {
    flex: 0 0 84px;
    white-space: nowrap;
}

.bar-row .bar-track {
    flex: 1 1 auto;
    min-width: 0;
}

.bar-fill {
    display: block;
    height: 10px;
    background: var(--accent);
    border-radius: 2px;
    min-width: 1px;
}

/* ---- Review screens (/admin/review, /admin/ad-requests) ---- */

.review-compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    align-items: start;
}

@media (max-width: 860px) {
    .review-compare {
        grid-template-columns: 1fr;
    }
}

.review-preview {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px 24px;
}

/* ---- Advertiser ad cards ---- */

.ad-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px 18px;
    margin-bottom: 18px;
}

.ad-card img {
    max-width: 100%;
    height: auto;
}
