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

body {
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(43, 127, 255, 0.08) 0%, transparent 60%),
    var(--color-bg);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: linear-gradient(180deg, rgba(5, 8, 15, 0.92) 0%, rgba(5, 8, 15, 0.75) 100%);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-6);
  padding-block: var(--space-4);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.brand img {
  width: 30px;
  height: 30px;
}

.brand-text {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: 16px;
  white-space: nowrap;
}

.brand-text-accent {
  color: var(--color-brand-strike);
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
  font-family: var(--font-body);
  font-size: var(--fs-200);
  font-weight: var(--fw-medium);
}

.main-nav a {
  position: relative;
  color: var(--color-text-muted);
  padding: var(--space-2) 0;
  transition: color var(--duration-base) var(--ease-standard);
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration-base) var(--ease-standard);
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--color-text);
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after {
  transform: scaleX(1);
}

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-1);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-text);
  transition: transform var(--duration-base) var(--ease-standard), opacity var(--duration-base) var(--ease-standard);
}

.menu-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(3.5px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

/* Was `.btn btn--secondary` layered under `.header-account`'s own
   background override - the secondary button's visible border plus this
   class's solid fill fought each other into a boxy chip that read as a
   downgraded, half-finished version of the flat blue "Login / Register"
   CTA it replaces on sign-in, rather than a clean account indicator. Built
   as its own component instead of a reskinned button: no border, a soft
   fill only on hover, and the same accent ring the profile page's own
   avatar (.avatar--xl) already uses, so it reads as "this is you" rather
   than "click here". */
.header-account {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-4) var(--space-1) var(--space-1);
  border-radius: var(--radius-full);
  min-height: 44px;
  font-family: var(--font-body);
  font-size: var(--fs-200);
  font-weight: var(--fw-bold);
  color: var(--color-text-muted);
  transition: background var(--duration-fast) var(--ease-standard), color var(--duration-fast) var(--ease-standard);
}
.header-account:hover:not(:disabled),
.header-account:focus-visible {
  background: var(--color-surface-hover);
  color: var(--color-text);
}
.header-account-avatar {
  --avatar-size: 32px;
  border: 2px solid var(--color-accent);
}
.header-account img {
  border-radius: 50%;
}

/* components.css's generic .hero fills a card-like box (background +
   border) for the compact hero used on the app dashboard/profile/project
   pages. This marketing hero is full-bleed under the sticky header instead,
   with its own wedge/grid treatment - inheriting that fill+border by
   accident produced an unintended seam against both the header above and
   the .features section below. Reset explicitly so it's a deliberate
   choice, not a collision. Safe to do only in this file: styles.css is the
   only stylesheet where an element with class "hero" actually appears. */
.hero {
  position: relative;
  min-height: clamp(420px, 62vh, 680px);
  display: flex;
  align-items: center;
  overflow: hidden;
  background: transparent;
  border: none;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background-image:
    linear-gradient(var(--color-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--color-border) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 68% 30%, black 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 68% 30%, black 0%, transparent 75%);
  pointer-events: none;
}

/* Marketing-specific wedge: wider (52% vs the app-card hero's 46%) and
   layered over the dot-grid above, not a standalone card accent. Same
   specificity as components.css's .hero-wedge - wins because this
   stylesheet loads after it. */
.hero-wedge {
  width: 52%;
  clip-path: polygon(40% 0, 100% 0, 100% 100%, 62% 100%);
  background: linear-gradient(100deg, transparent 22%, var(--color-accent-muted) 100%);
}

.hero-content {
  max-width: 640px;
  padding-block: var(--space-9);
}

.hero-content > .reveal:nth-child(1) {
  animation-delay: 0ms;
}
.hero-content > .reveal:nth-child(2) {
  animation-delay: 80ms;
}
.hero-content > .reveal:nth-child(3) {
  animation-delay: 160ms;
}
.hero-content > .reveal:nth-child(4) {
  animation-delay: 220ms;
}
.hero-content > .reveal:nth-child(5) {
  animation-delay: 280ms;
}
.hero-content > .reveal:nth-child(6) {
  animation-delay: 340ms;
}
.hero-content > .reveal:nth-child(7) {
  animation-delay: 400ms;
}

.hero-content h1 {
  display: flex;
  flex-direction: column;
  font-size: var(--fs-900);
  line-height: 0.94;
  letter-spacing: -0.01em;
  margin-block: var(--space-3) var(--space-2);
}

.hero-content h1 span:last-child {
  color: var(--color-brand-strike);
}

.hero-content h2 {
  font-family: var(--font-body);
  font-size: var(--fs-400);
  font-weight: var(--fw-medium);
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

.lead {
  font-size: var(--fs-400);
  color: var(--color-text-muted);
  max-width: 52ch;
  margin-bottom: var(--space-6);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-bottom: var(--space-7);
}

.hero-actions img {
  border-radius: 0;
}

/* Deliberately given more visual weight than a typical fine-print note -
   this is the one line that keeps someone from signing in only to hit
   Access Denied, so it needs to actually get read. An accent-tinted left
   rule plus muted (not faint) body text draws the eye without borrowing
   the danger/warning palette - it's guidance, not a problem. */
.hero-note {
  font-size: var(--fs-300);
  color: var(--color-text-muted);
  border-left: 2px solid var(--color-accent-border);
  padding-left: var(--space-3);
  margin-bottom: var(--space-6);
}
.hero-note a {
  color: var(--color-accent-hover);
  font-weight: var(--fw-medium);
}
.hero-note a:hover,
.hero-note a:focus-visible {
  color: var(--color-text);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
}

.hero-meta li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-faint);
  font-family: var(--font-body);
  font-weight: var(--fw-medium);
  font-size: var(--fs-100);
}

.hero-meta svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.news {
  padding-block: var(--space-9);
}

.legal {
  padding-block: var(--space-9);
}

/* 4-column layout: gutter / content / sticky table-of-contents / gutter.
   Collapses to a single centered column with the TOC dropped below 1024px -
   a sticky sidebar next to ~13 lines of visible content doesn't earn its
   keep on a narrow viewport. */
.legal-layout {
  display: grid;
  grid-template-columns: 1fr 700px 200px 1fr;
}
.legal-content {
  grid-column: 2;
  max-width: 700px;
}
.legal-toc-col {
  grid-column: 3;
  padding-left: var(--space-5);
}
.legal-toc {
  position: sticky;
  top: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  border-left: 2px solid var(--color-border);
  padding-left: var(--space-4);
}
.legal-toc-label {
  font-size: var(--fs-100);
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-faint);
  margin-bottom: var(--space-1);
}
.legal-toc a {
  font-size: var(--fs-200);
  font-weight: var(--fw-medium);
  color: var(--color-text-muted);
  transition: color var(--duration-base) var(--ease-standard);
}
.legal-toc a:hover,
.legal-toc a.is-active {
  color: var(--color-accent-hover);
}
@media (max-width: 1024px) {
  .legal-layout {
    grid-template-columns: 1fr;
    max-width: 700px;
    margin-inline: auto;
    padding-inline: var(--space-5);
  }
  .legal-content {
    grid-column: 1;
    max-width: none;
  }
  .legal-toc-col {
    display: none;
  }
}

.legal-content h1 {
  font-size: var(--fs-700);
  margin-top: var(--space-2);
  margin-bottom: var(--space-2);
}
.legal-updated {
  color: var(--color-text-faint);
  font-size: var(--fs-200);
  margin-bottom: var(--space-7);
}
.legal-content h2 {
  font-size: var(--fs-400);
  margin-top: var(--space-7);
  margin-bottom: var(--space-3);
}
.legal-content p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}
.legal-content p:first-of-type {
  color: var(--color-text);
}
.legal-content a {
  color: var(--color-accent-hover);
}
.legal-content a:hover {
  color: var(--color-text);
}
/* Inline code (file paths, error strings) in a guide/article write-up -
   the site otherwise never has inline code, so this only needs to exist
   scoped to .legal-content rather than as a bare global `code` rule. Reuses
   --font-mono, same as ELO/K/D/price readouts elsewhere, so it reads as
   "literal value" rather than styled prose. */
.legal-content code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-1);
  padding: 0.15em 0.4em;
}

/* Important standalone line inside a guide (e.g. "Currently in Beta - do
   not ask for an invite code") - same accent-rule-plus-bright-text
   treatment as .hero-note ("guidance, not a problem" - see that class's own
   comment in this file), just scoped under .legal-content so it wins over
   the plain `.legal-content p` muted-text rule instead of losing a
   specificity tie to whichever is declared later. */
.legal-content .notice {
  border-left: 2px solid var(--color-accent-border);
  padding-left: var(--space-3);
  color: var(--color-text);
  font-weight: var(--fw-bold);
}

/* Small solid-color indicator for the rank distribution table - the tier
   colors already exist as --rank-* tokens (used at low opacity by
   .tier-chip's pill badges elsewhere); this is the same palette as a bare
   dot instead, since a table row doesn't need a full badge. */
.rank-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: var(--space-2);
}
.rank-dot--e { background: var(--rank-e); }
.rank-dot--d { background: var(--rank-d); }
.rank-dot--c { background: var(--rank-c); }
.rank-dot--b { background: var(--rank-b); }
.rank-dot--a { background: var(--rank-a); }
.rank-dot--star { background: var(--rank-star); }

.legal-content > .reveal:nth-child(1) {
  animation-delay: 0ms;
}
.legal-content > .reveal:nth-child(2) {
  animation-delay: 80ms;
}
.legal-content > .reveal:nth-child(3) {
  animation-delay: 140ms;
}
.legal-content > .reveal:nth-child(4) {
  animation-delay: 200ms;
}

.features {
  padding-block: var(--space-9);
  border-top: 1px solid var(--color-border);
}

.features-heading {
  max-width: 60ch;
  margin-bottom: var(--space-6);
}

.features-heading h3 {
  font-size: var(--fs-600);
  margin-top: var(--space-2);
}

/* One flagship feature (Ranked Competitive) called out on its own, wide
   and horizontal, above the remaining three in a tighter grid below - not
   four identical icon-cards in a uniform row. That uniform-grid-of-cards
   shape is one of the most recognizable "generated landing page" tells
   there is; giving one feature actual visual priority reads as an editorial
   choice instead of a template being filled in four times. */
.feature-spotlight {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  padding: var(--space-6);
  margin-bottom: var(--space-5);
}
.feature-spotlight .feature-icon {
  margin-bottom: 0;
  flex-shrink: 0;
}
.feature-spotlight-body h3 {
  font-size: var(--fs-500);
  margin-bottom: var(--space-2);
}
.feature-spotlight-body p {
  color: var(--color-text-muted);
  font-size: var(--fs-300);
  max-width: 60ch;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}

.features-grid .reveal:nth-child(2) {
  animation-delay: 70ms;
}
.features-grid .reveal:nth-child(3) {
  animation-delay: 140ms;
}

.feature-card {
  transition: transform var(--duration-base) var(--ease-standard), border-color var(--duration-base) var(--ease-standard), box-shadow var(--duration-base) var(--ease-standard);
}
.feature-card:hover {
  transform: translateY(-3px);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-2);
  background: var(--color-accent-muted);
  color: var(--color-accent-hover);
  display: grid;
  place-items: center;
  margin-bottom: var(--space-4);
  transition: box-shadow var(--duration-base) var(--ease-standard);
}
.feature-card:hover .feature-icon {
  box-shadow: 0 0 16px var(--color-accent-muted);
}
.feature-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
}
.feature-card h3 {
  font-size: var(--fs-400);
  margin-bottom: var(--space-2);
}
.feature-card p {
  color: var(--color-text-muted);
  font-size: var(--fs-200);
}

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

.news-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--space-6);
}

.news-heading h3 {
  font-size: var(--fs-500);
}

.news-link {
  color: var(--color-accent-hover);
  font-family: var(--font-body);
  font-weight: var(--fw-bold);
  font-size: var(--fs-200);
  transition: color var(--duration-base) var(--ease-standard);
}
.news-link:hover {
  color: var(--color-text);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.news-grid .reveal:nth-child(2) {
  animation-delay: 100ms;
}
.news-grid .reveal:nth-child(3) {
  animation-delay: 200ms;
}

.news-card {
  border-radius: var(--radius-2);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  box-shadow: inset 3px 0 0 transparent;
  transition: border-color var(--duration-base) var(--ease-standard), box-shadow var(--duration-base) var(--ease-standard);
}
.news-card:hover,
.news-card:focus-within {
  border-color: var(--color-border-strong);
  box-shadow: inset 3px 0 0 var(--color-accent);
}

.news-card img {
  width: 100%;
  height: 186px;
  object-fit: cover;
  filter: brightness(0.88) saturate(0.85);
  transition: filter var(--duration-base) var(--ease-standard);
}
.news-card:hover img,
.news-card:focus-within img {
  filter: brightness(1) saturate(1);
}

.news-card > div {
  padding: var(--space-5);
}

.news-date {
  font-family: var(--font-mono);
  font-size: var(--fs-100);
  color: var(--color-text-faint);
  margin-bottom: var(--space-2);
}

.news-card h4 {
  font-size: var(--fs-400);
  margin-bottom: var(--space-2);
}

.news-card p:not(.news-date) {
  color: var(--color-text-muted);
  font-size: var(--fs-200);
  margin-bottom: var(--space-3);
}

.news-card > div > a {
  color: var(--color-accent-hover);
  font-size: var(--fs-200);
  font-weight: var(--fw-medium);
}
.news-card > div > a:hover {
  color: var(--color-text);
}

.faq {
  padding-block: var(--space-9);
  border-top: 1px solid var(--color-border);
}

.faq-heading {
  margin-bottom: var(--space-6);
  text-align: center;
}
.faq-heading h3 {
  font-size: var(--fs-500);
  margin-top: var(--space-1);
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-items: start;
  gap: var(--space-3);
  max-width: 1100px;
  margin-inline: auto;
}

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2);
  background: var(--color-surface);
  padding: var(--space-4) var(--space-5);
  transition: border-color var(--duration-base) var(--ease-standard);
}
.faq-item:hover,
.faq-item[open] {
  border-color: var(--color-accent-border);
}

.faq-grid .reveal:nth-child(3),
.faq-grid .reveal:nth-child(4) {
  animation-delay: 70ms;
}
.faq-grid .reveal:nth-child(5),
.faq-grid .reveal:nth-child(6) {
  animation-delay: 140ms;
}
.faq-grid .reveal:nth-child(7),
.faq-grid .reveal:nth-child(8) {
  animation-delay: 210ms;
}

.faq-item summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: var(--fw-medium);
  font-size: var(--fs-300);
  list-style: none;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary::before {
  content: "+";
  display: inline-block;
  width: 1.2em;
  color: var(--color-accent-hover);
}
.faq-item[open] summary::before {
  content: "\2212";
}

.faq-item p {
  margin-top: var(--space-3);
  color: var(--color-text-muted);
  font-size: var(--fs-300);
}

.site-footer {
  border-top: 1px solid var(--color-border);
  padding-block: var(--space-6);
}

/* Grid, not flex space-between - space-between only splits the leftover
   space into two gaps, it doesn't center the middle item. That was fine
   while .footer-links was narrow, but grew visibly lopsided (nav sitting
   left-of-center, a big trailing gap before .socials) once News/Guides
   widened it. A 1fr/auto/1fr grid keeps the nav genuinely centered no
   matter how wide it is. */
.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-4);
}
.footer-inner .socials {
  justify-self: end;
}

.copyright,
.footer-links a {
  font-size: var(--fs-200);
  color: var(--color-text-faint);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
}
.footer-links a:hover {
  color: var(--color-text-muted);
}

.socials {
  display: flex;
  gap: var(--space-4);
}
.socials a {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  transition: border-color var(--duration-base) var(--ease-standard), background var(--duration-base) var(--ease-standard);
}
.socials svg {
  width: 16px;
  height: 16px;
  fill: var(--color-text-muted);
}
.socials a:hover {
  border-color: var(--color-accent-border);
  background: var(--color-accent-muted);
}

@media (max-width: 1024px) {
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .faq-grid {
    max-width: none;
  }

  .header-inner {
    display: flex;
  }
  .brand {
    margin-right: auto;

    min-width: 0;
  }
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--color-bg-elevated);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-3) var(--space-5);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--duration-base) var(--ease-standard), opacity var(--duration-base) var(--ease-standard);
  }
  .main-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-scrim {
    position: fixed;
    inset: 0;
    z-index: calc(var(--z-sticky) - 1);
    background: rgba(2, 6, 14, 0.6);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--duration-base) var(--ease-standard);
  }
  .nav-scrim.is-open {
    opacity: 1;
    pointer-events: auto;
  }
  .main-nav a {
    padding: var(--space-3) 0;
    width: 100%;
    border-top: 1px solid var(--color-border);
  }
  .main-nav a:first-child {
    border-top: none;
  }
  .menu-toggle {
    display: flex;
  }
  .header-account span:not(.avatar),
  .header-login span {
    display: none;
  }
  .header-account {
    padding: var(--space-1);
    width: 44px;
    flex-shrink: 0;
  }
  .header-login {
    padding: 0;
    width: 44px;
    flex-shrink: 0;
  }
}

@media (max-width: 768px) {
  .faq-grid {
    grid-template-columns: 1fr;
  }
  .news-grid {
    grid-template-columns: 1fr;
  }
  .footer-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-inner .socials {
    justify-self: auto;
  }
  .feature-spotlight {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: clamp(3.2rem, 14vw, 5rem);
  }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn--lg {
    padding-inline: var(--space-5);
    font-size: var(--fs-300);
  }
}
