/* مؤشر الأحا القومي — breaking-news parody */
:root {
  --bg: #0b0b10;
  --bg-2: #101018;
  --surface: #15151e;
  --surface-2: #1d1d29;
  --line: #2b2b3a;
  --ink: #f5f3ee;
  --ink-2: #c9c6d3;
  --mute: #8f8d9b;
  --red: #e0201b;
  --red-hi: #ff4a3d;
  --red-lo: #8f0f0b;
  --gold: #ffc531;
  --gold-lo: #b8860b;
  --wa: #25d366;
  --display: "Lalezar", "Cairo", system-ui, sans-serif;
  --body: "Cairo", system-ui, "Segoe UI", Tahoma, sans-serif;
  --r: 14px;
  --ticker-h: 46px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  background-image: radial-gradient(1200px 500px at 50% -120px, #2a0d10 0%, transparent 70%);
  background-repeat: no-repeat;
  color: var(--ink);
  font: 400 16px/1.65 var(--body);
  padding-bottom: calc(var(--ticker-h) + 24px + env(safe-area-inset-bottom));
  overflow-x: hidden;
}
a { color: inherit; }
button, input { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.25; margin: 0; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

/* ---------- top bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px;
  background: rgba(11, 11, 16, .92);
  backdrop-filter: blur(8px);
  border-bottom: 3px solid var(--red);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.brand-mark {
  font-family: var(--display); font-size: 22px; line-height: 1;
  background: var(--red); color: #fff; padding: 7px 10px 5px; border-radius: 6px;
}
.brand-name { font-family: var(--display); font-size: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-side { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.live { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 13px; color: var(--ink-2); }
.live i { width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 rgba(224, 32, 27, .7); animation: live 1.6s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 8px rgba(224, 32, 27, 0); } 100% { box-shadow: 0 0 0 0 rgba(224, 32, 27, 0); } }
.clock { font-weight: 800; font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.icon-btn {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--line); cursor: pointer; color: var(--ink-2);
}
.icon-btn .x { display: none; }
.icon-btn[aria-pressed="true"] .x { display: inline; }
.icon-btn[aria-pressed="true"] .wave { display: none; }
@media (max-width: 420px) { .brand-name { font-size: 17px; } .clock { display: none; } }

/* ---------- hero ---------- */
.hero { text-align: center; padding: 36px 0 20px; }
.kicker { margin: 0; color: var(--mute); font-weight: 600; font-size: 15px; }
.counter {
  margin: 4px 0 0; font-family: var(--display); color: var(--gold);
  font-size: clamp(64px, 17vw, 150px); line-height: 1.05;
  text-shadow: 0 0 40px rgba(255, 197, 49, .25);
  font-variant-numeric: tabular-nums;
}
.counter-sub { margin: 0; font-family: var(--display); font-size: clamp(22px, 5vw, 30px); color: var(--ink); }

/* ---------- the button ---------- */
.press-zone { position: relative; width: 220px; height: 220px; margin: 34px auto 18px; display: grid; place-items: center; }
.a7a-btn {
  position: relative; width: 188px; height: 188px; border-radius: 50%; border: 0; cursor: pointer;
  background: radial-gradient(circle at 50% 32%, var(--red-hi) 0%, var(--red) 46%, var(--red-lo) 100%);
  box-shadow:
    0 10px 0 #5e0907,
    0 0 0 12px var(--surface-2),
    0 0 0 14px var(--line),
    0 26px 60px rgba(224, 32, 27, .35);
  transition: transform .07s ease, box-shadow .07s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  animation: breathe 2.8s ease-in-out infinite;
}
.a7a-btn span { font-family: var(--display); font-size: 62px; line-height: 1; color: #fff; text-shadow: 0 3px 0 rgba(0, 0, 0, .25); pointer-events: none; display: block; padding-top: 8px; }
#press[data-t]:not([data-t=""]) span { font-size: 44px; }
.a7a-btn:active, .a7a-btn.down {
  transform: translateY(8px);
  box-shadow: 0 2px 0 #5e0907, 0 0 0 12px var(--surface-2), 0 0 0 14px var(--line), 0 10px 30px rgba(224, 32, 27, .5);
  animation: none;
}
@keyframes breathe { 50% { box-shadow: 0 10px 0 #5e0907, 0 0 0 12px var(--surface-2), 0 0 0 14px var(--line), 0 26px 80px rgba(224, 32, 27, .6); } }
.a7a-btn::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  box-shadow: 0 0 0 0 rgba(255, 197, 49, .6); opacity: 0;
}
.a7a-btn.ring::after { animation: ring .45s ease-out; }
@keyframes ring { from { opacity: 1; box-shadow: 0 0 0 0 rgba(255, 197, 49, .6); } to { opacity: 0; box-shadow: 0 0 0 38px rgba(255, 197, 49, 0); } }

.bubbles { position: absolute; inset: 0; pointer-events: none; }
.bubble {
  position: absolute; top: 10px; left: 50%;
  font-family: var(--display); font-size: 20px; color: var(--gold); white-space: nowrap;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .8);
  animation: float 1.3s ease-out forwards;
}
@keyframes float {
  from { opacity: 0; transform: translate(calc(-50% + var(--dx, 0px)), 10px) scale(.8); }
  15% { opacity: 1; transform: translate(calc(-50% + var(--dx, 0px)), -10px) scale(1.05); }
  to { opacity: 0; transform: translate(calc(-50% + var(--dx, 0px)), -90px) scale(1); }
}
.you { min-height: 1.6em; margin: 6px 0 0; color: var(--ink-2); font-size: 15px; text-align: center; }
.you b { color: var(--gold); }

/* ---------- cards & common ---------- */
.make, .spot, .weather, .feed, .topic-more, .foot { margin-top: 28px; }
.make, .spot, .weather, .feed {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px;
}
.make h2, .section-h h2, .foot h2 { font-size: 30px; }
.section-h { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin-bottom: 14px; }
.tag { display: inline-block; font-family: var(--display); font-size: 17px; line-height: 1; padding: 7px 10px 5px; border-radius: 5px; }
.tag.red { background: var(--red); color: #fff; }
.tag.gold { background: var(--gold); color: #1a1200; }
.tag.ghost { border: 1px solid var(--line); color: var(--ink-2); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 8px 20px; border-radius: 999px; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ink);
  font-weight: 800; font-size: 16px; text-decoration: none;
}
.btn:hover { border-color: var(--mute); }
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn.primary:hover { background: var(--red-hi); }
.btn.wa { background: var(--wa); border-color: var(--wa); color: #06210f; }
.btn.ghost { background: transparent; }
.linkish { background: none; border: 0; color: var(--mute); text-decoration: underline; cursor: pointer; font-size: 14px; padding: 8px; }

/* ---------- make a link ---------- */
form#make { display: grid; gap: 14px; margin-top: 12px; }
.url-field {
  direction: ltr; display: flex; align-items: center;
  background: var(--bg); border: 2px solid var(--line); border-radius: 12px; overflow: hidden;
}
.url-field:focus-within { border-color: var(--gold); }
.url-host { padding: 0 4px 0 14px; color: var(--mute); font-weight: 800; white-space: nowrap; }
.url-field input {
  direction: rtl; text-align: left; flex: 1; min-width: 0;
  background: transparent; border: 0; outline: none; padding: 14px 14px 14px 4px; font-size: 18px; font-weight: 600;
}
.url-field input::placeholder { color: #55535f; }
fieldset.chips { border: 0; padding: 0; margin: 0; }
fieldset.chips legend { color: var(--mute); font-size: 14px; margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.chip { position: relative; }
.chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block; white-space: nowrap; cursor: pointer;
  padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2);
  font-weight: 700; font-size: 14px; color: var(--ink-2);
}
.chip input:checked + span { background: var(--red); border-color: var(--red); color: #fff; }
.chip input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.hint { margin: 12px 0 0; color: var(--mute); font-size: 14px; }
.hint b { color: var(--ink-2); }
.nowrap { white-space: nowrap; }

/* ---------- spots ---------- */
.spots { display: grid; gap: 16px; margin-top: 28px; }
.spots .spot { margin-top: 0; }
@media (min-width: 760px) { .spots { grid-template-columns: 1fr 1fr; } }
.spot { display: flex; flex-direction: column; gap: 10px; }
.spot-body { display: grid; gap: 6px; }
.spot-t { font-family: var(--display); font-size: 26px; line-height: 1.3; text-decoration: none; overflow-wrap: anywhere; }
.spot-t:hover { color: var(--gold); }
.spot-w { font-family: var(--display); color: var(--gold); font-size: 30px; line-height: 1.2; overflow-wrap: anywhere; margin: 0; }
.spot-meta { color: var(--mute); font-size: 14px; margin: 0; }
.empty { color: var(--mute); margin: 0; }
.empty a { color: var(--gold); }

/* ---------- weather ---------- */
.weather-head { margin: 0; font-family: var(--display); font-size: 21px; color: var(--gold); }
.weather-grid { display: grid; gap: 18px; }
@media (min-width: 760px) { .weather-grid { grid-template-columns: 1.5fr 1fr; align-items: start; } }
.map { position: relative; }
.map svg { display: block; width: 100%; height: auto; }
.map path { fill: var(--surface-2); stroke: var(--bg); stroke-width: 1.4; stroke-linejoin: round; transition: fill .6s ease; }
.map path.me { stroke: var(--gold); stroke-width: 3; }
.map .ping { fill: none; stroke: var(--gold); stroke-width: 3; animation: ping 1.4s ease-out forwards; }
.map .dot { fill: var(--gold); }
@keyframes ping { from { r: 4; opacity: 1; } to { r: 36; opacity: 0; } }
.govlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.govlist li { display: grid; grid-template-columns: 7.5em 1fr auto; align-items: center; gap: 10px; font-size: 15px; }
.govlist .g-name { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.govlist .g-bar { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.govlist .g-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--gold), var(--red)); transition: width .6s ease; }
.govlist .g-lvl { color: var(--mute); font-size: 13px; white-space: nowrap; }
.govlist .g-lvl b { color: var(--ink-2); font-weight: 800; }
.abroad { margin: 12px 0 0; color: var(--mute); font-size: 14px; }

/* ---------- feed ---------- */
.sort { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.sort-btn { background: none; border: 0; padding: 6px 14px; border-radius: 999px; cursor: pointer; font-weight: 800; font-size: 14px; color: var(--mute); }
.sort-btn.on { background: var(--surface-2); color: var(--ink); }
.list { list-style: none; margin: 14px 0 0; padding: 0; counter-reset: r; }
.list li {
  counter-increment: r; display: grid; grid-template-columns: 2.2em 1fr; gap: 4px 10px; align-items: baseline;
  padding: 12px 0; border-top: 1px solid var(--line);
}
.list li::before { content: counter(r, arabic-indic); font-family: var(--display); font-size: 24px; color: var(--red); grid-row: span 2; }
.list .l-t { font-weight: 800; font-size: 18px; text-decoration: none; overflow-wrap: anywhere; }
.list .l-t:hover { color: var(--gold); }
.list .l-meta { color: var(--mute); font-size: 14px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.list .l-w { font-family: var(--display); color: var(--gold); font-size: 18px; overflow-wrap: anywhere; }

/* ---------- topic page ---------- */
.topic { text-align: center; padding: 30px 0 0; }
.topic-tags { display: flex; justify-content: center; gap: 8px; margin-bottom: 14px; }
.headline { font-size: clamp(34px, 8vw, 64px); overflow-wrap: anywhere; }
.stretch {
  margin: 14px 0 0; font-family: var(--display); color: var(--gold); line-height: 1.15;
  font-size: 120px; white-space: nowrap; text-shadow: 0 0 50px rgba(255, 197, 49, .25);
  transform-origin: center;
}
.stretch.wrapit { white-space: normal; overflow-wrap: anywhere; }
.stretch.grow { animation: grow .35s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes grow { from { transform: scaleX(.92); } 60% { transform: scaleX(1.05); } to { transform: scaleX(1); } }
.count { margin: 4px 0 0; color: var(--ink-2); font-size: 18px; }
.count b { color: var(--ink); font-size: 22px; }
.share { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }
.private { margin: 16px auto 0; max-width: 32em; color: var(--mute); font-size: 14px; }
.topic-more { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; align-items: center; }
.topic .btn.primary { margin-top: 18px; }

/* ---------- footer ---------- */
.foot { color: var(--ink-2); max-width: 46em; margin-left: auto; margin-right: auto; padding: 0 16px; text-align: center; }
.foot h2 { color: var(--ink); margin-bottom: 8px; }
.foot p { margin: 0 0 10px; }
.foot b { color: var(--ink); }
.foot .credit { color: var(--mute); font-size: 13px; }

/* ---------- ticker ---------- */
.ticker {
  position: fixed; inset: auto 0 0 0; z-index: 30; height: calc(var(--ticker-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: flex; align-items: stretch; background: #fff; color: #111; border-top: 3px solid var(--red);
}
.ticker-label {
  display: grid; place-items: center; padding: 4px 16px 0; background: var(--red); color: #fff;
  font-family: var(--display); font-size: 22px; flex-shrink: 0;
}
.ticker-track { position: relative; flex: 1; overflow: hidden; }
.ticker-move { position: absolute; top: 0; bottom: 0; right: 0; display: flex; align-items: center; white-space: nowrap; animation: tick var(--dur, 40s) linear infinite; }
.ticker-move:hover { animation-play-state: paused; }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(50%); } }
.ticker-item { display: inline-flex; align-items: center; gap: 8px; padding: 0 18px; font-weight: 800; font-size: 16px; text-decoration: none; }
.ticker-item::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--red); flex-shrink: 0; }
.ticker-item em { font-style: normal; font-family: var(--display); color: var(--red); font-size: 18px; }

/* ---------- shake ---------- */
.shake { animation: shake .3s linear; }
@keyframes shake { 20% { transform: translateX(-4px) rotate(-.4deg); } 40% { transform: translateX(4px) rotate(.4deg); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .ticker-move { animation: none; position: static; overflow-x: auto; }
  .ticker-track { overflow-x: auto; }
}
