/* ==========================================================================================================
   Marwar Dainik UI — the homepage's look as global, reusable parts for every inner page.
   Opt-in per page: a page adds `md-ui` to <body> (via @section('body-class', 'md-ui')) and uses these classes, so
   pages that are not converted yet keep their current look. Tokens follow the homepage (Public/Homepage.vue):
   near-white page, white module cards, 8px corners, soft shadow, 18px/800 module titles, pill chips.
   ========================================================================================================== */

:root {
  --md-bg: #f6f7f9;
  --md-card: var(--card-bg, #fff);
  --md-line: #eceef1;
  --md-divider: var(--line, #e5e7eb);
  --md-shadow: 0 1px 3px rgba(16, 24, 40, .06);
  --md-radius: 8px;
  --md-media-radius: 6px;
  --md-gap: 16px;
  --md-ink: var(--ink, #111827);
  --md-muted: var(--muted, #6b7280);
  --md-accent: var(--red, #d52a31);
  --md-accent-text: #b3212a; /* accent as text on tinted surfaces (4.5:1) */
  --md-soft: var(--soft, #f3f4f6);
}
html[data-theme="dark"] {
  --md-bg: var(--page);
  --md-line: var(--line);
  --md-shadow: none;
  --md-accent-text: var(--red-text);
}

body.md-ui { background: var(--md-bg); }

/* ---- Page frame ------------------------------------------------------------------------------------------- */
.md-page { padding-block: 14px 32px; font-family: 'Noto Sans Devanagari', 'Nirmala UI', system-ui, sans-serif; color: var(--md-ink); }
.md-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: var(--md-gap); align-items: start; margin-top: var(--md-gap); }
.md-main { display: flex; flex-direction: column; gap: var(--md-gap); min-width: 0; }
.md-aside { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

/* ---- Module card (the homepage's section-box) ------------------------------------------------------------- */
.md-module { margin: 0; padding: 14px 16px; border: 1px solid var(--md-line); border-radius: var(--md-radius); background: var(--md-card); box-shadow: var(--md-shadow); }
.md-module-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.md-module-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--md-ink); font-size: 18px; line-height: 1.3; font-weight: 800; }
.md-module-head h2 i { color: var(--md-accent); font-size: 17px; }
.md-module-head a { color: var(--md-ink); font-size: 12px; font-weight: 600; white-space: nowrap; }
.md-module-head a:hover { color: var(--md-accent); }

/* ---- Page header: breadcrumb, title on a rule with a red underline segment, description, chips ----------- */
.md-page-head { padding: 12px 18px 0; }
body.md-ui .md-page-head .breadcrumb-trail { width: auto; max-width: none; margin: 0; padding: 0; font-size: 12.5px; }
body.md-ui .breadcrumb-trail ol { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; color: var(--md-muted); font-size: 12.5px; }
body.md-ui .breadcrumb-trail li { display: inline-flex; align-items: center; gap: 4px; }
body.md-ui .breadcrumb-trail li + li::before { content: "›"; margin: 0 2px; color: #9aa3ae; font-size: 15px; line-height: 1; }
body.md-ui .breadcrumb-trail li::after { content: none; } /* style.css adds a "/" separator */
body.md-ui .breadcrumb-trail a { display: inline-flex; align-items: center; gap: 5px; color: var(--md-muted); font-weight: 600; }
body.md-ui .breadcrumb-trail a:hover { color: var(--md-accent); }
body.md-ui .breadcrumb-trail a i { color: var(--md-accent); font-size: 13px; }
body.md-ui .breadcrumb-trail [aria-current="page"] { color: var(--md-ink); font-weight: 700; }
/* The title sits on a hairline with a short red segment under it — the classic news section header. */
.md-page-title { position: relative; margin: 8px 0 0; padding: 0 0 10px; border-bottom: 1px solid var(--md-divider); color: var(--md-ink); font-size: clamp(24px, 2.1vw, 30px); line-height: 1.3; font-weight: 800; letter-spacing: 0; }
.md-page-title::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 64px; height: 3px; border-radius: 2px; background: var(--md-accent); }
.md-page-desc { max-width: 80ch; margin: 10px 0 0; color: var(--md-muted); font-size: 14px; line-height: 1.6; }
.md-page-head > :last-child { margin-bottom: 14px; }
.md-page-head .subcategory-rail { margin: 12px 0 14px; padding: 0; border: 0; }
.md-page-head .subcategory-rail-label { color: var(--md-accent-text); font-size: 12.5px; }

/* Pill chips (sub-categories, child locations, filters). Matches the homepage's subcategory chips. */
.md-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 14px; }
.md-chips a, .md-page-head .subcategory-list a { flex: none; padding: 5px 13px; border: 1px solid var(--md-divider); border-radius: 999px; background: var(--md-soft); color: var(--md-ink); font-size: 12.5px; font-weight: 700; line-height: 1.4; white-space: nowrap; }
.md-chips a:hover, .md-chips a:focus-visible, .md-page-head .subcategory-list a:hover { border-color: var(--md-accent); color: var(--md-accent); }
.md-chips a.is-active, .md-chips a[aria-current="page"], .md-page-head .subcategory-list a.is-active { border-color: var(--md-accent); background: var(--md-accent); color: #fff; }

/* ---- Story card: one markup for every listing (Blade partial md-story / Vue MdStory) ---------------------- */
.md-story { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.md-story-media { display: block; overflow: hidden; border-radius: var(--md-media-radius); background: var(--md-soft); }
.md-story-media img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .3s ease; }
.md-story-media img.is-image-fallback { object-fit: contain; padding: 14%; background: var(--md-soft); }
.md-story:hover .md-story-media img:not(.is-image-fallback) { transform: scale(1.03); }
.md-story-text { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.md-story h3 { display: -webkit-box; margin: 0; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; font-size: 15.5px; line-height: 1.5; font-weight: 700; }
.md-story h3 a { color: var(--md-ink); }
.md-story h3 a:hover { color: var(--md-accent); }
.md-story p { display: -webkit-box; margin: 0; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; color: var(--md-muted); font-size: 13px; line-height: 1.55; }
.md-story-meta { display: inline-flex; align-items: center; gap: 4px; color: var(--md-muted); font-size: 11.5px; font-weight: 600; }
.md-story-meta::before { content: "\F293"; font-family: "bootstrap-icons"; font-size: 11px; font-weight: 400; } /* bi-clock */
.md-story-badge { align-self: flex-start; color: #8a5a00; font-size: 10.5px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }

/* ---- Lead module: a homepage-style hero (headline over the photo) beside compact rows ---------------------- */
.md-lead-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 0 20px; }
.md-lead-grid > .md-story.is-lead { grid-column: 1; grid-row: 1 / span var(--md-rows, 5); }
.md-lead-grid > .md-story.is-row { grid-column: 2; }

.md-story.is-lead { position: relative; min-height: 340px; overflow: hidden; border-radius: 10px; background: #1f2937; }
.md-story.is-lead .md-story-media { position: absolute; inset: 0; border-radius: 0; }
.md-story.is-lead .md-story-media img { width: 100%; height: 100%; aspect-ratio: auto; }
.md-story.is-lead::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, .55) 62%, rgba(0, 0, 0, .9) 100%); pointer-events: none; }
.md-story.is-lead .md-story-text { position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; gap: 6px; padding: 18px 20px 16px; }
.md-story.is-lead h3 { font-size: clamp(19px, 1.6vw, 25px); line-height: 1.4; font-weight: 800; -webkit-line-clamp: 3; }
.md-story.is-lead h3 a { color: #fff; }
.md-story.is-lead h3 a:hover { color: #fff; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.md-story.is-lead p { max-width: 92%; color: #e5e7eb; font-size: 13.5px; }
.md-story.is-lead .md-story-meta { color: #e5e7eb; }
.md-story.is-lead .md-story-badge { color: #fcd34d; }
/* A lead without a photo would put white text on the logo: it keeps the plain card layout instead. */
.md-story.is-lead:has(img.is-image-fallback) { min-height: 0; background: transparent; border-radius: 0; }
.md-story.is-lead:has(img.is-image-fallback)::after { content: none; }
.md-story.is-lead:has(img.is-image-fallback) .md-story-media { position: static; border-radius: var(--md-media-radius); }
.md-story.is-lead:has(img.is-image-fallback) .md-story-media img { aspect-ratio: 16 / 9; height: auto; }
.md-story.is-lead:has(img.is-image-fallback) .md-story-text { position: static; padding: 8px 0 0; }
.md-story.is-lead:has(img.is-image-fallback) h3 a { color: var(--md-ink); }
.md-story.is-lead:has(img.is-image-fallback) p, .md-story.is-lead:has(img.is-image-fallback) .md-story-meta { color: var(--md-muted); }

.md-story.is-row { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--md-divider); }
.md-lead-grid > .md-story.is-row:nth-child(2) { padding-top: 0; }
.md-story.is-row:last-child { padding-bottom: 0; border-bottom: 0; }
.md-story.is-row .md-story-media img { aspect-ratio: 16 / 10; }
.md-story.is-row .md-story-text { gap: 4px; }
.md-story.is-row h3 { font-size: 14.5px; line-height: 1.5; -webkit-line-clamp: 2; }

/* ---- Card grid -------------------------------------------------------------------------------------------- */
.md-story-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 18px; }
.md-empty { margin: 0; padding: 18px 0; color: var(--md-muted); font-size: 14px; }

/* ---- Pagination ------------------------------------------------------------------------------------------- */
.md-pagination { display: flex; align-items: center; justify-content: center; gap: 10px; }
.md-pagination a, .md-pagination span { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; min-height: 40px; padding: 0 16px; border: 1px solid var(--md-divider); border-radius: 999px; background: var(--md-card); color: var(--md-ink); font-size: 14px; font-weight: 700; }
.md-pagination a:hover, .md-pagination a:focus-visible { border-color: var(--md-accent); color: var(--md-accent); }
.md-pagination span { border-color: transparent; background: transparent; color: var(--md-muted); }

/* ---- Sidebar panels (Public/Sidebar.vue) take the module look on md-ui pages ------------------------------ */
body.md-ui :is(.md-aside, .article-side) .panel { margin: 0; padding: 14px 16px; border: 1px solid var(--md-line); border-radius: var(--md-radius); background: var(--md-card); box-shadow: var(--md-shadow); }
body.md-ui :is(.md-aside, .article-side) .panel > h2 { margin: 0 0 8px; padding: 0; border: 0; color: var(--md-ink); font-size: 17px; line-height: 1.3; font-weight: 800; }
body.md-ui :is(.md-aside, .article-side) .panel > h2::after { content: none; }
body.md-ui :is(.md-aside, .article-side) .most-read-panel ol { margin: 0; padding: 0; list-style: none; }
body.md-ui :is(.md-aside, .article-side) .most-read-panel li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 8px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--md-divider); }
body.md-ui :is(.md-aside, .article-side) .most-read-panel li:last-child { border-bottom: 0; padding-bottom: 0; }
body.md-ui :is(.md-aside, .article-side) .news-rank { color: var(--md-accent); font-family: inherit; font-size: 15px; font-style: normal; font-weight: 800; line-height: 1.5; }
body.md-ui :is(.md-aside, .article-side) .most-read-panel a { color: var(--md-ink); font-size: 14px; line-height: 1.5; font-weight: 600; }
body.md-ui :is(.md-aside, .article-side) .most-read-panel a:hover { color: var(--md-accent); }
body.md-ui :is(.md-aside, .article-side) .sidebar-ad { border-radius: var(--md-radius); overflow: hidden; }

/* ---- Media pages (videos, photo galleries): their cards take the md-story look ------------------------------ */
body.md-ui .media-grid { gap: 18px; }
body.md-ui .media-grid.is-videos, body.md-ui .media-grid.is-albums { grid-template-columns: repeat(3, minmax(0, 1fr)); }
body.md-ui .media-grid.is-shorts { grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); gap: 18px 14px; }
body.md-ui .video-card-body, body.md-ui .album-card-body { gap: 4px; padding-top: 8px; }
body.md-ui .video-card-title, body.md-ui .album-card-title { font-size: 15px; font-weight: 700; line-height: 1.5; -webkit-line-clamp: 2; color: var(--md-ink); }
body.md-ui .video-card-link:hover .video-card-title, body.md-ui .album-card-link:hover .album-card-title { color: var(--md-accent); }
body.md-ui .video-card-meta { font: 600 11.5px/1.5 'Noto Sans Devanagari', system-ui, sans-serif; }
body.md-ui .video-card-category { color: var(--md-accent-text); font-weight: 700; }
body.md-ui .media-rail { overflow: hidden; }
/* Modules are spaced by the column gap only (media-pages.css adds its own margins to the rail and featured blocks). */
body.md-ui .md-main > .md-module, body.md-ui .md-main > section { margin-top: 0; margin-bottom: 0; }
body.md-ui .media-rail-track { padding-bottom: 4px; }

/* Featured video / album: the homepage hero — title over the picture on a dark gradient. */
body.md-ui .md-featured { padding: 0; overflow: hidden; border-radius: 10px; }
body.md-ui .md-featured .video-card-link, body.md-ui .md-featured .album-card-link { position: relative; display: block; }
body.md-ui .md-featured .video-card-media, body.md-ui .md-featured .album-card-media { aspect-ratio: 16 / 8; border-radius: 0; }
body.md-ui .md-featured .video-card-media::after, body.md-ui .md-featured .album-card-media::after { content: ""; position: absolute; inset: 0; z-index: 1; height: auto; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, .55) 66%, rgba(0, 0, 0, .9) 100%); pointer-events: none; }
body.md-ui .md-featured .video-card-body, body.md-ui .md-featured .album-card-body { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; gap: 6px; padding: 18px 22px 16px; }
body.md-ui .md-featured .video-card-title, body.md-ui .md-featured .album-card-title { color: #fff; font-size: clamp(20px, 1.9vw, 27px); font-weight: 800; line-height: 1.4; -webkit-line-clamp: 2; }
body.md-ui .md-featured .video-card-summary { display: -webkit-box; max-width: 80%; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; color: #e5e7eb; font-size: 13.5px; line-height: 1.55; }
body.md-ui .md-featured .video-card-meta, body.md-ui .md-featured .video-card-meta time { color: #e5e7eb; }
body.md-ui .md-featured .video-card-category { color: #fff; }
body.md-ui .md-featured .video-card-meta > * + *::before { color: rgba(255, 255, 255, .5); }
body.md-ui .md-featured .video-card-play { top: 42%; width: 68px; height: 68px; font-size: 38px; }
body.md-ui .md-featured .album-card-count { z-index: 3; top: 14px; right: 14px; bottom: auto; }

/* Load more / pages: pill buttons like the listing pagination. */
body.md-ui .media-pager { margin-top: 18px; }
body.md-ui .media-load-more { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 22px; border: 1px solid var(--md-accent); border-radius: 999px; background: var(--md-card); color: var(--md-accent-text); font-size: 14px; font-weight: 700; }
body.md-ui .media-load-more:hover, body.md-ui .media-load-more:focus-visible { background: var(--md-accent); color: #fff; }
body.md-ui .md-module.media-empty { border-style: solid; background: var(--md-card); }

/* ---- Other inner pages (tag, author, search, e-paper, live, short news, sponsored, static, 404) ------------- */
.md-loading { min-height: 240px; color: var(--md-muted); font-size: 14px; }
.md-author { display: flex; gap: 14px; align-items: flex-start; margin: 12px 0 14px; }
.md-author-avatar { flex: none; width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 2px solid var(--md-line); }
.md-author-text p { margin: 0; max-width: 80ch; color: var(--md-ink); font-size: 14px; line-height: 1.65; }
.md-author-text .md-chips { margin: 10px 0 0; }
/* Directory (tag/author index without a slug): a tidy two-column list of entries. */
body.md-ui .md-main .platform-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
body.md-ui .md-main .platform-grid > .panel { margin: 0; padding: 12px 0; border: 0; border-bottom: 1px solid var(--md-divider); border-radius: 0; background: none; box-shadow: none; }
body.md-ui .md-main .platform-grid > .panel h2 { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.45; }
body.md-ui .md-main .platform-grid > .panel h2 a { color: var(--md-ink); }
body.md-ui .md-main .platform-grid > .panel h2 a:hover { color: var(--md-accent); }
body.md-ui .md-main .platform-grid > .panel p { margin: 4px 0 0; color: var(--md-muted); font-size: 13px; line-height: 1.5; }
body.md-ui .md-main .platform-grid > .panel p:empty { display: none; }
body.md-ui .md-main .platform-links { display: flex; justify-content: center; gap: 10px; margin-top: 14px; }
/* Static pages: the reading column fills the main column (the page used to cap it at 880px with no sidebar). */
body.md-ui .static-page-article { max-width: none; }
body.md-ui .static-page-hero { margin: 0 0 18px; }
body.md-ui .static-page-body > :first-child { margin-top: 0; }
/* Live: the event header is the page header card; group titles are module titles. */
body.md-ui .live-event-head { display: block; margin: 0; padding-bottom: 0; border-bottom: 1px solid var(--md-line); }
body.md-ui .live-event-head::after { content: none; }
body.md-ui .live-event-head > .live-status, body.md-ui .live-event-head > .public-chip { margin-top: 12px; }
body.md-ui.news-inner .live-event-head h1.md-page-title, body.md-ui .live-event-head h1.md-page-title { margin-top: 8px; font-size: clamp(22px, 2.1vw, 30px); line-height: 1.35; }
body.md-ui .live-event-head .live-event-subtitle { margin: 10px 0 0; font-size: 15px; }
body.md-ui .live-event-head .live-event-meta { margin: 10px 0 0; }
body.md-ui .live-event-head .live-event-description { margin: 10px 0 14px; font-size: 15px; line-height: 1.7; }
body.md-ui .live-event-page .md-layout { margin-top: 0; }
body.md-ui .album-back { margin: 0; }
body.md-ui .live-group-title { margin: 0; padding: 0; border: 0; font-size: 18px; }
body.md-ui .live-group-title::after { content: none; }
body.md-ui .md-main .live-group { margin: 0; }
body.md-ui .md-main .media-empty, body.md-ui .not-found-card { margin: 0; }
body.md-ui .sponsored-grid { margin: 0; }
body.md-ui .md-main .md-pagination.pill-pager { margin: 0; }
body.md-ui .epaper-module > #app { min-height: 820px; }
@media (max-width: 767px) { body.md-ui .epaper-module > #app { min-height: 520px; } }
body.md-ui .short-news-page .md-thread { margin: 0; }
/* Search: the filter form and the results are modules; the summary is the results module's title row. */
body.md-ui .search-page .search-controls { padding: 14px 16px; border-color: var(--md-line); box-shadow: var(--md-shadow); }
body.md-ui .search-page .search-summary { margin: 0 0 12px; padding: 0; border: 0; }
body.md-ui .search-page .search-summary h2 { font-size: 18px; font-weight: 800; }
body.md-ui .search-page #app { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
body.md-ui .search-page .popular-searches { margin: 0; padding: 0 2px; }
body.md-ui .search-page .search-pagination { margin: 16px 0 0; }

/* ---- Article page (md-article): Story.vue keeps its markup; the story sits in a module card, the right-hand area's
   panels take the sidebar module look, the breadcrumb uses the › trail. ---------------------------------------------- */
body.md-article .breadcrumb-trail { margin-block: 14px 0; font-size: 12.5px; }
body.md-article .story-page { padding-top: 12px; }
body.md-article .story-page > .listing-layout { gap: var(--md-gap); align-items: start; }
body.md-article .story-page #app { min-width: 0; padding: 20px 24px 24px; border: 1px solid var(--md-line); border-radius: var(--md-radius); background: var(--md-card); box-shadow: var(--md-shadow); }
body.md-article .article-side-inner { gap: 14px; }
body.md-article .article-rail .panel { border-color: var(--md-line); border-radius: var(--md-radius); box-shadow: var(--md-shadow); }
body.md-article .md-related { margin-top: var(--md-gap); }

/* ---- Detail pages: video player, meta line, prose ------------------------------------------------------------ */
.md-page > .md-layout:first-child { margin-top: 0; }
.md-player { position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: var(--md-media-radius); background: #0b1622; }
.md-player.is-short { aspect-ratio: 9 / 16; max-width: 420px; max-height: 78vh; margin-inline: auto; }
.md-player video, .md-player iframe { display: block; width: 100%; height: 100%; border: 0; }
.md-meta-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; color: var(--md-muted); font-size: 13px; }
.md-meta-line i { color: var(--md-accent); margin-right: 3px; }
.md-meta-cat { color: var(--md-accent-text); font-weight: 700; }
.md-video-title { margin: 14px 0 6px; color: var(--md-ink); font-size: 20px; line-height: 1.4; font-weight: 800; }
.md-prose { margin: 14px 0 0; color: var(--md-ink); font-size: 15.5px; line-height: 1.8; }
.md-credit { margin: 10px 0 0; color: var(--md-muted); font-size: 12.5px; }
.md-related-article { margin: 14px 0 0; padding: 12px 14px; border-left: 3px solid var(--md-accent); border-radius: 4px; background: var(--md-soft); font-size: 14px; line-height: 1.6; }
.md-related-article span { display: block; color: var(--md-accent-text); font-size: 12px; font-weight: 800; }
.md-related-article a { color: var(--md-ink); font-weight: 700; }
.md-related-article a:hover { color: var(--md-accent); }
.md-count { margin-left: 4px; padding: 1px 8px; border-radius: 999px; background: var(--md-soft); color: var(--md-muted); font-size: 12px; font-weight: 700; }
.md-story-video { position: relative; }
.md-play { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: rgba(213, 42, 49, .92); color: #fff; font-size: 22px; transform: translate(-50%, -50%); }
.md-story.is-current .md-story-media { outline: 3px solid var(--md-accent); outline-offset: -3px; }
.md-story.is-current h3 a { color: var(--md-accent-text); }
/* Related-news widget inside a module: its own heading becomes the module title. */
.md-module[data-widget="related"]:not(:has(.related-news)) { display: none; }
.md-module .related-news.is-md { margin: 0; padding: 0; border: 0; }

/* Icons inside md-ui text (chips, meta lines, headings) keep a fixed 1em box, so chips do not change width — and
   rewrap — when the icon font arrives after first paint. */
body.md-ui .md-page [class^="bi-"]::before, body.md-ui .md-page [class*=" bi-"]::before { width: 1em; overflow: hidden; }
/* The sidebar is filled client-side; on desktop its column reserves the usual height so a short page's footer does not
   jump down when the panels arrive. */
@media (min-width: 1101px) { .md-aside { min-height: 860px; } }

/* ---- Responsive ------------------------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .md-layout { grid-template-columns: minmax(0, 1fr); }
  .md-aside { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}
@media (max-width: 900px) {
  body.md-ui .media-grid.is-videos, body.md-ui .media-grid.is-albums { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.md-ui .md-featured .video-card-media, body.md-ui .md-featured .album-card-media { aspect-ratio: 16 / 10; }
  .md-lead-grid { grid-template-columns: minmax(0, 1fr); }
  .md-lead-grid > .md-story.is-lead, .md-lead-grid > .md-story.is-row { grid-column: 1; grid-row: auto; }
  .md-lead-grid > .md-story.is-lead { min-height: 0; aspect-ratio: 16 / 10; margin-bottom: 6px; }
  .md-lead-grid > .md-story.is-lead:has(img.is-image-fallback) { aspect-ratio: auto; }
  .md-lead-grid > .md-story.is-row:nth-child(2) { padding-top: 10px; }
  .md-story-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Phones: like the homepage, modules sit on the white page (no card chrome) and grids become compact rows. */
@media (max-width: 767px) {
  body.md-ui { background: var(--md-card); }
  .md-page { padding-block: 6px 24px; }
  .md-module { padding: 14px 0 0; border: 0; border-top: 6px solid var(--md-bg); border-radius: 0; box-shadow: none; }
  .md-page-head { padding: 4px 0 0; border-top: 0; }
  .md-layout { gap: 0; margin-top: 8px; }
  .md-main { gap: 0; }
  .md-main > .md-module + .md-module { margin-top: 14px; }
  .md-story.is-lead { border-radius: 8px; }
  .md-story.is-lead .md-story-text { padding: 14px 14px 12px; }
  .md-story.is-lead h3 { font-size: 18px; }
  .md-story.is-lead p { display: none; }
  .md-story-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .md-story-grid > .md-story { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; align-items: center; padding-bottom: 12px; border-bottom: 1px solid var(--md-divider); }
  .md-story-grid > .md-story:last-child { padding-bottom: 0; border-bottom: 0; }
  .md-story-grid > .md-story .md-story-media img { aspect-ratio: 16 / 10; }
  .md-story-grid > .md-story h3 { -webkit-line-clamp: 3; }
  .md-story-grid > .md-story h3 { font-size: 14.5px; }
  .md-story-grid > .md-story p { display: none; }
  .md-pagination { padding: 18px 0 4px; }
  body.md-ui .md-featured { border-radius: 8px; margin-top: 12px; border-top: 0; }
  body.md-ui .md-featured .video-card-body, body.md-ui .md-featured .album-card-body { padding: 14px 14px 12px; }
  body.md-ui .md-featured .video-card-title, body.md-ui .md-featured .album-card-title { font-size: 18px; }
  body.md-ui .md-featured .video-card-summary { display: none; }
  body.md-ui .md-featured .video-card-play { width: 52px; height: 52px; font-size: 28px; }
  body.md-ui .media-grid.is-videos, body.md-ui .media-grid.is-albums { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .md-aside { grid-template-columns: minmax(0, 1fr); margin-top: 14px; }
  body.md-ui .md-main .platform-grid { grid-template-columns: minmax(0, 1fr); }
  body.md-article .story-page #app { padding: 0; border: 0; border-radius: 0; box-shadow: none; }
  body.md-article .md-related { padding: 14px 0 0; }
  .md-loading { min-height: 300px; }
  body.md-ui :is(.md-aside, .article-side) .panel { padding: 14px 0 0; border: 0; border-top: 6px solid var(--md-bg); border-radius: 0; box-shadow: none; }
}

/* Byline, share row and "join our community" for server-rendered pages (partials/share-follow.blade.php):
   live events, videos and photo albums.
   The article page renders the same blocks from Public/Story.vue, whose <style scoped> cannot reach server-rendered
   markup, so this repeats that design for Blade. Keep the two in step when either changes. */
/* .live-event-head is a grid with justify-items:start, so every child shrink-wraps to its text. These three are
   full-width bands, not inline bits of the header, and have to opt out of that. */
.md-share-follow { justify-self: stretch; width: 100%; min-width: 0; display: grid; gap: 12px; }

/* inner-pages.css also styles .news-inner .story-byline/.byline-mark and loads after this file, so the
   byline rules carry one extra unit of specificity ("body") to win whatever the load order is. */
body .md-share-follow .story-byline { display: flex; gap: 10px; align-items: center; margin: 14px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line); border-bottom: 0; font-size: 12px; }
body .md-share-follow .byline-mark { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--red); color: #fff; font-size: 15px; font-weight: 800; line-height: 1; }
body .md-share-follow .story-byline strong, .md-share-follow .story-byline a { color: var(--ink); font-weight: 700; text-decoration: none; }
body .md-share-follow .story-byline a:hover { color: var(--red-text); text-decoration: underline; }
body .md-share-follow .story-byline time { display: block; margin-top: 5px; font: 11px system-ui, sans-serif; color: var(--muted); }

.md-share-follow .story-actions { display: grid; gap: 12px; margin: 0; padding: 0; }
.md-share-follow .story-share { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 34px; }
.md-share-follow .story-actions-label { display: block; color: var(--muted); font-size: 12px; font-weight: 700; line-height: 1; margin-right: 2px; }
.md-share-follow .share-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--card-bg); color: var(--ink); font-size: 15px; cursor: pointer; transition: border-color .15s, color .15s; }
.md-share-follow .share-btn i { display: block; height: 1em; font-size: inherit; line-height: 1; }
.md-share-follow .share-btn i::before { display: block; vertical-align: 0; }
.md-share-follow .share-btn:hover, .md-share-follow .share-btn:focus-visible { border-color: var(--red); color: var(--red-text); }
.md-share-follow .share-btn:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.md-share-follow .share-btn.is-whatsapp { color: #128c4b; }
.md-share-follow .share-btn.is-facebook { color: #1877f2; }
.md-share-follow .share-btn.is-telegram { color: #229ed9; }
.md-share-follow .share-btn.is-linkedin { color: #0a66c2; }
.md-share-follow .share-btn[data-copied="1"] { border-color: #16a34a; color: #15803d; }
.md-share-follow .share-copied { font-size: 12px; font-weight: 700; color: #15803d; }

.md-share-follow .story-join { min-width: 0; padding: 11px 12px 12px; border: 1px solid var(--line); border-radius: 10px; background: color-mix(in srgb, var(--soft) 72%, var(--card-bg)); }
.md-share-follow .story-join-heading { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; }
.md-share-follow .story-join-heading .story-actions-label { color: var(--ink); font-size: 13px; }
.md-share-follow .story-join-rule { width: 24px; height: 2px; background: var(--red); opacity: .8; }
.md-share-follow .story-join-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.md-share-follow .story-join-group { display: grid; min-width: 0; gap: 5px; align-content: start; }
.md-share-follow .story-join-group.is-google, .md-share-follow .story-join-group.is-other { grid-column: 1 / -1; }
@media (min-width: 641px) {
  .md-share-follow .story-join-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md-share-follow .story-join-group.is-google { grid-column: auto; }
}
.md-share-follow .story-join-group-label { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 800; line-height: 1.2; }
.md-share-follow .story-join-group-label i { color: var(--red); font-size: 13px; }
/* The compact chip overrides the global .join-chip (style.css), which is the homepage's larger pill. */
.md-share-follow .join-chip.is-compact { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 38px; min-width: 0; padding: 7px 9px; border: 1px solid var(--line); border-left-width: 1px; border-radius: 7px; background: var(--card-bg); color: var(--ink); font-size: 12px; font-weight: 700; line-height: 1.2; text-decoration: none; }
.md-share-follow .join-chip.is-compact > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.md-share-follow .join-chip.is-compact .join-ext { flex: none; color: var(--muted); font-size: 11px; }
.md-share-follow .join-chip.is-compact:hover, .md-share-follow .join-chip.is-compact:focus-visible { border-color: var(--red); background: var(--card-bg); color: var(--red-text); }
.md-share-follow .join-chip.is-compact.is-whatsapp_channel, .md-share-follow .join-chip.is-compact.is-whatsapp_group { color: #0f7a40; }
.md-share-follow .join-chip.is-compact.is-telegram_channel, .md-share-follow .join-chip.is-compact.is-telegram_group { color: #16709c; }
.md-share-follow .join-chip.is-compact.is-google_news { color: #2b66d6; }
html[data-theme="dark"] .md-share-follow .join-chip.is-compact.is-whatsapp_channel, html[data-theme="dark"] .md-share-follow .join-chip.is-compact.is-whatsapp_group { color: #4ade80; }
html[data-theme="dark"] .md-share-follow .join-chip.is-compact.is-telegram_channel, html[data-theme="dark"] .md-share-follow .join-chip.is-compact.is-telegram_group { color: #67c3f3; }
html[data-theme="dark"] .md-share-follow .join-chip.is-compact.is-google_news { color: #8ab4f8; }
@media (prefers-reduced-motion: reduce) { .md-share-follow .share-btn { transition: none; } }
@media (max-width: 520px) {
  .md-share-follow .story-actions { gap: 11px; }
  .md-share-follow .story-join { padding-inline: 9px; }
  .md-share-follow .story-join-grid { gap: 7px; }
  .md-share-follow .join-chip.is-compact { min-height: 36px; padding-inline: 8px; }
}
