/* ============================================================
   الوكالة — هوية بصرية بروح "محطة سلكية" (wire terminal):
   خلفية داكنة كغرفة تحرير ليلية، لمسة كهرمانية واحدة كإشارة
   "حيّة"، عناوين بخط كوفي هندسي يستحضر أختام الصحافة العربية،
   وبيانات وصفية (وقت/مصدر) بخط مونو يحاكي شريط التيليبرنتر.
   ============================================================ */

:root {
  --bg: #0E1013;
  --surface: #1A1D22;
  --surface-2: #20242B;
  --border: #262B33;
  --text: #ECE9E2;
  --text-muted: #8B8F98;
  --accent: #F0A830;
  --accent-ink: #1A1306;

  --font-display: 'Noto Kufi Arabic', 'Tahoma', sans-serif;
  --font-body: 'IBM Plex Sans Arabic', 'Tahoma', sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.65;
  min-height: 100vh;
}

a { color: inherit; }

/* ===== تنبيه إداري (يظهر فقط لو مجلد الكاش غير قابل للكتابة) ===== */
.admin-warning {
  background: #3A2A12;
  color: #F0C385;
  font-size: 13px;
  text-align: center;
  padding: 8px 16px;
  font-family: var(--font-mono);
}

/* ===== شريط العاجل (Ticker) ===== */
.ticker-wrap {
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  white-space: nowrap;
  padding: 10px 0;
}
.ticker-track {
  display: inline-flex;
  direction: ltr;
  animation: scroll-ticker 70s linear infinite;
}
.ticker-wrap:hover .ticker-track {
  animation-play-state: paused;
}
@keyframes scroll-ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
  font-size: 13.5px;
  color: var(--text-muted);
  direction: rtl;
  unicode-bidi: isolate;
}
.ticker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.ticker-sep { opacity: .45; padding-inline-start: 14px; }

/* ===== الترويسة ===== */
.masthead {
  padding: 30px 20px 16px;
  text-align: center;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
}
.brand h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 32px;
  margin: 0;
  letter-spacing: .5px;
}
.live-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(240, 168, 48, .55);
  animation: pulse 2.2s infinite;
  flex-shrink: 0;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(240, 168, 48, .55); }
  70%  { box-shadow: 0 0 0 10px rgba(240, 168, 48, 0); }
  100% { box-shadow: 0 0 0 0 rgba(240, 168, 48, 0); }
}
.tagline {
  color: var(--text-muted);
  font-size: 14px;
  margin: 10px 0 6px;
  max-width: 480px;
  margin-inline: auto;
}
.updated-at {
  color: var(--text-muted);
  font-size: 12.5px;
  font-family: var(--font-mono);
  display: inline-block;
}

/* ===== تابات التصنيفات ===== */
.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 6px 16px 18px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex-shrink: 0;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.tab:hover { border-color: var(--tab-accent, var(--accent)); color: var(--text); }
.tab.active {
  background: var(--tab-accent, var(--accent));
  border-color: var(--tab-accent, var(--accent));
  color: var(--accent-ink);
  font-weight: 600;
}
.tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ===== قائمة الأخبار ===== */
.feed {
  max-width: 720px;
  margin: 0 auto;
  padding: 4px 18px 60px;
}

.dispatch {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.dispatch:first-child { padding-top: 8px; }

.dispatch-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
}
.source-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
}
.source-tag .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dispatch-time {
  color: var(--text-muted);
  opacity: .85;
}
.dispatch-title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.55;
}
.dispatch-title a {
  text-decoration: none;
}
.dispatch-title a:hover { color: var(--accent); }
.dispatch-title a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.dispatch-summary {
  color: var(--text-muted);
  font-size: 14.5px;
  margin: 0;
}

.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 70px 20px;
  font-size: 15px;
}

/* ===== التذييل ===== */
.site-footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 12.5px;
  padding: 24px 22px 44px;
  border-top: 1px solid var(--border);
  max-width: 720px;
  margin: 0 auto;
}

/* ===== استجابة لشاشات أكبر ===== */
@media (min-width: 720px) {
  .brand h1 { font-size: 40px; }
  .masthead { padding: 42px 20px 20px; }
  .dispatch-title { font-size: 21px; }
  .dispatch { padding: 22px 0; }
}
