html {
    scroll-behavior: smooth;
}

:root {
    --bg-color: #E8EDF2;
    --primary-color: #2C3947;
    --accent-color: #547A95;
    --text-color: #2C3947;
    --white: #ffffff;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    background-image: url('../img/grain.png');
    background-repeat: repeat;
    background-size: 256px 256px;
    color: var(--text-color);
    font-family: var(--font-main);
    line-height: 1.6;
}

header {
    padding: clamp(1rem, 3vw, 2rem) 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(44, 57, 71, 0.1);
    position: sticky;
    top: 0;
    background-color: var(--bg-color);
    z-index: 1000;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.logo {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    font-weight: 800;
    letter-spacing: -1px;
    color: var(--primary-color);
    text-decoration: none;
    text-transform: uppercase;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 2rem;
}

nav ul li a {
    text-decoration: none;
    color: var(--accent-color);
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--primary-color);
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: clamp(1.5rem, 5vw, 3rem) 5%;
}

.hero {
    margin-bottom: 4rem;
    display: flex;
    align-items: center;
    gap: 3rem;
}

.hero-image {
    flex: 0 0 50%;
    height: 480px;
    border-radius: 4px;
    overflow: hidden;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-content {
    flex: 1;
    min-width: 0;
}

.hero-tag {
    color: var(--accent-color);
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    display: block;
}

.hero h1 {
    font-size: clamp(1.6rem, 3vw, 2.8rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.hero p {
    font-size: 1.1rem;
    color: var(--accent-color);
    margin-bottom: 2rem;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background-color: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    border-radius: 4px;
    transition: opacity 0.3s ease;
}

.btn:hover {
    opacity: 0.9;
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
}

.section-title::after {
    content: '';
    flex-grow: 1;
    height: 1px;
    background: rgba(44, 57, 71, 0.1);
    margin-left: 1.5rem;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2.5rem;
}

.article-card {
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease;
}

.article-card:hover {
    transform: translateY(-5px);
}

.article-image {
    width: 100%;
    height: 200px;
    background-color: var(--accent-color);
    margin-bottom: 1.5rem;
    border-radius: 4px;
    overflow: hidden;
}

.article-category {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-color);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    display: block;
}

.article-card h3 {
    font-size: 1.25rem;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.article-meta {
    font-size: 0.8rem;
    color: var(--accent-color);
}

footer {
    background: var(--primary-color);
    color: rgba(232, 237, 242, 0.72);
    margin-top: 4rem;
    border-top: 3px solid var(--accent-color);
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0 5%;
}

.footer-brand,
.footer-col {
    padding: 3rem 2.5rem;
}

.footer-brand {
    padding-left: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-col {
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-col:last-child {
    border-right: none;
    padding-right: 0;
}

.footer-logo {
    color: var(--white);
    font-size: 1.6rem;
    font-weight: 800;
    display: block;
    text-decoration: none;
    letter-spacing: -0.5px;
    margin-bottom: 0.75rem;
}

.footer-tagline {
    font-size: 0.9rem;
    line-height: 1.7;
    margin: 0;
}

.footer-col h4 {
    color: var(--accent-color);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.footer-col h4 i {
    font-size: 0.75rem;
}

.footer-col ul,
.footer-col ul li {
    list-style: none;
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li a {
    color: rgba(232, 237, 242, 0.72);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s, padding-left 0.2s;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-col ul li:last-child a {
    border-bottom: none;
}

.footer-col ul li a:hover {
    color: var(--white);
    padding-left: 0.3rem;
}

.footer-col ul li a i {
    color: var(--accent-color);
    font-size: 0.78rem;
    width: 1rem;
    text-align: center;
    flex-shrink: 0;
}

.footer-col p {
    color: rgba(232, 237, 242, 0.72);
    font-size: 0.875rem;
    line-height: 1.7;
    margin: 0;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.25rem 5%;
    font-size: 0.78rem;
    color: rgba(232, 237, 242, 0.38);
    letter-spacing: 0.3px;
}

@media (max-width: 1024px) {
    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }

    .footer-brand {
        grid-column: 1 / -1;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        padding-bottom: 2rem;
    }

    .footer-col:last-child {
        border-right: none;
        padding-right: 2.5rem;
    }

    .footer-bottom {
        padding-left: 0;
        padding-right: 0;
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1.5rem 5%;
    }
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    nav ul li {
        margin: 0.5rem 1rem;
    }
    .hero {
        flex-direction: column;
        gap: 1.5rem;
        margin-bottom: 3rem;
    }
    .hero-image {
        flex: none;
        width: 100%;
        height: 320px;
    }
    main {
        padding: 2rem 5%;
    }
}

@media (max-width: 480px) {
    .hero p {
        font-size: 1rem;
    }
    .news-grid {
        grid-template-columns: 1fr;
    }
    .section-title {
        font-size: 1.25rem;
    }
    .hero-image {
        height: 240px;
    }
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .footer-brand {
        grid-column: auto;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .footer-col {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        padding-left: 0;
        padding-right: 0;
    }

    .footer-col:last-child {
        border-bottom: none;
        padding-right: 0;
    }
}


@media (min-width: 1440px) {
    main {
        max-width: 1400px;
    }
    .news-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ── Poll (public) ────────────────────────────────────────────────────────── */

.article-poll {
    background: #f4f7f9;
    border-left: 3px solid var(--accent-color);
    border-radius: 4px;
    padding: 1.75rem 2rem;
    margin: 2.5rem 0;
}

.poll-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-color);
    font-weight: 700;
    margin-bottom: 0.6rem;
}

.poll-question {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.poll-options {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-bottom: 1.25rem;
}

.poll-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.9rem;
    border: 1px solid #cdd4da;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    font-size: 0.9rem;
    color: var(--primary-color);
}

.poll-option:hover {
    border-color: var(--accent-color);
    background: rgba(84, 122, 149, 0.07);
}

.poll-option input {
    flex-shrink: 0;
    accent-color: var(--accent-color);
}

.poll-text-input {
    width: 100%;
    border: 1px solid #cdd4da;
    border-radius: 4px;
    padding: 0.65rem 0.85rem;
    font-size: 0.9rem;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 1.25rem;
    color: var(--primary-color);
    background: #fff;
    box-sizing: border-box;
}

.poll-text-input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.poll-rating {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.poll-rating-btn {
    width: 2.6rem;
    height: 2.6rem;
    border: 1px solid #cdd4da;
    border-radius: 4px;
    background: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--primary-color);
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.poll-rating-btn:hover,
.poll-rating-btn.selected {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
}

.poll-submit-btn {
    background: var(--accent-color);
    color: #fff;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.poll-submit-btn:hover { background: var(--primary-color); }
.poll-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.poll-error {
    color: #c0392b;
    font-size: 0.85rem;
    margin-top: 0.6rem;
}

.poll-results { margin-top: 0.25rem; }

.poll-result-row {
    display: grid;
    grid-template-columns: 1fr 2fr 2.5rem;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.7rem;
}

.poll-result-label {
    font-size: 0.875rem;
    color: var(--primary-color);
    font-weight: 500;
}

.poll-bar-wrap {
    background: #d0d8e0;
    border-radius: 3px;
    height: 8px;
    overflow: hidden;
}

.poll-bar {
    background: var(--accent-color);
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
    min-width: 2px;
}

.poll-pct {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-color);
    text-align: right;
}

.poll-total {
    font-size: 0.78rem;
    color: #6b7280;
    margin-top: 0.75rem;
}

.poll-count {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.75rem;
}

.poll-thankyou {
    font-size: 0.9rem;
    color: #4b5563;
    font-style: italic;
}

/* ── Poll (admin panel) ───────────────────────────────────────────────────── */

.poll-panel {
    margin-top: 1rem;
}

.poll-fields {
    padding-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.poll-option-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.4rem;
}

.poll-option-row input {
    flex: 1;
    margin-bottom: 0;
}

/* ─── Badges ─────────────────────────────────────────────────────────────────*/

.breaking-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: #dc3545;
    color: #fff;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
}

.category-tag {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: var(--accent-color);
    color: var(--white);
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.35rem;
}

.no-articles {
    color: var(--accent-color);
    font-size: 1.05rem;
    padding: 3rem 0;
}

/* ─── Video embed ────────────────────────────────────────────────────────────*/

.video-embed {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 4px;
    margin: 2rem 0;
    background: var(--primary-color);
}

.video-embed iframe,
.video-embed video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-embed.video-link {
    padding-bottom: 0;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: rgba(44, 57, 71, 0.05);
    border: 1px solid rgba(44, 57, 71, 0.15);
}

.video-embed.video-link a {
    color: var(--accent-color);
    font-weight: 600;
    text-decoration: none;
}

.video-embed.video-link a:hover {
    color: var(--primary-color);
}

/* ─── Article page ───────────────────────────────────────────────────────────*/

.article-page {
    max-width: 760px;
    margin: 0 auto;
}

.article-hero-image {
    width: 100%;
    height: 440px;
    background-color: var(--accent-color);
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.image-credit {
    font-size: 0.78rem;
    color: var(--accent-color);
    margin-bottom: 2rem;
}

.image-credit span {
    opacity: 0.7;
    margin-left: 0.5rem;
}

.article-header {
    margin-bottom: 1.5rem;
}

.article-header .hero-tag {
    margin-bottom: 0.75rem;
}

.article-header .hero-tag a {
    color: inherit;
    text-decoration: none;
}

.article-header h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    line-height: 1.15;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.article-deck {
    font-size: 1.15rem;
    color: var(--accent-color);
    line-height: 1.55;
    margin-top: 0.5rem;
}

.article-byline {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--accent-color);
    padding: 1rem 0;
    border-top: 1px solid rgba(44, 57, 71, 0.1);
    border-bottom: 1px solid rgba(44, 57, 71, 0.1);
    margin-bottom: 2.5rem;
}

.article-byline strong {
    color: var(--primary-color);
}

.article-body {
    font-size: 1.05rem;
    line-height: 1.85;
}

.article-body p {
    margin-bottom: 1.4rem;
}

.article-body h2 {
    font-size: 1.5rem;
    margin: 2.5rem 0 1rem;
    color: var(--primary-color);
}

.article-body h3 {
    font-size: 1.2rem;
    margin: 2rem 0 0.75rem;
    color: var(--primary-color);
}

.article-body blockquote {
    border-left: 3px solid var(--accent-color);
    padding: 0.5rem 0 0.5rem 1.5rem;
    margin: 2rem 0;
    color: var(--accent-color);
    font-style: italic;
    font-size: 1.1rem;
}

.article-body a {
    color: var(--accent-color);
}

.article-body a:hover {
    color: var(--primary-color);
}

.article-body img {
    max-width: 100%;
    border-radius: 4px;
    margin: 1.5rem 0;
}

.article-body ul,
.article-body ol {
    padding-left: 1.5rem;
    margin-bottom: 1.4rem;
}

.article-body li {
    margin-bottom: 0.4rem;
}

.article-gallery {
    margin: 3rem 0;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.gallery-item {
    width: 100%;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    object-fit: cover;
}

.gallery-item figcaption {
    margin-top: 0.6rem;
    font-size: 0.85rem;
    color: var(--accent-color);
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
}

.gallery-credit {
    font-size: 0.78rem;
    opacity: 0.7;
    flex-shrink: 0;
}

.image-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.image-row input[name="img_url[]"] {
    flex: 3;
    min-width: 180px;
}

.image-row input[name="img_caption[]"],
.image-row input[name="img_credit[]"] {
    flex: 2;
    min-width: 120px;
}

.article-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    border: 1px solid rgba(44, 57, 71, 0.15);
    border-radius: 4px;
    margin: 2rem 0;
    overflow: hidden;
}

.highlights-facts {
    padding: 1.5rem;
    border-right: 1px solid rgba(44, 57, 71, 0.15);
    background: rgba(44, 57, 71, 0.03);
}

.highlights-questions {
    padding: 1.5rem;
}

.highlights-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.highlights-facts ul,
.highlights-questions ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.highlights-facts li,
.highlights-questions li {
    padding: 0.55rem 0;
    border-bottom: 1px solid rgba(44, 57, 71, 0.08);
    font-size: 0.95rem;
    line-height: 1.5;
}

.highlights-facts li:last-child,
.highlights-questions li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.title-link { text-decoration: none; color: var(--primary-color); }
.highlights-facts a {
    color: var(--primary-color);
    text-decoration: underline;
    text-decoration-color: var(--accent-color);
    text-underline-offset: 2px;
}

.highlights-facts a:hover {
    color: var(--accent-color);
}

@media (max-width: 600px) {
    .highlights-facts {
        border-right: none;
        border-bottom: 1px solid rgba(44, 57, 71, 0.15);
    }
}

.highlights-anchor {
    color: var(--accent-color);
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 3px;
    cursor: pointer;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
}

.highlights-anchor:hover {
    color: var(--primary-color);
}

.article-answers {
    margin: 3rem 0;
    padding: 2rem;
    border: 1px solid rgba(44, 57, 71, 0.15);
    border-radius: 4px;
    scroll-margin-top: 5rem;
}

.answers-heading {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.answer-item {
    padding: 1.25rem 0;
    border-bottom: 1px solid rgba(44, 57, 71, 0.08);
}

.answer-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.answer-question {
    font-weight: 700;
    font-size: 1rem;
    color: var(--primary-color);
    margin-bottom: 0.6rem;
}

.answer-body {
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--text-color);
}

.answer-pending,
.answer-pending-all {
    font-size: 0.9rem;
    color: var(--accent-color);
    font-style: italic;
}

.highlight-fact-row,
.highlight-question-row {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(44, 57, 71, 0.08);
}

.highlight-fact-row {
    flex-direction: row;
    align-items: center;
    padding-bottom: 0;
    border-bottom: none;
}

.highlight-fact-row input[name="highlight_fact_text[]"] {
    flex: 2;
}

.highlight-fact-row input[name="highlight_fact_url[]"] {
    flex: 3;
}

.highlight-question-row input,
.highlight-question-row textarea {
    width: 100%;
}

.highlights-fields {
    padding-top: 1rem;
}

.article-sources {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(44, 57, 71, 0.1);
}

.article-sources h3 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-color);
    margin-bottom: 0.75rem;
}

.article-sources ul {
    list-style: none;
}

.article-sources ul li {
    margin-bottom: 0.4rem;
}

.article-sources ul li a {
    color: var(--accent-color);
    font-size: 0.875rem;
    text-decoration: none;
}

.article-sources ul li a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.source-pub {
    font-size: 0.75rem;
    color: var(--accent-color);
    opacity: 0.7;
    margin-left: 0.5rem;
}

.related-section {
    margin-top: 4rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

/* ─── Admin shared ───────────────────────────────────────────────────────────*/

.admin-dashboard {
    max-width: 1400px;
    margin: 0 auto;
}

.admin-dashboard .container {
    padding: clamp(1.5rem, 3vw, 2.5rem) 5%;
}

.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(44, 57, 71, 0.1);
}

.admin-subtitle {
    font-size: 0.85rem;
    color: var(--accent-color);
    margin-top: 0.25rem;
}

.admin-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-shrink: 0;
}

.back-link {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--accent-color);
    text-decoration: none;
    margin-bottom: 0.5rem;
}

.back-link:hover {
    color: var(--primary-color);
}

.secondary-button {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: transparent;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    font-family: var(--font-main);
    line-height: 1.4;
    transition: background 0.2s ease, color 0.2s ease;
}

.secondary-button:hover {
    background: var(--accent-color);
    color: var(--white);
}

/* ─── Notices ────────────────────────────────────────────────────────────────*/

.notice {
    padding: 0.85rem 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.notice.success    { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.notice.error      { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.notice.notice-info { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }

/* ─── Admin dashboard layout ─────────────────────────────────────────────────*/

.admin-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2.5rem;
    align-items: start;
}

.editor-panel,
.admin-sidebar {
    min-width: 0;
}

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(44, 57, 71, 0.1);
}

.section-header h2 {
    font-size: 1.25rem;
}

/* ─── Forms (admin) ──────────────────────────────────────────────────────────*/

.story-form label,
.form-container label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent-color);
    margin-bottom: 0.35rem;
    margin-top: 1.25rem;
}

.story-form input[type="text"],
.story-form input[type="email"],
.story-form input[type="url"],
.story-form textarea,
.story-form select,
.form-container input[type="text"],
.form-container input[type="email"],
.form-container input[type="password"],
.form-container input[type="url"],
.form-container textarea,
.form-container select {
    width: 100%;
    padding: 0.65rem 0.85rem;
    background: var(--white);
    border: 1px solid rgba(44, 57, 71, 0.2);
    border-radius: 4px;
    color: var(--text-color);
    font-size: 0.95rem;
    font-family: var(--font-main);
    transition: border-color 0.2s ease;
}

.story-form input:focus,
.story-form textarea:focus,
.story-form select:focus,
.form-container input:focus,
.form-container textarea:focus,
.form-container select:focus {
    outline: none;
    border-color: var(--accent-color);
}

.story-form textarea {
    resize: vertical;
}

.story-form button[type="submit"],
.form-container button[type="submit"] {
    margin-top: 1.5rem;
    padding: 0.75rem 2rem;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-main);
    transition: opacity 0.2s ease;
}

.story-form button[type="submit"]:hover,
.form-container button[type="submit"]:hover {
    opacity: 0.85;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.field-hint {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.75rem;
    opacity: 0.75;
}

/* ─── Sources panel ──────────────────────────────────────────────────────────*/

.sources-panel {
    margin-top: 1.5rem;
}

.source-row {
    margin-bottom: 0.75rem;
}

.source-row-fields {
    display: grid;
    grid-template-columns: 2fr 3fr 2fr auto;
    gap: 0.5rem;
    align-items: center;
}

#add-source {
    margin-top: 0.5rem;
}

/* ─── SEO panel ──────────────────────────────────────────────────────────────*/

.seo-panel {
    margin-top: 1.5rem;
    border: 1px solid rgba(44, 57, 71, 0.15);
    border-radius: 4px;
    padding: 0.75rem 1rem;
}

.seo-panel summary {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent-color);
    cursor: pointer;
    user-select: none;
}

.seo-fields {
    margin-top: 1rem;
}

/* ─── Checkboxes ─────────────────────────────────────────────────────────────*/

.checkbox-group {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 1.25rem;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: var(--text-color);
    margin-top: 0;
}

.checkbox-row input[type="checkbox"] {
    width: auto;
}

/* ─── Sidebar cards ──────────────────────────────────────────────────────────*/

.sidebar-card {
    background: var(--white);
    border: 1px solid rgba(44, 57, 71, 0.1);
    border-radius: 6px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.sidebar-card h3 {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.dashboard-list {
    list-style: none;
    font-size: 0.875rem;
}

.dashboard-list li {
    display: flex;
    flex-direction: column;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(44, 57, 71, 0.07);
}

.dashboard-list li:last-child {
    border-bottom: none;
}

.dashboard-list li a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.dashboard-list li a:hover {
    color: var(--accent-color);
}

.dashboard-list li span {
    font-size: 0.75rem;
    color: var(--accent-color);
    margin-top: 0.2rem;
}

.date {
    font-size: 0.8rem;
    color: var(--accent-color);
    white-space: nowrap;
}

/* ─── Standalone / login page ────────────────────────────────────────────────*/

.standalone-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.admin-container.form-container {
    background: var(--white);
    border: 1px solid rgba(44, 57, 71, 0.1);
    border-radius: 8px;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
}

.admin-container h1 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

/* ─── Tips ───────────────────────────────────────────────────────────────────*/

.tips-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.tip-card.sidebar-card {
    max-width: 900px;
}

.tip-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.tip-header h2 {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 0.25rem;
}

.tip-meta {
    font-size: 0.8rem;
    color: var(--accent-color);
    margin-top: 0.75rem;
}

.tip-status-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: 1rem;
}

.tip-status-form select {
    width: auto;
}

.tip-status-form button {
    margin-top: 0;
    padding: 0.4rem 0.85rem;
    font-size: 0.85rem;
}

/* ─── Admin responsive ───────────────────────────────────────────────────────*/

@media (max-width: 960px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }

    .source-row-fields {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .admin-topbar {
        flex-direction: column;
        gap: 1rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .checkbox-group {
        flex-direction: column;
        gap: 0.75rem;
    }

    .source-row-fields {
        grid-template-columns: 1fr;
    }

    .tip-header {
        flex-direction: column;
    }

    .admin-container.form-container {
        padding: 1.5rem;
    }
}
