/* ==========================================================================
   News — list (news/) and article (news/<id>.html).   Loaded after site.css.
   Sirena has no news section: the pages use the system's hero, cards, compact
   page header and pager; this file only adds what those components leave open.
   ========================================================================== */

/* ── list ─────────────────────────────────────────────────────────────────── */
.news-page .hero-page__intro{text-wrap:balance}                           /* no orphaned last character … */
html[lang="zh-CN"] .news-page .hero-page__intro{word-break:keep-all;overflow-wrap:break-word}   /* … breaking at the comma */
html[lang="ja"] .news-page .hero-page__intro{line-break:strict;word-break:auto-phrase}
.news-list .news-card__media::before{padding-top:62.5%}                    /* covers 16:10 */
.news-card__media img{object-position:var(--news-focus,50% 50%)}          /* data/pages/news.json → cover_focus */
/* even lines, no single character / word on the last one ("text-wrap:pretty" does not act here: the title link
   carries the card's stretched ::after hit area) */
.news-card__title{text-wrap:balance}
.news-list .filter-bar{margin-bottom:clamp(28px,3.4vw,44px)}
.no-js .news-list .filter-bar{display:none}                                /* the tabs need JS; all cards stay visible */
/* (touch screens: the 44 px hit area of the one-word first tab 全部 / ALL / すべて — QA INT-08 — is a core rule of
   every filter bar now: site.css §20 .filter-bar__btn:first-child::before) */
/* JS on: the cards after the first page (data-later-page, templates/news.html) stay hidden until site.js has
   paginated the list (it sets .is-ready on the filter root), so that the browser does not fetch their lazy covers
   while the whole list is laid out (QA technical-13).  Without JS — or when site.js never boots: html.reveal-all,
   set by the core after 4 s — every card is shown */
.js:not(.reveal-all) .news-list [data-page-size]:not(.is-ready) [data-later-page]{display:none}

/* Chinese titles with phrase hints (pages/news.py → display_titles): break only at their <wbr> */
.news-phrases{word-break:keep-all;overflow-wrap:break-word}

/* ── article ──────────────────────────────────────────────────────────────── */
/* one reading column (≈ 760 px) shared by the header, the text and the pager */
.news-article .container--narrow{max-width:calc(760px + 2 * var(--gutter))}
.news-article .page-header{padding-bottom:clamp(28px,3.6vw,48px)}
.news-article .page-header__title{max-width:none;font-size:clamp(25px,2.5vw,34px);line-height:1.42;text-transform:none;text-wrap:balance}
html[lang="en"] .news-article .page-header__title{font-size:clamp(24px,2.35vw,32px);line-height:1.24;letter-spacing:.2px}
html[lang="ja"] .news-article .page-header__title{font-size:clamp(23px,2.3vw,31px);line-height:1.5}
.news-article .page-header__meta{display:flex;flex-wrap:wrap;align-items:center;margin-top:18px;font-size:14px;letter-spacing:.08em}
/* date | category — as on the news cards; the category leads to the filtered list (news/#company) */
.news-article__cat{position:relative;margin-left:14px;padding-left:14px;border-left:1px solid var(--line);color:var(--deep);letter-spacing:var(--ls-label);transition:color .2s}
.news-article__cat::after{content:"";position:absolute;top:-12px;bottom:-12px;left:0;right:-8px}       /* tap target ≥ 44 px */
html[lang="en"] .news-article__cat{font-size:13px;text-transform:uppercase}
.news-article__cat:hover,.news-article__cat:focus{color:var(--bright);text-decoration:underline;text-underline-offset:4px;text-decoration-thickness:1px}

.news-article__main{padding-top:clamp(40px,5vw,72px)}
.news-article__cover{margin:0 0 clamp(28px,3.4vw,44px)}
.news-article__body{max-width:none}
.news-article__body.prose>:first-child{margin-top:0}                      /* also a leading h2 (.prose h2 has 1.9em) */
/* a headline pasted at the top of the text (2025 articles) reads as the article's standfirst */
.news-article__body>h2:first-child{padding-left:clamp(18px,2.2vw,28px);border-left:2px solid var(--teal);font-size:clamp(19px,1.75vw,23px);font-weight:300;line-height:1.6;letter-spacing:var(--ls-head);text-wrap:balance}
/* a two-part headline (… 铸核 高光闪耀 …, class set by pages/news.py) breaks at its space where both parts fit */
@media (min-width:1200px){ html[lang="zh-CN"] .news-article__body--phrased>h2:first-child{word-break:keep-all;overflow-wrap:break-word} }
html[lang="ja"] .news-article__body>h2:first-child{line-break:strict;word-break:auto-phrase}
html[lang="en"] .news-article__body>h2:first-child{line-height:1.4;letter-spacing:.2px}
.news-article__body.prose>h2:first-child+*{margin-top:clamp(26px,3vw,40px)}
.news-article__body.prose>figure{margin-top:clamp(26px,3vw,40px);margin-bottom:clamp(26px,3vw,40px)}
.news-article__body.prose>figure+figure{margin-top:clamp(14px,1.6vw,20px)}
.news-article__body.prose>figure:last-child{margin-bottom:0}
.news-article__body img{background:var(--mist)}
/* body text: no single character / word alone on the last line of a paragraph; Japanese: no ー or small kana
   (ョ ッ ェ …) at the start of a line — .prose leaves both to the browser defaults */
.news-article__body p{text-wrap:pretty}
html[lang="ja"] .news-article__body p,html[lang="ja"] .news-card__text{line-break:strict}

/* previous / next: the date of the neighbour after its label, as on the cards (label | date); both sides start
   at the same height whatever the length of their titles, the back link sits in the middle */
.news-pager{align-items:start}
.news-pager .pager__back{align-self:center}
/* up to 3 lines: the longest Chinese title (308) breaks between its phrases into exactly 3 — a clamp after 2 would
   cut it at a phrase end without an ellipsis */
.news-pager .pager__title{-webkit-line-clamp:3}
.news-pager__date{margin-left:10px;padding-left:10px;border-left:1px solid var(--line);font-size:13px;line-height:1.1;white-space:nowrap}
/* phones: previous and next one below the other — side by side the label, the date and the arrow do not fit
   into half a phone width (the label was squeezed to one character per line) */
@media (max-width:767px){
  .news-pager{grid-template-columns:minmax(0,1fr)}
  .news-pager .pager__link--next{grid-column:1}
  .news-pager .pager__back{grid-row:3}
}

/* Japanese titles are long compound nouns (第3回特種設備安全監察技能競技大会): in narrow columns the phrase-wise
   breaking of site.css leaves a single character on the last line, so there the lines are filled character-wise
   (the usual Japanese setting) with even lines.  The card titles follow the same rule in the core (site.css, so that
   the home page's teasers break like the list — final re-check regression-r1-08) */
@media (max-width:1199px){
  html[lang="ja"] .news-pager .pager__title,
  html[lang="ja"] .news-article__body>h2:first-child{word-break:normal;text-wrap:balance}
  html[lang="ja"] .news-article .page-header__title{word-break:normal}
}

/* ── more news, hotline ───────────────────────────────────────────────────── */
.news-more .news-card__media::before{padding-top:62.5%}
.hotline-band .cta-band__text p{text-wrap:balance}                        /* no "e-mail." alone on the last line */
