/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-article: 'Source Serif 4', Georgia, serif;

    --color-bg: #faf9f6;
    --color-surface: #ffffff;
    --color-text: #1a1a1a;
    --color-text-secondary: #555;
    --color-text-muted: #888;
    --color-accent: #c0392b;
    --color-accent-hover: #a93226;
    --color-border: #e0ddd5;
    --color-border-light: #f0ede6;
    --color-highlight: #fef3e2;

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.1);

    --radius: 6px;
    --max-width: 1280px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
}

a { color: var(--color-text); text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* === Header === */
.site-header {
    background: var(--color-surface);
    border-bottom: 3px double var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    white-space: nowrap;
}
.logo-accent { color: var(--color-accent); }

.header-nav {
    display: flex;
    gap: 0.15rem;
    align-items: center;
    flex: 1;
}

.nav-link {
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    transition: all 0.15s;
    white-space: nowrap;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
.nav-link:hover {
    background: var(--color-highlight);
    color: var(--color-text);
}

/* Themen-Dropdown */
.nav-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.nav-dropdown summary {
    list-style: none;
    user-select: none;
    line-height: 1;
    margin: 0;
}
.nav-dropdown summary.nav-link {
    padding: 0.4rem 0.85rem;
}
.nav-dropdown summary::-webkit-details-marker { display: none; }
.nav-dropdown summary::marker { content: ""; }
.nav-caret {
    font-size: 0.75rem;
    opacity: 0.6;
    transition: transform 0.15s;
}
.nav-dropdown[open] .nav-caret { transform: rotate(180deg); }
.nav-dropdown[open] summary {
    background: var(--color-highlight);
    color: var(--color-text);
}
.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.4rem);
    left: 0;
    z-index: 200;
    min-width: 240px;
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 0.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    animation: dropdown-fade 0.15s ease-out;
}
@keyframes dropdown-fade {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}
.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    color: var(--color-text);
    text-decoration: none;
    transition: background 0.1s;
}
.nav-dropdown-item:hover {
    background: var(--color-highlight);
}
.nav-dropdown-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}
.nav-dropdown-sep {
    height: 1px;
    background: var(--color-border-light);
    margin: 0.35rem 0.5rem;
}
.nav-dropdown-item-secondary {
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    white-space: nowrap;
}

.user-badge {
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.25rem 0.6rem;
    background: var(--color-border-light);
    border-radius: 20px;
}

.logout-link {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}
.logout-link:hover { color: var(--color-accent); }

.header-date {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0.3rem 1.5rem 0.5rem;
    font-size: 0.78rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* === Main === */
.main-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1.5rem;
}

/* === Weather: Plain inline header element === */
.weather-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.4rem;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--color-text);
    line-height: 1;
    white-space: nowrap;
    transition: opacity 0.15s, transform 0.15s;
}
.weather-pill:hover {
    opacity: 0.7;
    transform: translateY(-1px);
}
.weather-pill-emoji { font-size: 1.4rem; }
.weather-pill-temp {
    font-family: var(--font-display);
    font-weight: 800;
}

/* === Weather: Dashboard page (.wx-*) === */
.wx {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    gap: 1.5rem;
    min-width: 0;
}
.wx-section, .wx-hero { min-width: 0; }
.wx-days-grid > *, .wx-hours > * { min-width: 0; }

/* Hero */
.wx-hero {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    color: #fff;
    box-shadow: var(--shadow-md);
    isolation: isolate;
}
.wx-hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}
.wx-day .wx-hero-bg {
    background:
        radial-gradient(circle at 20% 20%, rgba(255,255,255,0.35) 0%, transparent 45%),
        radial-gradient(circle at 80% 80%, rgba(255,221,138,0.4) 0%, transparent 50%),
        linear-gradient(135deg, #4a90c2 0%, #6db5e0 50%, #8ecae6 100%);
}
.wx-night .wx-hero-bg {
    background:
        radial-gradient(circle at 30% 30%, rgba(255,255,255,0.15) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(150,170,255,0.25) 0%, transparent 50%),
        linear-gradient(135deg, #1a2440 0%, #2c3e63 50%, #3f5184 100%);
}

.wx-hero-content {
    padding: 1.75rem 2rem 1rem;
}
.wx-hero-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.wx-hero-city {
    font-family: var(--font-display);
    font-size: 1.7rem;
    font-weight: 900;
    line-height: 1.05;
}
.wx-hero-region {
    font-size: 0.85rem;
    opacity: 0.78;
    margin-top: 0.2rem;
}
.wx-hero-clock { text-align: right; }
.wx-hero-clock-num {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1;
}
.wx-hero-clock-lbl {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.7;
    margin-top: 0.2rem;
}

.wx-hero-now {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.wx-hero-symbol {
    font-size: 6rem;
    line-height: 1;
    filter: drop-shadow(0 6px 14px rgba(0,0,0,0.25));
}
.wx-hero-temp-block { flex: 1; min-width: 200px; }
.wx-hero-temp {
    font-family: var(--font-display);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.02em;
    display: flex;
    align-items: flex-start;
    gap: 0.05em;
}
.wx-hero-temp-num {
    font-size: 6rem;
    line-height: 1;
}
.wx-hero-deg {
    font-family: var(--font-body);
    font-size: 3rem;
    font-weight: 300;
    opacity: 0.85;
    line-height: 1;
    margin-top: 0.5rem;
}
.wx-hero-desc {
    font-size: 1.2rem;
    opacity: 0.95;
    margin-top: 0.4rem;
}
.wx-hero-feels {
    font-size: 0.9rem;
    opacity: 0.78;
    margin-top: 0.2rem;
}

.wx-hero-stats {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 1rem 2rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.15);
    margin-top: 0.5rem;
}
.wx-stat-pill {
    display: inline-flex;
    align-items: baseline;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    background: rgba(255,255,255,0.18);
    backdrop-filter: blur(6px);
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 700;
}
.wx-stat-pill small {
    font-size: 0.72rem;
    font-weight: 500;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Sections */
.wx-section {
    background: var(--color-surface);
    border-radius: 12px;
    padding: 1.25rem 1.5rem 1.5rem;
    box-shadow: var(--shadow-sm);
}
.wx-section-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.9rem;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Hourly horizontal strip */
.wx-hours {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.25rem 0 0.5rem;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
}
.wx-hour {
    flex: 0 0 auto;
    text-align: center;
    padding: 0.85rem 0.6rem;
    border-radius: 12px;
    background: var(--color-bg);
    min-width: 78px;
    scroll-snap-align: start;
    transition: transform 0.15s;
}
.wx-hour:hover { transform: translateY(-2px); }
.wx-hour.is-now {
    background: linear-gradient(135deg, var(--color-accent), #e85a3c);
    color: #fff;
    box-shadow: 0 6px 18px rgba(192,57,43,0.35);
}
.wx-hour-time {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.85;
}
.wx-hour-symbol {
    font-size: 1.7rem;
    line-height: 1;
    margin: 0.45rem 0 0.3rem;
}
.wx-hour-temp {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 800;
}
.wx-hour-rain {
    font-size: 0.72rem;
    color: #1565c0;
    margin-top: 0.2rem;
    font-weight: 700;
    min-height: 0.95rem;
}
.wx-hour.is-now .wx-hour-rain { color: #fff; opacity: 0.9; }
.wx-rain-empty { color: transparent; }

/* 5-day grid */
.wx-days-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0.85rem;
}
@media (min-width: 800px) {
    .wx-days-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}
.wx-day-card {
    background: var(--color-bg);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    transition: transform 0.15s, box-shadow 0.15s;
    border: 1px solid transparent;
    min-width: 0;
    overflow: hidden;
}
.wx-day-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.wx-day-card.is-today {
    background: linear-gradient(160deg, #fef3e2 0%, #ffe6c8 100%);
    border-color: var(--color-accent);
    box-shadow: 0 4px 14px rgba(192,57,43,0.15);
}
.wx-day-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}
.wx-day-card-name strong {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 800;
}
.wx-day-card-date {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    font-weight: 600;
}
.wx-day-card-symbol {
    font-size: 3.2rem;
    line-height: 1;
    margin: 0.5rem 0 0.4rem;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.1));
}
.wx-day-card-desc {
    font-size: 0.82rem;
    color: var(--color-text-secondary);
    min-height: 1.2em;
    margin-bottom: 0.6rem;
}
.wx-day-card-temps {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
}
.wx-day-card-tmax {
    font-family: var(--font-body);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--color-text);
}
.wx-day-card-tmin {
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text-muted);
}
.wx-day-card-meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.72rem;
    color: var(--color-text-secondary);
    padding-top: 0.5rem;
    border-top: 1px dashed var(--color-border);
    word-break: break-word;
}
.wx-day-card-rain {
    color: #1565c0;
    font-weight: 700;
}

.wx-footer {
    text-align: center;
    font-size: 0.78rem;
    color: var(--color-text-muted);
    padding-top: 0.5rem;
}
.wx-footer a { color: var(--color-accent); }

@media (max-width: 720px) {
    .wx-hero-content { padding: 1.25rem 1.25rem 0.5rem; }
    .wx-hero-stats { padding: 0.85rem 1.25rem 1.25rem; }
    .wx-hero-symbol { font-size: 4.5rem; }
    .wx-hero-temp { font-size: 4.5rem; }
    .wx-hero-deg { font-size: 2.2rem; }
    .wx-hero-city { font-size: 1.3rem; }
    .wx-section { padding: 1rem 1.1rem 1.25rem; }
}

/* === Weather: Compact widget on home === */
.weather-compact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: linear-gradient(135deg, #f5f1e8 0%, #ece4d3 100%);
    border-radius: var(--radius);
    padding: 0.85rem 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.15s, transform 0.15s;
}
.weather-compact:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}
.weather-compact-main {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}
.weather-compact-emoji { font-size: 2.2rem; line-height: 1; }
.weather-compact-temp {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
}
.weather-compact-label {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin-top: 0.15rem;
}
.weather-compact-meta {
    text-align: right;
    font-size: 0.78rem;
    color: var(--color-text-muted);
    line-height: 1.45;
}
.weather-compact-loc { font-weight: 600; color: var(--color-text-secondary); }
.weather-compact-link {
    color: var(--color-accent);
    font-weight: 600;
    margin-top: 0.1rem;
}

/* === Weather: Dedicated page === */
.weather-page {
    max-width: 920px;
    margin: 0 auto;
}

.weather-hero {
    border-radius: 12px;
    padding: 1.75rem;
    color: #fff;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}
.weather-hero.is-day {
    background: linear-gradient(135deg, #4a90c2 0%, #6db5e0 50%, #8ecae6 100%);
}
.weather-hero.is-night {
    background: linear-gradient(135deg, #1f2a44 0%, #3a4a6f 50%, #5b6a8c 100%);
}
.weather-hero-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.weather-hero-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.weather-hero-pin { font-size: 1.2rem; }
.weather-hero-city {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1.1;
}
.weather-hero-region {
    font-size: 0.78rem;
    opacity: 0.8;
    margin-top: 0.15rem;
}
.weather-hero-time { text-align: right; }
.muted-light {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.7;
}
.weather-hero-clock {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
}

.weather-hero-main {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}
.weather-hero-emoji { font-size: 5rem; line-height: 1; }
.weather-hero-temp { font-family: var(--font-display); font-weight: 900; line-height: 1; }
.weather-hero-deg { font-size: 5rem; }
.weather-hero-unit { font-size: 2rem; opacity: 0.7; vertical-align: top; }
.weather-hero-label {
    font-size: 1.1rem;
    flex: 1;
    min-width: 180px;
}
.weather-hero-feels {
    font-size: 0.85rem;
    opacity: 0.85;
    margin-top: 0.25rem;
}

.weather-hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 0.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.18);
}
.weather-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    text-align: center;
}
.weather-stat-icon { font-size: 1.2rem; }
.weather-stat-val { font-weight: 700; font-size: 0.95rem; }
.weather-stat-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.8;
}

.weather-section { margin-bottom: 2rem; }
.weather-section-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--color-text);
}

/* Hourly strip */
.weather-hours-strip {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.25rem 0 0.75rem;
    scrollbar-width: thin;
    scroll-snap-type: x proximity;
}
.weather-hour-card {
    flex: 0 0 auto;
    text-align: center;
    padding: 0.7rem 0.6rem;
    border-radius: 10px;
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
    min-width: 72px;
    scroll-snap-align: start;
}
.weather-hour-card.is-now {
    background: var(--color-accent);
    color: #fff;
    box-shadow: 0 4px 14px rgba(192,57,43,0.3);
}
.weather-hour-card.is-now .weather-hour-pop { color: #fff; }
.weather-hour-card .weather-hour-time {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.85;
}
.weather-hour-card .weather-hour-emoji {
    font-size: 1.6rem;
    line-height: 1;
    margin: 0.4rem 0 0.2rem;
}
.weather-hour-card .weather-hour-temp {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
}
.weather-hour-card .weather-hour-pop {
    font-size: 0.7rem;
    color: #1565c0;
    margin-top: 0.2rem;
    font-weight: 600;
}

/* Daily list */
.weather-days-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.weather-day-row {
    display: grid;
    grid-template-columns: 110px 40px minmax(120px, 1fr) 110px 130px 90px;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--color-surface);
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    font-size: 0.9rem;
}
.weather-day-row.is-today {
    background: linear-gradient(90deg, #fef3e2 0%, var(--color-surface) 60%);
    border-left: 4px solid var(--color-accent);
    padding-left: calc(1rem - 4px);
}
.weather-day-row-name strong {
    display: block;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
}
.weather-day-row-name .muted { font-size: 0.78rem; }
.weather-day-row-emoji { font-size: 1.6rem; text-align: center; }
.weather-day-row-label { color: var(--color-text-secondary); }
.weather-day-row-rain {
    font-size: 0.85rem;
    color: #1565c0;
    font-weight: 600;
}
.weather-day-row-sun {
    font-size: 0.78rem;
    color: var(--color-text-muted);
}
.weather-day-row-temps {
    text-align: right;
    font-family: var(--font-display);
    font-weight: 700;
}
.weather-day-row-tmax { font-size: 1.1rem; }
.weather-day-row-tmin {
    color: var(--color-text-muted);
    margin-left: 0.5rem;
    font-size: 0.95rem;
    font-weight: 500;
}

.weather-footer-note {
    text-align: center;
    font-size: 0.78rem;
    color: var(--color-text-muted);
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border-light);
}
.weather-footer-note a { color: var(--color-accent); }

@media (max-width: 720px) {
    .weather-day-row {
        grid-template-columns: 90px 36px 1fr 80px;
        grid-template-areas:
            "name emoji label temps"
            "name emoji rain  temps"
            "sun  sun   sun   sun";
        gap: 0.4rem 0.75rem;
        padding: 0.75rem;
    }
    .weather-day-row-name { grid-area: name; }
    .weather-day-row-emoji { grid-area: emoji; }
    .weather-day-row-label { grid-area: label; font-size: 0.82rem; }
    .weather-day-row-rain { grid-area: rain; }
    .weather-day-row-sun { grid-area: sun; padding-top: 0.3rem; border-top: 1px dashed var(--color-border-light); }
    .weather-day-row-temps { grid-area: temps; }

    .weather-hero { padding: 1.25rem; }
    .weather-hero-deg { font-size: 3.5rem; }
    .weather-hero-emoji { font-size: 3.5rem; }
    .weather-compact-meta { text-align: left; }
}

/* === Edition Header === */
.edition-header {
    text-align: center;
    padding: 1.5rem 0;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.edition-date-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.edition-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent);
    font-weight: 600;
}

.edition-date {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
}

.edition-count {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    padding: 0.2rem 0.6rem;
    background: var(--color-border-light);
    border-radius: 20px;
}

/* === Topic Navigation Pills === */
.topic-nav-bar {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 0;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    scrollbar-width: none;
    border-bottom: 1px solid var(--color-border-light);
}
.topic-nav-bar::-webkit-scrollbar { display: none; }

.topic-pill {
    padding: 0.4rem 1rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.15s;
}
.topic-pill:hover {
    background: var(--color-accent);
    color: white;
    border-color: var(--color-accent);
}

/* === Topic Intro (LLM) === */
.topic-intro {
    background: linear-gradient(135deg, #fef3e2 0%, #fbe8d3 100%);
    border-left: 3px solid var(--color-accent);
    padding: 0.85rem 1.1rem;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin-bottom: 1.25rem;
}
.topic-intro-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-accent);
    font-weight: 700;
    margin-bottom: 0.3rem;
}
.topic-intro p {
    font-family: var(--font-article);
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--color-text);
    margin: 0;
}

.ai-badge {
    display: inline-block;
    font-size: 0.78em;
    color: var(--color-accent);
    margin-right: 0.15rem;
    vertical-align: baseline;
}

.user-badge-link {
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none;
}
.user-badge-link:hover {
    background: var(--color-highlight);
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    max-width: 480px;
}
.profile-form label {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-secondary);
}
.profile-form label.cb-row {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}
.profile-form input[type="email"] {
    padding: 0.55rem 0.8rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 0.95rem;
}
.profile-form input[type="email"]:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(192,57,43,0.1);
}

/* === Topic Section === */
.topic-section {
    margin-bottom: 3rem;
    scroll-margin-top: 5rem;
}

.topic-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 0.75rem;
    margin-bottom: 1.25rem;
    border-bottom: 2px solid var(--color-text);
}

.topic-icon { font-size: 1.4rem; }

.topic-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    flex: 1;
}

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

/* === Article Grid === */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

/* Hero card spans 2 columns */
.article-hero {
    grid-column: span 2;
    grid-row: span 2;
}

.article-card {
    background: var(--color-surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s, transform 0.2s;
    display: flex;
    flex-direction: column;
}
.article-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.article-image-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: var(--color-border-light);
}
.article-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.article-card:hover .article-image-wrap img {
    transform: scale(1.03);
}

.hero-image-wrap {
    aspect-ratio: 16 / 10;
}

.article-body {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-source {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-accent);
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.article-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 0.5rem;
}
.article-title a { transition: color 0.15s; }
.article-title a:hover { color: var(--color-accent); }

.article-hero .article-title {
    font-size: 1.5rem;
}

.article-summary {
    font-family: var(--font-article);
    font-size: 0.88rem;
    color: var(--color-text-secondary);
    line-height: 1.55;
    flex: 1;
}

.article-hero .article-summary {
    font-size: 0.95rem;
}

.article-time {
    font-size: 0.72rem;
    color: var(--color-text-muted);
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--color-border-light);
}

.no-articles {
    color: var(--color-text-muted);
    font-style: italic;
    padding: 2rem;
    text-align: center;
}

/* === Editions Archive === */
.editions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.edition-card {
    display: block;
    background: var(--color-surface);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--color-accent);
    transition: box-shadow 0.2s, transform 0.2s;
}
.edition-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.edition-card-date {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.edition-card-meta {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.82rem;
    color: var(--color-text-secondary);
    margin-bottom: 0.5rem;
}

.edition-card-created {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

/* === Page Header (Topic, Archive) === */
.page-header {
    text-align: center;
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--color-text);
}

.page-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 900;
}

.page-subtitle {
    color: var(--color-text-muted);
    margin-top: 0.5rem;
}

.topic-icon-large { font-size: 2.5rem; }

.topic-articles-grid {
    grid-template-columns: repeat(3, 1fr);
}
.topic-articles-grid .article-hero {
    grid-column: span 3;
}

/* === Empty State === */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    grid-column: 1 / -1;
}

.empty-state-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state h2 {
    font-family: var(--font-display);
    margin-bottom: 0.5rem;
}
.empty-state p {
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}
.empty-state-hint {
    font-size: 0.85rem;
    margin: 1rem 0;
}

/* === Badges === */
.badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.badge-active {
    background: #d4edda;
    color: #155724;
}
.badge-inactive {
    background: var(--color-border-light);
    color: var(--color-text-muted);
}

/* === Buttons === */
.btn {
    display: inline-block;
    padding: 0.65rem 1.5rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.15s;
    text-align: center;
}
.btn-primary {
    background: var(--color-accent);
    color: white;
}
.btn-primary:hover {
    background: var(--color-accent-hover);
}

/* === Login === */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f3ee 0%, #e8e4db 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 0.3rem;
}

.login-subtitle {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.login-form {
    background: var(--color-surface);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--color-text-secondary);
}

.form-group input {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: var(--font-body);
    transition: border-color 0.15s;
}
.form-group input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.1);
}

.login-form .btn {
    width: 100%;
    margin-top: 0.5rem;
}

.login-divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}
.login-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--color-border);
}
.login-divider span {
    background: var(--color-bg);
    padding: 0 1rem;
    position: relative;
    font-size: 0.82rem;
    color: var(--color-text-muted);
}

.btn-oidc {
    display: block;
    width: 100%;
    padding: 0.65rem 1.5rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    transition: all 0.15s;
}
.btn-oidc:hover {
    background: var(--color-border-light);
    border-color: var(--color-text-muted);
}

/* === Alerts === */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}
.alert-error {
    background: #fce4e4;
    color: #a93226;
    border: 1px solid #f5c6cb;
}

/* === Footer === */
.site-footer {
    margin-top: 3rem;
    padding: 2rem 1.5rem;
    border-top: 3px double var(--color-border);
    text-align: center;
}
.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}
.site-footer p {
    font-size: 0.82rem;
    color: var(--color-text-muted);
}
.footer-meta { margin-top: 0.5rem; }

/* === Admin === */
.nav-link-admin {
    background: var(--color-text);
    color: white !important;
}
.nav-link-admin:hover {
    background: var(--color-accent) !important;
    color: white !important;
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.stat-card {
    background: var(--color-surface);
    padding: 1.25rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    text-align: center;
    border-top: 3px solid var(--color-accent);
}
.stat-num {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 900;
    color: var(--color-text);
}
.stat-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
    margin-top: 0.3rem;
}

.admin-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.admin-action-card {
    background: var(--color-surface);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s, transform 0.2s;
    display: block;
}
.admin-action-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.admin-action-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}
.admin-action-card h3 {
    font-family: var(--font-display);
    margin-bottom: 0.4rem;
}
.admin-action-card p {
    font-size: 0.88rem;
    color: var(--color-text-secondary);
}

.admin-quick-actions {
    background: var(--color-surface);
    padding: 1.25rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.admin-quick-actions h3 {
    font-family: var(--font-display);
    margin-bottom: 0.75rem;
}
.quick-action-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.admin-section {
    background: var(--color-surface);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
}
.admin-section h2 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border-light);
}
.admin-section h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    margin: 1rem 0 0.5rem;
}

.inline-form {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}
.inline-form input,
.inline-form select {
    padding: 0.45rem 0.7rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 0.88rem;
    flex: 1;
    min-width: 140px;
}
.inline-form .cb {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.85rem;
    white-space: nowrap;
}

.user-card,
.source-card {
    background: var(--color-bg);
    padding: 0.85rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    border-left: 3px solid var(--color-border);
}
.user-card-header,
.source-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.user-card-meta {
    font-size: 0.82rem;
    color: var(--color-text-muted);
}
.source-card-url {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    margin: 0.25rem 0;
    overflow-wrap: break-word;
}
.source-card-url code {
    background: var(--color-border-light);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    font-size: 0.78rem;
}

details summary {
    cursor: pointer;
    color: var(--color-accent);
    font-size: 0.85rem;
    margin-top: 0.5rem;
    user-select: none;
}
details[open] summary { margin-bottom: 0.5rem; }

.add-source-summary {
    display: inline-block;
    padding: 0.5rem 0.85rem;
    background: var(--color-highlight);
    border-radius: var(--radius);
    margin-top: 0.75rem;
    font-weight: 600;
}

.subs-form { margin-top: 1rem; padding-top: 0.75rem; border-top: 1px dashed var(--color-border); }
.subs-form h4 { font-size: 0.95rem; margin-bottom: 0.5rem; }

.topic-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}
.topic-cb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.7rem;
    background: var(--color-bg);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.88rem;
    border: 1px solid transparent;
    transition: all 0.15s;
}
.topic-cb:hover { border-color: var(--color-border); }
.topic-cb input:checked + span { font-weight: 600; }

.source-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: var(--color-bg);
    border-radius: var(--radius);
}
.source-form label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-text-secondary);
}
.source-form label.cb {
    flex-direction: row;
    align-items: center;
    gap: 0.4rem;
}
.source-form input,
.source-form select,
.source-form textarea {
    padding: 0.45rem 0.7rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 400;
}
.source-form textarea {
    font-family: ui-monospace, monospace;
    font-size: 0.8rem;
}
.form-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.form-row label { flex: 1; min-width: 120px; }

.topic-block-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.icon-picker-wrap {
    display: inline-flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 180px;
}
.icon-picker-input {
    width: 80px !important;
    flex: 0 0 auto !important;
    text-align: center;
    font-size: 1.2rem !important;
}
.icon-picker-details {
    position: relative;
}
.icon-picker-details summary {
    font-size: 0.78rem;
    color: var(--color-accent);
    cursor: pointer;
    user-select: none;
    margin-top: 0;
}
.icon-picker-groups {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 50;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 0.85rem;
    width: 360px;
    max-height: 380px;
    overflow-y: auto;
    margin-top: 0.3rem;
}
.icon-group {
    margin-bottom: 0.85rem;
}
.icon-group:last-child { margin-bottom: 0; }
.icon-group-title {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
    margin-bottom: 0.35rem;
    font-weight: 600;
}
.icon-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 0.25rem;
}
.icon-btn {
    background: var(--color-bg);
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 0.35rem;
    font-size: 1.15rem;
    cursor: pointer;
    line-height: 1;
    transition: all 0.1s;
}
.icon-btn:hover {
    background: var(--color-highlight);
    border-color: var(--color-accent);
    transform: scale(1.15);
}

.btn-secondary {
    background: var(--color-text);
    color: white;
}
.btn-secondary:hover { background: var(--color-text-secondary); }

.btn-danger {
    background: #c0392b;
    color: white;
}
.btn-danger:hover { background: #962d22; }

.btn-sm {
    padding: 0.4rem 0.85rem;
    font-size: 0.82rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 0.7rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.muted { color: var(--color-text-muted); font-size: 0.88rem; }
.text-error { color: #c0392b; font-weight: 600; }

/* Activity page */
.activity-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.activity-toolbar h2 { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }

.run-summary-box {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.run-summary-stat {
    text-align: center;
    padding: 0.75rem;
    background: var(--color-bg);
    border-radius: var(--radius);
    border-left: 3px solid var(--color-accent);
}
.run-summary-stat .num {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
}
.run-summary-stat .num.small {
    font-size: 0.85rem;
    font-family: var(--font-body);
    font-weight: 600;
}
.run-summary-stat .lbl {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
    margin-top: 0.2rem;
}

.run-status {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 20px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}
.run-status-running { background: #fff3cd; color: #856404; animation: pulse 1.5s ease-in-out infinite; }
.run-status-done,
.run-status-ok { background: #d4edda; color: #155724; }
.run-status-partial { background: #fff3cd; color: #856404; }
.run-status-error { background: #fce4e4; color: #a93226; }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.log-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}
.log-table th,
.log-table td {
    padding: 0.5rem 0.6rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border-light);
}
.log-table th {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
    background: var(--color-bg);
}
.log-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.log-row-error { background: #fef5f4; }
.log-row-running td { font-style: italic; }

.error-pre {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #2d2d2d;
    color: #f5f5f5;
    border-radius: 4px;
    font-size: 0.78rem;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 200px;
    overflow-y: auto;
}

.run-history details.run-item {
    background: var(--color-bg);
    margin-bottom: 0.5rem;
    padding: 0.6rem 0.85rem;
    border-radius: var(--radius);
    border-left: 3px solid var(--color-border);
}
.run-history details.run-item summary {
    margin-top: 0;
    color: var(--color-text);
    font-size: 0.9rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}
.run-history .run-summary {
    margin-left: auto;
    font-size: 0.82rem;
    color: var(--color-text-secondary);
}

/* === Article Modal === */
.article-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem 1rem;
    overflow-y: auto;
}
.article-modal.open { display: flex; }

.article-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(20, 18, 14, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    cursor: pointer;
    animation: fadeIn 0.2s ease-out;
}

.article-modal-window {
    position: relative;
    width: 100%;
    max-width: 800px;
    background: var(--color-surface);
    border-radius: 10px;
    box-shadow: 0 25px 80px rgba(0,0,0,0.4);
    margin: auto;
    animation: modalSlideUp 0.25s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.article-modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.15s;
}
.article-modal-close:hover {
    background: var(--color-accent);
    color: white;
    transform: rotate(90deg);
}

.article-modal-content {
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
    border-radius: 10px;
}

.article-modal-loading,
.article-modal-error {
    padding: 4rem 2rem;
    text-align: center;
    color: var(--color-text-muted);
    font-style: italic;
}

/* Article Full View === */
.article-full-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--color-border-light);
    border-radius: 10px 10px 0 0;
}
.article-full-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-full-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 1.5rem 2rem 0.5rem;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.article-full-topic {
    font-weight: 600;
    color: var(--color-text-secondary);
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.85rem;
}

.article-full-source {
    color: var(--color-accent);
    font-weight: 700;
}

.article-full-time {
    color: var(--color-text-muted);
}

.article-full-translated {
    background: #e3f2fd;
    color: #1565c0;
    padding: 0.15rem 0.55rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
}

.article-full-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 900;
    line-height: 1.2;
    padding: 0.5rem 2rem 0.25rem;
    color: var(--color-text);
}

.article-full-author {
    padding: 0 2rem 0.5rem;
    color: var(--color-text-muted);
    font-style: italic;
    font-size: 0.9rem;
}

.article-full-llm-summary {
    margin: 1rem 2rem;
    padding: 1rem 1.25rem;
    background: var(--color-highlight);
    border-left: 3px solid var(--color-accent);
    border-radius: 4px;
}
.llm-summary-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-accent);
    display: block;
    margin-bottom: 0.4rem;
}
.article-full-llm-summary p {
    font-family: var(--font-article);
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--color-text);
}

.article-full-content {
    padding: 1rem 2rem 1.5rem;
    font-family: var(--font-article);
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--color-text);
}
.article-full-content p {
    margin-bottom: 1rem;
}
.article-inline-figure {
    margin: 1.25rem 0;
    text-align: center;
}
.article-inline-figure img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: var(--shadow-sm);
    display: inline-block;
}
.article-inline-figure figcaption {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    font-style: italic;
    margin-top: 0.4rem;
    line-height: 1.4;
}

.article-full-content h3,
.article-full-content h4,
.article-full-content h5 {
    font-family: var(--font-display);
    font-weight: 700;
    margin: 1.5rem 0 0.5rem;
    line-height: 1.3;
}
.article-full-content h3 { font-size: 1.4rem; }
.article-full-content h4 { font-size: 1.2rem; }
.article-full-content h5 { font-size: 1.05rem; }

.article-full-content p:first-of-type::first-letter {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 900;
    float: left;
    line-height: 1;
    padding: 0.2rem 0.6rem 0 0;
    color: var(--color-accent);
}
.article-full-notice {
    color: var(--color-text-muted);
    font-style: italic;
    font-size: 0.9rem;
}

.article-full-footer {
    padding: 1rem 2rem 1.5rem;
    border-top: 1px solid var(--color-border-light);
    text-align: center;
}

/* Article cards: clickable cursor */
.article-card[data-article-id],
.article-card a[data-article-id] {
    cursor: pointer;
}

/* === Responsive === */
@media (max-width: 900px) {
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .article-hero {
        grid-column: span 2;
        grid-row: span 1;
    }
    .topic-articles-grid .article-hero {
        grid-column: span 2;
    }
    .header-nav {
        display: none;
    }
}

@media (max-width: 600px) {
    html { font-size: 15px; }

    .articles-grid,
    .topic-articles-grid {
        grid-template-columns: 1fr;
    }
    .article-hero,
    .topic-articles-grid .article-hero {
        grid-column: span 1;
    }
    .header-inner {
        padding: 0.5rem 1rem;
    }
    .main-content {
        padding: 1rem;
    }
    .edition-date { font-size: 1.3rem; }
    .edition-date-banner { flex-direction: column; gap: 0.25rem; }
}
