/* News / devlog pages (/news, /news/<slug>, /news/tags/...).
   Loaded only by those pages (NewsHead.razor), so app.css is untouched. Uses the colour variables from app.css. */

.news_page {
    width: 100%;
    max-width: 52rem;
    margin: 0 auto;
    padding: 2.5rem var(--gutter) 4rem;
}
.news_page h1 {
    font-size: clamp(2rem, 1.2rem + 3.5vw, 3.5rem);
    text-shadow: 0 0 8px var(--shadow);
    overflow-wrap: anywhere;
}
.news_page h2 { text-align: left; text-shadow: none; }
.news_page_header { margin-bottom: 1.5rem; }
.news_lead { margin-top: 0.5rem; color: var(--textSecondary); }
.news_meta { margin: 0.5rem 0 0; font-size: 1rem; color: var(--textSecondary); }
.news_back { margin-bottom: 0.5rem; font-size: 1rem; }
.news_back a { display: inline-flex; align-items: center; min-height: 44px; }

/* Pill links: tags, feed links, pager. 44px high tap targets. */
.news_chip {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 1rem;
    font-size: 1rem;
    text-decoration: none;
    border-radius: 999px;
    color: var(--textPrimary);
    background-color: var(--alphaLayer02);
    border: 1px solid var(--alphaLayer01);
}
.news_chip:hover { background-color: var(--alphaLayer01); }
.news_count { margin-left: 0.35em; color: var(--textSecondary); }

.news_actions, .news_pager, .news_tags, .news_taglist li { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.news_actions { margin-top: 1rem; }
.news_tags, .news_taglist, .news_list { list-style: none; }
.news_taglist { display: grid; gap: 0.75rem; }
.news_pager { justify-content: space-between; margin-top: 2rem; }

/* List of posts */
.news_list { display: grid; gap: 1.5rem; }
.news_card {
    display: grid;
    gap: 1rem;
    padding: 1rem;
    border-radius: 12px;
    background-color: var(--alphaLayer03);
}
.news_card_cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; }
.news_card_title { font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2rem); line-height: 1.15; }
.news_card_title a { text-decoration: none; }
.news_card_title a:hover { text-decoration: underline; }
.news_card_summary { margin-top: 0.75rem; max-width: 60ch; color: var(--textSecondary); }
.news_card .news_tags { margin-top: 0.75rem; }
@media (min-width: 48em) {
    .news_card:has(.news_card_cover) { grid-template-columns: 14rem 1fr; align-items: start; }
}

/* Single post */
.news_cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; margin-top: 1.5rem; border-radius: 12px; }   /* fixed ratio: no layout shift while loading */
.news_body { margin-top: 1.5rem; max-width: 44rem; overflow-wrap: anywhere; }
.news_body > * + * { margin-top: 1.25rem; }
.news_body h2, .news_body h3, .news_body h4 { margin-top: 2rem; line-height: 1.2; text-align: left; }
.news_body h2 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem); }
.news_body h3 { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.75rem); }
.news_body h4, .news_body h5, .news_body h6 { font-size: 1.2rem; }
.news_body a { color: #fff; text-underline-offset: 3px; }
.news_body ul, .news_body ol { padding-left: 1.5rem; }
.news_body li + li { margin-top: 0.35rem; }
.news_body img, .news_body video, .news_body iframe { max-width: 100%; height: auto; border-radius: 8px; }
.news_body iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; }
.news_body blockquote { padding: 0.25rem 0 0.25rem 1rem; border-left: 4px solid var(--alphaLayer01); color: var(--textSecondary); }
.news_body hr { border: 0; height: 2px; background: var(--alphaLayer01); }
.news_body code { padding: 0.1em 0.35em; font-size: 0.9em; border-radius: 4px; background: var(--bgFooter); }
.news_body pre { padding: 1rem; overflow-x: auto; border-radius: 8px; background: var(--bgFooter); }
.news_body pre code { padding: 0; background: none; }
.news_body table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.news_body th, .news_body td { padding: 0.5rem 0.75rem; text-align: left; border: 1px solid var(--alphaLayer01); }
.news_body figure { margin: 0; }
.news_body figcaption { font-size: 0.95rem; color: var(--textSecondary); }
.news_article_footer { margin-top: 3rem; padding-top: 1.5rem; border-top: 2px solid var(--alphaLayer01); }
.news_small_heading { margin-bottom: 0.5rem; font-size: 1.1rem; letter-spacing: 1px; text-transform: uppercase; color: var(--textSecondary); }

/* Match the home page: uppercase headings, light-grey "button" links, rounded cards that react to the pointer.
   (Colours, fonts and the h1-h3 base styles come from app.css; nothing here needs script.) */
.news_page h1, .news_card_title, .news_body h2, .news_body h3 { text-transform: uppercase; }
.news_page_header { text-align: center; }
.news_page_header .news_back { text-align: left; }
.news_page_header .news_actions { justify-content: center; }
.news_lead { font-size: 1.25rem; letter-spacing: 1px; text-transform: uppercase; }
.news_card { transition: background-color .2s; }
.news_card:hover { background-color: var(--alphaLayer02); }
.news_card_title { text-shadow: 0 0 8px var(--shadow); }
.news_card_title a:hover { text-decoration: none; }
.news_card_title a:focus-visible { border-radius: 5px; }
.news_chip { border-radius: 5px; }
.news_actions .news_chip, .news_pager .news_chip {
    min-height: 48px;
    padding: 10px 24px;
    font-size: 1.125rem;
    color: var(--textButton);
    background-color: var(--textPrimary);
    border: none;
    transition: background-color .2s, box-shadow .2s, transform .1s;
}
.news_actions .news_chip:hover, .news_pager .news_chip:hover { background-color: var(--bgButtonHover); box-shadow: 0 2px 8px var(--shadow); }
.news_actions .news_chip:active, .news_pager .news_chip:active { transform: scale(.97); }
.news_pager { color: var(--textSecondary); }

/* Custom pages (post layout "page"): the post's HTML fills the width of the page; the author's own CSS is scoped to .news_custom.
   Only a few safe defaults here, everything else (fonts, colours, spacing) is up to the page. The strip below it is the site's own. */
.news_custom { display: block; width: 100%; overflow-x: clip; overflow-wrap: anywhere; }
.news_custom img, .news_custom video { max-width: 100%; height: auto; }
.news_custom_strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    padding: 1rem var(--gutter);
    font-size: 1rem;
    color: var(--textSecondary);
    background-color: var(--bgFooter);
    border-top: 2px solid var(--alphaLayer01);
}
.news_custom_strip .news_tags { margin: 0; padding: 0; }
.news_custom_all { margin-left: auto; min-height: 48px; padding: 10px 24px; font-size: 1.125rem; color: var(--textButton); background-color: var(--textPrimary); border: none; }
.news_custom_all:hover { background-color: var(--bgButtonHover); box-shadow: 0 2px 8px var(--shadow); }

/* The box around every post body (articles and custom pages). Author CSS and inline styles cannot make anything cover the rest of the
   site: fixed and absolute descendants are positioned against this box and clipped to it (contain: layout paint makes it their containing block). */
.news_box { display: block; contain: layout paint; overflow: clip; isolation: isolate; }
