/* ==========================================================================
   WarZone Conquer base layer.
   Reset, type, layout primitives and every shared component. Mobile is the
   base; wider screens are layered on with min-width. Values come from
   tokens.css only.
   ========================================================================== */

/* ---------- Reset ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-height) + var(--space-4));
}

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

html {
  background-color: var(--surface-page);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  font-weight: var(--weight-regular);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  /* Text set straight on the key art keeps a dark halo. Surfaces that carry
     their own background drop it so their text stays crisp. */
  text-shadow: var(--text-glow);
}

.wz-panel,
.wz-btn,
.wz-badge,
.wz-alert,
.wz-cookie,
.wz-table,
input,
textarea,
select {
  text-shadow: none;
}

/* The key art sits fixed behind every page under a dark scrim. A fixed
   pseudo-element instead of background-attachment: fixed, which phones
   ignore. Phones get the portrait crop, wide screens the full scene. */
body::before {
  content: '';
  position: fixed;
  /* Runs past the bottom of the screen so the wallpaper's credit strip
     (the bottom 3% of the art) is never on screen */
  inset: 0 0 calc(var(--space-16) * -1) 0;
  z-index: var(--z-wall);
  background-image: var(--wall-vignette), var(--wall-scrim-portrait), url('../../images/wz/wallpaper-portrait.webp');
  background-position: center, center, 50% 30%;
  background-size: cover, cover, cover;
  background-repeat: no-repeat;
  pointer-events: none;
}

@media (min-aspect-ratio: 4/5) {
  body::before {
    background-image: var(--wall-vignette), var(--wall-scrim), url('../../images/wz/wallpaper-1280.webp');
    background-position: center, center, 40% 30%;
  }
}

@media (min-aspect-ratio: 4/5) and (min-width: 80rem) {
  body::before {
    background-image: var(--wall-vignette), var(--wall-scrim), url('../../images/wz/wallpaper-1920.webp');
  }
}

main {
  flex: 1 0 auto;
}

main:focus {
  outline: none;
}

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

img {
  height: auto;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
figure,
blockquote {
  margin: 0;
}

ul[class],
ol[class] {
  padding: 0;
  list-style: none;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: var(--text-accent);
  text-decoration-thickness: var(--hairline);
  text-underline-offset: 0.2em;
  transition: color var(--duration-fast) var(--ease-out);
}

a:hover {
  color: var(--action-primary-hover);
}

:focus-visible {
  outline: var(--focus-width) solid var(--focus-ring);
  outline-offset: var(--focus-offset);
}

::selection {
  background: var(--action-primary);
  color: var(--text-on-accent);
}

hr {
  border: 0;
  height: var(--hairline);
  background: var(--border-subtle);
  margin: var(--space-8) 0;
}

[hidden] {
  display: none !important;
}

/* With JavaScript off, every tab panel stays readable in order */
.no-js [role='tabpanel'][hidden] {
  display: block !important;
}

/* ---------- Typography ---------- */

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-display);
  color: var(--text-heading);
  text-wrap: balance;
}

h1 {
  font-size: var(--text-3xl);
}

h2 {
  font-size: var(--text-2xl);
}

h3 {
  font-size: var(--text-xl);
}

h4 {
  font-size: var(--text-lg);
}

p {
  text-wrap: pretty;
}

.wz-display {
  font-family: var(--font-display);
  font-size: var(--text-display);
  font-weight: var(--weight-black);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-display);
  color: var(--text-heading);
  max-width: var(--measure-display);
}

.wz-h1 {
  font-size: var(--text-3xl);
}

.wz-h2 {
  font-size: var(--text-2xl);
}

.wz-h3 {
  font-size: var(--text-xl);
}

.wz-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-label);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-accent);
}

.wz-eyebrow::before {
  content: '';
  inline-size: var(--space-6);
  block-size: var(--hairline);
  background: currentColor;
}

.wz-lead {
  font-size: var(--text-md);
  line-height: var(--leading-normal);
  color: var(--text-secondary);
  max-width: var(--measure-lead);
}

.wz-muted {
  color: var(--text-muted);
}

.wz-label-text {
  font-family: var(--font-label);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.wz-num {
  font-variant-numeric: tabular-nums;
}

/* Long-form copy: rules, policies */
.wz-prose {
  max-width: var(--measure-prose);
  color: var(--text-secondary);
  font-size: var(--text-md);
}

.wz-prose > * + * {
  margin-top: var(--space-5);
}

.wz-prose h2,
.wz-prose h3 {
  margin-top: var(--space-12);
  color: var(--text-heading);
}

.wz-prose h2 + *,
.wz-prose h3 + * {
  margin-top: var(--space-3);
}

.wz-prose strong {
  color: var(--text-primary);
  font-weight: var(--weight-semibold);
}

.wz-prose ul,
.wz-prose ol {
  padding-left: var(--space-6);
}

.wz-prose li + li {
  margin-top: var(--space-2);
}

.wz-prose li::marker {
  color: var(--text-accent);
}

/* ---------- Layout primitives ---------- */

.wz-container {
  width: 100%;
  max-width: calc(var(--container-max) + var(--space-gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--space-gutter);
}

.wz-container--narrow {
  max-width: calc(var(--container-narrow) + var(--space-gutter) * 2);
}

.wz-section {
  padding-block: var(--space-section);
}

.wz-section--tight {
  padding-block: var(--space-16);
}

.wz-stack {
  display: flex;
  flex-direction: column;
  gap: var(--stack-gap, var(--space-4));
}

.wz-cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--cluster-gap, var(--space-3));
}

.wz-visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.wz-icon {
  inline-size: var(--icon-md);
  block-size: var(--icon-md);
  flex: none;
}

.wz-icon--sm {
  inline-size: var(--icon-sm);
  block-size: var(--icon-sm);
}

.wz-icon--lg {
  inline-size: var(--icon-lg);
  block-size: var(--icon-lg);
}

/* ---------- Class glyphs ----------
   Game icons from the RPG Awesome font already shipped in libs/ (SIL OFL).
   Only the woff is loaded, and only when a glyph is on the page.
   Usage: <span class="wz-glyph wz-glyph--ninja" aria-hidden="true"></span>
   Keys match Entites.ClassFamily().                                        */

@font-face {
  font-family: 'WZClassGlyphs'; /* ds-allow-hardcode: an @font-face must name its family; --font-glyph refers to it */
  src: url('../../libs/RpgAwesome/fonts/rpgawesome-webfont39483948.woff') format('woff');
  font-display: block;
}

.wz-glyph {
  display: inline-grid;
  place-items: center;
  font-family: var(--font-glyph);
  font-style: normal;
  font-weight: var(--weight-regular);
  line-height: 1;
  text-transform: none;
  -webkit-font-smoothing: antialiased;
}

.wz-glyph::before {
  display: block;
}

.wz-glyph--trojan::before { content: '\e97d'; }
.wz-glyph--warrior::before { content: '\e9fd'; }
.wz-glyph--archer::before { content: '\e90d'; }
.wz-glyph--ninja::before { content: '\ea9c'; }
.wz-glyph--monk::before { content: '\e9ef'; }
.wz-glyph--pirate::before { content: '\e97b'; }
.wz-glyph--dragon-warrior::before { content: '\e9a2'; }
.wz-glyph--taoist::before,
.wz-glyph--taoist-water::before { content: '\eae4'; }
.wz-glyph--taoist-fire::before { content: '\e9c2'; }
.wz-glyph--windwalker::before { content: '\e9bc'; }

/* A hairline rule with a diamond at its centre */
.wz-rule {
  position: relative;
  border: 0;
  height: var(--hairline);
  margin: var(--space-10) 0;
  background: linear-gradient(90deg, transparent, var(--border-default) 20%, var(--border-default) 80%, transparent);
  overflow: visible;
}

.wz-rule::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  inline-size: var(--space-2);
  block-size: var(--space-2);
  background: var(--action-primary);
  transform: translate(-50%, -50%) rotate(45deg);
}

/* ---------- Skip link ---------- */

.wz-skip {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  z-index: var(--z-toast);
  padding: var(--space-3) var(--space-4);
  background: var(--action-primary);
  color: var(--text-on-accent);
  font-family: var(--font-label);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transform: translateY(-200%);
}

.wz-skip:focus-visible {
  transform: none;
  color: var(--text-on-accent);
}

/* ---------- Buttons ----------
   States: default, hover, focus-visible, active, disabled, loading.
   Loading is aria-busy="true" on the button.                              */

.wz-btn {
  --btn-bg: var(--action-primary);
  --btn-bg-hover: var(--action-primary-hover);
  --btn-bg-active: var(--action-primary-active);
  --btn-fg: var(--text-on-accent);
  --btn-border: transparent;
  --btn-spinner: var(--text-on-accent);

  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-block-size: var(--control-height);
  padding: var(--space-2) var(--space-6);
  border: var(--hairline) solid var(--btn-border);
  border-radius: var(--radius-sm);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-label);
  font-size: var(--text-md);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-wide);
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition:
    background-color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-base) var(--ease-out),
    transform var(--duration-fast) var(--ease-out);
}

.wz-btn:hover {
  background: var(--btn-bg-hover);
  color: var(--btn-fg);
}

.wz-btn:active {
  background: var(--btn-bg-active);
  transform: translateY(1px);
}

.wz-btn:focus-visible {
  outline: var(--focus-width) solid var(--focus-ring);
  outline-offset: var(--focus-offset);
}

.wz-btn:disabled,
.wz-btn[aria-disabled='true'] {
  --btn-bg: var(--action-disabled-bg);
  --btn-bg-hover: var(--action-disabled-bg);
  --btn-bg-active: var(--action-disabled-bg);
  --btn-fg: var(--action-disabled-text);
  --btn-border: var(--action-disabled-bg);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.wz-btn[aria-busy='true'] {
  color: transparent;
  pointer-events: none;
}

.wz-btn[aria-busy='true']::after {
  content: '';
  position: absolute;
  inset: 50% auto auto 50%;
  inline-size: var(--icon-md);
  block-size: var(--icon-md);
  margin: calc(var(--icon-md) / -2) 0 0 calc(var(--icon-md) / -2);
  border: var(--focus-width) solid var(--btn-spinner);
  border-right-color: transparent;
  border-radius: var(--radius-pill);
  animation: wz-spin var(--duration-spin) linear infinite;
}

.wz-btn .wz-icon {
  inline-size: var(--icon-md);
  block-size: var(--icon-md);
}

.wz-btn--primary:hover {
  box-shadow: var(--glow-accent);
}

.wz-btn--secondary {
  --btn-bg: transparent;
  --btn-bg-hover: var(--action-secondary-hover);
  --btn-bg-active: var(--surface-overlay);
  --btn-fg: var(--text-primary);
  --btn-border: var(--action-secondary-border);
  --btn-spinner: var(--text-primary);
}

.wz-btn--secondary:hover {
  border-color: var(--text-secondary);
}

.wz-btn--ghost {
  --btn-bg: transparent;
  --btn-bg-hover: var(--surface-hover);
  --btn-bg-active: var(--surface-overlay);
  --btn-fg: var(--text-primary);
  --btn-spinner: var(--text-primary);
  padding-inline: var(--space-4);
}

.wz-btn--danger {
  --btn-bg: var(--action-destructive);
  --btn-bg-hover: var(--action-destructive-hover);
  --btn-bg-active: var(--action-destructive-active);
  --btn-fg: var(--text-on-destructive);
  --btn-spinner: var(--text-on-destructive);
}

.wz-btn--lg {
  min-block-size: var(--control-height-lg);
  padding-inline: var(--space-8);
  font-size: var(--text-lg);
}

.wz-btn--sm {
  min-block-size: var(--control-height-sm);
  padding-inline: var(--space-4);
  font-size: var(--text-base);
}

.wz-btn--block {
  display: flex;
  inline-size: 100%;
}

/* A plain text link styled as an action */
.wz-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-block-size: var(--space-6);
  font-family: var(--font-label);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-accent);
}

.wz-link:hover {
  color: var(--action-primary-hover);
  text-decoration: underline;
}

.wz-link .wz-icon {
  transition: transform var(--duration-base) var(--ease-out);
}

.wz-link:hover .wz-icon {
  transform: translateX(var(--space-1));
}

/* ---------- Header ---------- */

.wz-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(var(--blur-glass));
  backdrop-filter: blur(var(--blur-glass));
  border-bottom: var(--hairline) solid var(--border-subtle);
  transition: background-color var(--duration-slow) var(--ease-out), border-color var(--duration-slow) var(--ease-out);
}

/* Home: the header floats over the hero until the page scrolls */
.wz-header--overlay {
  position: fixed;
  inset-inline: 0;
  background: var(--header-shade);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-bottom-color: transparent;
}

.wz-header--overlay.is-scrolled,
.wz-header--overlay.is-open {
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(var(--blur-glass));
  backdrop-filter: blur(var(--blur-glass));
  border-bottom-color: var(--border-subtle);
}

.wz-header__bar {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-block-size: var(--header-height);
}

.wz-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  margin-right: auto;
  min-block-size: var(--control-height);
  color: var(--text-heading);
  text-decoration: none;
}

.wz-brand:hover {
  color: var(--text-heading);
}

.wz-brand__mark {
  inline-size: var(--space-10);
  block-size: var(--space-10);
}

.wz-brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.wz-brand__word {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--weight-black);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.wz-brand__sub {
  margin-top: var(--space-1);
  font-family: var(--font-label);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--text-accent);
}

.wz-nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: var(--control-height);
  block-size: var(--control-height);
  padding: 0;
  border: var(--hairline) solid var(--border-default);
  border-radius: var(--radius-sm);
  background: var(--surface-base);
  color: var(--text-primary);
  transition: background-color var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out);
}

.wz-nav-toggle:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
}

.wz-nav-toggle:active {
  background: var(--surface-overlay);
}

.wz-nav-toggle .wz-nav-toggle__close,
.wz-nav-toggle[aria-expanded='true'] .wz-nav-toggle__open {
  display: none;
}

.wz-nav-toggle[aria-expanded='true'] .wz-nav-toggle__close {
  display: block;
}

/* Mobile: the nav is a panel under the bar, opened by the toggle */
.wz-nav {
  display: none;
  position: absolute;
  top: 100%;
  inset-inline: 0;
  max-block-size: calc(100vh - var(--header-height));
  overflow-y: auto;
  padding: var(--space-4) var(--space-gutter) var(--space-8);
  background: var(--surface-base);
  border-bottom: var(--hairline) solid var(--border-subtle);
  box-shadow: var(--shadow-overlay);
}

.wz-nav.is-open,
.no-js .wz-nav {
  display: block;
}

.no-js .wz-nav-toggle {
  display: none;
}

.wz-nav__list {
  display: flex;
  flex-direction: column;
}

.wz-nav__link {
  display: flex;
  align-items: center;
  min-block-size: var(--control-height);
  padding-inline: var(--space-2);
  border-bottom: var(--hairline) solid var(--border-subtle);
  font-family: var(--font-label);
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-secondary);
}

.wz-nav__link:hover,
.wz-nav__link[aria-current='page'] {
  color: var(--text-heading);
}

.wz-nav__link[aria-current='page'] {
  color: var(--text-accent);
}

.wz-nav__actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

@media (min-width: 64rem) {
  .wz-nav-toggle {
    display: none;
  }

  .wz-nav,
  .wz-nav.is-open {
    display: flex;
    align-items: center;
    gap: var(--space-8);
    position: static;
    max-block-size: none;
    overflow: visible;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
  }

  .wz-nav__list {
    flex-direction: row;
    gap: var(--space-6);
  }

  .wz-nav__link {
    position: relative;
    min-block-size: var(--control-height);
    padding-inline: 0;
    border: 0;
    font-size: var(--text-md);
  }

  .wz-nav__link::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: var(--space-2);
    block-size: var(--focus-width);
    background: var(--action-primary);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform var(--duration-base) var(--ease-out);
  }

  .wz-nav__link:hover::after,
  .wz-nav__link[aria-current='page']::after {
    transform: scaleX(1);
  }

  .wz-nav__actions {
    flex-direction: row;
    margin-top: 0;
  }

  .wz-nav__actions .wz-btn {
    min-block-size: var(--control-height-sm);
    padding-inline: var(--space-5);
    font-size: var(--text-base);
  }
}

/* ---------- Page hero (inner pages) ---------- */

.wz-page-hero {
  position: relative;
  isolation: isolate;
  padding-block: var(--space-16) var(--space-12);
  border-bottom: var(--hairline) solid var(--border-subtle);
  overflow: hidden;
}

/* Inner pages open on their own banner: one class figure stands on the right
   over a graded part of the key art, the copy sits on the darker left. With
   no modifier the band stays clear and the page wallpaper shows through. */
.wz-page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  background: none 78% 18% / cover no-repeat;
}

.wz-page-hero--download::before { background-image: url('../../images/wz/art/banner-download.webp'); }
.wz-page-hero--rules::before { background-image: url('../../images/wz/art/banner-rules.webp'); }
.wz-page-hero--policy::before { background-image: url('../../images/wz/art/banner-policy.webp'); }
.wz-page-hero--cookie::before { background-image: url('../../images/wz/art/banner-cookie.webp'); }
.wz-page-hero--ranking::before { background-image: url('../../images/wz/art/banner-ranking.webp'); }
.wz-page-hero--store::before { background-image: url('../../images/wz/art/banner-store.webp'); }

.wz-page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--hero-scrim-side), var(--page-hero-scrim);
}

.wz-page-hero .wz-page-hero__title,
.wz-page-hero .wz-lead,
.wz-page-hero .wz-eyebrow {
  text-shadow: var(--text-glow);
}

.wz-page-hero__title {
  margin-top: var(--space-4);
  font-size: var(--text-3xl);
  font-weight: var(--weight-black);
  line-height: var(--leading-tight);
  max-width: 20ch;
}

.wz-page-hero .wz-lead {
  margin-top: var(--space-5);
}

@media (min-width: 48rem) {
  .wz-page-hero {
    padding-block: var(--space-24) var(--space-16);
  }

  .wz-page-hero::after {
    background: var(--hero-scrim-side), var(--page-hero-scrim-wide);
  }
}

/* ---------- Panels ---------- */

.wz-panel {
  background: var(--surface-base);
  border: var(--hairline) solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-6);
}

.wz-panel--raised {
  background: var(--surface-raised);
  box-shadow: var(--shadow-raised);
}

/* A panel whose hairline runs from lightning ice to blade crimson */
.wz-panel--framed {
  border-color: transparent;
  background:
    linear-gradient(var(--surface-raised), var(--surface-raised)) padding-box,
    var(--frame-edge) border-box;
}

/* ---------- Art panels ----------
   A box filled with one of the composed pictures in images/wz/art: a class
   figure over a graded part of the key art. Every slot has its own picture,
   so no screen shows the same one twice. Pair with role="img" and
   aria-label, or aria-hidden="true" when it is decoration. Slots move the
   focus with --art-pos.                                                    */

.wz-art {
  --art-pos: 50% 50%;
  --art-zoom: cover;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--surface-sunken) none var(--art-pos) / var(--art-zoom) no-repeat;
}

.wz-art::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgb(13 13 18 / 0.75), rgb(13 13 18 / 0) 55%);
  pointer-events: none;
}

.wz-art--war-guild { background-image: url('../../images/wz/art/war-guild.webp'); }
.wz-art--tile-tournament { background-image: url('../../images/wz/art/tile-tournament.webp'); }
.wz-art--tile-nobility { background-image: url('../../images/wz/art/tile-nobility.webp'); }
.wz-art--tile-hunt { background-image: url('../../images/wz/art/tile-hunt.webp'); }
.wz-art--community { background-image: url('../../images/wz/art/community.webp'); }
.wz-art--help-download { background-image: url('../../images/wz/art/help-download.webp'); }
.wz-art--result-cancel { background-image: url('../../images/wz/art/result-cancel.webp'); }
.wz-art--toc-rules { background-image: url('../../images/wz/art/toc-rules.webp'); }
.wz-art--toc-policy { background-image: url('../../images/wz/art/toc-policy.webp'); }
.wz-art--toc-cookie { background-image: url('../../images/wz/art/toc-cookie.webp'); }
.wz-art--auth-login { background-image: url('../../images/wz/art/auth-login.webp'); }
.wz-art--auth-register { background-image: url('../../images/wz/art/auth-register.webp'); }
.wz-art--auth-recovery { background-image: url('../../images/wz/art/auth-recovery.webp'); }
.wz-art--auth-reset { background-image: url('../../images/wz/art/auth-reset.webp'); }
.wz-art--cp-lead { background-image: url('../../images/wz/art/cp-lead.webp'); }

.wz-panel__header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.wz-panel__title {
  font-size: var(--text-xl);
}

@media (min-width: 48rem) {
  .wz-panel {
    padding: var(--space-8);
  }
}

/* ---------- Badges ---------- */

.wz-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-2);
  border: var(--hairline) solid var(--border-default);
  border-radius: var(--radius-xs);
  font-family: var(--font-label);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-secondary);
  background: var(--surface-raised);
}

.wz-badge--accent {
  border-color: var(--status-info-border);
  background: var(--status-info-surface);
  color: var(--status-info-text);
}

/* ---------- Forms ----------
   Input states: default, hover, focus, disabled, read-only, error.
   ASP.NET adds .input-validation-error / .field-validation-error itself.  */

.wz-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.wz-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.wz-label {
  font-family: var(--font-label);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-secondary);
}

.wz-input {
  display: block;
  inline-size: 100%;
  min-block-size: var(--control-height);
  padding: var(--space-3) var(--space-4);
  border: var(--hairline) solid var(--border-control);
  border-radius: var(--radius-sm);
  background: var(--surface-sunken);
  color: var(--text-primary);
  font-size: var(--text-base);
  line-height: var(--leading-snug);
  transition: border-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out), background-color var(--duration-fast) var(--ease-out);
}

.wz-input::placeholder {
  color: var(--text-subtle);
}

.wz-input:hover {
  border-color: var(--text-muted);
}

.wz-input:focus {
  outline: none;
  border-color: var(--action-primary);
  box-shadow: 0 0 0 var(--focus-width) var(--focus-ring);
}

.wz-input:disabled {
  background: var(--action-disabled-bg);
  border-color: var(--action-disabled-bg);
  color: var(--action-disabled-text);
  cursor: not-allowed;
}

.wz-input[readonly] {
  background: var(--surface-base);
  border-style: dashed;
}

.wz-input[aria-invalid='true'],
.wz-input.input-validation-error {
  border-color: var(--status-danger-border);
  background: var(--status-danger-surface);
}

.wz-input[aria-invalid='true']:focus,
.wz-input.input-validation-error:focus {
  box-shadow: 0 0 0 var(--focus-width) var(--status-danger-text);
}

.wz-input:-webkit-autofill,
.wz-input:-webkit-autofill:hover,
.wz-input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text-primary);
  -webkit-box-shadow: 0 0 0 var(--space-32) var(--surface-raised) inset;
  caret-color: var(--text-primary);
}

.wz-help {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.wz-field-error,
.field-validation-error {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--status-danger-text);
}

.wz-field-error:empty,
.field-validation-valid {
  display: none;
}

.validation-summary-errors ul {
  margin: 0;
  padding-left: var(--space-5);
}

.validation-summary-valid {
  display: none;
}

/* Native checkbox, themed: keeps every platform state and the keyboard */
.wz-check {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.wz-check input[type='checkbox'] {
  flex: none;
  inline-size: var(--icon-md);
  block-size: var(--icon-md);
  margin: var(--space-1) 0 0;
  accent-color: var(--action-primary);
  cursor: pointer;
}

.wz-check label {
  color: var(--text-secondary);
  cursor: pointer;
}

.wz-form-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-top: var(--space-2);
}

@media (min-width: 30rem) {
  .wz-form-actions {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* ---------- Alerts ----------
   Status is carried by icon plus text; the border runs all four sides.    */

.wz-alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  border: var(--hairline) solid var(--status-info-border);
  border-radius: var(--radius-sm);
  background: var(--status-info-surface);
  color: var(--status-info-text);
}

.wz-alert .wz-icon {
  margin-top: 0.125rem;
}

.wz-alert__body {
  color: var(--text-primary);
}

.wz-alert__title {
  display: block;
  font-weight: var(--weight-semibold);
  color: inherit;
}

.wz-alert--danger {
  border-color: var(--status-danger-border);
  background: var(--status-danger-surface);
  color: var(--status-danger-text);
}

.wz-alert--success {
  border-color: var(--status-success-border);
  background: var(--status-success-surface);
  color: var(--status-success-text);
}

/* ---------- Tables ----------
   Mobile base: each row is a stacked card labelled from data-label.
   From 48rem the table returns to columns.                                */

.wz-table-wrap {
  border: var(--hairline) solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--surface-base);
  overflow: hidden;
}

.wz-table {
  inline-size: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.wz-table caption {
  padding: var(--space-4);
  text-align: left;
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.wz-table thead {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.wz-table tr {
  display: block;
  padding: var(--space-3) var(--space-4);
  border-top: var(--hairline) solid var(--border-subtle);
}

.wz-table tbody tr:first-child {
  border-top: 0;
}

.wz-table td {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-1) 0;
  color: var(--text-secondary);
}

.wz-table td::before {
  content: attr(data-label);
  font-family: var(--font-label);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-muted);
}

.wz-table td[data-label='']::before {
  content: none;
}

@media (min-width: 48rem) {
  .wz-table thead {
    position: static;
    inline-size: auto;
    block-size: auto;
    overflow: visible;
    clip: auto;
  }

  .wz-table tr {
    display: table-row;
    padding: 0;
  }

  .wz-table th,
  .wz-table td {
    display: table-cell;
    padding: var(--space-4) var(--space-5);
    text-align: left;
    vertical-align: middle;
  }

  .wz-table td::before {
    content: none;
  }

  .wz-table th {
    background: var(--surface-raised);
    border-bottom: var(--hairline) solid var(--border-default);
    font-family: var(--font-label);
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-label);
    text-transform: uppercase;
    color: var(--text-muted);
  }

  .wz-table tbody tr {
    transition: background-color var(--duration-fast) var(--ease-out);
  }

  .wz-table tbody tr:hover {
    background: var(--surface-raised);
  }

  .wz-table .wz-table__num {
    text-align: right;
  }
}

/* ---------- Tabs ----------
   Markup contract (site.js wires the keyboard):
   [data-tabs] > [role=tablist] > button.wz-tab[role=tab][aria-selected]
              > .wz-tabs__panel[role=tabpanel][hidden]
   Tab states: default, hover, focus-visible, active, selected, disabled. */

/* Tabs wrap rather than scroll: a strip that scrolls with a hidden
   scrollbar hides tabs on phones with nothing to say they exist. */
.wz-tabs__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  border-bottom: var(--hairline) solid var(--border-subtle);
}

.wz-tab {
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-block-size: var(--control-height);
  padding: var(--space-2) var(--space-4);
  border: 0;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-label);
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  white-space: nowrap;
  transition: color var(--duration-fast) var(--ease-out), background-color var(--duration-fast) var(--ease-out);
}

.wz-tab::after {
  content: '';
  position: absolute;
  left: var(--space-2);
  right: var(--space-2);
  bottom: calc(var(--hairline) * -1);
  block-size: var(--focus-width);
  background: var(--action-primary);
  transform: scaleX(0);
  transition: transform var(--duration-base) var(--ease-out);
}

.wz-tab:hover {
  color: var(--text-primary);
  background: var(--surface-base);
}

.wz-tab:active {
  background: var(--surface-raised);
}

.wz-tab:focus-visible {
  outline-offset: calc(var(--focus-width) * -1);
}

.wz-tab[aria-selected='true'] {
  color: var(--text-accent);
}

.wz-tab[aria-selected='true']::after {
  transform: scaleX(1);
}

.wz-tab:disabled {
  color: var(--action-disabled-text);
  background: transparent;
  cursor: not-allowed;
}

.wz-tabs__panel {
  padding-top: var(--space-6);
}

.wz-tabs__panel:focus-visible {
  outline-offset: var(--space-2);
}

/* ---------- Steps (a real ordered sequence) ---------- */

/* Steps are separated rows: a hairline between them and room on both sides,
   the same rhythm on every page. --step-pad sets that room. */
.wz-steps {
  counter-reset: wz-step;
  display: grid;
  gap: 0;
}

.wz-step {
  --step-pad: var(--space-6);

  position: relative;
  isolation: isolate;
  counter-increment: wz-step;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-2) var(--space-5);
  align-items: start;
  padding-block: var(--step-pad);
}

.wz-step:first-child {
  padding-top: 0;
}

.wz-step:last-child {
  padding-bottom: 0;
}

.wz-step + .wz-step {
  border-top: var(--hairline) solid var(--border-subtle);
}

@media (min-width: 64rem) {
  .wz-step {
    --step-pad: var(--space-8);
  }
}

/* The number stays upright; only the diamond behind it is rotated */
.wz-step::before {
  content: counter(wz-step);
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  inline-size: var(--space-12);
  block-size: var(--space-12);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-black);
  color: var(--text-accent);
}

/* The diamond follows the row padding so it stays level with its number */
.wz-step::after {
  content: '';
  position: absolute;
  top: var(--step-pad);
  left: 0;
  z-index: 0;
  inline-size: var(--space-12);
  block-size: var(--space-12);
  border: var(--hairline) solid var(--border-accent);
  border-radius: var(--radius-xs);
  background: var(--surface-base);
  transform: scale(0.72) rotate(45deg);
}

.wz-step:first-child::after {
  top: 0;
}

.wz-step > * {
  min-width: 0;
}

.wz-step__title {
  font-size: var(--text-xl);
}

.wz-step__body {
  margin-top: var(--space-2);
  color: var(--text-secondary);
}

/* ---------- Footer ---------- */

.wz-footer {
  margin-top: var(--space-section);
  border-top: var(--hairline) solid var(--border-subtle);
  background: var(--surface-sunken);
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.wz-footer__grid {
  display: grid;
  gap: var(--space-10);
  padding-block: var(--space-16);
}

.wz-footer__tagline {
  margin-top: var(--space-4);
  max-width: 34ch;
  font-size: var(--text-base);
  color: var(--text-secondary);
}

.wz-footer__nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-8);
}

.wz-footer__heading {
  margin-bottom: var(--space-3);
  font-family: var(--font-label);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-heading);
}

.wz-footer__links a {
  display: inline-flex;
  align-items: center;
  min-block-size: var(--space-8);
  font-size: var(--text-base);
  color: var(--text-secondary);
  text-decoration: none;
}

.wz-footer__links a:hover {
  color: var(--text-accent);
  text-decoration: underline;
}

.wz-footer__social {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.wz-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: var(--control-height);
  block-size: var(--control-height);
  border: var(--hairline) solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: color var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out), background-color var(--duration-fast) var(--ease-out);
}

.wz-social-link:hover {
  color: var(--text-accent);
  border-color: var(--border-accent);
  background: var(--surface-base);
}

.wz-social-link:active {
  background: var(--surface-raised);
}

.wz-footer__legal {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding-block: var(--space-6);
  border-top: var(--hairline) solid var(--border-subtle);
  color: var(--text-subtle);
}

@media (min-width: 48rem) {
  .wz-footer__nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 64rem) {
  .wz-footer__grid {
    grid-template-columns: 5fr 7fr;
    gap: var(--space-16);
  }

  .wz-footer__legal {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* ---------- Cookie notice ---------- */

/* One compact row at every width, so on a first visit it stays clear of the
   home hero's headline and primary button. */
.wz-cookie {
  position: fixed;
  inset: auto var(--space-4) var(--space-4) var(--space-4);
  z-index: var(--z-toast);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  max-inline-size: 30rem;
  padding: var(--space-3) var(--space-3) var(--space-3) var(--space-4);
  border: var(--hairline) solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--surface-overlay);
  box-shadow: var(--shadow-overlay);
  color: var(--text-secondary);
  font-size: var(--text-xs);
  line-height: var(--leading-snug);
}

.wz-cookie p {
  flex: 1;
}

.wz-cookie .wz-btn {
  flex-shrink: 0;
}

/* On a phone the home hero's buttons fill the bottom of the first screen, so
   the notice waits at the top, over the art, instead of covering them */
.wz-page-home .wz-cookie {
  inset-block: calc(var(--header-height) + var(--space-2)) auto;
}

@media (min-width: 40rem) {
  .wz-cookie {
    inset-inline-end: auto;
  }

  .wz-page-home .wz-cookie {
    inset-block: auto var(--space-4);
  }
}

/* ---------- Reveal on scroll ----------
   Only hidden when JS runs and motion is allowed; otherwise always shown. */

@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(var(--space-6));
    transition: opacity var(--duration-reveal) var(--ease-out), transform var(--duration-reveal) var(--ease-out);
    transition-delay: var(--reveal-delay, 0ms);
  }

  .js [data-reveal].is-visible {
    opacity: 1;
    transform: none;
  }
}

@keyframes wz-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: var(--duration-instant) !important;
    animation-iteration-count: 1 !important;
    transition-duration: var(--duration-instant) !important;
  }

  .wz-btn[aria-busy='true']::after {
    animation-duration: var(--duration-spin-calm) !important;
    animation-iteration-count: infinite !important;
  }
}
