/* =====================================================================
   Kungfupunk · r4b.css — round 4b (15 Oct 2026, staging): combat, rainblood, gallery, privacy, 404.
   Loaded after style.css and r2.css (and seo.css on combat and rainblood). Adds no new colours: credibility keeps r2's
   jade / ochre / stone; the blue and red of the flashes are the game's own signal colours already in style.css
   (--flash-blue, --red); red otherwise stays on seals and accents. Single column, one visual focus at a time; rhythm comes
   from scale (frames at 852 / 640 / 480 px) and air, never from side-by-side columns. No rounded corners.
   Motion: none that moves layout; one CSS-only scroll reveal of the step numerals (opacity / transform), off under
   reduced motion, static state complete.
   ===================================================================== */

/* ---------- frames at three scales (L = full column, M = 640, S = 480); captions always visible ---------- */
.r4-fig { margin: 34px 0 40px; max-width: none; }
.r4-fig--m { max-width: 640px; }
.r4-fig--s { max-width: 480px; }
@media (min-width: 761px) { .r4-fig--right { margin-left: auto; } }
.r4-fig .bx__cap { margin-top: 12px; }
.r4-go { display: inline-flex; align-items: center; min-height: var(--tap); margin: 2px 0 -10px; color: var(--ink-2) !important; text-decoration-color: rgba(var(--white-rgb), .3); white-space: nowrap; }
.r4-go::after { content: " \2192"; content: " \2192" / ""; margin-left: 6px; color: var(--red-text); }
.r4-go:hover { text-decoration-color: var(--red); }
.r4-scope { margin: 18px 0 8px; padding: 2px 0 2px 18px; border-left: 1px solid var(--c-official); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-3); max-width: var(--measure); }
.r4-scope .src { display: inline; }
.r4b .see-also { margin-top: 18px; }

/* ---------- how a fight works: a numbered sequence down the column ---------- */
.fx { list-style: none; margin: 30px 0 0; padding: 0; max-width: none; counter-reset: none; }
.fx__s { position: relative; margin: 0; padding: 0 0 48px 108px; }
.fx__s::before { content: ""; position: absolute; left: 34px; top: 92px; bottom: 10px; width: 1px; background: var(--rule-soft); }
.fx__s:last-child { padding-bottom: 8px; }
.fx__s:last-child::before { display: none; }
.fx__n { position: absolute; left: 0; top: -10px; margin: 0; font: 500 88px/1 var(--serif); letter-spacing: -.02em; color: transparent; -webkit-text-stroke: 1px rgba(var(--white-rgb), .34); font-variant-numeric: lining-nums; }
.fx__h { margin: 0 0 10px; padding: 14px 0 0; font-size: var(--fs-h3); line-height: var(--lh-h3); color: var(--ink); border: 0; }
.fx__h::before { content: ""; display: block; width: 40px; height: 1px; margin-bottom: 14px; background: var(--red); }
.fx__t { max-width: var(--measure); }
.fx__more { margin: 4px 0 0; font-size: var(--fs-small); }
.fx__more a { display: inline-flex; align-items: center; min-height: var(--tap); color: var(--ink-2); }
.fx .r4-fig { margin: 22px 0 6px; }
.fx .r4-fig--l { max-width: none; }
@media (max-width: 760px) {
  .fx__s { padding: 0 0 40px 0; }
  .fx__s::before { display: none; }
  .fx__n { position: static; font-size: 56px; line-height: .9; margin-bottom: -4px; }
  .fx__h { padding-top: 6px; }
}
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .fx__n { animation: r4-rise linear both; animation-timeline: view(); animation-range: entry 0% entry 60%; }
  }
}
@keyframes r4-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* the two answers: a signal key */
.sig { list-style: none; margin: 4px 0 18px; padding: 0; max-width: var(--measure); border-top: 1px solid var(--rule); }
.sig__i { margin: 0; display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 4px 16px; align-items: baseline; padding: 12px 0 12px 14px; border-bottom: 1px solid var(--rule-soft); position: relative; }
.sig__i::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 2px; }
.sig__i--blue::before { background: var(--flash-blue); }
.sig__i--red::before { background: var(--red); }
.sig__k { font: 600 12px/20px var(--serif); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); white-space: nowrap; }
.sig__v { color: var(--ink-2); }
@media (max-width: 760px) { .sig__i { grid-template-columns: 1fr; } }

/* blue / red paragraphs in the defence section: a coloured rule on the left, one above the other */
.r4-pair { margin: 6px 0 16px; max-width: var(--measure); }
.r4-pair__i { padding: 2px 0 2px 18px; margin: 0 0 14px; border-left: 2px solid; }
.r4-pair__i p { margin: 0; }
.r4-pair__i--blue { border-color: var(--flash-blue); }
.r4-pair__i--red { border-color: var(--red); }

/* narration quote and the narration table */
.r4-qt { margin: 18px 0 34px; }
.r4-arsenal td.cell-name { width: 22%; font-weight: 500; }
.r4-arsenal td.cell-name a { color: var(--ink); }
.r4-arsenal td:last-child { width: 15%; white-space: nowrap; color: var(--ink-3); font-size: var(--fs-small); }
.r4-arsenal td:nth-child(2) { color: var(--ink-2); }
@media (max-width: 760px) { .r4-arsenal td.cell-name, .r4-arsenal td:last-child { width: 100%; white-space: normal; } }
.r4b h3#arsenal-h { margin: 44px 0 10px; font-size: var(--fs-h3); }

/* difficulty ladder: each mode one step further in, gentlest first */
.lad { list-style: none; margin: 26px 0 30px; padding: 0; max-width: 760px; border-top: 1px solid var(--rule); }
.lad__i { margin: 0; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 0 14px; padding: 16px 0 6px; border-bottom: 1px solid var(--rule-soft); }
@media (min-width: 761px) {
  .lad__i:nth-child(2) { margin-left: 36px; } .lad__i:nth-child(3) { margin-left: 72px; } .lad__i:nth-child(4) { margin-left: 108px; }
}
.lad__n { font: 500 30px/1 var(--serif); color: var(--ink-4); font-variant-numeric: lining-nums; padding-top: 2px; }
.lad__i:last-child .lad__n { color: var(--red-text); }
.r4b .lad__h { margin: 0 0 6px; padding: 0; border: 0; font-size: 21px; line-height: 1.25; color: var(--ink); }
.lad__i p { margin: 0 0 10px; font-size: 16.5px; line-height: 1.5; }
.lad__i .src { display: inline; }

/* ---------- rainblood: the series as a timeline down the column ---------- */
.tl { list-style: none; margin: 30px 0 18px; padding: 0; max-width: none; position: relative; }
.tl::before { content: ""; position: absolute; left: 150px; top: 8px; bottom: 8px; width: 1px; background: var(--rule); }
.tl__i { position: relative; margin: 0; display: grid; grid-template-columns: 150px minmax(0, 1fr); column-gap: 34px; padding: 0 0 42px; }
.tl__i::after { content: ""; position: absolute; left: 147px; top: 16px; width: 7px; height: 7px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--steel); }
.tl__i--now::after { background: var(--red); box-shadow: none; }
.tl__yr { margin: 0; text-align: right; padding-right: 4px; }
.tl__big { display: block; font: 500 64px/.9 var(--serif); letter-spacing: -.02em; color: transparent; -webkit-text-stroke: 1px rgba(var(--white-rgb), .34); font-variant-numeric: lining-nums; }
.tl__i--now .tl__big { -webkit-text-stroke: 0; color: var(--ink); }
.tl__when { display: block; margin-top: 8px; font-size: 13.5px; line-height: 1.4; color: var(--ink-3); }
.tl__body { min-width: 0; padding-top: 4px; }
.tl__zh { margin: 0 0 6px; font-size: 26px; line-height: 1.3; color: var(--ink-2); }
.tl__zh .zh-q { color: var(--ink); }
.tl__zh small { font-family: var(--serif); font-size: 15px; color: var(--ink-3); }
.r4b .tl__en { margin: 0 0 6px; padding: 0; border: 0; font-size: 22px; line-height: 1.3; color: var(--ink); font-weight: 500; }
.tl__fmt { margin: 0; font-size: 16.5px; line-height: 1.5; color: var(--ink-2); max-width: 60ch; }
.tl__fmt .src { display: inline; }
.tl__body .r4-fig { margin: 20px 0 4px; }
@media (max-width: 760px) {
  .tl::before { left: 6px; }
  .tl__i { grid-template-columns: minmax(0, 1fr); padding: 0 0 34px 26px; }
  .tl__i::after { left: 3px; top: 12px; }
  .tl__yr { text-align: left; }
  .tl__big { font-size: 44px; }
  .tl__when { margin-top: 4px; }
  .tl__zh { font-size: 22px; }
}
.r4b .names .zh-q { border-bottom: 0; }
.names td a { color: var(--ink); }

/* ---------- gallery: one image at a time, at three scales ---------- */
.gx-ix { margin: 6px 0 4px; }
.gx-ix ol { list-style: none; margin: 0; padding: 0; max-width: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 18px; border-top: 1px solid var(--rule); }
.gx-ix li { margin: 0; }
.gx-ix__a { display: grid; gap: 6px; padding: 14px 0 12px; text-decoration: none; color: var(--ink); min-height: var(--tap); }
.gx-ix__t { display: flex; gap: 3px; }
.gx-ix__t img { display: block; width: 33%; height: auto; aspect-ratio: 8 / 5; flex: 1 1 0; min-width: 0; filter: saturate(.85) brightness(.85); }
.gx-ix__n { font-size: 17px; line-height: 1.2; }
.gx-ix__c { font: 600 11px/1.3 var(--serif); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); font-variant-numeric: lining-nums; }
.gx-ix__a:hover .gx-ix__t img, .gx-ix__a:focus-visible .gx-ix__t img { filter: none; }
.gx-ix__a:focus-visible { outline: 2px solid var(--red-text); outline-offset: 2px; }
@media (max-width: 760px) { .gx-ix ol { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; } }

.gx-seq { display: block; margin: 26px 0 0; }
.gx { margin: 0 0 64px; }
.gx .plate__frame { margin-top: 0; }
.gx .plate__cap { margin: 12px 0 0; max-width: 64ch; }
.gx--l { max-width: none; }
.gx--m { max-width: 640px; }
.gx--s { max-width: 480px; }
.gx--p { max-width: 760px; }
@media (min-width: 761px) {
  .gx--r { margin-left: auto; }
  .gx--m + .gx--m { margin-top: -8px; }
}
@media (min-width: 900px) {
  /* small frames carry their caption beside them, on the open side of the column */
  .gx--s { max-width: none; display: grid; grid-template-columns: 480px minmax(0, 1fr); column-gap: 28px; align-items: end; }
  .gx--s .plate__cap { margin: 0; padding-bottom: 2px; }
  .gx--s.gx--r { grid-template-columns: minmax(0, 1fr) 480px; }
  .gx--s.gx--r > .gl__a { order: 2; }
  .gx--s.gx--r .plate__cap { text-align: left; }
}
.gx--l { margin-bottom: 80px; }
.gl--paper .plate__frame { box-shadow: 0 0 0 10px var(--bg-2); margin: 10px; }
@media (max-width: 760px) {
  .gx { margin-bottom: 44px; }
  .gx--m, .gx--s, .gx--p { max-width: none; }
  .gl--paper .plate__frame { margin: 6px; box-shadow: 0 0 0 6px var(--bg-2); }
}
.r4b-gl h2 .gl-n { font-variant-numeric: lining-nums; }

/* ---------- privacy (legal wording unchanged; restyled only) ---------- */
.r4b-legal .page-head { padding-top: 40px; }
.r4b-legal .main > p:first-of-type { font-size: var(--fs-small); color: var(--ink-3); padding-bottom: 18px; border-bottom: 1px solid var(--rule); max-width: var(--measure); }
.r4b-legal .main { counter-reset: lg; }
.r4b-legal .prose { position: relative; max-width: var(--measure); }
.r4b-legal .prose h2 { counter-increment: lg; margin-top: 46px; font-size: 24px; border-top: 0; padding-top: 0; display: grid; grid-template-columns: 56px minmax(0, 1fr); align-items: baseline; }
.r4b-legal .prose h2::before { content: counter(lg, decimal-leading-zero); font: 500 15px/1 var(--serif); letter-spacing: .14em; color: var(--ink-4); font-variant-numeric: lining-nums; position: static; width: auto; height: auto; background: none; }
.r4b-legal .prose h2::after { content: none !important; }
.r4b-legal .prose p { padding-left: 56px; }
@media (max-width: 760px) {
  .r4b-legal .prose h2 { grid-template-columns: 40px minmax(0, 1fr); font-size: 21px; }
  .r4b-legal .prose p { padding-left: 40px; }
}

/* ---------- 404 ---------- */
.r4b-404 .page-head { padding-top: 12px; }
.r4-404-links { list-style: none; margin: 8px 0 0; padding: 0; max-width: 560px; border-top: 1px solid var(--rule); }
.r4-404-links li { margin: 0; border-bottom: 1px solid var(--rule-soft); }
.r4-404-links a { display: flex; align-items: center; justify-content: space-between; min-height: 56px; text-decoration: none; color: var(--ink); font-size: 19px; }
.r4-404-links a::after { content: "\2192"; content: "\2192" / ""; color: var(--red-text); }
.r4-404-links a:hover { color: var(--white); }
.r4b-legal .main > p:first-of-type { margin-top: 14px; }
@media (max-width: 760px) { .tl .bx__img { margin-left: 0; margin-right: calc(-1 * var(--gutter)); } }
.tl__cap { margin: 26px 0 0; font: 600 12px/1.4 var(--serif); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.tl__cap + .tl { margin-top: 18px; }

/* ---------- review fixes (15 Oct, round 4b-2) ---------- */
/* official quotes read upright (r2.css sets .qt p italic; the merge makes it normal sitewide) */
.r4-qt p, .r4-qt blockquote p { font-style: normal; }
/* one focus at a time: small gallery frames keep their size but carry the caption below, never beside */
@media (min-width: 900px) {
  .gx--s { display: block; max-width: 480px; }
  .gx--s .plate__cap { margin: 12px 0 0; padding: 0; text-align: left; }
  .gx--s.gx--r { grid-template-columns: none; }
  .gx--s.gx--r > .gl__a { order: 0; }
}
/* timeline: the English title leads; the Chinese title follows as a smaller marked quote */
.tl__body .tl__en { margin: 0 0 4px; font-size: 24px; }
.tl__body .tl__zh { margin: 0 0 8px; font-size: 19px; line-height: 1.4; color: var(--ink-3); }
.tl__zh small { font-size: 14px; }
@media (max-width: 760px) { .tl__body .tl__en { font-size: 21px; } .tl__body .tl__zh { font-size: 17px; } }
/* privacy: the interim note is set off like a dated notice */
.r4b-legal .note-interim { border-left: 1px solid var(--c-press); padding-left: 16px; margin-left: 56px; color: var(--ink-2); }
.r4b-legal .prose .note-interim { padding-left: 16px; }
@media (max-width: 760px) { .r4b-legal .note-interim { margin-left: 40px; } }
