/* ==========================================================================
   Updates Regular — RuntimeWire-Inspired Dark-First Newswire Theme
   ========================================================================== */

:root,
html.rw-theme-dark {
  --ed-bg: #0a0a0f;
  --ed-surface: #11121a;
  --ed-surface-alt: #181a25;
  --ed-ink: #f8fafc;
  --ed-ink-soft: #cbd5e1;
  --ed-muted: #8b95a7;
  --ed-border: #202330;
  --ed-accent: #ff4b1f;
  --ed-accent-hover: #e63e14;
  --ed-accent-soft: rgba(255, 75, 31, 0.14);
  --ed-dark: #060609;
  --ed-radius: 0px;
  --ed-radius-sm: 0px;
  --ed-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --ed-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.55);
  --ed-shadow-lg: 0 20px 45px -12px rgba(0, 0, 0, 0.75);
  --ed-font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ed-font-serif: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --ed-font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

html.rw-theme-light {
  --ed-bg: #f5f7fa;
  --ed-surface: #ffffff;
  --ed-surface-alt: #eef2f6;
  --ed-ink: #0f172a;
  --ed-ink-soft: #334155;
  --ed-muted: #64748b;
  --ed-border: #dbe1ea;
  --ed-accent: #ff4b1f;
  --ed-accent-hover: #e63e14;
  --ed-accent-soft: rgba(255, 75, 31, 0.1);
  --ed-dark: #0a0a0f;
  --ed-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --ed-shadow: 0 10px 26px -8px rgba(15, 23, 42, 0.1);
  --ed-shadow-lg: 0 18px 38px -10px rgba(15, 23, 42, 0.16);
}

body.editorial-body {
  font-family: var(--ed-font-sans);
  background-color: var(--ed-bg);
  color: var(--ed-ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  top: 0 !important;
  overflow-x: hidden;
  transition: background-color 0.2s ease, color 0.2s ease;
}

html {
  overflow-x: hidden;
}

body.editorial-body .container {
  width: 100%;
  max-width: 100% !important;
  padding-left: clamp(1rem, 2.5vw, 2.75rem);
  padding-right: clamp(1rem, 2.5vw, 2.75rem);
}

a {
  color: var(--ed-accent);
  text-decoration: none;
  transition: color 0.18s ease;
}

a:hover {
  color: var(--ed-accent-hover);
}

.text-dark {
  color: var(--ed-ink) !important;
}

.text-muted {
  color: var(--ed-muted) !important;
}

.bg-light {
  background-color: var(--ed-surface-alt) !important;
}

/* ---------- Live Wire Topbar & Header ---------- */
.ed-topbar {
  background-color: var(--ed-dark);
  color: #94a3b8;
  font-family: var(--ed-font-mono);
  font-size: 0.74rem;
  padding: 0.42rem 0;
  border-bottom: 1px solid #1b1d28;
}

.ed-topbar a {
  color: #cbd5e1;
}

.ed-topbar a:hover {
  color: var(--ed-accent);
}

.rw-live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--ed-accent);
  box-shadow: 0 0 0 0 rgba(255, 75, 31, 0.7);
  animation: rwPulse 2s infinite;
  margin-right: 6px;
}

@keyframes rwPulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 75, 31, 0.7); }
  70% { box-shadow: 0 0 0 7px rgba(255, 75, 31, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 75, 31, 0); }
}

.ed-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: rgba(10, 10, 15, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--ed-border);
}

html.rw-theme-light .ed-header {
  background: rgba(255, 255, 255, 0.9);
}

.ed-navbar {
  padding: 0.7rem 0;
}

.ed-brand img.logo {
  height: 46px;
  width: auto;
  max-width: 240px;
  object-fit: contain;
}

html.rw-theme-dark .ed-brand img.logo {
  filter: brightness(0) invert(1);
}

.ed-nav-links {
  gap: 0.2rem;
}

.ed-nav-links .nav-link {
  color: var(--ed-ink-soft) !important;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.42rem 0.82rem !important;
  border-radius: 8px;
  transition: background-color 0.18s ease, color 0.18s ease;
  white-space: nowrap;
}

.ed-nav-links .nav-link:hover,
.ed-nav-links .nav-link.active {
  background-color: var(--ed-accent-soft);
  color: var(--ed-accent) !important;
}

.rw-theme-toggle {
  background: var(--ed-surface-alt);
  border: 1px solid var(--ed-border);
  color: var(--ed-ink-soft);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.rw-theme-toggle:hover {
  border-color: var(--ed-accent);
  color: var(--ed-accent);
}

.ed-subnav {
  background: var(--ed-surface);
  border-top: 1px solid var(--ed-border);
  padding: 0.45rem 0;
}

.ed-subnav-scroll {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.ed-subnav-scroll::-webkit-scrollbar {
  display: none;
}

.ed-subnav-list {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.ed-subnav-list a {
  display: inline-block;
  font-family: var(--ed-font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--ed-muted);
  padding: 0.28rem 0.7rem;
  border-radius: 6px;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: all 0.18s ease;
}

.ed-subnav-list a:hover {
  color: var(--ed-ink);
  background: var(--ed-surface-alt);
  border-color: var(--ed-border);
}

.ed-btn-primary {
  background-color: var(--ed-accent);
  color: #ffffff !important;
  font-weight: 600;
  font-size: 0.84rem;
  padding: 0.5rem 1.05rem;
  border-radius: 8px;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: background-color 0.18s ease, transform 0.15s ease;
}

.ed-btn-primary:hover {
  background-color: var(--ed-accent-hover);
  transform: translateY(-1px);
  color: #ffffff !important;
}

.ed-btn-outline {
  background-color: var(--ed-surface-alt);
  color: var(--ed-ink) !important;
  border: 1px solid var(--ed-border);
  font-weight: 600;
  font-size: 0.84rem;
  padding: 0.48rem 1.05rem;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.18s ease;
}

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

/* ---------- Section Headings & Monospace Kickers ---------- */
.ed-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.35rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--ed-border);
}

.ed-section-title {
  font-family: var(--ed-font-sans);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.025em;
  color: var(--ed-ink);
  margin: 0;
}

.ed-kicker {
  display: inline-flex;
  align-items: center;
  font-family: var(--ed-font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ed-accent);
  background: var(--ed-accent-soft);
  border: 1px solid rgba(255, 75, 31, 0.25);
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
}

/* ---------- RuntimeWire Live Ticker & Wire Feed ---------- */
.rw-ticker-bar {
  background: var(--ed-surface);
  border-bottom: 1px solid var(--ed-border);
  padding: 0.5rem 0;
  font-family: var(--ed-font-mono);
  font-size: 0.76rem;
}

.rw-ticker-inner {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  overflow: hidden;
}

.rw-ticker-label {
  display: inline-flex;
  align-items: center;
  color: var(--ed-accent);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.rw-ticker-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
}

.rw-ticker-links::-webkit-scrollbar {
  display: none;
}

.rw-ticker-links a {
  color: var(--ed-ink-soft);
  font-family: var(--ed-font-sans);
  font-size: 0.82rem;
  font-weight: 500;
}

.rw-ticker-links a:hover {
  color: var(--ed-accent);
}

/* Featured Grid (1 large + 2 stacked right) */
.rw-featured-side {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  height: 100%;
}

.rw-mini-feature {
  background: var(--ed-surface);
  border: 1px solid var(--ed-border);
  border-radius: var(--ed-radius);
  padding: 0.9rem;
  display: flex;
  gap: 0.9rem;
  align-items: center;
  flex: 1;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.rw-mini-feature:hover {
  border-color: rgba(255, 75, 31, 0.45);
  transform: translateY(-2px);
}

.rw-mini-thumb {
  width: 96px;
  height: 76px;
  border-radius: 0;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--ed-surface-alt);
}

.rw-mini-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Continuous Newswire Feed Rows */
.rw-wire-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--ed-border);
  border-radius: var(--ed-radius);
  background: var(--ed-surface);
  overflow: hidden;
}

.rw-wire-row {
  display: grid;
  grid-template-columns: 1fr 140px;
  gap: 1.25rem;
  padding: 1.2rem 1.35rem;
  border-bottom: 1px solid var(--ed-border);
  align-items: center;
  transition: background-color 0.18s ease;
}

.rw-wire-row:last-child {
  border-bottom: none;
}

.rw-wire-row:hover {
  background: var(--ed-surface-alt);
}

.rw-wire-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-family: var(--ed-font-mono);
  font-size: 0.72rem;
  color: var(--ed-muted);
  margin-bottom: 0.4rem;
}

.rw-wire-cat {
  color: var(--ed-accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.rw-wire-title {
  font-family: var(--ed-font-sans);
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 0.4rem;
  color: var(--ed-ink);
}

.rw-wire-title a {
  color: inherit;
}

.rw-wire-title a:hover {
  color: var(--ed-accent);
}

.rw-wire-excerpt {
  font-size: 0.875rem;
  color: var(--ed-muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rw-wire-thumb {
  width: 140px;
  height: 92px;
  border-radius: 0;
  overflow: hidden;
  background: var(--ed-surface-alt);
  border: 1px solid var(--ed-border);
}

.rw-wire-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 575.98px) {
  .rw-wire-row {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }
  .rw-wire-thumb {
    width: 100%;
    height: 160px;
    order: -1;
  }
}

/* ---------- Hero Featured Card ---------- */
.ed-home-intro {
  background: radial-gradient(circle at 85% 5%, rgba(255, 75, 31, 0.08), transparent 38%),
              radial-gradient(circle at 10% 25%, rgba(56, 189, 248, 0.05), transparent 35%);
}

.ed-hero-card {
  background: var(--ed-surface);
  border: 1px solid var(--ed-border);
  border-radius: var(--ed-radius);
  overflow: hidden;
  box-shadow: var(--ed-shadow);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.ed-hero-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 75, 31, 0.45);
  box-shadow: var(--ed-shadow-lg);
}

.ed-hero-media {
  position: relative;
  height: 100%;
  min-height: 310px;
  background: var(--ed-surface-alt);
  overflow: hidden;
}

.ed-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}

.ed-hero-card:hover .ed-hero-media img {
  transform: scale(1.03);
}

.ed-hero-body {
  padding: 1.85rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}

.ed-hero-title {
  font-family: var(--ed-font-serif);
  font-size: clamp(1.5rem, 2.4vw, 2.15rem);
  font-weight: 700;
  line-height: 1.18;
  margin: 0.75rem 0;
  color: var(--ed-ink);
}

.ed-hero-title a {
  color: inherit;
}

.ed-hero-title a:hover {
  color: var(--ed-accent);
}

.ed-hero-excerpt {
  color: var(--ed-muted);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

/* ---------- Newswire / Article Card ---------- */
.ed-card {
  background: var(--ed-surface);
  border: 1px solid var(--ed-border);
  border-radius: var(--ed-radius);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: var(--ed-shadow-sm);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.ed-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 75, 31, 0.45);
  box-shadow: var(--ed-shadow);
}

.ed-card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--ed-surface-alt);
  overflow: hidden;
}

.ed-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.ed-card:hover .ed-card-media img {
  transform: scale(1.04);
}

.ed-card-badge {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #f8fafc;
  font-family: var(--ed-font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.22rem 0.55rem;
  border-radius: 6px;
}

.ed-card-body {
  padding: 1.1rem 1.2rem 1.2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.ed-card-title {
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.38;
  margin: 0 0 0.5rem;
  color: var(--ed-ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ed-card-title a {
  color: inherit;
}

.ed-card-title a:hover {
  color: var(--ed-accent);
}

.ed-card-excerpt {
  font-size: 0.86rem;
  color: var(--ed-muted);
  margin-bottom: 1rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ed-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--ed-font-mono);
  font-size: 0.73rem;
  color: var(--ed-muted);
  padding-top: 0.7rem;
  border-top: 1px solid var(--ed-border);
}

/* ---------- Sidebar ---------- */
.ed-sidebar {
  position: sticky;
  top: 6.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.ed-widget {
  background: var(--ed-surface);
  border: 1px solid var(--ed-border);
  border-radius: var(--ed-radius);
  padding: 1.2rem;
  box-shadow: var(--ed-shadow-sm);
}

.ed-widget-title {
  font-family: var(--ed-font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ed-ink);
  margin: 0 0 0.95rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--ed-border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ed-search-wrap {
  position: relative;
}

.ed-search-wrap .form-control {
  border-radius: 8px;
  padding: 0.58rem 0.9rem 0.58rem 2.3rem;
  border: 1px solid var(--ed-border);
  background: var(--ed-surface-alt);
  color: var(--ed-ink);
  font-size: 0.875rem;
}

.ed-search-wrap .form-control::placeholder {
  color: var(--ed-muted);
}

.ed-search-wrap .form-control:focus {
  background: var(--ed-surface);
  border-color: var(--ed-accent);
  box-shadow: 0 0 0 3px rgba(255, 75, 31, 0.15);
  color: var(--ed-ink);
}

.ed-search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ed-muted);
  font-size: 0.82rem;
  pointer-events: none;
}

.ed-search-wrap .search-data {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--ed-surface);
  border: 1px solid var(--ed-border);
  border-radius: var(--ed-radius-sm);
  box-shadow: var(--ed-shadow-lg);
  list-style: none;
  padding: 0.4rem 0;
  margin: 0;
  max-height: 280px;
  overflow-y: auto;
}

.ed-search-wrap .search-data li a,
.ed-search-wrap .search-data li {
  display: block;
  padding: 0.5rem 0.9rem;
  font-size: 0.85rem;
  color: var(--ed-ink-soft);
}

.ed-search-wrap .search-data li a:hover {
  background: var(--ed-accent-soft);
  color: var(--ed-accent);
}

.ed-recent-item {
  display: flex;
  gap: 0.7rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--ed-border);
}

.ed-recent-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.ed-recent-num {
  font-family: var(--ed-font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ed-accent);
  line-height: 1.4;
  min-width: 1.5rem;
}

.ed-recent-title {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.38;
  color: var(--ed-ink);
  margin-bottom: 0.25rem;
}

.ed-recent-title:hover {
  color: var(--ed-accent);
}

.ed-recent-meta {
  font-family: var(--ed-font-mono);
  font-size: 0.7rem;
  color: var(--ed-muted);
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.ed-recent-meta a {
  color: var(--ed-accent);
  font-weight: 600;
}

.ed-topic-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.ed-topic-pill {
  display: inline-block;
  font-family: var(--ed-font-mono);
  font-size: 0.73rem;
  font-weight: 500;
  color: var(--ed-ink-soft);
  background: var(--ed-surface-alt);
  border: 1px solid var(--ed-border);
  padding: 0.3rem 0.68rem;
  border-radius: 6px;
  transition: all 0.18s ease;
}

.ed-topic-pill:hover {
  background: var(--ed-accent);
  border-color: var(--ed-accent);
  color: #ffffff;
}

/* ---------- Article / Story Detail ---------- */
.rw-read-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--ed-accent);
  z-index: 1050;
  transition: width 0.1s linear;
}

.ed-article-shell {
  background: var(--ed-surface);
  border: 1px solid var(--ed-border);
  border-radius: var(--ed-radius);
  padding: 2.25rem;
  box-shadow: var(--ed-shadow-sm);
}

.rw-author-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.rw-author-initial {
  width: 34px;
  height: 34px;
  background: var(--ed-accent-soft);
  color: var(--ed-accent);
  border: 1px solid rgba(255, 75, 31, 0.3);
  font-family: var(--ed-font-mono);
  font-weight: 700;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ed-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.92rem;
}

.ed-prose table th,
.ed-prose table td {
  border: 1px solid var(--ed-border);
  padding: 0.65rem 0.85rem;
}

.ed-prose table th {
  background: var(--ed-surface-alt);
  color: var(--ed-ink);
  font-weight: 700;
}

.ed-prose ul,
.ed-prose ol {
  padding-left: 1.4rem;
  margin-bottom: 1.25rem;
}

.ed-prose li {
  margin-bottom: 0.45rem;
}

.ed-prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ed-breadcrumb {
  font-family: var(--ed-font-mono);
  font-size: 0.78rem;
  margin-bottom: 1.25rem;
}

.ed-breadcrumb .breadcrumb-item a {
  color: var(--ed-muted);
}

.ed-breadcrumb .breadcrumb-item.active {
  color: var(--ed-ink-soft);
}

.ed-article-title {
  font-family: var(--ed-font-serif);
  font-size: clamp(1.8rem, 3.1vw, 2.6rem);
  font-weight: 700;
  line-height: 1.18;
  color: var(--ed-ink);
  margin-bottom: 1rem;
}

.ed-article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  font-family: var(--ed-font-mono);
  font-size: 0.78rem;
  color: var(--ed-muted);
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--ed-border);
}

.ed-share-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  padding: 0.85rem 0;
  margin: 0 0 1.25rem;
  border-bottom: 1px solid var(--ed-border);
}

.ed-share-bar li a.social-button {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--ed-font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.36rem 0.75rem;
  border-radius: 6px;
  background: var(--ed-surface-alt);
  color: var(--ed-ink-soft);
  border: 1px solid var(--ed-border);
  transition: all 0.18s ease;
}

.ed-share-bar li a.social-button:hover {
  background: var(--ed-accent);
  border-color: var(--ed-accent);
  color: #ffffff;
}

.ed-article-hero-img {
  border-radius: var(--ed-radius-sm);
  overflow: hidden;
  margin-bottom: 1.5rem;
  background: var(--ed-surface-alt);
  border: 1px solid var(--ed-border);
}

.ed-article-hero-img img {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  display: block;
}

.ed-prose {
  font-size: 1.04rem;
  line-height: 1.82;
  color: var(--ed-ink-soft);
}

.ed-prose h2,
.ed-prose h3,
.ed-prose h4 {
  font-family: var(--ed-font-sans);
  color: var(--ed-ink);
  font-weight: 700;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
}

.ed-prose p {
  margin-bottom: 1.15rem;
}

.ed-prose img {
  max-width: 100%;
  height: auto;
  border-radius: var(--ed-radius-sm);
  margin: 1rem 0;
}

.ed-prose blockquote {
  border-left: 3px solid var(--ed-accent);
  background: var(--ed-surface-alt);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--ed-radius-sm) var(--ed-radius-sm) 0;
  color: var(--ed-ink);
  margin: 1.25rem 0;
}

/* ---------- Page Banner ---------- */
.ed-page-banner {
  background: radial-gradient(circle at top right, rgba(255, 75, 31, 0.14), transparent 45%),
              linear-gradient(180deg, #11121a 0%, #0a0a0f 100%);
  color: #f8fafc;
  padding: 2.5rem 0;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--ed-border);
}

.ed-page-banner h1 {
  font-family: var(--ed-font-serif);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  margin: 0;
  color: #ffffff;
}

.ed-page-banner p {
  color: #94a3b8;
  margin: 0.6rem 0 0;
  max-width: 720px;
}

.ed-author-card {
  background: var(--ed-surface);
  border: 1px solid var(--ed-border);
  border-radius: var(--ed-radius);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.ed-author-avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--ed-surface-alt);
  padding: 4px;
  flex-shrink: 0;
}

/* ---------- Forms ---------- */
.ed-form-card {
  background: var(--ed-surface);
  border: 1px solid var(--ed-border);
  border-radius: var(--ed-radius);
  padding: 2.25rem;
  box-shadow: var(--ed-shadow);
  max-width: 760px;
  margin: 0 auto;
}

.ed-form-card .form-control,
.ed-form-card select.form-control {
  border-radius: var(--ed-radius-sm);
  border: 1px solid var(--ed-border);
  background: var(--ed-surface-alt);
  color: var(--ed-ink);
  padding: 0.65rem 0.9rem;
  font-size: 0.95rem;
}

.ed-form-card .form-control:focus {
  border-color: var(--ed-accent);
  background: var(--ed-surface);
  box-shadow: 0 0 0 3px rgba(255, 75, 31, 0.15);
  color: var(--ed-ink);
}

/* ---------- Footer ---------- */
.ed-footer {
  position: relative;
  background: #07070b;
  color: #8b95a7;
  padding: 0 0 2rem;
  margin-top: 4.5rem;
  border-top: 1px solid #1d202d;
}

.ed-footer-cta {
  background: radial-gradient(circle at right, rgba(255, 75, 31, 0.14), transparent 50%), #11121a;
  border: 1px solid #222636;
  border-radius: var(--ed-radius);
  padding: 1.75rem 2rem;
  margin-bottom: 3rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.ed-footer-cta h3 {
  color: #ffffff;
  font-family: var(--ed-font-serif);
  font-size: 1.45rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
}

.ed-footer-cta p {
  color: #94a3b8;
  margin: 0;
  font-size: 0.9rem;
}

.ed-footer-main {
  padding-top: 3rem;
}

.ed-footer-logo {
  height: 46px;
  width: auto;
  filter: brightness(0) invert(1);
  margin-bottom: 1rem;
}

.ed-footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.85rem;
  margin-bottom: 0.55rem;
  color: #cbd5e1;
}

.ed-footer-contact-item i {
  color: var(--ed-accent);
  margin-top: 0.22rem;
}

.ed-footer h4 {
  color: #ffffff;
  font-family: var(--ed-font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin-bottom: 1.05rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.ed-footer h4::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 24px;
  height: 2px;
  background: var(--ed-accent);
}

.ed-footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.52rem;
}

.ed-footer-links a {
  color: #94a3b8;
  font-size: 0.875rem;
  transition: color 0.18s ease, transform 0.18s ease;
}

.ed-footer-links a:hover {
  color: #ffffff;
  transform: translateX(3px);
}

.ed-footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.ed-footer-social a {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  font-family: var(--ed-font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  color: #cbd5e1;
  background: #11121a;
  border: 1px solid #222636;
  padding: 0.38rem 0.75rem;
  border-radius: 6px;
  transition: all 0.18s ease;
}

.ed-footer-social a:hover {
  background: var(--ed-accent);
  border-color: var(--ed-accent);
  color: #ffffff;
}

.ed-footer-bottom {
  border-top: 1px solid #1b1d28;
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  font-family: var(--ed-font-mono);
  font-size: 0.76rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

/* ---------- Pagination ---------- */
.pagination {
  justify-content: center;
  margin-top: 2rem;
  gap: 0.25rem;
}

.page-item .page-link {
  border-radius: 6px !important;
  border: 1px solid var(--ed-border);
  background: var(--ed-surface);
  color: var(--ed-ink-soft);
  font-family: var(--ed-font-mono);
  font-weight: 600;
  font-size: 0.82rem;
}

.page-item.active .page-link {
  background-color: var(--ed-accent);
  border-color: var(--ed-accent);
  color: #ffffff;
}

@media (max-width: 767.98px) {
  .ed-article-shell { padding: 1.25rem; }
  .ed-hero-body { padding: 1.25rem; }
  .ed-hero-media { min-height: 200px; max-height: 250px; }
  .ed-author-card { flex-direction: column; text-align: center; }
  .ed-page-banner { padding: 1.75rem 0; margin-bottom: 1.25rem; }
  .ed-form-card { padding: 1.25rem; }
  .ed-footer-cta { padding: 1.25rem; margin-bottom: 2rem; }
  .ed-section-header { flex-wrap: wrap; gap: 0.5rem; }
  .ed-section-title { font-size: 1.18rem; }
  .ed-prose table { display: block; overflow-x: auto; white-space: nowrap; }
  .ed-prose, .ed-prose p, .ed-prose a { overflow-wrap: anywhere; word-break: break-word; }
  .ed-footer,
  .ed-footer * {
    text-align: left !important;
  }
  .ed-footer-cta {
    align-items: flex-start !important;
    justify-content: flex-start !important;
  }
  .ed-footer-social,
  .ed-footer-bottom {
    justify-content: flex-start !important;
    align-items: flex-start !important;
  }
  .ed-footer-bottom {
    flex-direction: column;
  }
}

@media (max-width: 991.98px) {
  .ed-sidebar { position: static; margin-top: 1rem; }
  .ed-navbar .navbar-collapse {
    padding-top: 0.75rem;
    margin-top: 0.5rem;
    border-top: 1px solid var(--ed-border);
  }
  .ed-nav-links { gap: 0.15rem; }
}

@media (max-width: 575.98px) {
  .ed-brand img.logo { height: 34px; max-width: 170px; }
  .ed-footer-logo { height: 36px; }
  .rw-mini-feature { padding: 0.75rem; gap: 0.75rem; }
  .rw-mini-thumb { width: 80px; height: 66px; }
  .rw-wire-row { padding: 1rem; }
  .ed-footer-cta .d-flex,
  .ed-footer-cta .ed-btn-primary,
  .ed-footer-cta .btn { width: 100%; justify-content: center; }
  .g-recaptcha { transform: scale(0.86); transform-origin: 0 0; }
}

/* Mobile Hamburger Icon Visibility in Dark & Light Modes */
html.rw-theme-dark .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(248, 250, 252, 0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

html.rw-theme-light .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(15, 23, 42, 0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}
