/* DraftBox - Profile Styles */
/* Typography: Anton (title only), Krona One (everything else) */
/* Layout: CSS Grid — visual (SVG) + info (meta + snippets) */

/* ============================================
   DESIGN TOKENS
   ============================================ */

:root {
  /* Colors — darkest to lightest */
  --color-primary:     #ce1126;
  --color-dark:        #0a0a0a;
  --color-dim:         #1a1a1a;
  --color-grey:         #424242;
  --color-mid:         #646464;
  --color-grey-light:  #b8b8b8;
  --color-muted:       #d1d1d1;
  --color-grey-hint:   #ebebeb;
  --color-light:       #fafafa;
  --color-hint:        rgba(250, 250, 250, 0.5);
  --color-link:         #004cfa;
  --color-link-dark:     #3673ff;

  /* Accent — overridden per-prospect via JS */
  --accent-color:      #000000;
  --accent-r:          0;
  --accent-g:          0;
  --accent-b:          0;
  --accent-light:      #000000;
  --accent-opacity:    0;

  /* Typography */
  --font-display:      'Anton', sans-serif;
  --font-body:         'Krona One', sans-serif;
  --font-condensed:    'Play', sans-serif;

  /* Spacing */
  --space-xs:          0.25rem;
  --space-sm:          0.5rem;
  --space-md:          0.75rem;
  --space-lg:          1rem;

  /* Scaled spacing */
  --scale-xs:          0.25em;
  --scale-sm:          0.5em;
  --scale-md:          0.75em;
  --scale-lg:          1em;

  /* Section insets (rem) */
  --inset-xs:          1.5rem;
  --inset-sm:          2rem;
  --inset-md:          3.5rem;
  --inset-lg:          5rem;

  /* Filters */
  --filter-primary:    brightness(0) saturate(100%) invert(12%) sepia(93%) saturate(5765%) hue-rotate(349deg) brightness(89%) contrast(99%);

  /* Transitions */
  --ease-standard:     cubic-bezier(0.4, 0, 0.2, 1);
  --ease-enter:        cubic-bezier(0.16, 1, 0.3, 1);
  --duration-slow:     0.7s;
  --duration-fast:     0.1s;
}

/* ============================================
   RESET & BASE
   ============================================ */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* Utility */
.hidden { display: none; }

/* General spacing: text following a subtitle gets breathing room */
[class*="subtitle"] + [class*="text"] {
  margin-top: 1.75rem;
}

/* Section base — all content sections inherit this padding */
section {
  padding: clamp(var(--inset-sm), 4.5vw, var(--inset-lg));
}

html, body {
  min-height: 100vh;
  background-color: var(--color-dark);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  color: var(--color-light);
  overflow-x: hidden;
  font-family: var(--font-body);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   HEADER — grid container
   ============================================ */

.header {
  visibility: visible;
  padding: 0;
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  grid-template-areas: "visual info";
  background: var(--color-dark);
  overflow: hidden;
}

.header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../asset/image/background-field.jpg');
  background-size: cover;
  background-position: center;
  z-index: 0;
  animation: fieldReveal 4s ease 0s both;
}

html.webp .header::before {
  background-image: url('../asset/image/background-field.webp');
}


@keyframes fieldReveal {
  from { opacity: 0; }
  to   { opacity: 0.085; }
}

/* ============================================
   ACCENT FILL — SVG elements colored by accent
   ============================================ */

.accent-fill {
  fill: var(--accent-color);
  fill-opacity: calc(var(--accent-opacity) * 1);
}

.accent-fill--60 {
  fill-opacity: calc(var(--accent-opacity) * 0.6);
}

.accent-fill--65 {
  fill-opacity: calc(var(--accent-opacity) * 0.65);
}

.accent-fill--70 {
  fill-opacity: calc(var(--accent-opacity) * 0.7);
}

.accent-fill--80 {
  fill-opacity: calc(var(--accent-opacity) * 0.8);
}

.accent-fill--90 {
  fill-opacity: calc(var(--accent-opacity) * 0.9);
}

/* Accent stroke — used for diamond frame outline */
.accent-stroke {
  stroke: var(--accent-color);
}

/* ============================================
   VISUAL — SVG structural geometry
   ============================================ */

.header-visual {
  grid-area: visual;
  position: relative;
  min-width: 0;
  z-index: 1;
  aspect-ratio: 1900 / 1440;
  align-self: center;
}

/* Info column — stacks meta + snippets */
.header-info {
  grid-area: info;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

/* ============================================
   TEMPLATE B — mirrored layout (SVG right)
   ============================================ */

.header--b.header {
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "info visual"
    "stats stats";
  grid-template-rows: 1fr auto;
  padding: var(--inset-xs) 0 0;
}

.header--b.header .stats {
  grid-area: stats;
  background: rgba(0, 0, 0, 0.25);
  padding-left: clamp(var(--inset-sm), 4.5vw, var(--inset-lg));
  z-index: 1;
}

.header--b .stat-value {
  color: var(--color-light);
  opacity: 0.9;
}

.header--b .header-visual {
  aspect-ratio: 1350 / 1000;
  align-self: center;
  margin: var(--inset-xs) 0;
}

.header-visual svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* Nav buttons — material elevation on hover */
.nav-btn {
  cursor: pointer;
  transition: filter var(--duration-slow) var(--ease-standard),
              transform var(--duration-slow) var(--ease-standard);
  transform-origin: center;
}

.nav-btn:hover {
  filter: url(#nav-shadow);
  transform: translateY(-3px) scale(1.03);
}

.nav-btn:hover path {
  filter: brightness(1.05);
}

.nav-btn:hover image {
  opacity: 1;
}

.nav-btn:active {
  transform: translateY(-1px) scale(1.01);
  transition: filter var(--duration-fast) var(--ease-standard),
              transform var(--duration-fast) var(--ease-standard);
}

/* ============================================
   META — overline, title, subtitle
   ============================================ */

.header-meta {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  flex: 1;
  padding: var(--inset-md) clamp(var(--inset-sm), 4.5vw, var(--inset-lg)) var(--inset-sm);
  gap: var(--space-md);
}

/* ============================================
   SNIPPETS
   ============================================ */

.header-snippets {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  flex: 1;
  padding: 0 clamp(var(--inset-sm), 4.5vw, var(--inset-lg)) clamp(var(--inset-sm), 4.5vw, var(--inset-lg));
}

/* Hex tag — reusable elongated hexagon container
   Padding scales with font-size (em units).
   For series of similar-width tags, empty tags default to font-size: 1rem. */
.hextag {
  display: inline-flex;
  align-items: center;
  padding: 0.625em 2em;
  gap: var(--scale-md);
  background: rgba(var(--accent-r), var(--accent-g), var(--accent-b), 0.8);
  clip-path: polygon(4.6% 0%, 95.4% 0%, 100% 50%, 95.4% 100%, 4.6% 100%, 0% 50%);
}

/* Overline hex tag */
.overline-hextag {
  align-self: flex-start;
  background: rgba(var(--accent-r), var(--accent-g), var(--accent-b), 0.65);
}

.overline-hextag .hextag-text {
  color: var(--color-grey-hint);
}

.overline-logo {
  height: 1.4rem;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

/* Hextag text — base label style inside hex containers */
.hextag-text {
  letter-spacing: 0.025em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.overline-text {
  font-size: clamp(0.875rem, 1.5vw, 0.875rem);
}

/* Hex marker — shared hexagonal pip */
.hexmark {
  width: var(--scale-sm);
  height: var(--scale-sm);
  flex-shrink: 0;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.overline-hexmark {
  background: rgba(var(--accent-r), var(--accent-g), var(--accent-b), 0.5);
}

/* Name link — reusable linked-name style
   Inherits parent color, dotted underline, external-link icon via ::after */
.name-link {
  color: inherit;
  text-decoration: underline dotted;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.name-link:hover {
  text-decoration-style: solid;
}

.name-link::after {
  content: '';
  display: inline-block;
  vertical-align: middle;
  width: 0.7em;
  height: 0.7em;
  margin-left: 0.3em;
  opacity: 0.5;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23000' stroke-width='1.5'%3E%3Cpath d='M4.5 1.5H2a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V8.5M7.5 1.5H11v3.5M11 1.5 5.5 7'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23000' stroke-width='1.5'%3E%3Cpath d='M4.5 1.5H2a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V8.5M7.5 1.5H11v3.5M11 1.5 5.5 7'/%3E%3C/svg%3E") no-repeat center / contain;
  transition: opacity 0.2s ease;
}

.name-link:hover::after {
  opacity: 1;
}

/* Heading — base scale (major third ratio 1.25)
   Base:  clamp(2.2rem, 4vw, 3.2rem)
   Title: two steps up — clamp(3.44rem, 6.25vw, 5rem) */
.heading {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 3.5vw, 3.25rem);
  font-weight: 400;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  line-height: 1.2;
}

.heading-title {
  font-size: clamp(3.5rem, 4vw, 4rem);
  line-height: 1.15;
}

.heading-subtitle {
  font-family: var(--font-body);
  font-size: clamp(1.375rem, 2vw, 1.625rem);
  color: var(--color-primary);
  text-transform: uppercase;
  margin-bottom: var(--space-lg);
}

.heading-overview {
  font-family: var(--font-body);
  font-size: clamp(0.875rem, 1.25vw, 1rem);
  line-height: 1.75;
}

/* Title instance */
.profile-title {
  color: var(--color-light);
  font-size: clamp(4rem, 6vw, 4.75rem);
  white-space: nowrap;
  margin-top: var(--space-xs);
}

/* Meta subtitle — accent colored height/weight in header */
.meta-subtitle {
  font-size: clamp(1rem, 1.5vw, 1.075rem);
  letter-spacing: 0.0175em;
  text-transform: uppercase;
  color: var(--accent-color);
  margin: 0px 0px var(--space-lg);
}

.meta-subtitle-divider {
  opacity: 0.5;
  padding: 0 var(--scale-sm);
}

.meta-subtitle-unit {
  text-transform: lowercase;
}

/* Snippet list */
.snippet-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 1.5vw, 1.5rem);
}

.snippet-item {
  display: flex;
  align-items: flex-start;
  gap: var(--scale-md);
  font-size: clamp(0.875rem, 1.25vw, 1rem);
  color: var(--color-muted);
}

.snippet-hexmark {
  background: var(--color-hint);
  margin-top: var(--scale-sm);
}

.snippet-strength-label {
  color: var(--accent-color);
}

/* ============================================
   RESPONSIVE — column view below 992px
   ============================================ */

@media (max-width: 991px) {
  .header {
    grid-template-columns: 1fr;
    grid-template-areas:
      "meta"
      "visual"
      "snippets";
    overflow: visible;
  }

  .header-info {
    display: contents;
  }

  .header-meta {
    grid-area: meta;
    justify-content: center;
    padding: var(--inset-sm) clamp(var(--inset-sm), 4.5vw, var(--inset-lg)) var(--inset-sm);
  }

  .header-snippets {
    grid-area: snippets;
    padding: var(--inset-sm) clamp(var(--inset-sm), 4.5vw, var(--inset-lg)) var(--inset-sm);
  }

  .header-visual {
    padding-right: var(--inset-xs);
  }

  /* Animation reorder: meta first, SVG second, snippets last */

  .overline-hextag  { animation-delay: 0.2s; }
  .profile-title    { animation-delay: 0.4s; }
  .meta-subtitle    { animation-delay: 0.7s; }

  #accent-primary,
  #spotlight-background { animation-delay: 1.0s; }
  #image-shell          { animation-delay: 0.8s; }

  #spotlight-label-1-bg,
  #spotlight-label-1    { animation-delay: 1.2s; }
  #spotlight-desc-1     { animation-delay: 1.4s; }
  #spotlight-label-2-bg,
  #spotlight-label-2    { animation-delay: 1.6s; }
  #spotlight-desc-2     { animation-delay: 1.8s; }

  #image-credit         { animation-delay: 2.0s; }
  #nav-top              { animation-delay: 2.2s; }
  #nav-bottom           { animation-delay: 2.2s; }

  .snippet-item:nth-child(1) { animation-delay: 2.0s; }
  .snippet-item:nth-child(2) { animation-delay: 2.15s; }
  .snippet-item:nth-child(3) { animation-delay: 2.3s; }
  .snippet-item:nth-child(4) { animation-delay: 2.45s; }
  .snippet-item:nth-child(5) { animation-delay: 2.6s; }

  /* Template B — extends base mobile, adds stats row */
  .header--b.header {
    grid-template-columns: 1fr;
    grid-template-areas:
      "meta"
      "visual"
      "snippets"
      "stats";
    padding: var(--inset-xs) 0 0 0;
  }

  .header--b.header .stats {
    margin-left: 0;
  }

  .header--b .header-visual {
    aspect-ratio: auto;
    padding-right: 0;
    padding-left: var(--inset-xs);
  }

  .profile-title {
    white-space: normal;
  }
}

/* ============================================
   ENTRANCE ANIMATION — engineered reveal
   Mostly opacity, subtle vertical drift (8–12px)
   Overlapping stagger, ~1.4s total
   ============================================ */

@keyframes reveal {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}


@keyframes slideFromLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideFromRight {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes revealDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes dropIn {
  from { opacity: 0; transform: translateY(-30px) rotate(3.5deg); }
  to   { opacity: 0.88; transform: translateY(0) rotate(3.5deg); }
}

@keyframes dropInMirrored {
  from { opacity: 0; transform: translateY(-30px) rotate(-3.5deg); }
  to   { opacity: 0.88; transform: translateY(0) rotate(-3.5deg); }
}

@keyframes slideFromLeftHalf {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 0.5; transform: translateX(0); }
}

@keyframes slideFromRightHalf {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 0.5; transform: translateX(0); }
}

@keyframes fadeInSubtle {
  from { opacity: 0; }
  to   { opacity: 0.045; }
}

@keyframes snapFromRight {
  from { opacity: 0; transform: translateX(100px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideDown {
  from { opacity: 0; transform: translate(20px, -20px); }
  to   { opacity: 1; transform: translate(0, 0); }
}

@keyframes signalFlash {
  0%   { opacity: 0; }
  35%  { opacity: 1; }
  50%  { opacity: 0.3; }
  65%  { opacity: 1; }
  80%  { opacity: 0.6; }
  100% { opacity: 1; }
}

/* --- SVG: structure fades first --- */

#accent-primary {
  opacity: 0;
  animation: none;
}

:root.accent-ready #accent-primary {
  animation: fadeIn 1.8s ease 0.1s both;
}

#spotlight-background {
  opacity: 0;
}

.header--a #spotlight-background {
  animation: slideFromLeft 1.2s ease 0.1s both;
}

.header--b #spotlight-background {
  animation: slideFromRight 1.2s ease 0.1s both;
}

#image-shell {
  opacity: 0;
  visibility: hidden;
}

#image-shell.loaded {
  visibility: visible;
  animation: fadeIn 1.8s ease 0.2s both;
}

/* --- SVG: spotlight content --- */

#spotlight-label-1-bg,
#spotlight-label-1 {
  opacity: 0;
  animation: fadeIn 1.2s ease 0.6s both;
}

#spotlight-desc-1 {
  opacity: 0;
  animation: fadeIn 1.2s ease 0.9s both;
}

#spotlight-label-2-bg,
#spotlight-label-2 {
  opacity: 0;
  animation: fadeIn 1.2s ease 1.1s both;
}

#spotlight-desc-2 {
  opacity: 0;
  animation: fadeIn 1.2s ease 1.4s both;
}

/* --- SVG: nav + credit — last, quiet --- */

#image-credit {
  opacity: 0;
  animation: fadeIn 1.2s ease 1.8s both;
}

#nav-top {
  opacity: 0;
  animation: fadeIn 1s ease 1.8s forwards;
}

#nav-bottom {
  opacity: 0;
  animation: fadeIn 1s ease 1.8s forwards;
}

/* --- Template B: diamond + accent elements --- */

#diamond-frame {
  opacity: 0;
}

:root.accent-ready #diamond-frame {
  animation: fadeIn 1.8s ease 0.1s both;
}

#accent-diamond-lg {
  opacity: 0;
  animation: fadeIn 1.5s ease 0.3s both;
}

#accent-diamond-sm {
  opacity: 0;
  animation: fadeIn 1.5s ease 0.5s both;
}

/* --- HTML: meta content --- */

.overline-hextag {
  opacity: 0;
  animation: fadeIn 1.2s ease 0.5s both;
}

.profile-title {
  opacity: 0;
  animation: fadeIn 1.2s ease 0.7s both;
}

.meta-subtitle {
  opacity: 0;
  animation: fadeIn 1.2s ease 1.0s both;
}

/* --- HTML: snippets stagger --- */

.snippet-item {
  opacity: 0;
  animation: fadeIn 1.2s ease both;
}

.snippet-item:nth-child(1) { animation-delay: 1.2s; }
.snippet-item:nth-child(2) { animation-delay: 1.35s; }
.snippet-item:nth-child(3) { animation-delay: 1.5s; }
.snippet-item:nth-child(4) { animation-delay: 1.65s; }
.snippet-item:nth-child(5) { animation-delay: 1.8s; }

/* ============================================
   STATS — combine metrics
   Major third scale:
     label  step -2: clamp(0.625rem, 0.9vw, 0.75rem)
     value  step  4: clamp(2rem, 2.75vw, 2.44rem)
   ============================================ */

.stats {
  background: var(--color-grey-hint);
  padding: calc(var(--inset-sm) * 1.25) clamp(var(--inset-sm), 4.5vw, var(--inset-lg));
  opacity: 0;
  animation: fadeIn 0.8s ease 1.8s both;
}

.stats-grid {
  display: flex;
  justify-content: center;
  gap: var(--inset-lg);
}

.stat-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  max-width: 10rem;
  position: relative;
  animation: fadeIn 1.2s ease both;
}

.stat-tile:nth-child(1) { animation-delay: 2.0s; }
.stat-tile:nth-child(2) { animation-delay: 2.15s; }
.stat-tile:nth-child(3) { animation-delay: 2.3s; }
.stat-tile:nth-child(4) { animation-delay: 2.45s; }
.stat-tile:nth-child(5) { animation-delay: 2.6s; }


.stat-label {
  font-family: var(--font-body);
  font-size: clamp(0.75rem, 1vw, 0.875rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-light);
  margin-bottom: var(--scale-sm);
  white-space: nowrap;
}

.stat-value {
  font-family: var(--font-display);
  font-size: clamp(1.875rem, 3vw, 2.5rem);
  font-weight: 400;
  letter-spacing: 0.0175em;
  color: var(--color-dark);
  opacity: 0.85;
  line-height: 1;
}

.stat-value--na {
  opacity: 0.5;
}

/* ============================================
   STATS — Responsive
   ============================================ */

@media (max-width: 991px) {
  .stats-grid {
    flex-wrap: wrap;
    gap: var(--inset-sm);
  }

  .stat-tile {
    min-width: 7rem;
  }
}

/* ============================================
   EVAL — scouting narrative band
   ============================================ */

.eval {
  padding: 0 clamp(var(--inset-sm), 2.25vw, var(--inset-lg)) 0 clamp(var(--inset-sm), 4.5vw, var(--inset-lg));
  position: relative;
  background: var(--color-light);
  display: grid;
  grid-template-columns: 1fr 1fr 22rem;
  grid-template-rows: auto 1fr auto;
  column-gap: var(--inset-md);
  overflow: hidden;
  contain: paint;
}

/* Banner row — ribbon + heading, spans full width */
.eval-banner {
  grid-column: 1 / -1;
  padding-top: clamp(var(--inset-sm), 4.5vw, var(--inset-lg));
  z-index: 2;
}

/* Hextag ribbon — empty decorative hex, no text content
   Width scales one major third (1.25): 8rem → 10rem
   Aspect ratio 5:1 */
.hextag-ribbon {
  font-size: 1rem;
  width: clamp(8rem, 12vw, 10rem);
  aspect-ratio: 5 / 1;
  margin-bottom: var(--scale-lg);
}

/* Eval ribbon instance */
.eval-hextag {
  background: var(--accent-light);
  opacity: 0.5;
}

/* Content columns */
.eval-content {
  padding: var(--space-md) 0 clamp(var(--inset-sm), 4.5vw, var(--inset-lg));
  display: flex;
  flex-direction: column;
  z-index: 2;
}
.eval-content.hidden {
  display: none;
}

/* Eval heading instance */
.eval-heading {
  color: var(--accent-light);
  margin-bottom: var(--space-xs);
}

/* Eval evaluator — author credit heading */
.eval-evaluator {
  font-family: var(--font-body);
  font-size: clamp(1.125rem, 1.25vw, 1.175rem);
  font-weight: 600;
  color: var(--color-dim);
  text-transform: uppercase;
  letter-spacing: 0.075em;
  margin: var(--space-sm) 0;
}

.eval-evaluator a {
  color: var(--color-link);
  text-decoration: none;
}

.eval-evaluator a:hover {
  text-decoration: underline;
}

.eval-handle {
  font-size: 0.75em;
  text-transform: none;
  position: relative;
  top: -0.175em;
}

.eval-handle::before {
  content: '';
  width: 0.5em;
  height: 0.5em;
  margin: 0 0.625em 0 0.25em;
  display: inline-block;
  vertical-align: middle;
  background: var(--color-grey-light);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

/* Body text */
.eval-text {
  max-width: 72ch;
  font-family: var(--font-body);
  font-size: clamp(0.875rem, 1.15vw, 0.875rem);
  font-weight: 400;
  color: var(--color-grey);
}

/* Visual column — right */
.eval-visual {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  align-self: stretch;
  z-index: 2;
  min-height: 0;
}

/* Bottom bar — mask uses grunge texture for rough edges.
   Scale mask larger than element so interior stays solid
   while edges get the distressed treatment. */
.eval-bar {
  grid-column: 1 / -1;
  margin: 0 calc(clamp(var(--inset-sm), 4.5vw, var(--inset-lg)) * -1);
  height: clamp(4rem, 8vw, 5rem);
  background: var(--color-muted);
  position: relative;
  will-change: transform;
  transform: translateZ(0);
  clip-path: polygon(
    0% 8%, 3% 3%, 7% 7%, 10% 2%, 14% 6%, 18% 1%, 22% 5%, 26% 2%, 30% 6%, 34% 1%, 38% 4%, 42% 0%, 46% 5%, 50% 1%, 54% 4%, 58% 0%, 62% 6%, 66% 2%, 70% 5%, 74% 1%, 78% 6%, 82% 2%, 86% 5%, 90% 0%, 94% 4%, 97% 1%, 100% 6%,
    100% 94%, 97% 98%, 94% 95%, 90% 100%, 86% 96%, 82% 99%, 78% 94%, 74% 98%, 70% 95%, 66% 100%, 62% 96%, 58% 99%, 54% 95%, 50% 100%, 46% 96%, 42% 99%, 38% 95%, 34% 100%, 30% 96%, 26% 99%, 22% 94%, 18% 98%, 14% 95%, 10% 100%, 7% 96%, 3% 99%, 0% 94%
  );
}

.eval-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.75;
  background-image: url('../asset/image/grunge.jpg?v=4');
  background-position: center;
  background-size: 100% 100%;
  mix-blend-mode: normal;
}

html.webp .eval-bar::after {
  background-image: url('../asset/image/grunge.webp');
}

/* Helmet — vintage treatment, rests on bottom bar via negative margin */
.eval-helmet {
  position: relative;
  z-index: 2;
  width: auto;
  height: 0;
  max-height: 23.75rem;
  margin-bottom: clamp(-3.75rem, -5.75vw, -4.75rem);
  filter: grayscale(1) sepia(0.08) contrast(0.92) brightness(0.97);
  transform: rotate(3.5deg);
  transform-origin: center bottom;
  will-change: transform, opacity;
  opacity: 0;
}

/* Watermark — large faded text spanning full section */
.eval-watermark {
  position: absolute;
  right: 0;
  top: 12%;
  z-index: 1;
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  color: var(--color-dim);
  opacity: 0.055;
  line-height: 0.95;
  white-space: nowrap;
  pointer-events: none;
  text-align: right;
}

.eval-watermark span {
  display: block;
}

/* ============================================
   EVAL — Scroll-triggered entrance
   ============================================ */

.eval-hextag,
.eval-heading,
.eval-evaluator,
.eval-text,
.eval-watermark,
.eval-bar {
  opacity: 0;
}

.eval--visible .eval-hextag {
  animation: slideFromLeftHalf 0.6s var(--ease-enter) both;
}

.eval--visible .eval-heading {
  animation: reveal 1.2s ease 0.1s both;
}

.eval--visible .eval-evaluator {
  animation: reveal 1.2s ease 0.2s both;
}

.eval--visible .eval-text {
  animation: reveal 1.2s ease 0.3s both;
}

.eval--visible .eval-watermark {
  animation: fadeInSubtle 1.5s ease 0.2s both;
}

/* Single evaluator fallback — col 02 hidden, revert to original golden ratio */
.eval--single {
  grid-template-columns: 1.618fr 1fr;
}
.eval--single.eval--b {
  grid-template-columns: 1fr 1.618fr;
}
.eval--single.eval--b .eval-content-01 {
  grid-column: 2;
}
.eval--single.eval--b .eval-visual {
  grid-column: 1;
}

/* ============================================
   EVAL — Template B mirrored layout
   Visual left, content right, helmet + watermark flipped
   ============================================ */

.eval--b {
  grid-template-columns: 1fr 1.25fr 1.25fr;
  padding: 0 clamp(var(--inset-sm), 4.5vw, var(--inset-lg)) 0 clamp(var(--inset-sm), 2.25vw, var(--inset-lg));
}

.eval--b .eval-visual {
  grid-column: 1;
  grid-row: 2;
  justify-content: flex-start;
}

@media (min-width: 1200px) {
  .eval--b .eval-banner {
    padding-left: 2.25vw;
  }
}

.eval--b .eval-content-01 {
  grid-column: 2;
}

.eval--b .eval-content-02 {
  grid-column: 3;
}

.eval--b .eval-helmet {
  transform: rotate(-3.5deg);
}

.eval--b .eval-watermark {
  right: auto;
  left: 0;
  text-align: left;
}

.eval--b.eval--visible .eval-hextag {
  animation-name: slideFromRightHalf;
}

.eval--b.eval--visible .eval-helmet {
  animation: dropInMirrored 2.0s var(--ease-enter) 1.2s both;
}

.eval--visible .eval-helmet {
  animation: dropIn 2.0s var(--ease-enter) 1.2s both;
}

.eval--visible .eval-bar {
  animation: fadeIn 1.0s ease 0.4s both;
}

/* ============================================
   EVAL — Responsive
   ============================================ */

@media (max-width: 991px) {
  .eval,
  .eval--single,
  .eval--single.eval--b {
    grid-template-columns: 1fr;
    column-gap: var(--scale-lg);
    padding-left: clamp(var(--inset-sm), 4.5vw, var(--inset-lg));
    padding-right: clamp(var(--inset-sm), 4.5vw, var(--inset-lg));
  }

  .eval-banner {
    margin-bottom: var(--scale-sm);
  }

  .eval--b .eval-visual,
  .eval--b .eval-content-01,
  .eval--b .eval-content-02,
  .eval--single.eval--b .eval-visual,
  .eval--single.eval--b .eval-content-01 {
    grid-column: auto;
  }

  .eval-content {
    margin-top: var(--scale-md) 0;
  }

  .eval-content + .eval-content {
    margin-top: 0;
    padding-top: 0;
  }

  .eval-visual {
    display: none;
  }

  .eval-helmet {
    height: auto;
    max-height: 300px;
    margin-right: 0;
  }

  .eval-watermark {
    display: none;
  }
}

/* Mid-range: two eval columns + watermark, no helmet */
@media (min-width: 992px) and (max-width: 1199px) {
  .eval {
    grid-template-columns: 1fr 1fr;
    padding-right: clamp(var(--inset-sm), 4.5vw, var(--inset-lg));
  }

  .eval--b {
    padding-left: clamp(var(--inset-sm), 4.5vw, var(--inset-lg));
  }

  .eval-visual {
    display: none;
  }

  /* Single evaluator: restore golden ratio + helmet at mid-range */
  .eval--single {
    grid-template-columns: 1.618fr 1fr;
    padding-right: clamp(var(--inset-sm), 2.25vw, var(--inset-lg));
  }

  .eval--single .eval-visual {
    display: flex;
  }

  .eval--single.eval--b {
    grid-template-columns: 1fr 1.618fr;
    padding-left: clamp(var(--inset-sm), 2.25vw, var(--inset-lg));
  }
}


/* ============================================
   FILM — clip study band
   Golden ratio grid with accent-bordered frame.
   ============================================ */

/* Section container */
.film {
  position: relative;
  display: grid;
  grid-template-rows: 1.618fr 1fr;
  padding: 0;
  overflow: hidden;
  contain: paint;
  background: var(--color-light);
}

/* Frame — accent-bordered box.
   Tapered top corners via clip-path for subtle hex feel. */
.film-frame {
  grid-row: 1 / -1;
  grid-column: 1;
  z-index: 2;
  margin: clamp(var(--inset-sm), 4.5vw, var(--inset-lg));
  padding: var(--inset-md) clamp(var(--inset-sm), 3.75vw, var(--inset-lg));
  will-change: transform;
  transform: translateZ(0);
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Tapered border — pseudo-element traces the clipped shape.
   Outer shape is the full element, inner inset creates visible stroke. */
.film-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  clip-path: polygon(
    30px 0%, calc(100% - 30px) 0%, 100% 24px, 100% calc(100% - 24px), calc(100% - 30px) 100%, 30px 100%, 0% calc(100% - 24px), 0% 24px,
    30px 0%,
    2px calc(24px + 1px), 2px calc(100% - 24px - 1px),
    calc(30px + 1px) calc(100% - 2px), calc(100% - 30px - 1px) calc(100% - 2px),
    calc(100% - 2px) calc(100% - 24px - 1px), calc(100% - 2px) calc(24px + 1px),
    calc(100% - 30px - 1px) 2px, calc(30px + 1px) 2px,
    2px calc(24px + 1px)
  );
  background: var(--accent-color);
  pointer-events: none;
  z-index: -1;
}

/* Heading instance — accent color */
.film-heading {
  color: var(--accent-light);
  margin-bottom: var(--space-md);
}

/* Overview text — static description below heading */
.film-overview {
  font-family: var(--font-body);
  color: var(--color-dim);
  font-size: clamp(0.875rem, 1.25vw, 1rem);
  line-height: 1.6;
}

/* Card grid — columns match clip count, major third gap (step 3: 1.953rem) */
.film-grid {
  display: grid;
  grid-template-columns: repeat(var(--film-count, 3), 1fr);
  justify-items: center;
  gap: clamp(2rem, 3vw, 3.75rem);
  flex: 1;
  margin: var(--inset-sm) 0 var(--space-md);
}

/* Individual card — subtle shadow, no border.
   Max-width prevents single-clip layouts from stretching full width.
   At 2-3 clips the grid columns are narrower than 40rem so the cap doesn't kick in. */
.film-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 40rem;
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.04);
}

/* Video player container */
.film-player {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}

.film-player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.film-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  padding: 0;
  margin: 0;
  background: #000;
  cursor: pointer;
}

.film-poster-image,
.film-poster-fallback {
  display: block;
  width: 100%;
  height: 100%;
}

.film-poster-image {
  object-fit: cover;
}

.film-poster-fallback {
  background: linear-gradient(140deg, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.6));
}

.film-poster-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.25);
  color: var(--color-light);
  transition: background 0.2s ease, transform 0.2s ease;
}

.film-poster:hover .film-poster-play {
  background: rgba(0, 0, 0, 0.82);
  transform: translate(-50%, -50%) scale(1.04);
}

/* Enlarge button — bottom-right of video */
.film-enlarge {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  z-index: 2;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.6);
  color: var(--color-light);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.film-player:hover .film-enlarge {
  opacity: 1;
}

.film-enlarge:hover {
  background: rgba(0, 0, 0, 0.85);
}

/* Card body — title + description below video */
.film-body {
  padding: 1.25rem;
}

/* Film title — body font for matchup-style names (e.g. "Team A vs Team B") */
.film-title {
  font-family: var(--font-body);
  font-size: clamp(0.875rem, 1.25vw, 1rem);
  letter-spacing: 0.0175em;
  color: var(--color-dark);
  margin-bottom: var(--space-md);
}

/* Description text */
.film-desc {
  font-family: var(--font-body);
  font-size: clamp(0.875rem, 1.15vw, 0.875rem);
  font-weight: 400;
  color: var(--color-grey);
}

/* ============================================
   FILM — Scroll-triggered entrance
   ============================================ */

.film-frame,
.film-heading,
.film-overview,
.film-card {
  opacity: 0;
}

.film--visible .film-frame {
  animation: fadeIn 0.8s ease both;
}

.film--visible .film-heading {
  animation: reveal 0.6s var(--ease-enter) 0.4s both;
}

.film--visible .film-overview {
  animation: reveal 0.6s var(--ease-enter) 0.6s both;
}

.film--visible .film-card:nth-child(1) {
  animation: reveal 0.8s var(--ease-enter) 0.8s both;
}

.film--visible .film-card:nth-child(2) {
  animation: reveal 0.8s var(--ease-enter) 1.2s both;
}

.film--visible .film-card:nth-child(3) {
  animation: reveal 0.8s var(--ease-enter) 1.6s both;
}

/* ============================================
   FILM — Modal / Enlarge overlay
   ============================================ */

.film-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.film-modal.active {
  display: flex;
}

.film-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
}

.film-modal-content {
  position: relative;
  width: 85vw;
  max-width: 1200px;
  aspect-ratio: 16 / 9;
  z-index: 1;
}

.film-modal-iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 4px;
}

.film-modal-close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  background: none;
  border: none;
  color: var(--color-light);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.film-modal-close:hover {
  opacity: 1;
}

/* ============================================
   FILM — Responsive
   ============================================ */

@media (max-width: 991px) {
  .film {
    grid-template-rows: auto auto;
  }

  .film-frame {
    margin: var(--inset-sm);
    padding: var(--inset-sm);
  }

  .film-grid {
    grid-template-columns: 1fr;
    gap: var(--inset-md);
  }
}

/* ============================================
   THEME: DARK — alternate presentation
   Apply via class="theme-dark" on <body>
   ============================================ */

.theme-dark .stats {
  background: rgba(26, 26, 26, 0.375);
}

.theme-dark .stat-label {
  color: var(--accent-color);
}

.theme-dark .stat-value {
  color: var(--color-light);
}

.theme-dark .stat-value--na {
  color: var(--color-mid);
}

.theme-dark .eval {
  background: var(--color-dark);
}

.theme-dark .eval-heading {
  color: var(--accent-color);
}

.theme-dark .eval-evaluator {
  color: var(--color-muted);
}

.theme-dark .eval-evaluator a {
  color: var(--color-link-dark);
}

.theme-dark .eval-text {
  color: var(--color-muted);
}

.theme-dark .eval-helmet {
  filter: grayscale(1) sepia(0.08) contrast(0.88) brightness(0.92);
  transform: rotate(3.5deg);
  transform-origin: bottom center;
  -webkit-mask-image: radial-gradient(ellipse 80% 90% at 50% 70%, black 50%, transparent 78%);
  mask-image: radial-gradient(ellipse 80% 90% at 50% 70%, black 50%, transparent 78%);
}

.theme-dark .eval-bar {
  background: rgba(26, 26, 26, 0.375);
}

.theme-dark .eval-bar::after {
  mix-blend-mode: overlay;
}

@keyframes fadeInSubtleDark {
  from { opacity: 0; }
  to   { opacity: 0.0375; }
}

.theme-dark .eval-watermark {
  color: var(--color-light);
}

.theme-dark .eval--visible .eval-watermark {
  animation-name: fadeInSubtleDark;
}

.theme-dark .film {
  background: var(--color-dark);
}

.theme-dark .film-heading {
  color: var(--accent-color);
}

.theme-dark .film-overview {
  color: var(--color-muted);
}

.theme-dark .film-card {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 1px 4px rgba(0, 0, 0, 0.2);
}

.theme-dark .film-title {
  color: var(--color-light);
}

.theme-dark .film-desc {
  color: var(--color-muted);
}

.theme-dark .film-enlarge {
  background: rgba(255, 255, 255, 0.15);
}

.theme-dark .film-enlarge:hover {
  background: rgba(255, 255, 255, 0.3);
}


/* ============================================
   BOARD PAGE
   ============================================ */

.page-board {
  background: var(--color-light);
  color: var(--color-dark);
}

/* --- Board header: SVG background + grid overlay --- */

.board-header {
  padding: 0;
  position: relative;
  width: 100%;
  background: var(--color-light);
  overflow: hidden;
}

.board-header-svg {
  display: block;
  width: 100%;
  height: auto;
}

/* Grid overlay — sits on top of SVG */
.board-header-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1.25fr 1.5fr 0.75fr;
  grid-template-areas: "visual info cta";
  pointer-events: none;
}

.board-header-info,
.board-header-cta {
  pointer-events: auto;
}

.board-header-visual {
  grid-area: visual;
}

/* --- Info column --- */

.board-header-info {
  grid-area: info;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--inset-sm) var(--inset-sm);
}

.board-title {
  color: var(--color-dark);
  margin-bottom: var(--space-xs);
}

.board-desc {
  color: var(--color-dark);
  max-width: 36ch;
}

/* --- CTA column — nav buttons --- */

.board-header-cta {
  grid-area: cta;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  padding: var(--inset-sm) 0 0;
}

.board-nav-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  width: 100%;
  list-style: none;
}

.board-nav-btn {
  position: relative;
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: transform var(--duration-slow) var(--ease-standard);
}

.board-nav-btn:hover {
  transform: translateX(4px);
}

.board-nav-shape {
  display: block;
  width: 100%;
  height: auto;
}

.board-nav-icon {
  position: absolute;
  left: 12.5%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 10%;
  aspect-ratio: 1;
  filter: brightness(0) invert(0.82);
}

.board-nav-hex {
  display: contents;
}

.board-nav-label {
  position: absolute;
  left: 34%;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-body);
  font-size: clamp(0.6rem, 0.85vw, 0.8rem);
  color: var(--color-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

/* ============================================
   BOARD — ENTRANCE ANIMATION
   Diagonal lines + triangles slide toward player.
   Logo pulses like a signal flash.
   Everything else fades in, staggered.
   ============================================ */

/* --- Movement: grey arrows + diag lines snap toward player --- */
#grey-arrows {
  opacity: 0;
  animation: snapFromRight 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

#diag-lines {
  opacity: 0;
  animation: snapFromRight 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

/* --- Structure: red shapes --- */
#red-chevron {
  opacity: 0;
  animation: fadeIn 1.2s ease 0.3s both;
}

#red-bar {
  opacity: 0;
  animation: slideFromLeft 1.4s ease-out 0.3s both;
}

#red-corner {
  opacity: 0;
  animation: slideFromLeft 0.5s ease-out 0.5s both;
}

/* --- Image: gated by loaded class like profile --- */
#image-shell {
  opacity: 0;
}

#board-image {
  opacity: 0;
  animation: fadeIn 1.5s ease 0.2s both;
}

/* --- Logo: signal flash --- */
#board-logo {
  opacity: 0;
  animation: signalFlash 2.4s ease 0.6s both;
}

/* --- Quiet decorative: rules, dots --- */
#mid-rule,
#rule-line {
  opacity: 0;
  animation: fadeIn 1.2s ease 0.8s both;
}

#hex-dots {
  opacity: 0;
  animation: fadeIn 1.0s ease 0.7s both;
}

/* --- HTML text: appears when arrows settle --- */
.board-title,
.board-subtitle,
.board-desc {
  opacity: 0;
  animation: fadeIn 0.8s ease 0.5s both;
}

/* --- CTA buttons: stagger after text --- */
.board-nav-btn:nth-child(1) { opacity: 0; animation: fadeIn 0.8s ease 0.7s both; }
.board-nav-btn:nth-child(2) { opacity: 0; animation: fadeIn 0.8s ease 0.85s both; }
.board-nav-btn:nth-child(3) { opacity: 0; animation: fadeIn 0.8s ease 1.0s both; }

/* ============================================
   BOARD — RESPONSIVE
   ============================================ */

@media (max-width: 1199px) {

  /* Hide desktop SVG */
  .board-header-svg {
    display: none;
  }

  .board-header {
    padding: clamp(var(--inset-sm), 4.5vw, var(--inset-lg));
  }

  /* Single column, reorder via display:contents */
  .board-header-grid {
    position: relative;
    display: flex;
    flex-direction: column;
  }

  .board-header-visual {
    display: none;
  }

  .board-header-info {
    display: contents;
  }

  .board-title {
    order: 1;
  }

  .board-subtitle {
    order: 2;
    margin-bottom: var(--space-lg);
  }

  .board-desc {
    order: 3;
    max-width: none;
  }

  /* CTA — horizontal row, hextag + icon with label below */
  .board-header-cta {
    order: 4;
    flex-direction: row;
    justify-content: flex-start;
    align-items: flex-start;
    padding: var(--inset-sm) 0 0;
  }

  .board-nav-list {
    flex-direction: row;
    gap: var(--inset-md);
    justify-content: flex-start;
  }

  .board-nav-btn {
    position: relative;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    width: clamp(4rem, 14vw, 5.5rem);
  }

  .board-nav-shape {
    display: none;
  }

  .board-nav-hex {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1 / 1.15;
    padding: 0;
    background: var(--color-primary);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  }

  .board-nav-icon {
    position: static;
    left: auto;
    top: auto;
    transform: none;
    width: 45%;
    filter: brightness(0) invert(0.92);
  }

  .board-nav-label {
    position: static;
    transform: none;
    color: var(--color-dark);
    font-size: clamp(0.55rem, 1.5vw, 0.7rem);
    text-align: center;
    white-space: normal;
  }
}

@media (max-width: 767px) {
  .board-title,
  .board-subtitle {
    text-align: center;
  }

  .board-header-cta {
    justify-content: center;
  }

  .board-nav-list {
    justify-content: center;
  }
}

/* ============================================
   BOARD TABLE
   ============================================ */

.board-table {
  padding: 0 var(--inset-md);
  padding-bottom: var(--inset-lg);
}

/* Search */
.board-search-wrap {
  position: relative;
  padding: var(--inset-sm) 0;
  max-width: calc(100% * 1.25 / 4);
}

.board-search {
  width: 100%;
  margin: var(--space-md) 0;
  padding: var(--space-md) var(--space-lg) var(--space-md) var(--space-md);
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--color-dark);
  background: var(--color-grey-hint);
  border: 2px solid transparent;
  border-radius: 2px;
  outline: none;
  transition: border-color 0.2s var(--ease-standard);
}

.board-search:focus {
  border-color: var(--color-primary);
  background: transparent;
}

.board-search::placeholder {
  color: var(--color-mid);
}

.board-search-clear {
  position: absolute;
  right: var(--space-sm);
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--color-mid);
  cursor: pointer;
  padding: var(--space-xs);
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease-standard);
}

.board-search-clear.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.board-search-clear:hover {
  color: var(--color-dark);
}

@media (max-width: 1199px) {
  .board-search-wrap {
    max-width: 100%;
  }
}

/* Scroll container */
.board-scroll-wrap {
  position: relative;
}

.board-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--color-primary) transparent;
  --fade-left: 0;
  --fade-right: 5rem;
  -webkit-mask-image:
    linear-gradient(to right,
      transparent,
      black var(--fade-left),
      black calc(100% - var(--fade-right)),
      transparent);
  mask-image:
    linear-gradient(to right,
      transparent,
      black var(--fade-left),
      black calc(100% - var(--fade-right)),
      transparent);
}

/* Scroll indicator chevrons — pinned at header row */
.board-scroll-chevron {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 11;
  display: flex;
  align-items: flex-start;
  padding-top: var(--space-xs);
  cursor: pointer;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
  transition: opacity 0.3s var(--ease-standard);
}

.board-scroll-chevron-left {
  left: 0;
  opacity: 0;
  pointer-events: none;
  padding-right: var(--inset-md);
  background: linear-gradient(to right, var(--color-light) 20%, rgba(255,255,255,0.7) 50%, rgba(255,255,255,0.3) 75%, transparent);
}

.board-scroll-chevron-right {
  right: 0;
  padding-left: var(--inset-md);
  background: linear-gradient(to left, var(--color-light) 20%, rgba(255,255,255,0.7) 50%, rgba(255,255,255,0.3) 75%, transparent);
}

.board-scroll-chevron img {
  width: 1.5rem;
  height: 1.5rem;
  filter: brightness(0) invert(0.72);
  display: block;
}

.board-scroll::-webkit-scrollbar {
  height: 4px;
}

.board-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.board-scroll::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: 2px;
}

/* Grid table */
.board-grid {
  min-width: 2000px;
  border-collapse: separate;
  border-spacing: var(--space-lg) 0;
  table-layout: fixed;
  margin-left: calc(-1 * var(--space-lg));
  margin-right: calc(-1 * var(--space-lg));
}

/* Header */
.board-th {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-light);
  background: var(--color-dark);
  padding: var(--space-sm) var(--space-md);
  text-align: left;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 3;
  border-radius: 2px;
  box-shadow:
    0 3px 6px rgba(0, 0, 0, 0.16),
    0 3px 6px rgba(0, 0, 0, 0.23);
}

/* Gap between header and first body row */
.board-grid tbody tr:first-child > .board-cell {
  border-top: var(--space-lg) solid transparent;
}

.board-th-round {
  width: 3rem;
  text-align: center;
  color: var(--color-dark);
  background: var(--color-light);
  box-shadow: none;
  border-radius: 0;
  position: sticky;
  left: 0;
  z-index: 5;
}

/* Cells */
.board-cell {
  padding: var(--space-xs) var(--space-sm);
  vertical-align: top;
  border-bottom: 1px solid var(--color-grey-hint);
}

.board-cell.board-cell-round {
  position: sticky;
  left: 0;
  z-index: 1;
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--color-dark);
  text-align: center;
  vertical-align: top;
  border-bottom: none;
  background: var(--color-light);
}

/* Last row of each round gets the divider */
.board-row-last > .board-cell:not(.board-cell-round) {
  position: relative;
  padding-bottom: var(--space-md);
  border-bottom: 6px solid var(--color-grey-hint);
}

/* Last row round cell also gets the divider */
.board-row-last > .board-cell.board-cell-round {
  padding-bottom: var(--space-md);
  border-bottom: 6px solid var(--color-grey-hint);
}

/* First row after round divider gets top spacing */
.board-row-last + tr > .board-cell {
  border-top: var(--space-md) solid transparent;
}

/* Bridge the border-spacing gaps between columns */
.board-row-last > .board-cell::after {
  content: '';
  position: absolute;
  bottom: -6px;
  right: calc(-1 * var(--space-lg));
  width: var(--space-lg);
  height: 6px;
  background: var(--color-grey-hint);
}

/* Last column doesn't need the bridge */
.board-row-last > .board-cell:last-child::after {
  display: none;
}

.board-cell-player {
  transition: opacity 0.2s var(--ease-standard);
}

.board-cell-empty {
  /* empty slots */
}

/* Player flex row: [logo] [name] [button] */
.board-player {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) 0;
}

.board-player-logo {
  width: 1.375rem;
  height: 1.375rem;
  object-fit: contain;
  flex-shrink: 0;
}

.board-player-logo-placeholder {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  background: var(--color-grey-hint);
  border-radius: 50%;
}

.board-player-name {
  font-family: var(--font-condensed);
  font-size: 1.175rem;
  letter-spacing: -0.0175em;
  color: var(--color-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.board-player-link {
  color: inherit;
  text-decoration: none;
}

.board-player-link:hover {
  color: var(--color-primary);
}



.board-player-sep {
  width: 1px;
  height: 0.75rem;
  background: var(--color-dim);
  flex-shrink: 0;
  margin-left: var(--space-sm);
  margin-right: var(--space-xs);
}

.board-player-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  opacity: 0.3;
  transition: opacity 0.2s var(--ease-standard), filter 0.2s var(--ease-standard);
}

.board-player-btn:hover {
  opacity: 1;
  filter: var(--filter-primary);
}

.board-player-btn-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Search states */
.board-grid.is-searching .board-cell-player,
.board-grid.is-searching .board-cell-empty,
.board-grid.is-searching .board-cell-round {
  opacity: 0.15;
  transition: opacity 0.2s var(--ease-standard);
}

.board-grid.is-searching .board-cell-player *,
.board-grid.is-searching .board-cell-empty *,
.board-grid.is-searching .board-cell-round * {
  opacity: 1 !important;
}

.board-grid.is-searching .board-highlight {
  opacity: 1;
}

.board-grid.is-searching .board-highlight .board-player-name {
  font-weight: 600;
}

/* Loading */
.board-loading {
  font-family: var(--font-condensed);
  font-size: 0.9rem;
  color: var(--color-mid);
  padding: var(--inset-sm) 0;
}

/* Mobile — horizontal scroll handles sizing, no need to shrink text */
@media (max-width: 1199px) {
  .board-table {
    padding: 0 var(--inset-xs);
    padding-bottom: var(--inset-md);
  }
}


/* ============================================
   STRATEGY PAGE
   ============================================ */

.page-strategy {
  background-image: radial-gradient(ellipse at center 25%, rgba(221,221,221,0.2) 0%, rgba(173,173,173,0.2) 21%, rgba(120,120,120,0.2) 48%, rgba(83,83,83,0.2) 71%, rgba(59,59,59,0.2) 89%, rgba(50,50,50,0.2) 100%);
  color: var(--color-light);
  overflow-x: hidden;
}

/* --- Strategy header: SVG background + grid overlay --- */

.strategy-header {
  padding: 0;
  position: relative;
  width: 100%;
  overflow: hidden;
}

.strategy-header-svg {
  display: block;
  width: 100%;
  height: auto;
}

/* Strategy SVG decorative element colors */
.strategy-header-svg .decor-primary { fill: var(--color-dim); }
.strategy-header-svg .decor-corner-left { fill: var(--color-primary); }
.strategy-header-svg .decor-corner-right { fill: var(--color-primary); }
.strategy-header-svg .decor-line { fill: none; stroke: var(--color-light); stroke-width: 1.5px; }
.strategy-header-svg .decor-band { fill: var(--color-dim); }

/* Content overlay — sits on top of SVG */
.strategy-header-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 12rem 3fr 1fr;
  align-items: center;
  pointer-events: none;
}

.strategy-header-info {
  pointer-events: auto;
  grid-column: 2;
  display: flex;
  flex-direction: column;
}

/* ============================================
   STRATEGY HEADER — entrance animation
   Opacity-only to avoid SVG transform conflicts
   ============================================ */

/* --- SVG: frame + bar first --- */
#strategy-frame {
  opacity: 0;
  animation: fadeIn 1.2s ease 0.1s both;
}

#strategy-bar {
  opacity: 0;
  animation: fadeIn 1.2s ease 0.1s both;
}

/* --- SVG: corners — left drops down, right slides in --- */
.page-strategy .decor-corner-left {
  opacity: 0;
  animation: slideFromLeft 0.8s ease 0.1s both;
}

.page-strategy .decor-corner-right {
  opacity: 0;
  animation: slideFromRight 0.8s ease 0.1s both;
}

/* --- SVG: lines + band --- */
.page-strategy .decor-line {
  opacity: 0;
  animation: slideFromLeft 1.2s ease 0.3s both;
}

.page-strategy .decor-band {
  opacity: 0;
  animation: fadeIn 1.2s ease 0.3s both;
}

/* --- SVG: playbook image --- */
#playbook-image {
  opacity: 0;
  animation: fadeIn 1.2s ease 0.4s both;
}

/* --- SVG: logo flash --- */
#strategy-logo {
  opacity: 0;
  animation: signalFlash 2.4s ease 0.5s both;
}

/* --- HTML: text stagger --- */
.strategy-title {
  color: var(--color-light);
  margin-bottom: var(--space-xs);
  opacity: 0;
  animation: fadeIn 1.2s ease 0.7s both;
}

.strategy-subtitle {
  opacity: 0;
  animation: fadeIn 1.2s ease 0.9s both;
}

.strategy-overview {
  color: var(--color-muted);
  max-width: 50ch;
  opacity: 0;
  animation: fadeIn 1.2s ease 1.1s both;
}

/* --- Strategy field: formation diagram --- */

.strategy-field {
  position: relative;
  overflow: visible;
  padding: 0 0 var(--inset-md) 0;
  opacity: 0;
  transition: opacity 0.8s var(--ease-standard) 0.25s;
}

.strategy-field.is-ready { opacity: 1; }

.strategy-field-bg {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0.65;
}

/* Formation tabs — above field */
.strategy-tabs {
  display: flex;
  justify-content: center;
  margin: var(--inset-md) auto var(--inset-xs);
  gap: var(--space-lg);
  padding: 0;
  opacity: 0;
  transition: opacity 0.8s var(--ease-standard);
}

.strategy-tabs.is-ready { opacity: 1; }

.strategy-tab-wrap {
  display: inline-block;
  transition: filter 0.2s var(--ease-standard), transform 0.2s var(--ease-standard);
}

.strategy-tab-wrap:hover {
  transform: translateY(-2px);
  filter:
    drop-shadow(0 7px 8px rgba(26,26,26,0.2))
    drop-shadow(0 12px 17px rgba(26,26,26,0.14))
    drop-shadow(0 5px 22px rgba(26,26,26,0.12));
}

.strategy-tab-wrap:has(.strategy-tab--active) {
  filter:
    drop-shadow(0 5px 5px rgba(26,26,26,0.2))
    drop-shadow(0 8px 10px rgba(26,26,26,0.14))
    drop-shadow(0 3px 14px rgba(26,26,26,0.12));
}

.strategy-tab {
  font-family: var(--font-body);
  font-size: clamp(0.75rem, 1vw, 0.875rem);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1em 2.5em;
  text-align: center;
  white-space: nowrap;
  border: none;
  background: var(--color-grey);
  color: var(--color-muted);
  cursor: pointer;
  clip-path: polygon(4.6% 0%, 95.4% 0%, 100% 50%, 95.4% 100%, 4.6% 100%, 0% 50%);
  transition: background 0.2s var(--ease-standard), color 0.2s var(--ease-standard);
}

.strategy-tab:hover {
  background: var(--color-dim);
  color: var(--color-muted);
}

.strategy-tab--active {
  background: var(--color-primary);
  color: var(--color-light);
}

/* Position circles */
.strategy-pos {
  position: absolute;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--color-light);
  border: 2px solid rgba(250, 250, 250, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: transform 0.2s var(--ease-standard), box-shadow 0.2s var(--ease-standard), left 0.4s var(--ease-standard), top 0.4s var(--ease-standard);
}

.strategy-pos:hover {
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 0 0 4px rgba(250, 250, 250, 0.3);
}

.strategy-pos-label {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--color-light);
  letter-spacing: 0.05em;
  pointer-events: none;
}

.strategy-pos-headshot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  pointer-events: none;
}

/* Player card — tooltip at circle position */
.strategy-card {
  position: absolute;
  width: clamp(18rem, 28vw, 24rem);
  background:
    radial-gradient(ellipse at center 25%, rgba(221,221,221,0.15) 0%, rgba(50,50,50,0.15) 100%),
    rgba(245, 245, 245, 0.925);
  border: none;
  border-radius: 6px;
  padding: var(--inset-xs);
  z-index: 10;
  box-shadow:
    0 5px 5px rgba(26,26,26,0.2),
    0 8px 10px rgba(26,26,26,0.14),
    0 3px 14px rgba(26,26,26,0.12);
}

.strategy-card--visible {
  animation: fadeIn 0.3s ease both;
}

.strategy-card-close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  background: none;
  border: none;
  color: var(--color-dim);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.strategy-card-close:hover {
  opacity: 1;
}

.strategy-card-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.strategy-card-avatar {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: rgba(66, 66, 66, 0.8);
  flex-shrink: 0;
  overflow: hidden;
}

.strategy-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.strategy-card-name {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 1.5vw, 1.3rem);
  font-weight: 400;
  color: var(--color-dark);
  text-transform: uppercase;
  letter-spacing: 0.025em;
  line-height: 1.2;
}

.strategy-card-detail {
  font-family: var(--font-body);
  font-size: clamp(0.6rem, 0.85vw, 0.7rem);
  color: var(--color-primary);
  text-transform: uppercase;
  line-height: 1.375em;
  letter-spacing: 0.025em;
  margin-top: var(--space-xs);
}

.strategy-card-eval {
  font-family: var(--font-body);
  font-size: clamp(0.7rem, 0.95vw, 0.8rem);
  color: var(--color-dim);
  line-height: 1.6;
}

/* --- Strategy responsive --- */

@media (max-width: 991px) {

  /* Hide desktop SVG */
  .strategy-header-svg {
    display: none;
  }

  .strategy-header {
    padding: clamp(var(--inset-sm), 4.5vw, var(--inset-lg));
  }

  .strategy-header-grid {
    position: relative;
    display: flex;
    flex-direction: column;
  }

  .strategy-header-info {
    display: contents;
  }

  .strategy-title {
    order: 1;
  }

  .strategy-subtitle {
    order: 2;
  }

  .strategy-overview {
    order: 3;
    max-width: none;
  }

  .strategy-header-sep {
    display: none;
  }

  /* Cards: top/bottom on mobile instead of left/right */
  .strategy-card {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
  }

  .strategy-card[data-side="left"] {
    top: auto !important;
    bottom: calc(50% + 6rem);
  }

  .strategy-card[data-side="right"] {
    top: calc(50% + 6rem) !important;
    bottom: auto;
  }
}

@media (max-width: 767px) {
  .strategy-tabs {
    flex-wrap: wrap;
    margin: var(--space-lg) 0;
    padding: 0 clamp(var(--inset-sm), 4.5vw, var(--inset-lg));
  }

  .strategy-tab {
    padding: 1em 2em;
  }
}
