/* Ab-Ayen Insight — Seeing Deeper, Understanding More. */
:root {
  --navy: #0f1f3d;
  --navy-2: #182c52;
  --gold: #c9a24b;
  --red: #b3261e;
  --bg: #f7f5f0;
  --surface: #ffffff;
  --ink: #2a2f3a;
  --ink-strong: #0f1f3d;
  --muted: #6b7280;
  --line: #e4e0d6;
  --radius: 10px;
  --serif: "Playfair Display", "Noto Sans Ethiopic", Georgia, serif;
  --sans: "Inter", "Noto Sans Ethiopic", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c1424;
    --surface: #131d33;
    --ink: #d7dbe4;
    --ink-strong: #f3f4f7;
    --muted: #94a0b8;
    --line: #24314d;
    --navy: #0a1730;
    --navy-2: #132544;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--gold); }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--gold); color: #000; padding: 6px 12px; z-index: 10; }

/* ---------- top bar & masthead ---------- */
.topbar { background: var(--navy); color: #c7cede; font-size: 13px; }
.topbar-inner { display: flex; justify-content: space-between; gap: 12px; padding-top: 6px; padding-bottom: 6px; }
.topbar-motto { color: var(--gold); font-style: italic; }

.masthead { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.masthead-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink-strong); }
.brand:hover { color: var(--ink-strong); }
.logo-mark { color: var(--ink-strong); flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--serif); font-weight: 800; font-size: 28px; letter-spacing: -0.01em; }
.brand-motto { font-size: 12px; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }

.search { display: flex; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 2px 4px 2px 14px; }
.search input { border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 14px; outline: none; width: 200px; padding: 6px 0; }
.search button { border: 0; background: var(--navy); color: #fff; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }

.catnav { border-top: 1px solid var(--line); }
.catnav-inner { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.catnav-inner::-webkit-scrollbar { display: none; }
.catnav a { white-space: nowrap; padding: 11px 14px; font-size: 14px; font-weight: 600; color: var(--ink); border-bottom: 3px solid transparent; }
.catnav a:hover { color: var(--ink-strong); border-bottom-color: var(--line); }
.catnav a.active { color: var(--ink-strong); border-bottom-color: var(--gold); }

/* ---------- ticker ---------- */
.ticker { background: var(--surface); border-bottom: 1px solid var(--line); }
.ticker-inner { display: flex; align-items: center; gap: 14px; overflow: hidden; }
.ticker-label { flex: none; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding: 4px 10px; border-radius: 4px; margin: 8px 0; }
.ticker-track { overflow: hidden; flex: 1; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ticker-items { display: flex; gap: 40px; width: max-content; animation: ticker 45s linear infinite; }
.ticker-items a { font-size: 14px; white-space: nowrap; }
.ticker-track:hover .ticker-items { animation-play-state: paused; }
@keyframes ticker { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-items { animation: none; } }

main { padding-top: 28px; padding-bottom: 48px; min-height: 50vh; }

/* ---------- section titles ---------- */
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 18px; border-bottom: 2px solid var(--ink-strong); font-family: var(--serif); font-size: 22px; color: var(--ink-strong); }
.section-title span { display: inline-block; padding-bottom: 6px; position: relative; }
.section-title span::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 100%; height: 4px; background: var(--gold); }
.section-title .more { font: 600 13px var(--sans); color: var(--muted); }

.kicker { display: inline-block; color: var(--red); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; }
.meta { color: var(--muted); font-size: 13px; display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- hero + highlights ---------- */
.top-stories { display: grid; grid-template-columns: 1fr; gap: 28px; margin-bottom: 40px; }
@media (min-width: 900px) { .top-stories { grid-template-columns: 2fr 1fr; } }
.hero { background: var(--surface); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.hero-media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--navy); }
.hero-img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.hero:hover .hero-img { transform: scale(1.03); }
.hero-body { padding: 20px 22px 24px; }
.hero-title { font-family: var(--serif); font-size: clamp(26px, 3.6vw, 40px); line-height: 1.15; margin: 0 0 10px; color: var(--ink-strong); }
.hero-excerpt { font-size: 17px; margin: 0 0 12px; }

.highlights .card { padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.highlights .card:last-child { border-bottom: 0; }

/* ---------- cards ---------- */
.grid { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.layout .grid-4 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

.card { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.card-media { display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 8px; background: var(--navy); }
.card-img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .card-img { transform: scale(1.04); }
.card-title { font-family: var(--serif); font-size: 20px; line-height: 1.25; margin: 0 0 6px; color: var(--ink-strong); }
.card-excerpt { margin: 0 0 8px; font-size: 15px; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card.compact { flex-direction: row; gap: 12px; }
.card.compact .card-media { flex: none; width: 110px; aspect-ratio: 1; }
.card.compact .card-title { font-size: 16px; }
.grid-4 .card.compact { flex-direction: column; }
.grid-4 .card.compact .card-media { width: 100%; aspect-ratio: 16 / 10; }

.img-placeholder { display: grid; place-items: center; width: 100%; height: 100%; color: #fff; background: linear-gradient(135deg, var(--navy), var(--navy-2)); }
.img-placeholder .logo-mark { color: #fff; opacity: .8; }

/* ---------- layout with sidebar ---------- */
.layout { display: grid; grid-template-columns: 1fr; gap: 36px; }
@media (min-width: 1000px) { .layout { grid-template-columns: minmax(0, 1fr) 320px; } }
.cat-block { margin-top: 44px; }
.sidebar { display: flex; flex-direction: column; gap: 24px; }
@media (min-width: 1000px) { .sidebar { position: sticky; top: 140px; align-self: start; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.ranked { list-style: none; counter-reset: r; margin: 0; padding: 0; }
.ranked li { counter-increment: r; display: flex; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); font-weight: 600; line-height: 1.35; }
.ranked li:last-child { border-bottom: 0; }
.ranked li::before { content: counter(r); font: 800 28px/1 var(--serif); color: var(--gold); min-width: 22px; }
.panel-cta { background: var(--navy); color: #dfe4ee; border: 0; }
.panel-cta h3 { margin: 0 0 6px; font-family: var(--serif); color: #fff; }
.panel-cta p { margin: 0 0 14px; font-size: 14px; }

.btn { display: inline-block; background: var(--gold); color: #1a1406; font-weight: 700; padding: 10px 18px; border-radius: 999px; }
.btn:hover { color: #1a1406; filter: brightness(1.08); }

/* ---------- article ---------- */
.article { max-width: 760px; margin: 0 auto; }
.article-head h1 { font-family: var(--serif); font-size: clamp(30px, 4.6vw, 46px); line-height: 1.12; margin: 0 0 14px; color: var(--ink-strong); }
.article-figure { margin: 24px 0; }
.article-figure img { width: 100%; border-radius: var(--radius); }
.article-body { font-size: 19px; line-height: 1.75; }
.article-body p { margin: 0 0 1.2em; }
.article-body p:first-child::first-letter { font-family: var(--serif); float: left; font-size: 3.6em; line-height: .85; padding: 6px 10px 0 0; color: var(--ink-strong); }
.article-body a { color: var(--red); text-decoration: underline; overflow-wrap: anywhere; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 32px 0; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.share span { font-weight: 700; margin-right: 6px; }
.share a, .share button { font: 600 14px var(--sans); padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.share a:hover, .share button:hover { border-color: var(--gold); color: var(--ink-strong); }
.related { margin-top: 40px; }

/* ---------- misc pages ---------- */
.page-head { margin-bottom: 26px; padding-bottom: 14px; border-bottom: 2px solid var(--ink-strong); }
.page-head h1 { font-family: var(--serif); font-size: 40px; margin: 0; color: var(--ink-strong); }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.empty { text-align: center; padding: 60px 16px; color: var(--muted); }
.empty .logo-mark { margin: 0 auto 12px; }
.empty h1 { font-family: var(--serif); color: var(--ink-strong); }
.empty-note { color: var(--muted); }
.pager { display: flex; justify-content: center; align-items: center; gap: 18px; margin-top: 36px; }
.pager a { font-weight: 700; padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }

/* ---------- footer ---------- */
.footer { background: var(--navy); color: #c7cede; margin-top: 30px; }
.footer-inner { display: grid; grid-template-columns: 1fr; gap: 28px; padding-top: 40px; padding-bottom: 28px; }
@media (min-width: 760px) { .footer-inner { grid-template-columns: 2fr 1fr 1fr; } }
.brand-footer, .brand-footer:hover { color: #fff; }
.brand-footer .logo-mark { color: #fff; }
.brand-footer .brand-motto { color: var(--gold); }
.footer h4 { margin: 0 0 10px; color: #fff; text-transform: uppercase; font-size: 13px; letter-spacing: .08em; }
.footer-links { list-style: none; margin: 0; padding: 0; columns: 2; font-size: 14px; }
.footer-links li { padding: 3px 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 16px; padding-bottom: 24px; font-size: 13px; color: #8f9ab0; }

/* ---------- phones ---------- */
@media (max-width: 640px) {
  .topbar-motto { display: none; }
  .brand-name { font-size: 22px; }
  .brand-motto { font-size: 10px; }
  .masthead { position: static; }
  .masthead-inner { flex-wrap: wrap; }
  .search { width: 100%; }
  .search input { width: 100%; }
  .card.compact .card-media { width: 92px; }
  .article-body { font-size: 18px; }
}
