/* ═══════════════════════════════════════════════════════════════════
   Samuga Media — V3 Professional Newsroom Stylesheet
   Design: deep-night newspaper, Georgia serif headlines,
           Samuga blue identity, editorial rhythm
═══════════════════════════════════════════════════════════════════ */

/* ── Google Fonts ────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,600;0,700;0,800;1,600&family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,600;1,8..60,400&family=Inter:wght@400;500;600;700;800;900&display=swap');

/* ── Design tokens ──────────────────────────────────────────────── */
:root {
  /* Core palette */
  --ink:        #eef2fb;
  --ink-dim:    #b8c8de;
  --muted:      #6e82a0;
  --muted-faint:#3a4e68;
  --line:       rgba(255,255,255,.07);
  --line-med:   rgba(255,255,255,.12);
  --paper:      #010306;
  --surface:    #070d16;
  --surface-2:  #0c1420;
  --surface-3:  #101b28;

  /* Brand */
  --blue:       #28b8ff;
  --blue-dim:   rgba(40,184,255,.10);
  --blue-glow:  rgba(40,184,255,.24);
  --blue-mid:   rgba(40,184,255,.45);
  --cyan:       #0dd9ff;
  --red:        #ff3b30;
  --red-dim:    rgba(255,59,48,.14);
  --green:      #14e88a;
  --amber:      #f59e0b;

  /* Category accent colours */
  --cat-breaking:  #ff4d42;
  --cat-local:     #28b8ff;
  --cat-political: #a855f7;
  --cat-business:  #10b981;
  --cat-sports:    #f59e0b;
  --cat-world:     #06b6d4;
  --cat-lifestyle: #ec4899;

  /* Typography */
  --font-display: 'Playfair Display', 'Georgia', serif;
  --font-body:    'Source Serif 4', 'Georgia', 'Times New Roman', serif;
  --font-ui:      'Inter', 'Helvetica Neue', system-ui, sans-serif;

  /* Spacing */
  --r-sm:   8px;
  --r-md:   12px;
  --r-lg:   18px;
  --r-xl:   24px;
  --shadow: 0 4px 24px rgba(0,0,0,.5);
  --shadow-lg: 0 12px 48px rgba(0,0,0,.6);
}

/* ── Reset ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}
body.lang-dv { direction: rtl; }
body.lang-dv .ltr-lock { direction: ltr; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; }
h1,h2,h3,h4,h5,h6 { font-family: var(--font-display); font-weight: 700; line-height: 1.1; }
p { margin-bottom: 1.4em; }
p:last-child { margin-bottom: 0; }

.wrap { width: min(1200px, calc(100% - 32px)); margin-inline: auto; }

/* ════════════════════════════════════════════════════════════════
   HEADER
════════════════════════════════════════════════════════════════ */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(1,3,6,.97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(20px) saturate(140%);
}

/* Utility bar */
.utility-bar {
  background: #020609;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  font-family: var(--font-ui);
}
.utility-inner {
  display: flex; align-items: center;
  justify-content: space-between; gap: 16px; padding: 7px 0;
}
.utility-left { display: flex; align-items: center; gap: 18px; }
.utility-date { color: var(--ink-dim); font-weight: 600; letter-spacing: .2px; }
.utility-links { display: flex; gap: 14px; }
.utility-links a { color: var(--muted); font-weight: 600; transition: color .15s; }
.utility-links a:hover { color: var(--blue); }
.utility-right { display: flex; align-items: center; gap: 8px; }

.lang-btn {
  border: 1px solid var(--line-med); border-radius: 5px;
  background: transparent; color: var(--muted);
  cursor: pointer; padding: 3px 9px; font-size: 11px;
  font-weight: 700; letter-spacing: .5px; transition: all .15s;
  font-family: var(--font-ui);
}
.lang-btn.active { background: var(--blue); color: #001a2e; border-color: var(--blue); }

/* Masthead — newspaper nameplate */
.masthead { padding: 12px 0; border-bottom: 1px solid var(--line); }
.masthead-inner {
  display: flex; align-items: center;
  justify-content: space-between; gap: 20px;
}
.brand { display: inline-flex; align-items: center; }
.brand img {
  width: min(260px, 50vw); height: auto;
  max-height: 64px; object-fit: contain;
  filter: drop-shadow(0 4px 14px rgba(40,184,255,.18));
}

/* Clock */
.clock { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.clock-time {
  font-family: var(--font-ui); font-size: 18px; font-weight: 800;
  letter-spacing: 2px; font-variant-numeric: tabular-nums;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; line-height: 1;
}
.clock-date  { font-size: 10px; color: #5a7898; font-weight: 600; letter-spacing: .3px; }
.clock-hijri { font-size: 10px; color: rgba(40,184,255,.5); font-weight: 600; }
.clock-mvt   { font-size: 9px; color: rgba(255,255,255,.22); letter-spacing: .8px; font-weight: 700; text-transform: uppercase; }

/* Hamburger */
.menu-btn {
  display: none; width: 38px; height: 38px;
  border: 1px solid var(--line); border-radius: 7px;
  background: var(--surface); cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.menu-btn span { display: block; width: 16px; height: 1.5px; background: var(--ink); border-radius: 2px; }

/* Category nav */
.primary-nav { background: rgba(3,7,14,.85); border-bottom: 1px solid var(--line); }
.nav-scroll {
  display: flex; gap: 2px; overflow-x: auto;
  padding: 8px 0; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.nav-scroll::-webkit-scrollbar { display: none; }
.nav-btn {
  flex: 0 0 auto; border: 1px solid transparent;
  border-radius: 999px; background: transparent;
  color: var(--muted); cursor: pointer; padding: 6px 14px;
  white-space: nowrap; font-size: 13px; font-weight: 600;
  font-family: var(--font-ui); letter-spacing: .1px; transition: all .15s;
}
.nav-btn.active, .nav-btn:hover {
  border-color: var(--blue-glow); background: var(--blue-dim); color: var(--ink);
}
.nav-btn[data-cat="BREAKING"] { color: #ff6b63; }
.nav-btn[data-cat="BREAKING"].active,
.nav-btn[data-cat="BREAKING"]:hover { background: rgba(255,75,66,.12); border-color: rgba(255,75,66,.4); color: #ff8a84; }

/* ════════════════════════════════════════════════════════════════
   TICKER
════════════════════════════════════════════════════════════════ */

.ticker-bar {
  background: #000; border-bottom: 1px solid rgba(255,59,48,.3);
  min-height: 40px; display: grid;
  grid-template-columns: auto 1fr auto; overflow: hidden;
}
.ticker-label {
  background: var(--red); color: #fff; font-family: var(--font-ui);
  font-size: 10px; font-weight: 800; letter-spacing: .8px;
  text-transform: uppercase; padding: 0 16px;
  display: flex; align-items: center;
}
.ticker-track-wrap { overflow: hidden; display: flex; align-items: center; }
#tickerTrack {
  display: inline-flex; gap: 48px;
  min-width: max-content; padding: 0 24px;
  animation: ticker-roll 44s linear infinite;
}
#tickerTrack span { font-size: 13px; font-weight: 500; color: #dce8ff; font-family: var(--font-ui); white-space: nowrap; }
#tickerTrack span::before {
  content: ""; display: inline-block; width: 5px; height: 5px;
  margin-inline-end: 10px; border-radius: 50%;
  background: var(--cyan); box-shadow: 0 0 8px var(--cyan); vertical-align: middle;
}
.ticker-live {
  padding: 0 16px; font-size: 10px; font-weight: 800;
  letter-spacing: .8px; color: var(--green); text-transform: uppercase;
  display: flex; align-items: center; gap: 6px; font-family: var(--font-ui);
}
.ticker-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 0 3px rgba(20,232,138,.15);
  animation: live-blink 1.8s ease-in-out infinite;
}
@keyframes ticker-roll { to { transform: translateX(-50%); } }
@keyframes live-blink  { 0%,100%{opacity:1} 50%{opacity:.3} }

/* ════════════════════════════════════════════════════════════════
   HOMEPAGE — FEATURED HERO
════════════════════════════════════════════════════════════════ */

.home-hero { padding: 28px 0 0; }

/* Featured story grid */
.featured-grid {
  display: grid;
  grid-template-columns: minmax(0,1fr) 340px;
  gap: 20px; align-items: start;
}

/* Main featured story */
.featured-story {
  position: relative; border-radius: var(--r-xl);
  overflow: hidden; background: var(--surface);
  border: 1px solid var(--line-med);
  box-shadow: var(--shadow-lg);
  min-height: 460px; display: flex; flex-direction: column;
}
.featured-cover {
  flex: 1; position: relative; overflow: hidden;
  background: linear-gradient(145deg, #050f1e 0%, #0a2040 50%, #040d18 100%);
  min-height: 280px;
}
.featured-cover img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s ease;
}
.featured-story:hover .featured-cover img { transform: scale(1.03); }
.featured-cover-gradient {
  position: absolute; bottom: 0; left: 0; right: 0; height: 75%;
  background: linear-gradient(to top, rgba(7,13,22,.98) 0%, rgba(7,13,22,.6) 50%, transparent 100%);
}
.featured-orb {
  position: absolute; inset: 0; display: flex;
  align-items: center; justify-content: center;
  background:
    radial-gradient(circle at 50% 40%, rgba(40,184,255,.28), transparent 40%),
    linear-gradient(145deg, #041424 0%, #082040 55%, #041020 100%);
}
.ai-orb-sm {
  position: relative; display: grid; place-items: center;
  width: min(55%, 220px); aspect-ratio: 1; border-radius: 50%;
}
.ai-orb-sm img {
  width: 70%; height: 70%; border-radius: 50%; object-fit: contain;
  filter: drop-shadow(0 0 16px rgba(40,184,255,.8)) drop-shadow(0 0 40px rgba(40,184,255,.35));
  animation: orb-float 4s ease-in-out infinite;
}
.orb-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1px solid rgba(40,184,255,.35);
}
.orb-ring-1 { inset: 6%; border-style: dashed; animation: spin 14s linear infinite; }
.orb-ring-2 { inset: 18%; border-color: rgba(255,255,255,.2); animation: spin-r 10s linear infinite; }
.orb-glow {
  position: absolute; inset: 26%; border-radius: 50%;
  background: radial-gradient(circle, rgba(40,184,255,.3), transparent 70%);
  filter: blur(12px); animation: pulse-orb 3s ease-in-out infinite;
}
@keyframes orb-float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }
@keyframes spin      { to{transform:rotate(360deg)} }
@keyframes spin-r    { to{transform:rotate(-360deg)} }
@keyframes pulse-orb { 0%,100%{opacity:.5;transform:scale(.9)} 50%{opacity:1;transform:scale(1.12)} }

.featured-body {
  padding: 24px 28px 28px;
  position: relative; z-index: 2;
}
.featured-eyebrow {
  font-family: var(--font-ui); font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .8px;
  color: var(--blue); margin-bottom: 10px;
  display: flex; align-items: center; gap: 10px;
}
.featured-eyebrow-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--blue); flex-shrink: 0;
}
.featured-headline {
  font-size: clamp(22px, 3.2vw, 36px); line-height: 1.12;
  letter-spacing: -.5px; color: var(--ink);
  margin-bottom: 12px;
}
.featured-summary {
  font-size: 15px; color: var(--ink-dim); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-family: var(--font-body);
  margin-bottom: 16px;
}
.featured-meta {
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap;
}
.featured-author {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--font-ui); font-size: 12px; color: var(--muted); font-weight: 600;
}
.featured-author-dot {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--blue-dim); border: 1px solid var(--blue-glow);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; flex-shrink: 0;
}
.featured-time {
  font-family: var(--font-ui); font-size: 12px;
  color: var(--muted-faint); font-weight: 500;
}
.featured-read-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-ui); font-size: 13px; font-weight: 700;
  color: var(--blue); margin-top: 16px; transition: gap .2s;
}
.featured-read-btn:hover { gap: 10px; }

/* Right sidebar: sponsor + breaking strip */
.hero-sidebar { display: grid; gap: 16px; align-content: start; }

.breaking-panel {
  background: var(--surface);
  border: 1px solid rgba(255,59,48,.22);
  border-top: 2px solid var(--red);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.breaking-panel-head {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255,59,48,.15);
}
.breaking-panel-label {
  font-family: var(--font-ui); font-size: 10px; font-weight: 900;
  text-transform: uppercase; letter-spacing: .8px; color: var(--red);
}
.breaking-pulse {
  width: 6px; height: 6px; border-radius: 50%; background: var(--red);
  animation: live-blink 1.4s ease-in-out infinite; margin-inline-start: auto;
}
.breaking-item {
  display: block; padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  transition: background .15s;
}
.breaking-item:last-child { border-bottom: none; }
.breaking-item:hover { background: rgba(255,59,48,.06); }
.breaking-item-title {
  font-family: var(--font-ui); font-size: 13px; font-weight: 700;
  color: var(--ink); line-height: 1.4;
}
.breaking-item-time {
  font-family: var(--font-ui); font-size: 11px; color: var(--muted);
  margin-top: 4px;
}

/* Sponsor panel */
.sponsor-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 14px;
  display: grid; gap: 10px;
}
.sponsor-head {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-ui);
}
.sponsor-head-label {
  font-size: 10px; font-weight: 800; letter-spacing: .6px;
  text-transform: uppercase; color: var(--muted);
}
.ad-badge {
  font-size: 10px; font-weight: 700; letter-spacing: .4px;
  text-transform: uppercase; color: var(--muted-faint);
  border: 1px solid var(--line-med); border-radius: 4px; padding: 2px 6px;
}
.sponsor-frame {
  display: block; border: 1px solid rgba(40,184,255,.18);
  border-radius: var(--r-md); overflow: hidden;
  background: #020810; aspect-ratio: 16/9; transition: opacity .2s;
}
.sponsor-frame:hover { opacity: .9; }
.sponsor-frame.changing { opacity: .15; }
.sponsor-frame img { width: 100%; height: 100%; object-fit: contain; }
.sponsor-caption { font-size: 12px; color: var(--muted); font-family: var(--font-ui); }
.sponsor-controls { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sponsor-dots { display: flex; gap: 5px; }
.sp-dot {
  border: none; padding: 0; width: 6px; height: 6px;
  border-radius: 99px; background: rgba(255,255,255,.18); cursor: pointer; transition: all .2s;
}
.sp-dot.active { width: 18px; background: var(--blue); box-shadow: 0 0 10px rgba(40,184,255,.4); }
.sponsor-arrows { display: flex; gap: 6px; }
.sp-arrow {
  width: 28px; height: 28px; border: 1px solid var(--blue-glow);
  border-radius: 50%; background: var(--blue-dim); color: var(--ink);
  cursor: pointer; font-size: 14px; display: flex;
  align-items: center; justify-content: center; transition: all .15s;
}
.sp-arrow:hover { background: rgba(40,184,255,.2); }

/* ════════════════════════════════════════════════════════════════
   HOMEPAGE — SECTION DIVIDERS
════════════════════════════════════════════════════════════════ */

.section-divider {
  display: flex; align-items: center; gap: 14px;
  margin: 36px 0 20px; padding-bottom: 12px;
  border-bottom: 2px solid var(--line-med);
}
.section-divider h2 {
  font-size: 13px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .8px; color: var(--ink); font-family: var(--font-ui);
}
.section-divider::before {
  content: ""; flex-shrink: 0;
  width: 20px; height: 3px; border-radius: 2px;
  background: var(--blue);
}
.section-divider-count {
  margin-inline-start: auto; font-size: 12px;
  color: var(--muted); font-family: var(--font-ui); font-weight: 500;
}

/* ════════════════════════════════════════════════════════════════
   HOMEPAGE — STORY GRID
════════════════════════════════════════════════════════════════ */

.home-feed { padding-bottom: 56px; }
.home-layout {
  display: grid;
  grid-template-columns: minmax(0,1fr) 300px;
  gap: 28px;
}

.story-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; align-items: start; }

/* Search */
.search-wrap { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.search-input {
  flex: 1; border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 9px 14px;
  color: var(--ink); background: var(--surface);
  font-size: 14px; font-family: var(--font-ui);
  outline: none; transition: border-color .15s;
}
.search-input:focus { border-color: var(--blue-mid); }
.search-input::placeholder { color: var(--muted); }

/* Story Card */
.story-card {
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .18s, border-color .18s;
  position: relative;
}
.story-card:hover {
  transform: translateY(-2px); border-color: var(--blue-glow);
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
}
.story-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0;
  width: 2.5px; background: var(--cat-color, var(--blue));
  box-shadow: 0 0 8px var(--cat-color, var(--blue));
  border-radius: 3px 0 0 3px;
}

/* Card cover image */
.card-cover {
  position: relative; aspect-ratio: 16/9; overflow: hidden;
  background: var(--surface-2);
}
.card-cover img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s ease;
}
.story-card:hover .card-cover img { transform: scale(1.04); }
.card-no-cover {
  width: 100%; height: 100%; display: flex;
  align-items: center; justify-content: center;
  background: linear-gradient(145deg, #06101e, #0a1c34);
}
.card-no-cover-icon {
  font-size: 28px; opacity: .18;
}
.card-breaking-badge {
  position: absolute; top: 8px; inset-inline-start: 8px;
  background: var(--red); color: #fff; font-size: 9px;
  font-weight: 900; letter-spacing: .6px; text-transform: uppercase;
  border-radius: 4px; padding: 3px 6px; font-family: var(--font-ui);
  animation: badge-pulse 2s ease-in-out infinite;
}
@keyframes badge-pulse { 0%,100%{opacity:1} 50%{opacity:.7} }
.card-featured-badge {
  position: absolute; top: 8px; inset-inline-end: 8px;
  background: var(--amber); color: #000; font-size: 9px;
  font-weight: 900; letter-spacing: .4px; text-transform: uppercase;
  border-radius: 4px; padding: 3px 6px; font-family: var(--font-ui);
}

/* Card body */
.card-body { padding: 14px 16px 16px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-meta {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.card-source {
  font-family: var(--font-ui); font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px; color: var(--muted);
  display: flex; align-items: center; gap: 5px;
}
.source-dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--cat-color, var(--blue)); flex-shrink: 0;
}
.card-time {
  font-family: var(--font-ui); font-size: 10px; font-weight: 600;
  color: rgba(40,184,255,.45);
  border: 1px solid rgba(40,184,255,.15); border-radius: 999px; padding: 2px 7px;
  white-space: nowrap;
}
.cat-tag {
  display: inline-flex; align-items: center;
  border-radius: 999px; font-size: 9px; font-weight: 800;
  letter-spacing: .5px; text-transform: uppercase; padding: 3px 9px;
  font-family: var(--font-ui); width: fit-content;
  background: var(--blue-dim); color: var(--blue);
}
.cat-tag.breaking  { background: var(--red-dim); color: var(--cat-breaking); }
.cat-tag.politics  { background: rgba(168,85,247,.12); color: var(--cat-political); }
.cat-tag.business  { background: rgba(16,185,129,.1);  color: var(--cat-business); }
.cat-tag.sports    { background: rgba(245,158,11,.12); color: var(--cat-sports); }
.cat-tag.world     { background: rgba(6,182,212,.1);   color: var(--cat-world); }
.cat-tag.lifestyle { background: rgba(236,72,153,.1);  color: var(--cat-lifestyle); }

.card-title {
  font-size: clamp(15px, 1.6vw, 19px); line-height: 1.32;
  letter-spacing: -.15px; overflow-wrap: break-word;
  font-family: var(--font-display); font-weight: 700;
}
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--blue); }

.card-summary {
  font-size: 13px; color: var(--muted); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden; font-family: var(--font-body);
  flex: 1;
}
/* Cards WITH a cover image — summary shows 2 lines (less space needed) */
.story-card:has(.card-cover) .card-summary {
  -webkit-line-clamp: 2;
}

/* card-author-row removed — author now lives in card-footer (card-author-inline) */

.card-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto; padding-top: 10px;
  border-top: 1px solid var(--line); gap: 10px;
}
.read-link {
  font-family: var(--font-ui); font-size: 12px; font-weight: 700;
  color: var(--blue); display: flex; align-items: center; gap: 5px;
  flex-shrink: 0; transition: letter-spacing .2s;
}
.read-link:hover { letter-spacing: .3px; }
.card-reading-time {
  font-size: 10px; font-weight: 600;
  color: rgba(40,184,255,.45); white-space: nowrap;
}

/* Author inline in card footer */
.card-author-inline {
  display: flex; align-items: center; gap: 6px;
  min-width: 0; overflow: hidden;
}
.card-author-avatar {
  width: 22px; height: 22px; border-radius: 50%;
  object-fit: cover; border: 1.5px solid rgba(40,184,255,.35);
  flex-shrink: 0; background: #0a1a30;
}
.card-author-avatar-ai {
  width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(135deg, #071428, #0e3060);
  border: 1.5px solid rgba(40,184,255,.35); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; line-height: 1;
}
.card-author-name {
  font-family: var(--font-ui); font-size: 11px; font-weight: 700;
  color: var(--ink-dim); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 100px;
}

/* Wide featured card */
.story-card.featured-card {
  grid-column: 1 / -1; flex-direction: row;
}
.featured-card .card-cover {
  flex: 0 0 42%; aspect-ratio: unset; min-height: 220px;
}
.featured-card .card-body { padding: clamp(16px, 2.5vw, 28px); gap: 12px; }
.featured-card .card-title { font-size: clamp(18px, 2.2vw, 26px); }
.featured-card .card-summary { -webkit-line-clamp: 3; }

/* Empty + inline sponsor */
.empty-state {
  grid-column: 1/-1; padding: 40px 24px; text-align: center;
  border: 1px dashed var(--line-med); border-radius: var(--r-lg);
  background: var(--surface); color: var(--muted);
}
.empty-state strong { display: block; color: var(--ink); font-size: 20px; margin-bottom: 8px; font-family: var(--font-display); }

.inline-sponsor {
  grid-column: 1/-1; background: var(--surface-2);
  border: 1px solid rgba(40,184,255,.15); border-radius: var(--r-lg);
  padding: 14px; display: grid; gap: 10px;
  position: relative; overflow: hidden;
}
.inline-sponsor::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 90% 10%, rgba(40,184,255,.08), transparent 28%);
  pointer-events: none;
}
.inline-sponsor-row {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-ui); position: relative; z-index: 1;
}
.inline-sponsor-name {
  font-size: 10px; font-weight: 800; letter-spacing: .5px;
  text-transform: uppercase; color: var(--blue);
}
.inline-sponsor-frame {
  display: block; border: 1px solid rgba(40,184,255,.15);
  border-radius: var(--r-md); overflow: hidden;
  background: #010610; aspect-ratio: 16/6;
  position: relative; z-index: 1;
}
.inline-sponsor-frame img { width: 100%; height: 100%; object-fit: cover; }
.inline-sponsor-copy { font-size: 12px; color: var(--muted); font-family: var(--font-ui); position: relative; z-index: 1; }

/* ════════════════════════════════════════════════════════════════
   RAIL (sidebar)
════════════════════════════════════════════════════════════════ */

.rail { display: grid; gap: 20px; align-content: start; position: sticky; top: 100px; }
.panel {
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden;
}
.panel-head {
  padding: 14px 18px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 8px;
}
.panel-head::before {
  content: ""; width: 3px; height: 16px; border-radius: 2px;
  background: var(--blue); flex-shrink: 0;
}
.panel-head h2 {
  font-size: 12px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .7px; color: var(--ink); font-family: var(--font-ui);
}
.panel-body { padding: 14px 18px; }

/* Popular list */
.popular-list { list-style: none; display: grid; gap: 0; }
.popular-item {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 11px 0; border-bottom: 1px solid var(--line);
}
.popular-item:last-child { border-bottom: none; padding-bottom: 0; }
.popular-num {
  font-family: var(--font-ui); font-size: 10px; font-weight: 900;
  color: var(--blue); width: 18px; flex-shrink: 0; padding-top: 2px; font-style: italic;
}
.popular-link {
  font-family: var(--font-display); font-size: 13px; line-height: 1.4;
  font-weight: 700; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.popular-link:hover { color: var(--blue); }
.popular-time {
  font-family: var(--font-ui); font-size: 10px; color: var(--muted-faint);
  margin-top: 3px;
}

/* Tip panel */
.tip-panel-inner { display: grid; gap: 12px; }
.tip-panel-inner h2 { font-family: var(--font-display); font-size: 18px; }
.tip-panel-inner p { font-size: 13px; color: var(--muted); font-family: var(--font-body); }
.community-btn {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--blue-glow); border-radius: 999px;
  background: var(--blue-dim); padding: 9px 16px;
  font-family: var(--font-ui); font-size: 13px; font-weight: 700;
  color: #dff6ff; transition: background .15s; width: fit-content;
}
.community-btn:hover { background: rgba(40,184,255,.18); }

/* ════════════════════════════════════════════════════════════════
   FOOTER
════════════════════════════════════════════════════════════════ */

.site-footer {
  background: #02050a; border-top: 1px solid var(--line);
  padding: 32px 0;
}
.footer-inner { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand img { width: 38px; height: 38px; border-radius: 50%; opacity: .85; }
.footer-brand-name { font-family: var(--font-display); font-size: 15px; font-weight: 700; }
.footer-tagline { font-size: 12px; color: var(--muted); margin-top: 3px; font-family: var(--font-body); }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; padding-top: 4px; }
.footer-links a { font-size: 13px; color: var(--muted); font-weight: 500; font-family: var(--font-ui); transition: color .15s; }
.footer-links a:hover { color: var(--blue); }
.footer-copy { font-size: 11px; color: rgba(255,255,255,.2); font-family: var(--font-ui); padding-top: 4px; }

/* ════════════════════════════════════════════════════════════════
   CHAT WIDGET
════════════════════════════════════════════════════════════════ */

.chat-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 200;
  border: 1px solid rgba(40,184,255,.4);
  background: linear-gradient(135deg, #06152a, #0c3460);
  color: #fff; border-radius: 999px; padding: 11px 18px;
  box-shadow: 0 16px 48px rgba(0,0,0,.55), 0 0 24px rgba(40,184,255,.15);
  cursor: pointer; display: flex; align-items: center; gap: 9px;
  font-weight: 700; font-size: 14px; font-family: var(--font-ui);
  transition: all .2s;
}
.chat-fab:hover { box-shadow: 0 16px 48px rgba(0,0,0,.55), 0 0 36px rgba(40,184,255,.25); }
.chat-fab-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 0 3px rgba(20,232,138,.14), 0 0 14px var(--green);
}

.chat-panel {
  position: fixed; right: 20px; bottom: 74px; z-index: 200;
  width: min(400px, calc(100vw - 28px));
  height: min(580px, calc(100vh - 110px));
  background: linear-gradient(180deg, #07101c, #030710);
  border: 1px solid rgba(40,184,255,.22); border-radius: 18px;
  box-shadow: 0 28px 80px rgba(0,0,0,.68), 0 0 40px rgba(40,184,255,.09);
  display: none; overflow: hidden;
}
.chat-panel.open { display: grid; grid-template-rows: auto 1fr auto; }
.chat-head {
  padding: 12px 14px; display: flex; align-items: center;
  justify-content: space-between; gap: 12px;
  border-bottom: 1px solid var(--line); background: rgba(40,184,255,.04);
}
.chat-brand-row { display: flex; align-items: center; gap: 10px; }
.chat-brand-row img { width: 36px; height: 36px; border-radius: 50%; filter: drop-shadow(0 0 12px rgba(40,184,255,.4)); }
.chat-brand-row strong { display: block; font-size: 15px; font-family: var(--font-ui); }
.chat-brand-row span { display: block; font-size: 11px; color: var(--muted); font-family: var(--font-ui); }
.chat-close-btn {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  width: 30px; height: 30px; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.chat-messages {
  padding: 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 9px;
  scrollbar-width: thin; scrollbar-color: rgba(40,184,255,.18) transparent;
}
.msg {
  max-width: 85%; padding: 9px 12px; border-radius: 12px;
  font-size: 13.5px; line-height: 1.5; font-family: var(--font-ui);
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.msg.bot { align-self: flex-start; background: #0a1522; border: 1px solid rgba(255,255,255,.07); color: #ddeeff; }
.msg.user { align-self: flex-end; background: linear-gradient(135deg, var(--blue), #0c8ad8); color: #001524; font-weight: 700; }
.quick-prompts { display: flex; gap: 7px; flex-wrap: wrap; }
.quick-prompt-btn {
  border: 1px solid rgba(40,184,255,.22); background: rgba(40,184,255,.07);
  color: #dff6ff; border-radius: 999px; padding: 5px 10px;
  cursor: pointer; font-size: 12px; font-weight: 600; font-family: var(--font-ui); transition: all .15s;
}
.quick-prompt-btn:hover { background: rgba(40,184,255,.15); }
.chat-form {
  padding: 10px 12px; border-top: 1px solid var(--line);
  display: flex; gap: 8px; background: rgba(3,7,14,.85);
}
.chat-input {
  flex: 1; border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 12px; color: var(--ink); background: var(--surface);
  font-size: 14px; outline: none; resize: none;
  font-family: var(--font-ui); transition: border-color .15s;
}
.chat-input:focus { border-color: rgba(40,184,255,.4); }
.chat-send {
  border: none; border-radius: 8px; background: var(--blue);
  color: #001524; font-weight: 800; padding: 8px 14px;
  cursor: pointer; font-family: var(--font-ui); font-size: 13px; transition: background .15s;
}
.chat-send:hover { background: var(--cyan); }
.chat-send:disabled { opacity: .4; cursor: not-allowed; }

/* ════════════════════════════════════════════════════════════════
   ARTICLE PAGE
════════════════════════════════════════════════════════════════ */

.article-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(1,3,6,.97); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(20px) saturate(140%); padding: 10px 0;
}
.article-header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.article-header-brand {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
}
.article-header-brand img {
  width: 34px; height: 34px; border-radius: 50%;
  filter: drop-shadow(0 0 10px rgba(40,184,255,.4));
}
.article-header-nav { display: flex; gap: 8px; }
.header-btn {
  border: 1px solid var(--blue-glow); border-radius: 999px;
  background: var(--blue-dim); color: #dff6ff;
  font-family: var(--font-ui); font-size: 12px; font-weight: 700;
  padding: 7px 14px; cursor: pointer; text-decoration: none; transition: all .15s;
}
.header-btn:hover { background: rgba(40,184,255,.18); }
.header-btn.primary { background: var(--blue); color: #001524; border-color: var(--blue); }

/* Reading progress */
.reading-progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 2px; z-index: 300; pointer-events: none;
}
.reading-progress-bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  transition: width .1s linear;
  box-shadow: 0 0 6px rgba(40,184,255,.5);
}

/* Cover image */
.article-cover { position: relative; max-height: 560px; overflow: hidden; background: var(--surface); }
.article-cover img { width: 100%; max-height: 560px; object-fit: cover; display: block; }
.article-cover-fade {
  position: absolute; bottom: 0; left: 0; right: 0; height: 200px;
  background: linear-gradient(to bottom, transparent 0%, var(--paper) 100%);
  pointer-events: none;
}
.article-cover-cap {
  position: absolute; bottom: 12px; inset-inline-end: 18px;
  font-size: 11px; color: rgba(255,255,255,.4); font-style: italic;
  font-family: var(--font-body); max-width: 320px; text-align: end;
}
.article-no-cover {
  height: 80px;
  background: linear-gradient(180deg, rgba(40,184,255,.06) 0%, var(--paper) 100%);
}

/* Article layout */
.article-main { padding-bottom: 64px; }
.article-container { width: min(820px, calc(100% - 32px)); margin-inline: auto; padding-top: 32px; }

/* Article hero */
.article-hero { margin-bottom: 36px; padding-bottom: 32px; border-bottom: 1px solid var(--line); }

.article-eyebrow {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap; margin-bottom: 18px;
}
.article-cat-tag {
  font-family: var(--font-ui); font-size: 10px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .7px;
  padding: 4px 12px; border-radius: 999px;
  background: var(--blue-dim); color: var(--blue);
}
.article-cat-tag.breaking { background: var(--red-dim); color: var(--cat-breaking); }
.article-cat-tag.politics  { background: rgba(168,85,247,.12); color: var(--cat-political); }
.article-cat-tag.business  { background: rgba(16,185,129,.1);  color: var(--cat-business); }
.article-cat-tag.sports    { background: rgba(245,158,11,.12); color: var(--cat-sports); }
.article-cat-tag.world     { background: rgba(6,182,212,.1);   color: var(--cat-world); }
.article-source-line {
  font-family: var(--font-ui); font-size: 12px; color: var(--muted); font-weight: 500;
}
.live-badge {
  background: var(--red); color: #fff;
  font-family: var(--font-ui); font-size: 9px; font-weight: 900;
  letter-spacing: .6px; text-transform: uppercase;
  border-radius: 4px; padding: 3px 7px;
  animation: badge-pulse 1.8s ease-in-out infinite;
}

.article-headline {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(28px, 5vw, 54px); line-height: 1.08;
  letter-spacing: -1.5px; color: var(--ink);
  margin-bottom: 16px;
}

.article-excerpt {
  font-family: var(--font-body); font-size: clamp(17px, 2.2vw, 20px);
  color: var(--ink-dim); line-height: 1.65; font-style: italic;
  margin-bottom: 24px;
}

/* Author row — newspaper style */
.author-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 0; border-top: 1px solid var(--line-med); border-bottom: 1px solid var(--line-med);
}
.author-avatar {
  width: 44px; height: 44px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--blue-glow); flex-shrink: 0;
}
.author-avatar-ai {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, #05102a, #0a2855);
  border: 2px solid var(--blue-glow); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.author-text { display: flex; flex-direction: column; gap: 2px; }
.author-name  { font-family: var(--font-ui); font-size: 14px; font-weight: 700; color: var(--ink); }
.author-role  { font-family: var(--font-ui); font-size: 11px; color: var(--muted); font-weight: 500; }
.author-sep   { width: 1px; height: 32px; background: var(--line-med); margin: 0 2px; }
.article-dateline { display: flex; flex-direction: column; gap: 3px; }
.article-dateline-label {
  font-family: var(--font-ui); font-size: 9px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px; color: var(--muted-faint);
}
.article-dateline-val {
  font-family: var(--font-ui); font-size: 12px; font-weight: 600; color: var(--ink-dim);
}
.article-readtime {
  margin-inline-start: auto; font-family: var(--font-ui);
  font-size: 11px; font-weight: 700;
  background: var(--blue-dim); border: 1px solid var(--blue-glow);
  border-radius: 999px; padding: 4px 12px; color: var(--blue);
  white-space: nowrap;
}
.updated-notice {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.22);
  border-radius: 6px; padding: 5px 10px; font-size: 11px; font-weight: 600;
  color: #f59e0b; margin-bottom: 16px; font-family: var(--font-ui);
}

/* Article body typography */
.article-body {
  font-family: var(--font-body); font-size: clamp(17px, 1.9vw, 19px);
  line-height: 1.82; color: #d0ddf5; padding: 32px 0;
}
.article-body p { margin-bottom: 1.5em; }
.article-body p:first-child {
  font-size: clamp(19px, 2.3vw, 22px); color: #e8f0ff;
  line-height: 1.68; font-weight: 400;
}
.article-body h2 {
  font-family: var(--font-display); font-size: clamp(20px, 2.5vw, 26px);
  color: var(--ink); margin: 1.8em 0 .7em; letter-spacing: -.3px;
}
.article-body h3 {
  font-family: var(--font-display); font-size: clamp(17px, 2vw, 21px);
  color: var(--ink-dim); margin: 1.4em 0 .5em;
}
.article-body blockquote {
  margin: 2em 0; padding: 16px 20px 16px 24px;
  border-inline-start: 3px solid var(--blue);
  background: rgba(40,184,255,.05); border-radius: 0 10px 10px 0;
  color: var(--ink-dim); font-style: italic; font-size: 1.05em;
}
.article-body a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.article-body a:hover { color: var(--cyan); }

/* Share bar */
.share-bar { padding: 24px 0; border-top: 1px solid var(--line); margin-top: 8px; }
.share-label {
  font-family: var(--font-ui); font-size: 10px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .6px; color: var(--muted);
  margin-bottom: 12px;
}
.share-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.share-btn {
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 999px; border: 1px solid var(--line-med);
  background: var(--surface); color: var(--ink-dim);
  font-family: var(--font-ui); font-size: 12px; font-weight: 700;
  padding: 8px 14px; cursor: pointer; text-decoration: none;
  transition: all .15s;
}
.share-btn:hover { border-color: var(--blue-glow); background: var(--blue-dim); color: var(--ink); }
.share-btn.copied { border-color: var(--green); color: var(--green); }

/* Article CTA */
.article-cta {
  padding: 22px 24px; border: 1px solid var(--blue-glow);
  border-radius: var(--r-lg); background: rgba(40,184,255,.05);
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin: 28px 0;
}
.article-cta-text strong { display: block; font-family: var(--font-display); font-size: 16px; }
.article-cta-text p { font-size: 13px; color: var(--muted); margin-top: 4px; font-family: var(--font-ui); margin-bottom: 0; }

/* Related articles */
.related-section { margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--line); }
.related-head {
  font-family: var(--font-display); font-size: 22px; font-weight: 700;
  margin-bottom: 20px; letter-spacing: -.3px;
}
.related-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.related-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 16px; transition: border-color .15s; display: block;
}
.related-card:hover { border-color: var(--blue-glow); }
.related-cat {
  font-family: var(--font-ui); font-size: 9px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .6px; color: var(--blue); margin-bottom: 8px;
}
.related-card h3 {
  font-family: var(--font-display); font-size: 14px; line-height: 1.38;
  color: var(--ink); margin-bottom: 6px; font-weight: 700;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.related-card p { font-size: 11px; color: var(--muted); font-family: var(--font-ui); margin-bottom: 0; }

/* Article banner (sponsor) */
.article-banner {
  margin: 28px 0; padding: 14px;
  background: var(--surface-2); border: 1px solid rgba(40,184,255,.15);
  border-radius: var(--r-lg); display: grid; gap: 10px;
}
.article-banner-head {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-ui); font-size: 10px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .6px; color: var(--blue);
}
.article-banner-frame {
  display: block; border: 1px solid rgba(40,184,255,.15);
  border-radius: var(--r-md); overflow: hidden; aspect-ratio: 16/6;
}
.article-banner-frame img { width: 100%; height: 100%; object-fit: cover; }
.article-banner-copy { font-size: 12px; color: var(--muted); font-family: var(--font-ui); margin-bottom: 0; }

/* Skeleton */
.skel-line {
  background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%);
  background-size: 200% 100%; border-radius: 6px; height: 16px;
  animation: skel-shimmer 1.6s ease-in-out infinite;
}
.skel-line.w80 { width: 80%; }
.skel-line.w60 { width: 60%; }
.skel-line.tall { height: 56px; }
.article-skeleton { display: grid; gap: 14px; padding: 40px 0; }
@keyframes skel-shimmer { 0%,100%{background-position:0% 0} 50%{background-position:-200% 0} }

/* ════════════════════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════════════════════ */

@media (max-width: 1080px) {
  .featured-grid, .home-layout { grid-template-columns: 1fr; }
  .hero-sidebar { grid-template-columns: 1fr 1fr; }
  .rail { position: static; grid-template-columns: 1fr 1fr; }
  .featured-story { min-height: 380px; }
  .featured-card { flex-direction: column; }
  .featured-card .card-cover { flex: none; min-height: 0; aspect-ratio: 16/9; }
}

@media (max-width: 780px) {
  .menu-btn { display: flex; }
  .primary-nav { display: none; }
  .primary-nav.open { display: block; }
  .nav-scroll { padding: 10px; }
  .story-grid { grid-template-columns: 1fr; }
  .hero-sidebar { grid-template-columns: 1fr; }
  .rail { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .author-sep { display: none; }
  .article-readtime { margin-inline-start: 0; }
  .article-cta { flex-direction: column; }
  .utility-right { display: none; }
}

@media (max-width: 520px) {
  .wrap { width: calc(100% - 24px); }
  .brand img { width: min(200px, 52vw); max-height: 52px; }
  .clock { display: none; }
  .article-headline { font-size: 26px; letter-spacing: -1px; }
  .featured-headline { font-size: 20px; }
  .footer-inner { flex-direction: column; gap: 16px; }
  .chat-fab span { display: none; }
  .share-buttons { gap: 6px; }
  .share-btn { font-size: 11px; padding: 6px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; transition-duration: .01ms !important;
  }
}
