.board-summary {
  display: grid;
  gap: 0;
}

.visually-hidden,
.unit-list.visually-hidden {
  display: block !important;
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.hero {
  --hero-splash: none;
  --hero-splash-x: 50%;
  --hero-splash-y: 50%;
  --hero-splash-scale: 1;
  position: relative;
  display: grid;
  gap: 18px;
  overflow: hidden;
  margin-bottom: 22px;
  padding: 28px;
  border: 1px solid #dfe6ef;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow, 0 18px 42px rgba(31, 49, 74, 0.09));
}

.hero.has-splash {
  min-height: 280px;
  align-content: stretch;
  padding: 30px;
  color: #ffffff;
  background: #07111f;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
}

.hero.has-splash::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: var(--hero-splash);
  background-position: var(--hero-splash-x) var(--hero-splash-y);
  background-size: cover;
  background-repeat: no-repeat;
  filter: saturate(1.08) contrast(1.04);
  transform: scale(var(--hero-splash-scale));
  transform-origin: var(--hero-splash-x) var(--hero-splash-y);
  pointer-events: none;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 30%),
    linear-gradient(90deg, rgba(3, 7, 18, 0.9) 0%, rgba(9, 17, 31, 0.76) 34%, rgba(9, 17, 31, 0.28) 56%, transparent 74%);
  pointer-events: none;
}

.hero.has-featured-board {
  grid-template-columns: minmax(260px, 0.9fr) minmax(360px, 1.1fr);
  gap: 24px;
  align-items: center;
  background:
    radial-gradient(circle at 76% 18%, rgba(245, 158, 11, 0.12), transparent 24%),
    linear-gradient(90deg, rgba(37, 99, 235, 0.08), transparent 34%),
    linear-gradient(110deg, #ffffff 0%, #ffffff 44%, #eff6ff 44%);
}

.hero-copy-panel {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: space-between;
  min-width: 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin: 0 0 12px;
  color: #7b8ca5;
  font-size: 0.78rem;
  font-weight: 800;
}

.hero.has-splash .breadcrumb,
.hero.has-splash .breadcrumb-current {
  color: rgba(255, 255, 255, 0.68);
}

.breadcrumb a {
  color: #2563eb;
  text-decoration: none;
}

.hero.has-splash .breadcrumb a {
  color: #bfdbfe;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb-separator {
  color: #a8b3c4;
}

.hero.has-splash .breadcrumb-separator {
  color: rgba(255, 255, 255, 0.38);
}

.breadcrumb-current {
  color: #526178;
}

.hero-type-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: #1d4ed8;
  font-size: 0.82rem;
  font-weight: 900;
}

.hero.has-splash .hero-type-label {
  justify-self: start;
  width: max-content;
  max-width: 100%;
  padding: 8px 16px;
  border: 1px solid rgba(255, 183, 77, 0.44);
  border-radius: 999px;
  background: rgba(8, 16, 29, 0.42);
  color: #ffe4b8;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(4px);
}

.hero-type-label::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #f59e0b;
  box-shadow: 0 0 0 5px rgba(245, 158, 11, 0.14);
}

.hero h1 {
  margin: 0 0 10px;
  color: #182438;
  font-size: clamp(2.1rem, 5vw, 3.9rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero.has-splash h1 {
  align-self: center;
  max-width: 720px;
  color: #ffffff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.28);
}

.hero .lead {
  max-width: 760px;
  margin: 0;
  color: var(--muted, #5b687c);
  line-height: 1.8;
}

.hero.has-splash .lead {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.82);
}

.hero-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
}

.hero-tag-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: rgba(239, 246, 255, 0.82);
  color: #1d4ed8;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.2;
}

.hero.has-splash .hero-tag-pill {
  border-color: rgba(219, 234, 254, 0.48);
  background: rgba(255, 255, 255, 0.86);
  color: #526178;
}

.hero-action-row {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin: 14px 0 0;
}

.hero.has-splash .hero-action-row {
  justify-content: flex-start;
}

.hero.has-featured-board .hero-action-row {
  transform: translateX(clamp(28px, 4vw, 72px));
}

.share-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 13px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: #1d4ed8;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.09);
  transform: translateY(0);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.share-button-x {
  border-color: #111827;
  background: #111827;
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(17, 24, 39, 0.2);
}

.share-button-inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  line-height: 1;
}

.share-button-icon {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.share-button-icon svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.share-button:hover {
  transform: translateY(-1px);
  border-color: #bfdbfe;
  background: #ffffff;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.13);
}

.share-button-x:hover {
  border-color: #020617;
  background: #020617;
  box-shadow: 0 16px 30px rgba(17, 24, 39, 0.26);
}

.share-button:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.2);
  outline-offset: 2px;
}

.hero-featured-board {
  display: grid;
  justify-items: center;
  min-width: 0;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--soft-line, #e8eef6);
}

.hero.has-featured-board .hero-featured-board {
  margin-top: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.hero-featured-board .board-summary {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.hero-featured-board .article-board {
  margin-top: 0;
}

.hero-featured-board .board-grid {
  --board-hex-size: clamp(36px, 4.4vw, 58px);
  --board-hex-gap: clamp(3px, 0.55vw, 6px);
  --board-padding: clamp(5px, 0.9vw, 8px);
}

.article-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-content: center;
  justify-items: center;
  align-items: center;
  gap: 0;
  margin-top: 8px;
  width: 100%;
  max-width: 100%;
  overflow: visible;
}

.article-board.has-traits {
  grid-template-columns: minmax(0, 1fr);
  justify-content: center;
  justify-items: center;
}

.board-grid {
  --board-hex-size: clamp(42px, 10vw, 72px);
  --board-hex-gap: clamp(4px, 0.9vw, 7px);
  --board-padding: clamp(6px, 1.4vw, 10px);
  --board-row-step: calc(var(--board-hex-size) * 0.72 + var(--board-hex-gap));
  --board-odd-offset: calc((var(--board-hex-size) + var(--board-hex-gap)) * 0.5);
  width: calc(var(--board-hex-size) * 7 + var(--board-hex-gap) * 6 + var(--board-odd-offset) + var(--board-padding) * 2 + 2px);
  max-width: 100%;
  padding: 0;
  border: 1px solid var(--line, #dbe5f1);
  border-radius: 10px;
  margin-inline: auto;
  background: #f8fafc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.board-cells {
  position: relative;
  width: 100%;
  height: calc(var(--board-hex-size) + var(--board-row-step) * 3 + var(--board-padding) * 2 + 28px);
}

.board-cell {
  position: absolute;
  left: calc(
    var(--board-padding) +
    var(--board-col) * (var(--board-hex-size) + var(--board-hex-gap)) +
    var(--board-row-parity) * var(--board-odd-offset)
  );
  top: calc(var(--board-padding) + var(--board-row) * var(--board-row-step));
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: var(--board-hex-size);
  height: var(--board-hex-size);
  padding: 3px;
  z-index: 1;
  background: transparent;
  filter: drop-shadow(0 1px 2px rgba(74, 49, 20, 0.08));
}

.board-cell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #e5e7eb;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.board-cell.is-filled {
  --board-cost-color: #9ca3af;
  padding: 4px;
  z-index: 2;
  filter: drop-shadow(0 5px 10px color-mix(in srgb, var(--board-cost-color) 26%, transparent));
}

.board-cell.has-items {
  z-index: 5;
}

.board-cell.has-proxy {
  filter: drop-shadow(0 6px 12px rgba(37, 99, 235, 0.2));
}

.board-cell.has-proxy::before {
  box-shadow: inset 0 0 0 3px rgba(37, 99, 235, 0.28);
}

.board-cell.is-filled::before {
  background: linear-gradient(180deg, color-mix(in srgb, var(--board-cost-color) 82%, #f8fafc), color-mix(in srgb, var(--board-cost-color) 92%, #111827));
}

.board-cell.is-filled.cost-1 {
  --board-cost-color: #9ca3af;
}

.board-cell.is-filled.cost-2 {
  --board-cost-color: #22c55e;
}

.board-cell.is-filled.cost-3 {
  --board-cost-color: #3b82f6;
}

.board-cell.is-filled.cost-4 {
  --board-cost-color: #a855f7;
}

.board-cell.is-filled.cost-5 {
  --board-cost-color: #f59e0b;
}

.board-cell .board-champion-img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.82);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.board-cell .board-champion-img.champion-cost-frame {
  border: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.64);
}

.board-unit-items {
  position: absolute;
  left: 50%;
  bottom: calc(var(--board-hex-size) * -0.08);
  z-index: 6;
  display: flex;
  justify-content: center;
  gap: 2px;
  transform: translateX(-50%);
  pointer-events: auto;
}

.board-unit-item {
  width: clamp(14px, calc(var(--board-hex-size) * 0.28), 20px);
  height: clamp(14px, calc(var(--board-hex-size) * 0.28), 20px);
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 4px;
  background: #10233d;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.22);
  object-fit: cover;
}

.board-proxy-badge {
  position: absolute;
  top: calc(var(--board-hex-size) * -0.24);
  left: 50%;
  z-index: 5;
  display: grid;
  place-items: center;
  width: clamp(30px, calc(var(--board-hex-size) * 0.54), 44px);
  height: clamp(30px, calc(var(--board-hex-size) * 0.54), 44px);
  padding: 1px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 0 1.5px rgba(37, 99, 235, 0.76), 0 4px 10px rgba(15, 23, 42, 0.18);
  transform: translateX(-50%);
  cursor: help;
}

.board-proxy-badge img {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  object-fit: cover;
}

.board-trait-chip.style-1 {
  --trait-tier-color: #b77845;
}

.board-trait-chip.style-2 {
  --trait-tier-color: #94a3b8;
}

.board-trait-chip.style-3 {
  --trait-tier-color: #d99a18;
}

.board-trait-chip.style-4 {
  --trait-tier-color: #64748b;
}

.board-trait-chip.style-5 {
  --trait-tier-color: #a855f7;
}

.board-trait-chip.style-6 {
  --trait-tier-color: #38bdf8;
}

.board-trait-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  width: auto;
  max-width: none;
  padding: 0 var(--board-padding) var(--board-padding);
}

.board-trait-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  width: 100%;
}

.board-trait-chip {
  --trait-tier-color: #94a3b8;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 26px;
  padding: 2px 5px 2px 2px;
  border: 1px solid color-mix(in srgb, var(--trait-tier-color) 25%, transparent);
  border-radius: 999px;
  color: var(--text, var(--ink, #172033));
  background: color-mix(in srgb, var(--trait-tier-color) 8%, #ffffff);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
  cursor: help;
}

.board-trait-chip img {
  width: 20px;
  height: 20px;
  padding: 2px;
  border-radius: 999px;
  object-fit: contain;
  background: #17243a;
}

.board-trait-chip b {
  color: color-mix(in srgb, var(--trait-tier-color) 76%, #17202c);
  font-size: 0.78rem;
  min-width: 10px;
  text-align: center;
}

.board-trait-chip.is-inactive {
  border-color: var(--soft-line, #e5e7eb);
  background: #fff;
  opacity: 0.5;
  filter: grayscale(0.65);
}

.board-trait-chip.is-inactive b {
  color: var(--muted, #5b687c);
}

@media (max-width: 860px) {
  .hero.has-featured-board {
    grid-template-columns: 1fr;
  }

  .hero-action-row {
    justify-content: flex-start;
    transform: none;
  }
}

@media (max-width: 720px) {
  .hero {
    padding: 20px;
    border-radius: 22px;
  }

  .hero-action-row {
    margin-top: 12px;
  }

  .hero.has-featured-board .hero-featured-board {
    padding: 0;
    border-radius: 0;
  }

  .hero-featured-board .board-grid {
    --board-hex-size: clamp(34px, 9.2vw, 44px);
    --board-hex-gap: 3px;
    --board-padding: 4px;
  }

  .board-grid,
  .article-board.has-traits .board-grid {
    --board-hex-size: clamp(34px, 9.4vw, 42px);
    --board-hex-gap: 3px;
    --board-padding: 4px;
  }

  .board-proxy-badge {
    top: calc(var(--board-hex-size) * -0.2);
    width: clamp(20px, calc(var(--board-hex-size) * 0.48), 24px);
    height: clamp(20px, calc(var(--board-hex-size) * 0.48), 24px);
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.76), 0 3px 7px rgba(15, 23, 42, 0.16);
  }

  .board-trait-summary {
    gap: 4px;
    padding: 0 var(--board-padding) var(--board-padding);
  }

  .board-trait-list {
    gap: 4px;
  }

  .board-trait-chip {
    min-height: 22px;
    padding: 2px 4px 2px 2px;
  }

  .board-trait-chip img {
    width: 17px;
    height: 17px;
  }
}
