/* FlameWire — sports news desk (ESPN / B/R energy, Flames colors) */

:root,
[data-theme="light"] {
  --flame-red: #c8102e;
  --flame-red-dark: #9a0c22;
  --flame-gold: #f1be48;
  --ink: #0b0b0c;
  --ink-2: #1a1a1d;
  --ink-3: #2a2a2e;
  --paper: #f7f5f2;
  --paper-2: #ffffff;
  --muted: #6b6b70;
  --line: rgba(0, 0, 0, 0.08);
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  --header-bg: linear-gradient(180deg, #12090b 0%, #1a0a0e 100%);
  --card-text: #3a3a40;
  --table-stripe: rgba(200, 16, 46, 0.04);
  /* Chrome (topbar / main nav / footer) — always dark, never tied to --ink */
  --chrome-bg: #0b0b0c;
  --chrome-bg-2: #12090b;
  --chrome-text: #ffffff;
  --chrome-muted: rgba(255, 255, 255, 0.78);
  --chrome-faint: rgba(255, 255, 255, 0.5);
  --chrome-line: rgba(255, 255, 255, 0.12);
  --radius: 14px;
  --max: 1180px;
  --font-display: "Archivo Black", "Impact", system-ui, sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
}

[data-theme="dark"] {
  --ink: #f2eee8;
  --ink-2: #1c1416;
  --ink-3: #2a1c20;
  --paper: #0e0a0b;
  --paper-2: #171012;
  --muted: #a89a9d;
  --line: rgba(255, 255, 255, 0.1);
  --shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  --header-bg: linear-gradient(180deg, #0a0607 0%, #14090c 100%);
  --card-text: #cfc4c6;
  --table-stripe: rgba(241, 190, 72, 0.06);
  --flame-red: #e11d3a;
  --flame-red-dark: #c8102e;
  /* Keep chrome dark in dark mode (do not reuse light --ink) */
  --chrome-bg: #050405;
  --chrome-bg-2: #0c0708;
  --chrome-text: #ffffff;
  --chrome-muted: rgba(255, 255, 255, 0.82);
  --chrome-faint: rgba(255, 255, 255, 0.55);
  --chrome-line: rgba(255, 255, 255, 0.14);
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
}

/* ── Top bar ─────────────────────────────────────────── */
.topbar {
  background: var(--chrome-bg);
  color: var(--chrome-text);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.45rem 0;
  flex-wrap: wrap;
  color: var(--chrome-text);
}

.topbar a {
  color: var(--flame-gold);
  font-weight: 600;
}

.ticker {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  overflow: hidden;
  white-space: nowrap;
}

.ticker-label {
  background: var(--flame-red);
  color: #fff;
  font-weight: 800;
  font-size: 0.65rem;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  flex-shrink: 0;
}

/* ── Header / nav ────────────────────────────────────── */
.site-header {
  background: var(--header-bg);
  color: var(--chrome-text);
  border-bottom: 3px solid var(--flame-red);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
}

.site-header a,
.site-header .brand-name,
.site-header .brand-tag,
.site-header .nav a {
  color: var(--chrome-text);
}

.site-header .brand-tag {
  color: var(--chrome-faint);
}

.site-header .nav a {
  color: var(--chrome-muted);
}

.site-header .nav a:hover,
.site-header .nav a.active {
  color: #fff;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.85rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-mark {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
  box-shadow: 0 0 0 2px rgba(241, 190, 72, 0.4);
  background: transparent;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.footer-brand img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: contain;
  box-shadow: 0 0 0 2px rgba(241, 190, 72, 0.35);
}

.footer-brand h4 {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.15em;
}

/* ── Source suggest form ────────────────────────────── */
.flash {
  border-radius: 12px;
  padding: 0.85rem 1.1rem;
  margin: 0 0 1.25rem;
  font-weight: 700;
  font-size: 0.95rem;
}

.flash-ok {
  background: rgba(29, 185, 84, 0.12);
  color: #0f8a3c;
  border: 1px solid rgba(29, 185, 84, 0.25);
}

.flash-bad {
  background: rgba(200, 16, 46, 0.1);
  color: var(--flame-red);
  border: 1px solid rgba(200, 16, 46, 0.25);
}

[data-theme="dark"] .flash-ok {
  color: #5ddea0;
}

.suggest-panel {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 1.25rem;
  align-items: start;
  margin: 0 0 2rem;
  padding: 1.35rem 1.4rem;
  border-radius: 16px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

@media (max-width: 900px) {
  .suggest-panel {
    grid-template-columns: 1fr;
  }
}

.suggest-panel-copy h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.suggest-panel-copy p {
  margin: 0;
  color: var(--card-text);
  font-size: 0.95rem;
  line-height: 1.5;
}

.suggest-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 0.85rem;
}

.suggest-grid .full {
  grid-column: 1 / -1;
}

@media (max-width: 600px) {
  .suggest-grid {
    grid-template-columns: 1fr;
  }
}

.suggest-form .field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.suggest-form .field em {
  color: var(--flame-red);
  font-style: normal;
}

.suggest-form .field small {
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  opacity: 0.85;
}

.suggest-form input,
.suggest-form select,
.suggest-form textarea {
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
}

.suggest-form input:focus,
.suggest-form select:focus,
.suggest-form textarea:focus {
  outline: none;
  border-color: var(--flame-red);
  box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.12);
}

.suggest-form textarea {
  resize: vertical;
  min-height: 4.5rem;
}

.suggest-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-top: 0.9rem;
}

/* honeypot */
.suggest-form .hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.submit-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
}

/* Admin login */
.admin-login-wrap {
  display: grid;
  place-items: center;
  min-height: 50vh;
  padding: 1rem 0 2rem;
}

.admin-login-card {
  width: min(400px, 100%);
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.75rem 1.5rem;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.08);
}

.admin-login-logo {
  border-radius: 50%;
  display: block;
  margin: 0 auto 0.85rem;
  box-shadow: 0 0 0 2px rgba(241, 190, 72, 0.35);
}

.admin-login-card h1 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  text-align: center;
  text-transform: uppercase;
  font-size: 1.35rem;
}

.admin-login-card > .muted {
  text-align: center;
  margin: 0 0 1.25rem;
}

.admin-login-form .field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.85rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.admin-login-form input {
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
}

.admin-login-form input:focus {
  outline: none;
  border-color: var(--flame-red);
  box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.12);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.18em;
  overflow: visible; /* ECG trail can spill past Wire */
}

/* “Wire” — live news-wire mark with ECG heartbeat sweep */
.brand-wire {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1;
  padding: 0.14em 0.42em 0.16em 0.5em;
  margin-left: 0.06em;
  /* room so the ECG trail can paint into chrome without clipping siblings tightly */
  margin-right: 0.15em;
  background: linear-gradient(
    105deg,
    var(--flame-red-dark) 0%,
    var(--flame-red) 42%,
    #e02038 72%,
    var(--flame-red-dark) 100%
  );
  border-radius: 3px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.2),
    0 2px 8px rgba(200, 16, 46, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  /* slight broadcast skew */
  transform: skewX(-8deg);
  /* allow ECG to trail past the red pill into header black */
  overflow: visible;
  vertical-align: middle;
  z-index: 2;
}

.brand-wire-text {
  display: inline-block;
  transform: skewX(8deg); /* un-skew the letters so they stay readable */
  position: relative;
  z-index: 2;
  padding-left: 0.55em; /* room for the live dot */
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}

/* LIVE pulse dot — “on the wire” */
.brand-wire::before {
  content: "";
  position: absolute;
  left: 0.28em;
  top: 50%;
  width: 0.32em;
  height: 0.32em;
  margin-top: -0.16em;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
  animation: wire-live-pulse 1.6s ease-out infinite;
  z-index: 3;
  transform: skewX(8deg); /* keep the dot round against parent skew */
}

/*
  Heartbeat / ECG — sweeps through “Wire” and trails into the dark chrome.
  Layer extends past the pill so the flatline/spikes show on black too.
*/
.brand-wire::after {
  content: "";
  position: absolute;
  /* spill left toward “Flame” and right into header black */
  left: -1.6em;
  right: -2.6em;
  top: 6%;
  width: auto;
  height: 88%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.78;
  /* un-skew the ECG so the spikes read as a proper monitor trace */
  transform: skewX(8deg);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 32' preserveAspectRatio='none'><path d='M0 16 H18 L22 16 L26 5 L30 27 L34 9 L38 16 H56 L60 16 L63 8 L67 24 L71 16 H100 L104 16 L108 4 L112 28 L116 8 L120 16 H160' fill='none' stroke='%23ffffff' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'/><path d='M0 16 H18 L22 16 L26 5 L30 27 L34 9 L38 16 H56 L60 16 L63 8 L67 24 L71 16 H100 L104 16 L108 4 L112 28 L116 8 L120 16 H160' fill='none' stroke='%23ffffff' stroke-width='4.5' stroke-linecap='round' stroke-linejoin='round' opacity='0.22'/></svg>");
  background-repeat: no-repeat;
  /* longer visible segment so trail reads outside the pill */
  background-size: 48% 100%;
  background-position: 0% 50%;
  /* soft edges — still bright across the spill zones */
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent 0%,
    #000 10%,
    #000 78%,
    transparent 100%
  );
  mask-image: linear-gradient(
    90deg,
    transparent 0%,
    #000 10%,
    #000 78%,
    transparent 100%
  );
  animation: wire-ecg-sweep 2.5s linear infinite;
  mix-blend-mode: normal;
  filter:
    drop-shadow(0 0 1.5px rgba(255, 255, 255, 0.85))
    drop-shadow(0 0 4px rgba(255, 255, 255, 0.45));
}

/* Gold underline tick — news wire flash */
.brand-name .brand-wire {
  border-bottom: 2px solid var(--flame-gold);
}

@keyframes wire-live-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.75);
    opacity: 1;
  }
  70% {
    box-shadow: 0 0 0 0.45em rgba(255, 255, 255, 0);
    opacity: 0.85;
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    opacity: 1;
  }
}

/* Trace travels left → right; ends past the pill into chrome */
@keyframes wire-ecg-sweep {
  0% {
    background-position: -20% 50%;
    opacity: 0.4;
  }
  18% {
    opacity: 0.82;
  }
  70% {
    opacity: 0.78;
  }
  100% {
    /* push well past the right edge into header black */
    background-position: 115% 50%;
    opacity: 0.35;
  }
}

@media (prefers-reduced-motion: reduce) {
  .brand-wire::before,
  .brand-wire::after {
    animation: none;
  }

  .brand-wire::after {
    background-position: 50% 50%;
    opacity: 0.65;
    -webkit-mask-image: none;
    mask-image: none;
  }
}

.brand-tag {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 500;
}

.nav {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.nav a {
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.82);
  transition: 0.15s ease;
}

.nav a:hover,
.nav a.active {
  background: var(--flame-red);
  color: #fff;
}

.header-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.btn {
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.55rem 1rem;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: 0.15s ease;
}

.btn-primary,
a.btn-primary {
  background: var(--flame-red);
  color: #fff;
}

.btn-primary:hover,
a.btn-primary:hover {
  background: var(--flame-red-dark);
  color: #fff;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.16);
}

/* ── Hero layout ─────────────────────────────────────── */
.main {
  padding: 1.5rem 0 4rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .nav {
    display: none;
  }
  .mobile-nav {
    display: flex !important;
  }
}

.mobile-nav {
  display: none;
  gap: 0.35rem;
  overflow-x: auto;
  padding: 0 0 1rem;
  -webkit-overflow-scrolling: touch;
}

.mobile-nav a {
  flex: 0 0 auto;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.mobile-nav a.active {
  background: var(--flame-red);
  color: #fff;
  border-color: var(--flame-red);
}

/* UI version switcher badge (v1 + v2) */
.v2-ui-badge {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(12, 7, 9, 0.88);
  border: 1px solid rgba(241, 190, 72, 0.35);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.v2-ui-badge a {
  color: var(--flame-gold);
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 700;
}

.v2-ui-badge a:hover {
  text-decoration: underline;
}

/* Cards */
.card {
  background: var(--paper-2);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.card-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #2a0a10, #0b0b0c 60%);
  overflow: hidden;
}

.card-media > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Admin feed health */
.health-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1rem;
}

.health-pill {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
}

.health-pill.health-ok {
  color: #0d6b3a;
  background: rgba(34, 160, 90, 0.12);
  border-color: rgba(34, 160, 90, 0.35);
}

.health-pill.health-bad {
  color: #9b1c1c;
  background: rgba(200, 16, 46, 0.1);
  border-color: rgba(200, 16, 46, 0.35);
}

.health-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
}

.health-badge-ok {
  color: #0d6b3a;
  background: rgba(34, 160, 90, 0.14);
}

.health-badge-warn {
  color: #8a5a00;
  background: rgba(241, 190, 72, 0.22);
}

.health-badge-error {
  color: #9b1c1c;
  background: rgba(200, 16, 46, 0.12);
}

.health-row-error {
  background: rgba(200, 16, 46, 0.04);
}

.health-row-warn {
  background: rgba(241, 190, 72, 0.06);
}

[data-theme="dark"] .health-pill.health-ok {
  color: #7ddea8;
}

[data-theme="dark"] .health-pill.health-bad,
[data-theme="dark"] .health-badge-error {
  color: #ff8a9a;
}

[data-theme="dark"] .health-badge-ok {
  color: #7ddea8;
}

[data-theme="dark"] .health-badge-warn {
  color: #f1be48;
}

/* Sources directory */
.sources-section-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  text-transform: uppercase;
  margin: 1.5rem 0 0.25rem;
  letter-spacing: 0.03em;
}

.sources-section-title:first-of-type {
  margin-top: 1.25rem;
}

.sources-section-note {
  margin: 0 0 0.55rem;
  font-size: 0.8rem;
  line-height: 1.35;
  max-width: 40rem;
}

.sources-section-note a {
  font-weight: 700;
  color: var(--flame-red);
}

.source-card-url {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Web Wire: publisher site logos */
.card-media-logo {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 40%, rgba(241, 190, 72, 0.12), transparent 50%),
    linear-gradient(145deg, #1c1014 0%, #0d0a0b 100%);
}

.card-media-logo > img.publisher-logo-img {
  width: min(42%, 96px);
  height: min(42%, 96px);
  object-fit: contain;
  border-radius: 16px;
  background: #fff;
  padding: 0.55rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.meta .source-favicon {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  object-fit: contain;
  flex-shrink: 0;
  background: #fff;
}

.card-web-wire .meta {
  align-items: center;
  gap: 0.4rem;
}

.card-media .placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 25%, rgba(241, 190, 72, 0.2), transparent 45%),
    linear-gradient(145deg, #1a0a0e 0%, #0b0b0c 55%, #12090b 100%);
}

.card-media .placeholder-logo {
  width: min(42%, 120px);
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(241, 190, 72, 0.35), 0 12px 28px rgba(0, 0, 0, 0.45);
}

.badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: var(--flame-red);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.28rem 0.55rem;
  border-radius: 4px;
}

.badge.video {
  background: #111;
}

.badge.podcast {
  background: #1db954;
}

.badge.analysis {
  background: var(--flame-gold);
  color: #111;
}

.badge.web-wire {
  background: linear-gradient(90deg, #8b0000, #c8102e);
  color: #fff;
}

.badge.calgarypuck {
  background: #1a1a1a;
  color: var(--flame-gold);
  border: 1px solid rgba(241, 190, 72, 0.45);
}

.section-foot {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  font-weight: 700;
}

.section-foot a {
  color: var(--flame-red);
}

/* ── Forum-style list (CalgaryPuck) ───────────────────── */
.forum-board {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--paper-2);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.forum-board-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(180deg, #1a0c10 0%, #12090b 100%);
  border-bottom: 2px solid var(--flame-red);
}

.forum-board-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: #fff;
  min-width: 0;
}

.forum-board-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.forum-board-brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.forum-board-site {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.forum-board-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #fff;
  line-height: 1.15;
}

.forum-board-open {
  flex-shrink: 0;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--flame-gold);
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(241, 190, 72, 0.35);
  background: rgba(241, 190, 72, 0.08);
}

.forum-board-open:hover {
  background: rgba(241, 190, 72, 0.18);
  color: #fff;
}

.forum-board-banner-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.forum-live-dot {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: rgba(200, 16, 46, 0.95);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.forum-live-dot-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
  animation: cp-pulse 1.4s ease-out infinite;
}

@keyframes cp-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.65);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(255, 255, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  }
}

.forum-thread-title-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.forum-new-pill {
  flex-shrink: 0;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(105deg, var(--flame-red), #e85d04);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  box-shadow: 0 0 12px rgba(200, 16, 46, 0.45);
}

.forum-list-row.is-new {
  background: linear-gradient(
    90deg,
    rgba(200, 16, 46, 0.12) 0%,
    rgba(241, 190, 72, 0.08) 40%,
    transparent 100%
  );
  box-shadow: inset 3px 0 0 var(--flame-red);
}

.forum-list-row.is-new .forum-thread-title {
  color: var(--flame-red);
}

.forum-list-row.is-new .forum-thread-icon {
  box-shadow: 0 0 0 2px rgba(200, 16, 46, 0.55);
  animation: cp-icon-glow 1.8s ease-in-out infinite;
}

@keyframes cp-icon-glow {
  0%,
  100% {
    box-shadow: 0 0 0 2px rgba(200, 16, 46, 0.45);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(241, 190, 72, 0.55);
  }
}

/* CalgaryPuck pill — soft live glow when the board has updates (no red dot) */
.v2-pill-calgarypuck {
  position: relative;
}

.v2-pill-calgarypuck.has-new {
  border: 1px solid rgba(241, 190, 72, 0.65);
  animation: cp-pill-glow 1.7s ease-in-out infinite;
}

@keyframes cp-pill-glow {
  0%,
  100% {
    box-shadow:
      0 0 0 1px rgba(241, 190, 72, 0.35),
      0 0 10px 2px rgba(200, 16, 46, 0.42);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(241, 190, 72, 0.7),
      0 0 16px 3px rgba(200, 16, 46, 0.62);
  }
}

@media (prefers-reduced-motion: reduce) {
  .v2-pill-calgarypuck.has-new {
    animation: none;
    box-shadow:
      0 0 0 1px rgba(241, 190, 72, 0.55),
      0 0 12px 2px rgba(200, 16, 46, 0.48);
  }
}

.cp-toast {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 90;
  max-width: min(22.5rem, calc(100vw - 2rem));
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

.cp-toast.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.cp-toast-card {
  position: relative;
  border-radius: 14px;
  background: linear-gradient(135deg, #1a0c10 0%, #12090b 60%, #1c1014 100%);
  border: 1px solid rgba(241, 190, 72, 0.4);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(200, 16, 46, 0.25);
  overflow: hidden;
}

.cp-toast-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 2rem 0.55rem 0.9rem;
  color: #fff;
  text-decoration: none;
}

.cp-toast-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.cp-toast-copy {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  flex: 1;
}

.cp-toast-kicker {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--flame-gold);
}

.cp-toast-title {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cp-toast-go {
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 800;
  color: #ff8a9a;
}

.cp-toast-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0 0.65rem 0.55rem 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 0;
  padding-top: 0.4rem;
}

.cp-toast-mute {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.2rem 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cp-toast-mute:hover {
  color: #fff;
}

.cp-toast-close {
  position: absolute;
  top: 0.3rem;
  right: 0.35rem;
  width: 1.5rem;
  height: 1.5rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}

.cp-toast-close:hover {
  color: #fff;
}

.footer-notify-toggle {
  display: inline;
  border: 0;
  background: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-size: inherit;
  color: var(--flame-gold);
  cursor: pointer;
  font-weight: 700;
}

.footer-notify-toggle:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-notify-toggle.is-off {
  color: var(--chrome-faint);
  font-weight: 600;
}

/* ── Flames on X — categorized desk + per-section preview ─ */
.x-desk {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.x-cat-section {
  margin-bottom: 0.85rem;
  padding-bottom: 0.35rem;
}

.x-cat-blurb {
  margin: -0.25rem 0 0.55rem;
  font-size: 0.9rem;
  line-height: 1.4;
  max-width: 40rem;
}

/* Preview panel sits under that section’s chips only */
.x-cat-section > .x-feed-stage {
  margin-top: 0.55rem;
  margin-bottom: 0.35rem;
}

.x-cat-section > .x-feed-stage[hidden] {
  display: none !important;
}

.x-cat-section > .x-feed-stage.is-open {
  animation: x-stage-in 0.22s ease both;
}

@keyframes x-stage-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.x-feed-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.x-feed-toolbar-close {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}

.x-feed-toolbar-close:hover {
  color: inherit;
  border-color: rgba(200, 16, 46, 0.35);
  background: rgba(200, 16, 46, 0.06);
}

/* Responsive account grid — no sideways scrolling */
.x-voice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.5rem;
  padding: 0.1rem 0 0.65rem;
}

.x-voice-card,
.x-voice-chip {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  min-width: 0;
  padding: 0.6rem 0.7rem 0.6rem 0.55rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease,
    background 0.15s ease;
}

.x-voice-card:hover,
.x-voice-chip:hover {
  border-color: rgba(200, 16, 46, 0.35);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.x-voice-card:focus-visible,
.x-voice-chip:focus-visible {
  outline: 2px solid var(--flame-red);
  outline-offset: 2px;
}

.x-voice-card.is-active,
.x-voice-chip.is-active {
  border-color: var(--flame-red);
  background:
    linear-gradient(135deg, rgba(200, 16, 46, 0.12), rgba(241, 190, 72, 0.08)),
    var(--paper-2);
  box-shadow:
    0 0 0 1px rgba(200, 16, 46, 0.18),
    0 10px 28px rgba(200, 16, 46, 0.12);
}

.x-voice-avatar {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: #fff;
  background:
    radial-gradient(circle at 30% 25%, rgba(241, 190, 72, 0.55), transparent 45%),
    linear-gradient(145deg, var(--flame-red), #5a0a18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.x-voice-card.is-active .x-voice-avatar,
.x-voice-chip.is-active .x-voice-avatar {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.18),
    0 0 0 2px rgba(241, 190, 72, 0.35);
}

.x-voice-meta {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  min-width: 0;
  flex: 1;
}

.x-voice-meta strong {
  font-size: 0.9rem;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.x-voice-meta .muted {
  font-size: 0.74rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.x-voice-action {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.22rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(127, 127, 127, 0.06);
}

.x-voice-card.is-active .x-voice-action,
.x-voice-chip.is-active .x-voice-action {
  color: var(--flame-red);
  border-color: rgba(200, 16, 46, 0.25);
  background: rgba(200, 16, 46, 0.1);
}

.x-feed-stage {
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(ellipse 80% 60% at 10% 0%, rgba(200, 16, 46, 0.1), transparent 55%),
    radial-gradient(ellipse 70% 50% at 100% 100%, rgba(241, 190, 72, 0.06), transparent 50%),
    var(--paper-2);
  overflow: hidden;
  min-height: 0;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
}

.x-feed-shell {
  display: block;
}

.x-feed-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper-2) 88%, #000 12%);
  backdrop-filter: blur(8px);
}

.x-feed-toolbar-who {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.x-feed-toolbar-who strong {
  display: block;
  font-size: 0.95rem;
  line-height: 1.15;
}

.x-feed-toolbar-who .muted {
  font-size: 0.78rem;
}

.x-feed-toolbar-avatar {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(145deg, var(--flame-red), #5a0a18);
}

.x-feed-toolbar-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.x-feed-toolbar-open {
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--flame-red);
  text-decoration: none;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(200, 16, 46, 0.22);
  background: rgba(200, 16, 46, 0.06);
}

.x-feed-toolbar-open:hover {
  background: rgba(200, 16, 46, 0.12);
  text-decoration: none;
}

.x-timeline-host {
  min-height: 200px;
  width: 100%;
  overflow: hidden;
}

.x-timeline-placeholder {
  min-height: 200px;
  display: grid;
  place-items: center;
  padding: 1.75rem 1.25rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.x-timeline-placeholder a {
  color: var(--flame-red);
}

/* Skeleton */
.x-skel-feed {
  padding: 0.5rem 0;
}

.x-skel-post {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 0.75rem;
  padding: 0.95rem 1rem;
  animation: x-skel-in 0.35s ease both;
  animation-delay: var(--d, 0s);
}

.x-skel {
  background: linear-gradient(
    90deg,
    rgba(127, 127, 127, 0.08),
    rgba(127, 127, 127, 0.16),
    rgba(127, 127, 127, 0.08)
  );
  background-size: 200% 100%;
  animation: x-shimmer 1.2s linear infinite;
  border-radius: 8px;
}

.x-skel.circle {
  width: 44px;
  height: 44px;
  border-radius: 999px;
}

.x-skel-lines {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding-top: 0.15rem;
}

.x-skel.line {
  height: 0.7rem;
}

.x-skel.w40 { width: 40%; }
.x-skel.w70 { width: 70%; }
.x-skel.w90 { width: 90%; }

@keyframes x-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

@keyframes x-skel-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@keyframes x-post-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* Post cards */
.x-post-feed {
  display: flex;
  flex-direction: column;
  max-height: min(68vh, 620px);
  overflow: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
}

.x-post {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 0.75rem;
  padding: 1rem 1.05rem;
  border-bottom: 1px solid var(--line);
  color: inherit;
  animation: x-post-in 0.32s ease both;
  animation-delay: calc(var(--i, 0) * 0.04s);
  transition: background 0.12s ease;
}

.x-post:hover {
  background: rgba(200, 16, 46, 0.035);
}

.x-post:last-of-type {
  border-bottom: 0;
}

.x-post-avatar {
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  overflow: hidden;
  background: linear-gradient(145deg, var(--flame-red), #5a0a18);
  flex-shrink: 0;
  box-shadow: 0 0 0 1px var(--line);
}

.x-post-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.x-post-avatar-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #fff;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

.x-post-body {
  min-width: 0;
}

.x-post-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.15rem 0.35rem;
  margin-bottom: 0.28rem;
}

.x-post-author {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: baseline;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}

.x-post-author:hover strong {
  text-decoration: underline;
  text-decoration-color: rgba(200, 16, 46, 0.45);
}

.x-post-author strong {
  font-size: 0.95rem;
  font-weight: 800;
}

.x-post-handle,
.x-post-time {
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
}

.x-post-text {
  font-size: 0.98rem;
  line-height: 1.48;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.x-post-link {
  color: #1d9bf0;
  text-decoration: none;
}

[data-theme="dark"] .x-post-link {
  color: #7cb8ff;
}

.x-post-link:hover {
  text-decoration: underline;
}

.x-post-media {
  display: grid;
  gap: 0.3rem;
  margin-top: 0.7rem;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  max-width: 100%;
}

.x-post-media-1 {
  grid-template-columns: 1fr;
}

.x-post-media-2 {
  grid-template-columns: 1fr 1fr;
}

.x-post-media-3,
.x-post-media-4 {
  grid-template-columns: 1fr 1fr;
}

.x-post-media-item {
  position: relative;
  display: block;
  background: rgba(127, 127, 127, 0.08);
  min-height: 120px;
  max-height: 280px;
  overflow: hidden;
}

.x-post-media-1 .x-post-media-item {
  max-height: 320px;
}

.x-post-media-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  min-height: 120px;
  max-height: inherit;
  transition: transform 0.25s ease;
}

.x-post-media-item:hover img {
  transform: scale(1.02);
}

.x-post-media-badge {
  position: absolute;
  left: 0.45rem;
  bottom: 0.45rem;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0, 0, 0, 0.7);
  padding: 0.18rem 0.45rem;
  border-radius: 6px;
}

.x-post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1.1rem;
  margin-top: 0.7rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.x-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.x-ico {
  width: 1.05rem;
  height: 1.05rem;
  opacity: 0.75;
}

.x-stat-like .x-ico {
  color: var(--flame-red);
  opacity: 0.9;
}

.x-post-open {
  margin-left: auto;
  color: var(--flame-red);
  font-weight: 800;
  text-decoration: none;
  font-size: 0.78rem;
}

.x-post-open:hover {
  text-decoration: underline;
}

.x-post-feed-foot {
  position: sticky;
  bottom: 0;
  padding: 0.85rem 1rem;
  text-align: center;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper-2) 92%, transparent);
  backdrop-filter: blur(10px);
}

.x-post-feed-foot a {
  color: var(--flame-red);
  font-weight: 800;
  font-size: 0.85rem;
  text-decoration: none;
}

.x-post-feed-foot a:hover {
  text-decoration: underline;
}

/* Directory grid */
.x-directory {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.55rem;
}

.x-dir-card {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.8rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: inherit;
  text-decoration: none;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}

.x-dir-card:hover {
  border-color: rgba(200, 16, 46, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
  text-decoration: none;
}

.x-dir-featured {
  border-color: rgba(200, 16, 46, 0.18);
}

.x-dir-avatar {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-weight: 800;
  font-size: 0.78rem;
  color: #fff;
  background: linear-gradient(145deg, #333, #111);
}

.x-dir-featured .x-dir-avatar {
  background: linear-gradient(145deg, var(--flame-red), #5a0a18);
}

.x-dir-copy {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 0;
  flex: 1;
}

.x-dir-copy strong {
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.x-dir-copy .muted {
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.x-dir-tag {
  flex-shrink: 0;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--flame-red);
  background: rgba(200, 16, 46, 0.1);
  border: 1px solid rgba(200, 16, 46, 0.2);
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
}

.x-dir-go {
  flex-shrink: 0;
  color: var(--muted);
  font-weight: 700;
}

@media (max-width: 560px) {
  .x-voice-grid {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .x-voice-card,
  .x-voice-chip {
    padding: 0.55rem 0.6rem 0.55rem 0.5rem;
  }

  .x-feed-toolbar {
    padding: 0.65rem 0.8rem;
  }

  .x-post {
    padding: 0.85rem 0.8rem;
    grid-template-columns: 40px 1fr;
  }

  .x-post-avatar {
    width: 40px;
    height: 40px;
  }
}

.forum-list {
  display: flex;
  flex-direction: column;
}

.forum-list-head,
.forum-list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 9.5rem;
  gap: 0.75rem;
  align-items: center;
  padding: 0.65rem 0.9rem;
}

.forum-list-head {
  background: rgba(200, 16, 46, 0.08);
  border-bottom: 1px solid var(--line);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.forum-list-row {
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--line);
  transition: background 0.12s ease;
}

.forum-list-row:last-child {
  border-bottom: 0;
}

.forum-list-row:nth-child(even) {
  background: var(--table-stripe);
}

.forum-list-row:hover {
  background: rgba(200, 16, 46, 0.07);
}

.forum-col-thread {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  min-width: 0;
}

.forum-thread-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #12090b;
  margin-top: 0.1rem;
}

.forum-thread-icon img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  image-rendering: auto;
}

.forum-thread-main {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.forum-thread-title {
  font-weight: 750;
  font-size: 0.95rem;
  line-height: 1.3;
  color: var(--ink);
}

.forum-list-row:hover .forum-thread-title {
  color: var(--flame-red);
}

.forum-thread-meta {
  font-size: 0.78rem;
  color: var(--muted);
}

.forum-thread-meta strong {
  color: var(--card-text);
  font-weight: 700;
}

.forum-col-last {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
  text-align: right;
}

.forum-last-time {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--card-text);
}

.forum-last-go {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
}

.forum-list-row:hover .forum-last-go {
  color: var(--flame-red);
}

.forum-board-compact .forum-board-logo {
  width: 40px;
  height: 40px;
}

.forum-board-compact .forum-list-row {
  padding: 0.55rem 0.8rem;
}

.forum-board-compact .forum-thread-title {
  font-size: 0.9rem;
}

@media (max-width: 640px) {
  .forum-list-head,
  .forum-list-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.35rem;
  }

  .forum-list-head .forum-col-last {
    display: none;
  }

  .forum-col-last {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding-left: 2.15rem;
  }
}

.section-note {
  margin: -0.35rem 0 1rem;
  font-size: 0.88rem;
  max-width: 40rem;
}

.card-body {
  padding: 1rem 1.1rem 1.15rem;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.meta .source {
  color: var(--flame-red);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.card h2,
.card h3 {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.card h2 {
  font-size: clamp(1.4rem, 2.4vw, 2rem);
}

.card h3 {
  font-size: 1.05rem;
}

.card p {
  margin: 0;
  color: var(--card-text);
  font-size: 0.95rem;
}

/* Featured */
.featured .card-media {
  aspect-ratio: 16 / 10;
}

.featured .card-body {
  padding: 1.25rem 1.4rem 1.5rem;
}

/* Secondary stack */
.stack {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.stack-item {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 0.85rem;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  transition: 0.15s ease;
}

.stack-item:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.stack-item .thumb {
  aspect-ratio: 1;
  background: #1a0a0e;
  position: relative;
}

.stack-item .thumb > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stack-item .thumb-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 25%, rgba(241, 190, 72, 0.18), transparent 50%),
    linear-gradient(145deg, #1a0a0e, #0b0b0c);
}

.stack-item .placeholder-logo {
  width: 58%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(241, 190, 72, 0.35);
}

.stack-item .body {
  padding: 0.7rem 0.75rem 0.7rem 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.stack-item h3 {
  margin: 0;
  font-size: 0.95rem;
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.2;
}

/* Section heads */
.section {
  margin-top: 2.25rem;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  border-bottom: 3px solid var(--ink);
  padding-bottom: 0.55rem;
}

.section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.section-head a {
  color: var(--flame-red);
  font-weight: 800;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Primary CTA links in section heads (e.g. Suggest a source) stay white on red */
.section-head a.btn.btn-primary,
.page-head-row a.btn.btn-primary,
a.btn.btn-primary {
  color: #fff !important;
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.85rem;
}

.section-head a.btn.btn-primary:hover,
.page-head-row a.btn.btn-primary:hover,
a.btn.btn-primary:hover {
  color: #fff !important;
}

/* Card grids */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 1000px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .grid-3,
  .grid-4,
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .stack-item {
    grid-template-columns: 88px 1fr;
  }
}

/* Story page */
.story-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 900px) {
  .story-layout {
    grid-template-columns: 1fr;
  }
}

.story-hero {
  margin-bottom: 1.25rem;
}

.story-hero .eyebrow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
}

.story-hero .eyebrow .source {
  color: var(--flame-red);
  text-transform: uppercase;
}

.story-hero h1 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.story-hero .deck {
  font-size: 1.15rem;
  color: #333;
  margin: 0 0 1.25rem;
  max-width: 42rem;
}

.story-media {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.5rem;
  background: #111;
  aspect-ratio: 16 / 9;
}

.story-media img,
.story-media iframe {
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

.article-body {
  font-size: 1.08rem;
  max-width: 42rem;
  color: #1c1c1f;
}

.article-body h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin: 1.75rem 0 0.75rem;
}

.article-body p {
  margin: 0 0 1rem;
}

.article-body ul {
  padding-left: 1.2rem;
}

.article-body a {
  color: var(--flame-red);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.takeaways {
  background: linear-gradient(135deg, #1a0a0e, #2a0c12);
  color: #fff;
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  margin: 1.5rem 0;
}

.takeaways h3 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  color: var(--flame-gold);
  text-transform: uppercase;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.takeaways ul {
  margin: 0;
  padding-left: 1.1rem;
}

.takeaways li {
  margin-bottom: 0.4rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1.25rem 0;
}

.tag {
  background: #eee;
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #333;
}

.original-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin: 1.5rem 0;
}

.original-cta-podcast {
  align-items: flex-start;
  justify-content: space-between;
}

.listen-apps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
}

.btn-listen {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 800;
  font-size: 0.82rem;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid var(--line);
  color: inherit;
  background: var(--paper-2, #fff);
  white-space: nowrap;
}

.btn-listen:hover {
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.btn-listen-apple {
  background: #000;
  color: #fff;
  border-color: #000;
}

.btn-listen-apple:hover {
  background: #111;
  color: #fff;
}

.btn-listen-spotify {
  background: #1db954;
  color: #fff;
  border-color: #1db954;
}

.btn-listen-spotify:hover {
  background: #1ed760;
  color: #fff;
}

[data-theme="dark"] .btn-listen:not(.btn-listen-apple):not(.btn-listen-spotify) {
  background: var(--paper-2);
}

.sidebar .widget {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
}

.sidebar .widget h3 {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  text-transform: uppercase;
  border-bottom: 2px solid var(--flame-red);
  padding-bottom: 0.4rem;
}

.sidebar-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-list li {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
}

.sidebar-list li:last-child {
  border-bottom: 0;
}

.sidebar-list a {
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.25;
}

.sidebar-list a:hover {
  color: var(--flame-red);
}

/* Sources page — compact pills */
.source-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 0.5rem;
}

.source-card {
  background: var(--paper-2, #fff);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.55rem 0.7rem 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease;
}

.source-card:hover {
  border-color: rgba(200, 16, 46, 0.45);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
  text-decoration: none;
  color: inherit;
}

.source-card .kind {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  line-height: 1.2;
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
  background: rgba(127, 127, 127, 0.08);
  border: 1px solid transparent;
}

.source-card h3 {
  margin: 0.1rem 0 0;
  font-family: var(--font-body, inherit);
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 560px) {
  .source-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.4rem;
  }

  .source-card {
    padding: 0.5rem 0.6rem;
  }

  .source-card h3 {
    font-size: 0.84rem;
  }
}

/* Empty state */
.empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
}

.empty h2 {
  font-family: var(--font-display);
  color: var(--ink);
}

/* Footer */
.site-footer {
  background: var(--chrome-bg);
  color: var(--chrome-muted);
  padding: 2.5rem 0 2rem;
  margin-top: auto;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 900px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }
}

.footer-legal-blurb {
  margin: 0.75rem 0 0;
  font-size: 0.82rem !important;
  line-height: 1.45 !important;
  color: var(--chrome-faint) !important;
  max-width: 16rem;
}

/* Legal page */
.legal-page {
  max-width: 46rem;
}

.legal-body {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem 1.75rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.legal-lead {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.legal-body section {
  margin-bottom: 1.5rem;
}

.legal-body h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--flame-red);
}

.legal-body p,
.legal-body li {
  color: var(--card-text);
  font-size: 0.95rem;
  line-height: 1.65;
  margin: 0 0 0.75rem;
}

.legal-body ul {
  margin: 0 0 0.75rem;
  padding-left: 1.25rem;
}

.legal-body a {
  color: var(--flame-red);
  font-weight: 700;
}

.legal-footnote {
  margin: 1.75rem 0 0 !important;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.82rem !important;
  color: var(--muted) !important;
  font-style: italic;
}

.site-footer h4 {
  margin: 0 0 0.75rem;
  color: var(--chrome-text);
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 0.9rem;
}

.site-footer a {
  color: var(--flame-gold);
}

.site-footer p,
.site-footer li {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--chrome-muted);
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li {
  margin-bottom: 0.35rem;
}

.footer-note {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--chrome-line);
  font-size: 0.8rem;
  color: var(--chrome-faint);
}

/* Utilities */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.page-title {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  text-transform: uppercase;
}

.page-sub {
  margin: 0 0 1.5rem;
  color: var(--muted);
  max-width: 40rem;
}

.pulse {
  animation: pulse 1s ease infinite;
}

@keyframes pulse {
  50% {
    opacity: 0.55;
  }
}

/* ── Dark mode extras ───────────────────────────────── */
[data-theme="dark"] .card,
[data-theme="dark"] .stack-item,
[data-theme="dark"] .source-card,
[data-theme="dark"] .sidebar .widget,
[data-theme="dark"] .original-cta,
[data-theme="dark"] .game-row {
  background: var(--paper-2);
  border-color: var(--line);
}

[data-theme="dark"] .mobile-nav a {
  background: var(--paper-2);
  border-color: var(--line);
  color: var(--ink);
}

[data-theme="dark"] .story-hero .deck,
[data-theme="dark"] .article-body {
  color: var(--card-text);
}

[data-theme="dark"] .tag {
  background: var(--ink-3);
  color: var(--ink);
}

[data-theme="dark"] .section-head {
  border-bottom-color: rgba(255, 255, 255, 0.2);
}

/* Explicit chrome contrast in dark mode (top ribbon + footer + sticky nav) */
[data-theme="dark"] .topbar,
[data-theme="dark"] .site-footer {
  background: var(--chrome-bg);
  color: var(--chrome-text);
}

[data-theme="dark"] .topbar,
[data-theme="dark"] .topbar-inner,
[data-theme="dark"] .topbar span {
  color: var(--chrome-text);
}

[data-theme="dark"] .site-footer,
[data-theme="dark"] .site-footer p,
[data-theme="dark"] .site-footer li {
  color: var(--chrome-muted);
}

[data-theme="dark"] .site-footer h4 {
  color: var(--chrome-text);
}

[data-theme="dark"] .site-footer a,
[data-theme="dark"] .topbar a {
  color: var(--flame-gold);
}

[data-theme="dark"] .footer-note {
  color: var(--chrome-faint);
  border-top-color: var(--chrome-line);
}

[data-theme="dark"] .site-header {
  color: var(--chrome-text);
}

[data-theme="dark"] .site-header .brand-name {
  color: #fff;
}

/* Wire mark stays white-on-red in both themes */
[data-theme="dark"] .site-header .brand-wire,
.site-header .brand-wire,
.footer-brand .brand-wire {
  color: #fff;
}

.footer-brand .brand-wire {
  font-size: 0.92em;
  padding: 0.12em 0.38em 0.14em 0.45em;
}

[data-theme="dark"] .site-header .brand-tag {
  color: var(--chrome-faint);
}

[data-theme="dark"] .site-header .nav a {
  color: var(--chrome-muted);
}

[data-theme="dark"] .site-header .nav a:hover,
[data-theme="dark"] .site-header .nav a.active {
  color: #fff;
  background: var(--flame-red);
}

[data-theme="dark"] .site-header .btn-ghost {
  color: #fff;
  border-color: var(--chrome-line);
}

.theme-toggle .theme-icon {
  font-size: 1rem;
  line-height: 1;
}

/* ── Filter chips (podcasts) ────────────────────────── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.5rem;
  padding-bottom: 0.25rem;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--ink);
  transition: 0.15s ease;
}

.filter-chip .count {
  background: rgba(200, 16, 46, 0.12);
  color: var(--flame-red);
  border-radius: 999px;
  padding: 0.05rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 800;
  min-width: 1.4rem;
  text-align: center;
}

.filter-chip:hover {
  border-color: var(--flame-red);
}

.filter-chip.active {
  background: var(--flame-red);
  border-color: var(--flame-red);
  color: #fff;
}

.filter-chip.active .count {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.page-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  border-bottom: 3px solid var(--ink);
  padding-bottom: 0.75rem;
  margin-bottom: 1.25rem;
}

/* ── Instagram directory (link-out only) ─────────────── */
.ig-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
}

.ig-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  background: var(--card, #fff);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  color: inherit;
}

.ig-card:hover {
  border-color: var(--flame-red);
  box-shadow: var(--shadow);
}

.ig-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(145deg, var(--flame-red), #8a0a1a);
  box-shadow: 0 0 0 2px rgba(241, 190, 72, 0.35);
}

.ig-avatar-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
  object-position: top center;
  background: #1a1a1a;
  box-shadow: 0 0 0 2px rgba(241, 190, 72, 0.35);
}

/* Org logos often aren't circular mugshots — keep mark fully visible */
.ig-card .ig-avatar-img[src*="/logos/org/"] {
  object-fit: contain;
  object-position: center;
  background: #fff;
  padding: 3px;
}

[data-theme="dark"] .ig-card .ig-avatar-img[src*="/logos/org/"] {
  background: #1c1c1f;
}

.ig-meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
  flex: 1;
}

.ig-name {
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1.25;
}

.ig-handle {
  font-size: 0.82rem;
  color: var(--flame-red);
  font-weight: 700;
}

.ig-role {
  font-size: 0.75rem;
  color: var(--muted);
}

.ig-go {
  color: var(--muted);
  font-size: 1rem;
  flex-shrink: 0;
}

.ig-card:hover .ig-go {
  color: var(--flame-red);
}

[data-theme="dark"] .ig-card {
  background: var(--paper-2);
  border-color: var(--line);
}

/* ── Schedule / stats ───────────────────────────────── */
.season-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.85rem;
}

.season-form select {
  font: inherit;
  font-weight: 700;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--ink);
  min-width: 10rem;
}

.stat-banner {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

@media (max-width: 800px) {
  .stat-banner {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stat-banner > div {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.stat-banner strong {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.02em;
}

.stat-banner-label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.game-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.game-row {
  display: grid;
  grid-template-columns: 160px 1.4fr 1fr auto;
  gap: 0.75rem;
  align-items: center;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem 1rem;
}

@media (max-width: 800px) {
  .game-row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
}

.game-matchup {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.team-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.vs-tag {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  min-width: 1.5rem;
}

.game-score {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
}

.result {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.result-w {
  background: rgba(29, 185, 84, 0.18);
  color: #0f8a3c;
}

[data-theme="dark"] .result-w {
  color: #5ddea0;
}

.result-l {
  background: rgba(200, 16, 46, 0.15);
  color: var(--flame-red);
}

.pill {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(200, 16, 46, 0.12);
  color: var(--flame-red);
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
}

.muted {
  color: var(--muted);
  font-size: 0.9rem;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.data-table th,
.data-table td {
  padding: 0.65rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.data-table th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 800;
  background: rgba(0, 0, 0, 0.03);
  position: sticky;
  top: 0;
}

[data-theme="dark"] .data-table th {
  background: rgba(255, 255, 255, 0.04);
}

.data-table tbody tr:nth-child(even) {
  background: var(--table-stripe);
}

.data-table tbody tr:hover {
  background: rgba(200, 16, 46, 0.08);
}

.data-table .pts {
  font-weight: 800;
  color: var(--flame-red);
}

.home-standings {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
}

.home-standings strong {
  font-family: var(--font-display);
  letter-spacing: 0.02em;
}

.home-standings-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  margin-left: auto;
  align-items: center;
}

.home-standings a {
  color: var(--flame-red);
  font-weight: 800;
}

.home-standings-season {
  font-size: 0.82rem;
}

.standings-table .team-cell {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
}

.standings-table .team-mini-logo {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.standings-table tr.is-flames {
  background: rgba(200, 16, 46, 0.1);
}

.standings-table tr.is-flames td {
  font-weight: 700;
}

.flames-pill {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
  background: var(--flame-red);
  border-radius: 4px;
  padding: 0.1em 0.35em;
  margin-left: 0.25rem;
}

.wc-pill {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #111;
  background: var(--flame-gold);
  border-radius: 4px;
  padding: 0.1em 0.35em;
  margin-left: 0.25rem;
}

.standings-view-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1rem;
}

.standings-view-tab {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
}

.standings-view-tab:hover {
  border-color: var(--flame-red);
  color: var(--flame-red);
}

.standings-view-tab.is-active {
  background: var(--flame-red);
  border-color: var(--flame-red);
  color: #fff;
}

.standings-view-tab.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.standings-table tr.is-wc-spot {
  background: rgba(241, 190, 72, 0.12);
}

.standings-group-wildcard .section-head h2 {
  color: var(--flame-red);
}

.game-type-pill {
  display: inline-block;
  margin-left: 0.35rem;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--muted);
  vertical-align: middle;
}

.game-type-pill.playoff {
  background: rgba(200, 16, 46, 0.12);
  border-color: var(--flame-red);
  color: var(--flame-red);
}

/* ── Arcade hub ─────────────────────────────────────── */
.games-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (max-width: 900px) {
  .games-grid {
    grid-template-columns: 1fr;
  }
}

.game-card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 180px;
  transition: 0.15s ease;
}

a.game-card:hover {
  border-color: var(--flame-red);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.game-card h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.01em;
}

.game-card p {
  margin: 0;
  color: var(--card-text);
  flex: 1;
}

.game-card-badge {
  align-self: flex-start;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--flame-red);
  color: #fff;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.game-card-badge.soon {
  background: var(--ink-3);
  color: var(--muted);
}

.game-card-cta {
  color: var(--flame-red);
  font-weight: 800;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.featured-game {
  border-color: rgba(200, 16, 46, 0.35);
  background: linear-gradient(160deg, var(--paper-2), rgba(200, 16, 46, 0.06));
}

.muted-card {
  opacity: 0.85;
}

/* ── Trail of Teams ─────────────────────────────────── */
.breadcrumb {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.breadcrumb a {
  color: var(--flame-red);
}

.trail-page {
  max-width: 1100px;
}

.trail-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 1.35rem;
  padding: 1.25rem 1.4rem;
  border-radius: 18px;
  background:
    radial-gradient(ellipse 80% 120% at 0% 0%, rgba(200, 16, 46, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 100% at 100% 100%, rgba(241, 190, 72, 0.1), transparent 50%),
    linear-gradient(145deg, #14090c 0%, #1c0c12 45%, #0e0a0b 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}

.trail-hero-copy h1 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.5vw, 2.35rem);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.trail-hero-copy p:not(.breadcrumb) {
  margin: 0;
  max-width: 34rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.98rem;
  line-height: 1.5;
}

.trail-hero-copy strong {
  color: var(--flame-gold);
}

.trail-scoreboard {
  display: flex;
  gap: 0.55rem;
}

.ts-stat {
  min-width: 4.6rem;
  text-align: center;
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(6px);
}

.ts-stat span {
  display: block;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 0.15rem;
}

.ts-stat strong {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: #fff;
  letter-spacing: 0.02em;
}

.ts-stat small {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.45);
  margin-left: 0.1rem;
}

.trail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 1.15rem;
  align-items: start;
}

@media (max-width: 900px) {
  .trail-layout {
    grid-template-columns: 1fr;
  }
  .trail-hero {
    align-items: stretch;
  }
}

.trail-board {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.35rem 1.45rem 1.5rem;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.05);
  min-height: 420px;
}

.trail-board-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.65rem;
}

.trail-badges {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.diff-pill,
.stops-pill {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
}

.diff-pill {
  background: rgba(200, 16, 46, 0.12);
  color: var(--flame-red);
}

.diff-pill.diff-medium {
  background: rgba(200, 16, 46, 0.12);
  color: var(--flame-red);
}

.diff-pill.diff-hard {
  background: rgba(241, 190, 72, 0.22);
  color: #9a6f00;
}

[data-theme="dark"] .diff-pill.diff-hard {
  color: var(--flame-gold);
}

.stops-pill {
  background: var(--ink);
  color: #fff;
}

[data-theme="dark"] .stops-pill {
  background: rgba(255, 255, 255, 0.12);
}

.trail-round-meta {
  font-size: 0.82rem;
  font-weight: 600;
  margin: 0;
}

.trail-prompt {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  letter-spacing: 0.01em;
  line-height: 1.2;
}

/* The path stage — compact rectangular strip, L → R */
.trail-stage {
  position: relative;
  margin-bottom: 1.25rem;
  padding: 0.65rem 0.75rem 0.75rem;
  border-radius: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

[data-theme="dark"] .trail-stage {
  background: rgba(0, 0, 0, 0.25);
  border-color: rgba(255, 255, 255, 0.08);
}

.trail-stage-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
  padding: 0 0.15rem;
}

.trail-path {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0;
  min-height: 0;
  width: max-content;
  min-width: 100%;
}

.trail-step-wrap {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex: 0 0 auto;
}

/* Logo cell: ~100×100 mark inside a tight tile */
.trail-team {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 112px;
  height: 128px;
  padding: 0.35rem 0.25rem 0.4rem;
  border-radius: 10px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  box-sizing: border-box;
}

.trail-team:hover {
  border-color: rgba(200, 16, 46, 0.35);
}

.trail-team.is-flames {
  border-color: var(--flame-red);
  box-shadow: inset 0 0 0 1px rgba(200, 16, 46, 0.2);
  background: linear-gradient(180deg, rgba(200, 16, 46, 0.06), var(--paper-2));
}

.trail-team.solved-glow {
  animation: trail-glow 1s ease;
}

@keyframes trail-glow {
  50% {
    box-shadow: 0 0 0 2px rgba(200, 16, 46, 0.35);
  }
}

.trail-step-num {
  position: absolute;
  top: 4px;
  left: 5px;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 0.58rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  line-height: 1;
  opacity: 0.75;
}

.trail-team.is-flames .trail-step-num {
  background: var(--flame-red);
  opacity: 1;
}

.trail-logo-box {
  width: 100px;
  height: 100px;
  display: grid;
  place-items: center;
  flex: 0 0 100px;
}

.trail-logo-box img {
  width: 100px;
  height: 100px;
  object-fit: contain;
}

.trail-abbrev {
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  color: var(--ink);
}

/* Hide bulky text under logos — abbrev only if needed for no-logo teams */
.trail-team-abbrev {
  display: none;
}

.trail-team-name {
  display: none;
}

/* Show abbrev under logo only when image missing (fallback class on parent) */
.trail-team.no-logo .trail-team-abbrev {
  display: block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--flame-red);
  margin-top: 0.15rem;
}

.trail-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  flex: 0 0 18px;
  height: 100px;
  color: var(--flame-red);
  font-weight: 800;
  font-size: 1rem;
  opacity: 0.85;
}

.trail-connector-line {
  display: none;
}

.trail-connector-chevron {
  line-height: 1;
}

.guess-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.guess-row {
  display: flex;
  gap: 0.55rem;
}

.guess-row input {
  flex: 1;
  font: inherit;
  font-weight: 600;
  font-size: 1.05rem;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.guess-row input:focus {
  outline: none;
  border-color: var(--flame-red);
  box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.15);
}

.guess-row .btn {
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.trail-feedback {
  min-height: 1.45em;
  margin: 0.85rem 0 0;
  font-weight: 700;
  font-size: 0.98rem;
}

.trail-feedback.ok {
  color: #0f8a3c;
}

.trail-feedback.bad {
  color: var(--flame-red);
}

.trail-feedback.warn {
  color: #a67c00;
}

[data-theme="dark"] .trail-feedback.ok {
  color: #5ddea0;
}

[data-theme="dark"] .trail-feedback.warn {
  color: var(--flame-gold);
}

.trail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

/* Hint / Skip / Reveal — red buttons, white text (ghost style is for dark chrome) */
.trail-actions .btn-ghost,
.trail-actions .btn-primary {
  background: var(--flame-red);
  color: #fff !important;
  border: 0;
}

.trail-actions .btn-ghost:hover:not(:disabled),
.trail-actions .btn-primary:hover:not(:disabled) {
  background: var(--flame-red-dark);
  color: #fff !important;
}

.trail-actions .btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.trail-reveal {
  margin-top: 1.15rem;
}

.trail-reveal-inner {
  padding: 1.1rem 1.2rem;
  border-radius: 14px;
  background: linear-gradient(135deg, #1a0a0e, #2a0c14);
  color: #fff;
  border: 1px solid rgba(241, 190, 72, 0.25);
}

.trail-reveal-kicker {
  margin: 0 0 0.2rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--flame-gold);
}

.trail-reveal h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.65rem;
  color: #fff;
  letter-spacing: 0.01em;
}

.trail-reveal-inner p {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
}

.trail-reveal-path {
  margin-top: 0.55rem !important;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--flame-gold) !important;
  font-size: 0.88rem !important;
}

.how-list {
  margin: 0;
  padding-left: 1.15rem;
  font-size: 0.9rem;
  color: var(--card-text);
  line-height: 1.45;
}

.how-list li {
  margin-bottom: 0.45rem;
}

.trail-side-card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  margin-bottom: 0.85rem;
}

.trail-side-card h3 {
  margin: 0 0 0.7rem;
  font-family: var(--font-display);
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 2px solid var(--flame-red);
  padding-bottom: 0.4rem;
}

.trail-aside .btn-ghost {
  color: var(--ink);
  border: 1px solid var(--line);
  background: transparent;
}

[data-theme="dark"] .trail-aside .btn-ghost {
  color: var(--ink);
}

/* ── Roster ──────────────────────────────────────────── */
.roster-head-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.roster-section {
  margin-bottom: 1.5rem;
}

.roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
  /* Allow PuckPedia tippy to paint outside card bounds without grid clipping */
  overflow: visible;
}

.roster-card {
  display: flex;
  gap: 0.75rem;
  padding: 0.85rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  position: relative;
  z-index: 0;
  overflow: visible;
  /* Avoid transform on idle cards — it creates a stacking context so the
     next card's headshot paints over PuckPedia popovers (tippy interactive
     mode appends to the reference parent, not document.body). */
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.roster-card:hover,
.roster-card:focus-within {
  border-color: rgba(200, 16, 46, 0.3);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
  z-index: 20;
}

/* Keep the open popover's card above every sibling (including headshots) */
.roster-card:has([data-tippy-root]),
.roster-card:has(.tippy-box[data-state="visible"]),
.roster-card:has(a.pppopover[aria-expanded="true"]) {
  z-index: 60;
}

.roster-card-media {
  position: relative;
  z-index: 0;
  flex-shrink: 0;
  width: 88px;
  height: 88px;
}

.roster-headshot {
  width: 88px;
  height: 88px;
  object-fit: cover;
  object-position: top center;
  border-radius: 14px;
  background:
    radial-gradient(circle at 30% 20%, rgba(241, 190, 72, 0.2), transparent 55%),
    #1a0f12;
  display: block;
}

.roster-headshot-fallback,
.roster-headshot.is-missing {
  width: 88px;
  height: 88px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: #fff;
  background: linear-gradient(145deg, var(--flame-red), #5a0a18);
}

.roster-number {
  position: absolute;
  left: 0.3rem;
  bottom: 0.3rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #fff;
  background: rgba(0, 0, 0, 0.72);
  border-radius: 6px;
  padding: 0.12rem 0.35rem;
}

.roster-card-body {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.roster-name {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
}

.roster-meta,
.roster-vitals {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.35;
}

.roster-pos {
  font-weight: 800;
  color: var(--flame-red);
}

.roster-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 0.45rem;
}

.roster-link {
  font-size: 0.72rem;
  font-weight: 800;
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: inherit;
  background: rgba(127, 127, 127, 0.06);
}

.roster-link:hover {
  text-decoration: none;
  border-color: rgba(200, 16, 46, 0.35);
  color: var(--flame-red);
}

.roster-link-nhl {
  color: var(--flame-red);
  border-color: rgba(200, 16, 46, 0.22);
  background: rgba(200, 16, 46, 0.08);
}

/* PuckPedia Connector pill (name becomes a.pppopover after their script runs) */
.roster-section,
.roster-card-body,
.roster-links {
  overflow: visible;
}

/* Tippy root for interactive popovers (parent-appended by connector) */
.roster-grid [data-tippy-root],
.roster-card [data-tippy-root] {
  z-index: 10000 !important;
  pointer-events: auto;
}

.roster-grid .tippy-box.pp-connector,
.roster-card .tippy-box.pp-connector {
  z-index: 10001 !important;
}

.roster-link-pp {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  max-width: 100%;
  color: #3d4f6a;
  border-color: rgba(115, 137, 168, 0.45);
  background: rgba(115, 137, 168, 0.12);
  position: relative;
  z-index: 1;
  /* Before connector: still look like a profile pill */
}

.roster-link-pp::before {
  content: "PuckPedia";
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  opacity: 0.85;
  flex-shrink: 0;
}

.roster-link-pp a.pppopover {
  border-bottom: none;
  text-decoration: none;
  color: inherit;
  font-weight: 800;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roster-link-pp:hover,
.roster-link-pp:has(a.pppopover:hover) {
  border-color: rgba(115, 137, 168, 0.75);
  background: rgba(115, 137, 168, 0.2);
  color: #2a3a52;
}

[data-theme="dark"] .roster-link-pp {
  color: #c5d2e4;
  border-color: rgba(115, 137, 168, 0.4);
  background: rgba(115, 137, 168, 0.16);
}

[data-theme="dark"] .roster-link-pp:hover,
[data-theme="dark"] .roster-link-pp:has(a.pppopover:hover) {
  color: #e8eef6;
  border-color: rgba(160, 180, 210, 0.55);
  background: rgba(115, 137, 168, 0.28);
}

/* ── Salary Cap (PuckPedia embeds) ─────────────────────────── */
.cap-section {
  margin-bottom: 1.75rem;
  text-align: left; /* headings / notes match site; only widgets are centered */
}

.cap-widget-shell {
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  padding: 0.5rem;
  overflow: hidden;
  /* Center the embeds only — leave section titles left-aligned */
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

/*
  NHL /e/teams embed: inner PuckPedia layout is max-w-[600px].
  A wider host (e.g. 920px) leaves a large empty strip on the right.
  Size the shell to the content width so the table fills the frame.
*/
.cap-widget-shell-nhl {
  max-width: 616px; /* 600px content + shell padding + borders */
}

/* Official ._puckr sizing comes from static.puckpedia.com/e/res.css;
   tighten corners so the iframe sits cleanly in our shell. */
.cap-widget-shell ._puckr {
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  margin: 0;
  width: 100%;
  transition: background 0.2s ease;
}

/* Flames team cap summary embed — fixed 400px height from their snippet */
.cap-widget-shell-flames {
  max-width: 640px;
}

/* Draft picks embed (PuckPedia type3) on prospects page */
.cap-widget-shell-draft {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.cap-flames-embed,
.cap-draft-embed {
  position: relative;
  width: 100%;
  min-height: 400px;
  margin-left: auto;
  margin-right: auto;
}

.cap-draft-embed .cap-embed-frame,
.cap-draft-embed iframe {
  height: 400px;
}

/*
  PuckPedia embeds use Tailwind `dark:` via prefers-color-scheme.
  Setting color-scheme on the iframe tells the nested document which scheme
  the host wants — so our site theme can drive their light/dark UI.
*/
.cap-embed-frame,
.cap-widget-shell iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  border: 1px solid #e5e7eb;
  border-radius: 15px;
  background: #ffffff;
  color-scheme: light;
  transition: border-color 0.2s ease, background 0.2s ease, filter 0.25s ease;
}

.cap-flames-embed .cap-embed-frame,
.cap-flames-embed iframe {
  height: 400px;
}

/* Dark mode — shell + force dark preferred scheme into the embed */
[data-theme="dark"] .cap-widget-shell {
  background: rgba(15, 23, 42, 0.55);
  border-color: rgba(148, 163, 184, 0.22);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
}

[data-theme="dark"] .cap-widget-shell ._puckr {
  background: #0f172a; /* matches PuckPedia dark:bg-slate-950 */
}

[data-theme="dark"] .cap-embed-frame,
[data-theme="dark"] .cap-widget-shell iframe {
  border-color: rgba(148, 163, 184, 0.28);
  background: #0f172a;
  color-scheme: dark;
}

/*
  Fallback when the embed ignores host color-scheme (some browsers):
  gentle invert so a locked light UI still reads well on our dark theme.
  Disabled once the frame has painted in dark (we can't detect; keep subtle).
  Use only if you prefer stronger match — currently off by default via
  .cap-embed-invert class toggled by JS when needed.
*/
[data-theme="dark"] .cap-embed-frame.cap-embed-invert {
  filter: invert(0.9) hue-rotate(180deg) contrast(0.95);
}

.roster-credit {
  margin: 1.5rem 0 0.5rem;
  font-size: 0.8rem;
  line-height: 1.45;
  max-width: 48rem;
}

.roster-credit a {
  color: var(--flame-red);
  font-weight: 700;
}

@media (max-width: 560px) {
  .roster-grid {
    grid-template-columns: 1fr;
  }

  .roster-card-media,
  .roster-headshot,
  .roster-headshot-fallback {
    width: 76px;
    height: 76px;
  }
}

/* ── Prospects / draft capital ───────────────────────── */
.prosp-section {
  margin-bottom: 2rem;
}

/* Elite Prospects talent-pool: same-origin iframe (full font/CSS isolation) */
.prosp-ep-shell {
  min-height: 1440px;
  padding: 0;
  overflow: visible;
}

.prosp-ep-frame {
  display: block;
  width: 100%;
  min-height: 1440px;
  height: 1440px;
  border: 0;
  background: #fff;
  /* iframe itself shouldn't steal scroll unless content exceeds height */
  overflow: auto;
}

.prosp-disclaimer,
.prosp-blurb {
  margin: -0.15rem 0 0.85rem;
  font-size: 0.9rem;
  line-height: 1.45;
  max-width: 44rem;
}

.prosp-notes {
  margin: 0.85rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.82rem;
  line-height: 1.45;
  max-width: 48rem;
}

.draft-year-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.65rem;
}

.draft-year-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper-2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.draft-year-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(200, 16, 46, 0.1), rgba(241, 190, 72, 0.06));
}

.draft-year-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.draft-pick-list {
  list-style: none;
  margin: 0;
  padding: 0.35rem 0;
  flex: 1;
}

.draft-pick {
  display: grid;
  grid-template-columns: 2.4rem 1fr;
  gap: 0.45rem;
  padding: 0.4rem 0.85rem;
  align-items: start;
  border-left: 3px solid transparent;
}

.draft-pick.is-owned {
  border-left-color: var(--flame-red);
}

.draft-pick.is-conditional {
  border-left-color: var(--flame-gold, #f1be48);
}

.draft-pick.is-gone {
  border-left-color: var(--muted);
  opacity: 0.72;
}

.draft-pick-round {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--flame-red);
  padding-top: 0.1rem;
}

.draft-pick-body {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  min-width: 0;
  font-size: 0.84rem;
}

.draft-pick-body strong {
  font-size: 0.88rem;
}

.draft-pick-status {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.draft-pick-notes {
  font-size: 0.75rem;
  line-height: 1.35;
}

.prosp-pool-block {
  margin-bottom: 1.35rem;
}

.prosp-pool-head h3 {
  margin: 0;
  font-size: 1.05rem;
}

.prosp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0.65rem;
}

.prosp-card {
  display: flex;
  gap: 0.7rem;
  padding: 0.8rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.prosp-card:hover {
  border-color: rgba(200, 16, 46, 0.28);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.07);
}

.prosp-card-media {
  position: relative;
  flex-shrink: 0;
}

.prosp-headshot {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
  object-position: top center;
  display: block;
  background: #1a0f12;
}

.prosp-headshot-fallback {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: #fff;
  background: linear-gradient(145deg, var(--flame-red), #5a0a18);
}

.prosp-pos {
  position: absolute;
  left: 0.25rem;
  bottom: 0.25rem;
  font-size: 0.62rem;
  font-weight: 800;
  color: #fff;
  background: rgba(0, 0, 0, 0.72);
  border-radius: 5px;
  padding: 0.1rem 0.3rem;
}

.prosp-card-body {
  min-width: 0;
  flex: 1;
}

.prosp-name {
  margin: 0 0 0.15rem;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.2;
}

.prosp-meta,
.prosp-notes-line {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.35;
}

.prosp-draft {
  margin: 0.2rem 0 0;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--flame-red);
}

.prosp-links {
  margin-top: 0.4rem;
}

@media (max-width: 560px) {
  .draft-year-grid {
    grid-template-columns: 1fr 1fr;
  }

  .prosp-grid {
    grid-template-columns: 1fr;
  }
}
