/*
 * Roundify — Swiss Bulletin
 * Monochrome editorial system layered over the vendored Tabler primitives.
 */

/* Palette aliases are supplied by css/themes/theme-bridge.css. */

body {
  background: var(--bg);
  color: var(--ink);
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--ink);
  color: var(--bg);
}

:where(a, button, input, select):focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.page-shell {
  width: min(calc(100% - 2 * clamp(20px, 4.2vw, 72px)), 1540px);
}

.site-main {
  min-height: calc(100vh - 148px);
  padding-block: clamp(40px, 5vw, 80px) clamp(72px, 9vw, 144px);
}

/* Navigation */

.site-header {
  position: relative;
  z-index: 20;
  border-color: var(--editorial-rule);
  background: var(--panel);
}

.site-nav {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto auto;
  min-height: 82px;
  gap: 30px;
}

.site-brand {
  justify-self: start;
}

.site-brand img {
  height: 27px;
  max-width: 150px;
  filter: grayscale(1) contrast(1.25);
}

html[data-theme="dark"] .site-brand-logo {
  filter: grayscale(1) brightness(0) invert(1);
}

.site-links {
  justify-self: center;
  gap: clamp(20px, 2.5vw, 42px);
  margin: 0;
}

.site-links a,
.site-links .site-link-primary {
  position: relative;
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.site-links a::after {
  position: absolute;
  right: 0;
  bottom: -9px;
  left: 0;
  height: 1px;
  background: currentColor;
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 280ms cubic-bezier(.16, 1, .3, 1);
}

.site-links a:hover::after,
.site-links a[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: left;
}

.site-language-selector {
  justify-self: end;
  margin-left: auto;
}

.site-language-selector .form-select,
.util-btn,
.nav-toggle {
  min-height: 36px;
  border: 0;
  border-bottom: 1px solid var(--editorial-rule);
  border-radius: 0;
  background-color: transparent;
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.site-language-selector .form-select {
  width: 88px;
  padding-inline: 4px 25px;
}

.util-btn {
  justify-self: end;
  padding: 7px 0;
}

.site-footer {
  padding-block: 28px;
  border-color: var(--editorial-rule);
  color: var(--mute);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.site-footer-mark {
  filter: grayscale(1) contrast(1.4);
}

/* Shared type, controls and content */

.eyebrow {
  display: none;
}

.page-heading,
.content-page {
  max-width: 1260px;
}

.page-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, .42fr);
  align-items: end;
  gap: clamp(32px, 8vw, 130px);
  margin-bottom: clamp(44px, 6vw, 88px);
  padding-bottom: clamp(10px, 2vw, 24px);
}

.page-heading h1,
.content-page h1 {
  max-width: 930px;
  font-size: clamp(48px, 7vw, 104px);
  font-weight: 600;
  letter-spacing: -.04em;
  line-height: .94;
  text-wrap: balance;
}

.page-heading > p:last-child {
  max-width: 42ch;
  margin: 0 0 4px;
  color: var(--mute);
  font-size: 14px;
  line-height: 1.55;
}

.lead {
  max-width: 62ch;
  color: var(--mute);
  font-size: clamp(17px, 1.45vw, 21px);
  line-height: 1.55;
}

.content-page h2 {
  margin-top: clamp(52px, 7vw, 92px);
  padding-top: 0;
  font-size: clamp(17px, 2vw, 25px);
  font-weight: 600;
  letter-spacing: -.02em;
}

.content-page p:not(.lead) {
  color: var(--mute);
  font-size: 15px;
  line-height: 1.78;
}

.btn,
.form-control,
.form-select,
.alert,
.notice {
  border-radius: 0;
}

.btn {
  min-height: 40px;
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
}

.btn-dark,
.landing-primary-action {
  border: 1px solid var(--cr-accent);
  background: var(--cr-accent);
  color: var(--cr-primary-foreground);
  box-shadow: none;
}

.btn-dark:hover,
.landing-primary-action:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bg);
  transform: none;
}

.btn-outline-secondary {
  --tblr-btn-color: var(--ink);
  --tblr-btn-border-color: var(--editorial-rule);
  --tblr-btn-hover-bg: var(--ink);
  --tblr-btn-hover-border-color: var(--ink);
  --tblr-btn-hover-color: var(--bg);
}

.notice,
.alert {
  border-color: var(--editorial-rule);
  background: transparent;
}

.import-form .form-control,
.search-box input {
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
}

.import-form .form-control:focus,
.search-box input:focus {
  border-color: var(--live);
  box-shadow: 0 2px 0 var(--live);
}

/* Homepage — a tournament publication rather than a product dashboard */

.site-main:has(.landing-hero) {
  padding-top: 0;
}

.landing-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(500px, .94fr);
  align-items: stretch;
  min-height: min(780px, calc(100dvh - 82px));
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: var(--panel);
}

.landing-atmosphere {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: color-mix(in srgb, var(--cr-accent) 3%, var(--panel));
  opacity: 1;
}

.landing-atmosphere::before {
  display: none;
}

.landing-hero-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: none;
  padding: clamp(60px, 7vw, 112px) clamp(34px, 4.4vw, 68px);
  background: color-mix(in srgb, var(--panel) 92%, transparent);
}

.landing-brand {
  display: block;
  width: clamp(190px, 18vw, 244px);
  margin: 0 0 clamp(34px, 4vw, 56px);
}

.landing-brand img {
  display: block;
  width: 100%;
  height: auto;
}

html[data-theme="dark"] .landing-brand img {
  filter: brightness(0) invert(1);
  opacity: .92;
}

.landing-hero h1 {
  max-width: 780px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(54px, 5.6vw, 86px);
  font-weight: 600;
  letter-spacing: -.04em;
  line-height: .91;
  text-wrap: balance;
}

.landing-hero .lead {
  max-width: 47ch;
  margin: clamp(28px, 4vw, 52px) 0 30px;
  color: var(--mute);
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.58;
}

.landing-actions {
  gap: 24px;
}

.landing-primary-action {
  gap: 13px;
  padding: 13px 17px;
  border-radius: 0;
}

.landing-secondary-link,
.landing-text-link {
  color: var(--ink);
  font-size: 12px;
  text-decoration: none;
}

.authorization-note {
  position: absolute;
  z-index: 3;
  bottom: clamp(28px, 4vw, 54px);
  left: clamp(34px, 4.4vw, 68px);
  max-width: 62ch;
  margin: 0;
  color: var(--mute);
  font-family: "IBM Plex Mono", monospace;
  font-size: 9px;
  line-height: 1.65;
}

.landing-product-stage {
  position: relative;
  z-index: 1;
  min-height: 680px;
  padding: clamp(80px, 7vw, 112px) clamp(20px, 2.2vw, 34px) 54px;
  perspective: none;
}

.landing-product-stage::before {
  position: absolute;
  top: -18px;
  right: -3px;
  color: color-mix(in srgb, var(--cr-accent) 16%, transparent);
  font-size: clamp(84px, 11.5vw, 180px);
  font-weight: 700;
  letter-spacing: -.08em;
  line-height: .8;
  content: "LIVE";
  writing-mode: vertical-rl;
  pointer-events: none;
}

.landing-live-panel,
.landing-standings-panel {
  border: 0;
  border-radius: 0;
  background: var(--panel);
  box-shadow: none;
}

.landing-live-panel {
  position: relative;
  top: auto;
  right: auto;
  width: min(100%, 590px);
  margin-left: auto;
  padding: clamp(22px, 2.4vw, 34px);
  transform: none;
  box-shadow: 0 22px 60px color-mix(in srgb, var(--ink) 12%, transparent);
}

.landing-panel-header {
  padding-bottom: 22px;
  border-color: var(--ink);
}

.landing-panel-label {
  color: var(--mute);
  font-size: 9px;
}

.landing-live-dot {
  width: 6px;
  height: 6px;
  background: var(--live);
  box-shadow: none;
}

.landing-panel-header h2 {
  max-width: 370px;
  color: var(--ink);
  font-size: clamp(19px, 2vw, 28px);
  font-weight: 600;
  letter-spacing: -.035em;
  filter: grayscale(1);
}

.landing-round-chip {
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
}

.landing-pairing-row {
  grid-template-columns: 30px minmax(0, 1fr) 42px minmax(0, 1fr);
  border-color: var(--line);
  color: var(--ink);
}

.landing-pairing-row strong,
.landing-panel-footer time,
.landing-standings-panel strong {
  color: var(--ink);
}

.landing-pairing-row small,
.landing-board,
.landing-panel-footer {
  color: var(--mute);
}

.landing-piece {
  border-color: var(--ink);
}

.black-piece {
  background: var(--ink);
}

.landing-standings-panel {
  position: relative;
  bottom: auto;
  left: auto;
  width: min(68%, 350px);
  margin: -1px 0 0 auto;
  padding: 17px 20px;
  transform: translateX(-28%);
  background: var(--cr-accent);
  color: var(--cr-primary-foreground);
}

.landing-standings-panel header,
.landing-standings-panel > div {
  border-color: color-mix(in srgb, var(--cr-primary-foreground) 18%, transparent);
  color: var(--cr-primary-foreground);
}

.landing-standings-panel header,
.landing-standings-panel strong {
  color: var(--cr-primary-foreground);
}

.landing-proof {
  grid-template-columns: minmax(300px, .84fr) minmax(0, 1.16fr);
  gap: clamp(54px, 10vw, 180px);
  padding: clamp(100px, 13vw, 196px) 0;
  border-bottom: 0;
}

.landing-proof h2,
.landing-example h2,
.landing-closing h2 {
  max-width: 640px;
  color: var(--ink);
  font-size: clamp(38px, 4.6vw, 72px);
  font-weight: 600;
  letter-spacing: -.04em;
  line-height: .98;
}

.landing-proof-list {
  gap: 6px;
  border: 0;
}

.landing-proof-list a {
  grid-template-columns: 44px minmax(150px, .8fr) minmax(190px, 1.2fr);
  padding: 24px 14px;
  border: 0;
  color: var(--mute);
}

.landing-proof-list a:hover {
  background: var(--panel);
  color: var(--ink);
  transform: translateX(10px);
}

.landing-proof-list span {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 0;
  background: var(--cr-accent);
  color: var(--cr-primary-foreground);
}

.landing-proof-list strong {
  color: var(--ink);
}

.landing-example {
  grid-template-columns: minmax(280px, .72fr) minmax(430px, 1.28fr);
  gap: clamp(64px, 11vw, 190px);
  padding: clamp(100px, 13vw, 196px) 0;
}

.landing-example-intro > p {
  color: var(--mute);
}

.landing-example-data {
  padding: 0;
  border-top: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.landing-example-head {
  padding: 26px 0;
  border-bottom: 0;
}

.landing-example-head p,
.landing-example-data dt {
  color: var(--mute);
}

.landing-example-head h3,
.landing-example-data dd {
  color: var(--ink);
}

.landing-example-head h3 {
  filter: grayscale(1);
}

.landing-example-head > a {
  border: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
}

.landing-example-head > a:hover {
  background: var(--ink);
  color: var(--bg);
}

.landing-example-data dl div,
.landing-example-data dl div:nth-child(even) {
  border-color: color-mix(in srgb, var(--editorial-rule) 45%, transparent);
}

.landing-closing {
  margin-inline: calc((100vw - min(100vw - 2 * clamp(20px, 4.2vw, 72px), 1540px)) / -2);
  padding: clamp(98px, 12vw, 180px) max(4.2vw, calc((100vw - min(100vw - 2 * clamp(20px, 4.2vw, 72px), 1540px)) / 2));
  background: var(--ink);
}

.landing-closing::after {
  right: 6vw;
  bottom: -42%;
  width: min(520px, 45vw);
  height: min(520px, 45vw);
  border: 1px solid color-mix(in srgb, var(--bg) 28%, transparent);
  border-radius: 0;
  box-shadow: 42px 42px 0 color-mix(in srgb, var(--bg) 5%, transparent);
  transform: rotate(45deg);
}

.landing-closing h2 {
  max-width: 850px;
  margin-bottom: 38px;
  color: var(--bg);
  font-size: clamp(46px, 7vw, 104px);
}

.landing-closing .landing-primary-action {
  border-color: var(--cr-accent);
  background: var(--cr-accent);
  color: var(--cr-primary-foreground);
}

.landing-closing .landing-primary-action:hover {
  border-color: var(--bg);
  background: var(--bg);
  color: var(--ink);
}

/* Accessibility and dense-data refinements. */
.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 11px 15px;
  border: 2px solid var(--bg);
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  transform: translateY(calc(-100% - 20px));
  transition: transform 160ms ease-out;
}

.skip-link:focus {
  color: var(--bg);
  transform: translateY(0);
}

.filter-status,
.table-scroll-hint {
  color: var(--mute);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .035em;
}

.filter-status {
  margin: -4px 0 14px;
}

.table-scroll-hint {
  display: none;
  align-items: center;
  gap: 7px;
  margin: 0 0 10px;
}

.table-scroll-hint .icon {
  width: 16px;
  height: 16px;
}

.data-scroll-region:focus-visible {
  outline: 2px solid var(--live);
  outline-offset: 4px;
}

.filter-empty-state[hidden] {
  display: none;
}

@media (max-width: 760px) {
  .table-scroll-hint {
    display: flex;
  }

  .search-box input,
  .site-language-selector .form-select,
  .nav-toggle {
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .skip-link {
    transition: none;
  }
}

/* Publication refinement: one calmer, faster-scanning tournament system. */
.site-header {
  position: sticky;
  top: 0;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--panel) 92%, transparent);
}

.site-nav {
  min-height: 74px;
}

.site-links a,
.site-links .site-link-primary {
  font-size: 10.5px;
}

.page-heading {
  align-items: end;
  padding-bottom: clamp(26px, 3.2vw, 48px);
  border-bottom: 1px solid var(--editorial-rule);
}

.page-heading h1,
.content-page h1 {
  font-size: clamp(48px, 5.4vw, 78px);
  line-height: .96;
}

.tournament-head {
  min-height: clamp(126px, 14vw, 210px);
  padding-block: clamp(24px, 3vw, 44px);
}

.tournament-head h1 {
  max-width: 960px;
  font-size: clamp(38px, 4.65vw, 72px);
  line-height: .98;
}

.tournament-head .loc {
  max-width: 82ch;
  font-size: 10.5px;
  line-height: 1.5;
}

.tournament-nav {
  gap: clamp(20px, 2.3vw, 36px);
  min-height: 58px;
  margin-bottom: clamp(24px, 3.2vw, 46px);
}

.tournament-nav > a {
  padding-block: 20px 18px;
}

.tournament-nav-actions {
  gap: 6px;
}

.tournament-nav-actions .btn {
  min-height: 34px;
  padding-inline: 11px;
  font-size: 10.5px;
  letter-spacing: .025em;
}

.tournament-round-nav {
  gap: clamp(16px, 1.8vw, 28px);
  margin-bottom: clamp(20px, 2.5vw, 34px);
  padding-top: 12px;
}

.section-bar {
  align-items: center;
  min-height: 52px;
  margin-bottom: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--editorial-rule);
}

.section-title {
  padding-bottom: 8px;
  font-size: 12px;
  letter-spacing: .02em;
}

.live-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  color: var(--mute);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: .02em;
}

.live-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--live) 12%, transparent);
}

.live-status.is-offline .live-status-dot {
  background: #b47a1f;
  box-shadow: 0 0 0 4px color-mix(in srgb, #b47a1f 12%, transparent);
}

.data-table {
  border-top-width: 2px;
}

.data-table thead th {
  padding-block: 15px;
  color: var(--mute);
  font-size: 9.5px;
}

.data-table td {
  padding-block: 17px;
  font-size: 15px;
}

.pairings-table .pairing-player {
  width: calc((100% - 304px) / 2);
}

.pairings-table .pairing-result,
.pairings-table .result {
  width: 104px;
  white-space: nowrap;
}

.pairings-table .result {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.player-link {
  font-weight: 500;
}

.tournament-list {
  gap: 8px;
  margin-top: 24px;
}

.tournament-row {
  min-height: 116px;
  padding: 24px clamp(18px, 2vw, 32px);
  border-left: 3px solid transparent;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.tournament-row:hover {
  border-left-color: var(--cr-accent);
  transform: translateX(3px);
}

.tournament-row strong {
  max-width: 36ch;
  font-size: clamp(18px, 1.5vw, 22px);
  line-height: 1.15;
}

.tournament-row div span,
.tournament-players,
.tournament-progress,
.tournament-row time {
  font-size: 10.5px;
}

.landing-hero {
  min-height: min(720px, calc(100vh - 74px));
  align-items: center;
  padding-block: clamp(68px, 8vw, 130px);
}

.landing-hero-copy {
  align-self: center;
  padding-top: 0;
}

.landing-hero h1 {
  max-width: 700px;
  font-size: clamp(56px, 6.6vw, 104px);
  line-height: .9;
}

.landing-hero .lead {
  max-width: 43ch;
  margin: 30px 0 28px;
  font-size: 16px;
  line-height: 1.65;
}

.landing-product-stage {
  max-width: 620px;
  margin-left: auto;
}

.landing-live-panel {
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  box-shadow: 0 20px 48px color-mix(in srgb, var(--ink) 11%, transparent);
}

.landing-proof,
.landing-example {
  border-top: 1px solid var(--editorial-rule);
}

@media (max-width: 760px) {
  .site-header { position: relative; backdrop-filter: none; }
  .tournament-head { min-height: 158px; }
  .tournament-head h1 { font-size: clamp(36px, 11.2vw, 56px); }
  .tournament-nav-actions { margin-left: 8px; }
  .live-status { margin-left: 0; width: 100%; }
  .data-table td { padding-block: 15px; }
  .tournament-row { min-height: 108px; transform: none; }
  .tournament-row:hover { transform: none; }
  .landing-hero { min-height: 0; padding-block: 0; }
  .landing-hero-copy { padding-top: 46px; }
}

/* Tournament publication */

.tournament-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  min-height: clamp(150px, 19vw, 285px);
  padding-block: clamp(24px, 4vw, 58px);
}

.tournament-head .head {
  gap: 12px;
  margin: 0;
}

.tournament-head h1 {
  max-width: 1050px;
  font-size: clamp(40px, 6.2vw, 94px);
  font-weight: 600;
  letter-spacing: -.04em;
  line-height: .94;
  text-wrap: balance;
  filter: grayscale(1);
}

.tournament-head .loc {
  color: var(--mute);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.tournament-nav,
.tournament-round-nav,
.tournament-info-toolbar,
.round-section-nav {
  border-color: var(--editorial-rule);
}

.tournament-nav {
  min-height: 62px;
  align-items: center;
  margin-bottom: clamp(32px, 4vw, 62px);
}

.tournament-nav > a,
.tournament-round-nav a,
.tournament-info-nav a,
.round-section-nav a {
  color: var(--mute);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.tournament-nav > a {
  padding: 22px 0 20px;
}

.tournament-nav > a[aria-current="page"]::after,
.tournament-nav > a.is-selected::after,
.tournament-round-nav a[aria-current="page"]::after,
.tournament-round-nav a.is-selected::after,
.tournament-info-nav a[aria-current="page"]::after,
.round-section-nav a.active::after {
  height: 1px;
  border-radius: 0;
}

.tournament-live-button {
  border-color: var(--live);
  border-radius: 0;
  background: transparent;
  color: var(--live);
}

.tournament-live-button:hover,
.tournament-live-button.is-active {
  border-color: var(--live);
  background: var(--live);
  color: var(--panel);
}

.tournament-round-nav {
  margin-top: 0;
  padding-top: 15px;
  border-bottom: 0;
}

.tournament-list {
  display: grid;
  gap: 5px;
  max-width: none;
  margin-top: 0;
  border: 0;
}

.tournament-row {
  grid-template-columns: minmax(260px, 1.6fr) minmax(100px, .4fr) minmax(130px, .55fr) minmax(170px, .6fr);
  min-height: 104px;
  padding: 22px clamp(14px, 1.5vw, 24px);
  border: 0;
  background: var(--panel);
}

.tournament-row:hover {
  background: var(--ink);
  color: var(--bg);
}

.tournament-row:hover :is(strong, span, time, .tournament-players, .tournament-progress) {
  color: var(--bg);
}

.tournament-row strong {
  font-size: clamp(17px, 1.6vw, 23px);
  font-weight: 600;
  letter-spacing: -.02em;
}

.tournament-row div span,
.tournament-players,
.tournament-progress,
.tournament-row time {
  color: var(--mute);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
}

.tournament-row time {
  padding-right: 0;
}

.section-bar {
  min-height: 46px;
  margin-bottom: 10px;
  padding-bottom: 12px;
  border-bottom: 0;
}

.section-title {
  font-size: 13px;
  font-weight: 600;
}

.info-grid {
  max-width: 1260px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  border: 0;
}

.info-grid div {
  grid-template-columns: minmax(120px, .46fr) 1fr;
  padding: 20px 0;
  border: 0;
  background: var(--panel);
}

.info-grid div:nth-child(odd) {
  padding-inline: clamp(18px, 2.2vw, 34px);
}

.info-grid div:nth-child(even) {
  padding-inline: clamp(18px, 2.2vw, 34px);
  border-left: 0;
}

.info-grid dt,
.player-facts dt {
  color: var(--mute);
  font-family: "IBM Plex Mono", monospace;
  font-size: 9px;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.info-grid dd {
  font-size: 14px;
}

.data-table {
  border-top: 1px solid var(--ink);
}

.data-table thead th {
  padding: 16px clamp(12px, 1.4vw, 20px);
  border-bottom: 1px solid var(--ink);
  color: var(--ink);
  font-family: "IBM Plex Mono", monospace;
  font-size: 9px;
  letter-spacing: .055em;
}

.data-table tbody tr {
  border-color: color-mix(in srgb, var(--editorial-rule) 48%, transparent);
  transition: background 180ms ease, color 180ms ease;
}

.data-table tbody tr:hover,
.data-table tbody tr.flash {
  background: var(--editorial-soft);
}

.data-table td {
  padding: 19px clamp(12px, 1.4vw, 20px);
}

.data-table .number,
.data-table .rating,
.result {
  font-size: 11px;
}

.player-title {
  color: var(--ink);
}

.result.win,
.result.loss {
  color: var(--ink);
}

.pairing-card,
.player-standing,
.unpaired-players {
  border-color: var(--editorial-rule);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.player-profile-head {
  padding-bottom: 34px;
  border-color: var(--ink);
}

.player-profile-head h2 {
  font-size: clamp(34px, 5vw, 72px);
  font-weight: 600;
  letter-spacing: -.04em;
  line-height: .98;
}

.player-standing {
  min-width: 112px;
  padding: 12px 16px;
}

.player-standing strong {
  font-size: 34px;
}

.player-facts {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  padding: 0;
  border: 0;
}

.player-facts div {
  min-height: 98px;
  padding: 20px;
  border-right: 0;
  background: var(--panel);
}

.player-facts div:last-child {
  border-right: 0;
}

.round-recap-header {
  padding-top: 18px;
  border-top: 1px solid var(--ink);
}

.round-recap-kicker {
  display: none;
}

.tournament-resume h2 {
  font-size: clamp(30px, 4vw, 56px);
  font-weight: 600;
  letter-spacing: -.04em;
}

.about-intro {
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr);
  align-items: end;
  padding-bottom: clamp(50px, 7vw, 98px);
  border-bottom: 0;
}

.about-portrait {
  width: 100%;
  max-width: 380px;
  border: 0;
  border-radius: 0;
  background: var(--editorial-soft);
  box-shadow: none;
  aspect-ratio: 4 / 5;
  filter: grayscale(1) contrast(1.08);
}

.about-portrait img {
  object-position: center;
}

.empty-state {
  border-top: 0;
}

.empty-code {
  color: var(--line);
  font-size: clamp(62px, 10vw, 130px);
}

/* Keep venue displays consistent without sacrificing long-distance status color. */

.venue-display {
  --venue-bg: var(--bg);
  --venue-panel: var(--panel);
  --venue-border: var(--editorial-rule);
  --venue-row-divider: var(--line);
  --venue-board-bg: var(--editorial-soft);
  --venue-card-bg: var(--panel);
}

.venue-header,
.pairing {
  border-radius: 0;
  box-shadow: none;
}

@media (max-width: 1100px) {
  .site-nav {
    grid-template-columns: auto 1fr auto;
  }

  .site-links {
    gap: 20px;
  }

  .landing-hero {
    grid-template-columns: minmax(0, .94fr) minmax(420px, 1.06fr);
  }

  .landing-hero h1 {
    font-size: clamp(52px, 7vw, 76px);
  }
}

@media (max-width: 900px) {
  .site-nav {
    display: flex;
  }

  .nav-toggle {
    display: inline-grid;
    place-items: center;
    order: 3;
  }

  .site-links {
    justify-self: auto;
  }

  .landing-hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .landing-hero-copy {
    min-height: 650px;
    border-right: 0;
    border-bottom: 0;
  }

  .landing-product-stage {
    width: 100%;
    min-height: auto;
    padding-block: 110px 80px;
  }

  .landing-live-panel {
    margin-right: auto;
  }

  .landing-proof,
  .landing-example {
    grid-template-columns: 1fr;
    gap: 60px;
  }

  .landing-proof h2,
  .landing-example h2 {
    max-width: 780px;
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(calc(100% - 32px), 1540px);
  }

  .site-main {
    padding-top: 30px;
  }

  .site-nav {
    min-height: 68px;
  }

  .site-brand img {
    height: 24px;
  }

  .site-language-selector {
    margin-left: auto;
  }

  .site-language-selector .form-select {
    width: 58px;
  }

  .util-btn {
    order: 2;
  }

  .page-heading {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .page-heading h1,
  .content-page h1 {
    font-size: clamp(44px, 14vw, 72px);
  }

  .landing-hero {
    margin: 0;
    padding: 0;
    overflow: hidden;
  }

  .landing-hero-copy {
    min-height: 570px;
    padding: 42px 24px 20px;
  }

  .landing-hero h1 {
    font-size: clamp(48px, 14vw, 72px);
  }

  .landing-brand {
    width: clamp(152px, 46vw, 182px);
    margin-bottom: 26px;
  }

  .landing-product-stage {
    margin: 0;
    padding: 36px 20px 60px;
  }

  .landing-hero > .authorization-note {
    position: static;
    margin: 0;
    padding: 0 24px 48px;
  }

  .landing-live-panel {
    position: relative;
    top: auto;
    padding: 20px 16px;
    border-radius: 0;
  }

  .landing-standings-panel {
    bottom: auto;
    left: auto;
    width: 84%;
    transform: translateX(-8%);
  }

  .landing-pairing-row {
    grid-template-columns: 22px minmax(0, 1fr) 34px;
  }

  .landing-pairing-row > div:last-child {
    display: none;
  }

  .landing-proof,
  .landing-example {
    padding-block: 92px;
  }

  .landing-proof-list a {
    grid-template-columns: 34px 1fr;
  }

  .landing-proof-list small {
    grid-column: 2;
  }

  .landing-example-data dl {
    grid-template-columns: 1fr;
  }

  .landing-example-data dl div:nth-child(odd),
  .landing-example-data dl div:nth-child(even) {
    padding-inline: 0;
    border-left: 0;
  }

  .landing-closing {
    margin-inline: -16px;
    padding-inline: 24px;
  }

  .landing-closing h2 {
    font-size: clamp(44px, 14vw, 72px);
  }

  .tournament-head {
    min-height: 190px;
  }

  .tournament-head h1 {
    font-size: clamp(38px, 12vw, 62px);
  }

  .tournament-nav {
    min-height: auto;
    align-items: flex-end;
  }

  .tournament-nav > a {
    padding-block: 18px 14px;
  }

  .tournament-round-nav {
    margin-top: 0;
  }

  .tournament-row {
    grid-template-columns: 1fr auto;
    gap: 10px;
  }

  .tournament-progress,
  .tournament-row time {
    text-align: left;
  }

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

  .info-grid div:nth-child(odd),
  .info-grid div:nth-child(even) {
    padding-inline: 18px;
    border-left: 0;
  }

  .player-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .player-facts div:nth-child(2n) {
    border-right: 0;
  }

  .about-intro {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .about-portrait {
    width: min(72vw, 340px);
    justify-self: start;
  }
}

@media (max-width: 480px) {
  .site-language-selector {
    display: none;
  }

  .util-btn span {
    display: none;
  }

  .landing-hero-copy {
    min-height: 0;
  }

  .landing-actions {
    align-items: flex-start;
  }

  .landing-product-stage::before {
    font-size: 88px;
  }

  .tournament-row {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-block: 20px;
  }

  .tournament-row time {
    padding: 0;
  }

  .player-profile-head {
    display: grid;
  }

  .player-facts {
    grid-template-columns: 1fr;
  }

  .player-facts div {
    border-right: 0;
    border-bottom: 0;
  }
}

/* A direct, quiet contact hand-off belongs with the project's provenance. */
.operator-contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(28px, 7vw, 112px);
  align-items: end;
  max-width: none;
  margin-top: clamp(72px, 10vw, 136px);
  padding-top: clamp(26px, 4vw, 46px);
  border-top: 1px solid var(--editorial-rule);
}

.operator-contact h2 { margin: 0 0 12px; font-size: clamp(24px, 2.6vw, 36px); letter-spacing: -.035em; }
.operator-contact p { max-width: 58ch; margin: 0; }
.operator-contact-action { display: grid; justify-items: start; gap: 12px; min-width: min(100%, 230px); }
.operator-contact-name { color: var(--ink) !important; font-weight: 600; }
.operator-contact .btn { display: inline-flex; align-items: center; gap: 8px; }
.operator-contact-unavailable { color: var(--mute) !important; font-size: 13px; }

@media (max-width: 760px) {
  .operator-contact { grid-template-columns: 1fr; gap: 24px; margin-top: 72px; }
}

/* Final publication layer — kept last so it deliberately resolves the legacy theme rules above. */
.site-header{position:sticky;top:0;backdrop-filter:blur(14px);background:color-mix(in srgb,var(--panel) 92%,transparent)}
.site-nav{min-height:74px}.site-links a,.site-links .site-link-primary{font-size:10.5px}
.page-heading{align-items:end;padding-bottom:clamp(26px,3.2vw,48px);border-bottom:1px solid var(--editorial-rule)}
.page-heading h1,.content-page h1{font-size:clamp(48px,5.4vw,78px);line-height:.96}
.tournament-head{min-height:clamp(126px,14vw,210px);padding-block:clamp(24px,3vw,44px)}
.tournament-head h1{max-width:960px;font-size:clamp(38px,4.65vw,72px);line-height:.98}.tournament-head .loc{max-width:82ch;font-size:10.5px;line-height:1.5}
.tournament-nav{gap:clamp(20px,2.3vw,36px);min-height:58px;margin-bottom:clamp(24px,3.2vw,46px)}.tournament-nav>a{padding-block:20px 18px}.tournament-nav-actions{gap:6px}.tournament-nav-actions .btn{min-height:34px;padding-inline:11px;font-size:10.5px;letter-spacing:.025em}
.tournament-round-nav{gap:clamp(16px,1.8vw,28px);margin-bottom:clamp(20px,2.5vw,34px);padding-top:12px}
.section-bar{align-items:center;min-height:52px;margin-bottom:8px;padding-bottom:10px;border-bottom:1px solid var(--editorial-rule)}.section-title{padding-bottom:8px;font-size:12px;letter-spacing:.02em}
.live-status{display:inline-flex;align-items:center;gap:7px;margin-left:auto;color:var(--mute);font-family:var(--font-mono);font-size:10px;letter-spacing:.02em}.live-status-dot{width:7px;height:7px;border-radius:50%;background:var(--live);box-shadow:0 0 0 4px color-mix(in srgb,var(--live) 12%,transparent)}.live-status.is-offline .live-status-dot{background:#b47a1f;box-shadow:0 0 0 4px color-mix(in srgb,#b47a1f 12%,transparent)}
.data-table{border-top-width:2px}.data-table thead th{padding-block:15px;color:var(--mute);font-size:9.5px}.data-table td{padding-block:17px;font-size:15px}.pairings-table .pairing-player{width:calc((100% - 304px)/2)}.pairings-table .pairing-result,.pairings-table .result{width:104px;white-space:nowrap}.pairings-table .result{font-size:12px;font-variant-numeric:tabular-nums}.player-link{font-weight:500}
.tournament-list{gap:8px;margin-top:24px}.tournament-row{min-height:116px;padding:24px clamp(18px,2vw,32px);border-left:3px solid transparent;transition:background 180ms ease,color 180ms ease,border-color 180ms ease,transform 180ms ease}.tournament-row:hover{border-left-color:var(--cr-accent);transform:translateX(3px)}.tournament-row strong{max-width:36ch;font-size:clamp(18px,1.5vw,22px);line-height:1.15}.tournament-row div span,.tournament-players,.tournament-progress,.tournament-row time{font-size:10.5px}
.landing-hero{min-height:min(720px,calc(100vh - 74px));align-items:center;padding-block:clamp(68px,8vw,130px)}.landing-hero-copy{align-self:center;padding-top:0}.landing-hero h1{max-width:700px;font-size:clamp(52px,5.8vw,88px);line-height:.9}.landing-hero .lead{max-width:43ch;margin:30px 0 28px;font-size:16px;line-height:1.65}.landing-product-stage{max-width:620px;margin-left:auto}.landing-live-panel{border:1px solid color-mix(in srgb,var(--ink) 12%,transparent);box-shadow:0 20px 48px color-mix(in srgb,var(--ink) 11%,transparent)}.landing-proof,.landing-example{border-top:1px solid var(--editorial-rule)}
@media (max-width:760px){.site-header{position:relative;backdrop-filter:none}.tournament-head{min-height:158px}.tournament-head h1{font-size:clamp(36px,11.2vw,56px)}.tournament-nav-actions{margin-left:8px}.live-status{margin-left:0;width:100%}.data-table td{padding-block:15px}.tournament-row{min-height:108px;transform:none}.tournament-row:hover{transform:none}.landing-hero{min-height:0;padding-block:0}.landing-hero-copy{padding-top:46px}}

/* Let the illustrated portrait borrow the page background rather than sit on a white tile. */
.about-portrait {
  position: relative;
  isolation: isolate;
  background: transparent;
  filter: none;
}

.about-portrait::before {
  position: absolute;
  inset: 8% 3% 4%;
  z-index: -1;
  border: 1px solid color-mix(in srgb, var(--ink) 11%, transparent);
  border-radius: 50%;
  background: color-mix(in srgb, var(--cr-accent) 5%, transparent);
  content: "";
}

.about-portrait img {
  height: 100%;
  clip-path: circle(42% at 50% 49%);
  filter: grayscale(1) contrast(1.14);
  mix-blend-mode: multiply;
  opacity: 1;
}

html[data-theme="dark"] .about-portrait img {
  mix-blend-mode: screen;
  opacity: .88;
}

/* About portrait: an editorial print, not a profile-avatar treatment. */
.about-intro {
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  align-items: center;
  gap: clamp(54px, 8vw, 150px);
}

.about-portrait {
  width: min(100%, 420px);
  max-width: 420px;
  aspect-ratio: 4 / 5;
  margin: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
  filter: none;
  isolation: auto;
}

.about-portrait::before {
  display: none;
}

.about-portrait img {
    display: block;
    width: 100%;
    height: 100%;
    clip-path: none;
    filter: grayscale(1) contrast(1.08);
    mix-blend-mode: normal;
    object-fit: cover;
    object-position: center 42%;
    opacity: 1;
    border-radius: 7px;
    padding: 20px;
    background: #f5f5f2;
    border: 1px solid #c0c0c066;
    padding-bottom: 4px;
}

html[data-theme="dark"] .about-portrait img {
  mix-blend-mode: normal;
  opacity: .92;
}

/* Landing illustrations use the same framed editorial-print treatment as the About portrait. */
.landing-illustration {
  width: min(100%, 340px);
  aspect-ratio: 4 / 5;
  margin: clamp(38px, 5vw, 72px) 0 0 auto;
}

.landing-illustration img {
  display: block;
  width: 100%;
  height: 100%;
  padding: 20px 20px 4px;
  border: 1px solid #c0c0c066;
  border-radius: 7px;
  background: #f5f5f2;
  object-fit: cover;
  object-position: center 42%;
}

html[data-theme="dark"] .landing-illustration img {
  opacity: .92;
}

@media (max-width: 760px) {
  .about-intro {
    grid-template-columns: 1fr;
    gap: 38px;
  }

  .about-portrait {
    width: min(100%, 360px);
    justify-self: start;
  }

  .landing-illustration {
    width: min(100%, 320px);
    margin-top: 38px;
    margin-right: auto;
  }
}

/* Keep the opening promise legible and the compact navigation easy to use. */
@media (max-width: 760px) {
  .site-main:has(.landing-hero) {
    width: 100%;
  }

  .landing-hero-copy {
    padding-inline: 20px;
  }

  .landing-hero > .authorization-note {
    padding-inline: 20px;
  }

  .util-btn,
  .nav-toggle {
    width: 40px;
    min-width: 40px;
    min-height: 40px;
    padding: 0;
    justify-content: center;
  }

  .util-btn {
    margin-left: auto;
  }

  .nav-toggle {
    margin-left: 8px;
  }
}

/* Landing hero — live tournament data presented as a torn bulletin over the room. */
body:has(.landing-hero) {
  background: var(--bg);
}

body:has(.landing-hero) .site-header {
  border-color: rgba(247, 243, 234, .16);
  background: #0b151b;
}

body:has(.landing-hero) .site-brand-logo {
  filter: brightness(0) invert(1) !important;
}

body:has(.landing-hero) .site-links a,
body:has(.landing-hero) .site-links .site-link-primary,
body:has(.landing-hero) .site-language-selector .form-select,
body:has(.landing-hero) .util-btn,
body:has(.landing-hero) .nav-toggle {
  color: #f7f3ea;
}

body:has(.landing-hero) .site-language-selector .form-select,
body:has(.landing-hero) .util-btn {
  border-color: rgba(247, 243, 234, .22);
  background-color: transparent;
}

body:has(.landing-hero) .site-links a:hover,
body:has(.landing-hero) .site-links a[aria-current="page"],
body:has(.landing-hero) .util-btn:hover {
  color: #45d1c4;
}

.site-main:has(.landing-hero) {
  width: 100%;
  max-width: none;
  padding: 0;
}

.site-main:has(.landing-hero) .landing-proof,
.site-main:has(.landing-hero) .landing-example {
  padding-inline: clamp(20px, 4.2vw, 72px);
}

.site-main:has(.landing-hero) .landing-proof {
  border-top: 0;
}

.landing-hero {
  --landing-preview-shift: clamp(48px, 7vw, 118px);
  grid-template-columns: minmax(0, .9fr) minmax(520px, 1.1fr);
  min-height: min(780px, calc(100dvh - 74px));
  background: #0b151b;
}

.landing-hero::after {
  position: absolute;
  z-index: 5;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 28px;
  background: var(--bg);
  clip-path: polygon(0 49%, 2% 58%, 5% 43%, 8% 63%, 12% 46%, 16% 59%, 21% 42%, 26% 64%, 31% 47%, 37% 57%, 43% 41%, 49% 62%, 54% 45%, 60% 60%, 66% 44%, 72% 63%, 78% 46%, 84% 59%, 90% 43%, 95% 60%, 100% 48%, 100% 100%, 0 100%);
  content: "";
  pointer-events: none;
}

.landing-atmosphere {
  z-index: 0;
  background: #0b151b;
}

.landing-hero-copy {
  padding-left: max(5vw, calc((100vw - 1440px) / 2));
  padding-right: clamp(36px, 5vw, 96px);
  background: transparent;
}

.landing-hero h1 {
  color: #f7f3ea;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(54px, 5.3vw, 88px);
  font-weight: 400;
  letter-spacing: -.055em;
  line-height: .94;
}

.landing-hero .lead {
  color: rgba(247, 243, 234, .7);
  overflow-wrap: anywhere;
}

.landing-primary-action {
  border-color: #36c4b8;
  background: #36c4b8;
  color: #08201f;
}

.landing-primary-action:hover {
  border-color: #f7f3ea;
  background: #f7f3ea;
  color: #0b151b;
}

.landing-secondary-link,
.landing-secondary-link:hover {
  color: #45d1c4;
}

.authorization-note {
  color: rgba(247, 243, 234, .52);
}

.landing-product-stage {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  padding: clamp(72px, 7vw, 116px) clamp(28px, 5vw, 90px) clamp(58px, 5vw, 84px) 0;
  border: 0;
  overflow: visible;
  background: #101717;
  box-shadow: none;
}

.landing-product-stage::before {
  display: none;
}

.landing-tournament-photo {
  position: absolute;
  inset: -2px;
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  border: 0;
  object-fit: cover;
  object-position: right center;
  outline: 0;
  filter: contrast(1.08);
  box-shadow: none;
}

.landing-product-stage::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #101717 0%, rgba(16, 23, 23, .54) 35%, transparent 72%);
  content: "";
  pointer-events: none;
}

.landing-live-panel,
.landing-standings-panel {
  position: relative;
  z-index: 1;
  border: 0;
  border-radius: 0;
  box-shadow: 18px 28px 62px rgba(0, 0, 0, .28);
}

.landing-live-panel {
  width: min(100%, 610px);
  margin-left: 0;
  left: calc(-1 * var(--landing-preview-shift));
  padding: clamp(24px, 2.7vw, 38px);
  background: #f7f3ea;
  clip-path: polygon(0 0, 99% 0, 98.3% 3%, 99.6% 6%, 98.5% 10%, 99.4% 14%, 98.2% 18%, 99.5% 23%, 98.6% 29%, 99.7% 35%, 98.4% 42%, 99.5% 50%, 98.3% 57%, 99.4% 63%, 98.2% 70%, 99.6% 77%, 98.4% 84%, 99.5% 91%, 98.1% 96%, 99% 100%, 0 100%);
}

.landing-panel-header {
  border-color: #253038;
}

.landing-panel-label,
.landing-board,
.landing-panel-footer,
.landing-pairing-row small {
  color: #58636a;
}

.landing-panel-header h2,
.landing-round-chip,
.landing-pairing-row,
.landing-pairing-row strong,
.landing-panel-footer time {
  color: #17242b;
}

.landing-pairing-row {
  border-color: rgba(23, 36, 43, .14);
}

.landing-piece {
  border-color: #17242b;
}

.black-piece {
  background: #17242b;
}

.landing-live-dot {
  background: #21a99c;
}

.landing-standings-panel {
  width: min(100%, 610px);
  margin: -1px 0 0;
  left: calc(-1 * var(--landing-preview-shift));
  padding: 18px 24px 20px;
  background: #36c4b8;
  color: #08201f;
  clip-path: polygon(0 0, 99% 0, 98.1% 7%, 99.5% 13%, 98.2% 22%, 99.6% 31%, 98.4% 42%, 99.5% 52%, 98.2% 64%, 99.4% 76%, 98.1% 88%, 99% 100%, 0 100%);
}

.landing-standings-panel header,
.landing-standings-panel > div,
.landing-standings-panel header,
.landing-standings-panel strong {
  color: #08201f;
  border-color: rgba(8, 32, 31, .18);
}

/* Move the bulletin toward the editorial gutter so the chess photo can breathe.
   Both sheets share the same final transform to keep their torn left edges aligned. */
.landing-hero[data-landing-hero].is-motion-ready .landing-live-panel,
.landing-hero[data-landing-hero].is-motion-ready .landing-standings-panel,
.landing-hero[data-landing-hero].is-motion-settled.is-live-stage-visible .landing-live-panel {
  animation: none;
  opacity: 1;
  filter: none;
  transform: none;
}

.landing-hero[data-landing-hero].is-motion-settled.is-live-stage-visible .landing-standings-panel {
  animation: none;
}

@keyframes landing-live-sheet-left {
  0%, 100% {
    transform: translateY(0);
  }
  38% {
    transform: translateY(-10px);
  }
  72% {
    transform: translateY(-5px);
  }
}

@keyframes landing-standings-sheet-left {
  0%, 100% {
    transform: translateY(0);
  }
  38% {
    transform: translateY(9px);
  }
  72% {
    transform: translateY(4px);
  }
}

/* A single strategic plane behind the opening copy. The alternating squares
   are prominent enough to read as chess while the radial fade protects the
   headline and keeps the photograph as the hero's focal endpoint. */
.landing-chess-field {
  position: absolute;
  z-index: 1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.landing-chess-field::before {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 19% 42%, rgba(69, 209, 196, .13), transparent 31%),
    linear-gradient(90deg, rgba(11, 21, 27, .08), rgba(11, 21, 27, .38) 49%, transparent 72%);
  content: "";
}

.landing-chess-grid {
  --landing-square: 68px;
  position: absolute;
  top: -50%;
  left: -27%;
  width: min(82vw, 1210px);
  height: 170%;
  background: conic-gradient(
    from 90deg,
    rgba(69, 209, 196, .16) 25%,
    rgba(247, 243, 234, .026) 0 50%,
    rgba(69, 209, 196, .16) 0 75%,
    rgba(247, 243, 234, .026) 0
  ) 0 0 / 136px 136px;
  border: 1px solid rgba(69, 209, 196, .16);
  box-shadow: inset 0 0 100px rgba(69, 209, 196, .045);
  opacity: .92;
  transform: rotate(-14deg) skewY(5deg);
  transform-origin: center;
  mask-image: radial-gradient(ellipse 76% 65% at 52% 49%, #000 24%, rgba(0, 0, 0, .92) 48%, transparent 82%);
}

.landing-board-glint {
  position: absolute;
  width: var(--landing-square);
  height: var(--landing-square);
  background: rgba(69, 209, 196, .3);
  box-shadow: inset 0 0 28px rgba(247, 243, 234, .08), 0 0 30px rgba(69, 209, 196, .11);
  opacity: 0;
}

.landing-board-glint-a { top: calc(6 * var(--landing-square)); left: calc(5 * var(--landing-square)); }
.landing-board-glint-b { top: calc(9 * var(--landing-square)); left: calc(8 * var(--landing-square)); }
.landing-board-glint-c { top: calc(4 * var(--landing-square)); left: calc(11 * var(--landing-square)); }
.landing-board-glint-d { top: calc(12 * var(--landing-square)); left: calc(3 * var(--landing-square)); }

@media (prefers-reduced-motion: no-preference) {
  .landing-hero[data-landing-hero].is-motion-settled .landing-chess-grid {
    animation: landing-board-drift 28s ease-in-out infinite alternate;
  }

  .landing-hero[data-landing-hero].is-motion-settled .landing-board-glint-a {
    animation: landing-board-glint 13s -2s ease-in-out infinite;
  }

  .landing-hero[data-landing-hero].is-motion-settled .landing-board-glint-b {
    animation: landing-board-glint 17s -11s ease-in-out infinite;
  }

  .landing-hero[data-landing-hero].is-motion-settled .landing-board-glint-c {
    animation: landing-board-glint 19s -6s ease-in-out infinite;
  }

  .landing-hero[data-landing-hero].is-motion-settled .landing-board-glint-d {
    animation: landing-board-glint 23s -17s ease-in-out infinite;
  }

  .landing-hero[data-landing-hero].is-motion-settled .landing-tournament-photo {
    animation: landing-photo-drift 24s ease-in-out infinite alternate;
  }

  .landing-hero[data-landing-hero].is-motion-settled.is-live-stage-visible .landing-live-panel {
    animation: landing-bulletin-float 9s ease-in-out infinite;
  }

  .landing-hero[data-landing-hero].is-motion-settled.is-live-stage-visible .landing-standings-panel {
    animation: landing-bulletin-float 10s ease-in-out -3.5s infinite reverse;
  }
}

@keyframes landing-board-drift {
  from { transform: rotate(-14deg) skewY(5deg) translate3d(-1.5%, 2%, 0); }
  to { transform: rotate(-14deg) skewY(5deg) translate3d(3%, -2.5%, 0); }
}

@keyframes landing-board-glint {
  0%, 68%, 100% { opacity: 0; }
  76% { opacity: .18; }
  82% { opacity: .72; }
  90% { opacity: .1; }
}

@keyframes landing-photo-drift {
  from { transform: scale(1.025) translate3d(-.6%, .4%, 0); }
  to { transform: scale(1.075) translate3d(1.2%, -1.2%, 0); }
}

@keyframes landing-bulletin-float {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -8px, 0); }
}

@media (max-width: 760px) {
  .landing-chess-grid {
    top: -57%;
    left: -42%;
    width: 126vw;
    opacity: .66;
  }

  .landing-board-glint-c,
  .landing-board-glint-d {
    display: none;
  }

}

/* Landing header: keep the editorial links near the masthead and utilities quiet at the far edge. */
@media (min-width: 901px) {
  .site-nav {
    grid-template-columns: auto auto minmax(32px, 1fr) auto;
    column-gap: clamp(28px, 3.4vw, 58px);
  }

  .site-brand {
    grid-column: 1;
  }

  .site-links {
    grid-column: 2;
    justify-self: start;
  }

  .site-language-selector {
    grid-column: 4;
  }
}

#theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0;
  border: 0;
  cursor: pointer;
}

#theme-toggle .theme-icon-light {
  display: block;
  width: 15px;
  height: 15px;
}

.theme-switch-track {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  width: 52px;
  height: 28px;
  padding: 3px;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: currentColor;
}

.theme-switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: currentColor;
  transition: transform 220ms cubic-bezier(.16, 1, .3, 1), background-color 220ms ease;
}

html[data-theme="dark"] .theme-switch-thumb {
  transform: translateX(24px);
}

#theme-toggle .theme-icon-dark {
  display: block;
  width: 13px;
  height: 13px;
  margin-right: 2px;
  color: var(--panel);
}

#theme-toggle:focus-visible {
  outline: 2px solid #45d1c4;
  outline-offset: 4px;
}

body:has(.landing-hero) #theme-toggle {
  border: 0;
}

body:has(.landing-hero) .theme-switch-track {
  border-color: rgba(247, 243, 234, .72);
}

.site-language-selector .form-select option {
  background: #f7f3ea;
  color: #0b151b;
}

/* Landing sections alternate like pages in a printed tournament bulletin. */
.landing-proof,
.landing-example,
.landing-closing {
  position: relative;
  isolation: isolate;
  margin-inline: 0;
}

.landing-proof,
.landing-example,
.landing-closing {
  padding-inline: clamp(20px, 4.2vw, 72px);
}

.landing-proof {
  background: #f7f3ea;
  color: #0b151b;
}

.landing-proof::before,
.landing-example::before,
.landing-closing::before {
  position: absolute;
  z-index: 1;
  top: -26px;
  right: 0;
  left: 0;
  height: 27px;
  background: inherit;
  content: "";
  clip-path: polygon(0 31%, 2% 53%, 5% 26%, 8% 49%, 12% 22%, 16% 51%, 20% 29%, 24% 56%, 29% 27%, 33% 49%, 38% 24%, 42% 52%, 47% 30%, 52% 55%, 57% 25%, 62% 48%, 68% 27%, 74% 55%, 80% 26%, 87% 50%, 93% 23%, 97% 52%, 100% 31%, 100% 100%, 0 100%);
}

.landing-proof > *,
.landing-example > *,
.landing-closing > * {
  position: relative;
  z-index: 2;
}

.landing-example {
  background: #0b151b;
  color: #f7f3ea;
}

.landing-example h2,
.landing-example .landing-example-head h3,
.landing-example .landing-example-data dd,
.landing-example .landing-text-link {
  color: #f7f3ea;
}

.landing-example-intro > p,
.landing-example .landing-example-head p,
.landing-example .landing-example-data dt {
  color: rgba(247, 243, 234, .64);
}

.landing-example .landing-example-data,
.landing-example .landing-example-data dl div,
.landing-example .landing-example-data dl div:nth-child(even) {
  border-color: rgba(247, 243, 234, .26);
}

.landing-example .landing-example-head > a {
  border-color: #f7f3ea;
  color: #f7f3ea;
}

.landing-closing {
  padding-block: clamp(98px, 12vw, 180px);
  background: #f7f3ea;
  color: #0b151b;
}

.landing-closing h2 {
  color: #0b151b;
}

.landing-closing .landing-primary-action:hover {
  border-color: #0b151b;
  background: #0b151b;
  color: #f7f3ea;
}

@media (max-width: 760px) {
  #theme-toggle {
    width: 52px;
    min-width: 52px;
    gap: 0;
  }

  #theme-toggle .theme-icon-light {
    display: none;
  }

  #theme-toggle .theme-switch-track {
    display: inline-flex;
  }

  .landing-proof,
  .landing-example,
  .landing-closing {
    padding-inline: 24px;
  }
}

@media (max-width: 900px) {
  .landing-hero {
    grid-template-columns: 1fr;
  }

  .landing-hero-copy {
    padding-inline: max(5vw, 32px);
  }

  .landing-product-stage {
    min-height: 640px;
    padding-left: max(5vw, 32px);
  }

  .landing-hero {
    --landing-preview-shift: 0px;
  }
}

@media (max-width: 760px) {
  body:has(.landing-hero) .site-header {
    background: #0b151b;
  }

  .landing-hero-copy {
    min-height: 0;
    padding: 58px 20px 122px;
  }

  .landing-hero h1 {
    font-size: clamp(48px, 14vw, 66px);
  }

  .landing-hero > .authorization-note {
    position: absolute;
    right: 20px;
    bottom: 36px;
    left: 20px;
    padding: 0;
  }

  .landing-product-stage {
    min-height: 520px;
    padding: 42px 20px 56px;
  }

  .landing-product-stage::after {
    background: linear-gradient(90deg, rgba(16, 23, 23, .72), rgba(16, 23, 23, .14));
  }

  .landing-live-panel {
    width: 100%;
    padding: 21px 18px;
  }

  .landing-standings-panel {
    width: 100%;
    margin-left: 0;
  }

  .site-main:has(.landing-hero) .landing-proof,
  .site-main:has(.landing-hero) .landing-example {
    padding-inline: 24px;
  }
}

/* About is a two-page editorial spread: a dark introduction, then a light provenance page. */
.site-main:has(.about-page) {
  width: 100%;
  max-width: none;
  padding: 0;
}

.about-page {
  max-width: none;
}

.about-section-shell {
  width: min(calc(100% - 2 * clamp(20px, 4.2vw, 72px)), 1260px);
  margin-inline: auto;
}

.about-hero-band {
  position: relative;
  background: #0b151b;
  color: #f7f3ea;
}

.about-hero-band .about-intro {
  min-height: min(660px, calc(100dvh - 74px));
  padding-block: clamp(72px, 10vw, 144px) clamp(104px, 13vw, 186px);
}

.about-hero-band h1 {
  max-width: 810px;
  margin: 0;
  color: #f7f3ea;
  font-size: clamp(52px, 6.2vw, 94px);
  font-weight: 600;
  letter-spacing: -.045em;
  line-height: .94;
}

.about-hero-band .lead {
  max-width: 43ch;
  margin: 28px 0 0;
  color: rgba(247, 243, 234, .68);
}

.about-story-band {
  position: relative;
  background: #f7f3ea;
  color: #0b151b;
}

.about-story-band::before {
  position: absolute;
  top: -27px;
  right: 0;
  left: 0;
  height: 28px;
  background: #f7f3ea;
  content: "";
  clip-path: polygon(0 31%, 3% 53%, 7% 27%, 11% 50%, 16% 24%, 21% 55%, 27% 29%, 33% 52%, 39% 25%, 45% 54%, 51% 28%, 58% 51%, 65% 25%, 72% 55%, 79% 28%, 86% 51%, 93% 24%, 97% 52%, 100% 31%, 100% 100%, 0 100%);
}

.about-story {
  padding-block: clamp(92px, 12vw, 172px);
}

.about-story > h2,
.about-story .operator-contact h2 {
  color: #0b151b;
}

.about-story > h2 {
  max-width: 18ch;
  margin: 0 0 28px;
  font-size: clamp(36px, 4.2vw, 64px);
  letter-spacing: -.04em;
  line-height: .98;
}

.about-story > p {
  max-width: 68ch;
  color: #4c565b;
  font-size: 16px;
  line-height: 1.75;
}

.about-story .operator-contact {
  border-color: rgba(11, 21, 27, .2);
}

/* Reusable tournament photography: one editorial image per public page, cropped as atmosphere rather than content. */
.tournament-index-art,
.how-hero-photo,
.about-chess-photo {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: #0b151b;
}

.tournament-index-art img,
.how-hero-photo img,
.about-chess-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tournament-index-art {
  height: clamp(190px, 24vw, 320px);
  margin-top: 24px;
  margin-bottom: clamp(36px, 5vw, 68px);
}

.tournament-index-art img {
  object-position: center 54%;
  opacity: .82;
}

.how-hero-photo {
  height: clamp(220px, 29vw, 390px);
  margin: clamp(34px, 5vw, 64px) 0 clamp(18px, 2vw, 28px);
}

.how-hero-photo::after,
.about-chess-photo::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(11, 21, 27, .22), transparent 58%);
  content: "";
  pointer-events: none;
}

.how-hero-photo img {
  object-position: center 52%;
  filter: contrast(1.08);
}

.about-chess-photo {
  height: clamp(220px, 29vw, 380px);
  max-width: 920px;
  margin-top: clamp(44px, 7vw, 82px);
}

.about-chess-photo img {
  object-position: center 57%;
  filter: saturate(.76) contrast(1.04);
}

@media (max-width: 760px) {
  .tournament-index-art {
    height: 190px;
    margin-top: 20px;
    margin-bottom: 42px;
  }

  .how-hero-photo,
  .about-chess-photo {
    height: 220px;
  }
}

@media (max-width: 760px) {
  .about-section-shell {
    width: calc(100% - 48px);
  }

  .about-hero-band .about-intro {
    min-height: 0;
    padding-block: 64px 112px;
  }

  .about-hero-band h1 {
    font-size: clamp(48px, 14vw, 66px);
  }

  .about-story {
    padding-block: 78px 112px;
  }
}

@media (max-width: 480px) {
  .site-language-selector {
    display: block;
  }

  .site-language-selector .form-select {
    width: 72px;
    padding-inline: 4px 22px;
  }
}
