/* طفولة — teal theme: deep teal, champagne details, warm white. All colours are tokens. */
@view-transition { navigation: auto; }
:root {
  --teal: #136F6B; --teal-2: #1D8A84; --deep: #0B3B3A; --champ: #C9AE7C; --champ-ink: #7A5F2C;
  --ground: #FBFAF6; --paper: #fff; --mist: #E8F2F0; --sand: #F5EEDD;
  --ink: #1B2B2A; --ink-2: #40575A; --muted: #5B6F70; --line: #E3E7E2;
  --serif: "El Messiri", "IBM Plex Sans Arabic", sans-serif;
  --read: "Noto Naskh Arabic", serif;
  --sans: "IBM Plex Sans Arabic", system-ui, sans-serif;
  --logo: "Aref Ruqaa", "El Messiri", serif;
  --wrap: min(1176px, calc(100% - 48px));
}
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--sans); font-size: 17px; line-height: 1.75; color: var(--ink); background: var(--ground); -webkit-font-smoothing: antialiased; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, textarea { font-family: inherit; }
[hidden] { display: none !important; }
.container { width: var(--wrap); margin-inline: auto; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 700; line-height: 1.4; color: var(--ink); }
:focus-visible { outline: 3px solid var(--champ); outline-offset: 2px; }
::selection { background: #BFE0DC; }

/* header */
.topstrip { background: var(--deep); color: #CFE3E0; font-size: 13.5px; }
.topstrip .container { display: flex; justify-content: space-between; gap: 1rem; padding-block: 8px; flex-wrap: wrap; }
.topstrip .soc { display: flex; gap: 18px; }
.topstrip a:hover { color: #fff; }
.site-header { background: var(--ground); }
.mast { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; padding-block: 24px 20px; }
.mast-tag { font-size: 14.5px; color: var(--muted); max-width: 280px; }
.brand { display: inline-flex; align-items: center; gap: 12px; justify-self: center; }
.brand .mark { width: 60px; height: 60px; flex: none; }
.brand .wm { font: 700 58px/1.1 var(--logo); color: var(--teal); }
.hd-actions { display: flex; gap: 10px; justify-content: flex-end; }
.icon-btn { position: relative; width: 46px; height: 46px; border-radius: 50%; display: inline-grid; place-items: center; border: 1px solid var(--line); color: var(--teal); background: var(--paper); cursor: pointer; transition: background .2s, color .2s; flex: none; }
.icon-btn:hover { background: var(--teal); color: #fff; border-color: var(--teal); }
.saved-count { position: absolute; top: -3px; inset-inline-end: -3px; background: var(--champ); color: var(--deep); font-size: .68rem; font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; }
.menu-btn { display: none; }
.navbar { position: sticky; top: 0; z-index: 80; background: var(--teal); border-bottom: 3px solid var(--champ); }
body.scrolled .navbar { box-shadow: 0 12px 26px -20px rgba(11, 59, 58, .9); }
#mainNav { display: flex; justify-content: center; gap: 4px; padding-block: 7px; overflow-x: auto; scrollbar-width: none; }
#mainNav::-webkit-scrollbar { display: none; }
#mainNav a { flex: none; display: flex; align-items: center; gap: 9px; padding: 11px 18px; border-radius: 99px; font: 600 1.06rem/1 var(--serif); color: #fff; }
#mainNav a::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--champ); }
#mainNav a:first-child::before { display: none; }
#mainNav a:hover { background: rgba(255, 255, 255, .14); }
#mainNav a[aria-current="page"] { background: #fff; color: var(--teal); }

.drawer { position: fixed; inset: 0; z-index: 120; background: var(--ground); display: flex; flex-direction: column; padding: 1.2rem 1.4rem 2rem; overflow: auto; }
.drawer-top { display: flex; justify-content: space-between; align-items: center; }
.drawer nav { display: flex; flex-direction: column; margin: 1.4rem 0; }
.drawer nav a { font: 700 1.6rem/1.3 var(--serif); padding: .7rem 0; border-bottom: 1px solid var(--line); }
.drawer-foot { margin-top: auto; color: var(--muted); }
.search-panel { position: fixed; inset: 0; z-index: 130; background: rgba(251, 250, 246, .97); backdrop-filter: blur(10px); padding: 12vh 0 4rem; overflow: auto; }
.search-panel .container { max-width: 820px; }
.search-close { position: absolute; top: 22px; inset-inline-end: 22px; }
.search-panel input { width: 100%; background: none; border: 0; border-bottom: 2px solid var(--teal); color: var(--ink); font: 700 clamp(1.5rem, 4vw, 2.3rem) var(--serif); padding: .6rem 0; outline: none; }
.search-results { margin-top: 1.2rem; }
.search-result { display: flex; gap: 1rem; align-items: center; padding: .9rem .2rem; border-bottom: 1px solid var(--line); font: 700 1.2rem/1.5 var(--serif); }
.search-result:hover { color: var(--teal); }
.search-empty { color: var(--muted); padding: 1rem 0; }

/* shared pieces */
.tag { display: inline-flex; align-items: center; gap: 8px; font: 600 13.5px/1 var(--sans); padding: 7px 12px; border-radius: 99px; background: var(--mist); color: #0F5E5B; flex: none; }
.tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; padding: 12px 26px; border-radius: 99px; border: 1.5px solid var(--teal); background: var(--teal); color: #fff; font: 600 16px/1 var(--sans); cursor: pointer; }
.btn:hover { background: var(--deep); border-color: var(--deep); }
.btn-outline { background: transparent; color: var(--teal); }
.btn-outline:hover { color: #fff; }
.btn-gold { background: var(--champ); border-color: var(--champ); color: var(--deep); }
.btn-gold:hover { background: #D8C094; border-color: #D8C094; }
.sec { padding-top: 56px; }
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.sec-head h2 { font-size: clamp(1.7rem, 3vw, 2.1rem); }
.sec-head.bar h2 { display: flex; align-items: center; gap: 12px; }
.sec-head.bar h2::before { content: ""; width: 6px; height: 32px; border-radius: 3px; background: var(--teal); }
.eyebrow { display: flex; align-items: center; gap: 10px; font: 600 14px/1 var(--sans); color: var(--champ-ink); margin-bottom: 10px; }
.eyebrow::before { content: ""; width: 9px; height: 9px; background: var(--champ); transform: rotate(45deg); }
.more { font: 600 15px/1 var(--sans); color: var(--teal); padding: 10px 0; }
.more:hover { text-decoration: underline; text-underline-offset: 4px; }
.media-fill { position: relative; overflow: hidden; background: linear-gradient(145deg, var(--teal-2), var(--deep)); }
.media-fill img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
a:hover .media-fill img { transform: scale(1.04); }
.media-fill.no-cover::after { content: ""; position: absolute; width: 22%; aspect-ratio: 1; border-radius: 50%; background: var(--champ); top: 24%; inset-inline-start: 20%; }
.save-btn { position: absolute; top: 10px; inset-inline-start: 10px; z-index: 4; width: 40px; height: 40px; border: 0; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .94); color: var(--teal); cursor: pointer; }
.save-btn:hover, .save-btn.is-saved { background: var(--teal); color: #fff; }
.meta { font-size: 14px; color: var(--muted); }

/* home: ages */
.ages { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.age { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 2px; transition: border-color .2s, transform .2s; }
.age:hover { border-color: var(--teal); transform: translateY(-3px); }
.age-range { font: 700 2.3rem/1.15 var(--serif); color: var(--teal); }
.age-unit { font-size: 13px; color: var(--muted); }
.age h3 { font-size: 1.05rem; margin-top: 10px; }
.age p { font-size: 13.5px; color: var(--muted); line-height: 1.6; }
.age:first-child { background: var(--teal); border-color: var(--teal); }
.age:first-child * { color: #fff; }

/* home: cover story */
.cover-grid { display: grid; grid-template-columns: 1.45fr 1fr; gap: 40px; align-items: start; }
.story-big { display: block; }
.story-big .media-fill { aspect-ratio: 16 / 10; border-radius: 20px; margin-bottom: 18px; }
.story-big h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin: 14px 0 10px; }
.story-big p.dek { font-size: 1.1rem; color: var(--ink-2); margin-bottom: 10px; }
.story-big:hover h2, .side-it:hover h3, .card:hover h3 { color: var(--teal); }
.side-it { display: flex; gap: 18px; padding: 20px 0; border-top: 1px solid var(--line); align-items: flex-start; }
.side-it:first-child { border-top: 0; padding-top: 0; }
.side-it .media-fill { width: 120px; height: 120px; border-radius: 16px; flex: none; }
.side-it > div:last-child { min-width: 0; }
.side-it h3 { font-size: 1.25rem; margin: 10px 0 4px; }

.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; background: var(--mist); border-radius: 20px; padding: 26px 30px; }
.trust > div { display: flex; gap: 14px; align-items: flex-start; }
.trust svg { width: 30px; height: 30px; flex: none; fill: none; stroke: var(--teal); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; margin-top: 3px; }
.trust b { display: block; font: 700 1.08rem/1.5 var(--serif); }
.trust span { font-size: 14.5px; color: var(--ink-2); }

/* cards */
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px 28px; }
.card { display: flex; flex-direction: column; min-width: 0; }
.card-media { aspect-ratio: 16 / 10; border-radius: 16px; }
.card .cb { padding-top: 14px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.card h3 { font-size: 1.3rem; }
.card-body-excerpt { color: var(--ink-2); font-size: 15.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta { font-size: 13.5px; }

.feature { display: grid; grid-template-columns: 1.1fr 1fr; gap: 36px; align-items: center; background: var(--mist); border-radius: 24px; padding: 30px; }
.feature h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 14px 0 10px; }
.feature p.dek { color: var(--ink-2); }
.feature-list { margin-top: 20px; }
.feature-list a { display: flex; justify-content: space-between; gap: 18px; padding: 14px 2px; border-top: 1px solid #CFE0DD; font: 600 1.1rem/1.6 var(--serif); }
.feature-list a:hover { color: var(--teal); }
.feature-list span { font: 400 13.5px/2 var(--sans); color: var(--muted); white-space: nowrap; }
.feature-media { display: block; }
.feature-media .media-fill { aspect-ratio: 16 / 11; border-radius: 18px; }

/* category tiles */
.bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.tile { position: relative; overflow: hidden; border-radius: 18px; aspect-ratio: 4 / 3.4; background: linear-gradient(145deg, var(--teal-2), var(--deep)); display: flex; align-items: flex-end; }
.tile:first-child { grid-column: span 2; aspect-ratio: auto; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(11, 59, 58, .92), rgba(11, 59, 58, .08) 65%); }
.tile-text { position: relative; z-index: 2; padding: 16px 18px; color: #fff; }
.tile-text h3 { color: #fff; font-size: 1.45rem; }
.tile-count { font-size: 13.5px; color: #E4D3AE; }
.tile-go { display: none; }

.tipband { margin-top: 56px; background: var(--sand); border-radius: 20px; padding: 24px 30px; font: 400 1.15rem/1.9 var(--read); color: var(--ink); }
.tipband b { font-family: var(--serif); color: var(--champ-ink); }
.ask { margin-top: 56px; background: var(--deep); color: #EAF3F1; border-radius: 28px; padding: 44px 48px; display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; }
.ask > div { flex: 1 1 380px; }
.ask .eyebrow { color: var(--champ); }
.ask h2 { color: #fff; font-size: clamp(1.7rem, 3vw, 2.2rem); margin-bottom: 8px; }
.ask p { color: #B9D2CF; }

/* footer */
.site-footer { margin-top: 72px; background: var(--deep); color: #B9D2CF; border-top: 4px solid var(--champ); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding-block: 44px 36px; }
.site-footer .brand .wm { color: #fff; font-size: 42px; }
.site-footer .brand .mark { width: 46px; height: 46px; }
.footer-tagline { font-size: 15px; margin-top: 12px; max-width: 320px; }
.footer-social { display: flex; gap: 18px; margin-top: 14px; font-size: 15px; }
.footer-col h3 { color: #fff; font-size: 1.1rem; margin-bottom: 10px; }
.footer-col a, .footer-col p { display: block; padding: 4px 0; font-size: 15px; }
.site-footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #1D5654; padding-block: 16px; font-size: 13.5px; color: #9FBFBB; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* category + generic pages */
.c-hero { padding: 36px 0 28px; border-bottom: 1px solid var(--line); margin-bottom: 32px; }
.c-hero h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-top: 6px; }
.crumbs, .count { font-size: 14px; color: var(--muted); }
.load-more { text-align: center; margin-top: 40px; }
.page-hero { text-align: center; padding-top: 48px; }
.page-hero .mark { width: 110px; height: 110px; margin: 0 auto 12px; }
.page-hero h1 { font-size: clamp(2rem, 4.5vw, 2.9rem); }
.lede { max-width: 720px; margin: 14px auto 0; font-size: 1.2rem; color: var(--ink-2); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 780px; margin-inline: auto; }
.stat { background: var(--mist); border-radius: 18px; padding: 20px; text-align: center; }
.stat-num { display: block; font: 700 2.2rem/1.3 var(--serif); color: var(--teal); }
.stat-label { font-size: 14.5px; color: var(--ink-2); }
.about-body { max-width: 740px; margin: 40px auto 0; font: 400 1.2rem/2.1 var(--read); }
.about-body h2 { font-size: 1.8rem; color: var(--teal); margin: 34px 0 8px; }
.about-body p { margin-bottom: 16px; }
.empty-state { grid-column: 1 / -1; text-align: center; padding: 56px 20px; color: var(--muted); background: var(--mist); border-radius: 18px; }

/* article */
.progress { position: fixed; top: 0; inset-inline: 0; height: 4px; z-index: 100; pointer-events: none; }
.progress i { display: block; height: 100%; width: 0; background: var(--champ); }
.a-top { max-width: 860px; padding-top: 34px; }
.a-top h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); line-height: 1.35; margin: 14px 0 12px; }
.a-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; color: var(--muted); font-size: 14.5px; }
.a-meta i { width: 5px; height: 5px; border-radius: 50%; background: var(--champ); }
.a-rail { display: flex; gap: 22px; align-items: center; margin-top: 16px; flex-wrap: wrap; }
.a-rail > span { display: inline-flex; gap: 10px; align-items: center; font-size: 14px; color: var(--muted); }
.icon-btn.is-saved { background: var(--teal); color: #fff; border-color: var(--teal); }
.a-cover { position: relative; margin-top: 26px; }
.a-cover .media-fill { aspect-ratio: 21 / 10; border-radius: 24px; }
.cover-credit { display: block; font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.a-wrap { display: grid; grid-template-columns: 210px minmax(0, 700px) 270px; gap: 40px; justify-content: center; align-items: start; margin-top: 40px; }
.toc { position: sticky; top: 90px; font-size: 15px; grid-column: 1; grid-row: 1; }
.toc b { display: block; font: 700 1.05rem/1.4 var(--serif); margin-bottom: 8px; }
.toc a { display: block; padding: 8px 12px; border-inline-start: 3px solid var(--line); color: var(--ink-2); line-height: 1.6; }
.toc a:hover { border-inline-start-color: var(--champ); color: var(--ink); }
#articleContent { grid-column: 2; grid-row: 1; min-width: 0; }
.a-side { grid-column: 3; grid-row: 1; display: flex; flex-direction: column; gap: 20px; }
.article-body { font: 400 1.25rem/2.15 var(--read); color: #243635; overflow-wrap: break-word; }
.article-body p { margin-bottom: 22px; }
.article-body h2 { font-size: 1.75rem; margin: 36px 0 12px; scroll-margin-top: 90px; }
.article-body h3 { font-size: 1.4rem; margin: 28px 0 10px; }
.article-body ul, .article-body ol { padding-inline-start: 26px; margin-bottom: 22px; }
.article-body li { margin-bottom: 8px; }
.article-body li::marker { color: var(--teal); }
.article-body a { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }
.article-body img { border-radius: 16px; margin: 24px 0; }
.article-body blockquote, .pull-quote { margin: 32px 0; padding-block: 4px; padding-inline: 22px 0; border-inline-start: 4px solid var(--champ); font: 600 1.55rem/1.7 var(--serif); color: var(--teal); }
.sources { margin-top: 38px; background: var(--paper); border: 1.5px solid var(--line); border-radius: 18px; padding: 20px 24px; font: 400 15.5px/1.9 var(--sans); }
.sources h2, .sources h3 { margin: 0 0 8px; font-size: 1.25rem; }
.sources ul, .sources ol, .sources p { margin-bottom: 0; }
.a-end { display: flex; justify-content: center; padding: 30px 0; }
.a-end i { width: 11px; height: 11px; background: var(--champ); transform: rotate(45deg); }
.side-box { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.side-box h3 { font-size: 1.15rem; margin-bottom: 8px; }
.side-box.dark { background: var(--deep); border-color: var(--deep); color: #B9D2CF; }
.side-box.dark h3 { color: #fff; }
.side-box.dark p { font-size: 15px; margin-bottom: 14px; }
.mini { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); align-items: flex-start; }
.mini:first-child { border-top: 0; }
.mini .media-fill { width: 68px; height: 68px; border-radius: 12px; flex: none; }
.mini h4 { font-size: .98rem; line-height: 1.6; }
.mini .meta { font-size: 12.5px; }
.comments { margin-top: 10px; background: var(--mist); border-radius: 20px; padding: 24px; }
.comments h2 { font-size: 1.45rem; }
.comments-sub { color: var(--muted); font-size: 15px; margin-bottom: 14px; }
.comment-form { display: grid; gap: 10px; }
.comment-form input, .comment-form textarea { width: 100%; border: 1px solid #C9DAD7; border-radius: 12px; padding: 12px 14px; font-size: 16px; background: var(--paper); color: var(--ink); }
.comment-form button { justify-self: start; min-height: 46px; padding: 10px 24px; border: 0; border-radius: 99px; background: var(--teal); color: #fff; font-weight: 600; cursor: pointer; }
.comment-list { margin-top: 16px; display: grid; gap: 10px; }
.comment-bubble { background: var(--paper); border-radius: 14px; padding: 12px 16px; }
.comment-bubble-name { font-weight: 600; margin-inline-end: 10px; }
.comment-bubble-time, .comment-empty { font-size: 13px; color: var(--muted); }
.related { padding-top: 8px; }

/* motion + loading */
.skeleton { position: relative; overflow: hidden; background: var(--mist); border-radius: 12px; }
.skeleton::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.7), transparent); animation: shimmer 1.4s infinite; }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in-view { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } .skeleton::after { animation: none; } html { scroll-behavior: auto; } }

@media (max-width: 1100px) {
  .ages { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .a-wrap { grid-template-columns: minmax(0, 720px); }
  .toc { display: none; }
  #articleContent { grid-column: 1; grid-row: auto; }
  .a-side { grid-column: 1; grid-row: auto; }
}
@media (max-width: 900px) {
  .cover-grid, .feature { grid-template-columns: minmax(0, 1fr); }
  .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trust { grid-template-columns: 1fr; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  :root { --wrap: calc(100% - 32px); }
  .mast { grid-template-columns: auto 1fr; gap: 12px; padding-block: 12px; }
  .mast-tag { display: none; }
  .brand { justify-self: start; gap: 8px; }
  .brand .mark { width: 40px; height: 40px; }
  .brand .wm { font-size: 36px; }
  .hd-actions { gap: 8px; }
  .icon-btn { width: 44px; height: 44px; }
  .menu-btn { display: inline-grid; }
  #mainNav { justify-content: flex-start; }
  .topstrip .soc { display: none; }
  .ages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .side-it .media-fill { width: 96px; height: 96px; }
  .feature { padding: 20px; }
  .ask { padding: 30px 22px; }
  .a-cover .media-fill { aspect-ratio: 16 / 11; border-radius: 18px; }
}
@media (max-width: 560px) {
  .grid3 { grid-template-columns: minmax(0, 1fr); }
  .footer-grid, .stats { grid-template-columns: 1fr; }
}
