:root {
  --ink: #16324a;
  --mist: #e7f2f5;
  --foam: #f4fafb;
  --signal: #d7263d;
  --brass: #7c5a18;
  --brass-on-ink: #e4c27a;
  --tide: #1f6f8a;
  --text: #1a2c38;
  --line: #c9d8de;
  --ui: "Tajawal", "Segoe UI", Tahoma, sans-serif;
  --read: "Amiri", "Traditional Arabic", "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--mist);
  color: var(--text);
  font-family: var(--ui);
  font-size: 1.05rem;
  line-height: 1.6;
}
a { color: var(--tide); }
a:hover { color: var(--ink); }
img { max-width: 100%; }
.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
:focus-visible {
  outline: 2px solid var(--tide);
  outline-offset: 3px;
}

.mast {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 18px 28px;
  background: var(--ink);
  color: var(--foam);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.word {
  display: block;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 0;
  line-height: 1.1;
}
.desk {
  display: block;
  color: var(--brass-on-ink);
  font-size: 0.92rem;
}
.lamp {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #8ea4b3;
  box-shadow: 0 0 0 4px rgba(142, 164, 179, 0.2);
  flex: none;
}
.lamp.live {
  background: var(--signal);
  box-shadow: 0 0 0 4px rgba(215, 38, 61, 0.22);
  animation: glow 2.8s ease-in-out infinite;
}
@keyframes glow {
  50% { box-shadow: 0 0 0 7px rgba(215, 38, 61, 0.08); }
}
.find {
  display: flex;
  flex: 1;
  max-width: 460px;
  margin-inline-start: auto;
}
.find input, .find button, button, input, select {
  font: inherit;
}
.find input {
  flex: 1;
  border: 0;
  background: #21465f;
  color: var(--foam);
  padding: 10px 14px;
  border-radius: 0;
}
.find input::placeholder { color: #b7c9d4; }
.find button {
  border: 0;
  background: var(--brass-on-ink);
  color: var(--ink);
  text-decoration: none;
  padding: 10px 16px;
  font-weight: 700;
}
.place {
  display: grid;
  justify-items: start;
  gap: 1px;
  color: var(--foam);
  font-size: 0.92rem;
  line-height: 1.3;
  white-space: nowrap;
}
.place [data-sky], .place time { color: var(--brass-on-ink); }

.channels {
  display: flex;
  gap: 0;
  overflow-x: auto;
  background: var(--foam);
  border-bottom: 1px solid var(--line);
}
.channels a {
  color: var(--text);
  text-decoration: none;
  padding: 12px 16px;
  white-space: nowrap;
  display: inline-flex;
  gap: 6px;
  align-items: baseline;
}
.countries {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 0 0 18px;
  padding-bottom: 8px;
}
.countries a {
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  padding: 6px 12px;
  border: 1px solid var(--line);
  background: var(--foam);
}
.countries a[aria-current="page"] {
  background: var(--ink);
  color: var(--foam);
  border-color: var(--ink);
}
.channels a[aria-current="page"] {
  color: var(--ink);
  box-shadow: inset 0 -3px 0 var(--tide);
  font-weight: 700;
}
.channels small {
  color: var(--tide);
  font-size: 0.78rem;
}

main {
  width: min(1120px, calc(100% - 32px));
  margin: 28px auto 48px;
}

.lead {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  background: var(--ink);
  color: var(--foam);
  min-height: 420px;
}
.lead-media {
  display: block;
  min-height: 420px;
  background: #0e2436;
}
.lead-media img, .lead-fallback {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
  display: block;
}
.lead-fallback {
  display: grid;
  place-items: center;
  color: var(--brass-on-ink);
  font-size: 1.8rem;
  font-weight: 800;
}
.lead-bar {
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
}
.lead-bar h1 {
  margin: 8px 0;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  line-height: 1.35;
  font-weight: 800;
}
.lead-bar h1 a, .source-name, .country-name { color: inherit; text-decoration: none; }
.lead-bar h1 a:hover { color: var(--brass-on-ink); }
.source-name {
  color: var(--brass-on-ink);
  font-weight: 800;
  font-size: 1.15rem;
}
.country-name { color: #d5e4ec; }
.lead-bar p { margin: 0; color: #d7e4eb; max-width: 38rem; }
.lead-bar time { color: #b7c9d4; font-size: 0.92rem; }

.wire { margin-top: 8px; }
.wire-row {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.thumb {
  position: relative;
  display: block;
  width: 128px;
  height: 86px;
  overflow: hidden;
  background: var(--ink);
  text-decoration: none;
}
.thumb img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.thumb span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--brass-on-ink);
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
  padding: 6px;
}
.wire-body {
  display: grid;
  grid-template-columns: 132px 1fr auto;
  gap: 14px;
  align-items: baseline;
  min-width: 0;
}
.wire-source a {
  display: block;
  color: var(--brass);
  font-weight: 800;
  text-decoration: none;
}
.wire-country {
  color: var(--tide) !important;
  font-weight: 500 !important;
  font-size: 0.92rem;
}
.wire-row h2 {
  margin: 0;
  font-size: 1.22rem;
  line-height: 1.45;
  font-weight: 700;
}
.wire-row h2 a { color: var(--text); text-decoration: none; }
.wire-row h2 a:hover { color: var(--tide); }
.wire-row time {
  color: #5d7482;
  font-size: 0.92rem;
  white-space: nowrap;
}

.page-head h1 {
  margin: 0 0 6px;
  font-size: 2rem;
  line-height: 1.3;
}
.page-head p { margin: 0 0 18px; color: #3e5664; }
.empty {
  background: var(--foam);
  padding: 36px 28px;
  border-inline-start: 4px solid var(--tide);
}
.empty p { margin: 0 0 8px; }
.pager { margin-top: 22px; }
.pager a {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid var(--tide);
}

.story { max-width: 44rem; }
.story + .story {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.crumbs {
  display: flex;
  gap: 10px;
  margin: 0 0 12px;
  color: #5d7482;
}
.crumbs a { color: var(--tide); text-decoration: none; font-weight: 700; }
.story h1 {
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  line-height: 1.35;
  margin: 0 0 10px;
}
.byline {
  display: flex;
  gap: 16px;
  align-items: baseline;
  margin: 0 0 8px;
}
.writer { color: var(--brass); font-weight: 800; }
.byline time { color: #5d7482; }
.tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  margin: 0 0 18px;
}
.tools button, .share-panel a {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  padding: 2px 0;
  cursor: pointer;
  text-decoration: none;
}
.tools button:hover, .share-panel a:hover { border-bottom-color: var(--tide); }
.share-panel { display: flex; flex-wrap: wrap; gap: 14px; width: 100%; }
.share-panel[hidden] { display: none; }
.story-photo { margin: 0 0 18px; }
.story-photo img { width: 100%; max-height: 460px; object-fit: cover; display: block; }
.prose {
  font-family: var(--read);
  font-size: 1.28rem;
  line-height: 2;
  max-width: 40rem;
}
.story[data-size="0"] .prose { font-size: 1.05rem; }
.story[data-size="2"] .prose { font-size: 1.5rem; }
.story[data-size="3"] .prose { font-size: 1.75rem; }
.prose p { margin: 0 0 1.1em; }
.prose h2, .prose h3 { font-family: var(--ui); line-height: 1.4; }
.prose a { color: var(--tide); text-underline-offset: 3px; }
.source-end {
  margin: 1.2em 0 0;
  color: var(--brass);
  font-weight: 800;
}
.source-end a { color: inherit; text-decoration: none; }
.source-end a:hover { color: var(--tide); }
.related { margin-top: 28px; }
.related h2 { font-size: 1.15rem; margin: 0 0 6px; }
.related ul { list-style: none; padding: 0; margin: 0; }
.related li {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.related-photo {
  display: block;
  width: 96px;
  height: 68px;
  overflow: hidden;
  background: var(--ink);
  text-decoration: none;
}
.related-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.related-photo span {
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--brass-on-ink);
  font-size: 0.78rem;
  font-weight: 700;
}
.related li > a:last-child { color: var(--text); text-decoration: none; font-weight: 700; }
.related li > a:last-child:hover { color: var(--tide); }
#next-status { color: var(--tide); font-weight: 700; }

.source-index { list-style: none; padding: 0; margin: 0; }
.source-index li {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr auto;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.source-index a { color: var(--ink); font-weight: 700; text-decoration: none; }
.quiet { color: var(--tide) !important; font-weight: 500 !important; }

.colophon {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto 32px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: #4d6572;
}
.colophon a { color: var(--ink); font-weight: 700; }

@media (max-width: 800px) {
  body { overflow-x: clip; }
  .mast {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas: "brand place" "find find";
    gap: 10px 12px;
    align-items: center;
    padding: 12px;
  }
  .brand { grid-area: brand; min-width: 0; }
  .place { grid-area: place; justify-self: start; font-size: 0.82rem; }
  .word { font-size: 1.02rem; }
  .desk { font-size: 0.82rem; }
  .find { grid-area: find; max-width: none; width: 100%; }
  .channels {
    padding-inline: 10px;
    scroll-snap-type: inline mandatory;
    -webkit-mask-image: linear-gradient(to left, transparent, #000 18px);
    mask-image: linear-gradient(to left, transparent, #000 18px);
  }
  .channels a { padding: 10px 12px; scroll-snap-align: start; }
  main { width: min(1120px, calc(100% - 20px)); margin: 16px auto 28px; }
  .ad-auto, .ad-multi { display: none; }
  .ad-unit { width: 100%; margin: 12px 0; }
  .lead, .source-index li { grid-template-columns: 1fr; }
  .lead { min-height: 0; }
  .lead-bar { padding: 16px; }
  .lead-bar h1 { font-size: 1.35rem; }
  .lead-media, .lead-media img, .lead-fallback { min-height: 190px; }
  .related li { grid-template-columns: 84px 1fr; }
  .related-photo { width: 84px; height: 60px; }
  .wire-row { grid-template-columns: 88px 1fr; gap: 10px; align-items: start; }
  .thumb { width: 88px; height: 66px; }
  .wire-body { grid-template-columns: 1fr; gap: 2px; }
  .wire-row h2 { font-size: 1.02rem; }
  .wire-row time { white-space: normal; }
  .story h1 { font-size: 1.45rem; }
  .tools { gap: 8px 12px; }
  .prose { font-size: 1.12rem; line-height: 1.9; }
  .byline { flex-wrap: wrap; gap: 6px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .lamp.live { animation: none; }
  html { scroll-behavior: auto; }
}
.ad-unit {
  width: min(1120px, calc(100% - 32px));
  margin: 16px auto;
}
.ad-unit > span {
  display: block;
  margin-bottom: 4px;
  color: #5d7482;
  font-size: 0.8rem;
}
.story .ad-unit { width: 100%; margin: 18px 0; }
