/* TWA2M stylesheet  — v4 */
@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600;1,400&display=swap');

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

:root {
    --bg: #f4f4f0;
    --surface: #ffffff;
    --border: #e0ddd8;
    --text: #1a1a1a;
    --muted: #6b6b6b;
    --accent: #1d4ed8;
    --accent-light: #eff6ff;
    --danger: #dc2626;
    --success: #16a34a;
    --radius: 10px;
    --shadow: 0 1px 4px rgba(0, 0, 0, .08), 0 4px 16px rgba(0, 0, 0, .06);
}

html {
    overflow-x: clip;
    /* clip avoids creating a scroll container (hidden would break position:sticky) */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: clip;
}

.legal-inline-links,
.app-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    flex-wrap: wrap;
    color: var(--muted);
}

.legal-inline-links {
    font-size: .78rem;
    margin-top: .8rem;
}

.app-footer {
    font-size: .8rem;
    padding: .2rem 1rem 1.4rem;
}

.legal-inline-links a,
.app-footer a {
    color: var(--accent);
    text-decoration: none;
}

.legal-inline-links a:hover,
.app-footer a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
}

/* ── Setup screen ──────────────────────────────────────────── */
#setup {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

.setup-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 2.5rem;
    max-width: 560px;
    width: 100%;
}

.setup-card h1 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -.5px;
    margin-bottom: .25rem;
}

.setup-card h1 span {
    color: var(--accent);
}

.setup-card .subtitle {
    color: var(--muted);
    margin-bottom: 2rem;
    font-size: .95rem;
}

label.field-label {
    display: block;
    font-size: .8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--muted);
    margin-bottom: .5rem;
}

textarea#profileText {
    width: 100%;
    height: 110px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .75rem 1rem;
    font-size: .95rem;
    font-family: inherit;
    resize: vertical;
    outline: none;
    transition: border-color .15s;
    color: var(--text);
    background: var(--bg);
}

textarea#profileText:focus {
    border-color: var(--accent);
    background: #fff;
}

.region-grid {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: .25rem;
    margin-bottom: 1.5rem;
}

.region-chip {
    padding: .35rem .85rem;
    border: 1.5px solid var(--border);
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    transition: all .15s;
    background: var(--surface);
}

.region-chip.selected {
    border-color: var(--accent);
    background: var(--accent-light);
    color: var(--accent);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .7rem 1.4rem;
    border-radius: var(--radius);
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: opacity .15s, transform .1s;
}

.btn:active {
    transform: scale(.97);
}

.btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    width: 100%;
    justify-content: center;
    font-size: 1rem;
    padding: .85rem;
}

.btn-primary:hover:not(:disabled) {
    opacity: .9;
}

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

.category-ratio-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: .45rem;
}

.category-ratio-row {
    display: grid;
    grid-template-columns: 1fr 74px 20px;
    align-items: center;
    gap: .55rem;
    font-size: .84rem;
    color: var(--text);
}

.category-ratio-row input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: .35rem .45rem;
    font-size: .82rem;
    background: var(--bg);
    color: var(--text);
}

.category-ratio-total {
    margin-top: .4rem;
    font-size: .75rem;
    color: var(--muted);
}

.category-advanced-btn {
    margin-top: .45rem;
    background: transparent;
    border: 1px dashed var(--border);
    border-radius: 8px;
    padding: .35rem .6rem;
    font-size: .76rem;
    color: var(--muted);
    cursor: pointer;
}

.category-advanced-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ── App shell ─────────────────────────────────────────────── */
#app {
    display: none;
    flex-direction: column;
    min-height: 100vh;
}

.logo {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.logo.logo-text-only {
    flex: 0 0 auto;
}

.logo-wordmark {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -.3px;
    line-height: 1;
}

.logo-tagline {
    font-size: .68rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: .18rem;
}

.header-meta {
    flex: 1;
    font-size: .8rem;
    color: var(--muted);
}

.quick-menu-fab {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    width: 52px;
    height: 52px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-size: 1.25rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .18);
    z-index: 220;
    cursor: pointer;
}

.quick-menu-fab:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.quick-menu-backdrop {
    align-items: flex-end;
    justify-content: flex-end;
    padding: 1rem;
}

.quick-menu-modal {
    width: min(300px, 92vw);
    max-width: calc(100vw - 1rem);
    max-height: calc(100vh - 1rem);
    margin: 0;
    padding: 1rem 1rem 1.1rem;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.quick-menu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}

.quick-menu-head h3 {
    margin: 0;
    font-size: 1rem;
}

.quick-menu-meta {
    margin-top: .65rem;
    margin-bottom: .5rem;
    font-size: .72rem;
    color: var(--muted);
}

.quick-prompt-input {
    width: 100%;
    min-height: 72px;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: .55rem .7rem;
    font-size: .82rem;
    font-family: inherit;
    resize: vertical;
    background: var(--bg);
    color: var(--text);
}

.quick-category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
}

.quick-category-btn {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    border-radius: 999px;
    padding: .22rem .55rem;
    font-size: .7rem;
    line-height: 1.2;
    cursor: pointer;
}

.quick-category-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.quick-category-btn.quick-category-btn-disabled {
    opacity: .55;
}

.quick-region-compact {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
}

.quick-region-chip {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    border-radius: 999px;
    padding: .2rem .5rem;
    font-size: .68rem;
    line-height: 1.2;
    cursor: pointer;
}

.quick-region-chip:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.quick-region-chip.selected {
    border-color: var(--accent);
    background: var(--accent-light);
    color: var(--accent);
}

.quick-menu-actions {
    display: flex;
    flex-direction: column;
    gap: .45rem;
}

.quick-menu-actions .btn {
    width: 100%;
    justify-content: flex-start;
    display: inline-flex;
    align-items: center;
}

.quick-menu-links {
    display: grid;
    gap: .16rem;
}

.quick-menu-link {
    display: inline-block;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    color: var(--muted);
    text-decoration: none;
    font-size: .74rem;
    line-height: 1.25;
}

.quick-menu-link:hover {
    color: var(--accent);
    background: transparent;
    text-decoration: underline;
}

.selection-info-modal {
    max-width: 540px;
    max-height: min(84vh, 720px);
    overflow-y: auto;
    padding: 1.2rem 1.25rem;
}

.selection-info-lede {
    font-size: .82rem;
    color: var(--muted);
    line-height: 1.45;
    margin: -.5rem 0 .7rem;
}

.selection-info-block {
    margin-top: .55rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    padding: .52rem .65rem;
}

.selection-info-label {
    font-size: .69rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--muted);
    margin-bottom: .22rem;
}

.selection-info-value {
    font-size: .82rem;
    line-height: 1.4;
    color: var(--text);
    word-break: break-word;
}

.selection-info-value-pre {
    white-space: pre-wrap;
    max-height: 180px;
    overflow-y: auto;
}

.selection-info-list {
    margin: .8rem 0 0;
    padding-left: 1rem;
    display: grid;
    gap: .28rem;
    font-size: .79rem;
    color: var(--muted);
    line-height: 1.35;
}

.btn-sm {
    padding: .4rem .9rem;
    font-size: .8rem;
    border-radius: 8px;
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--border);
    color: var(--text);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-outline.active {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-light);
}

.btn-danger-outline {
    background: transparent;
    border: 1.5px solid #fecaca;
    color: var(--danger);
}

.account-panel {
    margin-bottom: 1rem;
}

.account-guest-blurb {
    font-size: .84rem;
    line-height: 1.5;
    color: var(--muted);
    margin: 0 0 .75rem 0;
}

.account-guest-cta-row {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin-bottom: .8rem;
    flex-wrap: wrap;
}

.account-session-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .5rem;
}

.account-stat-item {
    border: 1px solid var(--border);
    background: var(--bg);
    border-radius: 10px;
    padding: .45rem .55rem;
    display: flex;
    flex-direction: column;
    gap: .18rem;
}

.account-stat-item-wide {
    grid-column: 1 / -1;
}

.account-stat-line {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .75rem;
}

.account-stat-label {
    font-size: .75rem;
    color: var(--muted);
    letter-spacing: 0;
}

.account-stat-item strong {
    font-size: .82rem;
    line-height: 1.2;
    color: var(--text);
    overflow-wrap: anywhere;
}

/* ── Edit modal ────────────────────────────────────────────── */
.modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-backdrop.open {
    display: flex;
}

.modal {
    background: var(--surface);
    border-radius: 16px;
    padding: 2rem;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 8px 40px rgba(0, 0, 0, .2);
}

.modal h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
}

.reader-modal {
    max-width: 860px;
    max-height: 86vh;
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.reader-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}

.reader-header h3 {
    margin: 0;
    font-family: 'Lora', Georgia, serif;
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.35;
}

.reader-meta {
    font-size: .78rem;
    color: var(--muted);
}

.reader-notice {
    font-size: .75rem;
    color: var(--muted);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: .45rem .65rem;
}

.reader-content {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    padding: 1.5rem 2rem;
    overflow-y: auto;
    min-height: 180px;
    font-family: 'Lora', Georgia, 'Times New Roman', serif;
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--text);
    letter-spacing: 0.01em;
}

.reader-content p {
    margin: 0 0 1.2rem;
    text-align: justify;
    hyphens: auto;
}

.reader-content p:first-child::first-letter {
    font-size: 3em;
    font-weight: 600;
    line-height: 1;
    float: left;
    margin: .05em .12em 0 0;
    color: var(--accent);
}

.reader-content p:last-child {
    margin-bottom: 0;
}

.reader-actions {
    display: flex;
    justify-content: flex-end;
}

.modal-footer {
    display: flex;
    gap: .75rem;
    margin-top: 1.5rem;
    justify-content: flex-end;
}

/* ── Newspaper layout ──────────────────────────────────────── */
main {
    max-width: 1240px;
    margin: 0 auto;
    padding: 1.5rem 1.5rem 4rem;
}

.feed-header {
    position: sticky;
    top: 0;
    z-index: 110;
    background: rgba(244, 244, 240, .95);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--border);
}

.feed-header-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: .5rem 1.5rem;
    display: flex;
    position: relative;
    align-items: center;
    gap: .75rem;
}

.feed-header-main {
    flex: 1;
    display: flex;
    align-items: center;
    gap: .75rem;
    min-width: 0;
}

.feed-home-group {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    min-width: 0;
    cursor: pointer;
}

.feed-home-group:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 10px;
}

.feed-header-actions {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    margin-left: auto;
}

.feed-header-center-splash {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1;
}

.feed-splash-mini {
    width: 128px;
    height: 128px;
    object-fit: contain;
    opacity: .92;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .2));
}

.mobile-topic-filter-toggle {
    display: none;
}

.feed-header h2 {
    font-size: 1.15rem;
    font-weight: 700;
    cursor: inherit;
}

.feed-header h2:hover {
    color: var(--accent);
}

.feed-home-group:hover h2 {
    color: var(--accent);
}

.feed-title-wrap {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .08rem;
}

.my-feed-indicator {
    font-size: .68rem;
    color: var(--muted);
    line-height: 1;
}

h2.my-feed-ready {
    color: var(--accent);
}

.feed-count {
    font-size: .8rem;
    color: var(--muted);
    background: var(--border);
    padding: .15rem .55rem;
    border-radius: 999px;
}

.feed-logo-image {
    width: 56px;
    height: 56px;
    object-fit: contain;
    cursor: pointer;
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: .28rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
    flex: 0 0 auto;
}

.header-language-control {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: .24rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    padding: .18rem .3rem;
    flex: 0 0 auto;
}

.header-language-toggle {
    display: inline-flex;
    align-items: center;
    gap: .2rem;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
}

.header-language-caret {
    font-size: .58rem;
    color: var(--muted);
    line-height: 1;
}

.header-language-menu {
    position: absolute;
    top: calc(100% + .4rem);
    right: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .25rem;
    padding: .38rem;
    min-width: 138px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow);
    z-index: 150;
}

.header-language-menu[hidden] {
    display: none !important;
}

.header-language-option {
    border: none;
    background: transparent;
    padding: .12rem;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.header-language-option:hover,
.header-language-option:focus-visible {
    background: rgba(0, 0, 0, .06);
    outline: none;
}

.header-language-flag {
    width: 18px;
    height: 13px;
    border-radius: 2px;
    border: 1px solid rgba(0, 0, 0, .08);
    object-fit: cover;
    display: block;
}

#headerLanguage {
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
    position: absolute;
}

.paper-date {
    text-align: center;
    border-top: 3px solid var(--text);
    border-bottom: 1px solid var(--border);
    padding: .45rem 0;
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 1.5rem;
}

.paper-section-label {
    display: block;
    font-size: .67rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .13em;
    color: var(--accent);
    border-bottom: 2px solid var(--accent);
    padding-bottom: .28rem;
    margin-bottom: 1rem;
}

/* ── Hero ──────────────────────────────────────────────────── */
.hero-article {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
    padding-bottom: 1.75rem;
    margin-bottom: 1.75rem;
    border-bottom: 1px solid var(--border);
}

/* Grid children MUST have min-width:0 or they won't shrink on mobile */
.hero-image-wrap,
.hero-content {
    min-width: 0;
}

.hero-article.no-img {
    grid-template-columns: 1fr;
    max-width: 700px;
}

.hero-image-wrap {
    border-radius: var(--radius);
    overflow: hidden;
    line-height: 0;
    width: 100%;
}

.hero-image-wrap img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: var(--radius);
    display: block;
}

.hero-kicker {
    display: flex;
    align-items: center;
    gap: .4rem;
    flex-wrap: wrap;
    margin-bottom: .5rem;
}

.hero-headline {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 2.1rem;
    font-weight: 700;
    line-height: 1.18;
    letter-spacing: -.025em;
    margin-bottom: .65rem;
    color: var(--text);
    overflow-wrap: break-word;
    word-break: break-word;
}

.hero-headline a {
    color: inherit;
    text-decoration: none;
}

.hero-headline a:hover {
    text-decoration: underline;
    text-decoration-thickness: 2px;
}

.hero-snippet {
    font-size: .97rem;
    line-height: 1.65;
    color: var(--text);
    opacity: .85;
    margin-bottom: .8rem;
    overflow-wrap: break-word;
}

.article-byline {
    font-size: .72rem;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: .4rem;
    flex-wrap: wrap;
    margin-bottom: .7rem;
}

.article-actions {
    display: flex;
    align-items: center;
    gap: .4rem;
    flex-wrap: wrap;
}

.image-credit {
    font-size: .66rem;
    color: var(--muted);
    line-height: 1.4;
    margin-top: .35rem;
}

.perspectives-panel {
    margin-top: .9rem;
    padding-top: .75rem;
    border-top: 1px solid var(--border);
}

.perspectives-label {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: .55rem;
}

.perspectives-list {
    display: grid;
    gap: .55rem;
}

.perspective-item {
    display: grid;
    gap: .18rem;
    padding: .7rem .8rem;
    background: #faf9f7;
    border: 1px solid var(--border);
    border-radius: 10px;
}

.p-source {
    display: flex;
    align-items: center;
    gap: .35rem;
    flex-wrap: wrap;
    font-size: .68rem;
    color: var(--muted);
}

.p-title {
    font-size: .83rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text);
    font-family: Georgia, 'Times New Roman', serif;
}

.p-snippet {
    font-size: .74rem;
    line-height: 1.45;
    color: var(--muted);
}

.perspective-item a {
    font-size: .72rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
}

.perspective-item a:hover {
    text-decoration: underline;
}

.featured-actions {
    display: flex;
    align-items: center;
    gap: .3rem;
    flex-wrap: wrap;
    margin-top: .3rem;
}

/* ── Featured ──────────────────────────────────────────────── */
.paper-featured {
    margin-bottom: 1.75rem;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1.5rem;
}

.featured-article {
    display: flex;
    flex-direction: column;
    gap: .45rem;
    padding-right: 1.25rem;
    margin-right: 1.25rem;
    border-right: 1px solid var(--border);
    min-width: 0;
}

.featured-article:last-child {
    border-right: none;
    margin-right: 0;
    padding-right: 0;
}

.featured-article--prominent .featured-headline {
    font-size: 1.15rem;
    line-height: 1.26;
}

.featured-article--prominent .featured-image-wrap img {
    aspect-ratio: 4/3;
}

.featured-image-wrap {
    width: 100%;
    overflow: hidden;
    line-height: 0;
    border-radius: calc(var(--radius) - 2px);
}

.featured-image-wrap img {
    width: 100%;
    aspect-ratio: 3/2;
    object-fit: cover;
    display: block;
    margin-bottom: .3rem;
}

.featured-kicker {
    display: flex;
    align-items: center;
    gap: .35rem;
    flex-wrap: wrap;
}

.featured-headline {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.28;
    letter-spacing: -.01em;
    color: var(--text);
    overflow-wrap: break-word;
    word-break: break-word;
}

.featured-headline a {
    color: inherit;
    text-decoration: none;
}

.featured-headline a:hover {
    text-decoration: underline;
}

.featured-snippet {
    font-size: .8rem;
    line-height: 1.5;
    color: var(--text);
    opacity: .8;
    flex: 1;
    overflow-wrap: break-word;
}

.featured-byline {
    font-size: .68rem;
    color: var(--muted);
    display: flex;
    gap: .3rem;
    align-items: center;
    margin-top: auto;
}

/* ── Standard grid ─────────────────────────────────────────── */
.paper-body {
    display: grid;
    grid-template-columns: 1fr 265px;
    gap: 0 2.5rem;
    align-items: start;
}

.standard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding-top: .5rem;
}

.standard-article {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    padding: .75rem;
    margin: 0;
    border: 1px solid var(--border);
    min-width: 0;
}

.standard-article:nth-child(3n) {
    border-right: 1px solid var(--border);
    padding-right: .75rem;
    margin-right: 0;
}

.standard-article--filler {
    visibility: hidden;
    border: none !important;
    pointer-events: none;
    background: transparent !important;
}

.standard-article--full {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(240px, .92fr);
    column-gap: 1rem;
    align-items: start;
}

.standard-article--full.has-image .standard-image-wrap {
    grid-column: 2;
    grid-row: 1 / span 6;
    margin: 0;
}

.standard-article--full.has-image .standard-kicker,
.standard-article--full.has-image .skeleton-status,
.standard-article--full.has-image .standard-headline,
.standard-article--full.has-image .standard-snippet,
.standard-article--full.has-image .standard-byline,
.standard-article--full.has-image .standard-actions {
    grid-column: 1;
}

.standard-article--full.has-image:nth-of-type(even) .standard-image-wrap {
    grid-column: 1;
}

.standard-article--full.has-image:nth-of-type(even) .standard-kicker,
.standard-article--full.has-image:nth-of-type(even) .skeleton-status,
.standard-article--full.has-image:nth-of-type(even) .standard-headline,
.standard-article--full.has-image:nth-of-type(even) .standard-snippet,
.standard-article--full.has-image:nth-of-type(even) .standard-byline,
.standard-article--full.has-image:nth-of-type(even) .standard-actions {
    grid-column: 2;
}

.standard-article--full .standard-headline {
    font-size: 1.1rem;
    line-height: 1.3;
}

.standard-article--full .standard-image-wrap img {
    aspect-ratio: 16/9;
    max-height: 240px;
}

.standard-image-wrap {
    width: 100%;
    overflow: hidden;
    line-height: 0;
    border-radius: calc(var(--radius) - 2px);
}

.standard-image-wrap img {
    width: 100%;
    aspect-ratio: 3/2;
    object-fit: cover;
    display: block;
    margin-bottom: .3rem;
}

.standard-kicker {
    display: flex;
    align-items: center;
    gap: .3rem;
    flex-wrap: wrap;
}

.standard-headline {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: .88rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text);
    overflow-wrap: break-word;
    word-break: break-word;
}

.standard-headline a {
    color: inherit;
    text-decoration: none;
}

.standard-headline a:hover {
    text-decoration: underline;
}

.standard-snippet {
    font-size: .75rem;
    line-height: 1.45;
    color: var(--muted);
    overflow-wrap: break-word;
}

.standard-byline {
    font-size: .66rem;
    color: var(--muted);
    display: flex;
    gap: .3rem;
    align-items: center;
    margin-top: auto;
}

.standard-actions {
    display: flex;
    align-items: center;
    gap: .3rem;
    flex-wrap: wrap;
    margin-top: .25rem;
}

/* ── Desktop briefing sidebar ──────────────────────────────── */
.paper-briefing {
    position: sticky;
    top: 56px;
    max-height: calc(100vh - 85px);
    overflow-y: auto;
    border-left: 1px solid var(--border);
    padding-left: 1.5rem;
}

.paper-briefing::-webkit-scrollbar {
    width: 4px;
}

.paper-briefing::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.paper-main--empty {
    min-height: 1px;
}

.paper-briefing-section+.paper-briefing-section {
    margin-top: 1.15rem;
}

/* ── Infinite-scroll continuation (below sidebar, normal flow) ─ */
.paper-continuation {
    margin-top: 1.5rem;
}

.briefing-list {
    display: flex;
    flex-direction: column;
    padding-top: .25rem;
}

.briefing-item {
    padding: .65rem 0;
    border-bottom: 1px solid var(--border);
}

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

.topic-group-briefing-item {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    padding: .65rem 0;
    margin-bottom: 0;
}

.topic-group-briefing-item:last-child {
    border-bottom: none;
}

.topic-group-briefing-item .briefing-meta {
    line-height: 1.4;
}

.briefing-kicker {
    display: flex;
    align-items: center;
    gap: .3rem;
    flex-wrap: wrap;
    margin-bottom: .2rem;
}

.briefing-headline {
    font-size: .8rem;
    font-weight: 700;
    line-height: 1.35;
    font-family: Georgia, 'Times New Roman', serif;
    color: var(--text);
    overflow-wrap: break-word;
    word-break: break-word;
}

.briefing-headline a {
    color: inherit;
    text-decoration: none;
}

.briefing-headline a:hover {
    text-decoration: underline;
}

.briefing-meta {
    font-size: .65rem;
    color: var(--muted);
    margin-top: .25rem;
}

.briefing-actions {
    display: flex;
    align-items: center;
    gap: .25rem;
    margin-top: .3rem;
}

/* ── Mobile briefing strip ─────────────────────────────────── */
.mobile-briefing {
    display: none;
}

.feed-append-enter {
    animation: feedAppendEnter .24s ease-out;
}

@keyframes feedAppendEnter {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .feed-append-enter {
        animation: none;
    }
}

/* ── Badges & buttons ──────────────────────────────────────── */
.source-name {
    font-size: .68rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .05em;
}

.region-badge {
    font-size: .62rem;
    font-weight: 700;
    padding: .12rem .38rem;
    border-radius: 3px;
    letter-spacing: .03em;
}

.badge-EU {
    background: #dbeafe;
    color: #1d4ed8;
}

.badge-MENA {
    background: #fef3c7;
    color: #92400e;
}

.badge-APAC {
    background: #dcfce7;
    color: #166534;
}

.badge-NA {
    background: #fce7f3;
    color: #9d174d;
}

.badge-LATAM {
    background: #ede9fe;
    color: #5b21b6;
}

.badge-AF {
    background: #ffedd5;
    color: #9a3412;
}

.badge-GLOBAL {
    background: #f0f9ff;
    color: #0369a1;
}

.badge-default {
    background: #f3f4f6;
    color: #374151;
}

.translated-badge {
    font-size: .62rem;
    font-weight: 700;
    padding: .12rem .38rem;
    border-radius: 3px;
    background: #fef9c3;
    color: #854d0e;
    letter-spacing: .02em;
}

.translating-badge {
    font-size: .62rem;
    font-weight: 600;
    padding: .12rem .38rem;
    border-radius: 3px;
    background: #f3f4f6;
    color: #6b7280;
    letter-spacing: .02em;
    opacity: .8;
}

/* ── Skeleton loading bars (shown while translation is in-flight) ── */
@keyframes skeleton-shimmer {
    0% {
        background-position: -600px 0;
    }

    100% {
        background-position: 600px 0;
    }
}

.skeleton-line {
    display: block;
    height: 1em;
    border-radius: 4px;
    background: linear-gradient(90deg,
            var(--border) 25%,
            #ede9e3 50%,
            var(--border) 75%);
    background-size: 1200px 100%;
    animation: skeleton-shimmer 1.6s ease-in-out infinite;
    margin-bottom: .3em;
    pointer-events: none;
    user-select: none;
}

.skeleton-title-line {
    width: 80%;
    height: 1.05em;
}

.skeleton-line--med {
    width: 58%;
}

.skeleton-snippet {
    margin-top: .4rem;
    pointer-events: none;
}

.skeleton-status {
    display: inline-block;
    font-size: .66rem;
    font-weight: 600;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: #64748b;
    background: #e8f1ff;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    padding: .12rem .45rem;
    margin: .15rem 0 .45rem;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    line-height: 1;
    padding: .25rem .5rem;
    border-radius: 5px;
    font-size: .75rem;
    background: transparent;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all .1s;
}

.btn-icon:hover {
    background: #f9f9f9;
}

.btn-icon.liked,
.btn-icon.saved {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534;
}

.btn-icon.disliked {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #dc2626;
}

.feedback-icon-btn {
    min-width: 2rem;
    min-height: 2rem;
    padding: .25rem;
}

.feedback-icon-btn.saved,
.feedback-icon-btn.liked {
    box-shadow: inset 0 0 0 1px rgba(22, 101, 52, .08);
}

.feedback-icon-btn.disliked {
    box-shadow: inset 0 0 0 1px rgba(220, 38, 38, .08);
}

.feedback-icon-img {
    width: 16px;
    height: 16px;
    display: block;
    pointer-events: none;
}

.read-link {
    font-size: .72rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    padding: .25rem .55rem;
    border-radius: 5px;
    border: 1px solid #bfdbfe;
    transition: all .1s;
}

.read-link:hover {
    background: var(--accent-light);
}

.read-original-link {
    color: var(--muted);
    border-color: var(--border);
}

/* ── Headline tap-to-read button reset ─────────────────────── */
.headline-btn {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;
    display: block;
    width: 100%;
    text-decoration: none;
}

.hero-headline .headline-btn:hover,
.featured-headline .headline-btn:hover,
.standard-headline .headline-btn:hover,
.briefing-headline .headline-btn:hover {
    text-decoration: underline;
    text-decoration-thickness: 2px;
}

.headline-btn--static {
    cursor: default;
}

.hero-headline .headline-btn--static:hover,
.featured-headline .headline-btn--static:hover,
.standard-headline .headline-btn--static:hover,
.briefing-headline .headline-btn--static:hover {
    text-decoration: none;
}

/* ── Perspectives ──────────────────────────────────────────── */
.perspectives-toggle {
    font-size: .72rem;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-light);
    border: none;
    cursor: pointer;
    padding: .28rem .6rem;
    border-radius: 6px;
    width: 100%;
    text-align: left;
    transition: background .1s;
    margin-top: .3rem;
}

.perspectives-toggle:hover {
    background: #dbeafe;
}

.perspectives-list {
    display: none;
    flex-direction: column;
    gap: .4rem;
    padding-top: .4rem;
    border-top: 1px dashed var(--border);
    margin-top: .25rem;
}

.perspectives-list.open {
    display: flex;
}

.perspective-item {
    font-size: .78rem;
    display: flex;
    flex-direction: column;
    gap: .12rem;
}

.perspective-item .p-source {
    font-weight: 700;
    color: var(--muted);
}

.perspective-item .p-title {
    color: var(--text);
    line-height: 1.3;
}

.perspective-item a {
    font-size: .72rem;
    color: var(--accent);
    text-decoration: none;
}

/* ── Loading / Spinner / Toast ─────────────────────────────── */
.spinner-wrap {
    display: flex;
    justify-content: center;
    padding: 4rem 0;
}

.spinner-wrap.compact {
    padding: .75rem 0 0;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin .7s linear infinite;
}

.loading-state {
    min-height: 380px;
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    background: var(--surface);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

.loading-state.no-image {
    min-height: 220px;
}

.loading-splash {
    width: 100%;
    max-height: 320px;
    object-fit: contain;
    background: white;
    border-bottom: 1px solid var(--border);
}

.loading-panel {
    width: min(100%, 680px);
    margin: 0 auto;
    text-align: center;
    color: var(--text);
    padding: 1.5rem 1.25rem 2rem;
}

.loading-state.no-image .loading-panel {
    color: var(--text);
}

.loading-title {
    font-size: clamp(1.4rem, 2.4vw, 2rem);
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.1;
}

.loading-subtitle {
    margin: .75rem auto 0;
    max-width: 40rem;
    font-size: .98rem;
    line-height: 1.55;
    color: var(--muted);
}

.loading-state.no-image .loading-subtitle {
    color: var(--muted);
}

.feed-load-more-loading {
    width: min(100%, 560px);
    margin: 0 auto;
    padding: .5rem 1rem 1rem;
    text-align: center;
    color: var(--text);
}

.feed-load-more-loading .spinner-wrap.compact {
    padding-top: 0;
}

.feed-load-more-loading .spinner {
    width: 28px;
    height: 28px;
}

.feed-load-more-idle {
    color: var(--muted);
    font-size: .9rem;
}

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

.empty-state {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--muted);
}

.empty-state h3 {
    margin-bottom: .5rem;
    font-size: 1.1rem;
}

.toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: #1a1a1a;
    color: white;
    padding: .7rem 1.2rem;
    border-radius: var(--radius);
    font-size: .85rem;
    z-index: 999;
    opacity: 0;
    transform: translateY(8px);
    transition: all .25s;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE — mobile-first breakpoints
   ══════════════════════════════════════════════════════════════ */

/* ── ≤1000px: collapse sidebar, show briefing chip strip ─── */
@media (max-width: 1000px) {
    main {
        padding: .75rem .75rem 3rem;
        max-width: 100%;
    }

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

    .topic-showcase-grid,
    .hero-article,
    .featured-grid,
    .standard-grid {
        grid-template-columns: 1fr !important;
    }

    .hero-image-wrap,
    .hero-content,
    .featured-article,
    .standard-article,
    .featured-image-wrap,
    .standard-image-wrap {
        min-width: 0;
        max-width: 100%;
    }

    .hero-headline,
    .hero-snippet,
    .featured-headline,
    .featured-snippet,
    .standard-headline,
    .standard-snippet,
    .briefing-headline {
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .paper-briefing {
        display: none;
    }

    .mobile-briefing {
        display: block;
        overflow-x: auto;
        border-top: 2px solid var(--text);
        border-bottom: 1px solid var(--border);
        padding: .75rem 0;
        margin-top: 1.5rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scroll-snap-type: x mandatory;
    }

    .mobile-briefing-inner {
        display: flex;
        gap: .75rem;
        padding: .25rem 0 .25rem 1.5rem;
    }

    /* spacer so last chip isn't clipped by Safari scroll container */
    .mobile-briefing-inner::after {
        content: '';
        flex: 0 0 1.5rem;
    }

    .mobile-briefing-chip {
        display: inline-flex;
        flex-direction: column;
        gap: .25rem;
        min-width: 180px;
        max-width: 200px;
        flex-shrink: 0;
        padding: .5rem .65rem;
        border: 1px solid var(--border);
        border-radius: 8px;
        text-decoration: none;
        color: var(--text);
        transition: all .1s;
        scroll-snap-align: start;
    }

    .mobile-briefing-chip:hover,
    .mobile-briefing-chip:active {
        background: var(--accent-light);
        border-color: var(--accent);
    }

    .mobile-briefing-chip-headline {
        font-size: .78rem;
        font-weight: 700;
        font-family: Georgia, serif;
        line-height: 1.3;
        white-space: normal;
    }

    .mobile-briefing-chip-meta {
        font-size: .65rem;
        color: var(--muted);
    }

    .mobile-briefing-chip--topic-group {
        border-color: #bfdbfe;
        background: #f8fbff;
    }

    .mobile-briefing-chip-tag {
        font-size: .62rem;
        font-weight: 700;
        letter-spacing: .06em;
        text-transform: uppercase;
        color: var(--accent);
    }
}

/* ── ≤800px: tighten padding, single-col hero + featured ─── */
@media (max-width: 800px) {
    main {
        padding: .75rem .75rem 3rem;
    }

    .standard-grid {
        grid-template-columns: 1fr;
    }

    main {
        padding: 1rem 1rem 3rem;
    }

    .hero-article {
        grid-template-columns: 1fr;
        gap: 1.1rem;
    }

    .hero-headline {
        font-size: 1.6rem;
    }

    .featured-grid {
        grid-template-columns: 1fr;
    }

    .featured-article {
        border-right: none;
        padding-right: 0;
        margin-right: 0;
        border-bottom: 1px solid var(--border);
        padding-bottom: 1rem;
        margin-bottom: 1rem;
    }

    .featured-article:last-child {
        border-bottom: none;
        padding-bottom: 0;
        margin-bottom: 0;
    }

    .featured-article--wide,
    .featured-article--full {
        grid-column: auto;
    }

    .standard-article--full,
    .standard-article--prominent {
        grid-column: auto;
        display: flex;
    }
}

/* ── ≤600px: single column everything, mobile header ───── */
@media (max-width: 600px) {
    .btn-sm {
        padding: .35rem .6rem;
        font-size: .75rem;
    }

    .logo-wordmark {
        font-size: 1.02rem;
    }

    .logo-tagline {
        font-size: .58rem;
    }

    .quick-menu-fab {
        width: 48px;
        height: 48px;
        right: .8rem;
        bottom: .8rem;
    }

    .quick-menu-modal {
        width: min(320px, calc(100vw - .75rem));
        max-height: calc(100vh - .75rem);
        padding: .9rem .9rem 1rem;
    }

    .selection-info-modal {
        max-width: calc(100vw - .75rem);
        max-height: calc(100vh - .75rem);
        padding: .9rem .9rem 1rem;
    }

    main {
        padding: .75rem .75rem 3rem;
    }

    .hero-headline {
        font-size: 1.35rem;
    }

    .standard-grid {
        grid-template-columns: 1fr;
    }

    .standard-article {
        border-right: 1px solid var(--border) !important;
        padding-right: .75rem !important;
        margin-right: 0 !important;
    }

    .featured-article--wide,
    .featured-article--full,
    .featured-article--prominent,
    .standard-article--full,
    .standard-article--prominent {
        grid-column: auto;
    }

    .standard-article--full {
        display: flex;
    }

    /* larger tap targets */
    .btn-icon {
        min-height: 40px;
        padding: .5rem .7rem;
        font-size: .8rem;
    }

    .feedback-icon-btn {
        min-width: 40px;
        padding: .45rem;
    }

    .read-link {
        min-height: 40px;
        padding: .5rem .7rem;
        font-size: .8rem;
        display: inline-flex;
        align-items: center;
    }

    /* keep hero image proportional on small screens */
    .hero-image-wrap img {
        aspect-ratio: 16/9;
        max-height: 56vw;
    }

    /* narrower briefing chips on small phones */
    .mobile-briefing-chip {
        min-width: 155px;
        max-width: 175px;
    }

    .feed-header {
        overflow: visible;
    }

    .feed-header-inner {
        position: relative;
        flex-wrap: nowrap;
        align-items: center;
        gap: .45rem;
        padding: .45rem .65rem;
    }

    .feed-header-center-splash {
        top: calc(50% + 1px);
    }

    .feed-splash-mini {
        width: 84px;
        height: 84px;
    }

    .feed-header-main {
        flex: 1 1 auto;
        min-width: 0;
        flex-wrap: nowrap;
        align-items: center;
        gap: .4rem;
    }

    .feed-header h2 {
        width: auto;
        min-width: 0;
        font-size: .98rem;
        line-height: 1.15;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .feed-count {
        flex: 0 0 auto;
        white-space: nowrap;
        font-size: .72rem;
        padding: .12rem .45rem;
    }

    #topicFilters {
        display: none !important;
        position: absolute;
        top: calc(100% + .35rem);
        left: .65rem;
        right: .65rem;
        z-index: 140;
        padding: .55rem;
        border: 1px solid var(--border);
        border-radius: 12px;
        background: rgba(255, 255, 255, .98);
        box-shadow: var(--shadow);
        gap: .35rem;
        max-height: min(50vh, 280px);
        overflow-y: auto;
    }

    #topicFilters.topic-filters-open {
        display: flex !important;
    }

    .feed-header-actions {
        display: flex;
        flex: 0 1 auto;
        min-width: 0;
        margin-left: 0;
        margin-top: 0;
        justify-content: flex-end;
        flex-wrap: nowrap;
        gap: .28rem;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .feed-header-actions::-webkit-scrollbar {
        display: none;
    }

    .feed-header-actions .btn {
        flex: 0 0 auto;
        white-space: nowrap;
        padding: .3rem .48rem;
        font-size: .72rem;
    }

    .header-language-control {
        gap: .18rem;
        padding: .14rem .22rem;
    }

    .header-language-flag {
        width: 16px;
        height: 12px;
    }

    .header-language-caret {
        font-size: .54rem;
    }

    .header-language-menu {
        grid-template-columns: repeat(3, 1fr);
        min-width: 112px;
        right: -8px;
    }

    #headerLanguage {
        width: 0;
        height: 0;
    }

    .mobile-topic-filter-toggle {
        display: inline-flex;
    }

    .feed-logo-image {
        width: 32px;
        height: 32px;
        border-radius: 8px;
        padding: .12rem;
        flex: 0 0 auto;
    }

    .loading-state {
        min-height: 280px;
        border-radius: 14px;
    }

    .loading-splash {
        max-height: 220px;
    }

    .loading-panel {
        padding: 1.4rem .9rem;
    }

    .loading-subtitle {
        font-size: .9rem;
    }
}

/* ── Narrow phones: thumbnail-list layout ───────────────────
    Width-only trigger is more reliable than orientation checks
    on some mobile browsers/webviews. */
@media (max-width: 700px) {

    /* Hero: smaller image so a bit of text is visible above fold */
    .hero-image-wrap img {
        aspect-ratio: 16/9;
        max-height: 42vw;
    }

    /* ── Featured: stacked card layout (safe anti-overflow) ── */
    .featured-article {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: .45rem;
        border: 1px solid var(--border);
        border-radius: 10px;
        padding: .75rem;
        margin: 0 0 .75rem 0;
        border-right: 1px solid var(--border);
    }

    .featured-image-wrap {
        width: 100%;
        flex: 0 0 auto;
    }

    .featured-image-wrap img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
        object-fit: cover;
        margin-bottom: 0;
    }

    .featured-kicker {
        margin-bottom: .15rem;
    }

    .featured-headline {
        font-size: .95rem;
        line-height: 1.25;
    }

    .featured-snippet {
        display: none;
        /* hide snippet — save space for more articles */
    }

    /* ── Standard: stacked card layout (safe anti-overflow) ── */
    .standard-article {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: .35rem;
        border: 1px solid var(--border);
        border-radius: 10px;
        padding: .65rem;
        margin: 0 0 .75rem 0;
        border-right: 1px solid var(--border) !important;
    }

    .standard-image-wrap {
        width: 100%;
        flex: 0 0 auto;
    }

    .standard-image-wrap img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
        object-fit: cover;
        margin-bottom: 0;
    }

    .standard-headline {
        font-size: .88rem;
        line-height: 1.25;
    }

    .standard-snippet {
        display: none;
    }

    .featured-actions,
    .standard-actions {
        width: 100%;
        margin-top: .45rem;
        justify-content: flex-start;
        align-items: center;
    }

    .featured-actions .read-link,
    .standard-actions .read-link {
        margin-left: 0;
    }
}

/* ══════════════════════════════════════════════════════════════
   Event Group Card  (topic-grouped multi-perspective story)
   ══════════════════════════════════════════════════════════════ */

.paper-event-groups,
.paper-topic-showcase {
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--accent);
}

.paper-topic-showcase .event-group-card {
    margin-bottom: 1.2rem;
}

.event-group-card {
    padding-bottom: 1.75rem;
    margin-bottom: 1.75rem;
    border-bottom: 1px solid var(--border);
}

.event-group-card:last-child {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: none;
}

/* ── Header: badges + headline ── */
.event-group-kicker {
    display: flex;
    align-items: center;
    gap: .4rem;
    flex-wrap: wrap;
    margin-bottom: .55rem;
}

.event-group-headline {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 2.1rem;
    font-weight: 700;
    line-height: 1.18;
    letter-spacing: -.025em;
    color: var(--text);
    overflow-wrap: break-word;
    word-break: break-word;
    margin-bottom: 1rem;
}

.event-group-headline a {
    color: inherit;
    text-decoration: none;
}

.event-group-headline a:hover {
    text-decoration: underline;
    text-decoration-thickness: 2px;
}

/* ── Body: image | description side by side ── */
.event-group-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
    margin-bottom: 1rem;
}

.event-group-card.image-right .event-group-image-wrap {
    order: 2;
}

.event-group-card.image-right .event-group-desc {
    order: 1;
}

.event-group-image-wrap {
    border-radius: var(--radius);
    overflow: hidden;
    line-height: 0;
}

.event-group-image-wrap img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: var(--radius);
    display: block;
}

.event-group-desc {
    display: flex;
    flex-direction: column;
    gap: .85rem;
    justify-content: center;
}

.event-group-desc.no-img {
    grid-column: 1 / -1;
}

.event-group-intro {
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text);
    opacity: .88;
    overflow-wrap: break-word;
    margin: 0;
}

.topic-showcase-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.topic-showcase-item {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding: .85rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    min-width: 0;
}

.topic-showcase-item.is-topic-group {
    background: #faf9f7;
}

.topic-showcase-image-wrap {
    width: 100%;
    overflow: hidden;
    line-height: 0;
    border-radius: calc(var(--radius) - 2px);
}

.topic-showcase-image-wrap img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

.topic-showcase-kicker {
    display: flex;
    align-items: center;
    gap: .35rem;
    flex-wrap: wrap;
}

.topic-showcase-headline {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.28;
    color: var(--text);
}

.topic-showcase-snippet {
    font-size: .76rem;
    line-height: 1.5;
    color: var(--muted);
}

.topic-showcase-meta {
    font-size: .66rem;
    color: var(--muted);
}

.topic-showcase-actions {
    display: flex;
    align-items: center;
    gap: .3rem;
    flex-wrap: wrap;
    margin-top: auto;
}

/* ── Alignment indicator badge ── */
.alignment-indicator {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    font-size: .8rem;
    font-weight: 600;
    padding: .5rem .8rem;
    border-radius: 9px;
    border: 1px solid transparent;
    line-height: 1.3;
}

.alignment-indicator.align-consensus {
    background: #effaf3;
    border-color: #a8d5b5;
    color: #1a6635;
}

.alignment-indicator.align-mixed {
    background: #fff8ec;
    border-color: #f0d08a;
    color: #7a4f00;
}

.alignment-indicator.align-divergent {
    background: #fdf0f0;
    border-color: #e0a0a0;
    color: #8b0000;
}

.align-icon {
    font-size: 1rem;
    line-height: 1;
    flex-shrink: 0;
}

.align-meta {
    font-weight: 400;
    opacity: .72;
}

/* ── Unified topic-group coverage ── */
.topic-group-coverage {
    display: flex;
    flex-direction: column;
    gap: .65rem;
}

.topic-group-coverage--compact {
    gap: .45rem;
}

.topic-group-coverage--compact .alignment-indicator {
    font-size: .72rem;
    padding: .42rem .65rem;
}

.topic-group-source-links,
.event-group-sources {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}

.topic-group-source-links .event-group-meta {
    margin-right: .15rem;
}

.event-group-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: .85rem;
    border-top: 1px solid var(--border);
}

.event-group-sources-label {
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--muted);
    white-space: nowrap;
    margin-right: .2rem;
}

.source-chip {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .75rem;
    font-weight: 600;
    color: var(--accent);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: .22rem .65rem;
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s, border-color .15s, color .15s;
}

.source-chip--compact {
    font-size: .68rem;
    padding: .18rem .52rem;
    gap: .24rem;
}

.source-chip:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.event-group-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: .4rem;
    flex-wrap: wrap;
}

/* ── Mobile ── */
@media (max-width: 640px) {
    .event-group-body {
        grid-template-columns: 1fr;
    }

    .event-group-card.image-right .event-group-image-wrap,
    .event-group-card.image-right .event-group-desc {
        order: unset;
    }

    .event-group-headline {
        font-size: 1.5rem;
    }

    .event-group-actions {
        margin-left: 0;
        width: 100%;
    }
}