/* =====================================================================
   KINGSIDE CHESS ACADEMY — style.css
   All custom styles: variables, base, layout, components, dashboard,
   animations and reduced-motion rules. Dark theme lives in dark-mode.css,
   right-to-left overrides in rtl.css.

   Table of contents
   1. Variables (colors, fonts, easing)
   2. Base and typography
   3. Layout and chessboard grid
   4. Components
      4.1 Logo, icons, pieces
      4.2 Buttons and links
      4.3 Header and navigation
      4.4 Mobile menu
      4.5 Forms
      4.6 Panels, modals, toasts
      4.7 Tables, segmented controls, bars, statuses
      4.8 Footer
      4.9 Page sections (home, home 2, about, programs, tournaments)
      4.10 Auth pages
      4.11 404 and Coming Soon
   5. Dashboard
   6. Animations (keyframes, reveal states, cursor, preloader,
      page transition, marquee)
   7. Reduced-motion rules
   ===================================================================== */


/* =====================================================================
   1. VARIABLES — light (ivory) theme is the base; dark-mode.css overrides
   ===================================================================== */
:root {
  /* Surfaces */
  --bg: #F2EDE4;
  --bg-2: #E9E2D6;
  --surface: #F8F4EC;
  --surface-2: #EDE6DA;
  --fg: #0E0E0E;
  --fg-2: #33302B;
  --muted: #6A655C;
  --line: rgba(14, 14, 14, 0.14);
  --line-strong: rgba(14, 14, 14, 0.42);
  --scrim: rgba(14, 14, 14, 0.55);

  /* One accent: brass. --accent-ink is the text-safe variant on the current bg */
  --accent: #C8962B;
  --accent-ink: #7A5A12;
  --on-accent: #0E0E0E;

  /* Feedback */
  --ok: #2E6E46;
  --danger: #B3361F;
  --warn: #8A6A12;

  /* Chessboard */
  --sq-light: #EAE2D3;
  --sq-dark: #C9BDA8;
  --sq-hl: rgba(200, 150, 43, 0.45);
  --piece-w: #FBF8F2;
  --piece-w-stroke: #0E0E0E;
  --piece-b: #141414;
  --piece-b-stroke: #141414;
  --coord: rgba(14, 14, 14, 0.45);

  /* Calendar batch colours (always paired with a text label) */
  --ev-a: #C8962B;
  --ev-b: #4E6E62;
  --ev-c: #7D5A8C;

  /* Type */
  --f-display: "Archivo", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --f-serif: "Instrument Serif", "Times New Roman", Georgia, serif;
  --f-body: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --fs-hero: clamp(3.2rem, 9.4vw, 10.5rem);
  --fs-display: clamp(2.8rem, 8vw, 8.5rem);
  --fs-display-md: clamp(2.3rem, 5.6vw, 5.6rem);
  --fs-xl: clamp(1.6rem, 3vw, 2.6rem);
  --fs-lg: clamp(1.15rem, 1.6vw, 1.4rem);
  --fs-body: 1rem;
  --fs-sm: 0.875rem;
  --fs-xs: 0.72rem;

  /* Space and shape */
  --gutter: clamp(16px, 4vw, 56px);
  --section: clamp(64px, 8vw, 128px);
  --radius: 2px;
  --header-h: 66px;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-back: cubic-bezier(0.34, 1.56, 0.64, 1);
  --t-fast: 0.25s;
  --t-med: 0.45s;
  --t-slow: 0.9s;

  color-scheme: light;
}


/* =====================================================================
   2. BASE AND TYPOGRAPHY (Tailwind preflight is disabled; this is the reset)
   ===================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: auto;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

@supports (overflow: clip) {
  body {
    overflow-x: clip;
  }
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol,
dl,
dd,
figure,
blockquote,
fieldset,
legend {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

fieldset {
  border: 0;
  min-width: 0;
}

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

img {
  height: auto;
}

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

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

button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: inherit;
}

abbr[title] {
  text-decoration: none;
}

address {
  font-style: normal;
}

table {
  border-collapse: collapse;
  width: 100%;
}

[hidden] {
  display: none !important;
}

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

h1,
h2,
h3,
h4 {
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

p {
  text-wrap: pretty;
}

/* Focus: always visible, never hidden by the custom cursor */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.dark :focus-visible {
  outline-color: var(--accent);
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  inset-inline-start: 16px;
  top: 12px;
  z-index: 2000;
  padding: 10px 16px;
  background: var(--fg);
  color: var(--bg);
  font-family: var(--f-mono);
  font-size: var(--fs-sm);
  transform: translateY(-160%);
  transition: transform var(--t-fast) var(--ease-out);
}

.skip-link:focus {
  transform: none;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* Typography helpers */
.mono {
  font-family: var(--f-mono);
  font-feature-settings: "zero" 1;
  letter-spacing: 0;
}

.label {
  font-family: var(--f-mono);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.5;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75em;
  font-family: var(--f-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-2);
  margin-bottom: 1.6rem;
}

.eyebrow::before {
  content: "";
  width: 10px;
  height: 10px;
  background: var(--accent);
  flex: none;
}

.display {
  font-family: var(--f-display);
  font-stretch: 68%;
  font-weight: 800;
  text-transform: uppercase;
  font-size: var(--fs-display);
  line-height: 0.86;
  letter-spacing: -0.015em;
}

.display--md {
  font-size: var(--fs-display-md);
  line-height: 0.9;
}

.display em,
.italic-accent,
.big-cta__title em,
.welcome__title em,
.dpage-title em {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 400;
  text-transform: none;
  letter-spacing: -0.02em;
  color: var(--accent-ink);
  font-stretch: 100%;
}

em {
  font-style: italic;
}

.manifesto__text em,
.statement__text em,
.story__word em {
  font-family: var(--f-serif);
  color: var(--accent-ink);
  font-weight: 400;
}

.link-btn {
  font-family: var(--f-mono);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--line-strong);
  transition: color var(--t-fast), text-decoration-color var(--t-fast);
}

.link-btn:hover {
  color: var(--accent-ink);
  text-decoration-color: var(--accent);
}


/* =====================================================================
   3. LAYOUT AND CHESSBOARD GRID
   ===================================================================== */
.wrap {
  width: 100%;
  max-width: 1640px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section);
  position: relative;
}

.section+.section {
  border-top: 1px solid var(--line);
}

.section-head {
  display: grid;
  gap: 1.2rem;
  margin-bottom: clamp(40px, 6vw, 88px);
  max-width: 1100px;
}

.section-head--row {
  max-width: none;
  grid-template-columns: 1fr;
  align-items: end;
}

@media (min-width: 900px) {
  .section-head--row {
    grid-template-columns: 1fr auto;
    gap: 2rem;
  }
}

/* Decorative 8x8 board background: two crossed gradients = real chessboard pattern */
.board-bg,
.page-hero__board,
.menu__board,
.dash-side__board {
  --cell: 64px;
  background-color: var(--sq-light);
  background-image:
    linear-gradient(45deg, var(--sq-dark) 25%, transparent 25%, transparent 75%, var(--sq-dark) 75%),
    linear-gradient(45deg, var(--sq-dark) 25%, transparent 25%, transparent 75%, var(--sq-dark) 75%);
  background-size: calc(var(--cell) * 2) calc(var(--cell) * 2);
  background-position: 0 0, var(--cell) var(--cell);
}

.coords {
  font-size: var(--fs-xs);
  color: var(--muted);
  letter-spacing: 0.3em;
  margin-top: 1rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-list li {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 5px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--fg-2);
}

/* Media: monochrome, high-contrast treatment for photography */
.media {
  position: relative;
  overflow: hidden;
  background: var(--surface-2);
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.08);
}


/* =====================================================================
   4. COMPONENTS
   ===================================================================== */

/* ---------- 4.1 Logo, icons, pieces ---------- */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: none;
}

.logo__mark {
  width: 38px;
  height: 38px;
  flex: none;
  transition: transform var(--t-med) var(--ease-out);
}

.logo:hover .logo__mark {
  transform: rotate(-90deg);
}

.logo__sq {
  fill: var(--fg);
}

.logo__knight {
  fill: var(--bg);
  stroke: none;
}

.logo__dot {
  fill: var(--accent);
}

.logo__word {
  display: flex;
  flex-direction: column;
  font-family: var(--f-display);
  font-stretch: 72%;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 1.32rem;
  line-height: 0.9;
  letter-spacing: 0.01em;
}

.logo__sub {
  font-family: var(--f-mono);
  font-stretch: 100%;
  font-weight: 400;
  font-size: 0.56rem;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin-top: 4px;
}

.i {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.i--sun,
.i--moon {
  width: 20px;
  height: 20px;
}

.dark .i--sun {
  display: block;
}

.dark .i--moon {
  display: none;
}

.i--sun {
  display: none;
}

.i--moon {
  display: block;
}

.pc {
  stroke-width: 1.3;
  stroke-linejoin: round;
}

.pc--w {
  fill: var(--piece-w);
  stroke: var(--piece-w-stroke);
}

.pc--b {
  fill: var(--piece-b);
  stroke: var(--piece-b-stroke);
}

/* ---------- 4.2 Buttons and links ---------- */
.btn {
  --x: 50%;
  --y: 50%;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 54px;
  padding: 0 26px;
  border: 1px solid var(--fg);
  border-radius: var(--radius);
  font-family: var(--f-mono);
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  transition: color var(--t-fast) var(--ease-out), border-color var(--t-fast);
  -webkit-tap-highlight-color: transparent;
}

/* Fill animation that grows from the cursor position (--x/--y set by script.js) */
.btn::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: var(--x);
  top: var(--y);
  width: 260%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--btn-fill, var(--fg));
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.55s var(--ease-out);
}

.btn:hover::before,
.btn:focus-visible::before {
  transform: translate(-50%, -50%) scale(1);
}

.btn .i {
  transition: transform var(--t-fast) var(--ease-out);
}

.btn:hover .i-flip,
.btn:hover>.i:last-child {
  transform: translateX(4px);
}

.btn__label {
  position: relative;
  display: inline-flex;
  gap: 0.5em;
}

.btn--accent {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  --btn-fill: var(--fg);
}

.btn--accent:hover,
.btn--accent:focus-visible {
  color: var(--bg);
  border-color: var(--fg);
}

.btn--line {
  background: transparent;
  color: var(--fg);
  --btn-fill: var(--fg);
}

.btn--line:hover,
.btn--line:focus-visible {
  color: var(--bg);
}

.btn--ink {
  background: var(--fg);
  color: var(--bg);
  --btn-fill: var(--accent);
}

.btn--ink:hover,
.btn--ink:focus-visible {
  color: var(--on-accent);
  border-color: var(--accent);
}

.btn--ghost {
  border-color: var(--line-strong);
  --btn-fill: var(--accent);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  color: var(--on-accent);
  border-color: var(--accent);
}

.btn--sm {
  min-height: 42px;
  padding: 0 18px;
  font-size: 0.72rem;
}

.btn--xl {
  min-height: 72px;
  padding: 0 40px;
  font-size: 0.9rem;
}

.btn--block {
  width: 100%;
}

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.4;
  pointer-events: none;
}

.btn__spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
}

.btn.is-loading {
  pointer-events: none;
}

.btn.is-loading .btn__spinner {
  display: inline-block;
  animation: spin 0.7s linear infinite;
}

.btn.is-loading .btn__label {
  opacity: 0.6;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}

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

.icon-btn--lg {
  width: 56px;
  height: 56px;
}

.icon-btn__txt {
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.06em;
}

/* Text roll-up hover: the label slides up and a copy (::after) replaces it */
.roll {
  position: relative;
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  line-height: 1.25;
}

.roll>span,
.roll::after {
  display: block;
  transition: transform 0.42s var(--ease-out);
}

.roll::after {
  content: attr(data-text);
  position: absolute;
  inset-inline-start: 0;
  top: 100%;
  white-space: nowrap;
}

a:hover .roll>span,
a:hover .roll::after,
a:focus-visible .roll>span,
a:focus-visible .roll::after,
button:hover .roll>span,
button:hover .roll::after {
  transform: translateY(-100%);
}

.roll-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.roll-link:hover {
  color: var(--accent-ink);
}

/* ---------- 4.3 Header and navigation ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: transform 0.5s var(--ease-out), background-color var(--t-med), border-color var(--t-med), backdrop-filter var(--t-med);
}

.site-header.is-scrolled {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom-color: var(--line);
}

.site-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-inline-start: auto;
}

.nav {
  position: relative;
  display: none;
  margin-inline-start: auto;
}

.nav__list {
  display: flex;
  gap: 2px;
}

.nav__link {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 10px 11px;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--fg-2);
  transition: color var(--t-fast);
}

.nav__link:hover,
.nav__link.is-active {
  color: var(--fg);
}

.nav__ind {
  position: absolute;
  bottom: 2px;
  left: 0;
  height: 2px;
  width: var(--w, 0px);
  background: var(--accent);
  transform: translateX(var(--x, 0px));
  transition: transform 0.5s var(--ease-out), width 0.5s var(--ease-out), opacity var(--t-fast);
  opacity: var(--o, 0);
}

/* Home dropdown (opens on hover and keyboard focus) */
.nav__item--dd {
  position: relative;
}

.nav__link--dd {
  display: flex;
  height: 100%;
  align-items: center;
  gap: 4px;
}

.nav__chev {
  width: 0.95em;
  height: 0.95em;
  transition: transform var(--t-fast);
}

.nav__dd {
  position: absolute;
  top: 100%;
  inset-inline-start: 0;
  min-width: 160px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity var(--t-fast), transform var(--t-fast), visibility var(--t-fast);
  z-index: 5;
}

.nav__item--dd:hover .nav__dd,
.nav__item--dd:focus-within .nav__dd {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.nav__item--dd:hover .nav__chev,
.nav__item--dd:focus-within .nav__chev {
  transform: rotate(180deg);
}

.nav__dd-link {
  display: block;
  padding: 9px 12px;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--fg-2);
  white-space: nowrap;
  transition: color var(--t-fast), background-color var(--t-fast);
}

.nav__dd-link:hover,
.nav__dd-link:focus-visible,
.nav__dd-link.is-active {
  color: var(--fg);
  background: var(--surface-2);
}

.header-cta {
  display: none;
}

.menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--fg);
  border-radius: var(--radius);
  transition: background var(--t-fast), color var(--t-fast);
}

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

.menu-btn__txt {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Desktop only: on phones and tablets the trial button lives in the menu */
@media (min-width: 1280px) {
  .header-cta {
    display: inline-flex;
  }
}

/* Phones: keep only logo + Menu in the header (theme, RTL and the Student Login button live in the menu) */
@media (max-width: 639px) {
  .site-header__actions .header-login,
  .site-header__actions [data-theme-toggle],
  .site-header__actions [data-dir-toggle] {
    display: none;
  }
}

@media (min-width: 1280px) {
  /* Logo | centred nav | actions */
  .site-header__inner {
    display: grid;
    grid-template-columns: minmax(max-content, 1fr) auto minmax(max-content, 1fr);
  }

  .site-header__inner > .logo {
    justify-self: start;
  }

  .nav {
    display: block;
    margin-inline-start: 0;
  }

  .site-header__actions {
    margin-inline-start: 0;
    justify-self: end;
  }

  .menu-btn {
    display: none;
  }
}

@media (max-width: 380px) {
  .menu-btn__txt {
    display: none;
  }

  .logo__word {
    font-size: 1.1rem;
  }

  .site-header__actions {
    gap: 6px;
  }
}

/* Scroll progress: thin bar + a pawn that walks along it */
.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  z-index: 110;
  pointer-events: none;
}

.scroll-progress__bar {
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(var(--p, 0));
}

.scroll-progress__pawn {
  position: absolute;
  top: 2px;
  left: 0;
  width: 18px;
  height: 18px;
  transform: translateX(calc(var(--p, 0) * (100vw - 18px)));
  opacity: var(--po, 0);
  transition: opacity var(--t-fast);
}

/* ---------- 4.4 Mobile menu ---------- */
.menu {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--fg);
  color: var(--bg);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.menu:focus {
  outline: none;
}

.menu__board {
  position: absolute;
  inset: 0;
  --cell: 18vmax;
  opacity: 0.05;
  --sq-light: transparent;
  --sq-dark: var(--bg);
  pointer-events: none;
}

.menu__inner {
  position: relative;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding-bottom: 32px;
}

.menu__top {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.menu .logo__sq {
  fill: var(--bg);
}

.menu .logo__knight {
  fill: var(--fg);
}

.menu .logo__sub,
.menu .label {
  color: color-mix(in srgb, var(--bg) 60%, transparent);
}

.menu .icon-btn {
  border-color: color-mix(in srgb, var(--bg) 40%, transparent);
}

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

.menu__list {
  margin-block: clamp(24px, 6vh, 64px);
}

.menu__link {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding-block: 6px;
  overflow: hidden;
  border-bottom: 1px solid color-mix(in srgb, var(--bg) 14%, transparent);
}

.menu__idx {
  font-size: var(--fs-xs);
  color: var(--accent);
  width: 2.4em;
  flex: none;
}

.menu__txt {
  display: block;
  font-family: var(--f-display);
  font-stretch: 68%;
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(2.4rem, 9vw, 5rem);
  line-height: 1;
  transition: transform var(--t-med) var(--ease-out), color var(--t-fast);
}

.menu__link:hover .menu__txt,
.menu__link:focus-visible .menu__txt {
  transform: translateX(14px);
  color: var(--accent);
}

.menu__link.is-active .menu__txt {
  color: var(--accent);
}

/* Home group: tap to show Home / Home 2 */
.menu__toggle {
  width: 100%;
  padding-inline: 0;
  background: none;
  border-width: 0 0 1px;
  color: inherit;
  font: inherit;
  text-align: start;
  cursor: pointer;
}

.menu__toggle.is-active .menu__txt,
.menu__toggle:hover .menu__txt,
.menu__toggle:focus-visible .menu__txt {
  color: var(--accent);
}

.menu__chev {
  align-self: center;
  margin-inline-start: auto;
  width: 1.6rem;
  height: 1.6rem;
  transition: transform var(--t-fast);
}

.menu__toggle[aria-expanded="true"] .menu__chev {
  transform: rotate(180deg);
}

.menu__sub {
  margin: 0;
  padding-block: 6px 10px;
  padding-inline: calc(2.4em + 18px) 0;
  list-style: none;
  border-bottom: 1px solid color-mix(in srgb, var(--bg) 14%, transparent);
}

.menu__sublink {
  display: block;
  padding-block: 8px;
  font-family: var(--f-display);
  font-stretch: 68%;
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(1.4rem, 5vw, 2.2rem);
  line-height: 1.1;
  color: color-mix(in srgb, var(--bg) 75%, transparent);
  transition: color var(--t-fast);
}

.menu__sublink:hover,
.menu__sublink:focus-visible,
.menu__sublink.is-active {
  color: var(--accent);
}

.menu__tools {
  display: flex;
  gap: 8px;
  margin-inline-start: auto;
  margin-inline-end: 8px;
}

.menu__meta {
  margin-top: auto;
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  align-items: end;
  font-size: var(--fs-sm);
}

/* Tablets use the header login icon instead */
@media (min-width: 640px) {
  .menu__login {
    display: none;
  }
}

.menu .btn--line {
  color: var(--bg);
  border-color: var(--bg);
  --btn-fill: var(--bg);
}

.menu .btn--line:hover,
.menu .btn--line:focus-visible {
  color: var(--fg);
}

.menu .socials .social {
  border-color: color-mix(in srgb, var(--bg) 35%, transparent);
}

/* ---------- 4.5 Forms ---------- */
.form {
  display: grid;
  gap: 22px;
}

.form-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: 1fr;
}

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

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

.field {
  position: relative;
  display: grid;
  gap: 6px;
}

.field__label {
  font-family: var(--f-mono);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-2);
}

.field__label .mono {
  color: var(--muted);
  text-transform: none;
}

.field__wrap {
  position: relative;
}

.field__input {
  width: 100%;
  min-height: 48px;
  padding: 10px 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  outline: none;
  font-size: 1rem;
  transition: border-color var(--t-fast);
  -webkit-appearance: none;
  appearance: none;
}

textarea.field__input {
  resize: vertical;
  min-height: 88px;
  line-height: 1.5;
}

.field__input::placeholder {
  color: var(--muted);
  opacity: 0.7;
}

.field__input:focus-visible {
  outline: none;
}

select.field__input {
  padding-inline-end: 28px;
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 12px) 52%, calc(100% - 7px) 52%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

select.field__input option {
  background: var(--surface);
  color: var(--fg);
}

.field__wrap .field__input {
  padding-inline-end: 44px;
}

.field__eye {
  position: absolute;
  inset-inline-end: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.field__eye:hover {
  color: var(--fg);
}

/* Focus line draws from the start edge */
.field__line {
  display: block;
  height: 2px;
  margin-top: -8px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.5s var(--ease-out);
  pointer-events: none;
}

.field__wrap+.field__line {
  margin-top: -8px;
}

.field:focus-within>.field__line,
.field__wrap:focus-within+.field__line {
  transform: scaleX(1);
}

.field.is-invalid .field__input {
  border-bottom-color: var(--danger);
}

.field.is-invalid>.field__line {
  background: var(--danger);
  transform: scaleX(1);
}

.field.is-valid .field__input {
  border-bottom-color: var(--ok);
}

.field__error {
  min-height: 0;
  font-family: var(--f-mono);
  font-size: 0.72rem;
  color: var(--danger);
  display: flex;
  gap: 6px;
  align-items: center;
}

.field__error:not(:empty) {
  animation: errIn 0.45s var(--ease-out) both;
}

.field__error:not(:empty)::before {
  content: "!";
  display: inline-grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border: 1px solid currentColor;
  font-size: 0.6rem;
  flex: none;
}

.field--inline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.field--inline .field__input {
  flex: 1;
  min-width: 0;
}

.field--inline .field__line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
}

.field--select .field__input {
  min-height: 44px;
}

.form__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.form__nav {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.form__nav .btn {
  flex: 1 1 160px;
}

.notice {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 12px 14px;
  border: 1px dashed var(--line-strong);
  font-size: var(--fs-xs);
  margin-bottom: 16px;
}

/* Choices (radio pills) */
.choice-row,
.choice-col {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.choice-col {
  flex-direction: column;
}

.choice-row legend,
.choice-col legend {
  width: 100%;
  margin-bottom: 8px;
}

.choice {
  position: relative;
  display: inline-flex;
  cursor: pointer;
}

.choice input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
  margin: 0;
}

.choice>span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font-size: var(--fs-sm);
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}

.choice>span::before {
  content: "";
  width: 10px;
  height: 10px;
  border: 1px solid currentColor;
  transition: background var(--t-fast), transform var(--t-fast) var(--ease-back);
}

.choice input:checked+span {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

.choice input:checked+span::before {
  background: var(--accent);
  border-color: var(--accent);
  transform: rotate(45deg);
}

.choice input:focus-visible+span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.choice:hover>span {
  border-color: var(--fg);
}

.choice--block {
  display: flex;
}

.choice--block>span {
  width: 100%;
  padding: 14px 16px;
}

.choice>span em {
  margin-inline-start: auto;
  font-style: normal;
  font-size: 0.7rem;
  color: inherit;
  opacity: 0.7;
}

/* Custom checkbox with animated tick */
.check {
  position: relative;
  display: inline-flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-size: var(--fs-sm);
  line-height: 1.45;
}

.check input {
  position: absolute;
  opacity: 0;
  width: 22px;
  height: 22px;
  margin: 0;
  cursor: pointer;
}

.check__box {
  width: 22px;
  height: 22px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  transition: background var(--t-fast), border-color var(--t-fast);
}

.check__box .i {
  width: 15px;
  height: 15px;
  stroke-width: 2.4;
  stroke-dasharray: 26;
  stroke-dashoffset: 26;
  transition: stroke-dashoffset 0.35s var(--ease-out);
}

.check input:checked+.check__box {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.check input:checked+.check__box .i {
  stroke-dashoffset: 0;
}

.check input:focus-visible+.check__box {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.check.is-invalid .check__box {
  border-color: var(--danger);
  animation: shake 0.4s var(--ease-out);
}

/* Password strength meter */
.meter {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}

.meter__bars {
  display: flex;
  gap: 4px;
}

.meter__bars span {
  width: 28px;
  height: 4px;
  background: var(--line);
  transform-origin: 0 50%;
  transition: background var(--t-fast), transform var(--t-med) var(--ease-out);
}

.meter[data-level="1"] .meter__bars span:nth-child(-n+1) {
  background: var(--danger);
}

.meter[data-level="2"] .meter__bars span:nth-child(-n+2) {
  background: var(--warn);
}

.meter[data-level="3"] .meter__bars span:nth-child(-n+3) {
  background: var(--accent);
}

.meter[data-level="4"] .meter__bars span {
  background: var(--ok);
}

/* Step indicator */
.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-block: 8px 28px;
  padding-bottom: 14px;
}

.steps__item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: var(--fs-sm);
  color: var(--muted);
  transition: color var(--t-med);
}

.steps__no {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line-strong);
  font-size: 0.7rem;
  transition: background var(--t-med), color var(--t-med), border-color var(--t-med);
}

.steps__item.is-current,
.steps__item.is-done {
  color: var(--fg);
}

.steps__item.is-current .steps__no {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

.steps__item.is-done .steps__no {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
}

.steps__bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--line);
}

.steps__bar span {
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(var(--s, 0.333));
  transition: transform 0.7s var(--ease-out);
}

@media (max-width: 420px) {
  .steps__item>span:last-child {
    font-size: 0.72rem;
  }
}

/* Newsletter forms */
.news-form {
  display: grid;
  gap: 10px;
}

.news-form .field--inline {
  border-bottom: 1px solid var(--line-strong);
}

.news-form .field--inline .field__input {
  border-bottom: 0;
}

.news-form__btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  transition: transform var(--t-fast) var(--ease-out), color var(--t-fast);
}

.news-form__btn:hover {
  color: var(--accent-ink);
  transform: translateX(4px);
}

.news-form.is-done .field--inline {
  border-color: var(--ok);
}

/* ---------- 4.6 Panels, modals, toasts ---------- */
.panel {
  position: fixed;
  inset: 0;
  z-index: 300;
}

.panel__scrim,
.modal__scrim {
  position: absolute;
  inset: 0;
  background: var(--scrim);
  opacity: 0;
  transition: opacity 0.5s var(--ease-out);
}

.panel__dialog {
  position: absolute;
  top: 0;
  bottom: 0;
  inset-inline-end: 0;
  width: min(580px, 100vw);
  background: var(--bg);
  border-inline-start: 1px solid var(--line);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px clamp(20px, 4vw, 44px) 48px;
  transform: translateX(104%);
  transition: transform 0.7s var(--ease-out);
  outline: none;
}

.panel.is-open .panel__scrim,
.modal.is-open .modal__scrim {
  opacity: 1;
}

.panel.is-open .panel__dialog {
  transform: none;
}

.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}

.panel__title {
  font-family: var(--f-display);
  font-stretch: 70%;
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 0.92;
  margin-bottom: 20px;
}

.panel__kicker {
  font-family: var(--f-mono);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-ink);
  margin-bottom: 18px;
}

.panel__body>*+* {
  margin-top: 18px;
}

.panel__body .panel__img {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
  filter: grayscale(1) contrast(1.08);
}

.panel__h {
  font-family: var(--f-mono);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding-top: 8px;
}

.panel__body>.panel__h+* {
  margin-top: 10px;
}

.kv {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.kv>div {
  display: grid;
  grid-template-columns: 9.5em 1fr;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-sm);
}

.kv dt {
  font-family: var(--f-mono);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding-top: 2px;
}

.kv--tight>div {
  padding: 8px 0;
  grid-template-columns: 6.5em 1fr;
}

.sched li {
  display: flex;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  font-size: var(--fs-sm);
}

.sched span {
  color: var(--accent-ink);
  width: 3.5em;
  flex: none;
}

.map-ph {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  min-height: 180px;
  padding: 14px;
  border: 1px solid var(--line);
  font-size: var(--fs-xs);
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 28px 28px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: grid;
  place-items: center;
  padding: 16px;
}

.modal__dialog {
  position: relative;
  width: min(620px, 100%);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  outline: none;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  padding: clamp(24px, 4vw, 44px);
  clip-path: inset(50% 0 50% 0);
  transition: clip-path 0.7s var(--ease-out);
}

.modal.is-open .modal__dialog {
  clip-path: inset(0 0 0 0);
}

.modal__close {
  position: absolute;
  top: 14px;
  inset-inline-end: 14px;
}

.modal__title {
  font-family: var(--f-display);
  font-stretch: 70%;
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(1.9rem, 5vw, 3rem);
  line-height: 0.95;
  margin-bottom: 14px;
  padding-inline-end: 56px;
}

.modal__lead {
  color: var(--fg-2);
  margin-bottom: 22px;
}

.modal__body>*+* {
  margin-top: 14px;
}

.modal--wide .modal__dialog {
  width: min(980px, 100%);
}

.confirm-id {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border: 1px dashed var(--accent);
  font-family: var(--f-mono);
  font-size: 1.2rem;
}

.confirm-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.confirm-actions .btn {
  flex: 1 1 180px;
}

.toasts {
  position: fixed;
  z-index: 500;
  bottom: 20px;
  inset-inline-end: 20px;
  display: grid;
  gap: 10px;
  width: min(380px, calc(100vw - 40px));
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 12px;
  padding: 14px 14px 14px 16px;
  background: var(--fg);
  color: var(--bg);
  border-inline-start: 4px solid var(--accent);
  font-size: var(--fs-sm);
  box-shadow: 0 18px 50px -20px rgba(0, 0, 0, 0.5);
  animation: toastIn 0.6s var(--ease-out) both;
}

.toast.is-leaving {
  animation: toastOut 0.4s var(--ease-io) both;
}

.toast--ok {
  border-inline-start-color: var(--ok);
}

.toast--error {
  border-inline-start-color: var(--danger);
}

.toast__title {
  font-weight: 700;
  display: block;
}

.toast__close {
  color: inherit;
  opacity: 0.6;
}

.toast__close:hover {
  opacity: 1;
}

.toast .i {
  margin-top: 2px;
}

/* ---------- 4.7 Tables, segmented controls, bars, statuses ---------- */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-top: 1px solid var(--fg);
}

.table-wrap:focus-visible {
  outline-offset: -2px;
}

.table {
  min-width: 640px;
  font-size: var(--fs-sm);
}

.table th,
.table td {
  padding: 14px 16px 14px 0;
  text-align: start;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.table thead th {
  font-family: var(--f-mono);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 400;
}

.table tbody tr {
  transition: background var(--t-fast);
}

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

.table tbody th {
  font-weight: 600;
}

.table--compare td,
.table--compare th {
  min-width: 140px;
}

/* Compare table: even columns, inner padding on both sides, one font and one row height */
.table--compare {
  width: 100%;
  table-layout: fixed;
}

.table--compare thead th:first-child,
.table--compare tbody th {
  width: 22%;
}

@media (max-width: 1023px) {
  .table--compare {
    min-width: 700px;
  }

  .table--compare thead th:first-child,
  .table--compare tbody th {
    width: 196px;
  }
}

.table--compare th,
.table--compare td {
  height: 56px;
  padding: 12px 16px;
  line-height: 1.35;
}

.table--compare td,
.table--compare td.mono {
  font-family: inherit;
  font-variant-numeric: tabular-nums;
}

.table--compare .yn {
  vertical-align: middle;
}

.table--compare .yn .i {
  width: 1em;
  height: 1em;
  flex: none;
}

.yn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.yn .i {
  color: var(--ok);
}

.yn--no {
  color: var(--muted);
}

.yn--no .i {
  color: var(--muted);
}

.seg {
  position: relative;
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  isolation: isolate;
  max-width: 100%;
  overflow-x: auto;
}

.seg__btn {
  position: relative;
  z-index: 1;
  padding: 10px 16px;
  font-family: var(--f-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  transition: color var(--t-med) var(--ease-out);
}

.seg__btn small {
  font-size: 0.6rem;
  color: var(--accent-ink);
  margin-inline-start: 4px;
  transition: color var(--t-med);
}

.seg__btn.is-active {
  color: var(--bg);
}

.seg__btn.is-active small {
  color: inherit;
}

.seg__ind {
  position: absolute;
  z-index: 0;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: var(--w, 0);
  background: var(--fg);
  transform: translateX(var(--x, 0));
  transition: transform 0.55s var(--ease-out), width 0.55s var(--ease-out);
}

/* Without JS: active button gets its own background */
.seg:not(.is-ready) .seg__btn.is-active {
  background: var(--fg);
}

.seg--sm .seg__btn {
  padding: 8px 12px;
  font-size: 0.66rem;
}

.bar {
  position: relative;
  display: block;
  height: 4px;
  background: var(--line);
  overflow: hidden;
}

.bar__fill {
  position: absolute;
  inset: 0;
  background: var(--fg);
  transform-origin: 0 50%;
  transform: scaleX(var(--p, 0));
  transition: transform 1.1s var(--ease-out);
}

.bar--hot .bar__fill {
  background: var(--accent);
}

.js .bar:not(.is-in) .bar__fill {
  transform: scaleX(0);
}

.seats .label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.status,
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid currentColor;
  font-family: var(--f-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  line-height: 1.2;
}

.status .i,
.pill .i {
  width: 13px;
  height: 13px;
  stroke-width: 2;
}

.status--active {
  color: var(--ok);
}

.status--upcoming {
  color: var(--accent-ink);
}

.status--done {
  color: var(--muted);
}

.status--withdrawn {
  color: var(--danger);
}

.pill {
  border-color: var(--line-strong);
}

.pill--muted {
  color: var(--muted);
}

.delta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
}

.delta .i {
  width: 14px;
  height: 14px;
  stroke-width: 2;
}

.delta--up {
  color: var(--ok);
}

.delta--down {
  color: var(--danger);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: end;
  margin-bottom: 28px;
}

.filters .field--select {
  min-width: 160px;
  flex: 1 1 160px;
  max-width: 240px;
}

/* Tablet: toggle on its own row, dropdowns share the next row evenly so none gets squeezed
   (a squeezed select makes the browser's option list spill off-screen) */
@media (max-width: 1023px) {
  .filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    align-items: end;
  }

  .t-list-sec .filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .filters > .seg {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .filters .field--select {
    min-width: 0;
    max-width: none;
  }
}

/* Phone: one dropdown per row */
@media (max-width: 639px) {
  .filters,
  .t-list-sec .filters {
    grid-template-columns: 1fr;
  }
}

.t-empty {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 28px 0;
  color: var(--muted);
  font-size: var(--fs-sm);
}

/* Socials */
.socials {
  display: flex;
  gap: 8px;
}

.social {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-med) var(--ease-back);
}

.social:hover,
.social:focus-visible {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
  transform: rotate(-8deg) translateY(-3px);
}

/* ---------- 4.8 Footer ---------- */
.site-footer {
  position: relative;
  padding-top: clamp(64px, 8vw, 112px);
  border-top: 1px solid var(--fg);
  overflow: hidden;
}

.footer__top {
  display: grid;
  gap: 40px;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .footer__top {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1100px) {
  .footer__top {
    grid-template-columns: 1.6fr 1fr 1fr 1.2fr 1.1fr;
  }
}

.footer__news-copy {
  font-size: var(--fs-lg);
  margin-bottom: 18px;
  max-width: 26ch;
}

.footer__col h3 {
  margin-bottom: 14px;
}

.footer__col ul {
  display: grid;
  gap: 6px;
  font-size: var(--fs-sm);
}

.footer__col ul.socials {
  display: flex;
  gap: 8px;
}

.footer__col p,
.footer__col address {
  font-size: var(--fs-sm);
  color: var(--fg-2);
}

.footer__mark {
  display: flex;
  justify-content: space-between;
  margin-top: clamp(28px, 4vw, 64px);
  font-family: var(--f-display);
  font-stretch: 62%;
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(4.2rem, 19.5vw, 25rem);
  line-height: 0.74;
  letter-spacing: -0.02em;
  overflow: hidden;
  padding-top: 0.04em;
}

.footer__ch {
  display: inline-block;
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  justify-content: space-between;
  align-items: center;
  padding-block: 24px;
  margin-top: 18px;
  border-top: 1px solid var(--line);
  font-size: var(--fs-xs);
  color: var(--muted);
}

.footer__notation {
  letter-spacing: 0.15em;
}

/* Back to top: a pawn that "promotes" into a queen on hover */
.to-top {
  position: fixed;
  z-index: 90;
  bottom: 20px;
  inset-inline-end: 20px;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid var(--fg);
  background: var(--bg);
  border-radius: var(--radius);
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity var(--t-med), transform var(--t-med) var(--ease-out), background var(--t-fast);
}

.to-top.is-visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.to-top svg {
  grid-area: 1 / 1;
  width: 30px;
  height: 30px;
  transition: transform 0.5s var(--ease-back), opacity var(--t-fast);
}

.to-top__queen {
  opacity: 0;
  transform: translateY(14px) scale(0.6);
}

.to-top:hover,
.to-top:focus-visible {
  background: var(--accent);
}

.to-top:hover .to-top__pawn,
.to-top:focus-visible .to-top__pawn {
  opacity: 0;
  transform: translateY(-16px) scale(0.6);
}

.to-top:hover .to-top__queen,
.to-top:focus-visible .to-top__queen {
  opacity: 1;
  transform: none;
}

.toasts:not(:empty)~.to-top {
  bottom: 96px;
}

/* ---------- 4.9 Page sections ---------- */

/* Chess board (SVG drawn by script.js) */
.board {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  direction: ltr;
}

.board>svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.board .sq-l {
  fill: var(--sq-light);
}

.board .sq-d {
  fill: var(--sq-dark);
}

.board .sq-hl {
  fill: var(--sq-hl);
}

.board .coord {
  font-family: var(--f-mono);
  font-size: 13px;
  fill: var(--coord);
}

.board .pc {
  transition: opacity 0.4s;
}

.board .board__frame {
  fill: none;
  stroke: var(--fg);
  stroke-width: 2;
}

.board--hero {
  max-width: 560px;
}

/* Hero (home) */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: calc(var(--header-h) + 32px);
  padding-bottom: 96px;
  overflow: hidden;
}

.hero__lines {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  pointer-events: none;
}

.hero__lines span {
  border-inline-end: 1px solid var(--line);
}

.hero__inner {
  position: relative;
  display: grid;
  gap: 48px;
  align-items: center;
}

@media (min-width: 1024px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 4vw;
  }
}

.hero__title {
  font-size: var(--fs-hero);
  margin-bottom: 28px;
}

.hero__lead {
  max-width: 46ch;
  font-size: var(--fs-lg);
  color: var(--fg-2);
  margin-bottom: 32px;
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 420px) {
  .hero__ctas .btn {
    flex: 1 1 100%;
  }
}

.data-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 44px;
  border-top: 1px solid var(--line-strong);
}

.data-strip>div {
  flex: 1 1 140px;
  padding: 14px 18px 0 0;
}

.data-strip>div+div {
  padding-inline-start: 18px;
  border-inline-start: 1px solid var(--line);
}

.data-strip dt {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.data-strip dd {
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  font-weight: 500;
}

.hero__stage {
  display: grid;
  gap: 20px;
  align-items: start;
  justify-items: center;
}

@media (min-width: 1600px) {
  .hero__stage {
    grid-template-columns: 1fr 140px;
    justify-items: stretch;
  }
}

.hero__tilt {
  position: relative;
  width: 100%;
  max-width: 560px;
  transform-style: preserve-3d;
  will-change: transform;
}

.hero__tilt::after {
  content: "";
  position: absolute;
  inset: 14px -14px -14px 14px;
  border: 1px solid var(--line-strong);
  z-index: -1;
  transform: translateZ(-40px);
}

.hero__tag {
  position: absolute;
  top: -28px;
  inset-inline-end: 0;
  font-size: var(--fs-xs);
  color: var(--accent-ink);
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero__tag::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.6s infinite;
}

.hero__notation {
  width: 100%;
  max-width: 560px;
}

.movelist {
  direction: ltr;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 2px 14px;
  font-size: 0.82rem;
  margin-top: 10px;
}

@media (min-width: 1600px) {
  .movelist {
    grid-template-columns: 1fr;
  }
}

.movelist li {
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 8px;
}

.movelist li span:first-child {
  color: var(--muted);
  width: 2ch;
}

.movelist li.is-new {
  animation: moveIn 0.5s var(--ease-out) both;
}

.movelist li.is-current {
  color: var(--accent-ink);
}

.scroll-cue {
  position: absolute;
  bottom: 26px;
  inset-inline-start: var(--gutter);
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.scroll-cue i {
  position: relative;
  width: 72px;
  height: 1px;
  background: var(--line-strong);
  overflow: hidden;
}

.scroll-cue i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--fg);
  transform: translateX(-100%);
  animation: cue 2.2s var(--ease-io) infinite;
}

/* Marquee */
.marquee {
  position: relative;
  overflow: hidden;
  border-block: 1px solid var(--fg);
  padding-block: clamp(14px, 2vw, 26px);
  white-space: nowrap;
}

.marquee__track {
  display: inline-flex;
  align-items: center;
  gap: clamp(20px, 3vw, 44px);
  padding-inline-end: clamp(20px, 3vw, 44px);
  will-change: transform;
}

.marquee__track>span,
.marquee__track>b {
  font-family: var(--f-display);
  font-stretch: 68%;
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(2.4rem, 6.5vw, 6.5rem);
  line-height: 1;
}

.marquee__track>b {
  font-weight: 300;
  color: var(--accent);
}

.marquee__track em {
  font-family: var(--f-serif);
  font-weight: 400;
  text-transform: none;
  font-stretch: 100%;
}

.marquee--accent {
  background: var(--fg);
  color: var(--bg);
}

.marquee--accent .marquee__track em {
  color: var(--accent);
}

.marquee--badges {
  border-color: var(--line);
  margin-top: clamp(48px, 6vw, 88px);
}

.badge-chip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border: 1px solid var(--line-strong);
  font-size: var(--fs-sm);
  white-space: nowrap;
}

.badge-chip .i {
  width: 22px;
  height: 22px;
  stroke-width: 1.3;
}

/* Manifesto (words light up while scrolling) */
.manifesto__grid {
  display: grid;
  gap: 24px;
}

@media (min-width: 1024px) {
  .manifesto__grid {
    grid-template-columns: 1fr 3fr;
  }
}

.manifesto__text {
  font-size: clamp(1.8rem, 4.3vw, 4.4rem);
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.manifesto__text .w,
.statement__text .w {
  transition: opacity 0.2s;
}

/* Coach credentials (pinned on desktop by script.js) */
.coaches {
  position: relative;
  padding-top: var(--section);
}

.coaches__head {
  display: grid;
  gap: 20px;
  margin-bottom: clamp(48px, 6vw, 96px);
}

.coaches__intro {
  max-width: 52ch;
  color: var(--fg-2);
}

.coaches__stage {
  position: relative;
}

.coach {
  display: grid;
  gap: 28px;
  padding: 40px var(--gutter);
  border-top: 1px solid var(--fg);
  background: var(--bg);
}

@media (min-width: 900px) {
  .coach {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 4vw;
    align-items: center;
  }
}

.coach__media {
  aspect-ratio: 4 / 5;
  max-height: 76vh;
  width: 100%;
}

.coach__index {
  font-size: var(--fs-xs);
  color: var(--muted);
  margin-bottom: 18px;
}

.coach__role {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-ink);
}

.coach__name {
  font-family: var(--f-display);
  font-stretch: 66%;
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(3rem, 7.4vw, 7.6rem);
  line-height: 0.86;
  margin-block: 10px 24px;
}

.coach__stats {
  display: flex;
  gap: 0;
  border-block: 1px solid var(--line);
}

.coach__stats>div {
  flex: 1;
  padding: 14px 0;
}

.coach__stats>div+div {
  padding-inline-start: 20px;
  border-inline-start: 1px solid var(--line);
}

.coach__num {
  font-family: var(--f-mono);
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 500;
  line-height: 1.1;
}

.coach__chart {
  margin-block: 20px;
}

.coach__cols {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  font-size: var(--fs-sm);
}

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

.coach__cols h4 {
  margin-bottom: 8px;
}

.coach__cols li {
  padding: 4px 0 4px 16px;
  position: relative;
}

.coach__cols li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.85em;
  width: 7px;
  height: 7px;
  background: var(--fg);
}

/* Pinned mode (desktop): coaches stack and slide over each other */
.coaches__stage.is-pinned {
  height: 100vh;
  overflow: hidden;
}

.coaches__stage.is-pinned .coach {
  position: absolute;
  inset: 0;
  padding-block: calc(var(--header-h) + 8px) 32px;
  align-items: center;
}

.coaches__stage.is-pinned .coach__media {
  height: calc(100vh - var(--header-h) - 64px);
  aspect-ratio: auto;
}

/* Charts */
.chart svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.chart__line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.chart__area {
  fill: var(--accent);
  opacity: 0.09;
}

.chart__grid {
  stroke: var(--line);
  stroke-width: 1;
  stroke-dasharray: 2 4;
}

.chart__dot {
  fill: var(--bg);
  stroke: var(--fg);
  stroke-width: 1.5;
}

.chart__dot--peak {
  fill: var(--accent);
  stroke: var(--fg);
}

.chart__lab {
  font-family: var(--f-mono);
  font-size: 11px;
  fill: var(--muted);
}

.chart__peak {
  font-family: var(--f-mono);
  font-size: 13px;
  font-weight: 500;
  fill: var(--fg);
}

.chart figcaption {
  margin-top: 6px;
}

/* Hover-reveal list */
.hover-list {
  border-top: 1px solid var(--fg);
}

.hover-list__row {
  position: relative;
  display: grid;
  gap: 4px 18px;
  align-items: center;
  padding: 22px 0;
  grid-template-columns: 2.5em 1fr auto;
  border-bottom: 1px solid var(--line);
  transition: color var(--t-fast);
}

.hover-list__row::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--fg);
  transform: scaleY(0);
  transform-origin: 50% 100%;
  transition: transform 0.5s var(--ease-out);
  z-index: -1;
}

.hover-list li {
  position: relative;
  isolation: isolate;
}

.hover-list__idx {
  font-size: var(--fs-xs);
  color: var(--muted);
}

.hover-list__name {
  font-family: var(--f-display);
  font-stretch: 68%;
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(2rem, 5.6vw, 5.4rem);
  line-height: 0.95;
  transition: transform 0.6s var(--ease-out);
}

.hover-list__meta {
  font-size: 0.8rem;
  color: var(--accent-ink);
  grid-column: 2;
}

.hover-list__desc {
  grid-column: 2;
  font-size: var(--fs-sm);
  color: var(--muted);
}

.hover-list__row>.i {
  grid-row: 1;
  grid-column: 3;
  width: 28px;
  height: 28px;
  transition: transform var(--t-med) var(--ease-out);
}

@media (min-width: 900px) {
  .hover-list__row {
    grid-template-columns: 3em minmax(0, 1fr) 12em 15em 40px;
    padding: 18px 0;
  }

  .hover-list__meta,
  .hover-list__desc {
    grid-column: auto;
  }

  .hover-list__row>.i {
    grid-column: auto;
    grid-row: auto;
  }
}

@media (hover: hover) {

  .hover-list__row:hover,
  .hover-list__row:focus-visible {
    color: var(--bg);
  }

  .hover-list__row:hover::before,
  .hover-list__row:focus-visible::before {
    transform: scaleY(1);
    transform-origin: 50% 0;
  }

  .hover-list__row:hover .hover-list__name {
    transform: translateX(16px);
  }

  .hover-list__row:hover .hover-list__meta {
    color: var(--accent);
  }

  .hover-list__row:hover .hover-list__desc,
  .hover-list__row:hover .hover-list__idx {
    color: color-mix(in srgb, var(--bg) 70%, transparent);
  }

  .hover-list__row:hover>.i {
    transform: rotate(-45deg);
  }
}

.hover-float {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 80;
  width: clamp(220px, 20vw, 320px);
  aspect-ratio: 4 / 5;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.6);
  overflow: hidden;
  clip-path: inset(0 0 0 0);
  transition: opacity 0.3s;
}

.hover-float img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.1);
}

@media (hover: none) {
  .hover-float {
    display: none;
  }
}

/* Horizontal scroll sections: native horizontal scroll fallback, pinned by script.js */
.hscroll {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--line);
}

.hscroll__track {
  display: flex;
  flex-direction: column;
}

.hscroll__panel {
  padding: clamp(48px, 7vw, 96px) var(--gutter);
  border-bottom: 1px solid var(--line);
}

/* Tablet & phone: panels stack, so centre their content instead of leaving a gap on the right */
@media (max-width: 1023px) {
  .hscroll__panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .hscroll__panel > * {
    margin-inline: auto;
  }

  .hscroll__panel .eyebrow,
  .hscroll__hint,
  .hscroll__panel .tag-list {
    justify-content: center;
  }

  .hscroll__panel .media {
    width: 100%;
  }
}

@media (min-width: 1024px) {
  .hscroll__track {
    flex-direction: row;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .hscroll.is-pinned .hscroll__track {
    overflow: visible;
    width: max-content;
    will-change: transform;
  }

  .hscroll__panel {
    flex: none;
    width: min(62vw, 980px);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-bottom: 0;
    border-inline-end: 1px solid var(--line);
  }

  .hscroll__panel.method__intro {
    width: min(52vw, 820px);
  }
}

.method__intro h2 {
  margin-bottom: 24px;
}

.method__intro p {
  max-width: 42ch;
  color: var(--fg-2);
}

.hscroll__hint {
  margin-top: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.arrow-glyph {
  font-family: var(--f-mono);
  font-weight: 300;
  color: var(--accent-ink);
}

.method__panel {
  position: relative;
  gap: 18px;
}

.method__panel>*+* {
  margin-top: 18px;
}

.method__num {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: clamp(6rem, 18vw, 18rem);
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 1px var(--fg);
}

.method__line {
  color: var(--accent-ink);
  font-size: 0.9rem;
}

.method__title {
  font-family: var(--f-display);
  font-stretch: 66%;
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(2.6rem, 6vw, 6rem);
  line-height: 0.9;
}

.method__panel p:not(.method__num):not(.method__line) {
  max-width: 46ch;
  font-size: var(--fs-lg);
  color: var(--fg-2);
}

/* Numbers */
.numbers__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--fg);
}

@media (min-width: 1024px) {
  .numbers__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.numbers__item {
  padding: 24px 16px 24px 0;
  border-bottom: 1px solid var(--line);
}

.numbers__item:not(:nth-child(2n+1)) {
  padding-inline-start: 16px;
  border-inline-start: 1px solid var(--line);
}

@media (min-width: 1024px) {
  .numbers__item {
    padding-inline-start: 20px;
    border-inline-start: 1px solid var(--line);
  }

  .numbers__item:first-child {
    padding-inline-start: 0;
    border-inline-start: 0;
  }
}

.numbers__item dd {
  display: flex;
  align-items: flex-start;
  margin-top: 18px;
}

.numbers__val {
  font-family: var(--f-display);
  font-stretch: 62%;
  font-weight: 800;
  font-size: clamp(3rem, 6.6vw, 8.4rem);
  line-height: 0.85;
  font-variant-numeric: tabular-nums;
}

.numbers__unit {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: clamp(2rem, 5vw, 5rem);
  color: var(--accent-ink);
  line-height: 1;
}

.numbers__grid--sm .numbers__val {
  font-size: clamp(3rem, 7vw, 7rem);
}

/* Outlined text that fills with colour as you scroll (--fill 0..1 set by script.js) */
.outline-fill {
  position: relative;
  display: inline-block;
  color: transparent;
  -webkit-text-stroke: 1px var(--fg);
}

.outline-fill::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  color: var(--fg);
  -webkit-text-stroke: 0;
  clip-path: inset(0 calc((1 - var(--fill, 1)) * 100%) 0 0);
}

/* Tournament preview rows */
.t-preview {
  border-top: 1px solid var(--fg);
}

.t-preview__row {
  display: grid;
  gap: 14px 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  grid-template-columns: auto 1fr;
  align-items: center;
}

.t-preview__row .countdown,
.t-preview__row .btn {
  grid-column: 1 / -1;
}

@media (min-width: 900px) {
  .t-preview__row {
    grid-template-columns: 110px minmax(0, 1fr) 260px auto;
  }

  .t-preview__row .countdown,
  .t-preview__row .btn {
    grid-column: auto;
  }
}

.t-preview__name {
  font-size: clamp(1.3rem, 2.4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.015em;
}

.t-preview__meta {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 4px;
}

.t-date {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  line-height: 1.2;
}

.t-date__d {
  font-family: var(--f-display);
  font-stretch: 62%;
  font-weight: 800;
  font-size: clamp(2.6rem, 4vw, 3.6rem);
  line-height: 0.9;
  color: var(--fg);
  letter-spacing: 0;
}

.t-date--sm .t-date__d {
  font-size: 2rem;
}

.countdown {
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.countdown b {
  font-weight: 500;
  color: var(--fg);
}

.countdown i {
  font-style: normal;
  color: var(--muted);
  font-size: 0.7em;
  margin-inline: 2px 8px;
}

/* Draggable gallery */
.drag-gallery {
  display: flex;
  gap: clamp(12px, 2vw, 24px);
  overflow-x: auto;
  padding-inline: var(--gutter);
  padding-bottom: 18px;
  cursor: grab;
  scrollbar-width: thin;
  scrollbar-color: var(--fg) transparent;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.drag-gallery.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.drag-gallery.is-dragging a,
.drag-gallery.is-dragging img {
  pointer-events: none;
}

.drag-gallery__item {
  flex: none;
  width: clamp(240px, 26vw, 400px);
}

.drag-gallery--wide .drag-gallery__item {
  width: clamp(280px, 40vw, 620px);
}

.drag-gallery__item .media {
  aspect-ratio: 4 / 5;
}

.drag-gallery--wide .drag-gallery__item .media {
  aspect-ratio: 3 / 2;
}

.drag-gallery__item .media img {
  transition: transform 1.2s var(--ease-out);
}

.drag-gallery__item:hover .media img {
  transform: scale(1.05);
}

.drag-gallery figcaption {
  display: grid;
  gap: 4px;
  padding-top: 12px;
  font-size: var(--fs-sm);
}

/* Testimonials (one at a time) */
.quotes__grid {
  display: grid;
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}

.quotes__media {
  display: grid;
  aspect-ratio: 4 / 5;
  max-width: 420px;
}

.quotes__media img {
  grid-area: 1 / 1;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity var(--t-med) var(--ease-out), transform 1.2s var(--ease-out);
}

.quotes__media img.is-active {
  opacity: 1;
  transform: scale(1);
}

@media (max-width: 899px) {
  .quotes__media {
    aspect-ratio: 4 / 3;
    max-width: none;
  }
}

@media (min-width: 900px) {
  .quotes__grid {
    grid-template-columns: minmax(260px, 5fr) 7fr;
  }

  .quotes__media {
    max-width: none;
  }

  .quote__text p {
    font-size: clamp(1.9rem, 3.4vw, 3.6rem);
  }
}

.quotes__stage {
  position: relative;
  min-height: 0;
}

.quote {
  padding-block: 24px;
  border-bottom: 1px solid var(--line);
}

.quotes.is-ready .quotes__stage {
  display: grid;
}

.quotes.is-ready .quote {
  grid-area: 1 / 1;
  border: 0;
  visibility: hidden;
}

.quotes.is-ready .quote.is-active {
  visibility: visible;
}

.quote__text p {
  font-family: var(--f-serif);
  font-size: clamp(1.9rem, 4.6vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
  max-width: 24ch;
  text-wrap: balance;
}

.quote__text p::before {
  content: "“";
  color: var(--accent);
}

.quote__text p::after {
  content: "”";
  color: var(--accent);
}

.quote__by {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 32px;
}

.quote__by img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  filter: grayscale(1);
}

.quote__by>span {
  display: grid;
}

.quote__by .mono {
  font-size: var(--fs-xs);
  color: var(--muted);
}

.quotes__ctrl {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 44px;
}

.quotes:not(.is-ready) .quotes__ctrl {
  display: none;
}

.quotes__count {
  font-size: var(--fs-sm);
  min-width: 6ch;
  text-align: center;
}

[data-quote-prev] .i {
  transform: scaleX(-1);
}

/* Portal highlight */
.portal__grid {
  display: grid;
  gap: 48px;
  align-items: center;
}

@media (min-width: 1024px) {
  .portal__grid {
    grid-template-columns: 1fr 1fr;
  }
}

.portal__copy>*+* {
  margin-top: 24px;
}

.portal__copy p {
  max-width: 48ch;
  color: var(--fg-2);
}

.mock {
  border: 1px solid var(--fg);
  background: var(--surface);
  padding: 14px;
  display: grid;
  gap: 10px;
  box-shadow: 18px 18px 0 -1px var(--bg), 18px 18px 0 0 var(--fg);
}

.mock__top {
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-xs);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.mock__row {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}

.mock__card {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  font-size: var(--fs-xs);
}

.mock__card strong {
  font-size: 1.3rem;
}

.mock__card--wide {
  grid-column: 1 / -1;
}

/* Big CTA (board reacts to cursor) */
.big-cta {
  position: relative;
  overflow: hidden;
  background: var(--fg);
  color: var(--bg);
  padding-block: clamp(80px, 11vw, 160px);
  isolation: isolate;
}

.big-cta__board {
  position: absolute;
  inset: 0;
  z-index: -1;
  display: grid;
  grid-template-columns: repeat(var(--cols, 16), 1fr);
}

.big-cta__board span {
  aspect-ratio: 1;
  background: var(--bg);
  opacity: 0;
  transform: scale(0.2);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}

.big-cta__board span.is-dark {
  opacity: 0.035;
  transform: scale(1);
}

.big-cta__board span.is-lit {
  opacity: 0.16;
  transform: scale(0.92);
  transition-duration: 0.15s;
}

.big-cta__board span.is-lit-accent {
  background: var(--accent);
  opacity: 0.9;
  transform: scale(0.86);
  transition-duration: 0.15s;
}

.big-cta__inner {
  display: grid;
  justify-items: start;
  gap: 32px;
}

.big-cta .eyebrow {
  color: color-mix(in srgb, var(--bg) 70%, transparent);
}

.big-cta__title {
  font-family: var(--f-display);
  font-stretch: 62%;
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(5rem, 22vw, 26rem);
  line-height: 0.78;
  letter-spacing: -0.03em;
}

.big-cta__title em {
  color: var(--accent);
}

.big-cta__title--md {
  font-size: clamp(3.6rem, 13vw, 14rem);
}

.big-cta .btn--accent:hover {
  color: var(--fg);
  --btn-fill: var(--bg);
  border-color: var(--bg);
}

.big-cta .btn--line {
  color: var(--bg);
  border-color: var(--bg);
  --btn-fill: var(--bg);
}

.big-cta .btn--line:hover {
  color: var(--fg);
}

.big-cta--compact {
  padding-block: clamp(64px, 8vw, 120px);
}

/* FAQ / accordion */
.faq__grid {
  display: grid;
  gap: 40px;
}

@media (min-width: 1024px) {
  .faq__grid {
    grid-template-columns: 1fr 1.4fr;
  }
}

.acc {
  border-top: 1px solid var(--fg);
}

.acc__item {
  border-bottom: 1px solid var(--line);
}

.acc__btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0;
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  font-weight: 600;
  line-height: 1.3;
  transition: color var(--t-fast);
}

.acc__btn:hover {
  color: var(--accent-ink);
}

.acc__btn .mono {
  color: var(--accent-ink);
  font-size: 0.75em;
  margin-inline-end: 8px;
}

.acc__icon {
  position: relative;
  width: 22px;
  height: 22px;
  flex: none;
  border: 1px solid currentColor;
}

.acc__icon::before,
.acc__icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 1.5px;
  background: currentColor;
  transform: translate(-50%, -50%);
  transition: transform 0.45s var(--ease-out);
}

.acc__icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.acc__btn[aria-expanded="true"] .acc__icon::after {
  transform: translate(-50%, -50%) rotate(0deg);
}

.acc__btn[aria-expanded="true"] .acc__icon {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.acc__panel {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.55s var(--ease-out);
}

.js .acc__panel {
  grid-template-rows: 0fr;
}

.js .acc__item.is-open .acc__panel {
  grid-template-rows: 1fr;
}

.acc__inner {
  overflow: hidden;
  min-height: 0;
}

.acc__inner>* {
  padding-bottom: 24px;
  max-width: 64ch;
  color: var(--fg-2);
}

.acc__inner ul {
  display: grid;
  gap: 6px;
}

.acc__inner li {
  padding-inline-start: 18px;
  position: relative;
}

.acc__inner li::before {
  content: "—";
  position: absolute;
  inset-inline-start: 0;
  color: var(--accent-ink);
}

.js .acc__inner>* {
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.4s, transform 0.5s var(--ease-out);
}

.js .acc__item.is-open .acc__inner>* {
  opacity: 1;
  transform: none;
  transition-delay: 0.12s;
}

/* Generic page hero (inner pages) */
.page-hero {
  position: relative;
  padding-top: calc(var(--header-h) + clamp(32px, 4.5vw, 64px));
  padding-bottom: clamp(48px, 6vw, 88px);
  border-bottom: 1px solid var(--fg);
  overflow: hidden;
}

.page-hero__board {
  position: absolute;
  top: 0;
  bottom: 0;
  inset-inline-end: 0;
  width: min(40vw, 560px);
  --cell: clamp(40px, 5vw, 70px);
  opacity: 0.35;
  mask-image: linear-gradient(to left, #000 20%, transparent);
  -webkit-mask-image: linear-gradient(to left, #000 20%, transparent);
  pointer-events: none;
}

.page-hero__grid {
  position: relative;
  display: grid;
  gap: 32px;
  align-items: end;
}

@media (min-width: 1024px) {
  .page-hero__grid {
    grid-template-columns: 1.6fr 1fr;
  }
}

.page-hero__title {
  font-size: var(--fs-hero);
}

.page-hero__lead {
  font-size: var(--fs-lg);
  color: var(--fg-2);
  max-width: 44ch;
}

.page-hero__side {
  display: grid;
  gap: 24px;
  justify-items: start;
}

/* ===== Home 2 ===== */
.gridhero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding-bottom: clamp(40px, 6vw, 80px);
  padding-top: calc(var(--header-h) + 40px);
}

.gridhero__grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(var(--cols, 12), 1fr);
  grid-auto-rows: var(--cell, 8.333vw);
}

.gridhero__grid span {
  position: relative;
  border-inline-end: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: background 0.5s var(--ease-out);
}

.gridhero__grid span.is-dark {
  background: color-mix(in srgb, var(--sq-dark) 26%, transparent);
}

.gridhero__grid span.is-hover {
  background: var(--accent);
  transition-duration: 0.1s;
}

.gridhero__grid span.is-move::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--fg);
  opacity: 0.55;
  transform: translate(-50%, -50%);
  animation: dotIn 0.3s var(--ease-back) both;
}

.gridhero__grid span.is-trail {
  background: color-mix(in srgb, var(--accent) 30%, transparent);
}

.gridhero__knight {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--cell, 8.333vw);
  height: var(--cell, 8.333vw);
  padding: 12%;
  pointer-events: none;
  opacity: 0;
  z-index: 2;
}

.gridhero__copy {
  position: relative;
  z-index: 3;
  pointer-events: none;
}

.gridhero__copy a,
.gridhero__copy button {
  pointer-events: auto;
}

.gridhero__title {
  font-size: clamp(3.6rem, 13vw, 14rem);
  margin-bottom: 32px;
}

.gridhero__foot {
  display: grid;
  gap: 24px;
  align-items: end;
  padding-top: 24px;
  border-top: 1px solid var(--fg);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
}

@media (min-width: 900px) {
  .gridhero__foot {
    grid-template-columns: 1fr auto;
  }
}

.gridhero__foot p {
  max-width: 50ch;
  color: var(--fg-2);
}

.story {
  position: relative;
  border-top: 1px solid var(--fg);
}

.story__grid {
  display: grid;
  gap: 32px;
}

@media (min-width: 1024px) {
  .story__grid {
    grid-template-columns: 1fr 1fr;
    gap: 6vw;
  }
}

.story__sticky {
  position: sticky;
  top: calc(var(--header-h) + 12px);
  align-self: start;
  z-index: 2;
  padding-top: 24px;
  background: var(--bg);
}

@media (min-width: 1024px) {
  .story__sticky {
    top: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 0;
  }
}

.story__board-wrap {
  width: 100%;
  max-width: 560px;
  margin-inline: auto;
}

@media (max-width: 1023px) {
  .story__board-wrap {
    max-width: 300px;
  }
}

.story__caption {
  margin-top: 14px;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-ink);
  text-align: center;
}

.story__steps {
  padding-block: 10vh 15vh;
}

.story__steps .eyebrow {
  margin-bottom: 10vh;
}

.story__step {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  opacity: 0.25;
  transition: opacity 0.6s var(--ease-out);
}

@media (max-width: 1023px) {
  .story__step {
    min-height: 55vh;
  }
}

.story__step.is-active,
html:not(.js) .story__step {
  opacity: 1;
}

.story__no {
  font-size: var(--fs-xs);
  color: var(--muted);
}

.story__word {
  font-family: var(--f-display);
  font-stretch: 64%;
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(3.4rem, 9vw, 9rem);
  line-height: 0.85;
}

.story__step p {
  max-width: 44ch;
  font-size: var(--fs-lg);
  color: var(--fg-2);
}

.story__note {
  font-size: 0.8rem !important;
  color: var(--accent-ink) !important;
}

@media (max-width: 1023px) {
  .story__step {
    min-height: 60vh;
  }
}

.stack {
  display: grid;
  gap: 24px;
}

.stack__card {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  display: grid;
  gap: 18px;
  min-height: min(70vh, 560px);
  padding: clamp(24px, 4vw, 56px);
  background: var(--surface);
  border: 1px solid var(--fg);
  overflow: hidden;
  transform-origin: 50% 0;
}

.stack__card:nth-child(2) {
  top: calc(var(--header-h) + 44px);
  background: var(--bg-2);
}

.stack__card:nth-child(3) {
  top: calc(var(--header-h) + 68px);
}

.stack__card:nth-child(4) {
  top: calc(var(--header-h) + 92px);
  background: var(--fg);
  color: var(--bg);
}

.stack__card:nth-child(4) .tag-list li {
  border-color: color-mix(in srgb, var(--bg) 40%, transparent);
  color: var(--bg);
}

.stack__card:nth-child(4) .stack__meta {
  color: var(--accent);
}

.stack__meta {
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-ink);
}

.stack__title {
  font-family: var(--f-display);
  font-stretch: 64%;
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(2.2rem, 11vw, 8rem);
  line-height: 0.85;
  display: grid;
  overflow-wrap: anywhere;
}

@media (min-width: 640px) {
  .stack__title {
    font-size: clamp(3rem, 8vw, 8rem);
  }
}

.stack__title span {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 400;
  text-transform: none;
  font-stretch: 100%;
  font-size: 0.45em;
  color: var(--accent-ink);
}

.stack__card:nth-child(4) .stack__title span {
  color: var(--accent);
}

.stack__card p {
  max-width: 44ch;
  font-size: var(--fs-lg);
  align-self: end;
}

.stack__piece {
  position: absolute;
  bottom: -6%;
  inset-inline-end: -2%;
  width: clamp(160px, 26vw, 380px);
  height: auto;
  aspect-ratio: 1;
  opacity: 0.14;
  pointer-events: none;
}

.split-coaches__grid {
  display: grid;
  gap: 40px;
  align-items: center;
}

@media (min-width: 1024px) {
  .split-coaches__grid {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

.split-list {
  border-top: 1px solid var(--fg);
  margin-bottom: 24px;
}

.split-list__btn {
  width: 100%;
  display: grid;
  grid-template-columns: 7.5em 1fr;
  align-items: baseline;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  transition: color var(--t-fast);
}

.split-list__btn .mono {
  font-size: var(--fs-xs);
}

.split-list__name {
  font-family: var(--f-display);
  font-stretch: 66%;
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(2rem, 4.8vw, 4.6rem);
  line-height: 0.95;
  transition: transform 0.5s var(--ease-out);
}

.split-list__btn:hover,
.split-list__btn.is-active {
  color: var(--fg);
}

.split-list__btn.is-active .split-list__name {
  transform: translateX(14px);
}

.split-list__btn.is-active .mono {
  color: var(--accent-ink);
}

.split-coaches__media {
  aspect-ratio: 4 / 5;
  max-height: 80vh;
}

.split-coaches__media img {
  transition: opacity 0.4s;
}

.video-sec {
  padding-block: var(--section);
  border-top: 1px solid var(--line);
  overflow: hidden;
}

.video-sec__frame {
  position: relative;
  margin-inline: auto;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 92vh;
  overflow: hidden;
  background: var(--fg);
  clip-path: inset(0 var(--gutter) 0 var(--gutter));
}

.video-sec__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.1);
}

.video-sec__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  color: #F2EDE4;
}

.video-sec__circle {
  display: grid;
  place-items: center;
  width: clamp(80px, 10vw, 140px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--accent);
  color: #0E0E0E;
  transition: transform 0.6s var(--ease-back);
}

.video-sec__circle .i {
  width: 30%;
  height: 30%;
  fill: currentColor;
}

.video-sec__play:hover .video-sec__circle {
  transform: scale(1.12);
}

.video-sec__play .mono {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .6);
}

.film {
  display: grid;
  gap: 16px;
}

.film .board {
  max-width: 440px;
  margin-inline: auto;
}

.film__cap {
  font-family: var(--f-mono);
  font-size: var(--fs-sm);
  text-align: center;
  min-height: 3em;
}

.plans {
  display: grid;
  gap: 16px;
}

@media (min-width: 1024px) {
  .plans {
    grid-template-columns: repeat(3, 1fr);
  }
}

.plan {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: clamp(24px, 3vw, 40px);
  border: 1px solid var(--line-strong);
  transition: transform 0.5s var(--ease-out), border-color var(--t-fast);
}

.plan:hover {
  transform: translateY(-6px);
  border-color: var(--fg);
}

.plan--feature {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

.plan--feature .label {
  color: var(--accent);
}

.plan--feature .btn--accent:hover {
  --btn-fill: var(--bg);
  color: var(--fg);
}

.plan__name {
  font-size: 1.5rem;
}

.plan__price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  padding-block: 12px;
  border-block: 1px solid currentColor;
  border-color: color-mix(in srgb, currentColor 20%, transparent);
}

.plan__cur {
  font-family: var(--f-serif);
  font-size: 2rem;
}

.plan__num {
  font-family: var(--f-display);
  font-stretch: 62%;
  font-weight: 900;
  font-size: clamp(3.4rem, 6vw, 5.4rem);
  line-height: 0.9;
  font-variant-numeric: tabular-nums;
  display: inline-block;
}

.plan__per {
  font-size: var(--fs-xs);
  opacity: 0.7;
  margin-inline-start: 4px;
}

.plan__bill {
  font-size: var(--fs-xs);
  opacity: 0.7;
  min-height: 1.5em;
}

.plan__list {
  display: grid;
  gap: 10px;
  font-size: var(--fs-sm);
  margin-bottom: 10px;
}

.plan__list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.plan__list .i {
  color: var(--accent);
  stroke-width: 2;
  margin-top: 2px;
}

.cal-strip {
  display: flex;
  gap: 0;
  overflow-x: auto;
  padding-inline: var(--gutter);
  cursor: grab;
  scrollbar-width: thin;
}

.cal-strip.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.cal-strip__item {
  flex: none;
  width: clamp(220px, 22vw, 300px);
  padding: 24px;
  border: 1px solid var(--line-strong);
  margin-inline-end: -1px;
  display: grid;
  gap: 8px;
  align-content: start;
  transition: background var(--t-fast), color var(--t-fast);
}

.cal-strip__item:hover {
  background: var(--fg);
  color: var(--bg);
}

.cal-strip__d {
  font-family: var(--f-display);
  font-stretch: 62%;
  font-weight: 900;
  font-size: clamp(3.4rem, 5vw, 4.6rem);
  line-height: 0.9;
}

.cal-strip__item h3 {
  font-size: 1.1rem;
}

.cal-strip__item .mono:not(.label) {
  font-size: var(--fs-xs);
}

.cal-strip__item--key {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
}

.cal-strip__item--key .label {
  color: inherit;
}

.t-slider {
  overflow: hidden;
  padding-block: 8px;
  border: 0;
}

.t-slider .marquee__track {
  gap: 16px;
  padding-inline-end: 16px;
  white-space: normal;
  align-items: stretch;
}

.t-card {
  width: clamp(280px, 30vw, 420px);
  padding: 28px;
  border: 1px solid var(--line-strong);
  display: grid;
  gap: 20px;
  align-content: space-between;
  background: var(--surface);
  transition: border-color var(--t-fast);
}

.t-card:hover {
  border-color: var(--fg);
}

.t-card blockquote {
  font-family: var(--f-serif);
  font-size: clamp(1.3rem, 2vw, 1.75rem);
  line-height: 1.15;
}

.t-card figcaption {
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-size: var(--fs-sm);
}

.t-card .mono {
  font-size: var(--fs-xs);
  color: var(--muted);
}

.t-slider:not(.is-running) .marquee__track {
  overflow-x: auto;
  max-width: 100%;
  padding-inline: var(--gutter);
}

.news-cta__grid {
  display: grid;
  gap: 32px;
  align-items: end;
}

@media (min-width: 1024px) {
  .news-cta__grid {
    grid-template-columns: 1.2fr 1fr;
  }
}

.news-form--lg p:first-child {
  color: var(--fg-2);
  margin-bottom: 12px;
}

/* ===== About ===== */
.about-hero__media {
  margin-top: clamp(40px, 6vw, 80px);
  margin-inline: var(--gutter);
  aspect-ratio: 16 / 8;
}

/* Items slide in from the side; clip so they never widen the page on phones */
.timeline-sec {
  overflow-x: clip;
}

.timeline-sec__grid {
  display: grid;
  gap: 48px;
}

@media (min-width: 1024px) {
  .timeline-sec__grid {
    grid-template-columns: 1fr 1.4fr;
  }

  .timeline-sec__head {
    position: sticky;
    top: calc(var(--header-h) + 40px);
    align-self: start;
  }
}

.timeline-sec__head>*+* {
  margin-top: 20px;
}

.timeline {
  position: relative;
  padding-inline-start: 34px;
}

.timeline__line {
  position: absolute;
  top: 0;
  bottom: 0;
  inset-inline-start: 6px;
  width: 2px;
  background: var(--line);
}

.timeline__line span {
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform-origin: 50% 0;
  transform: scaleY(var(--tl, 1));
}

.timeline__item {
  position: relative;
  display: grid;
  gap: 8px 24px;
  padding-bottom: clamp(48px, 7vw, 96px);
}

@media (min-width: 640px) {
  .timeline__item {
    grid-template-columns: 5.5em 1fr;
  }
}

.timeline__item::before {
  content: "";
  position: absolute;
  inset-inline-start: -34px;
  top: 6px;
  width: 14px;
  height: 14px;
  background: var(--bg);
  border: 2px solid var(--fg);
  transition: background var(--t-med), transform 0.5s var(--ease-back);
}

.timeline__item.is-in::before {
  background: var(--accent);
  border-color: var(--accent);
  transform: rotate(45deg);
}

.timeline__year {
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--accent-ink);
}

.timeline__item h3 {
  font-family: var(--f-display);
  font-stretch: 70%;
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(1.8rem, 3.4vw, 3rem);
  line-height: 0.95;
  margin-bottom: 10px;
}

.timeline__item p {
  color: var(--fg-2);
  max-width: 52ch;
}

.timeline__move {
  margin-top: 12px;
  font-size: 0.9rem;
  color: var(--muted) !important;
  direction: ltr;
}

.statements .wrap {
  display: grid;
  gap: clamp(64px, 10vw, 140px);
}

.statement {
  max-width: 1200px;
}

.statement--right {
  justify-self: end;
  text-align: end;
}

.statement--right .eyebrow {
  flex-direction: row-reverse;
}

.statement__text {
  font-size: clamp(2rem, 5vw, 5rem);
  line-height: 1.04;
  font-weight: 600;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.principles {
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--fg);
}

@media (min-width: 640px) {
  .principles {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .principles {
    grid-template-columns: repeat(4, 1fr);
  }
}

.principle {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 28px 24px 40px 0;
  border-bottom: 1px solid var(--line);
}

@media (min-width: 640px) {
  .principle:nth-child(even) {
    padding-inline-start: 24px;
    border-inline-start: 1px solid var(--line);
  }
}

@media (min-width: 1024px) {
  .principle+.principle {
    padding-inline-start: 24px;
    border-inline-start: 1px solid var(--line);
  }
}

.principle__piece {
  width: 84px;
  height: 84px;
  margin-bottom: 14px;
  transition: transform 0.6s var(--ease-back);
}

.principle:hover .principle__piece {
  transform: translateY(-10px) rotate(-6deg);
}

.principle h3 {
  font-size: 1.5rem;
}

.principle p:last-child {
  color: var(--fg-2);
  font-size: var(--fs-sm);
}

.team__grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
}

.team-card {
  width: 100%;
  display: grid;
  gap: 4px;
  text-align: start;
}

.team-card__media {
  display: block;
  aspect-ratio: 4 / 5;
  margin-bottom: 12px;
  background: var(--surface-2);
}

.team-card__media::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(45deg, var(--line) 25%, transparent 25%, transparent 75%, var(--line) 75%), linear-gradient(45deg, var(--line) 25%, transparent 25%, transparent 75%, var(--line) 75%);
  background-size: 40px 40px;
  background-position: 0 0, 20px 20px;
}

.team-card__media img {
  position: relative;
  transition: clip-path 0.8s var(--ease-out), transform 1.2s var(--ease-out);
}

@media (hover: hover) {
  .team-card__media img {
    clip-path: inset(100% 0 0 0);
  }

  .team-card:hover .team-card__media img,
  .team-card:focus-visible .team-card__media img {
    clip-path: inset(0 0 0 0);
    transform: scale(1.04);
  }
}

.team-card__meta {
  font-size: var(--fs-xs);
  color: var(--accent-ink);
}

.team-card__name {
  font-family: var(--f-display);
  font-stretch: 68%;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 2rem;
  line-height: 1;
}

.team-card__role {
  font-size: var(--fs-sm);
  color: var(--muted);
}

.facility {
  gap: 18px;
}

.facility .media {
  aspect-ratio: 3 / 2;
  width: 100%;
}

.facility figcaption {
  display: grid;
  gap: 4px;
  max-width: 52ch;
  color: var(--fg-2);
}

.facility strong {
  font-size: 1.6rem;
  color: var(--fg);
}

.partners__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--fg);
  border-inline-start: 1px solid var(--line);
}

@media (min-width: 900px) {
  .partners__grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

.partners__grid li {
  display: grid;
  gap: 8px;
  padding: 28px 18px;
  border-inline-end: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-xs);
  color: var(--muted);
  transition: background var(--t-fast), color var(--t-fast);
}

.partners__grid li:hover {
  background: var(--fg);
  color: var(--bg);
}

.partner-mark {
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--fg);
  letter-spacing: 0.04em;
}

.partners__grid li:hover .partner-mark {
  color: var(--accent);
}

.partners__note {
  margin-top: 14px;
}

/* ===== Programs ===== */
.ladder {
  position: relative;
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  margin-bottom: clamp(40px, 6vw, 72px);
  padding-top: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.ladder__track {
  position: absolute;
  top: 7px;
  left: 0;
  width: 100%;
  height: 1px;
  pointer-events: none;
  z-index: 1;
}

.ladder__step::before,
.ladder__sep::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--fg);
}

.ladder__sep {
  position: relative;
}

.ladder__fill {
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: 3px;
  background: var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(var(--lvl, 0.15));
  transition: transform 0.8s var(--ease-out);
}

.ladder__step {
  position: relative;
  flex: 1 0 118px;
  display: grid;
  gap: 4px;
  align-content: start;
  padding: 20px 12px 18px 0;
  text-align: start;
  color: var(--muted);
  transition: color var(--t-fast);
}

.ladder__step .mono {
  font-size: var(--fs-xs);
  white-space: nowrap;
}

.ladder__step strong {
  font-family: var(--f-display);
  font-stretch: 68%;
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(1.25rem, 1.8vw, 2rem);
  line-height: 1;
}

.ladder__dot {
  position: absolute;
  z-index: 2;
  top: -7px;
  inset-inline-start: 0;
  width: 12px;
  height: 12px;
  background: var(--bg);
  border: 2px solid var(--fg);
  transition: background var(--t-fast), transform 0.4s var(--ease-back);
}

.ladder__step:hover,
.ladder__step.is-active {
  color: var(--fg);
}

.ladder__step.is-active .ladder__dot {
  background: var(--accent);
  border-color: var(--accent);
  transform: rotate(45deg) scale(1.2);
}

.ladder__step.is-active .mono {
  color: var(--accent-ink);
}

.ladder__sep {
  display: none;
  flex: 0 0 auto;
  padding: 20px 16px 0;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  max-width: 8em;
  line-height: 1.4;
}

.ladder__sep::after {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 8px;
  inset-inline-start: 0;
  border-inline-start: 1px dashed var(--line-strong);
}

.ladder__step--alt strong {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 400;
  text-transform: none;
  font-stretch: 100%;
}

@media (min-width: 1100px) {
  .ladder__sep {
    display: block;
  }
}

.programs {
  display: grid;
  gap: 48px;
}

.programs.is-tabs {
  gap: 0;
}

.programs.is-tabs .program:not(.is-active) {
  display: none;
}

.program {
  display: grid;
  gap: 24px;
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.program__head {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.program__big {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: clamp(4rem, 10vw, 9rem);
  line-height: 0.75;
  color: transparent;
  -webkit-text-stroke: 1px var(--fg);
}

.program__name {
  font-family: var(--f-display);
  font-stretch: 64%;
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(2.8rem, 7vw, 7rem);
  line-height: 0.85;
}

.program__piece {
  width: clamp(70px, 9vw, 120px);
  height: auto;
  aspect-ratio: 1;
  margin-inline-start: auto;
}

.program__lead {
  font-size: var(--fs-lg);
  max-width: 60ch;
  color: var(--fg-2);
}

.spec {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  border-top: 1px solid var(--line);
  border-inline-start: 1px solid var(--line);
}

.spec>div {
  padding: 14px 16px;
  border-inline-end: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.spec dt {
  font-family: var(--f-mono);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.spec dd {
  margin-top: 4px;
  font-weight: 600;
}

.program__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.quiz-sec__grid {
  display: grid;
  gap: 40px;
  align-items: start;
}

@media (min-width: 1024px) {
  .quiz-sec__grid {
    grid-template-columns: 1fr 1fr;
  }
}

.quiz-sec__grid>div>*+* {
  margin-top: 20px;
}

.quiz {
  border: 1px solid var(--fg);
  padding: clamp(20px, 3vw, 40px);
  display: grid;
  gap: 18px;
  background: var(--surface);
  min-height: 480px;
  align-content: start;
}

.quiz__progress {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-xs);
}

.quiz__bar {
  position: relative;
  flex: 1;
  height: 2px;
  background: var(--line);
  margin-inline-start: 12px;
}

.quiz__bar span {
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(var(--q, 0.25));
  transition: transform 0.6s var(--ease-out);
}

.quiz__q {
  display: grid;
  gap: 10px;
}

.js .quiz__q:not(.is-active) {
  display: none;
}

.quiz__legend {
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 12px;
  float: left;
  width: 100%;
}

.quiz__legend+* {
  clear: both;
}

.quiz__nav {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.quiz__result {
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px dashed var(--accent);
}

.quiz__result h3 {
  font-family: var(--f-display);
  font-stretch: 66%;
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 0.9;
}

.quiz__result .i-res {
  width: 72px;
  height: 72px;
}

.road {
  gap: 16px;
}

.road>*+* {
  margin-top: 16px;
}

.road__rating {
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  color: var(--accent-ink);
}

.road__piece {
  width: clamp(90px, 12vw, 180px);
  height: auto;
  aspect-ratio: 1;
}

.road h3 {
  font-family: var(--f-display);
  font-stretch: 66%;
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(2.6rem, 6vw, 6rem);
  line-height: 0.9;
}

.road p:not(.label):not(.road__rating) {
  font-size: var(--fs-lg);
  color: var(--fg-2);
  max-width: 36ch;
}

/* ===== Tournaments ===== */
.t-hero__row {
  display: grid;
  gap: 32px;
  margin-top: 40px;
  align-items: end;
}

@media (min-width: 1024px) {
  .t-hero__row {
    grid-template-columns: auto 1fr;
    gap: 6vw;
  }
}

.t-hero__info {
  display: grid;
  gap: 20px;
}

.t-hero__info p {
  color: var(--fg-2);
}

.flipclock {
  display: flex;
  gap: clamp(6px, 1vw, 12px);
  direction: ltr;
}

.flipclock__unit {
  display: grid;
  gap: 8px;
  justify-items: center;
}

.flipclock__num {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 1.6em;
  padding: 0.12em 0.18em;
  font-size: clamp(2.6rem, 7vw, 6rem);
  font-weight: 500;
  line-height: 1;
  background: var(--fg);
  color: var(--bg);
  font-variant-numeric: tabular-nums;
  overflow: hidden;
}

.flipclock__num::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--bg);
  opacity: 0.25;
}

.flipclock__num.is-flip {
  animation: flip 0.5s var(--ease-out);
}

.flipclock--soon .flipclock__num {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--fg);
}

.flipclock--soon .flipclock__num::after {
  background: var(--fg);
}

.t-list {
  border-top: 1px solid var(--fg);
}

.t-row {
  display: grid;
  gap: 16px 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  grid-template-columns: auto 1fr;
  align-items: center;
  transition: background var(--t-fast);
}

.t-row> :nth-child(n+3) {
  grid-column: 1 / -1;
}

@media (min-width: 1200px) {
  .t-row {
    grid-template-columns: 100px minmax(0, 1.4fr) minmax(0, 1.3fr) 180px auto;
  }

  .t-row> :nth-child(n+3) {
    grid-column: auto;
  }
}

.t-row:hover {
  background: color-mix(in srgb, var(--surface-2) 60%, transparent);
}

.t-row__name {
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  font-weight: 700;
}

.t-row__meta {
  font-size: var(--fs-xs);
  color: var(--muted);
  margin-top: 4px;
}

.t-row__facts {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 6px 18px;
  font-size: 0.8rem;
  justify-content: start;
}

.t-row__facts dt {
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.t-row__ctas {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.t-row--past .t-row__name {
  color: var(--fg-2);
}

.t-row.is-filtered {
  display: none;
}

.results__grid {
  display: grid;
  gap: 48px;
  align-items: end;
}

@media (min-width: 1024px) {
  .results__grid {
    grid-template-columns: 1fr 1.2fr;
  }
}

.podium {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  align-items: end;
  height: 380px;
}

.podium__step {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 10px;
  height: 100%;
  align-content: end;
  text-align: center;
}

.podium__who {
  display: grid;
  gap: 2px;
  font-size: var(--fs-sm);
}

.podium__who .mono {
  font-size: var(--fs-xs);
  color: var(--muted);
}

.podium__block {
  display: grid;
  place-items: start center;
  padding-top: 14px;
  background: var(--fg);
  color: var(--bg);
  transform-origin: 50% 100%;
}

.podium__step--1 .podium__block {
  height: 220px;
  background: var(--accent);
  color: var(--on-accent);
}

.podium__step--2 .podium__block {
  height: 150px;
}

.podium__step--3 .podium__block {
  height: 100px;
}

.podium__place {
  font-family: var(--f-display);
  font-stretch: 62%;
  font-weight: 900;
  font-size: 3.4rem;
  line-height: 1;
}

.podium__crown {
  width: 48px;
  height: 48px;
  margin-inline: auto;
}

.podium .podium__step {
  align-self: end;
  height: auto;
}

/* ---------- 4.10 Auth pages ---------- */
.page-auth {
  min-height: 100vh;
}

.auth {
  display: grid;
  min-height: 100vh;
}

@media (min-width: 1024px) {
  .auth {
    grid-template-columns: 1fr 1fr;
  }
}

.auth__art {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 20px var(--gutter) 40px;
  background: var(--fg);
  color: var(--bg);
  overflow: hidden;
  --sq-light: #2A2824;
  --sq-dark: #1A1917;
  --coord: rgba(242, 237, 228, 0.4);
  --line: rgba(242, 237, 228, .14);
  --piece-b: #0E0E0E;
  --piece-b-stroke: #BDB6AA;
  --piece-w: #F2EDE4;
  --piece-w-stroke: #0E0E0E;
}

.auth__art .logo__sq {
  fill: var(--bg);
}

.auth__art .logo__knight {
  fill: var(--fg);
}

.auth__art .logo__sub,
.auth__art .label {
  color: color-mix(in srgb, var(--bg) 60%, transparent);
}

.auth__art .icon-btn {
  border-color: color-mix(in srgb, var(--bg) 35%, transparent);
}

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

.auth__art-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.auth__toggles,
.solo__toggles {
  display: flex;
  gap: 8px;
}

.auth__board-wrap {
  width: 100%;
  max-width: 520px;
  margin: auto;
  display: grid;
  gap: 16px;
}

@media (max-width: 1023px) {
  .auth__board-wrap {
    max-width: 320px;
  }

  .auth__quote {
    display: none;
  }
}

.auth__caption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  align-items: baseline;
}

.auth__move {
  font-size: 1.1rem;
  color: var(--accent);
  direction: ltr;
}

.auth__quote {
  font-family: var(--f-serif);
  font-size: clamp(1.4rem, 2vw, 1.9rem);
  line-height: 1.15;
  max-width: 30ch;
}

.auth__quote .mono {
  display: block;
  font-size: var(--fs-xs);
  margin-top: 8px;
  color: var(--accent);
}

.auth__panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px var(--gutter);
}

.auth__panel-inner {
  width: 100%;
  max-width: 500px;
}

.auth__back {
  display: flex;
  width: max-content;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 40px;
  color: var(--muted);
}

.auth__back .i {
  transform: scaleX(-1);
}

.auth__title {
  font-size: clamp(3.2rem, 7vw, 6.6rem);
  margin-bottom: 14px;
}

.auth__lead {
  color: var(--fg-2);
  margin-bottom: 28px;
}

.auth__hint {
  text-align: center;
}

.auth__switch {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: var(--fs-sm);
}

.auth--register .form-step {
  display: grid;
  gap: 22px;
}

.form-step.is-entering {
  animation: stepIn 0.6s var(--ease-out) both;
}

.guardian {
  display: grid;
  gap: 4px;
}

.mate {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  background: var(--fg);
  color: var(--bg);
}

.mate__king {
  width: 120px;
  height: 120px;
  --piece-b: var(--bg);
  --piece-b-stroke: var(--bg);
  animation: topple 1.1s var(--ease-io) 0.25s both;
  transform-origin: 70% 92%;
}

.mate__text {
  font-size: clamp(3rem, 8vw, 6rem);
  animation: rise 0.8s var(--ease-out) 0.5s both;
}

.mate__text em {
  color: var(--accent);
}

.mate .label {
  color: color-mix(in srgb, var(--bg) 60%, transparent);
}

/* ---------- 4.11 404 and Coming Soon ---------- */
.solo {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.solo__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  position: relative;
  z-index: 2;
}

.solo__main {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: 40px 64px;
}

.pix404 {
  display: grid;
  grid-template-columns: repeat(17, 1fr);
  width: min(100%, 980px);
  margin-bottom: clamp(32px, 5vw, 64px);
}

.px {
  aspect-ratio: 1;
}

.px.is-on.px--l {
  background: var(--fg);
}

.px.is-on.px--d {
  background: color-mix(in srgb, var(--fg) 82%, var(--accent));
}

.px:not(.is-on) {
  box-shadow: inset 0 0 0 0.5px var(--line);
}

.nf__row {
  display: grid;
  gap: 40px;
  align-items: end;
}

@media (min-width: 900px) {
  .nf__row {
    grid-template-columns: 1.6fr 1fr;
  }
}

.nf__title {
  font-size: clamp(2.8rem, 7vw, 6.6rem);
  margin-bottom: 20px;
}

.nf__lead {
  max-width: 46ch;
  color: var(--fg-2);
  margin-bottom: 28px;
}

.nf__king {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 12px;
}

.nf__king-svg {
  width: clamp(140px, 18vw, 220px);
  height: clamp(140px, 18vw, 220px);
  transform-origin: 72% 92%;
  animation: topple 1.6s var(--ease-io) 0.8s both;
}

.nf__shadow {
  width: 60%;
  height: 2px;
  background: var(--fg);
}

.nf__res {
  animation: rise 0.6s var(--ease-out) 2.2s both;
}

.soon__bg {
  position: absolute;
  inset: -20%;
  --cell: 90px;
  opacity: 0.22;
  z-index: 0;
  animation: boardDrift 40s linear infinite;
  mask-image: radial-gradient(ellipse at 70% 40%, #000 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 40%, #000 10%, transparent 70%);
  background-color: transparent;
  background-image: linear-gradient(45deg, var(--sq-dark) 25%, transparent 25%, transparent 75%, var(--sq-dark) 75%), linear-gradient(45deg, var(--sq-dark) 25%, transparent 25%, transparent 75%, var(--sq-dark) 75%);
  background-size: calc(var(--cell) * 2) calc(var(--cell) * 2);
  background-position: 0 0, var(--cell) var(--cell);
}

.soon {
  gap: 28px;
}

.soon__title {
  font-size: clamp(3.4rem, 11vw, 11rem);
}

.soon__lead {
  max-width: 52ch;
  font-size: var(--fs-lg);
  color: var(--fg-2);
}

.soon__form {
  max-width: 520px;
}

.soon__foot {
  margin-top: 8px;
}


/* =====================================================================
   5. DASHBOARD (student portal)
   ===================================================================== */
.page-dash {
  background: var(--bg-2);
}

.dash {
  display: grid;
  min-height: 100vh;
}

@media (min-width: 1100px) {
  .dash {
    grid-template-columns: 272px minmax(0, 1fr);
  }
}

.dash-side {
  position: fixed;
  z-index: 250;
  top: 0;
  bottom: 0;
  inset-inline-start: 0;
  width: min(300px, 86vw);
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px 16px 20px;
  background: var(--fg);
  color: var(--bg);
  transform: translateX(-102%);
  transition: transform 0.6s var(--ease-out);
  overflow-y: auto;
  --line: rgba(242, 237, 228, .12);
}

.dash-side.is-open {
  transform: none;
}

@media (min-width: 1100px) {
  .dash-side {
    position: sticky;
    height: 100vh;
    width: auto;
    transform: none;
  }

  .dash-side__close {
    display: none !important;
  }
}

.dash-side .logo__sq {
  fill: var(--bg);
}

.dash-side .logo__knight {
  fill: var(--fg);
}

.dash-side .logo__sub {
  color: color-mix(in srgb, var(--bg) 55%, transparent);
}

.dash-side__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px 14px;
  border-bottom: 1px solid var(--line);
}

.dash-side .icon-btn {
  border-color: color-mix(in srgb, var(--bg) 30%, transparent);
}

.dash-side__kicker {
  padding-inline: 10px;
  color: color-mix(in srgb, var(--bg) 50%, transparent) !important;
}

.dnav {
  display: grid;
  gap: 2px;
}

.dnav__link {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px;
  font-size: 0.92rem;
  color: color-mix(in srgb, var(--bg) 70%, transparent);
  border-radius: var(--radius);
  transition: background var(--t-fast), color var(--t-fast), padding var(--t-med) var(--ease-out);
}

.dnav__link .i {
  width: 19px;
  height: 19px;
}

.dnav__link::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  background: var(--accent);
  transform: scaleY(0);
  transition: transform 0.4s var(--ease-out);
}

.dnav__link:hover {
  color: var(--bg);
  background: rgba(242, 237, 228, .06);
  padding-inline-start: 16px;
}

.dnav__link.is-active {
  color: var(--bg);
  background: rgba(242, 237, 228, .08);
}

.dnav__link.is-active::before {
  transform: scaleY(1);
}

.dnav__count {
  margin-inline-start: auto;
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #0E0E0E;
  font-family: var(--f-mono);
  font-size: 0.66rem;
}

.dnav__count:empty,
.dnav__count[data-zero] {
  display: none;
}

.dash-side__board {
  --cell: 22px;
  --sq-light: transparent;
  --sq-dark: rgba(242, 237, 228, .06);
  flex: 1;
  min-height: 80px;
  margin-inline: 6px;
  border: 1px solid var(--line);
}

.dash-side__foot {
  display: grid;
  gap: 2px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.dnav__link--logout:hover {
  color: #FF8B78;
}

.i-back {
  transform: scaleX(-1);
}

.dash-scrim {
  position: fixed;
  inset: 0;
  z-index: 240;
  background: var(--scrim);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s;
}

.dash-scrim.is-open {
  opacity: 1;
  pointer-events: auto;
}

@media (min-width: 1100px) {
  .dash-scrim {
    display: none;
  }
}

.dash-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.dash-top {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 10px clamp(14px, 3vw, 36px);
  background: color-mix(in srgb, var(--bg-2) 85%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

@media (min-width: 1100px) {
  .dash-top__menu {
    display: none !important;
  }
}

.dash-top__title {
  min-width: 0;
}

.dash-top__page {
  font-weight: 700;
  font-size: 1.05rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-top__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-inline-start: auto;
}

.rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--fg);
  font-size: 0.85rem;
  font-weight: 500;
}

.rating-badge .i {
  width: 18px;
  height: 18px;
  stroke-width: 1.2;
}

.dash-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 3px;
  padding-inline-end: 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  transition: border-color var(--t-fast);
}

.dash-user:hover {
  border-color: var(--fg);
}

.dash-user img {
  width: 36px;
  height: 36px;
  object-fit: cover;
  filter: grayscale(1);
}

.dash-user__txt {
  display: grid;
  line-height: 1.15;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: start;
}

.dash-user__txt .mono {
  font-size: 0.62rem;
  color: var(--muted);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

@media (max-width: 767px) {

  .dash-user__txt,
  .dash-top__actions [data-dir-toggle] {
    display: none;
  }

  .dash-user {
    padding-inline-end: 3px;
  }
}

@media (max-width: 479px) {
  .rating-badge {
    display: none;
  }

  .dash-top__title .label {
    display: none;
  }
}

.notif {
  position: relative;
}

.notif__btn {
  position: relative;
}

.notif__dot {
  position: absolute;
  top: -6px;
  inset-inline-end: -6px;
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  padding: 0 4px;
  background: var(--accent);
  color: #0E0E0E;
  font-family: var(--f-mono);
  font-size: 0.6rem;
}

.notif__dot[data-zero] {
  display: none;
}

.notif__menu {
  position: absolute;
  top: calc(100% + 10px);
  inset-inline-end: -60px;
  width: min(380px, calc(100vw - 24px));
  z-index: 70;
  background: var(--bg);
  border: 1px solid var(--fg);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .4);
  transform-origin: 90% 0;
  animation: dropIn 0.45s var(--ease-out) both;
}

@media (max-width: 600px) {
  .notif__menu {
    position: fixed;
    top: 72px;
    inset-inline: 12px;
    width: auto;
  }
}

.notif__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.notif__list {
  max-height: 360px;
  overflow-y: auto;
}

.notif__item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-sm);
  transition: background var(--t-fast);
}

.notif__item:hover {
  background: var(--surface-2);
}

.notif__item .i {
  margin-top: 3px;
  color: var(--accent-ink);
}

.notif__item.is-unread {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.notif__item.is-unread strong::after {
  content: " · New";
  font-family: var(--f-mono);
  font-size: 0.62rem;
  font-weight: 400;
  color: var(--accent-ink);
  text-transform: uppercase;
}

.notif__item time {
  display: block;
  font-family: var(--f-mono);
  font-size: 0.66rem;
  color: var(--muted);
  margin-top: 2px;
}

.notif__list--card {
  max-height: none;
  border-top: 1px solid var(--line);
}

.notif__list--card .notif__item {
  padding-inline: 0;
}

.notif__all {
  display: block;
  padding: 12px 16px;
  text-align: center;
}

.dcard__links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* Notifications page */
.notif__list--page {
  max-height: none;
  border-top: 1px solid var(--line);
}

.notif__list--page .notif__item {
  grid-template-columns: auto 1fr auto;
  align-items: start;
  padding: 16px 12px;
  font-size: var(--fs-base, 1rem);
}

.notif__mark {
  white-space: nowrap;
  font-size: var(--fs-xs);
}

@media (max-width: 559px) {
  .notif__list--page .notif__item {
    grid-template-columns: auto 1fr;
  }

  .notif__mark {
    grid-column: 2;
    justify-self: start;
  }
}

.notif__item--empty {
  display: block;
  padding: 28px 12px;
  color: var(--muted);
}

/* Profile page */
.profile-grid {
  display: grid;
  gap: clamp(16px, 2vw, 24px);
  align-items: start;
}

@media (min-width: 1100px) {
  .profile-grid {
    grid-template-columns: minmax(300px, 2fr) 3fr;
  }
}

.profile-card__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}

.profile-card__img {
  width: 112px;
  height: 112px;
  object-fit: cover;
  filter: grayscale(1);
  border: 1px solid var(--line);
}

.profile-card__name {
  font-family: var(--f-display);
  font-stretch: 66%;
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 0.95;
  margin-block: 4px 6px;
}

.profile-form .form__row {
  justify-content: flex-end;
}

.dash-content {
  flex: 1;
  padding: clamp(16px, 3vw, 36px);
  display: grid;
  gap: clamp(16px, 2vw, 24px);
  align-content: start;
  outline: none;
}

.dgrid {
  display: grid;
  gap: clamp(12px, 1.6vw, 20px);
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.dcard {
  position: relative;
  grid-column: span 12;
  display: grid;
  gap: 14px;
  align-content: start;
  padding: clamp(18px, 2vw, 26px);
  background: var(--surface);
  border: 1px solid var(--line);
  min-width: 0;
}

/* Coordinate corner tick: a small square that echoes the board grid */
.dcard::before {
  content: "";
  position: absolute;
  top: -1px;
  inset-inline-start: -1px;
  width: 10px;
  height: 10px;
  background: var(--fg);
}

.dcard:hover::before {
  background: var(--accent);
}

/* Spans per breakpoint; dense flow fills the holes left by tall cards */
@media (min-width: 768px) {
  .dgrid {
    grid-auto-flow: row dense;
  }

  .dcard {
    grid-column: span 5;
  }

  .dcard--welcome {
    grid-column: span 12;
  }

  .dcard--rating {
    grid-column: span 7;
    grid-row: span 2;
  }

  .dcard--next {
    grid-column: span 6;
  }

  .dcard--ring {
    grid-column: span 5;
  }

  .dcard--tours {
    grid-column: span 6;
  }

  .dcard--puzzle {
    grid-column: span 12;
  }

  .dcard--notif {
    grid-column: span 7;
  }

  .dcard--quick {
    grid-column: span 5;
  }
}

@media (min-width: 1400px) {
  .dcard {
    grid-column: span 3;
  }

  .dcard--welcome {
    grid-column: span 8;
  }

  .dcard--next {
    grid-column: span 4;
  }

  .dcard--rating {
    grid-column: span 6;
    grid-row: span 2;
  }

  .dcard--ring {
    grid-column: span 3;
  }

  .dcard--tours {
    grid-column: span 6;
  }

  .dcard--puzzle {
    grid-column: span 7;
  }

  .dcard--notif {
    grid-column: span 5;
    grid-row: span 2;
  }

  .dcard--quick {
    grid-column: span 7;
  }
}

.dcard__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.dcard__title {
  font-family: var(--f-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-2);
}

.dcard__big {
  font-family: var(--f-display);
  font-stretch: 68%;
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 0.95;
}

.dcard--welcome {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
  grid-template-columns: 1fr;
}

.dcard--welcome::before {
  background: var(--accent);
}

.dcard--welcome .label {
  color: color-mix(in srgb, var(--bg) 60%, transparent);
}

.dcard--welcome .btn--line {
  color: var(--bg);
  border-color: color-mix(in srgb, var(--bg) 50%, transparent);
  --btn-fill: var(--bg);
}

.dcard--welcome .btn--line:hover {
  color: var(--fg);
}

.dcard--welcome .btn--accent:hover {
  --btn-fill: var(--bg);
  color: var(--fg);
}

.welcome {
  display: flex;
  align-items: center;
  gap: 18px;
}

.welcome__img {
  width: 84px;
  height: 84px;
  object-fit: cover;
  flex: none;
  filter: grayscale(1);
  border: 1px solid color-mix(in srgb, var(--bg) 30%, transparent);
}

.welcome__title {
  font-size: clamp(1.8rem, 3.6vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.02em;
  margin-block: 6px;
}

.welcome__title em {
  color: var(--accent);
}

.welcome__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: color-mix(in srgb, var(--bg) 70%, transparent);
}

.welcome__meta span+span::before {
  content: "■";
  margin-inline-end: 16px;
  color: var(--accent);
  font-size: 0.6em;
  vertical-align: middle;
}

.welcome__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 479px) {
  .welcome {
    flex-direction: column;
    align-items: flex-start;
  }

  .welcome__actions .btn {
    flex: 1 1 100%;
  }
}

.rating-big {
  font-size: clamp(3.4rem, 7vw, 6rem);
  font-weight: 500;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.countdown--lg {
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
}

.att-ring {
  position: relative;
  width: min(160px, 100%);
  aspect-ratio: 1;
  margin-inline: auto;
}

.att-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring__bg {
  fill: none;
  stroke: var(--line);
  stroke-width: 8;
}

.ring__fg {
  fill: none;
  stroke: var(--accent);
  stroke-width: 8;
  stroke-linecap: butt;
  stroke-dasharray: 100;
  stroke-dashoffset: calc(100 - var(--ring, 92));
  transition: stroke-dashoffset 1.4s var(--ease-out);
}

.js .att-ring:not(.is-in) .ring__fg {
  stroke-dashoffset: 100;
}

.ring__val {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 500;
}

.mini-list {
  display: grid;
}

.mini-list li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.mini-list li:first-child {
  border-top: 1px solid var(--line);
}

@media (max-width: 479px) {
  .mini-list li {
    grid-template-columns: auto 1fr;
  }

  .mini-list li>.status,
  .mini-list li>.btn {
    grid-column: 2;
    justify-self: start;
  }
}

.mini-list__name {
  font-weight: 600;
  line-height: 1.3;
}

.quick {
  display: grid;
  gap: 8px;
}

@media (min-width: 640px) {
  .dcard--quick .quick {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 768px) and (max-width: 1399px) {
  .dcard--quick .quick {
    grid-template-columns: 1fr;
  }
}

.quick__btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line-strong);
  font-weight: 600;
  font-size: var(--fs-sm);
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}

.quick__btn>.i:last-child {
  margin-inline-start: auto;
  transition: transform var(--t-med) var(--ease-out);
}

.quick__btn:hover {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

.quick__btn:hover>.i:last-child {
  transform: translateX(4px);
}

/* Puzzle of the day */
.puzzle {
  display: grid;
  gap: 20px;
}

@media (min-width: 640px) {
  .puzzle {
    grid-template-columns: minmax(0, 360px) 1fr;
    align-items: start;
  }
}

.puzzle__board {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  aspect-ratio: 1;
  border: 2px solid var(--fg);
  direction: ltr;
  position: relative;
}

.puzzle__sq {
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: var(--sq-light);
  padding: 0;
}

.puzzle__sq.is-dark {
  background: var(--sq-dark);
}

.puzzle__sq:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  z-index: 2;
}

.puzzle__sq.is-selected {
  box-shadow: inset 0 0 0 3px var(--accent);
}

.puzzle__sq.is-target::after {
  content: "";
  width: 26%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--fg);
  opacity: 0.35;
}

.puzzle__sq.is-good {
  background: color-mix(in srgb, var(--ok) 55%, var(--sq-light));
}

.puzzle__sq.is-bad {
  background: color-mix(in srgb, var(--danger) 55%, var(--sq-light));
  animation: shake 0.4s;
}

.puzzle__sq svg {
  width: 88%;
  height: 88%;
  pointer-events: none;
}

.puzzle__sq .coord-in {
  position: absolute;
  font-family: var(--f-mono);
  font-size: 9px;
  color: var(--coord);
  left: 3px;
  bottom: 1px;
}

.puzzle__sq .coord-rk {
  position: absolute;
  font-family: var(--f-mono);
  font-size: 9px;
  color: var(--coord);
  right: 3px;
  top: 1px;
}

.puzzle__float {
  position: absolute;
  width: 12.5%;
  aspect-ratio: 1;
  pointer-events: none;
  z-index: 3;
}

.puzzle__side {
  display: grid;
  gap: 16px;
  align-content: start;
}

.puzzle__msg {
  font-size: var(--fs-lg);
  line-height: 1.35;
  display: flex;
  gap: 10px;
}

.puzzle__msg.is-good {
  color: var(--ok);
}

.puzzle__msg.is-bad {
  color: var(--danger);
}

.puzzle__msg .i {
  margin-top: 4px;
}

/* Dashboard pages */
.dpage-head {
  display: grid;
  gap: 16px;
  align-items: end;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--fg);
}

@media (min-width: 900px) {
  .dpage-head {
    grid-template-columns: 1fr auto;
  }
}

.dpage-title {
  font-family: var(--f-display);
  font-stretch: 66%;
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(2.8rem, 6vw, 5.6rem);
  line-height: 0.88;
}

.dpage-head .label + .dpage-title {
  margin-top: 12px;
}

.dpage-sub {
  max-width: 46ch;
  color: var(--fg-2);
  font-size: var(--fs-sm);
}

.dpage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.dsection {
  display: grid;
  gap: 16px;
  padding: clamp(18px, 2vw, 26px);
  background: var(--surface);
  border: 1px solid var(--line);
  min-width: 0;
}

.dsection__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.filters--dash {
  margin-bottom: 0;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.filters--dash .field--select {
  max-width: none;
  flex: 1 1 150px;
}

.batches-wrap {
  border-top: 0;
}

.batches {
  display: grid;
  min-width: 0;
}

.batch {
  display: grid;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
  grid-template-columns: 1fr auto;
  transition: background var(--t-fast), padding var(--t-med) var(--ease-out);
}

.batch>.batch__facts,
.batch>.seats {
  grid-column: 1 / -1;
}

@media (min-width: 1200px) {
  .batch {
    grid-template-columns: minmax(180px, 1fr) minmax(0, 2.2fr) 150px auto;
  }

  .batch>.batch__facts,
  .batch>.seats {
    grid-column: auto;
  }

  .batch__facts {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.batch:hover {
  background: var(--surface-2);
  padding-inline: 10px;
}

.batch.is-highlight {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  padding-inline: 10px;
}

.batch.is-filtered {
  display: none;
}

.batch__name {
  font-size: 1.3rem;
  font-weight: 700;
}

.batch__coach {
  font-size: var(--fs-sm);
  color: var(--muted);
}

.batch__facts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 6px 14px;
  font-size: 0.78rem;
}

.batch__facts dt {
  font-size: 0.62rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.my-batches {
  display: grid;
}

.my-batch {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.my-batch:first-child {
  border-top: 1px solid var(--line);
}

@media (max-width: 599px) {
  .my-batch {
    grid-template-columns: 1fr;
  }

  .my-batch>* {
    justify-self: start;
  }
}

.my-batch.is-new {
  animation: rowIn 0.7s var(--ease-out) both;
}

.flow {
  gap: 20px;
}

.flow__step {
  display: grid;
  gap: 18px;
}

.flow__step.is-entering {
  animation: stepIn 0.55s var(--ease-out) both;
}

.flow__batch {
  padding: 16px;
  border: 1px solid var(--fg);
  display: grid;
  gap: 4px;
}

.flow__batch strong {
  font-size: 1.4rem;
}

.flow__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 16px 0;
  border-block: 1px solid var(--line);
}

.flow__total strong {
  font-size: 2rem;
}

.steps--panel {
  margin-top: 0;
}

/* Calendar */
.cal__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.cal__title {
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  min-width: 12ch;
}

.cal__head .icon-btn:first-child .i {
  transform: scaleX(-1);
}

.cal__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-inline-start: auto;
  font-size: var(--fs-xs);
}

.cal__legend li {
  display: flex;
  align-items: center;
  gap: 6px;
}

.swatch {
  width: 12px;
  height: 12px;
  display: inline-block;
}

.swatch--a {
  background: var(--ev-a);
}

.swatch--b {
  background: var(--ev-b);
}

.swatch--c {
  background: var(--ev-c);
}

.cal__views {
  position: relative;
  overflow: hidden;
}

.cal__week,
.cal__month {
  will-change: transform, opacity;
}

.cal__week {
  overflow-x: auto;
}

.wk {
  display: grid;
  grid-template-columns: 54px repeat(7, minmax(110px, 1fr));
  min-width: 860px;
  border-top: 1px solid var(--fg);
}

.wk__corner,
.wk__day {
  position: sticky;
  top: 0;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  z-index: 2;
  font-size: var(--fs-sm);
}

.wk__day {
  border-inline-start: 1px solid var(--line);
}

.wk__day .mono {
  display: block;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.wk__day strong {
  font-size: 1.3rem;
}

.wk__day.is-today {
  background: var(--fg);
  color: var(--bg);
}

.wk__day.is-today .mono {
  color: var(--accent);
}

.wk__hours {
  position: relative;
}

.wk__hour {
  height: 52px;
  font-family: var(--f-mono);
  font-size: 0.62rem;
  color: var(--muted);
  padding-inline-end: 6px;
  text-align: end;
  transform: translateY(-6px);
}

.wk__col {
  position: relative;
  border-inline-start: 1px solid var(--line);
  background-image: linear-gradient(var(--line) 1px, transparent 1px);
  background-size: 100% 52px;
}

.wk__col.is-today {
  background-color: color-mix(in srgb, var(--accent) 7%, transparent);
}

.ev {
  position: absolute;
  inset-inline: 4px;
  display: grid;
  align-content: start;
  gap: 2px;
  padding: 6px 8px;
  overflow: hidden;
  text-align: start;
  background: color-mix(in srgb, var(--evc) 20%, var(--surface));
  border-inline-start: 3px solid var(--evc);
  font-size: 0.74rem;
  line-height: 1.25;
  transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-fast);
}

.ev:hover,
.ev:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px -12px rgba(0, 0, 0, .4);
  z-index: 3;
}

.ev strong {
  font-size: 0.78rem;
}

.ev .mono {
  font-size: 0.64rem;
  color: var(--fg-2);
}

.ev--a {
  --evc: var(--ev-a);
}

.ev--b {
  --evc: var(--ev-b);
}

.ev--c {
  --evc: var(--ev-c);
}

.ev.is-past {
  opacity: 0.55;
}

.now-line {
  position: absolute;
  inset-inline: 0;
  height: 2px;
  background: var(--danger);
  z-index: 4;
  pointer-events: none;
}

.now-line::before {
  content: "";
  position: absolute;
  inset-inline-start: -5px;
  top: -4px;
  width: 10px;
  height: 10px;
  background: var(--danger);
  border-radius: 50%;
}

.now-line span {
  position: absolute;
  inset-inline-end: 4px;
  top: -18px;
  font-family: var(--f-mono);
  font-size: 0.6rem;
  color: var(--danger);
}

.mo {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border-top: 1px solid var(--fg);
  border-inline-start: 1px solid var(--line);
}

.mo__dow {
  padding: 8px;
  font-family: var(--f-mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  border-inline-end: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.mo__cell {
  min-height: 104px;
  padding: 6px;
  border-inline-end: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.mo__cell.is-out {
  background: repeating-linear-gradient(45deg, transparent 0 6px, var(--line) 6px 7px);
}

.mo__cell.is-out .mo__num {
  color: var(--muted);
}

.mo__num {
  font-family: var(--f-mono);
  font-size: 0.78rem;
}

.mo__cell.is-today .mo__num {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  background: var(--fg);
  color: var(--bg);
}

.mo__ev {
  display: block;
  width: 100%;
  padding: 2px 6px;
  font-size: 0.66rem;
  text-align: start;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: color-mix(in srgb, var(--evc) 22%, transparent);
  border-inline-start: 2px solid var(--evc);
}

.mo__ev:hover {
  background: color-mix(in srgb, var(--evc) 40%, transparent);
}

@media (max-width: 640px) {
  .mo__cell {
    min-height: 72px;
  }

  .mo__ev {
    font-size: 0;
    height: 6px;
    padding: 0;
  }

  .mo__ev .sr-only {
    font-size: 0.66rem;
  }
}

.upcoming {
  display: grid;
}

.upcoming__item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.upcoming__item:first-child {
  border-top: 1px solid var(--line);
}

/* Tournament registration */
.treg__grid {
  display: grid;
  gap: 16px;
  align-items: start;
}

@media (min-width: 1100px) {
  .treg__grid {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  }

  .treg__summary {
    position: sticky;
    top: 92px;
  }
}

.treg {
  padding: 0;
  background: transparent;
  border: 0;
}

.treg__form {
  gap: 22px;
}

.treg .dcard {
  grid-column: auto;
  grid-row: auto;
}

.pay .seg,
.dsection__head .seg {
  justify-self: start;
}

.open-tours {
  display: grid;
}

.open-tour {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px 16px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  transition: background var(--t-fast);
}

.open-tour>.seats {
  grid-column: 1 / -1;
}

@media (min-width: 900px) {
  .open-tour {
    grid-template-columns: auto 1fr 200px auto;
  }

  .open-tour>.seats {
    grid-column: auto;
  }
}

.open-tour.is-selected {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}

.open-tour.is-selected [data-pick-tour] {
  background: var(--fg);
  color: var(--bg);
}

.open-tour.is-filtered {
  display: none;
}

.pay {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px dashed var(--line-strong);
}

.pay .label {
  display: flex;
  gap: 6px;
  align-items: center;
  text-transform: none;
  letter-spacing: 0;
}

.summary {
  display: grid;
  gap: 0;
}

.summary__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-sm);
}

.summary__row span:first-child {
  color: var(--muted);
}

.summary__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 16px;
}

.summary__total strong {
  font-size: 2.2rem;
}

.summary.is-swapping {
  animation: stepIn 0.5s var(--ease-out);
}

.entry-pass {
  border: 2px solid var(--fg);
  padding: 20px;
  display: grid;
  gap: 10px;
  background: var(--surface);
  position: relative;
  overflow: hidden;
}

.entry-pass::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  inset-inline-end: 0;
  width: 70px;
  --cell: 17.5px;
  background-color: var(--sq-light);
  background-image: linear-gradient(45deg, var(--sq-dark) 25%, transparent 25%, transparent 75%, var(--sq-dark) 75%), linear-gradient(45deg, var(--sq-dark) 25%, transparent 25%, transparent 75%, var(--sq-dark) 75%);
  background-size: 35px 35px;
  background-position: 0 0, 17.5px 17.5px;
}

.entry-pass>* {
  position: relative;
  z-index: 1;
  max-width: calc(100% - 80px);
}

.entry-pass strong {
  font-size: 1.4rem;
}


/* =====================================================================
   6. ANIMATIONS — keyframes, reveal states, cursor, preloader,
      page transition, marquee
   ===================================================================== */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.3;
    transform: scale(0.7);
  }
}

@keyframes cue {
  0% {
    transform: translateX(-100%);
  }

  55% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(100%);
  }
}

@keyframes errIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
    clip-path: inset(0 100% 0 0);
  }

  to {
    opacity: 1;
    transform: none;
    clip-path: inset(0 0 0 0);
  }
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-5px);
  }

  50% {
    transform: translateX(5px);
  }

  75% {
    transform: translateX(-3px);
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.96);
    clip-path: inset(0 0 100% 0);
  }

  to {
    opacity: 1;
    transform: none;
    clip-path: inset(0 0 0 0);
  }
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateX(40px);
  }
}

@keyframes moveIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes dotIn {
  from {
    transform: translate(-50%, -50%) scale(0);
  }

  to {
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes flip {
  0% {
    transform: rotateX(0);
  }

  50% {
    transform: rotateX(-90deg);
  }

  100% {
    transform: rotateX(0);
  }
}

@keyframes stepIn {
  from {
    opacity: 0;
    transform: translateX(var(--step-x, 24px));
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes rowIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
    background: color-mix(in srgb, var(--accent) 30%, transparent);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes dropIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.96);
    clip-path: inset(0 0 100% 0);
  }

  to {
    opacity: 1;
    transform: none;
    clip-path: inset(0 0 0 0);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes topple {
  0% {
    transform: rotate(0);
  }

  25% {
    transform: rotate(-8deg);
  }

  45% {
    transform: rotate(4deg);
  }

  100% {
    transform: rotate(88deg) translateY(4%);
  }
}

@keyframes boardDrift {
  from {
    transform: translate3d(0, 0, 0) rotate(-8deg);
  }

  to {
    transform: translate3d(-180px, -180px, 0) rotate(-8deg);
  }
}

@keyframes pxIn {
  from {
    transform: scale(0);
  }

  to {
    transform: scale(1);
  }
}

@keyframes marqueeCss {
  to {
    transform: translateX(-50%);
  }
}

/* 404 squares assemble on load (pure CSS, so it works without JS) */
.px.is-on {
  animation: pxIn 0.5s var(--ease-back) both;
  animation-delay: calc(var(--i) * 35ms + 0.1s);
}

/* Split text masks */
.line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.1em;
  margin-bottom: -0.1em;
}

.line__i {
  display: block;
  will-change: transform;
}

.display .line {
  padding-top: 0.04em;
}

[data-split] .w-i {
  display: inline-block;
}

/* Scramble: keep width stable while letters shuffle */
[data-scramble],
[data-scramble-num] {
  font-variant-numeric: tabular-nums;
}

/* Custom cursor (desktop with fine pointer only; enabled by html.has-cursor) */
.cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 900;
  pointer-events: none;
  display: none;
}

.has-cursor .cursor {
  display: block;
}

.has-cursor,
.has-cursor a,
.has-cursor button,
.has-cursor [data-cursor],
.has-cursor label {
  cursor: none;
}

.has-cursor input,
.has-cursor textarea,
.has-cursor select {
  cursor: auto;
}

.cursor__dot,
.cursor__ring {
  position: absolute;
  left: 0;
  top: 0;
  border-radius: 50%;
  will-change: transform;
}

.cursor__dot {
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  background: var(--fg);
}

.cursor__ring {
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 1px solid var(--fg);
  display: grid;
  place-items: center;
  transition: width 0.4s var(--ease-out), height 0.4s var(--ease-out), margin 0.4s var(--ease-out), background 0.3s, border-color 0.3s, opacity 0.3s;
}

.cursor__label {
  font-family: var(--f-mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--on-accent);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.25s, transform 0.4s var(--ease-out);
  white-space: nowrap;
}

.cursor.is-hover .cursor__ring {
  width: 84px;
  height: 84px;
  margin: -42px 0 0 -42px;
  background: var(--accent);
  border-color: var(--accent);
}

.cursor.is-hover .cursor__label {
  opacity: 1;
  transform: none;
}

.cursor.is-hover .cursor__dot {
  opacity: 0;
}

.cursor.is-link .cursor__ring {
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  border-color: var(--accent);
}

.cursor.is-media {
  mix-blend-mode: difference;
}

.cursor.is-media .cursor__ring {
  border-color: #fff;
}

.cursor.is-media .cursor__dot {
  background: #fff;
}

.cursor.is-text .cursor__ring {
  opacity: 0;
}

.cursor.is-hidden {
  opacity: 0;
}

/* Preloader: shown only while html.is-intro (first visit in a session) */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  place-items: center;
  background: var(--fg);
  color: var(--bg);
}

.is-intro .preloader {
  display: grid;
}

.is-intro body {
  overflow: hidden;
}

.preloader__board {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  width: min(62vmin, 440px);
  aspect-ratio: 1;
}

.pl-sq {
  background: var(--bg);
  transform: scale(0);
}

.pl-sq--d {
  background: var(--accent);
}

.preloader__meta {
  position: absolute;
  inset: auto var(--gutter) 28px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.preloader__logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--f-display);
  font-stretch: 70%;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 1.4rem;
  overflow: hidden;
}

.preloader__logo .logo__mark {
  width: 34px;
  height: 34px;
}

.preloader .logo__sq {
  fill: var(--bg);
}

.preloader .logo__knight {
  fill: var(--fg);
}

.preloader__count {
  font-size: clamp(3rem, 9vw, 7rem);
  line-height: 0.8;
  font-variant-numeric: tabular-nums;
}

/* Page transition: chessboard squares wipe diagonally */
.pt {
  position: fixed;
  inset: 0;
  z-index: 950;
  pointer-events: none;
  display: none;
}

.pt.is-active,
.is-entering .pt {
  display: block;
}

.is-entering .pt {
  background: var(--fg);
}

.pt__grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(var(--cols, 10), 1fr);
  grid-template-rows: repeat(var(--rows, 6), 1fr);
}

.pt__grid span {
  background: var(--fg);
  transform: scale(0);
}

.pt__grid span.is-acc {
  background: color-mix(in srgb, var(--fg) 88%, var(--accent));
}

.pt__title {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  font-family: var(--f-display);
  font-stretch: 66%;
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(2.4rem, 8vw, 7rem);
  color: var(--bg);
  white-space: nowrap;
  opacity: 0;
}

/* Theme switch: circular reveal using the View Transitions API */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

.theme-fade,
.theme-fade * {
  transition: background-color 0.5s var(--ease-out), color 0.5s var(--ease-out), border-color 0.5s var(--ease-out), fill 0.5s var(--ease-out) !important;
}


/* =====================================================================
   7. REDUCED-MOTION RULES
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .preloader,
  .pt,
  .cursor,
  .hover-float,
  .scroll-progress__pawn {
    display: none !important;
  }

  .has-cursor,
  .has-cursor * {
    cursor: auto !important;
  }

  .story__step {
    opacity: 1 !important;
  }

  .soon__bg {
    animation: none !important;
  }

  .nf__king-svg,
  .mate__king {
    animation: none !important;
    transform: rotate(88deg) translateY(4%);
  }

  .marquee__track {
    transform: none !important;
  }

  .marquee {
    overflow-x: auto;
  }

  .stack__card {
    position: relative;
    top: auto !important;
  }

  .coaches__stage.is-pinned {
    height: auto;
  }
}