/* ==========================================================================
   Sadin Bangla – public site design system
   Editorial newspaper look: white paper, dark ink, flag red & green accents.
   No build step required. Mobile-first.
   ========================================================================== */

:root {
  --red: #D7191F;
  --red-dark: #A8131A;
  --green: #00843D;
  --green-dark: #006830;
  --ink: #141414;
  --ink-2: #333;
  --muted: #6a6a6a;
  --line: #e4e4e1;
  --line-strong: #cfcfca;
  --paper: #fff;
  --paper-soft: #f6f5f2;
  --band: #151515;
  --band-ink: #f2f2f2;

  --serif: "Noto Serif Bengali", "Noto Serif", Georgia, "Times New Roman", serif;
  --sans: "Noto Sans Bengali", "Noto Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --wrap: 1240px;
  --gutter: 16px;
  --gap: 24px;
  --radius: 2px;
}
html[lang="en"] { --serif: "Noto Serif", Georgia, "Times New Roman", serif; --sans: "Noto Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 64px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 16px; line-height: 1.6;
  text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--red); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.35; margin: 0; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 100; }
.skip-link:focus { left: 8px; color: #fff; }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Staging / demo banners ---------- */
.env-banner { background: #fff4c2; color: #5a4a00; font-size: 13px; text-align: center; padding: 4px var(--gutter); }

/* ---------- Top utility bar ---------- */
.topbar { border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.topbar .wrap { display: flex; align-items: center; gap: 16px; min-height: 34px; }
.topbar__date { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__date span + span::before { content: "·"; margin: 0 8px; color: var(--line-strong); }
.topbar__right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.topbar__social { display: none; gap: 10px; }
.topbar__social a { display: inline-flex; }
.topbar__social .icon { width: 16px; height: 16px; }
.topbar a:hover { color: var(--red); }

/* ---------- Masthead ---------- */
.masthead .wrap { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding-top: 10px; padding-bottom: 10px; }
.masthead__left, .masthead__right { display: flex; align-items: center; gap: 6px; }
.masthead__right { justify-content: flex-end; }
.masthead__logo img { height: 46px; width: auto; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; }
.icon-btn:hover { background: var(--paper-soft); color: var(--ink); }
.lang-switch { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; overflow: hidden; font-size: 13px; font-weight: 600; }
.lang-switch a { padding: 8px 12px; min-height: 36px; display: inline-flex; align-items: center; color: var(--muted); }
.lang-switch a[aria-current="true"] { background: var(--ink); color: #fff; }
.masthead__tagline { display: none; }

/* ---------- Main navigation ---------- */
.nav { border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 40; }
.nav.is-stuck { box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.nav__inner { display: flex; align-items: stretch; }
.nav__home { display: inline-flex; align-items: center; padding: 0 12px 0 0; }
.nav__home .icon { width: 18px; height: 18px; }
.nav__list { display: flex; list-style: none; margin: 0; padding: 0; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.nav__list::-webkit-scrollbar { display: none; }
.nav__item { position: relative; flex: none; }
.nav__link { display: block; padding: 11px 12px; font-weight: 600; font-size: 15px; white-space: nowrap; }
.nav__link[aria-current="page"] { color: var(--red); box-shadow: inset 0 -3px 0 var(--red); }
.nav__drop { display: none; }

/* ---------- Breaking ticker ---------- */
.ticker { border-bottom: 1px solid var(--line); background: var(--paper); }
.ticker .wrap { display: flex; align-items: center; gap: 12px; min-height: 40px; overflow: hidden; }
.ticker__label { flex: none; background: var(--red); color: #fff; font-weight: 700; font-size: 13px; padding: 3px 10px; border-radius: var(--radius); }
.ticker__viewport { flex: 1; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); }
.ticker__track { display: inline-flex; gap: 40px; white-space: nowrap; animation: ticker var(--ticker-speed, 60s) linear infinite; padding-left: 8px; }
.ticker:hover .ticker__track, .ticker:focus-within .ticker__track { animation-play-state: paused; }
.ticker__item { font-size: 15px; font-weight: 500; }
.ticker__item::before { content: ""; display: inline-block; width: 6px; height: 6px; background: var(--red); border-radius: 50%; margin-right: 10px; vertical-align: middle; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Drawer (mobile & "all sections") ---------- */
.drawer { position: fixed; inset: 0; z-index: 60; visibility: hidden; }
.drawer.is-open { visibility: visible; }
.drawer__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); opacity: 0; transition: opacity .2s; }
.drawer.is-open .drawer__backdrop { opacity: 1; }
.drawer__panel { position: absolute; top: 0; bottom: 0; left: 0; width: min(360px, 88vw); background: var(--paper); overflow-y: auto; transform: translateX(-100%); transition: transform .25s ease; padding: 12px 20px 40px; }
.drawer.is-open .drawer__panel { transform: none; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.drawer__head img { height: 34px; width: auto; }
.drawer__search { margin: 16px 0; }
.drawer__group { border-bottom: 1px solid var(--line); padding: 10px 0; }
.drawer__group > a { font-weight: 700; font-size: 16px; display: block; padding: 4px 0; }
.drawer__sub { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; font-size: 14px; color: var(--ink-2); }
body.no-scroll { overflow: hidden; }

/* ---------- Search overlay ---------- */
.search-panel { display: none; border-bottom: 1px solid var(--line); background: var(--paper-soft); }
.search-panel.is-open { display: block; }
.search-panel .wrap { padding-top: 14px; padding-bottom: 14px; }
.search-form { display: flex; gap: 8px; }
.search-form input { flex: 1; min-width: 0; font: inherit; font-size: 17px; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: #fff; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-weight: 600; padding: 10px 18px; border-radius: var(--radius); background: var(--ink); color: #fff; }
.btn:hover { background: var(--red); color: #fff; }
.btn--red { background: var(--red); }
.btn--red:hover { background: var(--red-dark); }
.btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); }
.btn--ghost:hover { border-color: var(--ink); background: transparent; color: var(--ink); }

/* ---------- Ads ---------- */
.ad { display: flex; flex-direction: column; align-items: center; margin: 20px auto; }
.ad__label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.ad img { max-width: 100%; height: auto; }
.ad--sticky-mobile { position: fixed; bottom: 0; left: 0; right: 0; z-index: 45; margin: 0; background: #fff; box-shadow: 0 -2px 10px rgba(0,0,0,.1); padding: 4px; }
.ad__close { position: absolute; right: 4px; top: -22px; background: #fff; border-radius: 2px 2px 0 0; font-size: 12px; padding: 2px 8px; box-shadow: 0 -2px 6px rgba(0,0,0,.08); }
.only-desktop { display: none !important; }

/* ---------- Section heading ---------- */
.section { margin: 28px 0 36px; }
.section__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--ink); padding-top: 10px; margin-bottom: 16px; }
.section__title { font-size: 21px; font-weight: 700; position: relative; padding-left: 14px; }
.section__title::before { content: ""; position: absolute; left: 0; top: .25em; bottom: .25em; width: 4px; background: var(--red); }
.section__title a:hover { color: var(--red); }
.section__more { font-size: 14px; font-weight: 600; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; min-height: 36px; padding: 0 2px; }
.section__more .icon { width: 16px; height: 16px; }
.section__subs { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; color: var(--muted); margin: -8px 0 14px; }

/* ---------- Cards ---------- */
.card { position: relative; min-width: 0; }
.card__link { display: block; }
.card__media { position: relative; aspect-ratio: 16 / 10; background: var(--paper-soft); overflow: hidden; margin-bottom: 10px; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card__link:hover .card__media img { transform: scale(1.03); }
.card__media--empty { display: flex; align-items: center; justify-content: center; }
.card__media--empty img { width: 40%; height: auto; object-fit: contain; opacity: .25; filter: grayscale(1); transform: none !important; }
.card__badge { position: absolute; left: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 4px; background: rgba(0,0,0,.72); color: #fff; font-size: 12px; padding: 3px 8px; border-radius: var(--radius); }
.card__badge .icon { width: 14px; height: 14px; }
.kicker { display: inline-block; color: var(--red); font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.card__title { font-size: 18px; font-weight: 600; line-height: 1.4; }
.card__link:hover .card__title { color: var(--red); }
.card__summary { color: var(--ink-2); font-size: 15px; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card__meta { color: var(--muted); font-size: 13px; margin-top: 6px; }
.card--xl .card__title { font-size: 26px; line-height: 1.3; font-weight: 700; }
.card--xl .card__summary { font-size: 16px; -webkit-line-clamp: 4; }
.card--lg .card__title { font-size: 21px; }
.card--sm .card__title { font-size: 16px; }
.card--text { padding: 12px 0; border-top: 1px solid var(--line); }
.card--text .card__title { font-size: 16px; }
.card--thumb .card__link { display: grid; grid-template-columns: 1fr 112px; gap: 12px; align-items: start; }
.card--thumb .card__media { margin: 0; aspect-ratio: 4 / 3; order: 2; }
.card--thumb .card__title { font-size: 16px; }
.card--thumb { padding: 12px 0; border-top: 1px solid var(--line); }

/* ---------- Grids ---------- */
.grid { display: grid; gap: var(--gap); }
.grid-4, .grid-3 { grid-template-columns: 1fr; gap: 0; }
.grid-4 > .card, .grid-3 > .card { padding: 12px 0; border-top: 1px solid var(--line); }
.grid-4 > .card:first-child, .grid-3 > .card:first-child { border-top: 0; padding-top: 0; }
/* mobile: cards after the first become thumb rows */
.grid-4 > .card:not(:first-child) .card__link,
.grid-3 > .card:not(:first-child) .card__link { display: grid; grid-template-columns: 1fr 112px; gap: 12px; }
.grid-4 > .card:not(:first-child) .card__media,
.grid-3 > .card:not(:first-child) .card__media { order: 2; margin: 0; aspect-ratio: 4 / 3; }
.grid-4 > .card:not(:first-child) .card__summary,
.grid-3 > .card:not(:first-child) .card__summary { display: none; }

/* Lead block */
.lead { display: grid; gap: var(--gap); }
.lead__main .card__media { aspect-ratio: 16 / 9; }
.lead__side { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.lead__side .card__title { font-size: 16px; }
.lead__rail { border-top: 1px solid var(--ink); }

/* Tabs (latest / most read rail) */
.tabs__bar { display: flex; border-bottom: 1px solid var(--line); }
.tabs__btn { flex: 1; padding: 10px 6px; font-weight: 700; font-size: 15px; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs__btn[aria-selected="true"] { color: var(--ink); border-color: var(--red); }
.tabs__panel[hidden] { display: none; }
.rail-list { list-style: none; margin: 0; padding: 0; }
.rail-list li { border-bottom: 1px solid var(--line); }
.rail-list a { display: flex; gap: 10px; padding: 10px 0; font-size: 15px; font-weight: 500; line-height: 1.45; }
.rail-list time { flex: none; color: var(--red); font-size: 12px; font-weight: 600; min-width: 64px; padding-top: 2px; }
.rail-more { display: block; text-align: center; font-weight: 600; font-size: 14px; padding: 10px; color: var(--muted); }

/* Ranked list (most read) */
.ranked { list-style: none; margin: 0; padding: 0; counter-reset: rank; display: grid; gap: 0 var(--gap); }
.ranked li { counter-increment: rank; display: grid; grid-template-columns: 44px 1fr; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); align-items: start; }
.ranked li::before { content: counter(rank); font-family: var(--serif); font-size: 32px; font-weight: 700; line-height: 1; color: var(--line-strong); }
html[lang="bn"] .ranked li::before { content: counter(rank, bengali); }
.ranked a { font-family: var(--serif); font-weight: 600; font-size: 16px; line-height: 1.45; }

/* Category split block */
.split { display: grid; gap: var(--gap); }
.split__list { display: grid; gap: 0; }

/* Dark media bands */
.band { background: var(--band); color: var(--band-ink); padding: 28px 0 32px; margin: 36px 0; }
.band .section { margin: 0; }
.band .section__head { border-color: #444; }
.band .section__more { color: #aaa; }
.band .card__title { color: var(--band-ink); }
.band .card__link:hover .card__title { color: #ff8a8e; }
.band .card__meta { color: #999; }
.band .card__media { background: #222; }
.scroller { display: grid; grid-auto-flow: column; grid-auto-columns: 78%; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: thin; }
.scroller > * { scroll-snap-align: start; }
.play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.play span { width: 54px; height: 54px; border-radius: 50%; background: rgba(215, 25, 31, .9); display: flex; align-items: center; justify-content: center; }
.play .icon { width: 22px; height: 22px; fill: #fff; stroke: none; margin-left: 3px; }

/* Newsletter */
.newsletter { background: var(--paper-soft); border-top: 3px solid var(--green); padding: 24px; display: grid; gap: 14px; }
.newsletter h2 { font-size: 22px; }
.newsletter p { color: var(--ink-2); margin: 0; }
.newsletter form { display: flex; gap: 8px; flex-wrap: wrap; }
.newsletter input[type="email"] { flex: 1 1 220px; font: inherit; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: #fff; }
.hp { position: absolute; left: -9999px; }
.flash { background: #e9f6ee; color: var(--green-dark); border-left: 4px solid var(--green); padding: 10px 14px; margin: 16px 0; font-weight: 500; }

/* ---------- Page layout with sidebar ---------- */
.layout { display: grid; gap: 32px; margin-top: 20px; }
.sidebar { display: grid; gap: 28px; align-content: start; }
.sidebar .section { margin: 0; }
.breadcrumb { font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px; margin: 16px 0 4px; list-style: none; padding: 0; }
.breadcrumb li + li::before { content: "›"; margin-right: 4px; color: var(--line-strong); }
.page-title { font-size: 28px; padding: 6px 0 12px; border-bottom: 1px solid var(--ink); margin-bottom: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.chip { display: inline-block; font-size: 14px; padding: 4px 12px; border: 1px solid var(--line-strong); border-radius: 999px; }
.chip:hover { border-color: var(--red); }
.empty { padding: 40px 0; color: var(--muted); text-align: center; }

/* ---------- Article ---------- */
.article__head { margin: 8px 0 18px; }
.article__kicker { color: var(--red); font-weight: 700; font-size: 15px; }
.article__title { font-size: 28px; line-height: 1.32; margin: 6px 0 10px; font-weight: 700; }
.article__subtitle { font-size: 18px; color: var(--ink-2); font-family: var(--serif); font-weight: 500; line-height: 1.55; }
.byline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 12px 0; margin: 16px 0 20px; }
.byline__who { font-size: 14px; color: var(--muted); line-height: 1.5; }
.byline__who strong { color: var(--ink); font-size: 15px; display: block; }
.share { display: flex; gap: 6px; }
.share a, .share button { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid var(--line-strong); color: var(--ink-2); }
.share a:hover, .share button:hover { border-color: var(--red); color: var(--red); }
.share .icon { width: 17px; height: 17px; }
.article__figure { margin: 0 0 22px; }
.article__figure img { width: 100%; }
.article__figure figcaption { font-size: 14px; color: var(--muted); padding: 8px 0; border-bottom: 1px solid var(--line); }
.article__body { font-family: var(--serif); font-size: 19px; line-height: 1.85; color: #1d1d1d; overflow-wrap: anywhere; }
html[lang="en"] .article__body { line-height: 1.75; }
.article__body p { margin: 0 0 1.15em; }
.article__body h2, .article__body h3 { margin: 1.4em 0 .6em; font-size: 1.2em; }
.article__body img { margin: 1em auto; height: auto !important; }
.article__body figure { margin: 1.4em 0; }
.article__body figcaption { font-family: var(--sans); font-size: 14px; color: var(--muted); padding-top: 6px; }
.article__body blockquote { margin: 1.4em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--red); font-size: 1.08em; color: var(--ink-2); }
.article__body a { color: var(--red); text-decoration: underline; text-underline-offset: 3px; }
.article__body iframe, .article__body video { max-width: 100%; }
.article__body table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 15px; }
.article__body td, .article__body th { border: 1px solid var(--line); padding: 6px 8px; }
.video-embed { position: relative; aspect-ratio: 16/9; background: #000; margin-bottom: 20px; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.gallery-items { display: grid; gap: 20px; margin: 20px 0; }
.gallery-items figure { margin: 0; }
.gallery-items figcaption { font-size: 15px; color: var(--ink-2); padding-top: 6px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0; padding-top: 16px; border-top: 1px solid var(--line); }
.updated { font-size: 13px; color: var(--muted); }
.demo-note { background: #fff4c2; border: 1px solid #ecd77a; color: #5a4a00; padding: 8px 12px; font-size: 14px; margin-bottom: 14px; }

/* Static page */
.prose { font-size: 17px; line-height: 1.85; max-width: 760px; }
.prose h2 { margin: 1.4em 0 .5em; font-size: 22px; }
.prose a { color: var(--red); text-decoration: underline; }

/* Profile */
.profile { display: flex; gap: 18px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.profile img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; background: var(--paper-soft); }
.profile h1 { font-size: 26px; }
.profile p { color: var(--muted); margin: 4px 0 0; }

/* Pagination */
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 28px 0; list-style: none; padding: 0; }
.pagination a, .pagination span { display: inline-flex; min-width: 40px; height: 40px; align-items: center; justify-content: center; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--radius); font-weight: 600; }
.pagination [aria-current="page"] span { background: var(--ink); color: #fff; border-color: var(--ink); }
.pagination .is-disabled span { color: var(--line-strong); }

/* ---------- Footer ---------- */
.footer { margin-top: 48px; background: var(--paper-soft); border-top: 3px solid var(--red); font-size: 14px; color: var(--ink-2); }
.footer__top { display: grid; gap: 28px; padding: 32px 0 24px; }
.footer__brand img { height: 50px; width: auto; margin-bottom: 10px; }
.footer__brand p { max-width: 420px; }
.footer h3 { font-family: var(--sans); font-size: 14px; font-weight: 700; letter-spacing: .03em; margin-bottom: 10px; color: var(--ink); }
.footer__links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; }
.footer__social { display: flex; gap: 8px; }
.footer__social a { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 50%; background: #fff; border: 1px solid var(--line); }
.footer__bottom { border-top: 1px solid var(--line-strong); padding: 14px 0 20px; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; color: var(--muted); font-size: 13px; }
body.has-sticky-ad .footer { padding-bottom: 64px; }

/* ==========================================================================
   Tablet ≥ 640px
   ========================================================================== */
@media (min-width: 640px) {
  .masthead__logo img { height: 58px; }
  .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); gap: var(--gap); }
  .grid-4 > .card, .grid-3 > .card { padding: 0; border: 0; }
  .grid-4 > .card:not(:first-child) .card__link,
  .grid-3 > .card:not(:first-child) .card__link { display: block; }
  .grid-4 > .card:not(:first-child) .card__media,
  .grid-3 > .card:not(:first-child) .card__media { margin-bottom: 10px; aspect-ratio: 16 / 10; }
  .ranked { grid-template-columns: 1fr 1fr; }
  .scroller { grid-auto-columns: 42%; }
  .gallery-items { grid-template-columns: 1fr 1fr; }
  .footer__top { grid-template-columns: 1.4fr 1fr 1fr; }
  .article__title { font-size: 34px; }
  .topbar__social { display: flex; }
}

/* ==========================================================================
   Desktop ≥ 1024px
   ========================================================================== */
@media (min-width: 1024px) {
  .only-desktop { display: flex !important; }
  .only-mobile { display: none !important; }
  .masthead .wrap { padding-top: 16px; padding-bottom: 14px; }
  .masthead__logo { text-align: center; }
  .masthead__logo img { height: 74px; margin: 0 auto; }
  .masthead__tagline { display: block; font-size: 13px; color: var(--muted); }
  .nav__inner { justify-content: center; }
  .nav__list { overflow: visible; }
  .nav__item:hover > .nav__drop, .nav__item:focus-within > .nav__drop { display: block; }
  .nav__drop { position: absolute; top: 100%; left: 0; min-width: 220px; background: #fff; border: 1px solid var(--line); border-top: 2px solid var(--red); box-shadow: 0 8px 24px rgba(0,0,0,.08); list-style: none; margin: 0; padding: 6px 0; z-index: 50; }
  .nav__drop a { display: block; padding: 7px 16px; font-size: 14px; white-space: nowrap; }
  .nav__drop a:hover { background: var(--paper-soft); }

  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }

  .lead { grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr) minmax(0, 1.05fr); gap: 28px; }
  .lead__main .card__title { font-size: 32px; }
  .lead__side { grid-template-columns: 1fr; gap: 20px; align-content: start; border-left: 1px solid var(--line); padding-left: 28px; }
  .lead__side .card__title { font-size: 17px; }
  .lead__rail { border-top: 0; border-left: 1px solid var(--line); padding-left: 24px; }

  .split { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; }
  .split__list { grid-template-columns: 1fr 1fr; gap: 0 24px; align-content: start; }
  .split__list .card--thumb:nth-child(-n+2) { border-top: 0; padding-top: 0; }

  .ranked { grid-template-columns: repeat(2, 1fr); }
  .scroller { grid-auto-columns: calc((100% - 48px) / 4); overflow: visible; }

  .layout { grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; }
  .layout--article .main { max-width: 760px; }
  .sidebar { position: sticky; top: 70px; }
  .article__title { font-size: 38px; }
  .article__subtitle { font-size: 20px; }
  .ad--sticky-mobile { display: none !important; }
  body.has-sticky-ad .footer { padding-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .ticker__track { animation: none; flex-wrap: wrap; white-space: normal; }
  .card__media img, .drawer__panel, .drawer__backdrop { transition: none; }
}

@media print {
  .topbar, .nav, .ticker, .ad, .sidebar, .footer, .share, .masthead__left, .masthead__right { display: none !important; }
  .article__body { font-size: 12pt; }
}

/* Homepage section mobile layouts chosen in Admin → Homepage layout */
@media (max-width: 639px) {
  .m-grid-2 .grid-4, .m-grid-2 .grid-3 { grid-template-columns: 1fr 1fr; gap: 16px; }
  .m-grid-2 .grid > .card { padding: 0; border: 0; }
  .m-grid-2 .grid > .card .card__link { display: block !important; }
  .m-grid-2 .grid > .card .card__media { margin: 0 0 8px !important; aspect-ratio: 16 / 10 !important; }
  .m-grid-2 .card__title { font-size: 15px; }
  .m-carousel .grid-4, .m-carousel .grid-3, .m-carousel .split__list { display: grid; grid-auto-flow: column; grid-auto-columns: 78%; grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; gap: 16px; }
  .m-carousel .grid > .card { padding: 0; border: 0; scroll-snap-align: start; }
  .m-carousel .grid > .card .card__link { display: block !important; }
  .m-carousel .grid > .card .card__media { margin: 0 0 8px !important; aspect-ratio: 16 / 10 !important; }
}

/* ---------- Contributor area ---------- */
.contrib { max-width: 980px; margin: 24px auto 0; }
.contrib--narrow { max-width: 520px; }
.cbox { background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--red); padding: 22px; margin-bottom: 20px; }
.cbox h1 { font-size: 24px; margin-bottom: 6px; }
.cbox h2 { font-size: 18px; margin-bottom: 10px; }
.cmuted { color: var(--muted); font-size: 14px; }
.cfield { margin: 14px 0; }
.cfield label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 5px; }
.cinput, .ctextarea, .cselect { width: 100%; font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: #fff; color: var(--ink); }
.cinput:focus, .ctextarea:focus, .cselect:focus { outline: 2px solid var(--red); outline-offset: 0; border-color: var(--red); }
.ctextarea { min-height: 100px; resize: vertical; }
.chint { color: var(--muted); font-size: 13px; margin-top: 4px; }
.cerror { color: var(--red); font-size: 14px; margin-top: 4px; }
.ccheck { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; margin: 12px 0; }
.ccheck input { margin-top: 4px; }
.cgrid { display: grid; gap: 14px; }
.calert { padding: 12px 14px; margin-bottom: 16px; border-left: 4px solid; font-weight: 500; }
.calert--ok { background: #e9f6ee; border-color: var(--green); color: var(--green-dark); }
.calert--err { background: #fdecec; border-color: var(--red); color: #8d1616; }
.calert--info { background: #eef4ff; border-color: #2563EB; color: #1f3f8f; }
.cstats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 18px; }
.cstat { background: var(--paper-soft); padding: 12px; text-align: center; }
.cstat b { display: block; font-size: 24px; font-family: var(--serif); }
.ctable { width: 100%; border-collapse: collapse; font-size: 15px; }
.ctable td, .ctable th { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.ctable th { font-size: 13px; color: var(--muted); font-weight: 600; }
.cbadge { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: #eceef1; color: #50555c; white-space: nowrap; }
.cbadge--pending, .cbadge--under_review { background: #fff3d6; color: #8a5a00; }
.cbadge--approved, .cbadge--published, .cbadge--scheduled { background: #e3f4ea; color: #0b6b35; }
.cbadge--rejected { background: #fde4e4; color: #a01b1b; }
.cnav { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 16px; font-weight: 600; font-size: 15px; }
.cnav a[aria-current="page"] { color: var(--red); }
@media (min-width: 640px) { .cgrid--2 { grid-template-columns: 1fr 1fr; } .cstats { grid-template-columns: repeat(4, 1fr); } }

/* DEMO content marker */
.demo-badge { display: inline-block; background: #fff4c2; color: #5a4a00; border: 1px solid #ecd77a; font: 700 11px/1 var(--sans); letter-spacing: .06em; padding: 3px 6px; border-radius: 2px; margin: 0 6px 4px 0; vertical-align: middle; }
