:root {
  --bg: #000000;
  --surface: #050506;
  --surface-2: #0a0a0c;
  --surface-hover: #0f0f12;
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.1);
  --text: #ececee;
  --muted: #8b8d94;
  --accent: #3ba55d;
  --discord: #5865f2;
  --discord-hover: #4752c4;
  --link: #7eb8e8;
  --radius: 10px;
  --radius-lg: 14px;
  --site-gutter: 1.25rem;
  --hero-progress: 0;
  --page-width: 70rem;
}

@media (min-width: 576px) {
  :root {
    --site-gutter: 1.5rem;
  }
}

.site-body .container {
  padding-left: max(var(--site-gutter), env(safe-area-inset-left));
  padding-right: max(var(--site-gutter), env(safe-area-inset-right));
}

* { box-sizing: border-box; }

body.site-body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* Links: underline only in flowing text, never on controls */
a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover { color: #a8d4f5; }
.prose a,
.legal-page a:not(.btn),
.page-content a:not(.btn),
.section-sub a,
.text-secondary a {
  text-decoration: underline;
  text-decoration-color: rgba(126, 184, 232, 0.35);
  text-underline-offset: 0.15em;
}
.prose a:hover,
.legal-page a:not(.btn):hover,
.page-content a:not(.btn):hover,
.section-sub a:hover,
.text-secondary a:hover {
  text-decoration-color: currentColor;
}

.btn,
.btn:hover,
.btn:focus,
.btn:active,
.navbar-brand,
.nav-link,
.footer-links a,
.event-card a,
.hero-actions a {
  text-decoration: none !important;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
  padding: 0.75rem 1rem;
  background: #fff;
  color: #000;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 0;
}

.header-shell {
  width: 100%;
}

.header-row {
  width: 100%;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

@media (min-width: 992px) {
  .header-top {
    gap: 1.5rem;
  }
  .header-nav-desktop {
    margin-left: auto;
  }
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}

.navbar-brand {
  color: var(--text);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  margin: 0;
  padding: 0.2rem 0;
  flex-shrink: 0;
}
.site-brand {
  font-size: clamp(1.2rem, 2.2vw, 1.45rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text) !important;
  line-height: 1.2;
  padding: 0;
  max-width: 100%;
}

.site-brand-logo {
  display: inline-flex;
  align-items: center;
}

.site-logo {
  display: block;
  height: 2.1rem;
  width: auto;
  max-width: min(8.75rem, 44vw);
}

@media (min-width: 768px) {
  .site-logo {
    height: 2.45rem;
    max-width: 9.75rem;
  }
}

.navbar-brand:hover,
.site-brand:hover { color: var(--text) !important; opacity: 0.92; }

.site-brand-logo:hover .site-logo {
  opacity: 0.92;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
  cursor: pointer;
}
.nav-toggle:hover { background: var(--surface-hover); }

.header-nav-wrap {
  width: 100%;
}

.header-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-left: auto;
}

.header-nav .navbar-nav {
  flex-direction: row;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
}

.nav-link {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.925rem;
  padding: 0.45rem 0.8rem !important;
  border-radius: 0;
  background: none !important;
  transition: color 0.15s ease;
  white-space: nowrap;
}
.nav-link:hover,
.nav-link:focus,
.nav-link.active {
  color: var(--text);
  background: none !important;
}

@media (max-width: 991px) {
  .header-nav-wrap {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
  }
  .header-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .header-nav .navbar-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
  }
  .nav-link {
    padding: 0.65rem 0.25rem !important;
    white-space: normal;
  }
  .header-nav .btn-discord {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
}


/* Buttons */
.btn {
  font-weight: 500;
  border-radius: 8px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}
.btn:active { transform: scale(0.98); }

.btn-discord {
  background: var(--discord);
  border: 1px solid transparent;
  color: #fff;
  padding: 0.6rem 1.15rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.btn-discord:hover,
.btn-discord:focus {
  background: var(--discord-hover);
  color: #fff;
  border-color: transparent;
}

.btn-discord-sm {
  padding: 0.45rem 0.85rem;
  font-size: 0.9rem;
  white-space: nowrap;
}

.btn-outline-light {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text);
}
.btn-outline-light:hover,
.btn-outline-light:focus {
  background: var(--surface-hover);
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-ghost:hover,
.btn-ghost:focus {
  background: var(--surface-hover);
  border-color: var(--border-strong);
  color: #fff;
}

.btn-lg {
  padding: 0.7rem 1.35rem;
  font-size: 1rem;
  border-radius: 8px;
}

/* Hero */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  min-height: 100dvh;
  background-color: var(--bg);
  overflow: hidden;
  contain: layout style;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -8% 0;
  background:
    url("/assets/img/bg/hero-flags.jpg") center center / cover no-repeat,
    var(--bg);
  transform: translate3d(0, calc(var(--hero-progress) * -2.5%), 0) scale(calc(1 + var(--hero-progress) * 0.1));
  transform-origin: center center;
  pointer-events: none;
  backface-visibility: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(0, 0, 0, 0.94) 0%, rgba(0, 0, 0, 0.86) 42%, rgba(0, 0, 0, 0.62) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0.72) 58%, rgba(0, 0, 0, 0.96) 100%);
  opacity: calc(1 + var(--hero-progress) * 0.15);
  pointer-events: none;
}

.hero-stage {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
  width: 100%;
  padding: 5rem 0 3.25rem;
}

.hero .container {
  position: relative;
  z-index: 1;
  width: 100%;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
}

.hero-copy {
  max-width: 36rem;
  margin: 0;
  padding: 0;
  transform: translate3d(0, calc(var(--hero-progress) * -3rem), 0);
  opacity: calc(1 - var(--hero-progress) * 1);
  backface-visibility: hidden;
}

.hero-aside {
  padding-left: 1.25rem;
  border-left: 1px solid var(--border);
  transform: translate3d(0, calc(var(--hero-progress) * -3rem), 0);
  opacity: calc(1 - var(--hero-progress) * 1);
  backface-visibility: hidden;
}

.hero-scroll-hint {
  position: absolute;
  z-index: 2;
  bottom: 1.35rem;
  left: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-left: -1.125rem;
  color: var(--muted);
  text-decoration: none !important;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  opacity: calc(1 - var(--hero-progress) * 1.2);
}

.hero-scroll-hint:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.hero-scroll-hint i {
  display: block;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-scroll-hint i {
    animation: hero-scroll-bounce 2.4s ease-in-out infinite;
  }
}

@keyframes hero-scroll-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(0.3rem); }
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(2.75rem);
  transition:
    opacity 0.95s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.95s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

#content.reveal {
  opacity: calc(0.2 + var(--hero-progress) * 0.8);
  transform: translate3d(0, calc((1 - var(--hero-progress)) * 4rem), 0);
  transform-origin: center top;
  transition: none;
  backface-visibility: hidden;
}

#content.reveal.scroll-settled {
  opacity: 1;
  transform: none;
  filter: none;
  transition: none;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --hero-progress: 0 !important;
  }

  .hero-copy,
  .hero-aside,
  .hero-scroll-hint,
  .hero::before {
    transform: none !important;
    opacity: 1 !important;
    filter: none !important;
    animation: none !important;
  }

  #content.reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Lighter hero scroll on touch / low-power devices (class set in site.js) */
html.hero-perf-lite .hero::before {
  transform: none;
}

html.hero-perf-lite .hero-copy,
html.hero-perf-lite .hero-aside {
  transform: none;
  opacity: calc(1 - var(--hero-progress) * 1);
}

html.hero-perf-lite #content.reveal {
  transform: translate3d(0, calc((1 - var(--hero-progress)) * 2rem), 0);
}

.hero-eyebrow {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 0.75rem;
}

.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 0.85rem;
}

.hero-lead {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
  margin: 0;
  max-width: 34ch;
}

.hero-detail {
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.62;
  margin: 0.9rem 0 0;
  max-width: 40ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.65rem;
}

.hero-stats {
  display: none;
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  gap: 0.35rem 0.85rem;
  flex-wrap: wrap;
  align-items: center;
  color: var(--muted);
  font-size: 0.82rem;
}

.hero-stats li {
  display: inline-flex;
  align-items: baseline;
  gap: 0.3rem;
}

.hero-stats li:not(:last-child) {
  padding-right: 0.85rem;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-stats strong {
  color: var(--text);
  font-weight: 600;
  font-size: 0.88rem;
}

.stat-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.stat-list li {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.stat-list strong {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

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

@media (max-width: 991px) {
  .hero-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .hero-aside {
    display: none;
  }

  .hero-stats {
    display: flex;
  }

  .hero-stage {
    align-items: center;
    padding: 4.5rem 0 3rem;
  }
}

@media (max-width: 767px) {
  .hero-stage {
    padding: 4.75rem 0 3.75rem;
  }

  .hero-copy {
    transform-origin: center center;
  }

  .hero::before {
    background-position: 68% 28%;
    filter: brightness(0.58);
  }

  .hero::after {
    background:
      linear-gradient(180deg, rgba(0, 0, 0, 0.62) 0%, rgba(0, 0, 0, 0.78) 30%, rgba(0, 0, 0, 0.96) 58%, #000 100%);
    opacity: 1;
  }

  .hero-eyebrow {
    font-size: 0.7rem;
    margin-bottom: 1rem;
    letter-spacing: 0.09em;
  }

  .hero h1 {
    font-size: 1.8rem;
    line-height: 1.18;
    margin-bottom: 1.15rem;
  }

  .hero-lead {
    font-size: 0.96rem;
    line-height: 1.6;
    max-width: none;
  }

  .hero-detail {
    font-size: 0.9rem;
    line-height: 1.65;
    margin: 1.05rem 0 0;
    max-width: none;
  }

  .hero-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.85rem;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
    padding: 0.78rem 1rem;
    font-size: 0.92rem;
  }

  .hero-stats {
    margin-top: 1.65rem;
    padding-top: 1.35rem;
    border-top: 1px solid var(--border);
    gap: 0.55rem 1rem;
    font-size: 0.8rem;
  }

  .hero-stats strong {
    font-size: 0.84rem;
  }
}

/* Sections */
.section { padding: 4rem 0; }
.section-alt {
  background: var(--surface);
  border-block: 1px solid var(--border);
}

.section-title {
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.6rem;
}

.section > .container > .section-title {
  margin-bottom: 2rem;
}

.section-title .bi {
  font-size: 0.9em;
  opacity: 0.7;
  margin-right: 0.35rem;
}

.section-sub {
  color: var(--muted);
  max-width: 58ch;
  font-size: 1.05rem;
  line-height: 1.65;
}

.section-header-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem 1.5rem;
  margin-bottom: 2rem;
}

.section-header-row .section-sub {
  max-width: none;
}

.section-header-row .section-sub {
  max-width: none;
}

.section-intro {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2rem 3rem;
  align-items: end;
  margin-bottom: 2rem;
}

.section-intro .section-title {
  margin-bottom: 0;
}

.section-intro .section-sub {
  max-width: none;
  margin: 0;
}

@media (max-width: 767px) {
  .section-intro {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

/* Feature cards */
.card-dark {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.4rem;
  height: 100%;
  transition: border-color 0.2s ease;
}

.card-dark:hover {
  border-color: var(--border-strong);
}

.card-dark h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.45rem;
  letter-spacing: -0.01em;
}

.card-dark p {
  color: var(--muted);
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
}

.feature-icon {
  color: var(--muted);
  font-size: 1.1rem;
  margin-bottom: 0.85rem;
  line-height: 1;
}

/* Stats (leaderboard page) */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}

.stat-box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
}
.stat-box strong { display: block; font-size: 1.35rem; font-weight: 600; }
.stat-box span { color: var(--muted); font-size: 0.875rem; }

/* Events */
.events-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.event-tile {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
  min-height: 100%;
}

.event-tile:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
  transform: translateY(-1px);
}

.event-tile-date {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.event-tile-date .bi {
  margin-top: 0.15rem;
  color: var(--accent);
  opacity: 0.9;
}

.event-tile-date strong {
  display: block;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
}

.event-tile-date span {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.78rem;
}

.event-tile h3 {
  font-size: 0.98rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.event-tile p {
  color: var(--muted);
  font-size: 0.875rem;
  margin: 0;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.events-footer {
  margin: 1.5rem 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

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

/* Legacy event list (unused) */
.event-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.event-card {
  display: grid;
  grid-template-columns: 7.5rem 1fr auto;
  gap: 1rem;
  align-items: start;
  padding: 1rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.event-card:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
}

.event-date {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.35;
}

.event-date strong {
  display: block;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.1rem;
}

.event-card h3 {
  font-size: 0.98rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
  line-height: 1.35;
}

.event-card p {
  color: var(--muted);
  font-size: 0.875rem;
  margin: 0;
  line-height: 1.5;
}

.event-link {
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
  align-self: center;
}
.event-link:hover { color: var(--text); }

@media (max-width: 767px) {
  .event-card {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  .event-link { align-self: start; }
}

/* Leaderboard */
.leaderboard-preview {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-2);
}

.lb-head {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.92rem;
}

.lb-head .bi {
  margin-right: 0.35rem;
  opacity: 0.75;
}

.lb-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  color: var(--text);
  background: var(--surface-2);
}

.lb-table th,
.lb-table td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  background: transparent;
}

.lb-table thead th {
  background: var(--surface);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}

.lb-table tbody tr:last-child td {
  border-bottom: none;
}

.lb-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.leaderboard-preview table { margin: 0; color: var(--text); }
.leaderboard-preview th {
  background: var(--surface);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  border-color: var(--border);
  padding: 0.65rem 1rem;
}
.leaderboard-preview td {
  border-color: var(--border);
  vertical-align: middle;
  padding: 0.6rem 1rem;
  font-size: 0.95rem;
  background: transparent;
  color: var(--text);
}
.leaderboard-preview tbody tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.rank-pill {
  display: inline-flex;
  width: 1.65rem;
  height: 1.65rem;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: var(--surface);
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--muted);
}
.rank-pill.gold {
  background: #d4af37;
  color: #1a1400;
}
.rank-pill.silver {
  background: #b4b8c0;
  color: #14161a;
}
.rank-pill.bronze {
  background: #b87333;
  color: #1a0f00;
}

/* Podium (homepage top 3) */
.podium-stage {
  display: grid;
  grid-template-columns: 1fr;
  align-items: end;
}

.podium-pedestal {
  display: none;
}

.podium {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  gap: 1rem;
  align-items: end;
  max-width: 52rem;
  margin: 0 auto;
}

@media (min-width: 992px) {
  .podium-stage {
    grid-template-columns: 1fr minmax(0, 52rem) 1fr;
    gap: 1rem;
  }

  .podium-stage .podium {
    max-width: none;
    margin: 0;
  }

  .podium-pedestal {
    display: flex;
    align-items: flex-end;
    min-height: 11rem;
  }

  .podium-pedestal--left {
    justify-content: flex-end;
  }

  .podium-pedestal--right {
    justify-content: flex-start;
  }

  .podium-pedestal-block {
    display: block;
    width: min(100%, 7.5rem);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    opacity: 0.72;
  }

  .podium-pedestal--left .podium-pedestal-block {
    height: 3.5rem;
  }

  .podium-pedestal--right .podium-pedestal-block {
    height: 2.75rem;
  }
}

.podium-card {
  text-align: center;
  padding: 1.5rem 1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
}

.podium-card.gold {
  padding-top: 2rem;
  padding-bottom: 1.5rem;
  border-color: rgba(212, 175, 55, 0.35);
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.12) 0%, var(--surface-2) 55%);
  transform: translateY(-0.5rem);
}

.podium-card.silver {
  border-color: rgba(180, 184, 192, 0.3);
}

.podium-card.bronze {
  border-color: rgba(184, 115, 51, 0.3);
}

.podium-trophy {
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.podium-card.gold .podium-trophy { color: #d4af37; }
.podium-card.silver .podium-trophy { color: #b4b8c0; }
.podium-card.bronze .podium-trophy { color: #b87333; }

.podium-rank {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.podium-name {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  word-break: break-word;
}

.podium-score {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
}

.podium-score span {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  margin-top: 0.15rem;
}

.leaderboard-more {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.75rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none !important;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.leaderboard-more:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
}

.leaderboard-more-label {
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}

.leaderboard-more .bi {
  font-size: 1.15rem;
  color: var(--muted);
  flex-shrink: 0;
  transition: transform 0.2s ease, color 0.2s ease;
}

.leaderboard-more:hover .bi {
  color: var(--text);
  transform: translateX(0.2rem);
}

.podium-empty {
  color: var(--muted);
  text-align: center;
}

@media (max-width: 991px) {
  .podium {
    grid-template-columns: 1fr;
    max-width: 20rem;
  }
  .podium-card.gold {
    transform: none;
    order: -1;
  }
}

/* Story sections with images */
.story-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem 3rem;
  align-items: center;
  margin-bottom: 3.5rem;
}

.story-grid:last-child {
  margin-bottom: 0;
}

.story-grid-reverse .story-media {
  order: 2;
}

.story-grid-reverse .story-copy {
  order: 1;
}

.story-media {
  position: relative;
  margin: 0;
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 4 / 3;
}

.story-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
  pointer-events: none;
}

.story-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.72) saturate(0.85);
}

.story-media--bright {
  border: none;
  border-radius: 0;
  aspect-ratio: auto;
  overflow: visible;
}

.story-media--bright::after {
  display: none;
}

.story-media--bright img {
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: none;
}

.story-copy h2 {
  font-size: clamp(1.3rem, 2.5vw, 1.65rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
}

.story-copy p {
  color: var(--muted);
  margin: 0 0 1rem;
  line-height: 1.7;
  font-size: 1.02rem;
}

.story-copy p:last-child {
  margin-bottom: 0;
}

.story-copy-centered {
  max-width: 40rem;
  margin: 0 auto;
  text-align: center;
}

.story-copy-centered h2 {
  font-size: clamp(1.3rem, 2.5vw, 1.65rem);
  font-weight: 600;
  margin-bottom: 1rem;
}

.story-copy-centered p {
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 1rem;
}

@media (max-width: 991px) {
  .story-grid,
  .story-grid-reverse {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
  }
  .story-grid-reverse .story-media,
  .story-grid-reverse .story-copy {
    order: unset;
  }
}

.alert-secondary {
  background: var(--surface);
  border-color: var(--border) !important;
  color: var(--muted);
}

/* Footer */
.site-footer {
  margin-top: 0;
  padding: 2rem 0 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.site-footer strong {
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.footer-tagline {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.45;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
}
.footer-links li { margin: 0.28rem 0; }
.footer-links a {
  color: var(--muted);
  font-size: 0.875rem;
  transition: color 0.15s ease;
}
.footer-links a:hover { color: var(--text); }

.footer-copy {
  margin-top: 1.35rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

/* Subpages */
.page,
.legal-page {
  padding: 2.75rem 0 3.5rem;
}

.page-inner,
.container-legal {
  max-width: var(--page-width);
}

.page-title,
.legal-page h1 {
  font-size: clamp(1.65rem, 2.8vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 1.75rem;
}

.page-meta {
  margin: -1.15rem 0 1.75rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.page-content > .page-meta:first-child {
  margin-top: -1.15rem;
  margin-bottom: 1.5rem;
}

.page-header-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem 1.5rem;
  margin-bottom: 0;
}

.page-header-row .page-title,
.page-header-row .legal-page h1 {
  margin-bottom: 0.35rem;
}

.page-header-row .page-meta {
  margin: 0;
}

.page-header-row + .page-content {
  margin-top: 1.75rem;
}

.page-back {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none !important;
  white-space: nowrap;
}

.page-back:hover {
  color: var(--text);
}

.page-content {
  font-size: 1.02rem;
}

.page-content h2,
.legal-page h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 2rem 0 0.65rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

.page-content h2:first-child,
.legal-page h2:first-of-type {
  margin-top: 0;
}

.page-content p,
.page-content li,
.page-content td,
.legal-page p,
.legal-page li {
  color: #c4c5c9;
  line-height: 1.65;
}

.page-content p,
.legal-page p {
  margin: 0 0 0.85rem;
}

.page-content ul,
.page-content ol,
.legal-page ul,
.legal-page ol {
  margin: 0 0 0.85rem;
  padding-left: 1.2rem;
}

.page-content table,
.legal-page table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.page-content th,
.page-content td,
.legal-page th,
.legal-page td {
  border: 1px solid var(--border);
  padding: 0.6rem 0.75rem;
  text-align: left;
}

.page-content th,
.legal-page th {
  background: var(--surface-2);
}

.faq details {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin-bottom: 0.5rem;
  transition: border-color 0.15s ease;
}
.faq details[open] { border-color: var(--border-strong); }
.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.98rem;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq details p {
  color: var(--muted);
  margin: 0.75rem 0 0;
  font-size: 0.95rem;
}

.container.narrow { max-width: 720px; }

.announcements-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 0;
}

.announcements-updated {
  font-size: 0.9rem;
  margin: 0.5rem 0 0;
}

.announcement-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  padding: 1.25rem 1.35rem;
}

.announcement-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  margin-bottom: 0.85rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.announcement-meta strong {
  color: var(--text);
  font-weight: 600;
}

.announcement-body,
.announcement-embed p {
  color: #c4c5c9;
  line-height: 1.65;
  font-size: 0.98rem;
}

.dc-content p,
.announcement-body p {
  margin: 0 0 0.65rem;
}

.dc-content p:last-child,
.announcement-body p:last-child {
  margin-bottom: 0;
}

.dc-h2, .dc-h3, .dc-h4 {
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 1rem 0 0.5rem;
  line-height: 1.3;
}

.dc-h2 { font-size: 1.15rem; }
.dc-h3 { font-size: 1.05rem; }
.dc-h4 { font-size: 1rem; }

.dc-content > :first-child,
.announcement-body > :first-child {
  margin-top: 0;
}

.dc-sub {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0.5rem 0 0.65rem;
}

.dc-list {
  margin: 0.35rem 0 0.75rem;
  padding-left: 1.25rem;
  color: #c4c5c9;
}

.dc-list li {
  margin: 0.35rem 0;
}

.announcement-body a,
.dc-content a {
  word-break: break-word;
}

.announcement-embed {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.announcement-attachments {
  margin: 0.85rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.prose-list {
  color: var(--muted);
  padding-left: 1.2rem;
  margin: 1.25rem 0;
}
.prose-list li { margin: 0.4rem 0; }

.section-cta { margin-top: 1.75rem; }

/* Team page — OLED */
.team-page .page-header-row {
  justify-content: center;
  text-align: center;
}

.team-page .page-header-row .page-title {
  margin-bottom: 0.4rem;
}

.team-page .page-header-row .page-meta {
  margin: 0;
}

.team-page .page-header-row + .page-content {
  margin-top: 1.35rem;
}

.team-page .page-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.team-intro {
  color: var(--muted);
  margin: 0 0 2rem;
  max-width: 32rem;
  font-size: 0.94rem;
  line-height: 1.55;
  text-align: center;
}

.team-shell {
  width: 100%;
  max-width: 26rem;
  margin: 0 auto 1.5rem;
}

.team-empty {
  color: var(--muted);
  padding: 1.25rem;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  text-align: center;
  line-height: 1.6;
}

.team-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.25rem;
  width: 100%;
}

.team-section {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.team-section-head {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.4rem 0 0.45rem;
  margin-bottom: 0.3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.team-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  margin: 0;
  padding: 0;
  border: none;
  line-height: 1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
}

.team-section--administrator .team-section-head {
  border-bottom-color: rgba(237, 66, 69, 0.4);
}

.team-section--administrator .team-section-title {
  color: #ed4245;
  text-shadow: 0 0 18px rgba(237, 66, 69, 0.35);
}

.team-section--administrator .team-avatar {
  box-shadow: 0 0 0 1.5px rgba(237, 66, 69, 0.4);
}

.team-section--head-moderator .team-section-head {
  border-bottom-color: rgba(242, 101, 34, 0.4);
}

.team-section--head-moderator .team-section-title {
  color: #f26522;
  text-shadow: 0 0 18px rgba(242, 101, 34, 0.35);
}

.team-section--head-moderator .team-avatar {
  box-shadow: 0 0 0 1.5px rgba(242, 101, 34, 0.4);
}

.team-section--moderator .team-section-head {
  border-bottom-color: rgba(254, 231, 92, 0.32);
}

.team-section--moderator .team-section-title {
  color: #fee75c;
  text-shadow: 0 0 16px rgba(254, 231, 92, 0.28);
}

.team-section--moderator .team-avatar {
  box-shadow: 0 0 0 1.5px rgba(254, 231, 92, 0.35);
}

.team-section--verification-team .team-section-head {
  border-bottom-color: rgba(87, 242, 135, 0.32);
}

.team-section--verification-team .team-section-title {
  color: #57f287;
  text-shadow: 0 0 16px rgba(87, 242, 135, 0.28);
}

.team-section--verification-team .team-avatar {
  box-shadow: 0 0 0 1.5px rgba(87, 242, 135, 0.35);
}

.team-section--crewmate .team-section-title,
.team-section--junior-crewmate .team-section-title,
.team-section--trainee .team-section-title,
.team-section--developer .team-section-title {
  color: rgba(255, 255, 255, 0.92);
}

.team-section--teacher .team-section-head {
  border-bottom-color: rgba(158, 200, 232, 0.38);
}

.team-section--teacher .team-section-title {
  color: #9ec8e8;
  text-shadow: 0 0 16px rgba(158, 200, 232, 0.3);
}

.team-section--teacher .team-avatar {
  box-shadow: 0 0 0 1.5px rgba(158, 200, 232, 0.38);
}

.team-member-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  width: 100%;
}

.team-member {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.38rem 0.15rem;
  border-radius: 8px;
  transition: background 0.18s ease;
}

.team-member:hover {
  background: rgba(255, 255, 255, 0.035);
}

.team-avatar {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #0a0a0c;
  border: none;
}

.team-member-body {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.team-member-name {
  font-weight: 500;
  font-size: 0.9rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.9);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.team-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.4rem;
  height: 1.4rem;
  color: #7289da;
  background: rgba(88, 101, 242, 0.1);
  border: 1px solid rgba(88, 101, 242, 0.22);
  border-radius: 50%;
  font-size: 0.72rem;
  line-height: 1;
}

.team-badge .bi {
  display: block;
}

.team-badge--head {
  color: #c9920a;
  background: linear-gradient(145deg, rgba(255, 215, 80, 0.22), rgba(201, 146, 10, 0.12));
  border-color: rgba(201, 146, 10, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.team-crown-icon {
  display: block;
  width: 0.9rem;
  height: 0.9rem;
}

.team-footer-note {
  margin: 0;
  padding-top: 2.5rem;
  color: var(--muted);
  max-width: 36rem;
  text-align: center;
  font-size: 0.94rem;
  line-height: 1.75;
}

.team-footer-note a {
  white-space: nowrap;
}

@media (min-width: 768px) {
  .team-shell {
    max-width: 54rem;
  }

  .team-stack {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.75rem 1.15rem;
  }
}

/* Membership tiers */
.tier-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.tier-card {
  display: flex;
  flex-direction: column;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.25rem 1.25rem;
  min-height: 100%;
}

.tier-card h2,
.tier-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  letter-spacing: -0.01em;
}

.tier-star {
  font-size: 1.75rem;
  line-height: 1;
  margin-bottom: 0.85rem;
}

.tier-supporter .tier-star { color: #3ba55d; }
.tier-premium .tier-star { color: #e879a9; }
.tier-premium-plus .tier-star {
  background: linear-gradient(135deg, #5865f2, #e879a9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tier-price {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.tier-price strong {
  color: var(--text);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.tier-price span {
  font-size: 0.88rem;
}

.tier-tagline {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
  margin: 0 0 1rem;
}

.tier-block {
  margin-bottom: 1rem;
}

.tier-block h3 {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.45rem;
}

.tier-preview {
  margin: 0;
  font-size: 0.95rem;
}

.tier-badge {
  font-weight: 600;
}

.tier-badge-supporter { color: #3ba55d; }
.tier-badge-premium { color: #e879a9; }
.tier-badge-plus {
  background: linear-gradient(135deg, #7eb8e8, #e879a9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tier-perks {
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.tier-perks li {
  position: relative;
  padding-left: 0.65rem;
  margin: 0.35rem 0;
}

.tier-perks li::before {
  content: "✦";
  position: absolute;
  left: 0;
  top: 0;
  color: #7eb8e8;
  font-size: 0.65rem;
  line-height: 1.6;
}

.tier-emoji-count {
  margin: 0.5rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tier-emoji-count strong {
  color: var(--text);
}

.tier-footer {
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

@media (max-width: 991px) {
  .tier-grid {
    grid-template-columns: 1fr;
    max-width: 26rem;
    margin-inline: auto;
  }
}

@media (max-width: 767px) {
  .page {
    padding: 2.25rem 0 3rem;
  }

  .page-title {
    margin-bottom: 1.5rem;
  }
}

/* Mobile */
@media (max-width: 991px) {
  .site-header {
    padding: 0.75rem 0;
  }
}

@media (max-width: 767px) {
  .section {
    padding: 2.5rem 0;
  }
  .section-intro {
    grid-template-columns: 1fr;
    gap: 0.65rem;
    margin-bottom: 1.5rem;
  }
  .section-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  .events-grid {
    grid-template-columns: 1fr;
  }
  .podium {
    grid-template-columns: 1fr;
    max-width: none;
  }
  .site-footer {
    padding: 1.5rem 0 1.25rem;
  }
  .site-footer .row > [class*="col-"] {
    margin-bottom: 0;
  }
  .footer-copy {
    margin-top: 1rem;
    padding-top: 0.85rem;
    font-size: 0.8rem;
    line-height: 1.55;
  }
  .announcement-card {
    padding: 1rem 1.05rem;
  }
  .announcement-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }
}

/* Help Center */
.help-hub-page .page-inner {
  max-width: 56rem;
}

.help-hub {
  padding: 2rem 0 3.5rem;
}

.help-hub-hero {
  text-align: center;
  margin: 0 auto 2.5rem;
  max-width: 34rem;
}

.help-hub-hero .page-title {
  margin-bottom: 0.65rem;
}

.help-hub-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 0.75rem;
}

.help-hub-lead {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
  margin: 0 0 1.35rem;
}

.help-search {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.95rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  max-width: 100%;
}

.help-search i {
  color: var(--muted);
  flex-shrink: 0;
}

.help-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
}

.help-search .btn {
  flex-shrink: 0;
  border-radius: 999px;
}

.help-section {
  margin-bottom: 2.25rem;
}

.help-section-title {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.85rem;
}

.help-category-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.help-category-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-height: 11rem;
  padding: 1.35rem 1.4rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.help-category-card:hover {
  border-color: rgba(88, 101, 242, 0.35);
  color: var(--text);
  transform: translateY(-1px);
}

.help-category-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius);
  background: rgba(88, 101, 242, 0.12);
  color: #8ea1ff;
  font-size: 1.35rem;
}

.help-category-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.help-category-body strong {
  font-size: 1rem;
  line-height: 1.3;
}

.help-category-body span {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.help-category-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.help-category-footer i {
  font-size: 0.85rem;
}

.help-article-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
}

.help-article-card {
  border-bottom: 1px solid var(--border);
}

.help-article-card:last-child {
  border-bottom: 0;
}

.help-article-card-link {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.85rem;
  padding: 0.95rem 1.1rem;
  color: var(--text);
  transition: background 0.15s ease;
}

.help-article-card-link:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.help-article-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.95rem;
}

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

.help-article-card-cat {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.help-article-card-body strong {
  font-size: 0.96rem;
  font-weight: 600;
}

.help-article-card-desc {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.help-article-card-link > .bi-chevron-right {
  color: var(--muted);
  font-size: 0.85rem;
}

.help-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.help-tag {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  font-size: 0.72rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--muted);
  text-decoration: none !important;
}

a.help-tag:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.help-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.84rem;
  margin-bottom: 1.5rem;
}

.help-breadcrumb a {
  color: var(--muted);
}

.help-breadcrumb a:hover {
  color: var(--text);
}

.help-breadcrumb .bi {
  font-size: 0.62rem;
  opacity: 0.7;
}

.help-breadcrumb span {
  color: var(--text);
}

.help-category-header {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.75rem;
}

.help-category-header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-lg);
  background: rgba(88, 101, 242, 0.14);
  color: #8ea1ff;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.help-article {
  margin-bottom: 2rem;
}

.help-article-header {
  padding-bottom: 1.35rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.help-article-cat-link {
  display: inline-block;
  color: #8ea1ff;
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.45rem;
}

.help-article-header .page-title {
  margin-bottom: 0.55rem;
}

.help-article-summary {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.55;
  margin: 0;
  max-width: 38rem;
}

.help-article-header .help-tag-row {
  margin-top: 0.85rem;
}

.help-article-body {
  max-width: 42rem;
}

.help-prose {
  font-size: 0.98rem;
  line-height: 1.65;
}

.help-prose p {
  margin: 0 0 1rem;
  color: var(--text);
}

.help-prose p:last-child {
  margin-bottom: 0;
}

.help-prose-h3,
.help-prose-h2 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.5rem 0 0.65rem;
  line-height: 1.4;
}

.help-prose-h3:first-child,
.help-prose-h2:first-child,
.help-prose-h4:first-child {
  margin-top: 0;
}

.help-prose-h4 {
  font-size: 0.92rem;
  font-weight: 600;
  margin: 1.25rem 0 0.5rem;
  color: var(--text);
}

.help-prose-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.help-prose-list li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.45rem;
  color: var(--text);
}

.help-prose-list li::before {
  content: "-";
  position: absolute;
  left: 0;
  color: var(--muted);
}

.help-prose-list li:last-child {
  margin-bottom: 0;
}

.help-prose-figure {
  margin: 1.25rem 0;
}

.help-prose-figure img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.help-prose-figure figcaption {
  color: var(--muted);
  font-size: 0.86rem;
  margin-top: 0.45rem;
}

.help-prose-gallery {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.help-prose-gallery-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 1rem;
}

.help-prose-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 1rem;
}

.help-prose-figure-compact {
  margin: 0;
}

.help-prose-figure-compact img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.help-prose-aside {
  margin-top: 1.5rem;
  padding: 1rem 1.05rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.help-prose-aside-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  font-weight: 600;
  margin: 0 0 0.55rem;
}

.help-prose-aside-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.help-prose-aside-list li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.35rem;
}

.help-prose-aside-list li::before {
  content: "-";
  position: absolute;
  left: 0;
  color: var(--muted);
}

.help-empty {
  color: var(--muted);
  padding: 1rem 0;
}

.help-hub-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.help-hub-cta p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.help-hub-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.help-section-related {
  padding-top: 0.5rem;
}

@media (max-width: 991px) {
  .help-category-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .help-hub {
    padding-top: 1.5rem;
  }

  .help-hub-hero {
    text-align: left;
    max-width: none;
  }

  .help-search {
    border-radius: var(--radius-lg);
    flex-wrap: wrap;
  }

  .help-search .btn {
    width: 100%;
  }
}

/* Help editor */
.help-editor {
  padding: 2rem 0 4rem;
}

.help-editor-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.help-editor-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.5rem;
}

.help-editor-nav a {
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.88rem;
}

.help-editor-nav a.is-active,
.help-editor-nav a:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--surface);
}

.help-editor-login {
  max-width: 24rem;
  padding: 1.25rem;
}

.help-editor-input {
  background: var(--surface-2) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

.help-editor-input:focus {
  border-color: var(--border-strong) !important;
  box-shadow: none !important;
}

.help-editor-alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 0.92rem;
}

.help-editor-alert-success {
  background: rgba(59, 165, 93, 0.12);
  border: 1px solid rgba(59, 165, 93, 0.35);
}

.help-editor-alert-danger {
  background: rgba(220, 80, 80, 0.12);
  border: 1px solid rgba(220, 80, 80, 0.35);
}

.help-editor-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
}

.help-editor-grid-wide {
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr);
}

.help-editor-panel {
  padding: 1.15rem 1.2rem;
}

.help-editor-panel h2 {
  font-size: 1.05rem;
  margin: 0 0 1rem;
}

.help-editor-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.45rem;
  font-size: 0.92rem;
}

.help-editor-list-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.help-editor-list-actions form {
  margin: 0;
}

.help-editor-link-btn {
  background: none;
  border: 0;
  color: var(--link);
  padding: 0;
  cursor: pointer;
  font-size: inherit;
}

.help-editor-link-btn:hover {
  color: #a8d4f5;
}

.help-editor-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.help-editor-stat {
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}

.help-editor-stat strong {
  display: block;
  font-size: 1.5rem;
}

.help-editor-stat span {
  color: var(--muted);
  font-size: 0.85rem;
}

.help-editor-hint,
.help-editor-back {
  color: var(--muted);
  font-size: 0.92rem;
}

.help-editor-check {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.5rem;
}

.help-block-builder {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem;
  background: var(--surface-2);
}

.help-block-builder-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.help-block-builder-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.help-block-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem;
  margin-bottom: 0.55rem;
}

.help-block-row-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.help-link-row {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 0.45rem;
}

.help-draft {
  color: #e8a060;
  font-style: normal;
  font-size: 0.75rem;
  margin-left: 0.35rem;
}

@media (max-width: 991px) {
  .help-editor-grid,
  .help-editor-grid-wide {
    grid-template-columns: 1fr;
  }
}
