/* التحويشة · eltahweesha.com
   Layout: one column on phones (price board first), main column + 300px sidebar from 1024px.
   The price board is the brand's navy with gold, in both themes; everything else is a quiet tinted page.
   Ads: every slot has an exact size per breakpoint (Google's "exact size" responsive code), so the space is
   reserved before the ad loads and nothing jumps. Slots sit between sections, never next to buttons or inputs. */
:root {
  --navy: #08132a; --navy2: #10224a; --gold: #E8B84A;
  --bg: #f1f3f8; --surface: #ffffff; --surface2: #eceff6; --ink: #0d1630; --dim: #4f5a75; --line: #dce1ec;
  --gold-ink: #85600f; --link: #1b4fa6; --up: #0e7a54; --down: #b3372a; --up-bg: #e3f4ec; --down-bg: #fbe9e6;
  --board-a: #0b1a3a; --board-b: #08132a; --board-line: rgba(232,184,74,.28);
  --ad-bg: #e6e9f0; --ad-ink: #6a7390;
  --radius: 16px; --r-sm: 10px;
  --font: "Cairo", "Segoe UI", Tahoma, Arial, sans-serif;
  --shadow: 0 1px 2px rgba(8,19,42,.06), 0 4px 16px rgba(8,19,42,.05);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #060c1c; --surface: #0d1832; --surface2: #13213f; --ink: #eef1f8; --dim: #9ba8c6; --line: #1f2e52;
    --gold-ink: #E8B84A; --link: #8db4ff; --up: #4fd1a1; --down: #ff8f80; --up-bg: rgba(79,209,161,.12); --down-bg: rgba(255,143,128,.12);
    --board-a: #132a5c; --board-b: #0b1838; --board-line: rgba(232,184,74,.35);
    --ad-bg: #0f1a33; --ad-ink: #7d89a8; --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #060c1c; --surface: #0d1832; --surface2: #13213f; --ink: #eef1f8; --dim: #9ba8c6; --line: #1f2e52;
  --gold-ink: #E8B84A; --link: #8db4ff; --up: #4fd1a1; --down: #ff8f80; --up-bg: rgba(79,209,161,.12); --down-bg: rgba(255,143,128,.12);
  --board-a: #132a5c; --board-b: #0b1838; --board-line: rgba(232,184,74,.35);
  --ad-bg: #0f1a33; --ad-ink: #7d89a8; --shadow: none; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--ink); line-height: 1.75; font-size: 16px; }
a { color: var(--link); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { text-wrap: balance; }
h1 { font-size: 1.4rem; line-height: 1.45; margin: 18px 0 2px; font-weight: 800; }
h2 { font-size: 1.15rem; line-height: 1.5; margin: 0 0 12px; font-weight: 800; }
h3 { font-size: 1.02rem; margin: 20px 0 6px; font-weight: 700; }
small { color: var(--dim); font-weight: 400; }
.num, .big, .prices td, .mini b { font-variant-numeric: tabular-nums; }
.wrap { max-width: 1140px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.ico { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- header ---------- */
.top { background: var(--navy); color: #F5F1E6; }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 10px; }
.logo { display: flex; gap: 10px; align-items: center; color: inherit; text-decoration: none; }
.logo b { display: block; font-size: 1.25rem; line-height: 1.15; font-weight: 800; }
.logo small { color: #9fb0d4; font-size: .78rem; line-height: 1.3; }
.logo-mark { display: block; flex: none; height: auto; }
.top-follow { color: #F5F1E6; text-decoration: none; font-size: .85rem; font-weight: 700; border: 1px solid rgba(245,241,230,.25); border-radius: 999px; padding: 4px 12px; white-space: nowrap; }
.nav { background: var(--navy2); position: relative; }
.nav-in { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-block: 7px; }
.nav-in::after { content: ""; flex: 0 0 20px; }
.nav-in::-webkit-scrollbar { display: none; }
.nav::after { content: ""; position: absolute; inset-block: 0; inset-inline-end: 0; width: 28px; background: linear-gradient(to left, var(--navy2), rgba(16,34,74,0)); pointer-events: none; }
.nav a { color: #dbe3f4; text-decoration: none; white-space: nowrap; padding: 5px 13px; border-radius: 999px; font-size: .92rem; font-weight: 600; }
.nav a:hover { background: rgba(255,255,255,.08); }
.nav a[aria-current] { background: var(--gold); color: var(--navy); font-weight: 800; }

/* ---------- page layout ---------- */
.layout { max-width: 760px; }
.main { min-width: 0; padding-bottom: 8px; }
.side { display: none; }
@media (min-width: 1024px) {
  body { font-size: 17px; }
  .layout { max-width: 1140px; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 36px; align-items: start; }
  .side { display: flex; flex-direction: column; gap: 20px; padding-top: 24px; }
  .nav::after, .nav-in::after { display: none; }
  h1 { font-size: 1.75rem; margin-top: 26px; }
  h2 { font-size: 1.25rem; }
}

/* ---------- common blocks ---------- */
.lead { color: var(--dim); margin: 0 0 14px; font-size: .95rem; line-height: 1.7; }
.card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 16px 0; color: inherit; text-decoration: none; box-shadow: var(--shadow); }
.section { margin: 28px 0; }
.src, .note, .hint { font-size: .85rem; color: var(--dim); line-height: 1.7; }
.src { margin: 24px 0 8px; }
.note { border-inline-start: 3px solid var(--gold); padding: 2px 12px; margin: 16px 0; }
.crumb { font-size: .85rem; color: var(--dim); margin: 18px 0 0; }
.crumb a { color: var(--dim); }

/* "last updated" row: inside the price board, or on its own above a calculator */
.upd { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .82rem; color: var(--dim); line-height: 1.5; }
.upd-t { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.upd-t::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--up); box-shadow: 0 0 0 3px var(--up-bg); transform: translateY(-1px); }
.upd.solo { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 12px; margin: 4px 0 16px; }
.refresh { font: inherit; font-size: .85rem; font-weight: 800; color: var(--navy); background: var(--gold); border: 0; border-radius: 999px; padding: 6px 14px; cursor: pointer; white-space: nowrap; min-height: 36px; }
.refresh:active { transform: translateY(1px); }

/* ---------- the price board (hero) ---------- */
.board { position: relative; background: linear-gradient(160deg, var(--board-a), var(--board-b)); color: #F5F1E6; border: 1px solid var(--board-line); border-radius: 20px; padding: 14px 16px 16px; margin: 12px 0 0; overflow: hidden; }
.board::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, transparent, var(--gold) 20%, var(--gold) 80%, transparent); opacity: .8; }
.board .upd { color: #aab8d8; padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,.08); }
.board .upd-t::before { background: #4fd1a1; box-shadow: 0 0 0 3px rgba(79,209,161,.18); }
.board-head { display: flex; align-items: baseline; gap: 10px; margin: 12px 0 4px; flex-wrap: wrap; }
.board-head h2 { margin: 0; font-size: 1.15rem; color: var(--gold); }
.board-head span { font-size: .82rem; color: #aab8d8; }
.quote { display: grid; grid-template-columns: 1fr 1fr; margin: 6px 0 10px; }
.quote.one { grid-template-columns: 1fr; }
.q { display: flex; flex-direction: column; justify-content: flex-end; padding: 4px 0; min-width: 0; }
.q + .q { border-inline-start: 1px solid rgba(255,255,255,.12); padding-inline-start: 16px; }
.q small { color: #c9d3ea; font-size: .9rem; font-weight: 700; }
.q span { color: #aab8d8; font-size: .82rem; }
.big { font-size: 2.6rem; font-weight: 800; color: #fff; line-height: 1.15; letter-spacing: -.5px; }
.quote.one .big { font-size: 3rem; }
.chg { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; padding: 2px 12px; border-radius: 999px; font-size: .85rem; }
.board .chg.up { background: rgba(79,209,161,.16); color: #8ff0c9; }
.board .chg.down { background: rgba(255,143,128,.18); color: #ffb9ae; }
.board .chg.flat { background: rgba(255,255,255,.1); color: #dbe3f4; }
.board-foot { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; margin: 14px 0 0; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.08); }
.board-foot div { min-width: 0; }
.board-foot dt { font-size: .75rem; color: #aab8d8; }
.board-foot dd { margin: 0; font-weight: 800; font-size: 1rem; font-variant-numeric: tabular-nums; }
.board .hint { color: #aab8d8; margin: 6px 0 0; }
@media (min-width: 1024px) {
  .board { padding: 18px 26px 22px; }
  .big { font-size: 3.4rem; }
  .quote.one .big { font-size: 3.6rem; }
}

/* ---------- tables ---------- */
table.prices { width: 100%; border-collapse: collapse; }
.prices th, .prices td { padding: 11px 6px; border-bottom: 1px solid var(--line); text-align: right; vertical-align: middle; }
.prices tbody tr:last-child th, .prices tbody tr:last-child td { border-bottom: 0; }
.prices td { font-weight: 800; font-size: 1.08rem; white-space: nowrap; }
.prices thead th { font-size: .8rem; color: var(--dim); font-weight: 700; padding-top: 0; }
.prices tbody th { font-weight: 700; }
.prices th small { display: block; font-size: .75rem; line-height: 1.4; }
.prices tr.hl th, .prices tr.hl td { background: var(--surface2); }
.prices tr.hl th { border-start-start-radius: 8px; border-end-start-radius: 8px; }
.prices tr.hl td:last-child { border-start-end-radius: 8px; border-end-end-radius: 8px; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.card-foot .hint { margin: 0; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mini { background: var(--surface2); border-radius: var(--r-sm); padding: 10px 12px; min-width: 0; }
.mini small { display: block; font-size: .8rem; }
.mini b { font-size: 1.25rem; }

/* fair-price teaser on the home page */
.teaser { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 12px; text-decoration: none; color: inherit; }
.teaser .ico { width: 30px; height: 30px; color: var(--gold-ink); margin-top: 4px; }
.teaser-t { min-width: 0; }
.teaser-t small { display: block; font-weight: 700; font-size: .85rem; }
.teaser-num { display: block; font-size: 1.4rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.teaser b.hi { color: var(--down); }
.teaser b.lo { color: var(--up); }
.teaser-t > span:last-child { display: block; font-size: .85rem; color: var(--dim); }
.pill { display: inline-block; font-weight: 800; font-size: .82rem; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.pill.hi { background: var(--down-bg); color: var(--down); }
.pill.lo { background: var(--up-bg); color: var(--up); }
.teaser:hover { border-color: var(--gold); }

/* ---------- calculators ---------- */
.calc h2 { display: flex; align-items: center; gap: 8px; }
.calc h2 .ico { color: var(--gold-ink); }
.form { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 12px; margin-top: 10px; }
.form label { display: flex; flex-direction: column; font-size: .85rem; font-weight: 700; color: var(--dim); gap: 5px; min-width: 0; }
.form input, .form select { font: inherit; font-size: 1.12rem; font-weight: 700; min-height: 48px; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface2); color: var(--ink); width: 100%; font-variant-numeric: tabular-nums; }
.form input:focus, .form select:focus { border-color: var(--gold); background: var(--surface); outline: none; box-shadow: 0 0 0 3px rgba(232,184,74,.25); }
.result { margin-top: 14px; background: var(--surface2); border-radius: 12px; padding: 12px 14px; min-height: 52px; line-height: 1.6; }
.result b { font-variant-numeric: tabular-nums; }
.result .r-big { font-size: 1.7rem; font-weight: 800; display: block; color: var(--ink); font-variant-numeric: tabular-nums; }
.result .r-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-bottom: 1px dashed var(--line); padding: 6px 0; }
.result .r-line span { min-width: 0; }
.result .r-line b { white-space: nowrap; }
.result .r-line:last-child { border-bottom: 0; }
.result .warn { color: var(--down); font-weight: 700; }
.result .ok { color: var(--up); font-weight: 700; }
.result p { margin: 8px 0 0; }

/* what-if bars */
.bars { margin-top: 16px; }
.bar { margin: 12px 0; }
.bar-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: .95rem; }
.bar-top b { font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 1.05rem; }
.bar-top small { display: block; font-size: .78rem; }
.bar-track { height: 14px; background: var(--surface2); border-radius: 7px; position: relative; margin-top: 6px; }
.bar-fill { height: 100%; border-radius: 7px; background: var(--gold); }
.bar.usd .bar-fill { background: #2e9e6b; }
.bar.egx .bar-fill { background: #4d8fe0; }
.bar.cash .bar-fill { background: #98a2b8; }
.bar-infl { position: absolute; top: -5px; bottom: -5px; width: 3px; border-radius: 2px; background: var(--down); }
.bars .legend { font-size: .82rem; color: var(--dim); margin-top: 8px; }
.bars .legend i { display: inline-block; width: 3px; height: 12px; background: var(--down); vertical-align: middle; margin-inline-end: 6px; }
.share { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

/* ---------- fair-price gauge (on the board) ---------- */
.fair-nums { display: grid; grid-template-columns: 1fr 1fr; margin-top: 6px; }
.gauge { margin: 40px 0 4px; }
.gauge-track { position: relative; height: 12px; display: flex; border-radius: 6px; }
.gz { display: block; height: 100%; }
.gz-lo { width: 35%; background: rgba(79,209,161,.55); border-start-start-radius: 6px; border-end-start-radius: 6px; }
.gz-ok { width: 30%; background: rgba(255,255,255,.22); }
.gz-hi { width: 35%; background: rgba(255,143,128,.6); border-start-end-radius: 6px; border-end-end-radius: 6px; }
.gauge-pin { position: absolute; inset-inline-start: var(--pos); top: 50%; width: 20px; height: 20px; margin-inline-start: -10px; margin-top: -10px; border-radius: 50%; background: #fff; border: 4px solid var(--gold); box-shadow: 0 0 0 3px var(--board-b); }
.gauge-pin b { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); white-space: nowrap; background: var(--gold); color: var(--navy); font-size: .75rem; font-weight: 800; padding: 1px 8px; border-radius: 999px; }
.gauge-lbl { display: flex; justify-content: space-between; font-size: .78rem; color: #aab8d8; margin-top: 8px; }
.gauge-lbl span:nth-child(2) { text-align: center; }
.verdict { font-size: 1.02rem; margin: 12px 0 0; color: #e8edf8; line-height: 1.7; }
.verdict b { color: var(--gold); }
.steps ol { padding: 0; margin: 0; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.steps li span { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.steps li span::before { content: counter(s); flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--gold); color: var(--navy); font-weight: 800; font-size: .8rem; margin-top: 1px; }
.steps li b { white-space: nowrap; font-variant-numeric: tabular-nums; font-size: 1.05rem; }
.formula { text-align: center; font-weight: 800; font-size: 1.12rem; background: var(--navy); color: var(--gold); border-radius: 12px; padding: 12px; margin: 16px 0 8px; }

/* ---------- price chart ---------- */
.chart { position: relative; margin: 0 auto; max-width: 560px; }
.chart svg { width: 100%; height: auto; display: block; touch-action: pan-y; }
.ch-area { fill: var(--gold); opacity: .14; }
.ch-line { fill: none; stroke: var(--gold-ink); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.ch-grid { stroke: var(--line); stroke-width: 1; }
.ch-lbl { font-family: var(--font); font-size: 12px; fill: var(--dim); }
.ch-date { direction: rtl; unicode-bidi: embed; }
.ch-end { fill: var(--gold-ink); stroke: var(--surface); stroke-width: 3; }
.ch-x { stroke: var(--dim); stroke-width: 1; stroke-dasharray: 3 3; }
.ch-hov { fill: var(--surface); stroke: var(--gold-ink); stroke-width: 2.5; }
.chart-tip { position: absolute; top: 0; transform: translateX(-50%); background: var(--navy); color: #fff; font-size: .8rem; line-height: 1.4; padding: 4px 10px; border-radius: 8px; pointer-events: none; white-space: nowrap; text-align: center; }
.chart-tip b { display: block; font-size: .95rem; font-variant-numeric: tabular-nums; }

/* ---------- prose ---------- */
.prose { max-width: 68ch; }
.prose p, .prose li { margin: 0 0 12px; }
.prose h2 { margin-top: 26px; }
.prose h2:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-inline-start: 22px; }
.prose table { display: block; overflow-x: auto; border-collapse: collapse; margin: 12px 0 16px; font-size: .92rem; font-variant-numeric: tabular-nums; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: right; white-space: nowrap; }
.prose thead th { background: var(--surface2); }
.prose blockquote { margin: 18px 0; padding: 12px 16px; background: var(--surface2); border-radius: 12px; }
.prose blockquote p { margin: 0; }
.prose.card { max-width: none; }
article.prose { font-size: 1.02rem; line-height: 1.9; }
.post-head .lead { font-size: 1.02rem; }

/* ---------- lists, tiles, posts ---------- */
.list { padding: 0; margin: 0; list-style: none; }
.list li { border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list a { display: block; padding: 10px 0; text-decoration: none; color: var(--ink); font-weight: 700; line-height: 1.6; }
.list a:hover { color: var(--link); }
.list small { display: block; font-size: .78rem; font-weight: 400; }
.related { margin: 32px 0 8px; }
.related h2 { font-size: 1.05rem; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tile .ico { color: var(--gold-ink); margin-bottom: 4px; }
.tile b { line-height: 1.4; }
.tile small { font-size: .8rem; line-height: 1.5; }
.tile:hover { border-color: var(--gold); }
.posts { display: grid; gap: 12px; margin: 16px 0; }
.post-card { margin: 0; }
.post-card small { font-weight: 700; color: var(--gold-ink); }
.post-card h2 { margin: 2px 0 6px; font-size: 1.1rem; color: var(--ink); }
.post-card p { margin: 0; color: var(--dim); font-size: .92rem; }
.post-card:hover { border-color: var(--gold); }

/* ---------- buttons, follow ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font: inherit; font-size: .95rem; font-weight: 800; padding: 9px 16px; min-height: 44px; border-radius: 12px; border: 0; cursor: pointer; color: #fff; }
.btn .ico { width: 20px; height: 20px; }
.btn.wa { background: #25D366; color: #06301a; }
.btn.tg { background: #229ED9; }
.btn.fb { background: #1877F2; }
.btn.yt { background: #e62117; }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.follow { background: var(--navy); color: #F5F1E6; border-radius: var(--radius); padding: 20px; margin: 28px 0; }
.follow h2 { color: var(--gold); margin-bottom: 4px; }
.follow p { color: #b9c5e0; margin: 0 0 14px; }
.follow-btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- sidebar (desktop) ---------- */
.side-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.side-card h2 { font-size: 1rem; margin-bottom: 8px; }
.side-prices { margin: 0; }
.side-prices div { display: flex; justify-content: space-between; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.side-prices div:last-child { border-bottom: 0; }
.side-prices dt { color: var(--dim); }
.side-prices dd { margin: 0; font-weight: 800; font-variant-numeric: tabular-nums; }
.side-card .src { margin: 8px 0 0; font-size: .78rem; }
.side-links { list-style: none; margin: 0; padding: 0; }
.side-links a { display: flex; align-items: center; gap: 10px; padding: 8px 0; text-decoration: none; color: var(--ink); font-weight: 700; font-size: .95rem; }
.side-links .ico { color: var(--gold-ink); width: 20px; height: 20px; }
.side-links a:hover { color: var(--link); }

/* ---------- ads ----------
   A grey band with an "إعلان" label, full-bleed on phones so it never reads as one of our cards.
   .ad-box has the exact ad size per breakpoint; the band's height is fixed before the ad loads. */
.ad { margin: 32px -16px; padding: 6px 0 14px; background: var(--ad-bg); text-align: center; line-height: 1; clear: both; }
.ad-lbl { display: block; font-size: .7rem; line-height: 1; color: var(--ad-ink); letter-spacing: .5px; padding: 2px 0 8px; }
.ad-box { display: inline-block; width: 300px; height: 250px; vertical-align: top; }
.ad-top .ad-box { width: 320px; height: 100px; }
.ad-side .ad-box { width: 300px; height: 600px; }
.ad-preview .ad-box { display: inline-grid; place-items: center; background: repeating-linear-gradient(45deg, rgba(106,115,144,.14) 0 10px, rgba(106,115,144,.06) 10px 20px); border: 1px dashed var(--ad-ink); color: var(--ad-ink); font-size: .8rem; line-height: 1.5; }
.ad-preview .ad-box::after { content: "300×250"; display: block; direction: ltr; unicode-bidi: isolate; }
.ad-preview.ad-top .ad-box::after { content: "320×100"; }
.ad-preview.ad-side .ad-box::after { content: "300×600"; }
.side .ad { margin: 0; border-radius: var(--radius); }
@media (max-width: 351px) { .ad-top .ad-box { width: 300px; } }
@media (min-width: 768px) {
  .ad { margin-inline: 0; border-radius: var(--radius); }
  .ad-box { width: 336px; height: 280px; }
  .ad-top .ad-box { width: 728px; height: 90px; }
  .ad-side .ad-box { width: 300px; height: 600px; }
  .ad-preview .ad-box::after { content: "336×280"; }
  .ad-preview.ad-top .ad-box::after { content: "728×90"; }
}

/* ---------- footer ---------- */
.foot { background: var(--navy); color: #b9c5e0; margin-top: 36px; padding-block: 26px 34px; font-size: .88rem; }
.foot a { color: #F5F1E6; }
.foot-brand { display: flex; align-items: center; gap: 10px; color: #F5F1E6; margin-bottom: 12px; }
.foot-brand b { font-size: 1.1rem; }
.disc { margin: 0 0 14px; max-width: 70ch; }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; padding: 0; list-style: none; }
.foot-links a { text-decoration: none; display: inline-block; padding: 4px 0; }
.foot-links a:hover { text-decoration: underline; }
.copy { margin: 14px 0 0; opacity: .7; }

@media (max-width: 380px) {
  .big { font-size: 2.25rem; }
  .q + .q { padding-inline-start: 12px; }
  .steps li { flex-direction: column; align-items: flex-start; gap: 2px; }
  .steps li b { padding-inline-start: 36px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
/* Before approval (and when Google has no ad to show) AdSense marks the slot "unfilled": hide its empty band. */
.ad:has(ins.adsbygoogle[data-ad-status="unfilled"]) { display: none; }

/* ---------- v2 tools ---------- */
.srcs { margin: 6px 0 0; padding-inline-start: 22px; font-size: .88rem; line-height: 1.9; }
.answer { background: var(--surface); border: 1px solid var(--line); border-inline-start: 4px solid var(--gold); border-radius: var(--r-sm); padding: 12px 14px; margin: 14px 0; font-size: 1.02rem; }
.answer b { font-variant-numeric: tabular-nums; }
.tbl-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
table.grid { width: 100%; border-collapse: collapse; font-size: .92rem; font-variant-numeric: tabular-nums; }
table.grid th, table.grid td { padding: 9px 6px; border-bottom: 1px solid var(--line); text-align: right; vertical-align: top; }
table.grid thead th { font-size: .78rem; color: var(--dim); font-weight: 700; white-space: nowrap; }
table.grid td.n { white-space: nowrap; font-weight: 800; }
table.grid tr.hl td, table.grid tr.hl th { background: var(--surface2); }
table.grid small { display: block; color: var(--dim); font-size: .75rem; line-height: 1.5; }
.tag { display: inline-block; font-size: .72rem; font-weight: 800; padding: 1px 8px; border-radius: 999px; background: var(--surface2); color: var(--dim); white-space: nowrap; }
.tag.var { background: var(--down-bg); color: var(--down); }
.tag.fix { background: var(--up-bg); color: var(--up); }
.form .wide { grid-column: 1 / -1; }
.form label.chk { flex-direction: row; align-items: center; gap: 8px; min-height: 48px; }
.form label.chk input { width: 22px; min-height: 22px; height: 22px; }
.result .r-sub { font-size: .85rem; color: var(--dim); }
.result table.grid { margin-top: 8px; background: var(--surface); border-radius: 8px; }
.hub .tile small { line-height: 1.5; }
table.grid tbody th { white-space: nowrap; }
table.grid tbody th small { white-space: normal; }
.form [hidden] { display: none !important; }

/* WhatsApp channel call to action */
.wa-cta { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; align-items: center; background: #e7f8ee; border: 1px solid #bfe8cf; border-radius: var(--radius); padding: 14px 16px; margin: 16px 0; }
.wa-cta-ico { width: 42px; height: 42px; border-radius: 50%; background: #25D366; color: #06301a; display: grid; place-items: center; }
.wa-cta-ico .ico { width: 24px; height: 24px; }
.wa-cta-t b { display: block; font-size: 1.02rem; color: #0b3d22; }
.wa-cta-t span { display: block; font-size: .88rem; color: #2f5c43; line-height: 1.6; }
.wa-cta .btn { grid-column: 1 / -1; justify-content: center; }
@media (min-width: 560px) { .wa-cta { grid-template-columns: auto 1fr auto; } .wa-cta .btn { grid-column: auto; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .wa-cta { background: rgba(37,211,102,.10); border-color: rgba(37,211,102,.30); } :root:not([data-theme="light"]) .wa-cta-t b { color: #c9f5da; } :root:not([data-theme="light"]) .wa-cta-t span { color: #9fd8b5; } }
:root[data-theme="dark"] .wa-cta { background: rgba(37,211,102,.10); border-color: rgba(37,211,102,.30); }
.follow-main { font-size: 1.05rem; padding: 12px 22px; }
.follow-more { margin: 12px 0 0; font-size: .88rem; color: #b9c5e0; }
.follow-more a { color: #F5F1E6; }
.side-wa { text-align: center; }
.side-wa .btn { width: 100%; justify-content: center; }
table.grid.wrap tbody th { white-space: normal; min-width: 7.5em; }
.board-note { margin: 10px 0 0; font-size: .85rem; color: #c9d3ea; }
.board-note a { color: var(--gold); }
.mini b[dir=ltr] { display: block; text-align: right; }
.mini-sub { display: block; font-size: .78rem; color: var(--dim); line-height: 1.5; margin-top: 2px; }
.post-cover { margin: 16px 0 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--navy); }
.post-cover img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }
.share .btn { font-size: .88rem; padding: 8px 13px; min-height: 40px; }

/* ---------- daily summary (ملخص اليوم): hero, number tiles, story cards with bars, meaning ---------- */
.dly-hero { position: relative; background: linear-gradient(160deg, var(--board-a), var(--board-b)); color: #F5F1E6; border: 1px solid var(--board-line); border-radius: 20px; padding: 18px 18px 20px; margin: 10px 0 14px; overflow: hidden; }
.dly-hero::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, transparent, var(--gold) 20%, var(--gold) 80%, transparent); opacity: .85; }
.dly-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .82rem; }
.dly-hero .dly-top time { color: #aab8d8; }
.dly-chip { background: rgba(232,184,74,.16); color: var(--gold); border: 1px solid rgba(232,184,74,.35); border-radius: 999px; padding: 2px 10px; font-weight: 700; font-size: .78rem; }
.dly-emoji { font-size: 2.2rem; line-height: 1; margin: 12px 0 2px; }
.dly-title { font-size: 1.6rem; line-height: 1.45; margin: 8px 0 6px; color: #fff; font-weight: 800; }
.dly-title em, .dly-card h2 em, .dly-callout em, .dly-vs h3 em, .dly-mean-big em { font-style: normal; color: var(--gold); }
.dly-card h2 em, .dly-callout em, .dly-vs h3 em, .dly-mean-big em { color: var(--gold-ink); }
.dly-lead { margin: 0; color: #c9d3ea; font-size: 1rem; }

.dly-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0 0 8px; }
@media (min-width: 700px) { .dly-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.dly-tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px; box-shadow: var(--shadow); min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dly-lbl { font-size: .78rem; color: var(--dim); }
.dly-val { font-size: 1.3rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink); }
.dly-chg { font-size: .82rem; font-weight: 700; border-radius: 8px; padding: 1px 8px; align-self: flex-start; }
.dly-chg small { font-weight: 400; opacity: .8; font-size: .72rem; }
.dly-chg.up { background: var(--up-bg); color: var(--up); }
.dly-chg.down { background: var(--down-bg); color: var(--down); }
.dly-chg.flat { background: var(--surface2); color: var(--dim); }

.dly-story h2, .dly-meaning h2 { font-size: 1.2rem; margin: 26px 0 10px; }
.dly-step { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 14px; }
.dly-n { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: var(--navy); font-weight: 800; margin-top: 6px; }
.dly-body { flex: 1; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.dly-say { margin: 10px 0 0; line-height: 1.85; }
.dly-callout { margin: 0; font-weight: 800; font-size: 1.1rem; line-height: 1.6; }
.dly-vs h3 { margin: 0 0 10px; font-size: 1.02rem; }
.dly-bar { margin: 8px 0; }
.dly-bar-top { display: flex; justify-content: space-between; gap: 8px; font-size: .9rem; }
.dly-bar-top b { font-variant-numeric: tabular-nums; }
.dly-track { height: 12px; border-radius: 6px; background: var(--surface2); overflow: hidden; margin-top: 4px; }
.dly-track i { display: block; height: 100%; border-radius: 6px; background: var(--dim); }
.dly-bar.good .dly-track i { background: var(--up); } .dly-bar.good b { color: var(--up); }
.dly-bar.bad .dly-track i { background: var(--down); } .dly-bar.bad b { color: var(--down); }
.dly-bar.accent .dly-track i { background: var(--gold); }
.dly-src { margin: 6px 0 0; font-size: .75rem; color: var(--dim); }

.dly-meaning { background: linear-gradient(160deg, rgba(232,184,74,.14), rgba(232,184,74,.04)); border: 1px solid rgba(232,184,74,.45); border-radius: var(--radius); padding: 4px 16px 14px; margin: 18px 0; }
.dly-meaning h2 { margin-top: 12px; }
.dly-mean-big { font-weight: 800; font-size: 1.12rem; margin: 0 0 6px; }

.dly-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 700px) { .dly-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.dly-grid div { background: var(--surface2); border-radius: var(--r-sm); padding: 8px 10px; display: flex; flex-direction: column; min-width: 0; }
.dly-grid span { font-size: .76rem; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dly-grid b { font-variant-numeric: tabular-nums; }

.dly-nav { display: flex; justify-content: space-between; gap: 10px; margin: 18px 0; }
.dly-nav-a { flex: 1; max-width: 48%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; }
.dly-nav-a.prev { text-align: left; }
.dly-nav-a small { color: var(--dim); font-size: .76rem; }
.dly-sources summary { cursor: pointer; font-weight: 700; }

.dly-list { display: grid; gap: 12px; margin: 14px 0; }
.dly-card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.dly-card .dly-top time { color: var(--dim); }
.dly-card h2 { font-size: 1.12rem; line-height: 1.55; margin: 8px 0; }
.dly-card.latest { background: linear-gradient(160deg, var(--board-a), var(--board-b)); color: #F5F1E6; border-color: var(--board-line); }
.dly-card.latest h2 em { color: var(--gold); }
.dly-card.latest .dly-top time, .dly-card.latest .dly-mini small { color: #aab8d8; }
.dly-mini { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.dly-mini span { display: flex; flex-direction: column; min-width: 0; }
.dly-mini small { font-size: .72rem; color: var(--dim); }
.dly-mini b { font-variant-numeric: tabular-nums; }
.dly-mini i { font-style: normal; font-size: .75rem; font-weight: 700; }
.dly-mini i.up { color: var(--up); } .dly-mini i.down { color: var(--down); }
.dly-card.latest .dly-mini i.up { color: #8ff0c9; } .dly-card.latest .dly-mini i.down { color: #ffb9ae; }
.steps-list { margin: 0; padding-inline-start: 22px; line-height: 1.8; }
.steps-list li { margin-bottom: 10px; }
.steps-list small { color: var(--dim); }
