/* =================================================================
   Design tokens — light + dark. Old variable names (--bg, --text…)
   point at the new ones, so every existing page follows automatically.
   ================================================================= */
:root {
  --ink: #151a23; --ink-2: #353c49; --muted: #5d6675; --faint: #8b93a1;
  --paper: #f2f4f7; --surface: #ffffff; --line: #e2e6ec; --line-2: #eef1f5;
  --brand: #2452e8; --brand-strong: #1a3fc4; --brand-soft: #e9eefe;
  --alert: #d92d20; --alert-soft: #fdecea;
  --warn: #b45309; --warn-soft: #fff6e5;
  --up: #12805c;
  --f-head: 'Noto Kufi Arabic', 'Tajawal', system-ui, sans-serif;
  --f-body: 'Noto Naskh Arabic', 'Amiri', 'Tajawal', serif;
  --r-lg: 14px; --r-sm: 8px;
  color-scheme: light;

  /* legacy names used across the existing pages */
  --bg: var(--paper); --border: var(--line); --text: var(--ink);
  --text-muted: var(--muted); --text-faint: var(--faint);
  --primary: var(--brand); --primary-dark: var(--brand-strong); --primary-tint: var(--brand-soft);
  --breaking-bg: var(--alert-soft); --breaking-fg: var(--alert);
  --featured-bg: var(--warn-soft); --featured-fg: var(--warn);
  --radius: var(--r-lg);
}
:root[data-theme="dark"] {
  --ink: #e7eaf0; --ink-2: #c9ceda; --muted: #a3acba; --faint: #7a8392;
  --paper: #0d1015; --surface: #151a21; --line: #262d38; --line-2: #1c222b;
  --brand: #7b97ff; --brand-strong: #9db2ff; --brand-soft: #1b2440;
  --alert: #ff5a4e; --alert-soft: #3a1714;
  --warn: #f5b04c; --warn-soft: #33260f;
  --up: #3ecf8e;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #e7eaf0; --ink-2: #c9ceda; --muted: #a3acba; --faint: #7a8392;
    --paper: #0d1015; --surface: #151a21; --line: #262d38; --line-2: #1c222b;
    --brand: #7b97ff; --brand-strong: #9db2ff; --brand-soft: #1b2440;
    --alert: #ff5a4e; --alert-soft: #3a1714;
    --warn: #f5b04c; --warn-soft: #33260f;
    --up: #3ecf8e;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
body {
  font-family: var(--f-head);
  background: var(--bg);
  color: var(--text);
  margin: 0;
}
a { color: inherit; }
.wrap { max-width: 920px; margin: 0 auto; padding: 0 1rem 3rem; }

/* Header */
header.site {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20;
}
header.site .top {
  max-width: 880px; margin: 0 auto; padding: .9rem 1rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
header.site .brand { display: flex; align-items: center; gap: .5rem; font-weight: 800; font-size: 1.15rem; text-decoration: none; color: var(--text); }
header.site .brand .dot-badge { width: 9px; height: 9px; background: var(--primary); border-radius: 50%; }
header.site .search-form {
  flex: 1; max-width: 320px; display: flex; gap: .4rem;
}
header.site .search {
  width: 100%; box-sizing: border-box; padding: .5rem .9rem; border: 1px solid var(--border);
  border-radius: 999px; background: var(--bg); font-size: .85rem; color: var(--text);
}
header.site .search-btn {
  flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--primary); color: #fff; font-size: .9rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
header.site .search-btn:hover { background: var(--primary-dark); }
header.site nav.cats {
  max-width: 880px; margin: 0 auto; padding: 0 1rem .7rem;
  display: flex; gap: 1.1rem; overflow-x: auto; font-size: .87rem;
}
header.site nav.cats a { text-decoration: none; color: var(--text-muted); white-space: nowrap; padding-bottom: .3rem; border-bottom: 2px solid transparent; }
header.site nav.cats a.active, header.site nav.cats a:hover { color: var(--primary); border-color: var(--primary); }

/* Hero */
.hero { text-align: center; padding: 2.2rem 0 1.5rem; }
.hero .pill {
  display: inline-flex; align-items: center; gap: .4rem; background: var(--primary-tint); color: var(--primary-dark);
  font-size: .78rem; font-weight: 700; padding: .35rem .9rem; border-radius: 999px; margin-bottom: 1rem;
}
.hero h1 { font-size: 1.7rem; margin: 0 0 .6rem; line-height: 1.5; }
.hero p { color: var(--text-muted); font-size: .95rem; margin: 0; }

/* Filter panel */
.filters {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.2rem; margin: 1.4rem 0; display: grid; grid-template-columns: repeat(5, 1fr) auto; gap: .9rem; align-items: end;
}
.filters label { display: block; font-size: .75rem; color: var(--text-muted); margin-bottom: .3rem; }
.filters input, .filters select {
  width: 100%; padding: .5rem .65rem; border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg); color: var(--text); font-size: .85rem;
}
.filters .apply {
  padding: .55rem 1.1rem; background: var(--primary); color: white; border: none; border-radius: 8px;
  font-weight: 700; font-size: .85rem; cursor: pointer; white-space: nowrap;
}
.filters .apply:hover { background: var(--primary-dark); }
.filters-foot { display: flex; justify-content: flex-end; margin-top: .3rem; }
.filters-foot a { font-size: .8rem; color: var(--text-muted); text-decoration: none; }
.filters-foot a:hover { color: var(--primary); }

.filters-toggle { display: none; }

.tabs { display: flex; gap: .5rem; flex-wrap: wrap; margin: 1rem 0; }
.tabs a {
  padding: .38rem .95rem; border-radius: 999px; font-size: .8rem;
  color: var(--text-muted); text-decoration: none; border: 1px solid var(--border); background: var(--surface);
}
.tabs a.active { background: var(--primary); color: white; border-color: var(--primary); }
.tabs a:hover:not(.active) { border-color: var(--primary); color: var(--primary); }

/* List header */
.list-head { display: flex; justify-content: space-between; align-items: baseline; margin: 1.6rem 0 .8rem; }
.list-head h2 { font-size: 1.15rem; margin: 0; }
.list-head .count { font-size: .8rem; color: var(--text-faint); }

/* Cards */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.2rem 1.3rem; margin-bottom: .85rem; text-decoration: none;
}
.card .meta { display: flex; gap: .55rem; align-items: center; font-size: .76rem; color: var(--text-faint); margin-bottom: .5rem; flex-wrap: wrap; }
.card h2 { font-size: 1.05rem; margin: 0 0 .45rem; line-height: 1.6; }
.card h2 a { text-decoration: none; color: var(--text); }
.card h2 a:hover { color: var(--primary); }
.card p.summary { font-size: .9rem; color: var(--text-muted); margin: 0 0 .5rem; line-height: 1.75; }
.card .location { font-size: .8rem; color: var(--text-faint); margin-bottom: .5rem; }
.card .read-more { font-size: .82rem; color: var(--primary); text-decoration: none; font-weight: 600; }
.card .read-more:hover { text-decoration: underline; }

.badge { padding: .18rem .6rem; border-radius: 999px; font-size: .68rem; font-weight: 700; }
.badge.breaking { background: var(--breaking-bg); color: var(--breaking-fg); }
.badge.featured { background: var(--featured-bg); color: var(--featured-fg); }
.badge.cat { background: var(--primary-tint); color: var(--primary-dark); }

/* Pagination */
.pagination { display: flex; justify-content: center; align-items: center; gap: .35rem; margin-top: 2rem; flex-wrap: wrap; }
.pagination a, .pagination span.ellipsis {
  min-width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  border-radius: 8px; font-size: .82rem; text-decoration: none; color: var(--text-muted);
}
.pagination a:hover { background: var(--primary-tint); color: var(--primary); }
.pagination a.current { background: var(--primary); color: white; font-weight: 700; }
.pagination a.next, .pagination a.prev { font-weight: 600; color: var(--primary); min-width: auto; padding: 0 .6rem; }
.pagination-jump { display: flex; align-items: center; gap: .35rem; margin-inline-start: .5rem; }
.pagination-jump input[type="number"] {
  width: 4.2rem; height: 34px; border-radius: 8px; border: 1px solid var(--border);
  text-align: center; font-size: .82rem; background: var(--surface); color: var(--text);
}
.pagination-jump button {
  height: 34px; padding: 0 .7rem; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-muted); font-size: .82rem; cursor: pointer;
}
.pagination-jump button:hover { background: var(--primary-tint); color: var(--primary); }

.empty { color: var(--text-faint); padding: 3rem 0; text-align: center; }

/* Article detail */
.article-meta { display: flex; gap: .55rem; align-items: center; flex-wrap: wrap; font-size: .78rem; color: var(--text-faint); margin: 1.4rem 0 .6rem; }
.article-title { font-size: 1.55rem; line-height: 1.6; margin: 0 0 .4rem; font-weight: 800; }
.article-title-en { font-size: .88rem; color: var(--text-faint); margin: 0 0 1rem; }
.article-summary {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.1rem 1.3rem; margin: 1.1rem 0; font-size: .96rem; line-height: 1.95; color: var(--text);
}
.article-body { font-size: 1rem; line-height: 2; color: var(--ink-2); }
.points { margin: 1.3rem 0; padding-inline-start: 1.3rem; }
.points li { margin-bottom: .5rem; font-size: .92rem; color: var(--ink-2); }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1.1rem 0; }
.tags span { background: var(--primary-tint); color: var(--primary-dark); font-size: .75rem; padding: .3rem .7rem; border-radius: 999px; }
.source-link {
  display: inline-block; margin-top: 1.2rem; font-size: .85rem; color: var(--primary); font-weight: 600; text-decoration: none;
}
.source-link:hover { text-decoration: underline; }

/* Digest */
.digest-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.3rem; margin-bottom: 1rem; }
.digest-card .period { font-size: .74rem; color: var(--text-faint); margin-bottom: .5rem; }
.digest-card h2 { margin: 0 0 .6rem; font-size: 1.1rem; }
.digest-card p { font-size: .93rem; line-height: 1.9; color: var(--ink-2); margin: 0; }

/* Footer */
footer.site {
  border-top: 1px solid var(--border); margin-top: 2rem; padding: 1.5rem 1rem;
  text-align: center; font-size: .8rem; color: var(--text-faint);
}

/* Lead story hero */
.story-hero {
  display: block; position: relative; border-radius: 20px; padding: 2.5rem 1.6rem 1.8rem;
  margin: 1.6rem 0; min-height: 260px; background: var(--surface); border: 1px solid var(--border);
  background-size: cover; background-position: center; text-decoration: none; color: var(--text);
  transition: transform .15s ease, box-shadow .15s ease;
}
.story-hero:hover { transform: translateY(-2px); box-shadow: 0 12px 30px -10px rgba(17,24,39,.25); }
.story-hero[style*="background-image"] { color: #fff; display: flex; flex-direction: column; justify-content: flex-end; }
.story-hero-meta { display: flex; gap: .5rem; margin-bottom: .7rem; flex-wrap: wrap; }
.story-hero h2 { font-size: 1.5rem; line-height: 1.5; margin: 0 0 .5rem; font-weight: 800; }
.story-hero p { font-size: .95rem; line-height: 1.75; margin: 0 0 .7rem; opacity: .92; max-width: 640px; }
.story-hero-foot { display: flex; gap: .5rem; font-size: .78rem; opacity: .85; flex-wrap: wrap; }

/* Card grid (enhanced index.php layout) */
.card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
@media (max-width: 700px) { .card-grid { grid-template-columns: 1fr; } }

.card-media { border-radius: 10px 10px 0 0; overflow: hidden; aspect-ratio: 16/9; background: var(--bg); }
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
.card:hover .card-media img { transform: scale(1.04); }
.card-body { padding: 1.1rem 1.2rem; }
.card-foot { display: flex; gap: .6rem; font-size: .76rem; color: var(--text-faint); margin-top: .4rem; }

/* card-grid cards are <a> tags now (whole card clickable) with no default padding on .card itself */
.card-grid .card { padding: 0; overflow: hidden; transition: transform .15s ease, box-shadow .15s ease; }
.card-grid .card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -12px rgba(17,24,39,.2); }
.card-grid .card h2 { color: var(--text); }

/* Mobile responsiveness */
@media (max-width: 640px) {
  .filters {
    grid-template-columns: 1fr 1fr;
    gap: .7rem;
  }
  .filters .apply {
    grid-column: 1 / -1;
    width: 100%;
  }
  .filters-foot {
    grid-column: 1 / -1;
    justify-content: center;
  }

  .filters-toggle {
    display: block; width: 100%; margin: 1rem 0 0; padding: .65rem;
    border: 1px solid var(--border); border-radius: 10px; background: var(--surface);
    color: var(--text); font-size: .85rem; font-weight: 700; cursor: pointer;
  }
  .filters-toggle.active { border-color: var(--primary); color: var(--primary); }
  .filters { display: none; margin-top: .6rem; }
  .filters.open { display: grid; }

  header.site .top { gap: .6rem; }
  header.site .brand { font-size: 1rem; white-space: nowrap; }
  header.site .search { font-size: .8rem; padding: .45rem .8rem; }

  .hero { padding: 1.5rem 0 1rem; }
  .hero h1 { font-size: 1.3rem; }
  .hero p { font-size: .85rem; }

  .story-hero { min-height: 200px; padding: 1.6rem 1.1rem 1.3rem; }
  .story-hero h2 { font-size: 1.15rem; }
  .story-hero p { font-size: .85rem; }

  .list-head { flex-direction: column; align-items: flex-start; gap: .2rem; }
}

@media (max-width: 420px) {
  .filters { grid-template-columns: 1fr; }
}

/* Sentiment indicator dot */
.sentiment-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }

/* Breadcrumb */
.breadcrumb { display: flex; gap: .5rem; font-size: .8rem; color: var(--text-faint); margin: 1.2rem 0 .4rem; }
.breadcrumb a { color: var(--text-faint); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary); }

/* Key points — checklist style instead of plain bullets */
.points { list-style: none; margin: 1.3rem 0; padding: 0; }
.points li {
  position: relative; margin-bottom: .6rem; font-size: .92rem; color: var(--ink-2);
  padding-inline-start: 1.6rem; line-height: 1.7;
}
.points li::before {
  content: "✓"; position: absolute; inset-inline-start: 0; top: 0;
  width: 1.1rem; height: 1.1rem; border-radius: 50%; background: var(--primary-tint);
  color: var(--primary-dark); font-size: .7rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}

/* Related articles */
.related-section { margin-top: 2.2rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.related-section h3 { font-size: 1.05rem; margin: 0 0 1rem; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
@media (max-width: 640px) { .related-grid { grid-template-columns: 1fr; } }
.related-card { display: block; text-decoration: none; color: var(--text); }
.related-media { border-radius: 10px; overflow: hidden; aspect-ratio: 16/10; background: var(--bg); margin-bottom: .5rem; }
.related-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
.related-card:hover .related-media img { transform: scale(1.05); }
.related-title { font-size: .88rem; font-weight: 600; line-height: 1.5; margin-bottom: .25rem; }
.related-card:hover .related-title { color: var(--primary); }
.related-date { font-size: .74rem; color: var(--text-faint); }

/* Card entrance animation */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeInUp .35s ease both; }
.card-grid .fade-in:nth-child(1) { animation-delay: .02s; }
.card-grid .fade-in:nth-child(2) { animation-delay: .06s; }
.card-grid .fade-in:nth-child(3) { animation-delay: .10s; }
.card-grid .fade-in:nth-child(4) { animation-delay: .14s; }
.card-grid .fade-in:nth-child(5) { animation-delay: .18s; }
.card-grid .fade-in:nth-child(6) { animation-delay: .22s; }

/* Search page */
.search-hero-form {
  display: flex; gap: .6rem; margin: 1.4rem 0 1.8rem;
}
.search-hero-form input {
  flex: 1; padding: .85rem 1.2rem; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); font-size: .95rem; box-sizing: border-box; color: var(--text);
}
.search-hero-form input:focus { outline: none; border-color: var(--primary); }
.search-hero-form button {
  padding: .85rem 1.6rem; border: none; border-radius: 999px; background: var(--primary);
  color: #fff; font-weight: 700; font-size: .9rem; cursor: pointer; flex-shrink: 0;
}
.search-hero-form button:hover { background: var(--primary-dark); }
@media (max-width: 480px) {
  .search-hero-form { flex-direction: column; }
  .search-hero-form button { width: 100%; }
}

mark {
  background: var(--featured-bg); color: var(--featured-fg);
  padding: 0 .15em; border-radius: 3px; font-weight: 700;
}

/* Digest page enhancements */
.country-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin-inline-end: .35rem; }
.tabs a[style*="background"] { color: #fff; }
.tabs a[style*="background"] .country-dot { background: #fff !important; }

.digest-card { position: relative; padding: 1.4rem 1.5rem; }
.digest-card .digest-badge {
  display: inline-block; font-size: .7rem; font-weight: 800; padding: .2rem .65rem;
  border-radius: 999px; margin-bottom: .6rem;
}
.digest-card .period { display: flex; align-items: center; gap: .35rem; }
.digest-card .dot-sep { color: var(--text-faint); }

.digest-latest { padding: 1.8rem 1.7rem; margin-bottom: 1.6rem; }
.digest-latest h2 { font-size: 1.3rem; }
.digest-latest p { font-size: .98rem; }

.digest-export { display: flex; gap: .5rem; margin-top: .9rem; }
.digest-export a {
  display: inline-flex; align-items: center; gap: .3rem; font-size: .78rem; font-weight: 600;
  padding: .35rem .7rem; border-radius: 7px; border: 1px solid var(--border);
  color: var(--text-muted); text-decoration: none; background: var(--bg);
}
.digest-export a:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-tint); }

.copy-text-btn {
  display: inline-flex; align-items: center; gap: .3rem; font-size: .78rem; font-weight: 600;
  padding: .35rem .7rem; border-radius: 7px; border: 1px solid var(--border);
  color: var(--text-muted); background: var(--bg); cursor: pointer; font-family: inherit;
}
.copy-text-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-tint); }

.digest-list { display: flex; flex-direction: column; gap: .9rem; }

/* Searchable source combobox */
.source-dropdown {
  display: none; position: absolute; top: 100%; inset-inline-start: 0; inset-inline-end: 0;
  margin-top: .3rem; background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  max-height: 220px; overflow-y: auto; z-index: 30; box-shadow: 0 10px 24px -8px rgba(17,24,39,.18);
}
.source-dropdown.open { display: block; }
.source-dropdown-item { padding: .55rem .8rem; font-size: .85rem; cursor: pointer; color: var(--text); }
.source-dropdown-item:hover { background: var(--primary-tint); color: var(--primary-dark); }

/* Entity pills on article pages */
.entities { display: flex; flex-wrap: wrap; gap: .45rem; margin: 1.1rem 0; }
.entity-pill {
  display: inline-flex; align-items: center; gap: .3rem; background: var(--surface); border: 1px solid var(--border);
  color: var(--text); font-size: .78rem; padding: .35rem .75rem; border-radius: 999px; text-decoration: none;
}
.entity-pill:hover { border-color: var(--primary); color: var(--primary-dark); background: var(--primary-tint); }

/* Language switch */
.lang-switch {
  flex-shrink: 0; font-size: .8rem; font-weight: 700; color: var(--primary);
  text-decoration: none; padding: .4rem .7rem; border: 1px solid var(--border); border-radius: 999px;
}
.lang-switch:hover { background: var(--primary-tint); }

/* Situation assessment (تقدير موقف) */
.assessment-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.6rem 1.7rem; margin-bottom: 1.5rem;
}
.assessment-card .period { display: flex; align-items: center; gap: .35rem; font-size: .78rem; color: var(--text-faint); margin-bottom: .5rem; }
.assessment-card > h2 { font-size: 1.3rem; margin: 0 0 1.2rem; font-weight: 800; line-height: 1.6; }
.assessment-section { margin-bottom: 1.2rem; }
.assessment-section:last-child { margin-bottom: 0; }
.assessment-section h3 {
  font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; color: var(--primary);
  margin: 0 0 .4rem; font-weight: 800;
}
.assessment-section p { font-size: .95rem; line-height: 1.9; color: var(--ink-2); margin: 0; }
.assessment-section.conclusion { background: var(--primary-tint); border-radius: 10px; padding: 1rem 1.2rem; margin-top: 1.4rem; }
.assessment-section.conclusion h3 { color: var(--primary-dark); }

/* Story timeline (صفحة الكيان — entity.php) */
.timeline { margin-top: 1.4rem; }
.timeline-group { margin-bottom: 1.8rem; }
.timeline-group:last-child { margin-bottom: 0; }
.timeline-day {
  font-size: .8rem; font-weight: 800; color: var(--text-muted);
  margin: 0 0 .8rem 1.9rem;
}
.timeline-line { position: relative; padding-inline-start: 1.9rem; }
.timeline-line::before {
  content: ''; position: absolute; inset-inline-start: .5rem; top: .3rem; bottom: .3rem;
  width: 2px; background: var(--border);
}
.timeline-item { position: relative; margin-bottom: 1.1rem; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-dot {
  position: absolute; inset-inline-start: -1.72rem; top: 1.15rem;
  width: 11px; height: 11px; border-radius: 50%;
  box-shadow: 0 0 0 3px var(--bg);
}
.timeline-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem 1.15rem;
}
.timeline-meta { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; font-size: .74rem; color: var(--text-faint); margin-bottom: .45rem; }
.timeline-time { font-weight: 800; color: var(--text-muted); }
.timeline-title { display: block; font-size: 1rem; font-weight: 700; color: var(--text); text-decoration: none; margin-bottom: .35rem; line-height: 1.6; }
.timeline-title:hover { color: var(--primary); }
.timeline-summary { font-size: .88rem; color: var(--text-muted); line-height: 1.75; margin: 0 0 .5rem; }
.timeline-points { margin: .5rem 0 0; padding-inline-start: 1.15rem; }
.timeline-points li { font-size: .84rem; color: var(--ink-2); margin-bottom: .3rem; line-height: 1.6; }
.timeline-location { font-size: .78rem; color: var(--text-faint); margin-top: .55rem; }

@media (max-width: 700px) {
  .timeline-line { padding-inline-start: 1.4rem; }
  .timeline-day { margin-inline-start: 1.4rem; }
  .timeline-line::before { inset-inline-start: .35rem; }
  .timeline-dot { inset-inline-start: -1.22rem; }
}

/* Site analytics (public/analytics.php) */
.analytics-filters { display: flex; gap: .5rem; margin: 1.2rem 0 1.6rem; flex-wrap: wrap; }
.analytics-filters a {
  padding: .45rem .95rem; border-radius: 999px; border: 1px solid var(--border);
  font-size: .82rem; font-weight: 700; color: var(--text-muted); text-decoration: none; background: var(--surface);
}
.analytics-filters a.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.analytics-filters a:hover:not(.active) { border-color: var(--primary); color: var(--primary); }

.stat-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.6rem; }
@media (max-width: 700px) { .stat-tiles { grid-template-columns: repeat(2, 1fr); } }
.stat-tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.2rem; }
.stat-tile .value { font-size: 1.65rem; font-weight: 800; color: var(--text); }
.stat-tile .label { font-size: .8rem; color: var(--text-muted); margin-top: .3rem; }

.chart-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem 1.5rem; margin-bottom: 1.5rem; }
.chart-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.chart-card-head h2 { font-size: 1.02rem; margin: 0; font-weight: 800; }
.chart-card-head .sub { font-size: .78rem; color: var(--text-faint); }

.volume-chart { display: flex; align-items: flex-end; gap: 3px; height: 150px; }
.volume-bar-col { flex: 1; min-width: 2px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.volume-bar-fill { width: 100%; max-width: 20px; background: var(--primary); border-radius: 4px 4px 0 0; min-height: 2px; }
.volume-bar-fill.is-peak { background: var(--primary-dark); }
.volume-axis { display: flex; gap: 3px; margin-top: .5rem; border-top: 1px solid var(--border); padding-top: .4rem; }
.volume-axis-tick { flex: 1; min-width: 2px; font-size: .65rem; color: var(--text-faint); text-align: center; white-space: nowrap; }

.hbar-list { display: flex; flex-direction: column; gap: .65rem; }
.hbar-row { display: flex; align-items: center; gap: .7rem; }
a.hbar-row { text-decoration: none; border-radius: 8px; padding: .2rem; margin: -.2rem; }
a.hbar-row:hover { background: var(--primary-tint); }
a.hbar-row:hover .hbar-label { color: var(--primary); }
.hbar-label {
  width: 128px; flex-shrink: 0; font-size: .82rem; color: var(--text); font-weight: 600;
  display: flex; align-items: center; gap: .4rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hbar-swatch { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.hbar-label-wide { width: 240px; }
@media (max-width: 700px) { .hbar-label-wide { width: 130px; } }
.hbar-track { flex: 1; background: var(--bg); border-radius: 6px; height: 20px; overflow: hidden; }
.hbar-fill { height: 100%; border-radius: 6px; }
.hbar-value { width: 46px; text-align: end; font-size: .8rem; color: var(--text-muted); font-weight: 700; flex-shrink: 0; }

.sentiment-bar { display: flex; height: 28px; border-radius: 8px; overflow: hidden; background: var(--bg); }
.sentiment-seg { height: 100%; border-inline-end: 2px solid var(--bg); }
.sentiment-seg:last-child { border-inline-end: none; }
.sentiment-legend { display: flex; flex-wrap: wrap; gap: .5rem 1.1rem; margin-top: 1.1rem; }
.sentiment-legend-item { display: flex; align-items: center; gap: .4rem; font-size: .8rem; color: var(--text-muted); }
.sentiment-legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

.chart-table-toggle summary {
  cursor: pointer; font-size: .8rem; color: var(--primary); font-weight: 700; margin-top: 1.1rem; list-style: none;
}
.chart-table-toggle summary::-webkit-details-marker { display: none; }
.chart-table-toggle summary::before { content: '▸ '; }
.chart-table-toggle[open] summary::before { content: '▾ '; }
.data-table { width: 100%; border-collapse: collapse; margin-top: .7rem; font-size: .82rem; }
.data-table th, .data-table td { padding: .5rem .6rem; text-align: start; border-bottom: 1px solid var(--border); }
.data-table th { color: var(--text-faint); font-weight: 700; }

.empty-chart { color: var(--text-faint); font-size: .85rem; padding: 1.5rem 0; text-align: center; }

/* Trending strip (public/index.php) */
.trending-strip { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.2rem; margin: 1.2rem 0; }
.trending-head { font-size: .85rem; font-weight: 800; color: var(--text); margin-bottom: .5rem; }
.trending-items { display: flex; flex-direction: column; }
.trending-item { display: flex; align-items: center; gap: .7rem; padding: .5rem .3rem; text-decoration: none; border-radius: 8px; }
.trending-item:hover { background: var(--primary-tint); }
.trending-rank { font-size: .85rem; font-weight: 800; color: var(--text-faint); width: 22px; flex-shrink: 0; }
.trending-title { flex: 1; font-size: .88rem; color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trending-item:hover .trending-title { color: var(--primary); }
.trending-views { font-size: .76rem; color: var(--text-faint); flex-shrink: 0; white-space: nowrap; }

/* Breaking-news ticker (public/index.php) */
.breaking-ticker {
  display: flex; align-items: center; gap: .8rem;
  background: var(--breaking-bg); border: 1px solid transparent; border-radius: var(--radius);
  padding: .6rem .9rem; margin: 1rem 0;
}
.breaking-ticker-tag {
  display: flex; align-items: center; gap: .4rem; flex-shrink: 0;
  font-size: .8rem; font-weight: 800; color: var(--breaking-fg);
}
.breaking-ticker-dot-pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--breaking-fg);
  animation: breakingPulse 1.6s ease-in-out infinite;
}
@keyframes breakingPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .4; transform: scale(.7); }
}
@media (prefers-reduced-motion: reduce) {
  .breaking-ticker-dot-pulse { animation: none; }
}
.breaking-ticker-viewport { flex: 1; min-width: 0; position: relative; height: 1.4rem; }
.breaking-ticker-item {
  position: absolute; inset: 0; display: none; align-items: center; gap: .5rem;
  text-decoration: none; overflow: hidden; white-space: nowrap;
}
.breaking-ticker-item.is-active { display: flex; }
.breaking-ticker-country { font-size: .78rem; font-weight: 800; flex-shrink: 0; }
.breaking-ticker-title {
  flex: 1; font-size: .85rem; color: var(--text); font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
.breaking-ticker-item:hover .breaking-ticker-title { color: var(--breaking-fg); }
.breaking-ticker-time { font-size: .74rem; color: var(--text-faint); flex-shrink: 0; white-space: nowrap; }
.breaking-ticker-nav { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
.breaking-ticker-btn {
  width: 22px; height: 22px; display: flex; align-items: center; justify-content: center;
  border: none; background: transparent; color: var(--breaking-fg); font-weight: 800;
  font-size: 1rem; cursor: pointer; border-radius: 6px; line-height: 1; padding: 0;
}
.breaking-ticker-btn:hover { background: rgba(255,255,255,.18); }
.breaking-ticker-dots { display: flex; align-items: center; gap: .3rem; }
.breaking-ticker-dotnav { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,.45); }
.breaking-ticker-dotnav.is-active { background: var(--breaking-fg); }
@media (max-width: 600px) {
  .breaking-ticker { flex-wrap: wrap; }
  .breaking-ticker-viewport { flex-basis: 100%; order: 3; }
}

/* Digest list/calendar toggle + calendar grid (public/digest.php) */
.digest-view-toggle { display: flex; gap: .5rem; margin: 1rem 0 1.3rem; }
.digest-view-toggle a {
  padding: .45rem .9rem; border-radius: 999px; border: 1px solid var(--border);
  font-size: .82rem; font-weight: 700; color: var(--text-muted); text-decoration: none; background: var(--surface);
}
.digest-view-toggle a.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.digest-view-toggle a:hover:not(.active) { border-color: var(--primary); color: var(--primary); }

.calendar-back {
  display: inline-block; margin-bottom: 1rem; font-size: .85rem; font-weight: 700;
  color: var(--primary); text-decoration: none;
}
.calendar-back:hover { text-decoration: underline; }

.calendar-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.3rem 1.4rem; }
.calendar-nav { display: flex; align-items: center; justify-content: center; gap: 1.2rem; margin-bottom: 1.1rem; }
.calendar-nav a {
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  border-radius: 8px; border: 1px solid var(--border); color: var(--text-muted); text-decoration: none; font-weight: 800;
}
.calendar-nav a:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-tint); }
.calendar-month-label { font-size: .95rem; font-weight: 800; color: var(--text); min-width: 5.5rem; text-align: center; }

.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.calendar-weekday { text-align: center; font-size: .72rem; font-weight: 700; color: var(--text-faint); padding-bottom: .5rem; }
.calendar-cell {
  aspect-ratio: 1 / 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  border-radius: 8px; background: var(--bg); font-size: .82rem; color: var(--text-muted); text-decoration: none; gap: .25rem;
}
.calendar-cell.empty { background: transparent; }
.calendar-cell.has-digest { background: var(--surface); border: 1px solid var(--border); color: var(--text); font-weight: 700; }
.calendar-cell.has-digest:hover { border-color: var(--primary); background: var(--primary-tint); color: var(--primary); }
.calendar-dot { width: 6px; height: 6px; border-radius: 50%; }

@media (max-width: 700px) {
  .calendar-cell { font-size: .74rem; }
  .calendar-weekday { font-size: .64rem; }
}

/* =================================================================
   New features: stories, trends, ask, map, PWA
   ================================================================= */
.badge.sources-badge { background: var(--primary-tint); color: var(--primary); }
.muted-note { font-size: .8rem; color: var(--text-faint); margin: .6rem 0 1rem; }
.section-title { font-size: 1.1rem; margin: 1.6rem 0 .8rem; }
.wrap-wide { max-width: 1100px; }
header.site .cats a.nav-ask { color: var(--primary); font-weight: 700; }

/* Trend alerts */
.trend-alerts { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .9rem 1rem; margin: 1rem 0; }
.trend-alerts-head { font-weight: 800; font-size: .95rem; margin-bottom: .6rem; }
.trend-alerts-items { display: flex; flex-wrap: wrap; gap: .5rem; }
.trend-chip { display: inline-flex; align-items: center; gap: .45rem; text-decoration: none; background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: .35rem .75rem; font-size: .82rem; }
.trend-chip:hover { border-color: var(--primary); }
.trend-name { font-weight: 700; }
.trend-up { color: var(--up); font-weight: 800; font-size: .76rem; }
.trend-count { color: var(--text-faint); font-size: .72rem; }

/* Developing stories */
.developing { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .9rem 1rem; margin: 1rem 0; }
.developing-head { font-weight: 800; font-size: .95rem; margin-bottom: .4rem; }
.developing-item { display: flex; align-items: center; gap: .6rem; padding: .55rem 0; border-top: 1px solid var(--border); text-decoration: none; }
.developing-item:first-of-type { border-top: 0; }
.developing-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.developing-title { flex: 1; font-weight: 600; font-size: .92rem; line-height: 1.6; }
.developing-item:hover .developing-title { color: var(--primary); }
.developing-meta { color: var(--text-faint); font-size: .75rem; white-space: nowrap; }

/* Article page: other sources */
.story-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; margin: 1.5rem 0; }
.story-box-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.story-box-head h3 { margin: 0; font-size: 1rem; }
.story-box-list { list-style: none; margin: .8rem 0; padding: 0; }
.story-box-list li a { display: grid; grid-template-columns: auto 1fr auto; gap: .6rem; align-items: baseline; padding: .5rem 0; border-top: 1px solid var(--border); text-decoration: none; font-size: .88rem; }
.story-box-source { font-weight: 700; color: var(--primary); white-space: nowrap; }
.story-box-title { line-height: 1.6; }
.story-box-list li a:hover .story-box-title { color: var(--primary); }
.story-box-time { color: var(--text-faint); font-size: .75rem; white-space: nowrap; }
.story-box-more { display: inline-block; font-weight: 700; color: var(--primary); text-decoration: none; font-size: .88rem; }
@media (max-width: 600px) { .story-box-list li a { grid-template-columns: 1fr; gap: .15rem; } }

/* Story page */
.story-header { background: #111827; color: #fff; border-radius: var(--radius); padding: 1.6rem 1.4rem; margin: 1rem 0; background-size: cover; background-position: center; }
.story-header h1 { font-size: 1.5rem; line-height: 1.5; margin: .5rem 0; }
.story-header p { color: #e5e7eb; line-height: 1.8; margin: 0; }
.story-header-meta { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; font-size: .8rem; color: #d1d5db; }
.story-status { background: var(--featured-bg); color: var(--featured-fg); border-radius: 10px; padding: .75rem 1rem; font-size: .92rem; line-height: 1.7; }
.timeline { list-style: none; margin: 0; padding: 0; border-inline-start: 2px solid var(--primary-tint); }
.timeline li { position: relative; padding: 0 1.2rem 1.1rem; }
.timeline li::before { content: ''; position: absolute; inset-inline-start: -7px; top: .35rem; width: 12px; height: 12px; border-radius: 50%; background: var(--primary); border: 2px solid var(--surface); }
.timeline-time { display: block; font-size: .75rem; color: var(--text-faint); margin-bottom: .2rem; }
.timeline-text { line-height: 1.8; }
.story-sources { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1rem 0; }
.story-sources span { background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: .2rem .7rem; font-size: .78rem; }
.story-day { font-weight: 800; font-size: .85rem; color: var(--text-muted); margin: 1.2rem 0 .5rem; }
.story-coverage { display: grid; gap: .6rem; }
.story-coverage-item { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: .8rem 1rem; text-decoration: none; }
.story-coverage-item:hover { border-color: var(--primary); }
.story-coverage-meta { display: flex; gap: .5rem; align-items: center; font-size: .78rem; color: var(--text-faint); }
.story-coverage-meta strong { color: var(--primary); }
.story-coverage-title { font-weight: 700; margin: .3rem 0; line-height: 1.6; }
.story-coverage-summary { font-size: .86rem; color: var(--text-muted); line-height: 1.7; }

/* Ask the news */
.ask-form { display: flex; gap: .6rem; align-items: stretch; margin: 1rem 0; }
.ask-form textarea { flex: 1; resize: vertical; min-height: 56px; border: 1px solid var(--border); border-radius: 12px; padding: .8rem 1rem; font: inherit; font-size: 1rem; background: var(--surface); }
.ask-form textarea:focus { outline: 2px solid var(--primary-tint); border-color: var(--primary); }
.ask-form button { border: 0; border-radius: 12px; padding: 0 1.4rem; background: var(--primary); color: #fff; font: inherit; font-weight: 800; cursor: pointer; }
.ask-form button:disabled { opacity: .7; cursor: wait; }
.ask-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.ask-examples { display: flex; flex-wrap: wrap; gap: .5rem; }
.ask-example { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: .4rem .9rem; font: inherit; font-size: .85rem; cursor: pointer; }
.ask-example:hover { border-color: var(--primary); color: var(--primary); }
.ask-error { background: var(--breaking-bg); color: var(--breaking-fg); border-radius: 10px; padding: .8rem 1rem; }
.ask-answer { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.2rem; margin-top: 1rem; }
.ask-answer-head { font-weight: 800; margin-bottom: .5rem; }
.ask-answer-body { line-height: 1.95; font-size: 1rem; }
.ask-answer-body a.cite { display: inline-block; min-width: 1.35em; text-align: center; font-size: .72rem; font-weight: 800; background: var(--primary-tint); color: var(--primary); border-radius: 6px; padding: 0 .3em; margin: 0 .1em; text-decoration: none; vertical-align: super; line-height: 1.5; }
.ask-sources { padding-inline-start: 1.4rem; }
.ask-sources li { margin-bottom: .6rem; line-height: 1.6; }
.ask-sources li:target { background: var(--featured-bg); border-radius: 6px; }
.ask-sources a { font-weight: 600; text-decoration: none; }
.ask-sources a:hover { color: var(--primary); }
.ask-src-meta { display: block; font-size: .75rem; color: var(--text-faint); }
@media (max-width: 600px) { .ask-form { flex-direction: column; } .ask-form button { padding: .8rem; } }

/* Map */
.map-head { display: flex; align-items: baseline; justify-content: space-between; margin-top: 1rem; }
.map-head h1 { font-size: 1.3rem; margin: 0; }
.news-map { height: 70vh; min-height: 420px; border-radius: var(--radius); border: 1px solid var(--border); margin-top: .8rem; z-index: 1; }
.map-pop { font-family: 'Tajawal', sans-serif; direction: rtl; text-align: right; }
html[dir="ltr"] .map-pop { direction: ltr; text-align: left; }
.map-pop-meta { font-size: .72rem; color: #6b7280; margin-bottom: .25rem; }
.map-pop-title { display: block; font-weight: 700; font-size: .9rem; line-height: 1.5; color: #111827 !important; text-decoration: none; }
.map-pop-title:hover { color: #2452e8 !important; }
.map-pop-src { font-size: .72rem; color: #9ca3af; margin-top: .3rem; }

/* PWA install button */
.pwa-install { display: block; margin: .8rem auto 0; border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: .45rem 1rem; font: inherit; font-size: .85rem; cursor: pointer; }
.pwa-install[hidden] { display: none; }

/* =================================================================
   Redesign — layout & components
   Principle: time is the organizing element (a live news desk).
   One bold element (the red live bar); everything else quiet.
   ================================================================= */
body { background: var(--paper); color: var(--ink); -webkit-font-smoothing: antialiased; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px;
}
.wrap-wide { max-width: 1200px; }
.hd-inner { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
img { color: transparent; } /* no alt-text flash on broken external images */

/* ---- Header ---- */
.hd { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.hd-top { display: flex; align-items: center; gap: 1rem; height: 60px; }
.logo { font-weight: 800; font-size: 1.2rem; display: flex; align-items: center; gap: .5rem; text-decoration: none; color: var(--ink); white-space: nowrap; }
.logo i { width: 10px; height: 10px; border-radius: 50%; background: var(--alert); box-shadow: 0 0 0 4px var(--alert-soft); }
.hd-nav { display: flex; gap: 1.25rem; margin-inline-start: 1.2rem; font-size: .88rem; }
.hd-nav a { color: var(--muted); text-decoration: none; white-space: nowrap; }
.hd-nav a.on { color: var(--ink); font-weight: 700; }
.hd-nav a:hover { color: var(--brand); }
.hd-tools { margin-inline-start: auto; display: flex; gap: .4rem; align-items: center; }
.icon-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); display: grid; place-items: center; cursor: pointer; padding: 0; text-decoration: none; }
.icon-btn:hover { border-color: var(--brand); color: var(--brand); }
.icon-btn svg, .hd-search svg, .tabbar svg, .ico { width: 18px; height: 18px; flex-shrink: 0; }
.hd-search { display: flex; align-items: center; gap: .5rem; border: 1px solid var(--line); border-radius: 999px; padding: 0 .4rem 0 .9rem; height: 38px; width: 250px; background: var(--paper); color: var(--faint); }
html[dir="rtl"] .hd-search { padding: 0 .9rem 0 .4rem; }
.hd-search input { border: 0; background: transparent; outline: none; flex: 1; min-width: 0; font: inherit; font-size: .85rem; color: var(--ink); }
.hd-search:focus-within { border-color: var(--brand); }
.hd-lang { font-size: .8rem; font-weight: 700; padding: 0 .55rem; height: 38px; display: grid; place-items: center; color: var(--muted); text-decoration: none; }
.hd-lang:hover { color: var(--brand); }
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: none; }
}

.hd-row2 { display: flex; align-items: center; gap: .35rem; overflow-x: auto; padding: .5rem 0 .65rem; scrollbar-width: none; }
.hd-row2::-webkit-scrollbar { display: none; }
.chip { flex-shrink: 0; font-size: .82rem; padding: .3rem .85rem; border-radius: 999px; color: var(--muted); border: 1px solid transparent; text-decoration: none; white-space: nowrap; }
.chip.on { background: var(--ink); color: var(--surface); }
.chip:not(.on):hover { border-color: var(--line); color: var(--ink); }
.chip b { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-inline-end: .35rem; vertical-align: middle; }
.hd-sep { flex-shrink: 0; width: 1px; height: 18px; background: var(--line); margin: 0 .35rem; }
.chip.sect { color: var(--ink-2); }
.chip.sect.on { background: var(--brand-soft); color: var(--brand); }

/* ---- Live breaking bar (restyles the existing ticker markup) ---- */
.breaking-ticker { background: var(--alert); border: 0; border-radius: var(--r-sm); color: #fff; padding: .55rem .9rem; }
.breaking-ticker-tag, .breaking-ticker-btn, .breaking-ticker-country { color: #fff !important; }
.breaking-ticker-dot-pulse { background: #fff; }
.breaking-ticker-title { color: #fff; font-size: .92rem; }
.breaking-ticker-item:hover .breaking-ticker-title { color: #fff; text-decoration: underline; }
.breaking-ticker-time { color: rgba(255,255,255,.85); }
.breaking-ticker-country { opacity: .85; }
.breaking-ticker-dotnav.is-active { background: #fff; }

/* ---- Shared meta line ---- */
.meta-line { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .8rem; font-size: .78rem; color: var(--faint); }
.meta-line .src { color: var(--ink); font-weight: 700; }
.meta-line .brk { color: var(--alert); font-weight: 800; }
.meta-line .feat { color: var(--warn); font-weight: 800; }
.meta-line .cat { font-weight: 700; }
.src-count { display: inline-flex; align-items: center; gap: .3rem; color: var(--brand); font-weight: 700; }
.src-count .stack { display: inline-flex; }
.src-count .stack i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--surface); background: var(--brand-soft); margin-inline-start: -5px; }
.src-count .stack i:first-child { margin-inline-start: 0; }
.src-count .stack i:nth-child(2) { background: color-mix(in srgb, var(--brand) 35%, var(--surface)); }
.src-count .stack i:nth-child(3) { background: color-mix(in srgb, var(--brand) 65%, var(--surface)); }

/* ---- Front block: lead + secondary ---- */
.front { display: grid; grid-template-columns: 1.65fr 1fr; gap: 1.6rem; margin: 1.1rem 0 2.2rem; }
.front > *, .cols > * { min-width: 0; }
.lead { display: block; text-decoration: none; color: var(--ink); }
.lead-img { aspect-ratio: 16/9; border-radius: var(--r-lg); overflow: hidden; background: var(--line-2); }
.lead-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lead h1 { font-size: 1.85rem; line-height: 1.5; margin: .9rem 0 .5rem; font-weight: 800; }
.lead:hover h1 { color: var(--brand); }
.lead p { font-family: var(--f-body); font-size: 1.1rem; line-height: 1.85; color: var(--muted); margin: 0 0 .7rem; max-width: 62ch; }
.secondary { display: flex; flex-direction: column; }
.sec { display: grid; grid-template-columns: 1fr 100px; gap: .9rem; padding: 1rem 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.sec:first-child { padding-top: 0; }
.sec:last-child { border-bottom: 0; }
.sec.noimg { grid-template-columns: 1fr; }
.sec h3 { font-size: 1rem; line-height: 1.65; margin: 0 0 .4rem; font-weight: 700; }
.sec:hover h3 { color: var(--brand); }
.thumb { border-radius: var(--r-sm); overflow: hidden; background: var(--line-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sec .thumb { width: 100px; height: 75px; }

/* ---- Main column + sidebar ---- */
.cols { display: grid; grid-template-columns: 1.65fr 1fr; gap: 1.6rem; align-items: start; }
.sect-h { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0 0 .2rem; padding-bottom: .6rem; border-bottom: 2px solid var(--ink); flex-wrap: wrap; }
.sect-h h2 { font-size: 1.1rem; margin: 0; font-weight: 800; }
.sect-h .count { font-size: .78rem; color: var(--faint); font-weight: 400; margin-inline-start: .4rem; }
.seg { display: inline-flex; gap: .15rem; background: var(--line-2); border-radius: 999px; padding: .2rem; }
.seg a { font-size: .78rem; padding: .25rem .7rem; border-radius: 999px; color: var(--muted); text-decoration: none; white-space: nowrap; }
.seg a.on { background: var(--surface); color: var(--ink); font-weight: 700; box-shadow: 0 1px 2px rgba(0,0,0,.08); }

/* The river — time is the organizing element */
.river { list-style: none; margin: 0; padding: 0; }
.river > li { display: grid; grid-template-columns: 58px 1fr 124px; gap: 1rem; padding: 1.05rem 0; border-bottom: 1px solid var(--line); }
.river > li.noimg { grid-template-columns: 58px 1fr; }
.river .time { font-size: .98rem; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; padding-top: .15rem; line-height: 1.3; }
.river .time small { display: block; font-size: .68rem; font-weight: 500; color: var(--faint); margin-top: .15rem; }
.river .time small b { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-inline-end: .25rem; vertical-align: middle; }
.river-body { text-decoration: none; color: var(--ink); display: block; min-width: 0; }
.river h3 { font-size: 1.05rem; line-height: 1.65; margin: 0 0 .3rem; font-weight: 700; }
.river-body:hover h3 { color: var(--brand); }
.river p { font-family: var(--f-body); font-size: .98rem; line-height: 1.8; color: var(--muted); margin: 0 0 .45rem; }
.river .thumb { width: 124px; height: 88px; display: block; }
.river mark { padding: 0 .1em; }

.more-btn { display: block; text-align: center; margin: 1.3rem 0 .5rem; padding: .8rem; border: 1px solid var(--line); border-radius: 999px; font-weight: 700; font-size: .9rem; background: var(--surface); color: var(--ink); text-decoration: none; }
.more-btn:hover { border-color: var(--brand); color: var(--brand); }

/* Sidebar */
.side { display: flex; flex-direction: column; gap: 1.7rem; position: sticky; top: 130px; }
.side-box h2 { font-size: .95rem; font-weight: 800; margin: 0 0 .6rem; display: flex; align-items: center; gap: .45rem; }
.side-box h2 .ico { color: var(--up); }
.trend-row { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .6rem 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.trend-row:last-child { border-bottom: 0; }
.trend-row .name { font-weight: 700; font-size: .92rem; display: block; }
.trend-row .n { font-size: .74rem; color: var(--faint); }
.trend-row .up { color: var(--up); font-weight: 800; font-size: .84rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.trend-row:hover .name { color: var(--brand); }
.dev-row { display: block; padding: .75rem .9rem; border-inline-start: 3px solid var(--c, var(--brand)); background: var(--surface); margin-bottom: .55rem; text-decoration: none; color: var(--ink); border-start-end-radius: var(--r-sm); border-end-end-radius: var(--r-sm); }
.dev-row h3 { font-size: .92rem; line-height: 1.6; margin: 0 0 .25rem; font-weight: 700; }
.dev-row:hover h3 { color: var(--brand); }
.ranked { list-style: none; counter-reset: r; margin: 0; padding: 0; }
.ranked li { counter-increment: r; display: grid; grid-template-columns: 30px 1fr; gap: .4rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.ranked li:last-child { border-bottom: 0; }
.ranked li::before { content: counter(r); font-size: 1.35rem; font-weight: 800; color: var(--faint); opacity: .45; line-height: 1.25; }
.ranked a { font-size: .9rem; line-height: 1.6; font-weight: 600; color: var(--ink); text-decoration: none; }
.ranked a:hover { color: var(--brand); }
.ask-cta { display: block; background: var(--ink); color: var(--surface); border-radius: var(--r-lg); padding: 1.1rem 1.2rem; text-decoration: none; }
.ask-cta b { display: block; font-size: 1rem; margin-bottom: .25rem; }
.ask-cta span { font-size: .86rem; opacity: .8; font-family: var(--f-body); line-height: 1.7; }
.ask-cta .fake { display: block; margin-top: .8rem; background: color-mix(in srgb, var(--surface) 14%, transparent); border-radius: 999px; padding: .55rem .9rem; font-size: .82rem; opacity: .9; font-family: var(--f-head); }
.ask-cta:hover .fake { background: color-mix(in srgb, var(--surface) 22%, transparent); }

/* Filters inside the main column */
.filters-toggle { display: inline-flex !important; width: auto !important; margin: .9rem 0 0 !important; align-items: center; gap: .4rem; padding: .45rem .9rem !important; border-radius: 999px !important; font-size: .82rem !important; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; font-family: inherit; font-weight: 700; }
.filters { display: none; grid-template-columns: repeat(3, 1fr); }
.filters.open { display: grid; }
.filters .apply { grid-column: 1 / -1; }

/* ---- Article page ---- */
.article-title { font-size: 1.9rem; line-height: 1.55; }
.article-summary { font-family: var(--f-body); font-size: 1.12rem; line-height: 2; background: transparent; border: 0; border-inline-start: 3px solid var(--brand); border-radius: 0; padding: .2rem 1.1rem; }
.article-body { font-family: var(--f-body); font-size: 1.1rem; line-height: 2.05; color: var(--ink-2); max-width: 68ch; }
.points li { font-family: var(--f-body); font-size: 1.02rem; }
.source-link { display: inline-flex; align-items: center; gap: .4rem; background: var(--brand); color: #fff !important; padding: .7rem 1.2rem; border-radius: 999px; text-decoration: none !important; }
.source-link:hover { background: var(--brand-strong); }
.share { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; margin: 1rem 0 .4rem; }
.share span { font-size: .8rem; color: var(--faint); margin-inline-end: .2rem; }
.share a, .share button { display: inline-flex; align-items: center; gap: .35rem; font: inherit; font-size: .8rem; font-weight: 700; padding: .4rem .8rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; cursor: pointer; }
.share a:hover, .share button:hover { border-color: var(--brand); color: var(--brand); }
.share .wa:hover { border-color: #25d366; color: #128c4a; }
.share svg { width: 15px; height: 15px; }

/* ---- Readable body text on the other pages ---- */
.digest-card p, .assessment-section p, .timeline-summary, .story-coverage-summary, .ask-answer-body, .timeline-text {
  font-family: var(--f-body);
}
.digest-card p, .assessment-section p { font-size: 1.02rem; line-height: 2; }

/* ---- Footer + mobile tab bar ---- */
footer.site { margin-top: 2.5rem; }
.ft-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.2rem; margin-bottom: .8rem; }
.ft-links a { color: var(--muted); text-decoration: none; font-size: .82rem; }
.ft-links a:hover { color: var(--brand); }
.tabbar { display: none; }
.more-sheet { position: fixed; inset: 0; z-index: 60; display: none; }
.more-sheet.open { display: block; }
.more-sheet .scrim { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.more-sheet .panel { position: absolute; inset-inline: 0; bottom: 0; background: var(--surface); border-radius: 18px 18px 0 0; padding: .8rem 1rem calc(1rem + env(safe-area-inset-bottom)); }
.more-sheet .grab { width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 0 auto .8rem; }
.more-sheet a, .more-sheet button.row { display: flex; align-items: center; gap: .8rem; width: 100%; padding: .85rem .3rem; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); font: inherit; font-size: .95rem; text-decoration: none; cursor: pointer; text-align: start; }
.more-sheet a:last-child { border-bottom: 0; }
.more-sheet svg { width: 20px; height: 20px; color: var(--muted); }

/* ---- Responsive ---- */
.m-only { display: none; }
@media (max-width: 900px) {
  .hd-nav, .hd-search { display: none; }
  .hd-top { height: 54px; gap: .5rem; }
  .front, .cols { grid-template-columns: 1fr; }
  .front { gap: 0; margin: .6rem 0 1.4rem; }
  .lead-img { border-radius: 0; margin: 0 -1rem; }
  .lead h1 { font-size: 1.38rem; }
  .lead p { font-size: 1.02rem; }
  .secondary { margin-top: 1rem; border-top: 1px solid var(--line); padding-top: 1rem; }
  .sec { grid-template-columns: 1fr 88px; }
  .sec .thumb { width: 88px; height: 66px; }
  .river > li { grid-template-columns: 46px 1fr 88px; gap: .75rem; }
  .river > li.noimg { grid-template-columns: 46px 1fr; }
  .river .thumb { width: 88px; height: 66px; }
  .river p { display: none; }
  .river h3 { font-size: .98rem; }
  .side { position: static; order: -1; gap: 0; }
  .side .m-hide { display: none; }
  .m-only { display: block; margin-top: 1.8rem; }
  .trends-scroll { display: flex; gap: .5rem; overflow-x: auto; scrollbar-width: none; padding-bottom: 1.2rem; }
  .trends-scroll::-webkit-scrollbar { display: none; }
  .trends-scroll .trend-row { flex-shrink: 0; border: 1px solid var(--line); border-radius: 999px; padding: .4rem .85rem; background: var(--surface); gap: .5rem; }
  .trends-scroll .trend-row .n, .trends-scroll .spark { display: none; }
  .trends-scroll .trend-row .name { display: inline; font-size: .85rem; }
  .side-box h2 { margin-bottom: .5rem; }
  .article-title { font-size: 1.45rem; }
  .filters { grid-template-columns: 1fr 1fr; }

  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; bottom: 0; inset-inline: 0; z-index: 50;
            background: var(--surface); border-top: 1px solid var(--line); padding: .3rem 0 calc(.3rem + env(safe-area-inset-bottom)); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; gap: .15rem; font: inherit; font-size: .68rem; color: var(--faint); padding: .3rem 0; background: none; border: 0; text-decoration: none; cursor: pointer; }
  .tabbar .on { color: var(--brand); font-weight: 700; }
  .tabbar svg { width: 22px; height: 22px; }
}
@media (max-width: 420px) { .filters { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { * { animation-duration: 0s !important; transition-duration: 0s !important; } }
.m-only-inline { display: none !important; }
@media (max-width: 900px) { .m-only-inline { display: grid !important; } }
.badge { white-space: nowrap; }
.article-title-en { unicode-bidi: plaintext; text-align: start; }
@media (max-width: 600px) {
  .breaking-ticker { flex-wrap: nowrap; padding: .55rem .8rem; }
  .breaking-ticker-viewport { flex-basis: auto; order: 0; }
  .breaking-ticker-nav, .breaking-ticker-country { display: none; }
}

/* =================================================================
   Digest + assessment pages
   ================================================================= */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin: 1.6rem 0 1rem; flex-wrap: wrap; }
.page-head h1 { font-size: 1.7rem; margin: 0 0 .25rem; font-weight: 800; }
.page-head p { margin: 0; color: var(--muted); font-family: var(--f-body); font-size: 1.02rem; }
.next-update { display: inline-flex; align-items: center; gap: .45rem; font-size: .82rem; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: .4rem .85rem; }
.next-update b { color: var(--ink); font-variant-numeric: tabular-nums; }
.next-update .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--up); animation: pulse2 2s infinite; }
@keyframes pulse2 { 0%,100% { opacity: 1 } 50% { opacity: .3 } }
.page-bar { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; padding-bottom: .9rem; margin-bottom: 1.4rem; border-bottom: 1px solid var(--line); }
.chips-row { display: flex; align-items: center; gap: .35rem; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.chips-row::-webkit-scrollbar { display: none; }
.chips-row .chip { border-color: var(--line); background: var(--surface); }
.chips-row .chip.on { border-color: var(--ink); }
.chip .ico { width: 14px; height: 14px; vertical-align: -2px; }

/* Overview grid (one card per country) */
.overview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1rem; }
.ov-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--c); border-radius: var(--r-lg); padding: 1.1rem 1.2rem 1rem; text-decoration: none; color: var(--ink); }
.ov-card:hover { border-color: var(--c); }
.ov-card h2 { font-size: 1.12rem; line-height: 1.6; margin: .5rem 0 .45rem; font-weight: 800; }
.ov-card p { font-family: var(--f-body); font-size: 1rem; line-height: 1.9; color: var(--muted); margin: 0 0 .8rem; flex: 1; }
.ov-more { display: inline-flex; align-items: center; gap: .35rem; font-size: .84rem; font-weight: 700; color: var(--brand); }
.ov-more .ico { width: 14px; height: 14px; }

/* Shared "document" reading block */
.doc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.6rem 1.8rem; margin-bottom: 1.2rem; }
.doc-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1rem; font-size: .8rem; color: var(--faint); }
.doc-country { display: inline-flex; align-items: center; gap: .4rem; font-weight: 800; color: var(--ink); }
.doc-country b { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.doc-title { font-size: 1.55rem; line-height: 1.55; margin: .6rem 0 1rem; font-weight: 800; }
.doc-body p { font-family: var(--f-body); font-size: 1.12rem; line-height: 2.05; color: var(--ink-2); margin: 0 0 1rem; max-width: 70ch; }
.doc-body p:first-child::first-line { color: var(--ink); }
.doc-period { font-size: .78rem; color: var(--faint); margin-top: .4rem; }
.doc-actions { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.doc-actions a, .doc-actions .copy-text-btn { display: inline-flex; align-items: center; gap: .3rem; font: inherit; font-size: .8rem; font-weight: 700; padding: .4rem .85rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; cursor: pointer; }
.doc-actions a:hover, .doc-actions .copy-text-btn:hover { border-color: var(--brand); color: var(--brand); background: var(--surface); }
.doc-actions .wa:hover { border-color: #25d366; color: #128c4a; }

/* Digest: latest + archive side by side */
.reading-cols { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 1.6rem; align-items: start; }
.archive { position: sticky; top: 130px; }
.archive h2 { font-size: 1rem; font-weight: 800; margin: 0 0 .4rem; padding-bottom: .6rem; border-bottom: 2px solid var(--ink); }
.archive-day { font-size: .78rem; font-weight: 800; color: var(--faint); margin: 1rem 0 .2rem; }
.archive-item { border-bottom: 1px solid var(--line); }
.archive-item summary { display: grid; grid-template-columns: 48px 1fr; gap: .6rem; padding: .65rem 0; cursor: pointer; list-style: none; }
.archive-item summary::-webkit-details-marker { display: none; }
.archive-time { font-weight: 800; font-variant-numeric: tabular-nums; font-size: .9rem; }
.archive-title { font-size: .92rem; font-weight: 600; line-height: 1.6; }
.archive-item summary:hover .archive-title, .archive-item[open] .archive-title { color: var(--brand); }
.archive-body { padding: 0 0 1rem; }
.archive-body p { font-family: var(--f-body); font-size: 1rem; line-height: 1.95; color: var(--ink-2); margin: 0 0 .7rem; }
.back-link { display: inline-block; margin-bottom: 1rem; color: var(--brand); font-weight: 700; text-decoration: none; font-size: .9rem; }

/* Assessment: bottom line first, section index on the side */
.assess-layout { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 1.6rem; align-items: start; max-width: 1000px; }
.assess-toc { position: sticky; top: 130px; display: flex; flex-direction: column; gap: .15rem; border-inline-start: 2px solid var(--line); }
.assess-toc a { padding: .4rem .9rem; font-size: .86rem; color: var(--muted); text-decoration: none; margin-inline-start: -2px; border-inline-start: 2px solid transparent; }
.assess-toc a:hover { color: var(--ink); border-color: var(--ink); }
.assess-doc { padding: 1.8rem 2rem; }
.bottom-line { background: var(--brand-soft); border-radius: var(--r-sm); padding: 1.1rem 1.3rem; margin: 0 0 1.6rem; scroll-margin-top: 130px; }
.bottom-line h3 { margin: 0 0 .4rem; font-size: .9rem; font-weight: 800; color: var(--brand); }
.bottom-line p { font-family: var(--f-body); font-size: 1.16rem; line-height: 2; color: var(--ink); margin: 0 0 .5rem; font-weight: 500; }
.bottom-line p:last-child { margin-bottom: 0; }
.doc-section { margin-bottom: 1.4rem; scroll-margin-top: 130px; }
.doc-section h3 { font-size: 1.05rem; font-weight: 800; margin: 0 0 .6rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.doc-section:first-of-type h3 { border-top: 0; padding-top: 0; }
.assess-archive { max-width: 1000px; margin-top: 2rem; }
.assess-row { display: grid; grid-template-columns: 110px 1fr; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.assess-date { font-weight: 800; font-variant-numeric: tabular-nums; font-size: .9rem; color: var(--muted); }
.assess-title { display: block; font-weight: 700; font-size: 1rem; line-height: 1.6; margin-bottom: .25rem; }
.assess-row:hover .assess-title { color: var(--brand); }
.assess-sum { display: block; font-family: var(--f-body); color: var(--muted); font-size: .96rem; line-height: 1.8; }

@media (max-width: 900px) {
  .page-head h1 { font-size: 1.4rem; }
  .overview-grid { grid-template-columns: 1fr; }
  .reading-cols, .assess-layout { grid-template-columns: 1fr; }
  .archive, .assess-toc { position: static; }
  .assess-toc { flex-direction: row; overflow-x: auto; border-inline-start: 0; border-bottom: 1px solid var(--line); gap: 0; scrollbar-width: none; }
  .assess-toc a { white-space: nowrap; border-inline-start: 0; border-bottom: 2px solid transparent; margin: 0 0 -1px; }
  .assess-toc a:hover { border-color: var(--ink); }
  .doc, .assess-doc { padding: 1.2rem 1.1rem; border-radius: 0; margin-inline: -1rem; border-inline: 0; }
  .doc-title { font-size: 1.3rem; }
  .doc-body p, .bottom-line p { font-size: 1.06rem; }
  .assess-row { grid-template-columns: 1fr; gap: .2rem; }
}
.chips-row .chip.on { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.assess-layout { grid-template-columns: 150px minmax(0, 1fr) 300px; max-width: none; }
.assess-side { position: sticky; top: 130px; }
.assess-side .assess-row { grid-template-columns: 1fr; gap: .15rem; }
.assess-side .assess-date { font-size: .78rem; }
.assess-side .assess-title { font-size: .92rem; }
.assess-side .assess-sum { font-size: .9rem; }
@media (max-width: 1100px) { .assess-layout { grid-template-columns: 150px minmax(0, 1fr); } .assess-side { grid-column: 2; position: static; } }
@media (max-width: 900px) { .assess-layout { grid-template-columns: 1fr; } .assess-side { grid-column: auto; } }

/* Story: how the sources covered it */
.framing { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.1rem 1.3rem; }
.framing-summary { font-family: var(--f-body); font-size: 1.06rem; line-height: 1.95; margin: 0 0 .8rem; color: var(--ink); }
.framing-list { list-style: none; margin: 0; padding: 0; }
.framing-list li { display: grid; grid-template-columns: 150px 1fr; gap: 1rem; padding: .75rem 0; border-top: 1px solid var(--line); }
.framing-src { font-weight: 800; color: var(--brand); font-size: .92rem; }
.framing-angle { font-family: var(--f-body); font-size: 1rem; line-height: 1.85; color: var(--ink-2); }
@media (max-width: 600px) { .framing-list li { grid-template-columns: 1fr; gap: .15rem; } }

/* Push alerts button + toast */
.push-toggle .b-on { display: none; }
.push-toggle.on .b-on { display: block; color: var(--brand); }
.push-toggle.on .b-off { display: none; }
.more-sheet .push-toggle.on svg { color: var(--brand); }
.toast { position: fixed; inset-inline: 1rem; bottom: calc(80px + env(safe-area-inset-bottom)); margin: 0 auto; max-width: 420px; background: var(--ink); color: var(--surface); border-radius: 12px; padding: .8rem 1rem; font-size: .88rem; text-align: center; z-index: 70; opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: none; }
@media (min-width: 901px) { .toast { bottom: 1.5rem; } }

/* "أخباري" */
.follow-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.follow-chips .chip { font: inherit; font-size: .82rem; cursor: pointer; border: 1px solid var(--line); background: var(--surface); }
.follow-chips .chip.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.follow-side { gap: 1.4rem; }
.empty-follow { text-align: center; padding: 3rem 1rem; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r-lg); }
.empty-follow .ico { width: 36px; height: 36px; color: var(--brand); }
.empty-follow h2 { margin: .6rem 0 .3rem; font-size: 1.15rem; }
.empty-follow p { margin: 0; color: var(--muted); font-family: var(--f-body); }
.follow-btn { display: inline-flex; align-items: center; gap: .35rem; font: inherit; font-size: .85rem; font-weight: 700; padding: .45rem 1rem; border-radius: 999px; border: 1px solid var(--brand); background: var(--surface); color: var(--brand); cursor: pointer; }
.follow-btn.on { background: var(--brand); color: #fff; }
.follow-btn .ico { width: 15px; height: 15px; }
@media (max-width: 900px) { .follow-side { order: -1; gap: 1rem; margin-bottom: 1.2rem; } .follow-side .side-box { display: block; } }
.follow-link { display: inline-block; margin-inline-start: .6rem; font-size: .82rem; color: var(--brand); text-decoration: none; font-weight: 700; }
@media (max-width: 1150px) and (min-width: 901px) { .hd-search { width: 170px; } .hd-nav { gap: .9rem; } }

/* Report an error */
.report-box { margin: 1.4rem 0; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.report-box summary { cursor: pointer; padding: .75rem 1rem; font-size: .86rem; color: var(--muted); list-style: none; }
.report-box summary::-webkit-details-marker { display: none; }
.report-box summary:hover { color: var(--alert); }
.report-form { padding: 0 1rem 1rem; }
.report-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.report-reasons { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .7rem; }
.report-reasons label { display: inline-flex; align-items: center; gap: .35rem; font-size: .84rem; border: 1px solid var(--line); border-radius: 999px; padding: .3rem .75rem; cursor: pointer; }
.report-reasons label:has(input:checked) { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.report-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: .6rem .8rem; font: inherit; background: var(--paper); color: var(--ink); margin-bottom: .6rem; }
.report-form button { border: 0; border-radius: 999px; padding: .5rem 1.1rem; background: var(--ink); color: var(--surface); font: inherit; font-weight: 700; cursor: pointer; }
.report-done { color: var(--up); font-weight: 700; }

/* Sources disagree */
.disc-box { background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); border-radius: var(--r-lg); padding: 1.1rem 1.3rem; margin: 1.4rem 0; }
.disc-box h2 { margin: 0 0 .7rem; font-size: 1.05rem; }
.disc-item { padding: .6rem 0; border-top: 1px solid color-mix(in srgb, var(--warn) 25%, transparent); }
.disc-item:first-of-type { border-top: 0; }
.disc-topic { font-weight: 800; font-size: .92rem; margin-bottom: .3rem; }
.disc-item ul { margin: 0; padding-inline-start: 1.2rem; }
.disc-item li { font-family: var(--f-body); font-size: 1rem; line-height: 1.9; }
.disc-val { font-weight: 700; color: var(--ink); }
.disc-src { color: var(--muted); }
.disc-hint { display: block; margin: .2rem 0 .8rem; font-size: .85rem; font-weight: 700; color: var(--warn); text-decoration: none; }
.disc-hint:hover { text-decoration: underline; }

/* Live coverage */
.live-badge { display: inline-flex; align-items: center; gap: .35rem; background: var(--alert); color: #fff; font-size: .72rem; font-weight: 800; padding: .15rem .6rem; border-radius: 999px; letter-spacing: .02em; vertical-align: middle; }
.live-badge i { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: pulse 1.4s infinite; }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .25 } }
.live-banner { display: flex; align-items: center; gap: .8rem; background: var(--surface); border: 2px solid var(--alert); border-radius: var(--r-sm); padding: .65rem .9rem; margin: 1rem 0 0; text-decoration: none; color: var(--ink); }
.live-banner-title { flex: 1; min-width: 0; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-banner-meta { font-size: .78rem; color: var(--muted); white-space: nowrap; }
.live-banner:hover .live-banner-title { color: var(--alert); }
.live-feed { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--alert); border-radius: var(--r-lg); padding: 1.1rem 1.3rem; margin: 1rem 0 1.6rem; }
.live-feed.ended .live-badge { background: var(--faint); }
.live-feed.ended .live-badge i { animation: none; }
.live-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; margin-bottom: .7rem; }
.live-head h2 { margin: 0; font-size: 1.1rem; display: flex; align-items: center; gap: .5rem; }
.live-note { font-size: .78rem; color: var(--faint); }
.live-list { list-style: none; margin: .8rem 0 0; padding: 0; }
.live-list li { display: grid; grid-template-columns: 52px 1fr; gap: .8rem; padding: .9rem 0; border-top: 1px solid var(--line); }
.live-list li.is-new { animation: newItem 2.5s ease-out; }
@keyframes newItem { from { background: var(--alert-soft); } to { background: transparent; } }
.live-time { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--alert); padding-top: .1rem; }
.live-body { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: .25rem; }
.live-body strong { font-size: 1.02rem; line-height: 1.65; }
.live-body:hover strong { color: var(--brand); }
.live-sum { font-family: var(--f-body); font-size: .98rem; line-height: 1.85; color: var(--ink-2); }
.live-src { font-size: .76rem; color: var(--faint); font-weight: 700; }
.live-new { position: sticky; top: 140px; z-index: 5; display: block; margin: .4rem auto; border: 0; border-radius: 999px; background: var(--alert); color: #fff; font: inherit; font-weight: 800; font-size: .85rem; padding: .45rem 1.1rem; cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,.2); }
@media (max-width: 600px) { .live-banner-meta { display: none; } .live-list li { grid-template-columns: 44px 1fr; } }

/* "الأسبوع في 5 دقائق" */
.week { max-width: 760px; }
.week-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; margin: 1.8rem 0 .6rem; font-size: .84rem; color: var(--muted); }
.week-tag { display: inline-block; background: var(--ink); color: var(--surface); font-weight: 800; font-size: .78rem; padding: .25rem .75rem; border-radius: 999px; }
.week-title { font-size: 2rem; line-height: 1.5; margin: 0 0 .8rem; font-weight: 800; }
.week-intro { font-family: var(--f-body); font-size: 1.22rem; line-height: 2; color: var(--ink-2); margin: 0 0 1.4rem; }
.week-numbers { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .6rem; margin: 0 0 2rem; }
.week-numbers > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: .8rem .9rem; }
.week-numbers > div.wide { grid-column: span 2; }
.week-numbers b { display: block; font-size: 1.4rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.4; }
.week-numbers span { font-size: .78rem; color: var(--muted); }
.week-sec { margin: 0 0 1.8rem; padding-inline-start: 1.1rem; border-inline-start: 4px solid var(--c); }
.week-sec-head { margin-bottom: .6rem; }
.week-country { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; font-weight: 800; color: var(--c); }
.week-country b { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.week-sec h2 { font-size: 1.25rem; line-height: 1.6; margin: .2rem 0 0; font-weight: 800; }
.week-sec ul, .week-watch ul { margin: 0; padding-inline-start: 1.2rem; }
.week-sec li, .week-watch li { font-family: var(--f-body); font-size: 1.08rem; line-height: 1.95; margin-bottom: .55rem; color: var(--ink-2); }
.week-sec li a { font-family: var(--f-head); font-size: .8rem; font-weight: 700; color: var(--brand); text-decoration: none; margin-inline-start: .3rem; white-space: nowrap; }
.week-watch { background: var(--brand-soft); border-radius: var(--r-lg); padding: 1.1rem 1.3rem; margin: 2rem 0 1rem; }
.week-watch h2 { font-size: 1.05rem; margin: 0 0 .6rem; }
.week-archive { margin-top: 2.4rem; }
.week-archive h2 { font-size: 1rem; padding-bottom: .5rem; border-bottom: 2px solid var(--ink); }
.week-archive a { display: grid; grid-template-columns: 100px 1fr; gap: .8rem; padding: .7rem 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.week-archive .d { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .85rem; }
.week-archive a:hover .t { color: var(--brand); }
.week-card { display: block; background: var(--ink); color: var(--surface); border-radius: var(--r-lg); padding: 1.1rem 1.2rem; text-decoration: none; }
.week-card .week-tag { background: var(--surface); color: var(--ink); }
.week-card b { display: block; font-size: 1.05rem; line-height: 1.6; margin: .6rem 0 .5rem; }
.week-card .go { font-size: .85rem; opacity: .8; }
@media (max-width: 600px) { .week-title { font-size: 1.5rem; } .week-intro { font-size: 1.08rem; } .week-numbers > div.wide { grid-column: auto; } }

/* =================================================================
   Navigation v2: "More" dropdown, skip link, compact header, to-top
   ================================================================= */
.skip-link { position: absolute; inset-inline-start: 1rem; top: -60px; z-index: 100; background: var(--brand); color: #fff; padding: .6rem 1rem; border-radius: 8px; font-weight: 700; text-decoration: none; }
.skip-link:focus { top: .6rem; }
#main:focus { outline: none; }

.hd-nav { align-items: center; }
.hd-more { position: relative; }
.hd-more summary { list-style: none; cursor: pointer; color: var(--muted); display: inline-flex; align-items: center; gap: .2rem; white-space: nowrap; font-size: .88rem; padding: .2rem 0; }
.hd-more summary::-webkit-details-marker { display: none; }
.hd-more summary:hover, .hd-more[open] summary, .hd-more.on summary { color: var(--ink); }
.hd-more.on summary { font-weight: 700; }
.hd-more .chev { width: 14px; height: 14px; transition: transform .15s; }
.hd-more[open] .chev { transform: rotate(180deg); }
.hd-more-menu { position: absolute; top: calc(100% + .6rem); inset-inline-start: 0; min-width: 200px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.14); padding: .4rem; z-index: 40; display: flex; flex-direction: column; }
.hd-more-menu a { padding: .55rem .8rem; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: .9rem; }
.hd-more-menu a:hover { background: var(--line-2); color: var(--brand); }
.hd-more-menu a.on { color: var(--brand); font-weight: 700; }

.hd-row2 { transition: max-height .2s ease, padding .2s ease, opacity .2s ease; max-height: 60px; }
@media (max-width: 900px) {
  .hd.compact .hd-row2 { max-height: 0; padding-top: 0; padding-bottom: 0; opacity: 0; overflow: hidden; }
}

.to-top { position: fixed; inset-inline-end: 1rem; bottom: 1.5rem; z-index: 45; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); display: grid; place-items: center; cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,.12); }
.to-top .up { transform: rotate(180deg); width: 20px; height: 20px; }
.to-top:hover { color: var(--brand); border-color: var(--brand); }
@media (max-width: 900px) { .to-top { bottom: calc(76px + env(safe-area-inset-bottom)); } }

/* tab bar: bigger tap targets, labels never wrap */
.tabbar a, .tabbar button { min-height: 48px; }
.tabbar span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; padding: 0 .15rem; }
.tabbar .more-open.on { color: var(--brand); font-weight: 700; }
.more-sheet a.on { color: var(--brand); font-weight: 700; }
.hd-lang { min-width: 38px; }
@media (prefers-reduced-motion: reduce) { .hd-row2, .hd-more .chev { transition: none; } }

/* =================================================================
   Ask the news v2 (mobile-first)
   ================================================================= */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ask-page { max-width: 760px; }
.ask-hero { text-align: center; padding: 1.8rem 0 .6rem; }
.ask-hero h1 { font-size: 1.7rem; margin: .5rem 0 .3rem; }
.ask-hero p { color: var(--muted); font-family: var(--f-body); font-size: 1.05rem; margin: 0; }
.ask-form { display: flex; gap: .6rem; align-items: flex-end; margin: 1.2rem 0 .2rem; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: .5rem; box-shadow: 0 4px 16px rgba(0,0,0,.05); }
.ask-form:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.ask-form textarea { flex: 1; border: 0 !important; background: transparent !important; outline: none !important; box-shadow: none !important; resize: none; min-height: 48px; max-height: 220px; font-size: 16px; /* 16px: stops iPhone zooming in */ line-height: 1.7; padding: .55rem .6rem; font-family: var(--f-body); color: var(--ink); }
.ask-form button { display: inline-flex; align-items: center; gap: .4rem; min-height: 48px; padding: 0 1.2rem; border-radius: 12px; }
.ask-form button .ico { width: 18px; height: 18px; }
.ask-form button:disabled { opacity: .55; }
.ask-counter { text-align: end; font-size: .72rem; color: var(--faint); margin-bottom: .8rem; font-variant-numeric: tabular-nums; }
.ask-examples { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.ask-example { min-height: 40px; }
.ask-status { display: flex; align-items: center; justify-content: center; gap: .7rem; margin: 1.4rem 0; color: var(--muted); font-size: .95rem; }
.ask-spinner { width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--brand-soft); border-top-color: var(--brand); animation: askspin .8s linear infinite; }
@keyframes askspin { to { transform: rotate(360deg); } }
.ask-error { margin: 1rem 0; }
.ask-answer { margin-top: 1.4rem; }
.ask-answer-head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.ask-cached { font-size: .72rem; font-weight: 400; color: var(--faint); }
.ask-again { display: block; margin: 1.4rem auto 0; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: .6rem 1.3rem; font: inherit; font-weight: 700; cursor: pointer; min-height: 44px; }
.ask-again:hover { border-color: var(--brand); color: var(--brand); }
.ask-recent { margin-top: 2rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.ask-recent-head { display: flex; align-items: center; justify-content: space-between; }
.ask-recent-head h2 { font-size: .95rem; margin: 0; }
.ask-recent-head button { border: 0; background: none; color: var(--faint); font: inherit; font-size: .8rem; cursor: pointer; }
.ask-recent ul { list-style: none; padding: 0; margin: .5rem 0 0; }
.ask-recent li button { width: 100%; text-align: start; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); font: inherit; font-size: .92rem; padding: .7rem .2rem; cursor: pointer; }
.ask-recent li button:hover { color: var(--brand); }
@media (max-width: 600px) {
  .ask-hero { padding-top: 1rem; }
  .ask-hero h1 { font-size: 1.35rem; }
  .ask-form { flex-direction: row; }            /* keep the button next to the text on phones */
  .ask-form button span { display: none; }     /* icon-only button to leave room for typing */
  .ask-form button { padding: 0 .9rem; }
  .ask-examples { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) { .ask-spinner { animation-duration: 2s; } }

/* Reading text size (A− / A+) */
:root { --fs: 1; }
.article-body, .article-summary, .points li, .doc-body p, .bottom-line p, .timeline-text, .live-sum, .ask-answer-body,
.story-coverage-summary, .framing-angle, .framing-summary, .disc-item li, .archive-body p, .week-intro, .lead p {
  font-size: calc(var(--fs) * 1.08rem) !important;
}
.fs-ctl { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; margin-inline-end: .3rem; }
.fs-ctl button { border: 0; background: var(--surface); color: var(--ink); font: inherit; font-weight: 800; font-size: .85rem; min-width: 40px; min-height: 34px; cursor: pointer; padding: 0 .55rem; }
.fs-ctl button + button { border-inline-start: 1px solid var(--line); font-size: 1rem; }
.fs-ctl button small { font-size: .7em; margin-inline-start: 1px; }
.fs-ctl button:hover:not(:disabled) { color: var(--brand); }
.fs-ctl button:disabled { opacity: .35; cursor: default; }
.page-head .fs-ctl { align-self: flex-end; }

/* =================================================================
   v5 polish — depth, image fallbacks, cards, footer, reading progress
   (appended layer: overrides earlier rules, no markup dependencies
    except .ph / .img-fail / .ft-* / .read-progress added in v5)
   ================================================================= */
:root {
  --shadow-sm: 0 1px 2px rgba(16,24,40,.05);
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 6px 20px -8px rgba(16,24,40,.12);
  --shadow-lg: 0 18px 44px -14px rgba(16,24,40,.28);
  --ph-a: #e8edf6; --ph-b: #f4f6fa; --ph-ink: #b7c0d0;
}
:root[data-theme="dark"] { --shadow-sm: 0 1px 2px rgba(0,0,0,.3); --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -10px rgba(0,0,0,.6); --shadow-lg: 0 20px 50px -12px rgba(0,0,0,.7); --ph-a: #1a2130; --ph-b: #151a22; --ph-ink: #3a4456; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --shadow-sm: 0 1px 2px rgba(0,0,0,.3); --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -10px rgba(0,0,0,.6); --shadow-lg: 0 20px 50px -12px rgba(0,0,0,.7); --ph-a: #1a2130; --ph-b: #151a22; --ph-ink: #3a4456; } }

/* ---- Header: brand mark + shadow once the page scrolls ---- */
.hd { transition: box-shadow .2s; }
.hd.scrolled { box-shadow: 0 6px 20px -12px rgba(16,24,40,.35); border-bottom-color: transparent; }
.logo i { position: relative; width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, #3b66ff, #1a3fc4); box-shadow: 0 4px 12px rgba(36,82,232,.35); }
.logo i::before { content: ""; position: absolute; top: 7px; inset-inline-end: 7px; width: 7px; height: 7px; border-radius: 50%; background: #ff5a5f; box-shadow: 0 0 0 2px rgba(255,255,255,.9); }
.logo i::after { content: ""; position: absolute; inset-inline-start: 7px; bottom: 8px; width: 15px; height: 3px; border-radius: 2px; background: rgba(255,255,255,.9); box-shadow: 0 -5px 0 rgba(255,255,255,.55); }
.chip { transition: background .15s, color .15s, border-color .15s; }
.hd-search { background: var(--paper); transition: border-color .15s, box-shadow .15s, background .15s; }
.hd-search:focus-within { background: var(--surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent); }

/* ---- Image frames: soft placeholder while loading / when missing ---- */
.lead-img, .thumb, .related-media, .ph {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a93a3' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Cpath d='M7 9h6M7 13h10M7 16h7'/%3E%3C/svg%3E") center / 30% auto no-repeat,
    linear-gradient(135deg, var(--ph-a), var(--ph-b));
  background-size: min(44px, 32%) auto, auto;
}
.lead-img { background-size: 64px auto, auto; }
.img-fail img { display: none !important; }
.lead-img img, .thumb img, .related-media img { transition: transform .35s ease, opacity .3s; }

/* ---- Breaking ticker ---- */
.breaking-ticker { border-radius: 12px; background: linear-gradient(90deg, #c9271b, #e5484d); box-shadow: 0 8px 22px -12px rgba(217,45,32,.7); }

/* ---- Front block ---- */
.lead-img { border-radius: 16px; box-shadow: var(--shadow); position: relative; }
.lead-img::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); pointer-events: none; }
.lead:hover .lead-img img { transform: scale(1.03); }
.lead h1 { letter-spacing: -.01em; transition: color .15s; }
.secondary { gap: .7rem; }
.sec { padding: .8rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm); transition: box-shadow .2s, transform .2s, border-color .2s; }
.sec:first-child { padding-top: .8rem; }
.sec:last-child { border-bottom: 1px solid var(--line); }
.sec:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: color-mix(in srgb, var(--brand) 25%, var(--line)); }
.sec .thumb { border-radius: 10px; }
.sec:hover .thumb img { transform: scale(1.05); }
.sec.noimg { border-inline-start: 3px solid var(--brand); }

/* ---- Section header: accent bar instead of a heavy black rule ---- */
.sect-h { border-bottom: 1px solid var(--line); padding-bottom: .75rem; margin-bottom: .3rem; }
.sect-h h2 { display: flex; align-items: center; gap: .55rem; font-size: 1.18rem; }
.sect-h h2::before { content: ""; width: 4px; height: 1.15em; border-radius: 4px; background: var(--brand); }
.seg { border: 1px solid var(--line); }

/* ---- River: hover highlight, rounder thumbs, time chip ---- */
.river > li { position: relative; padding: 1.05rem .7rem; margin-inline: -.7rem; border-radius: 14px; border-bottom-color: var(--line-2); transition: background .15s; }
.river > li:hover { background: var(--surface); box-shadow: var(--shadow-sm); }
.river .thumb { border-radius: 12px; }
.river > li:hover .thumb img { transform: scale(1.05); }
.river .time { color: var(--ink-2); }
.river h3 { transition: color .15s; }

/* ---- Sidebar: proper cards ---- */
.side { gap: 1.1rem; }
.side-box:not(.week-card):not(.ask-cta) { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 1rem 1.1rem .6rem; box-shadow: var(--shadow-sm); }
.side-box h2 { font-size: 1rem; padding-bottom: .65rem; margin-bottom: .2rem; border-bottom: 1px solid var(--line-2); }
.trend-row { border-bottom-color: var(--line-2); padding: .6rem .35rem; margin-inline: -.35rem; border-radius: 10px; transition: background .15s; }
.trend-row:hover { background: var(--line-2); }
.trend-row .up { background: color-mix(in srgb, var(--up) 12%, transparent); padding: .12rem .55rem; border-radius: 999px; font-size: .78rem; }
.dev-row { border: 1px solid var(--line); border-inline-start: 3px solid var(--c, var(--brand)); border-radius: 10px; box-shadow: none; transition: background .15s, transform .15s; }
.dev-row:hover { background: var(--line-2); }
.side-box .dev-row:last-child { margin-bottom: .5rem; }
.ranked li { grid-template-columns: 34px 1fr; border-bottom-color: var(--line-2); align-items: start; }
.ranked li::before { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; font-size: .85rem; opacity: 1; color: var(--brand); background: var(--brand-soft); margin-top: .1rem; }
.ranked li:nth-child(1)::before { background: var(--brand); color: #fff; }
.week-card { background: linear-gradient(135deg, #111827, #1e2a4a); color: #fff; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
.week-card .week-tag { background: rgba(255,255,255,.14); color: #fff; }
.week-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.ask-cta { background: linear-gradient(135deg, #2452e8, #6a3de8); color: #fff; box-shadow: 0 12px 28px -14px rgba(52,70,232,.8); transition: transform .2s; }
.ask-cta:hover { transform: translateY(-2px); }
.ask-cta .fake { background: rgba(255,255,255,.16); display: flex; align-items: center; gap: .5rem; }
.ask-cta .fake::before { content: "✦"; opacity: .8; }
.ask-cta:hover .fake { background: rgba(255,255,255,.24); }

/* ---- Pagination ---- */
.pagination a { border: 1px solid transparent; }
.pagination a:not(.current):not(.next):not(.prev) { background: var(--surface); border-color: var(--line); }
.pagination a.current { box-shadow: 0 6px 14px -6px rgba(36,82,232,.6); }

/* ---- Filters toggle / panel ---- */
.filters { box-shadow: var(--shadow-sm); border-radius: 16px; }
.filters input:focus, .filters select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 15%, transparent); }

/* ---- Article page ---- */
.read-progress { position: fixed; top: 0; inset-inline: 0; height: 3px; z-index: 80; pointer-events: none; }
.read-progress i { display: block; height: 100%; width: 100%; transform-origin: right; transform: scaleX(0); background: linear-gradient(90deg, #6a3de8, var(--brand)); }
html[dir="ltr"] .read-progress i { transform-origin: left; }
.article-title { letter-spacing: -.01em; }
.article-meta .badge { font-size: .72rem; }
.article-img { display: block; width: 100%; border-radius: 16px !important; border: 0 !important; box-shadow: var(--shadow); margin: 1.2rem 0 !important; background: linear-gradient(135deg, var(--ph-a), var(--ph-b)); }
.share a, .share button { transition: border-color .15s, color .15s, background .15s; }
.share .wa { border-color: color-mix(in srgb, #25d366 40%, var(--line)); }
.points { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.1rem .5rem; }
.points li::before { background: var(--brand); color: #fff; }
.entity-pill { transition: all .15s; }
.source-link { box-shadow: 0 10px 22px -12px rgba(36,82,232,.8); transition: transform .15s, background .15s; }
.source-link:hover { transform: translateY(-1px); }
.story-box { border-radius: 16px; box-shadow: var(--shadow-sm); }
.related-grid { gap: 1rem; }
.related-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: .55rem .55rem .8rem; box-shadow: var(--shadow-sm); transition: box-shadow .2s, transform .2s; }
.related-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.related-media { border-radius: 10px; }
.related-title, .related-date { padding-inline: .3rem; }
.report-box { border-radius: 14px; }

/* ---- Footer ---- */
footer.site { background: var(--surface); border-top: 1px solid var(--line); margin-top: 3rem; padding: 2.2rem 1rem 1.4rem; text-align: start; }
.ft-inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1.3fr 2fr; gap: 2rem; align-items: start; }
.ft-brand .logo { font-size: 1.1rem; margin-bottom: .6rem; }
.ft-brand p { margin: 0 0 .9rem; color: var(--muted); font-family: var(--f-body); font-size: .98rem; line-height: 1.85; max-width: 40ch; }
.ft-cta { display: flex; gap: .5rem; flex-wrap: wrap; }
.ft-cta a { display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; font-weight: 700; padding: .4rem .85rem; border-radius: 999px; border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.ft-cta a:hover { border-color: var(--brand); color: var(--brand); }
.ft-cta .ico { width: 15px; height: 15px; }
footer.site .ft-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .55rem 1.2rem; justify-content: start; margin: 0; }
footer.site .ft-links a { font-size: .88rem; color: var(--ink-2); }
footer.site .ft-links a:hover { color: var(--brand); }
.ft-bottom { max-width: 1200px; margin: 1.6rem auto 0; padding-top: 1rem; border-top: 1px solid var(--line-2); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .78rem; color: var(--faint); }
footer.site .pwa-install { margin: 0; }
@media (max-width: 900px) {
  .ft-inner { grid-template-columns: 1fr; gap: 1.3rem; }
  footer.site { padding-bottom: 1.2rem; }
  .sec { padding: .7rem; }
  .river > li { margin-inline: 0; padding-inline: 0; border-radius: 0; }
  .river > li:hover { background: none; box-shadow: none; }
  .lead-img { border-radius: 0; box-shadow: none; }
  .side-box:not(.week-card):not(.ask-cta) { padding: .9rem 1rem .5rem; }
  .trends-scroll .trend-row .up { padding: 0 .4rem; }
}
@media (prefers-reduced-motion: reduce) { .read-progress { display: none; } }
/* v5 fixes: solid fill colour for white-text buttons in dark mode, tidy footer grid */
:root { --brand-fill: #2452e8; }
:root[data-theme="dark"] { --brand-fill: #3b5bdb; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --brand-fill: #3b5bdb; } }
.source-link, .points li::before, .ranked li:nth-child(1)::before, .pagination a.current, .search-hero-form button, .ask-form button, .follow-chips .chip.on, .follow-btn.on { background: var(--brand-fill); }
.source-link:hover { background: color-mix(in srgb, var(--brand-fill) 85%, #000); }
footer.site .ft-links { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 560px; justify-self: end; width: 100%; }
@media (max-width: 900px) { footer.site .ft-links { grid-template-columns: repeat(2, minmax(0, 1fr)); justify-self: stretch; } }

/* =================================================================
   v6 — magazine lead, today strip, lighter river, country rows,
   dark footer
   ================================================================= */

/* ---- Lead story ---- */
.lead-kicker { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; margin: .9rem 0 -.3rem; }
.lead-kicker > span { display: inline-flex; align-items: center; gap: .35rem; font-size: .74rem; font-weight: 800; padding: .18rem .65rem; border-radius: 999px; }
.k-brk { background: var(--alert); color: #fff; }
.k-country { background: var(--line-2); color: var(--ink-2); }
.k-country b { width: 7px; height: 7px; border-radius: 50%; }
.lead-mag { position: relative; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); isolation: isolate; background: #0b1020; }
.lead-mag .lead-img { aspect-ratio: 16/10; border-radius: 0; box-shadow: none; }
.lead-mag .lead-img::after { display: none; }
.lead-mag .lead-txt {
  position: absolute; inset-inline: 0; bottom: 0; z-index: 1; padding: 5rem 1.6rem 1.35rem;
  background: linear-gradient(to top, rgba(6,9,16,.94) 0%, rgba(6,9,16,.72) 45%, rgba(6,9,16,0) 100%);
  color: #fff;
}
.lead-mag .lead-kicker { margin-top: 0; }
.lead-mag .k-country { background: rgba(255,255,255,.16); color: #fff; backdrop-filter: blur(4px); }
.lead-mag h1 { color: #fff; font-size: 1.9rem; margin: .55rem 0 .45rem; text-shadow: 0 2px 12px rgba(0,0,0,.35); }
.lead-mag:hover h1 { color: #fff; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.lead-mag p { color: rgba(255,255,255,.86); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: .6rem; }
.lead-mag .meta-line, .lead-mag .meta-line span { color: rgba(255,255,255,.78); }
.lead-mag .meta-line .src { color: #fff; }
.lead-mag .meta-line .brk { color: #ff9a92; }
.lead-mag .meta-line .feat { color: #ffd27a; }
.lead-mag .meta-line .cat { color: #fff !important; opacity: .85; }
.lead-mag .src-count { color: #b9c8ff; }
.lead-mag .src-count .stack i { border-color: rgba(0,0,0,.4); }
.lead-mag.img-fail-lead .lead-txt { position: static; padding-top: 1.4rem; }

/* ---- Today strip ---- */
.today-strip { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem 1.1rem; margin: -.8rem 0 1.8rem; padding: .7rem 1.1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm); font-size: .86rem; color: var(--muted); }
.ts-label { display: inline-flex; align-items: center; gap: .45rem; font-weight: 800; color: var(--ink); padding-inline-end: 1.1rem; border-inline-end: 1px solid var(--line); }
.ts-label i { width: 8px; height: 8px; border-radius: 50%; background: var(--up); box-shadow: 0 0 0 4px color-mix(in srgb, var(--up) 18%, transparent); animation: pulse2 2s infinite; }
.ts-item b { color: var(--ink); font-size: 1rem; font-variant-numeric: tabular-nums; }
a.ts-item { text-decoration: none; color: inherit; }
.ts-brk b { color: var(--alert); }
a.ts-brk:hover { color: var(--alert); }
.ts-upd { margin-inline-start: auto; font-size: .8rem; color: var(--faint); }

/* ---- Lighter river ---- */
.river p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: .5rem; }
.river > li { grid-template-columns: 58px 1fr 150px; }
.river .thumb { width: 150px; height: 100px; }

/* ---- Country rows ---- */
.by-country { margin-top: 2.6rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.bc-row { margin-bottom: 2.2rem; }
.bc-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .9rem; }
.bc-head h2 { display: flex; align-items: center; gap: .55rem; margin: 0; font-size: 1.18rem; font-weight: 800; }
.bc-head h2 b { width: 4px; height: 1.15em; border-radius: 4px; background: var(--c); }
.bc-head a { font-size: .82rem; font-weight: 700; color: var(--brand); text-decoration: none; padding: .25rem .75rem; border-radius: 999px; background: var(--brand-soft); }
.bc-head a:hover { background: color-mix(in srgb, var(--brand-soft) 70%, var(--brand) 14%); }
.bc-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.bc-card { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--c); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; }
.bc-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.bc-card .thumb { width: 100%; aspect-ratio: 16/10; height: auto; border-radius: 0; }
.bc-card:hover .thumb img { transform: scale(1.05); }
.bc-card h3 { font-size: .95rem; line-height: 1.65; margin: .7rem .85rem .4rem; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bc-card:hover h3 { color: var(--brand); }
.bc-card .meta-line { margin: auto .85rem .8rem; }

/* ---- Dark footer (same in both themes) ---- */
footer.site { background: #0b1020; color: #aeb6c4; border-top: 0; margin-top: 3.5rem; padding: 2.8rem 1rem 1.3rem; text-align: start; position: relative; }
footer.site::before { content: ""; position: absolute; top: 0; inset-inline: 0; height: 3px; background: linear-gradient(90deg, #6a3de8, #2452e8, #e5484d); }
.ft-inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2rem 2.4rem; align-items: start; }
.ft-brand .logo { color: #fff; font-size: 1.2rem; margin-bottom: .8rem; }
.ft-brand p { color: #aeb6c4; font-family: var(--f-body); font-size: 1rem; line-height: 1.9; max-width: 38ch; margin: 0 0 1.1rem; }
.ft-cta { display: flex; gap: .5rem; flex-wrap: wrap; }
.ft-cta a, .ft-cta button { display: inline-flex; align-items: center; gap: .4rem; font: inherit; font-size: .8rem; font-weight: 700; padding: .45rem .9rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.04); color: #e7eaf0; text-decoration: none; cursor: pointer; margin: 0; }
.ft-cta a:hover, .ft-cta button:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.28); color: #fff; }
.ft-cta .pwa-install { background: #2452e8; border-color: #2452e8; color: #fff; }
.ft-cta .pwa-install[hidden] { display: none; }
.ft-cta .ico { width: 15px; height: 15px; }
.ft-col { display: flex; flex-direction: column; gap: .15rem; }
.ft-col h3 { margin: 0 0 .6rem; font-size: .8rem; font-weight: 800; color: #fff; letter-spacing: .02em; }
.ft-col a { display: inline-flex; align-items: center; gap: .45rem; padding: .28rem 0; font-size: .9rem; color: #aeb6c4; text-decoration: none; width: fit-content; transition: color .15s; }
.ft-col a:hover { color: #fff; }
.ft-col a b { width: 7px; height: 7px; border-radius: 50%; }
footer.site .ft-links { display: none; }
.ft-bottom { max-width: 1200px; margin: 2.2rem auto 0; padding-top: 1.1rem; border-top: 1px solid rgba(255,255,255,.08); display: flex; justify-content: space-between; gap: .6rem 1.5rem; flex-wrap: wrap; font-size: .78rem; color: #7f8899; }
.ft-note { display: inline-flex; align-items: center; gap: .4rem; }
.ft-note .ico { width: 14px; height: 14px; opacity: .7; }

/* ---- Responsive ---- */
@media (max-width: 1100px) {
  .bc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bc-grid .bc-card:nth-child(4) { display: none; }
}
@media (max-width: 900px) {
  .lead-mag { border-radius: 0; margin: 0 -1rem; box-shadow: none; }
  .lead-mag .lead-img { aspect-ratio: 4/3; margin: 0; }
  .lead-mag .lead-txt { padding: 4rem 1rem 1rem; }
  .lead-mag h1 { font-size: 1.32rem; }
  .lead-mag p { display: none; }
  .today-strip { margin: .2rem 0 1.2rem; padding: .6rem .8rem; gap: .3rem .8rem; font-size: .8rem; }
  .ts-label { padding-inline-end: .8rem; }
  .ts-upd { margin-inline-start: 0; width: 100%; }
  .river > li { grid-template-columns: 46px 1fr 96px; }
  .river .thumb { width: 96px; height: 72px; }
  .bc-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: .75rem; margin: 0 -1rem; padding: 0 1rem .4rem; scrollbar-width: none; }
  .bc-grid::-webkit-scrollbar { display: none; }
  .bc-grid .bc-card { flex: 0 0 72%; scroll-snap-align: start; }
  .bc-grid .bc-card:nth-child(4) { display: flex; }
  .ft-inner { grid-template-columns: 1fr 1fr; gap: 1.6rem 1.2rem; }
  .ft-brand { grid-column: 1 / -1; }
  footer.site { padding: 2.2rem 1rem 1.2rem; margin-top: 2.5rem; }
  .ft-bottom { flex-direction: column; }
}
@media (min-width: 901px) {
  .front { align-items: stretch; }
  .secondary { justify-content: space-between; }
  .secondary .sec { flex: 1; align-items: center; }
}

/* =================================================================
   v7 — confirmation badges, "why it matters", topic files
   ================================================================= */
/* Confirmation */
.src-count { color: var(--up); }
.src-count .stack i { background: color-mix(in srgb, var(--up) 25%, var(--surface)); }
.src-count .stack i:nth-child(2) { background: color-mix(in srgb, var(--up) 50%, var(--surface)); }
.src-count .stack i:nth-child(3) { background: color-mix(in srgb, var(--up) 80%, var(--surface)); }
.lead-mag .src-count { color: #7ee2b0; }
.unconf { display: inline-flex; align-items: center; gap: .25rem; color: var(--warn); font-weight: 700; }
.unconf::before { content: ""; width: 6px; height: 6px; border-radius: 50%; border: 1.5px solid currentColor; }
.lead-mag .unconf { color: #ffd27a; }
.trust-row { display: flex; flex-wrap: wrap; gap: .45rem; margin: .2rem 0 .9rem; }
.trust { display: inline-flex; align-items: center; gap: .45rem; font-size: .82rem; font-weight: 700; padding: .35rem .8rem; border-radius: 999px; text-decoration: none; border: 1px solid transparent; }
.trust .ti { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: .7rem; color: #fff; flex-shrink: 0; }
.trust.ok { background: color-mix(in srgb, var(--up) 12%, var(--surface)); color: var(--up); border-color: color-mix(in srgb, var(--up) 30%, transparent); }
.trust.ok .ti { background: var(--up); }
.trust.wait { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.trust.wait .ti { background: var(--warn); }
.trust.topic { background: var(--brand-soft); color: var(--brand); }
.trust.topic .ti { background: var(--brand-fill, var(--brand)); font-size: .62rem; }
a.trust:hover { filter: brightness(.96); text-decoration: underline; }

/* Why it matters */
.why-box { position: relative; margin: 1.1rem 0 1.3rem; padding: 1rem 1.2rem 1rem 1.2rem; background: linear-gradient(135deg, var(--brand-soft), color-mix(in srgb, var(--brand-soft) 40%, var(--surface))); border: 1px solid color-mix(in srgb, var(--brand) 20%, transparent); border-radius: 14px; }
.why-box h2 { display: flex; align-items: center; gap: .45rem; margin: 0 0 .4rem; font-size: .95rem; font-weight: 800; color: var(--brand); }
.why-box h2::before { content: "💡"; font-size: 1rem; }
.why-box p { margin: 0; font-family: var(--f-body); font-size: calc(var(--fs, 1) * 1.06rem); line-height: 1.95; color: var(--ink); }

/* Topic index */
.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.1rem; margin-top: 1rem; }
.topic-card { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; }
.topic-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.topic-card .thumb { width: 100%; aspect-ratio: 16/8; height: auto; border-radius: 0; }
.tc-body { padding: 1rem 1.1rem 1.1rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.tc-body h2 { margin: 0; font-size: 1.15rem; font-weight: 800; line-height: 1.5; }
.topic-card:hover h2 { color: var(--brand); }
.tc-body p { margin: 0; font-family: var(--f-body); color: var(--muted); line-height: 1.85; flex: 1; }

/* Topic page */
.topic-page { max-width: 860px; }
.topic-hero { position: relative; border-radius: 18px; padding: 2.2rem 1.6rem 1.5rem; margin: .8rem 0 1.4rem; background: linear-gradient(135deg, #111827, #1e2a4a); color: #fff; overflow: hidden; isolation: isolate; }
.topic-hero.has-img::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(6,9,16,.92), rgba(6,9,16,.45)), var(--cover) center / cover; }
.topic-kicker { display: inline-block; font-size: .78rem; font-weight: 800; padding: .2rem .7rem; border-radius: 999px; background: rgba(255,255,255,.14); }
.topic-hero h1 { font-size: 2rem; line-height: 1.45; margin: .6rem 0 .5rem; font-weight: 800; }
.topic-meta { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; font-size: .84rem; color: rgba(255,255,255,.8); }
.topic-meta b { color: #fff; }
.topic-state { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--up); border-radius: 16px; padding: 1.2rem 1.4rem 1rem; box-shadow: var(--shadow-sm); margin-bottom: 1rem; }
.topic-state h2 { display: flex; align-items: center; gap: .5rem; margin: 0 0 .5rem; font-size: 1.1rem; font-weight: 800; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--up); box-shadow: 0 0 0 4px color-mix(in srgb, var(--up) 18%, transparent); animation: pulse2 2s infinite; }
.topic-state > p { font-family: var(--f-body); font-size: calc(var(--fs, 1) * 1.1rem); line-height: 2; margin: 0 0 .6rem; }
.topic-state .points { background: transparent; border: 0; padding: 0; margin: .4rem 0 .6rem; }
.topic-note { font-size: .76rem; color: var(--faint); border-top: 1px solid var(--line-2); padding-top: .6rem; }
.topic-bg { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: .2rem 1.2rem; margin-bottom: 1.6rem; }
.topic-bg summary { cursor: pointer; font-weight: 800; padding: .7rem 0; list-style: none; display: flex; justify-content: space-between; }
.topic-bg summary::-webkit-details-marker { display: none; }
.topic-bg summary::after { content: "+"; font-size: 1.2rem; color: var(--muted); }
.topic-bg[open] summary::after { content: "−"; }
.topic-bg p { font-family: var(--f-body); font-size: 1.04rem; line-height: 1.95; color: var(--ink-2); margin: 0 0 1rem; }
.topic-timeline { margin-bottom: 2rem; }
.tl { list-style: none; margin: 0; padding: 0; border-inline-start: 2px solid var(--line); margin-inline-start: .4rem; }
.tl-day { position: relative; font-weight: 800; font-size: .82rem; color: var(--muted); padding: 1rem 1.2rem .3rem; }
.tl-day::before { content: ""; position: absolute; inset-inline-start: -7px; top: 1.2rem; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--brand); }
.tl-item { position: relative; display: grid; grid-template-columns: 48px 1fr; gap: .1rem .7rem; padding: .45rem 1.2rem; }
.tl-item::before { content: ""; position: absolute; inset-inline-start: -4px; top: .95rem; width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.tl-item.brk::before { background: var(--alert); width: 8px; height: 8px; inset-inline-start: -5px; }
.tl-time { font-weight: 800; font-size: .84rem; font-variant-numeric: tabular-nums; color: var(--ink-2); padding-top: .1rem; }
.tl-item a { font-weight: 700; line-height: 1.65; color: var(--ink); text-decoration: none; }
.tl-item a:hover { color: var(--brand); }
.tl-src { grid-column: 2; font-size: .75rem; color: var(--faint); }
@media (max-width: 900px) {
  .topic-hero { border-radius: 0; margin: 0 -1rem 1rem; padding: 1.8rem 1rem 1.2rem; }
  .topic-hero h1 { font-size: 1.5rem; }
  .topic-state { padding: 1rem; }
  .topic-grid { grid-template-columns: 1fr; }
}

/* =================================================================
   v8 — الاقتصاد والمعيشة
   ================================================================= */
/* Homepage "numbers today" strip */
.econ-strip { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem 1.3rem; margin: 0 0 1.8rem; padding: .65rem 1.1rem; border-radius: 14px; text-decoration: none; color: var(--ink);
  background: linear-gradient(90deg, color-mix(in srgb, var(--up) 10%, var(--surface)), var(--surface) 55%); border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: box-shadow .2s, border-color .2s; }
.econ-strip:hover { box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--up) 35%, var(--line)); }
.es-label { font-weight: 800; font-size: .86rem; padding-inline-end: 1.1rem; border-inline-end: 1px solid var(--line); }
.es-item { display: inline-flex; align-items: baseline; gap: .4rem; font-size: .84rem; }
.es-l { color: var(--muted); }
.es-item b { font-variant-numeric: tabular-nums; }
.es-d { font-style: normal; font-size: .7rem; }
.es-d.up { color: var(--alert); } .es-d.down { color: var(--up); }
.es-go { margin-inline-start: auto; font-size: .8rem; font-weight: 700; color: var(--brand); }

/* Page */
.ec-group { margin-bottom: 1.8rem; }
.ec-h { font-size: 1.05rem; font-weight: 800; margin: 0 0 .8rem; display: flex; align-items: center; gap: .5rem; }
.ec-h::before { content: ""; width: 4px; height: 1.1em; border-radius: 4px; background: var(--up); }
.ec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .9rem; }
.ec-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: .9rem 1rem .75rem; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: .3rem; }
.ec-card.empty { opacity: .6; }
.ec-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.ec-label { font-size: .82rem; color: var(--muted); font-weight: 700; }
.ec-val { font-size: clamp(1.05rem, 1.7vw, 1.4rem); white-space: nowrap; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.01em; line-height: 1.35; }
.ec-delta { font-size: .72rem; font-weight: 800; padding: .08rem .45rem; border-radius: 999px; white-space: nowrap; }
.ec-delta.up { color: var(--alert); background: var(--alert-soft); }   /* a price going up is bad news for households */
.ec-delta.down { color: var(--up); background: color-mix(in srgb, var(--up) 12%, transparent); }
.spark { width: 100%; height: 32px; display: block; }
.spark polyline { fill: none; stroke: var(--brand); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.spark-ph { height: 32px; border-bottom: 1px dashed var(--line); }
.ec-meta { font-size: .72rem; color: var(--faint); }
.ec-meta a { color: inherit; }
.ec-note { font-size: .8rem; color: var(--faint); margin: .8rem 0 0; }
.ec-report .doc-title { margin-bottom: .6rem; }
.ec-sec h3 { display: flex; align-items: center; gap: .45rem; }
.ec-sec h3::before { font-size: 1rem; }
.ec-prices h3::before { content: "🛒"; } .ec-currency h3::before { content: "💱"; } .ec-wages h3::before { content: "💼"; }
.ec-services h3::before { content: "💡"; } .ec-public h3::before { content: "🏛️"; } .ec-outlook h3::before { content: "🔭"; }
.ec-report .bottom-line .points { background: transparent; border: 0; padding: 0; margin: .3rem 0 0; }
.ec-weather { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 1rem 1.1rem .8rem; box-shadow: var(--shadow-sm); }
.wx-row { display: grid; grid-template-columns: 30px 1fr auto auto; align-items: center; gap: .6rem; padding: .5rem 0; border-bottom: 1px solid var(--line-2); }
.wx-row:last-of-type { border-bottom: 0; }
.wx-ico { font-size: 1.3rem; }
.wx-city b { display: block; font-size: .9rem; }
.wx-city small { color: var(--faint); font-size: .72rem; }
.wx-t { font-size: 1.15rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.wx-tm { font-size: .74rem; color: var(--muted); white-space: nowrap; }
@media (max-width: 900px) {
  .econ-strip { margin: -.6rem 0 1.2rem; padding: .6rem .8rem; gap: .35rem .9rem; }
  .es-label { width: 100%; border: 0; padding: 0; }
  .es-go { width: 100%; margin: 0; }
  .ec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  .ec-val { font-size: 1.12rem; }
  .ec-card { padding: .75rem .8rem .6rem; }
}

.today-strip + .econ-strip { margin-top: -1.1rem; }
@media (max-width: 900px) { .econ-strip { margin: 0 0 1.2rem; } .today-strip + .econ-strip { margin-top: -.6rem; } }

/* =================================================================
   v9 — footer: alerts band, live stats, accordions (mobile), tools
   ================================================================= */
footer.site { padding: 0 1rem 1.2rem; margin-top: 3.5rem; }
.ft-wrap { max-width: 1200px; margin: 0 auto; }
.ft-band { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap;
  margin: 0 0 2.4rem; transform: translateY(-50%); margin-bottom: calc(2.4rem - 40px);
  padding: 1.2rem 1.5rem; border-radius: 18px; color: #fff;
  background: radial-gradient(600px 200px at 100% 0%, rgba(255,255,255,.14), transparent 60%), linear-gradient(120deg, #2452e8, #6a3de8);
  box-shadow: 0 18px 40px -18px rgba(52,70,232,.8); }
.ft-band-txt b { display: block; font-size: 1.15rem; font-weight: 800; margin-bottom: .15rem; }
.ft-band-txt span { font-size: .9rem; opacity: .88; font-family: var(--f-body); }
.ft-band-btns { display: flex; gap: .5rem; flex-wrap: wrap; }
.ft-btn { display: inline-flex; align-items: center; gap: .45rem; min-height: 42px; padding: .45rem 1rem; border-radius: 999px;
  font: inherit; font-size: .86rem; font-weight: 700; cursor: pointer; text-decoration: none; white-space: nowrap;
  color: #fff; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28); transition: background .15s, transform .15s; }
.ft-btn:hover { background: rgba(255,255,255,.24); transform: translateY(-1px); }
.ft-btn.primary { background: #fff; color: #1a3fc4; border-color: #fff; }
.ft-btn.primary:hover { background: #eef2ff; }
.ft-btn.primary.on { background: rgba(255,255,255,.14); color: #fff; }
.ft-btn .ico { width: 17px; height: 17px; }
.ft-btn[hidden] { display: none; }

.ft-inner { grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2rem 2.4rem; }
.ft-stats { list-style: none; margin: 0 0 1.1rem; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.ft-stats li { display: inline-flex; align-items: baseline; gap: .35rem; padding: .35rem .75rem; border-radius: 10px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); font-size: .8rem; color: #aeb6c4; }
.ft-stats b { color: #fff; font-size: .95rem; font-variant-numeric: tabular-nums; }
.ft-stats li.live { align-items: center; }
.ft-stats li.live i { width: 7px; height: 7px; border-radius: 50%; background: #3ecf8e; box-shadow: 0 0 0 3px rgba(62,207,142,.2); animation: pulse2 2s infinite; }
.ft-social { display: flex; flex-wrap: wrap; gap: .4rem; }
.ft-social a { font-size: .78rem; font-weight: 700; color: #e7eaf0; text-decoration: none; padding: .3rem .75rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.14); }
.ft-social a:hover { background: rgba(255,255,255,.1); }

.ft-col summary { list-style: none; margin: 0 0 .6rem; font-size: .8rem; font-weight: 800; color: #fff; letter-spacing: .02em; cursor: default; }
.ft-col summary::-webkit-details-marker { display: none; }
.ft-col nav { display: flex; flex-direction: column; gap: .1rem; }
.ft-col nav a { display: inline-flex; align-items: center; gap: .45rem; padding: .28rem 0; font-size: .9rem; color: #aeb6c4; text-decoration: none; width: fit-content; transition: color .15s, transform .15s; }
.ft-col nav a:hover { color: #fff; transform: translateX(-3px); }
html[dir="ltr"] .ft-col nav a:hover { transform: translateX(3px); }
.ft-col nav a b { width: 7px; height: 7px; border-radius: 50%; }

.ft-bottom { align-items: center; margin-top: 2.2rem; }
.ft-legal { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; align-items: center; }
.ft-tools { display: flex; gap: .4rem; flex-wrap: wrap; }
.ft-tool { display: inline-flex; align-items: center; gap: .35rem; font: inherit; font-size: .78rem; font-weight: 700; color: #c3cad7; text-decoration: none; background: none; cursor: pointer;
  padding: .35rem .75rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.12); }
.ft-tool:hover { color: #fff; background: rgba(255,255,255,.08); }
.ft-tool .ico { width: 14px; height: 14px; }
.ft-tool .up { transform: rotate(180deg); }

@media (max-width: 900px) {
  footer.site { padding: 0 1rem 1rem; }
  .ft-band { transform: none; margin: 0 -1rem 1.6rem; border-radius: 0; padding: 1.3rem 1rem; }
  .ft-band-btns { width: 100%; }
  .ft-btn { flex: 1 1 auto; justify-content: center; }
  .ft-inner { grid-template-columns: 1fr; gap: 0; }
  .ft-brand { padding-bottom: 1.2rem; }
  .ft-col { border-top: 1px solid rgba(255,255,255,.08); }
  .ft-col summary { display: flex; justify-content: space-between; align-items: center; margin: 0; padding: .95rem 0; font-size: .92rem; cursor: pointer; }
  .ft-col summary::after { content: "+"; font-size: 1.2rem; font-weight: 400; color: #7f8899; }
  .ft-col[open] summary::after { content: "−"; }
  .ft-col nav { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; padding-bottom: .9rem; }
  .ft-bottom { flex-direction: column; align-items: flex-start; gap: .9rem; margin-top: 1rem; }
}
footer.site::before { display: none; }
:root[data-theme="dark"] footer.site { border-top: 1px solid rgba(255,255,255,.07); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) footer.site { border-top: 1px solid rgba(255,255,255,.07); } }

/* =================================================================
   v10 — simple footer (follows the light / dark theme)
   ================================================================= */
footer.site.ft-simple { background: var(--surface); color: var(--muted); border-top: 1px solid var(--line); margin-top: 3rem; padding: 1.6rem 1rem 1.2rem; text-align: start; }
.ft-simple .fs-wrap { max-width: 1200px; margin: 0 auto; }
.fs-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; }
.fs-brand { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; }
.fs-brand .logo { color: var(--ink); font-size: 1.1rem; }
.fs-brand span { font-size: .86rem; color: var(--muted); }
.fs-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.fs-btn { display: inline-flex; align-items: center; gap: .35rem; min-height: 36px; padding: .3rem .85rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  font: inherit; font-size: .8rem; font-weight: 700; color: var(--ink); text-decoration: none; cursor: pointer; transition: border-color .15s, color .15s; }
.fs-btn:hover { border-color: var(--brand); color: var(--brand); }
.fs-btn .ico { width: 15px; height: 15px; }
.fs-btn[hidden] { display: none; }
.fs-btn.push-toggle.on { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.fs-links { display: flex; flex-wrap: wrap; gap: .3rem 1.4rem; margin: 1.2rem 0; padding: 1rem 0; border-block: 1px solid var(--line-2); }
.fs-links a { font-size: .88rem; color: var(--ink-2); text-decoration: none; }
.fs-links a:hover { color: var(--brand); }
.fs-bottom { display: flex; align-items: center; justify-content: space-between; gap: .6rem 1.5rem; flex-wrap: wrap; font-size: .78rem; color: var(--faint); }
.fs-tools { display: inline-flex; align-items: center; gap: 1rem; }
.fs-tools a, .fs-tools button { display: inline-flex; align-items: center; gap: .3rem; font: inherit; font-size: .78rem; font-weight: 700; color: var(--muted); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: none; }
.fs-tools a:hover, .fs-tools button:hover { color: var(--brand); }
.fs-tools .ico { width: 14px; height: 14px; }
@media (max-width: 900px) {
  footer.site.ft-simple { padding: 1.3rem 1rem 1rem; margin-top: 2rem; }
  .fs-top { flex-direction: column; align-items: flex-start; }
  .fs-links { gap: .5rem 1.1rem; }
  .fs-bottom { flex-direction: column; align-items: flex-start; }
}

/* =================================================================
   v11 — «ماذا قالوا؟»، «تحقّق من خبر»، دليل الطوارئ، اختبار الأسبوع، بطاقات الحالة
   ================================================================= */
[hidden] { display: none !important; } /* e.g. .ask-status (display:flex) stayed visible after the answer */
.ask-hero .pill, .quiz-hero .pill { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; font-weight: 700; color: var(--brand); background: var(--brand-soft); border-radius: 999px; padding: .3rem .8rem; }
.ask-hero .pill .ico, .quiz-hero .pill .ico { width: 15px; height: 15px; }
.more-link { font-size: .85rem; font-weight: 700; color: var(--brand); text-decoration: none; white-space: nowrap; }
.more-link:hover { text-decoration: underline; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- quotes ---- */
.qt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; margin-top: 1rem; }
.qt { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 1.1rem 1.2rem 1rem; display: flex; flex-direction: column; gap: .8rem; position: relative; box-shadow: var(--shadow-sm); }
.qt::before { content: "”"; position: absolute; top: .1rem; inset-inline-end: .9rem; font-size: 3.6rem; line-height: 1; color: var(--brand-soft); font-family: Georgia, serif; pointer-events: none; }
.qt blockquote { margin: 0; font-family: var(--f-body); font-size: 1.08rem; line-height: 1.9; color: var(--ink); position: relative; }
.qt blockquote::before { content: "«"; } .qt blockquote::after { content: "»"; }
.qt figcaption { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .5rem; border-top: 1px solid var(--line-2); padding-top: .7rem; margin-top: auto; }
.qt-who { font-weight: 800; color: var(--ink); text-decoration: none; }
.qt-who:hover { color: var(--brand); }
.qt-role { font-size: .8rem; color: var(--muted); }
.qt-meta { flex-basis: 100%; font-size: .75rem; color: var(--faint); }
.qt-meta a { color: inherit; }
.qt-meta a:hover { color: var(--brand); }
.qt-filter { display: inline-flex; align-items: center; gap: .4rem; font-size: .9rem; font-weight: 700; background: var(--brand-soft); color: var(--brand); border-radius: 999px; padding: .2rem .4rem .2rem .8rem; vertical-align: middle; }
.qt-filter a { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); color: var(--ink); text-decoration: none; font-size: 1rem; }
.qt-speakers { display: flex; flex-wrap: wrap; gap: .4rem; margin: .6rem 0 0; }
.qt-speakers .chip { border-color: var(--line); background: var(--surface); }
.qt-speakers .chip.on { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.qt-speakers small { color: var(--faint); font-size: .72rem; }
.qt-section { margin: 1.6rem 0; }
.qt-section .sect-h { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.qt-section .sect-h h2 { font-size: 1.1rem; margin: 0; }

/* ---- fact check ---- */
.fc-form { flex-direction: column; align-items: stretch; }
.fc-form textarea { min-height: 110px; }
.fc-form button { align-self: flex-end; }
.fc-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 1.2rem 1.3rem; margin-top: 1.4rem; border-top: 5px solid var(--v, var(--faint)); box-shadow: var(--shadow-sm); }
.fc-card.v-confirmed { --v: var(--up); } .fc-card.v-partly, .fc-card.v-unconfirmed { --v: var(--warn); }
.fc-card.v-denied { --v: var(--alert); } .fc-card.v-no_info { --v: var(--faint); }
.fc-verdict { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.fc-badge { display: inline-flex; align-items: center; gap: .4rem; font-weight: 800; font-size: .95rem; color: #fff; background: var(--v); border-radius: 999px; padding: .35rem 1rem; }
.fc-card.v-partly .fc-badge, .fc-card.v-unconfirmed .fc-badge { color: #1d1300; }
.fc-head { font-size: 1.25rem; line-height: 1.6; margin: .8rem 0 .4rem; }
.fc-body { font-family: var(--f-body); line-height: 1.95; font-size: 1.02rem; }
.fc-body a.cite { display: inline-block; min-width: 1.35em; text-align: center; font-size: .72rem; font-weight: 800; background: var(--brand-soft); color: var(--brand); border-radius: 6px; padding: 0 .3em; margin: 0 .1em; text-decoration: none; vertical-align: super; line-height: 1.5; }
.fc-advice { margin-top: .9rem; background: var(--paper); border-radius: 12px; padding: .7rem .9rem; font-size: .92rem; line-height: 1.8; }
.fc-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
.fc-actions .ask-again { margin: 1.2rem 0 0; }
.fc-how { margin-top: 2rem; border-top: 1px solid var(--line); padding-top: 1rem; color: var(--muted); }
.fc-how summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.fc-how ol { font-family: var(--f-body); line-height: 1.9; padding-inline-start: 1.3rem; }

/* ---- emergency guide ---- */
.em-page .page-head h1 { display: flex; align-items: center; gap: .5rem; }
.em-page .page-head h1 .ico { width: 28px; height: 28px; color: var(--alert); }
.em-page .lead { font-family: var(--f-body); color: var(--muted); margin: 0; }
.em-contacts { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .7rem; }
.em-call { position: relative; display: flex; flex-direction: column; gap: .2rem; padding: .9rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--ink); min-height: 84px; transition: border-color .15s, transform .15s; }
.em-call:hover { border-color: var(--alert); transform: translateY(-2px); }
.em-num { align-self: flex-start; font-size: 1.7rem; font-weight: 800; color: var(--alert); line-height: 1.1; font-variant-numeric: tabular-nums; }
.em-name { font-size: .88rem; font-weight: 700; }
.em-ico { position: absolute; top: .8rem; inset-inline-end: .8rem; width: 18px; height: 18px; color: var(--faint); }
.em-filter { display: flex; align-items: center; gap: .5rem; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: .2rem .9rem; margin: 1.4rem 0 0; max-width: 420px; }
.em-filter .ico { width: 17px; height: 17px; color: var(--faint); }
.em-filter input { flex: 1; border: 0; background: transparent; font: inherit; font-size: 16px; padding: .5rem 0; color: var(--ink); outline: none; }
.em-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.em-item { background: var(--surface); border: 1px solid var(--line); border-inline-start: 4px solid var(--s, var(--line)); border-radius: 12px; padding: .75rem 1rem; }
.em-item.st-closed { --s: var(--alert); } .em-item.st-partial { --s: var(--warn); } .em-item.st-open { --s: var(--up); }
.em-item[hidden] { display: none; }
.em-row { display: flex; align-items: center; flex-wrap: wrap; gap: .3rem .6rem; }
.em-st { font-size: .72rem; font-weight: 800; border-radius: 999px; padding: .15rem .6rem; color: var(--s, var(--muted)); background: color-mix(in srgb, var(--s, var(--muted)) 14%, transparent); }
.em-t { font-size: .98rem; }
.em-region { font-size: .8rem; color: var(--muted); }
.em-region::before { content: "· "; }
.em-d { margin: .35rem 0 0; font-family: var(--f-body); line-height: 1.8; font-size: .95rem; color: var(--ink-2); }
.em-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; margin-top: .45rem; font-size: .75rem; color: var(--faint); }
.em-meta a { color: inherit; }
.em-meta a:hover { color: var(--brand); }
.em-tel { display: inline-flex; align-items: center; gap: .25rem; font-weight: 800; color: var(--alert) !important; text-decoration: none; font-size: .85rem; }
.em-tel .ico { width: 14px; height: 14px; }
.em-ai { font-size: .7rem; font-weight: 700; color: var(--warn); background: var(--warn-soft); border-radius: 999px; padding: .1rem .55rem; }
.em-ok { font-size: .7rem; font-weight: 700; color: var(--up); }
.em-call .em-ai { align-self: flex-start; margin-top: .2rem; }
.em-none { color: var(--faint); background: var(--surface); border: 1px dashed var(--line); border-radius: 12px; padding: .9rem 1rem; font-size: .9rem; }
.em-note { margin-top: 1.6rem; }

/* ---- weekly quiz ---- */
.quiz-page { max-width: 720px; }
.quiz-hero { text-align: center; padding: 1.8rem 0 .4rem; }
.quiz-hero h1 { font-size: 1.7rem; margin: .6rem 0 .3rem; }
.quiz-hero p { color: var(--muted); font-family: var(--f-body); margin: 0; }
.quiz-box { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 1.4rem; margin-top: 1.2rem; box-shadow: var(--shadow-sm); }
.quiz-start { text-align: center; padding: 1rem 0; }
.quiz-btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 46px; padding: 0 1.3rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 800; cursor: pointer; text-decoration: none; }
.quiz-btn:hover { border-color: var(--brand); color: var(--brand); }
.quiz-btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.quiz-btn.primary:hover { background: var(--brand-strong); color: #fff; }
.quiz-btn.wa { background: #25d366; border-color: #25d366; color: #fff; }
.quiz-btn .ico { width: 17px; height: 17px; }
.quiz-progress { height: 6px; background: var(--line-2); border-radius: 999px; overflow: hidden; }
.quiz-progress span { display: block; height: 100%; width: 0; background: var(--brand); border-radius: 999px; transition: width .35s; }
.quiz-count { font-size: .8rem; color: var(--faint); margin: .8rem 0 .2rem; font-weight: 700; }
.quiz-text { font-size: 1.25rem; line-height: 1.7; margin: 0 0 1rem; outline: none; }
.quiz-opts { display: grid; gap: .6rem; }
.quiz-opt { display: flex; align-items: center; gap: .8rem; text-align: start; width: 100%; min-height: 54px; padding: .6rem .9rem; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); font: inherit; font-size: 1rem; cursor: pointer; transition: border-color .15s, background .15s; }
.quiz-opt b { flex-shrink: 0; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--line-2); font-size: .85rem; }
.quiz-opt:hover:not(:disabled) { border-color: var(--brand); background: var(--brand-soft); }
.quiz-opt:disabled { cursor: default; opacity: .65; }
.quiz-opt.ok { border-color: var(--up); background: color-mix(in srgb, var(--up) 12%, var(--surface)); opacity: 1; }
.quiz-opt.ok b { background: var(--up); color: #fff; }
.quiz-opt.bad { border-color: var(--alert); background: var(--alert-soft); opacity: 1; }
.quiz-opt.bad b { background: var(--alert); color: #fff; }
.quiz-fb { margin: 1rem 0; border-radius: 12px; padding: .8rem 1rem; font-family: var(--f-body); line-height: 1.85; background: var(--paper); }
.quiz-fb.ok b { color: var(--up); } .quiz-fb.bad b { color: var(--alert); }
.quiz-fb a { font-family: var(--f-head); font-weight: 700; font-size: .85rem; color: var(--brand); white-space: nowrap; }
#qz-next { width: 100%; }
.quiz-end { text-align: center; }
.quiz-score { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 150px; height: 150px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); margin: .4rem 0 .6rem; }
.quiz-score span { font-size: 2.8rem; font-weight: 800; line-height: 1; direction: ltr; }
.quiz-score small { font-size: .8rem; font-weight: 700; margin-top: .3rem; }
.quiz-msg { font-size: 1.1rem; font-weight: 700; margin: .3rem 0; }
.quiz-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin: 1rem 0; }
.quiz-review { text-align: start; list-style: none; padding: 0; margin: 1.2rem 0 0; display: grid; gap: .5rem; }
.quiz-review li { display: flex; gap: .7rem; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: .7rem .9rem; font-size: .9rem; line-height: 1.7; }
.quiz-review li > span { flex-shrink: 0; font-weight: 800; }
.quiz-review li.ok > span { color: var(--up); } .quiz-review li.bad > span { color: var(--alert); }
.quiz-review a { color: var(--brand); font-weight: 700; font-size: .82rem; }
.quiz-archive ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.quiz-archive li { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .7rem 1rem; }
.quiz-archive a { font-weight: 700; color: var(--ink); text-decoration: none; }
.quiz-archive a:hover { color: var(--brand); }
.quiz-archive .muted { font-size: .8rem; color: var(--faint); }

/* ---- status cards ---- */
.share .share-card span { color: inherit; font-size: inherit; margin: 0; }
.day-card { display: inline-flex; align-items: center; gap: .35rem; font: inherit; font-size: .8rem; font-weight: 700; padding: .4rem .85rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; min-height: 36px; }
.day-card:hover { border-color: var(--brand); color: var(--brand); }
.day-card .ico, .share-card .ico { width: 15px; height: 15px; }
.card-dlg { border: 0; border-radius: 20px; padding: 0; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); max-width: calc(100vw - 32px); }
.card-dlg::backdrop { background: rgba(10, 12, 16, .6); }
.card-dlg-in { display: flex; flex-direction: column; align-items: center; gap: .8rem; padding: 1.2rem; }
.card-dlg img { width: 270px; height: 480px; max-height: 62vh; width: auto; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 14px; background: var(--line-2); }
.card-dlg p { margin: 0; font-size: .85rem; text-align: center; max-width: 300px; color: var(--muted); }
.card-dlg-act { display: flex; gap: .5rem; }
.card-dlg-act a, .card-dlg-act button { display: inline-flex; align-items: center; gap: .35rem; min-height: 42px; padding: 0 1.1rem; border-radius: 999px; font: inherit; font-weight: 800; font-size: .88rem; cursor: pointer; text-decoration: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.card-dlg-act .btn-dl { background: var(--brand); border-color: var(--brand); color: #fff; }
.card-dlg-act .ico { width: 16px; height: 16px; }
@media (max-width: 600px) {
  .em-contacts { grid-template-columns: repeat(2, 1fr); }
  .em-num { font-size: 1.45rem; }
  .quiz-box { padding: 1rem; border-radius: 16px; }
  .quiz-text { font-size: 1.12rem; }
  .qt-grid { grid-template-columns: 1fr; }
}

/* v12 — «اسأل»: sources from other websites */
.ask-web-title { display: flex; align-items: center; gap: .4rem; }
.ask-web-title .ico { width: 18px; height: 18px; color: var(--warn); }
.ask-sources.ask-web li { border-inline-start: 3px solid var(--warn-soft); padding-inline-start: .6rem; }
.ask-sources.ask-web a { color: var(--ink-2); }
.ask-answer-body a.cite.ext { background: var(--warn-soft); color: var(--warn); }

/* v12 — date bar: Gregorian · Hijri · Beirut time */
.datebar { background: var(--paper); border-bottom: 1px solid var(--line-2); color: var(--muted); font-size: .78rem; }
.datebar-in { max-width: 1200px; margin: 0 auto; padding: .35rem 1rem; display: flex; align-items: center; gap: .6rem; white-space: nowrap; overflow: hidden; }
.db-greg { color: var(--ink-2); font-weight: 700; }
.db-sep { width: 4px; height: 4px; border-radius: 50%; background: var(--faint); flex-shrink: 0; }
.db-hijri { color: var(--muted); }
.db-time { margin-inline-start: auto; display: inline-flex; align-items: center; gap: .3rem; font-weight: 700; color: var(--ink-2); }
.db-time .ico { width: 14px; height: 14px; color: var(--brand); }
.db-time time { font-variant-numeric: tabular-nums; font-size: .82rem; }
.db-city { font-weight: 400; color: var(--faint); }
@media (max-width: 600px) {
  .datebar { font-size: .72rem; }
  .datebar-in { padding: .3rem .8rem; gap: .45rem; }
  .db-city { display: none; }
}
@media (max-width: 360px) { .db-hijri, .db-sep { display: none; } }
@media print { .datebar { display: none; } }

/* v14 — «اشرح لي» */
button.gl { all: unset; cursor: pointer; color: inherit; border-bottom: 1.5px dotted var(--brand); text-decoration: none; transition: background .15s; border-radius: 2px; }
button.gl:hover, button.gl:focus-visible { background: var(--brand-soft); outline: none; }
.gl-pop { position: fixed; z-index: 90; width: min(340px, calc(100vw - 20px)); background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 40px rgba(0,0,0,.18); padding: .9rem 1rem .8rem; }
.gl-pop[hidden] { display: none; }
.gl-pop.sheet { top: auto !important; bottom: 0; left: 0 !important; right: 0; width: auto; border-radius: 18px 18px 0 0; padding: 1rem 1.1rem calc(1rem + env(safe-area-inset-bottom)); box-shadow: 0 -10px 30px rgba(0,0,0,.2); }
.gl-x { position: absolute; top: .45rem; inset-inline-end: .5rem; width: 30px; height: 30px; border: 0; background: none; color: var(--faint); font-size: 1.3rem; cursor: pointer; border-radius: 50%; }
.gl-x:hover { background: var(--line-2); color: var(--ink); }
.gl-pop-head { display: flex; flex-direction: column; gap: .15rem; padding-inline-end: 1.8rem; }
.gl-pop-badge { font-size: .68rem; font-weight: 800; color: var(--brand); }
.gl-pop-head b { font-size: 1.02rem; }
.gl-pop p { margin: .45rem 0 .55rem; font-family: var(--f-body); line-height: 1.85; font-size: .95rem; }
.gl-pop-foot { display: flex; align-items: center; justify-content: space-between; gap: .6rem; font-size: .78rem; }
.gl-pop-foot a { color: var(--brand); font-weight: 700; text-decoration: none; margin-inline-start: auto; }
.gl-pop-ai { color: var(--warn); background: var(--warn-soft); border-radius: 999px; padding: .1rem .55rem; font-weight: 700; font-size: .7rem; }
.gl-ask { position: fixed; z-index: 89; border: 0; border-radius: 999px; background: var(--ink); color: var(--surface); font: inherit; font-size: .82rem; font-weight: 800; padding: .45rem .9rem; box-shadow: 0 6px 18px rgba(0,0,0,.25); cursor: pointer; white-space: nowrap; }
.gl-ask[hidden] { display: none; }
.gl-page { max-width: 900px; }
.gl-filter { margin: 1rem 0; }
.gl-letters { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: 1rem; }
.gl-letters a { min-width: 32px; height: 32px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink-2); text-decoration: none; font-weight: 700; font-size: .85rem; }
.gl-letters a:hover { border-color: var(--brand); color: var(--brand); }
.gl-group[hidden], .gl-card[hidden] { display: none; }
.gl-group h2 { font-size: 1.1rem; color: var(--brand); margin: 1.4rem 0 .6rem; border-bottom: 1px solid var(--line-2); padding-bottom: .3rem; }
.gl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .7rem; }
.gl-card { display: flex; flex-direction: column; gap: .3rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .8rem .95rem; text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; }
.gl-card:hover { border-color: var(--brand); transform: translateY(-2px); }
.gl-card span { font-family: var(--f-body); font-size: .88rem; line-height: 1.75; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.crumbs { margin: 1.4rem 0 .4rem; font-size: .85rem; }
.crumbs a { color: var(--brand); text-decoration: none; }
.gl-term-page { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 1.3rem 1.4rem; box-shadow: var(--shadow-sm); }
.gl-cat { display: inline-block; font-size: .72rem; font-weight: 800; color: var(--brand); background: var(--brand-soft); border-radius: 999px; padding: .15rem .65rem; }
.gl-term-page h1 { font-size: 1.7rem; margin: .5rem 0 .4rem; }
.gl-term-page h1 small { font-size: .9rem; color: var(--faint); font-weight: 600; }
.gl-short { font-family: var(--f-body); font-size: 1.12rem; line-height: 1.9; margin: 0 0 .8rem; color: var(--ink); }
.gl-long { font-family: var(--f-body); line-height: 1.95; color: var(--ink-2); border-top: 1px solid var(--line-2); padding-top: .8rem; }
.gl-news { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.gl-news li { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .65rem .9rem; display: flex; flex-direction: column; gap: .15rem; }
.gl-news a { color: var(--ink); font-weight: 700; text-decoration: none; }
.gl-news a:hover { color: var(--brand); }
.gl-news span { font-size: .75rem; color: var(--faint); }

/* v15 — place names → small map */
button.pl { all: unset; cursor: pointer; color: inherit; border-bottom: 1.5px dashed var(--up); border-radius: 2px; transition: background .15s; }
button.pl:hover, button.pl:focus-visible { background: color-mix(in srgb, var(--up) 14%, transparent); outline: none; }
.location button.pl { font-weight: 700; }
.pl-pop { width: min(360px, calc(100vw - 20px)); }
.pl-pop .gl-pop-badge { color: var(--up); }
.pl-pop small { color: var(--muted); font-size: .8rem; line-height: 1.6; }
.pl-map { height: 190px; border-radius: 12px; overflow: hidden; margin: .6rem 0 .55rem; background: var(--line-2); border: 1px solid var(--line); direction: ltr; }
.pl-pop.sheet .pl-map { height: 230px; }
.pl-links { flex-wrap: wrap; gap: .3rem .9rem; justify-content: flex-start; }
.pl-links a { margin: 0 !important; }
.pl-note { font-size: .7rem; color: var(--faint); margin-top: .4rem; }
.pl-map iframe { width: 100%; height: 100%; border: 0; display: block; }
