/* One shared reading width for the introduction, 16:9 cover and article body.
   Byline metrics verified against the Lovable reference at 1280px. */
main.shell:has(> .article-page) { width: 100%; max-width: none; }
.article-page { --reading-max: 768px; padding: 0; }
/* Leh separators follow the same dashboard color as its article header. */
:root[data-brand="leh"] .article-page, .article-page[data-leh-article="true"] { --neo-divider: var(--home-preview, var(--leh-color)); }
.article-header { max-width: none; margin: 0; padding-block: 28px 32px; border-bottom: 2px solid #100c07; background-color: var(--home-featured, var(--neo-sun)); background-image: radial-gradient(rgb(16 12 7 / .14) 1px, transparent 1px); background-size: 18px 18px; color: #100c07; }
:root[data-brand="leh"] .article-header, .article-page[data-leh-article="true"] .article-header { background-color: var(--home-preview, var(--leh-color)); }
.article-hero-inner, .article-cover, .article-content { box-sizing: border-box; width: min(var(--reading-max), calc(100% - 32px)); margin-inline: auto; }
.article-hero-inner { padding: 0; }
.article-hero-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-bottom: 40px; }
.article-hero-tools .article-categories { min-width: 0; align-items: center; margin: 0; }
.article-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); align-items: end; gap: 32px; }
.article-hero-copy { min-width: 0; }
.article-categories > :is(.card-category, .article-new) { box-shadow: -3px 3px 0 #100c07; font-size: 14px; line-height: 20px; }
.site-frame .article-header h1 { margin: 0; font-family: var(--font-editorial); font-weight: var(--heading-weight); font-size: 30px; line-height: 1.4; font-synthesis: none; text-wrap: wrap; overflow-wrap: anywhere; }
.article-header .standfirst { max-width: none; margin: 20px 0 0; font-size: 16px; line-height: 28px; color: #443d31; }
.article-byline { display: flex; flex-wrap: wrap; align-items: center; margin: 24px 0 0; padding: 0; border: 0; gap: 16px; font-size: 14px; font-weight: 700; color: inherit; }
.article-byline .card-meta { margin: 0; gap: 16px; font-size: inherit; line-height: 20px; font-weight: inherit; color: inherit; }
.article-cover { max-width: none; aspect-ratio: 16 / 9; margin-block: 20px 0; border: 2px solid #100c07; border-radius: 0; overflow: hidden; box-shadow: -6px 6px 0 #100c07; background: var(--surface); }
.article-cover img { display: block; width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; border-radius: 0; outline: none; }
.article-content { padding-block: 24px 48px; }
.article-body { margin-block-start: 0; font-size: 18px; line-height: 2.15; text-align: start; }
.site-frame .article-body > p { margin-block: 0 28px; }
.site-frame .article-body > p:first-child { margin-bottom: 32px; }
.site-frame .article-body h2 { margin-block: 40px 20px; padding: .12em 2px 12px; border-bottom: 4px solid var(--neo-divider, var(--neo-sun)); font-family: var(--font-editorial); font-weight: var(--heading-weight); font-size: 30px !important; line-height: 1.65 !important; overflow: visible; font-synthesis: none; text-wrap: pretty; }
.site-frame .article-body h3 { margin-block: 32px 16px; font-size: 24px !important; line-height: 1.65 !important; text-wrap: pretty; }
/* Lists use one rhythm even when a writer pastes paragraphs inside list items. */
.site-frame .article-body :is(ul,ol) { margin-block: 16px 24px; line-height: 1.8; }
.site-frame .article-body li { margin-block: 0 !important; }
.site-frame .article-body li + li { margin-block-start: 6px !important; }
.site-frame .article-body li > p { margin-block: 0 !important; }
.site-frame .article-body li > p + p { margin-block-start: 6px !important; }
.site-frame .article-body li > :is(ul,ol) { margin-block: 8px 0; }
/* A heading already owns its divider; avoid a duplicate rule immediately above it. */
.site-frame .article-body hr:has(+ h2) { display: none; }
.article-body :is(table, pre) { border-radius: 0; }
.article-end { padding-block-start: 22px; border-block-start: 4px solid var(--neo-divider, var(--neo-sun)); }
.article-content .sources { border-top: 4px solid var(--neo-divider, var(--neo-sun)); }
@media (min-width: 640px) {
  .article-header { padding-block: 40px; }
  .article-hero-tools { margin-bottom: 48px; }
  .article-byline { margin-top: 28px; }
  .article-hero-inner, .article-cover, .article-content { width: min(var(--reading-max), calc(100% - 48px)); }
  .site-frame .article-header h1 { font-size: 40px; }
}

/* Video attachments share the article's quiet frame, with room for native controls. */
.article-video { margin-block: 36px; padding: 0; }
.article-video-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; margin-block-end: 14px; }
.article-video-heading h2 { margin: 0; font-size: 22px; line-height: 1.6; }
.article-video-heading a { color: var(--ink); font-size: 14px; text-underline-offset: 4px; padding-block: 8px; }
.article-video-frame { width: 100%; aspect-ratio: 16 / 9; min-height: 200px; border: 2px solid var(--ink); box-shadow: -4px 4px 0 var(--ink); background: #171717; }
.article-video-frame[data-video-format="portrait"] { width: min(100%, 320px); aspect-ratio: 9 / 16; margin-inline: auto; }
.article-video-frame iframe { display: block; width: 100%; height: 100%; min-height: 200px; border: 0; }

@media (max-width: 639px) {
  .article-header { padding-block: 24px 28px; }
  .article-hero-tools { margin-bottom: 28px; }
  .site-frame .article-header h1 { font-size: 28px; line-height: 1.5; }
  .article-header .standfirst { margin-top: 16px; font-size: 15px; line-height: 1.9; }
  .article-byline { margin-top: 20px; gap: 12px; font-size: 13px; }
  .article-byline .card-meta { gap: 10px; }
  .article-content { padding-block: 22px 32px; }
  .article-body { font-size: 17px; line-height: 2; }
  .site-frame .article-body h2 { font-size: 25px !important; line-height: 1.6 !important; margin-block: 30px 16px; }
  .site-frame .article-body h3 { font-size: 21px !important; }
  .site-frame .article-body > p { margin-bottom: 22px; }
}

/* Article suggestions share the site's paper cards, category badges and hard shadow. */
.article-recommendations { margin-top: 32px; padding-top: 22px; border-top: 4px solid var(--neo-divider,var(--neo-sun)); }
.site-frame .recommendations-heading h2 { margin: 0; font-family: var(--font-editorial); font-size: 24px; line-height: 1.5; font-weight: var(--heading-weight); }
.recommendation-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.recommendation-card { min-width: 0; display: flex; flex-direction: column; border: 2px solid var(--neo-card-edge,#100c07); background: var(--paper); box-shadow: -3px 3px 0 var(--neo-shadow,#100c07); }
.recommendation-image { display: block; aspect-ratio: 16 / 10; overflow: hidden; border-bottom: 2px solid var(--neo-card-edge,#100c07); }
.recommendation-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.recommendation-copy { display: flex; flex: 1; flex-direction: column; gap: 12px; padding: 16px; }
.recommendation-copy .article-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.site-frame .recommendation-copy h3 { margin: 0; font-family: var(--font-editorial); font-size: 20px; line-height: 1.6; font-weight: var(--heading-weight); overflow-wrap: anywhere; }
.recommendation-copy h3 a { color: inherit; text-decoration: none; }
.recommendation-copy .card-meta { margin: auto 0 0; font-size: 12px; }
.recommendation-card:focus-within { outline: 2px solid var(--neo-edge,#100c07); outline-offset: 5px; }
/* Keep the requested pair side by side even on small screens. */
.recommendations-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 20px; }
.recommendations-controls { display: flex; align-items: center; gap: 12px; }
.recommendations-controls[hidden], .recommendation-card[hidden] { display: none; }
.site-frame .neo-button.recommendations-arrow { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; background: var(--home-featured,var(--neo-sun)); color: #100c07; border: 2px solid #100c07; box-shadow: -3px 3px 0 #100c07; border-radius: 0; }
.site-frame .neo-button.recommendations-arrow:disabled { opacity: .4; cursor: default; transform: none; }
.recommendations-page { min-width: 2.5em; text-align: center; font-size: 14px; font-weight: 700; direction: ltr; }
@media (max-width: 480px) {
  .recommendation-grid { gap: 12px; }
  .recommendation-copy { padding: 10px; gap: 8px; }
  .site-frame .recommendation-copy h3 { font-size: 16px; line-height: 1.7; }
  .recommendation-copy .card-meta { gap: 6px; font-size: 11px; flex-wrap: wrap; }
  .recommendations-controls { gap: 8px; }
  .site-frame .recommendations-heading h2 { font-size: 22px; }
}

.recommendation-image-empty { background: var(--surface); }

.site-frame .article-body :is(h2,h3) a { unicode-bidi: isolate; }

/* Adjacent bullet lists pasted as separate blocks still read as one compact list. */
.site-frame .article-body ul:has(+ ul) { margin-block-end: 0; }
.site-frame .article-body ul + ul { margin-block-start: 6px; }
/* Ordinary blocks share the reading scale even if pasted with inline typography. */
.site-frame .article-body :is(p,li) { font-size: inherit !important; line-height: inherit !important; }
.site-frame .article-body .tv-article-intro { font-size: 1.12em !important; }
.site-frame .article-body :is(h2,h3) { text-align: start !important; height: auto !important; max-height: none; }

.recommendations-arrow svg { flex: 0 0 22px; width: 22px; height: 22px; }
