/* News (Tin tức) in the style of minecraft.net/article (owner, 26/09): near-black page, #262423 panels and header,
   block buttons in the site's torch orange, a 4-column grid of panel cards, square pagination, a full-width
   post page with an author/date column beside the article (no cover picture since 26/09).
   Colours sampled from minecraft.net screenshots. Display type is the site's own pixel font ("MC") in capitals —
   Mojang's Minecraft Ten is not ours to copy; body type is Noto Sans (self-hosted, Vietnamese + Latin subsets).
   Our own addition: a small coloured block in front of labels = category of a post, or kind of change in a post.
   The earlier Wild Rift style is kept in news.css.bak_26-09_wildrift. */
@font-face { font-family: "Noto Sans"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(../fonts/noto-sans-vietnamese.woff2) format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Noto Sans"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(../fonts/noto-sans-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --mc-page: #171615; --mc-band: #000; --mc-panel: #262423; --mc-panel-hi: #312e2c; --mc-line: #3d3a38; --mc-foot: #111;
  --mc-accent: #ffb238; --mc-accent-lo: #b8650f; --mc-accent-hi: #ffd488; --mc-accent-text: #ffb238;   /* torch orange, the site's accent (owner 26/09: one accent for the whole site) */
  --mc-text: #fff; --mc-body: #e6e0db; --mc-muted: #aba09c;
  --font-news: "Noto Sans", system-ui, sans-serif;
  --mc-max: 1200px;
}
.cat--update, .mc-filter--update { --c: #70dfff; }
.cat--event, .mc-filter--event { --c: #ffc42b; }
.cat--system, .mc-filter--system { --c: #86d562; }
.cat--notice, .mc-filter--notice { --c: #ff8ad8; }
.cat__block { width: 8px; height: 8px; flex: none; background: var(--c, var(--mc-muted)); box-shadow: 2px 2px 0 #000; }
.cat { display: inline-flex; align-items: center; gap: var(--s2); color: var(--c); font: 700 12px/1.2 var(--font-news); text-transform: uppercase; letter-spacing: .08em; }

body.news-page { background: var(--mc-page); color: var(--mc-body); font: 400 16px/1.6 var(--font-news); }
.news-page h1, .news-page h2, .news-page h3 { text-shadow: none; }

/* the top bar is the site-wide one: bar.css + wiki/site_bar.py */

/* ---------- buttons & links ---------- */
.mc-btn { display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; padding: 0 var(--s4); background: var(--mc-accent); color: #1f1405; text-decoration: none;
  font: 800 16px/1 var(--font-news); text-transform: uppercase; letter-spacing: .04em;
  box-shadow: inset 0 -4px 0 var(--mc-accent-lo), inset 0 3px 0 var(--mc-accent-hi), 0 0 0 2px #000; }  /* the Minecraft button bevel */
.mc-more { color: var(--mc-accent-text); font: 700 15px/1.3 var(--font-news); text-decoration: none; }
.news-page a:focus-visible, .news-page button:focus-visible, .news-strip a:focus-visible { outline: 2px solid var(--mc-accent-text); outline-offset: 3px; }

/* ---------- latest news ---------- */
.mc-latest { max-width: var(--mc-max); margin: 0 auto; padding: var(--s6) var(--s3) var(--s7); }
.mc-latest__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); }
.mc-latest__title { font: 40px/1.7 var(--font-pixel); color: var(--mc-text); text-transform: uppercase; }
@media (max-width: 559px) { .mc-latest__title { font-size: 32px; } }
/* the filters: equal panel buttons, each with its colour block ("all" too) — owner 26/09: "không đồng đều … bỏ chữ lọc" */
.mc-filter--all { --c: var(--mc-body); }
.mc-filters { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: var(--s2); }
.mc-filter { display: flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 44px; padding: 0 var(--s3); border: 0; background: var(--mc-panel); cursor: pointer;
  color: var(--mc-text); font: 700 13px/1.2 var(--font-news); text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; }
.mc-filter:hover { color: var(--mc-accent-text); background: var(--mc-panel-hi); }
@media (max-width: 559px) { .mc-filters { width: 100%; grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 374px) { .mc-filter { padding: 0 var(--s1); gap: 6px; letter-spacing: .02em; } }
.mc-filter[aria-pressed="true"] { color: var(--mc-accent-text); box-shadow: inset 0 -3px 0 var(--mc-accent-text); }
.mc-filter__n { color: var(--mc-muted); font-weight: 400; }

.mc-grid { list-style: none; margin: var(--s4) 0 0; padding: 0; display: grid; gap: var(--s3); grid-template-columns: 1fr; }
@media (min-width: 560px) { .mc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 820px) { .mc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .mc-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.mc-card[hidden] { display: none; }
/* page / filter change (news.js adds .is-swap): the new cards rise in one after another, 30 ms apart */
.mc-grid.is-swap .mc-card { animation: mc-card-in .32s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(min(var(--i, 0), 11) * 30ms); }
@keyframes mc-card-in { from { opacity: 0; transform: translateY(10px); } }
.mc-latest { scroll-margin-top: 72px; }   /* page buttons scroll here; the sticky bar (64px) would cover the heading */
.mc-card { background: var(--mc-panel); transition: background .15s; }
.mc-card:hover { background: var(--mc-panel-hi); }
.mc-card__link { display: flex; flex-direction: column; gap: var(--s2); height: 100%; padding: 12px 12px var(--s3); color: inherit; text-decoration: none; font-family: var(--font-news); }
.mc-card__img { display: block; aspect-ratio: 16 / 9; overflow: hidden; margin-bottom: var(--s1); }
.mc-card__img img { width: 100%; height: 100%; object-fit: cover; }
.mc-card__title { font: 700 17px/1.35 var(--font-news); color: var(--mc-text); text-wrap: balance; }
.mc-card__link:hover .mc-card__title { text-decoration: underline; text-underline-offset: 3px; }
.mc-card__summary { color: var(--mc-muted); font-size: 14px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mc-card__date { margin-top: auto; padding-top: var(--s2); color: var(--mc-muted); font-size: 13px; }
/* text-only card (home page strip): no picture — the category block leads, three lines of summary */
.mc-card--text .mc-card__link { padding: var(--s4) var(--s4) var(--s3); box-shadow: inset 0 3px 0 var(--c, var(--mc-line)); }
.mc-card--text { --c: var(--mc-line); }
.mc-card--text:has(.cat--update) { --c: #70dfff; } .mc-card--text:has(.cat--event) { --c: #ffc42b; } .mc-card--text:has(.cat--system) { --c: #86d562; } .mc-card--text:has(.cat--notice) { --c: #ff8ad8; }
.mc-card--text .mc-card__summary { -webkit-line-clamp: 3; line-clamp: 3; }

.mc-pages { display: flex; justify-content: center; align-items: center; gap: var(--s2); margin-top: var(--s6); }
.mc-pages[hidden] { display: none; }
.mc-page { min-width: 40px; height: 40px; padding: 0 var(--s2); border: 0; background: var(--mc-page); color: var(--mc-text); cursor: pointer;
  font: 700 15px/1 var(--font-news); box-shadow: inset 0 0 0 2px var(--mc-line); }
.mc-page:hover { box-shadow: inset 0 0 0 2px var(--mc-muted); }
.mc-page[aria-current="page"] { color: var(--mc-accent-text); box-shadow: inset 0 0 0 2px var(--mc-accent); }
.mc-page:disabled { opacity: .35; cursor: default; box-shadow: inset 0 0 0 2px var(--mc-line); }

/* ---------- post page ---------- */
.mc-post { max-width: var(--mc-max); margin: 0 auto; padding: var(--s6) var(--s3) 0; display: grid; gap: var(--s4) var(--s6); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .mc-post { grid-template-columns: 176px minmax(0, 1fr); } }
.mc-byline { display: flex; gap: var(--s3); align-items: center; font: 700 14px/1.4 var(--font-news); color: var(--mc-text); }
.mc-byline img { width: 48px; height: 48px; image-rendering: pixelated; box-shadow: 4px 4px 0 #000; }   /* the server's star (owner 26/09), was a Steve face */
.mc-byline img.mc-byline__photo { image-rendering: auto; background: var(--mc-panel-hi); }   /* a rendered picture, not pixel art: smooth scaling; its transparent corners sit on a panel */
.mc-byline dl { margin: 0; display: grid; gap: var(--s2); }
.mc-byline dt { color: var(--mc-muted); font-weight: 400; }
.mc-byline dd { margin: 0; }
@media (min-width: 900px) {
  .mc-byline { flex-direction: column; align-items: center; align-self: start; text-align: center; padding-top: var(--s2); }
  .mc-byline img { width: 96px; height: 96px; }
  .mc-byline dl { gap: var(--s3); }
}
@media (max-width: 899px) { .mc-byline { order: 2; } .mc-byline dl { grid-template-columns: auto auto; column-gap: var(--s4); } .mc-article { display: contents; } }
.mc-article { max-width: 820px; min-width: 0; }
.mc-article__head { order: 1; }
.mc-article__crumbs { font-size: 14px; color: var(--mc-muted); margin-bottom: var(--s3); }
.mc-article__crumbs a { color: var(--mc-text); }
.mc-article__title { font: 40px/1.7 var(--font-pixel); color: var(--mc-text); text-transform: uppercase; text-wrap: balance; }   /* capitals + stacked Vietnamese marks (Ỗ, Ồ) reach into the line above: 1.45 was not enough (26/09) */
@media (max-width: 559px) { .mc-article__title { font-size: 24px; } }
.mc-article__summary { margin-top: var(--s2); font-size: 18px; line-height: 1.55; color: var(--mc-text); }

.prose { order: 3; margin-top: var(--s5); font-size: 17px; line-height: 1.7; color: var(--mc-body); }
@media (max-width: 899px) { .prose { margin-top: 0; } }
.prose > p { margin-top: var(--s3); }
.prose .sec { display: flex; align-items: center; gap: var(--s3); margin: var(--s6) 0 var(--s3); font: 32px/1.7 var(--font-pixel); color: var(--mc-text); text-transform: uppercase; }
.prose .sec:first-child { margin-top: 0; }
@media (max-width: 559px) { .prose .sec { font-size: 24px; } }
.sec__block { width: 16px; height: 16px; flex: none; background: var(--k, var(--mc-muted)); box-shadow: 3px 3px 0 #000; }
.sec--new { --k: #86d562; }
.sec--change { --k: #ffc42b; }
.sec--fix { --k: #70dfff; }
.sec--perf { --k: #9ad7ff; }
.sec--removed { --k: #ff5f57; }
.sec--note { --k: var(--mc-body); }
.prose h3 { margin: var(--s4) 0 var(--s2); font: 700 20px/1.35 var(--font-news); color: var(--mc-text); }
.prose .list { list-style: none; margin: var(--s2) 0 0; padding: 0; }
.prose .list > li { position: relative; margin-top: var(--s2); padding-left: var(--s4); }
.prose .list > li::before { content: ""; position: absolute; left: 2px; top: .7em; width: 8px; height: 8px; background: var(--mc-accent-text); }
.prose .list--sub { margin-top: var(--s1); }
.prose .list--sub > li { margin-top: var(--s1); }
.prose .list--sub > li::before { content: "→"; top: 0; width: auto; height: auto; background: none; color: var(--mc-muted); }
.prose strong { color: var(--mc-text); font-weight: 700; }
.prose code { padding: 1px var(--s1); font: 16px/1.4 var(--font-pixel); color: #ffc42b; background: #000; }
.prose a { color: var(--mc-accent-text); text-underline-offset: 3px; }
.callout { margin-top: var(--s3); padding: var(--s3); color: var(--mc-text); background: var(--mc-panel); box-shadow: inset 4px 0 0 var(--mc-accent); }
.callout--note { margin: 0 0 var(--s5); box-shadow: inset 4px 0 0 #ffc42b; }
.aside { margin-top: var(--s5); color: var(--mc-muted); font-size: 15px; }

.mc-other { max-width: var(--mc-max); margin: var(--s7) auto 0; padding: 0 var(--s3) var(--s7); }

/* ---------- back to top (the wiki's button, news colours) ---------- */
.to-top { position: fixed; right: var(--s3); bottom: var(--s3); z-index: 41; display: grid; place-items: center; width: 48px; height: 48px;
  padding: 0; color: var(--mc-text); background: var(--mc-panel); border: 0; border-radius: 0; cursor: pointer;
  box-shadow: inset 0 0 0 2px var(--mc-line), 4px 4px 0 #000; opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .16s ease-out, transform .16s ease-out, visibility 0s linear .16s; }
.to-top.is-on { opacity: 1; visibility: visible; transform: none; transition: opacity .16s ease-out, transform .16s ease-out, visibility 0s; }
.to-top:hover { color: var(--mc-accent-text); box-shadow: inset 0 0 0 2px var(--mc-accent), 4px 4px 0 #000; }
.to-top:active { transform: translateY(2px); }
.to-top svg { width: 20px; height: 20px; shape-rendering: crispEdges; }
#main:focus { outline: none; }                  /* focused by the back-to-top button: a landmark, not a control */
@media (prefers-reduced-motion: reduce) { .to-top, .to-top.is-on { transition: none; transform: none; } }

/* ---------- footer ---------- */
.mc-foot { background: var(--mc-foot); padding: var(--s5) var(--s3); text-align: center; font: 13px/1.6 var(--font-news); color: var(--mc-muted); }
.mc-foot a { color: var(--mc-text); }

/* ---------- "Tin mới" strip on the home page (site.css page, Minecraft cards) ---------- */
/* a deepslate chapter of the home page (site.css .chapter--deep gives padding + texture), near the end of the dig */
.news-strip__inner { max-width: var(--max-w); margin: 0 auto; }
.news-strip__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--s3); }
.news-strip__all { color: var(--mc-accent-text); font: 700 16px/1.3 var(--font-news); text-underline-offset: 3px; }
.news-strip .mc-grid { margin-top: var(--s4); }
@media (min-width: 820px) { .news-strip .mc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 560px) and (max-width: 819px) { .news-strip .mc-tile:nth-child(3) { display: none; } }   /* 2 columns: keep the row even */

/* the home strip's cards, minecraft.net manner (owner 26/09): picture on top, a dark panel with category + title over its lower
   edge; hover (or keyboard focus) slides the panel up to show summary + date and zooms the picture a little.
   The picture keeps its whole 16:9 (cover icons span up to 94% of the width, so a square crop would cut them) and the panel
   overlaps only its plain bottom 40px at rest (the icons sit in the middle 32–68%: news/covers.py) — measured at every width,
   whatever the title length; a fixed 4:3 / 5:4 card let a three-line title reach 62%.
   The summary hangs below the panel, hidden by the card's edge; hover moves the panel up by exactly its height — a transform
   only, so the motion stays smooth. */
.mc-tile { display: flex; }                                  /* the grid stretches the item; the link fills it (equal heights) */
.mc-tile__link { position: relative; display: flex; flex-direction: column; width: 100%; overflow: hidden; background: var(--mc-panel); color: var(--mc-text); text-decoration: none; }
.mc-tile__img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .45s cubic-bezier(.2, .7, .2, 1); }
.mc-tile__panel { --more: 84px; position: relative; flex: 1; margin-top: -40px; padding: var(--s3); background: rgba(23, 22, 21, .88); transition: transform .35s cubic-bezier(.2, .7, .2, 1); }
.mc-tile__title { margin: var(--s2) 0 0; font: 16px/1.6 var(--font-pixel); color: var(--mc-text); transition: color .2s; }   /* 1.6: stacked marks (ề, ố) in the pixel font */
.mc-tile__more { position: absolute; inset: 100% 0 auto 0; height: var(--more); padding: 0 var(--s3) var(--s3); background: inherit; }
.mc-tile__more-in { display: flex; flex-direction: column; gap: var(--s2); }
.mc-tile__summary { color: var(--mc-body); font: 400 14px/21px var(--font-news);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.mc-tile__date { color: var(--mc-muted); font: 400 13px/18px var(--font-news); }
.mc-tile__link:hover .mc-tile__panel, .mc-tile__link:focus-visible .mc-tile__panel { transform: translateY(calc(-1 * var(--more))); }
.mc-tile__link:hover .mc-tile__img, .mc-tile__link:focus-visible .mc-tile__img { transform: scale(1.06); }
.mc-tile__link:hover .mc-tile__title { color: var(--mc-accent-text); }
@media (prefers-reduced-motion: reduce) { .mc-tile__img, .mc-tile__panel { transition: none; } .mc-tile__link:hover .mc-tile__img, .mc-tile__link:focus-visible .mc-tile__img { transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .mc-card { transition: none; }
  .mc-grid.is-swap .mc-card { animation: none; }
}

/* terms and privacy pages (legal/build_legal.py, 27/09): the article column alone, no byline */
@media (min-width: 900px) { .mc-post--single { grid-template-columns: minmax(0, 1fr); max-width: 860px; } }
.legal__dates { margin-top: var(--s2); font-size: 15px; color: var(--mc-muted); }
.legal__dates b { color: var(--mc-body); font-weight: 600; }
.legal-page .prose > p:last-child em { display: block; margin-top: var(--s6); font-size: 14px; color: var(--mc-muted); }
