/*
  Role tokens (--bg, --fg, --accent, --gold, and the rest) are the theme.
  Palette tokens are sampled from the AzerPulse mark:
  ground #05070c, deep blue #021c3f / #021126, gold #cf9b3e, pulse #18aff0.
  A light theme can override the role tokens later. There is no toggle.
*/

:root {
  --palette-ground: #05070c;
  --palette-ground-soft: #0b1220;
  --palette-deep: #021c3f;
  --palette-deep-ink: #021126;
  --palette-gold: #cf9b3e;
  --palette-gold-bright: #f0d48a;
  --palette-pulse: #18aff0;
  --palette-pulse-bright: #5aebff;

  --bg: var(--palette-ground);
  --bg-raised: var(--palette-ground-soft);
  --bg-deep: var(--palette-deep);
  --bg-ink: var(--palette-deep-ink);
  --fg: #e7eef6;
  --fg-muted: #b7c4d4;
  --fg-faint: #8ea0b5;
  --accent: var(--palette-pulse);
  --accent-bright: var(--palette-pulse-bright);
  --gold: var(--palette-gold);
  --gold-bright: var(--palette-gold-bright);
  --line: rgba(207, 155, 62, 0.42);
  --line-soft: rgba(207, 155, 62, 0.2);
  --header-h: 4.25rem;
  --nav-w: 16rem;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.45);

  color-scheme: dark;
}

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

html {
  height: 100%;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  font-family: "Segoe UI", "Helvetica Neue", system-ui, sans-serif;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--fg);
  background:
    radial-gradient(980px 420px at 12% -8%, rgba(2, 28, 63, 0.9), transparent 62%),
    var(--bg);
}

button {
  font: inherit;
}

a {
  color: var(--accent-bright);
}

a:hover {
  color: var(--fg);
}

:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: 0.6rem;
  z-index: 40;
  padding: 0.4rem 0.7rem;
  background: var(--bg-raised);
  color: var(--fg);
  transform: translateY(-150%);
}

.skip:focus {
  transform: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: var(--header-h);
  padding: 0.5rem 1.15rem;
  background: rgba(5, 7, 12, 0.94);
  border-bottom: 1px solid var(--line);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.6rem;
  height: 2.6rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: transparent;
  cursor: pointer;
}

html.js .nav-toggle {
  display: inline-flex;
}

.nav-toggle span {
  display: block;
  width: 1.05rem;
  height: 2px;
  margin-inline: auto;
  background: var(--gold-bright);
  transform-origin: center;
}

html.js .nav-toggle span {
  transition: transform 160ms ease, opacity 160ms ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.brand:hover {
  color: inherit;
}

.brand img {
  width: 3.15rem;
  height: 3.15rem;
  flex: none;
  display: block;
}

.brand-name {
  font-family: Palatino, "Palatino Linotype", "Iowan Old Style", Georgia, serif;
  font-size: clamp(1.05rem, 3.4vw, 1.4rem);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1;
}

.brand-name .azer {
  color: var(--gold-bright);
}

.brand-name .pulse {
  color: var(--accent-bright);
}

.shell {
  display: flex;
  flex: 1 1 auto;
  align-items: stretch;
  width: 100%;
}

.site-nav {
  width: var(--nav-w);
  flex: none;
  padding: 1.35rem 0.85rem 2rem;
  background: linear-gradient(180deg, var(--bg-ink) 0%, #071018 72%);
  border-right: 1px solid var(--line-soft);
}

html.nav-is-collapsed .site-nav,
body.nav-collapsed .site-nav {
  width: 0;
  padding-inline: 0;
  border-right-width: 0;
  overflow: hidden;
  visibility: hidden;
}

.nav-label {
  margin: 0 0.7rem 0.45rem;
  color: var(--gold-bright);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

.site-nav a {
  display: block;
  margin: 0.1rem 0;
  padding: 0.5rem 0.75rem;
  color: var(--fg-muted);
  text-decoration: none;
  border-left: 2px solid transparent;
}

.site-nav a:hover {
  color: var(--fg);
  background: rgba(24, 175, 240, 0.08);
}

.site-nav a[aria-current="page"] {
  color: var(--accent-bright);
  border-left-color: var(--accent);
  background: rgba(24, 175, 240, 0.12);
}

.nav-backdrop {
  display: none;
  border: 0;
  padding: 0;
  margin: 0;
  background: rgba(0, 0, 0, 0.55);
  cursor: pointer;
}

main {
  flex: 1 1 auto;
  min-width: 0;
  padding: 2.4rem 1.6rem 3.2rem;
}

.page {
  max-width: 44rem;
}

.page-wide {
  max-width: 54rem;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2 {
  font-family: Palatino, "Palatino Linotype", "Iowan Old Style", Georgia, serif;
  font-weight: 600;
  line-height: 1.2;
}

h1 {
  margin: 0.35rem 0 0.4rem;
  color: var(--fg);
  font-size: clamp(1.85rem, 4vw, 2.45rem);
}

h2 {
  margin: 1.7rem 0 0.55rem;
  color: var(--gold-bright);
  font-size: 1.35rem;
}

.pulse-rule {
  width: min(16rem, 70%);
  height: 2px;
  margin: 0.85rem 0 1.15rem;
  background: linear-gradient(90deg, transparent, var(--accent) 18%, var(--accent-bright) 50%, var(--accent) 82%, transparent);
  box-shadow: 0 0 12px rgba(24, 175, 240, 0.55);
}

.lede {
  margin-top: 0;
  font-size: 1.15rem;
}

.page p,
.doc p,
.doc li {
  color: var(--fg);
}

.page p,
.doc p {
  margin: 0.75rem 0;
}

.notice {
  margin: 1.3rem 0 0.4rem;
  padding: 0.75rem 0.95rem;
  border-left: 3px solid var(--gold);
  background: rgba(2, 28, 63, 0.45);
}

.fields {
  display: grid;
  grid-template-columns: 11rem 1fr;
  margin: 0.4rem 0 0.2rem;
  border-top: 1px solid var(--line-soft);
}

.fields dt,
.fields dd {
  margin: 0;
  padding: 0.65rem 0.15rem;
  border-bottom: 1px solid var(--line-soft);
}

.fields dt {
  color: var(--gold-bright);
}

.fields dd {
  color: var(--fg);
}

.catalog {
  list-style: none;
  margin: 1.4rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}

.catalog a {
  display: block;
  padding: 0.9rem 1rem 1rem;
  color: inherit;
  text-decoration: none;
  background: rgba(2, 17, 38, 0.55);
  border-left: 3px solid var(--gold);
  box-shadow: var(--shadow);
}

.catalog a:hover {
  color: inherit;
  border-left-color: var(--accent-bright);
  background: rgba(2, 28, 63, 0.72);
}

.catalog h2 {
  margin: 0 0 0.3rem;
  font-size: 1.25rem;
}

.catalog p {
  margin: 0;
  color: var(--fg-muted);
}

.empty {
  margin-top: 1.1rem;
  padding: 1.6rem 1rem;
  text-align: center;
  color: var(--fg-muted);
  border: 1px dashed var(--line);
  background: rgba(5, 7, 12, 0.35);
}

.empty p {
  margin: 0;
  color: var(--fg-muted);
}

.doc a {
  text-underline-offset: 0.16em;
}

.doc ul {
  margin: 0.4rem 0 0.9rem;
  padding-left: 1.2rem;
}

.doc h1 {
  font-size: clamp(1.7rem, 3vw, 2.1rem);
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1.25rem;
  padding: 0.95rem 1.25rem 1.15rem;
  border-top: 1px solid var(--line-soft);
  color: var(--fg-faint);
  font-size: 0.95rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1.1rem;
}

.site-footer a {
  color: var(--accent);
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a[aria-current="page"] {
  color: var(--accent-bright);
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 760px) {
  .site-header {
    padding-inline: 0.7rem;
    gap: 0.5rem;
  }

  html.js .site-nav {
    position: fixed;
    transition: transform 160ms ease;
    z-index: 25;
    top: var(--header-h);
    bottom: 0;
    left: 0;
    width: min(18rem, 86vw);
    padding: 1.2rem 0.85rem 2rem;
    border-right: 1px solid var(--line-soft);
    overflow: auto;
    visibility: hidden;
    transform: translateX(-105%);
    box-shadow: var(--shadow);
  }

  html.js body.nav-open .site-nav {
    visibility: visible;
    transform: none;
  }

  html.js body.nav-open .nav-backdrop {
    display: block;
    position: fixed;
    z-index: 24;
    inset: var(--header-h) 0 0 0;
  }

  html.js body.nav-open {
    overflow: hidden;
  }

  main {
    padding: 1.45rem 1rem 2.5rem;
  }

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

  .fields dt {
    padding-bottom: 0;
    border-bottom: 0;
  }

  .fields dd {
    padding-top: 0.15rem;
  }
}

p.banner {
  margin: 0.4rem 0 1rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line);
  background: rgba(207, 155, 62, 0.08);
  color: var(--gold-bright);
}

p.updated {
  margin: 0.2rem 0 1rem;
  color: var(--fg-muted);
}

.updated-value {
  color: var(--fg);
}

.portrait {
  width: 5.5rem;
  height: 5.5rem;
  display: grid;
  place-items: center;
  margin: 0.3rem 0 0.8rem;
  border: 1px dashed var(--line);
  background: rgba(2, 17, 38, 0.55);
  color: var(--fg-muted);
  font-size: 0.82rem;
  text-align: center;
}

.shape {
  list-style: none;
  margin: 0.4rem 0 1rem;
  padding: 0;
  border-top: 1px solid var(--line-soft);
}

.shape li {
  display: grid;
  grid-template-columns: 9.5rem 8.5rem 1fr;
  gap: 0.4rem 0.8rem;
  padding: 0.55rem 0.1rem;
  border-bottom: 1px solid var(--line-soft);
}

.shape-name {
  color: var(--gold-bright);
}

.shape-state {
  color: var(--fg);
}

.shape-note {
  color: var(--fg-muted);
}

.tabs {
  margin-top: 1.4rem;
}

.tablist {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--line-soft);
}

.tablist button {
  margin: 0;
  padding: 0.55rem 0.95rem;
  border: 1px solid transparent;
  border-bottom: 0;
  background: transparent;
  color: var(--fg-muted);
  cursor: pointer;
}

.tablist button[aria-selected="true"] {
  color: var(--accent-bright);
  border-color: var(--line);
  background: rgba(2, 28, 63, 0.65);
}

.tab-panel {
  padding-top: 1rem;
}

.doll {
  display: grid;
  grid-template-columns: auto minmax(5.5rem, 1fr) auto;
  gap: 0.45rem 0.75rem;
  align-items: center;
  max-width: 40rem;
}

.slot-col {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.slot {
  position: relative;
  width: 6.4rem;
  height: 3.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.3rem;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(24, 175, 240, 0.08), transparent 55%),
    rgba(2, 17, 38, 0.85);
  color: var(--gold-bright);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  line-height: 1.15;
  text-align: center;
  text-transform: uppercase;
  cursor: pointer;
}

.slot-label {
  display: block;
  max-width: 100%;
}

.slot:hover,
.slot.is-open {
  border-color: var(--accent);
  color: var(--accent-bright);
}

.doll-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 16rem;
}

.mannequin {
  width: 6.5rem;
  height: 16rem;
  border: 1px solid var(--line-soft);
  border-radius: 3.2rem 3.2rem 0.8rem 0.8rem;
  background:
    radial-gradient(circle at 50% 16%, rgba(90, 235, 255, 0.28), transparent 26%),
    linear-gradient(180deg, rgba(2, 28, 63, 0.15), rgba(207, 155, 62, 0.12));
}

.weapon-row {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
}

.tip {
  position: absolute;
  z-index: 8;
  width: 13.5rem;
  padding: 0.55rem 0.7rem 0.65rem;
  border: 1px solid var(--gold);
  background: #070d18;
  box-shadow: var(--shadow);
  color: var(--fg);
  font-size: 0.92rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.35;
  text-align: left;
  text-transform: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.slot-col.left .tip {
  left: calc(100% + 0.45rem);
  top: 0;
}

.slot-col.right .tip {
  right: calc(100% + 0.45rem);
  top: 0;
}

.weapon-row .tip {
  bottom: calc(100% + 0.45rem);
  left: 50%;
  transform: translateX(-50%);
}

.slot:hover .tip,
.slot:focus-visible .tip,
.slot.is-open .tip {
  opacity: 1;
  visibility: visible;
}

.tip-kicker,
.tip-note {
  display: block;
  color: var(--accent-bright);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tip-name {
  display: block;
  margin: 0.12rem 0 0.2rem;
  color: var(--gold-bright);
  font-family: Palatino, "Palatino Linotype", "Iowan Old Style", Georgia, serif;
  font-size: 1.05rem;
}

.tip-line,
.tip-stat {
  display: block;
}

.tip-line {
  color: var(--fg-muted);
}

.tip-note {
  margin-top: 0.35rem;
  letter-spacing: 0.04em;
}

.live-list {
  list-style: none;
  margin: 0.4rem 0 0.8rem;
  padding: 0;
}

.live-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  max-width: 22rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--line-soft);
}

.live-toggle {
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--line);
  background: rgba(2, 28, 63, 0.55);
  color: var(--gold-bright);
  cursor: pointer;
}

.live-toggle[aria-expanded="true"] {
  border-color: var(--accent);
  color: var(--accent-bright);
}

.player-frame {
  display: grid;
  place-items: center;
  min-height: 11rem;
  margin-top: 0.75rem;
  padding: 1rem;
  border: 1px dashed var(--line);
  background: rgba(5, 7, 12, 0.65);
  color: var(--fg-muted);
  text-align: center;
}

.watch-link {
  color: var(--fg);
}

@media (max-width: 760px) {
  .shape li {
    grid-template-columns: 1fr;
    gap: 0.1rem;
  }

  .slot {
    width: 4.3rem;
    height: 2.7rem;
    font-size: 0.6rem;
  }

  .mannequin {
    width: 3.4rem;
    height: 12rem;
  }

  .doll-stage {
    min-height: 12rem;
  }

  .tip,
  .slot-col.left .tip,
  .slot-col.right .tip,
  .weapon-row .tip {
    position: fixed;
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    top: auto;
    width: auto;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.js .nav-toggle span,
  html.js .site-nav {
    transition: none;
  }
}
