/* The Shield at war. A cold night over a burning city; ash falling, embers rising. The Shield,
   round and battered, hung on a throne of swords between its holder's banners. Cold steel and
   bone for the words, bronze for honours, blood and fire the only heat. */

:root {
  color-scheme: dark;

  --night: #0b0b0c;
  --steel: #a9adb1;
  --steel-hi: #ece8e0;
  --gold: #c9a15a; /* tarnished bronze: honours, links, the holder */
  --gold-hi: #ecc987;
  --gold-deep: #7d5e2c;
  --crimson: #7a1410;
  --crimson-hi: #c0352a;
  --bone: #e4d5b4;
  --text: #e9e5dc;
  --text-soft: #a39e95;
  --line: rgba(205, 192, 168, 0.14);

  --display: 'Cinzel', 'Trajan Pro', Georgia, serif;
  --title: 'Cinzel Decorative', 'Cinzel', 'Trajan Pro', Georgia, serif;
  --label: 'Big Shoulders Display', 'Arial Narrow', sans-serif;
  --lore: 'EB Garamond', Georgia, serif;
  --body: 'Barlow', system-ui, sans-serif;

  /* Film grain for iron and stone. */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' seed='3'/%3E%3CfeColorMatrix values='0 0 0 0 .55 0 0 0 0 .52 0 0 0 0 .48 0 0 0 .1 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
  /* Pits and chips for stamped letters: opaque, with small holes. */
  --worn: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='w'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.3' numOctaves='3' seed='6'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -22 0 0 0 15.6'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23w)'/%3E%3C/svg%3E");
  /* Pits in forged steel: dark specks, laid over a title's metal. */
  --pits: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.3' numOctaves='3' seed='6'/%3E%3CfeColorMatrix values='0 0 0 0 .05 0 0 0 0 .04 0 0 0 0 .03 14 0 0 0 -9.4'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23p)'/%3E%3C/svg%3E");
  /* Four nail heads, one in each corner of a panel. */
  --nails:
    radial-gradient(circle, #9a948a 0 1.6px, #1d1b19 2.4px, transparent 3.1px) left 7px top 7px / 8px 8px no-repeat,
    radial-gradient(circle, #9a948a 0 1.6px, #1d1b19 2.4px, transparent 3.1px) right 7px top 7px / 8px 8px no-repeat,
    radial-gradient(circle, #9a948a 0 1.6px, #1d1b19 2.4px, transparent 3.1px) left 7px bottom 7px / 8px 8px no-repeat,
    radial-gradient(circle, #9a948a 0 1.6px, #1d1b19 2.4px, transparent 3.1px) right 7px bottom 7px / 8px 8px no-repeat;
  /* A panel's hacked corners. */
  --hacked: polygon(0 9px, 9px 0, calc(100% - 15px) 0, 100% 12px, 100% calc(100% - 7px), calc(100% - 9px) 100%, 14px 100%, 0 calc(100% - 11px));
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--night); }
/* Anyone who asks for less motion gets none: one rule for every animation on the page, so no
   selector can win it back. Decoration that would hang frozen mid-air is taken away. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .air, .sky { display: none; }
}

body {
  position: relative;
  margin: 0;
  color: var(--text);
  font: 400 1.0625rem/1.55 var(--body);
  background: var(--grain), linear-gradient(var(--night), #0e0d0d 1400px, #090909);
}

a { color: inherit; text-decoration-color: rgba(201, 161, 90, 0.55); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--gold-hi); text-decoration-color: var(--gold-hi); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 900; line-height: 1.05; letter-spacing: 0.02em; }
b, strong { font-weight: 600; }

/* Everything on the page, clipped at the screen's edge: the swords and banners reach into the
   gutters and no further. */
.page { overflow-x: clip; }
main, .foot { position: relative; z-index: 1; }
.top { position: relative; z-index: 4; }
main { width: min(1180px, 100% - 32px); margin: 0 auto; }

/* ---------- The night: a burning city on the horizon, ash and embers ---------- */

.scene {
  position: absolute;
  inset: 0 0 auto;
  height: 860px;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 38% at 50% 96%, rgba(255, 106, 34, 0.26), transparent 70%),
    radial-gradient(ellipse 30% 26% at 14% 94%, rgba(255, 86, 26, 0.16), transparent 70%),
    radial-gradient(ellipse 26% 22% at 88% 92%, rgba(255, 86, 26, 0.14), transparent 70%),
    linear-gradient(#0c0c0e, #121012 40%, #22130d 82%, #2a150c 92%, var(--night));
  -webkit-mask-image: linear-gradient(#000 78%, transparent);
  mask-image: linear-gradient(#000 78%, transparent);
}
.scene .skyline { position: absolute; left: 0; right: 0; bottom: var(--sky-bottom); width: 100%; height: var(--sky-h); }
/* Smoke rolling across the sky. */
.scene::before, .scene::after {
  content: '';
  position: absolute;
  inset: 20% -40% 10%;
  background:
    radial-gradient(ellipse 22% 30% at 20% 60%, rgba(60, 56, 54, 0.32), transparent 70%),
    radial-gradient(ellipse 18% 24% at 55% 40%, rgba(50, 46, 44, 0.28), transparent 70%),
    radial-gradient(ellipse 26% 30% at 85% 65%, rgba(58, 52, 48, 0.3), transparent 70%);
  animation: smoke 70s linear infinite;
}
.scene::after { inset: 35% -40% 0; animation-duration: 110s; animation-direction: reverse; opacity: 0.8; }
@keyframes smoke { from { translate: -12% 0; } to { translate: 12% 0; } }

.air { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.air i { position: absolute; left: var(--x); opacity: 0; will-change: transform, opacity; }
.ember {
  bottom: -12px;
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: #ffc06a;
  box-shadow: 0 0 7px 2px rgba(255, 120, 30, 0.85), 0 0 2px #fff4d0;
  animation: rise var(--d) linear var(--t) infinite;
}
.ash {
  top: -12px;
  width: var(--s);
  height: calc(var(--s) * 0.7);
  border-radius: 40% 60% 55% 45%;
  background: #8a8580;
  animation: fall var(--d) linear var(--t) infinite;
}
@keyframes rise {
  0% { transform: translate(0, 0); opacity: 0; }
  8% { opacity: 0.95; }
  50% { transform: translate(var(--w), calc(var(--rise, -108vh) / 2)); }
  80% { opacity: 0.5; }
  100% { transform: translate(calc(var(--w) * -0.4), var(--rise, -108vh)); opacity: 0; }
}
@keyframes fall {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
  10% { opacity: 0.4; }
  50% { transform: translate(var(--w), 54vh) rotate(200deg); }
  90% { opacity: 0.3; }
  100% { transform: translate(calc(var(--w) * -0.4), 110vh) rotate(420deg); opacity: 0; }
}

/* The war in the sky (scene.ts SKY): fireballs arcing over the city, bursting on the horizon,
   and a raven crossing now and then. Each flight is the first fifth of a long loop. The
   skyline's box is shared, so the fireballs rise from and fall on its horizon at any width. */
.scene { --sky-bottom: 70px; --sky-h: 280px; }
.sky { position: absolute; inset: 0; contain: strict; }
/* The horizon: 60 of the skyline's 360 units up from its foot, scaled as the drawing is
   (to cover the width, or its height, whichever is more). */
.volley { position: absolute; bottom: calc(var(--sky-bottom) + max(60 / 1600 * 100vw, 60 / 360 * var(--sky-h))); }
/* A ball (or a piece of its tail): along at a steady pace while it climbs and falls. */
.ball {
  position: absolute;
  --size: calc(18px * (1 - var(--k) * 0.07));
  width: var(--size);
  height: var(--size);
  margin: calc(var(--size) / -2) 0 0 calc(var(--size) / -2);
  border-radius: 50%;
  background: radial-gradient(circle, #ffd27a, #ff6a1c 55%, rgba(200, 50, 10, 0) 75%);
  box-shadow: 0 0 14px 5px rgba(255, 100, 25, 0.5);
  --fade: calc(1 - var(--k) * 0.09);
  opacity: 0;
  animation: fly-along var(--d) linear calc(var(--t) + var(--lag)) infinite, fly-arc var(--d) calc(var(--t) + var(--lag)) infinite;
}
.ball:first-child {
  background: radial-gradient(circle at 42% 42%, #fffbe6, #ffc04a 35%, #f0601c 70%, #a8260c);
  box-shadow: 0 0 16px 6px rgba(255, 140, 30, 0.85), 0 0 48px 18px rgba(255, 80, 20, 0.4);
}
@keyframes fly-along {
  0% { translate: 0 0; opacity: 0; }
  1%, 21.5% { opacity: var(--fade); }
  22%, 100% { translate: var(--dx) 0; opacity: 0; }
}
@keyframes fly-arc {
  0% { transform: translateY(0); animation-timing-function: cubic-bezier(0.33, 0.66, 0.66, 1); }
  11% { transform: translateY(var(--h)); animation-timing-function: cubic-bezier(0.33, 0, 0.66, 0.34); }
  22%, 100% { transform: translateY(0); }
}
.impact {
  position: absolute;
  left: var(--dx);
  width: 200px;
  height: 90px;
  margin: -45px 0 0 -100px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 236, 170, 0.95), rgba(255, 120, 30, 0.6) 35%, rgba(255, 60, 20, 0) 100%);
  opacity: 0;
  animation: burst var(--d) var(--t) infinite;
}
@keyframes burst {
  0%, 21.6% { opacity: 0; transform: scale(0.3); }
  23% { opacity: 1; transform: scale(1); }
  36%, 100% { opacity: 0; transform: scale(1.7); }
}
.raven-path { position: absolute; left: 0; animation: cross var(--d) linear var(--t) infinite; }
.raven-path.west { animation-direction: reverse; }
.raven { position: relative; display: block; aspect-ratio: 2; animation: bob var(--f) ease-in-out infinite alternate; }
.raven-path.west .raven { scale: -1 1; }
/* Black on a black sky: lit from below by the fires. Each part drawn once; the wings flap
   round their shoulders (28 and 32 of the drawing's 60 across, halfway down). */
.raven-part { position: absolute; inset: 0; }
.raven-part svg { display: block; width: 100%; height: 100%; fill: #0a0808; filter: drop-shadow(0 1px 1px rgba(255, 140, 60, 0.8)) drop-shadow(0 0 6px rgba(255, 110, 40, 0.35)); }
.raven-part.wing { transform-origin: 46.7% 50%; animation: flap var(--f) ease-in-out infinite alternate; }
.raven-part.wing.far { transform-origin: 53.3% 50%; animation-delay: calc(var(--f) * -0.15); }
@keyframes cross {
  0% { transform: translateX(-10vw); }
  55%, 100% { transform: translateX(110vw); }
}
/* Folded across the shoulder line: up, then down. */
@keyframes flap { from { transform: scaleY(1); } to { transform: scaleY(-0.55); } }
/* A volley of arrows: along and up and down (like a fireball, in the first twelfth of a long
   loop), and turning nose up to nose down. A westward flight is the same flight, mirrored. */
.flight.west { scale: -1 1; }
.arrow { position: absolute; opacity: 0; animation: loose-along var(--d) linear calc(var(--t) + var(--lag)) infinite, loose-arc var(--d) calc(var(--t) + var(--lag)) infinite; }
.arrow-r { display: block; width: 46px; margin: -5px 0 0 -23px; animation: loose-tilt var(--d) linear calc(var(--t) + var(--lag)) infinite; }
.arrow-r svg { display: block; width: 100%; filter: drop-shadow(0 1px 1px rgba(255, 160, 80, 0.95)) drop-shadow(0 0 4px rgba(255, 110, 40, 0.5)); }
@keyframes loose-along {
  0% { translate: 0 0; opacity: 0; }
  0.4%, 7.8% { opacity: 1; }
  8%, 100% { translate: var(--dx) 0; opacity: 0; }
}
/* The same climb and fall as fly-arc, sooner. */
@keyframes loose-arc {
  0% { transform: translateY(0); animation-timing-function: cubic-bezier(0.33, 0.66, 0.66, 1); }
  4% { transform: translateY(var(--h)); animation-timing-function: cubic-bezier(0.33, 0, 0.66, 0.34); }
  8%, 100% { transform: translateY(0); }
}
@keyframes loose-tilt {
  0% { rotate: -55deg; }
  8%, 100% { rotate: 55deg; }
}

/* ---------- Header ---------- */

.top {
  width: min(1180px, 100% - 32px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px 28px;
  padding: 18px 0;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 900 1.2rem/1 var(--display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--steel-hi); }
.brand .mark { flex: none; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.8)); }
.brand:hover { color: var(--gold-hi); }
.top nav { display: flex; gap: 4px 18px; flex-wrap: wrap; font: 700 1rem/1 var(--label); letter-spacing: 0.1em; text-transform: uppercase; }
.top nav a { flex: none; white-space: nowrap; color: var(--text-soft); text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.top nav a:hover { color: var(--text); }
.top nav a[aria-current='page'] { color: var(--gold-hi); border-bottom-color: var(--crimson-hi); }
.site-nav { margin-left: auto; }
@media (max-width: 720px) {
  .site-nav { margin-left: 0; }
  .top { gap: 10px 20px; }
  .top .seasons { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
}

/* ---------- Words ---------- */

.eyebrow { margin: 0 0 12px; font: 800 0.95rem/1.2 var(--label); letter-spacing: 0.2em; text-transform: uppercase; color: var(--crimson-hi); }
.eyebrow a { text-decoration: none; }
.page-title { font-size: clamp(2.4rem, 6vw, 4rem); margin-bottom: 14px; }
.intro { font: 500 1.3rem/1.45 var(--lore); color: var(--text); max-width: 62ch; }
.muted { color: var(--text-soft); }
.center { text-align: center; }
.gold-word { color: var(--gold-hi); }
.took-word { color: var(--gold-hi); font-weight: 600; }
.lost-word { color: var(--crimson-hi); font-weight: 600; }

/* The great titles: cold forged steel, pitted, lit from below by the fires. */
.title, .game-title, .team-title, .page-title {
  background: var(--pits), linear-gradient(180deg, #faf7f0 0%, #d4d0c8 34%, #77736d 52%, #c9c4ba 70%, #8a6b4a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.9)) drop-shadow(0 0 28px rgba(255, 110, 40, 0.22));
}

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 24px 40px;
  padding: 28px 0 40px;
}
@media (min-width: 901px) { .hero { padding-top: 56px; } }
.title { font: 900 clamp(3.2rem, 8.6vw, 6.6rem)/0.95 var(--title); letter-spacing: 0.04em; }
.motto { margin: 16px 0 26px; font: 500 1.45rem/1.35 var(--lore); color: var(--text); max-width: 30ch; }
.holder-kicker { margin: 0; font: 800 1rem/1 var(--label); letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-soft); }
.holder-name { margin: 6px 0 4px; font: 900 clamp(1.9rem, 4.4vw, 2.8rem)/1.05 var(--display); }
.holder-name a, .bearer-name > a { text-decoration: none; color: var(--steel-hi); }
.holder-name a:hover, .bearer-name > a:hover { color: var(--gold-hi); }
.holder-since { margin: 0 0 22px; color: var(--text-soft); }
.holder-since b { color: var(--text); }
.honor { margin: 8px 0; color: var(--text-soft); max-width: 60ch; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 8px; }
  .hero .great-shield { order: -1; }
  .motto { max-width: none; }
}

/* ---------- The great shield, on its throne of swords ---------- */

.great-shield { position: relative; margin: 0; padding-top: clamp(34px, 9vw, 64px); display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; }
.stage { position: relative; width: min(600px, 100%); aspect-ratio: 1; }
/* The fire behind it. */
.stage::before {
  content: '';
  position: absolute;
  inset: -12% -6% 0;
  background: radial-gradient(closest-side, rgba(255, 110, 36, 0.32), rgba(255, 70, 20, 0.08) 70%, transparent);
  animation: blaze 3.1s ease-in-out infinite alternate;
}
@keyframes blaze { from { opacity: 0.7; scale: 0.96; } 40% { opacity: 1; } to { opacity: 0.85; scale: 1.04; } }
.throne { position: absolute; inset: -18%; pointer-events: none; animation: rise-up 1s ease-out backwards; }
.throne-art { display: block; width: 100%; height: 100%; filter: drop-shadow(0 0 1px #000) drop-shadow(0 10px 14px rgba(0, 0, 0, 0.6)); }
@keyframes rise-up { from { opacity: 0; translate: 0 6%; } }
.banner { position: absolute; top: -4%; width: 17%; pointer-events: none; transform-origin: 50% 2%; filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.7)); }
/* The wind gusts: the banners swing out, lift and snap back, each on its own time. The cloth
   ripples inside them (scene.ts). */
.banner.left { left: -13%; animation: gust 7.4s ease-in-out infinite; }
.banner.right { right: -13%; animation: gust 8.3s ease-in-out -3.1s infinite reverse; }
.banner-art { display: block; width: 100%; height: auto; }
@keyframes gust {
  0%, 100% { rotate: -1.5deg; transform: skewX(1.5deg) scaleY(1); }
  14% { rotate: 4deg; transform: skewX(-4deg) scaleY(0.97); }
  22% { rotate: 1deg; transform: skewX(-1deg) scaleY(0.99); }
  31% { rotate: 6.5deg; transform: skewX(-6deg) scaleY(0.95); }
  44% { rotate: -2.5deg; transform: skewX(2.5deg) scaleY(1); }
  58% { rotate: 2deg; transform: skewX(-2deg) scaleY(0.98); }
  71% { rotate: 7.5deg; transform: skewX(-7deg) scaleY(0.94); }
  80% { rotate: -1deg; transform: skewX(1deg) scaleY(1); }
  90% { rotate: 1.5deg; transform: skewX(-1.5deg) scaleY(0.99); }
}
/* Braziers burning at the foot of the throne (scene.ts). */
.brazier { position: absolute; bottom: -7%; width: 13%; aspect-ratio: 0.8; z-index: 1; pointer-events: none; }
.brazier.left { left: -11%; }
.brazier.right { right: -11%; }
.brazier::before {
  content: '';
  position: absolute;
  inset: -90% -120% 10%;
  background: radial-gradient(closest-side, rgba(255, 130, 40, 0.38), rgba(255, 80, 20, 0.1) 60%, transparent);
  animation: blaze 0.9s ease-in-out infinite alternate;
}
.brazier-art { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.7)); }
/* The flames brighten each other (and only each other). */
.fire { position: absolute; left: 10%; right: 10%; bottom: 69%; height: 130%; isolation: isolate; }
.flame {
  position: absolute;
  bottom: 0;
  left: calc(var(--k) * 16% - 4%);
  width: 52%;
  height: calc(100% - var(--k) * 14%);
  border-radius: 50% 50% 45% 45% / 70% 70% 30% 30%;
  background: radial-gradient(ellipse 50% 60% at 50% 82%, #fff3c2 0 14%, #ffb33a 34%, #ff5c16 58%, rgba(255, 60, 10, 0) 74%);
  mix-blend-mode: screen;
  transform-origin: 50% 100%;
  animation: lick var(--d) ease-in-out var(--t) infinite alternate;
}
.flame:nth-child(odd) { animation-name: lick-other; }
@keyframes lick {
  from { transform: scale(1, 0.82) skewX(-4deg); opacity: 0.85; }
  to { transform: scale(0.82, 1.12) skewX(5deg) translateX(4%); opacity: 1; }
}
@keyframes lick-other {
  from { transform: scale(0.86, 1.08) skewX(5deg) translateX(-4%); opacity: 1; }
  to { transform: scale(1.04, 0.86) skewX(-3deg); opacity: 0.8; }
}
/* Embers (like the ones over the whole page) flying up off the coals, not so far. */
.cinder { position: absolute; left: var(--x); bottom: 85%; opacity: 0; --s: 3px; --rise: -150px; animation-timing-function: ease-out; }
@media (max-width: 600px) {
  .brazier { width: 11%; bottom: 3%; }
  .brazier.left { left: -1%; }
  .brazier.right { right: -1%; }
}

/* Firelight glinting off a sword's tip. */
.glint { position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; opacity: 0; animation: glint var(--d) ease-in-out var(--t) infinite; }
.glint::before, .glint::after {
  content: '';
  position: absolute;
  inset: 12px 0;
  border-radius: 50%;
  background: linear-gradient(90deg, transparent, #fff3d6 45%, #fff 50%, #fff3d6 55%, transparent);
}
.glint::after { inset: 0 12px; background: linear-gradient(transparent, #fff3d6 45%, #fff 50%, #fff3d6 55%, transparent); }
@keyframes glint {
  0%, 84%, 100% { opacity: 0; scale: 0.2; rotate: 0deg; }
  90% { opacity: 1; scale: 1; rotate: 30deg; }
  95% { opacity: 0.6; scale: 0.6; rotate: 50deg; }
}
/* A glint off a nail on the great shield: app.js lights one now and then. */
.glint.flash {
  z-index: 3;
  width: var(--g);
  height: var(--g);
  margin: calc(var(--g) / -2) 0 0 calc(var(--g) / -2);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 250, 225, 0.9), rgba(255, 200, 110, 0.4) 30%, transparent);
  pointer-events: none;
  animation: flash 0.8s ease-in-out forwards;
}
.glint.flash::before { inset: calc(50% - 1px) -30%; }
.glint.flash::after { inset: -30% calc(50% - 1px); }
@keyframes flash {
  0% { opacity: 0; scale: 0.1; rotate: 0deg; }
  45% { opacity: 1; scale: 1; }
  100% { opacity: 0; scale: 0.1; rotate: 90deg; }
}
.shield-wrap { position: relative; z-index: 2; width: 100%; animation: slam 0.9s cubic-bezier(0.55, 0, 0.75, 1.2) 0.15s backwards; }
/* Its shadow: round like the shield, and still while the shield turns, so it's never redrawn. */
.shield-wrap::before { content: ''; position: absolute; inset: 1.7%; z-index: -1; border-radius: 50%; box-shadow: 0 26px 30px rgba(0, 0, 0, 0.75); }
@keyframes slam {
  0% { translate: 0 -16%; opacity: 0; }
  70% { translate: 0 1.5%; opacity: 1; }
  85% { translate: 0 -0.6%; }
  100% { translate: 0 0; }
}
/* A club's own page: its shield smaller, under its own banners. */
.great-shield.small .stage { width: min(440px, 100%); }
@media (max-width: 600px) {
  .banner { top: -9%; width: 13%; }
  .banner.left { left: -3%; }
  .banner.right { right: -3%; }
}

/* The holder's game is on: the Shield is under siege, and shudders under the blows. */
/* Each round of the shudder starts with the blow, so app.js throws its sparks as a round begins. */
.under-siege .shield-wrap { animation: slam 0.9s cubic-bezier(0.55, 0, 0.75, 1.2) 0.15s backwards, shudder 3.4s ease-in-out 1.2s infinite; }
.under-siege .stage::before { background: radial-gradient(closest-side, rgba(255, 60, 30, 0.45), rgba(255, 40, 10, 0.1) 70%, transparent); animation-duration: 1.2s; }
@keyframes shudder {
  0%, 12%, 100% { translate: 0 0; rotate: 0deg; }
  2% { translate: -5px 3px; rotate: -0.8deg; }
  5% { translate: 4px -2px; rotate: 0.6deg; }
  8% { translate: -2px 1px; rotate: -0.3deg; }
}

/* The wheel turns as one layer, so the browser never redraws it while it turns: --spin is how
   far it has been turned from where the drawing starts (app.js). */
/* Not inherited: turning the wheel restyles only the wheel, not the drawing inside it. */
@property --spin { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.shield-art .wheel {
  transform: rotate(var(--spin, 0deg));
  transition: transform 0.8s cubic-bezier(0.2, 0.75, 0.2, 1);
  animation: spin-in 2.4s cubic-bezier(0.12, 0.7, 0.15, 1) backwards;
  will-change: transform;
}
@keyframes spin-in { from { transform: rotate(calc(var(--spin, 0deg) - 280deg)); } }
/* Drifting, dragged or spinning free: app.js moves it frame by frame. */
.shield-art.free .wheel { transition: none; }
.shield-art { cursor: grab; }
.shield-art.free { cursor: grabbing; }
/* The boss, to strike (app.js adds it). */
.shield-art .boss {
  position: absolute;
  inset: 0;
  margin: auto;
  width: calc(var(--hub) * 100%);
  height: calc(var(--hub) * 100%);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: box-shadow 200ms;
}
.shield-art .boss:hover, .shield-art .boss:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(255, 196, 110, 0.55), 0 0 26px 4px rgba(255, 140, 40, 0.45); }
/* The layers app.js shifts in depth, kept on layers of their own. */
.deep [data-depth] { will-change: transform, translate; }
/* Scenery scrolled out of sight holds still (app.js marks it). */
.offstage, .offstage::before, .offstage::after, .offstage *, .offstage *::before, .offstage *::after { animation-play-state: paused !important; }
/* Sparks off the rim: drawn by app.js, reaching past the shield. */
.shield-art .sparks { position: absolute; left: -25%; top: -25%; width: 150%; height: 150%; pointer-events: none; }

.shield-art .slice path { cursor: pointer; transition: fill 160ms; }
.shield-art .slice:hover path, .shield-art .slice:focus-visible path { fill: rgba(255, 230, 190, 0.08); }
.shield-art .slice:focus-visible { outline: none; }
.shield-art .slice:focus-visible path { stroke: var(--gold-hi); stroke-width: 2; }
.shield-art .stud { transition: transform 200ms; transform-box: fill-box; transform-origin: center; }
.shield-art a:hover .stud { transform: scale(1.5); }
.shield-art .stud.gold { filter: drop-shadow(0 0 3px rgba(255, 190, 80, 0.95)); }


/* A torn banner: the name of the club the Shield is turned to. */
.ribbon {
  position: relative;
  z-index: 3;
  margin-top: -3%;
  padding: 10px 52px 12px;
  font: 900 clamp(1rem, 2.4vw, 1.35rem)/1.1 var(--display);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bone);
  text-align: center;
  text-shadow: 0 1px 0 #000;
  background: var(--grain), linear-gradient(#8e1d16, var(--crimson) 55%, #3e0a07);
  clip-path: polygon(0 4%, 6% 0, 18% 6%, 32% 1%, 48% 5%, 63% 0, 79% 4%, 93% 1%, 100% 6%, 96% 30%, 100% 52%, 95% 74%, 100% 97%, 84% 92%, 70% 100%, 55% 94%, 40% 99%, 26% 93%, 11% 100%, 0 95%, 4% 72%, 0 50%, 5% 27%);
  max-width: 100%;
  rotate: -1deg;
}

/* Turning the Shield. */
.turner { display: flex; align-items: center; gap: 14px; margin-top: 18px; width: min(520px, 100%); }
.turn {
  flex: none;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  font: 400 2rem/1 var(--display);
  color: var(--bone);
  background: var(--grain), radial-gradient(circle at 38% 32%, #5d5a56, #262423 70%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 6px 14px rgba(0, 0, 0, 0.6);
  cursor: pointer;
}
.turn:hover { color: var(--gold-hi); }
.turn:active { translate: 0 1px; }
.turn-info { flex: 1; margin: 0; text-align: center; min-width: 0; }
.turn-info b { display: block; font: 900 1.3rem/1.15 var(--display); letter-spacing: 0.03em; color: var(--steel-hi); }
.turn-info b a { text-decoration: none; }
.turn-info span { display: block; margin-top: 3px; color: var(--text-soft); }

/* ---------- The next defense, and the iron panels ---------- */

.defense-card, .facts, .stat, .steps li, .team-grid a, .bearer {
  border: 0;
  border-radius: 0;
  background: var(--nails), var(--grain), linear-gradient(180deg, rgba(38, 36, 34, 0.94), rgba(17, 16, 16, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), inset 0 0 0 1px rgba(201, 161, 90, 0.16), inset 0 -18px 30px rgba(0, 0, 0, 0.35);
  clip-path: var(--hacked);
}
.defense-card { position: relative; padding: 20px 24px 18px; max-width: 560px; }
.defense-card .kicker { margin: 0 0 12px; font: 800 0.95rem/1 var(--label); letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); display: flex; align-items: center; gap: 8px; }
.defense-card[data-phase='live'] { box-shadow: inset 0 0 0 2px rgba(192, 53, 42, 0.8), inset 0 0 40px rgba(255, 60, 30, 0.2); }
.defense-card[data-phase='live'] .kicker { color: #ff7a5c; }
.live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #ff4a3a; box-shadow: 0 0 10px #ff4a3a; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
.duel { display: flex; align-items: center; gap: 14px; }
.duel .side { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.duel .side:last-child { flex-direction: row-reverse; text-align: right; }
.duel .nm { font: 800 clamp(1.15rem, 3vw, 1.5rem)/1.05 var(--label); text-transform: uppercase; letter-spacing: 0.04em; overflow-wrap: anywhere; }
.duel .nm a { text-decoration: none; }
.duel .holds .nm { color: var(--gold-hi); }
.duel .sc { margin-left: auto; font: 900 2.2rem/1 var(--label); }
.duel .side:last-child .sc { margin: 0 auto 0 0; }
.duel .at { font: 800 1rem/1 var(--label); color: var(--text-soft); text-transform: uppercase; }
.defense-card .when { margin: 14px 0 4px; font-weight: 600; }
.countdown { color: var(--gold-hi); font: 800 1.05rem/1 var(--label); letter-spacing: 0.04em; margin-left: 6px; }
.defense-card .stakes { margin: 4px 0; font: 500 1.12rem/1.4 var(--lore); color: var(--text); }
.tv { margin: 6px 0 0; font-size: 0.92rem; color: var(--text-soft); }
.defense-card .more { margin: 10px 0 0; font: 700 0.95rem/1 var(--label); letter-spacing: 0.12em; text-transform: uppercase; }
.badge { flex: none; display: block; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.7)); }

/* ---------- Sections ---------- */

.block { margin: 64px 0; }
.block.narrow { max-width: 860px; margin-left: auto; margin-right: auto; }
.block-head { display: grid; gap: 6px; margin-bottom: 22px; }
.block-head h2, .block > h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); color: var(--steel-hi); text-shadow: 0 2px 0 #000; }
.block > h2 { margin-bottom: 16px; }
.block-head p { margin: 0; color: var(--text-soft); max-width: 70ch; }
/* Cutting in as it scrolls into view (app.js). */
.reveal { opacity: 0; translate: 0 28px; }
.reveal.shown { opacity: 1; translate: none; transition: opacity 0.7s ease, translate 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal .block-head h2::after, .reveal > h2::after { clip-path: inset(0 100% 0 0); }
.reveal.shown .block-head h2::after, .reveal.shown > h2::after { animation: slash 0.6s cubic-bezier(0.6, 0, 0.2, 1) 0.25s backwards; clip-path: none; }
/* The rows a reader sees fall in one by one; any further down simply come with the table. */
.reveal.shown tbody tr:nth-child(-n + 25) { animation: row-in 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) calc(0.2s + var(--i, 0) * 35ms) backwards; }
@keyframes row-in { from { opacity: 0; translate: -18px 0; } }
/* A sword laid under every heading. */
.block-head h2::after, .block > h2::after {
  content: '';
  display: block;
  width: 190px;
  height: 14px;
  margin-top: 10px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 190 14'%3E%3Ccircle cx='5' cy='7' r='4' fill='%236e6a64'/%3E%3Crect x='8' y='5' width='22' height='4' rx='1.5' fill='%233a2a1e'/%3E%3Crect x='30' y='1' width='5' height='12' rx='1.5' fill='%236e6a64'/%3E%3Cpath d='M35 4.4L176 5.4L188 7L176 8.6L35 9.6Z' fill='%23b9b6b0'/%3E%3Cpath d='M35 7L180 7' stroke='%23535250' stroke-width='.8'/%3E%3Cpath d='M92 9.4l3-1.6 2 1.4M131 4.8l2 1.7 3-1.5' fill='%230b0b0c'/%3E%3C/svg%3E") left center / contain no-repeat;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.8));
}

/* The rivets and marks in lines of text and the legend. */
.rivet { display: inline-block; flex: none; width: 11px; height: 11px; border-radius: 50%; vertical-align: middle; }
.rivet { background: radial-gradient(circle at 35% 30%, #e0d9cd, #7a7268 35%, #1c1915); box-shadow: 0 1px 1px rgba(0, 0, 0, 0.7); }
.rivet.gold { background: radial-gradient(circle at 35% 30%, #fff0c0, #d89a32 35%, #4d2a06); box-shadow: 0 0 5px rgba(255, 190, 80, 0.9), 0 1px 1px rgba(0, 0, 0, 0.6); }
a.rivet:hover { transform: scale(1.35); }
.legend { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 14px; margin: 14px 0 0; font-size: 0.9rem; color: var(--text-soft); }
.key-arrow { display: inline-block; width: 18px; height: 10px; vertical-align: middle; background: linear-gradient(-30deg, transparent 44%, #a37b4a 45% 55%, transparent 56%), linear-gradient(-30deg, transparent 70%, #7c1a12 71%); }
.legend .seal-art { vertical-align: middle; }
.shield-art .seal { cursor: pointer; }
.key-gash { display: inline-block; width: 18px; height: 6px; vertical-align: middle; border-radius: 50%; background: #120a05; box-shadow: 0 -1.5px 0 #c49a66; rotate: -20deg; }

/* ---------- Chronicle ---------- */

/* Every block wide enough for its club; a season of too many reigns for that scrolls. */
.band-wrap { overflow-x: auto; padding-bottom: 6px; }
.band { --seg-min: 32px; width: max(100%, calc(var(--reigns) * var(--seg-min))); display: flex; height: 46px; overflow: hidden; clip-path: polygon(0 8%, 3% 0, 30% 5%, 60% 0, 88% 6%, 100% 0, 99% 92%, 70% 100%, 42% 94%, 12% 100%, 0 93%); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4); }
.band .seg {
  flex-basis: 0;
  min-width: var(--seg-min);
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  text-decoration: none;
  color: var(--bone);
  font: 900 0.8rem/1 var(--label);
  letter-spacing: 0.06em;
  background: var(--grain), linear-gradient(180deg, color-mix(in oklab, var(--paint) 80%, #fff), var(--paint) 55%, color-mix(in oklab, var(--paint) 70%, #000));
  border-right: 2px solid rgba(0, 0, 0, 0.6);
  overflow: hidden;
  container-type: inline-size;
}
.band .seg .n { font: 600 0.72rem/1 var(--body); letter-spacing: 0; opacity: 0.85; }
.band .seg .n::after { content: ' def'; }
/* A narrow block drops the word, keeping its club and the count. */
@container (max-width: 46px) { .band .seg .n::after { content: ''; } }
.band .seg:hover { filter: brightness(1.2); }
.band .seg.current { box-shadow: inset 0 0 0 2px #ff8a3a; animation: pulse 2.4s ease-in-out infinite; }
.band-scale { display: flex; justify-content: space-between; margin: 6px 0 14px; font-size: 0.85rem; color: var(--text-soft); }
.band-key { margin: 0 0 18px; max-width: 70ch; font-size: 0.85rem; color: var(--text-soft); }
.band-cap { margin: 0 0 6px; font: 800 0.85rem/1.2 var(--label); letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-hi); }
/* Where a what-if turned the season: a line through the turned game's slice of its block. */
.band-turn { position: absolute; top: 0; bottom: 0; width: 3px; margin-left: -1.5px; background: var(--bone); box-shadow: 0 0 6px rgba(0, 0, 0, 0.9); }

.chronicle { list-style: none; margin: 0; padding: 0; }
.chronicle li {
  display: grid;
  grid-template-columns: 54px minmax(180px, 1.1fr) minmax(140px, 0.9fr) 2fr;
  align-items: center;
  gap: 4px 16px;
  padding: 12px 6px;
  border-bottom: 1px solid var(--line);
}
.chronicle li::before { content: attr(value); font: 900 1.4rem/1 var(--display); color: var(--gold-deep); text-align: right; }
.chronicle li.current { background: linear-gradient(90deg, rgba(192, 53, 42, 0.16), transparent); }
.chronicle li.current::before { color: var(--crimson-hi); }
.chronicle .who { display: flex; align-items: center; gap: 10px; font: 800 1.1rem/1.15 var(--label); text-transform: uppercase; letter-spacing: 0.03em; }
.chronicle .who a { text-decoration: none; }
.chronicle .defs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--text-soft); }
.chronicle .defs b { font: 900 1.4rem/1 var(--label); color: var(--text); }
.chronicle .defs .rivets, .reign-list .rivets { display: inline-flex; flex-wrap: wrap; gap: 3px; }
.chronicle .how { color: var(--text-soft); font-size: 0.95rem; }
.chronicle .how strong { color: var(--gold-hi); }
@media (max-width: 760px) {
  .chronicle li { grid-template-columns: 34px 1fr; }
  .chronicle li::before { grid-row: span 3; align-self: start; font-size: 1.1rem; padding-top: 4px; }
}

/* ---------- The road: a war map ---------- */

.map-frame { overflow: hidden; box-shadow: 0 0 0 5px #1b1917, 0 0 0 7px #4a453f, 0 24px 50px rgba(0, 0, 0, 0.6); }
.road-map { position: relative; container-type: inline-size; font-family: var(--lore); }
.road-map svg { display: block; width: 100%; height: auto; }
.road-map .ink { position: absolute; inset: 0; height: 100%; }
/* Replaying the road (app.js): legs after the game shown are put away, the newest drawn in. */
.road-map .road path.later, .road-map .swords.later { opacity: 0; pointer-events: none; }
.road-map .road path.newest { stroke: #b0170f; stroke-width: 3.2; }
.road-map .stop { fill: transparent; }
.road-map .stop.at { r: 8; fill: #b0170f; stroke: #f3e2b8; stroke-width: 2; }
.road-map .here-at { position: absolute; pointer-events: none; transition: translate 0.5s cubic-bezier(0.3, 0.7, 0.3, 1); }
/* The war road's replay (app.js): a track of every Shield game, lit up to the one shown, the next
   segment filling while it plays; and the controls, as on the Gauntlet's replay. */
.road-replay { margin-top: 16px; padding: 14px 16px 12px; border-radius: 14px; background: rgba(14, 12, 10, 0.92); box-shadow: 0 0 0 1px rgba(201, 161, 90, 0.3), 0 16px 40px rgba(0, 0, 0, 0.5); }
.replay-track {
  --seg: calc(100% / var(--n, 1));
  position: relative;
  height: 8px;
  margin: 2px 0 12px;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.12);
}
.replay-track::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 calc(var(--seg) - 1px), rgba(14, 12, 10, 0.9) calc(var(--seg) - 1px) var(--seg)); pointer-events: none; }
.replay-done { position: absolute; inset: 0; background: linear-gradient(90deg, #8e1d16, var(--crimson-hi)); box-shadow: 0 0 10px rgba(192, 53, 42, 0.7); transform-origin: 0 50%; scale: calc(var(--k, 0) / var(--n, 1)) 1; transition: scale 300ms ease-out; }
.replay-next { position: absolute; top: 0; bottom: 0; left: calc(var(--seg) * var(--k, 0)); width: var(--seg); background: rgba(236, 201, 135, 0.6); transform-origin: 0 50%; scale: 0 1; }
.replay-track:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.road-replay .controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ctl { width: 40px; height: 40px; border-radius: 50%; border: 1px solid #4a453f; background: radial-gradient(circle at 40% 35%, #3a3632, #171513); color: var(--bone); display: grid; place-items: center; cursor: pointer; }
.ctl:hover, .ctl:focus-visible { border-color: var(--gold); color: var(--gold-hi); outline: none; }
.ctl svg { width: 18px; height: 18px; fill: currentColor; }
.ctl.play { width: 48px; height: 48px; border: 0; background: linear-gradient(#c0352a, #6d120d); color: var(--bone); box-shadow: 0 0 16px rgba(192, 53, 42, 0.45); }
.ctl.play .i-pause, .playing .ctl.play .i-play { display: none; }
.playing .ctl.play .i-pause { display: inline; }
.replay-info { flex: 1 1 220px; margin: 0 0 0 6px; color: var(--text-soft); }
.replay-info b { color: var(--text); font-weight: 600; }
.road-replay .close { margin-left: auto; }
.pill { padding: 9px 16px 8px; border: 1px solid #4a453f; border-radius: 999px; background: #171513; color: var(--bone); font: 700 0.9rem/1 var(--label); letter-spacing: 0.12em; text-transform: uppercase; cursor: pointer; }
.pill:hover { border-color: var(--gold); color: var(--gold-hi); }

/* The card over the map at the game shown: beside its arena, on whichever side has room. */
.road-card {
  position: absolute;
  z-index: 2;
  width: min(300px, 44cqw);
  padding: 12px 14px 11px;
  border-radius: 10px;
  background: rgba(20, 16, 12, 0.94);
  box-shadow: 0 0 0 1px rgba(201, 161, 90, 0.45), 0 14px 30px rgba(0, 0, 0, 0.55);
  font-family: var(--body);
  translate: 18px calc(-100% - 12px);
}
.road-card.left { translate: calc(-100% - 18px) calc(-100% - 12px); }
.road-card.below { translate: 18px 12px; }
.road-card.left.below { translate: calc(-100% - 18px) 12px; }
.road-card.taken { box-shadow: 0 0 0 1px rgba(192, 53, 42, 0.8), 0 0 26px rgba(192, 53, 42, 0.35), 0 14px 30px rgba(0, 0, 0, 0.55); }
.road-card p { margin: 0; }
.rc-when { font: 700 0.75rem/1.2 var(--label); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-soft); }
.rc-headline { display: block; margin: 5px 0 6px; font: 600 1.05rem/1.25 var(--lore); color: var(--bone); text-decoration: none; }
.rc-headline:hover { color: var(--gold-hi); text-decoration: underline; }
.rc-score { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font: 800 1rem/1.2 var(--label); text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-soft); }
.rc-score .won { color: var(--text); }
.rc-score b { font-weight: 900; }
.rc-score .at { font-size: 0.8rem; }
.rc-score i { font-style: normal; font-size: 0.8rem; color: var(--gold); }
.road-card .rc-verdict { margin-top: 6px; font-size: 0.85rem; color: var(--gold-hi); }
.taken .rc-verdict { color: var(--crimson-hi); font-weight: 600; }
.road-map .swords use { transform-box: fill-box; transform-origin: center; }
.road-card.docked { position: static; width: auto; margin-bottom: 12px; translate: none; }
.road-map .water path { fill: #8fa3a0; fill-opacity: 0.55; stroke: #5b4630; stroke-width: 1.4; }
.road-map .graticule path { stroke: #7a5c34; stroke-opacity: 0.18; stroke-width: 1; fill: none; }
.road-map .compass circle { fill: none; stroke: #5b4630; stroke-width: 1.2; }
.road-map .compass path { fill: #5b4630; }
.road-map .compass text { font-size: 16px; fill: #5b4630; }
.road-map .road path { fill: none; stroke: #7a1410; stroke-width: 2.2; stroke-linecap: round; }
.road-map .city circle { fill: #2b1d10; }
.road-map .city text { font-size: 11px; fill: #3b2a18; letter-spacing: 0.04em; }
.road-map .overseas rect { fill: #d9c294; stroke: #5b4630; stroke-dasharray: 4 3; }
.road-map .overseas text { font-size: 13px; fill: #3b2a18; }
.road-map .overseas circle { fill: #2b1d10; }
.road-map .swords:hover use { transform: scale(1.2); transform-box: fill-box; transform-origin: center; }
.road-map .here { filter: drop-shadow(0 0 6px rgba(255, 140, 50, 0.95)) drop-shadow(0 2px 2px rgba(0, 0, 0, 0.6)); animation: bob 2.4s ease-in-out infinite; }
/* By transform, not translate: the browser won't play an svg's translate off the main thread. */
@keyframes bob { 50% { transform: translateY(-4px); } }
.road-map .frame { fill: none; stroke: #5b4630; stroke-width: 2; }

/* ---------- Tables ---------- */

.table-wrap { overflow-x: auto; }
/* The warriors: a board each for goals, points and wins in net, side by side where they fit. */
.boards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px 24px; }
.board h3, .rack-label { margin: 0 0 8px; font: 800 1rem/1.2 var(--label); letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-hi); }
.board th .club { display: flex; align-items: center; gap: 6px; margin-top: 3px; font: 500 0.85rem/1.2 var(--body); color: var(--text-soft); text-transform: none; letter-spacing: 0; }
.board .sub { display: block; font: 600 0.75rem/1.2 var(--body); color: var(--text-soft); }
.standings { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.standings th, .standings td { padding: 10px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.standings thead th { font: 800 0.85rem/1.1 var(--label); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-soft); border-bottom-color: rgba(201, 161, 90, 0.35); }
.standings tbody th { font: 800 1.08rem/1 var(--label); text-transform: uppercase; letter-spacing: 0.03em; }
.standings tbody tr:hover { background: rgba(255, 255, 255, 0.025); }
.standings .badge { display: inline-block; vertical-align: middle; margin-right: 10px; }
.standings a { text-decoration: none; }
.standings .rank { color: var(--text-soft); width: 2.5em; }
.standings .num, .standings thead th.num { text-align: right; }
.standings .num.big { font: 900 1.35rem/1 var(--label); color: var(--text); }
.standings tr.champion th, .standings tr.champion .num.big { color: var(--gold-hi); }
.standings tr.leader .num.big { color: var(--gold-hi); }
.never { color: var(--text-soft); margin-top: 16px; }

/* ---------- How it works ---------- */

.steps { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; counter-reset: step; }
.steps li { position: relative; padding: 18px 18px 18px 60px; counter-increment: step; }
.steps li::before { content: counter(step, upper-roman); position: absolute; left: 18px; top: 16px; font: 900 1.4rem/1 var(--display); color: var(--crimson-hi); }
.steps b { display: block; font: 800 1.1rem/1.2 var(--label); text-transform: uppercase; letter-spacing: 0.05em; color: var(--steel-hi); margin-bottom: 2px; }
.how > p { color: var(--text-soft); }
.prose h2 { margin: 36px 0 14px; font-size: 1.7rem; color: var(--steel-hi); }
.prose p { max-width: 70ch; }
.faq dt { margin-top: 18px; font: 800 1.1rem/1.2 var(--label); text-transform: uppercase; letter-spacing: 0.04em; color: var(--gold-hi); }
.faq dd { margin: 4px 0 0; color: var(--text); max-width: 70ch; }

/* ---------- A Shield game ---------- */

.game { max-width: 920px; margin: 26px auto 0; text-align: center; }
.game-title { font-size: clamp(2rem, 5.4vw, 3.6rem); line-height: 1.08; text-wrap: balance; }
.scoreboard { display: flex; align-items: center; justify-content: center; gap: clamp(14px, 5vw, 60px); margin: 34px 0 10px; }
.scoreboard .side { display: grid; justify-items: center; gap: 8px; min-width: 0; }
.scoreboard .crest { position: relative; display: block; }
.scoreboard .badge { width: clamp(56px, 12vw, 84px); height: auto; }
.scoreboard .nm { font: 800 clamp(1.2rem, 3.4vw, 1.8rem)/1 var(--label); text-transform: uppercase; letter-spacing: 0.04em; }
.scoreboard .nm a { text-decoration: none; }
.scoreboard .sc { font: 900 clamp(3rem, 9vw, 5rem)/1 var(--label); }
.scoreboard .lost { opacity: 0.62; }
.scoreboard .won .sc { color: var(--gold-hi); text-shadow: 0 0 30px rgba(255, 150, 60, 0.35); }
.scoreboard .holds .nm { color: var(--gold-hi); }
.scoreboard .role { font: 700 0.85rem/1 var(--label); letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-soft); }
.scoreboard .at { font: 800 1.1rem/1 var(--label); text-transform: uppercase; color: var(--text-soft); }
/* The Shield taken: a blade cuts across the fallen holder's crest. */
.game.transfer .side.lost .crest::after {
  content: '';
  position: absolute;
  left: -6%;
  top: calc(50% - 3px);
  width: 112%;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(90deg, transparent, #8a1810 14%, #e2412f 50%, #8a1810 86%, transparent);
  box-shadow: 0 0 10px rgba(226, 65, 47, 0.6);
  rotate: -40deg;
  animation: slash 0.3s cubic-bezier(0.6, 0, 0.9, 0.6) 0.7s backwards;
}
@keyframes slash { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0); } }
/* A defense: the holder's arrows thunk into the beaten challenger's crest, one, two, three,
   and the crest takes each. A transfer: the Shield lands on the new holder's crest in a flare
   of fire. */
/* When the volley comes: the first arrow at, the next each a gap after, each landing a moment
   into its flight; the crest shakes as each lands, one shake an arrow (--hits, pages.ts). */
.crest { --volley-at: 0.9s; --volley-gap: 0.3s; --land: 0.22s; }
.crest .hit {
  position: absolute;
  left: 40%;
  width: 100%;
  transform-origin: var(--tip) 50%;
  rotate: var(--deg);
  pointer-events: none;
  animation: thunk 0.32s cubic-bezier(0.3, 0.7, 0.4, 1) calc(var(--volley-at) + var(--k) * var(--volley-gap)) backwards;
}
.crest .hit svg { display: block; width: 100%; }
@keyframes thunk { from { translate: 150% -70%; opacity: 0; } 50% { opacity: 1; } }
.game.defense .side.lost .crest { animation: struck var(--volley-gap) ease-out calc(var(--volley-at) + var(--land)) var(--hits); }
@keyframes struck { 30% { translate: -5px 1px; rotate: -4deg; } 65% { translate: 2px 0; rotate: 2deg; } }
.crest .taken { position: absolute; left: 50%; top: -30px; translate: -50% 0; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.7)); animation: seize 0.6s cubic-bezier(0.3, 1.4, 0.5, 1) 1s backwards; }
.crest .taken svg { display: block; }
@keyframes seize { from { translate: -50% -160%; scale: 2; opacity: 0; } 60% { opacity: 1; } }
.game.transfer .side.won .crest { isolation: isolate; }
.game.transfer .side.won .crest::before {
  content: '';
  position: absolute;
  inset: -60%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 200, 110, 0.75), rgba(255, 110, 30, 0.3) 45%, transparent);
  opacity: 0;
  animation: flare 1.6s ease-out 1.25s;
}
@keyframes flare { 15% { opacity: 1; scale: 1.15; } 100% { opacity: 0; scale: 1.5; } }
.verdict {
  display: inline-block;
  margin: 8px 0 18px;
  padding: 7px 18px;
  font: 800 1rem/1.2 var(--label);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text);
}
/* The verdict stamped on like a brand. */
.verdict.defense, .verdict.transfer {
  color: var(--bone);
  border: 3px double rgba(201, 161, 90, 0.8);
  background: rgba(10, 10, 11, 0.6);
  -webkit-mask-image: var(--worn);
  mask-image: var(--worn);
  rotate: -2deg;
  animation: stamp 0.45s cubic-bezier(0.3, 1.6, 0.5, 1) 0.3s backwards;
}
.verdict.transfer { color: #ffb4a6; border-color: rgba(192, 53, 42, 0.95); background: rgba(60, 8, 6, 0.55); }
@keyframes stamp { from { scale: 1.8; opacity: 0; } }
.game-body { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px 40px; margin-top: 18px; text-align: left; }
.meaning p { margin: 0 0 12px; font: 500 1.15rem/1.5 var(--body); }
.facts { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; align-content: start; padding: 18px 20px; }
.facts dt { font: 800 0.85rem/1.5 var(--label); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-soft); }
.facts dd { margin: 0; }
.links { margin: 20px 0; font-weight: 600; }
.prevnext { display: flex; justify-content: space-between; gap: 16px; margin: 30px 0 0; padding-top: 18px; border-top: 1px solid var(--line); text-align: left; }
.prevnext a { text-decoration: none; max-width: 48%; }
.prevnext a span { display: block; font: 800 0.8rem/1.3 var(--label); letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); }
.prevnext .next { text-align: right; margin-left: auto; }
@media (max-width: 700px) {
  .game-body { grid-template-columns: 1fr; }
}

.lines { list-style: none; margin: 0; padding: 0; }
.lines li { display: grid; grid-template-columns: 7.5em 1fr auto; gap: 4px 14px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.lines .d { color: var(--text-soft); font-variant-numeric: tabular-nums; }
.lines a { text-decoration: none; font-weight: 600; }
.lines .what { color: var(--text-soft); text-align: right; }
@media (max-width: 560px) {
  .lines li { grid-template-columns: 1fr auto; }
  .lines .d { grid-column: 1 / -1; font-size: 0.85rem; }
}

/* The Shieldbearer: named under the verdict. */
.bearer { max-width: 560px; margin: 4px auto 8px; padding: 16px 22px; }
.bearer p { margin: 0; }
.bearer-label { font: 800 0.85rem/1 var(--label); letter-spacing: 0.26em; text-transform: uppercase; color: var(--crimson-hi); }
.bearer .bearer-name { margin: 8px 0 4px; font: 900 clamp(1.4rem, 3.6vw, 1.9rem)/1.1 var(--display); }
.bearer-team { margin-left: 6px; font: 700 1rem/1 var(--label); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-soft); }
.bearer-team a { text-decoration: none; }
.bearers-line { margin: 4px 0 8px; color: var(--text-soft); }

/* ---------- A team ---------- */

.team-hero { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr); align-items: center; gap: 20px 44px; padding: 20px 0 10px; }
.team-title { font-size: clamp(2.4rem, 6.4vw, 4.4rem); line-height: 1; }
.team-line { margin: 12px 0 6px; font: 600 1.3rem/1.35 var(--body); }
.status { margin: 8px 0; color: var(--text-soft); max-width: 60ch; }
.status.holds { color: var(--gold-hi); font-weight: 600; }
@media (max-width: 760px) {
  .team-hero { grid-template-columns: 1fr; }
}
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 30px 0; }
.stat { padding: 18px 20px; }
.stat b { display: block; font: 900 2.6rem/1 var(--label); color: var(--steel-hi); }
.stat span { font: 800 0.8rem/1.3 var(--label); letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-soft); }
.team-season { padding: 18px 0; border-bottom: 1px solid var(--line); }
.team-season h3 { font-size: 1.6rem; margin-bottom: 6px; }
.team-season h3 a { text-decoration: none; color: var(--gold-hi); }
.team-season > p { margin: 0 0 8px; }
.reign-list { margin: 0 0 8px; padding-left: 18px; color: var(--text-soft); }
.reign-list li { margin: 4px 0; }
.reign-list b { color: var(--text); }
.reign-list .rivets { vertical-align: middle; }
details summary { cursor: pointer; font: 800 0.95rem/1.6 var(--label); letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); }
details[open] summary { margin-bottom: 6px; }

.team-grid { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.team-grid a { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 14px 16px; text-decoration: none; }
.team-grid a:hover { box-shadow: inset 0 0 0 1px var(--gold), inset 0 -18px 30px rgba(0, 0, 0, 0.35); }
.team-grid .badge { grid-row: span 2; }
.team-grid .nm { font: 800 1.1rem/1.1 var(--label); text-transform: uppercase; letter-spacing: 0.03em; }
.team-grid .sub { font-size: 0.88rem; color: var(--text-soft); }
.team-grid .holder a { box-shadow: inset 0 0 0 2px #ff8a3a, inset 0 0 30px rgba(255, 110, 30, 0.2); }

/* ---------- Footer ---------- */

.foot { width: min(860px, 100% - 32px); margin: 80px auto 40px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 0.9rem; color: var(--text-soft); text-align: center; }
.foot b { color: var(--steel-hi); font-family: var(--display); letter-spacing: 0.08em; }

/* The shield wall: every club's own shield, crowned with its silhouette, hung on two racks of
   dark timber, two rows of eight each. The holder's is raised and lit; picking one unrolls its
   season on a scroll under the wall. */
.wall { display: grid; gap: 26px; }
.rack-label { display: flex; align-items: baseline; gap: 12px; }
.rack-label .count { font: 500 0.85rem/1.2 var(--body); letter-spacing: 0; text-transform: none; color: var(--text-soft); }
.rack-row {
  position: relative; isolation: isolate;
  --rack-gap: clamp(4px, 1.4vw, 18px);
  --shield-max: 104px;
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 18px var(--rack-gap);
  margin: 0; padding: 16px calc(var(--rack-gap) + 4px) 12px; list-style: none;
}
/* The rack's hacked panel, a layer of its own so the plates can hang over its edge. */
.rack-row::before { content: ''; position: absolute; z-index: -1; inset: 0; background: var(--grain), #110e0b; border: 1px solid var(--line); clip-path: var(--hacked); }
.rack-row li { position: relative; container-type: inline-size; }
/* The timber the shields hang on, behind each row, level with their rounds' middles (--round-y
   of a shield's width down, under its crest: set from shield.ts). */
.rack-row li::before { content: ''; position: absolute; z-index: -1; left: -6px; right: -6px; top: calc(min(100cqw, var(--shield-max)) * var(--round-y) - 6px); height: 12px; background: linear-gradient(#3a2716, #24180e 45%, #120c07); }
.rack-row a { display: grid; justify-items: center; gap: 4px; color: inherit; text-decoration: none; outline-offset: 4px; }
.wall-shield {
  display: block; width: 100%; max-width: var(--shield-max);
  filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.7));
  transition: translate 0.25s, scale 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.rack-row a:hover .wall-shield, .rack-row a:focus-visible .wall-shield, .rack-row a[aria-expanded='true'] .wall-shield { translate: 0 -4px; scale: 1.08; }
.rack-row .tag { font: 800 0.8rem/1 var(--label); letter-spacing: 0.12em; color: var(--text-soft); }
.rack-row .painted .tag { color: var(--bone); }
/* The holder's shield: raised off the beam and lit from below, and raised further when picked. */
.rack-row .holder .wall-shield { translate: 0 -6px; scale: 1.12; filter: drop-shadow(0 0 10px rgba(236, 201, 135, 0.6)) drop-shadow(0 6px 6px rgba(0, 0, 0, 0.8)); }
.rack-row .holder a:is(:hover, :focus-visible, [aria-expanded='true']) .wall-shield { translate: 0 -9px; scale: 1.18; }
.rack-row .holder .tag, .rack-row a[aria-expanded='true'] .tag { color: var(--gold-hi); }

/* The plate naming a shield's state, over it while it is pointed at. */
.wall-plate {
  display: none; position: absolute; z-index: 5; bottom: calc(100% + 4px); left: 50%; translate: -50% 0;
  width: max-content; max-width: 220px; padding: 6px 10px; pointer-events: none;
  font: 500 0.82rem/1.3 var(--body); color: var(--text); text-align: center;
  background: #19140f; border: 1px solid var(--gold-deep); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
}
.rack-row li:is(:hover, :focus-within) .wall-plate { display: block; }
.wall-plate .odds { display: block; margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--line); color: var(--gold-hi); font-weight: 600; }
/* At a row's ends the plate hangs inward, clear of the page's edge. */
.rack-row li:nth-child(8n + 1) .wall-plate { left: 0; translate: none; }
.rack-row li:nth-child(8n) .wall-plate { left: auto; right: 0; translate: none; }
.wall-plate b { display: block; font: 800 0.75rem/1.2 var(--label); letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-hi); }

/* The scroll a picked shield unrolls: its season, under the wall. */
.wall-scroll {
  margin-top: 22px; padding: 18px 22px 20px;
  background: var(--grain), linear-gradient(#211a12, #15110c);
  border: 1px solid var(--gold-deep); border-width: 3px 1px;
  transform-origin: top; animation: unroll 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}
@keyframes unroll { from { opacity: 0; scale: 1 0.6; } }
.wall-scroll .scroll-name { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font: 600 1.3rem/1.2 var(--display); color: var(--bone); }
.wall-scroll .scroll-more { margin: 12px 0 0; }
.wall-scroll .close { float: right; }
.wall-scroll .scroll-name .wall-shield { width: 34px; filter: none; }
.wall-scroll .team-season { margin: 0; }

/* A club's odds, under its line on its page. */
.team-odds { margin: 6px 0 0; color: var(--text-soft); }
.team-odds a { color: var(--gold-hi); }

/* Your club: the picker, its panel on the home page, its shield marked on the wall, and the
   button that picks it on its own page. */
/* A section's list to pick from (pages.ts pickSection). */
.pick { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; font: 800 0.9rem/1 var(--label); letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-hi); }
.pick select { flex: 0 1 auto; min-width: 0; max-width: 640px; padding: 9px 12px; font: 500 1rem/1.2 var(--body); letter-spacing: 0; text-transform: none; color: var(--text); background: #171513; border: 1px solid #4a453f; border-radius: 6px; }
.club-card {
  padding: 18px 22px; border-left: 4px solid var(--paint, var(--gold));
  background: var(--grain), linear-gradient(90deg, color-mix(in srgb, var(--paint, #222) 22%, #15110c), #15110c 70%);
}
.club-name { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font: 600 1.35rem/1.2 var(--display); }
.club-name a { color: var(--bone); text-decoration: none; }
.club-where, .club-odds, .club-record { margin: 6px 0 0; }
.club-odds b { color: var(--gold-hi); }
.club-record { color: var(--text-soft); }
.rack-row li.mine .wall-shield { filter: drop-shadow(0 0 1.5px var(--gold-hi)) drop-shadow(0 0 1.5px var(--gold-hi)) drop-shadow(0 4px 4px rgba(0, 0, 0, 0.7)); }
.rack-row li.mine .tag { color: var(--gold-hi); }
.pick-club { margin-top: 12px; }
.pick-club[aria-pressed='true'] { border-color: var(--gold); color: var(--gold-hi); }

/* What if: the season turned on one game, its reign band and its tale. */
.whatif-q { margin: 0 0 12px; font: 600 1.3rem/1.25 var(--display); color: var(--bone); }
.whatif-q span { font: 500 0.9rem/1 var(--body); color: var(--text-soft); }
.whatif-tale { margin: 10px 0 18px; max-width: 70ch; }
.whatif-link { margin-top: 10px; }
.whatif-link a { color: var(--gold-hi); }

/* Siege night: the call on the holder's game, its goals, and the wall breached while the
   challenger leads (the great shield's fire burns red and fast). */
/* Each part shows in its phase only (data-phase on the game's block; components.ts siegeAttrs). */
[data-phase='before'] :is(.sc, [data-clock], [data-live], [data-final], .siege-call),
[data-phase='live'] :is([data-before], [data-final]),
[data-phase='final'] :is([data-before], [data-live]),
.siege-call:empty, .siege-goals:empty { display: none; }
.siege-call { margin: 10px 0 0; font: 800 1rem/1.2 var(--label); letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-hi); }
.breached .siege-call { color: var(--crimson-hi); }
.siege-goals { margin: 10px 0 0; padding: 0; list-style: none; font: 500 0.9rem/1.5 var(--body); color: var(--text-soft); }
.siege-goals .against { color: #e8a49b; }
.siege-goals .for { color: var(--gold-hi); }
.defense-card.breached, .game.breached .scoreboard { box-shadow: inset 0 0 0 2px var(--crimson-hi); }
.great-shield.breached .stage::before { background: radial-gradient(closest-side, rgba(255, 30, 10, 0.7), rgba(200, 20, 0, 0.18) 70%, transparent); animation-duration: 0.7s; }
