/* ============================================================
   JARONITE NEWS INC. — SHARED STYLESHEET
   Main site: public-facing news portal
   Portal: employee-only CMS (appended below)
   ============================================================ */

/* ---------- RESET & BASE ---------- */

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

:root {
  /* Brand */
  --ink-purple:    #1e0f3a;
  --mid-purple:    #7c5cbf;
  --light-purple:  #a987d8;
  --gold:          #e8c75c;
  --gold-dim:      #c9a84c;

  /* Surface */
  --paper:         #f7f5ff;
  --paper-dim:     #ede9f8;
  --ink:           #1a1a2e;
  --ink-soft:      #4a4a6a;
  --ink-muted:     #7a7a9a;
  --rule:          #d4cce8;

  /* UI */
  --card-bg:       #ffffff;
  --card-shadow:   0 2px 12px rgba(30, 15, 58, 0.10);
  --card-shadow-h: 0 8px 28px rgba(30, 15, 58, 0.18);

  /* Type */
  --font-serif:    Georgia, 'Times New Roman', serif;
  --font-sans:     system-ui, -apple-system, Arial, sans-serif;
  --font-mono:     'Courier New', Courier, monospace;
}

/* ============================================================
   DARK READING MODE — override CSS variables so every element
   that uses them automatically adapts. The site header/nav
   keeps its dark purple so it looks unchanged.
   ============================================================ */
body.reader-dark-mode {
  --paper:         #12121f;
  --paper-dim:     #1e1e32;
  --ink:           #e0dff0;
  --ink-soft:      #a8a8cc;
  --ink-muted:     #7070a0;
  --rule:          rgba(255,255,255,0.10);
  --card-bg:       #1a1a2e;
  --card-shadow:   0 2px 12px rgba(0,0,0,0.4);
  --card-shadow-h: 0 8px 28px rgba(0,0,0,0.5);
  --mid-purple:    #a78bfa;
  --light-purple:  #c4b5fd;
  background: #12121f;
}

/* Reader menu itself stays light so it's readable */
body.reader-dark-mode .reader-menu {
  background: #ffffff;
  --ink: #1a1a2e;
  --ink-soft: #4a4a6a;
  --ink-muted: #7a7a9a;
  --rule: #d4cce8;
  --paper-dim: #ede9f8;
  --mid-purple: #7c5cbf;
}
body.reader-dark-mode .reader-menu * { color: inherit; }
body.reader-dark-mode .reader-menu .reader-menu-display-name { color: #1a1a2e; }
body.reader-dark-mode .reader-menu .reader-menu-sub { color: #7a7a9a; }
body.reader-dark-mode .reader-menu .reader-menu-item,
body.reader-dark-mode .reader-menu .reader-menu-item span { color: #1a1a2e !important; }
body.reader-dark-mode .reader-menu .reader-menu-section-label { color: #7a7a9a; }
body.reader-dark-mode .reader-menu .reader-menu-toggle-item > span:first-child { color: #1a1a2e; }
body.reader-dark-mode .reader-menu .reader-menu-logout-btn { color: #c0392b; }
body.reader-dark-mode .reader-menu .reader-menu-divider { background: #d4cce8; }
body.reader-dark-mode .reader-menu .reader-toggle-track { background: #d0d0d8; }
body.reader-dark-mode .reader-menu input:checked ~ .reader-toggle-track { background: #7c5cbf; }

/* Smooth transition on all surfaces */
body, main, .hero, .categories-section, .cat-card,
.article-modal, .article-modal-body, .article-page-wrap,
.article-page-body, .article-page-title, .article-page-meta,
.article-summary-card, .card-text, .site-footer {
  transition: background 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
}

/* ---------- HEADER / MASTHEAD ---------- */

.site-header {
  background: var(--ink-purple);
  padding: 0 32px;
  border-bottom: 3px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 16px rgba(0,0,0,0.35);
}

.site-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto auto;
  gap: 0;
}

.masthead {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px 0 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.masthead img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 8px;
}

.masthead a {
  display: flex;
  flex-shrink: 0;
  border-radius: 8px;
  outline-offset: 3px;
}

.masthead-text {
  flex: 1;
}

.masthead-text h1 {
  font-family: var(--font-serif);
  font-size: 2.1rem;
  font-weight: normal;
  color: #ffffff;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.masthead-text h1 span {
  color: var(--gold);
}

.masthead-text .tagline {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--light-purple);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-top: 4px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 0;
}

.site-nav a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}

.site-nav a:hover,
.site-nav a.active {
  background: rgba(255,255,255,0.1);
  color: #ffffff;
}

/* ---------- HERO (homepage) ---------- */

.hero {
  background: linear-gradient(135deg, var(--ink-purple) 0%, #3a1f6e 60%, #4e2990 100%);
  padding: 64px 32px 56px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(232,199,92,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: center;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 12px;
}

.hero h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: normal;
  color: #ffffff;
  line-height: 1.2;
  margin-bottom: 16px;
}

.hero-sub {
  font-size: 1rem;
  color: rgba(255,255,255,0.65);
  margin-bottom: 28px;
  max-width: 520px;
}

.hero-cta {
  display: inline-block;
  background: var(--gold);
  color: var(--ink-purple);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  letter-spacing: 0.01em;
}

.hero-cta:hover {
  background: #f0d570;
  transform: translateY(-1px);
}

.hero-live-badge {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  min-width: 200px;
  max-width: 260px;
}

.hero-live-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.hero-live-label::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--gold);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

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

.hero-latest-title {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: rgba(255,255,255,0.85);
  line-height: 1.35;
  text-align: right;
  font-style: italic;
}

.hero-latest-meta {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: rgba(255,255,255,0.4);
  text-align: right;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* ---------- SECTION LABEL ---------- */

.section-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 8px;
}

/* ---------- CATEGORY GRID (homepage) ---------- */

.categories-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 56px 32px 80px;
}

.categories-section h2 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: normal;
  color: var(--ink);
  margin-bottom: 6px;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 28px;
}

.cat-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 28px 24px;
  box-shadow: var(--card-shadow);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--rule);
  transition: box-shadow 0.18s, transform 0.18s, border-color 0.18s;
  position: relative;
  overflow: hidden;
}

.cat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--cat-accent, var(--mid-purple));
}

.cat-card:hover {
  box-shadow: var(--card-shadow-h);
  transform: translateY(-3px);
  border-color: var(--cat-accent, var(--mid-purple));
}

.cat-icon {
  font-size: 1.6rem;
  line-height: 1;
}

.cat-card h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: normal;
  color: var(--ink);
  line-height: 1.25;
}

.cat-card p {
  font-size: 0.875rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

.cat-card .cat-link {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--cat-accent, var(--mid-purple));
  margin-top: auto;
}

/* Category accent colors */
.cat-card.election  { --cat-accent: #7c5cbf; }
.cat-card.projects  { --cat-accent: #2e86de; }
.cat-card.crime     { --cat-accent: #c0392b; }
.cat-card.economy   { --cat-accent: #27ae60; }

/* ---------- CATEGORY PAGE LAYOUT ---------- */

.category-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 32px 80px;
}

.category-page-header {
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--rule);
}

.category-page-header .breadcrumb {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 10px;
}

.category-page-header .breadcrumb a {
  color: var(--mid-purple);
  text-decoration: none;
}

.category-page-header .breadcrumb a:hover { text-decoration: underline; }

.category-page-header h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: normal;
  color: var(--ink);
  line-height: 1.15;
}

.category-accent-bar {
  height: 3px;
  width: 48px;
  background: var(--mid-purple);
  margin: 12px 0 0;
  border-radius: 2px;
}

/* ---------- ARTICLE CARD GRID ---------- */

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

.article-summary-card {
  background: var(--card-bg);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 22px 20px;
  cursor: pointer;
  transition: box-shadow 0.18s, transform 0.15s, border-color 0.18s;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.article-summary-card .card-category {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--mid-purple);
}

.article-summary-card h3 {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: normal;
  color: var(--ink);
  line-height: 1.3;
}

.article-summary-card .card-byline {
  font-size: 0.78rem;
  color: var(--ink-muted);
  margin-top: 4px;
}

.article-summary-card .card-date {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--ink-muted);
  letter-spacing: 0.05em;
}

/* ---------- ARTICLE CARD THUMBNAIL ---------- */

.card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 7px;
  display: block;
  margin-bottom: 4px;
  /* thumbnail sits above the text content in the card */
}

/* When a card has a thumbnail, reduce top padding slightly */
.article-summary-card.has-thumb {
  padding-top: 0;
  overflow: hidden;
}

.article-summary-card.has-thumb .card-thumb {
  /* negative margin bleeds the image to card edges, padding resumes below */
  margin: 0 0 14px;
  border-radius: 9px 9px 0 0;
  width: calc(100% + 0px); /* full bleed within the card */
}

.article-summary-card.has-thumb .card-text {
  padding: 0 2px;
}

/* ---------- ARTICLE PAGE BANNER ---------- */

.article-page-banner {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
  margin-bottom: 28px;
}

/* ---------- ARTICLE MODAL BANNER ---------- */

.article-modal-banner {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  display: block;
  /* sits flush against the header, no border-radius on top */
  border-radius: 0;
}

/* ---------- ARTICLE MODAL ---------- */


.article-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 8, 30, 0.75);
  z-index: 100;
  align-items: flex-start;
  justify-content: center;
  padding: 32px 16px 48px;
  overflow-y: auto;
  backdrop-filter: blur(3px);
}

.article-modal-overlay.open { display: flex; }

.article-modal {
  background: #ffffff;
  border-radius: 14px;
  max-width: 720px;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 24px 72px rgba(15, 8, 30, 0.35);
  animation: modal-in 0.22s ease;
}

@keyframes modal-in {
  from { transform: translateY(16px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.article-modal-header {
  background: var(--ink-purple);
  padding: 24px 28px 20px;
  position: relative;
}

.article-modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: rgba(255,255,255,0.12);
  border: none;
  color: rgba(255,255,255,0.7);
  width: 32px; height: 32px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s;
  line-height: 1;
}

.article-modal-close:hover {
  background: rgba(255,255,255,0.22);
  color: #ffffff;
}

.article-modal-stamp {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 10px;
}

.article-modal-title {
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 3vw, 1.7rem);
  font-weight: normal;
  color: #ffffff;
  line-height: 1.25;
}

.article-modal-meta {
  margin-top: 12px;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.article-modal-meta .reviewer {
  color: var(--gold);
}

.article-modal-meta .self-pub {
  font-style: italic;
}

.article-modal-body {
  padding: 28px 28px 32px;
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--ink);
}

/* Inline notice shown when an open article is refreshed (edited/censored
   server-side) or about to be closed because it's no longer available.
   Deliberately calm/informational — not an alarm or accusation. */
.modal-notice {
  font-family: var(--font-sans, system-ui);
  font-size: 0.85rem;
  background: #f7f0d8;
  color: #6b5217;
  border: 1px solid #e3d29a;
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 20px;
}

/* Drop cap on first paragraph */
.article-modal-body p:first-child::first-letter {
  float: left;
  font-size: 3.4em;
  line-height: 0.78;
  margin: 4px 8px 0 0;
  color: var(--ink-purple);
  font-family: var(--font-serif);
  font-weight: normal;
}

.article-modal-body p {
  margin-bottom: 1.1em;
}

/* ---------- EMPTY / LOADING STATES ---------- */

.state-loading {
  text-align: center;
  padding: 60px 20px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.state-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.state-empty strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

/* ---------- FOOTER ---------- */

.site-footer {
  background: var(--ink-purple);
  border-top: 3px solid var(--gold);
  padding: 28px 32px;
  text-align: center;
  color: rgba(255,255,255,0.45);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.site-footer a {
  color: var(--light-purple);
  text-decoration: none;
}

.site-footer a:hover { color: var(--gold); }

/* ---------- READER AUTH (Discord login widget in header) ---------- */

.reader-auth {
  display: flex;
  align-items: center;
  margin-left: auto;
  position: relative;
}

.reader-login-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #5865f2;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 7px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  font-family: var(--font-sans);
}

.reader-login-btn:hover { background: #4752c4; }

.reader-login-btn svg { width: 16px; height: 16px; fill: currentColor; flex-shrink: 0; }

.reader-account {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 5px 10px 5px 6px;
  border-radius: 20px;
  transition: background 0.15s;
}

.reader-account:hover { background: rgba(255,255,255,0.1); }

.reader-account img {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: block;
}

.reader-account .reader-name {
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 500;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reader-chevron {
  width: 14px; height: 14px;
  color: rgba(255,255,255,0.6);
  flex-shrink: 0;
  transition: transform 0.2s;
}
.reader-account.open .reader-chevron { transform: rotate(180deg); }

.reader-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.14), 0 2px 8px rgba(0,0,0,0.08);
  min-width: 240px;
  z-index: 200;
  display: none;
  padding: 8px;
  animation: menuFadeIn 0.15s ease;
}

@keyframes menuFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.reader-menu.open { display: block; }

/* Profile row at top of menu */
.reader-menu-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 10px;
}
.reader-menu-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  flex-shrink: 0;
}
.reader-menu-profile-text { min-width: 0; }
.reader-menu-display-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.reader-menu-sub {
  font-size: 0.72rem;
  color: var(--ink-muted);
  margin-top: 1px;
}

.reader-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 7px;
  color: var(--ink) !important;
  text-decoration: none !important;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.12s;
}
.reader-menu-item svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--ink-muted); }
.reader-menu-item span { color: var(--ink); }
.reader-menu-item:hover { background: var(--paper-dim); }

.reader-menu-item .fav-cat {
  font-size: 0.68rem;
  color: var(--mid-purple);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: block;
  margin-top: 2px;
}

.reader-menu-empty {
  padding: 16px 10px;
  text-align: center;
  color: var(--ink-muted);
  font-size: 0.82rem;
}

.reader-menu-divider { height: 1px; background: var(--rule); margin: 5px 4px; }

.reader-menu-section-label {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  padding: 6px 10px 2px;
}

/* Toggle row (settings) */
.reader-menu-toggle-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 0.84rem;
  color: var(--ink);
  transition: background 0.12s;
  user-select: none;
}
.reader-menu-toggle-item:hover { background: var(--paper-dim); }
.reader-menu-toggle-item > span:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}
.reader-menu-toggle-item svg { width: 16px; height: 16px; color: var(--ink-muted); }
.reader-menu-toggle-item input[type="checkbox"] { display: none; }

/* Toggle track/thumb */
.reader-toggle-track {
  width: 32px; height: 18px;
  background: #d0d0d8;
  border-radius: 9px;
  position: relative;
  flex-shrink: 0;
  transition: background 0.2s;
}
.reader-toggle-thumb {
  position: absolute;
  top: 2px; left: 2px;
  width: 14px; height: 14px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: left 0.2s;
}
.reader-menu-toggle-item input:checked ~ .reader-toggle-track { background: var(--mid-purple); }
.reader-menu-toggle-item input:checked ~ .reader-toggle-track .reader-toggle-thumb { left: 16px; }

/* Logout button */
.reader-menu-logout-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 10px;
  border-radius: 7px;
  border: none;
  background: none;
  color: #c0392b;
  font-size: 0.85rem;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s;
}
.reader-menu-logout-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.reader-menu-logout-btn:hover { background: #fff0ef; }

/* ---------- FAVORITE BUTTON ---------- */

.fav-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  color: rgba(255,255,255,0.55);
  transition: color 0.15s, transform 0.1s;
}

.fav-btn:hover { color: var(--gold); transform: scale(1.08); }
.fav-btn.favorited { color: #e0556f; }
.fav-btn svg { width: 22px; height: 22px; }
.fav-btn.favorited svg { fill: #e0556f; stroke: #e0556f; }

.card-fav-btn {
  position: absolute;
  top: 12px; right: 12px;
  color: var(--ink-muted);
  background: rgba(255,255,255,0.85);
  border-radius: 50%;
  width: 30px; height: 30px;
}

.card-fav-btn:hover { color: #e0556f; }
.card-fav-btn.favorited { color: #e0556f; }
.card-fav-btn.favorited svg { fill: #e0556f; stroke: #e0556f; }

/* ---------- COMMENTS ---------- */

.comments-section {
  border-top: 1px solid var(--rule);
  padding: 24px 28px 28px;
  background: var(--paper-dim);
}

.comments-heading {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  margin-bottom: 14px;
}

.comment-form {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.comment-form textarea {
  flex: 1;
  resize: vertical;
  min-height: 44px;
  max-height: 160px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  color: var(--ink);
}

.comment-form button {
  background: var(--mid-purple);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0 18px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  align-self: flex-end;
  height: 38px;
}

.comment-form button:hover { background: var(--ink-purple); }
.comment-form button:disabled { background: var(--ink-muted); cursor: not-allowed; }

.comment-login-prompt {
  background: #ffffff;
  border: 1px dashed var(--rule);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 18px;
  font-size: 0.85rem;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.comment-item {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.comment-item img {
  width: 32px; height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
}

.comment-body { flex: 1; }

.comment-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 3px;
}

.comment-author {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--ink-purple);
}

.comment-date {
  font-size: 0.7rem;
  color: var(--ink-muted);
}

.comment-text {
  font-size: 0.88rem;
  color: var(--ink);
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.comment-delete {
  background: none;
  border: none;
  color: var(--ink-muted);
  font-size: 0.72rem;
  cursor: pointer;
  margin-top: 4px;
  padding: 0;
}

.comment-delete:hover { color: #a00000; text-decoration: underline; }

.comments-empty {
  color: var(--ink-muted);
  font-size: 0.85rem;
  font-style: italic;
}

/* ---------- NAV FAVORITES BUTTON ---------- */

.site-nav .nav-favorites-btn {
  background: rgba(255,255,255,0.12);
  border-radius: 6px;
  padding: 5px 12px;
  font-weight: 600;
  transition: background 0.15s;
}

.site-nav .nav-favorites-btn:hover {
  background: rgba(255,255,255,0.22);
}

.site-nav .nav-advertise-btn {
  background: rgba(255,220,80,0.18);
  border: 1px solid rgba(255,220,80,0.35);
  border-radius: 6px;
  padding: 5px 12px;
  font-weight: 700;
  color: #ffe566 !important;
  transition: background 0.15s, border-color 0.15s;
}

.site-nav .nav-advertise-btn:hover {
  background: rgba(255,220,80,0.30);
  border-color: rgba(255,220,80,0.6);
}

/* ---------- ARTICLE SEARCH / SORT / FILTER CONTROLS ---------- */

.article-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 24px;
}

.article-controls input[type="search"] {
  flex: 1 1 200px;
  min-width: 160px;
  padding: 8px 12px;
  border: 1px solid var(--rule);
  border-radius: 7px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  background: var(--card-bg);
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s;
}

.article-controls input[type="search"]:focus {
  border-color: var(--mid-purple);
}

.article-controls select {
  padding: 8px 12px;
  border: 1px solid var(--rule);
  border-radius: 7px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  background: var(--card-bg);
  color: var(--ink);
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s;
}

.article-controls select:focus {
  border-color: var(--mid-purple);
}

.article-controls-count {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-muted);
  letter-spacing: 0.05em;
  margin-left: auto;
  white-space: nowrap;
}

.no-results-msg {
  color: var(--ink-muted);
  font-size: 0.95rem;
  font-style: italic;
  padding: 32px 0;
  text-align: center;
  grid-column: 1 / -1;
}

/* ---------- RESPONSIVE ---------- */

@media (max-width: 700px) {
  .site-header { padding: 0 16px; }
  .masthead-text h1 { font-size: 1.5rem; }
  .hero { padding: 40px 16px 36px; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-live-badge { display: none; }
  .categories-section,
  .category-page { padding: 32px 16px 60px; }
  .articles-grid { grid-template-columns: 1fr; }
  .article-modal-header { padding: 20px 20px 16px; }
  .article-modal-body { padding: 20px 20px 28px; }
}


/* ================================================================
   PORTAL SECTION — employee CMS only (body.portal scoping)
   Everything below only applies when <body class="portal"> is set.
   The main-site styles above do not interfere.
   ================================================================ */

body.portal {
  background: #0d0d0d !important;
  color: #f0f0f0 !important;
  font-family: 'Georgia', serif !important;
  min-height: 100vh;
}

body.portal * { box-sizing: border-box; }

body.portal button {
  background: #c9a84c !important;
  color: #000 !important;
  border: none !important;
  padding: 12px !important;
  border-radius: 8px !important;
  font-size: 1rem !important;
  font-weight: bold !important;
  cursor: pointer !important;
  width: 100% !important;
}

body.portal button:hover { background: #e0bc6a !important; }

#login-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  gap: 16px;
}

#login-screen h1 { font-size: 2rem; color: #c9a84c; margin-bottom: 8px; }
#login-screen p  { color: #888; margin-bottom: 16px; }

.login-box {
  background: #1a1a1a;
  border: 1px solid #2e2e2e;
  border-radius: 12px;
  padding: 40px;
  width: 360px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

body.portal input,
body.portal textarea,
body.portal select {
  background: #111;
  border: 1px solid #333;
  color: #f0f0f0;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 1rem;
  width: 100%;
  outline: none;
}

body.portal input:focus,
body.portal textarea:focus,
body.portal select:focus { border-color: #c9a84c; }

.btn-danger  { background: #8b0000 !important; color: #fff !important; width: auto !important; padding: 6px 14px !important; font-size: 0.85rem !important; }
.btn-danger:hover { background: #a00000 !important; }
.btn-edit    { background: #1a3a5c !important; color: #fff !important; width: auto !important; padding: 6px 14px !important; font-size: 0.85rem !important; }
.btn-edit:hover { background: #1e4a75 !important; }
.btn-censor  { background: #4a4a00 !important; color: #fff !important; width: auto !important; padding: 6px 14px !important; font-size: 0.85rem !important; }
.btn-censor:hover { background: #666600 !important; }
.btn-secondary { background: transparent !important; border: 1px solid #555 !important; color: #aaa !important; }
.btn-secondary:hover { border-color: #c9a84c !important; color: #c9a84c !important; }

#error-msg { color: #e74c3c; font-size: 0.9rem; text-align: center; }

.portal-header {
  background: #1a1a1a;
  border-bottom: 1px solid #2e2e2e;
  padding: 16px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.portal-header h1 { color: #c9a84c; font-size: 1.4rem; }
.portal-header span { color: #888; font-size: 0.9rem; }
.portal-header .right { display: flex; align-items: center; gap: 16px; }

.portal-body {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.portal-body .card {
  background: #1a1a1a;
  border: 1px solid #2e2e2e;
  border-radius: 12px;
  padding: 30px;
  box-shadow: none;
}

.portal-body .card h2 {
  color: #c9a84c;
  margin-bottom: 20px;
  font-size: 1.2rem;
  border-bottom: 1px solid #2e2e2e;
  padding-bottom: 10px;
}

.form-group { display: flex; flex-direction: column; gap: 12px; }

body.portal textarea { resize: vertical; min-height: 160px; font-family: Georgia, serif; }

#post-msg { color: #2ecc71; font-size: 0.9rem; margin-top: 8px; }

.article-item {
  border: 1px solid #2e2e2e;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
  background: #111;
}

.article-item h3 { color: #f0f0f0; margin-bottom: 4px; }
.article-item .meta { color: #666; font-size: 0.8rem; margin-bottom: 10px; }
.article-item .preview { color: #aaa; font-size: 0.9rem; margin-bottom: 12px; }
.article-item .censored-label { color: #e74c3c; font-style: italic; font-size: 0.85rem; }
.article-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.edit-form { margin-top: 12px; display: none; flex-direction: column; gap: 10px; }
.edit-form.open { display: flex; }

#admin-section { display: none; }

.tab-bar { display: flex; gap: 8px; margin-bottom: 20px; }

.tab {
  padding: 8px 20px;
  border-radius: 8px;
  border: 1px solid #333;
  background: transparent;
  color: #aaa;
  cursor: pointer;
  width: auto;
}

.tab.active { background: #c9a84c; color: #000; border-color: #c9a84c; }

/* LOGS */
.log-item {
  border: 1px solid #2e2e2e;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 8px;
  background: #111;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.log-left { flex: 1; }
.log-action { font-weight: bold; color: #c9a84c; font-size: 0.85rem; margin-bottom: 4px; }
.log-details { color: #ccc; font-size: 0.9rem; }
.log-user { color: #888; font-size: 0.8rem; margin-top: 4px; }
.log-time { color: #555; font-size: 0.78rem; white-space: nowrap; }

.log-action.LOGIN               { color: #2ecc71; }
.log-action.FAILED_LOGIN        { color: #e74c3c; }
.log-action.POST_ARTICLE        { color: #3498db; }
.log-action.DELETE_ARTICLE      { color: #e74c3c; }
.log-action.CENSOR_ARTICLE      { color: #e67e22; }
.log-action.UNCENSOR_ARTICLE    { color: #f1c40f; }
.log-action.EDIT_ARTICLE        { color: #9b59b6; }
.log-action.CREATE_USER         { color: #2ecc71; }
.log-action.DELETE_USER         { color: #e74c3c; }
.log-action.CHANGE_ROLE         { color: #1abc9c; }
.log-action.SET_USER_STATUS     { color: #f1c40f; }
.log-action.RESET_PASSWORD      { color: #9b59b6; }
.log-action.CLAIM_ARTICLE       { color: #3498db; }
.log-action.APPROVE_ARTICLE     { color: #2ecc71; }
.log-action.RETURN_ARTICLE      { color: #e67e22; }
.log-action.DENY_ARTICLE        { color: #e74c3c; }
.log-action.RESUBMIT_ARTICLE    { color: #9b59b6; }
.log-action.ADMIN_REASSIGN_CLAIM{ color: #f1c40f; }
.log-action.INSTAPUBLISH_ARTICLE{ color: #2ecc71; }

.log-filters { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }

.log-filter-btn {
  padding: 6px 14px !important;
  width: auto !important;
  font-size: 0.8rem !important;
  background: #1a1a1a !important;
  color: #aaa !important;
  border: 1px solid #333 !important;
}

.log-filter-btn.active { background: #c9a84c !important; color: #000 !important; border-color: #c9a84c !important; }

/* USER DETAIL PANEL */
.user-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.user-row-main { flex: 1; cursor: pointer; }
.user-row-main:hover h3 { color: #e0bc6a; }

.status-badge { font-size: 0.72rem; padding: 2px 8px; border-radius: 999px; margin-left: 8px; text-transform: uppercase; font-weight: bold; }
.status-badge.active    { background: #14331f; color: #2ecc71; }
.status-badge.suspended { background: #3a1f1f; color: #e74c3c; }

.user-detail-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 50;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  overflow-y: auto;
}

.user-detail-overlay.open { display: flex; }

.user-detail-panel {
  background: #111;
  border: 1px solid #2e2e2e;
  border-radius: 12px;
  padding: 28px;
  max-width: 640px;
  width: 100%;
}

.user-detail-panel h2 { color: #c9a84c; margin-top: 0; }

.user-detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 16px 0 24px; }

.user-detail-field { background: #1a1a1a; border: 1px solid #2e2e2e; border-radius: 8px; padding: 10px 14px; }
.user-detail-field .label { font-size: 0.72rem; color: #888; text-transform: uppercase; margin-bottom: 4px; }
.user-detail-field .value { font-size: 0.95rem; color: #f0f0f0; }

.user-detail-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.user-detail-actions button { width: auto !important; padding: 8px 16px !important; font-size: 0.85rem !important; }

.btn-secondary-inline { background: #1a1a1a !important; color: #ccc !important; border: 1px solid #333 !important; }

.close-btn {
  width: auto !important;
  padding: 8px 16px !important;
  background: #1a1a1a !important;
  color: #aaa !important;
  border: 1px solid #333 !important;
  float: right;
}

/* WRITER / EDITOR / ADMIN REVIEW WORKFLOW */
.status-pill { display: inline-block; font-size: 0.72rem; padding: 2px 10px; border-radius: 999px; text-transform: uppercase; font-weight: bold; margin-left: 8px; }
.status-pill.pending_review { background: #2a2410; color: #f1c40f; }
.status-pill.claimed        { background: #14223a; color: #3498db; }
.status-pill.returned       { background: #3a2a14; color: #e67e22; }
.status-pill.denied         { background: #3a1f1f; color: #e74c3c; }
.status-pill.published      { background: #14331f; color: #2ecc71; }
.status-pill.censored       { background: #2a2a2a; color: #888; }

.review-tag { font-size: 0.78rem; color: #888; margin-top: 4px; }
.review-tag strong { color: #c9a84c; }

.review-notes-box {
  background: #1a1410;
  border: 1px solid #4a3a1a;
  border-radius: 8px;
  padding: 12px 14px;
  margin-top: 10px;
  color: #e0bc6a;
  font-size: 0.9rem;
  white-space: pre-wrap;
}

.resubmit-form { display: none; margin-top: 12px; gap: 10px; flex-direction: column; }
.resubmit-form.open { display: flex; }

.claim-bar { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.claim-bar button { width: auto !important; padding: 8px 16px !important; font-size: 0.85rem !important; }

.btn-approve { background: #2ecc71 !important; color: #042e14 !important; }
.btn-return  { background: #e67e22 !important; color: #2a1500 !important; }
.btn-deny    { background: #e74c3c !important; color: #2a0a0a !important; }
.btn-claim   { background: #3498db !important; color: #04203a !important; }

/* Return / Deny modal */
.review-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 60;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.review-modal-overlay.open { display: flex; }

.review-modal {
  background: #111;
  border: 1px solid #2e2e2e;
  border-radius: 12px;
  padding: 24px;
  max-width: 520px;
  width: 100%;
}

.review-modal h3 { color: #c9a84c; margin-top: 0; }
.review-modal textarea { min-height: 120px; margin: 14px 0; }
.review-modal-actions { display: flex; gap: 8px; justify-content: flex-end; }
.review-modal-actions button { width: auto !important; padding: 10px 18px !important; }

/* ARTICLE DETAIL OVERLAY (portal) */
.article-card { cursor: pointer; transition: border-color 0.15s ease; }
.article-card:hover { border-color: #c9a84c; }
.article-card:hover h3 { color: #e0bc6a; }

.article-detail-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 55;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  overflow-y: auto;
}

.article-detail-overlay.open { display: flex; }

.article-detail-panel {
  background: #111;
  border: 1px solid #2e2e2e;
  border-radius: 12px;
  padding: 28px;
  max-width: 720px;
  width: 100%;
}

.article-detail-panel h2 { color: #c9a84c; margin-top: 0; margin-bottom: 4px; }

.article-detail-meta { color: #888; font-size: 0.85rem; margin-bottom: 20px; }

.article-detail-body {
  background: #1a1a1a;
  border: 1px solid #2e2e2e;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
  white-space: pre-wrap;
  line-height: 1.6;
  max-height: 320px;
  overflow-y: auto;
}

.article-detail-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.article-detail-actions button { width: auto !important; padding: 10px 18px !important; }

.article-detail-readonly-note { color: #666; font-size: 0.85rem; font-style: italic; }

/* ---------- ANALYTICS DASHBOARD (portal) ---------- */

.analytics-summary-table { width: 100%; border-collapse: collapse; }

.analytics-summary-table th {
  text-align: left;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #888;
  padding: 8px 10px;
  border-bottom: 1px solid #2e2e2e;
}

.analytics-summary-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #1e1e1e;
  font-size: 0.88rem;
  color: #f0f0f0;
  vertical-align: top;
}

.analytics-summary-table tr.clickable { cursor: pointer; }
.analytics-summary-table tr.clickable:hover td { background: #161616; color: #e0bc6a; }
.analytics-summary-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.analytics-summary-table .article-title-cell { font-weight: bold; }
.analytics-summary-table .article-cat-cell { color: #888; font-size: 0.76rem; text-transform: uppercase; }

.analytics-site-toggle { display: flex; gap: 8px; margin-bottom: 16px; }

.analytics-detail-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 70;
  align-items: flex-start;
  justify-content: center;
  padding: 30px 16px;
  overflow-y: auto;
}

.analytics-detail-overlay.open { display: flex; }

.analytics-detail-panel {
  background: #111;
  border: 1px solid #2e2e2e;
  border-radius: 12px;
  padding: 28px;
  max-width: 920px;
  width: 100%;
}

.analytics-detail-panel h2 { color: #c9a84c; margin-top: 0; margin-bottom: 20px; }

.analytics-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.analytics-kpi {
  background: #1a1a1a;
  border: 1px solid #2e2e2e;
  border-radius: 10px;
  padding: 16px;
}

.analytics-kpi .kpi-value {
  font-size: 1.6rem;
  font-weight: bold;
  color: #c9a84c;
  line-height: 1.1;
}

.analytics-kpi .kpi-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #888;
  margin-top: 6px;
}

.analytics-chart-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 28px;
}

.analytics-chart-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-bottom: 28px;
}

.analytics-block-title {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #888;
  margin-bottom: 12px;
}

.analytics-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.analytics-bar-label {
  width: 110px;
  flex-shrink: 0;
  font-size: 0.8rem;
  color: #ccc;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-bar-track {
  flex: 1;
  height: 16px;
  background: #1a1a1a;
  border-radius: 4px;
  overflow: hidden;
}

.analytics-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #7c5cbf, #c9a84c);
  border-radius: 4px;
}

.analytics-bar-value {
  width: 42px;
  flex-shrink: 0;
  text-align: right;
  font-size: 0.78rem;
  color: #888;
  font-variant-numeric: tabular-nums;
}

.analytics-empty-note {
  color: #666;
  font-size: 0.85rem;
  font-style: italic;
  padding: 12px 0;
}

.analytics-line-chart-wrap { width: 100%; overflow-x: auto; }

.analytics-link-btn {
  background: transparent !important;
  border: 1px solid #333 !important;
  color: #c9a84c !important;
  width: auto !important;
  padding: 6px 14px !important;
  font-size: 0.8rem !important;
}

.analytics-link-btn:hover { border-color: #c9a84c !important; }
/* ---- Ad slots (300×250) ---- */
/* ---- Ad label (shared) ---- */
.article-ad-label {
  display: block;
  font-size: 0.58rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  text-align: center;
  margin-bottom: 4px;
}

/* ---- Bottom leaderboard (728×90) ---- */
.article-ad-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 36px 0 8px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}
.article-ad-leaderboard {
  display: block;
  width: 728px;
  max-width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--rule);
}
.article-ad-leaderboard-placeholder {
  width: 728px;
  max-width: 100%;
  height: 90px;
  border-radius: 6px;
  border: 2px dashed var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper-dim);
  color: var(--ink-muted);
  font-size: 0.78rem;
  font-family: var(--font-mono);
}

/* ---- Side skyscrapers (160×600) ---- */
/* Wrapper that positions the sticky rails outside the article column */
.article-side-ads {
  display: none; /* hidden by default, shown on wide screens below */
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}
.article-side-ad {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: auto;
}
.article-side-ad-left {
  position: absolute;
  left: 0;
  top: 0;
}
.article-side-ad-right {
  position: absolute;
  right: 0;
  top: 0;
}
.article-ad-skyscraper {
  display: block;
  width: 160px;
  height: 600px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--rule);
}
.article-ad-skyscraper-placeholder {
  width: 160px;
  height: 600px;
  border-radius: 6px;
  border: 2px dashed var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper-dim);
  color: var(--ink-muted);
  font-size: 0.72rem;
  font-family: var(--font-mono);
  text-align: center;
  line-height: 1.8;
  writing-mode: horizontal-tb;
}

/* Show side ads only when there's enough room (article column 740px + 2×180px rails + padding) */
@media (min-width: 1120px) {
  .article-side-ads { display: block; }
}

/* Keep old .article-ad-slot / .article-ad-image for modal pages (300×250 inline) */
.article-ad-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 28px 0;
}
.article-ad-image {
  display: block;
  width: 300px;
  height: 250px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--rule);
}
.article-ad-placeholder {
  width: 300px;
  height: 250px;
  border-radius: 6px;
  border: 2px dashed var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper-dim);
  color: var(--ink-muted);
  font-size: 0.78rem;
  font-family: var(--font-mono);
  text-align: center;
  line-height: 1.6;
}
