/* ============================================
   COMPOXER NEWS — Editorial Design
   Official announcements & articles
   ============================================ */

/* --- CSS Variables for News --- */
:root {
    --news-font-display: 'Playfair Display', Georgia, serif;
    --news-font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --news-font-mono: 'JetBrains Mono', monospace;
}

/* --- News Page Base --- */
/* Override global body styles that lock scroll for the main app */
body.news-page {
    height: auto !important;
    overflow: auto !important;
    overflow-x: hidden;
}

.news-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--bg-primary);
}

/* --- Brand Header overrides for news (no sidebar shift) --- */
.news-page .brand-header {
    left: 0 !important;
}

.news-page .brand-center {
    cursor: pointer;
    pointer-events: auto;
    text-decoration: none;
}

.news-page .brand-center:hover {
    opacity: 0.8;
}

.news-page .back-to-app-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.65);
    transition: all 0.2s ease;
    text-decoration: none;
}

.news-page .back-to-app-btn:hover {
    background: rgba(255, 255, 255, 0.09);
    color: rgba(255, 255, 255, 0.95);
}

/* "NEWS" section tag inside brand-name */
.brand-news-tag {
    font-style: italic !important;
    font-weight: 400 !important;
    font-size: 0.75em;
    letter-spacing: 0.25em;
    color: rgba(255, 255, 255, 0.45) !important;
    margin-left: 0.3em;
    vertical-align: middle;
    text-transform: uppercase;
}

/* Active state for News item in dropdown */
.user-menu-item.user-menu-item-active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

/* --- News Main --- */
.news-main {
    flex: 1;
    padding-top: 56px;
}

.news-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 28px 24px 60px;
}

/* --- Loading State --- */
.news-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 80px 24px;
    color: rgba(255, 255, 255, 0.4);
}

.news-loading p {
    font-family: var(--news-font-body);
    font-size: 0.9rem;
    margin: 0;
}

.news-loading-spinner {
    width: 28px;
    height: 28px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top-color: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

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

/* --- Empty State --- */
.news-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 80px 24px;
    text-align: center;
}

.news-empty-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.news-empty-icon svg {
    color: rgba(255, 255, 255, 0.18);
}

.news-empty h3 {
    font-family: var(--news-font-body);
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.news-empty p {
    font-family: var(--news-font-body);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.4);
    margin: 0;
}

/* ============================================
   FEATURED SECTION — Hero (full width, no sidebar)
   ============================================ */

/* ── Featured wrapper ─────────────────────── */
.news-featured {
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 36px;
    box-shadow: 0 8px 48px rgba(0, 0, 0, 0.6);
}

/* ── Hero card — full-bleed, text over image ── */
.news-hero-card {
    position: relative;
    min-height: 340px;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    align-items: flex-end;          /* text anchors to the bottom */
}

/* Hover: subtle lift on the image */
.news-hero-card:hover .news-hero-visual {
    transform: scale(1.03);
}

/* ── Background layer: image or gradient ── */
.news-hero-visual {
    position: absolute;
    inset: 0;
    z-index: 0;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Background when there's a featured image */
.news-hero-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: brightness(0.55) saturate(0.9);
}

/* Background when there's NO image — branded dark gradient */
.news-hero-visual.no-image {
    background:
        radial-gradient(ellipse at 20% 20%, rgba(124, 106, 240, 0.25) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 75%, rgba(34, 211, 238, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(255, 255, 255, 0.03) 0%, transparent 70%),
        linear-gradient(160deg, #060608 0%, #0e0e14 40%, #08080c 100%);
}

/* Compoxer pentagon logo centered in the no-image state */
.news-hero-visual.no-image .hero-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.18;
    filter: blur(0.5px);
}

/* Animated noise grain for texture */
.news-hero-visual.no-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
    opacity: 0.4;
    mix-blend-mode: overlay;
    pointer-events: none;
}

/* ── Gradient veil: ensures text always readable ── */
.news-hero-card::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(
            to top,
            rgba(6, 6, 8, 0.96)  0%,
            rgba(6, 6, 8, 0.72)  30%,
            rgba(6, 6, 8, 0.28)  60%,
            rgba(6, 6, 8, 0.06)  100%
        );
}

/* Subtle vignette on sides */
.news-hero-card::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(to right,  rgba(6,6,8,0.5) 0%, transparent 30%),
        linear-gradient(to left,   rgba(6,6,8,0.3) 0%, transparent 30%);
    pointer-events: none;
}

/* ── Text body — sits above all overlays ── */
.news-hero-body {
    position: relative;
    z-index: 2;
    padding: 32px 40px;
    max-width: 640px;
}

/* Category + date pill */
.news-hero-meta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--news-font-body);
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 18px;
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 100px;
    backdrop-filter: blur(6px);
}

.news-hero-category {
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
}

/* Large editorial title */
.news-hero-title {
    font-family: var(--news-font-display);
    font-size: 2.2rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.15;
    margin: 0 0 12px;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.6);
}

/* Excerpt — beneath the title */
.news-hero-excerpt {
    font-family: var(--news-font-body);
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.68);
    line-height: 1.65;
    margin: 0 0 24px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

/* Read more CTA */
.news-hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--news-font-body);
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 0.02em;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 100px;
    backdrop-filter: blur(8px);
    transition: background 0.2s ease, border-color 0.2s ease;
    pointer-events: none; /* card itself is clickable */
}

.news-hero-card:hover .news-hero-cta {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.36);
}

/* ============================================
   TABLE SECTION — All Articles
   ============================================ */

.news-table-section {
    /* Below featured */
}

.news-table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 16px;
}

.news-table-title {
    font-family: var(--news-font-body);
    font-size: 1.4rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
    letter-spacing: -0.02em;
}

.news-search {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.3);
    min-width: 200px;
    transition: all 0.2s ease;
}

.news-search:focus-within {
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.05);
}

.news-search input {
    background: transparent;
    border: none;
    outline: none;
    font-family: var(--news-font-body);
    font-size: 0.88rem;
    color: #ffffff;
    flex: 1;
    min-width: 0;
}

.news-search input::placeholder {
    color: rgba(255, 255, 255, 0.28);
}

/* Table Columns */
.news-table-columns {
    display: grid;
    grid-template-columns: 130px 160px 1fr;
    padding: 0 0 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.news-table-columns span {
    font-family: var(--news-font-body);
    font-size: 0.6rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.28);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Table Rows */
.news-table-row {
    display: grid;
    grid-template-columns: 130px 160px 1fr;
    padding: 11px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: background 0.12s ease;
    border-radius: 4px;
}

.news-table-row:hover {
    background: rgba(255, 255, 255, 0.028);
}

.news-table-row.hidden {
    display: none !important;
}

.news-table-cell {
    font-family: var(--news-font-body);
    font-size: 0.83rem;
    color: rgba(255, 255, 255, 0.45);
    align-self: center;
    padding-right: 16px;
    line-height: 1.4;
}

.news-table-cell.news-cell-title {
    color: rgba(255, 255, 255, 0.88);
    font-weight: 500;
    padding-right: 0;
}

.news-table-no-results {
    padding: 40px 0;
    font-family: var(--news-font-body);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.3);
    text-align: center;
}

/* ── Table Pagination ── */
.news-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: 4px;
}

.news-page-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    transition: all 0.15s ease;
}

.news-page-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.news-page-btn:disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

.news-page-info {
    font-family: var(--news-font-body);
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.04em;
    min-width: 36px;
    text-align: center;
    user-select: none;
}

/* ============================================
   ARTICLE IN-PAGE VIEW
   Full editorial article experience
   ============================================ */

/* Container: same flow as news-listing, not a modal */
.article-view {
    padding-bottom: 100px;
    animation: articleFadeIn 0.3s ease both;
}

@keyframes articleFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Back breadcrumb bar */
.article-back-bar {
    max-width: 860px;
    margin: 0 auto;
    padding: 20px 24px 0;
}

.article-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--news-font-body);
    font-size: 0.82rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.45);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px 0;
    transition: color 0.18s ease;
    letter-spacing: 0.01em;
}

.article-back-btn:hover {
    color: rgba(255, 255, 255, 0.9);
}

.article-back-btn svg {
    transition: transform 0.18s ease;
}

.article-back-btn:hover svg {
    transform: translateX(-3px);
}

/* Featured image — wide, above the text column */
.article-featured-image {
    max-width: 860px;
    margin: 24px auto 0;
    padding: 0 24px;
}

.article-featured-image img {
    width: 100%;
    height: 440px;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

/* Main content column — narrower for readability */
.article-view-inner {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Article Header ── */
.article-view-header {
    padding-top: 48px;
    padding-bottom: 32px;
}

.article-view-meta {
    display: flex;
    align-items: center;
    gap: 7px;
    font-family: var(--news-font-body);
    font-size: 0.78rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.02em;
    margin-bottom: 20px;
}

.article-view-category {
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
    text-transform: capitalize;
}

.article-view-title {
    font-family: var(--news-font-display);
    font-size: 2.65rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.18;
    margin: 0 0 18px;
    letter-spacing: -0.02em;
}

.article-view-subtitle {
    font-family: var(--news-font-body);
    font-size: 1.2rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.52);
    line-height: 1.6;
    margin: 0 0 24px;
}

/* Byline row */
.article-view-byline {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 4px;
}

.article-byline-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(124,106,240,0.4) 0%, rgba(34,211,238,0.3) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.article-byline-avatar svg {
    color: rgba(255, 255, 255, 0.6);
}

.article-byline-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.article-byline-name {
    font-family: var(--news-font-body);
    font-size: 0.88rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.82);
}

.article-byline-date {
    font-family: var(--news-font-body);
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.38);
}

/* Divider between header and body */
.article-view-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 0 0 44px;
}

/* ── Article Body — Markdown rendered ── */
.article-view-body {
    font-family: var(--news-font-body);
    font-size: 1.08rem;
    color: rgba(255, 255, 255, 0.80);
    line-height: 1.82;
}

.article-view-body > * + * {
    margin-top: 0;
}

.article-view-body h1,
.article-view-body h2,
.article-view-body h3,
.article-view-body h4 {
    font-family: var(--news-font-display);
    color: #ffffff;
    margin: 2.2em 0 0.75em;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.article-view-body h1 { font-size: 1.85rem; }
.article-view-body h2 {
    font-size: 1.5rem;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.article-view-body h3 { font-size: 1.25rem; }
.article-view-body h4 { font-size: 1.1rem; }

.article-view-body p {
    margin: 0 0 1.6em;
}

.article-view-body a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.3);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.15s ease, color 0.15s ease;
}

.article-view-body a:hover {
    color: #ffffff;
    text-decoration-color: rgba(255, 255, 255, 0.7);
}

.article-view-body strong {
    color: #ffffff;
    font-weight: 600;
}

.article-view-body em {
    font-style: italic;
    color: rgba(255, 255, 255, 0.75);
}

.article-view-body ul,
.article-view-body ol {
    margin: 0 0 1.6em;
    padding-left: 1.6em;
}

.article-view-body li {
    margin-bottom: 0.55em;
    padding-left: 0.25em;
}

.article-view-body blockquote {
    margin: 2em 0;
    padding: 1.25em 1.75em;
    border-left: 3px solid rgba(124, 106, 240, 0.6);
    background: rgba(124, 106, 240, 0.04);
    border-radius: 0 10px 10px 0;
    font-size: 1.08em;
    font-style: italic;
    color: rgba(255, 255, 255, 0.72);
}

.article-view-body blockquote p:last-child {
    margin-bottom: 0;
}

.article-view-body code {
    font-family: var(--news-font-mono);
    font-size: 0.88em;
    background: rgba(255, 255, 255, 0.07);
    padding: 0.2em 0.5em;
    border-radius: 5px;
    color: var(--accent-cyan);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.article-view-body pre {
    margin: 2em 0;
    padding: 1.5em;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    overflow-x: auto;
}

.article-view-body pre code {
    background: transparent;
    border: none;
    padding: 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.9rem;
    line-height: 1.65;
}

.article-view-body hr {
    border: none;
    height: 1px;
    background: rgba(255, 255, 255, 0.09);
    margin: 3em 0;
}

.article-view-body img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 2em auto;
    display: block;
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.5);
}

.article-view-body figure {
    margin: 2.5em 0;
}

.article-view-body figcaption {
    font-size: 0.83rem;
    color: rgba(255, 255, 255, 0.38);
    text-align: center;
    margin-top: 10px;
    font-style: italic;
}

.article-view-body video,
.article-view-body audio {
    max-width: 100%;
    border-radius: 12px;
    margin: 2em 0;
    display: block;
}

.article-view-body audio {
    width: 100%;
}

/* ── Embedded Media from {{media:ref}} ── */
.article-media {
    margin: 2.5em 0;
    padding: 0;
    border: none;
    background: transparent;
}

.article-media img,
.article-media video {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.5);
}

.article-media-image img {
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.article-media-video video {
    aspect-ratio: 16 / 9;
    object-fit: contain;
    background: #000;
}

.article-media-audio {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 20px 24px;
}

.article-media-audio audio {
    width: 100%;
    margin: 0;
    border-radius: 8px;
}

.article-media-midi {
    background: linear-gradient(135deg, rgba(124, 106, 240, 0.08) 0%, rgba(34, 211, 238, 0.05) 100%);
    border: 1px solid rgba(124, 106, 240, 0.2);
    border-radius: 12px;
    padding: 20px 24px;
    text-align: center;
}

.midi-download-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--news-font-body);
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    padding: 12px 24px;
    background: rgba(124, 106, 240, 0.15);
    border: 1px solid rgba(124, 106, 240, 0.3);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.midi-download-link:hover {
    background: rgba(124, 106, 240, 0.25);
    border-color: rgba(124, 106, 240, 0.5);
    color: #ffffff;
    text-decoration: none;
}

.midi-download-link svg {
    flex-shrink: 0;
}

.article-media figcaption {
    font-family: var(--news-font-body);
    font-size: 0.83rem;
    color: rgba(255, 255, 255, 0.45);
    text-align: center;
    margin-top: 12px;
    font-style: italic;
    line-height: 1.5;
}

.article-view-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 2em 0;
    font-size: 0.92rem;
}

.article-view-body th,
.article-view-body td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.article-view-body th {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.025);
}

/* ── Article Share Bar ── */
.article-share-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 28px;
    margin-top: 48px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.article-share-label {
    font-family: var(--news-font-body);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.3);
    white-space: nowrap;
    flex-shrink: 0;
    margin-right: 2px;
}

.article-share-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.article-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
    text-decoration: none;
    flex-shrink: 0;
    padding: 0;
}

.article-share-btn svg {
    width: 14px;
    height: 14px;
}

.article-share-btn:hover {
    color: rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.16);
    transform: scale(1.1);
    text-decoration: none;
}

.article-share-btn:active {
    transform: scale(0.92);
}

.article-share-btn.copied {
    color: #34c759;
    border-color: rgba(52, 199, 89, 0.3);
    background: rgba(52, 199, 89, 0.07);
}

/* ── Footer ── */
.article-view-footer {
    margin-top: 72px;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.article-back-footer {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--news-font-body);
    font-size: 0.88rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px 18px;
    cursor: pointer;
    transition: all 0.18s ease;
}

.article-back-footer:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.9);
}

.article-back-footer svg {
    transition: transform 0.18s ease;
}

.article-back-footer:hover svg {
    transform: translateX(-3px);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 860px) {
    .news-hero-card {
        min-height: 340px;
    }

    .news-hero-body {
        padding: 32px 28px;
    }

    .news-hero-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .news-main {
        padding-top: 50px;
    }

    .news-container {
        padding: 20px 18px 60px;
        padding-bottom: max(60px, env(safe-area-inset-bottom));
    }

    .news-featured {
        margin-bottom: 24px;
        border-radius: 10px;
    }

    .news-hero-card {
        min-height: 280px;
    }

    .news-hero-body {
        padding: 24px 20px;
    }

    .news-hero-title {
        font-size: 1.6rem;
    }

    .news-hero-excerpt {
        font-size: 0.92rem;
        -webkit-line-clamp: 2;
    }

    .news-table-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .news-search {
        width: 100%;
        min-width: auto;
        min-height: 44px;
    }

    .news-search input {
        font-size: 16px;
    }

    .news-table-columns,
    .news-table-row {
        grid-template-columns: 100px 1fr;
    }

    .news-col-category,
    .news-table-row .news-table-cell:nth-child(2) {
        display: none;
    }

    .news-table-row {
        padding: 14px 0;
        min-height: 44px;
    }

    .news-table-title {
        font-size: 1.25rem;
    }

    .news-page-btn {
        width: 40px;
        height: 40px;
    }

    /* Article view responsive */
    .article-view-title {
        font-size: 1.85rem;
    }

    .article-view-subtitle {
        font-size: 1.05rem;
    }

    .article-featured-image img {
        height: 240px;
        border-radius: 10px;
    }

    .article-view-body {
        font-size: 1rem;
    }

    .article-view-header {
        padding-top: 32px;
        padding-bottom: 24px;
    }

    .article-back-btn {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    .article-back-footer {
        display: none;
    }

    .brand-news-tag {
        display: none;
    }

    .article-view-body table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .article-view-body pre {
        padding: 1em;
        font-size: 0.82rem;
    }
}

@media (max-width: 480px) {
    .news-hero-card {
        min-height: 240px;
    }

    .news-hero-body {
        padding: 18px 18px;
        max-width: 100%;
    }

    .news-hero-title {
        font-size: 1.3rem;
    }

    .news-hero-excerpt {
        -webkit-line-clamp: 2;
        font-size: 0.88rem;
    }

    .news-hero-cta {
        display: none;
    }

    .news-hero-meta {
        font-size: 0.65rem;
        padding: 4px 10px;
        margin-bottom: 10px;
    }

    .news-table-columns,
    .news-table-row {
        grid-template-columns: 85px 1fr;
    }

    .news-table-cell {
        font-size: 0.78rem;
        padding-right: 10px;
    }

    .news-table-cell.news-cell-title {
        font-size: 0.82rem;
    }

    /* Article view mobile */
    .article-back-bar,
    .article-featured-image,
    .article-view-inner {
        padding-left: 18px;
        padding-right: 18px;
    }

    .article-view-title {
        font-size: 1.45rem;
    }

    .article-view-subtitle {
        font-size: 0.92rem;
    }

    .article-featured-image img {
        height: 180px;
        border-radius: 8px;
    }

    .article-view-header {
        padding-top: 24px;
        padding-bottom: 20px;
    }

    .article-view-body {
        font-size: 0.95rem;
        line-height: 1.75;
    }

    .article-view-body blockquote {
        padding: 0.8em 1em;
        margin: 1.5em 0;
    }

    .article-view-body h2 {
        font-size: 1.3rem;
    }

    .article-view-body h3 {
        font-size: 1.1rem;
    }

    .article-byline-avatar {
        width: 36px;
        height: 36px;
    }

    .article-view-footer {
        margin-top: 48px;
    }
}

/* --- Word wrap: prevent long strings without spaces from overflowing --- */
.news-hero-title,
.news-hero-excerpt,
.news-sidebar-title,
.news-sidebar-excerpt,
.news-table-cell,
.article-view-title,
.article-view-subtitle,
.article-view-body,
.article-view-body p,
.article-view-body li,
.article-view-body td,
.article-view-body th,
.article-view-body blockquote,
.article-view-body h1,
.article-view-body h2,
.article-view-body h3,
.article-view-body h4 {
    overflow-wrap: break-word;
    word-break: break-word;
    min-width: 0;
}

/* --- Utility --- */
.hidden {
    display: none !important;
}
