/* المخبر المعلوماتي — site styles in the brand's chunky look (same as the post cards and reels):
   series-colour pages with the dot grid, white panels with thick ink borders and a drop shadow,
   chunky pills, outlined white headlines, English names in amber chips. Light only, on purpose —
   the dark graphite look was the old brand. */
@font-face { font-family: "Cairo"; src: url("fonts/cairo-arabic.woff2") format("woff2");
  font-weight: 400 900; font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Cairo"; src: url("fonts/cairo-latin.woff2") format("woff2");
  font-weight: 400 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  color-scheme: light;
  --ink: #000; --text: #1A1A2E; --muted: #5B5B6B; --amber: #FFB020; --blue: #2F5BEA;
  --paper: #FFFFFF; --cream: #FFF6DF;
  --b: 4px; --r: 26px; --drop: 0 8px 0 var(--ink);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--text); font-family: "Cairo", system-ui, sans-serif; font-size: 18px; line-height: 1.85;
  background-color: var(--page, var(--blue));
  background-image: radial-gradient(rgba(0,0,0,.20) 3.2px, transparent 3.7px);
  background-size: 32px 32px;
  min-height: 100vh; display: flex; flex-direction: column;   /* footer sits at the bottom on short pages */
}
main { flex: 1; }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.small { font-size: .88rem; color: var(--muted); }
.pad { padding: 22px 26px; }

/* building blocks */
.panel { background: var(--paper); border: var(--b) solid var(--ink); border-radius: var(--r); box-shadow: var(--drop); }
.pill { display: inline-flex; align-items: center; gap: 8px; border: 3px solid var(--ink); border-radius: 999px;
  box-shadow: 0 4px 0 var(--ink); font-weight: 900; padding: 1px 16px; line-height: 1.6; text-decoration: none;
  white-space: nowrap; color: var(--text); background: var(--paper); font-size: .9rem; }
.pill.amber { background: var(--amber); }
.pill.ink { background: var(--ink); color: #fff; }
.pill.big { font-size: 1.05rem; padding: 6px 24px; }
.pill.dim { opacity: .7; }
a.pill:hover { transform: translateY(2px); box-shadow: 0 2px 0 var(--ink); }
.pill.tag { background: var(--c, var(--blue)); color: #fff; font-size: .8rem; padding: 0 14px; }
.out { color: #fff; -webkit-text-stroke: 7px var(--ink); paint-order: stroke fill; text-shadow: 0 7px 0 var(--ink); }
.en { display: inline-block; direction: ltr; unicode-bidi: isolate; background: var(--amber); border: 3px solid var(--ink);
  border-radius: 10px; padding: 0 8px; line-height: 1.3; box-shadow: 0 3px 0 var(--ink); margin: 0 2px; }
.cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 18px; }

/* header */
.top { background: var(--paper); border-bottom: var(--b) solid var(--ink); position: sticky; top: 0; z-index: 10; }
.top-row { display: flex; align-items: center; gap: 18px; padding: 10px 0; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.logo span { display: flex; flex-direction: column; line-height: 1.25; }
.logo b { font-weight: 900; font-size: 1.15rem; }
.logo-img { width: 48px; height: 48px; flex: none; }
.foot-brand .logo-img { width: 40px; height: 40px; }
.logo small { color: var(--muted); font-size: .76rem; font-weight: 700; }
.nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav a { white-space: nowrap; text-decoration: none; font-weight: 800; font-size: .92rem; padding: 2px 12px; border-radius: 999px; border: 3px solid transparent; }
.nav a:hover { border-color: var(--ink); background: var(--cream); }
@media (max-width: 860px) {
  .top-row { flex-wrap: wrap; gap: 8px 12px; }
  .nav { order: 3; flex-basis: 100%; }
  .top-row > .pill { margin-inline-start: auto; }
  .logo small { display: none; }
}

/* hero — the mascot stands right on the page, no frame */
.hero { display: grid; grid-template-columns: 1fr; gap: 10px 40px; align-items: center; padding: 36px 0 20px; }
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.3rem); line-height: 1.5; margin: 16px 0 12px; font-weight: 900; }
.hero .amber-word { color: var(--amber); }
.hero p { color: #fff; font-weight: 700; font-size: 1.15rem; max-width: 32em; margin: 0; text-shadow: 0 2px 0 rgba(0,0,0,.35); }
.hero-art { display: grid; place-items: center; }
.hero-art img { width: min(420px, 80%); filter: drop-shadow(0 10px 0 rgba(0,0,0,.35)); animation: bob 3.2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-12px); } }
@media (prefers-reduced-motion: reduce) { .hero-art img { animation: none; } }
@media (min-width: 900px) { .hero { grid-template-columns: 1.15fr .85fr; padding: 54px 0 34px; } .hero-art img { width: 100%; } }

/* features */
.feats { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 22px; margin: 18px auto 10px; }
.feat { padding: 20px 22px 14px; }
.feat h3 { margin: 10px 0 2px; font-size: 1.15rem; font-weight: 900; }
.feat p { margin: 0; color: var(--muted); font-size: .98rem; }
.badge { display: inline-grid; place-items: center; width: 58px; height: 58px; border-radius: 18px; background: var(--amber);
  border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink); transform: rotate(-6deg); }

/* meet the mokhbir */
.meet { display: grid; grid-template-columns: 1fr; gap: 10px 30px; align-items: center; padding: 26px; margin-top: 40px; background: var(--cream); }
.meet .bust { width: min(280px, 70%); margin-inline: auto; border-radius: 50%; background: var(--amber); border: var(--b) solid var(--ink); box-shadow: var(--drop); }
.meet p { margin: 10px 0 0; }
.bubble { display: inline-block; position: relative; background: var(--paper); border: 3px solid var(--ink); border-radius: 22px;
  padding: 6px 20px; font-weight: 900; font-size: 1.35rem; box-shadow: 0 4px 0 var(--ink); }
@media (min-width: 760px) { .meet { grid-template-columns: 300px 1fr; } .meet .bust { width: 100%; } }

/* section titles on the coloured page */
.band-title { display: inline-block; margin: 46px 0 20px; font-size: 1.45rem; font-weight: 900; background: var(--paper);
  border: var(--b) solid var(--ink); border-radius: 999px; box-shadow: 0 5px 0 var(--ink); padding: 2px 26px; }

/* cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 26px; }
.card { background: var(--paper); border: var(--b) solid var(--ink); border-radius: var(--r); box-shadow: var(--drop);
  overflow: hidden; display: flex; flex-direction: column; text-decoration: none; transition: transform .12s; }
a.card:hover, .card:hover { transform: translateY(-3px); }
.card-img { display: block; aspect-ratio: 16 / 9; background: var(--c, var(--blue)); border-bottom: var(--b) solid var(--ink); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.ph { width: 100%; height: 100%; display: grid; place-items: center; }
.ph img { width: 96px; }
.empty { display: flex; align-items: center; gap: 18px; grid-column: 1 / -1; }
.empty img { width: 96px; flex: none; }
.empty p { margin: 0; }
.empty.big { margin-top: 40px; flex-wrap: wrap; justify-content: center; text-align: center; }
.empty.big img { width: 220px; }
.empty.big h1 { margin: 0; font-size: 2rem; font-weight: 900; }
.empty.big .cta { justify-content: center; }
.card-body { padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body .pill.tag { align-self: flex-start; }
.card h3 { margin: 0; font-size: 1.12rem; line-height: 1.7; font-weight: 900; }
.card h3 a { text-decoration: none; }
.card p { margin: 0; color: var(--muted); font-size: .95rem; }
.card time { color: var(--muted); font-size: .82rem; font-weight: 700; margin-top: auto; }
.card.series .pill { align-self: flex-start; margin-top: auto; }
.card.soon { opacity: .9; }

/* series header */
.series-head { display: grid; grid-template-columns: 1fr; overflow: hidden; margin: 30px 0 30px; }
.series-head-art { aspect-ratio: 16 / 9; border-bottom: var(--b) solid var(--ink); }
.series-head-art img { width: 100%; height: 100%; object-fit: cover; }
.series-head h1 { margin: 8px 0 0; font-size: 2.2rem; font-weight: 900; line-height: 1.4; }
.series-head p { margin: 4px 0 0; font-size: 1.1rem; color: var(--muted); }
@media (min-width: 860px) { .series-head { grid-template-columns: 1fr 1fr; align-items: center; }
  .series-head-art { border-bottom: 0; border-inline-end: var(--b) solid var(--ink); } }

/* article */
.post { margin: 28px auto 10px; max-width: 860px; overflow: hidden; }
.post-hero { margin: 0; aspect-ratio: 16 / 9; border-bottom: var(--b) solid var(--ink); background: var(--c); }
.post-hero img { width: 100%; height: 100%; object-fit: cover; }
.post-body { padding: 18px clamp(18px, 4vw, 44px) 28px; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 8px; font-weight: 700; }
.crumbs a { text-decoration: none; }
.post h1 { font-size: clamp(1.7rem, 4.4vw, 2.5rem); line-height: 1.6; font-weight: 900; margin: 12px 0 8px; }
.dek { font-size: 1.15rem; color: var(--muted); margin: 0 0 12px; font-weight: 600; }
.meta { font-size: .85rem; color: var(--muted); font-weight: 700; border-block: 3px dashed #D7D7E0; padding: 8px 0; margin: 0 0 18px; }
.meta a { text-decoration: none; }
.prose h2 { font-size: 1.4rem; font-weight: 900; margin: 30px 0 8px; line-height: 1.6; }
.prose p { margin: 0 0 16px; }
.prose ol, .prose ul { padding-inline-start: 22px; }
.prose li { margin-bottom: 10px; }
.page .post-body h1 { margin-top: 6px; }
.for-you { background: var(--cream); border: 3px solid var(--ink); border-radius: 20px; padding: 6px 22px 10px; margin: 28px 0; box-shadow: 0 5px 0 var(--ink); }
.for-you h2 { font-size: 1.15rem; font-weight: 900; margin: 12px 0 4px; }
.for-you li { margin-bottom: 6px; }
.source { border: 3px solid var(--ink); border-inline-start: 10px solid var(--c, var(--blue)); border-radius: 14px; padding: 10px 16px; margin: 18px 0; }
.share { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 22px 0 4px; }
.share .pill { font-size: .85rem; }

/* follow + newsletter */
.follow { padding: 24px 28px 28px; margin-top: 46px; text-align: center; }
.follow h2 { margin: 0; font-size: 1.6rem; font-weight: 900; }
.follow p { margin: 0; color: var(--muted); }
.follow .cta { justify-content: center; }
.pill.fb { background: #1877F2; color: #fff; }
.pill.li { background: #0A66C2; color: #fff; }
.newsletter { margin: 46px 0 10px; background: var(--amber); padding: 26px clamp(20px, 4vw, 44px); }
.newsletter h2 { margin: 10px 0 4px; font-weight: 900; font-size: clamp(1.5rem, 3.4vw, 2rem); }
.newsletter p { margin: 0 0 14px; font-weight: 600; }
.newsletter .small { color: var(--text); opacity: .75; margin: 10px 0 0; }
.nl-form { display: flex; flex-wrap: wrap; gap: 12px; max-width: 580px; }
.nl-form input { flex: 1 1 230px; font: inherit; padding: 8px 16px; border: 3px solid var(--ink); border-radius: 999px; background: #fff; }
.nl-form [disabled] { cursor: not-allowed; }
.nl-form .pill { flex: none; font-size: 1rem; padding: 6px 26px; }

/* footer */
.foot { margin-top: 60px; background: var(--paper); border-top: var(--b) solid var(--ink); padding: 26px 0 18px; font-size: .92rem; }
.foot-grid { display: grid; grid-template-columns: 1fr; gap: 14px 40px; }
@media (min-width: 760px) { .foot-grid { grid-template-columns: 1.3fr 1fr; } }
.foot-brand { display: flex; align-items: center; gap: 10px; margin: 0 0 4px; font-size: 1.1rem; }
.foot-note { color: var(--muted); margin: 4px 0; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 18px; align-content: flex-start; }
.foot-links a { text-decoration: none; font-weight: 800; }
.copy { margin-top: 16px; font-size: .82rem; }

/* newsletter everywhere: strip under the header, hero box, mid-article invite */
.nl-strip { background: var(--amber); border-bottom: var(--b) solid var(--ink); }
.nl-strip-row { display: flex; align-items: center; justify-content: space-between; gap: 6px 16px; padding: 7px 0; flex-wrap: wrap; font-size: .95rem; }
.nl-strip .pill { font-size: .85rem; padding: 0 16px; }
.hero-nl { padding: 14px 18px 16px; margin-top: 20px; max-width: 560px; }
.hero-nl p { color: var(--text); text-shadow: none; font-size: 1rem; font-weight: 600; margin: 0 0 10px; }
.nl-inline { display: flex; gap: 18px; align-items: flex-start; background: var(--cream); border: 3px solid var(--ink);
  border-radius: 22px; box-shadow: 0 6px 0 var(--ink); padding: 18px 20px; margin: 30px 0; }
.nl-inline > img { width: 84px; flex: none; transform: rotate(-6deg); }
.nl-inline p { margin: 0 0 10px; }
.nl-inline-q { font-size: 1.3rem; font-weight: 900; }
@media (max-width: 560px) { .nl-inline { flex-direction: column; align-items: center; text-align: center; }
  .nl-inline .nl-form { justify-content: center; } }

/* most engaged */
.popular { padding: 18px 24px 10px; margin-top: 40px; }
.popular h2 { margin: 0 0 8px; font-size: 1.35rem; font-weight: 900; }
.popular ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px 30px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.popular a { display: flex; gap: 14px; align-items: center; text-decoration: none; font-weight: 800; padding: 8px 0; border-bottom: 3px dashed #E2E2EA; }
.popular .rank { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--amber);
  border: 3px solid var(--ink); box-shadow: 0 3px 0 var(--ink); font-weight: 900; }

/* reels strip */
.reels { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 22px; }
.reel { text-decoration: none; background: var(--paper); border: var(--b) solid var(--ink); border-radius: 22px; box-shadow: var(--drop);
  overflow: hidden; display: flex; flex-direction: column; transition: transform .12s; }
.reel:hover { transform: translateY(-3px); }
.reel-img { position: relative; display: block; aspect-ratio: 9 / 16; background: var(--blue); border-bottom: var(--b) solid var(--ink); }
.reel-img img { width: 100%; height: 100%; object-fit: cover; }
.play { position: absolute; inset: 0; display: grid; place-items: center; }
.play svg { width: 64px; height: 64px; filter: drop-shadow(0 4px 0 #000); }
.reel-hook { padding: 10px 14px 14px; font-weight: 800; font-size: .95rem; line-height: 1.7; }
.more { text-align: center; margin: 22px 0 0; }

/* about page */
.about-h2 { margin: 0; font-size: 1.5rem; font-weight: 900; }
.tags { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.tags .pill.tag { font-size: .95rem; padding: 2px 16px; }

/* join: pop-up + /join/ page */
.join-dialog { width: min(640px, 100% - 24px); max-height: 92vh; overflow: auto; padding: 22px clamp(18px, 4vw, 30px) 18px; color: var(--text); }
.join-dialog::backdrop { background: rgba(10, 12, 40, .55); }
.join-dialog .close { position: absolute; top: 10px; left: 12px; width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--ink);
  background: var(--paper); font: 900 1.4rem/1 "Cairo", sans-serif; cursor: pointer; box-shadow: 0 3px 0 var(--ink); }
.join-head { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; }
.join-head img { width: 76px; flex: none; }
.join-head h2, .join-head h1 { margin: 0; font-weight: 900; font-size: 1.5rem; line-height: 1.5; }
.join-head p { margin: 2px 0 0; color: var(--muted); }
.join-form { display: grid; gap: 14px; }
.join-form label { display: grid; gap: 4px; font-weight: 800; font-size: .95rem; }
.join-form input:not([type=checkbox]):not([type=radio]), .join-form select { font: inherit; font-weight: 600; padding: 7px 14px;
  border: 3px solid var(--ink); border-radius: 14px; background: #fff; width: 100%; }
.join-form input:focus, .join-form select:focus { outline: 3px solid var(--amber); outline-offset: 1px; }
.row2 { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .row2 { grid-template-columns: 1fr 1fr; } }
.join-form fieldset { border: 0; padding: 0; margin: 0; }
.join-form legend { font-weight: 800; font-size: .95rem; margin-bottom: 6px; }
.chks, .gender { display: flex; flex-wrap: wrap; gap: 8px; }
.gender { gap: 6px; }
.chk { display: inline-flex !important; grid-template-columns: none; cursor: pointer; }
.chk input { position: absolute; opacity: 0; pointer-events: none; }
.chk span { border: 3px solid var(--ink); border-radius: 999px; padding: 2px 14px; font-weight: 800; font-size: .88rem; background: #fff;
  box-shadow: 0 3px 0 var(--ink); }
.chk input:checked + span { background: var(--amber); }
.chk input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }
.join-form button { justify-self: start; }
.join-form .small { margin: 0; }
.join-msg { margin: 0; background: var(--cream); border: 3px solid var(--ink); border-radius: 14px; padding: 8px 14px; font-weight: 800; }
.join-page { padding: 24px clamp(18px, 4vw, 40px) 26px; margin-top: 30px; max-width: 820px; margin-inline: auto; }
.join-page .join-head img { width: 130px; }
.join-page h1 { font-size: clamp(1.5rem, 3.6vw, 2rem); margin-top: 8px; }
.chk span { line-height: 1.7; display: inline-block; }
.gender { align-items: center; }

.share button.pill { font: inherit; font-weight: 900; font-size: .85rem; cursor: pointer; }
