/* Campaign onboarding (Gage 10-27, handoff section 12): the season trailer (js/trailer.js), the field guide over the
   real Campaign page (js/campaign-guide.js) and the roles summary (js/warhelp.js, Position tab). Calm and reduced
   motion drop every slide, slam, shake and pulse; only fades remain. */

/* ---------- the trailer ---------- */
#trailer.trx { background: transparent; }
#trailer.trx::before { content: ''; position: absolute; inset: 0; z-index: 1; background: radial-gradient(ellipse at 50% 45%, #1a1512f2, #050403fa 70%); opacity: 0; transition: opacity .45s ease; pointer-events: none; }
#trailer.trx.wait::before { opacity: 1; }
#trailer.trx.s4::before { opacity: .2; }
/* the scene (R12, Gage 10-29): the real War Room map and its effects on two canvases a little bigger than the screen, so the tilt and roll of the
   camera (perspective, a few degrees) never show an edge; a live takeover sits under #trailer (11-04: no Finisher in the season trailer) */
.trx-scene { position: absolute; left: 50%; top: 50%; z-index: 1; transform: translate(-50%, -50%); transform-origin: 50% 58%; background: #121b22; opacity: 0; transition: opacity .45s ease; will-change: transform; pointer-events: none; }
#trailer.trx.go .trx-scene { opacity: 1; }
#trailer.trx.go .trx-scene.gone { opacity: 0; transition-duration: .3s; }
.trx-scene .trx-map, .trx-scene .trx-fx, .trx-scene .lv-gl { position: absolute; inset: 0; width: 100%; height: 100%; }
/* the day counter and the ground each side holds (the War Room header's split bar), over the map */
.trx-hud { position: absolute; z-index: 3; top: calc(13vh + 12px); left: 14px; right: 14px; display: flex; align-items: center; gap: 12px; opacity: 0; transition: opacity .4s ease; pointer-events: none; }
#trailer.trx.hud .trx-hud { opacity: 1; } #trailer.trx.s4 .trx-hud, #trailer.trx.rew .trx-hud { opacity: 0; } /* the stakes: the map runs back to day 1, no counter */
.trh-day { display: grid; grid-template-columns: auto auto; align-items: baseline; column-gap: 6px; padding: 4px 12px 3px; background: #0d0b09e8; border: 2px solid #ffd36e; box-shadow: 3px 4px 0 #000a; }
.trh-day small { grid-column: 1 / 3; font: 400 11px var(--display); letter-spacing: .26em; text-transform: uppercase; color: #ffd36e; }
.trh-day b { min-width: 1.5ch; font: 400 clamp(34px, 9vw, 52px)/.9 var(--display); letter-spacing: .02em; color: #fff; text-shadow: 2px 3px 0 #000; }
.trh-day b.tick { animation: trx-day .28s cubic-bezier(.2,.9,.3,1.4) both; }
.trh-day em { font: 400 12px var(--display); letter-spacing: .12em; text-transform: uppercase; font-style: normal; color: #d9c7a8; }
@keyframes trx-day { 0% { translate: 0 -6px; scale: 1.25; color: #ffd36e; } 100% { translate: 0 0; scale: 1; } }
.trh-split { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.trh-split span { display: inline-flex; align-items: center; gap: 5px; font: 400 17px var(--display); letter-spacing: .04em; color: #fff; text-shadow: 0 2px 0 #000; }
.trh-split span svg { width: 30px; height: 20px; display: block; box-shadow: 0 0 0 1.5px #0d0b09; }
.trh-split i { flex: 1; height: 14px; background: #d8423a; border: 2px solid #0d0b09; box-shadow: 2px 3px 0 #000a; position: relative; overflow: hidden; }
.trh-split u { position: absolute; left: 0; top: 0; bottom: 0; background: #4f86de; transition: width .9s cubic-bezier(.2,.8,.2,1); }
.trh-split u::after { content: ''; position: absolute; right: -3px; top: -2px; bottom: -2px; width: 5px; background: #ffd36e; }
/* the election (Gage 10-29: ranks and how to run): the ballot the room's Council shows, over the map, for a moment */
.trx-vote { position: absolute; z-index: 3; left: 0; right: 0; margin: 0 auto; top: calc(13vh + 82px); width: min(88vw, 330px); display: grid; gap: 6px; padding: 8px 12px 9px; background: #0d0b09ec; border: 2px solid #ffd36e; box-shadow: 4px 5px 0 #000a; opacity: 0; pointer-events: none; transition: opacity .25s ease; }
#trailer.trx.voting .trx-vote { opacity: 1; animation: trx-vote-in .36s cubic-bezier(.2,.9,.3,1.3) both; }
@keyframes trx-vote-in { 0% { opacity: 0; translate: -26px 0; scale: 1.1; } 100% { opacity: 1; translate: 0 0; scale: 1; } }
.trx-vote h4 { margin: 0; font: 400 15px var(--display); letter-spacing: .16em; text-transform: uppercase; color: #ffd36e; }
.trv-rows { display: grid; gap: 5px; }
.trv { display: flex; align-items: center; gap: 8px; }
.trv .ins { width: 30px; height: 30px; flex: none; }
.trv span { flex: 1; display: grid; gap: 3px; min-width: 0; }
.trv b { font: 400 15px/1 var(--display); letter-spacing: .06em; text-transform: uppercase; color: #fff; }
.trv i { display: block; height: 11px; width: 0; background: #8c6b3e; box-shadow: inset 0 -3px #0004; }
.trv.lead i { background: #ffd36e; }
.trv em { width: 3.2ch; text-align: right; font: 400 15px var(--display); font-style: normal; color: #efe6d4; }
#trailer.trx.voting .trv i { animation: trx-bar 1.1s .3s cubic-bezier(.2,.8,.2,1) both; }
.trv-win { display: none; align-items: center; gap: 10px; padding: 4px 8px; background: #3a2a0c; border: 2px solid #ffd36e; }
.trv-win .ins { width: 38px; height: 38px; }
.trv-win span { display: grid; gap: 2px; } .trv-win small { font: 400 11px var(--display); letter-spacing: .16em; text-transform: uppercase; color: #ffd36e; } .trv-win b { font: 400 21px/1 var(--display); letter-spacing: .06em; text-transform: uppercase; color: #fff; }
#trailer.trx.voted .trv-win { display: flex; animation: trx-rank-in .34s cubic-bezier(.2,.9,.3,1.3) both; }
.trv-note { font: 400 12px var(--display); letter-spacing: .1em; text-transform: uppercase; color: #d9c7a8; }
@media (min-aspect-ratio: 3/2) { /* landscape: a lower, wider ballot that stays clear of the caption */
  .trx-vote { top: calc(13vh + 70px); width: min(62vw, 440px); gap: 4px; padding: 5px 10px 6px; }
  .trv .ins { width: 24px; height: 24px; } .trv-win .ins { width: 28px; height: 28px; } .trv-win b { font-size: 17px; } .trv b { font-size: 13px; } .trv i { height: 9px; } .trv-note { display: none; }
}
#trailer.trx .tr-vig { z-index: 2; pointer-events: none; background: radial-gradient(ellipse at center, transparent 52%, #000a 100%), linear-gradient(180deg, color-mix(in srgb, var(--ta) 14%, transparent), transparent 36%); } /* the map is the picture: a lighter vignette than the cards had */
.trx-card { position: absolute; z-index: 3; top: calc(13vh + 18px); left: 0; right: 0; text-align: center; padding: 0 20px; transition: opacity .35s ease; }
.trx-card em { display: block; font: 400 16px var(--display); letter-spacing: .3em; text-transform: uppercase; font-style: normal; color: #ff8a6c; }
.trx-card span { font: 400 14px var(--display); letter-spacing: .2em; text-transform: uppercase; color: #d9c7a8; }
#trailer.trx.hud .trx-card { opacity: 0; }


.trx-flash { position: absolute; inset: 0; z-index: 2; background: #fff; opacity: 0; pointer-events: none; }
#trailer.trx.clash .trx-flash { animation: tr-flash .5s ease-out both; }
.trx-flash.on { animation: trx-flash .6s ease-out both; }
@keyframes trx-flash { 0% { opacity: .5; } 100% { opacity: 0; } }
.trx-flash.soft.on { animation-name: trx-flash-soft; animation-duration: .4s; }
@keyframes trx-flash-soft { 0% { opacity: .2; } 100% { opacity: 0; } }

/* the look (Gage 10-29, "more cinematic"): a grade per part of the story, a shallow depth of field top and bottom (a tilt-shift
   that reads as the camera's focus), embers and bokeh drifting through the light, an anamorphic streak on the flashes */
.trx-tint { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(180deg, #2c5fa8, #0d2038); opacity: .12; transition: opacity .9s ease; }
.trx-tint::after { content: ''; position: absolute; inset: 0; opacity: 0; transition: opacity .9s ease; background: linear-gradient(180deg, #ffb35a, #7a2a10); }
#trailer.trx[data-grade="hot"] .trx-tint { opacity: .26; } #trailer.trx[data-grade="hot"] .trx-tint::after { opacity: 1; transition-duration: .2s; }
#trailer.trx[data-grade="war"] .trx-tint { opacity: .13; } #trailer.trx[data-grade="war"] .trx-tint::after { opacity: 1; }
#trailer.trx[data-grade="gold"] .trx-tint { opacity: .16; } #trailer.trx[data-grade="gold"] .trx-tint::after { opacity: 1; background: linear-gradient(180deg, #ffd98a, #8a5a1a); }
/* the depth of field: a soft darkening at the top and bottom of the frame (11-04: no backdrop blur; re-blurring a map that changes every frame cost phones frames) */
.trx-dof { position: absolute; left: 0; right: 0; z-index: 2; pointer-events: none; height: calc(var(--dof, 0) * 11vh); transition: height .7s ease; background: #0605048c; }
.trx-dof.top { top: 13vh; -webkit-mask-image: linear-gradient(#000 20%, transparent); mask-image: linear-gradient(#000 20%, transparent); }
.trx-dof.bot { bottom: 13vh; -webkit-mask-image: linear-gradient(0deg, #000 20%, transparent); mask-image: linear-gradient(0deg, #000 20%, transparent); }
.trx-sweep { position: absolute; left: 0; right: 0; top: 0; height: 34%; z-index: 2; pointer-events: none; opacity: 0; background: linear-gradient(180deg, transparent, #ffe6b414 45%, #ffe6b422 55%, transparent); animation: trx-scan 2.1s linear infinite; }
#trailer.trx.stakes .trx-sweep { opacity: .48; }
#trailer.trx.s4 .trx-sweep { opacity: 1; } /* the light that sweeps the end card: the war map is gone, the card keeps moving */
@keyframes trx-scan { from { translate: 0 -100%; } to { translate: 0 300%; } }
.trx-dust { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; pointer-events: none; }
.trx-flash::after { content: ''; position: absolute; left: -10%; right: -10%; top: 50%; height: 3px; translate: 0 -50%; background: linear-gradient(90deg, transparent, #bfe0ff, #fff, #bfe0ff, transparent); box-shadow: 0 0 22px 4px #9cc4ea99; }
#trailer.trx.calm .trx-dof, #trailer.trx.calm .trx-dust, #trailer.trx.calm .trx-sweep, #trailer.trx.calm .trx-flash::after { display: none; }
.trx-stamp small .trx-live { display: inline-block; margin-right: 8px; padding: 0 6px; font: 400 12px/1.5 var(--display); letter-spacing: .14em; text-decoration: none; color: #fff; background: #d61f1f; vertical-align: 1px; }

/* a stamp per real event (weapon impact, Campaign arsenal order) */
.trx-stamp { position: absolute; z-index: 3; top: calc(13vh + 84px); left: 50%; translate: -50% 0; display: grid; justify-items: center; gap: 2px; padding: 8px 16px 6px; max-width: 86vw;
  background: #0d0b09d9; border: 2px solid #e8d3a2; box-shadow: 3px 4px 0 #000a; color: #fff; opacity: 0; rotate: -2.5deg; pointer-events: none; text-align: center; }
.trx-stamp small { font: 400 13px var(--display); letter-spacing: .24em; text-transform: uppercase; color: #e8d3a2; }
.trx-stamp b { font: 400 clamp(24px, 7.4vw, 44px)/1 var(--display); letter-spacing: .05em; text-transform: uppercase; }
.trx-stamp.nuke { border-color: #ff7b45; } .trx-stamp.nuke small { color: #ffb08a; }
.trx-stamp.rods { border-color: #9cc4ea; } .trx-stamp.rods small { color: #bfdaf4; }
.trx-stamp.camp.us { border-color: #6f9ee8; } .trx-stamp.camp.ca { border-color: #e2584d; }
.trx-stamp.on { animation: trx-stamp .38s cubic-bezier(.2,.9,.3,1.35) both; }
.trx-stamp:not(.on) { transition: opacity .35s ease; }
@keyframes trx-stamp { 0% { opacity: 0; scale: 1.7; } 100% { opacity: 1; scale: 1; } }

/* the lower-third line */
.trx-cap { position: absolute; z-index: 3; left: 0; right: 0; bottom: calc(13vh + 62px); padding: 0 24px; text-align: center; font: 400 clamp(18px, 5vw, 28px) var(--display); letter-spacing: .08em; text-transform: uppercase; color: #f4ead6; text-shadow: 0 2px 0 #000, 0 0 18px #000; opacity: 0; pointer-events: none; }
.trx-cap { transition: opacity .16s ease; }
.trx-cap.on { animation: trx-cap .3s cubic-bezier(.2,.9,.3,1.1) both; }
.trx-cap::after { content: ''; display: block; width: 0; height: 2px; margin: 6px auto 0; background: #ffd36e; box-shadow: 0 0 10px #ffd36e99; }
.trx-cap.on::after { animation: trx-cap-rule .55s .08s ease-out both; }
@keyframes trx-cap { 0% { opacity: .2; translate: 0 10px; letter-spacing: .2em; } 100% { opacity: 1; translate: 0 0; letter-spacing: .08em; } }
@keyframes trx-cap-rule { 0% { width: 0; } 100% { width: min(46%, 180px); } }

/* the cut to the war battle */
.trx-cut { position: absolute; inset: 0; z-index: 3; display: grid; place-content: center; justify-items: center; gap: 6px; padding: 0 20px; text-align: center; background: radial-gradient(ellipse at center, #070605a8 0, #07060566 78%); opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.trx-cut.on { opacity: 1; transition: none; }
.trx-cut small { font: 400 14px var(--display); letter-spacing: .26em; text-transform: uppercase; color: #ff8a6c; }
.trx-cut b { font: 400 clamp(34px, 10vw, 64px)/1 var(--display); letter-spacing: .04em; text-transform: uppercase; color: #fff; text-shadow: 3px 4px #3a0e10; }
.trx-cut span { font: 400 15px var(--display); letter-spacing: .14em; text-transform: uppercase; color: #d9c7a8; }

/* your side (Gage 10-28) on the end card, then the last word: "Your war starts now" stamped over a darkened frame */
.trx-side { display: inline-flex; align-items: center; gap: 10px; margin: 4px 0 0; padding: 6px 14px; background: #0b0b0bc0; border: 2px solid #ffd36e; font: 400 20px var(--display); letter-spacing: .12em; text-transform: uppercase; color: #efe6d4; text-shadow: 0 2px 0 #000; }
.trx-side.us { border-color: #6f9ee8; } .trx-side.ca { border-color: #e2584d; }
.trx-side .war-flag svg { display: block; width: 38px; height: 24px; }
.trx-end .trx-left { margin-top: -2px; font-size: 13px; letter-spacing: .16em; color: #e8d3a2; } /* the season's time left, under the call to join a side */
.trx-end { position: absolute; z-index: 3; left: 0; right: 0; display: grid; justify-items: center; gap: 8px; padding: 0 20px; text-align: center; opacity: 0; pointer-events: none; }
.trx-end b { padding: 6px 18px 4px; font: 400 clamp(40px, 12vw, 96px)/1 var(--display); letter-spacing: .04em; text-transform: uppercase; color: #fff; background: #7a1418; border: 3px solid #ffd36e; box-shadow: 6px 7px 0 #000a; rotate: -2deg; text-shadow: 3px 3px #3a0e10; }
.trx-end small { font: 400 16px var(--display); letter-spacing: .2em; text-transform: uppercase; color: #ffd36e; text-shadow: 0 2px 0 #000; }
#trailer.trx.s4 .trx-end { opacity: 1; animation: tr-land .55s cubic-bezier(.2,.9,.25,1.3) both, trx-end-drift 3.4s .5s linear both; }
#trailer.trx.s4 .trx-logo { animation: trx-shine 1.3s .5s ease-in-out infinite; }
@keyframes trx-end-drift { from { scale: 1; translate: 0 6px; rotate: -.4deg; } to { scale: 1.13; translate: 0 -6px; rotate: .5deg; } } /* R14: the card keeps moving over the barrage's aftermath (no still second) */
@keyframes trx-shine { 0%, 100% { filter: drop-shadow(0 4px 0 #000a) brightness(1); } 50% { filter: drop-shadow(0 4px 0 #000a) drop-shadow(0 0 16px #ffd36ecc) brightness(1.3); } }
/* the ranks (Gage 10-29: "explain simply ranks and how to rank up and be part of an election"): the chain of command rising
   from Soldier to President over the war map, the real insignia (WarGov.ins), then the weekly ballot */
@keyframes trx-rank-in { 0% { opacity: 0; translate: -26px 0; scale: 1.12; } 100% { opacity: 1; translate: 0 0; scale: 1; } }
@keyframes trx-bar { 0% { width: 0; } 100% { width: var(--w); } }
/* the War Room's blasts over the war map's strikes (js/trailer.js drawFx), under the cards */
.trx-fx { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: none; }
/* build 108: no radio card over the trailer */
body.trailer-on .transmission { display: none !important; }
/* build 108: pins on the map (positioned each frame by js/trailer.js): the battle site, the tap, the sword beside it */
.trx-ring, .trx-tap, .trx-sword { position: absolute; z-index: 3; left: 0; top: 0; opacity: 0; pointer-events: none; transition: opacity .2s ease; will-change: transform; }
.trx-ring.on, .trx-tap.on, .trx-sword.on { opacity: 1; }
.trx-ring::before, .trx-tap::before { content: ''; position: absolute; border-radius: 50%; }
.trx-ring::before { left: -34px; top: -34px; width: 68px; height: 68px; border: 3px solid #ffd36e; box-shadow: 0 0 0 2px #000a, 0 0 22px #ffd36e99; animation: trx-ring 1.1s ease-out infinite; }
.trx-tap::before { left: -24px; top: -24px; width: 48px; height: 48px; border: 3px solid #fff; background: #ffffff2e; box-shadow: 0 0 0 2px #000a; }
.trx-tap.on::before { animation: trx-tap .7s ease-out both; }
.trx-sword > * { position: relative; }
.trx-sword { display: grid; place-items: center; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #3a1514, #120a09); border: 3px solid #e0242d; box-shadow: 0 3px 0 #000, 0 0 18px #e0242d88; }
.trx-sword .ic { width: 30px; height: 30px; margin-top: 4px; }
.trx-sword b { margin-top: -6px; font: 400 11px/1 var(--display); letter-spacing: .06em; text-transform: uppercase; color: #fff; }
.trx-sword.on { animation: trx-pop .32s cubic-bezier(.2,.9,.3,1.4) both; }
.trx-sword.on.press { animation: trx-press .42s ease-out both; }
@keyframes trx-ring { 0% { scale: .7; opacity: 1; } 100% { scale: 1.35; opacity: .25; } }
@keyframes trx-tap { 0% { scale: 1.6; opacity: 0; } 35% { scale: .9; opacity: 1; } 100% { scale: 1; opacity: 1; } }
@keyframes trx-pop { 0% { scale: .2; opacity: 0; } 100% { scale: 1; opacity: 1; } }
@keyframes trx-press { 0% { scale: 1; } 30% { scale: .82; box-shadow: 0 1px 0 #000, 0 0 30px #ffd36e; border-color: #ffd36e; } 100% { scale: 1.08; opacity: .9; } }
.trx-stamp.win { border-color: #ffd36e; } .trx-stamp.win small { color: #ffd36e; }
.trx-stamp.win.us b { color: #cfe0ff; } .trx-stamp.win.ca b { color: #ffd6d0; }
.trx-end .trx-logo { width: min(240px, 56vw); height: auto; margin-top: 10px; filter: drop-shadow(0 4px 0 #000a); }

#trailer.trx .tr-skip { min-height: 44px; min-width: 76px; }
#trailer.trx .tr-bar, #trailer.trx .tr-skip, #trailer.trx .tr-playback { z-index: 4; }
@media (orientation: landscape) and (max-height: 500px) {
  #trailer.trx .tr-bar { height: 8vh; }
  .trx-card { top: calc(8vh + 8px); } .trx-stamp { top: calc(8vh + 62px); } .trx-hud { top: calc(8vh + 8px); } .trx-vote { top: calc(8vh + 66px); padding: 5px 10px 6px; } .trv .ins { width: 24px; height: 24px; } .trh-day b { font-size: 34px; }
  .trx-cap { bottom: calc(8vh + 44px); }
  #trailer.trx .tr-skip { bottom: calc(8vh + 8px); }
  #trailer.trx .tr-playback { bottom: calc(8vh + 2px); }
  .trv b { font-size: 13px; }
  .trx-dof.top { top: 8vh; } .trx-dof.bot { bottom: 8vh; }
  .trx-end .trx-logo { width: min(180px, 30vh); margin-top: 4px; }
  .trx-end b { font-size: clamp(32px, 11vh, 72px); }
}

/* Calm: no slams, shakes or flashes; everything fades */
#trailer.trx.calm .trc, #trailer.trx.calm .trx-flags, #trailer.trx.calm .trx-flash, #trailer.trx.calm .trx-stamp.on, #trailer.trx.calm .trx-cap.on, #trailer.trx.calm .trr, #trailer.trx.calm .trr-ballot, #trailer.trx.calm .trr-ballot i, #trailer.trx.calm .trx-cap::after, #trailer.trx.calm .tr-bar { animation: none !important; }
#trailer.trx.calm .trr.show { opacity: 1; } #trailer.trx.calm .trr-ballot i { width: var(--w); }
#trailer.trx.calm .trx-cap::after { width: min(46%, 180px); }

/* Asset preparation used to leave the opening as a static black screen. Keep the
   campaign identity and a moving transmission signal visible until the first frame is ready. */
#trailer.trx.wait { background: radial-gradient(ellipse at 50% 42%, #354f64 0%, #172b3b 48%, #090b0e 100%); }
#trailer.trx.wait::before { opacity: .58; background: radial-gradient(ellipse at 50% 45%, #2d4b63cc, #090b0ef0 78%); }
#trailer.trx.wait .trx-card { top: 38%; animation: trx-wait-drift 2.8s ease-in-out infinite; }
#trailer.trx.wait .trx-card::after { content: 'Preparing your campaign'; display: block; margin-top: 16px; color: #f0d7ad; font: 400 13px var(--display); letter-spacing: .18em; text-transform: uppercase; }
#trailer.trx.wait .trx-card::before { content: ''; display: block; width: 54px; height: 4px; margin: 0 auto 18px; background: linear-gradient(90deg, #d8423a 0 50%, #4f86de 50%); box-shadow: 0 0 18px #d5b77a88; animation: trx-signal 1.1s steps(2,end) infinite; }
/* the build's progress under the card (Gage 11-16: the hold read as a black screen); gone once the film starts */
.trx-load { display: none; position: relative; width: min(62vw, 240px); height: 4px; margin: 18px auto 0; background: #ffffff1f; overflow: hidden; }
.trx-load u { position: absolute; inset: 0; background: linear-gradient(90deg, #d8423a, #f2eee6 50%, #4f86de); transform: scaleX(0); transform-origin: 0 50%; box-shadow: 0 0 12px #d5b77a99; }
#trailer.trx.wait .trx-load { display: block; }
@keyframes trx-wait-drift { 0%,100% { transform: translateY(0); opacity: .86; } 50% { transform: translateY(-8px); opacity: 1; } }
@keyframes trx-signal { 50% { width: 90px; filter: brightness(1.7); } }
#trailer.trx.calm .trc-vs { transform: none; }
#trailer.trx.calm .trc svg { animation: none !important; }
#trailer.trx.calm .trx-stamp { rotate: 0deg; transition: opacity .3s ease; }
#trailer.trx.calm .trx-stamp.on, #trailer.trx.calm .trx-cap.on { opacity: 1; }
#trailer.trx.calm .trx-cap { transition: opacity .3s ease; }
#trailer.trx.calm.s4 .trx-end { animation: none !important; transition: opacity .3s ease; }
#trailer.trx.calm .trx-end b { rotate: 0deg; }
#trailer.trx.calm .trx-logo { animation: none !important; }
#trailer.trx.calm .trx-ring::before, #trailer.trx.calm .trx-tap::before, #trailer.trx.calm .trx-sword { animation: none !important; }
@media (prefers-reduced-motion: reduce) {
  #trailer.trx .trc, #trailer.trx .trx-flags, #trailer.trx .trx-flash, #trailer.trx .trx-stamp.on, #trailer.trx .trx-cap.on, #trailer.trx .trr, #trailer.trx .trr-ballot, #trailer.trx .trr-ballot i, #trailer.trx .trx-cap::after, #trailer.trx.s4 .trx-end { animation: none !important; }
  #trailer.trx .trr.show { opacity: 1; } #trailer.trx .trr-ballot i { width: var(--w); } #trailer.trx .trx-cap::after { width: min(46%, 180px); } #trailer.trx .trx-dust, #trailer.trx .trx-sweep { display: none; } #trailer.trx .trx-logo { animation: none !important; }
  #trailer.trx .trc-vs { transform: none; }
  #trailer.trx .trc svg { animation: none !important; }
  #trailer.trx .trx-stamp.on, #trailer.trx .trx-cap.on { opacity: 1; }
}

/* ---------- the field guide over the Campaign page ---------- */
.cg-tour.away { display: none; }
.cg-tour .tour-outline { transition: left .18s ease, top .18s ease, width .18s ease, height .18s ease; animation: cg-pulse 1.6s ease-in-out infinite; }
.cg-tour.calm .tour-outline { transition: none; animation: none; }
@keyframes cg-pulse { 0%, 100% { box-shadow: 0 0 0 3px #090706, 0 0 14px #f1a43755; } 50% { box-shadow: 0 0 0 3px #090706, 0 0 26px #f1a437aa; } }
@media (prefers-reduced-motion: reduce) { .cg-tour .tour-outline { transition: none; animation: none; } }
.cg-card { box-sizing: border-box; max-height: min(52dvh, 360px); }
.cg-card.flat { max-width: min(660px, calc(100vw - 20px)); max-height: calc(100dvh - 20px); padding: 8px 12px; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 14px;
  grid-template-areas: "prog prog" "title acts" "body acts" "art acts" "tr acts"; align-items: start; }
.cg-card.flat .cg-progress { grid-area: prog; }
.cg-card.flat h2 { grid-area: title; font-size: 22px; margin: 4px 0 0; }
.cg-card.flat p { grid-area: body; font-size: 12px; margin: 2px 0 0; }
.cg-card.flat .cg-chain { grid-area: art; margin: 6px 0 0; justify-content: flex-start; gap: 10px; }
.cg-card.flat .cg-chain li { flex: none; }
.cg-card.flat .cg-chain li + li::before { display: none; }
.cg-card.flat .tour-actions { grid-area: acts; align-self: center; margin-top: 6px; }
.cg-card.flat .tour-actions button { min-width: 84px; min-height: 42px; font-size: 20px; }
.cg-card.flat .cg-trailer { grid-area: tr; margin-top: 6px; min-height: 32px; width: auto; justify-self: start; padding: 0 10px; }
.cg-card h2 { font-size: 26px; margin: 6px 0 4px; }
.cg-card p { margin: 4px 0 10px; }
.cg-progress { gap: 6px; }
.cg-pips { display: flex; gap: 3px; }
.cg-pips i { display: grid; place-items: center; width: 20px; height: 20px; border: 1px solid #5f4c33; background: #14110e; opacity: .55; }
.cg-pips i .wi { width: 14px; height: 14px; }
.cg-pips i.done { opacity: .85; border-color: #8c6b3e; }
.cg-pips i.on { opacity: 1; border-color: #edb64c; background: #3a2a17; }
.cg-count { font: 400 13px var(--display); letter-spacing: .1em; color: #d9b56c; }
.cg-progress .cg-skip { width: auto; min-width: 58px; height: 34px; padding: 0 12px; font: 400 16px var(--display); letter-spacing: .1em; text-transform: uppercase; }
.cg-card .tour-actions #tour-show { background: #2a2016; border-color: #c99a4d; color: #ffd98c; }
.cg-trailer { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; margin-top: 8px; min-height: 36px; background: none; border: 1px dashed #6d5638; color: #d9c7a8; font: 400 15px var(--display); letter-spacing: .08em; text-transform: uppercase; }
.cg-trailer .wi { width: 16px; height: 16px; }
.cg-chain { display: flex; align-items: flex-start; justify-content: space-between; gap: 2px; margin: 2px 0 10px; padding: 0; list-style: none; }
.cg-chain li { position: relative; flex: 1; display: grid; justify-items: center; gap: 3px; }
.cg-chain li + li::before { content: ''; position: absolute; left: -22%; top: 14px; width: 30%; border-top: 2px dotted #8c6b3e; }
.cg-chain b { font: 400 13px var(--display); letter-spacing: .06em; text-transform: uppercase; color: #eadfc7; }
.cg-note { margin: 10px 0 0; font-size: 12px; color: #bfae90; }
@media (orientation: landscape) and (max-height: 500px) { .cg-chain .ins { width: 24px; height: 24px; } }

/* ---------- roles: who does what (WarHelp Position tab) ---------- */
.wh-box .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wh-matrix { width: 100%; border-collapse: collapse; table-layout: fixed; }
.wh-matrix thead th { padding: 0 0 5px; text-align: center; }
.wh-matrix thead th:first-child { width: 34%; }
.wh-matrix thead .wi, .wh-matrix thead .arm { width: 18px; height: 18px; display: inline-block; vertical-align: middle; }
.wh-matrix tbody th { display: flex; align-items: center; gap: 5px; padding: 3px 0; text-align: left; font-weight: 400; min-width: 0; }
.wh-matrix tbody th .ins { width: 22px; height: 22px; }
.wh-matrix tbody th b { font: 400 13px/1.05 var(--display); letter-spacing: .04em; text-transform: uppercase; color: #eadfc7; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.wh-matrix tbody th u { margin-left: auto; padding: 1px 4px; font: 400 10px var(--display); letter-spacing: .1em; text-decoration: none; color: #0d0b09; background: #ffd36e; }
.wh-matrix tbody tr { border-top: 1px solid #2c2219; }
.wh-matrix tbody tr.seat th b { color: #d9c7a8; }
.wh-matrix tbody tr.me { background: #ffd36e14; box-shadow: inset 2px 0 0 #ffd36e; }
.wh-matrix td { text-align: center; padding: 3px 0; }
.wh-matrix td i { display: inline-block; width: 9px; height: 9px; border: 1px solid #4a3b2a; border-radius: 50%; }
.wh-matrix td i.on { width: 12px; height: 12px; border: 2px solid #0d0b09; border-radius: 1px; background: #e9b44f; box-shadow: 0 0 0 1px #e9b44f; rotate: 45deg; }
.wh-key { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 10px; margin: 9px 0 0; padding: 8px 0 0; list-style: none; border-top: 1px dashed #3a2d20; }
.wh-key li { display: flex; gap: 6px; align-items: flex-start; font-size: 11px; line-height: 1.3; color: #c9b99c; }
.wh-key li .wi, .wh-key li .arm { width: 16px; height: 16px; flex: none; }
.wh-key b { display: block; font: 400 13px var(--display); letter-spacing: .06em; text-transform: uppercase; color: #eadfc7; }
.wh-notes { display: grid; gap: 5px; margin: 9px 0 0; padding: 0; list-style: none; }
.wh-notes li { display: flex; gap: 7px; align-items: center; font-size: 12px; color: #d9cdb8; }
.wh-notes .ins, .wh-notes .wi { width: 20px; height: 20px; flex: none; }
.wh-rise { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.wh-rise li { position: relative; flex: 1; display: grid; justify-items: center; gap: 2px; text-align: center; }
.wh-rise li + li::before { content: ''; position: absolute; left: -16%; top: 15px; width: 24%; border-top: 2px dotted #8c6b3e; }
.wh-rise b { font: 400 15px var(--display); letter-spacing: .06em; text-transform: uppercase; color: #fff; }
.wh-rise small { font-size: 11px; line-height: 1.25; color: #c9b99c; }
.wh-where { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; counter-reset: wh; }
.wh-where li { display: flex; gap: 8px; align-items: center; font-size: 12px; color: #c9b99c; }
.wh-where li::before { counter-increment: wh; content: counter(wh); flex: none; width: 18px; height: 18px; display: grid; place-items: center; font: 400 13px var(--display); color: #0d0b09; background: #d4aa51; }
.wh-where .wi, .wh-where .ins { width: 22px; height: 22px; flex: none; }
.wh-where b { display: block; font: 400 14px var(--display); letter-spacing: .06em; text-transform: uppercase; color: #eadfc7; }

.wh-badge .ins { width: 40px; height: 40px; }

/* How to rise, as a climb (Gage 11-03): numbered rungs joined by a line, the insignia big, how you get there, what it lets you do. */
.wh-climb { position: relative; display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.wh-climb::before { content: ''; position: absolute; left: 13px; top: 18px; bottom: 18px; border-left: 2px dotted #8c6b3e; }
.wh-climb > li { position: relative; display: grid; grid-template-columns: 28px 44px minmax(0, 1fr); align-items: start; gap: 8px; padding: 8px 8px 8px 0; border: 1px solid transparent; }
.wh-climb > li.me { border-color: var(--gold); background: linear-gradient(90deg, #c9a24a22, transparent); }
.wh-step { position: relative; z-index: 1; display: grid; place-items: center; width: 28px; height: 28px; margin-top: 8px; font: 400 16px/1 var(--display); color: #fff; background: #a5221d; border: 2px solid #0d0b09; box-shadow: 2px 2px 0 #0d0b09; }
.wh-climb > li.me .wh-step { background: var(--gold); color: #1a120a; }
.wh-ins .ins, .wh-ins .ins svg { width: 44px; height: 44px; }
.wh-climb b { display: flex; align-items: center; gap: 8px; font: 400 20px/1.05 var(--display); letter-spacing: .05em; text-transform: uppercase; color: #fff; }
.wh-climb b u { padding: 2px 6px 1px; font: 400 11px/1 var(--display); letter-spacing: .14em; text-decoration: none; color: #1a120a; background: var(--gold); }
.wh-get { display: block; margin-top: 3px; font-size: 13px; line-height: 1.3; color: #f2e7d3; }
.wh-can { display: block; margin-top: 3px; font-size: 12px; line-height: 1.3; color: #c9b99c; }
.wh-seats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; margin: 6px 0 0; padding: 0; list-style: none; }
.wh-seats li { display: grid; grid-template-columns: 26px minmax(0, 1fr); align-items: center; column-gap: 6px; padding: 4px 5px; background: #0f0c0a; border: 1px solid #3b2c1c; }
.wh-seats li.me { border-color: var(--gold); }
.wh-seats .ins, .wh-seats .ins svg { width: 26px; height: 26px; grid-row: span 2; }
.wh-seats b { font-size: 13px; overflow-wrap: anywhere; }
.wh-pw { display: flex; flex-wrap: wrap; gap: 3px; } .wh-pw i { display: grid; width: 16px; height: 16px; } .wh-pw i > * { width: 100%; height: 100%; }
.wh-more > summary { cursor: pointer; font: 400 17px var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.wh-more[open] > summary { margin-bottom: 8px; }
.wh-can em { font-style: normal; color: var(--gold); }
/* At 320 px every card fits the sheet: the climb's cabinet seats held the cards at 352 px in a 284 px sheet, cutting their
   text at the right edge (UI consistency 11-04). */
.wh-box > *, .wh-box .wh-card { min-width: 0; max-width: 100%; }
.wh-box .wh-you { grid-template-columns: auto minmax(0, 1fr); }
