/* JagoAmerica — classic American newspaper style. System serif stack, one accent. */
:root {
    --ink: #141414;
    --muted: #5a5a5a;
    --line: #d9d9d9;
    --accent: #b3001b;
    --paper: #ffffff;
    --wash: #f6f4ef;
    --serif: Georgia, 'Times New Roman', Times, serif;
    --sans: -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--serif); line-height: 1.55; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }

.topbar { border-bottom: 1px solid var(--line); font-family: var(--sans); font-size: 12.5px; color: var(--muted); }
.topbar-in { display: flex; justify-content: space-between; padding-top: 6px; padding-bottom: 6px; }
.topbar-links a { margin-left: 14px; }

.masthead { text-align: center; padding: 18px 0 10px; border-bottom: 3px double var(--ink); }
.brand { font-family: var(--serif); font-weight: 900; font-size: clamp(38px, 7vw, 64px); letter-spacing: 1px; line-height: 1; }
.brand span { color: var(--accent); }
.tagline { margin: 6px 0 4px; font-style: italic; color: var(--muted); font-size: clamp(14px, 2.4vw, 18px); }

.mainnav { border-bottom: 1px solid var(--ink); font-family: var(--sans); }
.nav-in { display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: center; padding-top: 8px; padding-bottom: 8px; }
.nav-in a { font-weight: 600; font-size: 14.5px; text-transform: uppercase; letter-spacing: .4px; }
.nav-search { margin-left: auto; display: flex; gap: 6px; }
.nav-search input { padding: 5px 8px; border: 1px solid var(--line); font-family: var(--sans); }
.nav-search button, .search-form button { background: var(--ink); color: #fff; border: 0; padding: 6px 12px; cursor: pointer; font-family: var(--sans); }

.kicker { font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--accent); margin: 0 0 4px; }
.byline-sm { font-family: var(--sans); font-size: 12.5px; color: var(--muted); margin: 6px 0 0; }

.lead-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 28px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.lead-grid.single { grid-template-columns: 1fr; }
.lead-story h1, .lead-story h2 { font-size: clamp(26px, 4.2vw, 40px); line-height: 1.15; margin: 0 0 8px; }
.lead-dek { font-size: 18px; color: #333; margin: 0 0 12px; }
.lead-media { display: block; background: var(--wash); min-width: 0; overflow: hidden; }
.lead-media img { width: 100%; height: auto; }
.card-media-fallback { display: flex; align-items: center; justify-content: center; min-height: 150px; background: var(--wash); color: var(--muted); font-family: var(--sans); text-transform: uppercase; letter-spacing: 2px; font-size: 13px; }
.card-media-fallback.big { min-height: 320px; font-size: 16px; }
.side-head, .shelf-head { font-family: var(--sans); font-size: 15px; text-transform: uppercase; letter-spacing: 1.2px; border-bottom: 2px solid var(--ink); padding-bottom: 6px; margin: 0 0 14px; }
.side-item { border-bottom: 1px solid var(--line); padding: 10px 0; }
.side-item h3 { margin: 0; font-size: 17px; line-height: 1.3; }

.shelf { padding: 20px 0 4px; }
.card-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 22px; }
.card-title { font-size: 19px; line-height: 1.3; margin: 4px 0; }
.card-dek { color: #333; font-size: 15px; margin: 4px 0; }
.card-media { display: block; background: var(--wash); margin-bottom: 8px; }
.card-media img { aspect-ratio: 16/9; object-fit: cover; width: 100%; }

.river { display: flex; flex-direction: column; }
.river-item { display: grid; grid-template-columns: 220px 1fr; gap: 18px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.river-item h3 { margin: 2px 0 4px; font-size: 20px; line-height: 1.3; }
.river-media img { aspect-ratio: 16/10; object-fit: cover; width: 100%; }

.most-read { list-style: none; margin: 0; padding: 0; }
.most-read li { display: flex; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.mr-num { font-size: 30px; font-weight: 900; color: var(--accent); line-height: 1; }
.most-read h3 { margin: 0; font-size: 17px; }

.follow-strip { text-align: center; background: var(--wash); border: 1px solid var(--line); padding: 22px 16px; margin: 26px 0 34px; }
.follow-row a { font-family: var(--sans); font-weight: 600; margin-right: 14px; color: var(--accent); }
.follow-row.big a { font-size: 17px; }

.desk-head { padding: 24px 0 6px; border-bottom: 3px double var(--ink); margin-bottom: 8px; }
.desk-head h1 { font-size: clamp(30px, 5vw, 44px); margin: 0 0 6px; }
.desk-intro { font-size: 17px; color: #333; max-width: 720px; }

.article { max-width: 760px; margin: 0 auto; padding: 22px 0 6px; }
.article-title { font-size: clamp(28px, 4.6vw, 42px); line-height: 1.16; margin: 0 0 8px; }
.article-dek { font-size: 19px; color: #333; margin: 0 0 14px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-family: var(--sans); font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 8px 0; margin-bottom: 16px; }
.article-hero { margin: 0 0 18px; }
.article-hero figcaption { font-family: var(--sans); font-size: 12.5px; color: var(--muted); padding-top: 6px; }
.answer-box { background: var(--wash); border-left: 4px solid var(--accent); padding: 14px 18px; margin: 0 0 20px; }
.answer-box h2 { font-family: var(--sans); font-size: 13px; text-transform: uppercase; letter-spacing: 1.2px; margin: 0 0 6px; }
.answer-box p { margin: 0; font-size: 17px; }
.article-body { font-size: 18px; }
.article-body h2 { font-size: 24px; margin: 26px 0 8px; }
.article-body p { margin: 0 0 14px; }
.video-embed { margin: 0 0 20px; }
.video-embed iframe { width: 100%; aspect-ratio: 16/9; border: 0; }
/* Facebook Reels play vertically: narrow, centred, 9:16. */
.video-embed.vertical { max-width: 400px; margin-left: auto; margin-right: auto; }
.video-embed.vertical iframe { aspect-ratio: 9/16; }
/* Share row (article cards + article page): plain links, no SDK, no tracking. */
.share-row { display: flex; flex-wrap: nowrap; gap: 14px; align-items: center; margin: 12px 0 0; font-family: var(--sans); }
.share-row .share-label { font-weight: 700; font-size: 15px; color: var(--ink); white-space: nowrap; }
.share-btn { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 0; background: none; color: inherit; flex-shrink: 0; border: 0; padding: 0; cursor: pointer; transition: opacity .15s ease; }
.share-btn:hover { opacity: .75; text-decoration: none; }
.share-btn svg { width: 20px; height: 20px; fill: currentColor; display: block; }
.share-btn.facebook { color: #1877f2; }
.share-btn.x { color: #000; }
.share-btn.whatsapp { color: #25d366; }
.share-btn.telegram { color: #229ed9; }
.share-btn.copy { color: #6b7280; }
.share-btn.copy svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.share-btn.copy.copied { color: #1a7f37; }
.sources-box, .author-box { border: 1px solid var(--line); background: #fff; padding: 14px 18px; margin: 22px 0; }
.sources-box h2, .author-box h2 { font-family: var(--sans); font-size: 13px; text-transform: uppercase; letter-spacing: 1.2px; margin: 0 0 8px; }
.sources-box ul { margin: 0; padding-left: 18px; }
.sources-box a { color: var(--accent); }

.page-body { max-width: 760px; margin: 0 auto; padding: 24px 0 30px; font-size: 17px; }
.page-body h1 { font-size: 36px; margin: 0 0 12px; }
.page-body h2 { font-size: 22px; margin: 24px 0 8px; }
.page-body a { color: var(--accent); }

.search-form { display: flex; gap: 8px; margin: 16px 0; max-width: 520px; }
.search-form input { flex: 1; padding: 8px 10px; border: 1px solid var(--line); font-size: 16px; }
.empty-note { padding: 30px 0; color: var(--muted); font-size: 17px; }

.sitefoot { border-top: 3px double var(--ink); margin-top: 30px; background: var(--wash); font-size: 14.5px; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; padding-top: 22px; padding-bottom: 18px; }
.foot-brand { font-weight: 900; font-size: 22px; margin: 0 0 6px; letter-spacing: 1px; }
.foot-head { font-family: var(--sans); font-weight: 700; text-transform: uppercase; font-size: 12.5px; letter-spacing: 1px; margin: 0 0 8px; }
.foot-grid a { display: block; padding: 2px 0; }
.foot-grid .follow-row a { display: inline; padding: 0; }
.foot-base { display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 10px; padding-bottom: 14px; font-family: var(--sans); font-size: 12.5px; color: var(--muted); }

@media (max-width: 820px) {
    .lead-grid { grid-template-columns: 1fr; }
    .foot-grid { grid-template-columns: 1fr 1fr; }
    .river-item { grid-template-columns: 120px 1fr; }
    /* Nav: one horizontally scrollable line instead of wrapping. */
    .nav-in { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
    .nav-in::-webkit-scrollbar { display: none; }
    .nav-in a { flex-shrink: 0; }
    .nav-search { margin-left: auto; flex-shrink: 0; width: auto; }
    .nav-search input { flex: none; width: 140px; }
}

/* ---- Pagination (public): Laravel's default paginator expects Tailwind
   (w-5 h-5), which the public site never loads — without this, the chevron
   SVGs render at full width (giant black/red arrows). The only public page
   that paginates today is the Video hub (/video, 12 per page); the same bug
   hit /admin/articles and was fixed in admin.css. Size them explicitly. ---- */
.w-5 { width: 20px; }
.h-5 { height: 20px; }
nav[aria-label="Pagination Navigation"] { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 16px; }
nav[aria-label="Pagination Navigation"] svg { width: 20px; height: 20px; }
nav[aria-label="Pagination Navigation"] a, nav[aria-label="Pagination Navigation"] span { display: inline-flex; align-items: center; }

/* ---- Article comments (2026-11-19, redesigned 2026-11-20) ---- */
.comments { border-top: 3px double var(--ink); margin-top: 30px; padding-top: 18px; }
.comments h2 { font-size: 24px; margin: 0 0 6px; }
.comment-note { font-family: var(--sans); font-size: 14px; color: var(--muted); }
.comment-note.ok { color: #1e7d32; font-weight: 700; }
.comment-note.err { color: var(--accent); }
.comment-note.err ul { margin: 4px 0; padding-left: 18px; }
.comment { display: flex; gap: 12px; background: var(--wash); border: 1px solid var(--line); border-left: 4px solid var(--accent); padding: 14px 16px; margin: 12px 0; }
.comment-avatar { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #fff; font-family: var(--sans); font-size: 19px; font-weight: 700; line-height: 40px; text-align: center; text-transform: uppercase; }
.comment-main { min-width: 0; flex: 1; }
.comment-head { font-family: var(--sans); font-size: 14px; margin: 0 0 4px; }
.comment-flag { font-size: 16px; }
.comment-country { color: var(--muted); }
.comment-date { color: var(--muted); font-size: 13px; }
.comment-body { margin: 0; font-size: 16.5px; line-height: 1.55; }
.comment-empty { color: var(--muted); font-style: italic; }
.comment-form { margin-top: 22px; background: var(--wash); border: 1px solid var(--line); border-top: 4px solid var(--accent); padding: 18px; }
.comment-form h3 { margin: 0 0 12px; font-size: 20px; }
.comment-form-row { display: flex; gap: 14px; }
.comment-form-row label { flex: 1; }
.comment-form label { display: block; font-family: var(--sans); font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.comment-optional { font-weight: 400; color: var(--muted); }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form textarea { display: block; width: 100%; margin-top: 4px; padding: 9px 10px; border: 1px solid var(--line); font-size: 16px; font-family: var(--sans); background: #fff; box-sizing: border-box; }
.comment-form textarea { resize: vertical; }
.comment-form button { background: var(--accent); color: #fff; border: 0; padding: 10px 22px; font-size: 15px; font-family: var(--sans); font-weight: 700; cursor: pointer; }
.comment-form button:hover { opacity: .88; }
/* Honeypot: kept off-screen, never display:none — bots still fill it, and screen readers ignore it via aria-hidden. */
.comment-honeypot { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; margin: 0; }
@media (max-width: 820px) {
    .comment-form { padding: 14px; }
    .comment-form-row { display: block; }
    .comment { padding: 12px; }
}


/* ---- Reader tools (2026-11-21): text zoom + Listen, on article pages only.
     Small buttons in one row above the article body; the row wraps only on
     very narrow screens. Red accent matches the site theme. ---- */
.reader-tools { display: flex; gap: 8px; align-items: center; margin: 0 0 18px; }
.reader-tools-btn { font-family: var(--sans); font-size: 14px; font-weight: 700; line-height: 1; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 4px; padding: 9px 12px; cursor: pointer; }
.reader-tools-btn:hover { color: var(--accent); border-color: var(--accent); }
.reader-tools-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.reader-tools-btn:disabled { opacity: .4; cursor: default; }
.reader-tools-btn:disabled:hover { color: var(--ink); border-color: var(--line); }
.reader-tools-listen { min-width: 84px; }
.reader-tools-listen.is-speaking { color: #fff; background: var(--accent); border-color: var(--accent); }
/* 2026-11-22: Pause / speed / Stop controls — hidden until reading starts. */
.reader-tools-hidden { display: none; }
.reader-tools-speed { padding: 9px 10px; min-width: 34px; }
.reader-tools-rate { font-family: var(--sans); font-size: 14px; font-weight: 700; line-height: 1; color: var(--ink); min-width: 46px; text-align: center; }
/* 2026-11-22 v2.2: compact reader row on phones — the full row
   (A- A+ Pause - 1x + Stop) must fit a 360px screen so Stop is never
   cut off. Tighter gaps, smaller buttons, and a narrower 1x label. */
@media (max-width: 820px) {
    .reader-tools { gap: 4px; margin-bottom: 14px; overflow-x: auto; }
    .reader-tools-btn { font-size: 13px; padding: 7px 8px; }
    .reader-tools-listen { min-width: 68px; }
    .reader-tools-speed { padding: 7px 8px; min-width: 28px; }
    .reader-tools-rate { font-size: 13px; min-width: 32px; }
}
/* 2026-11-22 v2.3: loading state — a spinner on the Listen button while
   the voice is starting (slow internet), so the reader sees it working. */
.reader-tools-listen.is-loading::after { content: ''; display: inline-block; width: 12px; height: 12px; margin-left: 6px; vertical-align: -2px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: reader-spin .8s linear infinite; }
@keyframes reader-spin { to { transform: rotate(360deg); } }
.reader-tools-fallback { min-width: 0; white-space: nowrap; }
.reader-tools-hint { font-family: var(--sans); font-size: 13px; color: var(--muted); }
/* 2026-11-22: byline name in capitals — the author name is stored as
   "A. Nishad" in the database; the display is uppercased here so the
   byline reads "By A. NISHAD, Editor" and the author box matches. */
.article-meta a, .author-box strong a { text-transform: uppercase; }
/* 2026-11-22: card bylines — the author name on homepage / Related cards
   is wrapped in .byline-author (see partials/article-card.blade.php and
   home.blade.php) so only the name is uppercased, not the date. */
.byline-author { text-transform: uppercase; }
/* Print button (2026-11-22): sits at the far right of the article meta row; opens the browser print dialog. */
.print-btn { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-family: var(--sans); font-size: 13px; font-weight: 700; line-height: 1; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 4px; padding: 7px 10px; cursor: pointer; }
.print-btn:hover { color: var(--accent); border-color: var(--accent); }
.print-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.print-btn svg { width: 15px; height: 15px; }
/* Print-only header/footer (2026-11-22): hidden on screen, shown on print. */
.print-head, .print-foot { display: none; }
/* Print layout (2026-11-22): only the article prints — no masthead, nav, footer, share buttons, reader tools, video embeds, comments or shelves. */
@media print {
  .masthead, .mainnav, .sitefoot, .share-row, .reader-tools, .video-embed, .comments, .shelf, .print-btn, .ad-slot { display: none !important; }
  body { background: #fff; }
  .print-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 3px solid #141414; padding-bottom: 8px; margin-bottom: 18px; }
  .print-brand { font-size: 24px; font-weight: 700; letter-spacing: .5px; }
  .print-brand span { color: #b3001b; }
  .print-brand small { display: block; font-size: 11px; font-weight: 400; letter-spacing: 2px; text-transform: uppercase; color: #666; }
  .print-date { font-family: var(--sans); font-size: 11px; color: #666; }
  .print-foot { display: block; margin-top: 24px; border-top: 1px solid #ccc; padding-top: 10px; font-family: var(--sans); font-size: 11px; color: #666; line-height: 1.6; }
  .article-body { font-size: 12pt; line-height: 1.6; }
  a { color: #000; text-decoration: none; }
  h1, h2, h3 { break-after: avoid; }
  p { orphans: 3; widows: 3; }
  figure, .answer-box { break-inside: avoid; }
}

/* Mobile overflow fix (2026-11-23): long unbroken strings — source URLs shown as link text in the Sources box — overflowed the viewport on phones and let the whole page swipe sideways. Break them wherever they appear. */
.article-body, .article-title, .article-dek, .answer-box, .sources-box, .article-meta { overflow-wrap: break-word; }
.sources-box a, .article-body a { overflow-wrap: anywhere; }
html { overflow-x: hidden; }

/* ---- AdSense slots (2026-11-23): the ad-slot partial renders nothing at
     all unless the pub ID, master switch, slot switch and slot ID are all
     set, so these rules only ever style a real ad. Centred, with vertical
     breathing room; never a visible box of their own. ---- */
.ad-slot { margin: 20px auto; text-align: center; min-width: 0; }
.ad-slot ins.adsbygoogle { display: block; }
@media (max-width: 820px) {
    .ad-slot { margin: 16px auto; }
}
