/*
 * GamePulse — Global Styles
 *
 * Design system:
 *   - Light editorial aesthetic with warm neutrals
 *   - Font: self-hosted Plus Jakarta Sans (body) + IBM Plex Mono (data/labels)
 *   - Colour-coded source badges + entity type badges
 *   - Category chips for filtering
 *   - Deep trends: sentiment tables + source/topic heatmap
 *   - 8px spacing scale, mobile-first responsive layout
 */

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/fonts/plus-jakarta-sans-400.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/fonts/plus-jakarta-sans-500.ttf") format("truetype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/fonts/plus-jakarta-sans-600.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/fonts/plus-jakarta-sans-700.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/fonts/plus-jakarta-sans-800.ttf") format("truetype");
  font-style: normal;
  font-weight: 800;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/ibm-plex-mono-400.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/ibm-plex-mono-500.ttf") format("truetype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/ibm-plex-mono-600.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

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

[hidden] {
  display: none !important;
}

/* ── Tokens ────────────────────────────────────────────────────── */
:root {
  --font-body: "Plus Jakarta Sans", "Avenir Next", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", ui-monospace, monospace;

  --bg: #edf0f2;
  --bg-alt: #f7f8f9;
  --surface: #ffffff;
  --surface-raised: #f1f3f5;
  --surface-hover: #e7eaee;
  --surface-soft: rgba(255, 255, 255, 0.96);

  --text: #18181d;
  --text-dim: #474d58;
  --text-faint: #636975;

  --accent: #ff634a;
  --accent-soft: rgba(255, 99, 74, 0.14);
  --accent-strong: #ff7d67;
  --link: #e45b43;
  --link-hover: #ff816d;

  --border: #d8dde3;
  --border-hover: #c3cad3;
  --shadow-card: 0 18px 40px rgba(31, 38, 46, 0.06);
  --shadow-card-hover: 0 24px 52px rgba(31, 38, 46, 0.1);

  --max-w: 1360px;
  --radius: 10px;
  --radius-sm: 6px;
  --radius-pill: 9999px;

  --sp-xs: 0.25rem;
  --sp-sm: 0.5rem;
  --sp-md: 1rem;
  --sp-lg: 1.5rem;
  --sp-xl: 2.5rem;
  --sp-2xl: 4rem;
}

/* ── Dark theme tokens ─────────────────────────────────────── */
[data-theme="dark"] {
  --bg: #141518;
  --bg-alt: #1a1c20;
  --surface: #1e2025;
  --surface-raised: #24262b;
  --surface-hover: #2a2d33;
  --surface-soft: rgba(30, 32, 37, 0.96);

  --text: #e4e6ea;
  --text-dim: #9ea3ad;
  --text-faint: #737880;

  --accent: #ff7d67;
  --accent-soft: rgba(255, 125, 103, 0.18);
  --accent-strong: #ff9580;
  --link: #ff9176;
  --link-hover: #ffb3a0;

  --border: #2e3139;
  --border-hover: #3d424c;
  --shadow-card: 0 18px 40px rgba(0, 0, 0, 0.32);
  --shadow-card-hover: 0 24px 52px rgba(0, 0, 0, 0.44);

  color-scheme: dark;
}

[data-theme="dark"] body {
  background: var(--bg);
  color: var(--text);
}

/* ── Opaline theme overrides ─────────────────────────────────── */
.filter-chip,
.search-input,
.home-sentiment-admin__editor,
.sidebar-detail-action,
.page-btn,
.auth-inline-btn,
.control-select,
.threshold-chip {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(24, 24, 29, 0.08);
  box-shadow: none;
}

.filter-chip:hover,
.sidebar-detail-action:hover,
.page-btn:hover,
.auth-inline-btn:hover,
.control-select:hover {
  background: rgba(255, 255, 255, 0.96);
}

.filter-chip--soft,
.filter-chip--warning,
.filter-chip--danger {
  background: rgba(244, 244, 246, 0.94);
}

.sidebar-card,
.magazine-card,
.article-card,
.spotlight-card,
.ops-lock-card,
.admin-auth-card,
.admin-gate-card,
.admin-task-card,
.admin-status-inline,
.admin-disclosure,
.sentiment-card,
.lead-support-item,
.lead-social-item,
.story-cluster__detail,
.sidebar-disclosure__panel,
.steam-top-table-wrap,
.sentiment-article-item {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 243, 245, 0.94));
  border-color: rgba(24, 24, 29, 0.06);
  box-shadow: 0 18px 36px rgba(31, 38, 46, 0.05);
}

.sidebar-card::before,
.magazine-card::before,
.article-card::before,
.admin-auth-card::before,
.admin-gate-card::before,
.admin-task-card::before {
  background: linear-gradient(90deg, rgba(24, 24, 29, 0.12), rgba(24, 24, 29, 0));
}

.home-lead-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(241, 243, 245, 0.95));
}

.home-feed-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 243, 245, 0.94));
}

.source-badge,
.cat-chip,
.type-badge,
.social-stat-chip,
.review-score-stat {
  background: rgba(244, 244, 246, 0.92);
  border-color: rgba(24, 24, 29, 0.08);
}

.source-badge {
  color: var(--text-dim);
}

.source-badge--accented {
  box-shadow: none;
}

.cat-chip,
.sent-pill,
.game-pill,
.rumor-pill,
.roundup-badge,
.read-time,
.review-score-stat,
.social-stat-chip,
.type-badge {
  cursor: default;
}

.card-pill-footer,
.story-cluster__hint,
.lead-social-card {
  border-top-color: rgba(24, 24, 29, 0.06);
}

.trend-table-wrap,
.sentiment-table-wrap,
.steam-top-table-wrap,
.admin-table-wrap,
.heatmap-wrap {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.trend-table,
.sentiment-table,
.steam-top-table,
.heatmap-table {
  border-collapse: separate;
  border-spacing: 0 10px;
}

.trend-table th,
.sentiment-table th,
.steam-top-table th,
.heatmap-table th {
  background: transparent;
  border-bottom: 0;
  color: var(--text-faint);
  padding-top: 0;
  padding-bottom: 0.25rem;
}

.trend-table td,
.sentiment-table td,
.steam-top-table td {
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 0;
  box-shadow: inset 0 0 0 1px rgba(24, 24, 29, 0.04);
}

.trend-table td:first-child,
.sentiment-table td:first-child,
.steam-top-table td:first-child {
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
}

.trend-table td:last-child,
.sentiment-table td:last-child,
.steam-top-table td:last-child {
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
}

.trend-table tr:hover td,
.sentiment-table tr:hover td {
  background: rgba(244, 244, 246, 0.96);
}

.trend-table tr.expandable-row:hover td,
.sentiment-table tr.expandable-row:hover td,
.trend-table tr.expandable-row.is-expanded td,
.sentiment-table tr.expandable-row.is-expanded td,
.trend-table tr.expandable-row:focus-visible td,
.sentiment-table tr.expandable-row:focus-visible td {
  background: rgba(247, 247, 249, 0.98);
  box-shadow: inset 0 0 0 1px rgba(24, 24, 29, 0.06);
}

.sentiment-details-row td,
.sentiment-details-cell {
  background: transparent;
  box-shadow: none;
}

.sentiment-details-cell {
  padding-top: 0;
}

.sentiment-details,
.sentiment-method,
.admin-disclosure__content {
  background: transparent;
}

.heatmap-wrap {
  overflow: visible;
}

.heatmap-table {
  border-collapse: separate;
  border-spacing: 0 8px;
}

.heatmap-table th,
.heatmap-source,
.heatmap-cell {
  border-bottom: 0;
  border-right: 0;
}

.heatmap-source,
.heatmap-cell {
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 0 0 1px rgba(24, 24, 29, 0.04);
}

.heatmap-source {
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
}

.heatmap-topic:last-child .heatmap-cell {
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
}

/* ── Dark mode opaline overrides ──────────────────────────────── */
[data-theme="dark"] .filter-chip,
[data-theme="dark"] .search-input,
[data-theme="dark"] .home-sentiment-admin__editor,
[data-theme="dark"] .sidebar-detail-action,
[data-theme="dark"] .page-btn,
[data-theme="dark"] .auth-inline-btn,
[data-theme="dark"] .control-select,
[data-theme="dark"] .threshold-chip {
  background: rgba(30, 32, 37, 0.92);
  border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .filter-chip:hover,
[data-theme="dark"] .sidebar-detail-action:hover,
[data-theme="dark"] .page-btn:hover,
[data-theme="dark"] .auth-inline-btn:hover,
[data-theme="dark"] .control-select:hover {
  background: rgba(42, 45, 51, 0.96);
}

[data-theme="dark"] .sidebar-card,
[data-theme="dark"] .magazine-card,
[data-theme="dark"] .article-card,
[data-theme="dark"] .spotlight-card,
[data-theme="dark"] .ops-lock-card,
[data-theme="dark"] .admin-auth-card,
[data-theme="dark"] .admin-gate-card,
[data-theme="dark"] .admin-task-card,
[data-theme="dark"] .admin-status-inline,
[data-theme="dark"] .admin-disclosure,
[data-theme="dark"] .sentiment-card,
[data-theme="dark"] .lead-support-item,
[data-theme="dark"] .lead-social-item,
[data-theme="dark"] .story-cluster__detail,
[data-theme="dark"] .sidebar-disclosure__panel,
[data-theme="dark"] .steam-top-table-wrap,
[data-theme="dark"] .sentiment-article-item {
  background:
    linear-gradient(180deg, rgba(30, 32, 37, 0.98), rgba(26, 28, 32, 0.94));
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
}

[data-theme="dark"] .sidebar-card::before,
[data-theme="dark"] .magazine-card::before,
[data-theme="dark"] .article-card::before,
[data-theme="dark"] .admin-auth-card::before,
[data-theme="dark"] .admin-gate-card::before,
[data-theme="dark"] .admin-task-card::before {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0));
}

[data-theme="dark"] .home-lead-panel {
  background:
    linear-gradient(180deg, rgba(30, 32, 37, 0.99), rgba(26, 28, 32, 0.95));
}

[data-theme="dark"] .home-feed-panel {
  background:
    linear-gradient(180deg, rgba(30, 32, 37, 0.98), rgba(26, 28, 32, 0.94));
}

[data-theme="dark"] .source-badge,
[data-theme="dark"] .cat-chip,
[data-theme="dark"] .type-badge,
[data-theme="dark"] .social-stat-chip,
[data-theme="dark"] .review-score-stat {
  background: rgba(42, 45, 51, 0.92);
  border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .trend-table td,
[data-theme="dark"] .sentiment-table td,
[data-theme="dark"] .steam-top-table td {
  background: rgba(30, 32, 37, 0.82);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  color: var(--text);
}

[data-theme="dark"] .trend-table tr:hover td,
[data-theme="dark"] .sentiment-table tr:hover td {
  background: rgba(42, 45, 51, 0.96);
}

[data-theme="dark"] .heatmap-source,
[data-theme="dark"] .heatmap-cell {
  background: rgba(30, 32, 37, 0.82);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .story-cluster--stacked::before,
[data-theme="dark"] .story-cluster--stacked::after {
  background:
    linear-gradient(180deg, rgba(30, 32, 37, 0.98), rgba(26, 28, 32, 0.94));
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28);
}

[data-theme="dark"] .home-panel+.home-panel,
[data-theme="dark"] .home-sidebar-panel+.home-sidebar-panel {
  border-top-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .home-section-head {
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .story-cluster__hint {
  border-top-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .cookie-notice {
  background: rgba(26, 28, 32, 0.98);
  border-color: rgba(255, 255, 255, 0.1);
}

/* ── Rumor pill ───────────────────────────────────────────────── */
.rumor-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  padding: 0.14rem 0.52rem;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #c47a1a;
  background: rgba(196, 122, 26, 0.12);
  border: 1px solid rgba(196, 122, 26, 0.22);
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

[data-theme="dark"] .rumor-pill {
  color: #e6a644;
  background: rgba(230, 166, 68, 0.14);
  border-color: rgba(230, 166, 68, 0.28);
}

/* ── Media round-up badge ────────────────────────────────────── */
.roundup-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.14rem 0.52rem;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #3d6bb5;
  background: rgba(61, 107, 181, 0.1);
  border: 1px solid rgba(61, 107, 181, 0.2);
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

[data-theme="dark"] .roundup-badge {
  color: #7ba5e0;
  background: rgba(123, 165, 224, 0.14);
  border-color: rgba(123, 165, 224, 0.24);
}

/* ── Community sentiment bar ─────────────────────────────────── */
.sentiment-bar {
  display: flex;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 0.35rem;
  background: var(--surface-raised);
}

.sentiment-bar__segment {
  height: 100%;
  min-width: 2px;
  transition: width 0.2s ease;
}

.sentiment-bar__segment--positive {
  background: #3daa6f;
}

.sentiment-bar__segment--negative {
  background: #d94848;
}

.sentiment-bar__segment--mixed {
  background: #e0a032;
}

.sentiment-bar__segment--neutral {
  background: #9ea3ad;
}

.sentiment-bar-label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.2rem;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  font-weight: 600;
  color: var(--text-faint);
  letter-spacing: 0.02em;
}

.sentiment-bar-label__dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 0.18rem;
}

.sentiment-bar-label__dot--positive {
  background: #3daa6f;
}

.sentiment-bar-label__dot--negative {
  background: #d94848;
}

.sentiment-bar-label__dot--mixed {
  background: #e0a032;
}

.sentiment-bar-label__dot--neutral {
  background: #9ea3ad;
}

/* ── Cluster sentiment text (inline in cluster hint) ─────────── */
.cluster-sentiment-text {
  font-family: var(--font-mono);
  font-size: inherit;
  color: var(--text-faint);
  white-space: nowrap;
}

/* ── Read-time estimate ──────────────────────────────────────── */
.read-time {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-faint);
  white-space: nowrap;
}

/* ── Sentiment delta (in cluster hint) ───────────────────────── */
.sentiment-delta {
  display: inline-flex;
  align-items: center;
  gap: 0.18rem;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 700;
  white-space: nowrap;
}

.sentiment-delta--improving {
  color: #3daa6f;
}

.sentiment-delta--declining {
  color: #d94848;
}

.sentiment-delta--stable {
  color: var(--text-faint);
}

/* ── Engagement sparkline (in cluster detail) ────────────────── */
.engagement-sparkline {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 18px;
  margin-top: 0.25rem;
}

.engagement-sparkline__bar {
  flex: 1 1 0;
  min-width: 4px;
  max-width: 14px;
  background: var(--accent-soft);
  border-radius: 2px 2px 0 0;
  transition: height 0.2s ease;
}

.engagement-sparkline__label {
  margin-top: 0.15rem;
  font-family: var(--font-mono);
  font-size: 0.54rem;
  color: var(--text-faint);
}

/* ── Topic timeline (in sidebar detail) ──────────────────────── */
.topic-timeline {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.55rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--border);
}

.topic-timeline__title {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.topic-timeline__item {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.25rem 0.4rem;
  font-size: 0.72rem;
  line-height: 1.35;
}

.topic-timeline__dot {
  flex: 0 0 auto;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.topic-timeline__source {
  font-weight: 600;
  color: var(--text);
}

.topic-timeline__title-text {
  color: var(--text-dim);
  font-weight: 400;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topic-timeline__time {
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  flex-shrink: 0;
}

/* ── Base ──────────────────────────────────────────────────────── */
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--link);
  text-decoration: none;
  transition: color .15s;
}

a:hover {
  color: var(--link-hover);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.text-link,
.article-card__title a,
.social-post-link,
.sentiment-article-title,
.trend-table td a,
.sentiment-table td a,
#editorial-link,
#editorial-body a {
  color: var(--link);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(228, 91, 67, 0.35);
  text-underline-offset: 2px;
  transition: color .15s, text-decoration-color .15s;
}

.text-link:hover,
.article-card__title a:hover,
.social-post-link:hover,
.sentiment-article-title:hover,
.trend-table td a:hover,
.sentiment-table td a:hover,
#editorial-link:hover,
#editorial-body a:hover {
  color: var(--link-hover);
  text-decoration-color: rgba(255, 129, 109, 0.62);
}

/* ── Layout ───────────────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-lg);
}

/* ── Header ───────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 251, 252, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(24, 24, 29, 0.06);
  box-shadow: 0 10px 26px rgba(31, 22, 17, 0.06);
}

[data-theme="dark"] .site-header {
  background: rgba(24, 24, 29, 0.88);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.2);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-md) 0;
  gap: var(--sp-md);
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  margin-left: 0.7rem;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.03em;
}

.nav-logo[data-savestate-logo] {
  color: var(--text);
  height: 22px;
}
.nav-logo[data-savestate-logo] svg {
  display: block;
  height: 100%;
  width: auto;
}
.nav-logo[data-savestate-logo]:hover {
  color: var(--accent);
}
.site-footer__wordmark[data-savestate-logo] {
  display: inline-block;
  height: 18px;
  color: var(--text);
}
.site-footer__wordmark[data-savestate-logo] svg {
  display: block;
  height: 100%;
  width: auto;
}

/* ── Contact form ─────────────────────────────────────────────── */
.contact-form {
  display: grid;
  gap: var(--sp-md);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-lg);
  box-shadow: 0 4px 18px rgba(31, 22, 17, 0.04);
}
[data-theme="dark"] .contact-form {
  background: rgba(30, 32, 37, 0.66);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 22px rgba(0, 0, 0, 0.3);
}
.contact-form__help {
  margin: 0 0 0.25rem 0;
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.5;
}
.contact-form__row {
  display: grid;
  gap: 0.35rem;
}
.contact-form__label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.contact-form__req {
  color: var(--accent);
  margin-left: 0.15rem;
}
.contact-form__input {
  font: inherit;
  font-size: 0.95rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.contact-form__input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 90, 60, 0.18);
}
[data-theme="dark"] .contact-form__input {
  background: rgba(20, 22, 26, 0.6);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text);
}
.contact-form__textarea {
  resize: vertical;
  min-height: 8rem;
  line-height: 1.55;
  font-family: var(--font-body);
}
.contact-form__select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-dim) 50%),
    linear-gradient(135deg, var(--text-dim) 50%, transparent 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 2.4rem;
}
.contact-form__counter {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-faint);
  text-align: right;
  margin-top: 0.1rem;
}
.contact-form__honeypot {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.contact-form__actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.25rem;
}
.contact-form__submit {
  font: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 0.75rem 1.4rem;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
  min-width: 8rem;
}
.contact-form__submit:hover:not(:disabled) {
  background: var(--link-hover, var(--accent));
}
.contact-form__submit:active:not(:disabled) {
  transform: translateY(1px);
}
.contact-form__submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.contact-form__feedback {
  font-size: 0.88rem;
  line-height: 1.5;
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius-sm);
  min-height: 1.5em;
}
.contact-form__feedback:empty {
  display: none;
}
.contact-form__feedback--success {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #0e8a64;
}
.contact-form__feedback--error {
  background: rgba(220, 38, 38, 0.12);
  border: 1px solid rgba(220, 38, 38, 0.4);
  color: #b91c1c;
}
[data-theme="dark"] .contact-form__feedback--success {
  color: #34d399;
}
[data-theme="dark"] .contact-form__feedback--error {
  color: #fca5a5;
}
@media (max-width: 600px) {
  .contact-form {
    padding: var(--sp-md);
  }
  .contact-form__submit {
    width: 100%;
  }
}

.nav-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(1.3);
  }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-lg);
  list-style: none;
}

.nav-links a {
  color: var(--text-dim);
  font-size: 0.85rem;
  font-weight: 500;
  transition: color .15s;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a.nav-active {
  color: var(--text);
}

.nav-active {
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
}

/* ── Hero ─────────────────────────────────────────────────────── */
.hero {
  padding: var(--sp-2xl) 0 var(--sp-xl);
}

.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: var(--sp-xs);
}

.hero-sub {
  color: var(--text-dim);
  font-size: 1rem;
  max-width: 560px;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-lg);
  margin-top: var(--sp-md);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
}

.hero-meta .count {
  color: var(--accent);
  font-weight: 700;
}

.hero--magazine {
  padding-bottom: var(--sp-2xl);
}

.hero-magazine {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.8fr);
  gap: var(--sp-xl);
  align-items: end;
}

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

.hero-magazine--compact .hero-magazine__copy {
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.hero-magazine__copy {
  min-width: 0;
}

.hero-magazine__brief {
  min-height: 100%;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(241, 243, 245, 0.92)),
    var(--surface);
  border: 1px solid rgba(24, 24, 29, 0.06);
  box-shadow: var(--shadow-card);
}

.hero-brief__body {
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.7;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.55rem;
  margin-bottom: var(--sp-md);
  border: 1px solid rgba(24, 24, 29, 0.12);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: rgba(241, 243, 245, 0.92);
}

/* ── Graph badge ──────────────────────────────────────────────── */
.graph-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text);
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.92);
}

.graph-badge--ok {
  color: var(--text);
  border-color: rgba(16, 185, 129, 0.28);
  background: rgba(16, 185, 129, 0.1);
}

.graph-badge--off {
  color: var(--text);
  border-color: rgba(239, 68, 68, 0.28);
  background: rgba(239, 68, 68, 0.1);
}

/* ── Filter bar ───────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-sm);
  margin-bottom: var(--sp-lg);
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(24, 24, 29, 0.08);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all .15s;
  user-select: none;
}

.filter-chip:hover {
  color: var(--text);
  border-color: rgba(255, 99, 74, 0.3);
  background: rgba(255, 255, 255, 0.98);
}

.filter-chip--active {
  color: #fff7f5;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 10px 22px rgba(255, 99, 74, 0.18);
}

.filter-chip--disabled {
  opacity: 0.45;
  cursor: not-allowed;
  border-style: dashed;
}

.filter-chip:disabled,
.auth-inline-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.filter-chip--soft {
  color: var(--text);
  background: var(--surface-hover);
  border-color: var(--border-hover);
}

.filter-chip--danger {
  color: #b42318;
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.2);
}

.filter-chip--warning {
  color: #b45309;
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.2);
}

.filter-chip--wide {
  min-width: 120px;
}

.filter-chip__count {
  opacity: 0.6;
  margin-left: 0.2rem;
}

/* ── Game pill ────────────────────────────────────────────────── */
.game-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.42rem;
  border: 1px solid rgba(139, 92, 246, 0.22);
  border-radius: 4px;
  background: rgba(139, 92, 246, 0.08);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.3;
  white-space: nowrap;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Toggle switch (slider) ──────────────────────────────────── */
.toggle-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
  min-height: 28px;
  padding: 4px 0;
}

.toggle-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.toggle-switch__track {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  background: var(--border-hover);
  border-radius: 10px;
  transition: background 0.2s;
  flex-shrink: 0;
  vertical-align: middle;
}

.toggle-switch__track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s;
}

.toggle-switch input:checked+.toggle-switch__track {
  background: var(--accent);
}

.toggle-switch input:checked+.toggle-switch__track::after {
  transform: translateX(16px);
}

.toggle-switch__label {
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-dim);
  transition: color 0.15s;
  white-space: nowrap;
  line-height: 1.2;
}

.toggle-switch input:checked~.toggle-switch__label {
  color: var(--text);
}

/* ── Media view switcher ─────────────────────────────────────── */
.media-view-toggle {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-md);
  margin-bottom: var(--sp-xl);
}

.view-toggle-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.18rem;
  min-height: 96px;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  border: none;
  color: var(--text-dim);
  background: var(--bg);
  text-decoration: none;
  box-shadow: none;
  transition: transform .18s, color .18s, background .18s, box-shadow .18s;
}

.view-toggle-btn:hover {
  transform: translateY(-2px);
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
  box-shadow: none;
}

.view-toggle-btn__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

.view-toggle-btn__label {
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.view-toggle-btn--active {
  border: 1px solid rgba(177, 171, 255, 0.95);
  color: var(--text);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(145, 137, 255, 0.32), rgba(145, 137, 255, 0.06)),
    linear-gradient(160deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02)),
    var(--surface);
  box-shadow: 0 14px 32px rgba(26, 17, 70, 0.35);
}

/* ── Search bar ───────────────────────────────────────────────── */
.search-bar {
  display: flex;
  gap: var(--sp-sm);
  margin-bottom: var(--sp-lg);
}

.home-admin-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-sm);
  margin: calc(-1 * var(--sp-sm)) 0 var(--sp-lg);
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.72rem 0.85rem;
  border: 1px solid rgba(16, 185, 129, 0.24);
  border-radius: var(--radius);
  background: rgba(16, 185, 129, 0.06);
}

.home-admin-bar__text {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.home-admin-bar__undo {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  margin-left: auto;
  padding: 0.32rem 0.55rem;
  font-size: 0.75rem;
  color: var(--text-dim);
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: var(--radius);
}

.home-admin-bar__undo--error {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.32);
  color: var(--text);
}

.home-admin-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--sp-sm);
  margin-top: var(--sp-sm);
}

.home-admin-controls__action {
  display: inline-flex;
  align-items: center;
}

.home-hide-admin__toggle {
  border-color: rgba(239, 68, 68, 0.28);
  color: rgb(120, 28, 28);
}

.home-hide-admin__toggle:hover {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.45);
}

[data-theme="dark"] .home-hide-admin__toggle {
  color: rgb(252, 165, 165);
  border-color: rgba(239, 68, 68, 0.36);
}

[data-theme="dark"] .home-hide-admin__toggle:hover {
  background: rgba(239, 68, 68, 0.16);
}

.search-input {
  flex: 1;
  padding: 0.55rem 0.9rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(24, 24, 29, 0.08);
  border-radius: var(--radius);
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}

.search-input::placeholder {
  color: var(--text-dim);
}

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 99, 74, 0.12);
  background: #ffffff;
  outline: none;
}

/* ── Two-column layout ────────────────────────────────────────── */
.main-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--sp-xl);
  align-items: start;
}

.main-grid>* {
  min-width: 0;
}

/* ── Article card ─────────────────────────────────────────────── */
.article-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}

.article-card {
  display: grid;
  grid-template-columns: 1fr;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(56, 214, 255, 0.08), rgba(56, 214, 255, 0) 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-lg);
  box-shadow: var(--shadow-card);
  transition: border-color .15s, transform .15s, box-shadow .15s, background-color .15s;
  cursor: pointer;
}

.article-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, rgba(144, 236, 255, 0.8), rgba(144, 236, 255, 0));
  pointer-events: none;
}

.article-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

.article-card--has-image {
  grid-template-columns: 1fr 140px;
  gap: var(--sp-lg);
}

.article-card--social.article-card--social-placeholder {
  grid-template-columns: 1fr 96px;
  gap: var(--sp-md);
}

.article-card__img {
  width: 140px;
  height: 95px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--surface-raised);
}

.article-card--social.article-card--social-placeholder .article-card__img {
  width: 96px;
  height: 96px;
}

.article-card__img--placeholder {
  object-fit: cover;
}

.article-card__meta {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  margin-bottom: var(--sp-xs);
  flex-wrap: wrap;
}

.article-card__body {
  display: grid;
  align-content: start;
  gap: 0.08rem;
  min-width: 0;
}

.article-card__title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: var(--sp-xs);
  line-height: 1.35;
}

.article-card__summary {
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (min-width: 720px) {
  .article-card__summary {
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }
  .article-card__summary--social {
    -webkit-line-clamp: 4;
    line-clamp: 4;
  }
}

.article-card__summary:empty {
  display: none;
}

.article-card__date {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
}

.card-pill-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.42rem;
  padding-top: 0.48rem;
  border-top: 1px solid rgba(24, 24, 29, 0.08);
}

.card-pill-footer .review-score-badge-row {
  display: flex;
}

.home-sentiment-admin__editor {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-sm);
  padding: 0.72rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.92);
}

.home-sentiment-admin__note {
  flex-basis: 100%;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-dim);
}

.home-sentiment-admin .admin-result {
  width: 100%;
  margin-top: 0;
}

.review-score-badge-row {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.32rem;
}

.review-score-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.45rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(252, 67, 10, 0.24);
  background: rgba(252, 67, 10, 0.08);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.61rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-decoration: none;
}

.review-score-badge--steam {
  border-color: rgba(59, 130, 246, 0.24);
  background: rgba(59, 130, 246, 0.1);
  color: var(--text);
}

.review-score-badge:hover,
.review-score-badge:focus-visible,
.source-badge:hover,
.source-badge:focus-visible {
  text-decoration: none;
  filter: brightness(1.06);
}

.review-score-badge:focus-visible,
.source-badge:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.18);
  outline-offset: 2px;
}

.review-score-detail {
  display: none;
  margin-left: 0.28rem;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--text-dim);
  line-height: 1.35;
}

.review-score-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  padding: 0.12rem 0.42rem;
  border: 1px solid rgba(164, 189, 221, 0.28);
  border-radius: var(--radius-pill);
  background: rgba(180, 209, 245, 0.12);
  font-family: var(--font-mono);
  font-size: 0.59rem;
  line-height: 1.2;
  white-space: nowrap;
}

.review-score-stat__label {
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.review-score-stat__value {
  color: var(--text);
  font-weight: 700;
}

.review-score-badge--high {
  border-color: rgba(16, 185, 129, 0.28);
  background: rgba(16, 185, 129, 0.11);
  color: var(--text);
}

.review-score-badge--mid {
  border-color: rgba(245, 158, 11, 0.26);
  background: rgba(245, 158, 11, 0.11);
  color: var(--text);
}

.review-score-badge--low {
  border-color: rgba(239, 68, 68, 0.28);
  background: rgba(239, 68, 68, 0.1);
  color: var(--text);
}

@media (hover: none) {
  .review-score-detail {
    display: inline-flex;
  }
}

/* ── Badges ───────────────────────────────────────────────────── */
.source-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--source-badge-color, var(--text));
  border-radius: var(--radius-pill);
  border: 1px solid var(--source-badge-border, var(--border-hover));
  background: var(--source-badge-bg, rgba(191, 222, 255, 0.08));
  white-space: nowrap;
  text-decoration: none;
}

.source-badge--accented {
  --source-badge-bg: rgba(var(--source-badge-rgb), 0.1);
  --source-badge-border: rgba(var(--source-badge-rgb), 0.26);
  box-shadow: none;
}

.source-detail {
  margin-top: 0.18rem;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--text-dim);
  line-height: 1.35;
}

.social-stat-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.34rem;
  margin-top: 0.2rem;
}

.social-stat-row--compact {
  margin-top: 0.04rem;
}

.social-stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.26rem;
  padding: 0.12rem 0.42rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(177, 201, 230, 0.2);
  background: rgba(191, 222, 255, 0.1);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--text-dim);
  line-height: 1.3;
}

.social-stat-row--compact .social-stat-chip {
  padding: 0.08rem 0.34rem;
  font-size: 0.55rem;
}

.social-stat-chip__value {
  color: var(--text);
  font-weight: 700;
}

.social-stat-chip__label {
  color: var(--text-dim);
}

.cat-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(122, 157, 197, 0.32);
  background: rgba(132, 173, 220, 0.14);
}

.type-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 600;
  color: var(--text-dim);
  border-radius: var(--radius-pill);
  border: 1px solid rgba(122, 157, 197, 0.28);
  background: rgba(132, 173, 220, 0.12);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.source-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
}

.source-pill--ok {
  border-color: rgba(16, 185, 129, 0.28);
  background: rgba(16, 185, 129, 0.1);
}

.source-pill--off {
  border-color: rgba(239, 68, 68, 0.28);
  background: rgba(239, 68, 68, 0.1);
}

.social-post-link {
  font-size: 0.78rem;
  line-height: 1.4;
  display: block;
}

/* ── Sidebar ──────────────────────────────────────────────────── */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--sp-lg);
}

.sidebar-card,
.magazine-card {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(56, 214, 255, 0.09), rgba(56, 214, 255, 0) 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.025)),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-lg);
  box-shadow: var(--shadow-card);
}

.sidebar-card::before,
.magazine-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, rgba(144, 236, 255, 0.8), rgba(144, 236, 255, 0));
  pointer-events: none;
}

.sidebar-card__title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-strong);
  margin-bottom: var(--sp-md);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
}

.sidebar-card__desc {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-bottom: var(--sp-md);
  margin-top: calc(-1 * var(--sp-sm));
}

.sidebar-icon {
  font-size: 0.85rem;
}

/* ── Shared spotlight cards ──────────────────────────────────── */
.media-magazine-shell {
  margin-bottom: var(--sp-2xl);
}

.spotlight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-md);
}

.spotlight-card {
  min-width: 0;
  padding: var(--sp-lg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at top left, rgba(56, 214, 255, 0.09), rgba(56, 214, 255, 0) 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    var(--surface);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  box-shadow: var(--shadow-card);
}

.spotlight-card__label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.spotlight-card__value {
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  min-width: 0;
}

.spotlight-card__value a {
  color: inherit;
}

.spotlight-card__value a:hover {
  color: var(--link-hover);
}

.spotlight-card__meta {
  color: var(--text-dim);
  font-size: 0.8rem;
  line-height: 1.5;
}

.spotlight-card__note {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-dim);
}

/* ── Trending list ────────────────────────────────────────────── */
.trend-list {
  list-style: none;
}

.source-list {
  list-style: none;
}

.sidebar-disclosure {
  border-bottom: 1px solid var(--border);
}

.sidebar-disclosure:last-child {
  border-bottom: none;
}

.sidebar-disclosure__summary {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.48rem 0;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: color 0.14s ease;
}

.sidebar-disclosure__summary:hover,
.sidebar-disclosure.is-expanded .sidebar-disclosure__summary {
  color: var(--link-hover);
}

.sidebar-disclosure__main {
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  gap: 0.12rem;
}

.sidebar-disclosure__meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.32rem;
  min-width: 0;
  flex: 0 0 auto;
}

.sidebar-disclosure__chevron {
  width: 0.35rem;
  height: 0.35rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  opacity: 0.9;
  transform: rotate(45deg);
  transition: transform 0.14s ease;
}

.sidebar-disclosure.is-expanded .sidebar-disclosure__chevron {
  transform: rotate(225deg);
}

.sidebar-disclosure--inert .sidebar-disclosure__summary--inert {
  cursor: default;
}
.sidebar-disclosure--inert .sidebar-disclosure__summary--inert:hover {
  color: var(--text);
}

.momentum-surface-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.08rem 0.28rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(139, 143, 154, 0.28);
  background: rgba(139, 143, 154, 0.08);
  font-family: var(--font-mono);
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--text-dim);
  margin-left: 0.3rem;
  vertical-align: middle;
  white-space: nowrap;
}
.momentum-surface-label--twitch {
  color: #9146ff;
  border-color: rgba(145, 70, 255, 0.35);
  background: rgba(145, 70, 255, 0.08);
}
.momentum-surface-label--youtube {
  color: #f00;
  border-color: rgba(255, 0, 0, 0.25);
  background: rgba(255, 0, 0, 0.06);
}

.sidebar-disclosure__panel {
  margin: 0 0 0.56rem;
  padding: 0.62rem 0.68rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    rgba(17, 30, 47, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  position: relative;
  z-index: 2;
}

.sidebar-disclosure__copy {
  color: var(--text);
  font-size: 0.74rem;
  line-height: 1.45;
}

.sidebar-summary {
  min-width: 0;
  display: grid;
  gap: 0.1rem;
}

.sidebar-summary--ranked {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
}

.sidebar-summary__sub {
  color: var(--text-dim);
  font-size: 0.66rem;
  line-height: 1.35;
}

.sidebar-summary__stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.sidebar-summary__stat {
  display: inline-grid;
  gap: 0.04rem;
  padding: 0.28rem 0.52rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sidebar-summary__stat strong {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
}

.sidebar-summary__stat span {
  color: var(--text-dim);
}

.sidebar-summary__stat--accent {
  border-color: rgba(145, 137, 255, 0.28);
  background: rgba(145, 137, 255, 0.1);
}

.sidebar-summary__stat--publication {
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(245, 158, 11, 0.1);
}

.sidebar-summary__stat--social {
  border-color: rgba(56, 189, 248, 0.28);
  background: rgba(56, 189, 248, 0.08);
}

.sidebar-summary__stat--mixed {
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.12);
}

.sidebar-summary__stat--positive {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.12);
}

.sidebar-rank {
  display: inline-block;
  min-width: 1.25rem;
  text-align: right;
  padding: 0;
  background: transparent;
  border: 0;
  color: var(--link-hover);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
}

.sidebar-mini-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.16rem 0.38rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text);
  white-space: nowrap;
}

.sidebar-mini-pill--accent {
  border-color: rgba(145, 137, 255, 0.24);
  background: rgba(145, 137, 255, 0.1);
}

.sidebar-mini-pill--neutral {
  border-color: rgba(139, 143, 154, 0.28);
  color: var(--text-dim);
}

.sidebar-mini-pill--mixed {
  border-color: rgba(245, 158, 11, 0.24);
  background: rgba(245, 158, 11, 0.1);
}

.sidebar-mini-pill--publication {
  border-color: rgba(245, 158, 11, 0.24);
  background: rgba(245, 158, 11, 0.1);
}

.sidebar-mini-pill--social {
  border-color: rgba(56, 189, 248, 0.24);
  background: rgba(56, 189, 248, 0.1);
}

.sidebar-mini-pill--positive {
  border-color: rgba(16, 185, 129, 0.24);
  background: rgba(16, 185, 129, 0.1);
}

.sidebar-heat {
  display: inline-flex;
  align-items: center;
  gap: 0.06rem;
  white-space: nowrap;
}

.sidebar-heat__flame {
  font-size: 0.72rem;
  line-height: 1;
  opacity: 0.18;
  filter: grayscale(1) saturate(0.15);
  transform: translateY(-0.02rem);
  transition: opacity 160ms ease, filter 160ms ease, transform 160ms ease;
}

.sidebar-heat__flame.is-active {
  opacity: 1;
  filter: none;
}

.sidebar-heat--neutral .sidebar-heat__flame.is-active {
  opacity: 0.72;
}

.sidebar-heat--mixed .sidebar-heat__flame.is-active {
  opacity: 0.9;
}

.sidebar-heat--accent .sidebar-heat__flame.is-active {
  opacity: 1;
}

.sidebar-duel {
  display: none;
}

.sidebar-duel__cell {
  display: none;
}

.source-influence-meter {
  display: none;
}

.source-influence-meter__fill {
  display: block;
  width: 0;
  height: 0;
}

.sidebar-evidence {
  display: grid;
  gap: 0.24rem;
}

.sidebar-evidence__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.sidebar-evidence__title {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text);
}

.sidebar-evidence__snippet {
  color: var(--text);
  font-size: 0.72rem;
  line-height: 1.45;
}

.sidebar-evidence__link {
  color: var(--text);
  text-decoration: none;
}

.sidebar-evidence__link:hover {
  color: var(--link-hover);
  text-decoration: none;
}

.sidebar-evidence__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.24rem 0.36rem;
  color: var(--text-dim);
  font-size: 0.64rem;
}

.sidebar-evidence__empty {
  color: var(--text-dim);
  font-size: 0.72rem;
  line-height: 1.45;
}

.sidebar-disclosure--trend .sidebar-disclosure__panel,
.sidebar-disclosure--breakout .sidebar-disclosure__panel,
.sidebar-disclosure--emerging .sidebar-disclosure__panel,
.sidebar-disclosure--consensus .sidebar-disclosure__panel,
.sidebar-disclosure--coverage .sidebar-disclosure__panel,
.sidebar-disclosure--source .sidebar-disclosure__panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0)),
    rgba(255, 255, 255, 0.02);
}

.sidebar-disclosure--trend .sidebar-disclosure__panel {
  border-color: rgba(245, 158, 11, 0.18);
}

.sidebar-disclosure--breakout .sidebar-disclosure__panel {
  border-color: rgba(249, 115, 22, 0.18);
}

.sidebar-disclosure--emerging .sidebar-disclosure__panel {
  border-color: rgba(16, 185, 129, 0.18);
}

.sidebar-disclosure--consensus .sidebar-disclosure__panel {
  border-color: rgba(56, 189, 248, 0.18);
}

.sidebar-disclosure--coverage .sidebar-disclosure__panel {
  border-color: rgba(245, 158, 11, 0.16);
}

.sidebar-disclosure--source .sidebar-disclosure__panel {
  border-color: rgba(145, 137, 255, 0.18);
}

.sidebar-disclosure__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.42rem;
  margin-top: 0.52rem;
}

.sidebar-detail-action {
  padding: 0.34rem 0.62rem;
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-pill);
  background: var(--surface-raised);
  color: var(--text);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: border-color 0.14s ease, color 0.14s ease, background-color 0.14s ease;
}

.sidebar-detail-action:hover {
  border-color: rgba(145, 137, 255, 0.55);
  color: var(--link-hover);
}

.sidebar-detail-action.is-active {
  border-color: rgba(145, 137, 255, 0.55);
  background: var(--accent-soft);
  color: var(--link-hover);
}

.sidebar-disclosure__filter-note {
  color: var(--text-dim);
  font-size: 0.68rem;
  line-height: 1.35;
}

.sidebar-disclosure.is-source-active .source-item__dot {
  background: var(--accent);
}

.sidebar-disclosure.is-source-active .source-item__count {
  color: var(--link-hover);
}

.sidebar-summary--trend {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.trend-term {
  font-weight: 500;
  text-transform: capitalize;
}

.trend-count {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
}

.trend-bar {
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0.4;
  margin-top: 2px;
}

.finding-note {
  display: block;
  margin-top: 2px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.64rem;
}

/* ── Surge badges ─────────────────────────────────────────────── */
.surge-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 99, 74, 0.24);
  background: rgba(255, 99, 74, 0.1);
  color: var(--text);
}

.surge-badge.surge--new {
  border-color: rgba(16, 185, 129, 0.28);
  background: rgba(16, 185, 129, 0.1);
  color: var(--text);
}

.surge-badge.surge--hot {
  border-color: rgba(239, 68, 68, 0.28);
  background: rgba(239, 68, 68, 0.1);
  color: var(--text);
}

.surge-badge-sm {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent);
}

/* ── Source list ───────────────────────────────────────────────── */
.source-item__name {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
}

.source-item__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--text-dim);
}

.source-item__count {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
}

/* ── Loading / empty states ───────────────────────────────────── */
.loading-msg,
.empty-msg {
  text-align: center;
  padding: var(--sp-2xl);
  color: var(--text-dim);
  font-size: 0.9rem;
}

.loading-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 1s ease-in-out infinite;
  margin-right: 4px;
}

/* ── Pagination ───────────────────────────────────────────────── */
.pagination {
  display: grid;
  justify-items: center;
  gap: 0.5rem;
  margin-top: var(--sp-xl);
}

.pagination__status {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pagination__note {
  color: var(--text-dim);
  font-size: 0.74rem;
  text-align: center;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.72rem 1.15rem;
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(24, 24, 29, 0.1);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 10px 24px rgba(31, 38, 46, 0.06);
}

.page-btn--load-more {
  min-width: 220px;
}

.page-btn:hover {
  border-color: rgba(228, 91, 67, 0.34);
  color: var(--link);
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(31, 38, 46, 0.08);
  transform: translateY(-1px);
}

.page-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

/* ── Footer ───────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid rgba(130, 170, 214, 0.16);
  padding: var(--sp-xl) 0;
  margin-top: var(--sp-2xl);
  color: var(--text-dim);
  font-size: 0.75rem;
  background: rgba(6, 13, 23, 0.32);
}

.site-footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: var(--sp-xl);
  align-items: start;
}

.site-footer__brand {
  display: grid;
  gap: 0.5rem;
  min-width: 0;
}

.site-footer__wordmark {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.site-footer__tagline {
  max-width: 52ch;
  line-height: 1.55;
  color: var(--text-dim);
}

.site-footer__cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-lg);
  align-items: start;
}

.site-footer__col {
  display: grid;
  gap: 0.3rem;
  font-size: 0.8rem;
}

.site-footer__col-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 0.15rem;
}

.site-footer__col a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s ease;
}

.site-footer__col a:hover {
  color: var(--link-hover);
}

.site-footer__legal {
  grid-column: 1 / -1;
  padding-top: var(--sp-md);
  margin-top: var(--sp-md);
  border-top: 1px solid rgba(24, 24, 29, 0.06);
  font-size: 0.72rem;
  color: var(--text-faint);
}

[data-theme="dark"] .site-footer__legal {
  border-top-color: rgba(255, 255, 255, 0.06);
}

@media (max-width: 720px) {
  .site-footer__inner {
    grid-template-columns: 1fr;
    gap: var(--sp-lg);
  }
  .site-footer__cols {
    gap: var(--sp-md);
  }
}

/* ── Cookie notice ───────────────────────────────────────────── */
.cookie-notice {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 240;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(24, 24, 29, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 20px 40px rgba(31, 38, 46, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.cookie-notice__body {
  min-width: 0;
}

.cookie-notice__eyebrow {
  margin-bottom: 0.22rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.cookie-notice__text {
  max-width: 64ch;
  color: var(--text-dim);
  font-size: 0.82rem;
  line-height: 1.55;
}

.cookie-notice__actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 0 0 auto;
}

.cookie-notice__link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.cookie-notice__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1rem;
  border: 1px solid rgba(228, 91, 67, 0.2);
  border-radius: 999px;
  background: var(--accent);
  color: #fff7f5;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(255, 99, 74, 0.18);
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.cookie-notice__button:hover {
  background: var(--link-hover);
  box-shadow: 0 14px 28px rgba(255, 99, 74, 0.22);
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════════════════
   Deep Trends Page Styles
   ═══════════════════════════════════════════════════════════════ */

/* ── Trend sections ───────────────────────────────────────────── */
.trend-section {
  margin-bottom: var(--sp-2xl);
}

.ops-lock-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-lg);
  background:
    radial-gradient(circle at top left, rgba(56, 214, 255, 0.12), rgba(56, 214, 255, 0) 32%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    var(--surface);
  box-shadow: var(--shadow-card);
}

.ops-lock-card--active {
  border-color: rgba(239, 68, 68, 0.5);
}

.admin-auth-shell {
  margin-bottom: var(--sp-xl);
}

.admin-auth-shell--unlocked .admin-auth-grid {
  grid-template-columns: 1fr;
}

.admin-auth-shell--unlocked .admin-auth-card--intro {
  display: none;
}

.admin-auth-shell--unlocked .admin-auth-card--form {
  max-width: 760px;
}

.admin-auth-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(320px, 1.05fr);
  gap: var(--sp-lg);
}

.admin-auth-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: clamp(1rem, 2vw, 1.5rem);
  background:
    radial-gradient(circle at top left, rgba(56, 214, 255, 0.1), rgba(56, 214, 255, 0) 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    var(--surface);
  box-shadow: var(--shadow-card);
}

.admin-auth-card::before,
.admin-gate-card::before,
.admin-task-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, rgba(144, 236, 255, 0.8), rgba(144, 236, 255, 0));
  pointer-events: none;
}

.admin-auth-card--intro {
  background:
    radial-gradient(circle at top left, rgba(56, 214, 255, 0.16), rgba(56, 214, 255, 0) 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    var(--surface);
}

.admin-auth-card--intro h2,
.admin-auth-card--form h2 {
  margin-bottom: var(--sp-sm);
}

.admin-auth-kicker {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.55rem;
  margin-bottom: var(--sp-md);
  border: 1px solid rgba(56, 214, 255, 0.45);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-strong);
  background: rgba(56, 214, 255, 0.12);
}

.admin-auth-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-sm);
  margin-top: var(--sp-md);
}

.admin-auth-note {
  margin-top: var(--sp-lg);
}

.admin-auth-checklist {
  margin-top: var(--sp-lg);
  padding: var(--sp-md);
  border: 1px dashed rgba(56, 214, 255, 0.34);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 244, 246, 0.94)),
    var(--surface);
}

.admin-auth-checklist__title {
  margin-bottom: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.admin-auth-checklist__list {
  padding-left: 1rem;
  color: var(--text-dim);
  font-size: 0.8rem;
  line-height: 1.55;
}

.admin-auth-header {
  margin-bottom: var(--sp-md);
}

.admin-auth-form {
  display: grid;
  gap: var(--sp-md);
}

.admin-auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
}

.admin-auth-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.admin-auth-password-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--sp-sm);
  align-items: center;
}

.admin-auth-password-input {
  min-width: 0;
}

.admin-auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-sm);
  margin-top: var(--sp-lg);
}

.auth-inline-btn {
  min-height: 40px;
  padding: 0 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-hover);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: border-color .15s, transform .15s, background .15s, box-shadow .15s;
  box-shadow: var(--shadow-card);
}

.auth-inline-btn:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow-card-hover);
}

.admin-auth-feedback {
  margin-top: var(--sp-md);
  min-height: 52px;
}

.admin-auth-feedback--ok {
  border-color: rgba(16, 185, 129, 0.45);
  color: #baf5d8;
}

.admin-auth-feedback--error {
  border-color: rgba(239, 68, 68, 0.45);
  color: #fecaca;
}

.admin-gate {
  min-height: calc(100vh - 152px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--sp-xl) var(--sp-md) var(--sp-2xl);
}

.admin-gate-card {
  position: relative;
  overflow: hidden;
  width: min(100%, 540px);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: clamp(1.15rem, 2vw, 1.6rem);
  background:
    radial-gradient(circle at top left, rgba(56, 214, 255, 0.18), rgba(56, 214, 255, 0) 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    var(--surface);
  box-shadow: var(--shadow-card-hover);
}

.admin-gate-card h1 {
  margin-bottom: var(--sp-sm);
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  letter-spacing: -0.03em;
}

.admin-gate__desc {
  margin-bottom: var(--sp-sm);
}

.admin-gate__helper {
  margin-bottom: var(--sp-lg);
}

.admin-console-shell {
  display: grid;
  gap: var(--sp-xl);
  padding: var(--sp-xl) 0 var(--sp-2xl);
}

.admin-console-main {
  display: grid;
  gap: var(--sp-xl);
}

.admin-shell-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-lg);
}

.admin-shell-head h1 {
  margin-bottom: var(--sp-xs);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.03em;
}

.admin-shell-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
}

.admin-section-nav {
  display: none;
  align-items: center;
  gap: var(--sp-sm);
  overflow-x: auto;
  padding-bottom: 0.2rem;
  -webkit-overflow-scrolling: touch;
}

.admin-section-nav__btn {
  flex: 0 0 auto;
}

.admin-panel--mobile-hidden {
  display: none;
}

.admin-panel {
  scroll-margin-top: 104px;
}

.admin-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-lg);
}

.admin-panel__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-sm);
  align-items: center;
  justify-content: flex-end;
}

.admin-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.92fr);
  gap: var(--sp-lg);
  align-items: start;
}

.admin-workbench--wide {
  grid-template-columns: minmax(0, 1.4fr) minmax(340px, 0.95fr);
}

.admin-workbench--single {
  grid-template-columns: 1fr;
}

.admin-workbench--sentiment-audit {
  gap: var(--sp-lg);
}

.admin-workbench--two-card {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-side-stack {
  display: grid;
  gap: var(--sp-lg);
}

.admin-task-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: clamp(1rem, 2vw, 1.35rem);
  background:
    radial-gradient(circle at top left, rgba(56, 214, 255, 0.1), rgba(56, 214, 255, 0) 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    var(--surface);
  box-shadow: var(--shadow-card);
}

.admin-task-card--editor {
  background:
    radial-gradient(circle at top left, rgba(56, 214, 255, 0.16), rgba(56, 214, 255, 0) 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    var(--surface);
}

.admin-task-card--warning {
  border-color: rgba(245, 158, 11, 0.32);
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.14), rgba(245, 158, 11, 0)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    var(--surface);
}

.admin-task-card--status {
  margin-top: var(--sp-lg);
}

.admin-task-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-md);
  margin-bottom: var(--sp-lg);
}

.admin-task-card__head h3 {
  margin-bottom: 0.35rem;
  font-size: 1.04rem;
  letter-spacing: -0.02em;
}

.admin-task-card__head p {
  max-width: 62ch;
  color: var(--text-dim);
  font-size: 0.82rem;
  line-height: 1.55;
}

.admin-head-control {
  min-width: min(168px, 100%);
  max-width: 220px;
}

.admin-task-card--audit-suggestions .admin-task-card__head p {
  max-width: none;
}

.admin-form-stack {
  display: grid;
  gap: var(--sp-md);
}

.admin-form-grid {
  display: grid;
  gap: var(--sp-md);
}

.admin-form-grid--two {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.admin-form-grid--three {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.control-field--stack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.38rem;
  width: 100%;
}

.control-field__label {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.control-field--stack .search-input,
.control-field--stack .control-select {
  width: 100%;
  min-width: 0;
}

.control-field--stack .control-select {
  min-height: 40px;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.72rem;
}

.admin-textarea {
  resize: vertical;
}

.admin-textarea--lg {
  min-height: 140px;
}

.admin-textarea--xl {
  min-height: 280px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-sm);
  margin-top: var(--sp-lg);
}

.admin-result {
  margin-top: var(--sp-lg);
  min-height: 58px;
}

.admin-result--ok {
  border-color: rgba(16, 185, 129, 0.4);
  color: #baf5d8;
}

.admin-result--error {
  border-color: rgba(239, 68, 68, 0.4);
  color: #fecaca;
}

.admin-table-wrap {
  margin-top: var(--sp-sm);
}

.admin-table-wrap--tall {
  max-height: 360px;
  overflow: auto;
}

.admin-table-wrap--audit-suggestions {
  max-width: 100%;
}

.admin-row-selectable {
  cursor: pointer;
}

.sentiment-ambiguous-text {
  min-width: 0;
  white-space: normal;
  word-break: break-word;
  line-height: 1.45;
}

.admin-table-row--selected td {
  background: rgba(109, 92, 255, 0.14) !important;
  box-shadow: inset 0 0 0 1px rgba(145, 137, 255, 0.35);
}

.admin-status-surface {
  min-height: 96px;
}

.admin-status-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  min-height: 54px;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(244, 244, 246, 0.95)),
    var(--surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.admin-status-inline--stacked {
  align-items: flex-start;
}

.admin-status-inline__item {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0.18rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  line-height: 1.4;
  background: rgba(255, 255, 255, 0.96);
}

.admin-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: flex-start;
}

.admin-inline-btn {
  min-width: 84px;
  justify-content: center;
}

.admin-table-text-wrap {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
  line-height: 1.45;
}

.sentiment-audit-table th:nth-child(1),
.sentiment-audit-table td:nth-child(1) {
  width: 100%;
}

.sentiment-audit-table th:nth-child(2),
.sentiment-audit-table td:nth-child(2),
.sentiment-audit-table th:nth-child(3),
.sentiment-audit-table td:nth-child(3),
.sentiment-audit-table th:nth-child(4),
.sentiment-audit-table td:nth-child(4),
.sentiment-audit-table th:nth-child(5),
.sentiment-audit-table td:nth-child(5),
.sentiment-audit-table th:nth-child(6),
.sentiment-audit-table td:nth-child(6) {
  width: 1%;
  white-space: nowrap;
}

.sentiment-audit-table .admin-table-text-wrap {
  min-width: 0;
}

.sentiment-audit-runs-table .admin-table-text-wrap {
  min-width: 0;
}

.admin-table-text-wrap__title {
  color: var(--text);
  overflow-wrap: anywhere;
}

.admin-table-text-wrap__meta {
  margin-top: 0.35rem;
  color: var(--text-dim);
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.admin-disclosure {
  margin-top: var(--sp-lg);
  border: 1px solid var(--border);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(244, 244, 246, 0.95)),
    var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.admin-disclosure__summary {
  cursor: pointer;
  list-style: none;
  padding: 0.95rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  background: rgba(244, 244, 246, 0.78);
}

.admin-disclosure__summary::-webkit-details-marker {
  display: none;
}

.admin-disclosure__content {
  padding: 0 var(--sp-md) var(--sp-md);
}

.trend-section__header {
  margin-bottom: var(--sp-lg);
}

.trend-section__header h2 {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  margin-bottom: var(--sp-xs);
}

.trend-section__desc {
  color: var(--text-dim);
  font-size: 0.85rem;
}

.section-icon {
  font-size: 1.1rem;
  color: var(--accent);
}

.section-controls {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-sm);
  margin-top: var(--sp-sm);
}

.table-controls {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-sm);
  margin-bottom: var(--sp-sm);
}

.control-field {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.control-select {
  min-height: 28px;
  padding: 0.2rem 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  outline: none;
}

.control-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(56, 214, 255, 0.12);
}

@media (max-width: 900px) {
  .main-grid {
    grid-template-columns: 1fr;
  }

  .admin-auth-grid {
    grid-template-columns: 1fr;
  }

  .admin-workbench,
  .admin-workbench--wide,
  .admin-workbench--single,
  .admin-workbench--two-card {
    grid-template-columns: 1fr;
  }

  .admin-form-grid--three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-panel__header {
    flex-direction: column;
  }

  .admin-shell-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-magazine,
  .home-magazine-layout {
    grid-template-columns: 1fr;
  }

  .lead-support-list,
  .spotlight-grid {
    grid-template-columns: 1fr;
  }

  .story-cluster__detail {
    padding: 0.72rem 0.78rem 0.8rem;
  }

  .steam-top-table th,
  .steam-top-table td {
    padding-left: 0.58rem;
    padding-right: 0.58rem;
  }
}

/* ── Trend table ──────────────────────────────────────────────── */
.trend-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(17, 30, 47, 0.92);
  box-shadow: var(--shadow-card);
}

.trend-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.trend-table th {
  text-align: left;
  padding: var(--sp-sm) var(--sp-md);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(10, 21, 35, 0.82);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.trend-table td {
  padding: var(--sp-sm) var(--sp-md);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.social-post-thumb-cell {
  width: 56px;
}

.social-post-thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-raised);
}

.social-post-thumb--placeholder {
  background: var(--surface-raised);
}

.trend-table tr:last-child td {
  border-bottom: none;
}

.trend-table tr:hover td {
  background: var(--surface-raised);
}

.trend-table tr.expandable-row,
.sentiment-table tr.expandable-row {
  cursor: pointer;
}

.trend-table tr.expandable-row td,
.sentiment-table tr.expandable-row td {
  transition: background-color 0.14s ease, box-shadow 0.14s ease;
}

.trend-table tr.expandable-row:hover td,
.sentiment-table tr.expandable-row:hover td {
  background: rgba(255, 255, 255, 0.06);
}

.trend-table tr.expandable-row.is-expanded td,
.sentiment-table tr.expandable-row.is-expanded td {
  background: rgba(255, 255, 255, 0.08);
}

.trend-table tr.expandable-row:focus-visible td,
.sentiment-table tr.expandable-row:focus-visible td {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.table-rank {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-right: var(--sp-sm);
  display: inline-block;
  width: 1.5em;
  text-align: right;
}

.table-term {
  font-weight: 500;
  text-transform: capitalize;
}

.td-num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-align: center;
  color: var(--text-dim);
}

.score-bar-wrap {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
}

.score-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--accent);
  opacity: 0.6;
}

.score-val {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  white-space: nowrap;
}

/* ── Sentiment section ───────────────────────────────────────── */
.sentiment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--sp-md);
  margin-bottom: var(--sp-md);
}

.sentiment-card {
  background:
    radial-gradient(circle at top left, rgba(56, 214, 255, 0.08), rgba(56, 214, 255, 0) 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-md);
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow-card);
}

.sentiment-card__label {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-dim);
}

.sentiment-card__value {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
}

.sentiment-card__sub {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.sentiment-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(17, 30, 47, 0.92);
  box-shadow: var(--shadow-card);
}

.sentiment-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.sentiment-table th {
  text-align: left;
  padding: var(--sp-sm) var(--sp-md);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(10, 21, 35, 0.82);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.sentiment-table td {
  padding: var(--sp-sm) var(--sp-md);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.sentiment-table tr:last-child td {
  border-bottom: none;
}

.sentiment-table tr:hover td {
  background: var(--surface-raised);
}

.sentiment-topic-main {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--sp-sm);
}

.table-term-toggle {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 500;
  text-transform: capitalize;
  text-decoration: none;
  cursor: pointer;
  text-align: left;
}

.table-term-toggle:hover {
  color: inherit;
}

.table-term-toggle[aria-expanded="true"] {
  color: inherit;
}

.sentiment-details-row td,
.sentiment-details-cell {
  background: rgba(17, 30, 47, 0.9);
}

.sentiment-details-cell {
  padding: var(--sp-sm) var(--sp-md);
}

.sentiment-details {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}

.sentiment-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.sentiment-breakdown-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.45rem;
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 0.62rem;
}

.sentiment-breakdown-chip--all {
  color: var(--text-dim);
}

.sentiment-article-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.sentiment-article-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.6rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(18, 33, 52, 0.88);
}

.sentiment-article-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-sm);
}

.sentiment-article-title {
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.35;
  min-width: 0;
}

.sentiment-article-meta {
  margin-top: 0.15rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.64rem;
}

.sentiment-article-summary {
  margin-top: 0.28rem;
  color: var(--text-dim);
  font-size: 0.74rem;
  line-height: 1.45;
}

.sentiment-details-empty {
  color: var(--text-dim);
  font-size: 0.76rem;
}

.sent-pos {
  color: #15803d;
}

.sent-neg {
  color: #b91c1c;
}

.sent-mix {
  color: #b45309;
}

.sent-neu {
  color: var(--text-dim);
}

.sent-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.14rem 0.55rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--text);
  border: 1px solid var(--border-hover);
  background: rgba(255, 255, 255, 0.92);
}

.sent-pill.sent-pos {
  border-color: rgba(16, 185, 129, 0.28);
  background: rgba(16, 185, 129, 0.1);
}

.sent-pill.sent-neg {
  border-color: rgba(239, 68, 68, 0.28);
  background: rgba(239, 68, 68, 0.1);
}

.sent-pill.sent-mix {
  border-color: rgba(245, 158, 11, 0.26);
  background: rgba(245, 158, 11, 0.1);
}

.sent-pill.sent-neu {
  border-color: rgba(139, 143, 154, 0.24);
  background: rgba(226, 232, 240, 0.62);
}

.signal-text {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 1.8rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  white-space: nowrap;
}

.signal-hot {
  color: inherit;
}

.signal-med {
  color: inherit;
}

.signal-cold {
  color: inherit;
}

.sent-shift {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
}

.delta-up {
  color: #10b981;
}

.delta-down {
  color: #ef4444;
}

.delta-flat {
  color: var(--text-dim);
}

.sentiment-method {
  margin-top: var(--sp-sm);
  padding: var(--sp-md);
  border: 1px dashed var(--border-hover);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 244, 246, 0.94)),
    var(--surface);
}

.sentiment-method--collapsed {
  padding: 0;
}

.sentiment-method__summary {
  cursor: pointer;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-dim);
  padding: var(--sp-sm) var(--sp-md);
}

.sentiment-method__summary::-webkit-details-marker {
  display: none;
}

.sentiment-method__content {
  padding: 0 var(--sp-md) var(--sp-md);
}

.sentiment-method__title {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-dim);
  margin-bottom: 0.35rem;
}

.sentiment-method__desc {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-bottom: 0.35rem;
}

.sentiment-method__thresholds {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.45rem;
}

.threshold-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.14rem 0.45rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-hover);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.96);
}

.admin-page .trend-table-wrap,
.admin-page .sentiment-table-wrap {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(247, 247, 249, 0.96)),
    var(--surface);
}

.admin-page .trend-table th,
.admin-page .sentiment-table th {
  background: rgba(244, 244, 246, 0.94);
  color: var(--text);
  border-bottom-color: rgba(24, 24, 29, 0.08);
}

.admin-page .trend-table tr.expandable-row:hover td,
.admin-page .sentiment-table tr.expandable-row:hover td,
.admin-page .trend-table tr.expandable-row.is-expanded td,
.admin-page .sentiment-table tr.expandable-row.is-expanded td,
.admin-page .trend-table tr.expandable-row:focus-visible td,
.admin-page .sentiment-table tr.expandable-row:focus-visible td {
  background: rgba(244, 244, 246, 0.94);
  box-shadow: inset 0 0 0 1px rgba(24, 24, 29, 0.08);
}

.admin-page .sentiment-details-row td,
.admin-page .sentiment-details-cell {
  background: rgba(247, 247, 249, 0.98);
}

.admin-page .admin-auth-feedback--ok,
.admin-page .admin-result--ok {
  color: #166534;
}

.admin-page .admin-auth-feedback--error,
.admin-page .admin-result--error {
  color: #b42318;
}

[data-theme="dark"] .admin-page .trend-table-wrap,
[data-theme="dark"] .admin-page .sentiment-table-wrap,
[data-theme="dark"] .admin-page .admin-status-inline {
  background:
    linear-gradient(180deg, rgba(30, 32, 37, 0.99), rgba(26, 28, 32, 0.95)),
    var(--surface);
}

[data-theme="dark"] .admin-page .trend-table th,
[data-theme="dark"] .admin-page .sentiment-table th {
  background: rgba(36, 38, 43, 0.96);
  color: var(--text-dim);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .admin-page .trend-table tr.expandable-row:hover td,
[data-theme="dark"] .admin-page .sentiment-table tr.expandable-row:hover td,
[data-theme="dark"] .admin-page .trend-table tr.expandable-row.is-expanded td,
[data-theme="dark"] .admin-page .sentiment-table tr.expandable-row.is-expanded td,
[data-theme="dark"] .admin-page .trend-table tr.expandable-row:focus-visible td,
[data-theme="dark"] .admin-page .sentiment-table tr.expandable-row:focus-visible td {
  background: rgba(42, 45, 51, 0.9);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .admin-page .sentiment-details-row td,
[data-theme="dark"] .admin-page .sentiment-details-cell {
  background: rgba(30, 32, 37, 0.94);
}

[data-theme="dark"] .admin-page .admin-auth-feedback--ok,
[data-theme="dark"] .admin-page .admin-result--ok {
  color: #a7f3d0;
}

[data-theme="dark"] .admin-page .admin-auth-feedback--error,
[data-theme="dark"] .admin-page .admin-result--error {
  color: #fda4af;
}

@media (max-width: 1180px) {

  .admin-page .admin-table-wrap,
  .admin-page .admin-table-wrap--tall,
  .admin-page .trend-table-wrap,
  .admin-page .sentiment-table-wrap {
    max-height: none;
    overflow: hidden;
  }

  .admin-page .trend-table,
  .admin-page .sentiment-table {
    width: 100%;
    border-collapse: separate;
  }

  .admin-page .trend-table thead,
  .admin-page .sentiment-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .admin-page .trend-table tbody,
  .admin-page .sentiment-table tbody {
    display: grid;
    gap: 0.8rem;
  }

  .admin-page .trend-table tr,
  .admin-page .sentiment-table tr {
    display: grid;
    gap: 0.7rem;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(24, 24, 29, 0.08);
    border-radius: 18px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(247, 247, 249, 0.96)),
      var(--surface);
    box-shadow: 0 10px 26px rgba(31, 38, 46, 0.06);
  }

  .admin-page .trend-table tr:hover td,
  .admin-page .sentiment-table tr:hover td,
  .admin-page .trend-table tr.expandable-row:hover td,
  .admin-page .sentiment-table tr.expandable-row:hover td,
  .admin-page .trend-table tr.expandable-row.is-expanded td,
  .admin-page .sentiment-table tr.expandable-row.is-expanded td,
  .admin-page .trend-table tr.expandable-row:focus-visible td,
  .admin-page .sentiment-table tr.expandable-row:focus-visible td {
    background: transparent;
    box-shadow: none;
  }

  .admin-page .trend-table td,
  .admin-page .sentiment-table td {
    display: grid;
    grid-template-columns: minmax(6.5rem, 8.5rem) minmax(0, 1fr);
    gap: 0.45rem 0.8rem;
    align-items: start;
    width: 100%;
    padding: 0;
    border: 0;
    white-space: normal;
    word-break: break-word;
  }

  .admin-page .trend-table td::before,
  .admin-page .sentiment-table td::before {
    content: attr(data-label);
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-dim);
  }

  .admin-page .trend-table td[colspan],
  .admin-page .sentiment-table td[colspan] {
    display: block;
    padding: 0.25rem 0;
    text-align: left;
  }

  .admin-page .trend-table td[colspan]::before,
  .admin-page .sentiment-table td[colspan]::before {
    content: none;
  }

  .admin-page .trend-table td code,
  .admin-page .sentiment-table td code {
    white-space: normal;
    word-break: break-all;
  }

  .admin-page .admin-inline-actions {
    justify-content: flex-start;
  }

  [data-theme="dark"] .admin-page .trend-table tr,
  [data-theme="dark"] .admin-page .sentiment-table tr {
    border-color: rgba(255, 255, 255, 0.10);
    background:
      linear-gradient(180deg, rgba(36, 38, 44, 0.99), rgba(30, 32, 37, 0.96)),
      var(--surface);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
  }

  [data-theme="dark"] .admin-page .trend-table td,
  [data-theme="dark"] .admin-page .sentiment-table td {
    color: #e8eaee;
  }

  [data-theme="dark"] .admin-page .trend-table td::before,
  [data-theme="dark"] .admin-page .sentiment-table td::before {
    color: #9ea3ad;
  }
}

.sentiment-method__list {
  margin: 0;
  padding-left: 1rem;
  color: var(--text-dim);
  font-size: 0.76rem;
  line-height: 1.45;
}

/* ── Source coverage heatmap ───────────────────────────────────── */
.heatmap-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.heatmap-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.heatmap-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
}

.heatmap-table th {
  padding: var(--sp-sm) var(--sp-xs);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: capitalize;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  writing-mode: vertical-lr;
  transform: rotate(180deg);
  text-align: left;
  min-width: 56px;
  max-width: 92px;
  height: 124px;
}

.heatmap-source {
  padding: var(--sp-xs) var(--sp-sm);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-dim);
  white-space: nowrap;
  background: var(--surface);
  border-right: 1px solid var(--border);
  position: sticky;
  left: 0;
  z-index: 1;
}

.heatmap-cell {
  padding: var(--sp-xs);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
  min-width: 50px;
}

.heatmap-table tr:last-child td {
  border-bottom: none;
}

.heatmap-topic {
  border-right: 1px solid var(--border);
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 640px) {
  .container {
    padding: 0 var(--sp-md);
  }

  .nav {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.75rem 0;
    gap: 0.35rem;
  }

  .nav-links {
    display: flex;
    align-items: center;
    gap: var(--sp-lg);
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-left: 0.7rem;
    padding-bottom: 0.2rem;
  }

  .nav-links li {
    display: inline-flex;
  }

  .nav-links a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    font-size: 0.82rem;
  }

  .article-card--has-image {
    grid-template-columns: 1fr;
  }

  .article-card--social.article-card--social-placeholder {
    grid-template-columns: 1fr;
  }

  .article-card__img {
    width: 100%;
    height: 160px;
  }

  .article-card--social.article-card--social-placeholder .article-card__img {
    width: 100%;
    height: 160px;
  }

  .article-card {
    padding: var(--sp-md);
  }

  .hero {
    padding: var(--sp-xl) 0 var(--sp-lg);
  }

  .hero-sub {
    font-size: 0.92rem;
  }

  .hero-meta {
    gap: 0.55rem 0.9rem;
    font-size: 0.68rem;
  }

  .hero-magazine__brief,
  .magazine-card,
  .sidebar-card,
  .spotlight-card {
    padding: var(--sp-md);
  }

  .home-magazine-shell {
    padding-top: var(--sp-md);
  }

  .home-section-head {
    margin-bottom: var(--sp-md);
    padding-bottom: 0.65rem;
  }

  .home-panel-controls {
    justify-content: flex-start;
    margin-bottom: 0.85rem;
  }

  .lead-feature__title {
    font-size: 1.5rem;
    max-width: none;
  }

  .lead-feature__dek {
    font-size: 0.9rem;
  }

  .sidebar-disclosure__summary {
    gap: 0.35rem;
  }

  .sidebar-disclosure__meta {
    gap: 0.2rem;
  }

  .sidebar-summary--ranked {
    gap: 0.4rem;
  }

  .lead-support-item {
    padding: 0.6rem;
  }

  .home-panel+.home-panel,
  .home-sidebar-panel+.home-sidebar-panel {
    padding-top: 1.1rem;
  }

  .home-social-story-item--with-image {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .home-social-story-item--fallback {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .home-social-story-title {
    font-size: 0.84rem;
  }

  .spotlight-card__value {
    font-size: 0.92rem;
  }

  .filter-bar {
    gap: 0.4rem;
  }

  .filter-chip {
    padding: 0.25rem 0.62rem;
    font-size: 0.66rem;
  }

  .media-view-toggle {
    grid-template-columns: 1fr;
    gap: 0.55rem;
    margin-bottom: var(--sp-lg);
  }

  .view-toggle-btn {
    min-height: 76px;
    padding: 0.72rem 0.82rem;
  }

  .view-toggle-btn__label {
    font-size: 0.94rem;
  }

  .table-controls {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .control-field {
    justify-content: space-between;
    width: 100%;
    font-size: 0.62rem;
  }

  .control-select {
    flex: 1;
    min-width: 0;
    font-size: 0.68rem;
  }

  .admin-form-grid--two,
  .admin-form-grid--three {
    grid-template-columns: 1fr;
  }

  .admin-task-card,
  .admin-gate-card {
    padding: var(--sp-md);
  }

  .admin-head-control {
    width: 100%;
    max-width: none;
  }

  .admin-panel__meta {
    width: 100%;
    justify-content: flex-start;
  }

  .admin-shell-actions {
    width: 100%;
  }

  .admin-shell-actions .filter-chip {
    width: 100%;
  }

  .admin-section-nav {
    display: flex;
  }

  .admin-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-actions .filter-chip {
    width: 100%;
  }

  .trend-table th,
  .trend-table td,
  .sentiment-table th,
  .sentiment-table td {
    padding: 0.45rem 0.5rem;
    font-size: 0.76rem;
  }

  .admin-page .trend-table tr,
  .admin-page .sentiment-table tr {
    padding: 0.7rem 0.75rem;
    gap: 0.5rem;
  }

  .admin-page .trend-table td,
  .admin-page .sentiment-table td {
    grid-template-columns: 1fr;
    gap: 0.15rem;
    font-size: 0.82rem;
  }

  .admin-task-card {
    padding: clamp(0.6rem, 2vw, 1rem);
  }

  .admin-task-card__head {
    margin-bottom: 0.6rem;
  }

  .admin-task-card__head h3 {
    font-size: 0.92rem;
  }

  .admin-task-card__head p {
    font-size: 0.76rem;
  }

  .table-rank {
    margin-right: 0.35rem;
  }

  .sentiment-topic-main {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.35rem;
  }

  .table-term-toggle {
    font-size: 0.62rem;
  }

  .sentiment-details-cell {
    padding: 0.45rem 0.5rem;
  }

  .sentiment-article-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .sentiment-article-item {
    padding: 0.45rem 0.5rem;
  }

  .sentiment-article-title {
    font-size: 0.76rem;
  }

  .sentiment-article-meta {
    font-size: 0.62rem;
  }

  .sentiment-method {
    padding: 0.7rem;
  }

  .sentiment-method--collapsed {
    padding: 0;
  }

  .sentiment-method__summary {
    padding: 0.58rem 0.7rem;
  }

  .sentiment-method__content {
    padding: 0 0.7rem 0.7rem;
  }

  .sentiment-method__desc {
    font-size: 0.74rem;
  }

  .admin-inline-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-inline-btn {
    width: 100%;
  }

  .heatmap-table th {
    height: 84px;
    max-width: 78px;
  }

  .pagination {
    width: 100%;
  }

  .page-btn {
    min-height: 34px;
  }

  .page-btn--load-more {
    width: 100%;
    max-width: 260px;
  }

  .pagination__status,
  .pagination__note {
    text-align: center;
  }

  .cookie-notice {
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-notice__text {
    max-width: none;
  }

  .cookie-notice__actions {
    width: 100%;
    justify-content: space-between;
  }

  .review-score-detail {
    display: inline-flex;
  }

  .lead-feature {
    grid-template-columns: 1fr;
  }

  .home-social-table td:nth-child(1),
  .home-social-table td:nth-child(2),
  .home-social-table td:nth-child(3) {
    width: auto;
  }
}

/* ── UX Enhancements (2026-04 audit) ───────────────────────────────
   Skeleton loaders, skip link, accessibility utilities, header
   utilities (theme toggle + updated pill), segmented feed control,
   home search input, and focus rings. Added as a block to keep the
   audit changes isolated and reversible. */

/* Screen-reader only utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip-to-content link */
.skip-link {
  position: absolute;
  left: 0;
  top: -40px;
  z-index: 200;
  padding: 0.5rem 0.9rem;
  background: var(--accent);
  color: #fff7f5;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 0 0 8px 0;
  transition: top 0.15s ease;
}
.skip-link:focus,
.skip-link:focus-visible {
  top: 0;
  outline: 2px solid #fff7f5;
  outline-offset: 2px;
}

/* Global focus ring */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
.filter-chip:focus-visible,
.page-btn:focus-visible,
.segmented-control__option:focus-visible,
.theme-toggle-btn:focus-visible,
.home-search__clear:focus-visible,
.platform-chart-tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── Skeleton loaders ──────────────────────────────────────────── */
@keyframes skeleton-shimmer {
  0% { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}

.skeleton,
.skeleton-feed .skeleton {
  background: transparent;
}

.skeleton__image,
.skeleton__meta,
.skeleton__title,
.skeleton__line,
.skeleton__rail-item,
.skeleton__thumb,
.skeleton__tab,
.skeleton__row,
.skeleton__body::before {
  display: block;
  background: linear-gradient(90deg,
      rgba(24, 24, 29, 0.06) 0%,
      rgba(24, 24, 29, 0.11) 50%,
      rgba(24, 24, 29, 0.06) 100%);
  background-size: 200px 100%;
  background-repeat: no-repeat;
  animation: skeleton-shimmer 1.6s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

[data-theme="dark"] .skeleton__image,
[data-theme="dark"] .skeleton__meta,
[data-theme="dark"] .skeleton__title,
[data-theme="dark"] .skeleton__line,
[data-theme="dark"] .skeleton__rail-item,
[data-theme="dark"] .skeleton__thumb,
[data-theme="dark"] .skeleton__tab,
[data-theme="dark"] .skeleton__row {
  background: linear-gradient(90deg,
      rgba(255, 255, 255, 0.05) 0%,
      rgba(255, 255, 255, 0.09) 50%,
      rgba(255, 255, 255, 0.05) 100%);
  background-size: 200px 100%;
  background-repeat: no-repeat;
}

.skeleton--lead {
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) minmax(280px, 0.86fr);
  grid-template-areas:
    "image rail"
    "meta  rail"
    "title rail"
    "line1 rail"
    "line2 rail"
    "line3 rail";
  gap: 0.65rem var(--sp-lg);
  align-items: start;
}
.skeleton--lead .skeleton__image {
  grid-area: image;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  margin-bottom: 0.35rem;
}
.skeleton--lead .skeleton__meta {
  grid-area: meta;
  height: 14px;
  width: 60%;
}
.skeleton--lead .skeleton__title--lead {
  grid-area: title;
  height: 36px;
  width: 90%;
  border-radius: 6px;
}
.skeleton--lead .skeleton__line {
  height: 12px;
  width: 96%;
}
.skeleton--lead .skeleton__line:nth-of-type(1) { grid-area: line1; }
.skeleton--lead .skeleton__line:nth-of-type(2) { grid-area: line2; }
.skeleton--lead .skeleton__line:nth-of-type(3) { grid-area: line3; width: 60%; }
.skeleton--lead .skeleton__rail {
  grid-area: rail;
  display: grid;
  gap: 0.65rem;
}
.skeleton--lead .skeleton__rail-item {
  height: 64px;
  border-radius: var(--radius);
}

.skeleton-feed {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}
.skeleton--card {
  display: grid;
  grid-template-columns: 1fr 140px;
  gap: var(--sp-lg);
  padding: var(--sp-lg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.skeleton--card .skeleton__body {
  display: grid;
  gap: 0.5rem;
  align-content: start;
  min-width: 0;
}
.skeleton--card .skeleton__meta { height: 12px; width: 45%; }
.skeleton--card .skeleton__title { height: 18px; width: 85%; }
.skeleton--card .skeleton__line { height: 11px; width: 95%; }
.skeleton--card .skeleton__line--short { width: 55%; }
.skeleton--card .skeleton__line--wide { width: 100%; }
.skeleton--card .skeleton__thumb {
  width: 140px;
  height: 95px;
}

.skeleton--sidebar {
  display: grid;
  gap: 0.85rem;
}
.skeleton__tabs {
  display: flex;
  gap: 0.45rem;
}
.skeleton__tab {
  width: 56px;
  height: 24px;
  border-radius: 999px;
}
.skeleton__list {
  display: grid;
  gap: 0.55rem;
}
.skeleton__row {
  height: 28px;
  width: 100%;
}
.skeleton__row:nth-child(2) { width: 88%; }
.skeleton__row:nth-child(3) { width: 94%; }
.skeleton__row:nth-child(4) { width: 78%; }
.skeleton__row:nth-child(5) { width: 85%; }

@media (prefers-reduced-motion: reduce) {
  .skeleton__image,
  .skeleton__meta,
  .skeleton__title,
  .skeleton__line,
  .skeleton__rail-item,
  .skeleton__thumb,
  .skeleton__tab,
  .skeleton__row {
    animation: none;
  }
  .nav-dot {
    animation: none;
  }
}

@media (max-width: 560px) {
  .skeleton--lead {
    grid-template-columns: 1fr;
    grid-template-areas:
      "image"
      "meta"
      "title"
      "line1"
      "line2"
      "line3"
      "rail";
  }
  .skeleton--card {
    grid-template-columns: 1fr;
  }
  .skeleton--card .skeleton__thumb {
    width: 100%;
    height: 160px;
  }
}

/* ── Header utilities (theme toggle, updated pill) ─────────────── */
.nav {
  flex-wrap: wrap;
}
.nav-cluster {
  display: flex;
  align-items: center;
  gap: var(--sp-lg);
  flex: 1 1 auto;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.nav-utilities {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.updated-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.26rem 0.6rem 0.26rem 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(24, 24, 29, 0.08);
  border-radius: 999px;
  white-space: nowrap;
  cursor: default;
  font: inherit;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.updated-pill[hidden] { display: none; }
.updated-pill__refresh {
  display: none;
  align-items: center;
  justify-content: center;
  margin-left: 0.05rem;
  color: inherit;
}
.updated-pill--actionable {
  cursor: pointer;
}
.updated-pill--actionable .updated-pill__refresh {
  display: inline-flex;
}
.updated-pill--actionable:hover {
  background: rgba(255, 255, 255, 1);
  border-color: rgba(24, 24, 29, 0.18);
  color: var(--text);
}
.updated-pill--stale .updated-pill__refresh {
  color: #b45309;
}
.updated-pill--error .updated-pill__refresh {
  color: #b91c1c;
}
.updated-pill--refreshing .updated-pill__refresh {
  animation: updatedPillSpin 0.9s linear infinite;
}
@keyframes updatedPillSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .updated-pill--refreshing .updated-pill__refresh {
    animation: none;
  }
}
.updated-pill__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.18);
}
.updated-pill--stale .updated-pill__dot {
  background: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.22);
}
.updated-pill--error .updated-pill__dot {
  background: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.22);
}
.updated-pill__label {
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-dim);
}
.updated-pill__time {
  color: var(--text);
  font-weight: 600;
}
[data-theme="dark"] .updated-pill {
  background: rgba(30, 32, 37, 0.82);
  border-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .updated-pill--actionable:hover {
  background: rgba(40, 42, 48, 0.95);
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--text);
}
[data-theme="dark"] .updated-pill--stale .updated-pill__refresh {
  color: #fbbf24;
}
[data-theme="dark"] .updated-pill--error .updated-pill__refresh {
  color: #f87171;
}

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(24, 24, 29, 0.08);
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.theme-toggle-btn:hover {
  color: var(--text);
  border-color: rgba(24, 24, 29, 0.18);
  background: #ffffff;
}
.theme-toggle-btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.theme-toggle-btn__icon--moon { display: none; }
[data-theme="dark"] .theme-toggle-btn {
  background: rgba(30, 32, 37, 0.82);
  border-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .theme-toggle-btn__icon--sun { display: none; }
[data-theme="dark"] .theme-toggle-btn__icon--moon { display: inline-flex; }

/* Hide the legacy dark-mode checkbox + social toggle now that both
   are moved to the header / segmented control. Keeps the IDs in DOM
   for tests + controller wiring. */
.toggle-switch--hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ── Segmented feed control ───────────────────────────────────── */
.segmented-control {
  display: inline-flex;
  align-items: stretch;
  padding: 3px;
  background: rgba(24, 24, 29, 0.05);
  border: 1px solid rgba(24, 24, 29, 0.08);
  border-radius: 999px;
  gap: 2px;
}
.segmented-control__option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.36rem 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
.segmented-control__option:hover {
  color: var(--text);
}
.segmented-control__option.is-active {
  color: #fff7f5;
  background: var(--accent);
  box-shadow: 0 4px 12px rgba(255, 99, 74, 0.18);
}
[data-theme="dark"] .segmented-control {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .segmented-control__option.is-active {
  color: #fff;
}

/* ── Home search input ────────────────────────────────────────── */
.home-search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 100%;
  flex-basis: 100%;
  width: 100%;
  min-width: 0;
  max-width: none;
}
.home-search__icon {
  position: absolute;
  left: 0.7rem;
  display: inline-flex;
  align-items: center;
  color: var(--text-faint);
  pointer-events: none;
}
.home-search__input {
  width: 100%;
  padding: 0.5rem 2.15rem 0.5rem 2.15rem;
  font-size: 0.82rem;
}
.home-search__clear {
  position: absolute;
  right: 0.45rem;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 1rem;
  line-height: 1;
  color: var(--text-dim);
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}
.home-search__clear:hover {
  color: var(--text);
  background: rgba(24, 24, 29, 0.06);
}
.home-search__clear[hidden] { display: none; }

.home-panel-controls {
  flex-wrap: wrap;
  align-items: center;
  row-gap: 0.55rem;
}

.home-search-empty {
  padding: 1.15rem 0.9rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.7);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}
[data-theme="dark"] .home-search-empty {
  background: rgba(30, 32, 37, 0.56);
}

/* ── Filter bar: add a "Clear" chip + small label improvements ── */
.filter-bar__label {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.6rem 0.3rem 0;
  margin-right: 0.15rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.filter-chip--clear {
  color: var(--text-dim);
  background: rgba(24, 24, 29, 0.04);
  border-style: dashed;
}
.filter-chip--clear:hover {
  color: var(--text);
  background: rgba(24, 24, 29, 0.08);
}

/* ── Flatten filter-chip--active shadow (editorial polish) ────── */
.filter-chip--active {
  box-shadow: none;
}

/* ── Hover-only touch behaviour for feed cards ────────────────── */
@media (hover: none) {
  .article-card:hover {
    transform: none;
    box-shadow: var(--shadow-card);
  }
}

/* ── Lead/feature typography polish ───────────────────────────── */
.lead-feature__image {
  aspect-ratio: 16 / 9;
  max-height: none;
}

/* ── Story cluster "+N related" pill + larger hint text ───────── */
.cluster-count-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.12rem 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(255, 99, 74, 0.28);
  border-radius: 999px;
  white-space: nowrap;
}
[data-theme="dark"] .cluster-count-pill {
  color: #ffb3a0;
  border-color: rgba(255, 125, 103, 0.34);
  background: rgba(255, 125, 103, 0.14);
}

/* ── Mobile nav polish ────────────────────────────────────────── */
@media (max-width: 640px) {
  .nav {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
  .nav-cluster {
    order: 2;
    width: 100%;
    justify-content: space-between;
    gap: 0.5rem;
  }
  .nav-utilities {
    gap: 0.4rem;
  }
  .updated-pill__label {
    display: none;
  }
}

@media (max-width: 720px) {
  .article-card {
    padding: var(--sp-md);
  }
  .home-panel-controls {
    gap: 0.5rem;
  }
  .home-search {
    order: 3;
    flex-basis: 100%;
    max-width: none;
  }
  .segmented-control__option {
    padding: 0.32rem 0.7rem;
  }
}

@media (max-width: 420px) {
  .home-panel-controls {
    flex-direction: column;
    align-items: stretch;
  }
  .segmented-control {
    width: 100%;
    justify-content: space-between;
  }
  .segmented-control__option {
    flex: 1 1 0;
  }
  .home-search {
    max-width: none;
  }
}
/* ── End UX Enhancements ──────────────────────────────────────── */
