/* News and patch notes (news/index.html, news/<post>.html), written by build-news.js.
   Only what these pages alone draw; tokens, the page head, tags and .doc come from zp.css. */

/* ---------- the list ---------- */
.nw-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-4); max-width: 920px; }
.nw-item {
  position: relative;
  display: grid; grid-template-columns: 1fr; gap: var(--s-2);
  padding: var(--s-5); text-decoration: none; color: inherit;
  background: var(--surface) var(--shade); border: 1px solid var(--line-2); border-radius: var(--r-3);
  box-shadow: var(--lip), var(--raise);
  transition: border-color var(--fast), background-color var(--fast);
}
.nw-item:hover { border-color: var(--line-3); background-color: var(--surface-2); }
.nw-item:focus-visible { outline-offset: 3px; }
/* The newest post: the accent edge along the top, a stub at rest and the full width on hover. */
.nw-item.is-latest::after { content: ""; position: absolute; left: -1px; top: -1px; right: 70%; height: 3px; background: var(--accent); border-radius: var(--r-3) 0 0 0; transition: right 420ms var(--ease); }
.nw-item.is-latest:hover::after { right: -1px; border-radius: var(--r-3) var(--r-3) 0 0; }
.nw-date { font-family: var(--f-mono); font-size: var(--fs-xs); letter-spacing: 0; color: var(--text-3); white-space: nowrap; }
.nw-main { display: grid; gap: var(--s-2); min-width: 0; }
.nw-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.nw-tags:empty { display: none; }
.nw-title { font-family: var(--f-display); font-weight: 600; font-size: var(--mc-h2r); line-height: 1.08; letter-spacing: 0; text-transform: uppercase; color: var(--text); text-wrap: balance; }
.nw-item:hover .nw-title { color: var(--accent-hi); }
.nw-sum { color: var(--text-2); font-size: var(--fs-md); max-width: 62ch; }
.nw-more { display: inline-flex; align-items: center; gap: 8px; margin-top: 2px; font-family: var(--f-mono); font-size: var(--fs-xs); letter-spacing: 0; text-transform: uppercase; color: var(--accent); }
.nw-more::after { content: ""; width: 6px; height: 6px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: rotate(45deg); transition: transform var(--fast); }
.nw-item:hover .nw-more::after { transform: translateX(3px) rotate(45deg); }
@media (min-width: 720px) {
  .nw-item { grid-template-columns: 150px minmax(0, 1fr); gap: var(--s-5); }
  .nw-date { padding-top: 4px; }
}
.nw-empty { max-width: 640px; color: var(--text-2); }
.nw-empty p { margin: 0; }

.nw-rss { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); text-decoration: none; border-bottom: 1px solid var(--line-2); }
.nw-rss:hover { color: var(--text); border-color: var(--accent); }
.nw-rss svg, .nw-foot svg { width: 14px; height: 14px; flex: none; }

/* ---------- a post ---------- */
.nw-hero h1 { max-width: 24ch; font-size: var(--mc-hero); }
.nw-back {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 var(--s-4);
  font-family: var(--f-mono); font-size: var(--fs-xs); letter-spacing: 0; text-transform: uppercase;
  color: var(--text-2); text-decoration: none;
}
.nw-back::before { content: ""; width: 6px; height: 6px; border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
.nw-back:hover { color: var(--text); }
.nw-back + .eyebrow-pill { display: flex; }
.nw-sep { display: inline-block; width: 3px; height: 3px; margin: 0 10px 3px; background: var(--text-3); border-radius: 50%; vertical-align: middle; }

.nw-body { font-size: var(--fs-md); line-height: 1.7; }
.nw-body > :first-child { margin-top: 0; }
.nw-body h2 { margin: var(--s-7) 0 var(--s-3); font-size: var(--mc-s2); line-height: 1.05; }
.nw-body h3 { margin: var(--s-5) 0 var(--s-2); font-size: var(--mc-s1); text-transform: none; letter-spacing: 0; }
.nw-body p { margin: 0 0 1em; }
.nw-body ul, .nw-body ol { margin: 0 0 1.2em; padding-left: 1.3rem; }
.nw-body li { margin-bottom: 0.45em; padding-left: 2px; }
.nw-body ul li::marker { color: var(--accent); }
.nw-body blockquote { margin: 0 0 1.2em; padding: var(--s-3) var(--s-4); border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 var(--r-2) var(--r-2) 0; color: var(--text-2); }
.nw-body blockquote p { margin: 0; }
.nw-body pre { margin: 0 0 1.2em; padding: var(--s-4); overflow-x: auto; background: var(--sunken); border: 1px solid var(--line-2); border-radius: var(--r-2); box-shadow: var(--well); }
.nw-body pre code { padding: 0; background: none; font-size: var(--fs-sm); color: var(--text); }
.nw-body code { color: var(--accent-hi); }
.nw-body hr { margin: var(--s-6) 0; }

.nw-nav { display: grid; grid-template-columns: 1fr; gap: var(--s-3); max-width: 76ch; margin-top: var(--s-7); padding-top: var(--s-5); border-top: 1px solid var(--line); }
.nw-nav-card {
  display: grid; gap: 4px; padding: var(--s-4); text-decoration: none; color: inherit;
  background: var(--surface) var(--shade); border: 1px solid var(--line-2); border-radius: var(--r-3); box-shadow: var(--lip), var(--raise);
  transition: border-color var(--fast), background-color var(--fast);
}
.nw-nav-card:hover { border-color: var(--line-3); background-color: var(--surface-2); }
.nw-nav-card b { font-family: var(--f-display); font-weight: 600; font-size: var(--mc-s1); letter-spacing: 0; text-transform: uppercase; line-height: 1.15; }
.nw-nav-card time { font-family: var(--f-mono); font-size: var(--fs-xs); color: var(--text-3); }
.nw-nav-card.is-newer { text-align: right; }
@media (min-width: 720px) { .nw-nav { grid-template-columns: 1fr 1fr; } }
.nw-foot { display: flex; flex-wrap: wrap; gap: var(--s-5); max-width: 76ch; margin: var(--s-5) 0 0; font-family: var(--f-mono); font-size: var(--fs-xs); letter-spacing: 0; text-transform: uppercase; }
.nw-foot a { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); text-decoration: none; border-bottom: 1px solid var(--line-2); }
.nw-foot a:hover { color: var(--text); border-color: var(--accent); }

/* ==========================================================================
   Minecraft look v2 (2026-10-19): dark and modern
   ==========================================================================
   The list is a column of dark GUI cards: the date and tags on the left, the title big and white,
   the summary in grey, the frame turning lavender under the pointer. A post is one dark GUI panel
   holding the text at a comfortable measure, the older and newer posts as two cards with the
   game's page-turn arrow, and the way out as the game's buttons under it. Loaded before mc.css,
   so the rules that compete with it carry an extra class or element. CSS only: build-news.js
   writes the markup. */

/* ---------- the list ---------- */
.nw-list { max-width: 920px; gap: 12px; }
.nw-list > li { min-width: 0; }
body .nw-item {
  padding: 14px 18px 16px; border: 8px solid transparent; border-radius: 0;
  border-image: var(--mc-gui) 4 fill / 8px / 0 stretch; background: none; box-shadow: none;
  color: var(--text); text-shadow: var(--mc-shadow); transition: transform var(--mc-lift, 160ms ease-out);
}
body .nw-item:hover { border-image-source: var(--mc-gui-hover); background: none; outline: 0; }
@media (prefers-reduced-motion: no-preference) { html:not([data-lite]) body .nw-item:hover { transform: translateY(-2px); } }
body .nw-item:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
body .nw-item.is-latest::after { display: none; }
body .nw-item .nw-date { padding-top: 2px; font-size: var(--mc-s1); color: var(--text-3); text-shadow: var(--mc-shadow); }
body .nw-item .nw-title { font-family: var(--mc-font); font-weight: 400; font-size: var(--mc-s2); line-height: 1.2; color: #fff; text-shadow: var(--mc-shadow); }
body .nw-item:hover .nw-title { color: #fff; text-decoration: none; }
body .nw-item .nw-sum { font-size: var(--mc-s1); line-height: 1.55; color: var(--text-2); max-width: 64ch; }
body .nw-item .nw-more { font-size: var(--mc-s1); color: var(--accent-hi, #cdbbff); text-shadow: var(--mc-shadow); gap: 10px; }
body .nw-item .nw-more::after { width: 8px; height: 8px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; border-radius: 0; transition: none; }
body .nw-item:hover .nw-more::after { transform: rotate(45deg) translate(2px, -2px); }
body .nw-item .zp-tag { height: 26px; padding: 0 8px; background: rgba(0, 0, 0, 0.4); color: var(--text-2); text-shadow: var(--mc-shadow); box-shadow: inset 0 0 0 2px #2a2833; }
body .nw-item .zp-tag.is-accent { background: rgba(169, 139, 255, 0.12); color: var(--accent); text-shadow: var(--mc-shadow); box-shadow: inset 0 0 0 2px #5b4a9c; }
@media (min-width: 720px) { body .nw-item { grid-template-columns: 170px minmax(0, 1fr); gap: 20px; } }
@media (max-width: 479px) { body .nw-item { padding: 10px 12px 12px; } }

.nw-rss { gap: 8px; border-bottom: 0; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.nw-rss:hover { color: #fff; }
.nw-rss svg, .nw-foot svg { width: 18px; height: 18px; }

/* ---------- a post: the head ---------- */
body .nw-back {
  min-height: 36px; padding: 0 12px; margin: 0 0 18px; gap: 10px;
  border: 6px solid transparent;
  border-image: var(--mc-btn) 3 fill / 6px / 0 repeat;
  font-family: var(--mc-font); font-size: var(--mc-s1); color: #fff; text-shadow: var(--mc-shadow);
}
body .nw-back::before { width: 8px; height: 8px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; }
body .nw-back:hover, body .nw-back:focus-visible { border-image-source: var(--mc-btn-hover); color: #fff; outline: none; }
body .nw-back:active { border-image-source: var(--mc-btn-down); }
.nw-sep { width: 4px; height: 4px; border-radius: 0; background: var(--text-3); margin: 0 10px 4px; }

/* ---------- a post: one dark panel ---------- */
body[data-page="news"] > main:has(> .nw-body) {
  width: min(100% - 2 * var(--gutter), 860px); margin: 36px auto 0; padding: 30px 40px 26px;
  border: 8px solid transparent; border-image: var(--mc-gui) 4 fill / 8px / 0 stretch;
  background: none; color: var(--text); text-shadow: var(--mc-shadow); box-shadow: 0 30px 60px -36px rgba(0, 0, 0, 0.95);
}
body .doc.nw-body { max-width: 68ch; color: var(--text-2); text-shadow: var(--mc-shadow); font-size: var(--mc-s1); line-height: 1.65; }
body .doc.nw-body h2 { margin: 30px 0 10px; font-size: var(--mc-s2); line-height: 1.2; color: #fff; text-shadow: var(--mc-shadow); }
body .doc.nw-body h3 { margin: 22px 0 6px; font-size: var(--mc-s1); color: var(--mc-yellow); text-shadow: var(--mc-shadow); }
body .doc.nw-body p, body .doc.nw-body li { color: var(--text-2); text-shadow: var(--mc-shadow); line-height: 1.65; }
body .doc.nw-body p { margin: 0 0 14px; }
body .doc.nw-body ul, body .doc.nw-body ol { padding-left: 24px; margin: 0 0 16px; }
body .doc.nw-body li { margin-bottom: 8px; }
body .doc.nw-body ul li::marker, body .doc.nw-body ol li::marker { color: var(--accent); }
body .doc.nw-body :is(b, strong):not([class]):not([id]) { color: #fff; text-shadow: var(--mc-shadow-b); }
body .doc.nw-body em { font-style: normal; color: var(--accent-hi, #cdbbff); }
body .doc.nw-body a { color: var(--accent-hi, #cdbbff); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
body .doc.nw-body a:hover { color: #fff; }
body .doc.nw-body a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
body .doc.nw-body code { padding: 0 6px; background: rgba(0, 0, 0, 0.5); color: var(--mc-yellow); text-shadow: var(--mc-shadow); box-shadow: none; }
body .doc.nw-body pre {
  margin: 0 0 18px; padding: 10px 14px; overflow-x: auto; border-radius: 0;
  background: none; border: 2px solid transparent; border-image: var(--mc-slot) 1 fill / 2px / 0 stretch; box-shadow: none;
}
body .doc.nw-body pre code { padding: 0; background: none; font-family: var(--mc-code); font-size: var(--mc-s1); color: #e0e0e0; text-shadow: var(--mc-shadow); }
body .doc.nw-body blockquote { margin: 0 0 16px; padding: 10px 14px; border-left: 4px solid var(--accent); border-radius: 0; background: rgba(169, 139, 255, 0.06); color: var(--text-2); }
body .doc.nw-body hr { margin: 24px 0; border: 0; border-top: 2px solid var(--mc-line); box-shadow: none; }

/* the older and newer posts: two cards with the game's page-turn arrow */
body .nw-nav {
  --nw-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 11' shape-rendering='crispEdges'%3E%3Cpath fill='%23101015' d='M0 3h8v5H0zM7 0h2v11H7zM9 1h1v9H9zM10 2h1v7h-1zM11 3h1v5h-1zM12 4h1v3h-1zM13 5h1v1h-1z'/%3E%3Cpath fill='%23a98bff' d='M1 4h7v3H1zM8 1h1v9H8zM9 2h1v7H9zM10 3h1v5h-1zM11 4h1v3h-1zM12 5h1v1h-1z'/%3E%3Cpath fill='%23cdbbff' d='M1 4h7v1H1zM8 1h1v3H8z'/%3E%3C/svg%3E");
  max-width: none; margin-top: 28px; padding-top: 20px; gap: 10px;
  border-top: 2px solid var(--mc-line);
}
body .nw-nav-card {
  position: relative; gap: 2px; padding: 8px 10px 8px 60px; min-height: 56px; align-content: center;
  border: 8px solid transparent; border-image: var(--mc-gui-dark) 4 fill / 8px / 0 stretch; border-radius: 0;
  background: none; box-shadow: none; color: var(--text); text-shadow: var(--mc-shadow); transition: none;
}
body .nw-nav-card::before {
  content: ""; position: absolute; left: 8px; top: 50%; width: 28px; height: 22px; margin-top: -11px;
  background: var(--nw-arrow) 0 0 / 100% 100% no-repeat; transform: scaleX(-1);
}
body .nw-nav-card.is-newer { padding: 8px 60px 8px 10px; }
body .nw-nav-card.is-newer::before { left: auto; right: 8px; transform: none; }
body .nw-nav-card:hover, body .nw-nav-card:focus-visible { border-image-source: var(--mc-gui-hover); background: none; outline: none; }
body .nw-nav-card .zp-label { color: var(--text-3); text-shadow: var(--mc-shadow); }
body .nw-nav-card b { font-family: var(--mc-font); font-weight: 400; font-size: var(--mc-s1); line-height: 1.35; color: #fff; text-shadow: var(--mc-shadow); }
body .nw-nav-card time { font-family: var(--mc-font); font-size: var(--mc-s1); color: var(--text-3); }

/* the way out: the game's buttons */
body .nw-foot { max-width: none; justify-content: center; gap: 10px; margin: 22px 0 0; font-family: var(--mc-font); font-size: var(--mc-s1); }
body .nw-foot a {
  min-height: 40px; padding: 0 16px; gap: 8px; color: #fff; text-shadow: var(--mc-shadow); text-decoration: none;
  border: 6px solid transparent;
  border-image: var(--mc-btn) 3 fill / 6px / 0 repeat;
}
body .nw-foot a:hover, body .nw-foot a:focus-visible { border-image-source: var(--mc-btn-hover); color: #fff; outline: none; }
body .nw-foot a:active { border-image-source: var(--mc-btn-down); }
@media (max-width: 599px) {
  body[data-page="news"] > main:has(> .nw-body) { margin-top: 24px; padding: 16px 14px 16px; }
}
