/* The Campaign's two pages, who leads, the War Score bar and the Finisher's countdowns (Gage 10-28,
   docs/CAMPAIGN-FINALE.md). js/war.js (War.score, War.fin, the Main and Info pages), js/wargov.js (the War Room
   header's line, bar and strip), js/home.js (the banner under PLAY). Red, black and white, inked; calm and reduced
   motion hold still. */

/* ---------- Main | Info ---------- */
.camp-tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 3px; margin: 0 0 -2px;
  background: linear-gradient(180deg, #1d1a16, #121110); border: 1px solid #8a72545e; box-shadow: 0 3px 0 #070807, inset 0 1px #f2d9a91c; }
.camp-tabs button { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 7px; height: 38px;
  font: 400 19px var(--display); letter-spacing: .08em; text-transform: uppercase; color: #a49a8e; transition: color .2s; }
.camp-tabs button[aria-selected="true"] { color: #fff; text-shadow: 1px 2px #5d1417; }
.camp-tabs .wi { width: 19px; height: 19px; }
.camp-tabs .ct-n { min-width: 18px; height: 18px; padding: 0 4px; display: grid; place-items: center; font: 400 13px/1 var(--display); font-style: normal; color: #fff; background: #b5232a; border: 1px solid #0d0b09; }
.ct-thumb { position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); transition: transform .3s cubic-bezier(.3,1.4,.5,1);
  background: linear-gradient(100deg, #3a2a1c, #4d3824 55%, #3a2a1c); border: 1px solid #c9a24a; box-shadow: 0 2px #0d0b09, inset 0 1px #ffd9b62e; }
.war[data-tab="info"] .ct-thumb { transform: translateX(100%); }
.war-pane { display: grid; gap: 10px; min-width: 0; }
.war[data-tab="main"] .war-pane[data-pane="info"], .war[data-tab="info"] .war-pane[data-pane="main"] { display: none; }

/* ---------- who leads: one line ---------- */
.war-lead, .wr-lead { display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; min-height: 40px; padding: 4px 8px 4px 6px; text-align: left; color: #f2eee6;
  background: #15110e; border: 2px solid #0d0b09; border-left: 5px solid var(--us); box-shadow: inset 0 0 0 1px #3b2c1c, 2px 3px 0 #0d0b09; cursor: pointer; }
.war-lead.ca, .wr-lead.ca { border-left-color: var(--ca); }
.war-lead.test { box-shadow: inset 0 0 0 1px var(--gold), 2px 3px 0 #0d0b09; }
.war-lead .ins, .wr-lead .ins { flex: none; width: 28px; height: 28px; }
/* one line, always: each part gives way (its name ellipsized) rather than wrapping; the President's part the least */
.wg-lead { flex: 1; display: flex; align-items: baseline; min-width: 0; overflow: hidden; white-space: nowrap; font: 400 15px/1.2 var(--display); letter-spacing: .03em; text-transform: uppercase; color: #e6dccb; }
.wg-lead > span { min-width: 3.4em; overflow: hidden; text-overflow: ellipsis; flex: 0 4 auto; }
.wg-lead > span:first-child { min-width: 0; flex: 0 1 auto; color: #fff; } /* the President's name gives way last */
.wg-lead .wl-by { font-style: normal; color: #d9cdb8; }
.wg-lead > i { flex: none; margin: 0 5px; font-style: normal; color: var(--gold); }
/* your own post is the insignia on the left; its title stays for screen readers */
.war-lead .wps-pos { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.war-lead { position: relative; }
.wr-lead { min-height: 30px; padding: 2px 8px 2px 4px; } .wr-lead .ins { width: 22px; height: 22px; } .wr-lead .wg-lead { font-size: 13px; }

/* ---------- today's essentials ---------- */
.war-today { display: grid; grid-template-columns: 1fr 1.3fr 1.2fr; gap: 6px; }
.war-today .wt-c { display: grid; align-content: center; gap: 1px; min-width: 0; min-height: 50px; padding: 5px 7px; text-align: left; color: #f2eee6; background: #15110e; border: 2px solid #0d0b09; box-shadow: inset 0 0 0 1px #3b2c1c, 2px 3px 0 #0d0b09; }
.war-today small { font: 400 10px var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.war-today b { font: 400 18px/1.05 var(--display); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.war-today em { font: 400 10px var(--display); font-style: normal; letter-spacing: .08em; text-transform: uppercase; color: #d9cdb8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- the War Score bar ---------- */
.fs[data-score] { position: relative; display: grid; gap: 6px; } /* the War Score bar only: the Finisher show (css/campaign-fx.css) is also a .fs, and this rule had made it a block in the page */
.fs-n { font: 400 30px/1 var(--display); letter-spacing: .02em; color: #fff; text-shadow: 2px 2px #0d0b09; font-variant-numeric: tabular-nums; }
.fs-d { font: 400 12px var(--display); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.fs-d.up { color: #8fd17a; } .fs-d.down { color: #f27661; }
.fs-why { margin: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; line-height: 1.3; color: #d9cdb8; }
.fs-why b { margin-right: 6px; font: 400 15px var(--display); } .fs-why b.us { color: #9fc0f5; } .fs-why b.ca { color: #f39a8f; }
.fs-chip { position: absolute; z-index: 5; top: 2px; left: 18%; pointer-events: none; padding: 1px 7px; font: 400 20px/1.1 var(--display); color: #fff; background: #2d5bb0; border: 2px solid #0d0b09; box-shadow: 2px 2px 0 #0d0b09; animation: fs-chip 1.6s ease-out forwards; }
.fs-chip.ca { left: auto; right: 18%; background: #a5221d; }
@keyframes fs-chip { 0% { opacity: 0; transform: translateY(14px) scale(.7); } 18% { opacity: 1; transform: translateY(0) scale(1.08); } 70% { opacity: 1; transform: translateY(-14px); } 100% { opacity: 0; transform: translateY(-26px); } }
.fs.pulse-us .lm-sc.us .fs-n, .fs.pulse-ca .lm-sc.ca .fs-n, .fs.pulse-us .lm-pct.us, .fs.pulse-ca .lm-pct.ca { display: inline-block; animation: fs-pulse .9s ease-out; }
@keyframes fs-pulse { 30% { transform: scale(1.35); text-shadow: 0 0 10px #ffd36e, 2px 2px #0d0b09; } }
.fs-room { gap: 3px; }
.fs-room .fs-why { font-size: 12px; }
.calm .fs *, .wr.calm .fs * { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) { .fs *, .fs-chip { animation: none !important; transition: none !important; } }

/* ---------- the land meter (Gage 11-04: "the meter for the land held needs fixed on campaign and made simpler while looking
   good still"; War.score.html in js/war.js) ----------
   One inked bar, the same in the Campaign and the War Room header: US blue fills from the left, Canada red from the right, a
   bright seam where they meet and a gold notch at the halfway line. Each side's flag and land share sit outside the bar, so no
   number is ever cut or covered. One line under it: each War Score (with today's change on the Campaign) and who leads the
   land; then your side's push ring in one small row (js/war-ring.js). The fill slides on a change; calm and reduced motion: still. */
.lm { gap: 6px; }
.lm .fs-lab { margin-bottom: 1px; }
.lm-row { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto auto; align-items: center; gap: 7px; }
.lm .war-flag { width: 30px; height: 19px; flex: none; box-shadow: 0 0 0 2px #0d0b09, 2px 2px 0 2px #0d0b09; }
.lm-pct { min-width: 1.8em; font: 400 22px/1 var(--display); letter-spacing: .02em; text-shadow: 2px 2px 0 #0d0b09; font-variant-numeric: tabular-nums; }
.lm-pct { text-align: center; } .lm-pct.us { color: #9fc0f5; } .lm-pct.ca { color: #f39a8f; }
.lm-bar { position: relative; height: 18px; margin: 0 2px; border: 2px solid #0d0b09; box-shadow: 2px 3px 0 #0d0b09, inset 0 0 0 1px #ffffff1f;
  background: repeating-linear-gradient(-45deg, #ffffff12 0 4px, transparent 4px 9px), linear-gradient(#e2564a, #a5221d 60%, #7e1714); }
.lm-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: var(--p); z-index: 1;
  background: repeating-linear-gradient(45deg, #ffffff14 0 4px, transparent 4px 9px), linear-gradient(#6c9ff0, #2d5bb0 60%, #1f4387); transition: width .9s cubic-bezier(.25,1,.4,1); }
.lm-bar i::after { content: ''; position: absolute; right: -2px; top: -4px; bottom: -4px; width: 3px; background: #f7f1e3; box-shadow: 0 0 0 1.5px #0d0b09, 0 0 6px #ffd36e99; }
.lm-bar u { position: absolute; left: 50%; top: -8px; bottom: -8px; width: 2px; margin-left: -1px; z-index: 2; pointer-events: none;
  background: linear-gradient(#ffd36e 0 6px, #0d0b0973 6px calc(100% - 6px), #ffd36e calc(100% - 6px)); }
.lm-bar.split-go i::after { animation: lm-flare 1.3s ease-out; }
@keyframes lm-flare { 20% { box-shadow: 0 0 0 1.5px #0d0b09, 0 0 0 5px #ffd36e, 0 0 16px #ff8a3c; } }
.fs.pulse-us .lm-bar, .fs.pulse-ca .lm-bar, .lm-bar.shift { animation: wsb-pulse .9s ease-out; }
.lm-foot { display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 6px; }
.lm-sc { display: grid; justify-items: start; min-width: 0; font: 400 12px/1.1 var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.lm-sc.ca { justify-items: end; }
.lm .lm-sc .fs-n { font-size: 17px; letter-spacing: .02em; text-shadow: 1px 1px 0 #0d0b09; }
.lm-sc.us .fs-n { color: #9fc0f5; } .lm-sc.ca .fs-n { color: #f39a8f; }
.lm-sc .fs-d { font-size: 11px; }
.lm-lead { display: flex; align-items: center; gap: 5px; padding-top: 2px; font: 400 13px/1.1 var(--display); font-style: normal; letter-spacing: .1em; text-transform: uppercase; color: #f2eee6; white-space: nowrap; }
.lm-lead.us { color: #9fc0f5; } .lm-lead.ca { color: #f39a8f; flex-direction: row-reverse; }
.lm-lead.us::before, .lm-lead.ca::before { content: ''; border: 5px solid transparent; border-right: 6px solid currentColor; border-left-width: 0; }
.lm-lead.ca::before { border-right-width: 0; border-left: 6px solid currentColor; }
.wr-push { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 3px 9px 3px 5px; background: #120e0bd9; border: 2px solid #0d0b09; border-left: 5px solid var(--us, #4f86de); box-shadow: inset 0 0 0 1px #3b2c1c; }
.wr-push.ca { border-left-color: var(--ca, #d8423a); }
.wr-push-t { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.wr-push-t b { font: 400 14px/1.1 var(--display); letter-spacing: .08em; text-transform: uppercase; color: #ffd36e; white-space: nowrap; }
.wr-push-t small { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; color: #d9cdb8; }
.fs-room.lm { gap: 4px; }
.fs-room .lm-pct { font-size: 19px; }
.fs-room .war-flag { width: 26px; height: 16px; }
.fs-room .lm-bar { height: 16px; }
@media (max-width: 359px) { .lm-row { gap: 5px; } .lm-pct { font-size: 18px; } .lm .war-flag { width: 24px; height: 15px; } .lm-lead { font-size: 12px; letter-spacing: .06em; } .wr-push-t small { font-size: 11px; } }
@media (max-height: 720px) { .fs-room .lm-bar { height: 13px; } .fs-room .lm-pct { font-size: 17px; } .fs-room .wr-push { padding-top: 1px; padding-bottom: 1px; } }
/* short phones: the folded War Room header keeps the push to its ring and percentage (the rest is a tap away, or in its tooltip) */
@media (max-height: 700px) and (max-width: 700px) { .wr-top:not(.open) .wr-push small { display: none; } .fs-room .wr-push .wrg { --sz: 20px !important; } }
.calm .lm-bar *, .wr.calm .lm-bar *, .war.calm .lm-bar * { transition: none !important; animation: none !important; }
@media (prefers-reduced-motion: reduce) { .lm-bar, .lm-bar * { transition: none !important; animation: none !important; } }

/* ---------- the Finisher's countdown: Home under PLAY, the Campaign above Enter the War, the War Room header ---------- */
.fin-strip { position: relative; display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; min-height: 44px; padding: 5px 10px 5px 6px; text-align: left; color: #fff; cursor: pointer;
  background: linear-gradient(100deg, #2a0d0e, #5c1418 55%, #2a0d0e); border: 2px solid #0d0b09; box-shadow: inset 0 0 0 1px #c9a24a, 2px 3px 0 #0d0b09; overflow: hidden; }
.fin-strip .fin-ic { flex: none; width: 28px; height: 28px; } .fin-strip .fin-ic .arm { width: 28px; height: 28px; }
.fin-strip b { flex: 0 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font: 400 17px/1.1 var(--display); letter-spacing: .05em; text-transform: uppercase; }
.fin-t { display: flex; align-items: baseline; gap: 6px; flex: none; margin-left: auto; white-space: nowrap; }
.fin-sep { font-style: normal; color: var(--gold, #ffd36e); }
.fin-t small { font: 400 13px var(--display); letter-spacing: .1em; text-transform: uppercase; color: #ffd9b6; }
.fin-t em { font: 400 18px/1 var(--display); font-style: normal; letter-spacing: .04em; color: var(--gold, #ffd36e); font-variant-numeric: tabular-nums; }
.fin-strip.ph-vote { background: linear-gradient(100deg, #1d1a16, #3a2a1c 55%, #1d1a16); }
.fin-strip.ph-live, .fin-strip.lobby { animation: fin-glow 1.6s ease-in-out infinite; }
@keyframes fin-glow { 50% { box-shadow: inset 0 0 0 1px #ffd36e, 0 0 14px #ff8a3c, 2px 3px 0 #0d0b09; } }
.fin-slot:empty { display: none; }
.fin-slot { margin: 8px 0 0; }
.fin-strip.room { min-height: 34px; padding: 3px 8px 3px 4px; } .fin-strip.room b { font-size: 14px; } .fin-strip.room em { font-size: 15px; } .fin-strip.room .fin-ic, .fin-strip.room .fin-ic .arm { width: 22px; height: 22px; }
/* phones: "Led by" gives way to the names, and the countdown takes its own row under the Finisher's name */
@media (max-width: 479px) {
  .wg-lead .wl-by { display: none; } .wg-lead { font-size: 14px; letter-spacing: .02em; } .wg-lead > i { margin: 0 4px; }
  .fin-strip { flex-wrap: wrap; row-gap: 0; } .fin-strip b { flex: 1 1 calc(100% - 44px); }
  .fin-strip .fin-t { margin-left: 36px; } .fin-strip.room .fin-t { margin-left: 30px; }
}
@media (max-width: 359px) { .fin-strip b { font-size: 14px; } .fin-t small { font-size: 11px; } .fin-t em { font-size: 15px; } .war-today b { font-size: 15px; } .wg-lead { font-size: 13px; } .fs-n { font-size: 26px; } }
.calm .fin-strip, .wr.calm .fin-strip, body.calm .fin-strip { animation: none !important; }
@media (prefers-reduced-motion: reduce) { .fin-strip { animation: none !important; } }

/* the event sheet */
.fin-sheet .fin-lead { margin: 0 0 8px; color: #e6dccb; }
.fin-opts { display: grid; gap: 7px; margin: 0 0 8px; padding: 0; list-style: none; }
.fin-opts li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 9px; padding: 7px 9px; background: #15110e; border: 2px solid #0d0b09; box-shadow: inset 0 0 0 1px #3b2c1c; }
.fin-opts li.mine { box-shadow: inset 0 0 0 1px var(--gold, #ffd36e); }
.fin-opts .arm { width: 30px; height: 30px; }
.fin-opts b { display: block; font: 400 18px var(--display); letter-spacing: .05em; text-transform: uppercase; }
.fin-opts small { display: block; font-size: 12px; line-height: 1.3; color: #bfae90; }
.fin-opts em { font: 400 12px var(--display); font-style: normal; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.fin-meter { display: block; height: 5px; margin: 4px 0 2px; background: #2a221b; } .fin-meter i { display: block; height: 100%; background: #c9a24a; }
.fin-what { display: flex; align-items: center; gap: 10px; } .fin-what .arm { width: 44px; height: 44px; }
.fin-what em { display: block; font: 400 12px var(--display); font-style: normal; letter-spacing: .18em; text-transform: uppercase; color: #f27661; }
.fin-what b { display: block; font: 400 28px/1 var(--display); letter-spacing: .05em; text-transform: uppercase; }
.fin-what small { display: block; font-size: 13px; color: #bfae90; }
.fin-when { font-size: 15px; color: #f2eee6; } .fin-when b { color: #ffd36e; font-variant-numeric: tabular-nums; }

/* ---------- the Info page: the government and its votes ---------- */
.war-gov { display: grid; gap: 7px; padding: 8px 9px; background: #15110e; border: 2px solid #0d0b09; box-shadow: inset 0 0 0 1px #3b2c1c, 2px 3px 0 #0d0b09; }
.war-gov .wgv-top { display: flex; align-items: center; gap: 9px; } .war-gov .wgv-top span { font-size: 13px; line-height: 1.25; color: #d9cdb8; }
.war-gov.dict .wg-st { color: #fff; background: #b5232a; border-color: #0d0b09; }
.wgv-seats { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; margin: 0; padding: 0; list-style: none; }
.wgv-seats li { min-width: 0; } .wgv-seats li:first-child { grid-column: 1 / -1; }
.wgv-seats small { display: block; font: 400 10px var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.wgv-seats b { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font: 400 16px var(--display); letter-spacing: .04em; text-transform: uppercase; color: #fff; }
.wgv-seats li.acting b { color: #a49a8e; }
.wgv-chain { display: flex; align-items: center; gap: 8px; padding: 6px 8px; text-align: left; color: #f2eee6; background: #0f0c0a; border: 1px solid #4a3826; }
.wgv-chain .ins { width: 24px; height: 24px; } .wgv-chain b { font: 400 15px var(--display); letter-spacing: .06em; text-transform: uppercase; } .wgv-chain small { margin-left: auto; font-size: 12px; color: var(--muted); }
.war-council { display: grid; gap: 10px; }
.war-council .cl-sec { padding: 8px 9px; background: #15110e; border: 2px solid #0d0b09; box-shadow: inset 0 0 0 1px #3b2c1c; }
.cc-fin { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.cc-fin button { display: flex; align-items: center; gap: 6px; padding: 6px 8px; text-align: left; color: #f2eee6; background: #14100d; border: 1px solid #3b2c1c; }
.cc-fin .arm { width: 22px; height: 22px; } .cc-fin b { font: 400 14px var(--display); letter-spacing: .05em; text-transform: uppercase; }

/* ---------- short phones held upright (320x568): Enter the War stays on screen ----------
   The help buttons turn to icons beside Main | Info, and the season's stamp steps aside while the countdown shows. */
@media (orientation: portrait) and (max-height: 620px) {
  .war { grid-template-columns: auto minmax(0, 1fr); column-gap: 6px; }
  .war > .campaign-tools { grid-column: 1; grid-row: 1; display: flex; gap: 4px; margin: 0; }
  .war .campaign-tools button { width: 40px; min-height: 40px; padding: 0; } .war .campaign-tools button span { display: none; }
  .war > .camp-tabs { grid-column: 2; grid-row: 1; margin: 0; } .camp-tabs button { height: 34px; }
  .war > .war-pane { grid-column: 1 / -1; }
  .s-clock:has(> .fin-strip) > .war-stamp { display: none; }
}
/* ---------- phones on their side (667x375): Enter the War stays on screen ----------
   One row holds the help buttons (icons), Main | Info and who leads; the countdown runs full width under it; the
   season's stamp steps aside (the war clock under the banner still names it) and the banner is a little shorter. */
@media (orientation: landscape) and (max-height: 500px) {
  .war { grid-template-columns: auto auto minmax(0, 1fr); column-gap: 8px; row-gap: 8px; }
  .war > .campaign-tools { grid-column: 1; grid-row: 1; display: flex; gap: 4px; margin: 0; }
  .war .campaign-tools button { width: 40px; min-height: 40px; padding: 0; } .war .campaign-tools button span { display: none; }
  .war > .camp-tabs { grid-column: 2; grid-row: 1; margin: 0; } .camp-tabs button { height: 34px; padding: 0 12px; font-size: 17px; } .camp-tabs button .wi { display: none; }
  .war > .war-pane { grid-column: 1 / -1; }
  .war[data-tab="main"] > .war-pane[data-pane="main"] { display: contents; }
  .war-pane[data-pane="main"] > * { grid-column: 1 / -1; }
  .war-pane[data-pane="main"] > .war-lead { grid-column: 3; grid-row: 1; min-height: 40px; }
  .war-pane[data-pane="main"] > .s-clock > .war-stamp { display: none; }
  .war-lead .wg-lead .wl-by { display: none; }
  .war-enter { min-height: 80px; padding: 13px 10px 7px; } .we-mid b { font-size: 30px; } .we-rifles { display: none; }
}

/* ---------- every phone (Gage 11-03: "the campaign area a bit more organized") ----------
   The help buttons are icons beside Main | Info on every phone, not a row of their own; Enter the War leads the page. */
@media (orientation: portrait) {
  .war { grid-template-columns: auto minmax(0, 1fr); column-gap: 6px; }
  .war > .campaign-tools { grid-column: 1; grid-row: 1; display: flex; gap: 4px; margin: 0; }
  .war .campaign-tools button { width: 42px; min-height: 42px; padding: 0; } .war .campaign-tools button span { display: none; }
  .war > .camp-tabs { grid-column: 2; grid-row: 1; margin: 0; }
  .war > .war-pane { grid-column: 1 / -1; }
}
/* Today's row with a symbol each (Gage 11-03): your effort a medal, the Offensive its territory's own outline, battles crossed swords */
.war-today .wt-c { grid-template-columns: auto minmax(0, 1fr); column-gap: 7px; }
.war-today .wt-c > :not(.wt-ic) { grid-column: 2; }
.war-today .wt-ic { grid-row: 1 / span 3; grid-column: 1; display: grid; place-items: center; width: 30px; height: 30px; color: #e2c26e; }
.war-today .wt-ic .wi, .war-today .wt-ic svg { width: 24px; height: 24px; }
.war-today .wt-shape img { width: 30px; height: 30px; object-fit: contain; image-rendering: pixelated; filter: drop-shadow(1px 1px 0 #000); }

.fs-lab { font: 400 11px/1 var(--display); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); text-align: center; }
