/* ── UBC Regionals — TV News Design ───────────────────────────────────────── */
/* Accent color injected via :root { --accent } from layout.php               */

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

/* ── Typography & base ───────────────────────────────────────────────────────── */
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif; }

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: none; }

/* ── Station Header ──────────────────────────────────────────────────────────── */
.station-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #0a0a0a;
  border-bottom: 2px solid var(--accent);
  box-shadow: 0 2px 20px rgba(0,0,0,.6);
}

.station-header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 16px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.station-logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
}

.station-logo {
  height: 40px;
  width: auto;
  object-fit: contain;
}

.station-name-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.station-callsign {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .05em;
  color: #fff;
}

.station-city {
  font-size: 10px;
  color: #6b7280;
  letter-spacing: .03em;
}

.live-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(220,38,38,.15);
  border: 1px solid rgba(220,38,38,.35);
  color: #f87171;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  padding: 3px 9px;
  border-radius: 999px;
  flex-shrink: 0;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ef4444;
  animation: blink 1.4s ease-in-out infinite;
  flex-shrink: 0;
}

.live-dot-sm {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ef4444;
  animation: blink 1.4s ease-in-out infinite;
  display: inline-block;
}

@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.2} }

.header-weather {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.hw-icon { font-size: 22px; line-height: 1; }
.hw-info { display: flex; flex-direction: column; line-height: 1.2; }
.hw-temp { font-size: 16px; font-weight: 700; }
.hw-desc { font-size: 10px; color: #9ca3af; }

.station-nav {
  display: flex;
  align-items: center;
  gap: 0;
  margin-left: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.station-nav::-webkit-scrollbar { display: none; }

.snav-link {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #9ca3af;
  letter-spacing: .03em;
  text-transform: uppercase;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}

.snav-link:hover,
.snav-link.active {
  color: #fff;
  border-color: var(--accent);
}

.admin-link {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  color: #4b5563;
  letter-spacing: .05em;
  padding: 5px 10px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 6px;
  transition: color .15s, border-color .15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.admin-link:hover { color: #9ca3af; border-color: rgba(255,255,255,.15); }

/* ── Breaking ticker ─────────────────────────────────────────────────────────── */
.breaking-bar {
  background: var(--accent);
  display: flex;
  align-items: center;
  gap: 0;
  overflow: hidden;
  height: 32px;
}

.breaking-label {
  flex-shrink: 0;
  background: rgba(0,0,0,.4);
  padding: 0 14px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  color: #fff;
  height: 100%;
  display: flex;
  align-items: center;
}

.breaking-scroll {
  flex: 1;
  overflow: hidden;
  height: 100%;
  display: flex;
  align-items: center;
}

.ticker-label {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  color: #fff;
  margin-right: 12px;
  background: rgba(0,0,0,.3);
  padding: 0 10px;
  height: 100%;
  display: flex;
  align-items: center;
}

.breaking-ticker {
  background: var(--accent);
  overflow: hidden;
  height: 30px;
  display: flex;
  align-items: center;
}

.ticker-track {
  display: flex;
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
  flex: 1;
  height: 100%;
}

#ticker-text {
  display: inline-block;
  animation: ticker-scroll 40s linear infinite;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  padding-left: 100%;
}

@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

.breaking-item {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  margin: 0 8px;
  white-space: nowrap;
}

.breaking-sep {
  color: rgba(255,255,255,.4);
  font-size: 10px;
}

/* ── Channel switcher bar ────────────────────────────────────────────────────── */
.channels-bar {
  background: #111;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.channels-bar-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 6px 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.channels-bar-inner::-webkit-scrollbar { display: none; }

.channels-bar-label {
  flex-shrink: 0;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .1em;
  color: #4b5563;
  text-transform: uppercase;
  margin-right: 4px;
}

.channel-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  padding: 3px 10px 3px 5px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.07);
  font-size: 10px;
  font-weight: 700;
  color: #6b7280;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: color .15s, border-color .15s, background .15s;
}

.channel-pill:hover {
  color: #e5e7eb;
  border-color: var(--ch-accent, var(--accent));
  background: rgba(255,255,255,.04);
}

.channel-pill.active {
  color: #fff;
  border-color: var(--ch-accent, var(--accent));
  background: rgba(var(--accent-rgb, 220,38,38), .12);
}

.channel-pill-img {
  height: 18px;
  width: auto;
  object-fit: contain;
  border-radius: 3px;
}

/* ── Page layout ─────────────────────────────────────────────────────────────── */
.news-layout {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 16px 40px;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
}

@media (max-width: 1024px) {
  .news-layout { grid-template-columns: 1fr; }
  .news-sidebar { order: -1; }
}

/* ── Hero story ──────────────────────────────────────────────────────────────── */
.hero-story { margin-bottom: 20px; }

.hero-image-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: #111;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}

.hero-story:hover .hero-image { transform: scale(1.02); }

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.92) 0%, rgba(0,0,0,.4) 50%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px 20px 22px;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.hero-headline {
  font-size: clamp(18px, 2.5vw, 30px);
  font-weight: 800;
  line-height: 1.2;
  color: #fff;
  margin: 0 0 8px;
  text-shadow: 0 2px 8px rgba(0,0,0,.6);
}

.hero-summary {
  font-size: 13px;
  color: rgba(255,255,255,.75);
  margin: 0;
  line-height: 1.5;
}

.hero-category {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--accent);
  text-transform: uppercase;
}

.hero-time {
  font-size: 10px;
  color: rgba(255,255,255,.5);
}

.hero-text-only {
  display: block;
  background: #111;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 24px;
}

.hero-empty {
  background: #111;
  border: 1px dashed rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 48px 24px;
  text-align: center;
  margin-bottom: 20px;
}

/* ── Tags ────────────────────────────────────────────────────────────────────── */
.tag-breaking {
  display: inline-block;
  background: #dc2626;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .1em;
  padding: 2px 8px;
  border-radius: 3px;
  text-transform: uppercase;
}

/* ── Category tabs ───────────────────────────────────────────────────────────── */
.cat-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: 16px;
  padding-bottom: 2px;
}
.cat-tabs::-webkit-scrollbar { display: none; }

.cat-tab {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  border: 1px solid rgba(255,255,255,.08);
  transition: color .15s, background .15s, border-color .15s;
}

.cat-tab:hover {
  color: #e5e7eb;
  background: rgba(255,255,255,.05);
}

.cat-tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ── Story grid ──────────────────────────────────────────────────────────────── */
.story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.story-card {
  display: flex;
  flex-direction: column;
  background: #111;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 10px;
  overflow: hidden;
  transition: transform .15s, border-color .15s;
  text-decoration: none;
  color: inherit;
}

.story-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,.15);
}

.story-card.compact .story-thumb-wrap { aspect-ratio: 16/9; }

.story-thumb-wrap {
  position: relative;
  aspect-ratio: 16/9;
  background: #1a1a1a;
  overflow: hidden;
  flex-shrink: 0;
}

.story-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .2s;
}

.story-card:hover .story-thumb { transform: scale(1.04); }

.story-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #151515;
}

.card-breaking-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #dc2626;
  color: #fff;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .1em;
  padding: 2px 6px;
  border-radius: 3px;
  text-transform: uppercase;
}

.story-card-body {
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.story-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}

.story-cat-tag {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--accent);
  text-transform: uppercase;
}

.story-time {
  font-size: 10px;
  color: #4b5563;
}

.story-card-headline {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  color: #e5e7eb;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.story-card-headline.compact {
  font-size: 12px;
  -webkit-line-clamp: 2;
}

.story-card-summary {
  font-size: 11px;
  color: #6b7280;
  line-height: 1.45;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.story-source {
  font-size: 10px;
  color: #374151;
  margin-top: auto;
}

.load-more-btn {
  padding: 10px 24px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #9ca3af;
  cursor: pointer;
  transition: background .15s, color .15s;
}

.load-more-btn:hover { background: rgba(255,255,255,.09); color: #fff; }

/* ── Sidebar ─────────────────────────────────────────────────────────────────── */
.news-sidebar { display: flex; flex-direction: column; gap: 16px; }

.sidebar-widget {
  background: #111;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 10px;
  overflow: hidden;
}

.widget-label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #6b7280;
  border-bottom: 1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.02);
}

.stream-embed {
  padding: 0;
  background: #000;
}

.stream-embed video { display: block; border-radius: 0; }

.sidebar-story-list { display: flex; flex-direction: column; }

.sidebar-story-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,.04);
  transition: background .12s;
}

.sidebar-story-item:last-child { border-bottom: none; }
.sidebar-story-item:hover { background: rgba(255,255,255,.03); }

.sidebar-story-content { flex: 1; min-width: 0; }

.sidebar-story-headline {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  color: #d1d5db;
  margin: 0 0 3px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sidebar-story-time {
  font-size: 10px;
  color: #4b5563;
}

.sidebar-story-thumb {
  width: 60px;
  height: 44px;
  object-fit: cover;
  border-radius: 5px;
  flex-shrink: 0;
}

/* ── Weather widget ──────────────────────────────────────────────────────────── */
.weather-loading {
  padding: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.weather-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

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

.weather-current {
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.weather-icon { font-size: 36px; line-height: 1; }

.weather-temp-main {
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
}

.weather-desc {
  font-size: 11px;
  color: #9ca3af;
  text-transform: capitalize;
}

.weather-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: rgba(255,255,255,.04);
  border-top: 1px solid rgba(255,255,255,.06);
}

.weather-detail-item {
  padding: 8px 14px;
  background: #111;
}

.weather-detail-label {
  font-size: 9px;
  color: #4b5563;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 2px;
}

.weather-detail-val {
  font-size: 13px;
  font-weight: 600;
}

/* ── Weather alert banners ───────────────────────────────────────────────────── */
.weather-alert-bar {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 600;
  border-left: 4px solid;
  animation: slide-in-top .3s ease;
}

@keyframes slide-in-top {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}

.alert-extreme  { background: #1c0a0a; border-color: #dc2626; color: #f87171; }
.alert-severe   { background: #1c0f00; border-color: #ea580c; color: #fb923c; }
.alert-moderate { background: #1a1600; border-color: #ca8a04; color: #fbbf24; }
.alert-minor    { background: #0a0f1c; border-color: #3b82f6; color: #93c5fd; }

.alert-bar-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }

.alert-bar-content { flex: 1; }

.alert-bar-type {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.alert-bar-headline { font-size: 12px; font-weight: 600; }

.alert-dismiss {
  background: none;
  border: none;
  color: inherit;
  opacity: .5;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
  transition: opacity .15s;
}
.alert-dismiss:hover { opacity: 1; }

/* ── Story article page ──────────────────────────────────────────────────────── */
.story-article {
  max-width: 820px;
  margin: 0 auto;
  padding: 28px 16px;
}

.story-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #4b5563;
  margin-bottom: 12px;
}

.story-breadcrumb a { color: var(--accent); }
.story-breadcrumb a:hover { text-decoration: underline; }
.breadcrumb-sep { color: #374151; }

.story-top-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.story-cat-chip {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--accent);
  text-transform: uppercase;
}

.story-headline {
  font-size: clamp(22px, 4vw, 38px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.01em;
  margin: 0 0 14px;
}

.story-byline {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.byline-author { font-weight: 600; color: #9ca3af; }
.byline-source { color: #4b5563; }
.byline-time { color: #4b5563; }

.story-hero-image { margin: 0 0 24px; }

.story-body {
  font-size: 16px;
  line-height: 1.75;
  color: #d1d5db;
}

.story-body h2 { font-size: 22px; font-weight: 700; margin: 28px 0 10px; color: #fff; }
.story-body h3 { font-size: 18px; font-weight: 700; margin: 22px 0 8px; color: #fff; }
.story-body p  { margin: 0 0 16px; }
.story-body a  { color: var(--accent); text-decoration: underline; }
.story-body ul { list-style: disc; padding-left: 20px; margin: 0 0 16px; }
.story-body ol { list-style: decimal; padding-left: 20px; margin: 0 0 16px; }
.story-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 4px 16px;
  color: #9ca3af;
  font-style: italic;
  margin: 16px 0;
}

.story-summary-lead {
  font-size: 18px;
  color: #e5e7eb;
  font-weight: 400;
  line-height: 1.65;
}

.story-source-link {
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
}

/* ── Related stories ─────────────────────────────────────────────────────────── */
.related-stories {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 16px 40px;
}

.related-header {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #4b5563;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  margin-bottom: 16px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

/* ── Footer ──────────────────────────────────────────────────────────────────── */
.station-footer {
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 24px 16px;
  margin-top: 20px;
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 12px;
}

.footer-link {
  padding: 4px 10px;
  font-size: 11px;
  color: #4b5563;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 5px;
  transition: color .15s, border-color .15s;
}

.footer-link:hover { color: #9ca3af; border-color: rgba(255,255,255,.12); }

/* ── Mobile nav ──────────────────────────────────────────────────────────────── */
.mobile-nav-link {
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: #9ca3af;
  display: block;
  transition: background .12s, color .12s;
}

.mobile-nav-link:hover { background: rgba(255,255,255,.05); color: #fff; }

/* ── Page transition spinner ─────────────────────────────────────────────────── */
.page-spinner {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10,10,10,.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.page-spinner.hidden { display: none; }

.spinner-icon {
  width: 64px;
  height: 64px;
  object-fit: contain;
  animation: spinner-pulse 1s ease-in-out infinite;
  filter: drop-shadow(0 0 16px var(--accent));
}

@keyframes spinner-pulse {
  0%   { opacity: 1;    transform: scale(1);    }
  50%  { opacity: .5;   transform: scale(0.88); }
  100% { opacity: 1;    transform: scale(1);    }
}

/* Page content fade during transitions */
#main-content {
  transition: opacity .15s ease;
}
#main-content.fading {
  opacity: 0;
  pointer-events: none;
}

/* ── Article inline fetch ────────────────────────────────────────────────────── */
.article-fetch-wrap {
  margin: 24px 0;
}

.article-fetch-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 10px;
  color: #6b7280;
  font-size: 13px;
}

.article-fetch-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  animation: spinner-pulse 1s ease-in-out infinite;
  opacity: .6;
}

.article-fetch-error {
  padding: 16px 20px;
  background: rgba(220,38,38,.05);
  border: 1px solid rgba(220,38,38,.15);
  border-radius: 10px;
  font-size: 13px;
  color: #9ca3af;
}

.article-source-credit {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.06);
  font-size: 12px;
  color: #4b5563;
}

.article-source-credit a {
  color: var(--accent);
}

/* ── CMS Admin styles ────────────────────────────────────────────────────────── */
.cms-input {
  background: #1a1a1a;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  color: #e5e7eb;
  outline: none;
  transition: border-color .15s;
  width: 100%;
}

.cms-input:focus { border-color: var(--accent); }

.cms-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 5px;
  letter-spacing: .03em;
}

.cms-btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s;
}

.cms-btn-primary:hover { opacity: .85; }

.cms-btn-ghost {
  background: rgba(255,255,255,.06);
  color: #9ca3af;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, color .15s;
}

.cms-btn-ghost:hover { background: rgba(255,255,255,.1); color: #fff; }

.cms-btn-danger {
  background: #7f1d1d;
  color: #fca5a5;
  border: 1px solid #991b1b;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}

.cms-btn-danger:hover { background: #991b1b; }

.cms-card {
  background: #111;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 18px;
}

.cms-tab {
  cursor: pointer;
}

.cms-tab.active {
  color: #fff;
  border-color: var(--accent);
}

.cms-checkbox-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  cursor: pointer;
  color: #9ca3af;
}

/* Rich text editor */
.cms-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px;
  background: #1a1a1a;
  border: 1px solid rgba(255,255,255,.1);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
}

.editor-btn {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 5px;
  color: #9ca3af;
  padding: 3px 8px;
  font-size: 12px;
  cursor: pointer;
  transition: background .12s, color .12s;
}

.editor-btn:hover { background: rgba(255,255,255,.12); color: #fff; }

.cms-editor {
  min-height: 200px;
  background: #1a1a1a;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 0 0 8px 8px;
  padding: 12px;
  font-size: 14px;
  line-height: 1.65;
  color: #e5e7eb;
  outline: none;
  overflow-y: auto;
}

.cms-editor:focus { border-color: var(--accent); }
.cms-editor:empty:before { content: attr(placeholder); color: #4b5563; pointer-events: none; }
.cms-editor h2 { font-size: 20px; font-weight: 700; margin: 12px 0 6px; }
.cms-editor h3 { font-size: 16px; font-weight: 700; margin: 10px 0 5px; }
.cms-editor p  { margin: 0 0 10px; }

/* Story table rows */
#stories-tbody tr { border-bottom: 1px solid rgba(255,255,255,.04); }
#stories-tbody tr:hover { background: rgba(255,255,255,.02); }

/* Scrollbar */
* { scrollbar-width: thin; scrollbar-color: #1f2937 transparent; }
*::-webkit-scrollbar       { width: 5px; height: 5px; }
*::-webkit-scrollbar-thumb { background: #1f2937; border-radius: 3px; }
