/* =====================================================================
   Media: extras for media.html and the article pages (media-*.html,
   generated by work/media-port/build_articles.py). Loaded after site.css;
   uses its tokens only. site.css has no dark mode, so neither does this.
   ===================================================================== */

/* ---------------------------------------------------------------- main nav: Media is the current section
   Article pages mark the Media link aria-current="true" (the section, not this exact page);
   it gets the same underline as aria-current="page" on media.html. */
@media (min-width: 1024px) {
  .nav-link[aria-current="true"]::after { transform: scaleX(1); background: var(--lw-color-on-dark-accent); opacity: 1; }
  .site-header[data-variant="solid"] .nav-link[aria-current="true"]::after,
  .site-header.is-condensed .nav-link[aria-current="true"]::after { background: var(--lw-color-accent); }
}

/* ---------------------------------------------------------------- media.html */
/* the lead item can be a typographic card (logo-only cover): larger type so the tile reads as a cover */
.news-item.news-item--lead .typo-card { padding: 20px 22px; }
.news-item.news-item--lead .typo-card__biz { font-size: 26px; line-height: 1.15; }
.news-item.news-item--lead .typo-card__place { margin-top: 6px; font-size: 15px; }
@media (min-width: 768px) {
  .news-item.news-item--lead .typo-card { padding: 30px 34px 30px; }
  .news-item.news-item--lead .typo-card__kicker { font-size: 13px; }
  .news-item.news-item--lead .typo-card__biz { font-size: clamp(28px, calc(28px + (100vw - 768px) * 12 / 672), 40px); line-height: 1.1; }
  .news-item.news-item--lead .typo-card__place { margin-top: 10px; font-size: 16px; }
}
/* whole-card hover returns photos to colour (the title link's overlay covers the thumbnail) */
@media (hover: hover) and (pointer: fine) {
  .news-item.hover-colour:hover .is-bw { filter: grayscale(0) contrast(1) brightness(1); }
}
/* media contact sits on the grey band: the boilerplate box turns white so it still reads as a box */
.media-contact .boilerplate { background: #fff; }

/* ---------------------------------------------------------------- article page */
/* how far the cover photo rises into the navy hero */
.article { --cover-lift: 32px; --article-fs: clamp(17px, calc(17px + (100vw - 390px) * 1 / 1050), 18px); }
@media (min-width: 768px) { .article { --cover-lift: 56px; } }
@media (min-width: 1024px) { .article { --cover-lift: 96px; } }

.article-hero { padding-bottom: 48px; }
.article-hero--cover { padding-bottom: calc(44px + var(--cover-lift)); }
@media (min-width: 1024px) {
  .article-hero { padding-top: 168px; padding-bottom: 72px; }
  .article-hero--cover { padding-bottom: calc(56px + var(--cover-lift)); }
}
/* logo-only originals: a typographic header (the typo-card dot grid and key rule) instead of a photo */
.article-hero--typo {
  background-image: radial-gradient(rgba(185, 198, 211, .16) 1.3px, transparent 1.5px);
  background-size: 14px 14px; background-position: -4px -4px;
  border-bottom: 3px solid var(--card-key, var(--lw-color-energy));
}
.article.key-group .article-hero--typo { border-bottom-color: var(--lw-color-on-dark-accent); }
.article.key-minerals .article-hero .eyebrow--rule::before { background: var(--lw-color-minerals); }

/* breadcrumb on navy: "Media / short title" */
.breadcrumb { margin-bottom: 28px; font-size: 14px; line-height: 1.4; }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; min-width: 0; }
.breadcrumb li { display: flex; align-items: center; flex: none; min-width: 0; color: var(--lw-color-on-dark-muted); }
.breadcrumb li + li { flex: 0 1 auto; }
.breadcrumb li + li::before { content: "/"; flex: none; margin: 0 10px; color: rgba(185, 198, 211, .6); }
.breadcrumb li > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.breadcrumb a { display: inline-flex; align-items: center; min-height: 24px; color: var(--lw-color-on-dark-accent); font-weight: 700; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; text-underline-offset: .2em; }

.article-hero__title { max-width: 24em; font-size: clamp(30px, calc(30px + (100vw - 390px) * 12 / 1050), 42px); line-height: 1.14; }
/* the 7 May 2026 headline runs to ~190 characters */
.article-hero__title--long { max-width: 32em; font-size: clamp(25px, calc(25px + (100vw - 390px) * 9 / 1050), 34px); line-height: 1.2; }
.article-hero__meta { margin-top: 20px; font-size: 13px; font-weight: 700; line-height: 1.4; letter-spacing: .14em; text-transform: uppercase; color: #E3EAF1; }
.article-hero__note { margin-top: 8px; max-width: 680px; font-size: 15px; line-height: 1.5; font-style: italic; color: var(--lw-color-on-dark-muted); }
.article-hero__note a { color: var(--lw-color-on-dark-accent); font-weight: 700; }

.article-main { padding-bottom: var(--lw-section); }
.article-hero--typo + .article-main { padding-top: var(--lw-space-7); }
@media (min-width: 1024px) { .article-hero--typo + .article-main { padding-top: var(--lw-space-8); } }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr); row-gap: 40px; }
.article-layout > * { min-width: 0; }

/* cover: the original post's picture, uncropped, rising into the hero */
.article-cover { position: relative; z-index: 1; margin-top: calc(-1 * var(--cover-lift)); width: 100%; }
.article-cover__media { overflow: hidden; background: #D9E0E7; border-bottom: 3px solid var(--card-key, var(--lw-color-energy)); box-shadow: var(--lw-shadow-lift); }
.article-cover__media img { width: 100%; height: auto; }
.article-cover:not(.article-cover--logo) .article-cover__media { aspect-ratio: 3 / 2; }
.article-cover:not(.article-cover--logo) .article-cover__media img { height: 100%; object-fit: cover; }

/* body: verbatim release text in a reading column */
.article-body {
  max-width: var(--lw-measure); font-size: var(--article-fs); line-height: 1.7;
  color: var(--lw-color-text); overflow-wrap: break-word;
}
.article-body > * + * { margin-top: 1.05em; }
.article-body h2 { margin-top: 2em; font-size: clamp(20px, calc(20px + (100vw - 390px) * 3 / 1050), 23px); line-height: 1.3; }
.article-body h2 + * { margin-top: .55em; }
.article-body strong { color: var(--lw-color-heading); }
.article-body a { overflow-wrap: anywhere; }
.article-body ul, .article-body ol { margin-left: 0; padding: 0; list-style: none; display: grid; gap: .5em; }
.article-body ul > li { position: relative; padding-left: 26px; }
.article-body ul > li::before { content: ""; position: absolute; left: 2px; top: .8em; width: 10px; height: 3px; background: var(--rule); }
.article.key-minerals .article-body ul > li::before { background: var(--lw-color-minerals); }

/* pictures that were inside or below the original text (none at present; the generator supports them) */
.article-gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.article-gallery figure { margin: 0; }
.article-gallery__link { display: block; overflow: hidden; background: #D9E0E7; }
.article-gallery img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: filter .4s ease, transform .6s var(--lw-ease); }
@media (hover: hover) and (pointer: fine) { .article-gallery__link:hover img { transform: scale(1.025); } }
@media (min-width: 768px) { .article-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }

/* details + media contact */
.article-aside { align-self: start; max-width: var(--lw-measure); font-size: var(--article-fs); background: var(--lw-color-surface); border-top: 3px solid var(--lw-color-dark); padding: 20px 22px 22px; }
.article-facts { display: grid; margin: 0; }
.article-facts > div { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--lw-color-border); }
.article-facts > div:first-child { padding-top: 0; }
.article-facts dt { font-size: 12px; font-weight: 700; line-height: 1.6; letter-spacing: .14em; text-transform: uppercase; color: var(--lw-color-text-muted); }
.article-facts dd { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.5; color: var(--lw-color-heading); }
.article-contact { margin-top: 14px; font-size: 15px; line-height: 1.5; }
.article-contact__label { display: block; margin-bottom: 2px; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--lw-color-text-muted); }
.article-contact a { font-weight: 700; overflow-wrap: anywhere; }

.article-foot { max-width: var(--lw-measure); font-size: var(--article-fs); padding-top: 22px; border-top: 1px solid var(--lw-color-border); }
.link-back { font-size: 16px; display: inline-flex; align-items: center; gap: 8px; min-height: 24px; font-weight: 700; color: var(--lw-color-link); text-decoration: none; }
.link-back::before { content: "\2190"; display: inline-block; transition: transform .2s var(--lw-ease); }
.link-back:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .25em; }
.link-back:hover::before { transform: translateX(-3px); }

@media (min-width: 1024px) {
  .article-layout { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--lw-gutter); row-gap: 48px; align-items: start; }
  .article-cover, .article-body, .article-gallery, .article-foot { grid-column: 1 / span 8; }
  .article-aside { grid-column: 10 / span 3; grid-row: 1 / span 3; position: sticky; top: calc(var(--lw-header-h) + 32px); }
  .article-hero--cover + .article-main .article-aside { margin-top: 40px; }
}
/* 1024–1279: the three-column aside is narrow, so each label sits above its value */
@media (min-width: 1024px) and (max-width: 1279px) {
  .article-facts > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}


/* print: the navy hero prints white (site.css), so its text turns dark */
@media print {
  .article-hero h1, .article-hero__meta, .article-hero__note, .breadcrumb li, .breadcrumb a { color: #000 !important; }
  .article-cover { margin-top: 0; }
  .article-aside { position: static; }
  .article-more { display: none; }
}

/* ---------------------------------------------------------------- round 6 fixes: logo-only originals
   3 Apr 2019 and 7 May 2026 have a logo as their only picture. The article shows that ported logo
   in the cover position, on a white panel with the business key rule (no greyscale). */
.article-cover--logo .article-cover__media { display: grid; place-items: center; aspect-ratio: 2 / 1; padding: 7% 14%; background: #fff; }
.article-cover--logo .article-cover__media img { width: min(100%, 500px); height: auto; }
