/* Tokens (palette, radii, spacing, type scale) live in design/tokens.json and
   are generated into /tokens.css, which every page links before this file.
   The same tokens drive the organizer cabinet, the admin panel and the app. */
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100dvh;
  font-family: var(--font);
  background:
    radial-gradient(120% 55% at 50% -8%, var(--glow), transparent 52%),
    var(--ink);
  color: var(--on);
  padding-bottom: 7.5rem;
}
main { position: relative; max-width: 42rem; margin: 0 auto; padding: 2.75rem 1.25rem 3.5rem; }
main.home { max-width: 72rem; padding: 0 1.5rem 1rem; }
main.legal { max-width: 48rem; }
.brand { display: flex; align-items: center; gap: 0.55rem; min-width: 0; }
.brand .mark { display: block; flex: none; }
.brand .mark-navy { display: none; }
[data-theme="light"] .brand .mark-lime { display: none; }
[data-theme="light"] .brand .mark-navy { display: block; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .brand .mark-lime { display: none; }
  :root:not([data-theme]) .brand .mark-navy { display: block; }
}
.wordmark { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; line-height: 1.15; }
.wordmark span { color: var(--lime-text); }
.home .top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  padding-top: 1.15rem;
}
.home .lang { position: static; display: flex; flex-wrap: wrap; align-items: center; gap: 0.1rem; }
.lang { position: absolute; top: 1.5rem; right: 1.25rem; }
.lang button {
  min-height: 2.75rem;
  min-width: 2.5rem;
  padding: 0 0.55rem;
  background: transparent;
  color: var(--muted);
  border: 0;
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
}
.lang button:hover { color: var(--on); }
.lang .theme { margin-right: 0.35rem; }
.home .hero { padding: 4.5rem 0 3.5rem; }
.home h1 {
  font-size: clamp(2.5rem, 4.8vw, 4.4rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.95;
  margin: 0 0 1.35rem;
  max-width: 17ch;
  color: var(--on);
}
h1 { font-size: clamp(1.7rem, 4vw, 2.15rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; margin: 1.15rem 0 0.75rem; }
h2 { font-size: 1.15rem; margin: 1.75rem 0 0.5rem; }
.home h2 {
  font-size: clamp(1.45rem, 2vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 2rem;
  color: var(--on);
}
p, li { color: var(--muted); line-height: 1.55; }
.lede { font-size: 1.12rem; line-height: 1.45; color: var(--muted); margin: 0 0 2rem; max-width: 34rem; }
.cta { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.cta-end { margin: 0.5rem 0 3.5rem; }
a.btn, a.ghost.btn, .home a.ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.7rem 1.35rem;
  border-radius: var(--r-pill);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.01em;
}
a.btn { background: var(--lime); color: var(--on-lime); }
a.btn:hover { filter: brightness(1.05); }
.home a.ghost {
  background: transparent;
  color: var(--on);
  border: 1px solid var(--line);
  font-weight: 600;
}
.home a.ghost:hover { border-color: var(--muted); }
a { color: var(--on); font-weight: 600; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--on); }
a.btn:focus-visible, .home a.ghost:focus-visible,
.lang button:focus-visible, footer a:focus-visible,
.banner a:focus-visible, .banner button:focus-visible,
a.board-row:focus-visible, a.proof:focus-visible {
  outline: 2px solid var(--on);
  outline-offset: 3px;
}
.passport-slot { display: flex; justify-content: flex-end; padding: 0.5rem 0.75rem 1rem 0; }
.passport {
  width: min(100%, 24.5rem);
  margin: 0;
  padding: 1.25rem 1.3rem 1.15rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--match-shadow);
  transform: rotate(-3.5deg);
}
.pp-tag {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.9rem;
}
.pp-who { display: flex; align-items: center; gap: 0.6rem; font-size: 0.95rem; font-weight: 600; color: var(--on); }
.pp-av {
  display: grid; place-items: center;
  width: 2.1rem; height: 2.1rem; border-radius: 50%;
  background: var(--panel-hi); color: var(--on);
  font-size: 0.72rem; font-weight: 700;
}
.pp-head { display: flex; align-items: flex-end; gap: 1rem; margin: 1.15rem 0 1.1rem; }
.pp-level {
  font-size: clamp(4.4rem, 7vw, 5.6rem);
  font-weight: 700;
  line-height: 0.8;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  color: var(--on);
}
.pp-cat { font-size: 1.15rem; font-weight: 700; line-height: 1.15; color: var(--on); }
.pp-sub { font-size: 0.8rem; color: var(--muted); margin-top: 0.2rem; line-height: 1.35; }
.pp-bands { position: relative; display: flex; gap: 3px; height: 7px; }
.pp-bands i { background: var(--line); border-radius: 2px; }
.pp-bands i.on { background: var(--muted); }
.pp-bands b {
  position: absolute; top: -4px;
  width: 3px; height: 15px; margin-left: -1.5px;
  background: var(--lime-stroke); border-radius: 2px;
}
.pp-ends { display: flex; justify-content: space-between; margin-top: 0.4rem; font-size: 0.72rem; color: var(--muted); }
.pp-rel {
  display: grid; grid-template-columns: auto 1fr; align-items: center;
  gap: 0.25rem 0.75rem; margin-top: 1.1rem;
  font-size: 0.88rem; font-weight: 600;
  color: var(--on);
}
.pp-rel .pp-sub { grid-column: 1 / -1; font-weight: 400; margin: 0; }
.pp-bar { height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; }
.pp-bar i { display: block; height: 100%; background: var(--on); }
.pp-last {
  display: flex; gap: 0.65rem; align-items: baseline;
  margin-top: 1rem; padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  font-size: 0.88rem; color: var(--muted); line-height: 1.4;
}
.pp-delta { color: var(--lime-text); font-weight: 700; font-variant-numeric: tabular-nums; flex: none; }
.home .lower { border-top: 1px solid var(--line); padding: 3.75rem 0 3.75rem; }
.how { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem 2.5rem; }
.how li { min-width: 0; }
.how strong { display: block; color: var(--on); font-weight: 600; font-size: 1.05rem; margin-bottom: 0.4rem; }
.how span { display: block; color: var(--muted); line-height: 1.5; font-size: 0.95rem; }
.org {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(17rem, 0.9fr);
  gap: 2.5rem 4rem;
  align-items: start;
}
.org-lead { margin: 0 0 1.6rem; color: var(--on); line-height: 1.5; font-size: 1.05rem; max-width: 34rem; }
a.proof {
  display: grid;
  gap: 1.1rem;
  padding: 1.25rem 1.3rem 1.15rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  color: var(--on);
  text-decoration: none;
  font-weight: 600;
}
a.proof:hover { border-color: var(--muted); }
.proof-tag {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.proof-nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem; }
.proof-nums span { display: grid; gap: 0.15rem; min-width: 0; }
.proof-nums b {
  font-size: clamp(1.9rem, 2.6vw, 2.4rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.proof-nums i { font-style: normal; font-size: 0.8rem; font-weight: 500; color: var(--muted); }
.proof-link { font-size: 0.9rem; color: var(--muted); }
a.proof:hover .proof-link { color: var(--lime-text); }
.level-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(17rem, 0.9fr);
  gap: 2.5rem 4rem;
  align-items: center;
}
.steps { margin: 0; padding: 0 0 0 1.4rem; display: grid; gap: 1rem; max-width: 30rem; }
.steps li { color: var(--on); font-size: 1.05rem; line-height: 1.5; }
.steps li::marker { color: var(--muted); font-weight: 600; }
.boards { display: grid; gap: 2rem; padding: 0.5rem 0 3.5rem; }
.boards[hidden], .board-group[hidden] { display: none; }
.home .boards h2 {
  margin: 0 0 0.85rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--muted);
}
.board-list { display: grid; gap: 0.6rem; }
a.board-row {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) auto;
  gap: 0.2rem 1.25rem;
  align-items: center;
  min-height: 3.25rem;
  padding: 0.9rem 1.1rem;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  color: var(--on);
  text-decoration: none;
  font-weight: 600;
}
a.board-row:hover { border-color: var(--muted); }
.board-when, .board-status {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.board-status { white-space: nowrap; }
.board-name { min-width: 0; }
.board-club {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.85rem;
}
footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.35rem;
  align-items: center;
  padding-bottom: 1rem;
  color: var(--muted);
  font-size: 0.85rem;
}
.banner {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--panel-hi);
  border-top: 1px solid var(--line);
  padding: 0.9rem 1.25rem;
  display: flex; gap: 1rem; align-items: center; justify-content: space-between;
  z-index: 4; flex-wrap: wrap;
}
.banner[hidden] { display: none; }
.banner p { margin: 0; color: var(--on); font-size: 0.9rem; line-height: 1.45; flex: 1 1 16rem; }
.banner-actions { display: flex; gap: 0.5rem; flex: none; }
.banner button {
  background: var(--lime); color: var(--on-lime); border: 0;
  font-weight: 700; min-height: 2.5rem; padding: 0.45rem 0.95rem;
  border-radius: var(--r-pill); cursor: pointer; font: inherit;
}
.banner button.ghost { background: transparent; color: var(--on); border: 1px solid var(--line); font-weight: 600; }
@media (max-width: 900px) {
  body { padding-bottom: 11rem; }
  .home .hero { padding: 2.75rem 0 2.5rem; }
  .passport-slot { justify-content: flex-start; padding: 0.25rem 0 0; }
  .passport { transform: none; }
  .how { grid-template-columns: 1fr; gap: 1.6rem; }
  .org, .level-grid { grid-template-columns: 1fr; gap: 2rem; }
  .proof-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 0.75rem; }
  .boards { padding-bottom: 2.75rem; }
  a.board-row { grid-template-columns: 1fr auto; align-items: start; }
  .board-name { grid-column: 1 / -1; grid-row: 2; }
  .board-status { justify-self: end; }
  .home .lower { padding-top: 2.75rem; }
}
@media (max-width: 420px) {
  main.home { padding-left: 1.15rem; padding-right: 1.15rem; }
  .home h1 { font-size: 2.35rem; }
}
.legal h1 { font-size: clamp(1.7rem, 4vw, 2.15rem); margin-top: 1.15rem; }
.legal h2 { font-size: 1.05rem; color: var(--on); }
.legal h3 { font-size: 0.95rem; margin: 1.15rem 0 0.35rem; color: var(--on); }
.legal p, .legal li { color: var(--muted); }
.legal ul, .legal ol { padding-left: 1.2rem; }
.legal li { margin: 0.3rem 0; }
.legal .meta { font-size: 0.85rem; }
.controller {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--r-control);
  padding: 0.9rem 1rem;
  color: var(--on);
  line-height: 1.5;
}
.table-wrap { overflow-x: auto; margin: 0.75rem 0 1rem; }
.legal table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.legal th, .legal td { border: 1px solid var(--line); padding: 0.45rem 0.55rem; text-align: left; vertical-align: top; color: var(--muted); }
.legal th { color: var(--on); font-weight: 600; }
