:root {
    --page-bg: #f8f9fa;
    --bg: #ffffff;
    --border: #dadce0;
    --text: #202124;
    --muted: #5f6368;
    --link: #1a73e8;
    --accent-border: #d2e3fc;
    --active-bg: #e8f0fe;
    --active-text: #174ea6;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    --radius: 12px;
    --newsletter-green: #23c78c;
    --newsletter-green-dark: #0d3b2d;
    --breaking-red: #ff2e2e;
}

* {
    box-sizing: border-box;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    background: var(--page-bg);
    color: var(--text);
}

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

a:hover {
    text-decoration: underline;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 120;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border-bottom: 1px solid var(--accent-border);
}

.topbar-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
}

.topbar-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    color: var(--text);
    text-decoration: none;
}

.topbar-icon:hover {
    background: #f1f6ff;
}

.topbar-icon svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nav-toggle {
    display: none;
    border: 1px solid var(--border);
    background: var(--bg);
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    margin-left: auto;
}

.brand {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.2;
    min-width: 0;
    flex: 0 1 560px;
}

.top-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 260px;
    max-width: 420px;
    flex: 1 1 320px;
}

.top-search input {
    width: 100%;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0 14px;
    font-size: 14px;
    background: var(--bg);
}

.top-search button,
.topbar-pill,
.action-btn,
.search-hero button,
.search-page-form button,
.btn-primary {
    border: 1px solid var(--link);
    background: var(--link);
    color: #fff;
    border-radius: 999px;
    height: 40px;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.top-search button:hover,
.topbar-pill:hover,
.action-btn:hover,
.search-hero button:hover,
.search-page-form button:hover,
.btn-primary:hover {
    filter: brightness(0.97);
    text-decoration: none;
}

.topbar-pill {
    background: #fff;
    color: var(--link);
    border-color: var(--accent-border);
}

.layout {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    min-height: calc(100vh - 62px);
}

.sidebar {
    width: 300px;
    flex: 0 0 300px;
    background: var(--bg);
    border-right: 1px solid var(--accent-border);
}

.sidebar-inner {
    position: sticky;
    top: 62px;
    padding: 16px;
    max-height: calc(100vh - 62px);
    overflow: auto;
}

.nav-head {
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 10px;
}

.nav-head-spaced {
    margin-top: 18px;
}

.nav-link {
    display: block;
    padding: 8px 10px;
    border-radius: 10px;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
}

.nav-link:hover {
    background: #f8fbff;
    text-decoration: none;
}

.nav-link.active {
    background: var(--active-bg);
    color: var(--active-text);
}

.nav-link.sub {
    padding-left: 24px;
    font-size: 13px;
    color: var(--muted);
}

.nav-link.sub.active {
    color: var(--active-text);
}

.overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 95;
}

.content {
    flex: 1;
    padding: 20px 24px 28px;
}

.content h1 {
    margin: 0 0 10px;
    font-size: 32px;
    line-height: 1.2;
}

.content h2 {
    margin-top: 0;
}

.lead,
.category-description {
    color: var(--muted);
    max-width: 78ch;
    line-height: 1.6;
    font-size: 15px;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.9fr);
    gap: 18px;
    margin-bottom: 24px;
}

.hero-copy,
.hero-panel,
.section-panel,
.form-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 18px;
    box-shadow: var(--shadow);
}

.eyebrow {
    display: inline-block;
    margin-bottom: 10px;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--active-bg);
    color: var(--active-text);
    font-size: 12px;
    font-weight: 700;
}

.hero-summary {
    margin: 0 0 12px;
    max-width: 88ch;
    font-size: 14px;
    line-height: 1.65;
    font-weight: 400;
    color: var(--muted);
}

.hero-panel-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
}

.search-hero {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

.search-hero input,
.search-page-form input,
.search-page-form select,
.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    padding: 12px 14px;
    font-size: 15px;
}

.hero-actions,
.page-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

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

.topbar-pill.is-newsletter,
.action-btn.is-newsletter,
.btn-primary.is-newsletter {
    background: var(--newsletter-green);
    border-color: var(--newsletter-green);
    color: var(--newsletter-green-dark);
    box-shadow: 0 8px 22px rgba(35, 199, 140, 0.22);
}

.topbar-pill.is-newsletter:hover,
.action-btn.is-newsletter:hover,
.btn-primary.is-newsletter:hover {
    color: var(--newsletter-green-dark);
}

.breaking-home {
    margin-top: 16px;
}

.breaking-home-ticker {
    display: flex;
    align-items: stretch;
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.14);
    border: 1px solid #ebedf5;
}

.breaking-home-ticker:hover {
    text-decoration: none;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
}

.breaking-home-label {
    background: var(--breaking-red);
    color: #fff;
    min-width: 184px;
    padding: 16px 18px;
    font-weight: 800;
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1.05;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 4px;
}

.breaking-home-label-main {
    display: block;
    font-size: 1.4rem;
    line-height: 1.02;
}

.breaking-home-site {
    display: block;
    font-style: normal;
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.82rem;
    opacity: 0.96;
}

.breaking-home-body {
    flex: 1 1 auto;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.breaking-home-title {
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
}


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

.stat-grid.compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-card {
    background: #f8fbff;
    border: 1px solid var(--accent-border);
    border-radius: 14px;
    padding: 14px;
}

.stat-value {
    font-size: 26px;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    margin-top: 6px;
    font-size: 13px;
    color: var(--muted);
}

.notice {
    margin-top: 14px;
    padding: 12px 14px;
    border-left: 4px solid var(--link);
    border-radius: 12px;
    background: #f8fbff;
    color: var(--text);
    line-height: 1.5;
    font-size: 14px;
}

.notice-wide {
    margin-bottom: 18px;
}

.section-panel {
    margin-bottom: 20px;
}

.section-head {
    margin-bottom: 12px;
}

.section-head h2 {
    margin-bottom: 6px;
}

.section-head p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.card-grid,
.utility-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.utility-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card {
    display: block;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    text-decoration: none;
    color: var(--text);
    box-shadow: var(--shadow);
}

.card:hover {
    border-color: var(--accent-border);
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.08);
    text-decoration: none;
}

.card-title {
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 1.3;
}

.card-text {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.card-meta {
    margin-top: 10px;
    color: var(--active-text);
    font-size: 12px;
    font-weight: 600;
}

.muted-card {
    opacity: 0.88;
}

.chip-row,
.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 16px 0;
}

.chip,
.filter-pill {
    background: var(--active-bg);
    color: var(--active-text);
    border: 1px solid var(--accent-border);
    padding: 6px 10px;
    border-radius: 999px;
    text-decoration: none;
    font-size: 13px;
}

.chip:hover {
    filter: brightness(0.98);
    text-decoration: none;
}

.link-list {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.link-item {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}

.link-item:last-child {
    border-bottom: none;
}

.link-item.placeholder {
    background: #fbfcff;
}

.link-title {
    font-size: 16px;
    color: var(--link);
    text-decoration: none;
    font-weight: 600;
}

.link-title:hover {
    text-decoration: underline;
}

.tags {
    margin-top: 8px;
}

.tag {
    display: inline-block;
    background: #f1f3f4;
    border: 1px solid var(--border);
    font-size: 12px;
    padding: 2px 8px;
    margin-right: 6px;
    border-radius: 999px;
    color: var(--muted);
}

.link-note {
    margin-top: 10px;
    padding: 10px 12px;
    border-left: 3px solid var(--accent-border);
    background: #f8fbff;
    color: var(--text);
    font-size: 13px;
    white-space: pre-wrap;
    line-height: 1.5;
}

.link-desc {
    font-size: 14px;
    margin-top: 10px;
    color: var(--text);
    line-height: 1.5;
}

.placeholder-line {
    width: 100%;
    min-height: 16px;
    border-radius: 8px;
    color: var(--text);
    font-size: 15px;
    line-height: 1.5;
}

.placeholder-line.strong {
    font-weight: 700;
}

.search-page-form {
    margin: 12px 0 14px;
}

.search-row {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) 220px 130px;
    gap: 10px;
}

.empty-state {
    padding: 28px 20px;
    border: 1px dashed var(--border);
    border-radius: 16px;
    background: #fff;
}

.empty-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
}

.breadcrumb {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 8px;
}

.breadcrumb a {
    color: var(--muted);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb .sep {
    margin: 0 6px;
    color: var(--muted);
}

.contact-form {
    max-width: 780px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.contact-form label,
.contact-form legend {
    display: block;
    font-size: 14px;
    color: var(--muted);
}

.contact-form textarea {
    resize: vertical;
}

.checkbox-panel {
    margin: 0;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
}

.check-option {
    display: block;
    margin: 8px 0;
    color: var(--text);
}

.check-option input {
    width: auto;
    margin-right: 8px;
}

.hint {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
}

.footer {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px;
    font-size: 12px;
    color: var(--muted);
    border-top: 1px solid var(--accent-border);
    background: var(--bg);
}

.footer-inner {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.footer a {
    color: var(--muted);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

.footer-brand,
.footer-brand:hover {
    text-decoration: none !important;
    color: var(--muted);
}

.footer-copy {
    font-size: 12px;
}

.content-list {
    margin: 0;
    padding-left: 18px;
    color: var(--text);
    line-height: 1.7;
}

.content-list li + li {
    margin-top: 6px;
}

.meta-block {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px 18px;
    box-shadow: var(--shadow);
}

.mini-note {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

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

.month-grid .card {
    min-height: 110px;
}

.page-home .card-grid .card,
.page-home .utility-grid .card {
    min-height: 150px;
}

.notice-success {
    border-left-color: #16a34a;
    background: #f0fdf4;
}

.notice-error {
    border-left-color: #dc2626;
    background: #fef2f2;
}

.chip-warn {
    background: #fff7ed;
    color: #9a3412;
    border-color: #fed7aa;
}

.stack-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stack-form label,
.search-page-form label,
.admin-panel label {
    display: block;
    font-size: 14px;
    color: var(--muted);
}

.stack-form input,
.stack-form select,
.stack-form textarea,
.search-page-form input,
.search-page-form select {
    width: 100%;
    margin-top: 6px;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 15px;
    background: #fff;
    color: var(--text);
}

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

.secondary-btn {
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    border-radius: 999px;
    min-height: 40px;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.secondary-btn:hover {
    background: #f8fbff;
    text-decoration: none;
}

.hero-single {
    grid-template-columns: 1fr;
}

.hero-kicker {
    display: inline-block;
    margin-bottom: 10px;
    color: var(--active-text);
    background: var(--active-bg);
    border: 1px solid var(--accent-border);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.admin-panel {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px;
    box-shadow: var(--shadow);
}

.admin-panel h2 {
    margin-top: 0;
}

.admin-meta {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.admin-actions {
    gap: 10px;
}

.admin-login-wrap {
    max-width: 760px;
}

.admin-login-form {
    max-width: 420px;
}

.mini-stats {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.mini-stats > div {
    background: #f8fbff;
    border: 1px solid var(--accent-border);
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 13px;
}

.admin-filter-form {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) 180px 220px 140px;
    gap: 10px;
    align-items: end;
}

.admin-article-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.admin-article-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--shadow);
}

.admin-article-card-review {
    border-color: #f59e0b;
    box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.18);
}

.admin-current-classification {
    margin: 12px 0;
    font-size: 14px;
}

.admin-suggestions {
    margin: 10px 0 14px;
    font-size: 13px;
    color: var(--muted);
}

.admin-suggestions ul {
    margin: 8px 0 0 18px;
    padding: 0;
}

.admin-correction-form {
    margin-top: 12px;
}

.admin-form-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.pager {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.pager-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    color: var(--text);
    text-decoration: none;
}

.pager-link.active,
.pager-link:hover {
    background: var(--active-bg);
    border-color: var(--accent-border);
    color: var(--active-text);
    text-decoration: none;
}

@media (max-width: 1100px) {
    .admin-grid,
    .admin-filter-form {
        grid-template-columns: 1fr;
    }
}


@media (max-width: 960px) {
    .breaking-home-ticker {
        flex-direction: column;
    }

    .breaking-home-label {
        min-width: 0;
        padding: 14px 16px;
        gap: 4px;
    }

    .breaking-home-label-main {
        font-size: 1.08rem;
    }

    .breaking-home-title {
        font-size: 14px;
    }
}

