:root {
    --nf-bg: #eef5f7;
    --nf-bg-alt: #f7fbfc;
    --nf-surface: #ffffff;
    --nf-surface-strong: #f8fcfd;
    --nf-text-primary: #12343b;
    --nf-text-secondary: #43646d;
    --nf-text-muted: #688790;
    --nf-accent: #0e8a91;
    --nf-accent-strong: #0b6f84;
    --nf-accent-soft: #dff4f6;
    --nf-accent-glow: rgba(14, 138, 145, 0.12);
    --nf-blue: #1d6fa3;
    --nf-border: rgba(18, 52, 59, 0.1);
    --nf-border-strong: rgba(14, 138, 145, 0.18);
    --nf-danger: #d9485f;
    --nf-success: #1f8f71;
    --nf-radius-xl: 28px;
    --nf-radius-lg: 22px;
    --nf-radius: 18px;
    --nf-radius-sm: 12px;
    --nf-shadow-sm: 0 8px 18px rgba(16, 54, 65, 0.06);
    --nf-shadow: 0 20px 45px rgba(11, 70, 83, 0.12);
    --nf-shadow-hover: 0 26px 54px rgba(11, 70, 83, 0.18);
    --nf-transition: 180ms ease;
    --nf-max-width: 1660px;
    --nf-shell-gutter: clamp(16px, 2.4vw, 40px);
    --nf-main-gutter: clamp(18px, 1.8vw, 28px);
    --nf-hero-gradient: linear-gradient(135deg, #0d6477 0%, #0d8d8a 42%, #1d6fa3 100%);
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding-top: 70px; /* Space for fixed header */
    font-family: 'Inter', 'Segoe UI', sans-serif;
    color: var(--nf-text-primary);
    background:
        radial-gradient(circle at top left, rgba(29, 111, 163, 0.08), transparent 32%),
        radial-gradient(circle at top right, rgba(14, 138, 145, 0.08), transparent 28%),
        linear-gradient(180deg, #f3f6f8 0%, #f3f6f8 100%);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

button,
input {
    font: inherit;
}

.panel-kicker,
.newsfeed-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.newsfeed-hero {
    padding: 48px var(--nf-shell-gutter) 40px;
    background: linear-gradient(160deg, #f3f6f8 0%, rgba(224, 242, 241, 0.52) 50%, #ffffff 100%);
    border-bottom: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
}

.newsfeed-hero-content {
    max-width: var(--nf-max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(340px, 0.9fr);
    align-items: stretch;
    gap: clamp(22px, 2.4vw, 34px);
    position: relative;
    z-index: 1;
}

.newsfeed-hero-left {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.newsfeed-hero-right {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 20px;
    align-items: stretch;
    flex-shrink: 0;
    min-width: 0;
    padding: clamp(18px, 1.5vw, 24px);
    border-radius: var(--nf-radius-xl);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(240, 250, 250, 0.88));
    border: 1px solid rgba(14, 111, 111, 0.14);
    box-shadow: var(--nf-shadow-sm);
}

.newsfeed-eyebrow {
    color: #0e6f6f;
    margin-bottom: 10px;
}

.newsfeed-hero-text {
    display: grid;
    gap: 18px;
}

.newsfeed-hero-text h1 {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    color: #1e293b;
}

.newsfeed-greeting {
    font-size: 16px;
    font-weight: 450;
    color: #64748b;
}

.newsfeed-brand {
    font-size: clamp(2rem, 3.2vw, 3.35rem);
    line-height: 0.96;
    font-weight: 900;
    letter-spacing: -0.04em;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.discover-tag {
    display: inline-flex;
    align-items: center;
    min-height: auto;
    padding: 0.16em 0.44em;
    border-radius: 999px;
    background: rgba(14, 111, 111, 0.08);
    border: 1px solid rgba(14, 111, 111, 0.2);
    color: #0e6f6f;
    font-size: 0.56em;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.newsfeed-subtitle {
    max-width: 68ch;
    margin: 12px 0 0;
    color: #0e6f6f;
    font-size: 15px;
}

.newsfeed-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 0;
}

.newsfeed-status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(14, 111, 111, 0.06);
    border: 1px solid rgba(14, 111, 111, 0.18);
    color: #0e6f6f;
    font-size: 12px;
    font-weight: 600;
}

.newsfeed-status-pill.subtle {
    background: rgba(14, 111, 111, 0.04);
}

.newsfeed-status-pill.error {
    background: rgba(217, 72, 95, 0.08);
    border-color: rgba(217, 72, 95, 0.2);
    color: #d9485f;
}

.newsfeed-status-pill.is-refreshing {
    background: rgba(14, 138, 145, 0.08);
    border-color: rgba(14, 138, 145, 0.22);
    color: #0e8a91;
}

.newsfeed-status-pill.is-refreshing::before {
    content: '';
    flex-shrink: 0;
    width: 10px;
    height: 10px;
    margin-right: 7px;
    border-radius: 50%;
    border: 2px solid rgba(14, 138, 145, 0.25);
    border-top-color: #0e8a91;
    animation: spin 0.75s linear infinite;
}

.newsfeed-hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    justify-content: stretch;
}

.hero-stat {
    text-align: left;
    min-width: 0;
    padding: 14px 12px 13px;
    border-radius: 20px;
    background: rgba(14, 138, 145, 0.06);
    border: 1px solid rgba(14, 138, 145, 0.12);
}

.hero-stat-value {
    display: block;
    font-size: clamp(1.45rem, 1.15vw, 1.85rem);
    font-weight: 900;
    color: #0e6f6f;
    letter-spacing: -0.02em;
}

.hero-stat-label {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #0e6f6f;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.newsfeed-hero-actions-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
}

.newsfeed-hero-right .newsfeed-hero-stats {
    width: 100%;
}

.newsfeed-hero-right .hero-stat {
    min-width: 0;
}

.newsfeed-hero-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.newsfeed-hero-actions-wrap .newsfeed-hero-meta {
    justify-content: flex-start;
}

.newsfeed-search-copy {
    max-width: var(--nf-max-width);
    margin: 28px auto 0;
    display: grid;
    gap: 20px;
}

.newsfeed-search-copy__intro,
.newsfeed-copy-card,
.newsfeed-faq-grid {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--nf-border);
    border-radius: var(--nf-radius-lg);
    box-shadow: var(--nf-shadow-sm);
}

.newsfeed-search-copy__intro {
    padding: 24px 26px;
}

.newsfeed-search-copy__intro h2,
.newsfeed-faq-grid__header h2 {
    margin: 10px 0 12px;
    font-size: clamp(1.55rem, 2.5vw, 2rem);
    line-height: 1.15;
    color: var(--nf-text-primary);
}

.newsfeed-search-copy__intro p,
.newsfeed-copy-card p,
.newsfeed-faq-card p {
    margin: 0;
    color: var(--nf-text-secondary);
    font-size: 14px;
    line-height: 1.7;
}

.newsfeed-search-copy__grid,
.newsfeed-faq-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.newsfeed-copy-card,
.newsfeed-faq-card {
    padding: 22px;
}

.newsfeed-copy-card h3,
.newsfeed-faq-card h3 {
    margin: 0 0 12px;
    font-size: 16px;
    line-height: 1.35;
    color: var(--nf-text-primary);
}

.newsfeed-copy-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}

.newsfeed-copy-card li {
    position: relative;
    padding-left: 18px;
    color: var(--nf-text-secondary);
    font-size: 14px;
    line-height: 1.55;
}

.newsfeed-copy-card li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 9px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--nf-accent);
}

.newsfeed-copy-card--links {
    background: linear-gradient(160deg, rgba(223, 244, 246, 0.76), #ffffff 74%);
}

.newsfeed-copy-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.newsfeed-copy-links a,
.newsfeed-faq-card a {
    color: var(--nf-accent-strong);
}

.newsfeed-copy-links a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 15px;
    border-radius: 999px;
    text-decoration: none;
    background: rgba(14, 138, 145, 0.08);
    border: 1px solid rgba(14, 138, 145, 0.16);
    font-size: 13px;
    font-weight: 700;
}

.newsfeed-faq-grid {
    padding: 24px 26px 26px;
}

.newsfeed-faq-grid__header {
    grid-column: 1 / -1;
}

.newsfeed-faq-card {
    border: 1px solid var(--nf-border);
    border-radius: var(--nf-radius);
    background: #f8fbfc;
}

.newsfeed-hero-actions-wrap .newsfeed-status-pill {
    min-height: 34px;
    padding: 8px 14px;
    font-size: 12px;
}

.newsfeed-pref-btn,
.newsfeed-refresh-btn,
.quick-action-chip,
.story-primary-action,
.story-secondary-action,
.stream-load-more,
.rail-chip,
.spotlight-chip,
.rail-list-item,
.saved-story-link,
.saved-story-remove,
.story-inline-save,
.spotlight-list-item {
    border: none;
    cursor: pointer;
    transition: transform var(--nf-transition), box-shadow var(--nf-transition), background-color var(--nf-transition), color var(--nf-transition), border-color var(--nf-transition), opacity var(--nf-transition);
}

.newsfeed-pref-btn,
.newsfeed-refresh-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    color: #0e6f6f;
    background: rgba(255, 255, 255, 0.94);
    border: 1.5px solid rgba(0, 139, 139, 0.2);
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

.newsfeed-pref-btn:hover,
.newsfeed-refresh-btn:hover {
    transform: translateY(-2px);
    background: rgba(224, 242, 241, 0.68);
    border-color: rgba(0, 139, 139, 0.38);
    box-shadow: 0 14px 28px rgba(0, 139, 139, 0.14);
}

.newsfeed-refresh-btn:disabled {
    opacity: 0.82;
    cursor: wait;
}

.newsfeed-refresh-btn.is-loading svg {
    animation: spin 0.8s linear infinite;
}

.newsfeed-search-shell {
    position: relative;
    z-index: 3;
    margin-top: 0;
    padding-top: 26px;
}

.newsfeed-search-container {
    max-width: var(--nf-max-width);
    margin: 0 auto;
    padding: 0 var(--nf-main-gutter);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px 18px;
    align-items: center;
}

.newsfeed-search-bar {
    flex: 1 1 520px;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 62px;
    padding: 0 20px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: var(--nf-shadow);
    backdrop-filter: blur(14px);
}

.newsfeed-search-bar:focus-within {
    border-color: rgba(14, 138, 145, 0.25);
    box-shadow: var(--nf-shadow), 0 0 0 4px rgba(14, 138, 145, 0.08);
}

.newsfeed-search-bar svg {
    color: var(--nf-text-muted);
    flex-shrink: 0;
}

.newsfeed-search-bar input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    font-size: 15px;
    color: var(--nf-text-primary);
}

.newsfeed-search-bar input::placeholder {
    color: #8aa2aa;
}

.newsfeed-search-clear {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--nf-accent-soft);
    color: var(--nf-accent-strong);
    font-size: 20px;
}

.newsfeed-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: flex-end;
}

.quick-action-chip {
    min-height: 44px;
    padding: 0 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--nf-accent-strong);
    border: 1px solid rgba(0, 139, 139, 0.16);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
    font-size: 13px;
    font-weight: 700;
}

.quick-action-chip:hover {
    transform: translateY(-2px);
    background: rgba(224, 242, 241, 0.68);
    border-color: rgba(0, 139, 139, 0.34);
    box-shadow: 0 14px 28px rgba(0, 139, 139, 0.14);
}

.newsfeed-categories-strip {
    max-width: var(--nf-max-width);
    margin: 20px auto 0;
    padding: 0 var(--nf-main-gutter);
}

.categories-scroll {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 0 6px;
}

.categories-ticker {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    mask-image: linear-gradient(to right, transparent, black 4%, black 96%, transparent);
}

.categories-track {
    display: flex;
    align-items: center;
    gap: 10px;
    width: max-content;
    padding-right: 10px;
    flex-shrink: 0;
    animation: categories-ticker 38s linear infinite;
}

.categories-scroll:hover .categories-track {
    animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
    .categories-track {
        animation: none;
    }
}

@keyframes categories-ticker {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(calc(-100% - 10px));
    }
}

.category-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid var(--nf-border);
    background: rgba(255, 255, 255, 0.85);
    color: var(--nf-text-secondary);
    box-shadow: var(--nf-shadow-sm);
    white-space: nowrap;
    font-size: 13px;
    font-weight: 600;
}

.category-pill--fixed {
    flex: 0 0 auto;
    position: relative;
    z-index: 2;
}

.category-pill:hover {
    color: var(--nf-accent-strong);
    border-color: rgba(0, 139, 139, 0.32);
    background: rgba(224, 242, 241, 0.62);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 139, 139, 0.12);
}

.category-pill.active {
    background: linear-gradient(135deg, #008B8B, #20B2AA);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 12px 24px rgba(0, 139, 139, 0.2);
}

.pill-icon {
    font-size: 14px;
}

.newsfeed-main {
    max-width: var(--nf-max-width);
    margin: 0 auto;
    padding: 32px var(--nf-main-gutter) 72px;
}

.section-header,
.panel-header,
.rail-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.section-header h2,
.panel-header h2,
.rail-card-header h3 {
    margin: 6px 0 0;
    font-size: 1.45rem;
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.panel-header.compact h2,
.rail-card-header h3 {
    font-size: 1.1rem;
}

.section-meta {
    color: var(--nf-text-muted);
    font-size: 13px;
    font-weight: 600;
}

.newsfeed-briefing {
    display: grid;
    gap: 28px;
}

.briefing-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr) minmax(280px, 0.9fr);
    gap: clamp(18px, 1.8vw, 28px);
    align-items: stretch;
}

.lead-story-card,
.briefing-panel,
.spotlight-card,
.rail-card,
.stream-card {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.75);
    box-shadow: var(--nf-shadow-sm);
}

.lead-story-card,
.briefing-panel,
.spotlight-card,
.rail-card {
    border-radius: var(--nf-radius-xl);
    overflow: hidden;
}

.lead-story-card {
    position: relative;
    display: grid;
    grid-template-rows: auto auto;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.08));
}

.lead-story-column {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.lead-story-card--compact .lead-story-media {
    min-height: clamp(100px, 12vw, 140px);
    max-height: 140px;
}

.lead-story-card--compact .lead-story-media.no-image {
    min-height: clamp(80px, 10vw, 120px);
    max-height: 120px;
}

.lead-story-card--compact .lead-story-body {
    padding: 22px;
    gap: 10px;
}

.lead-story-card--compact .lead-story-title {
    font-size: clamp(1.15rem, 1.5vw, 1.5rem);
}

.lead-story-media {
    position: relative;
    min-height: clamp(168px, 20vw, 220px);
    max-height: 220px;
}

.lead-story-media.no-image {
    min-height: clamp(148px, 18vw, 190px);
    max-height: 190px;
}

.lead-story-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(7, 34, 44, 0.08) 65%, rgba(7, 34, 44, 0.2) 100%);
    pointer-events: none;
}

.story-image-wrap,
.story-image-placeholder,
.story-image {
    width: 100%;
    height: 100%;
}

.story-image-wrap {
    position: relative;
    overflow: hidden;
    background: rgba(14, 138, 145, 0.08);
    height: auto;
}

.story-image-wrap.lead {
    height: 100%;
    min-height: inherit;
    max-height: inherit;
}

.story-image-wrap.lead.no-image {
    min-height: inherit;
    max-height: inherit;
}

.story-image {
    display: block;
    object-fit: cover;
}

.story-image-wrap.highlight,
.story-image-wrap.secondary,
.story-image-wrap.spotlight,
.story-image-wrap.stream,
.story-image-wrap.saved {
    border-radius: 16px;
    flex-shrink: 0;
}

.story-image-wrap.highlight {
    width: 104px;
    aspect-ratio: 1;
}

.story-image-wrap.secondary {
    width: 92px;
    aspect-ratio: 1;
}

.story-image-wrap.spotlight {
    width: 104px;
    aspect-ratio: 1;
}

.story-image-wrap.stream {
    width: 100%;
    min-height: 0;
    aspect-ratio: 4 / 3;
    align-self: center;
    justify-self: stretch;
}

.story-image-wrap.saved {
    width: 72px;
    aspect-ratio: 1;
}

.story-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.9);
}

.story-image-placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.22), transparent 22%),
        radial-gradient(circle at 80% 75%, rgba(255, 255, 255, 0.18), transparent 18%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent);
}

.story-image-placeholder[data-category="breaking"] { background: linear-gradient(135deg, #0d6b7f, #0e8a91 56%, #3284b1); }
.story-image-placeholder[data-category="research"] { background: linear-gradient(135deg, #1d6fa3, #0e8a91 60%, #76c7d1); }
.story-image-placeholder[data-category="technology"] { background: linear-gradient(135deg, #0c5c79, #206da7 56%, #0e8a91); }
.story-image-placeholder[data-category="ai_in_medicine"] { background: linear-gradient(135deg, #24689d, #0c7c93 50%, #12a4aa); }
.story-image-placeholder[data-category="bioengineering"] { background: linear-gradient(135deg, #0f7083, #0e8a91 55%, #49a6c8); }
.story-image-placeholder[data-category="public_health"] { background: linear-gradient(135deg, #19779b, #12a1a4 62%, #82d2cf); }
.story-image-placeholder[data-category="pharma"] { background: linear-gradient(135deg, #0c6b87, #2b78ad 58%, #70bfd2); }
.story-image-placeholder[data-category="clinical_trials"] { background: linear-gradient(135deg, #0d6980, #198aa0 52%, #5eb4c6); }
.story-image-placeholder[data-category="medical_education"] { background: linear-gradient(135deg, #1d6fa3, #10969b 50%, #6dcbd3); }
.story-image-placeholder[data-category="surgery"] { background: linear-gradient(135deg, #0d6477, #1d6fa3 56%, #12a1a4); }
.story-image-placeholder[data-category="cardiology"] { background: linear-gradient(135deg, #1a679f, #0e8a91 50%, #59bbcf); }
.story-image-placeholder[data-category="neurology"] { background: linear-gradient(135deg, #0d6f8a, #317cad 58%, #88d0d7); }
.story-image-placeholder[data-category="oncology"] { background: linear-gradient(135deg, #175f86, #0e8a91 54%, #2f86b3); }
.story-image-placeholder[data-category="pediatrics"] { background: linear-gradient(135deg, #1a76a5, #0ea39c 52%, #9ed9de); }
.story-image-placeholder[data-category="mental_health"] { background: linear-gradient(135deg, #1f6da1, #0f8b97 60%, #70c9d1); }
.story-image-placeholder[data-category="global_health"] { background: linear-gradient(135deg, #24689d, #0f7e95 56%, #4eb3c8); }

.placeholder-emoji {
    position: relative;
    z-index: 1;
    font-size: 54px;
    filter: drop-shadow(0 10px 20px rgba(4, 38, 46, 0.24));
}

.story-image-wrap.highlight .placeholder-emoji,
.story-image-wrap.spotlight .placeholder-emoji,
.story-image-wrap.stream .placeholder-emoji {
    font-size: 34px;
}

.story-image-wrap.secondary .placeholder-emoji,
.story-image-wrap.saved .placeholder-emoji {
    font-size: 28px;
}

.lead-story-badges {
    position: absolute;
    top: 18px;
    left: 18px;
    right: 18px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    z-index: 2;
}

.story-badge,
.story-tag {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.story-badge.breaking,
.story-tag.breaking {
    background: rgba(217, 72, 95, 0.92);
    color: #ffffff;
}

.story-badge.category,
.story-tag {
    background: rgba(255, 255, 255, 0.88);
    color: var(--nf-accent-strong);
}

.lead-story-body {
    display: grid;
    align-content: start;
    gap: 14px;
    padding: 28px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), #ffffff);
}

.story-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    color: var(--nf-text-muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.story-meta-row.compact {
    font-size: 11px;
    letter-spacing: 0.06em;
}

.lead-story-title {
    margin: 0;
    font-size: clamp(1.55rem, 1.95vw, 2.2rem);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.lead-story-extra {
    margin: -4px 0 0;
    color: var(--nf-text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

.lead-story-title:hover,
.lead-story-title:focus-visible {
    color: var(--nf-accent-strong);
    outline: none;
}

.lead-story-desc,
.highlight-card p,
.stream-card-desc,
.spotlight-feature p,
.panel-empty,
.rail-empty {
    margin: 0;
    color: var(--nf-text-secondary);
    font-size: 14px;
}

.story-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.story-primary-action,
.stream-load-more {
    min-height: 48px;
    padding: 0 20px;
    border-radius: 999px;
    background: linear-gradient(135deg, #008B8B, #20B2AA);
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(0, 139, 139, 0.22);
    font-weight: 700;
}

.story-primary-action:hover,
.stream-load-more:hover {
    background: linear-gradient(135deg, #0e6f6f, #008B8B);
    transform: translateY(-2px);
    box-shadow: 0 18px 30px rgba(0, 139, 139, 0.28);
}

.story-secondary-action,
.story-inline-save,
.saved-story-remove {
    min-height: 44px;
    padding: 0 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--nf-accent-strong);
    font-weight: 700;
    border: 1px solid rgba(0, 139, 139, 0.18);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

.story-secondary-action:hover,
.story-inline-save:hover,
.saved-story-remove:hover {
    transform: translateY(-2px);
    background: rgba(224, 242, 241, 0.68);
    border-color: rgba(0, 139, 139, 0.34);
    box-shadow: 0 14px 28px rgba(0, 139, 139, 0.14);
}

.briefing-panel {
    display: grid;
    align-content: start;
    gap: 18px;
    padding: 24px;
}

.highlights-panel {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(240, 250, 250, 0.92));
}

/* Education & Exams — standalone shell section */
.education-shell {
    display: grid;
    gap: 16px;
}

.education-stories {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
    min-height: 110px;
    align-content: start;
}

.education-card {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 14px;
    align-items: stretch;
    padding: 14px 16px;
    border-radius: var(--nf-radius-xl);
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(14, 138, 145, 0.10);
    box-shadow: var(--nf-shadow-sm);
    cursor: pointer;
    transition: transform var(--nf-transition), box-shadow var(--nf-transition), background-color var(--nf-transition);
}

.education-card:hover,
.education-card:focus-visible {
    transform: translateY(-2px);
    background: rgba(240, 250, 250, 0.98);
    box-shadow: 0 4px 18px rgba(14, 138, 145, 0.13);
    outline: none;
}

.education-card-rail {
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 12px;
    align-items: start;
    justify-items: stretch;
    padding: 4px 0;
}

.education-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 16px;
    font-size: 1.3rem;
    line-height: 1;
    background: linear-gradient(180deg, rgba(14, 138, 145, 0.12), rgba(29, 111, 163, 0.1));
    border: 1px solid rgba(14, 138, 145, 0.16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.education-card-body {
    display: grid;
    align-content: start;
    gap: 8px;
    min-width: 0;
    padding-top: 2px;
}

.education-card-actions,
.highlight-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 2px;
}

.education-card-actions {
    padding-top: 0;
    align-self: end;
}

.education-card-actions .story-inline-save {
    width: 100%;
    min-height: 36px;
    padding: 0 12px;
    justify-content: center;
    font-size: 12px;
    line-height: 1;
}

.education-card-title {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--nf-text-primary);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.education-empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 36px 24px;
    border-radius: var(--nf-radius-xl);
    background: rgba(14, 138, 145, 0.04);
    border: 1px dashed rgba(14, 138, 145, 0.22);
    text-align: center;
}

.education-empty-state .education-empty-icon {
    font-size: 2rem;
    line-height: 1;
}

.education-empty-state p {
    margin: 0;
    color: var(--nf-text-secondary);
    font-size: 14px;
    line-height: 1.5;
}

.education-empty-state p span {
    font-size: 13px;
    opacity: 0.8;
}

.more-stories-list,
.highlight-stories,
.spotlight-list,
.rail-list,
.saved-stories {
    display: grid;
    gap: 12px;
}

.highlight-card {
    display: grid;
    gap: 12px;
    padding: 16px;
    border-radius: 18px;
    background: var(--nf-surface-strong);
    border: 1px solid rgba(14, 138, 145, 0.08);
    cursor: pointer;
}

.highlight-card--media {
    gap: 14px;
    padding: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(242, 249, 250, 0.94));
}

.highlight-card-head {
    display: block;
}

.highlight-card-media {
    padding: 6px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(14, 138, 145, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.highlight-card-media--full {
    width: 100%;
}

.highlight-card-media .story-image-wrap.highlight,
.highlight-card-media .story-image-wrap.secondary {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
}

.highlight-body {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.highlight-card-head .story-meta-row.compact {
    margin: 0;
}

.highlight-card:hover,
.highlight-card:focus-visible,
.stream-card:hover,
.stream-card:focus-visible,
.spotlight-feature:hover,
.spotlight-feature:focus-visible,
.saved-story-link:hover,
.saved-story-link:focus-visible,
.spotlight-list-item:hover,
.spotlight-list-item:focus-visible {
    transform: translateY(-1px);
    box-shadow: var(--nf-shadow-sm);
    outline: none;
}

.stream-card-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--nf-accent-soft), rgba(29, 111, 163, 0.16));
    color: var(--nf-accent-strong);
    font-size: 13px;
    font-weight: 800;
}

.highlight-body h3,
.spotlight-feature h3,
.stream-card-title {
    margin: 0;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.highlight-body h3 {
    font-size: 1.05rem;
}

.highlight-body p {
    line-height: 1.5;
}

.highlight-summary {
    margin: 0;
    color: var(--nf-text-secondary);
    line-height: 1.55;
}

.spotlight-shell {
    display: grid;
    gap: 16px;
}

.spotlight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.spotlight-card {
    display: grid;
    gap: 18px;
    padding: 22px;
}

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

.spotlight-chip,
.rail-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--nf-accent-soft);
    color: var(--nf-accent-strong);
    font-size: 12px;
    font-weight: 700;
}

.spotlight-chip:hover,
.rail-chip:hover,
.rail-list-item:hover {
    background: rgba(14, 138, 145, 0.16);
}

.rail-chip.active {
    background: var(--nf-accent);
    color: #ffffff;
}

.spotlight-count {
    color: var(--nf-text-muted);
    font-size: 12px;
    font-weight: 700;
}

.spotlight-feature {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 14px;
    padding: 18px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(14, 138, 145, 0.08), rgba(29, 111, 163, 0.05));
    cursor: pointer;
}

.spotlight-feature-body {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.spotlight-feature h3 {
    margin: 2px 0 4px;
}

.spotlight-list-item,
.rail-list-item,
.saved-story-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    border-radius: 16px;
    background: var(--nf-surface-strong);
    color: var(--nf-text-primary);
    text-align: left;
}

.spotlight-list-item small,
.rail-list-meta,
.saved-story-meta {
    color: var(--nf-text-muted);
    font-size: 12px;
}

.newsfeed-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.82fr);
    gap: clamp(18px, 1.5vw, 26px);
    align-items: start;
}

.stream-section {
    display: grid;
    gap: 16px;
}

.story-stream {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.story-stream > * {
    min-width: 0;
}

.stream-card {
    display: grid;
    grid-template-columns: auto 132px minmax(0, 1fr);
    gap: 16px;
    padding: 16px 18px;
    border-radius: 22px;
    cursor: pointer;
    align-items: start;
    height: 100%;
}

.stream-card.is-breaking {
    border-color: rgba(217, 72, 95, 0.18);
}

.stream-card.is-read {
    opacity: 0.82;
}

.stream-card-main {
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    gap: 8px;
    min-width: 0;
}

.stream-card-title {
    font-size: 1.02rem;
    line-height: 1.22;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.stream-card-desc {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.55;
}

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

.stream-card-rank {
    align-self: start;
    margin-top: 2px;
}

.stream-tag-row,
.rail-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.stream-actions {
    display: flex;
    justify-content: center;
    padding-top: 4px;
}

.newsfeed-rail {
    position: sticky;
    top: 96px;
    display: grid;
    gap: 16px;
    padding-top: clamp(18px, 1.4vw, 24px);
}

.rail-card {
    padding: 20px;
}

.rail-card-header {
    margin-bottom: 16px;
}

.rail-list {
    gap: 10px;
}

.rail-list-title,
.saved-story-title {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--nf-text-primary);
}

.saved-story-card {
    display: grid;
    gap: 8px;
}

.saved-story-link {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    justify-content: start;
}

.saved-story-content {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.saved-story-remove {
    justify-self: start;
    min-height: 36px;
    padding: 0 14px;
}

.panel-empty,
.rail-empty,
.stream-empty {
    padding: 18px;
    border-radius: 18px;
    background: rgba(14, 138, 145, 0.05);
    border: 1px dashed rgba(14, 138, 145, 0.16);
}

.newsfeed-loading,
.newsfeed-empty {
    text-align: center;
    padding: 88px 0 72px;
}

.newsfeed-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    color: var(--nf-text-muted);
}

.loading-spinner {
    width: 38px;
    height: 38px;
    border: 3px solid rgba(14, 138, 145, 0.15);
    border-top-color: var(--nf-accent);
    border-radius: 50%;
    animation: spin 0.85s linear infinite;
}

.empty-icon {
    font-size: 58px;
    margin-bottom: 14px;
}

.newsfeed-empty h3 {
    margin: 0 0 10px;
    font-size: 1.5rem;
}

.newsfeed-empty p {
    margin: 0 0 22px;
    color: var(--nf-text-muted);
}

.reset-filters-btn {
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    background: linear-gradient(135deg, #008B8B, #20B2AA);
    color: #ffffff;
    border: none;
    cursor: pointer;
    font-weight: 700;
    box-shadow: 0 12px 24px rgba(0, 139, 139, 0.22);
    transition: transform var(--nf-transition), box-shadow var(--nf-transition), background-color var(--nf-transition), background var(--nf-transition);
}

.reset-filters-btn:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #0e6f6f, #008B8B);
    box-shadow: 0 18px 30px rgba(0, 139, 139, 0.28);
}

.preferences-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(11, 35, 42, 0.42);
    backdrop-filter: blur(10px);
}

.preferences-overlay.active {
    display: flex;
}

.preferences-modal {
    width: min(100%, 680px);
    max-height: 88vh;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: var(--nf-shadow-hover);
}

.preferences-header,
.preferences-footer {
    padding: 24px 28px;
}

.preferences-header {
    position: relative;
    border-bottom: 1px solid var(--nf-border);
}

.preferences-header h2 {
    margin: 0 0 6px;
    font-size: 1.5rem;
    letter-spacing: -0.04em;
}

.preferences-header p {
    margin: 0;
    color: var(--nf-text-muted);
}

.preferences-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    background: var(--nf-accent-soft);
    color: var(--nf-accent-strong);
    font-size: 20px;
    cursor: pointer;
}

.preferences-body {
    padding: 18px 28px 10px;
    overflow: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.pref-category-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid var(--nf-border);
    cursor: pointer;
    transition: background-color var(--nf-transition), border-color var(--nf-transition), transform var(--nf-transition);
}

.pref-category-item:hover {
    transform: translateY(-1px);
    border-color: rgba(14, 138, 145, 0.18);
    background: rgba(14, 138, 145, 0.05);
}

.pref-category-item.selected {
    border-color: rgba(14, 138, 145, 0.3);
    background: linear-gradient(135deg, rgba(14, 138, 145, 0.08), rgba(29, 111, 163, 0.06));
}

.pref-checkbox {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 2px solid rgba(14, 138, 145, 0.2);
    flex-shrink: 0;
}

.pref-checkbox svg {
    display: none;
}

.pref-category-item.selected .pref-checkbox {
    background: var(--nf-accent);
    border-color: transparent;
}

/* ---- Saved articles expanded panel ---- */
.saved-articles-expanded-panel {
    max-width: var(--nf-max-width);
    margin: 0 auto;
    padding: 24px 24px 32px;
}

.saved-expanded-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.saved-expanded-header h2 {
    margin: 4px 0 0;
    font-size: 1.35rem;
    letter-spacing: -0.03em;
}

.saved-expanded-close {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    background: var(--nf-accent-soft);
    color: var(--nf-accent-strong);
    font-size: 20px;
    cursor: pointer;
    flex-shrink: 0;
}

.saved-expanded-close:hover {
    background: rgba(14, 138, 145, 0.16);
}

.saved-expanded-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.saved-expanded-delete-all {
    padding: 6px 16px;
    border-radius: 999px;
    border: 1px solid var(--nf-danger);
    background: transparent;
    color: var(--nf-danger);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--nf-transition), color var(--nf-transition);
}

.saved-expanded-delete-all:hover {
    background: var(--nf-danger);
    color: #ffffff;
}

.saved-expanded-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.saved-expanded-card {
    display: grid;
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 14px;
    padding: 16px;
    border-radius: var(--nf-radius);
    background: var(--nf-surface);
    border: 1px solid var(--nf-border);
    transition: box-shadow var(--nf-transition), border-color var(--nf-transition);
}

.saved-expanded-card:hover {
    border-color: var(--nf-border-strong);
    box-shadow: var(--nf-shadow-sm);
}

.saved-expanded-img {
    width: 80px;
    height: 64px;
    object-fit: cover;
    border-radius: 12px;
}

.saved-expanded-img-placeholder {
    width: 80px;
    height: 64px;
    border-radius: 12px;
    background: var(--nf-accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.saved-expanded-body {
    display: grid;
    gap: 6px;
    align-content: start;
    min-width: 0;
}

.saved-expanded-title {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--nf-text-primary);
    line-height: 1.4;
    cursor: pointer;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.saved-expanded-title:hover {
    color: var(--nf-accent);
}

.saved-expanded-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 12px;
    color: var(--nf-text-muted);
}

.saved-expanded-meta span:not(:last-child)::after {
    content: '·';
    margin-left: 6px;
}

.saved-expanded-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.saved-expanded-read {
    min-height: 32px;
    padding: 0 14px;
    font-size: 12px;
    border-radius: 999px;
}

.saved-expanded-remove {
    min-height: 32px;
    padding: 0 14px;
    font-size: 12px;
    border-radius: 999px;
}

.saved-expanded-empty {
    grid-column: 1 / -1;
    padding: 32px 18px;
    border-radius: var(--nf-radius);
    background: rgba(14, 138, 145, 0.05);
    border: 1px dashed rgba(14, 138, 145, 0.16);
    text-align: center;
    color: var(--nf-text-muted);
    font-size: 14px;
    margin: 0;
}

.quick-action-chip.active {
    background: var(--nf-accent);
    color: #ffffff;
    border-color: transparent;
}

@media (max-width: 820px) {
    .saved-expanded-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .newsfeed-search-copy__intro,
    .newsfeed-copy-card,
    .newsfeed-faq-grid,
    .newsfeed-faq-card {
        padding: 18px;
    }

    .newsfeed-copy-links {
        flex-direction: column;
    }

    .newsfeed-copy-links a {
        width: 100%;
        justify-content: center;
    }

    .saved-expanded-card {
        grid-template-columns: 60px minmax(0, 1fr);
        gap: 10px;
        padding: 12px;
    }

    .saved-expanded-img,
    .saved-expanded-img-placeholder {
        width: 60px;
        height: 50px;
    }
}

.pref-category-item.selected .pref-checkbox svg {
    display: block;
}

.pref-category-label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--nf-text-primary);
    font-weight: 600;
}

.pref-category-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.preferences-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid var(--nf-border);
}

.pref-select-all,
.pref-save-btn {
    min-height: 46px;
    padding: 0 18px;
    border-radius: 999px;
    font-weight: 700;
}

.pref-select-all {
    border: 1px solid rgba(0, 139, 139, 0.2);
    background: rgba(255, 255, 255, 0.94);
    color: var(--nf-accent-strong);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

.pref-save-btn {
    border: none;
    background: linear-gradient(135deg, #008B8B, #20B2AA);
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(0, 139, 139, 0.22);
}

.pref-select-all:hover,
.pref-save-btn:hover {
    transform: translateY(-2px);
}

.pref-select-all:hover {
    background: rgba(224, 242, 241, 0.68);
    border-color: rgba(0, 139, 139, 0.34);
    box-shadow: 0 14px 28px rgba(0, 139, 139, 0.14);
}

.pref-save-btn:hover {
    background: linear-gradient(135deg, #0e6f6f, #008B8B);
    box-shadow: 0 18px 30px rgba(0, 139, 139, 0.28);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 1240px) {
    .newsfeed-search-copy__grid,
    .newsfeed-faq-grid {
        grid-template-columns: 1fr;
    }

    .briefing-grid {
        grid-template-columns: minmax(0, 1.45fr) minmax(280px, 1fr);
    }

    .more-stories-panel {
        grid-column: 1 / -1;
    }
}

@media (max-width: 1060px) {
    .spotlight-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }
}

@media (max-width: 1040px) {
    .newsfeed-search-container {
        grid-template-columns: 1fr;
    }

    .newsfeed-quick-actions {
        justify-content: flex-start;
    }

    .newsfeed-layout {
        grid-template-columns: 1fr;
    }

    .newsfeed-rail {
        position: static;
        padding-top: 0;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .newsfeed-hero {
        padding: 56px 18px 32px;
    }

    .newsfeed-hero-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .briefing-grid,
    .spotlight-grid,
    .education-stories,
    .signal-stack,
    .newsfeed-rail {
        grid-template-columns: 1fr;
    }

    .newsfeed-hero-right {
        align-items: flex-start;
        flex-shrink: 1;
        width: 100%;
        padding: 20px;
    }

    .newsfeed-subtitle {
        max-width: none;
        font-size: 17px;
        line-height: 1.55;
    }

    .newsfeed-hero-actions-wrap,
    .newsfeed-hero-actions {
        width: 100%;
    }

    .newsfeed-hero-actions-wrap {
        padding: 0;
        align-items: stretch;
        gap: 12px;
    }

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

    .newsfeed-pref-btn,
    .newsfeed-refresh-btn {
        width: 100%;
        min-height: 52px;
        padding: 0 18px;
        justify-content: center;
    }

    .newsfeed-hero-actions,
    .newsfeed-hero-actions-wrap .newsfeed-hero-meta {
        justify-content: flex-start;
    }

    .newsfeed-hero-stats {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
        justify-content: flex-start;
    }

    .hero-stat {
        text-align: left;
        padding: 16px 12px 14px;
        border-radius: 20px;
        background: rgba(255, 255, 255, 0.74);
        border: 1px solid rgba(14, 111, 111, 0.12);
        box-shadow: 0 10px 24px rgba(11, 70, 83, 0.06);
    }

    .newsfeed-search-container,
    .newsfeed-categories-strip,
    .newsfeed-main {
        padding-left: 18px;
        padding-right: 18px;
    }

    .lead-story-card {
        min-height: 0;
    }

    .spotlight-feature,
    .stream-card {
        grid-template-columns: 1fr;
    }

    .highlight-card-head {
        grid-template-columns: minmax(0, 1fr) 78px;
        gap: 12px;
    }

    .story-image-wrap.highlight,
    .story-image-wrap.secondary,
    .story-image-wrap.spotlight,
    .story-image-wrap.stream {
        width: 100%;
    }

    .story-image-wrap.highlight,
    .story-image-wrap.stream {
        aspect-ratio: 16 / 9;
    }

    .story-image-wrap.secondary,
    .story-image-wrap.spotlight {
        aspect-ratio: 1;
    }

    .stream-card-rank {
        width: 34px;
        height: 34px;
    }

    .preferences-body {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .newsfeed-hero {
        padding: 44px 14px 28px;
    }

    .newsfeed-hero-text {
        gap: 16px;
    }

    .newsfeed-eyebrow {
        margin-bottom: 0;
        font-size: 0.95rem;
        letter-spacing: 0.18em;
    }

    .newsfeed-greeting {
        font-size: 15px;
    }

    .newsfeed-brand {
        font-size: 2.05rem;
        line-height: 1;
        gap: 10px;
        align-items: flex-start;
    }

    .discover-tag {
        padding: 0.16em 0.42em;
        font-size: 0.54em;
        letter-spacing: 0.07em;
    }

    .newsfeed-subtitle {
        font-size: 15px;
        line-height: 1.7;
    }

    .newsfeed-hero-stats {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        gap: 12px;
        justify-content: flex-start;
    }

    .hero-stat {
        text-align: left;
        padding: 14px 10px 13px;
        border-radius: 18px;
    }

    .hero-stat-value {
        font-size: 24px;
    }

    .hero-stat:last-child {
        grid-column: 1 / -1;
    }

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

    .newsfeed-hero-actions-wrap .newsfeed-hero-meta {
        width: 100%;
    }

    .newsfeed-hero-actions-wrap .newsfeed-status-pill {
        width: 100%;
        justify-content: center;
        text-align: center;
        white-space: normal;
    }

    .newsfeed-search-container,
    .newsfeed-categories-strip,
    .newsfeed-main {
        padding-left: 12px;
        padding-right: 12px;
    }

    .newsfeed-search-bar {
        min-height: 58px;
        padding: 0 18px;
        border-radius: 20px;
    }

    .quick-action-chip {
        width: 100%;
        justify-content: center;
    }

    .lead-story-body,
    .briefing-panel,
    .spotlight-card,
    .rail-card,
    .preferences-header,
    .preferences-footer {
        padding-left: 18px;
        padding-right: 18px;
    }

    .story-action-row,
    .preferences-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .saved-story-link {
        grid-template-columns: 64px minmax(0, 1fr);
    }

    .story-primary-action,
    .story-secondary-action,
    .stream-load-more,
    .pref-select-all,
    .pref-save-btn {
        justify-content: center;
        width: 100%;
    }
}