/* AI news page (news.html), "pages" layer (see site.css for the layer order). The cards are written by
   tools/build-news.mjs from news/items/*.json. Colours come from the shared tokens only, so the dark theme
   (dark.css switches the tokens) needs no rules of its own for this page. */
@layer pages {
  .news-body{background:var(--c-paper)}
  .news-hero{padding:var(--space-8) 0 var(--space-6)}
  .news-hero-inner{display:flex;justify-content:space-between;align-items:end;gap:var(--space-7)}
  .news-hero .guide-breadcrumb,.news-hero .guide-breadcrumb a{color:var(--c-muted)}
  .news-hero h1{margin:var(--space-4) 0 0;font-size:clamp(44px,6vw,72px);line-height:1;letter-spacing:-.04em;font-weight:700;color:var(--c-ink)}
  .news-hero h1 em{font-family:var(--font-serif);font-weight:400;font-style:italic;color:var(--c-accent-ink)}
  .news-hero-copy{max-width:440px}
  .news-hero-copy p{margin:0;font-size:16px;line-height:1.65;color:var(--c-ink-soft)}
  .news-count{display:block;margin-top:var(--space-3);font-size:14px;color:var(--c-muted)}

  /* The page is set like a newspaper: a nameplate between rules, a dateline, serif headlines and columns
     divided by hairlines instead of boxed cards. The first story of an issue is the lead. */
  .news-hero{padding:var(--space-7) 0 0}
  .news-hero-inner{padding-bottom:var(--space-5);border-bottom:4px double var(--c-ink)}
  .news-list{padding-top:0;padding-bottom:var(--space-8)}
  .news-issue{margin-bottom:var(--space-8);scroll-margin-top:calc(var(--header-h,76px) + 20px)}
  .news-issue-title{margin:0;padding:10px 0;border-bottom:1px solid var(--c-ink);font:600 13px/1.4 var(--font-sans);letter-spacing:.14em;text-transform:uppercase;color:var(--c-ink)}
  .news-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:0}
  .news-card{display:flex;flex-direction:column;scroll-margin-top:calc(var(--header-h,76px) + 20px);padding:28px 0 30px;border-bottom:1px solid var(--c-line)}
  /* Two stories in a row are parted by a vertical rule. The lead takes the whole row. */
  .news-card:nth-child(even){padding-right:32px;border-right:1px solid var(--c-line)}
  .news-card:nth-child(odd):not(:first-child){padding-left:32px}
  .news-card:first-child{grid-column:1 / -1;padding:34px 0 36px;border-bottom:1px solid var(--c-ink)}
  .news-card h3{margin:0 0 10px;font-family:var(--font-serif);font-size:28px;line-height:1.16;letter-spacing:-.012em;font-weight:700;text-wrap:balance}
  .news-card:first-child h3{margin-bottom:14px;font-size:clamp(36px,4.2vw,58px);line-height:1.05;letter-spacing:-.02em}
  /* The link has a class, so the dark theme's rule for plain text links leaves the headline in the text colour. */
  .news-headline{color:var(--c-ink);text-decoration:none}
  .news-headline:hover{text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:5px}
  .news-headline:focus-visible,.news-sources a:focus-visible{outline:3px solid var(--c-accent);outline-offset:3px;border-radius:4px}
  .news-card p{margin:0;overflow-wrap:anywhere}
  /* The credit is the byline: it sits under the headline, as in a paper, though it comes last in the markup. */
  .news-card .news-credit{order:1;margin-bottom:16px;font:italic 400 14px/1.5 var(--font-serif);color:var(--c-muted)}
  .news-summary{order:2;font-family:var(--font-serif);font-size:17px;line-height:1.62;color:var(--c-ink-soft)}
  .news-card:first-child .news-summary{column-count:2;column-gap:40px;column-rule:1px solid var(--c-line);font-size:18px;line-height:1.6}
  .news-card:first-child .news-summary::first-letter{float:left;margin:5px 5px -6px 0;font-size:58px;line-height:.86;font-weight:700;color:var(--c-ink)}
  .news-card .news-sources{order:3;display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 16px;margin-top:auto;padding-top:18px;font:600 12px/1.5 var(--font-sans);letter-spacing:.08em;text-transform:uppercase}
  .news-label{color:var(--c-muted)}
  .news-sources a{color:var(--c-accent-ink);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:4px}
  .news-sources a:hover{text-decoration-thickness:2px}
  .news-empty{max-width:820px;margin:0 0 var(--space-8);padding:22px 24px;background:var(--c-white);border:1px solid var(--c-line);border-radius:var(--radius-lg);font-size:16px;color:var(--c-ink-soft)}

  @media (max-width:860px){
    .news-cards{grid-template-columns:minmax(0,1fr)}
    .news-cards .news-card:nth-child(n){padding-left:0;padding-right:0;border-right:0}
    .news-card:first-child .news-summary{column-count:1}
  }
  @media (max-width:760px){
    .news-hero-inner{display:block}
    .news-hero-copy{max-width:none;margin-top:var(--space-4)}
    .news-card h3{font-size:25px}
    .news-card:first-child h3{font-size:34px}
    .news-card:first-child .news-summary{font-size:17px}
  }
}
