:root {
    color-scheme: light;
    font-family: 'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    font-weight: 400;
    color: #0f172a;
    background-color: #dde3ec;
    --article-width: min(960px, 92vw);
    --page-bg: #dfe4ed;
    --card-bg: #f3f5f9;
    --card-border: #c8d2e0;
    --text-main: #0f172a;
    --text-muted: #4b5568;
    --link: #1f4fb0;
}

.hidden {
    display: none !important;
}

html {
    height: 100%;
    scroll-behavior: smooth;
    overflow-x: hidden;
    max-width: 100%;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--page-bg);
    color: var(--text-main);
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

.hero {
    background: radial-gradient(circle at 12% 18%, rgba(99, 102, 241, 0.16), transparent 40%),
    radial-gradient(circle at 78% 12%, rgba(16, 185, 129, 0.14), transparent 42%),
    linear-gradient(135deg, #1c2f52, #111b33 70%);
    color: #ffffff;
    padding: 3rem 0 2rem;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 65% 40%, rgba(255, 255, 255, 0.08), transparent 35%);
    pointer-events: none;
}

.hero--landing {
    padding-bottom: 3rem;
}

.hero--hotspot {
    padding-bottom: 2.5rem;
}

.hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    z-index: 1;
}

.hero-copy h1 {
    margin: 0.2rem 0 0.8rem;
    font-size: clamp(2rem, 3.4vw, 2.7rem);
}

.hero-copy .subtitle {
    max-width: 640px;
    color: rgba(255, 255, 255, 0.88);
}

.hero-copy {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hero-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(6px);
}

.hero-card h3 {
    margin: 8px 0 8px;
}

.hero-card-copy {
    color: rgba(255, 255, 255, 0.88);
    margin-bottom: 16px;
}

.hero-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.pill--blue {
    background: rgba(59, 130, 246, 0.18);
    color: #e0ecff;
}

.pill--teal {
    background: rgba(13, 148, 136, 0.22);
    color: #d7ffef;
}

.pill--rose {
    background: rgba(244, 63, 94, 0.18);
    color: #ffe3ec;
}

.pill--soft {
    background: rgba(255, 255, 255, 0.12);
    color: #f9fafb;
}

.hotspot-filter {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-top: 6px;
}

.hotspot-filter select {
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    min-width: 200px;
}

.hotspot-filter option {
    color: #0b1224;
}

.hotspot-pill-filter {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.pill--active {
    background: linear-gradient(120deg, #22d3ee, #6366f1);
    color: #fff;
    border-color: transparent;
}

.article-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.admin-entry--compact {
    color: #e0edff;
    border-color: rgba(255, 255, 255, 0.25);
}

.hero h1 {
    margin: 0.6rem 0 0;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 700;
}

.hero-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
}

.primary-link,
.ghost-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-link {
    background: linear-gradient(120deg, #22d3ee, #6366f1);
    box-shadow: 0 14px 32px rgba(79, 70, 229, 0.35);
    border-color: transparent;
}

.primary-cta {
    padding: 12px 22px;
    font-size: 1.02rem;
}

.ghost-link {
    background: rgba(255, 255, 255, 0.1);
}

.ghost-link:hover,
.primary-link:hover {
    transform: translateY(-1px);
    text-decoration: none;
}

.hero--landing .hero-actions {
    justify-content: flex-start;
    gap: 12px;
}

.theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    background: linear-gradient(120deg, rgba(37, 99, 235, 0.12), rgba(99, 102, 241, 0.08));
    color: var(--text-main);
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.theme-dark .theme-toggle-btn {
    background: linear-gradient(120deg, rgba(147, 197, 253, 0.18), rgba(59, 130, 246, 0.12));
    color: var(--text-main);
    border-color: rgba(147, 197, 253, 0.35);
}

@media (max-width: 640px) {
    .hero {
        padding: 2.4rem 0 1.6rem;
    }
    .hero-grid {
        gap: 16px;
    }
    .hero-card {
        background: rgba(255, 255, 255, 0.12);
        border-color: rgba(255, 255, 255, 0.2);
    }
    .domain-cards {
        margin-top: -32px;
    }
    .hero-actions {
        flex-wrap: wrap;
        align-items: stretch;
    }
    .hero-actions .primary-link,
    .hero-actions .ghost-link {
        width: 100%;
        justify-content: center;
    }
}

.admin-tip {
    margin-top: 0.75rem;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
}

.admin-entry {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 600;
    color: #d0e0ff;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    transition: background 0.2s ease;
}

.admin-entry:hover {
    text-decoration: none;
    background: rgba(255, 255, 255, 0.12);
}


.hotspot-hero-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    align-items: stretch;
}

.hotspot-hero-copy h1 {
    margin: 0.2rem 0 0.6rem;
    font-size: clamp(2rem, 3vw, 2.6rem);
}

.hotspot-hero-panel {
    background: #0f172a;
    color: #f8fafc;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.hotspot-hero-panel h3 {
    margin-top: 0;
}

.hotspot-hero-panel ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hotspot-hero-panel li {
    background: rgba(255, 255, 255, 0.06);
    padding: 10px 12px;
    border-radius: 12px;
}

.panel-copy {
    margin: 0;
    line-height: 1.7;
    color: #e2e8f0;
}

.pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 12px;
}

.hotspot-listing, .hotspot-trend-panel {
    background: #ffffff;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
    border: 1px solid #e5e7eb;
}

.hotspot-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.hotspot-heading h3 {
    margin: 0;
}

.hotspot-digest {
    margin-top: 12px;
    padding: 14px 16px;
    border: 1px solid #d9e3ff;
    background: #f6f8ff;
    border-radius: 12px;
    color: #0f172a;
}

.hotspot-digest .eyebrow {
    margin: 0 0 6px 0;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.75rem;
    color: #4f46e5;
}

.hotspot-heading p {
    margin: 0;
    color: #667085;
}

.archive-hero {
    position: relative;
}

.archive-hero-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    align-items: stretch;
}

.archive-meta-card {
    background: linear-gradient(140deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
    color: #f8fafc;
    border-radius: 16px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.24);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.meta-row h3 {
    margin: 2px 0 0 0;
}

.meta-compact {
    align-items: flex-start;
}

.meta-stat {
    background: rgba(255, 255, 255, 0.12);
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 120px;
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    opacity: 0.82;
}

.stat-value {
    font-weight: 800;
    font-size: 1.1rem;
}

.meta-sub {
    margin: 4px 0;
    color: rgba(255, 255, 255, 0.82);
}

.meta-badge {
    background: linear-gradient(90deg, rgba(34, 211, 238, 0.14), rgba(99, 102, 241, 0.18));
    border: 1px solid rgba(255, 255, 255, 0.24);
    color: #e2e8f0;
    padding: 8px 12px;
    border-radius: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.archive-pill-row {
    margin-top: 14px;
}

.archive-page {
    padding: 32px 0 26px;
}

.archive-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.month-switcher {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.month-title {
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--text-main);
}

.archive-legend {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.legend-dot {
    width: 12px;
    height: 12px;
    display: inline-block;
    border-radius: 50%;
    border: 1px solid var(--card-border);
    margin-right: 4px;
}

.legend-dot--active {
    background: linear-gradient(120deg, #22d3ee, #6366f1);
    border-color: transparent;
}

.legend-dot--today {
    background: #facc15;
    border-color: #f59e0b;
}

.legend-dot--empty {
    background: var(--card-bg);
}

.calendar {
    border: 1px solid var(--card-border);
    background: linear-gradient(180deg, var(--card-bg), #eaedf4);
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.07);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 8px;
}

.calendar-weekday {
    text-align: center;
    font-weight: 700;
    color: var(--text-muted);
    padding: 6px 0;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
}

.calendar-cell {
    min-height: 86px;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(180deg, var(--card-bg), #e3e8f2);
    transition: transform 0.12s ease, box-shadow 0.15s ease, border 0.12s ease;
}

.calendar-cell:hover {
    transform: translateY(-2px);
}

.calendar-cell--muted {
    opacity: 0.45;
}

.calendar-cell--active {
    border-color: rgba(99, 102, 241, 0.35);
    box-shadow: 0 12px 26px rgba(79, 70, 229, 0.14);
    background: linear-gradient(160deg, rgba(34, 211, 238, 0.12), rgba(99, 102, 241, 0.18));
}

.calendar-cell--today {
    outline: 2px solid rgba(245, 158, 11, 0.8);
    outline-offset: -3px;
}

.calendar-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-main);
    text-decoration: none;
    gap: 4px;
    padding: 10px 6px;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.calendar-link:hover {
    transform: translateY(-2px);
}

.empty-slot {
    pointer-events: none;
}

.day-number {
    font-size: 1.4rem;
    font-weight: 800;
}

.day-count {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.ghost-link.ghost-compact {
    color: var(--text-main);
    border-color: var(--card-border);
    background: rgba(37, 99, 235, 0.05);
    padding: 8px 12px;
}

.ghost-link.ghost-disabled {
    pointer-events: none;
    opacity: 0.45;
}

.hotspot-page {
    padding: 32px 0 24px;
}

.hotspot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.hotspot-card-portal {
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 14px;
    background: linear-gradient(180deg, var(--card-bg), #e9edf6);
    box-shadow: 0 8px 16px rgba(17, 24, 39, 0.05);
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
}

.hotspot-card-portal h4 {
    margin: 0;
}

.hotspot-card-portal .meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    color: #6b7280;
    font-size: 0.9rem;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.hotspot-card-portal p {
    margin: 0;
    color: var(--text-main);
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
}

.hotspot-card-portal a {
    color: var(--link);
    text-decoration: none;
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
}

.hotspot-card-portal a:hover {
    text-decoration: underline;
}

.hotspot-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.hotspot-tags span {
    background: #eef2ff;
    color: #4338ca;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.85rem;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.hotspot-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.hotspot-actions .hotspot-preview-btn,
.hotspot-actions .ghost-link {
    background: linear-gradient(90deg, #2563eb, #1d4ed8);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 14px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
    transition: transform 0.08s ease, box-shadow 0.12s ease;
    min-width: 130px;
    flex: 1;
    text-align: center;
    justify-content: center;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.hotspot-actions .hotspot-preview-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    box-shadow: none;
}

.hotspot-actions .hotspot-preview-btn:hover:not(:disabled),
.hotspot-actions .ghost-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.32);
}

.hotspot-preview-status {
    margin: 0;
    font-weight: 600;
    color: #334155;
}

.hotspot-preview-meta {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
}

.hotspot-preview-content {
    margin: 0;
    color: #0f172a;
    line-height: 1.6;
    white-space: pre-wrap;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px;
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
}

.hotspot-preview-content a,
.hotspot-preview-meta a {
    color: var(--link);
    font-weight: 600;
    text-decoration: none;
}

.hotspot-preview-content a:hover,
.hotspot-preview-meta a:hover {
    text-decoration: underline;
}

.hotspot-preview-heading {
    display: block;
    margin: 0 0 6px 0;
    font-weight: 800;
    color: var(--text-main);
}

.hotspot-progress {
    width: 100%;
    height: 6px;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 999px;
    overflow: hidden;
    margin-top: -8px;
}

.hotspot-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #2563eb, #22d3ee);
    border-radius: 999px;
    transition: width 0.2s ease;
}

.hotspot-preview-scroll {
    max-height: calc(72vh - 90px);
    overflow-y: auto;
    padding-right: 4px;
}


.hotspot-preview-float.hidden {
    display: none;
}

.hotspot-preview-float {
    position: fixed;
    right: 20px;
    bottom: 24px;
    width: min(520px, 92vw);
    max-height: 72vh;
    overflow: hidden;
    background: linear-gradient(135deg, var(--card-bg), #e7ecf5);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.2);
    padding: 18px 14px 14px 14px;
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hotspot-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    position: relative;
}

.hotspot-preview-title {
    margin: 0;
    font-weight: 700;
    color: #0f172a;
}

.hotspot-preview-actions button {
    border: 1px solid transparent;
    background: linear-gradient(90deg, #2563eb, #1d4ed8);
    color: #fff;
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.25);
    min-width: 88px;
    text-align: center;
}

.hotspot-preview-actions {
    margin-left: auto;
}

.hotspot-preview-default .hint,
.hotspot-preview-error .hint {
    margin: 0;
    color: #64748b;
}

.hotspot-preview-error button.hotspot-preview-retry {
    margin-top: 6px;
    padding: 6px 10px;
    border: 1px solid #2563eb;
    background: #eef2ff;
    color: #1d4ed8;
    border-radius: 8px;
    cursor: pointer;
}

.hotspot-preview-error.hidden,
.hotspot-preview-default.hidden,
.hotspot-preview-skeleton.hidden {
    display: none;
}

.hotspot-preview-skeleton {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skeleton-line {
    height: 12px;
    background: linear-gradient(90deg, #e2e8f0, #f1f5f9, #e2e8f0);
    background-size: 200% 100%;
    border-radius: 8px;
    animation: shimmer 1.2s infinite;
}

.skeleton-title {
    width: 70%;
    height: 16px;
}

.skeleton-line.short {
    width: 40%;
}

@keyframes shimmer {
    0% { background-position: -120% 0; }
    100% { background-position: 120% 0; }
}

.hotspot-preview-fab {
    position: fixed;
    right: 20px;
    bottom: 20px;
    background: linear-gradient(90deg, #2563eb, #1d4ed8);
    color: #fff;
    padding: 12px 16px;
    border-radius: 999px;
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.25);
    font-weight: 700;
    cursor: pointer;
    z-index: 19;
}

.hotspot-preview-fab.hidden {
    display: none;
}

@media (max-width: 720px) {
    .hotspot-page {
        padding-top: 20px;
    }
    .hotspot-grid {
        grid-template-columns: 1fr;
    }
    .hotspot-card-portal {
        padding: 12px;
    }
    .hotspot-preview-float {
        width: calc(100% - 24px);
        left: 12px;
        right: 12px;
        bottom: 12px;
        max-height: 65vh;
    }
    .hotspot-preview-fab {
        right: 12px;
        bottom: 12px;
    }

    .article-detail {
        padding: 1rem;
        border-radius: 16px;
    }
}

.hotspot-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.hotspot-score {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    font-weight: 700;
    color: var(--text-main);
}

.hotspot-score-label {
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.9rem;
}


.hotspot-card-portal.hotspot-card-active {
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.16);
    border-color: #c7d2fe;
}

.hotspot-preview-float {
    position: fixed;
    right: 20px;
    bottom: 24px;
    width: min(520px, 92vw);
    max-height: 72vh;
    overflow: auto;
    background: linear-gradient(135deg, var(--card-bg), #e7ecf5);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.2);
    padding: 14px;
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hotspot-trend-panel .trend-row {
    display: grid;
    grid-template-columns: 1fr 1.4fr 80px;
    gap: 10px;
    align-items: center;
}

.hotspot-trend-panel .trend-bar {
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
    height: 10px;
}

.hotspot-trend-panel .trend-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #10b981, #2563eb);
}

.hotspot-trend-panel .trend-value {
    text-align: right;
    font-weight: 700;
}

.subtitle {
    margin-top: 0.6rem;
    max-width: 620px;
    opacity: 0.85;
}

.toolbar {
    margin: 2rem 0 1rem;
}

.search-bar {
    display: flex;
    gap: 0.75rem;
}

.search-bar input[type="search"] {
    flex: 1;
    padding: 0.65rem 0.9rem;
    border-radius: 12px;
    border: 1px solid #d0d5dd;
    font-size: 1rem;
    background-color: #ffffff;
}

.search-bar button {
    background-color: #155eef;
    color: #ffffff;
    border: none;
    padding: 0.65rem 1.2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.search-bar button:hover {
    background-color: #0f4fd8;
}

.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.category-filter a {
    border: 1px solid transparent;
    background-color: #e0e7ff;
    color: #273469;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.category-filter a:hover {
    background-color: #c7d2fe;
    text-decoration: none;
}

.category-filter a.active {
    background-color: #273469;
    color: #ffffff;
}

.article-list h2 {
    margin: 0 0 0.25rem;
}

.result-tip {
    color: #667085;
    margin-top: 0;
}

.article-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.article-card {
    border-radius: 16px;
    background-color: var(--card-bg);
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid var(--card-border);
}

.article-card .thumb {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #f4f6fb;
}

.article-card .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.article-card .body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    color: var(--text-main);
}

.article-card .meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
}

.article-card .meta .category {
    font-weight: 600;
    color: var(--link);
}

.article-card h3 {
    margin: 0;
    font-size: 1.2rem;
    line-height: 1.4;
}

.article-card h3 a {
    color: var(--text-main);
    text-decoration: none;
}

.article-card h3 a:hover {
    text-decoration: underline;
}

.article-card .summary {
    margin: 0.75rem 0 1rem;
    flex: 1;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.article-card .tags {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
}

.article-card .tags li {
    background-color: rgba(37, 99, 235, 0.08);
    color: var(--link);
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    text-transform: capitalize;
}

.article-card .read-more {
    margin-top: auto;
    font-weight: 600;
    color: var(--link);
}

.article-card .read-more:hover {
    text-decoration: underline;
}

.empty {
    text-align: center;
    color: #667085;
    padding: 2.5rem 0;
}

.pagination {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin: 2rem 0 3rem;
    flex-wrap: wrap;
}

.pagination a {
    padding: 0.45rem 0.85rem;
    border-radius: 10px;
    background-color: #ffffff;
    border: 1px solid #d0d5dd;
    color: #101828;
    font-weight: 500;
}

.pagination a.active {
    background-color: #155eef;
    border-color: #155eef;
    color: #ffffff;
}

.pagination a.disabled {
    pointer-events: none;
    opacity: 0.4;
}

.footer {
    background-color: #101828;
    color: #f5f5f5;
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.9rem;
    margin-top: auto;
}

.back-link {
    color: #ffffff;
    font-weight: 600;
}

.back-link:hover {
    text-decoration: none;
}

.hero .meta {
    list-style: none;
    padding: 0;
    margin: 0.9rem 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
}

.hero .meta li {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.6rem;
    background-color: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
}

.article-detail {
    background-color: var(--card-bg);
    padding: 2.2rem;
    border-radius: 24px 24px 32px 32px;
    box-shadow: 0 18px 32px rgba(15, 23, 42, 0.1);
    margin: 1rem auto 3rem;
    width: 100%;
    max-width: var(--article-width);
    border: 1px solid var(--card-border);
}

.article-detail .hero-image {
    margin-bottom: 2rem;
    border-radius: 16px;
    overflow: hidden;
}

.article-detail .hero-image img {
    width: 100%;
    display: block;
}

.article-detail .content {
    color: var(--text-main);
    font-size: 1.05rem;
    line-height: 1.8;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.article-detail .content p {
    margin: 1rem 0;
}

.article-detail .content h2,
.article-detail .content h3,
.article-detail .content h4 {
    margin: 1.5rem 0 0.75rem;
}

.article-detail .content blockquote {
    margin: 1.2rem 0;
    padding: 0.75rem 1rem;
    border-left: 4px solid var(--link);
    background-color: rgba(37, 99, 235, 0.08);
    color: var(--text-muted);
    border-radius: 0 12px 12px 0;
}

.article-detail .content ul,
.article-detail .content ol {
    margin: 1rem 0 1rem 1.5rem;
    padding: 0;
}

.article-detail .content pre {
    margin: 1.2rem 0;
    padding: 1rem;
    background-color: #0b1a33;
    color: #f1f5f9;
    border-radius: 12px;
    overflow-x: auto;
    white-space: pre-wrap;
}

.article-detail .content code {
    background-color: rgba(15, 23, 42, 0.08);
    padding: 0.2rem 0.4rem;
    border-radius: 6px;
    font-size: 0.95em;
}

.article-detail .content mjx-container[jax="CHTML"][display="true"] {
    margin: 1.4rem 0;
    display: block;
    text-align: center;
}

.article-detail .content mjx-container[jax="CHTML"][display="false"] {
    display: inline-flex;
    align-items: center;
    margin: 0 0.2rem;
}

.article-detail .tags {
    list-style: none;
    padding: 0;
    margin: 2rem 0 0;
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.article-detail .tags li {
    background-color: rgba(37, 99, 235, 0.08);
    color: var(--link);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.85rem;
    text-transform: capitalize;
}

@media (max-width: 768px) {
    .search-bar {
        flex-direction: column;
    }

    .search-bar button {
        width: 100%;
    }

    .hero .meta {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .hero .meta li {
        justify-content: space-between;
    }

    .article-detail {
        padding: 1.2rem;
        border-radius: 18px;
    }

    .article-detail .hero-image {
        margin: 1.2rem 0;
    }

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

    .hotspot-hero-panel {
        margin-top: 4px;
    }
}

.hero.hero--compact .container,
.article-layout {
    width: 100%;
    max-width: var(--article-width);
    margin: 0 auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.article-toc-toggle {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    border-radius: 999px 0 0 999px;
    background: linear-gradient(135deg, #155eef, #0f62fe);
    color: #fff;
    padding: 1.1rem 0.5rem;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    font-weight: 600;
    font-size: 0.85rem;
    writing-mode: vertical-rl;
    box-shadow: 0 15px 30px rgba(15, 23, 42, 0.25);
    cursor: pointer;
    z-index: 30;
}

.article-toc-toggle span {
    display: none;
}

.article-toc-toggle[aria-expanded="true"] {
    background: #0f172a;
    flex-direction: row;
    writing-mode: horizontal-tb;
    padding: 0.65rem 1rem;
    border-radius: 999px 0 0 999px;
}

.article-toc-toggle[aria-expanded="true"] span {
    display: inline-flex;
}

.article-toc {
    position: fixed;
    right: 24px;
    top: 80px;
    width: 320px;
    max-height: calc(100vh - 160px);
    background: var(--card-bg);
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
    border: 1px solid var(--card-border);
    z-index: 40;
    transform: translateX(120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.article-toc.is-open {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

.article-toc__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.article-toc__header p {
    margin: 0;
    font-weight: 700;
    color: var(--text-main);
    font-size: 1.1rem;
}

.article-toc__close {
    border: none;
    background: transparent;
    font-size: 1.3rem;
    cursor: pointer;
    color: var(--text-muted);
}

.article-toc__desc {
    margin: 0 0 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.article-toc__list {
    max-height: calc(100vh - 240px);
    overflow-y: auto;
    padding-right: 0.4rem;
    padding-bottom: 0.75rem;
    background: var(--card-bg);
    border-radius: 18px;
}

.article-toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.article-toc-list li {
    line-height: 1.4;
}

.article-toc-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.95rem;
    color: var(--link);
    border-radius: 8px;
    padding: 0.1rem 0.35rem;
    word-break: break-word;
    white-space: normal;
}

.article-toc-link::before {
    content: '•';
    color: rgba(21, 94, 239, 0.35);
}

.article-toc-link.level-3 {
    padding-left: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.article-toc-link.is-active {
    background: rgba(37, 99, 235, 0.18);
    color: var(--text-main);
}

.article-detail .content h2,
.article-detail .content h3 {
    scroll-margin-top: 120px;
}

.article-toc__empty {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}

.article-detail {
    grid-column: 1 / span 1;
    width: 100%;
}

@media (max-width: 1024px) {
    .article-layout {
        grid-template-columns: 1fr;
        justify-content: stretch;
    }
    .article-toc-toggle {
        top: auto;
        bottom: 24px;
        right: 16px;
        transform: none;
        flex-direction: row;
        writing-mode: horizontal-tb;
        border-radius: 999px;
        padding: 0.65rem 1rem;
    }
    .article-toc-toggle span {
        display: none;
    }
    .article-toc-toggle[aria-expanded="true"] span {
        display: inline-flex;
    }
    .article-toc {
        right: 16px;
        left: 16px;
        width: auto;
        top: auto;
        bottom: 90px;
        max-height: min(420px, calc(100vh - 140px));
        background: var(--card-bg);
        color: var(--text-main);
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
    }
}

main.container {
    flex: 1;
    padding-bottom: 3rem;
}
.article-detail .content img,
.article-detail .content table {
    max-width: 100%;
}

.article-detail .content table {
    width: 100%;
    overflow-x: auto;
    display: block;
}
.theme-dark {
    --page-bg: #0b1220;
    --card-bg: #0f172a;
    --card-border: #1f2937;
    --text-main: #e5eaf3;
    --text-muted: #9ca3af;
    --link: #93c5fd;
}

.theme-dark .footer,
.theme-dark .hero,
.theme-dark .hotspot-card-portal,
.theme-dark .hotspot-preview-float {
    background: var(--card-bg);
    color: var(--text-main);
    border-color: var(--card-border);
}

.theme-dark .hotspot-card-portal p,
.theme-dark .hotspot-card-portal .meta,
.theme-dark .hotspot-preview-status,
.theme-dark .hotspot-preview-meta,
.theme-dark .hotspot-preview-content {
    color: var(--text-main);
}

.theme-dark .hotspot-preview-fab {
    background: linear-gradient(90deg, #334155, #1e293b);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.28);
}

.theme-dark .hotspot-preview-content {
    background: #0d1424;
    border-color: #1f2937;
}

.theme-dark .hotspot-preview-meta a,
.theme-dark .hotspot-preview-content a {
    color: var(--link);
}

.theme-dark .hotspot-score span,
.theme-dark .hotspot-score-label {
    color: var(--text-main);
}
.theme-dark .hotspot-preview-content {
    background: #0f172a;
    border-color: #1f2937;
}
.theme-dark .archive-meta-card {
    background: linear-gradient(160deg, rgba(30, 41, 59, 0.85), rgba(15, 23, 42, 0.92));
    border-color: var(--card-border);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
    color: var(--text-main);
}
.theme-dark .meta-sub,
.theme-dark .stat-label {
    color: var(--text-muted);
}
.theme-dark .meta-badge {
    border-color: rgba(255, 255, 255, 0.18);
    color: var(--text-main);
}
.theme-dark .calendar,
.theme-dark .calendar-cell {
    background: var(--card-bg);
    border-color: var(--card-border);
}
.theme-dark .calendar-cell--active {
    background: linear-gradient(150deg, rgba(14, 165, 233, 0.18), rgba(99, 102, 241, 0.22));
    border-color: rgba(147, 197, 253, 0.35);
}
.theme-dark .month-title,
.theme-dark .archive-legend,
.theme-dark .day-count,
.theme-dark .calendar-weekday {
    color: var(--text-muted);
}
.theme-dark .calendar-link {
    color: var(--text-main);
}
.theme-dark .ghost-link.ghost-compact {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
}
.theme-toggle-icon {
    position: fixed;
    top: 16px;
    right: 16px;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--card-border);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.14), rgba(99, 102, 241, 0.12));
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.16);
    cursor: pointer;
    z-index: 30;
    font-size: 1.05rem;
}

.theme-dark .theme-toggle-icon {
    background: linear-gradient(135deg, rgba(147, 197, 253, 0.2), rgba(59, 130, 246, 0.16));
    border-color: rgba(147, 197, 253, 0.35);
}
.lang-toggle {
    position: fixed;
    top: 66px;
    right: 16px;
    min-width: 48px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    border: 1px solid var(--card-border);
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.12), rgba(14, 165, 233, 0.12));
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.14);
    cursor: pointer;
    z-index: 29;
    font-size: 0.92rem;
    color: var(--text-main);
}
.theme-dark .lang-toggle {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.22), rgba(14, 165, 233, 0.18));
    border-color: rgba(147, 197, 253, 0.35);
    color: var(--text-main);
}
